diff --git a/content/en/docs/components/orchestration/infrastructure/provider.md b/content/en/docs/components/orchestration/infrastructure/provider.md
index 035b5a9..c45bd40 100644
--- a/content/en/docs/components/orchestration/infrastructure/provider.md
+++ b/content/en/docs/components/orchestration/infrastructure/provider.md
@@ -11,11 +11,11 @@ description: Custom Terraform provider for orchestrating Edge deployments
* **Jira Ticket**: [TICKET-6732](https://jira.telekom-mms.com/browse/IPCEICIS-6732)
* **Assignee**: Martin
* **Status**: Draft
-* **Last Updated**: YYYY-MM-DD
+* **Last Updated**: 2025-12-04
* **TODO**:
- * [ ] Add detailed component description
- * [ ] Include usage examples and code samples
- * [ ] Add architecture diagrams
+ * [x] Add detailed component description
+ * [x] Include usage examples and code samples (NOTE: links to docs, rather than inline refs)
+ * [x] Add architecture diagrams
* [ ] Review and finalize content
{{% /alert %}}
@@ -70,74 +70,25 @@ As a result of this breadth of functionality and cross-compatibility, Terraform
### Verification
-If `terraform apply` completes successfully (without errors), the provider is working correctly. You may also manually validate (in the Edge UI) that your resources have been deployed/reconfigured as Terraform indicated.
+If `terraform apply` completes successfully (without errors), the provider is working correctly. You can also manually validate in the Edge UI that your resources have been deployed/reconfigured as Terraform indicated.
-## Usage Examples
-### [Use Case 1]
+## Status
-[Example with code/commands showing common use case]
+**Maturity**: Experimental
-```bash
-# Example commands
-```
+## Additional Resources
-### [Use Case 2]
-
-[Another common scenario]
+* [Terralist](https://www.terralist.io/)
+* [Terraform](https://developer.hashicorp.com/terraform)
+* [OpenTofu](https://opentofu.org/)
+* [Edge Connect API](https://swagger.edge.platform.mg3.mdb.osc.live)
## Integration Points
* **Edge Connect SDK**: The provider uses the [Edge Connect SDK](http://localhost:1313/docs/components/deployments/edgeconnect/edgeconnect-sdk/) under the hood.
-* **Terralist**: The provider is published using a [custom instance](https://terralist.garm-provider-test.t09.de/) of [Terralist](https://www.terralist.io/). This [can only](https://edp.buildth.ing/DevFW-CICD/stacks/src/commit/5b438097bbd027f0025d6198c34c22f856392a03/template/stacks/terralist/terralist/values.yaml#L9-L38) be written to with a login via [Forgejo](https://edp.buildth.ing/), but can be accessed without such access.
-* **[Component C]**: [How it integrates]
-
-## Architecture
-
-[Optional: Add architectural diagrams and descriptions]
-
-Terralist and its authentication
+* **Terralist**: The provider is published using a [custom instance](https://terralist.garm-provider-test.t09.de/) of [Terralist](https://www.terralist.io/). This [can only](https://edp.buildth.ing/DevFW-CICD/stacks/src/commit/5b438097bbd027f0025d6198c34c22f856392a03/template/stacks/terralist/terralist/values.yaml#L9-L38) be written to with a login via [Forgejo](https://edp.buildth.ing/), but can be read publicly.
### Component Architecture (C4)
-[Add C4 Container or Component diagrams showing the internal structure]
-
-### Sequence Diagrams
-
-[Add sequence diagrams showing key interaction flows with other components]
-
-### Deployment Architecture
-
-[Add infrastructure and deployment diagrams showing how the component is deployed]
-
-## Configuration
-
-[Key configuration options and how to set them]
-
-## Troubleshooting
-
-### [Common Issue 1]
-
-**Problem**: [Description]
-
-**Solution**: [How to fix]
-
-### [Common Issue 2]
-
-**Problem**: [Description]
-
-**Solution**: [How to fix]
-
-## Status
-
-**Maturity**: [Production / Beta / Experimental]
-
-## Additional Resources
-
-* [Link to external documentation]
-* [Link to community resources]
-* [Link to related components]
-
-## Documentation Notes
-
-[Instructions for team members filling in this documentation - remove this section once complete]
+
diff --git a/doc/README-likec4.md b/doc/README-likec4.md
index c38cb99..9e70abf 100644
--- a/doc/README-likec4.md
+++ b/doc/README-likec4.md
@@ -85,15 +85,15 @@ specification {
model {
mySystem = system 'My System' {
description 'System description'
-
+
backend = service 'Backend API' {
description 'REST API service'
}
-
+
db = database 'Database' {
description 'PostgreSQL database'
}
-
+
backend -> db 'reads/writes'
}
}
@@ -101,9 +101,9 @@ model {
views {
view systemOverview {
title "System Overview"
-
+
include mySystem
-
+
autoLayout TopBottom
}
}
@@ -139,7 +139,7 @@ Parameters:
1. **Edit Models**
- Modify `.c4` files in `models/` or `views/`
-
+
2. **Preview Changes**
```bash
cd resources/edp-likec4 # or doc-likec4
@@ -216,7 +216,7 @@ specification {
element system
element container
element component
-
+
relationship async
relationship sync
}
@@ -231,19 +231,19 @@ model {
customer = person 'Customer' {
description 'End user'
}
-
+
system = system 'My System' {
frontend = container 'Frontend' {
description 'React application'
}
-
+
backend = container 'Backend' {
description 'Node.js API'
}
-
+
frontend -> backend 'API calls'
}
-
+
customer -> system.frontend 'uses'
}
```
@@ -256,17 +256,17 @@ Create diagrams:
views {
view overview {
title "System Overview"
-
+
include *
-
+
autoLayout TopBottom
}
-
+
view systemDetail {
title "System Details"
-
+
include system.*
-
+
autoLayout LeftRight
}
}
diff --git a/resources/edp-likec4/deployment/otc/faas-deployment.c4 b/resources/edp-likec4/deployment/otc/faas-deployment.c4
index 21f9fa2..22a09c9 100644
--- a/resources/edp-likec4/deployment/otc/faas-deployment.c4
+++ b/resources/edp-likec4/deployment/otc/faas-deployment.c4
@@ -1,8 +1,7 @@
deployment {
cloud otc-faas 'OTC prototype FaaS' {
- description 'OTC environments for Prototype faaS.
- '
+ description 'OTC environments for Prototype FaaS.'
technology 'OTC'
environment dev 'tenant Dev' {
@@ -24,7 +23,7 @@ deployment {
}
paas cloudServices 'EDP Cloud Services' {
- description 'EDP Cloud Services (Postgres, Redis, etc.'
+ description 'EDP Cloud Services (Postgres, Redis, etc.)'
technology 'Cloud Services'
}
@@ -55,7 +54,7 @@ deployment {
paas cloudServices 'EDP Cloud Services' {
- description 'EDP Cloud Services (Postgres, Redis, etc.'
+ description 'EDP Cloud Services (Postgres, Redis, etc.)'
technology 'Cloud Services'
}
@@ -63,7 +62,6 @@ deployment {
description '*.buildth.ing'
icon tech:kubernetes
technology 'Kubernetes'
-
}
}
diff --git a/resources/edp-likec4/views/deployment/edge/provider.c4 b/resources/edp-likec4/views/deployment/edge/provider.c4
new file mode 100644
index 0000000..d7aee46
--- /dev/null
+++ b/resources/edp-likec4/views/deployment/edge/provider.c4
@@ -0,0 +1,68 @@
+deployment {
+
+ paas edgeProvider 'Terraform Edge provider' {
+ icon tech:terraform
+ description "Unlocks the terraform ecosystem"
+ -> edgeSdk "built using"
+ -> terralist "published to"
+ -> edp "hosted on"
+ }
+
+ environment edgeProviderHost 'OTC' {
+
+ cluster edp 'Forgejo for all EDP-tenants' {
+ icon tech:git
+ instanceOf edp.forgejo 'Forgejo for all EDP-tenants' {
+ description 'edp.buildth.ing'
+ }
+ }
+
+ paas terralist 'Terralist' {
+ icon tech:terraform
+ description 'Terraform provider private hosting'
+ technology 'Cloud Services'
+ -> edp "authenticates via"
+ }
+ }
+
+ paas edgeSdk 'Edge Cloud SDK' {
+ icon tech:go
+ description 'Wrapper around API'
+ technology 'Cloud Services'
+ -> edgeApi "calls"
+ -> edp "hosted on"
+ }
+
+ environment edgeCloud 'Edge cloud' {
+
+ paas edgeApi 'Edge Cloud API' {
+ icon tech:swagger
+ link https://swagger.edge.platform.mg3.mdb.osc.live "Documentation"
+ technology 'Edge Cloud (managed)'
+ -> edgeResources "creates/destroys"
+ }
+
+ paas edgeResources 'Edge Cloud Resources' {
+ description 'App, AppInstance, etc.'
+ technology 'Edge Cloud (managed)'
+ }
+
+ }
+}
+
+views {
+ deployment view provider {
+ title 'Terraform Edge provider'
+
+ include
+ edgeProviderHost,
+ edp,
+ edgeResources,
+ edgeCloud,
+ edgeApi,
+ terralist,
+ edgeSdk,
+ edgeProvider,
+ }
+}
+
diff --git a/static/js/likec4-webcomponent.js b/static/js/likec4-webcomponent.js
index b8c7e39..e42f74a 100644
--- a/static/js/likec4-webcomponent.js
+++ b/static/js/likec4-webcomponent.js
@@ -1,4 +1,4 @@
-var LikeC4Views=(function(u6){"use strict";/* prettier-ignore-start */
+var LikeC4Views=(function(d6){"use strict";/* prettier-ignore-start */
/* eslint-disable */
/******************************************************************************
@@ -7,8 +7,8 @@ var LikeC4Views=(function(u6){"use strict";/* prettier-ignore-start */
******************************************************************************/
-function S1e(e,r){for(var n=0;no[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Vz(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var d6={exports:{}},p1={};var qz;function C1e(){if(qz)return p1;qz=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(o,a,i){var s=null;if(i!==void 0&&(s=""+i),a.key!==void 0&&(s=""+a.key),"key"in a){i={};for(var l in a)l!=="key"&&(i[l]=a[l])}else i=a;return a=i.ref,{$$typeof:e,type:o,key:s,ref:a!==void 0?a:null,props:i}}return p1.Fragment=r,p1.jsx=n,p1.jsxs=n,p1}var Uz;function T1e(){return Uz||(Uz=1,d6.exports=C1e()),d6.exports}var y=T1e(),p6={exports:{}},Ot={};var Wz;function A1e(){if(Wz)return Ot;Wz=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),f=Symbol.iterator;function g(G){return G===null||typeof G!="object"?null:(G=f&&G[f]||G["@@iterator"],typeof G=="function"?G:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,w={};function k(G,K,j){this.props=G,this.context=K,this.refs=w,this.updater=j||b}k.prototype.isReactComponent={},k.prototype.setState=function(G,K){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,K,"setState")},k.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function C(){}C.prototype=k.prototype;function _(G,K,j){this.props=G,this.context=K,this.refs=w,this.updater=j||b}var T=_.prototype=new C;T.constructor=_,x(T,k.prototype),T.isPureReactComponent=!0;var A=Array.isArray;function R(){}var D={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function M(G,K,j){var Y=j.ref;return{$$typeof:e,type:G,key:K,ref:Y!==void 0?Y:null,props:j}}function O(G,K){return M(G.type,K,G.props)}function F(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function L(G){var K={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(j){return K[j]})}var U=/\/+/g;function P(G,K){return typeof G=="object"&&G!==null&&G.key!=null?L(""+G.key):K.toString(36)}function V(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(R,R):(G.status="pending",G.then(function(K){G.status==="pending"&&(G.status="fulfilled",G.value=K)},function(K){G.status==="pending"&&(G.status="rejected",G.reason=K)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function I(G,K,j,Y,Q){var J=typeof G;(J==="undefined"||J==="boolean")&&(G=null);var ie=!1;if(G===null)ie=!0;else switch(J){case"bigint":case"string":case"number":ie=!0;break;case"object":switch(G.$$typeof){case e:case r:ie=!0;break;case d:return ie=G._init,I(ie(G._payload),K,j,Y,Q)}}if(ie)return Q=Q(G),ie=Y===""?"."+P(G,0):Y,A(Q)?(j="",ie!=null&&(j=ie.replace(U,"$&/")+"/"),I(Q,K,j,"",function(ge){return ge})):Q!=null&&(F(Q)&&(Q=O(Q,j+(Q.key==null||G&&G.key===Q.key?"":(""+Q.key).replace(U,"$&/")+"/")+ie)),K.push(Q)),1;ie=0;var ne=Y===""?".":Y+":";if(A(G))for(var re=0;re"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),f6.exports=R1e(),f6.exports}var Ki=Kz();const Zz=Vz(Ki);function N1e(e,r,n){let o=a=>e(a,...r);return n===void 0?o:Object.assign(o,{lazy:n,lazyArgs:r})}function Do(e,r,n){let o=e.length-r.length;if(o===0)return e(...r);if(o===1)return N1e(e,r,n);throw Error("Wrong number of arguments")}function Kl(...e){return Do(D1e,e)}const D1e=(e,r)=>e.length>=r;function bt(e,r){if(typeof e>"u"||e==null){const n=typeof r=="function"?r():r;throw new Error(n??`Expected defined value, but received ${e}`)}return e}function at(e,r){if(!e)throw new Error(r??"Invariant failed")}function Zi(e){throw new Error(`NonExhaustive value: ${e}`)}function yr(e,r,n){const o=typeof r=="symbol"?r:Symbol.for(r);return e.hasOwnProperty(o)||Object.defineProperty(e,o,{enumerable:!1,writable:!1,value:n()}),e[o]}function $1e(...e){return Do(M1e,e)}function M1e(e,r){let n={};for(let[o,a]of e.entries())n[a]=r(a,o,e);return n}function Vv(...e){return Do(h1,e)}function h1(e,r){if(e===r||Object.is(e,r))return!0;if(typeof e!="object"||typeof r!="object"||e===null||r===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(r))return!1;if(Array.isArray(e))return P1e(e,r);if(e instanceof Map)return z1e(e,r);if(e instanceof Set)return I1e(e,r);if(e instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp)return e.toString()===r.toString();if(Object.keys(e).length!==Object.keys(r).length)return!1;for(let[n,o]of Object.entries(e))if(!(n in r)||!h1(o,r[n]))return!1;return!0}function P1e(e,r){if(e.length!==r.length)return!1;for(let[n,o]of e.entries())if(!h1(o,r[n]))return!1;return!0}function z1e(e,r){if(e.size!==r.size)return!1;for(let[n,o]of e.entries())if(!r.has(n)||!h1(o,r.get(n)))return!1;return!0}function I1e(e,r){if(e.size!==r.size)return!1;let n=[...r];for(let o of e){let a=!1;for(let[i,s]of n.entries())if(h1(o,s)){a=!0,n.splice(i,1);break}if(!a)return!1}return!0}const{min:O1e,max:j1e}=Math,Od=(e,r=0,n=1)=>O1e(j1e(r,e),n),m6=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let r=0;r<=3;r++)r<3?((e[r]<0||e[r]>255)&&(e._clipped=!0),e[r]=Od(e[r],0,255)):r===3&&(e[r]=Od(e[r],0,1));return e},Qz={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])Qz[`[object ${e}]`]=e.toLowerCase();function Xt(e){return Qz[Object.prototype.toString.call(e)]||"object"}const Ft=(e,r=null)=>e.length>=3?Array.prototype.slice.call(e):Xt(e[0])=="object"&&r?r.split("").filter(n=>e[0][n]!==void 0).map(n=>e[0][n]):e[0].slice(0),Kh=e=>{if(e.length<2)return null;const r=e.length-1;return Xt(e[r])=="string"?e[r].toLowerCase():null},{PI:qv,min:Jz,max:eI}=Math,si=e=>Math.round(e*100)/100,g6=e=>Math.round(e*100)/100,Zl=qv*2,y6=qv/3,L1e=qv/180,B1e=180/qv;function tI(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}const jt={format:{},autodetect:[]};let Ve=class{constructor(...r){const n=this;if(Xt(r[0])==="object"&&r[0].constructor&&r[0].constructor===this.constructor)return r[0];let o=Kh(r),a=!1;if(!o){a=!0,jt.sorted||(jt.autodetect=jt.autodetect.sort((i,s)=>s.p-i.p),jt.sorted=!0);for(let i of jt.autodetect)if(o=i.test(...r),o)break}if(jt.format[o]){const i=jt.format[o].apply(null,a?r:r.slice(0,-1));n._rgb=m6(i)}else throw new Error("unknown format: "+r);n._rgb.length===3&&n._rgb.push(1)}toString(){return Xt(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}};const F1e="3.1.2",Lt=(...e)=>new Ve(...e);Lt.version=F1e;const Zh={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",cyan:"#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",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",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",maroon2:"#7f0000",maroon3:"#b03060",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",purple2:"#7f007f",purple3:"#a020f0",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",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},H1e=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,V1e=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,rI=e=>{if(e.match(H1e)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const r=parseInt(e,16),n=r>>16,o=r>>8&255,a=r&255;return[n,o,a,1]}if(e.match(V1e)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const r=parseInt(e,16),n=r>>24&255,o=r>>16&255,a=r>>8&255,i=Math.round((r&255)/255*100)/100;return[n,o,a,i]}throw new Error(`unknown hex color: ${e}`)},{round:Uv}=Math,nI=(...e)=>{let[r,n,o,a]=Ft(e,"rgba"),i=Kh(e)||"auto";a===void 0&&(a=1),i==="auto"&&(i=a<1?"rgba":"rgb"),r=Uv(r),n=Uv(n),o=Uv(o);let l="000000"+(r<<16|n<<8|o).toString(16);l=l.substr(l.length-6);let c="0"+Uv(a*255).toString(16);switch(c=c.substr(c.length-2),i.toLowerCase()){case"rgba":return`#${l}${c}`;case"argb":return`#${c}${l}`;default:return`#${l}`}};Ve.prototype.name=function(){const e=nI(this._rgb,"rgb");for(let r of Object.keys(Zh))if(Zh[r]===e)return r.toLowerCase();return e},jt.format.named=e=>{if(e=e.toLowerCase(),Zh[e])return rI(Zh[e]);throw new Error("unknown color name: "+e)},jt.autodetect.push({p:5,test:(e,...r)=>{if(!r.length&&Xt(e)==="string"&&Zh[e.toLowerCase()])return"named"}}),Ve.prototype.alpha=function(e,r=!1){return e!==void 0&&Xt(e)==="number"?r?(this._rgb[3]=e,this):new Ve([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},Ve.prototype.clipped=function(){return this._rgb._clipped||!1};const rl={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},q1e=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Ql(e){const r=q1e.get(String(e).toLowerCase());if(!r)throw new Error("unknown Lab illuminant "+e);rl.labWhitePoint=e,rl.Xn=r[0],rl.Zn=r[1]}function f1(){return rl.labWhitePoint}const b6=(...e)=>{e=Ft(e,"lab");const[r,n,o]=e,[a,i,s]=U1e(r,n,o),[l,c,u]=oI(a,i,s);return[l,c,u,e.length>3?e[3]:1]},U1e=(e,r,n)=>{const{kE:o,kK:a,kKE:i,Xn:s,Yn:l,Zn:c}=rl,u=(e+16)/116,d=.002*r+u,h=u-.005*n,f=d*d*d,g=h*h*h,b=f>o?f:(116*d-16)/a,x=e>i?Math.pow((e+16)/116,3):e/a,w=g>o?g:(116*h-16)/a,k=b*s,C=x*l,_=w*c;return[k,C,_]},v6=e=>{const r=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055)*r},oI=(e,r,n)=>{const{MtxAdaptMa:o,MtxAdaptMaI:a,MtxXYZ2RGB:i,RefWhiteRGB:s,Xn:l,Yn:c,Zn:u}=rl,d=l*o.m00+c*o.m10+u*o.m20,h=l*o.m01+c*o.m11+u*o.m21,f=l*o.m02+c*o.m12+u*o.m22,g=s.X*o.m00+s.Y*o.m10+s.Z*o.m20,b=s.X*o.m01+s.Y*o.m11+s.Z*o.m21,x=s.X*o.m02+s.Y*o.m12+s.Z*o.m22,w=(e*o.m00+r*o.m10+n*o.m20)*(g/d),k=(e*o.m01+r*o.m11+n*o.m21)*(b/h),C=(e*o.m02+r*o.m12+n*o.m22)*(x/f),_=w*a.m00+k*a.m10+C*a.m20,T=w*a.m01+k*a.m11+C*a.m21,A=w*a.m02+k*a.m12+C*a.m22,R=v6(_*i.m00+T*i.m10+A*i.m20),D=v6(_*i.m01+T*i.m11+A*i.m21),N=v6(_*i.m02+T*i.m12+A*i.m22);return[R*255,D*255,N*255]},x6=(...e)=>{const[r,n,o,...a]=Ft(e,"rgb"),[i,s,l]=aI(r,n,o),[c,u,d]=W1e(i,s,l);return[c,u,d,...a.length>0&&a[0]<1?[a[0]]:[]]};function W1e(e,r,n){const{Xn:o,Yn:a,Zn:i,kE:s,kK:l}=rl,c=e/o,u=r/a,d=n/i,h=c>s?Math.pow(c,1/3):(l*c+16)/116,f=u>s?Math.pow(u,1/3):(l*u+16)/116,g=d>s?Math.pow(d,1/3):(l*d+16)/116;return[116*f-16,500*(h-f),200*(f-g)]}function w6(e){const r=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4))*r}const aI=(e,r,n)=>{e=w6(e/255),r=w6(r/255),n=w6(n/255);const{MtxRGB2XYZ:o,MtxAdaptMa:a,MtxAdaptMaI:i,Xn:s,Yn:l,Zn:c,As:u,Bs:d,Cs:h}=rl;let f=e*o.m00+r*o.m10+n*o.m20,g=e*o.m01+r*o.m11+n*o.m21,b=e*o.m02+r*o.m12+n*o.m22;const x=s*a.m00+l*a.m10+c*a.m20,w=s*a.m01+l*a.m11+c*a.m21,k=s*a.m02+l*a.m12+c*a.m22;let C=f*a.m00+g*a.m10+b*a.m20,_=f*a.m01+g*a.m11+b*a.m21,T=f*a.m02+g*a.m12+b*a.m22;return C*=x/u,_*=w/d,T*=k/h,f=C*i.m00+_*i.m10+T*i.m20,g=C*i.m01+_*i.m11+T*i.m21,b=C*i.m02+_*i.m12+T*i.m22,[f,g,b]};Ve.prototype.lab=function(){return x6(this._rgb)},Object.assign(Lt,{lab:(...e)=>new Ve(...e,"lab"),getLabWhitePoint:f1,setLabWhitePoint:Ql}),jt.format.lab=b6,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"lab"),Xt(e)==="array"&&e.length===3)return"lab"}}),Ve.prototype.darken=function(e=1){const r=this,n=r.lab();return n[0]-=rl.Kn*e,new Ve(n,"lab").alpha(r.alpha(),!0)},Ve.prototype.brighten=function(e=1){return this.darken(-e)},Ve.prototype.darker=Ve.prototype.darken,Ve.prototype.brighter=Ve.prototype.brighten,Ve.prototype.get=function(e){const[r,n]=e.split("."),o=this[r]();if(n){const a=r.indexOf(n)-(r.substr(0,2)==="ok"?2:0);if(a>-1)return o[a];throw new Error(`unknown channel ${n} in mode ${r}`)}else return o};const{pow:Y1e}=Math,G1e=1e-7,X1e=20;Ve.prototype.luminance=function(e,r="rgb"){if(e!==void 0&&Xt(e)==="number"){if(e===0)return new Ve([0,0,0,this._rgb[3]],"rgb");if(e===1)return new Ve([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),o=X1e;const a=(s,l)=>{const c=s.interpolate(l,.5,r),u=c.luminance();return Math.abs(e-u)e?a(s,c):a(c,l)},i=(n>e?a(new Ve([0,0,0]),this):a(this,new Ve([255,255,255]))).rgb();return new Ve([...i,this._rgb[3]])}return K1e(...this._rgb.slice(0,3))};const K1e=(e,r,n)=>(e=k6(e),r=k6(r),n=k6(n),.2126*e+.7152*r+.0722*n),k6=e=>(e/=255,e<=.03928?e/12.92:Y1e((e+.055)/1.055,2.4)),$o={},Qh=(e,r,n=.5,...o)=>{let a=o[0]||"lrgb";if(!$o[a]&&!o.length&&(a=Object.keys($o)[0]),!$o[a])throw new Error(`interpolation mode ${a} is not defined`);return Xt(e)!=="object"&&(e=new Ve(e)),Xt(r)!=="object"&&(r=new Ve(r)),$o[a](e,r,n).alpha(e.alpha()+n*(r.alpha()-e.alpha()))};Ve.prototype.mix=Ve.prototype.interpolate=function(e,r=.5,...n){return Qh(this,e,r,...n)},Ve.prototype.premultiply=function(e=!1){const r=this._rgb,n=r[3];return e?(this._rgb=[r[0]*n,r[1]*n,r[2]*n,n],this):new Ve([r[0]*n,r[1]*n,r[2]*n,n],"rgb")};const{sin:Z1e,cos:Q1e}=Math,iI=(...e)=>{let[r,n,o]=Ft(e,"lch");return isNaN(o)&&(o=0),o=o*L1e,[r,Q1e(o)*n,Z1e(o)*n]},_6=(...e)=>{e=Ft(e,"lch");const[r,n,o]=e,[a,i,s]=iI(r,n,o),[l,c,u]=b6(a,i,s);return[l,c,u,e.length>3?e[3]:1]},J1e=(...e)=>{const r=tI(Ft(e,"hcl"));return _6(...r)},{sqrt:e0e,atan2:t0e,round:r0e}=Math,sI=(...e)=>{const[r,n,o]=Ft(e,"lab"),a=e0e(n*n+o*o);let i=(t0e(o,n)*B1e+360)%360;return r0e(a*1e4)===0&&(i=Number.NaN),[r,a,i]},E6=(...e)=>{const[r,n,o,...a]=Ft(e,"rgb"),[i,s,l]=x6(r,n,o),[c,u,d]=sI(i,s,l);return[c,u,d,...a.length>0&&a[0]<1?[a[0]]:[]]};Ve.prototype.lch=function(){return E6(this._rgb)},Ve.prototype.hcl=function(){return tI(E6(this._rgb))},Object.assign(Lt,{lch:(...e)=>new Ve(...e,"lch"),hcl:(...e)=>new Ve(...e,"hcl")}),jt.format.lch=_6,jt.format.hcl=J1e,["lch","hcl"].forEach(e=>jt.autodetect.push({p:2,test:(...r)=>{if(r=Ft(r,e),Xt(r)==="array"&&r.length===3)return e}})),Ve.prototype.saturate=function(e=1){const r=this,n=r.lch();return n[1]+=rl.Kn*e,n[1]<0&&(n[1]=0),new Ve(n,"lch").alpha(r.alpha(),!0)},Ve.prototype.desaturate=function(e=1){return this.saturate(-e)},Ve.prototype.set=function(e,r,n=!1){const[o,a]=e.split("."),i=this[o]();if(a){const s=o.indexOf(a)-(o.substr(0,2)==="ok"?2:0);if(s>-1){if(Xt(r)=="string")switch(r.charAt(0)){case"+":i[s]+=+r;break;case"-":i[s]+=+r;break;case"*":i[s]*=+r.substr(1);break;case"/":i[s]/=+r.substr(1);break;default:i[s]=+r}else if(Xt(r)==="number")i[s]=r;else throw new Error("unsupported value for Color.set");const l=new Ve(i,o);return n?(this._rgb=l._rgb,this):l}throw new Error(`unknown channel ${a} in mode ${o}`)}else return i},Ve.prototype.tint=function(e=.5,...r){return Qh(this,"white",e,...r)},Ve.prototype.shade=function(e=.5,...r){return Qh(this,"black",e,...r)};const n0e=(e,r,n)=>{const o=e._rgb,a=r._rgb;return new Ve(o[0]+n*(a[0]-o[0]),o[1]+n*(a[1]-o[1]),o[2]+n*(a[2]-o[2]),"rgb")};$o.rgb=n0e;const{sqrt:S6,pow:Jh}=Math,o0e=(e,r,n)=>{const[o,a,i]=e._rgb,[s,l,c]=r._rgb;return new Ve(S6(Jh(o,2)*(1-n)+Jh(s,2)*n),S6(Jh(a,2)*(1-n)+Jh(l,2)*n),S6(Jh(i,2)*(1-n)+Jh(c,2)*n),"rgb")};$o.lrgb=o0e;const a0e=(e,r,n)=>{const o=e.lab(),a=r.lab();return new Ve(o[0]+n*(a[0]-o[0]),o[1]+n*(a[1]-o[1]),o[2]+n*(a[2]-o[2]),"lab")};$o.lab=a0e;const ef=(e,r,n,o)=>{let a,i;o==="hsl"?(a=e.hsl(),i=r.hsl()):o==="hsv"?(a=e.hsv(),i=r.hsv()):o==="hcg"?(a=e.hcg(),i=r.hcg()):o==="hsi"?(a=e.hsi(),i=r.hsi()):o==="lch"||o==="hcl"?(o="hcl",a=e.hcl(),i=r.hcl()):o==="oklch"&&(a=e.oklch().reverse(),i=r.oklch().reverse());let s,l,c,u,d,h;(o.substr(0,1)==="h"||o==="oklch")&&([s,c,d]=a,[l,u,h]=i);let f,g,b,x;return!isNaN(s)&&!isNaN(l)?(l>s&&l-s>180?x=l-(s+360):l180?x=l+360-s:x=l-s,g=s+n*x):isNaN(s)?isNaN(l)?g=Number.NaN:(g=l,(d==1||d==0)&&o!="hsv"&&(f=u)):(g=s,(h==1||h==0)&&o!="hsv"&&(f=c)),f===void 0&&(f=c+n*(u-c)),b=d+n*(h-d),o==="oklch"?new Ve([b,f,g],o):new Ve([g,f,b],o)},lI=(e,r,n)=>ef(e,r,n,"lch");$o.lch=lI,$o.hcl=lI;const i0e=e=>{if(Xt(e)=="number"&&e>=0&&e<=16777215){const r=e>>16,n=e>>8&255,o=e&255;return[r,n,o,1]}throw new Error("unknown num color: "+e)},s0e=(...e)=>{const[r,n,o]=Ft(e,"rgb");return(r<<16)+(n<<8)+o};Ve.prototype.num=function(){return s0e(this._rgb)},Object.assign(Lt,{num:(...e)=>new Ve(...e,"num")}),jt.format.num=i0e,jt.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&Xt(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const l0e=(e,r,n)=>{const o=e.num(),a=r.num();return new Ve(o+n*(a-o),"num")};$o.num=l0e;const{floor:c0e}=Math,u0e=(...e)=>{e=Ft(e,"hcg");let[r,n,o]=e,a,i,s;o=o*255;const l=n*255;if(n===0)a=i=s=o;else{r===360&&(r=0),r>360&&(r-=360),r<0&&(r+=360),r/=60;const c=c0e(r),u=r-c,d=o*(1-n),h=d+l*(1-u),f=d+l*u,g=d+l;switch(c){case 0:[a,i,s]=[g,f,d];break;case 1:[a,i,s]=[h,g,d];break;case 2:[a,i,s]=[d,g,f];break;case 3:[a,i,s]=[d,h,g];break;case 4:[a,i,s]=[f,d,g];break;case 5:[a,i,s]=[g,d,h];break}}return[a,i,s,e.length>3?e[3]:1]},d0e=(...e)=>{const[r,n,o]=Ft(e,"rgb"),a=Jz(r,n,o),i=eI(r,n,o),s=i-a,l=s*100/255,c=a/(255-s)*100;let u;return s===0?u=Number.NaN:(r===i&&(u=(n-o)/s),n===i&&(u=2+(o-r)/s),o===i&&(u=4+(r-n)/s),u*=60,u<0&&(u+=360)),[u,l,c]};Ve.prototype.hcg=function(){return d0e(this._rgb)};const p0e=(...e)=>new Ve(...e,"hcg");Lt.hcg=p0e,jt.format.hcg=u0e,jt.autodetect.push({p:1,test:(...e)=>{if(e=Ft(e,"hcg"),Xt(e)==="array"&&e.length===3)return"hcg"}});const h0e=(e,r,n)=>ef(e,r,n,"hcg");$o.hcg=h0e;const{cos:tf}=Math,f0e=(...e)=>{e=Ft(e,"hsi");let[r,n,o]=e,a,i,s;return isNaN(r)&&(r=0),isNaN(n)&&(n=0),r>360&&(r-=360),r<0&&(r+=360),r/=360,r<1/3?(s=(1-n)/3,a=(1+n*tf(Zl*r)/tf(y6-Zl*r))/3,i=1-(s+a)):r<2/3?(r-=1/3,a=(1-n)/3,i=(1+n*tf(Zl*r)/tf(y6-Zl*r))/3,s=1-(a+i)):(r-=2/3,i=(1-n)/3,s=(1+n*tf(Zl*r)/tf(y6-Zl*r))/3,a=1-(i+s)),a=Od(o*a*3),i=Od(o*i*3),s=Od(o*s*3),[a*255,i*255,s*255,e.length>3?e[3]:1]},{min:m0e,sqrt:g0e,acos:y0e}=Math,b0e=(...e)=>{let[r,n,o]=Ft(e,"rgb");r/=255,n/=255,o/=255;let a;const i=m0e(r,n,o),s=(r+n+o)/3,l=s>0?1-i/s:0;return l===0?a=NaN:(a=(r-n+(r-o))/2,a/=g0e((r-n)*(r-n)+(r-o)*(n-o)),a=y0e(a),o>n&&(a=Zl-a),a/=Zl),[a*360,l,s]};Ve.prototype.hsi=function(){return b0e(this._rgb)};const v0e=(...e)=>new Ve(...e,"hsi");Lt.hsi=v0e,jt.format.hsi=f0e,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"hsi"),Xt(e)==="array"&&e.length===3)return"hsi"}});const x0e=(e,r,n)=>ef(e,r,n,"hsi");$o.hsi=x0e;const C6=(...e)=>{e=Ft(e,"hsl");const[r,n,o]=e;let a,i,s;if(n===0)a=i=s=o*255;else{const l=[0,0,0],c=[0,0,0],u=o<.5?o*(1+n):o+n-o*n,d=2*o-u,h=r/360;l[0]=h+1/3,l[1]=h,l[2]=h-1/3;for(let f=0;f<3;f++)l[f]<0&&(l[f]+=1),l[f]>1&&(l[f]-=1),6*l[f]<1?c[f]=d+(u-d)*6*l[f]:2*l[f]<1?c[f]=u:3*l[f]<2?c[f]=d+(u-d)*(2/3-l[f])*6:c[f]=d;[a,i,s]=[c[0]*255,c[1]*255,c[2]*255]}return e.length>3?[a,i,s,e[3]]:[a,i,s,1]},cI=(...e)=>{e=Ft(e,"rgba");let[r,n,o]=e;r/=255,n/=255,o/=255;const a=Jz(r,n,o),i=eI(r,n,o),s=(i+a)/2;let l,c;return i===a?(l=0,c=Number.NaN):l=s<.5?(i-a)/(i+a):(i-a)/(2-i-a),r==i?c=(n-o)/(i-a):n==i?c=2+(o-r)/(i-a):o==i&&(c=4+(r-n)/(i-a)),c*=60,c<0&&(c+=360),e.length>3&&e[3]!==void 0?[c,l,s,e[3]]:[c,l,s]};Ve.prototype.hsl=function(){return cI(this._rgb)};const w0e=(...e)=>new Ve(...e,"hsl");Lt.hsl=w0e,jt.format.hsl=C6,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"hsl"),Xt(e)==="array"&&e.length===3)return"hsl"}});const k0e=(e,r,n)=>ef(e,r,n,"hsl");$o.hsl=k0e;const{floor:_0e}=Math,E0e=(...e)=>{e=Ft(e,"hsv");let[r,n,o]=e,a,i,s;if(o*=255,n===0)a=i=s=o;else{r===360&&(r=0),r>360&&(r-=360),r<0&&(r+=360),r/=60;const l=_0e(r),c=r-l,u=o*(1-n),d=o*(1-n*c),h=o*(1-n*(1-c));switch(l){case 0:[a,i,s]=[o,h,u];break;case 1:[a,i,s]=[d,o,u];break;case 2:[a,i,s]=[u,o,h];break;case 3:[a,i,s]=[u,d,o];break;case 4:[a,i,s]=[h,u,o];break;case 5:[a,i,s]=[o,u,d];break}}return[a,i,s,e.length>3?e[3]:1]},{min:S0e,max:C0e}=Math,T0e=(...e)=>{e=Ft(e,"rgb");let[r,n,o]=e;const a=S0e(r,n,o),i=C0e(r,n,o),s=i-a;let l,c,u;return u=i/255,i===0?(l=Number.NaN,c=0):(c=s/i,r===i&&(l=(n-o)/s),n===i&&(l=2+(o-r)/s),o===i&&(l=4+(r-n)/s),l*=60,l<0&&(l+=360)),[l,c,u]};Ve.prototype.hsv=function(){return T0e(this._rgb)};const A0e=(...e)=>new Ve(...e,"hsv");Lt.hsv=A0e,jt.format.hsv=E0e,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"hsv"),Xt(e)==="array"&&e.length===3)return"hsv"}});const R0e=(e,r,n)=>ef(e,r,n,"hsv");$o.hsv=R0e;function Wv(e,r){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(r[0])||(r=r.map(s=>[s]));let o=r[0].length,a=r[0].map((s,l)=>r.map(c=>c[l])),i=e.map(s=>a.map(l=>Array.isArray(s)?s.reduce((c,u,d)=>c+u*(l[d]||0),0):l.reduce((c,u)=>c+u*s,0)));return n===1&&(i=i[0]),o===1?i.map(s=>s[0]):i}const T6=(...e)=>{e=Ft(e,"lab");const[r,n,o,...a]=e,[i,s,l]=N0e([r,n,o]),[c,u,d]=oI(i,s,l);return[c,u,d,...a.length>0&&a[0]<1?[a[0]]:[]]};function N0e(e){var r=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],n=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],o=Wv(n,e);return Wv(r,o.map(a=>a**3))}const A6=(...e)=>{const[r,n,o,...a]=Ft(e,"rgb"),i=aI(r,n,o);return[...D0e(i),...a.length>0&&a[0]<1?[a[0]]:[]]};function D0e(e){const r=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],n=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],o=Wv(r,e);return Wv(n,o.map(a=>Math.cbrt(a)))}Ve.prototype.oklab=function(){return A6(this._rgb)},Object.assign(Lt,{oklab:(...e)=>new Ve(...e,"oklab")}),jt.format.oklab=T6,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"oklab"),Xt(e)==="array"&&e.length===3)return"oklab"}});const $0e=(e,r,n)=>{const o=e.oklab(),a=r.oklab();return new Ve(o[0]+n*(a[0]-o[0]),o[1]+n*(a[1]-o[1]),o[2]+n*(a[2]-o[2]),"oklab")};$o.oklab=$0e;const M0e=(e,r,n)=>ef(e,r,n,"oklch");$o.oklch=M0e;const{pow:R6,sqrt:N6,PI:D6,cos:uI,sin:dI,atan2:P0e}=Math,z0e=(e,r="lrgb",n=null)=>{const o=e.length;n||(n=Array.from(new Array(o)).map(()=>1));const a=o/n.reduce(function(h,f){return h+f});if(n.forEach((h,f)=>{n[f]*=a}),e=e.map(h=>new Ve(h)),r==="lrgb")return I0e(e,n);const i=e.shift(),s=i.get(r),l=[];let c=0,u=0;for(let h=0;h{const g=h.get(r);d+=h.alpha()*n[f+1];for(let b=0;b=360;)f-=360;s[h]=f}else s[h]=s[h]/l[h];return d/=o,new Ve(s,r).alpha(d>.99999?1:d,!0)},I0e=(e,r)=>{const n=e.length,o=[0,0,0,0];for(let a=0;a.9999999&&(o[3]=1),new Ve(m6(o))},{pow:O0e}=Math;function Yv(e){let r="rgb",n=Lt("#ccc"),o=0,a=[0,1],i=[],s=[0,0],l=!1,c=[],u=!1,d=0,h=1,f=!1,g={},b=!0,x=1;const w=function(D){if(D=D||["#fff","#000"],D&&Xt(D)==="string"&&Lt.brewer&&Lt.brewer[D.toLowerCase()]&&(D=Lt.brewer[D.toLowerCase()]),Xt(D)==="array"){D.length===1&&(D=[D[0],D[0]]),D=D.slice(0);for(let N=0;N=l[M];)M++;return M-1}return 0};let C=D=>D,_=D=>D;const T=function(D,N){let M,O;if(N==null&&(N=!1),isNaN(D)||D===null)return n;N?O=D:l&&l.length>2?O=k(D)/(l.length-2):h!==d?O=(D-d)/(h-d):O=1,O=_(O),N||(O=C(O)),x!==1&&(O=O0e(O,x)),O=s[0]+O*(1-s[0]-s[1]),O=Od(O,0,1);const F=Math.floor(O*1e4);if(b&&g[F])M=g[F];else{if(Xt(c)==="array")for(let L=0;L=U&&L===i.length-1){M=c[L];break}if(O>U&&Og={};w(e);const R=function(D){const N=Lt(T(D));return u&&N[u]?N[u]():N};return R.classes=function(D){if(D!=null){if(Xt(D)==="array")l=D,a=[D[0],D[D.length-1]];else{const N=Lt.analyze(a);D===0?l=[N.min,N.max]:l=Lt.limits(N,"e",D)}return R}return l},R.domain=function(D){if(!arguments.length)return a;d=D[0],h=D[D.length-1],i=[];const N=c.length;if(D.length===N&&d!==h)for(let M of Array.from(D))i.push((M-d)/(h-d));else{for(let M=0;M2){const M=D.map((F,L)=>L/(D.length-1)),O=D.map(F=>(F-d)/(h-d));O.every((F,L)=>M[L]===F)||(_=F=>{if(F<=0||F>=1)return F;let L=0;for(;F>=O[L+1];)L++;const U=(F-O[L])/(O[L+1]-O[L]);return M[L]+U*(M[L+1]-M[L])})}}return a=[d,h],R},R.mode=function(D){return arguments.length?(r=D,A(),R):r},R.range=function(D,N){return w(D),R},R.out=function(D){return u=D,R},R.spread=function(D){return arguments.length?(o=D,R):o},R.correctLightness=function(D){return D==null&&(D=!0),f=D,A(),f?C=function(N){const M=T(0,!0).lab()[0],O=T(1,!0).lab()[0],F=M>O;let L=T(N,!0).lab()[0];const U=M+(O-M)*N;let P=L-U,V=0,I=1,H=20;for(;Math.abs(P)>.01&&H-- >0;)(function(){return F&&(P*=-1),P<0?(V=N,N+=(I-N)*.5):(I=N,N+=(V-N)*.5),L=T(N,!0).lab()[0],P=L-U})();return N}:C=N=>N,R},R.padding=function(D){return D!=null?(Xt(D)==="number"&&(D=[D,D]),s=D,R):s},R.colors=function(D,N){arguments.length<2&&(N="hex");let M=[];if(arguments.length===0)M=c.slice(0);else if(D===1)M=[R(.5)];else if(D>1){const O=a[0],F=a[1]-O;M=j0e(0,D).map(L=>R(O+L/(D-1)*F))}else{e=[];let O=[];if(l&&l.length>2)for(let F=1,L=l.length,U=1<=L;U?FL;U?F++:F--)O.push((l[F-1]+l[F])*.5);else O=a;M=O.map(F=>R(F))}return Lt[N]&&(M=M.map(O=>O[N]())),M},R.cache=function(D){return D!=null?(b=D,R):b},R.gamma=function(D){return D!=null?(x=D,R):x},R.nodata=function(D){return D!=null?(n=Lt(D),R):n},R}function j0e(e,r,n){let o=[],a=ei;a?s++:s--)o.push(s);return o}const L0e=function(e){let r=[1,1];for(let n=1;nnew Ve(i)),e.length===2)[n,o]=e.map(i=>i.lab()),r=function(i){const s=[0,1,2].map(l=>n[l]+i*(o[l]-n[l]));return new Ve(s,"lab")};else if(e.length===3)[n,o,a]=e.map(i=>i.lab()),r=function(i){const s=[0,1,2].map(l=>(1-i)*(1-i)*n[l]+2*(1-i)*i*o[l]+i*i*a[l]);return new Ve(s,"lab")};else if(e.length===4){let i;[n,o,a,i]=e.map(s=>s.lab()),r=function(s){const l=[0,1,2].map(c=>(1-s)*(1-s)*(1-s)*n[c]+3*(1-s)*(1-s)*s*o[c]+3*(1-s)*s*s*a[c]+s*s*s*i[c]);return new Ve(l,"lab")}}else if(e.length>=5){let i,s,l;i=e.map(c=>c.lab()),l=e.length-1,s=L0e(l),r=function(c){const u=1-c,d=[0,1,2].map(h=>i.reduce((f,g,b)=>f+s[b]*u**(l-b)*c**b*g[h],0));return new Ve(d,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return r},F0e=e=>{const r=B0e(e);return r.scale=()=>Yv(r),r},{round:pI}=Math;Ve.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(pI)},Ve.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((r,n)=>n<3?e===!1?r:pI(r):r)},Object.assign(Lt,{rgb:(...e)=>new Ve(...e,"rgb")}),jt.format.rgb=(...e)=>{const r=Ft(e,"rgba");return r[3]===void 0&&(r[3]=1),r},jt.autodetect.push({p:3,test:(...e)=>{if(e=Ft(e,"rgba"),Xt(e)==="array"&&(e.length===3||e.length===4&&Xt(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const Qi=(e,r,n)=>{if(!Qi[n])throw new Error("unknown blend mode "+n);return Qi[n](e,r)},su=e=>(r,n)=>{const o=Lt(n).rgb(),a=Lt(r).rgb();return Lt.rgb(e(o,a))},lu=e=>(r,n)=>{const o=[];return o[0]=e(r[0],n[0]),o[1]=e(r[1],n[1]),o[2]=e(r[2],n[2]),o},H0e=e=>e,V0e=(e,r)=>e*r/255,q0e=(e,r)=>e>r?r:e,U0e=(e,r)=>e>r?e:r,W0e=(e,r)=>255*(1-(1-e/255)*(1-r/255)),Y0e=(e,r)=>r<128?2*e*r/255:255*(1-2*(1-e/255)*(1-r/255)),G0e=(e,r)=>255*(1-(1-r/255)/(e/255)),X0e=(e,r)=>e===255?255:(e=255*(r/255)/(1-e/255),e>255?255:e);Qi.normal=su(lu(H0e)),Qi.multiply=su(lu(V0e)),Qi.screen=su(lu(W0e)),Qi.overlay=su(lu(Y0e)),Qi.darken=su(lu(q0e)),Qi.lighten=su(lu(U0e)),Qi.dodge=su(lu(X0e)),Qi.burn=su(lu(G0e));const{pow:K0e,sin:Z0e,cos:Q0e}=Math;function J0e(e=300,r=-1.5,n=1,o=1,a=[0,1]){let i=0,s;Xt(a)==="array"?s=a[1]-a[0]:(s=0,a=[a,a]);const l=function(c){const u=Zl*((e+120)/360+r*c),d=K0e(a[0]+s*c,o),f=(i!==0?n[0]+c*i:n)*d*(1-d)/2,g=Q0e(u),b=Z0e(u),x=d+f*(-.14861*g+1.78277*b),w=d+f*(-.29227*g-.90649*b),k=d+f*(1.97294*g);return Lt(m6([x*255,w*255,k*255,1]))};return l.start=function(c){return c==null?e:(e=c,l)},l.rotations=function(c){return c==null?r:(r=c,l)},l.gamma=function(c){return c==null?o:(o=c,l)},l.hue=function(c){return c==null?n:(n=c,Xt(n)==="array"?(i=n[1]-n[0],i===0&&(n=n[1])):i=0,l)},l.lightness=function(c){return c==null?a:(Xt(c)==="array"?(a=c,s=c[1]-c[0]):(a=[c,c],s=0),l)},l.scale=()=>Lt.scale(l),l.hue(n),l}const eye="0123456789abcdef",{floor:tye,random:rye}=Math,nye=()=>{let e="#";for(let r=0;r<6;r++)e+=eye.charAt(tye(rye()*16));return new Ve(e,"hex")},{log:hI,pow:oye,floor:aye,abs:iye}=Math;function fI(e,r=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Xt(e)==="object"&&(e=Object.values(e)),e.forEach(o=>{r&&Xt(o)==="object"&&(o=o[r]),o!=null&&!isNaN(o)&&(n.values.push(o),n.sum+=o,on.max&&(n.max=o),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(o,a)=>mI(n,o,a),n}function mI(e,r="equal",n=7){Xt(e)=="array"&&(e=fI(e));const{min:o,max:a}=e,i=e.values.sort((l,c)=>l-c);if(n===1)return[o,a];const s=[];if(r.substr(0,1)==="c"&&(s.push(o),s.push(a)),r.substr(0,1)==="e"){s.push(o);for(let l=1;l 0");const l=Math.LOG10E*hI(o),c=Math.LOG10E*hI(a);s.push(o);for(let u=1;u200&&(h=!1)}const b={};for(let w=0;ww-k),s.push(x[0]);for(let w=1;w{e=new Ve(e),r=new Ve(r);const n=e.luminance(),o=r.luminance();return n>o?(n+.05)/(o+.05):(o+.05)/(n+.05)};const gI=.027,lye=5e-4,cye=.1,yI=1.14,Gv=.022,bI=1.414,uye=(e,r)=>{e=new Ve(e),r=new Ve(r),e.alpha()<1&&(e=Qh(r,e,e.alpha(),"rgb"));const n=vI(...e.rgb()),o=vI(...r.rgb()),a=n>=Gv?n:n+Math.pow(Gv-n,bI),i=o>=Gv?o:o+Math.pow(Gv-o,bI),s=Math.pow(i,.56)-Math.pow(a,.57),l=Math.pow(i,.65)-Math.pow(a,.62),c=Math.abs(i-a)0?c-gI:c+gI)*100};function vI(e,r,n){return .2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(r/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:Jl,pow:Nn,min:dye,max:pye,atan2:xI,abs:wI,cos:Xv,sin:kI,exp:hye,PI:_I}=Math;function fye(e,r,n=1,o=1,a=1){var i=function(j){return 360*j/(2*_I)},s=function(j){return 2*_I*j/360};e=new Ve(e),r=new Ve(r);const[l,c,u]=Array.from(e.lab()),[d,h,f]=Array.from(r.lab()),g=(l+d)/2,b=Jl(Nn(c,2)+Nn(u,2)),x=Jl(Nn(h,2)+Nn(f,2)),w=(b+x)/2,k=.5*(1-Jl(Nn(w,7)/(Nn(w,7)+Nn(25,7)))),C=c*(1+k),_=h*(1+k),T=Jl(Nn(C,2)+Nn(u,2)),A=Jl(Nn(_,2)+Nn(f,2)),R=(T+A)/2,D=i(xI(u,C)),N=i(xI(f,_)),M=D>=0?D:D+360,O=N>=0?N:N+360,F=wI(M-O)>180?(M+O+360)/2:(M+O)/2,L=1-.17*Xv(s(F-30))+.24*Xv(s(2*F))+.32*Xv(s(3*F+6))-.2*Xv(s(4*F-63));let U=O-M;U=wI(U)<=180?U:O<=M?U+360:U-360,U=2*Jl(T*A)*kI(s(U)/2);const P=d-l,V=A-T,I=1+.015*Nn(g-50,2)/Jl(20+Nn(g-50,2)),H=1+.045*R,q=1+.015*R*L,Z=30*hye(-Nn((F-275)/25,2)),G=-(2*Jl(Nn(R,7)/(Nn(R,7)+Nn(25,7))))*kI(2*s(Z)),K=Jl(Nn(P/(n*I),2)+Nn(V/(o*H),2)+Nn(U/(a*q),2)+G*(V/(o*H))*(U/(a*q)));return pye(0,dye(100,K))}function mye(e,r,n="lab"){e=new Ve(e),r=new Ve(r);const o=e.get(n),a=r.get(n);let i=0;for(let s in o){const l=(o[s]||0)-(a[s]||0);i+=l*l}return Math.sqrt(i)}const gye=(...e)=>{try{return new Ve(...e),!0}catch{return!1}},yye={cool(){return Yv([Lt.hsl(180,1,.9),Lt.hsl(250,.7,.4)])},hot(){return Yv(["#000","#f00","#ff0","#fff"]).mode("rgb")}},$6={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},EI=Object.keys($6),SI=new Map(EI.map(e=>[e.toLowerCase(),e])),bye=typeof Proxy=="function"?new Proxy($6,{get(e,r){const n=r.toLowerCase();if(SI.has(n))return e[SI.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(EI)}}):$6,vye=(...e)=>{e=Ft(e,"cmyk");const[r,n,o,a]=e,i=e.length>4?e[4]:1;return a===1?[0,0,0,i]:[r>=1?0:255*(1-r)*(1-a),n>=1?0:255*(1-n)*(1-a),o>=1?0:255*(1-o)*(1-a),i]},{max:CI}=Math,xye=(...e)=>{let[r,n,o]=Ft(e,"rgb");r=r/255,n=n/255,o=o/255;const a=1-CI(r,CI(n,o)),i=a<1?1/(1-a):0,s=(1-r-a)*i,l=(1-n-a)*i,c=(1-o-a)*i;return[s,l,c,a]};Ve.prototype.cmyk=function(){return xye(this._rgb)},Object.assign(Lt,{cmyk:(...e)=>new Ve(...e,"cmyk")}),jt.format.cmyk=vye,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"cmyk"),Xt(e)==="array"&&e.length===4)return"cmyk"}});const wye=(...e)=>{const r=Ft(e,"hsla");let n=Kh(e)||"lsa";return r[0]=si(r[0]||0)+"deg",r[1]=si(r[1]*100)+"%",r[2]=si(r[2]*100)+"%",n==="hsla"||r.length>3&&r[3]<1?(r[3]="/ "+(r.length>3?r[3]:1),n="hsla"):r.length=3,`${n.substr(0,3)}(${r.join(" ")})`},kye=(...e)=>{const r=Ft(e,"lab");let n=Kh(e)||"lab";return r[0]=si(r[0])+"%",r[1]=si(r[1]),r[2]=si(r[2]),n==="laba"||r.length>3&&r[3]<1?r[3]="/ "+(r.length>3?r[3]:1):r.length=3,`lab(${r.join(" ")})`},_ye=(...e)=>{const r=Ft(e,"lch");let n=Kh(e)||"lab";return r[0]=si(r[0])+"%",r[1]=si(r[1]),r[2]=isNaN(r[2])?"none":si(r[2])+"deg",n==="lcha"||r.length>3&&r[3]<1?r[3]="/ "+(r.length>3?r[3]:1):r.length=3,`lch(${r.join(" ")})`},Eye=(...e)=>{const r=Ft(e,"lab");return r[0]=si(r[0]*100)+"%",r[1]=g6(r[1]),r[2]=g6(r[2]),r.length>3&&r[3]<1?r[3]="/ "+(r.length>3?r[3]:1):r.length=3,`oklab(${r.join(" ")})`},TI=(...e)=>{const[r,n,o,...a]=Ft(e,"rgb"),[i,s,l]=A6(r,n,o),[c,u,d]=sI(i,s,l);return[c,u,d,...a.length>0&&a[0]<1?[a[0]]:[]]},Sye=(...e)=>{const r=Ft(e,"lch");return r[0]=si(r[0]*100)+"%",r[1]=g6(r[1]),r[2]=isNaN(r[2])?"none":si(r[2])+"deg",r.length>3&&r[3]<1?r[3]="/ "+(r.length>3?r[3]:1):r.length=3,`oklch(${r.join(" ")})`},{round:M6}=Math,Cye=(...e)=>{const r=Ft(e,"rgba");let n=Kh(e)||"rgb";if(n.substr(0,3)==="hsl")return wye(cI(r),n);if(n.substr(0,3)==="lab"){const o=f1();Ql("d50");const a=kye(x6(r),n);return Ql(o),a}if(n.substr(0,3)==="lch"){const o=f1();Ql("d50");const a=_ye(E6(r),n);return Ql(o),a}return n.substr(0,5)==="oklab"?Eye(A6(r)):n.substr(0,5)==="oklch"?Sye(TI(r)):(r[0]=M6(r[0]),r[1]=M6(r[1]),r[2]=M6(r[2]),(n==="rgba"||r.length>3&&r[3]<1)&&(r[3]="/ "+(r.length>3?r[3]:1),n="rgba"),`${n.substr(0,3)}(${r.slice(0,n==="rgb"?3:4).join(" ")})`)},AI=(...e)=>{e=Ft(e,"lch");const[r,n,o,...a]=e,[i,s,l]=iI(r,n,o),[c,u,d]=T6(i,s,l);return[c,u,d,...a.length>0&&a[0]<1?[a[0]]:[]]},ec=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,Ji=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Kv=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,li=/\s*/.source,rf=/\s+/.source,P6=/\s*,\s*/.source,Zv=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,nf=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,RI=new RegExp("^rgba?\\("+li+[ec,ec,ec].join(rf)+nf+"\\)$"),NI=new RegExp("^rgb\\("+li+[ec,ec,ec].join(P6)+li+"\\)$"),DI=new RegExp("^rgba\\("+li+[ec,ec,ec,Ji].join(P6)+li+"\\)$"),$I=new RegExp("^hsla?\\("+li+[Zv,Kv,Kv].join(rf)+nf+"\\)$"),MI=new RegExp("^hsl?\\("+li+[Zv,Kv,Kv].join(P6)+li+"\\)$"),PI=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,zI=new RegExp("^lab\\("+li+[Ji,Ji,Ji].join(rf)+nf+"\\)$"),II=new RegExp("^lch\\("+li+[Ji,Ji,Zv].join(rf)+nf+"\\)$"),OI=new RegExp("^oklab\\("+li+[Ji,Ji,Ji].join(rf)+nf+"\\)$"),jI=new RegExp("^oklch\\("+li+[Ji,Ji,Zv].join(rf)+nf+"\\)$"),{round:LI}=Math,of=e=>e.map((r,n)=>n<=2?Od(LI(r),0,255):r),Dn=(e,r=0,n=100,o=!1)=>(typeof e=="string"&&e.endsWith("%")&&(e=parseFloat(e.substring(0,e.length-1))/100,o?e=r+(e+1)*.5*(n-r):e=r+e*(n-r)),+e),Yo=(e,r)=>e==="none"?r:e,z6=e=>{if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let r;if(jt.format.named)try{return jt.format.named(e)}catch{}if((r=e.match(RI))||(r=e.match(NI))){let n=r.slice(1,4);for(let a=0;a<3;a++)n[a]=+Dn(Yo(n[a],0),0,255);n=of(n);const o=r[4]!==void 0?+Dn(r[4],0,1):1;return n[3]=o,n}if(r=e.match(DI)){const n=r.slice(1,5);for(let o=0;o<4;o++)n[o]=+Dn(n[o],0,255);return n}if((r=e.match($I))||(r=e.match(MI))){const n=r.slice(1,4);n[0]=+Yo(n[0].replace("deg",""),0),n[1]=+Dn(Yo(n[1],0),0,100)*.01,n[2]=+Dn(Yo(n[2],0),0,100)*.01;const o=of(C6(n)),a=r[4]!==void 0?+Dn(r[4],0,1):1;return o[3]=a,o}if(r=e.match(PI)){const n=r.slice(1,4);n[1]*=.01,n[2]*=.01;const o=C6(n);for(let a=0;a<3;a++)o[a]=LI(o[a]);return o[3]=+r[4],o}if(r=e.match(zI)){const n=r.slice(1,4);n[0]=Dn(Yo(n[0],0),0,100),n[1]=Dn(Yo(n[1],0),-125,125,!0),n[2]=Dn(Yo(n[2],0),-125,125,!0);const o=f1();Ql("d50");const a=of(b6(n));Ql(o);const i=r[4]!==void 0?+Dn(r[4],0,1):1;return a[3]=i,a}if(r=e.match(II)){const n=r.slice(1,4);n[0]=Dn(n[0],0,100),n[1]=Dn(Yo(n[1],0),0,150,!1),n[2]=+Yo(n[2].replace("deg",""),0);const o=f1();Ql("d50");const a=of(_6(n));Ql(o);const i=r[4]!==void 0?+Dn(r[4],0,1):1;return a[3]=i,a}if(r=e.match(OI)){const n=r.slice(1,4);n[0]=Dn(Yo(n[0],0),0,1),n[1]=Dn(Yo(n[1],0),-.4,.4,!0),n[2]=Dn(Yo(n[2],0),-.4,.4,!0);const o=of(T6(n)),a=r[4]!==void 0?+Dn(r[4],0,1):1;return o[3]=a,o}if(r=e.match(jI)){const n=r.slice(1,4);n[0]=Dn(Yo(n[0],0),0,1),n[1]=Dn(Yo(n[1],0),0,.4,!1),n[2]=+Yo(n[2].replace("deg",""),0);const o=of(AI(n)),a=r[4]!==void 0?+Dn(r[4],0,1):1;return o[3]=a,o}};z6.test=e=>RI.test(e)||$I.test(e)||zI.test(e)||II.test(e)||OI.test(e)||jI.test(e)||NI.test(e)||DI.test(e)||MI.test(e)||PI.test(e)||e==="transparent",Ve.prototype.css=function(e){return Cye(this._rgb,e)};const Tye=(...e)=>new Ve(...e,"css");Lt.css=Tye,jt.format.css=z6,jt.autodetect.push({p:5,test:(e,...r)=>{if(!r.length&&Xt(e)==="string"&&z6.test(e))return"css"}}),jt.format.gl=(...e)=>{const r=Ft(e,"rgba");return r[0]*=255,r[1]*=255,r[2]*=255,r};const Aye=(...e)=>new Ve(...e,"gl");Lt.gl=Aye,Ve.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},Ve.prototype.hex=function(e){return nI(this._rgb,e)};const Rye=(...e)=>new Ve(...e,"hex");Lt.hex=Rye,jt.format.hex=rI,jt.autodetect.push({p:4,test:(e,...r)=>{if(!r.length&&Xt(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{log:Qv}=Math,BI=e=>{const r=e/100;let n,o,a;return r<66?(n=255,o=r<6?0:-155.25485562709179-.44596950469579133*(o=r-2)+104.49216199393888*Qv(o),a=r<20?0:-254.76935184120902+.8274096064007395*(a=r-10)+115.67994401066147*Qv(a)):(n=351.97690566805693+.114206453784165*(n=r-55)-40.25366309332127*Qv(n),o=325.4494125711974+.07943456536662342*(o=r-50)-28.0852963507957*Qv(o),a=255),[n,o,a,1]},{round:Nye}=Math,Dye=(...e)=>{const r=Ft(e,"rgb"),n=r[0],o=r[2];let a=1e3,i=4e4;const s=.4;let l;for(;i-a>s;){l=(i+a)*.5;const c=BI(l);c[2]/c[0]>=o/n?i=l:a=l}return Nye(l)};Ve.prototype.temp=Ve.prototype.kelvin=Ve.prototype.temperature=function(){return Dye(this._rgb)};const I6=(...e)=>new Ve(...e,"temp");Object.assign(Lt,{temp:I6,kelvin:I6,temperature:I6}),jt.format.temp=jt.format.kelvin=jt.format.temperature=BI,Ve.prototype.oklch=function(){return TI(this._rgb)},Object.assign(Lt,{oklch:(...e)=>new Ve(...e,"oklch")}),jt.format.oklch=AI,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"oklch"),Xt(e)==="array"&&e.length===3)return"oklch"}}),Object.assign(Lt,{analyze:fI,average:z0e,bezier:F0e,blend:Qi,brewer:bye,Color:Ve,colors:Zh,contrast:sye,contrastAPCA:uye,cubehelix:J0e,deltaE:fye,distance:mye,input:jt,interpolate:Qh,limits:mI,mix:Qh,random:nye,scale:Yv,scales:yye,valid:gye});const O6=[.96,.907,.805,.697,.605,.547,.518,.445,.395,.34],FI=[.32,.16,.08,.04,0,0,.04,.08,.16,.32];function $ye(e){const r=e.get("hsl.l");return O6.reduce((n,o)=>Math.abs(o-r)i===n),a=O6.map(i=>r.set("hsl.l",i)).map(i=>Lt(i)).map((i,s)=>{const l=FI[s]-FI[o];return l>=0?i.saturate(l):i.desaturate(l*-1)});return a[o]=Lt(e),{baseColorIndex:o,colors:a}}function Pye(e){return Mye(e).colors.map(r=>r.hex())}const HI={fill:"#3b82f6",stroke:"#2563eb",hiContrast:"#eff6ff",loContrast:"#bfdbfe"},VI={fill:"#0284c7",stroke:"#0369a1",hiContrast:"#f0f9ff",loContrast:"#B6ECF7"},qI={fill:"#64748b",stroke:"#475569",hiContrast:"#f8fafc",loContrast:"#cbd5e1"},zye={primary:HI,blue:HI,secondary:VI,sky:VI,muted:qI,slate:qI,gray:{fill:"#737373",stroke:"#525252",hiContrast:"#fafafa",loContrast:"#d4d4d4"},red:{fill:"#AC4D39",stroke:"#853A2D",hiContrast:"#FBD3CB",loContrast:"#f5b2a3"},green:{fill:"#428a4f",stroke:"#2d5d39",hiContrast:"#f8fafc",loContrast:"#c2f0c2"},amber:{fill:"#A35829",stroke:"#7E451D",hiContrast:"#FFE0C2",loContrast:"#f9b27c"},indigo:{fill:"#6366f1",stroke:"#4f46e5",hiContrast:"#eef2ff",loContrast:"#c7d2fe"}},Iye={line:"#6E6E6E",labelBg:"#18191b",label:"#C6C6C6"},UI={line:"#64748b",labelBg:"#0f172a",label:"#cbd5e1"},WI={line:"#3b82f6",labelBg:"#172554",label:"#60a5fa"},YI={line:"#0ea5e9",labelBg:"#082f49",label:"#38bdf8"},Oye={amber:{line:"#b45309",labelBg:"#78350f",label:"#FFE0C2"},blue:WI,gray:Iye,green:{line:"#15803d",labelBg:"#052e16",label:"#22c55e"},indigo:{line:"#6366f1",labelBg:"#1e1b4b",label:"#818cf8"},muted:UI,primary:WI,red:{line:"#AC4D39",labelBg:"#b91c1c",label:"#f5b2a3"},secondary:YI,sky:YI,slate:UI},GI=60,XI=2,KI=1;function jye(e){at(Lt.valid(e),`Invalid color: ${e}`);const r=Pye(e),n=r[6],o=Lye(n);return{elements:{fill:n,stroke:r[7],hiContrast:o[0],loContrast:o[1]},relationships:{line:r[4],label:r[3],labelBg:r[9]}}}function Lye(e){const r=Lt(e);let n=r.brighten(XI),o=r.darken(XI),a,i,s,l;do a=n,i=o,n=n.brighten(KI),o=o.darken(KI),s=Lt.contrastAPCA(r,n),l=Lt.contrastAPCA(r,o);while(Math.abs(s)Math.abs(l)?[n.brighten(.4).hex(),n.hex()]:[o.darken(.4).hex(),o.hex()]}const Bye={color:"primary",size:"md",opacity:15,shape:"rectangle",group:{opacity:15,border:"dashed"},relationship:{color:"gray",line:"dashed",arrow:"normal"}},Fye=["rectangle","person","browser","mobile","cylinder","storage","queue"],Hye={colors:$1e(["amber","blue","gray","slate","green","indigo","muted","primary","red","secondary","sky"],e=>({elements:zye[e],relationships:Oye[e]})),sizes:{xs:{width:180,height:100},sm:{width:240,height:135},md:{width:320,height:180},lg:{width:420,height:234},xl:{width:520,height:290}},spacing:{xs:8,sm:10,md:16,lg:24,xl:32},textSizes:{xs:13.33,sm:16,md:19.2,lg:23.04,xl:27.65}};function j6(e){if(e===null||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);return r!==null&&r!==Object.prototype&&Object.getPrototypeOf(r)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function L6(e,r,n=".",o){if(!j6(r))return L6(e,{},n);const a=Object.assign({},r);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const s=e[i];s!=null&&(Array.isArray(s)&&Array.isArray(a[i])?a[i]=[...s,...a[i]]:j6(s)&&j6(a[i])?a[i]=L6(s,a[i],(n?`${n}.`:"")+i.toString()):a[i]=s)}return a}function Vye(e){return(...r)=>r.reduce((n,o)=>L6(n,o,""),{})}const qye=Vye();function Jv({size:e,padding:r,textSize:n,...o},a=B6.defaults.size){return e??=a,n??=e,r??=e,{...o,size:e,padding:r,textSize:n}}const B6={theme:Hye,defaults:Bye};let ZI=class Hz{constructor(r){this.config=r,this.theme=r.theme,this.defaults=r.defaults}theme;defaults;static DEFAULT=new Hz(B6);static from(...r){return Kl(r,1)?new Hz(qye(...r,B6)):this.DEFAULT}get elementColors(){return this.theme.colors[this.defaults.color].elements}get relationshipColors(){return this.theme.colors[this.defaults.relationship.color].relationships}get groupColors(){const r=this.defaults.group?.color;return r?yr(this,"defaultGroup",()=>({...this.elementColors,...this.theme.colors[r].elements})):this.elementColors}isDefaultColor(r){return r===this.defaults.color}colors(r){if(r??=this.defaults.color,this.isThemeColor(r))return this.theme.colors[r];throw new Error(`Unknown color: ${r}`)}fontSize(r){return r??=this.defaults.text??this.defaults.size,this.theme.textSizes[r]}padding(r){return r??=this.defaults.padding??this.defaults.size,this.theme.spacing[r]}isThemeColor(r){return r in this.theme.colors}nodeSizes(r){const n=Jv(r,this.defaults.size);return{sizes:n,values:{sizes:this.theme.sizes[n.size],padding:this.padding(n.padding),textSize:this.fontSize(n.textSize)}}}computeFrom(r){return this.isThemeColor(r)?this.theme.colors[r]:yr(this,`compute-${r}`,()=>{if(!Lt.valid(r))throw new Error(`Invalid color value: "${r}"`);return jye(r)})}equals(r){return r===this?!0:Vv(this.config,r.config)}};function m1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cu(e){return typeof e=="string"}var F6={exports:{}},QI;function Uye(){if(QI)return F6.exports;QI=1;var e=function(r,n){var o,a,i=1,s=0,l=0,c=String.alphabet;function u(d,h,f){if(f){for(o=h;f=u(d,o),f<76&&f>65;)++o;return+d.slice(h-1,o)}return f=c&&c.indexOf(d.charAt(h)),f>-1?f+76:(f=d.charCodeAt(h)||0,f<45||f>127?f:f<46?65:f<48?f-1:f<58?f+18:f<65?f-11:f<91?f+11:f<97?f-37:f<123?f+5:f-63)}if((r+="")!=(n+="")){for(;i;)if(a=u(r,s++),i=u(n,l++),a<76&&i<76&&a>66&&i>66&&(a=u(r,s,s),i=u(n,l,s=o),l=o),a!=i)return a{if(n===o)return 0;if(!n)return-1;if(!o)return 1;const a=n.split(e),i=o.split(e),s=Math.min(a.length,i.length);for(let c=0;c0?e.slice(0,r):null}function g1(e){const r=e.lastIndexOf(".");return r>0?e.slice(r+1):e}const y1=e=>H6(e)?e:e.id;function to(e,r){const n=y1(e);return r?y1(r).startsWith(n+"."):o=>{const a=y1(o);return n.startsWith(a+".")}}function tO(e,r){if(!r)return a=>tO(e,a);const n=y1(e),o=y1(r);return n===o||o.startsWith(n+".")||n.startsWith(o+".")}function rO(e,r){return n=>to(e,n)}function rx(e){return(H6(e)?e:e.id).split(".").length}function b1(e,r){const n=e.split(".");if(n.length<2)return null;const o=r.split(".");if(o.length<2)return null;let a=[];for(let i=0;ia===0?(n.push(o),n):(n.unshift(`${n[0]}.${o}`),n),[])}function Yye(e,r){let n=r;for(const o of e)to(o,n)&&(n=o);return n!==r?n:null}function uu(e){const r=[],n=[...e];let o;for(;o=n.shift();){let a;for(;a=Yye(n,o);)r.push(n.splice(n.indexOf(a),1)[0]);r.push(o)}return r}function nO(e,r){if(!e||H6(e)){const o=e??"asc";return a=>nO(a,o)}const n=r==="desc"?-1:1;return e.map(o=>({item:o,fqn:o.id.split(".")})).sort((o,a)=>{if(o.fqn.length!==a.fqn.length)return(o.fqn.length-a.fqn.length)*n;for(let i=0;io)}var nx={},oO;function Gye(){return oO||(oO=1,nx.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",nx.SYMBOL_SUPPORT=typeof Symbol<"u"),nx}var V6,aO;function iO(){if(aO)return V6;aO=1;function e(r){if(typeof r!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=r}return typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=function(){return this}),e.of=function(){var r=arguments,n=r.length,o=0;return new e(function(){return o>=n?{done:!0}:{done:!1,value:r[o++]}})},e.empty=function(){var r=new e(function(){return{done:!0}});return r},e.fromSequence=function(r){var n=0,o=r.length;return new e(function(){return n>=o?{done:!0}:{done:!1,value:r[n++]}})},e.is=function(r){return r instanceof e?!0:typeof r=="object"&&r!==null&&typeof r.next=="function"},V6=e,V6}var q6,sO;function ox(){if(sO)return q6;sO=1;var e=Gye(),r=e.ARRAY_BUFFER_SUPPORT,n=e.SYMBOL_SUPPORT;return q6=function(a,i){var s,l,c,u,d;if(!a)throw new Error("obliterator/forEach: invalid iterable.");if(typeof i!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(a)||r&&ArrayBuffer.isView(a)||typeof a=="string"||a.toString()==="[object Arguments]"){for(c=0,u=a.length;c{const n=(a,i)=>(e.set(i,a),a),o=a=>{if(e.has(a))return e.get(a);const[i,s]=r[a];switch(i){case ax:case lO:return n(s,a);case v1:{const l=n([],a);for(const c of s)l.push(o(c));return l}case ix:{const l=n({},a);for(const[c,u]of s)l[o(c)]=o(u);return l}case U6:return n(new Date(s),a);case W6:{const{source:l,flags:c}=s;return n(new RegExp(l,c),a)}case Y6:{const l=n(new Map,a);for(const[c,u]of s)l.set(o(c),o(u));return l}case G6:{const l=n(new Set,a);for(const c of s)l.add(o(c));return l}case cO:{const{name:l,message:c}=s;return n(new dO[l](c),a)}case uO:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new dO[i](s),a)};return o},pO=e=>Xye(new Map,e)(0),af="",{toString:Kye}={},{keys:Zye}=Object,x1=e=>{const r=typeof e;if(r!=="object"||!e)return[ax,r];const n=Kye.call(e).slice(8,-1);switch(n){case"Array":return[v1,af];case"Object":return[ix,af];case"Date":return[U6,af];case"RegExp":return[W6,af];case"Map":return[Y6,af];case"Set":return[G6,af];case"DataView":return[v1,n]}return n.includes("Array")?[v1,n]:n.includes("Error")?[cO,n]:[ix,n]},sx=([e,r])=>e===ax&&(r==="function"||r==="symbol"),Qye=(e,r,n,o)=>{const a=(s,l)=>{const c=o.push(s)-1;return n.set(l,c),c},i=s=>{if(n.has(s))return n.get(s);let[l,c]=x1(s);switch(l){case ax:{let d=s;switch(c){case"bigint":l=uO,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return a([lO],s)}return a([l,d],s)}case v1:{if(c){let f=s;return c==="DataView"?f=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(f=new Uint8Array(s)),a([c,[...f]],s)}const d=[],h=a([l,d],s);for(const f of s)d.push(i(f));return h}case ix:{if(c)switch(c){case"BigInt":return a([c,s.toString()],s);case"Boolean":case"Number":case"String":return a([c,s.valueOf()],s)}if(r&&"toJSON"in s)return i(s.toJSON());const d=[],h=a([l,d],s);for(const f of Zye(s))(e||!sx(x1(s[f])))&&d.push([i(f),i(s[f])]);return h}case U6:return a([l,s.toISOString()],s);case W6:{const{source:d,flags:h}=s;return a([l,{source:d,flags:h}],s)}case Y6:{const d=[],h=a([l,d],s);for(const[f,g]of s)(e||!(sx(x1(f))||sx(x1(g))))&&d.push([i(f),i(g)]);return h}case G6:{const d=[],h=a([l,d],s);for(const f of s)(e||!sx(x1(f)))&&d.push(i(f));return h}}const{message:u}=s;return a([l,{name:c,message:u}],s)};return i},hO=(e,{json:r,lossy:n}={})=>{const o=[];return Qye(!(r||n),!!r,new Map,o)(e),o},Ld=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?pO(hO(e,r)):structuredClone(e):(e,r)=>pO(hO(e,r));function ekt(){}let w1=class{constructor(r,n,o){this.normal=n,this.property=r,o&&(this.space=o)}};w1.prototype.normal={},w1.prototype.property={},w1.prototype.space=void 0;function fO(e,r){const n={},o={};for(const a of e)Object.assign(n,a.property),Object.assign(o,a.normal);return new w1(n,o,r)}function k1(e){return e.toLowerCase()}let oa=class{constructor(r,n){this.attribute=n,this.property=r}};oa.prototype.attribute="",oa.prototype.booleanish=!1,oa.prototype.boolean=!1,oa.prototype.commaOrSpaceSeparated=!1,oa.prototype.commaSeparated=!1,oa.prototype.defined=!1,oa.prototype.mustUseProperty=!1,oa.prototype.number=!1,oa.prototype.overloadedBoolean=!1,oa.prototype.property="",oa.prototype.spaceSeparated=!1,oa.prototype.space=void 0;let Jye=0;const Ht=Bd(),$n=Bd(),mO=Bd(),Ue=Bd(),jr=Bd(),sf=Bd(),Ra=Bd();function Bd(){return 2**++Jye}const X6={__proto__:null,boolean:Ht,booleanish:$n,commaOrSpaceSeparated:Ra,commaSeparated:sf,number:Ue,overloadedBoolean:mO,spaceSeparated:jr},K6=Object.keys(X6);let Z6=class extends oa{constructor(r,n,o,a){let i=-1;if(super(r,n),gO(this,"space",a),typeof o=="number")for(;++i4&&n.slice(0,4)==="data"&&nbe.test(r)){if(r.charAt(4)==="-"){const i=r.slice(5).replace(_O,abe);o="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=r.slice(4);if(!_O.test(i)){let s=i.replace(rbe,obe);s.charAt(0)!=="-"&&(s="-"+s),r="data"+s}}a=Z6}return new a(o,r)}function obe(e){return"-"+e.toLowerCase()}function abe(e){return e.charAt(1).toUpperCase()}const lx=fO([yO,ebe,xO,wO,kO],"html"),_1=fO([yO,tbe,xO,wO,kO],"svg");function EO(e){const r=[],n=String(e||"");let o=n.indexOf(","),a=0,i=!1;for(;!i;){o===-1&&(o=n.length,i=!0);const s=n.slice(a,o).trim();(s||!i)&&r.push(s),a=o+1,o=n.indexOf(",",a)}return r}function SO(e,r){const n=r||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const CO=/[#.]/g;function ibe(e,r){const n=e||"",o={};let a=0,i,s;for(;a-1&&i<=r.length){let s=0;for(;;){let l=n[s];if(l===void 0){const c=DO(r,n[s-1]);l=c===-1?r.length+1:c+1,n[s]=l}if(l>i)return{line:s+1,column:i-(s>0?n[s-1]:0)+1,offset:i};s++}}}function a(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length1?n[i.line-2]:0)+i.column-1;if(s4&&n.slice(0,4)==="data"&&_be.test(r)){if(r.charAt(4)==="-"){const i=r.slice(5).replace(qO,Tbe);o="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=r.slice(4);if(!qO.test(i)){let s=i.replace(Ebe,Cbe);s.charAt(0)!=="-"&&(s="-"+s),r="data"+s}}a=o8}return new a(o,r)}function Cbe(e){return"-"+e.toLowerCase()}function Tbe(e){return e.charAt(1).toUpperCase()}const Abe=zO([LO,jO,HO,VO,wbe],"html"),UO=zO([LO,jO,HO,VO,kbe],"svg"),WO={}.hasOwnProperty;function a8(e,r){const n=r||{};function o(a,...i){let s=o.invalid;const l=o.handlers;if(a&&WO.call(a,e)){const c=String(a[e]);s=WO.call(l,c)?l[c]:o.unknown}if(s)return s.call(this,a,...i)}return o.handlers=n.handlers||{},o.invalid=n.invalid,o.unknown=n.unknown,o}const Rbe={},Nbe={}.hasOwnProperty,YO=a8("type",{handlers:{root:$be,element:Obe,text:zbe,comment:Ibe,doctype:Pbe}});function Dbe(e,r){const o=(r||Rbe).space;return YO(e,o==="svg"?UO:Abe)}function $be(e,r){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=i8(e.children,n,r),pf(e,n),n}function Mbe(e,r){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=i8(e.children,n,r),pf(e,n),n}function Pbe(e){const r={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return pf(e,r),r}function zbe(e){const r={nodeName:"#text",value:e.value,parentNode:null};return pf(e,r),r}function Ibe(e){const r={nodeName:"#comment",data:e.value,parentNode:null};return pf(e,r),r}function Obe(e,r){const n=r;let o=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(o=UO);const a=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&Nbe.call(e.properties,i)){const c=jbe(o,i,e.properties[i]);c&&a.push(c)}}const s=o.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:Fd[s],childNodes:[],parentNode:null};return l.childNodes=i8(e.children,l,o),pf(e,l),e.tagName==="template"&&e.content&&(l.content=Mbe(e.content,o)),l}function jbe(e,r,n){const o=Sbe(e,r);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&o.boolean)return;Array.isArray(n)&&(n=o.commaSeparated?SO(n):AO(n));const a={name:o.attribute,value:n===!0?"":String(n)};if(o.space&&o.space!=="html"&&o.space!=="svg"){const i=a.name.indexOf(":");i<0?a.prefix="":(a.name=a.name.slice(i+1),a.prefix=o.attribute.slice(0,i)),a.namespace=Fd[o.space]}return a}function i8(e,r,n){let o=-1;const a=[];if(e)for(;++o=55296&&e<=57343}function Bbe(e){return e>=56320&&e<=57343}function Fbe(e,r){return(e-55296)*1024+9216+r}function KO(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ZO(e){return e>=64976&&e<=65007||Lbe.has(e)}var Ae;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Ae||(Ae={}));const Hbe=65536;class Vbe{constructor(r){this.handler=r,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Hbe,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(r,n){const{line:o,col:a,offset:i}=this,s=a+n,l=i+n;return{code:r,startLine:o,endLine:o,startCol:s,endCol:s,startOffset:l,endOffset:l}}_err(r){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(r,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(r){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Bbe(n))return this.pos++,this._addGap(),Fbe(r,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,se.EOF;return this._err(Ae.surrogateInInputStream),r}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(r,n){this.html.length>0?this.html+=r:this.html=r,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(r){this.html=this.html.substring(0,this.pos+1)+r+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(r,n){if(this.pos+r.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(r,this.pos);for(let o=0;o=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,se.EOF;const o=this.html.charCodeAt(n);return o===se.CARRIAGE_RETURN?se.LINE_FEED:o}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,se.EOF;let r=this.html.charCodeAt(this.pos);return r===se.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,se.LINE_FEED):r===se.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,XO(r)&&(r=this._processSurrogate(r)),this.handler.onParseError===null||r>31&&r<127||r===se.LINE_FEED||r===se.CARRIAGE_RETURN||r>159&&r<64976||this._checkForProblematicCharacters(r),r)}_checkForProblematicCharacters(r){KO(r)?this._err(Ae.controlCharacterInInputStream):ZO(r)&&this._err(Ae.noncharacterInInputStream)}retreat(r){for(this.pos-=r;this.pos=0;n--)if(e.attrs[n].name===r)return e.attrs[n].value;return null}const JO=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),qbe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var s8;const Ube=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Wbe=(s8=String.fromCodePoint)!==null&&s8!==void 0?s8:function(e){let r="";return e>65535&&(e-=65536,r+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),r+=String.fromCharCode(e),r};function Ybe(e){var r;return e>=55296&&e<=57343||e>1114111?65533:(r=Ube.get(e))!==null&&r!==void 0?r:e}var ro;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ro||(ro={}));const Gbe=32;var du;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(du||(du={}));function l8(e){return e>=ro.ZERO&&e<=ro.NINE}function Xbe(e){return e>=ro.UPPER_A&&e<=ro.UPPER_F||e>=ro.LOWER_A&&e<=ro.LOWER_F}function Kbe(e){return e>=ro.UPPER_A&&e<=ro.UPPER_Z||e>=ro.LOWER_A&&e<=ro.LOWER_Z||l8(e)}function Zbe(e){return e===ro.EQUALS||Kbe(e)}var no;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(no||(no={}));var tc;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(tc||(tc={}));class ej{constructor(r,n,o){this.decodeTree=r,this.emitCodePoint=n,this.errors=o,this.state=no.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=tc.Strict}startEntity(r){this.decodeMode=r,this.state=no.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(r,n){switch(this.state){case no.EntityStart:return r.charCodeAt(n)===ro.NUM?(this.state=no.NumericStart,this.consumed+=1,this.stateNumericStart(r,n+1)):(this.state=no.NamedEntity,this.stateNamedEntity(r,n));case no.NumericStart:return this.stateNumericStart(r,n);case no.NumericDecimal:return this.stateNumericDecimal(r,n);case no.NumericHex:return this.stateNumericHex(r,n);case no.NamedEntity:return this.stateNamedEntity(r,n)}}stateNumericStart(r,n){return n>=r.length?-1:(r.charCodeAt(n)|Gbe)===ro.LOWER_X?(this.state=no.NumericHex,this.consumed+=1,this.stateNumericHex(r,n+1)):(this.state=no.NumericDecimal,this.stateNumericDecimal(r,n))}addToNumericResult(r,n,o,a){if(n!==o){const i=o-n;this.result=this.result*Math.pow(a,i)+parseInt(r.substr(n,i),a),this.consumed+=i}}stateNumericHex(r,n){const o=n;for(;n>14;for(;n>14,i!==0){if(s===ro.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==tc.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var r;const{result:n,decodeTree:o}=this,a=(o[n]&du.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(r=this.errors)===null||r===void 0||r.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(r,n,o){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[r]&~du.VALUE_LENGTH:a[r+1],o),n===3&&this.emitCodePoint(a[r+2],o),o}end(){var r;switch(this.state){case no.NamedEntity:return this.result!==0&&(this.decodeMode!==tc.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case no.NumericDecimal:return this.emitNumericEntity(0,2);case no.NumericHex:return this.emitNumericEntity(0,3);case no.NumericStart:return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case no.EntityStart:return 0}}}function tj(e){let r="";const n=new ej(e,o=>r+=Wbe(o));return function(a,i){let s=0,l=0;for(;(l=a.indexOf("&",l))>=0;){r+=a.slice(s,l),n.startEntity(i);const u=n.write(a,l+1);if(u<0){s=l+n.end();break}s=l+u,l=u===0?s+1:s}const c=r+a.slice(s);return r="",c}}function Qbe(e,r,n,o){const a=(r&du.BRANCH_LENGTH)>>7,i=r&du.JUMP_TABLE;if(a===0)return i!==0&&o===i?n:-1;if(i){const c=o-i;return c<0||c>=a?-1:e[n+c]-1}let s=n,l=s+a-1;for(;s<=l;){const c=s+l>>>1,u=e[c];if(uo)l=c-1;else return e[c+a]}return-1}tj(JO),tj(qbe);var je;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(je||(je={}));var Vd;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Vd||(Vd={}));var ui;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ui||(ui={}));var ve;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(ve||(ve={}));var B;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(B||(B={}));const Jbe=new Map([[ve.A,B.A],[ve.ADDRESS,B.ADDRESS],[ve.ANNOTATION_XML,B.ANNOTATION_XML],[ve.APPLET,B.APPLET],[ve.AREA,B.AREA],[ve.ARTICLE,B.ARTICLE],[ve.ASIDE,B.ASIDE],[ve.B,B.B],[ve.BASE,B.BASE],[ve.BASEFONT,B.BASEFONT],[ve.BGSOUND,B.BGSOUND],[ve.BIG,B.BIG],[ve.BLOCKQUOTE,B.BLOCKQUOTE],[ve.BODY,B.BODY],[ve.BR,B.BR],[ve.BUTTON,B.BUTTON],[ve.CAPTION,B.CAPTION],[ve.CENTER,B.CENTER],[ve.CODE,B.CODE],[ve.COL,B.COL],[ve.COLGROUP,B.COLGROUP],[ve.DD,B.DD],[ve.DESC,B.DESC],[ve.DETAILS,B.DETAILS],[ve.DIALOG,B.DIALOG],[ve.DIR,B.DIR],[ve.DIV,B.DIV],[ve.DL,B.DL],[ve.DT,B.DT],[ve.EM,B.EM],[ve.EMBED,B.EMBED],[ve.FIELDSET,B.FIELDSET],[ve.FIGCAPTION,B.FIGCAPTION],[ve.FIGURE,B.FIGURE],[ve.FONT,B.FONT],[ve.FOOTER,B.FOOTER],[ve.FOREIGN_OBJECT,B.FOREIGN_OBJECT],[ve.FORM,B.FORM],[ve.FRAME,B.FRAME],[ve.FRAMESET,B.FRAMESET],[ve.H1,B.H1],[ve.H2,B.H2],[ve.H3,B.H3],[ve.H4,B.H4],[ve.H5,B.H5],[ve.H6,B.H6],[ve.HEAD,B.HEAD],[ve.HEADER,B.HEADER],[ve.HGROUP,B.HGROUP],[ve.HR,B.HR],[ve.HTML,B.HTML],[ve.I,B.I],[ve.IMG,B.IMG],[ve.IMAGE,B.IMAGE],[ve.INPUT,B.INPUT],[ve.IFRAME,B.IFRAME],[ve.KEYGEN,B.KEYGEN],[ve.LABEL,B.LABEL],[ve.LI,B.LI],[ve.LINK,B.LINK],[ve.LISTING,B.LISTING],[ve.MAIN,B.MAIN],[ve.MALIGNMARK,B.MALIGNMARK],[ve.MARQUEE,B.MARQUEE],[ve.MATH,B.MATH],[ve.MENU,B.MENU],[ve.META,B.META],[ve.MGLYPH,B.MGLYPH],[ve.MI,B.MI],[ve.MO,B.MO],[ve.MN,B.MN],[ve.MS,B.MS],[ve.MTEXT,B.MTEXT],[ve.NAV,B.NAV],[ve.NOBR,B.NOBR],[ve.NOFRAMES,B.NOFRAMES],[ve.NOEMBED,B.NOEMBED],[ve.NOSCRIPT,B.NOSCRIPT],[ve.OBJECT,B.OBJECT],[ve.OL,B.OL],[ve.OPTGROUP,B.OPTGROUP],[ve.OPTION,B.OPTION],[ve.P,B.P],[ve.PARAM,B.PARAM],[ve.PLAINTEXT,B.PLAINTEXT],[ve.PRE,B.PRE],[ve.RB,B.RB],[ve.RP,B.RP],[ve.RT,B.RT],[ve.RTC,B.RTC],[ve.RUBY,B.RUBY],[ve.S,B.S],[ve.SCRIPT,B.SCRIPT],[ve.SEARCH,B.SEARCH],[ve.SECTION,B.SECTION],[ve.SELECT,B.SELECT],[ve.SOURCE,B.SOURCE],[ve.SMALL,B.SMALL],[ve.SPAN,B.SPAN],[ve.STRIKE,B.STRIKE],[ve.STRONG,B.STRONG],[ve.STYLE,B.STYLE],[ve.SUB,B.SUB],[ve.SUMMARY,B.SUMMARY],[ve.SUP,B.SUP],[ve.TABLE,B.TABLE],[ve.TBODY,B.TBODY],[ve.TEMPLATE,B.TEMPLATE],[ve.TEXTAREA,B.TEXTAREA],[ve.TFOOT,B.TFOOT],[ve.TD,B.TD],[ve.TH,B.TH],[ve.THEAD,B.THEAD],[ve.TITLE,B.TITLE],[ve.TR,B.TR],[ve.TRACK,B.TRACK],[ve.TT,B.TT],[ve.U,B.U],[ve.UL,B.UL],[ve.SVG,B.SVG],[ve.VAR,B.VAR],[ve.WBR,B.WBR],[ve.XMP,B.XMP]]);function hf(e){var r;return(r=Jbe.get(e))!==null&&r!==void 0?r:B.UNKNOWN}const Fe=B,eve={[je.HTML]:new Set([Fe.ADDRESS,Fe.APPLET,Fe.AREA,Fe.ARTICLE,Fe.ASIDE,Fe.BASE,Fe.BASEFONT,Fe.BGSOUND,Fe.BLOCKQUOTE,Fe.BODY,Fe.BR,Fe.BUTTON,Fe.CAPTION,Fe.CENTER,Fe.COL,Fe.COLGROUP,Fe.DD,Fe.DETAILS,Fe.DIR,Fe.DIV,Fe.DL,Fe.DT,Fe.EMBED,Fe.FIELDSET,Fe.FIGCAPTION,Fe.FIGURE,Fe.FOOTER,Fe.FORM,Fe.FRAME,Fe.FRAMESET,Fe.H1,Fe.H2,Fe.H3,Fe.H4,Fe.H5,Fe.H6,Fe.HEAD,Fe.HEADER,Fe.HGROUP,Fe.HR,Fe.HTML,Fe.IFRAME,Fe.IMG,Fe.INPUT,Fe.LI,Fe.LINK,Fe.LISTING,Fe.MAIN,Fe.MARQUEE,Fe.MENU,Fe.META,Fe.NAV,Fe.NOEMBED,Fe.NOFRAMES,Fe.NOSCRIPT,Fe.OBJECT,Fe.OL,Fe.P,Fe.PARAM,Fe.PLAINTEXT,Fe.PRE,Fe.SCRIPT,Fe.SECTION,Fe.SELECT,Fe.SOURCE,Fe.STYLE,Fe.SUMMARY,Fe.TABLE,Fe.TBODY,Fe.TD,Fe.TEMPLATE,Fe.TEXTAREA,Fe.TFOOT,Fe.TH,Fe.THEAD,Fe.TITLE,Fe.TR,Fe.TRACK,Fe.UL,Fe.WBR,Fe.XMP]),[je.MATHML]:new Set([Fe.MI,Fe.MO,Fe.MN,Fe.MS,Fe.MTEXT,Fe.ANNOTATION_XML]),[je.SVG]:new Set([Fe.TITLE,Fe.FOREIGN_OBJECT,Fe.DESC]),[je.XLINK]:new Set,[je.XML]:new Set,[je.XMLNS]:new Set},c8=new Set([Fe.H1,Fe.H2,Fe.H3,Fe.H4,Fe.H5,Fe.H6]);ve.STYLE,ve.SCRIPT,ve.XMP,ve.IFRAME,ve.NOEMBED,ve.NOFRAMES,ve.PLAINTEXT;var ce;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(ce||(ce={}));const kn={DATA:ce.DATA,RCDATA:ce.RCDATA,RAWTEXT:ce.RAWTEXT,SCRIPT_DATA:ce.SCRIPT_DATA,PLAINTEXT:ce.PLAINTEXT,CDATA_SECTION:ce.CDATA_SECTION};function tve(e){return e>=se.DIGIT_0&&e<=se.DIGIT_9}function S1(e){return e>=se.LATIN_CAPITAL_A&&e<=se.LATIN_CAPITAL_Z}function rve(e){return e>=se.LATIN_SMALL_A&&e<=se.LATIN_SMALL_Z}function pu(e){return rve(e)||S1(e)}function rj(e){return pu(e)||tve(e)}function ux(e){return e+32}function nj(e){return e===se.SPACE||e===se.LINE_FEED||e===se.TABULATION||e===se.FORM_FEED}function oj(e){return nj(e)||e===se.SOLIDUS||e===se.GREATER_THAN_SIGN}function nve(e){return e===se.NULL?Ae.nullCharacterReference:e>1114111?Ae.characterReferenceOutsideUnicodeRange:XO(e)?Ae.surrogateCharacterReference:ZO(e)?Ae.noncharacterCharacterReference:KO(e)||e===se.CARRIAGE_RETURN?Ae.controlCharacterReference:null}class ove{constructor(r,n){this.options=r,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=ce.DATA,this.returnState=ce.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Vbe(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ej(JO,(o,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(o)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Ae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:o=>{this._err(Ae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+o)},validateNumericCharacterReference:o=>{const a=nve(o);a&&this._err(a,1)}}:void 0)}_err(r,n=0){var o,a;(a=(o=this.handler).onParseError)===null||a===void 0||a.call(o,this.preprocessor.getError(r,n))}getCurrentLocation(r){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-r,startOffset:this.preprocessor.offset-r,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const r=this._consume();this._ensureHibernation()||this._callState(r)}this.inLoop=!1}}pause(){this.paused=!0}resume(r){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||r?.())}write(r,n,o){this.active=!0,this.preprocessor.write(r,n),this._runParsingLoop(),this.paused||o?.()}insertHtmlAtCurrentPos(r){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(r),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(r){this.consumedAfterSnapshot+=r;for(let n=0;n0&&this._err(Ae.endTagWithAttributes),r.selfClosing&&this._err(Ae.endTagWithTrailingSolidus),this.handler.onEndTag(r)),this.preprocessor.dropParsedChunk()}emitCurrentComment(r){this.prepareToken(r),this.handler.onComment(r),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(r){this.prepareToken(r),this.handler.onDoctype(r),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(r){if(this.currentCharacterToken){switch(r&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=r.startLine,this.currentCharacterToken.location.endCol=r.startCol,this.currentCharacterToken.location.endOffset=r.startOffset),this.currentCharacterToken.type){case Kt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Kt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Kt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const r=this.getCurrentLocation(0);r&&(r.endLine=r.startLine,r.endCol=r.startCol,r.endOffset=r.startOffset),this._emitCurrentCharacterToken(r),this.handler.onEof({type:Kt.EOF,location:r}),this.active=!1}_appendCharToCurrentCharacterToken(r,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===r){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(r,n)}_emitCodePoint(r){const n=nj(r)?Kt.WHITESPACE_CHARACTER:r===se.NULL?Kt.NULL_CHARACTER:Kt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(r))}_emitChars(r){this._appendCharToCurrentCharacterToken(Kt.CHARACTER,r)}_startCharacterReference(){this.returnState=this.state,this.state=ce.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?tc.Attribute:tc.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===ce.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===ce.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===ce.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(r){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(r):this._emitCodePoint(r)}_callState(r){switch(this.state){case ce.DATA:{this._stateData(r);break}case ce.RCDATA:{this._stateRcdata(r);break}case ce.RAWTEXT:{this._stateRawtext(r);break}case ce.SCRIPT_DATA:{this._stateScriptData(r);break}case ce.PLAINTEXT:{this._statePlaintext(r);break}case ce.TAG_OPEN:{this._stateTagOpen(r);break}case ce.END_TAG_OPEN:{this._stateEndTagOpen(r);break}case ce.TAG_NAME:{this._stateTagName(r);break}case ce.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(r);break}case ce.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(r);break}case ce.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(r);break}case ce.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(r);break}case ce.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(r);break}case ce.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(r);break}case ce.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(r);break}case ce.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(r);break}case ce.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(r);break}case ce.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(r);break}case ce.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(r);break}case ce.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(r);break}case ce.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(r);break}case ce.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(r);break}case ce.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(r);break}case ce.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(r);break}case ce.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(r);break}case ce.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(r);break}case ce.ATTRIBUTE_NAME:{this._stateAttributeName(r);break}case ce.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(r);break}case ce.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(r);break}case ce.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(r);break}case ce.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(r);break}case ce.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(r);break}case ce.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(r);break}case ce.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(r);break}case ce.BOGUS_COMMENT:{this._stateBogusComment(r);break}case ce.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(r);break}case ce.COMMENT_START:{this._stateCommentStart(r);break}case ce.COMMENT_START_DASH:{this._stateCommentStartDash(r);break}case ce.COMMENT:{this._stateComment(r);break}case ce.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(r);break}case ce.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(r);break}case ce.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(r);break}case ce.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(r);break}case ce.COMMENT_END_DASH:{this._stateCommentEndDash(r);break}case ce.COMMENT_END:{this._stateCommentEnd(r);break}case ce.COMMENT_END_BANG:{this._stateCommentEndBang(r);break}case ce.DOCTYPE:{this._stateDoctype(r);break}case ce.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(r);break}case ce.DOCTYPE_NAME:{this._stateDoctypeName(r);break}case ce.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(r);break}case ce.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(r);break}case ce.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(r);break}case ce.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(r);break}case ce.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(r);break}case ce.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(r);break}case ce.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(r);break}case ce.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(r);break}case ce.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(r);break}case ce.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(r);break}case ce.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(r);break}case ce.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(r);break}case ce.BOGUS_DOCTYPE:{this._stateBogusDoctype(r);break}case ce.CDATA_SECTION:{this._stateCdataSection(r);break}case ce.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(r);break}case ce.CDATA_SECTION_END:{this._stateCdataSectionEnd(r);break}case ce.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case ce.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(r);break}default:throw new Error("Unknown state")}}_stateData(r){switch(r){case se.LESS_THAN_SIGN:{this.state=ce.TAG_OPEN;break}case se.AMPERSAND:{this._startCharacterReference();break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this._emitCodePoint(r);break}case se.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(r)}}_stateRcdata(r){switch(r){case se.AMPERSAND:{this._startCharacterReference();break}case se.LESS_THAN_SIGN:{this.state=ce.RCDATA_LESS_THAN_SIGN;break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this._emitChars(Xr);break}case se.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(r)}}_stateRawtext(r){switch(r){case se.LESS_THAN_SIGN:{this.state=ce.RAWTEXT_LESS_THAN_SIGN;break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this._emitChars(Xr);break}case se.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(r)}}_stateScriptData(r){switch(r){case se.LESS_THAN_SIGN:{this.state=ce.SCRIPT_DATA_LESS_THAN_SIGN;break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this._emitChars(Xr);break}case se.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(r)}}_statePlaintext(r){switch(r){case se.NULL:{this._err(Ae.unexpectedNullCharacter),this._emitChars(Xr);break}case se.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(r)}}_stateTagOpen(r){if(pu(r))this._createStartTagToken(),this.state=ce.TAG_NAME,this._stateTagName(r);else switch(r){case se.EXCLAMATION_MARK:{this.state=ce.MARKUP_DECLARATION_OPEN;break}case se.SOLIDUS:{this.state=ce.END_TAG_OPEN;break}case se.QUESTION_MARK:{this._err(Ae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=ce.BOGUS_COMMENT,this._stateBogusComment(r);break}case se.EOF:{this._err(Ae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Ae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=ce.DATA,this._stateData(r)}}_stateEndTagOpen(r){if(pu(r))this._createEndTagToken(),this.state=ce.TAG_NAME,this._stateTagName(r);else switch(r){case se.GREATER_THAN_SIGN:{this._err(Ae.missingEndTagName),this.state=ce.DATA;break}case se.EOF:{this._err(Ae.eofBeforeTagName),this._emitChars(""),this._emitEOFToken();break}default:this._err(Ae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=ce.BOGUS_COMMENT,this._stateBogusComment(r)}}_stateTagName(r){const n=this.currentToken;switch(r){case se.SPACE:case se.LINE_FEED:case se.TABULATION:case se.FORM_FEED:{this.state=ce.BEFORE_ATTRIBUTE_NAME;break}case se.SOLIDUS:{this.state=ce.SELF_CLOSING_START_TAG;break}case se.GREATER_THAN_SIGN:{this.state=ce.DATA,this.emitCurrentTagToken();break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),n.tagName+=Xr;break}case se.EOF:{this._err(Ae.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(S1(r)?ux(r):r)}}_stateRcdataLessThanSign(r){r===se.SOLIDUS?this.state=ce.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=ce.RCDATA,this._stateRcdata(r))}_stateRcdataEndTagOpen(r){pu(r)?(this.state=ce.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(r)):(this._emitChars(""),this.state=ce.RCDATA,this._stateRcdata(r))}handleSpecialEndTag(r){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case se.SPACE:case se.LINE_FEED:case se.TABULATION:case se.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=ce.BEFORE_ATTRIBUTE_NAME,!1;case se.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=ce.SELF_CLOSING_START_TAG,!1;case se.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=ce.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(r){this.handleSpecialEndTag(r)&&(this._emitChars(""),this.state=ce.RCDATA,this._stateRcdata(r))}_stateRawtextLessThanSign(r){r===se.SOLIDUS?this.state=ce.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=ce.RAWTEXT,this._stateRawtext(r))}_stateRawtextEndTagOpen(r){pu(r)?(this.state=ce.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(r)):(this._emitChars(""),this.state=ce.RAWTEXT,this._stateRawtext(r))}_stateRawtextEndTagName(r){this.handleSpecialEndTag(r)&&(this._emitChars(""),this.state=ce.RAWTEXT,this._stateRawtext(r))}_stateScriptDataLessThanSign(r){switch(r){case se.SOLIDUS:{this.state=ce.SCRIPT_DATA_END_TAG_OPEN;break}case se.EXCLAMATION_MARK:{this.state=ce.SCRIPT_DATA_ESCAPE_START,this._emitChars("");break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this.state=ce.SCRIPT_DATA_ESCAPED,this._emitChars(Xr);break}case se.EOF:{this._err(Ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ce.SCRIPT_DATA_ESCAPED,this._emitCodePoint(r)}}_stateScriptDataEscapedLessThanSign(r){r===se.SOLIDUS?this.state=ce.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:pu(r)?(this._emitChars("<"),this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(r)):(this._emitChars("<"),this.state=ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(r))}_stateScriptDataEscapedEndTagOpen(r){pu(r)?(this.state=ce.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(r)):(this._emitChars(""),this.state=ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(r))}_stateScriptDataEscapedEndTagName(r){this.handleSpecialEndTag(r)&&(this._emitChars(""),this.state=ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(r))}_stateScriptDataDoubleEscapeStart(r){if(this.preprocessor.startsWith(aa.SCRIPT,!1)&&oj(this.preprocessor.peek(aa.SCRIPT.length))){this._emitCodePoint(r);for(let n=0;n");break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Xr);break}case se.EOF:{this._err(Ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(r)}}_stateScriptDataDoubleEscapedLessThanSign(r){r===se.SOLIDUS?(this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(r))}_stateScriptDataDoubleEscapeEnd(r){if(this.preprocessor.startsWith(aa.SCRIPT,!1)&&oj(this.preprocessor.peek(aa.SCRIPT.length))){this._emitCodePoint(r);for(let n=0;n0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,!0)}replace(r,n){const o=this._indexOf(r);this.items[o]=n,o===this.stackTop&&(this.current=n)}insertAfter(r,n,o){const a=this._indexOf(r)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,o),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(r){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(r,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==je.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(r){for(;this.stackTop>=r;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop=0;o--)if(r.has(this.tagIDs[o])&&this.treeAdapter.getNamespaceURI(this.items[o])===n)return o;return-1}clearBackTo(r,n){const o=this._indexOfTagNames(r,n);this.shortenToLength(o+1)}clearBackToTableContext(){this.clearBackTo(cve,je.HTML)}clearBackToTableBodyContext(){this.clearBackTo(lve,je.HTML)}clearBackToTableRowContext(){this.clearBackTo(sve,je.HTML)}remove(r){const n=this._indexOf(r);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===B.BODY?this.items[1]:null}contains(r){return this._indexOf(r)>-1}getCommonAncestor(r){const n=this._indexOf(r)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===B.HTML}hasInDynamicScope(r,n){for(let o=this.stackTop;o>=0;o--){const a=this.tagIDs[o];switch(this.treeAdapter.getNamespaceURI(this.items[o])){case je.HTML:{if(a===r)return!0;if(n.has(a))return!1;break}case je.SVG:{if(lj.has(a))return!1;break}case je.MATHML:{if(sj.has(a))return!1;break}}}return!0}hasInScope(r){return this.hasInDynamicScope(r,dx)}hasInListItemScope(r){return this.hasInDynamicScope(r,ave)}hasInButtonScope(r){return this.hasInDynamicScope(r,ive)}hasNumberedHeaderInScope(){for(let r=this.stackTop;r>=0;r--){const n=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case je.HTML:{if(c8.has(n))return!0;if(dx.has(n))return!1;break}case je.SVG:{if(lj.has(n))return!1;break}case je.MATHML:{if(sj.has(n))return!1;break}}}return!0}hasInTableScope(r){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===je.HTML)switch(this.tagIDs[n]){case r:return!0;case B.TABLE:case B.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===je.HTML)switch(this.tagIDs[r]){case B.TBODY:case B.THEAD:case B.TFOOT:return!0;case B.TABLE:case B.HTML:return!1}return!0}hasInSelectScope(r){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===je.HTML)switch(this.tagIDs[n]){case r:return!0;case B.OPTION:case B.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;aj.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;ij.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(r){for(;this.currentTagId!==r&&ij.has(this.currentTagId);)this.pop()}}const u8=3;var nl;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(nl||(nl={}));const cj={type:nl.Marker};class pve{constructor(r){this.treeAdapter=r,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(r,n){const o=[],a=n.length,i=this.treeAdapter.getTagName(r),s=this.treeAdapter.getNamespaceURI(r);for(let l=0;l[s.name,s.value]));let i=0;for(let s=0;sa.get(c.name)===c.value)&&(i+=1,i>=u8&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(cj)}pushElement(r,n){this._ensureNoahArkCondition(r),this.entries.unshift({type:nl.Element,element:r,token:n})}insertElementAfterBookmark(r,n){const o=this.entries.indexOf(this.bookmark);this.entries.splice(o,0,{type:nl.Element,element:r,token:n})}removeEntry(r){const n=this.entries.indexOf(r);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const r=this.entries.indexOf(cj);r>=0?this.entries.splice(0,r+1):this.entries.length=0}getElementEntryInScopeWithTagName(r){const n=this.entries.find(o=>o.type===nl.Marker||this.treeAdapter.getTagName(o.element)===r);return n&&n.type===nl.Element?n:null}getElementEntry(r){return this.entries.find(n=>n.type===nl.Element&&n.element===r)}}const hu={createDocument(){return{nodeName:"#document",mode:ui.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,r,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:r,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,r){e.childNodes.push(r),r.parentNode=e},insertBefore(e,r,n){const o=e.childNodes.indexOf(n);e.childNodes.splice(o,0,r),r.parentNode=e},setTemplateContent(e,r){e.content=r},getTemplateContent(e){return e.content},setDocumentType(e,r,n,o){const a=e.childNodes.find(i=>i.nodeName==="#documentType");if(a)a.name=r,a.publicId=n,a.systemId=o;else{const i={nodeName:"#documentType",name:r,publicId:n,systemId:o,parentNode:null};hu.appendChild(e,i)}},setDocumentMode(e,r){e.mode=r},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const r=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(r,1),e.parentNode=null}},insertText(e,r){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(hu.isTextNode(n)){n.value+=r;return}}hu.appendChild(e,hu.createTextNode(r))},insertTextBefore(e,r,n){const o=e.childNodes[e.childNodes.indexOf(n)-1];o&&hu.isTextNode(o)?o.value+=r:hu.insertBefore(e,hu.createTextNode(r),n)},adoptAttributes(e,r){const n=new Set(e.attrs.map(o=>o.name));for(let o=0;oe.startsWith(n))}function bve(e){return e.name===uj&&e.publicId===null&&(e.systemId===null||e.systemId===hve)}function vve(e){if(e.name!==uj)return ui.QUIRKS;const{systemId:r}=e;if(r&&r.toLowerCase()===fve)return ui.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),gve.has(n))return ui.QUIRKS;let o=r===null?mve:dj;if(hj(n,o))return ui.QUIRKS;if(o=r===null?pj:yve,hj(n,o))return ui.LIMITED_QUIRKS}return ui.NO_QUIRKS}const fj={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},xve="definitionurl",wve="definitionURL",kve=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),_ve=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:je.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:je.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:je.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:je.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:je.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:je.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:je.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:je.XML}],["xml:space",{prefix:"xml",name:"space",namespace:je.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:je.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:je.XMLNS}]]),Eve=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Sve=new Set([B.B,B.BIG,B.BLOCKQUOTE,B.BODY,B.BR,B.CENTER,B.CODE,B.DD,B.DIV,B.DL,B.DT,B.EM,B.EMBED,B.H1,B.H2,B.H3,B.H4,B.H5,B.H6,B.HEAD,B.HR,B.I,B.IMG,B.LI,B.LISTING,B.MENU,B.META,B.NOBR,B.OL,B.P,B.PRE,B.RUBY,B.S,B.SMALL,B.SPAN,B.STRONG,B.STRIKE,B.SUB,B.SUP,B.TABLE,B.TT,B.U,B.UL,B.VAR]);function Cve(e){const r=e.tagID;return r===B.FONT&&e.attrs.some(({name:o})=>o===Vd.COLOR||o===Vd.SIZE||o===Vd.FACE)||Sve.has(r)}function mj(e){for(let r=0;r0&&this._setContextModes(r,n)}onItemPop(r,n){var o,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(r,this.currentToken),(a=(o=this.treeAdapter).onItemPop)===null||a===void 0||a.call(o,r,this.openElements.current),n){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(r,n){const o=r===this.document||this.treeAdapter.getNamespaceURI(r)===je.HTML;this.currentNotInHTML=!o,this.tokenizer.inForeignNode=!o&&!this._isIntegrationPoint(n,r)}_switchToTextParsing(r,n){this._insertElement(r,je.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=de.TEXT}switchToPlaintextParsing(){this.insertionMode=de.TEXT,this.originalInsertionMode=de.IN_BODY,this.tokenizer.state=kn.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let r=this.fragmentContext;for(;r;){if(this.treeAdapter.getTagName(r)===ve.FORM){this.formElement=r;break}r=this.treeAdapter.getParentNode(r)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==je.HTML))switch(this.fragmentContextID){case B.TITLE:case B.TEXTAREA:{this.tokenizer.state=kn.RCDATA;break}case B.STYLE:case B.XMP:case B.IFRAME:case B.NOEMBED:case B.NOFRAMES:case B.NOSCRIPT:{this.tokenizer.state=kn.RAWTEXT;break}case B.SCRIPT:{this.tokenizer.state=kn.SCRIPT_DATA;break}case B.PLAINTEXT:{this.tokenizer.state=kn.PLAINTEXT;break}}}_setDocumentType(r){const n=r.name||"",o=r.publicId||"",a=r.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,o,a),r.location){const s=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));s&&this.treeAdapter.setNodeSourceCodeLocation(s,r.location)}}_attachElementToTree(r,n){if(this.options.sourceCodeLocationInfo){const o=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(r,o)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(r);else{const o=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(o,r)}}_appendElement(r,n){const o=this.treeAdapter.createElement(r.tagName,n,r.attrs);this._attachElementToTree(o,r.location)}_insertElement(r,n){const o=this.treeAdapter.createElement(r.tagName,n,r.attrs);this._attachElementToTree(o,r.location),this.openElements.push(o,r.tagID)}_insertFakeElement(r,n){const o=this.treeAdapter.createElement(r,je.HTML,[]);this._attachElementToTree(o,null),this.openElements.push(o,n)}_insertTemplate(r){const n=this.treeAdapter.createElement(r.tagName,je.HTML,r.attrs),o=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,o),this._attachElementToTree(n,r.location),this.openElements.push(n,r.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,null)}_insertFakeRootElement(){const r=this.treeAdapter.createElement(ve.HTML,je.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null),this.treeAdapter.appendChild(this.openElements.current,r),this.openElements.push(r,B.HTML)}_appendCommentNode(r,n){const o=this.treeAdapter.createCommentNode(r.data);this.treeAdapter.appendChild(n,o),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,r.location)}_insertCharacters(r){let n,o;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:o}=this._findFosterParentingLocation(),o?this.treeAdapter.insertTextBefore(n,r.chars,o):this.treeAdapter.insertText(n,r.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,r.chars)),!r.location)return;const a=this.treeAdapter.getChildNodes(n),i=o?a.lastIndexOf(o):a.length,s=a[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:c,endCol:u,endOffset:d}=r.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:c,endCol:u,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,r.location)}_adoptNodes(r,n){for(let o=this.treeAdapter.getFirstChild(r);o;o=this.treeAdapter.getFirstChild(r))this.treeAdapter.detachNode(o),this.treeAdapter.appendChild(n,o)}_setEndLocation(r,n){if(this.treeAdapter.getNodeSourceCodeLocation(r)&&n.location){const o=n.location,a=this.treeAdapter.getTagName(r),i=n.type===Kt.END_TAG&&a===n.tagName?{endTag:{...o},endLine:o.endLine,endCol:o.endCol,endOffset:o.endOffset}:{endLine:o.startLine,endCol:o.startCol,endOffset:o.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(r,i)}}shouldProcessStartTagTokenInForeignContent(r){if(!this.currentNotInHTML)return!1;let n,o;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,o=this.fragmentContextID):{current:n,currentTagId:o}=this.openElements,r.tagID===B.SVG&&this.treeAdapter.getTagName(n)===ve.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===je.MATHML?!1:this.tokenizer.inForeignNode||(r.tagID===B.MGLYPH||r.tagID===B.MALIGNMARK)&&!this._isIntegrationPoint(o,n,je.HTML)}_processToken(r){switch(r.type){case Kt.CHARACTER:{this.onCharacter(r);break}case Kt.NULL_CHARACTER:{this.onNullCharacter(r);break}case Kt.COMMENT:{this.onComment(r);break}case Kt.DOCTYPE:{this.onDoctype(r);break}case Kt.START_TAG:{this._processStartTag(r);break}case Kt.END_TAG:{this.onEndTag(r);break}case Kt.EOF:{this.onEof(r);break}case Kt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(r);break}}}_isIntegrationPoint(r,n,o){const a=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return Nve(r,a,i,o)}_reconstructActiveFormattingElements(){const r=this.activeFormattingElements.entries.length;if(r){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===nl.Marker||this.openElements.contains(a.element)),o=n<0?r-1:n-1;for(let a=o;a>=0;a--){const i=this.activeFormattingElements.entries[a];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=de.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(B.P),this.openElements.popUntilTagNamePopped(B.P)}_resetInsertionMode(){for(let r=this.openElements.stackTop;r>=0;r--)switch(r===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[r]){case B.TR:{this.insertionMode=de.IN_ROW;return}case B.TBODY:case B.THEAD:case B.TFOOT:{this.insertionMode=de.IN_TABLE_BODY;return}case B.CAPTION:{this.insertionMode=de.IN_CAPTION;return}case B.COLGROUP:{this.insertionMode=de.IN_COLUMN_GROUP;return}case B.TABLE:{this.insertionMode=de.IN_TABLE;return}case B.BODY:{this.insertionMode=de.IN_BODY;return}case B.FRAMESET:{this.insertionMode=de.IN_FRAMESET;return}case B.SELECT:{this._resetInsertionModeForSelect(r);return}case B.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case B.HTML:{this.insertionMode=this.headElement?de.AFTER_HEAD:de.BEFORE_HEAD;return}case B.TD:case B.TH:{if(r>0){this.insertionMode=de.IN_CELL;return}break}case B.HEAD:{if(r>0){this.insertionMode=de.IN_HEAD;return}break}}this.insertionMode=de.IN_BODY}_resetInsertionModeForSelect(r){if(r>0)for(let n=r-1;n>0;n--){const o=this.openElements.tagIDs[n];if(o===B.TEMPLATE)break;if(o===B.TABLE){this.insertionMode=de.IN_SELECT_IN_TABLE;return}}this.insertionMode=de.IN_SELECT}_isElementCausesFosterParenting(r){return yj.has(r)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let r=this.openElements.stackTop;r>=0;r--){const n=this.openElements.items[r];switch(this.openElements.tagIDs[r]){case B.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===je.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case B.TABLE:{const o=this.treeAdapter.getParentNode(n);return o?{parent:o,beforeElement:n}:{parent:this.openElements.items[r-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(r){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,r,n.beforeElement):this.treeAdapter.appendChild(n.parent,r)}_isSpecialElement(r,n){const o=this.treeAdapter.getNamespaceURI(r);return eve[o].has(n)}onCharacter(r){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){u3e(this,r);return}switch(this.insertionMode){case de.INITIAL:{C1(this,r);break}case de.BEFORE_HTML:{T1(this,r);break}case de.BEFORE_HEAD:{A1(this,r);break}case de.IN_HEAD:{R1(this,r);break}case de.IN_HEAD_NO_SCRIPT:{N1(this,r);break}case de.AFTER_HEAD:{D1(this,r);break}case de.IN_BODY:case de.IN_CAPTION:case de.IN_CELL:case de.IN_TEMPLATE:{wj(this,r);break}case de.TEXT:case de.IN_SELECT:case de.IN_SELECT_IN_TABLE:{this._insertCharacters(r);break}case de.IN_TABLE:case de.IN_TABLE_BODY:case de.IN_ROW:{m8(this,r);break}case de.IN_TABLE_TEXT:{Rj(this,r);break}case de.IN_COLUMN_GROUP:{fx(this,r);break}case de.AFTER_BODY:{yx(this,r);break}case de.AFTER_AFTER_BODY:{bx(this,r);break}}}onNullCharacter(r){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){c3e(this,r);return}switch(this.insertionMode){case de.INITIAL:{C1(this,r);break}case de.BEFORE_HTML:{T1(this,r);break}case de.BEFORE_HEAD:{A1(this,r);break}case de.IN_HEAD:{R1(this,r);break}case de.IN_HEAD_NO_SCRIPT:{N1(this,r);break}case de.AFTER_HEAD:{D1(this,r);break}case de.TEXT:{this._insertCharacters(r);break}case de.IN_TABLE:case de.IN_TABLE_BODY:case de.IN_ROW:{m8(this,r);break}case de.IN_COLUMN_GROUP:{fx(this,r);break}case de.AFTER_BODY:{yx(this,r);break}case de.AFTER_AFTER_BODY:{bx(this,r);break}}}onComment(r){if(this.skipNextNewLine=!1,this.currentNotInHTML){h8(this,r);return}switch(this.insertionMode){case de.INITIAL:case de.BEFORE_HTML:case de.BEFORE_HEAD:case de.IN_HEAD:case de.IN_HEAD_NO_SCRIPT:case de.AFTER_HEAD:case de.IN_BODY:case de.IN_TABLE:case de.IN_CAPTION:case de.IN_COLUMN_GROUP:case de.IN_TABLE_BODY:case de.IN_ROW:case de.IN_CELL:case de.IN_SELECT:case de.IN_SELECT_IN_TABLE:case de.IN_TEMPLATE:case de.IN_FRAMESET:case de.AFTER_FRAMESET:{h8(this,r);break}case de.IN_TABLE_TEXT:{P1(this,r);break}case de.AFTER_BODY:{Fve(this,r);break}case de.AFTER_AFTER_BODY:case de.AFTER_AFTER_FRAMESET:{Hve(this,r);break}}}onDoctype(r){switch(this.skipNextNewLine=!1,this.insertionMode){case de.INITIAL:{Vve(this,r);break}case de.BEFORE_HEAD:case de.IN_HEAD:case de.IN_HEAD_NO_SCRIPT:case de.AFTER_HEAD:{this._err(r,Ae.misplacedDoctype);break}case de.IN_TABLE_TEXT:{P1(this,r);break}}}onStartTag(r){this.skipNextNewLine=!1,this.currentToken=r,this._processStartTag(r),r.selfClosing&&!r.ackSelfClosing&&this._err(r,Ae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(r){this.shouldProcessStartTagTokenInForeignContent(r)?d3e(this,r):this._startTagOutsideForeignContent(r)}_startTagOutsideForeignContent(r){switch(this.insertionMode){case de.INITIAL:{C1(this,r);break}case de.BEFORE_HTML:{qve(this,r);break}case de.BEFORE_HEAD:{Wve(this,r);break}case de.IN_HEAD:{es(this,r);break}case de.IN_HEAD_NO_SCRIPT:{Xve(this,r);break}case de.AFTER_HEAD:{Zve(this,r);break}case de.IN_BODY:{Mo(this,r);break}case de.IN_TABLE:{ff(this,r);break}case de.IN_TABLE_TEXT:{P1(this,r);break}case de.IN_CAPTION:{Yxe(this,r);break}case de.IN_COLUMN_GROUP:{g8(this,r);break}case de.IN_TABLE_BODY:{mx(this,r);break}case de.IN_ROW:{gx(this,r);break}case de.IN_CELL:{Kxe(this,r);break}case de.IN_SELECT:{$j(this,r);break}case de.IN_SELECT_IN_TABLE:{Qxe(this,r);break}case de.IN_TEMPLATE:{e3e(this,r);break}case de.AFTER_BODY:{r3e(this,r);break}case de.IN_FRAMESET:{n3e(this,r);break}case de.AFTER_FRAMESET:{a3e(this,r);break}case de.AFTER_AFTER_BODY:{s3e(this,r);break}case de.AFTER_AFTER_FRAMESET:{l3e(this,r);break}}}onEndTag(r){this.skipNextNewLine=!1,this.currentToken=r,this.currentNotInHTML?p3e(this,r):this._endTagOutsideForeignContent(r)}_endTagOutsideForeignContent(r){switch(this.insertionMode){case de.INITIAL:{C1(this,r);break}case de.BEFORE_HTML:{Uve(this,r);break}case de.BEFORE_HEAD:{Yve(this,r);break}case de.IN_HEAD:{Gve(this,r);break}case de.IN_HEAD_NO_SCRIPT:{Kve(this,r);break}case de.AFTER_HEAD:{Qve(this,r);break}case de.IN_BODY:{hx(this,r);break}case de.TEXT:{Oxe(this,r);break}case de.IN_TABLE:{$1(this,r);break}case de.IN_TABLE_TEXT:{P1(this,r);break}case de.IN_CAPTION:{Gxe(this,r);break}case de.IN_COLUMN_GROUP:{Xxe(this,r);break}case de.IN_TABLE_BODY:{y8(this,r);break}case de.IN_ROW:{Dj(this,r);break}case de.IN_CELL:{Zxe(this,r);break}case de.IN_SELECT:{Mj(this,r);break}case de.IN_SELECT_IN_TABLE:{Jxe(this,r);break}case de.IN_TEMPLATE:{t3e(this,r);break}case de.AFTER_BODY:{zj(this,r);break}case de.IN_FRAMESET:{o3e(this,r);break}case de.AFTER_FRAMESET:{i3e(this,r);break}case de.AFTER_AFTER_BODY:{bx(this,r);break}}}onEof(r){switch(this.insertionMode){case de.INITIAL:{C1(this,r);break}case de.BEFORE_HTML:{T1(this,r);break}case de.BEFORE_HEAD:{A1(this,r);break}case de.IN_HEAD:{R1(this,r);break}case de.IN_HEAD_NO_SCRIPT:{N1(this,r);break}case de.AFTER_HEAD:{D1(this,r);break}case de.IN_BODY:case de.IN_TABLE:case de.IN_CAPTION:case de.IN_COLUMN_GROUP:case de.IN_TABLE_BODY:case de.IN_ROW:case de.IN_CELL:case de.IN_SELECT:case de.IN_SELECT_IN_TABLE:{Tj(this,r);break}case de.TEXT:{jxe(this,r);break}case de.IN_TABLE_TEXT:{P1(this,r);break}case de.IN_TEMPLATE:{Pj(this,r);break}case de.AFTER_BODY:case de.IN_FRAMESET:case de.AFTER_FRAMESET:case de.AFTER_AFTER_BODY:case de.AFTER_AFTER_FRAMESET:{f8(this,r);break}}}onWhitespaceCharacter(r){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,r.chars.charCodeAt(0)===se.LINE_FEED)){if(r.chars.length===1)return;r.chars=r.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(r);return}switch(this.insertionMode){case de.IN_HEAD:case de.IN_HEAD_NO_SCRIPT:case de.AFTER_HEAD:case de.TEXT:case de.IN_COLUMN_GROUP:case de.IN_SELECT:case de.IN_SELECT_IN_TABLE:case de.IN_FRAMESET:case de.AFTER_FRAMESET:{this._insertCharacters(r);break}case de.IN_BODY:case de.IN_CAPTION:case de.IN_CELL:case de.IN_TEMPLATE:case de.AFTER_BODY:case de.AFTER_AFTER_BODY:case de.AFTER_AFTER_FRAMESET:{xj(this,r);break}case de.IN_TABLE:case de.IN_TABLE_BODY:case de.IN_ROW:{m8(this,r);break}case de.IN_TABLE_TEXT:{Aj(this,r);break}}}}function zve(e,r){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(r.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(r.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Cj(e,r),n}function Ive(e,r){let n=null,o=e.openElements.stackTop;for(;o>=0;o--){const a=e.openElements.items[o];if(a===r.element)break;e._isSpecialElement(a,e.openElements.tagIDs[o])&&(n=a)}return n||(e.openElements.shortenToLength(o<0?0:o),e.activeFormattingElements.removeEntry(r)),n}function Ove(e,r,n){let o=r,a=e.openElements.getCommonAncestor(r);for(let i=0,s=a;s!==n;i++,s=a){a=e.openElements.getCommonAncestor(s);const l=e.activeFormattingElements.getElementEntry(s),c=l&&i>=Mve;!l||c?(c&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(s)):(s=jve(e,l),o===r&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(o),e.treeAdapter.appendChild(s,o),o=s)}return o}function jve(e,r){const n=e.treeAdapter.getNamespaceURI(r.element),o=e.treeAdapter.createElement(r.token.tagName,n,r.token.attrs);return e.openElements.replace(r.element,o),r.element=o,o}function Lve(e,r,n){const o=e.treeAdapter.getTagName(r),a=hf(o);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(r);a===B.TEMPLATE&&i===je.HTML&&(r=e.treeAdapter.getTemplateContent(r)),e.treeAdapter.appendChild(r,n)}}function Bve(e,r,n){const o=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,i=e.treeAdapter.createElement(a.tagName,o,a.attrs);e._adoptNodes(r,i),e.treeAdapter.appendChild(r,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(r,i,a.tagID)}function p8(e,r){for(let n=0;n<$ve;n++){const o=zve(e,r);if(!o)break;const a=Ive(e,o);if(!a)break;e.activeFormattingElements.bookmark=o;const i=Ove(e,a,o.element),s=e.openElements.getCommonAncestor(o.element);e.treeAdapter.detachNode(i),s&&Lve(e,s,i),Bve(e,a,o)}}function h8(e,r){e._appendCommentNode(r,e.openElements.currentTmplContentOrNode)}function Fve(e,r){e._appendCommentNode(r,e.openElements.items[0])}function Hve(e,r){e._appendCommentNode(r,e.document)}function f8(e,r){if(e.stopped=!0,r.location){const n=e.fragmentContext?0:2;for(let o=e.openElements.stackTop;o>=n;o--)e._setEndLocation(e.openElements.items[o],r);if(!e.fragmentContext&&e.openElements.stackTop>=0){const o=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(o);if(a&&!a.endTag&&(e._setEndLocation(o,r),e.openElements.stackTop>=1)){const i=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(i);s&&!s.endTag&&e._setEndLocation(i,r)}}}}function Vve(e,r){e._setDocumentType(r);const n=r.forceQuirks?ui.QUIRKS:vve(r);bve(r)||e._err(r,Ae.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=de.BEFORE_HTML}function C1(e,r){e._err(r,Ae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ui.QUIRKS),e.insertionMode=de.BEFORE_HTML,e._processToken(r)}function qve(e,r){r.tagID===B.HTML?(e._insertElement(r,je.HTML),e.insertionMode=de.BEFORE_HEAD):T1(e,r)}function Uve(e,r){const n=r.tagID;(n===B.HTML||n===B.HEAD||n===B.BODY||n===B.BR)&&T1(e,r)}function T1(e,r){e._insertFakeRootElement(),e.insertionMode=de.BEFORE_HEAD,e._processToken(r)}function Wve(e,r){switch(r.tagID){case B.HTML:{Mo(e,r);break}case B.HEAD:{e._insertElement(r,je.HTML),e.headElement=e.openElements.current,e.insertionMode=de.IN_HEAD;break}default:A1(e,r)}}function Yve(e,r){const n=r.tagID;n===B.HEAD||n===B.BODY||n===B.HTML||n===B.BR?A1(e,r):e._err(r,Ae.endTagWithoutMatchingOpenElement)}function A1(e,r){e._insertFakeElement(ve.HEAD,B.HEAD),e.headElement=e.openElements.current,e.insertionMode=de.IN_HEAD,e._processToken(r)}function es(e,r){switch(r.tagID){case B.HTML:{Mo(e,r);break}case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:{e._appendElement(r,je.HTML),r.ackSelfClosing=!0;break}case B.TITLE:{e._switchToTextParsing(r,kn.RCDATA);break}case B.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(r,kn.RAWTEXT):(e._insertElement(r,je.HTML),e.insertionMode=de.IN_HEAD_NO_SCRIPT);break}case B.NOFRAMES:case B.STYLE:{e._switchToTextParsing(r,kn.RAWTEXT);break}case B.SCRIPT:{e._switchToTextParsing(r,kn.SCRIPT_DATA);break}case B.TEMPLATE:{e._insertTemplate(r),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=de.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(de.IN_TEMPLATE);break}case B.HEAD:{e._err(r,Ae.misplacedStartTagForHeadElement);break}default:R1(e,r)}}function Gve(e,r){switch(r.tagID){case B.HEAD:{e.openElements.pop(),e.insertionMode=de.AFTER_HEAD;break}case B.BODY:case B.BR:case B.HTML:{R1(e,r);break}case B.TEMPLATE:{qd(e,r);break}default:e._err(r,Ae.endTagWithoutMatchingOpenElement)}}function qd(e,r){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==B.TEMPLATE&&e._err(r,Ae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(B.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(r,Ae.endTagWithoutMatchingOpenElement)}function R1(e,r){e.openElements.pop(),e.insertionMode=de.AFTER_HEAD,e._processToken(r)}function Xve(e,r){switch(r.tagID){case B.HTML:{Mo(e,r);break}case B.BASEFONT:case B.BGSOUND:case B.HEAD:case B.LINK:case B.META:case B.NOFRAMES:case B.STYLE:{es(e,r);break}case B.NOSCRIPT:{e._err(r,Ae.nestedNoscriptInHead);break}default:N1(e,r)}}function Kve(e,r){switch(r.tagID){case B.NOSCRIPT:{e.openElements.pop(),e.insertionMode=de.IN_HEAD;break}case B.BR:{N1(e,r);break}default:e._err(r,Ae.endTagWithoutMatchingOpenElement)}}function N1(e,r){const n=r.type===Kt.EOF?Ae.openElementsLeftAfterEof:Ae.disallowedContentInNoscriptInHead;e._err(r,n),e.openElements.pop(),e.insertionMode=de.IN_HEAD,e._processToken(r)}function Zve(e,r){switch(r.tagID){case B.HTML:{Mo(e,r);break}case B.BODY:{e._insertElement(r,je.HTML),e.framesetOk=!1,e.insertionMode=de.IN_BODY;break}case B.FRAMESET:{e._insertElement(r,je.HTML),e.insertionMode=de.IN_FRAMESET;break}case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:case B.NOFRAMES:case B.SCRIPT:case B.STYLE:case B.TEMPLATE:case B.TITLE:{e._err(r,Ae.abandonedHeadElementChild),e.openElements.push(e.headElement,B.HEAD),es(e,r),e.openElements.remove(e.headElement);break}case B.HEAD:{e._err(r,Ae.misplacedStartTagForHeadElement);break}default:D1(e,r)}}function Qve(e,r){switch(r.tagID){case B.BODY:case B.HTML:case B.BR:{D1(e,r);break}case B.TEMPLATE:{qd(e,r);break}default:e._err(r,Ae.endTagWithoutMatchingOpenElement)}}function D1(e,r){e._insertFakeElement(ve.BODY,B.BODY),e.insertionMode=de.IN_BODY,px(e,r)}function px(e,r){switch(r.type){case Kt.CHARACTER:{wj(e,r);break}case Kt.WHITESPACE_CHARACTER:{xj(e,r);break}case Kt.COMMENT:{h8(e,r);break}case Kt.START_TAG:{Mo(e,r);break}case Kt.END_TAG:{hx(e,r);break}case Kt.EOF:{Tj(e,r);break}}}function xj(e,r){e._reconstructActiveFormattingElements(),e._insertCharacters(r)}function wj(e,r){e._reconstructActiveFormattingElements(),e._insertCharacters(r),e.framesetOk=!1}function Jve(e,r){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],r.attrs)}function exe(e,r){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,r.attrs))}function txe(e,r){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(r,je.HTML),e.insertionMode=de.IN_FRAMESET)}function rxe(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML)}function nxe(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),c8.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(r,je.HTML)}function oxe(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function axe(e,r){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML),n||(e.formElement=e.openElements.current))}function ixe(e,r){e.framesetOk=!1;const n=r.tagID;for(let o=e.openElements.stackTop;o>=0;o--){const a=e.openElements.tagIDs[o];if(n===B.LI&&a===B.LI||(n===B.DD||n===B.DT)&&(a===B.DD||a===B.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==B.ADDRESS&&a!==B.DIV&&a!==B.P&&e._isSpecialElement(e.openElements.items[o],a))break}e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML)}function sxe(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML),e.tokenizer.state=kn.PLAINTEXT}function lxe(e,r){e.openElements.hasInScope(B.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(B.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML),e.framesetOk=!1}function cxe(e,r){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(ve.A);n&&(p8(e,r),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML),e.activeFormattingElements.pushElement(e.openElements.current,r)}function uxe(e,r){e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML),e.activeFormattingElements.pushElement(e.openElements.current,r)}function dxe(e,r){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(B.NOBR)&&(p8(e,r),e._reconstructActiveFormattingElements()),e._insertElement(r,je.HTML),e.activeFormattingElements.pushElement(e.openElements.current,r)}function pxe(e,r){e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function hxe(e,r){e.treeAdapter.getDocumentMode(e.document)!==ui.QUIRKS&&e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML),e.framesetOk=!1,e.insertionMode=de.IN_TABLE}function kj(e,r){e._reconstructActiveFormattingElements(),e._appendElement(r,je.HTML),e.framesetOk=!1,r.ackSelfClosing=!0}function _j(e){const r=QO(e,Vd.TYPE);return r!=null&&r.toLowerCase()===Dve}function fxe(e,r){e._reconstructActiveFormattingElements(),e._appendElement(r,je.HTML),_j(r)||(e.framesetOk=!1),r.ackSelfClosing=!0}function mxe(e,r){e._appendElement(r,je.HTML),r.ackSelfClosing=!0}function gxe(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._appendElement(r,je.HTML),e.framesetOk=!1,r.ackSelfClosing=!0}function yxe(e,r){r.tagName=ve.IMG,r.tagID=B.IMG,kj(e,r)}function bxe(e,r){e._insertElement(r,je.HTML),e.skipNextNewLine=!0,e.tokenizer.state=kn.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=de.TEXT}function vxe(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(r,kn.RAWTEXT)}function xxe(e,r){e.framesetOk=!1,e._switchToTextParsing(r,kn.RAWTEXT)}function Ej(e,r){e._switchToTextParsing(r,kn.RAWTEXT)}function wxe(e,r){e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===de.IN_TABLE||e.insertionMode===de.IN_CAPTION||e.insertionMode===de.IN_TABLE_BODY||e.insertionMode===de.IN_ROW||e.insertionMode===de.IN_CELL?de.IN_SELECT_IN_TABLE:de.IN_SELECT}function kxe(e,r){e.openElements.currentTagId===B.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML)}function _xe(e,r){e.openElements.hasInScope(B.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(r,je.HTML)}function Exe(e,r){e.openElements.hasInScope(B.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(B.RTC),e._insertElement(r,je.HTML)}function Sxe(e,r){e._reconstructActiveFormattingElements(),mj(r),d8(r),r.selfClosing?e._appendElement(r,je.MATHML):e._insertElement(r,je.MATHML),r.ackSelfClosing=!0}function Cxe(e,r){e._reconstructActiveFormattingElements(),gj(r),d8(r),r.selfClosing?e._appendElement(r,je.SVG):e._insertElement(r,je.SVG),r.ackSelfClosing=!0}function Sj(e,r){e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML)}function Mo(e,r){switch(r.tagID){case B.I:case B.S:case B.B:case B.U:case B.EM:case B.TT:case B.BIG:case B.CODE:case B.FONT:case B.SMALL:case B.STRIKE:case B.STRONG:{uxe(e,r);break}case B.A:{cxe(e,r);break}case B.H1:case B.H2:case B.H3:case B.H4:case B.H5:case B.H6:{nxe(e,r);break}case B.P:case B.DL:case B.OL:case B.UL:case B.DIV:case B.DIR:case B.NAV:case B.MAIN:case B.MENU:case B.ASIDE:case B.CENTER:case B.FIGURE:case B.FOOTER:case B.HEADER:case B.HGROUP:case B.DIALOG:case B.DETAILS:case B.ADDRESS:case B.ARTICLE:case B.SEARCH:case B.SECTION:case B.SUMMARY:case B.FIELDSET:case B.BLOCKQUOTE:case B.FIGCAPTION:{rxe(e,r);break}case B.LI:case B.DD:case B.DT:{ixe(e,r);break}case B.BR:case B.IMG:case B.WBR:case B.AREA:case B.EMBED:case B.KEYGEN:{kj(e,r);break}case B.HR:{gxe(e,r);break}case B.RB:case B.RTC:{_xe(e,r);break}case B.RT:case B.RP:{Exe(e,r);break}case B.PRE:case B.LISTING:{oxe(e,r);break}case B.XMP:{vxe(e,r);break}case B.SVG:{Cxe(e,r);break}case B.HTML:{Jve(e,r);break}case B.BASE:case B.LINK:case B.META:case B.STYLE:case B.TITLE:case B.SCRIPT:case B.BGSOUND:case B.BASEFONT:case B.TEMPLATE:{es(e,r);break}case B.BODY:{exe(e,r);break}case B.FORM:{axe(e,r);break}case B.NOBR:{dxe(e,r);break}case B.MATH:{Sxe(e,r);break}case B.TABLE:{hxe(e,r);break}case B.INPUT:{fxe(e,r);break}case B.PARAM:case B.TRACK:case B.SOURCE:{mxe(e,r);break}case B.IMAGE:{yxe(e,r);break}case B.BUTTON:{lxe(e,r);break}case B.APPLET:case B.OBJECT:case B.MARQUEE:{pxe(e,r);break}case B.IFRAME:{xxe(e,r);break}case B.SELECT:{wxe(e,r);break}case B.OPTION:case B.OPTGROUP:{kxe(e,r);break}case B.NOEMBED:case B.NOFRAMES:{Ej(e,r);break}case B.FRAMESET:{txe(e,r);break}case B.TEXTAREA:{bxe(e,r);break}case B.NOSCRIPT:{e.options.scriptingEnabled?Ej(e,r):Sj(e,r);break}case B.PLAINTEXT:{sxe(e,r);break}case B.COL:case B.TH:case B.TD:case B.TR:case B.HEAD:case B.FRAME:case B.TBODY:case B.TFOOT:case B.THEAD:case B.CAPTION:case B.COLGROUP:break;default:Sj(e,r)}}function Txe(e,r){if(e.openElements.hasInScope(B.BODY)&&(e.insertionMode=de.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,r)}}function Axe(e,r){e.openElements.hasInScope(B.BODY)&&(e.insertionMode=de.AFTER_BODY,zj(e,r))}function Rxe(e,r){const n=r.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Nxe(e){const r=e.openElements.tmplCount>0,{formElement:n}=e;r||(e.formElement=null),(n||r)&&e.openElements.hasInScope(B.FORM)&&(e.openElements.generateImpliedEndTags(),r?e.openElements.popUntilTagNamePopped(B.FORM):n&&e.openElements.remove(n))}function Dxe(e){e.openElements.hasInButtonScope(B.P)||e._insertFakeElement(ve.P,B.P),e._closePElement()}function $xe(e){e.openElements.hasInListItemScope(B.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(B.LI),e.openElements.popUntilTagNamePopped(B.LI))}function Mxe(e,r){const n=r.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Pxe(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zxe(e,r){const n=r.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Ixe(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ve.BR,B.BR),e.openElements.pop(),e.framesetOk=!1}function Cj(e,r){const n=r.tagName,o=r.tagID;for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a],s=e.openElements.tagIDs[a];if(o===s&&(o!==B.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(i,s))break}}function hx(e,r){switch(r.tagID){case B.A:case B.B:case B.I:case B.S:case B.U:case B.EM:case B.TT:case B.BIG:case B.CODE:case B.FONT:case B.NOBR:case B.SMALL:case B.STRIKE:case B.STRONG:{p8(e,r);break}case B.P:{Dxe(e);break}case B.DL:case B.UL:case B.OL:case B.DIR:case B.DIV:case B.NAV:case B.PRE:case B.MAIN:case B.MENU:case B.ASIDE:case B.BUTTON:case B.CENTER:case B.FIGURE:case B.FOOTER:case B.HEADER:case B.HGROUP:case B.DIALOG:case B.ADDRESS:case B.ARTICLE:case B.DETAILS:case B.SEARCH:case B.SECTION:case B.SUMMARY:case B.LISTING:case B.FIELDSET:case B.BLOCKQUOTE:case B.FIGCAPTION:{Rxe(e,r);break}case B.LI:{$xe(e);break}case B.DD:case B.DT:{Mxe(e,r);break}case B.H1:case B.H2:case B.H3:case B.H4:case B.H5:case B.H6:{Pxe(e);break}case B.BR:{Ixe(e);break}case B.BODY:{Txe(e,r);break}case B.HTML:{Axe(e,r);break}case B.FORM:{Nxe(e);break}case B.APPLET:case B.OBJECT:case B.MARQUEE:{zxe(e,r);break}case B.TEMPLATE:{qd(e,r);break}default:Cj(e,r)}}function Tj(e,r){e.tmplInsertionModeStack.length>0?Pj(e,r):f8(e,r)}function Oxe(e,r){var n;r.tagID===B.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function jxe(e,r){e._err(r,Ae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(r)}function m8(e,r){if(yj.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=de.IN_TABLE_TEXT,r.type){case Kt.CHARACTER:{Rj(e,r);break}case Kt.WHITESPACE_CHARACTER:{Aj(e,r);break}}else M1(e,r)}function Lxe(e,r){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(r,je.HTML),e.insertionMode=de.IN_CAPTION}function Bxe(e,r){e.openElements.clearBackToTableContext(),e._insertElement(r,je.HTML),e.insertionMode=de.IN_COLUMN_GROUP}function Fxe(e,r){e.openElements.clearBackToTableContext(),e._insertFakeElement(ve.COLGROUP,B.COLGROUP),e.insertionMode=de.IN_COLUMN_GROUP,g8(e,r)}function Hxe(e,r){e.openElements.clearBackToTableContext(),e._insertElement(r,je.HTML),e.insertionMode=de.IN_TABLE_BODY}function Vxe(e,r){e.openElements.clearBackToTableContext(),e._insertFakeElement(ve.TBODY,B.TBODY),e.insertionMode=de.IN_TABLE_BODY,mx(e,r)}function qxe(e,r){e.openElements.hasInTableScope(B.TABLE)&&(e.openElements.popUntilTagNamePopped(B.TABLE),e._resetInsertionMode(),e._processStartTag(r))}function Uxe(e,r){_j(r)?e._appendElement(r,je.HTML):M1(e,r),r.ackSelfClosing=!0}function Wxe(e,r){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(r,je.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ff(e,r){switch(r.tagID){case B.TD:case B.TH:case B.TR:{Vxe(e,r);break}case B.STYLE:case B.SCRIPT:case B.TEMPLATE:{es(e,r);break}case B.COL:{Fxe(e,r);break}case B.FORM:{Wxe(e,r);break}case B.TABLE:{qxe(e,r);break}case B.TBODY:case B.TFOOT:case B.THEAD:{Hxe(e,r);break}case B.INPUT:{Uxe(e,r);break}case B.CAPTION:{Lxe(e,r);break}case B.COLGROUP:{Bxe(e,r);break}default:M1(e,r)}}function $1(e,r){switch(r.tagID){case B.TABLE:{e.openElements.hasInTableScope(B.TABLE)&&(e.openElements.popUntilTagNamePopped(B.TABLE),e._resetInsertionMode());break}case B.TEMPLATE:{qd(e,r);break}case B.BODY:case B.CAPTION:case B.COL:case B.COLGROUP:case B.HTML:case B.TBODY:case B.TD:case B.TFOOT:case B.TH:case B.THEAD:case B.TR:break;default:M1(e,r)}}function M1(e,r){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,px(e,r),e.fosterParentingEnabled=n}function Aj(e,r){e.pendingCharacterTokens.push(r)}function Rj(e,r){e.pendingCharacterTokens.push(r),e.hasNonWhitespacePendingCharacterToken=!0}function P1(e,r){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===B.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===B.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===B.OPTGROUP&&e.openElements.pop();break}case B.OPTION:{e.openElements.currentTagId===B.OPTION&&e.openElements.pop();break}case B.SELECT:{e.openElements.hasInSelectScope(B.SELECT)&&(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode());break}case B.TEMPLATE:{qd(e,r);break}}}function Qxe(e,r){const n=r.tagID;n===B.CAPTION||n===B.TABLE||n===B.TBODY||n===B.TFOOT||n===B.THEAD||n===B.TR||n===B.TD||n===B.TH?(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode(),e._processStartTag(r)):$j(e,r)}function Jxe(e,r){const n=r.tagID;n===B.CAPTION||n===B.TABLE||n===B.TBODY||n===B.TFOOT||n===B.THEAD||n===B.TR||n===B.TD||n===B.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode(),e.onEndTag(r)):Mj(e,r)}function e3e(e,r){switch(r.tagID){case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:case B.NOFRAMES:case B.SCRIPT:case B.STYLE:case B.TEMPLATE:case B.TITLE:{es(e,r);break}case B.CAPTION:case B.COLGROUP:case B.TBODY:case B.TFOOT:case B.THEAD:{e.tmplInsertionModeStack[0]=de.IN_TABLE,e.insertionMode=de.IN_TABLE,ff(e,r);break}case B.COL:{e.tmplInsertionModeStack[0]=de.IN_COLUMN_GROUP,e.insertionMode=de.IN_COLUMN_GROUP,g8(e,r);break}case B.TR:{e.tmplInsertionModeStack[0]=de.IN_TABLE_BODY,e.insertionMode=de.IN_TABLE_BODY,mx(e,r);break}case B.TD:case B.TH:{e.tmplInsertionModeStack[0]=de.IN_ROW,e.insertionMode=de.IN_ROW,gx(e,r);break}default:e.tmplInsertionModeStack[0]=de.IN_BODY,e.insertionMode=de.IN_BODY,Mo(e,r)}}function t3e(e,r){r.tagID===B.TEMPLATE&&qd(e,r)}function Pj(e,r){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(B.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(r)):f8(e,r)}function r3e(e,r){r.tagID===B.HTML?Mo(e,r):yx(e,r)}function zj(e,r){var n;if(r.tagID===B.HTML){if(e.fragmentContext||(e.insertionMode=de.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===B.HTML){e._setEndLocation(e.openElements.items[0],r);const o=e.openElements.items[1];o&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(o))===null||n===void 0)&&n.endTag)&&e._setEndLocation(o,r)}}else yx(e,r)}function yx(e,r){e.insertionMode=de.IN_BODY,px(e,r)}function n3e(e,r){switch(r.tagID){case B.HTML:{Mo(e,r);break}case B.FRAMESET:{e._insertElement(r,je.HTML);break}case B.FRAME:{e._appendElement(r,je.HTML),r.ackSelfClosing=!0;break}case B.NOFRAMES:{es(e,r);break}}}function o3e(e,r){r.tagID===B.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==B.FRAMESET&&(e.insertionMode=de.AFTER_FRAMESET))}function a3e(e,r){switch(r.tagID){case B.HTML:{Mo(e,r);break}case B.NOFRAMES:{es(e,r);break}}}function i3e(e,r){r.tagID===B.HTML&&(e.insertionMode=de.AFTER_AFTER_FRAMESET)}function s3e(e,r){r.tagID===B.HTML?Mo(e,r):bx(e,r)}function bx(e,r){e.insertionMode=de.IN_BODY,px(e,r)}function l3e(e,r){switch(r.tagID){case B.HTML:{Mo(e,r);break}case B.NOFRAMES:{es(e,r);break}}}function c3e(e,r){r.chars=Xr,e._insertCharacters(r)}function u3e(e,r){e._insertCharacters(r),e.framesetOk=!1}function Ij(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==je.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function d3e(e,r){if(Cve(r))Ij(e),e._startTagOutsideForeignContent(r);else{const n=e._getAdjustedCurrentElement(),o=e.treeAdapter.getNamespaceURI(n);o===je.MATHML?mj(r):o===je.SVG&&(Tve(r),gj(r)),d8(r),r.selfClosing?e._appendElement(r,o):e._insertElement(r,o),r.ackSelfClosing=!0}}function p3e(e,r){if(r.tagID===B.P||r.tagID===B.BR){Ij(e),e._endTagOutsideForeignContent(r);return}for(let n=e.openElements.stackTop;n>0;n--){const o=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(o)===je.HTML){e._endTagOutsideForeignContent(r);break}const a=e.treeAdapter.getTagName(o);if(a.toLowerCase()===r.tagName){r.tagName=a,e.openElements.shortenToLength(n);break}}}ve.AREA,ve.BASE,ve.BASEFONT,ve.BGSOUND,ve.BR,ve.COL,ve.EMBED,ve.FRAME,ve.HR,ve.IMG,ve.INPUT,ve.KEYGEN,ve.LINK,ve.META,ve.PARAM,ve.SOURCE,ve.TRACK,ve.WBR;const vx=Oj("end"),rc=Oj("start");function Oj(e){return r;function r(n){const o=n&&n.position&&n.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function jj(e){const r=rc(e),n=vx(e);if(r&&n)return{start:r,end:n}}const xx=(function(e){if(e==null)return g3e;if(typeof e=="function")return wx(e);if(typeof e=="object")return Array.isArray(e)?h3e(e):f3e(e);if(typeof e=="string")return m3e(e);throw new Error("Expected function, string, or object as test")});function h3e(e){const r=[];let n=-1;for(;++n":""))+")"})}return f;function f(){let g=Lj,b,x,w;if((!r||i(c,u,d[d.length-1]||void 0))&&(g=x3e(n(c,d)),g[0]===b8))return g;if("children"in c&&c.children){const k=c;if(k.children&&g[0]!==v3e)for(x=(o?k.children.length:-1)+s,w=d.concat(k);x>-1&&x])/gi,k3e=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Fj={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Hj(e,r){const n=$3e(e),o=a8("type",{handlers:{root:_3e,element:E3e,text:S3e,comment:qj,doctype:C3e,raw:A3e},unknown:R3e}),a={parser:n?new vj(Fj):vj.getFragmentParser(void 0,Fj),handle(l){o(l,a)},stitches:!1,options:r||{}};o(e,a),mf(a,rc());const i=n?a.parser.document:a.parser.getFragment(),s=gbe(i,{file:a.options.file});return a.stitches&&v8(s,"comment",function(l,c,u){const d=l;if(d.value.stitch&&u&&c!==void 0){const h=u.children;return h[c]=d.value.stitch,c}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Vj(e,r){let n=-1;if(e)for(;++n4&&(r.parser.tokenizer.state=0);const n={type:Kt.CHARACTER,chars:e.value,location:z1(e)};mf(r,rc(e)),r.parser.currentToken=n,r.parser._processToken(r.parser.currentToken)}function C3e(e,r){const n={type:Kt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:z1(e)};mf(r,rc(e)),r.parser.currentToken=n,r.parser._processToken(r.parser.currentToken)}function T3e(e,r){r.stitches=!0;const n=M3e(e);if("children"in e&&"children"in n){const o=Hj({type:"root",children:e.children},r.options);n.children=o.children}qj({type:"comment",value:{stitch:n}},r)}function qj(e,r){const n=e.value,o={type:Kt.COMMENT,data:n,location:z1(e)};mf(r,rc(e)),r.parser.currentToken=o,r.parser._processToken(r.parser.currentToken)}function A3e(e,r){if(r.parser.tokenizer.preprocessor.html="",r.parser.tokenizer.preprocessor.pos=-1,r.parser.tokenizer.preprocessor.lastGapPos=-2,r.parser.tokenizer.preprocessor.gapStack=[],r.parser.tokenizer.preprocessor.skipNextNewLine=!1,r.parser.tokenizer.preprocessor.lastChunkWritten=!1,r.parser.tokenizer.preprocessor.endOfChunkHit=!1,r.parser.tokenizer.preprocessor.isEol=!1,Uj(r,rc(e)),r.parser.tokenizer.write(r.options.tagfilter?e.value.replace(w3e,"<$1$2"):e.value,!1),r.parser.tokenizer._runParsingLoop(),r.parser.tokenizer.state===72||r.parser.tokenizer.state===78){r.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=r.parser.tokenizer._consume();r.parser.tokenizer._callState(n)}}function R3e(e,r){const n=e;if(r.options.passThrough&&r.options.passThrough.includes(n.type))T3e(n,r);else{let o="";throw k3e.has(n.type)&&(o=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+o)}}function mf(e,r){Uj(e,r);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=kn.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Uj(e,r){if(r&&r.offset!==void 0){const n={startLine:r.line,startCol:r.column,startOffset:r.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-r.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=r.offset,e.parser.tokenizer.preprocessor.line=r.line,e.parser.tokenizer.currentLocation=n}}function N3e(e,r){const n=e.tagName.toLowerCase();if(r.parser.tokenizer.state===kn.PLAINTEXT)return;mf(r,rc(e));const o=r.parser.openElements.current;let a="namespaceURI"in o?o.namespaceURI:Fd.html;a===Fd.html&&n==="svg"&&(a=Fd.svg);const i=Dbe({...e,children:[]},{space:a===Fd.svg?"svg":"html"}),s={type:Kt.START_TAG,tagName:n,tagID:hf(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:z1(e)};r.parser.currentToken=s,r.parser._processToken(r.parser.currentToken),r.parser.tokenizer.lastStartTagName=n}function D3e(e,r){const n=e.tagName.toLowerCase();if(!r.parser.tokenizer.inForeignNode&&GO.includes(n)||r.parser.tokenizer.state===kn.PLAINTEXT)return;mf(r,vx(e));const o={type:Kt.END_TAG,tagName:n,tagID:hf(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:z1(e)};r.parser.currentToken=o,r.parser._processToken(r.parser.currentToken),n===r.parser.tokenizer.lastStartTagName&&(r.parser.tokenizer.state===kn.RCDATA||r.parser.tokenizer.state===kn.RAWTEXT||r.parser.tokenizer.state===kn.SCRIPT_DATA)&&(r.parser.tokenizer.state=kn.DATA)}function $3e(e){const r=e.type==="root"?e.children[0]:e;return!!(r&&(r.type==="doctype"||r.type==="element"&&r.tagName.toLowerCase()==="html"))}function z1(e){const r=rc(e)||{line:void 0,column:void 0,offset:void 0},n=vx(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:r.line,startCol:r.column,startOffset:r.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function M3e(e){return"children"in e?Ld({...e,children:[]}):Ld(e)}function P3e(e){return function(r,n){return Hj(r,{...e,file:n})}}const Ud=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Wj={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ud,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ud],h2:[["className","sr-only"]],img:[...Ud,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ud,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ud],table:[...Ud],ul:[...Ud,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},fu={}.hasOwnProperty;function z3e(e,r){let n={type:"root",children:[]};const o={schema:r?{...Wj,...r}:Wj,stack:[]},a=Yj(o,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function Yj(e,r){if(r&&typeof r=="object"){const n=r;switch(typeof n.type=="string"?n.type:""){case"comment":return I3e(e,n);case"doctype":return O3e(e,n);case"element":return j3e(e,n);case"root":return L3e(e,n);case"text":return B3e(e,n)}}}function I3e(e,r){if(e.schema.allowComments){const n=typeof r.value=="string"?r.value:"",o=n.indexOf("-->"),i={type:"comment",value:o<0?n:n.slice(0,o)};return I1(i,r),i}}function O3e(e,r){if(e.schema.allowDoctypes){const n={type:"doctype"};return I1(n,r),n}}function j3e(e,r){const n=typeof r.tagName=="string"?r.tagName:"";e.stack.push(n);const o=Gj(e,r.children),a=F3e(e,r.properties);e.stack.pop();let i=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&fu.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let c=-1;for(i=!1;++c1){let a=!1,i=0;for(;++i-1&&i>c||s>-1&&i>s||l>-1&&i>l)return!0;let u=-1;for(;++u4&&r.slice(0,4).toLowerCase()==="data")return n}function q3e(e){return function(r){return z3e(r,e)}}const U3e=/["&'<>`]/g,W3e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Y3e=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,G3e=/[|\\{}()[\]^$+*?.]/g,Qj=new WeakMap;function X3e(e,r){if(e=e.replace(r.subset?K3e(r.subset):U3e,o),r.subset||r.escapeOnly)return e;return e.replace(W3e,n).replace(Y3e,o);function n(a,i,s){return r.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),r)}function o(a,i,s){return r.format(a.charCodeAt(0),s.charCodeAt(i+1),r)}}function K3e(e){let r=Qj.get(e);return r||(r=Z3e(e),Qj.set(e,r)),r}function Z3e(e){const r=[];let n=-1;for(;++n",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},n2e=["cent","copy","divide","gt","lt","not","para","times"],Jj={}.hasOwnProperty,w8={};let kx;for(kx in x8)Jj.call(x8,kx)&&(w8[x8[kx]]=kx);const o2e=/[^\dA-Za-z]/;function a2e(e,r,n,o){const a=String.fromCharCode(e);if(Jj.call(w8,a)){const i=w8[a],s="&"+i;return n&&r2e.includes(i)&&!n2e.includes(i)&&(!o||r&&r!==61&&o2e.test(String.fromCharCode(r)))?s:s+";"}return""}function i2e(e,r,n){let o=J3e(e,r,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=a2e(e,r,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const i=t2e(e,r,n.omitOptionalSemicolons);i.length|^->||--!>|"],c2e=["<",">"];function u2e(e,r,n,o){return o.settings.bogusComments?""+gf(e.value,Object.assign({},o.settings.characterReferences,{subset:l2e}))+">":"";function a(i){return gf(i,Object.assign({},o.settings.characterReferences,{subset:c2e}))}}function d2e(e,r,n,o){return""}function _x(e,r){const n=String(e);if(typeof r!="string")throw new TypeError("Expected character");let o=0,a=n.indexOf(r);for(;a!==-1;)o++,a=n.indexOf(r,a+r.length);return o}const p2e=/[ \t\n\f\r]/g;function k8(e){return typeof e=="object"?e.type==="text"?eL(e.value):!1:eL(e)}function eL(e){return e.replace(p2e,"")===""}const Gn=rL(1),tL=rL(-1),h2e=[];function rL(e){return r;function r(n,o,a){const i=n?n.children:h2e;let s=(o||0)+e,l=i[s];if(!a)for(;l&&k8(l);)s+=e,l=i[s];return l}}const f2e={}.hasOwnProperty;function nL(e){return r;function r(n,o,a){return f2e.call(e,n.tagName)&&e[n.tagName](n,o,a)}}const _8=nL({body:g2e,caption:E8,colgroup:E8,dd:x2e,dt:v2e,head:E8,html:m2e,li:b2e,optgroup:w2e,option:k2e,p:y2e,rp:oL,rt:oL,tbody:E2e,td:aL,tfoot:S2e,th:aL,thead:_2e,tr:C2e});function E8(e,r,n){const o=Gn(n,r,!0);return!o||o.type!=="comment"&&!(o.type==="text"&&k8(o.value.charAt(0)))}function m2e(e,r,n){const o=Gn(n,r);return!o||o.type!=="comment"}function g2e(e,r,n){const o=Gn(n,r);return!o||o.type!=="comment"}function y2e(e,r,n){const o=Gn(n,r);return o?o.type==="element"&&(o.tagName==="address"||o.tagName==="article"||o.tagName==="aside"||o.tagName==="blockquote"||o.tagName==="details"||o.tagName==="div"||o.tagName==="dl"||o.tagName==="fieldset"||o.tagName==="figcaption"||o.tagName==="figure"||o.tagName==="footer"||o.tagName==="form"||o.tagName==="h1"||o.tagName==="h2"||o.tagName==="h3"||o.tagName==="h4"||o.tagName==="h5"||o.tagName==="h6"||o.tagName==="header"||o.tagName==="hgroup"||o.tagName==="hr"||o.tagName==="main"||o.tagName==="menu"||o.tagName==="nav"||o.tagName==="ol"||o.tagName==="p"||o.tagName==="pre"||o.tagName==="section"||o.tagName==="table"||o.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function b2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&o.tagName==="li"}function v2e(e,r,n){const o=Gn(n,r);return!!(o&&o.type==="element"&&(o.tagName==="dt"||o.tagName==="dd"))}function x2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&(o.tagName==="dt"||o.tagName==="dd")}function oL(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&(o.tagName==="rp"||o.tagName==="rt")}function w2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&o.tagName==="optgroup"}function k2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&(o.tagName==="option"||o.tagName==="optgroup")}function _2e(e,r,n){const o=Gn(n,r);return!!(o&&o.type==="element"&&(o.tagName==="tbody"||o.tagName==="tfoot"))}function E2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&(o.tagName==="tbody"||o.tagName==="tfoot")}function S2e(e,r,n){return!Gn(n,r)}function C2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&o.tagName==="tr"}function aL(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&(o.tagName==="td"||o.tagName==="th")}const T2e=nL({body:N2e,colgroup:D2e,head:R2e,html:A2e,tbody:$2e});function A2e(e){const r=Gn(e,-1);return!r||r.type!=="comment"}function R2e(e){const r=new Set;for(const o of e.children)if(o.type==="element"&&(o.tagName==="base"||o.tagName==="title")){if(r.has(o.tagName))return!1;r.add(o.tagName)}const n=e.children[0];return!n||n.type==="element"}function N2e(e){const r=Gn(e,-1,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&k8(r.value.charAt(0)))&&!(r.type==="element"&&(r.tagName==="meta"||r.tagName==="link"||r.tagName==="script"||r.tagName==="style"||r.tagName==="template"))}function D2e(e,r,n){const o=tL(n,r),a=Gn(e,-1,!0);return n&&o&&o.type==="element"&&o.tagName==="colgroup"&&_8(o,n.children.indexOf(o),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function $2e(e,r,n){const o=tL(n,r),a=Gn(e,-1);return n&&o&&o.type==="element"&&(o.tagName==="thead"||o.tagName==="tbody")&&_8(o,n.children.indexOf(o),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const Ex={name:[[`
+function S1e(e,r){for(var n=0;no[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Vz(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var u6={exports:{}},p1={};var qz;function C1e(){if(qz)return p1;qz=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(o,a,i){var s=null;if(i!==void 0&&(s=""+i),a.key!==void 0&&(s=""+a.key),"key"in a){i={};for(var l in a)l!=="key"&&(i[l]=a[l])}else i=a;return a=i.ref,{$$typeof:e,type:o,key:s,ref:a!==void 0?a:null,props:i}}return p1.Fragment=r,p1.jsx=n,p1.jsxs=n,p1}var Uz;function T1e(){return Uz||(Uz=1,u6.exports=C1e()),u6.exports}var y=T1e(),p6={exports:{}},Ot={};var Wz;function A1e(){if(Wz)return Ot;Wz=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),f=Symbol.iterator;function g(G){return G===null||typeof G!="object"?null:(G=f&&G[f]||G["@@iterator"],typeof G=="function"?G:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,w={};function k(G,K,j){this.props=G,this.context=K,this.refs=w,this.updater=j||b}k.prototype.isReactComponent={},k.prototype.setState=function(G,K){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,K,"setState")},k.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function C(){}C.prototype=k.prototype;function _(G,K,j){this.props=G,this.context=K,this.refs=w,this.updater=j||b}var T=_.prototype=new C;T.constructor=_,x(T,k.prototype),T.isPureReactComponent=!0;var A=Array.isArray;function R(){}var D={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function P(G,K,j){var Y=j.ref;return{$$typeof:e,type:G,key:K,ref:Y!==void 0?Y:null,props:j}}function O(G,K){return P(G.type,K,G.props)}function F(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function L(G){var K={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(j){return K[j]})}var U=/\/+/g;function M(G,K){return typeof G=="object"&&G!==null&&G.key!=null?L(""+G.key):K.toString(36)}function V(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(R,R):(G.status="pending",G.then(function(K){G.status==="pending"&&(G.status="fulfilled",G.value=K)},function(K){G.status==="pending"&&(G.status="rejected",G.reason=K)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function I(G,K,j,Y,Q){var J=typeof G;(J==="undefined"||J==="boolean")&&(G=null);var ie=!1;if(G===null)ie=!0;else switch(J){case"bigint":case"string":case"number":ie=!0;break;case"object":switch(G.$$typeof){case e:case r:ie=!0;break;case u:return ie=G._init,I(ie(G._payload),K,j,Y,Q)}}if(ie)return Q=Q(G),ie=Y===""?"."+M(G,0):Y,A(Q)?(j="",ie!=null&&(j=ie.replace(U,"$&/")+"/"),I(Q,K,j,"",function(ge){return ge})):Q!=null&&(F(Q)&&(Q=O(Q,j+(Q.key==null||G&&G.key===Q.key?"":(""+Q.key).replace(U,"$&/")+"/")+ie)),K.push(Q)),1;ie=0;var ne=Y===""?".":Y+":";if(A(G))for(var re=0;re"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),f6.exports=R1e(),f6.exports}var Ki=Kz();const Zz=Vz(Ki);function N1e(e,r,n){let o=a=>e(a,...r);return n===void 0?o:Object.assign(o,{lazy:n,lazyArgs:r})}function Do(e,r,n){let o=e.length-r.length;if(o===0)return e(...r);if(o===1)return N1e(e,r,n);throw Error("Wrong number of arguments")}function Kl(...e){return Do(D1e,e)}const D1e=(e,r)=>e.length>=r;function bt(e,r){if(typeof e>"u"||e==null){const n=typeof r=="function"?r():r;throw new Error(n??`Expected defined value, but received ${e}`)}return e}function at(e,r){if(!e)throw new Error(r??"Invariant failed")}function Zi(e){throw new Error(`NonExhaustive value: ${e}`)}function yr(e,r,n){const o=typeof r=="symbol"?r:Symbol.for(r);return e.hasOwnProperty(o)||Object.defineProperty(e,o,{enumerable:!1,writable:!1,value:n()}),e[o]}function $1e(...e){return Do(P1e,e)}function P1e(e,r){let n={};for(let[o,a]of e.entries())n[a]=r(a,o,e);return n}function Vv(...e){return Do(h1,e)}function h1(e,r){if(e===r||Object.is(e,r))return!0;if(typeof e!="object"||typeof r!="object"||e===null||r===null||Object.getPrototypeOf(e)!==Object.getPrototypeOf(r))return!1;if(Array.isArray(e))return M1e(e,r);if(e instanceof Map)return z1e(e,r);if(e instanceof Set)return I1e(e,r);if(e instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp)return e.toString()===r.toString();if(Object.keys(e).length!==Object.keys(r).length)return!1;for(let[n,o]of Object.entries(e))if(!(n in r)||!h1(o,r[n]))return!1;return!0}function M1e(e,r){if(e.length!==r.length)return!1;for(let[n,o]of e.entries())if(!h1(o,r[n]))return!1;return!0}function z1e(e,r){if(e.size!==r.size)return!1;for(let[n,o]of e.entries())if(!r.has(n)||!h1(o,r.get(n)))return!1;return!0}function I1e(e,r){if(e.size!==r.size)return!1;let n=[...r];for(let o of e){let a=!1;for(let[i,s]of n.entries())if(h1(o,s)){a=!0,n.splice(i,1);break}if(!a)return!1}return!0}const{min:O1e,max:j1e}=Math,Ou=(e,r=0,n=1)=>O1e(j1e(r,e),n),m6=e=>{e._clipped=!1,e._unclipped=e.slice(0);for(let r=0;r<=3;r++)r<3?((e[r]<0||e[r]>255)&&(e._clipped=!0),e[r]=Ou(e[r],0,255)):r===3&&(e[r]=Ou(e[r],0,1));return e},Qz={};for(let e of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])Qz[`[object ${e}]`]=e.toLowerCase();function Xt(e){return Qz[Object.prototype.toString.call(e)]||"object"}const Ft=(e,r=null)=>e.length>=3?Array.prototype.slice.call(e):Xt(e[0])=="object"&&r?r.split("").filter(n=>e[0][n]!==void 0).map(n=>e[0][n]):e[0].slice(0),Kh=e=>{if(e.length<2)return null;const r=e.length-1;return Xt(e[r])=="string"?e[r].toLowerCase():null},{PI:qv,min:Jz,max:eI}=Math,si=e=>Math.round(e*100)/100,g6=e=>Math.round(e*100)/100,Zl=qv*2,y6=qv/3,L1e=qv/180,B1e=180/qv;function tI(e){return[...e.slice(0,3).reverse(),...e.slice(3)]}const jt={format:{},autodetect:[]};let Ve=class{constructor(...r){const n=this;if(Xt(r[0])==="object"&&r[0].constructor&&r[0].constructor===this.constructor)return r[0];let o=Kh(r),a=!1;if(!o){a=!0,jt.sorted||(jt.autodetect=jt.autodetect.sort((i,s)=>s.p-i.p),jt.sorted=!0);for(let i of jt.autodetect)if(o=i.test(...r),o)break}if(jt.format[o]){const i=jt.format[o].apply(null,a?r:r.slice(0,-1));n._rgb=m6(i)}else throw new Error("unknown format: "+r);n._rgb.length===3&&n._rgb.push(1)}toString(){return Xt(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}};const F1e="3.1.2",Lt=(...e)=>new Ve(...e);Lt.version=F1e;const Zh={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",cyan:"#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",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",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",maroon2:"#7f0000",maroon3:"#b03060",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",purple2:"#7f007f",purple3:"#a020f0",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",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},H1e=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,V1e=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,rI=e=>{if(e.match(H1e)){(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const r=parseInt(e,16),n=r>>16,o=r>>8&255,a=r&255;return[n,o,a,1]}if(e.match(V1e)){(e.length===5||e.length===9)&&(e=e.substr(1)),e.length===4&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const r=parseInt(e,16),n=r>>24&255,o=r>>16&255,a=r>>8&255,i=Math.round((r&255)/255*100)/100;return[n,o,a,i]}throw new Error(`unknown hex color: ${e}`)},{round:Uv}=Math,nI=(...e)=>{let[r,n,o,a]=Ft(e,"rgba"),i=Kh(e)||"auto";a===void 0&&(a=1),i==="auto"&&(i=a<1?"rgba":"rgb"),r=Uv(r),n=Uv(n),o=Uv(o);let l="000000"+(r<<16|n<<8|o).toString(16);l=l.substr(l.length-6);let c="0"+Uv(a*255).toString(16);switch(c=c.substr(c.length-2),i.toLowerCase()){case"rgba":return`#${l}${c}`;case"argb":return`#${c}${l}`;default:return`#${l}`}};Ve.prototype.name=function(){const e=nI(this._rgb,"rgb");for(let r of Object.keys(Zh))if(Zh[r]===e)return r.toLowerCase();return e},jt.format.named=e=>{if(e=e.toLowerCase(),Zh[e])return rI(Zh[e]);throw new Error("unknown color name: "+e)},jt.autodetect.push({p:5,test:(e,...r)=>{if(!r.length&&Xt(e)==="string"&&Zh[e.toLowerCase()])return"named"}}),Ve.prototype.alpha=function(e,r=!1){return e!==void 0&&Xt(e)==="number"?r?(this._rgb[3]=e,this):new Ve([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},Ve.prototype.clipped=function(){return this._rgb._clipped||!1};const rl={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,kE:216/24389,kKE:8,kK:24389/27,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},q1e=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Ql(e){const r=q1e.get(String(e).toLowerCase());if(!r)throw new Error("unknown Lab illuminant "+e);rl.labWhitePoint=e,rl.Xn=r[0],rl.Zn=r[1]}function f1(){return rl.labWhitePoint}const b6=(...e)=>{e=Ft(e,"lab");const[r,n,o]=e,[a,i,s]=U1e(r,n,o),[l,c,d]=oI(a,i,s);return[l,c,d,e.length>3?e[3]:1]},U1e=(e,r,n)=>{const{kE:o,kK:a,kKE:i,Xn:s,Yn:l,Zn:c}=rl,d=(e+16)/116,u=.002*r+d,h=d-.005*n,f=u*u*u,g=h*h*h,b=f>o?f:(116*u-16)/a,x=e>i?Math.pow((e+16)/116,3):e/a,w=g>o?g:(116*h-16)/a,k=b*s,C=x*l,_=w*c;return[k,C,_]},v6=e=>{const r=Math.sign(e);return e=Math.abs(e),(e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055)*r},oI=(e,r,n)=>{const{MtxAdaptMa:o,MtxAdaptMaI:a,MtxXYZ2RGB:i,RefWhiteRGB:s,Xn:l,Yn:c,Zn:d}=rl,u=l*o.m00+c*o.m10+d*o.m20,h=l*o.m01+c*o.m11+d*o.m21,f=l*o.m02+c*o.m12+d*o.m22,g=s.X*o.m00+s.Y*o.m10+s.Z*o.m20,b=s.X*o.m01+s.Y*o.m11+s.Z*o.m21,x=s.X*o.m02+s.Y*o.m12+s.Z*o.m22,w=(e*o.m00+r*o.m10+n*o.m20)*(g/u),k=(e*o.m01+r*o.m11+n*o.m21)*(b/h),C=(e*o.m02+r*o.m12+n*o.m22)*(x/f),_=w*a.m00+k*a.m10+C*a.m20,T=w*a.m01+k*a.m11+C*a.m21,A=w*a.m02+k*a.m12+C*a.m22,R=v6(_*i.m00+T*i.m10+A*i.m20),D=v6(_*i.m01+T*i.m11+A*i.m21),N=v6(_*i.m02+T*i.m12+A*i.m22);return[R*255,D*255,N*255]},x6=(...e)=>{const[r,n,o,...a]=Ft(e,"rgb"),[i,s,l]=aI(r,n,o),[c,d,u]=W1e(i,s,l);return[c,d,u,...a.length>0&&a[0]<1?[a[0]]:[]]};function W1e(e,r,n){const{Xn:o,Yn:a,Zn:i,kE:s,kK:l}=rl,c=e/o,d=r/a,u=n/i,h=c>s?Math.pow(c,1/3):(l*c+16)/116,f=d>s?Math.pow(d,1/3):(l*d+16)/116,g=u>s?Math.pow(u,1/3):(l*u+16)/116;return[116*f-16,500*(h-f),200*(f-g)]}function w6(e){const r=Math.sign(e);return e=Math.abs(e),(e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4))*r}const aI=(e,r,n)=>{e=w6(e/255),r=w6(r/255),n=w6(n/255);const{MtxRGB2XYZ:o,MtxAdaptMa:a,MtxAdaptMaI:i,Xn:s,Yn:l,Zn:c,As:d,Bs:u,Cs:h}=rl;let f=e*o.m00+r*o.m10+n*o.m20,g=e*o.m01+r*o.m11+n*o.m21,b=e*o.m02+r*o.m12+n*o.m22;const x=s*a.m00+l*a.m10+c*a.m20,w=s*a.m01+l*a.m11+c*a.m21,k=s*a.m02+l*a.m12+c*a.m22;let C=f*a.m00+g*a.m10+b*a.m20,_=f*a.m01+g*a.m11+b*a.m21,T=f*a.m02+g*a.m12+b*a.m22;return C*=x/d,_*=w/u,T*=k/h,f=C*i.m00+_*i.m10+T*i.m20,g=C*i.m01+_*i.m11+T*i.m21,b=C*i.m02+_*i.m12+T*i.m22,[f,g,b]};Ve.prototype.lab=function(){return x6(this._rgb)},Object.assign(Lt,{lab:(...e)=>new Ve(...e,"lab"),getLabWhitePoint:f1,setLabWhitePoint:Ql}),jt.format.lab=b6,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"lab"),Xt(e)==="array"&&e.length===3)return"lab"}}),Ve.prototype.darken=function(e=1){const r=this,n=r.lab();return n[0]-=rl.Kn*e,new Ve(n,"lab").alpha(r.alpha(),!0)},Ve.prototype.brighten=function(e=1){return this.darken(-e)},Ve.prototype.darker=Ve.prototype.darken,Ve.prototype.brighter=Ve.prototype.brighten,Ve.prototype.get=function(e){const[r,n]=e.split("."),o=this[r]();if(n){const a=r.indexOf(n)-(r.substr(0,2)==="ok"?2:0);if(a>-1)return o[a];throw new Error(`unknown channel ${n} in mode ${r}`)}else return o};const{pow:Y1e}=Math,G1e=1e-7,X1e=20;Ve.prototype.luminance=function(e,r="rgb"){if(e!==void 0&&Xt(e)==="number"){if(e===0)return new Ve([0,0,0,this._rgb[3]],"rgb");if(e===1)return new Ve([255,255,255,this._rgb[3]],"rgb");let n=this.luminance(),o=X1e;const a=(s,l)=>{const c=s.interpolate(l,.5,r),d=c.luminance();return Math.abs(e-d)e?a(s,c):a(c,l)},i=(n>e?a(new Ve([0,0,0]),this):a(this,new Ve([255,255,255]))).rgb();return new Ve([...i,this._rgb[3]])}return K1e(...this._rgb.slice(0,3))};const K1e=(e,r,n)=>(e=k6(e),r=k6(r),n=k6(n),.2126*e+.7152*r+.0722*n),k6=e=>(e/=255,e<=.03928?e/12.92:Y1e((e+.055)/1.055,2.4)),$o={},Qh=(e,r,n=.5,...o)=>{let a=o[0]||"lrgb";if(!$o[a]&&!o.length&&(a=Object.keys($o)[0]),!$o[a])throw new Error(`interpolation mode ${a} is not defined`);return Xt(e)!=="object"&&(e=new Ve(e)),Xt(r)!=="object"&&(r=new Ve(r)),$o[a](e,r,n).alpha(e.alpha()+n*(r.alpha()-e.alpha()))};Ve.prototype.mix=Ve.prototype.interpolate=function(e,r=.5,...n){return Qh(this,e,r,...n)},Ve.prototype.premultiply=function(e=!1){const r=this._rgb,n=r[3];return e?(this._rgb=[r[0]*n,r[1]*n,r[2]*n,n],this):new Ve([r[0]*n,r[1]*n,r[2]*n,n],"rgb")};const{sin:Z1e,cos:Q1e}=Math,iI=(...e)=>{let[r,n,o]=Ft(e,"lch");return isNaN(o)&&(o=0),o=o*L1e,[r,Q1e(o)*n,Z1e(o)*n]},_6=(...e)=>{e=Ft(e,"lch");const[r,n,o]=e,[a,i,s]=iI(r,n,o),[l,c,d]=b6(a,i,s);return[l,c,d,e.length>3?e[3]:1]},J1e=(...e)=>{const r=tI(Ft(e,"hcl"));return _6(...r)},{sqrt:e0e,atan2:t0e,round:r0e}=Math,sI=(...e)=>{const[r,n,o]=Ft(e,"lab"),a=e0e(n*n+o*o);let i=(t0e(o,n)*B1e+360)%360;return r0e(a*1e4)===0&&(i=Number.NaN),[r,a,i]},E6=(...e)=>{const[r,n,o,...a]=Ft(e,"rgb"),[i,s,l]=x6(r,n,o),[c,d,u]=sI(i,s,l);return[c,d,u,...a.length>0&&a[0]<1?[a[0]]:[]]};Ve.prototype.lch=function(){return E6(this._rgb)},Ve.prototype.hcl=function(){return tI(E6(this._rgb))},Object.assign(Lt,{lch:(...e)=>new Ve(...e,"lch"),hcl:(...e)=>new Ve(...e,"hcl")}),jt.format.lch=_6,jt.format.hcl=J1e,["lch","hcl"].forEach(e=>jt.autodetect.push({p:2,test:(...r)=>{if(r=Ft(r,e),Xt(r)==="array"&&r.length===3)return e}})),Ve.prototype.saturate=function(e=1){const r=this,n=r.lch();return n[1]+=rl.Kn*e,n[1]<0&&(n[1]=0),new Ve(n,"lch").alpha(r.alpha(),!0)},Ve.prototype.desaturate=function(e=1){return this.saturate(-e)},Ve.prototype.set=function(e,r,n=!1){const[o,a]=e.split("."),i=this[o]();if(a){const s=o.indexOf(a)-(o.substr(0,2)==="ok"?2:0);if(s>-1){if(Xt(r)=="string")switch(r.charAt(0)){case"+":i[s]+=+r;break;case"-":i[s]+=+r;break;case"*":i[s]*=+r.substr(1);break;case"/":i[s]/=+r.substr(1);break;default:i[s]=+r}else if(Xt(r)==="number")i[s]=r;else throw new Error("unsupported value for Color.set");const l=new Ve(i,o);return n?(this._rgb=l._rgb,this):l}throw new Error(`unknown channel ${a} in mode ${o}`)}else return i},Ve.prototype.tint=function(e=.5,...r){return Qh(this,"white",e,...r)},Ve.prototype.shade=function(e=.5,...r){return Qh(this,"black",e,...r)};const n0e=(e,r,n)=>{const o=e._rgb,a=r._rgb;return new Ve(o[0]+n*(a[0]-o[0]),o[1]+n*(a[1]-o[1]),o[2]+n*(a[2]-o[2]),"rgb")};$o.rgb=n0e;const{sqrt:S6,pow:Jh}=Math,o0e=(e,r,n)=>{const[o,a,i]=e._rgb,[s,l,c]=r._rgb;return new Ve(S6(Jh(o,2)*(1-n)+Jh(s,2)*n),S6(Jh(a,2)*(1-n)+Jh(l,2)*n),S6(Jh(i,2)*(1-n)+Jh(c,2)*n),"rgb")};$o.lrgb=o0e;const a0e=(e,r,n)=>{const o=e.lab(),a=r.lab();return new Ve(o[0]+n*(a[0]-o[0]),o[1]+n*(a[1]-o[1]),o[2]+n*(a[2]-o[2]),"lab")};$o.lab=a0e;const ef=(e,r,n,o)=>{let a,i;o==="hsl"?(a=e.hsl(),i=r.hsl()):o==="hsv"?(a=e.hsv(),i=r.hsv()):o==="hcg"?(a=e.hcg(),i=r.hcg()):o==="hsi"?(a=e.hsi(),i=r.hsi()):o==="lch"||o==="hcl"?(o="hcl",a=e.hcl(),i=r.hcl()):o==="oklch"&&(a=e.oklch().reverse(),i=r.oklch().reverse());let s,l,c,d,u,h;(o.substr(0,1)==="h"||o==="oklch")&&([s,c,u]=a,[l,d,h]=i);let f,g,b,x;return!isNaN(s)&&!isNaN(l)?(l>s&&l-s>180?x=l-(s+360):l180?x=l+360-s:x=l-s,g=s+n*x):isNaN(s)?isNaN(l)?g=Number.NaN:(g=l,(u==1||u==0)&&o!="hsv"&&(f=d)):(g=s,(h==1||h==0)&&o!="hsv"&&(f=c)),f===void 0&&(f=c+n*(d-c)),b=u+n*(h-u),o==="oklch"?new Ve([b,f,g],o):new Ve([g,f,b],o)},lI=(e,r,n)=>ef(e,r,n,"lch");$o.lch=lI,$o.hcl=lI;const i0e=e=>{if(Xt(e)=="number"&&e>=0&&e<=16777215){const r=e>>16,n=e>>8&255,o=e&255;return[r,n,o,1]}throw new Error("unknown num color: "+e)},s0e=(...e)=>{const[r,n,o]=Ft(e,"rgb");return(r<<16)+(n<<8)+o};Ve.prototype.num=function(){return s0e(this._rgb)},Object.assign(Lt,{num:(...e)=>new Ve(...e,"num")}),jt.format.num=i0e,jt.autodetect.push({p:5,test:(...e)=>{if(e.length===1&&Xt(e[0])==="number"&&e[0]>=0&&e[0]<=16777215)return"num"}});const l0e=(e,r,n)=>{const o=e.num(),a=r.num();return new Ve(o+n*(a-o),"num")};$o.num=l0e;const{floor:c0e}=Math,d0e=(...e)=>{e=Ft(e,"hcg");let[r,n,o]=e,a,i,s;o=o*255;const l=n*255;if(n===0)a=i=s=o;else{r===360&&(r=0),r>360&&(r-=360),r<0&&(r+=360),r/=60;const c=c0e(r),d=r-c,u=o*(1-n),h=u+l*(1-d),f=u+l*d,g=u+l;switch(c){case 0:[a,i,s]=[g,f,u];break;case 1:[a,i,s]=[h,g,u];break;case 2:[a,i,s]=[u,g,f];break;case 3:[a,i,s]=[u,h,g];break;case 4:[a,i,s]=[f,u,g];break;case 5:[a,i,s]=[g,u,h];break}}return[a,i,s,e.length>3?e[3]:1]},u0e=(...e)=>{const[r,n,o]=Ft(e,"rgb"),a=Jz(r,n,o),i=eI(r,n,o),s=i-a,l=s*100/255,c=a/(255-s)*100;let d;return s===0?d=Number.NaN:(r===i&&(d=(n-o)/s),n===i&&(d=2+(o-r)/s),o===i&&(d=4+(r-n)/s),d*=60,d<0&&(d+=360)),[d,l,c]};Ve.prototype.hcg=function(){return u0e(this._rgb)};const p0e=(...e)=>new Ve(...e,"hcg");Lt.hcg=p0e,jt.format.hcg=d0e,jt.autodetect.push({p:1,test:(...e)=>{if(e=Ft(e,"hcg"),Xt(e)==="array"&&e.length===3)return"hcg"}});const h0e=(e,r,n)=>ef(e,r,n,"hcg");$o.hcg=h0e;const{cos:tf}=Math,f0e=(...e)=>{e=Ft(e,"hsi");let[r,n,o]=e,a,i,s;return isNaN(r)&&(r=0),isNaN(n)&&(n=0),r>360&&(r-=360),r<0&&(r+=360),r/=360,r<1/3?(s=(1-n)/3,a=(1+n*tf(Zl*r)/tf(y6-Zl*r))/3,i=1-(s+a)):r<2/3?(r-=1/3,a=(1-n)/3,i=(1+n*tf(Zl*r)/tf(y6-Zl*r))/3,s=1-(a+i)):(r-=2/3,i=(1-n)/3,s=(1+n*tf(Zl*r)/tf(y6-Zl*r))/3,a=1-(i+s)),a=Ou(o*a*3),i=Ou(o*i*3),s=Ou(o*s*3),[a*255,i*255,s*255,e.length>3?e[3]:1]},{min:m0e,sqrt:g0e,acos:y0e}=Math,b0e=(...e)=>{let[r,n,o]=Ft(e,"rgb");r/=255,n/=255,o/=255;let a;const i=m0e(r,n,o),s=(r+n+o)/3,l=s>0?1-i/s:0;return l===0?a=NaN:(a=(r-n+(r-o))/2,a/=g0e((r-n)*(r-n)+(r-o)*(n-o)),a=y0e(a),o>n&&(a=Zl-a),a/=Zl),[a*360,l,s]};Ve.prototype.hsi=function(){return b0e(this._rgb)};const v0e=(...e)=>new Ve(...e,"hsi");Lt.hsi=v0e,jt.format.hsi=f0e,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"hsi"),Xt(e)==="array"&&e.length===3)return"hsi"}});const x0e=(e,r,n)=>ef(e,r,n,"hsi");$o.hsi=x0e;const C6=(...e)=>{e=Ft(e,"hsl");const[r,n,o]=e;let a,i,s;if(n===0)a=i=s=o*255;else{const l=[0,0,0],c=[0,0,0],d=o<.5?o*(1+n):o+n-o*n,u=2*o-d,h=r/360;l[0]=h+1/3,l[1]=h,l[2]=h-1/3;for(let f=0;f<3;f++)l[f]<0&&(l[f]+=1),l[f]>1&&(l[f]-=1),6*l[f]<1?c[f]=u+(d-u)*6*l[f]:2*l[f]<1?c[f]=d:3*l[f]<2?c[f]=u+(d-u)*(2/3-l[f])*6:c[f]=u;[a,i,s]=[c[0]*255,c[1]*255,c[2]*255]}return e.length>3?[a,i,s,e[3]]:[a,i,s,1]},cI=(...e)=>{e=Ft(e,"rgba");let[r,n,o]=e;r/=255,n/=255,o/=255;const a=Jz(r,n,o),i=eI(r,n,o),s=(i+a)/2;let l,c;return i===a?(l=0,c=Number.NaN):l=s<.5?(i-a)/(i+a):(i-a)/(2-i-a),r==i?c=(n-o)/(i-a):n==i?c=2+(o-r)/(i-a):o==i&&(c=4+(r-n)/(i-a)),c*=60,c<0&&(c+=360),e.length>3&&e[3]!==void 0?[c,l,s,e[3]]:[c,l,s]};Ve.prototype.hsl=function(){return cI(this._rgb)};const w0e=(...e)=>new Ve(...e,"hsl");Lt.hsl=w0e,jt.format.hsl=C6,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"hsl"),Xt(e)==="array"&&e.length===3)return"hsl"}});const k0e=(e,r,n)=>ef(e,r,n,"hsl");$o.hsl=k0e;const{floor:_0e}=Math,E0e=(...e)=>{e=Ft(e,"hsv");let[r,n,o]=e,a,i,s;if(o*=255,n===0)a=i=s=o;else{r===360&&(r=0),r>360&&(r-=360),r<0&&(r+=360),r/=60;const l=_0e(r),c=r-l,d=o*(1-n),u=o*(1-n*c),h=o*(1-n*(1-c));switch(l){case 0:[a,i,s]=[o,h,d];break;case 1:[a,i,s]=[u,o,d];break;case 2:[a,i,s]=[d,o,h];break;case 3:[a,i,s]=[d,u,o];break;case 4:[a,i,s]=[h,d,o];break;case 5:[a,i,s]=[o,d,u];break}}return[a,i,s,e.length>3?e[3]:1]},{min:S0e,max:C0e}=Math,T0e=(...e)=>{e=Ft(e,"rgb");let[r,n,o]=e;const a=S0e(r,n,o),i=C0e(r,n,o),s=i-a;let l,c,d;return d=i/255,i===0?(l=Number.NaN,c=0):(c=s/i,r===i&&(l=(n-o)/s),n===i&&(l=2+(o-r)/s),o===i&&(l=4+(r-n)/s),l*=60,l<0&&(l+=360)),[l,c,d]};Ve.prototype.hsv=function(){return T0e(this._rgb)};const A0e=(...e)=>new Ve(...e,"hsv");Lt.hsv=A0e,jt.format.hsv=E0e,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"hsv"),Xt(e)==="array"&&e.length===3)return"hsv"}});const R0e=(e,r,n)=>ef(e,r,n,"hsv");$o.hsv=R0e;function Wv(e,r){let n=e.length;Array.isArray(e[0])||(e=[e]),Array.isArray(r[0])||(r=r.map(s=>[s]));let o=r[0].length,a=r[0].map((s,l)=>r.map(c=>c[l])),i=e.map(s=>a.map(l=>Array.isArray(s)?s.reduce((c,d,u)=>c+d*(l[u]||0),0):l.reduce((c,d)=>c+d*s,0)));return n===1&&(i=i[0]),o===1?i.map(s=>s[0]):i}const T6=(...e)=>{e=Ft(e,"lab");const[r,n,o,...a]=e,[i,s,l]=N0e([r,n,o]),[c,d,u]=oI(i,s,l);return[c,d,u,...a.length>0&&a[0]<1?[a[0]]:[]]};function N0e(e){var r=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],n=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],o=Wv(n,e);return Wv(r,o.map(a=>a**3))}const A6=(...e)=>{const[r,n,o,...a]=Ft(e,"rgb"),i=aI(r,n,o);return[...D0e(i),...a.length>0&&a[0]<1?[a[0]]:[]]};function D0e(e){const r=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],n=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],o=Wv(r,e);return Wv(n,o.map(a=>Math.cbrt(a)))}Ve.prototype.oklab=function(){return A6(this._rgb)},Object.assign(Lt,{oklab:(...e)=>new Ve(...e,"oklab")}),jt.format.oklab=T6,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"oklab"),Xt(e)==="array"&&e.length===3)return"oklab"}});const $0e=(e,r,n)=>{const o=e.oklab(),a=r.oklab();return new Ve(o[0]+n*(a[0]-o[0]),o[1]+n*(a[1]-o[1]),o[2]+n*(a[2]-o[2]),"oklab")};$o.oklab=$0e;const P0e=(e,r,n)=>ef(e,r,n,"oklch");$o.oklch=P0e;const{pow:R6,sqrt:N6,PI:D6,cos:dI,sin:uI,atan2:M0e}=Math,z0e=(e,r="lrgb",n=null)=>{const o=e.length;n||(n=Array.from(new Array(o)).map(()=>1));const a=o/n.reduce(function(h,f){return h+f});if(n.forEach((h,f)=>{n[f]*=a}),e=e.map(h=>new Ve(h)),r==="lrgb")return I0e(e,n);const i=e.shift(),s=i.get(r),l=[];let c=0,d=0;for(let h=0;h{const g=h.get(r);u+=h.alpha()*n[f+1];for(let b=0;b=360;)f-=360;s[h]=f}else s[h]=s[h]/l[h];return u/=o,new Ve(s,r).alpha(u>.99999?1:u,!0)},I0e=(e,r)=>{const n=e.length,o=[0,0,0,0];for(let a=0;a.9999999&&(o[3]=1),new Ve(m6(o))},{pow:O0e}=Math;function Yv(e){let r="rgb",n=Lt("#ccc"),o=0,a=[0,1],i=[],s=[0,0],l=!1,c=[],d=!1,u=0,h=1,f=!1,g={},b=!0,x=1;const w=function(D){if(D=D||["#fff","#000"],D&&Xt(D)==="string"&&Lt.brewer&&Lt.brewer[D.toLowerCase()]&&(D=Lt.brewer[D.toLowerCase()]),Xt(D)==="array"){D.length===1&&(D=[D[0],D[0]]),D=D.slice(0);for(let N=0;N=l[P];)P++;return P-1}return 0};let C=D=>D,_=D=>D;const T=function(D,N){let P,O;if(N==null&&(N=!1),isNaN(D)||D===null)return n;N?O=D:l&&l.length>2?O=k(D)/(l.length-2):h!==u?O=(D-u)/(h-u):O=1,O=_(O),N||(O=C(O)),x!==1&&(O=O0e(O,x)),O=s[0]+O*(1-s[0]-s[1]),O=Ou(O,0,1);const F=Math.floor(O*1e4);if(b&&g[F])P=g[F];else{if(Xt(c)==="array")for(let L=0;L=U&&L===i.length-1){P=c[L];break}if(O>U&&Og={};w(e);const R=function(D){const N=Lt(T(D));return d&&N[d]?N[d]():N};return R.classes=function(D){if(D!=null){if(Xt(D)==="array")l=D,a=[D[0],D[D.length-1]];else{const N=Lt.analyze(a);D===0?l=[N.min,N.max]:l=Lt.limits(N,"e",D)}return R}return l},R.domain=function(D){if(!arguments.length)return a;u=D[0],h=D[D.length-1],i=[];const N=c.length;if(D.length===N&&u!==h)for(let P of Array.from(D))i.push((P-u)/(h-u));else{for(let P=0;P2){const P=D.map((F,L)=>L/(D.length-1)),O=D.map(F=>(F-u)/(h-u));O.every((F,L)=>P[L]===F)||(_=F=>{if(F<=0||F>=1)return F;let L=0;for(;F>=O[L+1];)L++;const U=(F-O[L])/(O[L+1]-O[L]);return P[L]+U*(P[L+1]-P[L])})}}return a=[u,h],R},R.mode=function(D){return arguments.length?(r=D,A(),R):r},R.range=function(D,N){return w(D),R},R.out=function(D){return d=D,R},R.spread=function(D){return arguments.length?(o=D,R):o},R.correctLightness=function(D){return D==null&&(D=!0),f=D,A(),f?C=function(N){const P=T(0,!0).lab()[0],O=T(1,!0).lab()[0],F=P>O;let L=T(N,!0).lab()[0];const U=P+(O-P)*N;let M=L-U,V=0,I=1,H=20;for(;Math.abs(M)>.01&&H-- >0;)(function(){return F&&(M*=-1),M<0?(V=N,N+=(I-N)*.5):(I=N,N+=(V-N)*.5),L=T(N,!0).lab()[0],M=L-U})();return N}:C=N=>N,R},R.padding=function(D){return D!=null?(Xt(D)==="number"&&(D=[D,D]),s=D,R):s},R.colors=function(D,N){arguments.length<2&&(N="hex");let P=[];if(arguments.length===0)P=c.slice(0);else if(D===1)P=[R(.5)];else if(D>1){const O=a[0],F=a[1]-O;P=j0e(0,D).map(L=>R(O+L/(D-1)*F))}else{e=[];let O=[];if(l&&l.length>2)for(let F=1,L=l.length,U=1<=L;U?FL;U?F++:F--)O.push((l[F-1]+l[F])*.5);else O=a;P=O.map(F=>R(F))}return Lt[N]&&(P=P.map(O=>O[N]())),P},R.cache=function(D){return D!=null?(b=D,R):b},R.gamma=function(D){return D!=null?(x=D,R):x},R.nodata=function(D){return D!=null?(n=Lt(D),R):n},R}function j0e(e,r,n){let o=[],a=ei;a?s++:s--)o.push(s);return o}const L0e=function(e){let r=[1,1];for(let n=1;nnew Ve(i)),e.length===2)[n,o]=e.map(i=>i.lab()),r=function(i){const s=[0,1,2].map(l=>n[l]+i*(o[l]-n[l]));return new Ve(s,"lab")};else if(e.length===3)[n,o,a]=e.map(i=>i.lab()),r=function(i){const s=[0,1,2].map(l=>(1-i)*(1-i)*n[l]+2*(1-i)*i*o[l]+i*i*a[l]);return new Ve(s,"lab")};else if(e.length===4){let i;[n,o,a,i]=e.map(s=>s.lab()),r=function(s){const l=[0,1,2].map(c=>(1-s)*(1-s)*(1-s)*n[c]+3*(1-s)*(1-s)*s*o[c]+3*(1-s)*s*s*a[c]+s*s*s*i[c]);return new Ve(l,"lab")}}else if(e.length>=5){let i,s,l;i=e.map(c=>c.lab()),l=e.length-1,s=L0e(l),r=function(c){const d=1-c,u=[0,1,2].map(h=>i.reduce((f,g,b)=>f+s[b]*d**(l-b)*c**b*g[h],0));return new Ve(u,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return r},F0e=e=>{const r=B0e(e);return r.scale=()=>Yv(r),r},{round:pI}=Math;Ve.prototype.rgb=function(e=!0){return e===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(pI)},Ve.prototype.rgba=function(e=!0){return this._rgb.slice(0,4).map((r,n)=>n<3?e===!1?r:pI(r):r)},Object.assign(Lt,{rgb:(...e)=>new Ve(...e,"rgb")}),jt.format.rgb=(...e)=>{const r=Ft(e,"rgba");return r[3]===void 0&&(r[3]=1),r},jt.autodetect.push({p:3,test:(...e)=>{if(e=Ft(e,"rgba"),Xt(e)==="array"&&(e.length===3||e.length===4&&Xt(e[3])=="number"&&e[3]>=0&&e[3]<=1))return"rgb"}});const Qi=(e,r,n)=>{if(!Qi[n])throw new Error("unknown blend mode "+n);return Qi[n](e,r)},sd=e=>(r,n)=>{const o=Lt(n).rgb(),a=Lt(r).rgb();return Lt.rgb(e(o,a))},ld=e=>(r,n)=>{const o=[];return o[0]=e(r[0],n[0]),o[1]=e(r[1],n[1]),o[2]=e(r[2],n[2]),o},H0e=e=>e,V0e=(e,r)=>e*r/255,q0e=(e,r)=>e>r?r:e,U0e=(e,r)=>e>r?e:r,W0e=(e,r)=>255*(1-(1-e/255)*(1-r/255)),Y0e=(e,r)=>r<128?2*e*r/255:255*(1-2*(1-e/255)*(1-r/255)),G0e=(e,r)=>255*(1-(1-r/255)/(e/255)),X0e=(e,r)=>e===255?255:(e=255*(r/255)/(1-e/255),e>255?255:e);Qi.normal=sd(ld(H0e)),Qi.multiply=sd(ld(V0e)),Qi.screen=sd(ld(W0e)),Qi.overlay=sd(ld(Y0e)),Qi.darken=sd(ld(q0e)),Qi.lighten=sd(ld(U0e)),Qi.dodge=sd(ld(X0e)),Qi.burn=sd(ld(G0e));const{pow:K0e,sin:Z0e,cos:Q0e}=Math;function J0e(e=300,r=-1.5,n=1,o=1,a=[0,1]){let i=0,s;Xt(a)==="array"?s=a[1]-a[0]:(s=0,a=[a,a]);const l=function(c){const d=Zl*((e+120)/360+r*c),u=K0e(a[0]+s*c,o),f=(i!==0?n[0]+c*i:n)*u*(1-u)/2,g=Q0e(d),b=Z0e(d),x=u+f*(-.14861*g+1.78277*b),w=u+f*(-.29227*g-.90649*b),k=u+f*(1.97294*g);return Lt(m6([x*255,w*255,k*255,1]))};return l.start=function(c){return c==null?e:(e=c,l)},l.rotations=function(c){return c==null?r:(r=c,l)},l.gamma=function(c){return c==null?o:(o=c,l)},l.hue=function(c){return c==null?n:(n=c,Xt(n)==="array"?(i=n[1]-n[0],i===0&&(n=n[1])):i=0,l)},l.lightness=function(c){return c==null?a:(Xt(c)==="array"?(a=c,s=c[1]-c[0]):(a=[c,c],s=0),l)},l.scale=()=>Lt.scale(l),l.hue(n),l}const eye="0123456789abcdef",{floor:tye,random:rye}=Math,nye=()=>{let e="#";for(let r=0;r<6;r++)e+=eye.charAt(tye(rye()*16));return new Ve(e,"hex")},{log:hI,pow:oye,floor:aye,abs:iye}=Math;function fI(e,r=null){const n={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Xt(e)==="object"&&(e=Object.values(e)),e.forEach(o=>{r&&Xt(o)==="object"&&(o=o[r]),o!=null&&!isNaN(o)&&(n.values.push(o),n.sum+=o,on.max&&(n.max=o),n.count+=1)}),n.domain=[n.min,n.max],n.limits=(o,a)=>mI(n,o,a),n}function mI(e,r="equal",n=7){Xt(e)=="array"&&(e=fI(e));const{min:o,max:a}=e,i=e.values.sort((l,c)=>l-c);if(n===1)return[o,a];const s=[];if(r.substr(0,1)==="c"&&(s.push(o),s.push(a)),r.substr(0,1)==="e"){s.push(o);for(let l=1;l 0");const l=Math.LOG10E*hI(o),c=Math.LOG10E*hI(a);s.push(o);for(let d=1;d200&&(h=!1)}const b={};for(let w=0;ww-k),s.push(x[0]);for(let w=1;w{e=new Ve(e),r=new Ve(r);const n=e.luminance(),o=r.luminance();return n>o?(n+.05)/(o+.05):(o+.05)/(n+.05)};const gI=.027,lye=5e-4,cye=.1,yI=1.14,Gv=.022,bI=1.414,dye=(e,r)=>{e=new Ve(e),r=new Ve(r),e.alpha()<1&&(e=Qh(r,e,e.alpha(),"rgb"));const n=vI(...e.rgb()),o=vI(...r.rgb()),a=n>=Gv?n:n+Math.pow(Gv-n,bI),i=o>=Gv?o:o+Math.pow(Gv-o,bI),s=Math.pow(i,.56)-Math.pow(a,.57),l=Math.pow(i,.65)-Math.pow(a,.62),c=Math.abs(i-a)0?c-gI:c+gI)*100};function vI(e,r,n){return .2126729*Math.pow(e/255,2.4)+.7151522*Math.pow(r/255,2.4)+.072175*Math.pow(n/255,2.4)}const{sqrt:Jl,pow:Nn,min:uye,max:pye,atan2:xI,abs:wI,cos:Xv,sin:kI,exp:hye,PI:_I}=Math;function fye(e,r,n=1,o=1,a=1){var i=function(j){return 360*j/(2*_I)},s=function(j){return 2*_I*j/360};e=new Ve(e),r=new Ve(r);const[l,c,d]=Array.from(e.lab()),[u,h,f]=Array.from(r.lab()),g=(l+u)/2,b=Jl(Nn(c,2)+Nn(d,2)),x=Jl(Nn(h,2)+Nn(f,2)),w=(b+x)/2,k=.5*(1-Jl(Nn(w,7)/(Nn(w,7)+Nn(25,7)))),C=c*(1+k),_=h*(1+k),T=Jl(Nn(C,2)+Nn(d,2)),A=Jl(Nn(_,2)+Nn(f,2)),R=(T+A)/2,D=i(xI(d,C)),N=i(xI(f,_)),P=D>=0?D:D+360,O=N>=0?N:N+360,F=wI(P-O)>180?(P+O+360)/2:(P+O)/2,L=1-.17*Xv(s(F-30))+.24*Xv(s(2*F))+.32*Xv(s(3*F+6))-.2*Xv(s(4*F-63));let U=O-P;U=wI(U)<=180?U:O<=P?U+360:U-360,U=2*Jl(T*A)*kI(s(U)/2);const M=u-l,V=A-T,I=1+.015*Nn(g-50,2)/Jl(20+Nn(g-50,2)),H=1+.045*R,q=1+.015*R*L,Z=30*hye(-Nn((F-275)/25,2)),G=-(2*Jl(Nn(R,7)/(Nn(R,7)+Nn(25,7))))*kI(2*s(Z)),K=Jl(Nn(M/(n*I),2)+Nn(V/(o*H),2)+Nn(U/(a*q),2)+G*(V/(o*H))*(U/(a*q)));return pye(0,uye(100,K))}function mye(e,r,n="lab"){e=new Ve(e),r=new Ve(r);const o=e.get(n),a=r.get(n);let i=0;for(let s in o){const l=(o[s]||0)-(a[s]||0);i+=l*l}return Math.sqrt(i)}const gye=(...e)=>{try{return new Ve(...e),!0}catch{return!1}},yye={cool(){return Yv([Lt.hsl(180,1,.9),Lt.hsl(250,.7,.4)])},hot(){return Yv(["#000","#f00","#ff0","#fff"]).mode("rgb")}},$6={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},EI=Object.keys($6),SI=new Map(EI.map(e=>[e.toLowerCase(),e])),bye=typeof Proxy=="function"?new Proxy($6,{get(e,r){const n=r.toLowerCase();if(SI.has(n))return e[SI.get(n)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(EI)}}):$6,vye=(...e)=>{e=Ft(e,"cmyk");const[r,n,o,a]=e,i=e.length>4?e[4]:1;return a===1?[0,0,0,i]:[r>=1?0:255*(1-r)*(1-a),n>=1?0:255*(1-n)*(1-a),o>=1?0:255*(1-o)*(1-a),i]},{max:CI}=Math,xye=(...e)=>{let[r,n,o]=Ft(e,"rgb");r=r/255,n=n/255,o=o/255;const a=1-CI(r,CI(n,o)),i=a<1?1/(1-a):0,s=(1-r-a)*i,l=(1-n-a)*i,c=(1-o-a)*i;return[s,l,c,a]};Ve.prototype.cmyk=function(){return xye(this._rgb)},Object.assign(Lt,{cmyk:(...e)=>new Ve(...e,"cmyk")}),jt.format.cmyk=vye,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"cmyk"),Xt(e)==="array"&&e.length===4)return"cmyk"}});const wye=(...e)=>{const r=Ft(e,"hsla");let n=Kh(e)||"lsa";return r[0]=si(r[0]||0)+"deg",r[1]=si(r[1]*100)+"%",r[2]=si(r[2]*100)+"%",n==="hsla"||r.length>3&&r[3]<1?(r[3]="/ "+(r.length>3?r[3]:1),n="hsla"):r.length=3,`${n.substr(0,3)}(${r.join(" ")})`},kye=(...e)=>{const r=Ft(e,"lab");let n=Kh(e)||"lab";return r[0]=si(r[0])+"%",r[1]=si(r[1]),r[2]=si(r[2]),n==="laba"||r.length>3&&r[3]<1?r[3]="/ "+(r.length>3?r[3]:1):r.length=3,`lab(${r.join(" ")})`},_ye=(...e)=>{const r=Ft(e,"lch");let n=Kh(e)||"lab";return r[0]=si(r[0])+"%",r[1]=si(r[1]),r[2]=isNaN(r[2])?"none":si(r[2])+"deg",n==="lcha"||r.length>3&&r[3]<1?r[3]="/ "+(r.length>3?r[3]:1):r.length=3,`lch(${r.join(" ")})`},Eye=(...e)=>{const r=Ft(e,"lab");return r[0]=si(r[0]*100)+"%",r[1]=g6(r[1]),r[2]=g6(r[2]),r.length>3&&r[3]<1?r[3]="/ "+(r.length>3?r[3]:1):r.length=3,`oklab(${r.join(" ")})`},TI=(...e)=>{const[r,n,o,...a]=Ft(e,"rgb"),[i,s,l]=A6(r,n,o),[c,d,u]=sI(i,s,l);return[c,d,u,...a.length>0&&a[0]<1?[a[0]]:[]]},Sye=(...e)=>{const r=Ft(e,"lch");return r[0]=si(r[0]*100)+"%",r[1]=g6(r[1]),r[2]=isNaN(r[2])?"none":si(r[2])+"deg",r.length>3&&r[3]<1?r[3]="/ "+(r.length>3?r[3]:1):r.length=3,`oklch(${r.join(" ")})`},{round:P6}=Math,Cye=(...e)=>{const r=Ft(e,"rgba");let n=Kh(e)||"rgb";if(n.substr(0,3)==="hsl")return wye(cI(r),n);if(n.substr(0,3)==="lab"){const o=f1();Ql("d50");const a=kye(x6(r),n);return Ql(o),a}if(n.substr(0,3)==="lch"){const o=f1();Ql("d50");const a=_ye(E6(r),n);return Ql(o),a}return n.substr(0,5)==="oklab"?Eye(A6(r)):n.substr(0,5)==="oklch"?Sye(TI(r)):(r[0]=P6(r[0]),r[1]=P6(r[1]),r[2]=P6(r[2]),(n==="rgba"||r.length>3&&r[3]<1)&&(r[3]="/ "+(r.length>3?r[3]:1),n="rgba"),`${n.substr(0,3)}(${r.slice(0,n==="rgb"?3:4).join(" ")})`)},AI=(...e)=>{e=Ft(e,"lch");const[r,n,o,...a]=e,[i,s,l]=iI(r,n,o),[c,d,u]=T6(i,s,l);return[c,d,u,...a.length>0&&a[0]<1?[a[0]]:[]]},ec=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,Ji=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,Kv=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,li=/\s*/.source,rf=/\s+/.source,M6=/\s*,\s*/.source,Zv=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,nf=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,RI=new RegExp("^rgba?\\("+li+[ec,ec,ec].join(rf)+nf+"\\)$"),NI=new RegExp("^rgb\\("+li+[ec,ec,ec].join(M6)+li+"\\)$"),DI=new RegExp("^rgba\\("+li+[ec,ec,ec,Ji].join(M6)+li+"\\)$"),$I=new RegExp("^hsla?\\("+li+[Zv,Kv,Kv].join(rf)+nf+"\\)$"),PI=new RegExp("^hsl?\\("+li+[Zv,Kv,Kv].join(M6)+li+"\\)$"),MI=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,zI=new RegExp("^lab\\("+li+[Ji,Ji,Ji].join(rf)+nf+"\\)$"),II=new RegExp("^lch\\("+li+[Ji,Ji,Zv].join(rf)+nf+"\\)$"),OI=new RegExp("^oklab\\("+li+[Ji,Ji,Ji].join(rf)+nf+"\\)$"),jI=new RegExp("^oklch\\("+li+[Ji,Ji,Zv].join(rf)+nf+"\\)$"),{round:LI}=Math,of=e=>e.map((r,n)=>n<=2?Ou(LI(r),0,255):r),Dn=(e,r=0,n=100,o=!1)=>(typeof e=="string"&&e.endsWith("%")&&(e=parseFloat(e.substring(0,e.length-1))/100,o?e=r+(e+1)*.5*(n-r):e=r+e*(n-r)),+e),Yo=(e,r)=>e==="none"?r:e,z6=e=>{if(e=e.toLowerCase().trim(),e==="transparent")return[0,0,0,0];let r;if(jt.format.named)try{return jt.format.named(e)}catch{}if((r=e.match(RI))||(r=e.match(NI))){let n=r.slice(1,4);for(let a=0;a<3;a++)n[a]=+Dn(Yo(n[a],0),0,255);n=of(n);const o=r[4]!==void 0?+Dn(r[4],0,1):1;return n[3]=o,n}if(r=e.match(DI)){const n=r.slice(1,5);for(let o=0;o<4;o++)n[o]=+Dn(n[o],0,255);return n}if((r=e.match($I))||(r=e.match(PI))){const n=r.slice(1,4);n[0]=+Yo(n[0].replace("deg",""),0),n[1]=+Dn(Yo(n[1],0),0,100)*.01,n[2]=+Dn(Yo(n[2],0),0,100)*.01;const o=of(C6(n)),a=r[4]!==void 0?+Dn(r[4],0,1):1;return o[3]=a,o}if(r=e.match(MI)){const n=r.slice(1,4);n[1]*=.01,n[2]*=.01;const o=C6(n);for(let a=0;a<3;a++)o[a]=LI(o[a]);return o[3]=+r[4],o}if(r=e.match(zI)){const n=r.slice(1,4);n[0]=Dn(Yo(n[0],0),0,100),n[1]=Dn(Yo(n[1],0),-125,125,!0),n[2]=Dn(Yo(n[2],0),-125,125,!0);const o=f1();Ql("d50");const a=of(b6(n));Ql(o);const i=r[4]!==void 0?+Dn(r[4],0,1):1;return a[3]=i,a}if(r=e.match(II)){const n=r.slice(1,4);n[0]=Dn(n[0],0,100),n[1]=Dn(Yo(n[1],0),0,150,!1),n[2]=+Yo(n[2].replace("deg",""),0);const o=f1();Ql("d50");const a=of(_6(n));Ql(o);const i=r[4]!==void 0?+Dn(r[4],0,1):1;return a[3]=i,a}if(r=e.match(OI)){const n=r.slice(1,4);n[0]=Dn(Yo(n[0],0),0,1),n[1]=Dn(Yo(n[1],0),-.4,.4,!0),n[2]=Dn(Yo(n[2],0),-.4,.4,!0);const o=of(T6(n)),a=r[4]!==void 0?+Dn(r[4],0,1):1;return o[3]=a,o}if(r=e.match(jI)){const n=r.slice(1,4);n[0]=Dn(Yo(n[0],0),0,1),n[1]=Dn(Yo(n[1],0),0,.4,!1),n[2]=+Yo(n[2].replace("deg",""),0);const o=of(AI(n)),a=r[4]!==void 0?+Dn(r[4],0,1):1;return o[3]=a,o}};z6.test=e=>RI.test(e)||$I.test(e)||zI.test(e)||II.test(e)||OI.test(e)||jI.test(e)||NI.test(e)||DI.test(e)||PI.test(e)||MI.test(e)||e==="transparent",Ve.prototype.css=function(e){return Cye(this._rgb,e)};const Tye=(...e)=>new Ve(...e,"css");Lt.css=Tye,jt.format.css=z6,jt.autodetect.push({p:5,test:(e,...r)=>{if(!r.length&&Xt(e)==="string"&&z6.test(e))return"css"}}),jt.format.gl=(...e)=>{const r=Ft(e,"rgba");return r[0]*=255,r[1]*=255,r[2]*=255,r};const Aye=(...e)=>new Ve(...e,"gl");Lt.gl=Aye,Ve.prototype.gl=function(){const e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]},Ve.prototype.hex=function(e){return nI(this._rgb,e)};const Rye=(...e)=>new Ve(...e,"hex");Lt.hex=Rye,jt.format.hex=rI,jt.autodetect.push({p:4,test:(e,...r)=>{if(!r.length&&Xt(e)==="string"&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});const{log:Qv}=Math,BI=e=>{const r=e/100;let n,o,a;return r<66?(n=255,o=r<6?0:-155.25485562709179-.44596950469579133*(o=r-2)+104.49216199393888*Qv(o),a=r<20?0:-254.76935184120902+.8274096064007395*(a=r-10)+115.67994401066147*Qv(a)):(n=351.97690566805693+.114206453784165*(n=r-55)-40.25366309332127*Qv(n),o=325.4494125711974+.07943456536662342*(o=r-50)-28.0852963507957*Qv(o),a=255),[n,o,a,1]},{round:Nye}=Math,Dye=(...e)=>{const r=Ft(e,"rgb"),n=r[0],o=r[2];let a=1e3,i=4e4;const s=.4;let l;for(;i-a>s;){l=(i+a)*.5;const c=BI(l);c[2]/c[0]>=o/n?i=l:a=l}return Nye(l)};Ve.prototype.temp=Ve.prototype.kelvin=Ve.prototype.temperature=function(){return Dye(this._rgb)};const I6=(...e)=>new Ve(...e,"temp");Object.assign(Lt,{temp:I6,kelvin:I6,temperature:I6}),jt.format.temp=jt.format.kelvin=jt.format.temperature=BI,Ve.prototype.oklch=function(){return TI(this._rgb)},Object.assign(Lt,{oklch:(...e)=>new Ve(...e,"oklch")}),jt.format.oklch=AI,jt.autodetect.push({p:2,test:(...e)=>{if(e=Ft(e,"oklch"),Xt(e)==="array"&&e.length===3)return"oklch"}}),Object.assign(Lt,{analyze:fI,average:z0e,bezier:F0e,blend:Qi,brewer:bye,Color:Ve,colors:Zh,contrast:sye,contrastAPCA:dye,cubehelix:J0e,deltaE:fye,distance:mye,input:jt,interpolate:Qh,limits:mI,mix:Qh,random:nye,scale:Yv,scales:yye,valid:gye});const O6=[.96,.907,.805,.697,.605,.547,.518,.445,.395,.34],FI=[.32,.16,.08,.04,0,0,.04,.08,.16,.32];function $ye(e){const r=e.get("hsl.l");return O6.reduce((n,o)=>Math.abs(o-r)i===n),a=O6.map(i=>r.set("hsl.l",i)).map(i=>Lt(i)).map((i,s)=>{const l=FI[s]-FI[o];return l>=0?i.saturate(l):i.desaturate(l*-1)});return a[o]=Lt(e),{baseColorIndex:o,colors:a}}function Mye(e){return Pye(e).colors.map(r=>r.hex())}const HI={fill:"#3b82f6",stroke:"#2563eb",hiContrast:"#eff6ff",loContrast:"#bfdbfe"},VI={fill:"#0284c7",stroke:"#0369a1",hiContrast:"#f0f9ff",loContrast:"#B6ECF7"},qI={fill:"#64748b",stroke:"#475569",hiContrast:"#f8fafc",loContrast:"#cbd5e1"},zye={primary:HI,blue:HI,secondary:VI,sky:VI,muted:qI,slate:qI,gray:{fill:"#737373",stroke:"#525252",hiContrast:"#fafafa",loContrast:"#d4d4d4"},red:{fill:"#AC4D39",stroke:"#853A2D",hiContrast:"#FBD3CB",loContrast:"#f5b2a3"},green:{fill:"#428a4f",stroke:"#2d5d39",hiContrast:"#f8fafc",loContrast:"#c2f0c2"},amber:{fill:"#A35829",stroke:"#7E451D",hiContrast:"#FFE0C2",loContrast:"#f9b27c"},indigo:{fill:"#6366f1",stroke:"#4f46e5",hiContrast:"#eef2ff",loContrast:"#c7d2fe"}},Iye={line:"#6E6E6E",labelBg:"#18191b",label:"#C6C6C6"},UI={line:"#64748b",labelBg:"#0f172a",label:"#cbd5e1"},WI={line:"#3b82f6",labelBg:"#172554",label:"#60a5fa"},YI={line:"#0ea5e9",labelBg:"#082f49",label:"#38bdf8"},Oye={amber:{line:"#b45309",labelBg:"#78350f",label:"#FFE0C2"},blue:WI,gray:Iye,green:{line:"#15803d",labelBg:"#052e16",label:"#22c55e"},indigo:{line:"#6366f1",labelBg:"#1e1b4b",label:"#818cf8"},muted:UI,primary:WI,red:{line:"#AC4D39",labelBg:"#b91c1c",label:"#f5b2a3"},secondary:YI,sky:YI,slate:UI},GI=60,XI=2,KI=1;function jye(e){at(Lt.valid(e),`Invalid color: ${e}`);const r=Mye(e),n=r[6],o=Lye(n);return{elements:{fill:n,stroke:r[7],hiContrast:o[0],loContrast:o[1]},relationships:{line:r[4],label:r[3],labelBg:r[9]}}}function Lye(e){const r=Lt(e);let n=r.brighten(XI),o=r.darken(XI),a,i,s,l;do a=n,i=o,n=n.brighten(KI),o=o.darken(KI),s=Lt.contrastAPCA(r,n),l=Lt.contrastAPCA(r,o);while(Math.abs(s)Math.abs(l)?[n.brighten(.4).hex(),n.hex()]:[o.darken(.4).hex(),o.hex()]}const Bye={color:"primary",size:"md",opacity:15,shape:"rectangle",group:{opacity:15,border:"dashed"},relationship:{color:"gray",line:"dashed",arrow:"normal"}},Fye=["rectangle","person","browser","mobile","cylinder","storage","queue"],Hye={colors:$1e(["amber","blue","gray","slate","green","indigo","muted","primary","red","secondary","sky"],e=>({elements:zye[e],relationships:Oye[e]})),sizes:{xs:{width:180,height:100},sm:{width:240,height:135},md:{width:320,height:180},lg:{width:420,height:234},xl:{width:520,height:290}},spacing:{xs:8,sm:10,md:16,lg:24,xl:32},textSizes:{xs:13.33,sm:16,md:19.2,lg:23.04,xl:27.65}};function j6(e){if(e===null||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);return r!==null&&r!==Object.prototype&&Object.getPrototypeOf(r)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function L6(e,r,n=".",o){if(!j6(r))return L6(e,{},n);const a=Object.assign({},r);for(const i in e){if(i==="__proto__"||i==="constructor")continue;const s=e[i];s!=null&&(Array.isArray(s)&&Array.isArray(a[i])?a[i]=[...s,...a[i]]:j6(s)&&j6(a[i])?a[i]=L6(s,a[i],(n?`${n}.`:"")+i.toString()):a[i]=s)}return a}function Vye(e){return(...r)=>r.reduce((n,o)=>L6(n,o,""),{})}const qye=Vye();function Jv({size:e,padding:r,textSize:n,...o},a=B6.defaults.size){return e??=a,n??=e,r??=e,{...o,size:e,padding:r,textSize:n}}const B6={theme:Hye,defaults:Bye};let ZI=class Hz{constructor(r){this.config=r,this.theme=r.theme,this.defaults=r.defaults}theme;defaults;static DEFAULT=new Hz(B6);static from(...r){return Kl(r,1)?new Hz(qye(...r,B6)):this.DEFAULT}get elementColors(){return this.theme.colors[this.defaults.color].elements}get relationshipColors(){return this.theme.colors[this.defaults.relationship.color].relationships}get groupColors(){const r=this.defaults.group?.color;return r?yr(this,"defaultGroup",()=>({...this.elementColors,...this.theme.colors[r].elements})):this.elementColors}isDefaultColor(r){return r===this.defaults.color}colors(r){if(r??=this.defaults.color,this.isThemeColor(r))return this.theme.colors[r];throw new Error(`Unknown color: ${r}`)}fontSize(r){return r??=this.defaults.text??this.defaults.size,this.theme.textSizes[r]}padding(r){return r??=this.defaults.padding??this.defaults.size,this.theme.spacing[r]}isThemeColor(r){return r in this.theme.colors}nodeSizes(r){const n=Jv(r,this.defaults.size);return{sizes:n,values:{sizes:this.theme.sizes[n.size],padding:this.padding(n.padding),textSize:this.fontSize(n.textSize)}}}computeFrom(r){return this.isThemeColor(r)?this.theme.colors[r]:yr(this,`compute-${r}`,()=>{if(!Lt.valid(r))throw new Error(`Invalid color value: "${r}"`);return jye(r)})}equals(r){return r===this?!0:Vv(this.config,r.config)}};function m1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cd(e){return typeof e=="string"}var F6={exports:{}},QI;function Uye(){if(QI)return F6.exports;QI=1;var e=function(r,n){var o,a,i=1,s=0,l=0,c=String.alphabet;function d(u,h,f){if(f){for(o=h;f=d(u,o),f<76&&f>65;)++o;return+u.slice(h-1,o)}return f=c&&c.indexOf(u.charAt(h)),f>-1?f+76:(f=u.charCodeAt(h)||0,f<45||f>127?f:f<46?65:f<48?f-1:f<58?f+18:f<65?f-11:f<91?f+11:f<97?f-37:f<123?f+5:f-63)}if((r+="")!=(n+="")){for(;i;)if(a=d(r,s++),i=d(n,l++),a<76&&i<76&&a>66&&i>66&&(a=d(r,s,s),i=d(n,l,s=o),l=o),a!=i)return a{if(n===o)return 0;if(!n)return-1;if(!o)return 1;const a=n.split(e),i=o.split(e),s=Math.min(a.length,i.length);for(let c=0;c0?e.slice(0,r):null}function g1(e){const r=e.lastIndexOf(".");return r>0?e.slice(r+1):e}const y1=e=>H6(e)?e:e.id;function to(e,r){const n=y1(e);return r?y1(r).startsWith(n+"."):o=>{const a=y1(o);return n.startsWith(a+".")}}function tO(e,r){if(!r)return a=>tO(e,a);const n=y1(e),o=y1(r);return n===o||o.startsWith(n+".")||n.startsWith(o+".")}function rO(e,r){return n=>to(e,n)}function r3(e){return(H6(e)?e:e.id).split(".").length}function b1(e,r){const n=e.split(".");if(n.length<2)return null;const o=r.split(".");if(o.length<2)return null;let a=[];for(let i=0;ia===0?(n.push(o),n):(n.unshift(`${n[0]}.${o}`),n),[])}function Yye(e,r){let n=r;for(const o of e)to(o,n)&&(n=o);return n!==r?n:null}function dd(e){const r=[],n=[...e];let o;for(;o=n.shift();){let a;for(;a=Yye(n,o);)r.push(n.splice(n.indexOf(a),1)[0]);r.push(o)}return r}function nO(e,r){if(!e||H6(e)){const o=e??"asc";return a=>nO(a,o)}const n=r==="desc"?-1:1;return e.map(o=>({item:o,fqn:o.id.split(".")})).sort((o,a)=>{if(o.fqn.length!==a.fqn.length)return(o.fqn.length-a.fqn.length)*n;for(let i=0;io)}var n3={},oO;function Gye(){return oO||(oO=1,n3.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",n3.SYMBOL_SUPPORT=typeof Symbol<"u"),n3}var V6,aO;function iO(){if(aO)return V6;aO=1;function e(r){if(typeof r!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=r}return typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=function(){return this}),e.of=function(){var r=arguments,n=r.length,o=0;return new e(function(){return o>=n?{done:!0}:{done:!1,value:r[o++]}})},e.empty=function(){var r=new e(function(){return{done:!0}});return r},e.fromSequence=function(r){var n=0,o=r.length;return new e(function(){return n>=o?{done:!0}:{done:!1,value:r[n++]}})},e.is=function(r){return r instanceof e?!0:typeof r=="object"&&r!==null&&typeof r.next=="function"},V6=e,V6}var q6,sO;function o3(){if(sO)return q6;sO=1;var e=Gye(),r=e.ARRAY_BUFFER_SUPPORT,n=e.SYMBOL_SUPPORT;return q6=function(a,i){var s,l,c,d,u;if(!a)throw new Error("obliterator/forEach: invalid iterable.");if(typeof i!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(a)||r&&ArrayBuffer.isView(a)||typeof a=="string"||a.toString()==="[object Arguments]"){for(c=0,d=a.length;c{const n=(a,i)=>(e.set(i,a),a),o=a=>{if(e.has(a))return e.get(a);const[i,s]=r[a];switch(i){case a3:case lO:return n(s,a);case v1:{const l=n([],a);for(const c of s)l.push(o(c));return l}case i3:{const l=n({},a);for(const[c,d]of s)l[o(c)]=o(d);return l}case U6:return n(new Date(s),a);case W6:{const{source:l,flags:c}=s;return n(new RegExp(l,c),a)}case Y6:{const l=n(new Map,a);for(const[c,d]of s)l.set(o(c),o(d));return l}case G6:{const l=n(new Set,a);for(const c of s)l.add(o(c));return l}case cO:{const{name:l,message:c}=s;return n(new uO[l](c),a)}case dO:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new uO[i](s),a)};return o},pO=e=>Xye(new Map,e)(0),af="",{toString:Kye}={},{keys:Zye}=Object,x1=e=>{const r=typeof e;if(r!=="object"||!e)return[a3,r];const n=Kye.call(e).slice(8,-1);switch(n){case"Array":return[v1,af];case"Object":return[i3,af];case"Date":return[U6,af];case"RegExp":return[W6,af];case"Map":return[Y6,af];case"Set":return[G6,af];case"DataView":return[v1,n]}return n.includes("Array")?[v1,n]:n.includes("Error")?[cO,n]:[i3,n]},s3=([e,r])=>e===a3&&(r==="function"||r==="symbol"),Qye=(e,r,n,o)=>{const a=(s,l)=>{const c=o.push(s)-1;return n.set(l,c),c},i=s=>{if(n.has(s))return n.get(s);let[l,c]=x1(s);switch(l){case a3:{let u=s;switch(c){case"bigint":l=dO,u=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);u=null;break;case"undefined":return a([lO],s)}return a([l,u],s)}case v1:{if(c){let f=s;return c==="DataView"?f=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(f=new Uint8Array(s)),a([c,[...f]],s)}const u=[],h=a([l,u],s);for(const f of s)u.push(i(f));return h}case i3:{if(c)switch(c){case"BigInt":return a([c,s.toString()],s);case"Boolean":case"Number":case"String":return a([c,s.valueOf()],s)}if(r&&"toJSON"in s)return i(s.toJSON());const u=[],h=a([l,u],s);for(const f of Zye(s))(e||!s3(x1(s[f])))&&u.push([i(f),i(s[f])]);return h}case U6:return a([l,s.toISOString()],s);case W6:{const{source:u,flags:h}=s;return a([l,{source:u,flags:h}],s)}case Y6:{const u=[],h=a([l,u],s);for(const[f,g]of s)(e||!(s3(x1(f))||s3(x1(g))))&&u.push([i(f),i(g)]);return h}case G6:{const u=[],h=a([l,u],s);for(const f of s)(e||!s3(x1(f)))&&u.push(i(f));return h}}const{message:d}=s;return a([l,{name:c,message:d}],s)};return i},hO=(e,{json:r,lossy:n}={})=>{const o=[];return Qye(!(r||n),!!r,new Map,o)(e),o},Lu=typeof structuredClone=="function"?(e,r)=>r&&("json"in r||"lossy"in r)?pO(hO(e,r)):structuredClone(e):(e,r)=>pO(hO(e,r));function tkt(){}let w1=class{constructor(r,n,o){this.normal=n,this.property=r,o&&(this.space=o)}};w1.prototype.normal={},w1.prototype.property={},w1.prototype.space=void 0;function fO(e,r){const n={},o={};for(const a of e)Object.assign(n,a.property),Object.assign(o,a.normal);return new w1(n,o,r)}function k1(e){return e.toLowerCase()}let oa=class{constructor(r,n){this.attribute=n,this.property=r}};oa.prototype.attribute="",oa.prototype.booleanish=!1,oa.prototype.boolean=!1,oa.prototype.commaOrSpaceSeparated=!1,oa.prototype.commaSeparated=!1,oa.prototype.defined=!1,oa.prototype.mustUseProperty=!1,oa.prototype.number=!1,oa.prototype.overloadedBoolean=!1,oa.prototype.property="",oa.prototype.spaceSeparated=!1,oa.prototype.space=void 0;let Jye=0;const Ht=Bu(),$n=Bu(),mO=Bu(),Ue=Bu(),jr=Bu(),sf=Bu(),Ra=Bu();function Bu(){return 2**++Jye}const X6={__proto__:null,boolean:Ht,booleanish:$n,commaOrSpaceSeparated:Ra,commaSeparated:sf,number:Ue,overloadedBoolean:mO,spaceSeparated:jr},K6=Object.keys(X6);let Z6=class extends oa{constructor(r,n,o,a){let i=-1;if(super(r,n),gO(this,"space",a),typeof o=="number")for(;++i4&&n.slice(0,4)==="data"&&nbe.test(r)){if(r.charAt(4)==="-"){const i=r.slice(5).replace(_O,abe);o="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=r.slice(4);if(!_O.test(i)){let s=i.replace(rbe,obe);s.charAt(0)!=="-"&&(s="-"+s),r="data"+s}}a=Z6}return new a(o,r)}function obe(e){return"-"+e.toLowerCase()}function abe(e){return e.charAt(1).toUpperCase()}const l3=fO([yO,ebe,xO,wO,kO],"html"),_1=fO([yO,tbe,xO,wO,kO],"svg");function EO(e){const r=[],n=String(e||"");let o=n.indexOf(","),a=0,i=!1;for(;!i;){o===-1&&(o=n.length,i=!0);const s=n.slice(a,o).trim();(s||!i)&&r.push(s),a=o+1,o=n.indexOf(",",a)}return r}function SO(e,r){const n=r||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const CO=/[#.]/g;function ibe(e,r){const n=e||"",o={};let a=0,i,s;for(;a-1&&i<=r.length){let s=0;for(;;){let l=n[s];if(l===void 0){const c=DO(r,n[s-1]);l=c===-1?r.length+1:c+1,n[s]=l}if(l>i)return{line:s+1,column:i-(s>0?n[s-1]:0)+1,offset:i};s++}}}function a(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length1?n[i.line-2]:0)+i.column-1;if(s4&&n.slice(0,4)==="data"&&_be.test(r)){if(r.charAt(4)==="-"){const i=r.slice(5).replace(qO,Tbe);o="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=r.slice(4);if(!qO.test(i)){let s=i.replace(Ebe,Cbe);s.charAt(0)!=="-"&&(s="-"+s),r="data"+s}}a=o8}return new a(o,r)}function Cbe(e){return"-"+e.toLowerCase()}function Tbe(e){return e.charAt(1).toUpperCase()}const Abe=zO([LO,jO,HO,VO,wbe],"html"),UO=zO([LO,jO,HO,VO,kbe],"svg"),WO={}.hasOwnProperty;function a8(e,r){const n=r||{};function o(a,...i){let s=o.invalid;const l=o.handlers;if(a&&WO.call(a,e)){const c=String(a[e]);s=WO.call(l,c)?l[c]:o.unknown}if(s)return s.call(this,a,...i)}return o.handlers=n.handlers||{},o.invalid=n.invalid,o.unknown=n.unknown,o}const Rbe={},Nbe={}.hasOwnProperty,YO=a8("type",{handlers:{root:$be,element:Obe,text:zbe,comment:Ibe,doctype:Mbe}});function Dbe(e,r){const o=(r||Rbe).space;return YO(e,o==="svg"?UO:Abe)}function $be(e,r){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=i8(e.children,n,r),pf(e,n),n}function Pbe(e,r){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=i8(e.children,n,r),pf(e,n),n}function Mbe(e){const r={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return pf(e,r),r}function zbe(e){const r={nodeName:"#text",value:e.value,parentNode:null};return pf(e,r),r}function Ibe(e){const r={nodeName:"#comment",data:e.value,parentNode:null};return pf(e,r),r}function Obe(e,r){const n=r;let o=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(o=UO);const a=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&Nbe.call(e.properties,i)){const c=jbe(o,i,e.properties[i]);c&&a.push(c)}}const s=o.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:Fu[s],childNodes:[],parentNode:null};return l.childNodes=i8(e.children,l,o),pf(e,l),e.tagName==="template"&&e.content&&(l.content=Pbe(e.content,o)),l}function jbe(e,r,n){const o=Sbe(e,r);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&o.boolean)return;Array.isArray(n)&&(n=o.commaSeparated?SO(n):AO(n));const a={name:o.attribute,value:n===!0?"":String(n)};if(o.space&&o.space!=="html"&&o.space!=="svg"){const i=a.name.indexOf(":");i<0?a.prefix="":(a.name=a.name.slice(i+1),a.prefix=o.attribute.slice(0,i)),a.namespace=Fu[o.space]}return a}function i8(e,r,n){let o=-1;const a=[];if(e)for(;++o=55296&&e<=57343}function Bbe(e){return e>=56320&&e<=57343}function Fbe(e,r){return(e-55296)*1024+9216+r}function KO(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ZO(e){return e>=64976&&e<=65007||Lbe.has(e)}var Ae;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Ae||(Ae={}));const Hbe=65536;class Vbe{constructor(r){this.handler=r,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=Hbe,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(r,n){const{line:o,col:a,offset:i}=this,s=a+n,l=i+n;return{code:r,startLine:o,endLine:o,startCol:s,endCol:s,startOffset:l,endOffset:l}}_err(r){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(r,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(r){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(Bbe(n))return this.pos++,this._addGap(),Fbe(r,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,se.EOF;return this._err(Ae.surrogateInInputStream),r}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(r,n){this.html.length>0?this.html+=r:this.html=r,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(r){this.html=this.html.substring(0,this.pos+1)+r+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(r,n){if(this.pos+r.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(r,this.pos);for(let o=0;o=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,se.EOF;const o=this.html.charCodeAt(n);return o===se.CARRIAGE_RETURN?se.LINE_FEED:o}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,se.EOF;let r=this.html.charCodeAt(this.pos);return r===se.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,se.LINE_FEED):r===se.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,XO(r)&&(r=this._processSurrogate(r)),this.handler.onParseError===null||r>31&&r<127||r===se.LINE_FEED||r===se.CARRIAGE_RETURN||r>159&&r<64976||this._checkForProblematicCharacters(r),r)}_checkForProblematicCharacters(r){KO(r)?this._err(Ae.controlCharacterInInputStream):ZO(r)&&this._err(Ae.noncharacterInInputStream)}retreat(r){for(this.pos-=r;this.pos=0;n--)if(e.attrs[n].name===r)return e.attrs[n].value;return null}const JO=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),qbe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var s8;const Ube=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Wbe=(s8=String.fromCodePoint)!==null&&s8!==void 0?s8:function(e){let r="";return e>65535&&(e-=65536,r+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),r+=String.fromCharCode(e),r};function Ybe(e){var r;return e>=55296&&e<=57343||e>1114111?65533:(r=Ube.get(e))!==null&&r!==void 0?r:e}var ro;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ro||(ro={}));const Gbe=32;var ud;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(ud||(ud={}));function l8(e){return e>=ro.ZERO&&e<=ro.NINE}function Xbe(e){return e>=ro.UPPER_A&&e<=ro.UPPER_F||e>=ro.LOWER_A&&e<=ro.LOWER_F}function Kbe(e){return e>=ro.UPPER_A&&e<=ro.UPPER_Z||e>=ro.LOWER_A&&e<=ro.LOWER_Z||l8(e)}function Zbe(e){return e===ro.EQUALS||Kbe(e)}var no;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(no||(no={}));var tc;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(tc||(tc={}));class ej{constructor(r,n,o){this.decodeTree=r,this.emitCodePoint=n,this.errors=o,this.state=no.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=tc.Strict}startEntity(r){this.decodeMode=r,this.state=no.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(r,n){switch(this.state){case no.EntityStart:return r.charCodeAt(n)===ro.NUM?(this.state=no.NumericStart,this.consumed+=1,this.stateNumericStart(r,n+1)):(this.state=no.NamedEntity,this.stateNamedEntity(r,n));case no.NumericStart:return this.stateNumericStart(r,n);case no.NumericDecimal:return this.stateNumericDecimal(r,n);case no.NumericHex:return this.stateNumericHex(r,n);case no.NamedEntity:return this.stateNamedEntity(r,n)}}stateNumericStart(r,n){return n>=r.length?-1:(r.charCodeAt(n)|Gbe)===ro.LOWER_X?(this.state=no.NumericHex,this.consumed+=1,this.stateNumericHex(r,n+1)):(this.state=no.NumericDecimal,this.stateNumericDecimal(r,n))}addToNumericResult(r,n,o,a){if(n!==o){const i=o-n;this.result=this.result*Math.pow(a,i)+parseInt(r.substr(n,i),a),this.consumed+=i}}stateNumericHex(r,n){const o=n;for(;n>14;for(;n>14,i!==0){if(s===ro.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==tc.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var r;const{result:n,decodeTree:o}=this,a=(o[n]&ud.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(r=this.errors)===null||r===void 0||r.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(r,n,o){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[r]&~ud.VALUE_LENGTH:a[r+1],o),n===3&&this.emitCodePoint(a[r+2],o),o}end(){var r;switch(this.state){case no.NamedEntity:return this.result!==0&&(this.decodeMode!==tc.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case no.NumericDecimal:return this.emitNumericEntity(0,2);case no.NumericHex:return this.emitNumericEntity(0,3);case no.NumericStart:return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case no.EntityStart:return 0}}}function tj(e){let r="";const n=new ej(e,o=>r+=Wbe(o));return function(a,i){let s=0,l=0;for(;(l=a.indexOf("&",l))>=0;){r+=a.slice(s,l),n.startEntity(i);const d=n.write(a,l+1);if(d<0){s=l+n.end();break}s=l+d,l=d===0?s+1:s}const c=r+a.slice(s);return r="",c}}function Qbe(e,r,n,o){const a=(r&ud.BRANCH_LENGTH)>>7,i=r&ud.JUMP_TABLE;if(a===0)return i!==0&&o===i?n:-1;if(i){const c=o-i;return c<0||c>=a?-1:e[n+c]-1}let s=n,l=s+a-1;for(;s<=l;){const c=s+l>>>1,d=e[c];if(do)l=c-1;else return e[c+a]}return-1}tj(JO),tj(qbe);var je;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(je||(je={}));var Vu;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Vu||(Vu={}));var di;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(di||(di={}));var ve;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(ve||(ve={}));var B;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(B||(B={}));const Jbe=new Map([[ve.A,B.A],[ve.ADDRESS,B.ADDRESS],[ve.ANNOTATION_XML,B.ANNOTATION_XML],[ve.APPLET,B.APPLET],[ve.AREA,B.AREA],[ve.ARTICLE,B.ARTICLE],[ve.ASIDE,B.ASIDE],[ve.B,B.B],[ve.BASE,B.BASE],[ve.BASEFONT,B.BASEFONT],[ve.BGSOUND,B.BGSOUND],[ve.BIG,B.BIG],[ve.BLOCKQUOTE,B.BLOCKQUOTE],[ve.BODY,B.BODY],[ve.BR,B.BR],[ve.BUTTON,B.BUTTON],[ve.CAPTION,B.CAPTION],[ve.CENTER,B.CENTER],[ve.CODE,B.CODE],[ve.COL,B.COL],[ve.COLGROUP,B.COLGROUP],[ve.DD,B.DD],[ve.DESC,B.DESC],[ve.DETAILS,B.DETAILS],[ve.DIALOG,B.DIALOG],[ve.DIR,B.DIR],[ve.DIV,B.DIV],[ve.DL,B.DL],[ve.DT,B.DT],[ve.EM,B.EM],[ve.EMBED,B.EMBED],[ve.FIELDSET,B.FIELDSET],[ve.FIGCAPTION,B.FIGCAPTION],[ve.FIGURE,B.FIGURE],[ve.FONT,B.FONT],[ve.FOOTER,B.FOOTER],[ve.FOREIGN_OBJECT,B.FOREIGN_OBJECT],[ve.FORM,B.FORM],[ve.FRAME,B.FRAME],[ve.FRAMESET,B.FRAMESET],[ve.H1,B.H1],[ve.H2,B.H2],[ve.H3,B.H3],[ve.H4,B.H4],[ve.H5,B.H5],[ve.H6,B.H6],[ve.HEAD,B.HEAD],[ve.HEADER,B.HEADER],[ve.HGROUP,B.HGROUP],[ve.HR,B.HR],[ve.HTML,B.HTML],[ve.I,B.I],[ve.IMG,B.IMG],[ve.IMAGE,B.IMAGE],[ve.INPUT,B.INPUT],[ve.IFRAME,B.IFRAME],[ve.KEYGEN,B.KEYGEN],[ve.LABEL,B.LABEL],[ve.LI,B.LI],[ve.LINK,B.LINK],[ve.LISTING,B.LISTING],[ve.MAIN,B.MAIN],[ve.MALIGNMARK,B.MALIGNMARK],[ve.MARQUEE,B.MARQUEE],[ve.MATH,B.MATH],[ve.MENU,B.MENU],[ve.META,B.META],[ve.MGLYPH,B.MGLYPH],[ve.MI,B.MI],[ve.MO,B.MO],[ve.MN,B.MN],[ve.MS,B.MS],[ve.MTEXT,B.MTEXT],[ve.NAV,B.NAV],[ve.NOBR,B.NOBR],[ve.NOFRAMES,B.NOFRAMES],[ve.NOEMBED,B.NOEMBED],[ve.NOSCRIPT,B.NOSCRIPT],[ve.OBJECT,B.OBJECT],[ve.OL,B.OL],[ve.OPTGROUP,B.OPTGROUP],[ve.OPTION,B.OPTION],[ve.P,B.P],[ve.PARAM,B.PARAM],[ve.PLAINTEXT,B.PLAINTEXT],[ve.PRE,B.PRE],[ve.RB,B.RB],[ve.RP,B.RP],[ve.RT,B.RT],[ve.RTC,B.RTC],[ve.RUBY,B.RUBY],[ve.S,B.S],[ve.SCRIPT,B.SCRIPT],[ve.SEARCH,B.SEARCH],[ve.SECTION,B.SECTION],[ve.SELECT,B.SELECT],[ve.SOURCE,B.SOURCE],[ve.SMALL,B.SMALL],[ve.SPAN,B.SPAN],[ve.STRIKE,B.STRIKE],[ve.STRONG,B.STRONG],[ve.STYLE,B.STYLE],[ve.SUB,B.SUB],[ve.SUMMARY,B.SUMMARY],[ve.SUP,B.SUP],[ve.TABLE,B.TABLE],[ve.TBODY,B.TBODY],[ve.TEMPLATE,B.TEMPLATE],[ve.TEXTAREA,B.TEXTAREA],[ve.TFOOT,B.TFOOT],[ve.TD,B.TD],[ve.TH,B.TH],[ve.THEAD,B.THEAD],[ve.TITLE,B.TITLE],[ve.TR,B.TR],[ve.TRACK,B.TRACK],[ve.TT,B.TT],[ve.U,B.U],[ve.UL,B.UL],[ve.SVG,B.SVG],[ve.VAR,B.VAR],[ve.WBR,B.WBR],[ve.XMP,B.XMP]]);function hf(e){var r;return(r=Jbe.get(e))!==null&&r!==void 0?r:B.UNKNOWN}const Fe=B,eve={[je.HTML]:new Set([Fe.ADDRESS,Fe.APPLET,Fe.AREA,Fe.ARTICLE,Fe.ASIDE,Fe.BASE,Fe.BASEFONT,Fe.BGSOUND,Fe.BLOCKQUOTE,Fe.BODY,Fe.BR,Fe.BUTTON,Fe.CAPTION,Fe.CENTER,Fe.COL,Fe.COLGROUP,Fe.DD,Fe.DETAILS,Fe.DIR,Fe.DIV,Fe.DL,Fe.DT,Fe.EMBED,Fe.FIELDSET,Fe.FIGCAPTION,Fe.FIGURE,Fe.FOOTER,Fe.FORM,Fe.FRAME,Fe.FRAMESET,Fe.H1,Fe.H2,Fe.H3,Fe.H4,Fe.H5,Fe.H6,Fe.HEAD,Fe.HEADER,Fe.HGROUP,Fe.HR,Fe.HTML,Fe.IFRAME,Fe.IMG,Fe.INPUT,Fe.LI,Fe.LINK,Fe.LISTING,Fe.MAIN,Fe.MARQUEE,Fe.MENU,Fe.META,Fe.NAV,Fe.NOEMBED,Fe.NOFRAMES,Fe.NOSCRIPT,Fe.OBJECT,Fe.OL,Fe.P,Fe.PARAM,Fe.PLAINTEXT,Fe.PRE,Fe.SCRIPT,Fe.SECTION,Fe.SELECT,Fe.SOURCE,Fe.STYLE,Fe.SUMMARY,Fe.TABLE,Fe.TBODY,Fe.TD,Fe.TEMPLATE,Fe.TEXTAREA,Fe.TFOOT,Fe.TH,Fe.THEAD,Fe.TITLE,Fe.TR,Fe.TRACK,Fe.UL,Fe.WBR,Fe.XMP]),[je.MATHML]:new Set([Fe.MI,Fe.MO,Fe.MN,Fe.MS,Fe.MTEXT,Fe.ANNOTATION_XML]),[je.SVG]:new Set([Fe.TITLE,Fe.FOREIGN_OBJECT,Fe.DESC]),[je.XLINK]:new Set,[je.XML]:new Set,[je.XMLNS]:new Set},c8=new Set([Fe.H1,Fe.H2,Fe.H3,Fe.H4,Fe.H5,Fe.H6]);ve.STYLE,ve.SCRIPT,ve.XMP,ve.IFRAME,ve.NOEMBED,ve.NOFRAMES,ve.PLAINTEXT;var ce;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(ce||(ce={}));const kn={DATA:ce.DATA,RCDATA:ce.RCDATA,RAWTEXT:ce.RAWTEXT,SCRIPT_DATA:ce.SCRIPT_DATA,PLAINTEXT:ce.PLAINTEXT,CDATA_SECTION:ce.CDATA_SECTION};function tve(e){return e>=se.DIGIT_0&&e<=se.DIGIT_9}function S1(e){return e>=se.LATIN_CAPITAL_A&&e<=se.LATIN_CAPITAL_Z}function rve(e){return e>=se.LATIN_SMALL_A&&e<=se.LATIN_SMALL_Z}function pd(e){return rve(e)||S1(e)}function rj(e){return pd(e)||tve(e)}function d3(e){return e+32}function nj(e){return e===se.SPACE||e===se.LINE_FEED||e===se.TABULATION||e===se.FORM_FEED}function oj(e){return nj(e)||e===se.SOLIDUS||e===se.GREATER_THAN_SIGN}function nve(e){return e===se.NULL?Ae.nullCharacterReference:e>1114111?Ae.characterReferenceOutsideUnicodeRange:XO(e)?Ae.surrogateCharacterReference:ZO(e)?Ae.noncharacterCharacterReference:KO(e)||e===se.CARRIAGE_RETURN?Ae.controlCharacterReference:null}class ove{constructor(r,n){this.options=r,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=ce.DATA,this.returnState=ce.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Vbe(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ej(JO,(o,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(o)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Ae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:o=>{this._err(Ae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+o)},validateNumericCharacterReference:o=>{const a=nve(o);a&&this._err(a,1)}}:void 0)}_err(r,n=0){var o,a;(a=(o=this.handler).onParseError)===null||a===void 0||a.call(o,this.preprocessor.getError(r,n))}getCurrentLocation(r){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-r,startOffset:this.preprocessor.offset-r,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const r=this._consume();this._ensureHibernation()||this._callState(r)}this.inLoop=!1}}pause(){this.paused=!0}resume(r){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||r?.())}write(r,n,o){this.active=!0,this.preprocessor.write(r,n),this._runParsingLoop(),this.paused||o?.()}insertHtmlAtCurrentPos(r){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(r),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(r){this.consumedAfterSnapshot+=r;for(let n=0;n0&&this._err(Ae.endTagWithAttributes),r.selfClosing&&this._err(Ae.endTagWithTrailingSolidus),this.handler.onEndTag(r)),this.preprocessor.dropParsedChunk()}emitCurrentComment(r){this.prepareToken(r),this.handler.onComment(r),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(r){this.prepareToken(r),this.handler.onDoctype(r),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(r){if(this.currentCharacterToken){switch(r&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=r.startLine,this.currentCharacterToken.location.endCol=r.startCol,this.currentCharacterToken.location.endOffset=r.startOffset),this.currentCharacterToken.type){case Kt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Kt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Kt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const r=this.getCurrentLocation(0);r&&(r.endLine=r.startLine,r.endCol=r.startCol,r.endOffset=r.startOffset),this._emitCurrentCharacterToken(r),this.handler.onEof({type:Kt.EOF,location:r}),this.active=!1}_appendCharToCurrentCharacterToken(r,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===r){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(r,n)}_emitCodePoint(r){const n=nj(r)?Kt.WHITESPACE_CHARACTER:r===se.NULL?Kt.NULL_CHARACTER:Kt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(r))}_emitChars(r){this._appendCharToCurrentCharacterToken(Kt.CHARACTER,r)}_startCharacterReference(){this.returnState=this.state,this.state=ce.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?tc.Attribute:tc.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===ce.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===ce.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===ce.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(r){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(r):this._emitCodePoint(r)}_callState(r){switch(this.state){case ce.DATA:{this._stateData(r);break}case ce.RCDATA:{this._stateRcdata(r);break}case ce.RAWTEXT:{this._stateRawtext(r);break}case ce.SCRIPT_DATA:{this._stateScriptData(r);break}case ce.PLAINTEXT:{this._statePlaintext(r);break}case ce.TAG_OPEN:{this._stateTagOpen(r);break}case ce.END_TAG_OPEN:{this._stateEndTagOpen(r);break}case ce.TAG_NAME:{this._stateTagName(r);break}case ce.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(r);break}case ce.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(r);break}case ce.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(r);break}case ce.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(r);break}case ce.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(r);break}case ce.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(r);break}case ce.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(r);break}case ce.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(r);break}case ce.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(r);break}case ce.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(r);break}case ce.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(r);break}case ce.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(r);break}case ce.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(r);break}case ce.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(r);break}case ce.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(r);break}case ce.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(r);break}case ce.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(r);break}case ce.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(r);break}case ce.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(r);break}case ce.ATTRIBUTE_NAME:{this._stateAttributeName(r);break}case ce.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(r);break}case ce.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(r);break}case ce.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(r);break}case ce.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(r);break}case ce.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(r);break}case ce.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(r);break}case ce.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(r);break}case ce.BOGUS_COMMENT:{this._stateBogusComment(r);break}case ce.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(r);break}case ce.COMMENT_START:{this._stateCommentStart(r);break}case ce.COMMENT_START_DASH:{this._stateCommentStartDash(r);break}case ce.COMMENT:{this._stateComment(r);break}case ce.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(r);break}case ce.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(r);break}case ce.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(r);break}case ce.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(r);break}case ce.COMMENT_END_DASH:{this._stateCommentEndDash(r);break}case ce.COMMENT_END:{this._stateCommentEnd(r);break}case ce.COMMENT_END_BANG:{this._stateCommentEndBang(r);break}case ce.DOCTYPE:{this._stateDoctype(r);break}case ce.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(r);break}case ce.DOCTYPE_NAME:{this._stateDoctypeName(r);break}case ce.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(r);break}case ce.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(r);break}case ce.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(r);break}case ce.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(r);break}case ce.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(r);break}case ce.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(r);break}case ce.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(r);break}case ce.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(r);break}case ce.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(r);break}case ce.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(r);break}case ce.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(r);break}case ce.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(r);break}case ce.BOGUS_DOCTYPE:{this._stateBogusDoctype(r);break}case ce.CDATA_SECTION:{this._stateCdataSection(r);break}case ce.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(r);break}case ce.CDATA_SECTION_END:{this._stateCdataSectionEnd(r);break}case ce.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case ce.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(r);break}default:throw new Error("Unknown state")}}_stateData(r){switch(r){case se.LESS_THAN_SIGN:{this.state=ce.TAG_OPEN;break}case se.AMPERSAND:{this._startCharacterReference();break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this._emitCodePoint(r);break}case se.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(r)}}_stateRcdata(r){switch(r){case se.AMPERSAND:{this._startCharacterReference();break}case se.LESS_THAN_SIGN:{this.state=ce.RCDATA_LESS_THAN_SIGN;break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this._emitChars(Xr);break}case se.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(r)}}_stateRawtext(r){switch(r){case se.LESS_THAN_SIGN:{this.state=ce.RAWTEXT_LESS_THAN_SIGN;break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this._emitChars(Xr);break}case se.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(r)}}_stateScriptData(r){switch(r){case se.LESS_THAN_SIGN:{this.state=ce.SCRIPT_DATA_LESS_THAN_SIGN;break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this._emitChars(Xr);break}case se.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(r)}}_statePlaintext(r){switch(r){case se.NULL:{this._err(Ae.unexpectedNullCharacter),this._emitChars(Xr);break}case se.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(r)}}_stateTagOpen(r){if(pd(r))this._createStartTagToken(),this.state=ce.TAG_NAME,this._stateTagName(r);else switch(r){case se.EXCLAMATION_MARK:{this.state=ce.MARKUP_DECLARATION_OPEN;break}case se.SOLIDUS:{this.state=ce.END_TAG_OPEN;break}case se.QUESTION_MARK:{this._err(Ae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=ce.BOGUS_COMMENT,this._stateBogusComment(r);break}case se.EOF:{this._err(Ae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Ae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=ce.DATA,this._stateData(r)}}_stateEndTagOpen(r){if(pd(r))this._createEndTagToken(),this.state=ce.TAG_NAME,this._stateTagName(r);else switch(r){case se.GREATER_THAN_SIGN:{this._err(Ae.missingEndTagName),this.state=ce.DATA;break}case se.EOF:{this._err(Ae.eofBeforeTagName),this._emitChars(""),this._emitEOFToken();break}default:this._err(Ae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=ce.BOGUS_COMMENT,this._stateBogusComment(r)}}_stateTagName(r){const n=this.currentToken;switch(r){case se.SPACE:case se.LINE_FEED:case se.TABULATION:case se.FORM_FEED:{this.state=ce.BEFORE_ATTRIBUTE_NAME;break}case se.SOLIDUS:{this.state=ce.SELF_CLOSING_START_TAG;break}case se.GREATER_THAN_SIGN:{this.state=ce.DATA,this.emitCurrentTagToken();break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),n.tagName+=Xr;break}case se.EOF:{this._err(Ae.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(S1(r)?d3(r):r)}}_stateRcdataLessThanSign(r){r===se.SOLIDUS?this.state=ce.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=ce.RCDATA,this._stateRcdata(r))}_stateRcdataEndTagOpen(r){pd(r)?(this.state=ce.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(r)):(this._emitChars(""),this.state=ce.RCDATA,this._stateRcdata(r))}handleSpecialEndTag(r){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case se.SPACE:case se.LINE_FEED:case se.TABULATION:case se.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=ce.BEFORE_ATTRIBUTE_NAME,!1;case se.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=ce.SELF_CLOSING_START_TAG,!1;case se.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=ce.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(r){this.handleSpecialEndTag(r)&&(this._emitChars(""),this.state=ce.RCDATA,this._stateRcdata(r))}_stateRawtextLessThanSign(r){r===se.SOLIDUS?this.state=ce.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=ce.RAWTEXT,this._stateRawtext(r))}_stateRawtextEndTagOpen(r){pd(r)?(this.state=ce.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(r)):(this._emitChars(""),this.state=ce.RAWTEXT,this._stateRawtext(r))}_stateRawtextEndTagName(r){this.handleSpecialEndTag(r)&&(this._emitChars(""),this.state=ce.RAWTEXT,this._stateRawtext(r))}_stateScriptDataLessThanSign(r){switch(r){case se.SOLIDUS:{this.state=ce.SCRIPT_DATA_END_TAG_OPEN;break}case se.EXCLAMATION_MARK:{this.state=ce.SCRIPT_DATA_ESCAPE_START,this._emitChars("");break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this.state=ce.SCRIPT_DATA_ESCAPED,this._emitChars(Xr);break}case se.EOF:{this._err(Ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ce.SCRIPT_DATA_ESCAPED,this._emitCodePoint(r)}}_stateScriptDataEscapedLessThanSign(r){r===se.SOLIDUS?this.state=ce.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:pd(r)?(this._emitChars("<"),this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(r)):(this._emitChars("<"),this.state=ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(r))}_stateScriptDataEscapedEndTagOpen(r){pd(r)?(this.state=ce.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(r)):(this._emitChars(""),this.state=ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(r))}_stateScriptDataEscapedEndTagName(r){this.handleSpecialEndTag(r)&&(this._emitChars(""),this.state=ce.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(r))}_stateScriptDataDoubleEscapeStart(r){if(this.preprocessor.startsWith(aa.SCRIPT,!1)&&oj(this.preprocessor.peek(aa.SCRIPT.length))){this._emitCodePoint(r);for(let n=0;n");break}case se.NULL:{this._err(Ae.unexpectedNullCharacter),this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Xr);break}case se.EOF:{this._err(Ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(r)}}_stateScriptDataDoubleEscapedLessThanSign(r){r===se.SOLIDUS?(this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=ce.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(r))}_stateScriptDataDoubleEscapeEnd(r){if(this.preprocessor.startsWith(aa.SCRIPT,!1)&&oj(this.preprocessor.peek(aa.SCRIPT.length))){this._emitCodePoint(r);for(let n=0;n0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,!0)}replace(r,n){const o=this._indexOf(r);this.items[o]=n,o===this.stackTop&&(this.current=n)}insertAfter(r,n,o){const a=this._indexOf(r)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,o),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(r){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(r,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==je.HTML);this.shortenToLength(n<0?0:n)}shortenToLength(r){for(;this.stackTop>=r;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop=0;o--)if(r.has(this.tagIDs[o])&&this.treeAdapter.getNamespaceURI(this.items[o])===n)return o;return-1}clearBackTo(r,n){const o=this._indexOfTagNames(r,n);this.shortenToLength(o+1)}clearBackToTableContext(){this.clearBackTo(cve,je.HTML)}clearBackToTableBodyContext(){this.clearBackTo(lve,je.HTML)}clearBackToTableRowContext(){this.clearBackTo(sve,je.HTML)}remove(r){const n=this._indexOf(r);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===B.BODY?this.items[1]:null}contains(r){return this._indexOf(r)>-1}getCommonAncestor(r){const n=this._indexOf(r)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===B.HTML}hasInDynamicScope(r,n){for(let o=this.stackTop;o>=0;o--){const a=this.tagIDs[o];switch(this.treeAdapter.getNamespaceURI(this.items[o])){case je.HTML:{if(a===r)return!0;if(n.has(a))return!1;break}case je.SVG:{if(lj.has(a))return!1;break}case je.MATHML:{if(sj.has(a))return!1;break}}}return!0}hasInScope(r){return this.hasInDynamicScope(r,u3)}hasInListItemScope(r){return this.hasInDynamicScope(r,ave)}hasInButtonScope(r){return this.hasInDynamicScope(r,ive)}hasNumberedHeaderInScope(){for(let r=this.stackTop;r>=0;r--){const n=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case je.HTML:{if(c8.has(n))return!0;if(u3.has(n))return!1;break}case je.SVG:{if(lj.has(n))return!1;break}case je.MATHML:{if(sj.has(n))return!1;break}}}return!0}hasInTableScope(r){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===je.HTML)switch(this.tagIDs[n]){case r:return!0;case B.TABLE:case B.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===je.HTML)switch(this.tagIDs[r]){case B.TBODY:case B.THEAD:case B.TFOOT:return!0;case B.TABLE:case B.HTML:return!1}return!0}hasInSelectScope(r){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===je.HTML)switch(this.tagIDs[n]){case r:return!0;case B.OPTION:case B.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;aj.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;ij.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(r){for(;this.currentTagId!==r&&ij.has(this.currentTagId);)this.pop()}}const d8=3;var nl;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(nl||(nl={}));const cj={type:nl.Marker};class pve{constructor(r){this.treeAdapter=r,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(r,n){const o=[],a=n.length,i=this.treeAdapter.getTagName(r),s=this.treeAdapter.getNamespaceURI(r);for(let l=0;l[s.name,s.value]));let i=0;for(let s=0;sa.get(c.name)===c.value)&&(i+=1,i>=d8&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(cj)}pushElement(r,n){this._ensureNoahArkCondition(r),this.entries.unshift({type:nl.Element,element:r,token:n})}insertElementAfterBookmark(r,n){const o=this.entries.indexOf(this.bookmark);this.entries.splice(o,0,{type:nl.Element,element:r,token:n})}removeEntry(r){const n=this.entries.indexOf(r);n>=0&&this.entries.splice(n,1)}clearToLastMarker(){const r=this.entries.indexOf(cj);r>=0?this.entries.splice(0,r+1):this.entries.length=0}getElementEntryInScopeWithTagName(r){const n=this.entries.find(o=>o.type===nl.Marker||this.treeAdapter.getTagName(o.element)===r);return n&&n.type===nl.Element?n:null}getElementEntry(r){return this.entries.find(n=>n.type===nl.Element&&n.element===r)}}const hd={createDocument(){return{nodeName:"#document",mode:di.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,r,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:r,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,r){e.childNodes.push(r),r.parentNode=e},insertBefore(e,r,n){const o=e.childNodes.indexOf(n);e.childNodes.splice(o,0,r),r.parentNode=e},setTemplateContent(e,r){e.content=r},getTemplateContent(e){return e.content},setDocumentType(e,r,n,o){const a=e.childNodes.find(i=>i.nodeName==="#documentType");if(a)a.name=r,a.publicId=n,a.systemId=o;else{const i={nodeName:"#documentType",name:r,publicId:n,systemId:o,parentNode:null};hd.appendChild(e,i)}},setDocumentMode(e,r){e.mode=r},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const r=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(r,1),e.parentNode=null}},insertText(e,r){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(hd.isTextNode(n)){n.value+=r;return}}hd.appendChild(e,hd.createTextNode(r))},insertTextBefore(e,r,n){const o=e.childNodes[e.childNodes.indexOf(n)-1];o&&hd.isTextNode(o)?o.value+=r:hd.insertBefore(e,hd.createTextNode(r),n)},adoptAttributes(e,r){const n=new Set(e.attrs.map(o=>o.name));for(let o=0;oe.startsWith(n))}function bve(e){return e.name===dj&&e.publicId===null&&(e.systemId===null||e.systemId===hve)}function vve(e){if(e.name!==dj)return di.QUIRKS;const{systemId:r}=e;if(r&&r.toLowerCase()===fve)return di.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),gve.has(n))return di.QUIRKS;let o=r===null?mve:uj;if(hj(n,o))return di.QUIRKS;if(o=r===null?pj:yve,hj(n,o))return di.LIMITED_QUIRKS}return di.NO_QUIRKS}const fj={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},xve="definitionurl",wve="definitionURL",kve=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),_ve=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:je.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:je.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:je.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:je.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:je.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:je.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:je.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:je.XML}],["xml:space",{prefix:"xml",name:"space",namespace:je.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:je.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:je.XMLNS}]]),Eve=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),Sve=new Set([B.B,B.BIG,B.BLOCKQUOTE,B.BODY,B.BR,B.CENTER,B.CODE,B.DD,B.DIV,B.DL,B.DT,B.EM,B.EMBED,B.H1,B.H2,B.H3,B.H4,B.H5,B.H6,B.HEAD,B.HR,B.I,B.IMG,B.LI,B.LISTING,B.MENU,B.META,B.NOBR,B.OL,B.P,B.PRE,B.RUBY,B.S,B.SMALL,B.SPAN,B.STRONG,B.STRIKE,B.SUB,B.SUP,B.TABLE,B.TT,B.U,B.UL,B.VAR]);function Cve(e){const r=e.tagID;return r===B.FONT&&e.attrs.some(({name:o})=>o===Vu.COLOR||o===Vu.SIZE||o===Vu.FACE)||Sve.has(r)}function mj(e){for(let r=0;r0&&this._setContextModes(r,n)}onItemPop(r,n){var o,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(r,this.currentToken),(a=(o=this.treeAdapter).onItemPop)===null||a===void 0||a.call(o,r,this.openElements.current),n){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(r,n){const o=r===this.document||this.treeAdapter.getNamespaceURI(r)===je.HTML;this.currentNotInHTML=!o,this.tokenizer.inForeignNode=!o&&!this._isIntegrationPoint(n,r)}_switchToTextParsing(r,n){this._insertElement(r,je.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=ue.TEXT}switchToPlaintextParsing(){this.insertionMode=ue.TEXT,this.originalInsertionMode=ue.IN_BODY,this.tokenizer.state=kn.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let r=this.fragmentContext;for(;r;){if(this.treeAdapter.getTagName(r)===ve.FORM){this.formElement=r;break}r=this.treeAdapter.getParentNode(r)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==je.HTML))switch(this.fragmentContextID){case B.TITLE:case B.TEXTAREA:{this.tokenizer.state=kn.RCDATA;break}case B.STYLE:case B.XMP:case B.IFRAME:case B.NOEMBED:case B.NOFRAMES:case B.NOSCRIPT:{this.tokenizer.state=kn.RAWTEXT;break}case B.SCRIPT:{this.tokenizer.state=kn.SCRIPT_DATA;break}case B.PLAINTEXT:{this.tokenizer.state=kn.PLAINTEXT;break}}}_setDocumentType(r){const n=r.name||"",o=r.publicId||"",a=r.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,o,a),r.location){const s=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));s&&this.treeAdapter.setNodeSourceCodeLocation(s,r.location)}}_attachElementToTree(r,n){if(this.options.sourceCodeLocationInfo){const o=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(r,o)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(r);else{const o=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(o,r)}}_appendElement(r,n){const o=this.treeAdapter.createElement(r.tagName,n,r.attrs);this._attachElementToTree(o,r.location)}_insertElement(r,n){const o=this.treeAdapter.createElement(r.tagName,n,r.attrs);this._attachElementToTree(o,r.location),this.openElements.push(o,r.tagID)}_insertFakeElement(r,n){const o=this.treeAdapter.createElement(r,je.HTML,[]);this._attachElementToTree(o,null),this.openElements.push(o,n)}_insertTemplate(r){const n=this.treeAdapter.createElement(r.tagName,je.HTML,r.attrs),o=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,o),this._attachElementToTree(n,r.location),this.openElements.push(n,r.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,null)}_insertFakeRootElement(){const r=this.treeAdapter.createElement(ve.HTML,je.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null),this.treeAdapter.appendChild(this.openElements.current,r),this.openElements.push(r,B.HTML)}_appendCommentNode(r,n){const o=this.treeAdapter.createCommentNode(r.data);this.treeAdapter.appendChild(n,o),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,r.location)}_insertCharacters(r){let n,o;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:o}=this._findFosterParentingLocation(),o?this.treeAdapter.insertTextBefore(n,r.chars,o):this.treeAdapter.insertText(n,r.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,r.chars)),!r.location)return;const a=this.treeAdapter.getChildNodes(n),i=o?a.lastIndexOf(o):a.length,s=a[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:c,endCol:d,endOffset:u}=r.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:c,endCol:d,endOffset:u})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,r.location)}_adoptNodes(r,n){for(let o=this.treeAdapter.getFirstChild(r);o;o=this.treeAdapter.getFirstChild(r))this.treeAdapter.detachNode(o),this.treeAdapter.appendChild(n,o)}_setEndLocation(r,n){if(this.treeAdapter.getNodeSourceCodeLocation(r)&&n.location){const o=n.location,a=this.treeAdapter.getTagName(r),i=n.type===Kt.END_TAG&&a===n.tagName?{endTag:{...o},endLine:o.endLine,endCol:o.endCol,endOffset:o.endOffset}:{endLine:o.startLine,endCol:o.startCol,endOffset:o.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(r,i)}}shouldProcessStartTagTokenInForeignContent(r){if(!this.currentNotInHTML)return!1;let n,o;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,o=this.fragmentContextID):{current:n,currentTagId:o}=this.openElements,r.tagID===B.SVG&&this.treeAdapter.getTagName(n)===ve.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===je.MATHML?!1:this.tokenizer.inForeignNode||(r.tagID===B.MGLYPH||r.tagID===B.MALIGNMARK)&&!this._isIntegrationPoint(o,n,je.HTML)}_processToken(r){switch(r.type){case Kt.CHARACTER:{this.onCharacter(r);break}case Kt.NULL_CHARACTER:{this.onNullCharacter(r);break}case Kt.COMMENT:{this.onComment(r);break}case Kt.DOCTYPE:{this.onDoctype(r);break}case Kt.START_TAG:{this._processStartTag(r);break}case Kt.END_TAG:{this.onEndTag(r);break}case Kt.EOF:{this.onEof(r);break}case Kt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(r);break}}}_isIntegrationPoint(r,n,o){const a=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return Nve(r,a,i,o)}_reconstructActiveFormattingElements(){const r=this.activeFormattingElements.entries.length;if(r){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===nl.Marker||this.openElements.contains(a.element)),o=n<0?r-1:n-1;for(let a=o;a>=0;a--){const i=this.activeFormattingElements.entries[a];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=ue.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(B.P),this.openElements.popUntilTagNamePopped(B.P)}_resetInsertionMode(){for(let r=this.openElements.stackTop;r>=0;r--)switch(r===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[r]){case B.TR:{this.insertionMode=ue.IN_ROW;return}case B.TBODY:case B.THEAD:case B.TFOOT:{this.insertionMode=ue.IN_TABLE_BODY;return}case B.CAPTION:{this.insertionMode=ue.IN_CAPTION;return}case B.COLGROUP:{this.insertionMode=ue.IN_COLUMN_GROUP;return}case B.TABLE:{this.insertionMode=ue.IN_TABLE;return}case B.BODY:{this.insertionMode=ue.IN_BODY;return}case B.FRAMESET:{this.insertionMode=ue.IN_FRAMESET;return}case B.SELECT:{this._resetInsertionModeForSelect(r);return}case B.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case B.HTML:{this.insertionMode=this.headElement?ue.AFTER_HEAD:ue.BEFORE_HEAD;return}case B.TD:case B.TH:{if(r>0){this.insertionMode=ue.IN_CELL;return}break}case B.HEAD:{if(r>0){this.insertionMode=ue.IN_HEAD;return}break}}this.insertionMode=ue.IN_BODY}_resetInsertionModeForSelect(r){if(r>0)for(let n=r-1;n>0;n--){const o=this.openElements.tagIDs[n];if(o===B.TEMPLATE)break;if(o===B.TABLE){this.insertionMode=ue.IN_SELECT_IN_TABLE;return}}this.insertionMode=ue.IN_SELECT}_isElementCausesFosterParenting(r){return yj.has(r)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let r=this.openElements.stackTop;r>=0;r--){const n=this.openElements.items[r];switch(this.openElements.tagIDs[r]){case B.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===je.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case B.TABLE:{const o=this.treeAdapter.getParentNode(n);return o?{parent:o,beforeElement:n}:{parent:this.openElements.items[r-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(r){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,r,n.beforeElement):this.treeAdapter.appendChild(n.parent,r)}_isSpecialElement(r,n){const o=this.treeAdapter.getNamespaceURI(r);return eve[o].has(n)}onCharacter(r){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){dxe(this,r);return}switch(this.insertionMode){case ue.INITIAL:{C1(this,r);break}case ue.BEFORE_HTML:{T1(this,r);break}case ue.BEFORE_HEAD:{A1(this,r);break}case ue.IN_HEAD:{R1(this,r);break}case ue.IN_HEAD_NO_SCRIPT:{N1(this,r);break}case ue.AFTER_HEAD:{D1(this,r);break}case ue.IN_BODY:case ue.IN_CAPTION:case ue.IN_CELL:case ue.IN_TEMPLATE:{wj(this,r);break}case ue.TEXT:case ue.IN_SELECT:case ue.IN_SELECT_IN_TABLE:{this._insertCharacters(r);break}case ue.IN_TABLE:case ue.IN_TABLE_BODY:case ue.IN_ROW:{m8(this,r);break}case ue.IN_TABLE_TEXT:{Rj(this,r);break}case ue.IN_COLUMN_GROUP:{f3(this,r);break}case ue.AFTER_BODY:{y3(this,r);break}case ue.AFTER_AFTER_BODY:{b3(this,r);break}}}onNullCharacter(r){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){cxe(this,r);return}switch(this.insertionMode){case ue.INITIAL:{C1(this,r);break}case ue.BEFORE_HTML:{T1(this,r);break}case ue.BEFORE_HEAD:{A1(this,r);break}case ue.IN_HEAD:{R1(this,r);break}case ue.IN_HEAD_NO_SCRIPT:{N1(this,r);break}case ue.AFTER_HEAD:{D1(this,r);break}case ue.TEXT:{this._insertCharacters(r);break}case ue.IN_TABLE:case ue.IN_TABLE_BODY:case ue.IN_ROW:{m8(this,r);break}case ue.IN_COLUMN_GROUP:{f3(this,r);break}case ue.AFTER_BODY:{y3(this,r);break}case ue.AFTER_AFTER_BODY:{b3(this,r);break}}}onComment(r){if(this.skipNextNewLine=!1,this.currentNotInHTML){h8(this,r);return}switch(this.insertionMode){case ue.INITIAL:case ue.BEFORE_HTML:case ue.BEFORE_HEAD:case ue.IN_HEAD:case ue.IN_HEAD_NO_SCRIPT:case ue.AFTER_HEAD:case ue.IN_BODY:case ue.IN_TABLE:case ue.IN_CAPTION:case ue.IN_COLUMN_GROUP:case ue.IN_TABLE_BODY:case ue.IN_ROW:case ue.IN_CELL:case ue.IN_SELECT:case ue.IN_SELECT_IN_TABLE:case ue.IN_TEMPLATE:case ue.IN_FRAMESET:case ue.AFTER_FRAMESET:{h8(this,r);break}case ue.IN_TABLE_TEXT:{M1(this,r);break}case ue.AFTER_BODY:{Fve(this,r);break}case ue.AFTER_AFTER_BODY:case ue.AFTER_AFTER_FRAMESET:{Hve(this,r);break}}}onDoctype(r){switch(this.skipNextNewLine=!1,this.insertionMode){case ue.INITIAL:{Vve(this,r);break}case ue.BEFORE_HEAD:case ue.IN_HEAD:case ue.IN_HEAD_NO_SCRIPT:case ue.AFTER_HEAD:{this._err(r,Ae.misplacedDoctype);break}case ue.IN_TABLE_TEXT:{M1(this,r);break}}}onStartTag(r){this.skipNextNewLine=!1,this.currentToken=r,this._processStartTag(r),r.selfClosing&&!r.ackSelfClosing&&this._err(r,Ae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(r){this.shouldProcessStartTagTokenInForeignContent(r)?uxe(this,r):this._startTagOutsideForeignContent(r)}_startTagOutsideForeignContent(r){switch(this.insertionMode){case ue.INITIAL:{C1(this,r);break}case ue.BEFORE_HTML:{qve(this,r);break}case ue.BEFORE_HEAD:{Wve(this,r);break}case ue.IN_HEAD:{es(this,r);break}case ue.IN_HEAD_NO_SCRIPT:{Xve(this,r);break}case ue.AFTER_HEAD:{Zve(this,r);break}case ue.IN_BODY:{Po(this,r);break}case ue.IN_TABLE:{ff(this,r);break}case ue.IN_TABLE_TEXT:{M1(this,r);break}case ue.IN_CAPTION:{Y3e(this,r);break}case ue.IN_COLUMN_GROUP:{g8(this,r);break}case ue.IN_TABLE_BODY:{m3(this,r);break}case ue.IN_ROW:{g3(this,r);break}case ue.IN_CELL:{K3e(this,r);break}case ue.IN_SELECT:{$j(this,r);break}case ue.IN_SELECT_IN_TABLE:{Q3e(this,r);break}case ue.IN_TEMPLATE:{exe(this,r);break}case ue.AFTER_BODY:{rxe(this,r);break}case ue.IN_FRAMESET:{nxe(this,r);break}case ue.AFTER_FRAMESET:{axe(this,r);break}case ue.AFTER_AFTER_BODY:{sxe(this,r);break}case ue.AFTER_AFTER_FRAMESET:{lxe(this,r);break}}}onEndTag(r){this.skipNextNewLine=!1,this.currentToken=r,this.currentNotInHTML?pxe(this,r):this._endTagOutsideForeignContent(r)}_endTagOutsideForeignContent(r){switch(this.insertionMode){case ue.INITIAL:{C1(this,r);break}case ue.BEFORE_HTML:{Uve(this,r);break}case ue.BEFORE_HEAD:{Yve(this,r);break}case ue.IN_HEAD:{Gve(this,r);break}case ue.IN_HEAD_NO_SCRIPT:{Kve(this,r);break}case ue.AFTER_HEAD:{Qve(this,r);break}case ue.IN_BODY:{h3(this,r);break}case ue.TEXT:{O3e(this,r);break}case ue.IN_TABLE:{$1(this,r);break}case ue.IN_TABLE_TEXT:{M1(this,r);break}case ue.IN_CAPTION:{G3e(this,r);break}case ue.IN_COLUMN_GROUP:{X3e(this,r);break}case ue.IN_TABLE_BODY:{y8(this,r);break}case ue.IN_ROW:{Dj(this,r);break}case ue.IN_CELL:{Z3e(this,r);break}case ue.IN_SELECT:{Pj(this,r);break}case ue.IN_SELECT_IN_TABLE:{J3e(this,r);break}case ue.IN_TEMPLATE:{txe(this,r);break}case ue.AFTER_BODY:{zj(this,r);break}case ue.IN_FRAMESET:{oxe(this,r);break}case ue.AFTER_FRAMESET:{ixe(this,r);break}case ue.AFTER_AFTER_BODY:{b3(this,r);break}}}onEof(r){switch(this.insertionMode){case ue.INITIAL:{C1(this,r);break}case ue.BEFORE_HTML:{T1(this,r);break}case ue.BEFORE_HEAD:{A1(this,r);break}case ue.IN_HEAD:{R1(this,r);break}case ue.IN_HEAD_NO_SCRIPT:{N1(this,r);break}case ue.AFTER_HEAD:{D1(this,r);break}case ue.IN_BODY:case ue.IN_TABLE:case ue.IN_CAPTION:case ue.IN_COLUMN_GROUP:case ue.IN_TABLE_BODY:case ue.IN_ROW:case ue.IN_CELL:case ue.IN_SELECT:case ue.IN_SELECT_IN_TABLE:{Tj(this,r);break}case ue.TEXT:{j3e(this,r);break}case ue.IN_TABLE_TEXT:{M1(this,r);break}case ue.IN_TEMPLATE:{Mj(this,r);break}case ue.AFTER_BODY:case ue.IN_FRAMESET:case ue.AFTER_FRAMESET:case ue.AFTER_AFTER_BODY:case ue.AFTER_AFTER_FRAMESET:{f8(this,r);break}}}onWhitespaceCharacter(r){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,r.chars.charCodeAt(0)===se.LINE_FEED)){if(r.chars.length===1)return;r.chars=r.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(r);return}switch(this.insertionMode){case ue.IN_HEAD:case ue.IN_HEAD_NO_SCRIPT:case ue.AFTER_HEAD:case ue.TEXT:case ue.IN_COLUMN_GROUP:case ue.IN_SELECT:case ue.IN_SELECT_IN_TABLE:case ue.IN_FRAMESET:case ue.AFTER_FRAMESET:{this._insertCharacters(r);break}case ue.IN_BODY:case ue.IN_CAPTION:case ue.IN_CELL:case ue.IN_TEMPLATE:case ue.AFTER_BODY:case ue.AFTER_AFTER_BODY:case ue.AFTER_AFTER_FRAMESET:{xj(this,r);break}case ue.IN_TABLE:case ue.IN_TABLE_BODY:case ue.IN_ROW:{m8(this,r);break}case ue.IN_TABLE_TEXT:{Aj(this,r);break}}}}function zve(e,r){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(r.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(r.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Cj(e,r),n}function Ive(e,r){let n=null,o=e.openElements.stackTop;for(;o>=0;o--){const a=e.openElements.items[o];if(a===r.element)break;e._isSpecialElement(a,e.openElements.tagIDs[o])&&(n=a)}return n||(e.openElements.shortenToLength(o<0?0:o),e.activeFormattingElements.removeEntry(r)),n}function Ove(e,r,n){let o=r,a=e.openElements.getCommonAncestor(r);for(let i=0,s=a;s!==n;i++,s=a){a=e.openElements.getCommonAncestor(s);const l=e.activeFormattingElements.getElementEntry(s),c=l&&i>=Pve;!l||c?(c&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(s)):(s=jve(e,l),o===r&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(o),e.treeAdapter.appendChild(s,o),o=s)}return o}function jve(e,r){const n=e.treeAdapter.getNamespaceURI(r.element),o=e.treeAdapter.createElement(r.token.tagName,n,r.token.attrs);return e.openElements.replace(r.element,o),r.element=o,o}function Lve(e,r,n){const o=e.treeAdapter.getTagName(r),a=hf(o);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(r);a===B.TEMPLATE&&i===je.HTML&&(r=e.treeAdapter.getTemplateContent(r)),e.treeAdapter.appendChild(r,n)}}function Bve(e,r,n){const o=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,i=e.treeAdapter.createElement(a.tagName,o,a.attrs);e._adoptNodes(r,i),e.treeAdapter.appendChild(r,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(r,i,a.tagID)}function p8(e,r){for(let n=0;n<$ve;n++){const o=zve(e,r);if(!o)break;const a=Ive(e,o);if(!a)break;e.activeFormattingElements.bookmark=o;const i=Ove(e,a,o.element),s=e.openElements.getCommonAncestor(o.element);e.treeAdapter.detachNode(i),s&&Lve(e,s,i),Bve(e,a,o)}}function h8(e,r){e._appendCommentNode(r,e.openElements.currentTmplContentOrNode)}function Fve(e,r){e._appendCommentNode(r,e.openElements.items[0])}function Hve(e,r){e._appendCommentNode(r,e.document)}function f8(e,r){if(e.stopped=!0,r.location){const n=e.fragmentContext?0:2;for(let o=e.openElements.stackTop;o>=n;o--)e._setEndLocation(e.openElements.items[o],r);if(!e.fragmentContext&&e.openElements.stackTop>=0){const o=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(o);if(a&&!a.endTag&&(e._setEndLocation(o,r),e.openElements.stackTop>=1)){const i=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(i);s&&!s.endTag&&e._setEndLocation(i,r)}}}}function Vve(e,r){e._setDocumentType(r);const n=r.forceQuirks?di.QUIRKS:vve(r);bve(r)||e._err(r,Ae.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=ue.BEFORE_HTML}function C1(e,r){e._err(r,Ae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,di.QUIRKS),e.insertionMode=ue.BEFORE_HTML,e._processToken(r)}function qve(e,r){r.tagID===B.HTML?(e._insertElement(r,je.HTML),e.insertionMode=ue.BEFORE_HEAD):T1(e,r)}function Uve(e,r){const n=r.tagID;(n===B.HTML||n===B.HEAD||n===B.BODY||n===B.BR)&&T1(e,r)}function T1(e,r){e._insertFakeRootElement(),e.insertionMode=ue.BEFORE_HEAD,e._processToken(r)}function Wve(e,r){switch(r.tagID){case B.HTML:{Po(e,r);break}case B.HEAD:{e._insertElement(r,je.HTML),e.headElement=e.openElements.current,e.insertionMode=ue.IN_HEAD;break}default:A1(e,r)}}function Yve(e,r){const n=r.tagID;n===B.HEAD||n===B.BODY||n===B.HTML||n===B.BR?A1(e,r):e._err(r,Ae.endTagWithoutMatchingOpenElement)}function A1(e,r){e._insertFakeElement(ve.HEAD,B.HEAD),e.headElement=e.openElements.current,e.insertionMode=ue.IN_HEAD,e._processToken(r)}function es(e,r){switch(r.tagID){case B.HTML:{Po(e,r);break}case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:{e._appendElement(r,je.HTML),r.ackSelfClosing=!0;break}case B.TITLE:{e._switchToTextParsing(r,kn.RCDATA);break}case B.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(r,kn.RAWTEXT):(e._insertElement(r,je.HTML),e.insertionMode=ue.IN_HEAD_NO_SCRIPT);break}case B.NOFRAMES:case B.STYLE:{e._switchToTextParsing(r,kn.RAWTEXT);break}case B.SCRIPT:{e._switchToTextParsing(r,kn.SCRIPT_DATA);break}case B.TEMPLATE:{e._insertTemplate(r),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=ue.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(ue.IN_TEMPLATE);break}case B.HEAD:{e._err(r,Ae.misplacedStartTagForHeadElement);break}default:R1(e,r)}}function Gve(e,r){switch(r.tagID){case B.HEAD:{e.openElements.pop(),e.insertionMode=ue.AFTER_HEAD;break}case B.BODY:case B.BR:case B.HTML:{R1(e,r);break}case B.TEMPLATE:{qu(e,r);break}default:e._err(r,Ae.endTagWithoutMatchingOpenElement)}}function qu(e,r){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==B.TEMPLATE&&e._err(r,Ae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(B.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(r,Ae.endTagWithoutMatchingOpenElement)}function R1(e,r){e.openElements.pop(),e.insertionMode=ue.AFTER_HEAD,e._processToken(r)}function Xve(e,r){switch(r.tagID){case B.HTML:{Po(e,r);break}case B.BASEFONT:case B.BGSOUND:case B.HEAD:case B.LINK:case B.META:case B.NOFRAMES:case B.STYLE:{es(e,r);break}case B.NOSCRIPT:{e._err(r,Ae.nestedNoscriptInHead);break}default:N1(e,r)}}function Kve(e,r){switch(r.tagID){case B.NOSCRIPT:{e.openElements.pop(),e.insertionMode=ue.IN_HEAD;break}case B.BR:{N1(e,r);break}default:e._err(r,Ae.endTagWithoutMatchingOpenElement)}}function N1(e,r){const n=r.type===Kt.EOF?Ae.openElementsLeftAfterEof:Ae.disallowedContentInNoscriptInHead;e._err(r,n),e.openElements.pop(),e.insertionMode=ue.IN_HEAD,e._processToken(r)}function Zve(e,r){switch(r.tagID){case B.HTML:{Po(e,r);break}case B.BODY:{e._insertElement(r,je.HTML),e.framesetOk=!1,e.insertionMode=ue.IN_BODY;break}case B.FRAMESET:{e._insertElement(r,je.HTML),e.insertionMode=ue.IN_FRAMESET;break}case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:case B.NOFRAMES:case B.SCRIPT:case B.STYLE:case B.TEMPLATE:case B.TITLE:{e._err(r,Ae.abandonedHeadElementChild),e.openElements.push(e.headElement,B.HEAD),es(e,r),e.openElements.remove(e.headElement);break}case B.HEAD:{e._err(r,Ae.misplacedStartTagForHeadElement);break}default:D1(e,r)}}function Qve(e,r){switch(r.tagID){case B.BODY:case B.HTML:case B.BR:{D1(e,r);break}case B.TEMPLATE:{qu(e,r);break}default:e._err(r,Ae.endTagWithoutMatchingOpenElement)}}function D1(e,r){e._insertFakeElement(ve.BODY,B.BODY),e.insertionMode=ue.IN_BODY,p3(e,r)}function p3(e,r){switch(r.type){case Kt.CHARACTER:{wj(e,r);break}case Kt.WHITESPACE_CHARACTER:{xj(e,r);break}case Kt.COMMENT:{h8(e,r);break}case Kt.START_TAG:{Po(e,r);break}case Kt.END_TAG:{h3(e,r);break}case Kt.EOF:{Tj(e,r);break}}}function xj(e,r){e._reconstructActiveFormattingElements(),e._insertCharacters(r)}function wj(e,r){e._reconstructActiveFormattingElements(),e._insertCharacters(r),e.framesetOk=!1}function Jve(e,r){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],r.attrs)}function e3e(e,r){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,r.attrs))}function t3e(e,r){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(r,je.HTML),e.insertionMode=ue.IN_FRAMESET)}function r3e(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML)}function n3e(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),c8.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(r,je.HTML)}function o3e(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function a3e(e,r){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML),n||(e.formElement=e.openElements.current))}function i3e(e,r){e.framesetOk=!1;const n=r.tagID;for(let o=e.openElements.stackTop;o>=0;o--){const a=e.openElements.tagIDs[o];if(n===B.LI&&a===B.LI||(n===B.DD||n===B.DT)&&(a===B.DD||a===B.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==B.ADDRESS&&a!==B.DIV&&a!==B.P&&e._isSpecialElement(e.openElements.items[o],a))break}e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML)}function s3e(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML),e.tokenizer.state=kn.PLAINTEXT}function l3e(e,r){e.openElements.hasInScope(B.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(B.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML),e.framesetOk=!1}function c3e(e,r){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(ve.A);n&&(p8(e,r),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML),e.activeFormattingElements.pushElement(e.openElements.current,r)}function d3e(e,r){e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML),e.activeFormattingElements.pushElement(e.openElements.current,r)}function u3e(e,r){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(B.NOBR)&&(p8(e,r),e._reconstructActiveFormattingElements()),e._insertElement(r,je.HTML),e.activeFormattingElements.pushElement(e.openElements.current,r)}function p3e(e,r){e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function h3e(e,r){e.treeAdapter.getDocumentMode(e.document)!==di.QUIRKS&&e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._insertElement(r,je.HTML),e.framesetOk=!1,e.insertionMode=ue.IN_TABLE}function kj(e,r){e._reconstructActiveFormattingElements(),e._appendElement(r,je.HTML),e.framesetOk=!1,r.ackSelfClosing=!0}function _j(e){const r=QO(e,Vu.TYPE);return r!=null&&r.toLowerCase()===Dve}function f3e(e,r){e._reconstructActiveFormattingElements(),e._appendElement(r,je.HTML),_j(r)||(e.framesetOk=!1),r.ackSelfClosing=!0}function m3e(e,r){e._appendElement(r,je.HTML),r.ackSelfClosing=!0}function g3e(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._appendElement(r,je.HTML),e.framesetOk=!1,r.ackSelfClosing=!0}function y3e(e,r){r.tagName=ve.IMG,r.tagID=B.IMG,kj(e,r)}function b3e(e,r){e._insertElement(r,je.HTML),e.skipNextNewLine=!0,e.tokenizer.state=kn.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=ue.TEXT}function v3e(e,r){e.openElements.hasInButtonScope(B.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(r,kn.RAWTEXT)}function x3e(e,r){e.framesetOk=!1,e._switchToTextParsing(r,kn.RAWTEXT)}function Ej(e,r){e._switchToTextParsing(r,kn.RAWTEXT)}function w3e(e,r){e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===ue.IN_TABLE||e.insertionMode===ue.IN_CAPTION||e.insertionMode===ue.IN_TABLE_BODY||e.insertionMode===ue.IN_ROW||e.insertionMode===ue.IN_CELL?ue.IN_SELECT_IN_TABLE:ue.IN_SELECT}function k3e(e,r){e.openElements.currentTagId===B.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML)}function _3e(e,r){e.openElements.hasInScope(B.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(r,je.HTML)}function E3e(e,r){e.openElements.hasInScope(B.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(B.RTC),e._insertElement(r,je.HTML)}function S3e(e,r){e._reconstructActiveFormattingElements(),mj(r),u8(r),r.selfClosing?e._appendElement(r,je.MATHML):e._insertElement(r,je.MATHML),r.ackSelfClosing=!0}function C3e(e,r){e._reconstructActiveFormattingElements(),gj(r),u8(r),r.selfClosing?e._appendElement(r,je.SVG):e._insertElement(r,je.SVG),r.ackSelfClosing=!0}function Sj(e,r){e._reconstructActiveFormattingElements(),e._insertElement(r,je.HTML)}function Po(e,r){switch(r.tagID){case B.I:case B.S:case B.B:case B.U:case B.EM:case B.TT:case B.BIG:case B.CODE:case B.FONT:case B.SMALL:case B.STRIKE:case B.STRONG:{d3e(e,r);break}case B.A:{c3e(e,r);break}case B.H1:case B.H2:case B.H3:case B.H4:case B.H5:case B.H6:{n3e(e,r);break}case B.P:case B.DL:case B.OL:case B.UL:case B.DIV:case B.DIR:case B.NAV:case B.MAIN:case B.MENU:case B.ASIDE:case B.CENTER:case B.FIGURE:case B.FOOTER:case B.HEADER:case B.HGROUP:case B.DIALOG:case B.DETAILS:case B.ADDRESS:case B.ARTICLE:case B.SEARCH:case B.SECTION:case B.SUMMARY:case B.FIELDSET:case B.BLOCKQUOTE:case B.FIGCAPTION:{r3e(e,r);break}case B.LI:case B.DD:case B.DT:{i3e(e,r);break}case B.BR:case B.IMG:case B.WBR:case B.AREA:case B.EMBED:case B.KEYGEN:{kj(e,r);break}case B.HR:{g3e(e,r);break}case B.RB:case B.RTC:{_3e(e,r);break}case B.RT:case B.RP:{E3e(e,r);break}case B.PRE:case B.LISTING:{o3e(e,r);break}case B.XMP:{v3e(e,r);break}case B.SVG:{C3e(e,r);break}case B.HTML:{Jve(e,r);break}case B.BASE:case B.LINK:case B.META:case B.STYLE:case B.TITLE:case B.SCRIPT:case B.BGSOUND:case B.BASEFONT:case B.TEMPLATE:{es(e,r);break}case B.BODY:{e3e(e,r);break}case B.FORM:{a3e(e,r);break}case B.NOBR:{u3e(e,r);break}case B.MATH:{S3e(e,r);break}case B.TABLE:{h3e(e,r);break}case B.INPUT:{f3e(e,r);break}case B.PARAM:case B.TRACK:case B.SOURCE:{m3e(e,r);break}case B.IMAGE:{y3e(e,r);break}case B.BUTTON:{l3e(e,r);break}case B.APPLET:case B.OBJECT:case B.MARQUEE:{p3e(e,r);break}case B.IFRAME:{x3e(e,r);break}case B.SELECT:{w3e(e,r);break}case B.OPTION:case B.OPTGROUP:{k3e(e,r);break}case B.NOEMBED:case B.NOFRAMES:{Ej(e,r);break}case B.FRAMESET:{t3e(e,r);break}case B.TEXTAREA:{b3e(e,r);break}case B.NOSCRIPT:{e.options.scriptingEnabled?Ej(e,r):Sj(e,r);break}case B.PLAINTEXT:{s3e(e,r);break}case B.COL:case B.TH:case B.TD:case B.TR:case B.HEAD:case B.FRAME:case B.TBODY:case B.TFOOT:case B.THEAD:case B.CAPTION:case B.COLGROUP:break;default:Sj(e,r)}}function T3e(e,r){if(e.openElements.hasInScope(B.BODY)&&(e.insertionMode=ue.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,r)}}function A3e(e,r){e.openElements.hasInScope(B.BODY)&&(e.insertionMode=ue.AFTER_BODY,zj(e,r))}function R3e(e,r){const n=r.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function N3e(e){const r=e.openElements.tmplCount>0,{formElement:n}=e;r||(e.formElement=null),(n||r)&&e.openElements.hasInScope(B.FORM)&&(e.openElements.generateImpliedEndTags(),r?e.openElements.popUntilTagNamePopped(B.FORM):n&&e.openElements.remove(n))}function D3e(e){e.openElements.hasInButtonScope(B.P)||e._insertFakeElement(ve.P,B.P),e._closePElement()}function $3e(e){e.openElements.hasInListItemScope(B.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(B.LI),e.openElements.popUntilTagNamePopped(B.LI))}function P3e(e,r){const n=r.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function M3e(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function z3e(e,r){const n=r.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function I3e(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ve.BR,B.BR),e.openElements.pop(),e.framesetOk=!1}function Cj(e,r){const n=r.tagName,o=r.tagID;for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a],s=e.openElements.tagIDs[a];if(o===s&&(o!==B.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(i,s))break}}function h3(e,r){switch(r.tagID){case B.A:case B.B:case B.I:case B.S:case B.U:case B.EM:case B.TT:case B.BIG:case B.CODE:case B.FONT:case B.NOBR:case B.SMALL:case B.STRIKE:case B.STRONG:{p8(e,r);break}case B.P:{D3e(e);break}case B.DL:case B.UL:case B.OL:case B.DIR:case B.DIV:case B.NAV:case B.PRE:case B.MAIN:case B.MENU:case B.ASIDE:case B.BUTTON:case B.CENTER:case B.FIGURE:case B.FOOTER:case B.HEADER:case B.HGROUP:case B.DIALOG:case B.ADDRESS:case B.ARTICLE:case B.DETAILS:case B.SEARCH:case B.SECTION:case B.SUMMARY:case B.LISTING:case B.FIELDSET:case B.BLOCKQUOTE:case B.FIGCAPTION:{R3e(e,r);break}case B.LI:{$3e(e);break}case B.DD:case B.DT:{P3e(e,r);break}case B.H1:case B.H2:case B.H3:case B.H4:case B.H5:case B.H6:{M3e(e);break}case B.BR:{I3e(e);break}case B.BODY:{T3e(e,r);break}case B.HTML:{A3e(e,r);break}case B.FORM:{N3e(e);break}case B.APPLET:case B.OBJECT:case B.MARQUEE:{z3e(e,r);break}case B.TEMPLATE:{qu(e,r);break}default:Cj(e,r)}}function Tj(e,r){e.tmplInsertionModeStack.length>0?Mj(e,r):f8(e,r)}function O3e(e,r){var n;r.tagID===B.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function j3e(e,r){e._err(r,Ae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(r)}function m8(e,r){if(yj.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=ue.IN_TABLE_TEXT,r.type){case Kt.CHARACTER:{Rj(e,r);break}case Kt.WHITESPACE_CHARACTER:{Aj(e,r);break}}else P1(e,r)}function L3e(e,r){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(r,je.HTML),e.insertionMode=ue.IN_CAPTION}function B3e(e,r){e.openElements.clearBackToTableContext(),e._insertElement(r,je.HTML),e.insertionMode=ue.IN_COLUMN_GROUP}function F3e(e,r){e.openElements.clearBackToTableContext(),e._insertFakeElement(ve.COLGROUP,B.COLGROUP),e.insertionMode=ue.IN_COLUMN_GROUP,g8(e,r)}function H3e(e,r){e.openElements.clearBackToTableContext(),e._insertElement(r,je.HTML),e.insertionMode=ue.IN_TABLE_BODY}function V3e(e,r){e.openElements.clearBackToTableContext(),e._insertFakeElement(ve.TBODY,B.TBODY),e.insertionMode=ue.IN_TABLE_BODY,m3(e,r)}function q3e(e,r){e.openElements.hasInTableScope(B.TABLE)&&(e.openElements.popUntilTagNamePopped(B.TABLE),e._resetInsertionMode(),e._processStartTag(r))}function U3e(e,r){_j(r)?e._appendElement(r,je.HTML):P1(e,r),r.ackSelfClosing=!0}function W3e(e,r){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(r,je.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ff(e,r){switch(r.tagID){case B.TD:case B.TH:case B.TR:{V3e(e,r);break}case B.STYLE:case B.SCRIPT:case B.TEMPLATE:{es(e,r);break}case B.COL:{F3e(e,r);break}case B.FORM:{W3e(e,r);break}case B.TABLE:{q3e(e,r);break}case B.TBODY:case B.TFOOT:case B.THEAD:{H3e(e,r);break}case B.INPUT:{U3e(e,r);break}case B.CAPTION:{L3e(e,r);break}case B.COLGROUP:{B3e(e,r);break}default:P1(e,r)}}function $1(e,r){switch(r.tagID){case B.TABLE:{e.openElements.hasInTableScope(B.TABLE)&&(e.openElements.popUntilTagNamePopped(B.TABLE),e._resetInsertionMode());break}case B.TEMPLATE:{qu(e,r);break}case B.BODY:case B.CAPTION:case B.COL:case B.COLGROUP:case B.HTML:case B.TBODY:case B.TD:case B.TFOOT:case B.TH:case B.THEAD:case B.TR:break;default:P1(e,r)}}function P1(e,r){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,p3(e,r),e.fosterParentingEnabled=n}function Aj(e,r){e.pendingCharacterTokens.push(r)}function Rj(e,r){e.pendingCharacterTokens.push(r),e.hasNonWhitespacePendingCharacterToken=!0}function M1(e,r){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===B.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===B.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===B.OPTGROUP&&e.openElements.pop();break}case B.OPTION:{e.openElements.currentTagId===B.OPTION&&e.openElements.pop();break}case B.SELECT:{e.openElements.hasInSelectScope(B.SELECT)&&(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode());break}case B.TEMPLATE:{qu(e,r);break}}}function Q3e(e,r){const n=r.tagID;n===B.CAPTION||n===B.TABLE||n===B.TBODY||n===B.TFOOT||n===B.THEAD||n===B.TR||n===B.TD||n===B.TH?(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode(),e._processStartTag(r)):$j(e,r)}function J3e(e,r){const n=r.tagID;n===B.CAPTION||n===B.TABLE||n===B.TBODY||n===B.TFOOT||n===B.THEAD||n===B.TR||n===B.TD||n===B.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(B.SELECT),e._resetInsertionMode(),e.onEndTag(r)):Pj(e,r)}function exe(e,r){switch(r.tagID){case B.BASE:case B.BASEFONT:case B.BGSOUND:case B.LINK:case B.META:case B.NOFRAMES:case B.SCRIPT:case B.STYLE:case B.TEMPLATE:case B.TITLE:{es(e,r);break}case B.CAPTION:case B.COLGROUP:case B.TBODY:case B.TFOOT:case B.THEAD:{e.tmplInsertionModeStack[0]=ue.IN_TABLE,e.insertionMode=ue.IN_TABLE,ff(e,r);break}case B.COL:{e.tmplInsertionModeStack[0]=ue.IN_COLUMN_GROUP,e.insertionMode=ue.IN_COLUMN_GROUP,g8(e,r);break}case B.TR:{e.tmplInsertionModeStack[0]=ue.IN_TABLE_BODY,e.insertionMode=ue.IN_TABLE_BODY,m3(e,r);break}case B.TD:case B.TH:{e.tmplInsertionModeStack[0]=ue.IN_ROW,e.insertionMode=ue.IN_ROW,g3(e,r);break}default:e.tmplInsertionModeStack[0]=ue.IN_BODY,e.insertionMode=ue.IN_BODY,Po(e,r)}}function txe(e,r){r.tagID===B.TEMPLATE&&qu(e,r)}function Mj(e,r){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(B.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(r)):f8(e,r)}function rxe(e,r){r.tagID===B.HTML?Po(e,r):y3(e,r)}function zj(e,r){var n;if(r.tagID===B.HTML){if(e.fragmentContext||(e.insertionMode=ue.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===B.HTML){e._setEndLocation(e.openElements.items[0],r);const o=e.openElements.items[1];o&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(o))===null||n===void 0)&&n.endTag)&&e._setEndLocation(o,r)}}else y3(e,r)}function y3(e,r){e.insertionMode=ue.IN_BODY,p3(e,r)}function nxe(e,r){switch(r.tagID){case B.HTML:{Po(e,r);break}case B.FRAMESET:{e._insertElement(r,je.HTML);break}case B.FRAME:{e._appendElement(r,je.HTML),r.ackSelfClosing=!0;break}case B.NOFRAMES:{es(e,r);break}}}function oxe(e,r){r.tagID===B.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==B.FRAMESET&&(e.insertionMode=ue.AFTER_FRAMESET))}function axe(e,r){switch(r.tagID){case B.HTML:{Po(e,r);break}case B.NOFRAMES:{es(e,r);break}}}function ixe(e,r){r.tagID===B.HTML&&(e.insertionMode=ue.AFTER_AFTER_FRAMESET)}function sxe(e,r){r.tagID===B.HTML?Po(e,r):b3(e,r)}function b3(e,r){e.insertionMode=ue.IN_BODY,p3(e,r)}function lxe(e,r){switch(r.tagID){case B.HTML:{Po(e,r);break}case B.NOFRAMES:{es(e,r);break}}}function cxe(e,r){r.chars=Xr,e._insertCharacters(r)}function dxe(e,r){e._insertCharacters(r),e.framesetOk=!1}function Ij(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==je.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function uxe(e,r){if(Cve(r))Ij(e),e._startTagOutsideForeignContent(r);else{const n=e._getAdjustedCurrentElement(),o=e.treeAdapter.getNamespaceURI(n);o===je.MATHML?mj(r):o===je.SVG&&(Tve(r),gj(r)),u8(r),r.selfClosing?e._appendElement(r,o):e._insertElement(r,o),r.ackSelfClosing=!0}}function pxe(e,r){if(r.tagID===B.P||r.tagID===B.BR){Ij(e),e._endTagOutsideForeignContent(r);return}for(let n=e.openElements.stackTop;n>0;n--){const o=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(o)===je.HTML){e._endTagOutsideForeignContent(r);break}const a=e.treeAdapter.getTagName(o);if(a.toLowerCase()===r.tagName){r.tagName=a,e.openElements.shortenToLength(n);break}}}ve.AREA,ve.BASE,ve.BASEFONT,ve.BGSOUND,ve.BR,ve.COL,ve.EMBED,ve.FRAME,ve.HR,ve.IMG,ve.INPUT,ve.KEYGEN,ve.LINK,ve.META,ve.PARAM,ve.SOURCE,ve.TRACK,ve.WBR;const v3=Oj("end"),rc=Oj("start");function Oj(e){return r;function r(n){const o=n&&n.position&&n.position[e]||{};if(typeof o.line=="number"&&o.line>0&&typeof o.column=="number"&&o.column>0)return{line:o.line,column:o.column,offset:typeof o.offset=="number"&&o.offset>-1?o.offset:void 0}}}function jj(e){const r=rc(e),n=v3(e);if(r&&n)return{start:r,end:n}}const x3=(function(e){if(e==null)return gxe;if(typeof e=="function")return w3(e);if(typeof e=="object")return Array.isArray(e)?hxe(e):fxe(e);if(typeof e=="string")return mxe(e);throw new Error("Expected function, string, or object as test")});function hxe(e){const r=[];let n=-1;for(;++n":""))+")"})}return f;function f(){let g=Lj,b,x,w;if((!r||i(c,d,u[u.length-1]||void 0))&&(g=xxe(n(c,u)),g[0]===b8))return g;if("children"in c&&c.children){const k=c;if(k.children&&g[0]!==vxe)for(x=(o?k.children.length:-1)+s,w=u.concat(k);x>-1&&x])/gi,kxe=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Fj={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Hj(e,r){const n=$xe(e),o=a8("type",{handlers:{root:_xe,element:Exe,text:Sxe,comment:qj,doctype:Cxe,raw:Axe},unknown:Rxe}),a={parser:n?new vj(Fj):vj.getFragmentParser(void 0,Fj),handle(l){o(l,a)},stitches:!1,options:r||{}};o(e,a),mf(a,rc());const i=n?a.parser.document:a.parser.getFragment(),s=gbe(i,{file:a.options.file});return a.stitches&&v8(s,"comment",function(l,c,d){const u=l;if(u.value.stitch&&d&&c!==void 0){const h=d.children;return h[c]=u.value.stitch,c}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Vj(e,r){let n=-1;if(e)for(;++n4&&(r.parser.tokenizer.state=0);const n={type:Kt.CHARACTER,chars:e.value,location:z1(e)};mf(r,rc(e)),r.parser.currentToken=n,r.parser._processToken(r.parser.currentToken)}function Cxe(e,r){const n={type:Kt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:z1(e)};mf(r,rc(e)),r.parser.currentToken=n,r.parser._processToken(r.parser.currentToken)}function Txe(e,r){r.stitches=!0;const n=Pxe(e);if("children"in e&&"children"in n){const o=Hj({type:"root",children:e.children},r.options);n.children=o.children}qj({type:"comment",value:{stitch:n}},r)}function qj(e,r){const n=e.value,o={type:Kt.COMMENT,data:n,location:z1(e)};mf(r,rc(e)),r.parser.currentToken=o,r.parser._processToken(r.parser.currentToken)}function Axe(e,r){if(r.parser.tokenizer.preprocessor.html="",r.parser.tokenizer.preprocessor.pos=-1,r.parser.tokenizer.preprocessor.lastGapPos=-2,r.parser.tokenizer.preprocessor.gapStack=[],r.parser.tokenizer.preprocessor.skipNextNewLine=!1,r.parser.tokenizer.preprocessor.lastChunkWritten=!1,r.parser.tokenizer.preprocessor.endOfChunkHit=!1,r.parser.tokenizer.preprocessor.isEol=!1,Uj(r,rc(e)),r.parser.tokenizer.write(r.options.tagfilter?e.value.replace(wxe,"<$1$2"):e.value,!1),r.parser.tokenizer._runParsingLoop(),r.parser.tokenizer.state===72||r.parser.tokenizer.state===78){r.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=r.parser.tokenizer._consume();r.parser.tokenizer._callState(n)}}function Rxe(e,r){const n=e;if(r.options.passThrough&&r.options.passThrough.includes(n.type))Txe(n,r);else{let o="";throw kxe.has(n.type)&&(o=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+o)}}function mf(e,r){Uj(e,r);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=kn.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Uj(e,r){if(r&&r.offset!==void 0){const n={startLine:r.line,startCol:r.column,startOffset:r.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-r.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=r.offset,e.parser.tokenizer.preprocessor.line=r.line,e.parser.tokenizer.currentLocation=n}}function Nxe(e,r){const n=e.tagName.toLowerCase();if(r.parser.tokenizer.state===kn.PLAINTEXT)return;mf(r,rc(e));const o=r.parser.openElements.current;let a="namespaceURI"in o?o.namespaceURI:Fu.html;a===Fu.html&&n==="svg"&&(a=Fu.svg);const i=Dbe({...e,children:[]},{space:a===Fu.svg?"svg":"html"}),s={type:Kt.START_TAG,tagName:n,tagID:hf(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:z1(e)};r.parser.currentToken=s,r.parser._processToken(r.parser.currentToken),r.parser.tokenizer.lastStartTagName=n}function Dxe(e,r){const n=e.tagName.toLowerCase();if(!r.parser.tokenizer.inForeignNode&&GO.includes(n)||r.parser.tokenizer.state===kn.PLAINTEXT)return;mf(r,v3(e));const o={type:Kt.END_TAG,tagName:n,tagID:hf(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:z1(e)};r.parser.currentToken=o,r.parser._processToken(r.parser.currentToken),n===r.parser.tokenizer.lastStartTagName&&(r.parser.tokenizer.state===kn.RCDATA||r.parser.tokenizer.state===kn.RAWTEXT||r.parser.tokenizer.state===kn.SCRIPT_DATA)&&(r.parser.tokenizer.state=kn.DATA)}function $xe(e){const r=e.type==="root"?e.children[0]:e;return!!(r&&(r.type==="doctype"||r.type==="element"&&r.tagName.toLowerCase()==="html"))}function z1(e){const r=rc(e)||{line:void 0,column:void 0,offset:void 0},n=v3(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:r.line,startCol:r.column,startOffset:r.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Pxe(e){return"children"in e?Lu({...e,children:[]}):Lu(e)}function Mxe(e){return function(r,n){return Hj(r,{...e,file:n})}}const Uu=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Wj={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Uu,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Uu],h2:[["className","sr-only"]],img:[...Uu,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Uu,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Uu],table:[...Uu],ul:[...Uu,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},fd={}.hasOwnProperty;function zxe(e,r){let n={type:"root",children:[]};const o={schema:r?{...Wj,...r}:Wj,stack:[]},a=Yj(o,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function Yj(e,r){if(r&&typeof r=="object"){const n=r;switch(typeof n.type=="string"?n.type:""){case"comment":return Ixe(e,n);case"doctype":return Oxe(e,n);case"element":return jxe(e,n);case"root":return Lxe(e,n);case"text":return Bxe(e,n)}}}function Ixe(e,r){if(e.schema.allowComments){const n=typeof r.value=="string"?r.value:"",o=n.indexOf("-->"),i={type:"comment",value:o<0?n:n.slice(0,o)};return I1(i,r),i}}function Oxe(e,r){if(e.schema.allowDoctypes){const n={type:"doctype"};return I1(n,r),n}}function jxe(e,r){const n=typeof r.tagName=="string"?r.tagName:"";e.stack.push(n);const o=Gj(e,r.children),a=Fxe(e,r.properties);e.stack.pop();let i=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&fd.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let c=-1;for(i=!1;++c1){let a=!1,i=0;for(;++i-1&&i>c||s>-1&&i>s||l>-1&&i>l)return!0;let d=-1;for(;++d4&&r.slice(0,4).toLowerCase()==="data")return n}function qxe(e){return function(r){return zxe(r,e)}}const Uxe=/["&'<>`]/g,Wxe=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Yxe=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Gxe=/[|\\{}()[\]^$+*?.]/g,Qj=new WeakMap;function Xxe(e,r){if(e=e.replace(r.subset?Kxe(r.subset):Uxe,o),r.subset||r.escapeOnly)return e;return e.replace(Wxe,n).replace(Yxe,o);function n(a,i,s){return r.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),r)}function o(a,i,s){return r.format(a.charCodeAt(0),s.charCodeAt(i+1),r)}}function Kxe(e){let r=Qj.get(e);return r||(r=Zxe(e),Qj.set(e,r)),r}function Zxe(e){const r=[];let n=-1;for(;++n",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},n2e=["cent","copy","divide","gt","lt","not","para","times"],Jj={}.hasOwnProperty,w8={};let k3;for(k3 in x8)Jj.call(x8,k3)&&(w8[x8[k3]]=k3);const o2e=/[^\dA-Za-z]/;function a2e(e,r,n,o){const a=String.fromCharCode(e);if(Jj.call(w8,a)){const i=w8[a],s="&"+i;return n&&r2e.includes(i)&&!n2e.includes(i)&&(!o||r&&r!==61&&o2e.test(String.fromCharCode(r)))?s:s+";"}return""}function i2e(e,r,n){let o=Jxe(e,r,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=a2e(e,r,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){const i=t2e(e,r,n.omitOptionalSemicolons);i.length|^->||--!>|"],c2e=["<",">"];function d2e(e,r,n,o){return o.settings.bogusComments?""+gf(e.value,Object.assign({},o.settings.characterReferences,{subset:l2e}))+">":"";function a(i){return gf(i,Object.assign({},o.settings.characterReferences,{subset:c2e}))}}function u2e(e,r,n,o){return""}function _3(e,r){const n=String(e);if(typeof r!="string")throw new TypeError("Expected character");let o=0,a=n.indexOf(r);for(;a!==-1;)o++,a=n.indexOf(r,a+r.length);return o}const p2e=/[ \t\n\f\r]/g;function k8(e){return typeof e=="object"?e.type==="text"?eL(e.value):!1:eL(e)}function eL(e){return e.replace(p2e,"")===""}const Gn=rL(1),tL=rL(-1),h2e=[];function rL(e){return r;function r(n,o,a){const i=n?n.children:h2e;let s=(o||0)+e,l=i[s];if(!a)for(;l&&k8(l);)s+=e,l=i[s];return l}}const f2e={}.hasOwnProperty;function nL(e){return r;function r(n,o,a){return f2e.call(e,n.tagName)&&e[n.tagName](n,o,a)}}const _8=nL({body:g2e,caption:E8,colgroup:E8,dd:x2e,dt:v2e,head:E8,html:m2e,li:b2e,optgroup:w2e,option:k2e,p:y2e,rp:oL,rt:oL,tbody:E2e,td:aL,tfoot:S2e,th:aL,thead:_2e,tr:C2e});function E8(e,r,n){const o=Gn(n,r,!0);return!o||o.type!=="comment"&&!(o.type==="text"&&k8(o.value.charAt(0)))}function m2e(e,r,n){const o=Gn(n,r);return!o||o.type!=="comment"}function g2e(e,r,n){const o=Gn(n,r);return!o||o.type!=="comment"}function y2e(e,r,n){const o=Gn(n,r);return o?o.type==="element"&&(o.tagName==="address"||o.tagName==="article"||o.tagName==="aside"||o.tagName==="blockquote"||o.tagName==="details"||o.tagName==="div"||o.tagName==="dl"||o.tagName==="fieldset"||o.tagName==="figcaption"||o.tagName==="figure"||o.tagName==="footer"||o.tagName==="form"||o.tagName==="h1"||o.tagName==="h2"||o.tagName==="h3"||o.tagName==="h4"||o.tagName==="h5"||o.tagName==="h6"||o.tagName==="header"||o.tagName==="hgroup"||o.tagName==="hr"||o.tagName==="main"||o.tagName==="menu"||o.tagName==="nav"||o.tagName==="ol"||o.tagName==="p"||o.tagName==="pre"||o.tagName==="section"||o.tagName==="table"||o.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function b2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&o.tagName==="li"}function v2e(e,r,n){const o=Gn(n,r);return!!(o&&o.type==="element"&&(o.tagName==="dt"||o.tagName==="dd"))}function x2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&(o.tagName==="dt"||o.tagName==="dd")}function oL(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&(o.tagName==="rp"||o.tagName==="rt")}function w2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&o.tagName==="optgroup"}function k2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&(o.tagName==="option"||o.tagName==="optgroup")}function _2e(e,r,n){const o=Gn(n,r);return!!(o&&o.type==="element"&&(o.tagName==="tbody"||o.tagName==="tfoot"))}function E2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&(o.tagName==="tbody"||o.tagName==="tfoot")}function S2e(e,r,n){return!Gn(n,r)}function C2e(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&o.tagName==="tr"}function aL(e,r,n){const o=Gn(n,r);return!o||o.type==="element"&&(o.tagName==="td"||o.tagName==="th")}const T2e=nL({body:N2e,colgroup:D2e,head:R2e,html:A2e,tbody:$2e});function A2e(e){const r=Gn(e,-1);return!r||r.type!=="comment"}function R2e(e){const r=new Set;for(const o of e.children)if(o.type==="element"&&(o.tagName==="base"||o.tagName==="title")){if(r.has(o.tagName))return!1;r.add(o.tagName)}const n=e.children[0];return!n||n.type==="element"}function N2e(e){const r=Gn(e,-1,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&k8(r.value.charAt(0)))&&!(r.type==="element"&&(r.tagName==="meta"||r.tagName==="link"||r.tagName==="script"||r.tagName==="style"||r.tagName==="template"))}function D2e(e,r,n){const o=tL(n,r),a=Gn(e,-1,!0);return n&&o&&o.type==="element"&&o.tagName==="colgroup"&&_8(o,n.children.indexOf(o),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function $2e(e,r,n){const o=tL(n,r),a=Gn(e,-1);return n&&o&&o.type==="element"&&(o.tagName==="thead"||o.tagName==="tbody")&&_8(o,n.children.indexOf(o),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const E3={name:[[`
\f\r &/=>`.split(""),`
\f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
@@ -16,43 +16,43 @@ function S1e(e,r){for(var n=0;n`.split(""),`\0
\f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
-\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function M2e(e,r,n,o){const a=o.schema,i=a.space==="svg"?!1:o.settings.omitOptionalTags;let s=a.space==="svg"?o.settings.closeEmptyElements:o.settings.voids.includes(e.tagName.toLowerCase());const l=[];let c;a.space==="html"&&e.tagName==="svg"&&(o.schema=_1);const u=P2e(o,e.properties),d=o.all(a.space==="html"&&e.tagName==="template"?e.content:e);return o.schema=a,d&&(s=!1),(u||!i||!T2e(e,r,n))&&(l.push("<",e.tagName,u?" "+u:""),s&&(a.space==="svg"||o.settings.closeSelfClosing)&&(c=u.charAt(u.length-1),(!o.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(d),!s&&(!i||!_8(e,r,n))&&l.push(""+e.tagName+">"),l.join("")}function P2e(e,r){const n=[];let o=-1,a;if(r){for(a in r)if(r[a]!==null&&r[a]!==void 0){const i=z2e(e,a,r[a]);i&&n.push(i)}}for(;++o_x(n,e.alternative)&&(s=e.alternative),l=s+gf(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?Ex.single:Ex.double)[a][i],attribute:!0}))+s),c+(l&&"="+l))}const I2e=["<","&"];function iL(e,r,n,o){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:gf(e.value,Object.assign({},o.settings.characterReferences,{subset:I2e}))}function O2e(e,r,n,o){return o.settings.allowDangerousHtml?e.value:iL(e,r,n,o)}function j2e(e,r,n,o){return o.all(e)}const L2e=a8("type",{invalid:B2e,unknown:F2e,handlers:{comment:u2e,doctype:d2e,element:M2e,raw:O2e,root:j2e,text:iL}});function B2e(e){throw new Error("Expected node, not `"+e+"`")}function F2e(e){const r=e;throw new Error("Cannot compile unknown node `"+r.type+"`")}const H2e={},V2e={},q2e=[];function U2e(e,r){const n=r||H2e,o=n.quote||'"',a=o==='"'?"'":'"';if(o!=='"'&&o!=="'")throw new Error("Invalid quote `"+o+"`, expected `'` or `\"`");return{one:W2e,all:Y2e,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||GO,characterReferences:n.characterReferences||V2e,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?_1:lx,quote:o,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function W2e(e,r,n){return L2e(e,r,n,this)}function Y2e(e){const r=[],n=e&&e.children||q2e;let o=-1;for(;++o-1&&e.test(String.fromCharCode(n))}}function Q2e(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function J2e(e,r,n){const a=xx((n||{}).ignore||[]),i=ewe(r);let s=-1;for(;++s0?{type:"text",value:R}:void 0),R===!1?f.lastIndex=T+1:(b!==T&&C.push({type:"text",value:u.value.slice(b,T)}),Array.isArray(R)?C.push(...R):R&&C.push(R),b=T+_[0].length,k=!0),!f.global)break;_=f.exec(u.value)}return k?(b?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let n=r[0],o=n.indexOf(")");const a=_x(e,"(");let i=_x(e,")");for(;o!==-1&&a>i;)e+=n.slice(0,o+1),n=n.slice(o+1),o=n.indexOf(")"),i++;return[e,n]}function sL(e,r){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wd(n)||Cx(n))&&(!r||n!==47)}function ts(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}lL.peek=_we;function mwe(){this.buffer()}function gwe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ywe(){this.buffer()}function bwe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function vwe(e){const r=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ts(this.sliceSerialize(e)).toLowerCase(),n.label=r}function xwe(e){this.exit(e)}function wwe(e){const r=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ts(this.sliceSerialize(e)).toLowerCase(),n.label=r}function kwe(e){this.exit(e)}function _we(){return"["}function lL(e,r,n,o){const a=n.createTracker(o);let i=a.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return i+=a.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),s(),i+=a.move("]"),i}function Ewe(){return{enter:{gfmFootnoteCallString:mwe,gfmFootnoteCall:gwe,gfmFootnoteDefinitionLabelString:ywe,gfmFootnoteDefinition:bwe},exit:{gfmFootnoteCallString:vwe,gfmFootnoteCall:xwe,gfmFootnoteDefinitionLabelString:wwe,gfmFootnoteDefinition:kwe}}}function Swe(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:n,footnoteReference:lL},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(o,a,i,s){const l=i.createTracker(s);let c=l.move("[^");const u=i.enter("footnoteDefinition"),d=i.enter("label");return c+=l.move(i.safe(i.associationId(o),{before:c,after:"]"})),d(),c+=l.move("]:"),o.children&&o.children.length>0&&(l.shift(4),c+=l.move((r?`
-`:" ")+i.indentLines(i.containerFlow(o,l.current()),r?cL:Cwe))),u(),c}}function Cwe(e,r,n){return r===0?e:cL(e,r,n)}function cL(e,r,n){return(n?"":" ")+e}const Twe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];uL.peek=$we;function Awe(){return{canContainEols:["delete"],enter:{strikethrough:Nwe},exit:{strikethrough:Dwe}}}function Rwe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Twe}],handlers:{delete:uL}}}function Nwe(e){this.enter({type:"delete",children:[]},e)}function Dwe(e){this.exit(e)}function uL(e,r,n,o){const a=n.createTracker(o),i=n.enter("strikethrough");let s=a.move("~~");return s+=n.containerPhrasing(e,{...a.current(),before:s,after:"~"}),s+=a.move("~~"),i(),s}function $we(){return"~"}function Mwe(e){return e.length}function Pwe(e,r){const n=r||{},o=(n.align||[]).concat(),a=n.stringLength||Mwe,i=[],s=[],l=[],c=[];let u=0,d=-1;for(;++du&&(u=e[d].length);++kc[k])&&(c[k]=_)}x.push(C)}s[d]=x,l[d]=w}let h=-1;if(typeof o=="object"&&"length"in o)for(;++hc[h]&&(c[h]=C),g[h]=C),f[h]=_}s.splice(1,0,f),l.splice(1,0,g),d=-1;const b=[];for(;++d "),i.shift(2);const s=n.indentLines(n.containerFlow(e,i.current()),Owe);return a(),s}function Owe(e,r,n){return">"+(n?"":" ")+e}function jwe(e,r){return pL(e,r.inConstruct,!0)&&!pL(e,r.notInConstruct,!1)}function pL(e,r,n){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return n;let o=-1;for(;++o\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function P2e(e,r,n,o){const a=o.schema,i=a.space==="svg"?!1:o.settings.omitOptionalTags;let s=a.space==="svg"?o.settings.closeEmptyElements:o.settings.voids.includes(e.tagName.toLowerCase());const l=[];let c;a.space==="html"&&e.tagName==="svg"&&(o.schema=_1);const d=M2e(o,e.properties),u=o.all(a.space==="html"&&e.tagName==="template"?e.content:e);return o.schema=a,u&&(s=!1),(d||!i||!T2e(e,r,n))&&(l.push("<",e.tagName,d?" "+d:""),s&&(a.space==="svg"||o.settings.closeSelfClosing)&&(c=d.charAt(d.length-1),(!o.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(u),!s&&(!i||!_8(e,r,n))&&l.push(""+e.tagName+">"),l.join("")}function M2e(e,r){const n=[];let o=-1,a;if(r){for(a in r)if(r[a]!==null&&r[a]!==void 0){const i=z2e(e,a,r[a]);i&&n.push(i)}}for(;++o_3(n,e.alternative)&&(s=e.alternative),l=s+gf(n,Object.assign({},e.settings.characterReferences,{subset:(s==="'"?E3.single:E3.double)[a][i],attribute:!0}))+s),c+(l&&"="+l))}const I2e=["<","&"];function iL(e,r,n,o){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:gf(e.value,Object.assign({},o.settings.characterReferences,{subset:I2e}))}function O2e(e,r,n,o){return o.settings.allowDangerousHtml?e.value:iL(e,r,n,o)}function j2e(e,r,n,o){return o.all(e)}const L2e=a8("type",{invalid:B2e,unknown:F2e,handlers:{comment:d2e,doctype:u2e,element:P2e,raw:O2e,root:j2e,text:iL}});function B2e(e){throw new Error("Expected node, not `"+e+"`")}function F2e(e){const r=e;throw new Error("Cannot compile unknown node `"+r.type+"`")}const H2e={},V2e={},q2e=[];function U2e(e,r){const n=r||H2e,o=n.quote||'"',a=o==='"'?"'":'"';if(o!=='"'&&o!=="'")throw new Error("Invalid quote `"+o+"`, expected `'` or `\"`");return{one:W2e,all:Y2e,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||GO,characterReferences:n.characterReferences||V2e,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?_1:l3,quote:o,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function W2e(e,r,n){return L2e(e,r,n,this)}function Y2e(e){const r=[],n=e&&e.children||q2e;let o=-1;for(;++o-1&&e.test(String.fromCharCode(n))}}function Q2e(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function J2e(e,r,n){const a=x3((n||{}).ignore||[]),i=ewe(r);let s=-1;for(;++s0?{type:"text",value:R}:void 0),R===!1?f.lastIndex=T+1:(b!==T&&C.push({type:"text",value:d.value.slice(b,T)}),Array.isArray(R)?C.push(...R):R&&C.push(R),b=T+_[0].length,k=!0),!f.global)break;_=f.exec(d.value)}return k?(b?\]}]+$/.exec(e);if(!r)return[e,void 0];e=e.slice(0,r.index);let n=r[0],o=n.indexOf(")");const a=_3(e,"(");let i=_3(e,")");for(;o!==-1&&a>i;)e+=n.slice(0,o+1),n=n.slice(o+1),o=n.indexOf(")"),i++;return[e,n]}function sL(e,r){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Wu(n)||C3(n))&&(!r||n!==47)}function ts(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}lL.peek=_we;function mwe(){this.buffer()}function gwe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ywe(){this.buffer()}function bwe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function vwe(e){const r=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ts(this.sliceSerialize(e)).toLowerCase(),n.label=r}function xwe(e){this.exit(e)}function wwe(e){const r=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ts(this.sliceSerialize(e)).toLowerCase(),n.label=r}function kwe(e){this.exit(e)}function _we(){return"["}function lL(e,r,n,o){const a=n.createTracker(o);let i=a.move("[^");const s=n.enter("footnoteReference"),l=n.enter("reference");return i+=a.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),s(),i+=a.move("]"),i}function Ewe(){return{enter:{gfmFootnoteCallString:mwe,gfmFootnoteCall:gwe,gfmFootnoteDefinitionLabelString:ywe,gfmFootnoteDefinition:bwe},exit:{gfmFootnoteCallString:vwe,gfmFootnoteCall:xwe,gfmFootnoteDefinitionLabelString:wwe,gfmFootnoteDefinition:kwe}}}function Swe(e){let r=!1;return e&&e.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:n,footnoteReference:lL},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(o,a,i,s){const l=i.createTracker(s);let c=l.move("[^");const d=i.enter("footnoteDefinition"),u=i.enter("label");return c+=l.move(i.safe(i.associationId(o),{before:c,after:"]"})),u(),c+=l.move("]:"),o.children&&o.children.length>0&&(l.shift(4),c+=l.move((r?`
+`:" ")+i.indentLines(i.containerFlow(o,l.current()),r?cL:Cwe))),d(),c}}function Cwe(e,r,n){return r===0?e:cL(e,r,n)}function cL(e,r,n){return(n?"":" ")+e}const Twe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];dL.peek=$we;function Awe(){return{canContainEols:["delete"],enter:{strikethrough:Nwe},exit:{strikethrough:Dwe}}}function Rwe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Twe}],handlers:{delete:dL}}}function Nwe(e){this.enter({type:"delete",children:[]},e)}function Dwe(e){this.exit(e)}function dL(e,r,n,o){const a=n.createTracker(o),i=n.enter("strikethrough");let s=a.move("~~");return s+=n.containerPhrasing(e,{...a.current(),before:s,after:"~"}),s+=a.move("~~"),i(),s}function $we(){return"~"}function Pwe(e){return e.length}function Mwe(e,r){const n=r||{},o=(n.align||[]).concat(),a=n.stringLength||Pwe,i=[],s=[],l=[],c=[];let d=0,u=-1;for(;++ud&&(d=e[u].length);++kc[k])&&(c[k]=_)}x.push(C)}s[u]=x,l[u]=w}let h=-1;if(typeof o=="object"&&"length"in o)for(;++hc[h]&&(c[h]=C),g[h]=C),f[h]=_}s.splice(1,0,f),l.splice(1,0,g),u=-1;const b=[];for(;++u "),i.shift(2);const s=n.indentLines(n.containerFlow(e,i.current()),Owe);return a(),s}function Owe(e,r,n){return">"+(n?"":" ")+e}function jwe(e,r){return pL(e,r.inConstruct,!0)&&!pL(e,r.notInConstruct,!1)}function pL(e,r,n){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return n;let o=-1;for(;++os&&(s=i):i=1,a=o+r.length,o=n.indexOf(r,a);return s}function Bwe(e,r){return!!(r.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Fwe(e){const r=e.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function Hwe(e,r,n,o){const a=Fwe(n),i=e.value||"",s=a==="`"?"GraveAccent":"Tilde";if(Bwe(e,n)){const h=n.enter("codeIndented"),f=n.indentLines(i,Vwe);return h(),f}const l=n.createTracker(o),c=a.repeat(Math.max(Lwe(i,a)+1,3)),u=n.enter("codeFenced");let d=l.move(c);if(e.lang){const h=n.enter(`codeFencedLang${s}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${s}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:`
-`,encode:["`"],...l.current()})),h()}return d+=l.move(`
-`),i&&(d+=l.move(i+`
-`)),d+=l.move(c),u(),d}function Vwe(e,r,n){return(n?"":" ")+e}function R8(e){const r=e.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function qwe(e,r,n,o){const a=R8(n),i=a==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const c=n.createTracker(o);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
-`,...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+a),u+=c.move(n.safe(e.title,{before:u,after:a,...c.current()})),u+=c.move(a),l()),s(),u}function Uwe(e){const r=e.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function O1(e){return""+e.toString(16).toUpperCase()+";"}function yf(e){if(e===null||Pr(e)||Wd(e))return 1;if(Cx(e))return 2}function Tx(e,r,n){const o=yf(e),a=yf(r);return o===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}fL.peek=Wwe;function fL(e,r,n,o){const a=Uwe(n),i=n.enter("emphasis"),s=n.createTracker(o),l=s.move(a);let c=s.move(n.containerPhrasing(e,{after:a,before:l,...s.current()}));const u=c.charCodeAt(0),d=Tx(o.before.charCodeAt(o.before.length-1),u,a);d.inside&&(c=O1(u)+c.slice(1));const h=c.charCodeAt(c.length-1),f=Tx(o.after.charCodeAt(0),h,a);f.inside&&(c=c.slice(0,-1)+O1(h));const g=s.move(a);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},l+c+g}function Wwe(e,r,n){return n.options.emphasis||"*"}const Ywe={};function Ax(e,r){const n=r||Ywe,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mL(e,o,a)}function mL(e,r,n){if(Gwe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return gL(e.children,r,n)}return Array.isArray(e)?gL(e,r,n):""}function gL(e,r,n){const o=[];let a=-1;for(;++as&&(s=i):i=1,a=o+r.length,o=n.indexOf(r,a);return s}function Bwe(e,r){return!!(r.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Fwe(e){const r=e.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function Hwe(e,r,n,o){const a=Fwe(n),i=e.value||"",s=a==="`"?"GraveAccent":"Tilde";if(Bwe(e,n)){const h=n.enter("codeIndented"),f=n.indentLines(i,Vwe);return h(),f}const l=n.createTracker(o),c=a.repeat(Math.max(Lwe(i,a)+1,3)),d=n.enter("codeFenced");let u=l.move(c);if(e.lang){const h=n.enter(`codeFencedLang${s}`);u+=l.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${s}`);u+=l.move(" "),u+=l.move(n.safe(e.meta,{before:u,after:`
+`,encode:["`"],...l.current()})),h()}return u+=l.move(`
+`),i&&(u+=l.move(i+`
+`)),u+=l.move(c),d(),u}function Vwe(e,r,n){return(n?"":" ")+e}function R8(e){const r=e.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function qwe(e,r,n,o){const a=R8(n),i=a==='"'?"Quote":"Apostrophe",s=n.enter("definition");let l=n.enter("label");const c=n.createTracker(o);let d=c.move("[");return d+=c.move(n.safe(n.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":`
+`,...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),d+=c.move(" "+a),d+=c.move(n.safe(e.title,{before:d,after:a,...c.current()})),d+=c.move(a),l()),s(),d}function Uwe(e){const r=e.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function O1(e){return""+e.toString(16).toUpperCase()+";"}function yf(e){if(e===null||Mr(e)||Wu(e))return 1;if(C3(e))return 2}function T3(e,r,n){const o=yf(e),a=yf(r);return o===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:o===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}fL.peek=Wwe;function fL(e,r,n,o){const a=Uwe(n),i=n.enter("emphasis"),s=n.createTracker(o),l=s.move(a);let c=s.move(n.containerPhrasing(e,{after:a,before:l,...s.current()}));const d=c.charCodeAt(0),u=T3(o.before.charCodeAt(o.before.length-1),d,a);u.inside&&(c=O1(d)+c.slice(1));const h=c.charCodeAt(c.length-1),f=T3(o.after.charCodeAt(0),h,a);f.inside&&(c=c.slice(0,-1)+O1(h));const g=s.move(a);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},l+c+g}function Wwe(e,r,n){return n.options.emphasis||"*"}const Ywe={};function A3(e,r){const n=r||Ywe,o=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mL(e,o,a)}function mL(e,r,n){if(Gwe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(r&&"alt"in e&&e.alt)return e.alt;if("children"in e)return gL(e.children,r,n)}return Array.isArray(e)?gL(e,r,n):""}function gL(e,r,n){const o=[];let a=-1;for(;++a",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+a),u+=c.move(n.safe(e.title,{before:u,after:a,...c.current()})),u+=c.move(a),l()),u+=c.move(")"),s(),u}function Qwe(){return"!"}vL.peek=Jwe;function vL(e,r,n,o){const a=e.referenceType,i=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(o);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=d,i(),a==="full"||!u||u!==h?c+=l.move(h+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Jwe(){return"!"}xL.peek=e4e;function xL(e,r,n){let o=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(o);)a+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++i\u007F]/.test(e.url))}kL.peek=t4e;function kL(e,r,n,o){const a=R8(n),i=a==='"'?"Quote":"Apostrophe",s=n.createTracker(o);let l,c;if(wL(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let h=s.move("<");return h+=s.move(n.containerPhrasing(e,{before:h,after:">",...s.current()})),h+=s.move(">"),l(),n.stack=d,h}l=n.enter("link"),c=n.enter("label");let u=s.move("[");return u+=s.move(n.containerPhrasing(e,{before:u,after:"](",...s.current()})),u+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(e.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(c=n.enter("destinationRaw"),u+=s.move(n.safe(e.url,{before:u,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=s.move(" "+a),u+=s.move(n.safe(e.title,{before:u,after:a,...s.current()})),u+=s.move(a),c()),u+=s.move(")"),l(),u}function t4e(e,r,n){return wL(e,n)?"<":"["}_L.peek=r4e;function _L(e,r,n,o){const a=e.referenceType,i=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(o);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),s();const d=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=d,i(),a==="full"||!u||u!==h?c+=l.move(h+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function r4e(){return"["}function N8(e){const r=e.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function n4e(e){const r=N8(e),n=e.options.bulletOther;if(!n)return r==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+n+"`) to be different");return n}function o4e(e){const r=e.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function EL(e){const r=e.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function a4e(e,r,n,o){const a=n.enter("list"),i=n.bulletCurrent;let s=e.ordered?o4e(n):N8(n);const l=e.ordered?s==="."?")":".":n4e(n);let c=r&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),EL(n)===s&&d){let h=-1;for(;++h-1?r.start:1)+(n.options.incrementListMarker===!1?0:r.children.indexOf(e))+i);let s=i.length+1;(a==="tab"||a==="mixed"&&(r&&r.type==="list"&&r.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(o);l.move(i+" ".repeat(s-i.length)),l.shift(s);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),d);return c(),u;function d(h,f,g){return f?(g?"":" ".repeat(s))+h:(g?i:i+" ".repeat(s-i.length))+h}}function l4e(e,r,n,o){const a=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(e,o);return i(),a(),s}const c4e=xx(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function u4e(e,r,n,o){return(e.children.some(function(s){return c4e(s)})?n.containerPhrasing:n.containerFlow).call(n,e,o)}function d4e(e){const r=e.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}SL.peek=p4e;function SL(e,r,n,o){const a=d4e(n),i=n.enter("strong"),s=n.createTracker(o),l=s.move(a+a);let c=s.move(n.containerPhrasing(e,{after:a,before:l,...s.current()}));const u=c.charCodeAt(0),d=Tx(o.before.charCodeAt(o.before.length-1),u,a);d.inside&&(c=O1(u)+c.slice(1));const h=c.charCodeAt(c.length-1),f=Tx(o.after.charCodeAt(0),h,a);f.inside&&(c=c.slice(0,-1)+O1(h));const g=s.move(a+a);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},l+c+g}function p4e(e,r,n){return n.options.strong||"*"}function h4e(e,r,n,o){return n.safe(e.value,o)}function f4e(e){const r=e.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function m4e(e,r,n){const o=(EL(n)+(n.options.ruleSpaces?" ":"")).repeat(f4e(n));return n.options.ruleSpaces?o.slice(0,-1):o}const CL={blockquote:Iwe,break:hL,code:Hwe,definition:qwe,emphasis:fL,hardBreak:hL,heading:Kwe,html:yL,image:bL,imageReference:vL,inlineCode:xL,link:kL,linkReference:_L,list:a4e,listItem:s4e,paragraph:l4e,root:u4e,strong:SL,text:h4e,thematicBreak:m4e},TL={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
+`))+1))}const s="#".repeat(a),l=n.enter("headingAtx"),c=n.enter("phrasing");i.move(s+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
+`,...i.current()});return/^[\t ]/.test(d)&&(d=O1(d.charCodeAt(0))+d.slice(1)),d=d?s+" "+d:s,n.options.closeAtx&&(d+=" "+s),c(),l(),d}yL.peek=Zwe;function yL(e){return e.value||""}function Zwe(){return"<"}bL.peek=Qwe;function bL(e,r,n,o){const a=R8(n),i=a==='"'?"Quote":"Apostrophe",s=n.enter("image");let l=n.enter("label");const c=n.createTracker(o);let d=c.move("![");return d+=c.move(n.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(n.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=n.enter("destinationRaw"),d+=c.move(n.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),d+=c.move(" "+a),d+=c.move(n.safe(e.title,{before:d,after:a,...c.current()})),d+=c.move(a),l()),d+=c.move(")"),s(),d}function Qwe(){return"!"}vL.peek=Jwe;function vL(e,r,n,o){const a=e.referenceType,i=n.enter("imageReference");let s=n.enter("label");const l=n.createTracker(o);let c=l.move("![");const d=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=u,i(),a==="full"||!d||d!==h?c+=l.move(h+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Jwe(){return"!"}xL.peek=e4e;function xL(e,r,n){let o=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(o);)a+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++i\u007F]/.test(e.url))}kL.peek=t4e;function kL(e,r,n,o){const a=R8(n),i=a==='"'?"Quote":"Apostrophe",s=n.createTracker(o);let l,c;if(wL(e,n)){const u=n.stack;n.stack=[],l=n.enter("autolink");let h=s.move("<");return h+=s.move(n.containerPhrasing(e,{before:h,after:">",...s.current()})),h+=s.move(">"),l(),n.stack=u,h}l=n.enter("link"),c=n.enter("label");let d=s.move("[");return d+=s.move(n.containerPhrasing(e,{before:d,after:"](",...s.current()})),d+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=s.move("<"),d+=s.move(n.safe(e.url,{before:d,after:">",...s.current()})),d+=s.move(">")):(c=n.enter("destinationRaw"),d+=s.move(n.safe(e.url,{before:d,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${i}`),d+=s.move(" "+a),d+=s.move(n.safe(e.title,{before:d,after:a,...s.current()})),d+=s.move(a),c()),d+=s.move(")"),l(),d}function t4e(e,r,n){return wL(e,n)?"<":"["}_L.peek=r4e;function _L(e,r,n,o){const a=e.referenceType,i=n.enter("linkReference");let s=n.enter("label");const l=n.createTracker(o);let c=l.move("[");const d=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),s();const u=n.stack;n.stack=[],s=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return s(),n.stack=u,i(),a==="full"||!d||d!==h?c+=l.move(h+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function r4e(){return"["}function N8(e){const r=e.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function n4e(e){const r=N8(e),n=e.options.bulletOther;if(!n)return r==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+n+"`) to be different");return n}function o4e(e){const r=e.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function EL(e){const r=e.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function a4e(e,r,n,o){const a=n.enter("list"),i=n.bulletCurrent;let s=e.ordered?o4e(n):N8(n);const l=e.ordered?s==="."?")":".":n4e(n);let c=r&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),EL(n)===s&&u){let h=-1;for(;++h-1?r.start:1)+(n.options.incrementListMarker===!1?0:r.children.indexOf(e))+i);let s=i.length+1;(a==="tab"||a==="mixed"&&(r&&r.type==="list"&&r.spread||e.spread))&&(s=Math.ceil(s/4)*4);const l=n.createTracker(o);l.move(i+" ".repeat(s-i.length)),l.shift(s);const c=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,l.current()),u);return c(),d;function u(h,f,g){return f?(g?"":" ".repeat(s))+h:(g?i:i+" ".repeat(s-i.length))+h}}function l4e(e,r,n,o){const a=n.enter("paragraph"),i=n.enter("phrasing"),s=n.containerPhrasing(e,o);return i(),a(),s}const c4e=x3(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function d4e(e,r,n,o){return(e.children.some(function(s){return c4e(s)})?n.containerPhrasing:n.containerFlow).call(n,e,o)}function u4e(e){const r=e.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}SL.peek=p4e;function SL(e,r,n,o){const a=u4e(n),i=n.enter("strong"),s=n.createTracker(o),l=s.move(a+a);let c=s.move(n.containerPhrasing(e,{after:a,before:l,...s.current()}));const d=c.charCodeAt(0),u=T3(o.before.charCodeAt(o.before.length-1),d,a);u.inside&&(c=O1(d)+c.slice(1));const h=c.charCodeAt(c.length-1),f=T3(o.after.charCodeAt(0),h,a);f.inside&&(c=c.slice(0,-1)+O1(h));const g=s.move(a+a);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},l+c+g}function p4e(e,r,n){return n.options.strong||"*"}function h4e(e,r,n,o){return n.safe(e.value,o)}function f4e(e){const r=e.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function m4e(e,r,n){const o=(EL(n)+(n.options.ruleSpaces?" ":"")).repeat(f4e(n));return n.options.ruleSpaces?o.slice(0,-1):o}const CL={blockquote:Iwe,break:hL,code:Hwe,definition:qwe,emphasis:fL,hardBreak:hL,heading:Kwe,html:yL,image:bL,imageReference:vL,inlineCode:xL,link:kL,linkReference:_L,list:a4e,listItem:s4e,paragraph:l4e,root:d4e,strong:SL,text:h4e,thematicBreak:m4e},TL={AElig:"Æ",AMP:"&",Aacute:"Á",Abreve:"Ă",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"⩓",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Aring:"Å",Ascr:"𝒜",Assign:"≔",Atilde:"Ã",Auml:"Ä",Backslash:"∖",Barv:"⫧",Barwed:"⌆",Bcy:"Б",Because:"∵",Bernoullis:"ℬ",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"ℬ",Bumpeq:"≎",CHcy:"Ч",COPY:"©",Cacute:"Ć",Cap:"⋒",CapitalDifferentialD:"ⅅ",Cayleys:"ℭ",Ccaron:"Č",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"∰",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"ℭ",Chi:"Χ",CircleDot:"⊙",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",Colon:"∷",Colone:"⩴",Congruent:"≡",Conint:"∯",ContourIntegral:"∮",Copf:"ℂ",Coproduct:"∐",CounterClockwiseContourIntegral:"∳",Cross:"⨯",Cscr:"𝒞",Cup:"⋓",CupCap:"≍",DD:"ⅅ",DDotrahd:"⤑",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"‡",Darr:"↡",Dashv:"⫤",Dcaron:"Ď",Dcy:"Д",Del:"∇",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"⋄",DifferentialD:"ⅆ",Dopf:"𝔻",Dot:"¨",DotDot:"⃜",DotEqual:"≐",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",Downarrow:"⇓",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ETH:"Ð",Eacute:"É",Ecaron:"Ě",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrave:"È",Element:"∈",Emacr:"Ē",EmptySmallSquare:"◻",EmptyVerySmallSquare:"▫",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"⩵",EqualTilde:"≂",Equilibrium:"⇌",Escr:"ℰ",Esim:"⩳",Eta:"Η",Euml:"Ë",Exists:"∃",ExponentialE:"ⅇ",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",Fopf:"𝔽",ForAll:"∀",Fouriertrf:"ℱ",Fscr:"ℱ",GJcy:"Ѓ",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"⋙",Gopf:"𝔾",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",Gt:"≫",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"ℌ",HilbertSpace:"ℋ",Hopf:"ℍ",HorizontalLine:"─",Hscr:"ℋ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacute:"Í",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"ℑ",Igrave:"Ì",Im:"ℑ",Imacr:"Ī",ImaginaryI:"ⅈ",Implies:"⇒",Int:"∬",Integral:"∫",Intersection:"⋂",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"ℐ",Itilde:"Ĩ",Iukcy:"І",Iuml:"Ï",Jcirc:"Ĵ",Jcy:"Й",Jfr:"𝔍",Jopf:"𝕁",Jscr:"𝒥",Jsercy:"Ј",Jukcy:"Є",KHcy:"Х",KJcy:"Ќ",Kappa:"Κ",Kcedil:"Ķ",Kcy:"К",Kfr:"𝔎",Kopf:"𝕂",Kscr:"𝒦",LJcy:"Љ",LT:"<",Lacute:"Ĺ",Lambda:"Λ",Lang:"⟪",Laplacetrf:"ℒ",Larr:"↞",Lcaron:"Ľ",Lcedil:"Ļ",Lcy:"Л",LeftAngleBracket:"⟨",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",LeftRightArrow:"↔",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",Leftarrow:"⇐",Leftrightarrow:"⇔",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",LessLess:"⪡",LessSlantEqual:"⩽",LessTilde:"≲",Lfr:"𝔏",Ll:"⋘",Lleftarrow:"⇚",Lmidot:"Ŀ",LongLeftArrow:"⟵",LongLeftRightArrow:"⟷",LongRightArrow:"⟶",Longleftarrow:"⟸",Longleftrightarrow:"⟺",Longrightarrow:"⟹",Lopf:"𝕃",LowerLeftArrow:"↙",LowerRightArrow:"↘",Lscr:"ℒ",Lsh:"↰",Lstrok:"Ł",Lt:"≪",Map:"⤅",Mcy:"М",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",MinusPlus:"∓",Mopf:"𝕄",Mscr:"ℳ",Mu:"Μ",NJcy:"Њ",Nacute:"Ń",Ncaron:"Ň",Ncedil:"Ņ",Ncy:"Н",NegativeMediumSpace:"",NegativeThickSpace:"",NegativeThinSpace:"",NegativeVeryThinSpace:"",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
`,Nfr:"𝔑",NoBreak:"",NonBreakingSpace:" ",Nopf:"ℕ",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",Nscr:"𝒩",Ntilde:"Ñ",Nu:"Ν",OElig:"Œ",Oacute:"Ó",Ocirc:"Ô",Ocy:"О",Odblac:"Ő",Ofr:"𝔒",Ograve:"Ò",Omacr:"Ō",Omega:"Ω",Omicron:"Ο",Oopf:"𝕆",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",Or:"⩔",Oscr:"𝒪",Oslash:"Ø",Otilde:"Õ",Otimes:"⨷",Ouml:"Ö",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",PartialD:"∂",Pcy:"П",Pfr:"𝔓",Phi:"Φ",Pi:"Π",PlusMinus:"±",Poincareplane:"ℌ",Popf:"ℙ",Pr:"⪻",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",Prime:"″",Product:"∏",Proportion:"∷",Proportional:"∝",Pscr:"𝒫",Psi:"Ψ",QUOT:'"',Qfr:"𝔔",Qopf:"ℚ",Qscr:"𝒬",RBarr:"⤐",REG:"®",Racute:"Ŕ",Rang:"⟫",Rarr:"↠",Rarrtl:"⤖",Rcaron:"Ř",Rcedil:"Ŗ",Rcy:"Р",Re:"ℜ",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",Rfr:"ℜ",Rho:"Ρ",RightAngleBracket:"⟩",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",Rightarrow:"⇒",Ropf:"ℝ",RoundImplies:"⥰",Rrightarrow:"⇛",Rscr:"ℛ",Rsh:"↱",RuleDelayed:"⧴",SHCHcy:"Щ",SHcy:"Ш",SOFTcy:"Ь",Sacute:"Ś",Sc:"⪼",Scaron:"Š",Scedil:"Ş",Scirc:"Ŝ",Scy:"С",Sfr:"𝔖",ShortDownArrow:"↓",ShortLeftArrow:"←",ShortRightArrow:"→",ShortUpArrow:"↑",Sigma:"Σ",SmallCircle:"∘",Sopf:"𝕊",Sqrt:"√",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",Sscr:"𝒮",Star:"⋆",Sub:"⋐",Subset:"⋐",SubsetEqual:"⊆",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",SuchThat:"∋",Sum:"∑",Sup:"⋑",Superset:"⊃",SupersetEqual:"⊇",Supset:"⋑",THORN:"Þ",TRADE:"™",TSHcy:"Ћ",TScy:"Ц",Tab:" ",Tau:"Τ",Tcaron:"Ť",Tcedil:"Ţ",Tcy:"Т",Tfr:"𝔗",Therefore:"∴",Theta:"Θ",ThickSpace:" ",ThinSpace:" ",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",Topf:"𝕋",TripleDot:"⃛",Tscr:"𝒯",Tstrok:"Ŧ",Uacute:"Ú",Uarr:"↟",Uarrocir:"⥉",Ubrcy:"Ў",Ubreve:"Ŭ",Ucirc:"Û",Ucy:"У",Udblac:"Ű",Ufr:"𝔘",Ugrave:"Ù",Umacr:"Ū",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",Uopf:"𝕌",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",UpEquilibrium:"⥮",UpTee:"⊥",UpTeeArrow:"↥",Uparrow:"⇑",Updownarrow:"⇕",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",Upsilon:"Υ",Uring:"Ů",Uscr:"𝒰",Utilde:"Ũ",Uuml:"Ü",VDash:"⊫",Vbar:"⫫",Vcy:"В",Vdash:"⊩",Vdashl:"⫦",Vee:"⋁",Verbar:"‖",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",Vopf:"𝕍",Vscr:"𝒱",Vvdash:"⊪",Wcirc:"Ŵ",Wedge:"⋀",Wfr:"𝔚",Wopf:"𝕎",Wscr:"𝒲",Xfr:"𝔛",Xi:"Ξ",Xopf:"𝕏",Xscr:"𝒳",YAcy:"Я",YIcy:"Ї",YUcy:"Ю",Yacute:"Ý",Ycirc:"Ŷ",Ycy:"Ы",Yfr:"𝔜",Yopf:"𝕐",Yscr:"𝒴",Yuml:"Ÿ",ZHcy:"Ж",Zacute:"Ź",Zcaron:"Ž",Zcy:"З",Zdot:"Ż",ZeroWidthSpace:"",Zeta:"Ζ",Zfr:"ℨ",Zopf:"ℤ",Zscr:"𝒵",aacute:"á",abreve:"ă",ac:"∾",acE:"∾̳",acd:"∿",acirc:"â",acute:"´",acy:"а",aelig:"æ",af:"",afr:"𝔞",agrave:"à",alefsym:"ℵ",aleph:"ℵ",alpha:"α",amacr:"ā",amalg:"⨿",amp:"&",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",aopf:"𝕒",ap:"≈",apE:"⩰",apacir:"⩯",ape:"≊",apid:"≋",apos:"'",approx:"≈",approxeq:"≊",aring:"å",ascr:"𝒶",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",auml:"ä",awconint:"∳",awint:"⨑",bNot:"⫭",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",barvee:"⊽",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",beta:"β",beth:"ℶ",between:"≬",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxDL:"╗",boxDR:"╔",boxDl:"╖",boxDr:"╓",boxH:"═",boxHD:"╦",boxHU:"╩",boxHd:"╤",boxHu:"╧",boxUL:"╝",boxUR:"╚",boxUl:"╜",boxUr:"╙",boxV:"║",boxVH:"╬",boxVL:"╣",boxVR:"╠",boxVh:"╫",boxVl:"╢",boxVr:"╟",boxbox:"⧉",boxdL:"╕",boxdR:"╒",boxdl:"┐",boxdr:"┌",boxh:"─",boxhD:"╥",boxhU:"╨",boxhd:"┬",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxuL:"╛",boxuR:"╘",boxul:"┘",boxur:"└",boxv:"│",boxvH:"╪",boxvL:"╡",boxvR:"╞",boxvh:"┼",boxvl:"┤",boxvr:"├",bprime:"‵",breve:"˘",brvbar:"¦",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",bumpeq:"≏",cacute:"ć",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",caps:"∩︀",caret:"⁁",caron:"ˇ",ccaps:"⩍",ccaron:"č",ccedil:"ç",ccirc:"ĉ",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",cedil:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",cfr:"𝔠",chcy:"ч",check:"✓",checkmark:"✓",chi:"χ",cir:"○",cirE:"⧃",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledR:"®",circledS:"Ⓢ",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",clubs:"♣",clubsuit:"♣",colon:":",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",conint:"∮",copf:"𝕔",coprod:"∐",copy:"©",copysr:"℗",crarr:"↵",cross:"✗",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",cupbrcap:"⩈",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dArr:"⇓",dHar:"⥥",dagger:"†",daleth:"ℸ",darr:"↓",dash:"‐",dashv:"⊣",dbkarow:"⤏",dblac:"˝",dcaron:"ď",dcy:"д",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",ddotseq:"⩷",deg:"°",delta:"δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",dharl:"⇃",dharr:"⇂",diam:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",dot:"˙",doteq:"≐",doteqdot:"≑",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",downarrow:"↓",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",dscy:"ѕ",dsol:"⧶",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",dzigrarr:"⟿",eDDot:"⩷",eDot:"≑",eacute:"é",easter:"⩮",ecaron:"ě",ecir:"≖",ecirc:"ê",ecolon:"≕",ecy:"э",edot:"ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",eg:"⪚",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",empty:"∅",emptyset:"∅",emptyv:"∅",emsp13:" ",emsp14:" ",emsp:" ",eng:"ŋ",ensp:" ",eogon:"ę",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",equals:"=",equest:"≟",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erDot:"≓",erarr:"⥱",escr:"ℯ",esdot:"≐",esim:"≂",eta:"η",eth:"ð",euml:"ë",euro:"€",excl:"!",exist:"∃",expectation:"ℰ",exponentiale:"ⅇ",fallingdotseq:"≒",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",filig:"fi",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",forall:"∀",fork:"⋔",forkv:"⫙",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",gE:"≧",gEl:"⪌",gacute:"ǵ",gamma:"γ",gammad:"ϝ",gap:"⪆",gbreve:"ğ",gcirc:"ĝ",gcy:"г",gdot:"ġ",ge:"≥",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",gg:"≫",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",gl:"≷",glE:"⪒",gla:"⪥",glj:"⪤",gnE:"≩",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",grave:"`",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",hArr:"⇔",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",harr:"↔",harrcir:"⥈",harrw:"↭",hbar:"ℏ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",horbar:"―",hscr:"𝒽",hslash:"ℏ",hstrok:"ħ",hybull:"⁃",hyphen:"‐",iacute:"í",ic:"",icirc:"î",icy:"и",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",imacr:"ī",image:"ℑ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",intcal:"⊺",integers:"ℤ",intercal:"⊺",intlarhk:"⨗",intprod:"⨼",iocy:"ё",iogon:"į",iopf:"𝕚",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",isin:"∈",isinE:"⋹",isindot:"⋵",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"",itilde:"ĩ",iukcy:"і",iuml:"ï",jcirc:"ĵ",jcy:"й",jfr:"𝔧",jmath:"ȷ",jopf:"𝕛",jscr:"𝒿",jsercy:"ј",jukcy:"є",kappa:"κ",kappav:"ϰ",kcedil:"ķ",kcy:"к",kfr:"𝔨",kgreen:"ĸ",khcy:"х",kjcy:"ќ",kopf:"𝕜",kscr:"𝓀",lAarr:"⇚",lArr:"⇐",lAtail:"⤛",lBarr:"⤎",lE:"≦",lEg:"⪋",lHar:"⥢",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",laquo:"«",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",late:"⪭",lates:"⪭︀",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",lcedil:"ļ",lceil:"⌈",lcub:"{",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",leftarrow:"←",leftarrowtail:"↢",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",leftthreetimes:"⋋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",lessgtr:"≶",lesssim:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",lg:"≶",lgE:"⪑",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",ll:"≪",llarr:"⇇",llcorner:"⌞",llhard:"⥫",lltri:"◺",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnE:"≨",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",longleftrightarrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltrPar:"⦖",ltri:"◃",ltrie:"⊴",ltrif:"◂",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",mDDot:"∺",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",mdash:"—",measuredangle:"∡",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",mp:"∓",mscr:"𝓂",mstpos:"∾",mu:"μ",multimap:"⊸",mumap:"⊸",nGg:"⋙̸",nGt:"≫⃒",nGtv:"≫̸",nLeftarrow:"⇍",nLeftrightarrow:"⇎",nLl:"⋘̸",nLt:"≪⃒",nLtv:"≪̸",nRightarrow:"⇏",nVDash:"⊯",nVdash:"⊮",nabla:"∇",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",ndash:"–",ne:"≠",neArr:"⇗",nearhk:"⤤",nearr:"↗",nearrow:"↗",nedot:"≐̸",nequiv:"≢",nesear:"⤨",nesim:"≂̸",nexist:"∄",nexists:"∄",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",ngsim:"≵",ngt:"≯",ngtr:"≯",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",nlArr:"⇍",nlE:"≦̸",nlarr:"↚",nldr:"‥",nle:"≰",nleftarrow:"↚",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nlsim:"≴",nlt:"≮",nltri:"⋪",nltrie:"⋬",nmid:"∤",nopf:"𝕟",not:"¬",notin:"∉",notinE:"⋹̸",notindot:"⋵̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",num:"#",numero:"№",numsp:" ",nvDash:"⊭",nvHarr:"⤄",nvap:"≍⃒",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwArr:"⇖",nwarhk:"⤣",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",oS:"Ⓢ",oacute:"ó",oast:"⊛",ocir:"⊚",ocirc:"ô",ocy:"о",odash:"⊝",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",ofcir:"⦿",ofr:"𝔬",ogon:"˛",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",omega:"ω",omicron:"ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",opar:"⦷",operp:"⦹",oplus:"⊕",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oscr:"ℴ",oslash:"ø",osol:"⊘",otilde:"õ",otimes:"⊗",otimesas:"⨶",ouml:"ö",ovbar:"⌽",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",pointint:"⨕",popf:"𝕡",pound:"£",pr:"≺",prE:"⪳",prap:"⪷",prcue:"≼",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",primes:"ℙ",prnE:"⪵",prnap:"⪹",prnsim:"⋨",prod:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",psi:"ψ",puncsp:" ",qfr:"𝔮",qint:"⨌",qopf:"𝕢",qprime:"⁗",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',rAarr:"⇛",rArr:"⇒",rAtail:"⤜",rBarr:"⤏",rHar:"⥤",race:"∽̱",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",rarrw:"↝",ratail:"⤚",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",rcedil:"ŗ",rceil:"⌉",rcub:"}",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",rhov:"ϱ",rightarrow:"→",rightarrowtail:"↣",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",rightthreetimes:"⋌",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",rsaquo:"›",rscr:"𝓇",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",ruluhar:"⥨",rx:"℞",sacute:"ś",sbquo:"‚",sc:"≻",scE:"⪴",scap:"⪸",scaron:"š",sccue:"≽",sce:"⪰",scedil:"ş",scirc:"ŝ",scnE:"⪶",scnap:"⪺",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",seArr:"⇘",searhk:"⤥",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",sfrown:"⌢",sharp:"♯",shchcy:"щ",shcy:"ш",shortmid:"∣",shortparallel:"∥",shy:"",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",subE:"⫅",subdot:"⪽",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",supE:"⫆",supdot:"⪾",supdsub:"⫘",supe:"⊇",supedot:"⫄",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swArr:"⇙",swarhk:"⤦",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",target:"⌖",tau:"τ",tbrk:"⎴",tcaron:"ť",tcedil:"ţ",tcy:"т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",there4:"∴",therefore:"∴",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",thinsp:" ",thkap:"≈",thksim:"∼",thorn:"þ",tilde:"˜",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",tscy:"ц",tshcy:"ћ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uArr:"⇑",uHar:"⥣",uacute:"ú",uarr:"↑",ubrcy:"ў",ubreve:"ŭ",ucirc:"û",ucy:"у",udarr:"⇅",udblac:"ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",ugrave:"ù",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",uml:"¨",uogon:"ų",uopf:"𝕦",uparrow:"↑",updownarrow:"↕",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",upsi:"υ",upsih:"ϒ",upsilon:"υ",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",urtri:"◹",uscr:"𝓊",utdot:"⋰",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",uwangle:"⦧",vArr:"⇕",vBar:"⫨",vBarv:"⫩",vDash:"⊨",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vcy:"в",vdash:"⊢",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",vert:"|",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",vprop:"∝",vrtri:"⊳",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",vzigzag:"⦚",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",wedgeq:"≙",weierp:"℘",wfr:"𝔴",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",yacy:"я",ycirc:"ŷ",ycy:"ы",yen:"¥",yfr:"𝔶",yicy:"ї",yopf:"𝕪",yscr:"𝓎",yucy:"ю",yuml:"ÿ",zacute:"ź",zcaron:"ž",zcy:"з",zdot:"ż",zeetrf:"ℨ",zeta:"ζ",zfr:"𝔷",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",zscr:"𝓏",zwj:"",zwnj:""},g4e={}.hasOwnProperty;function D8(e){return g4e.call(TL,e)?TL[e]:!1}function AL(e,r){const n=Number.parseInt(e,r);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const y4e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function b4e(e){return e.replace(y4e,v4e)}function v4e(e,r,n){if(r)return r;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return AL(n.slice(i?2:1),i?16:10)}return D8(n)||e}function x4e(){return{enter:{table:w4e,tableData:RL,tableHeader:RL,tableRow:_4e},exit:{codeText:E4e,table:k4e,tableData:$8,tableHeader:$8,tableRow:$8}}}function w4e(e){const r=e._align;this.enter({type:"table",align:r.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function k4e(e){this.exit(e),this.data.inTable=void 0}function _4e(e){this.enter({type:"tableRow",children:[]},e)}function $8(e){this.exit(e)}function RL(e){this.enter({type:"tableCell",children:[]},e)}function E4e(e){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,S4e));const n=this.stack[this.stack.length-1];n.type,n.value=r,this.exit(e)}function S4e(e,r){return r==="|"?r:e}function C4e(e){const r=e||{},n=r.tableCellPadding,o=r.tablePipeAlign,a=r.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
-`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:s,tableCell:c,tableRow:l}};function s(g,b,x,w){return u(d(g,x,w),g.align)}function l(g,b,x,w){const k=h(g,x,w),C=u([k]);return C.slice(0,C.indexOf(`
-`))}function c(g,b,x,w){const k=x.enter("tableCell"),C=x.enter("phrasing"),_=x.containerPhrasing(g,{...w,before:i,after:i});return C(),k(),_}function u(g,b){return Pwe(g,{align:b,alignDelimiters:o,padding:n,stringLength:a})}function d(g,b,x){const w=g.children;let k=-1;const C=[],_=b.enter("table");for(;++ka?0:a+r:r=r>a?a:r,n=n>0?n:0,o.length<1e4)s=Array.from(o),s.unshift(r,n),e.splice(...s);else for(n&&e.splice(r,n);i0?(Da(e,e.length,0,r),e):r}const DL={}.hasOwnProperty;function $L(e){const r={};let n=-1;for(;++n0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function bf(e){const r=[];let n=-1,o=0,a=0;for(;++n55295&&i<57344){const l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(s=String.fromCharCode(i,l),a=1):s="�"}else s=String.fromCharCode(i);s&&(r.push(e.slice(o,n),encodeURIComponent(s)),o=n+a+1,s=""),a&&(n+=a,a=0)}return r.join("")+e.slice(o)}function Rx(e,r,n){const o=[];let a=-1;for(;++a1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[o][1].end},f={...e[n][1].start};FL(h,-c),FL(f,c),s={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[o][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},i={type:c>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},a={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[o][1].end={...s.start},e[n][1].start={...l.end},u=[],e[o][1].end.offset-e[o][1].start.offset&&(u=di(u,[["enter",e[o][1],r],["exit",e[o][1],r]])),u=di(u,[["enter",a,r],["enter",s,r],["exit",s,r],["enter",i,r]]),u=di(u,Rx(r.parser.constructs.insideSpan.null,e.slice(o+1,n),r)),u=di(u,[["exit",i,r],["enter",l,r],["exit",l,r],["exit",a,r]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=di(u,[["enter",e[n][1],r],["exit",e[n][1],r]])):d=0,Da(e,o-1,n-o+3,u),n=o+u.length-d-2;break}}for(n=-1;++n0&&Jt(R)?lr(e,C,"linePrefix",i+1)(R):C(R)}function C(R){return R===null||Et(R)?e.check(UL,x,T)(R):(e.enter("codeFlowValue"),_(R))}function _(R){return R===null||Et(R)?(e.exit("codeFlowValue"),C(R)):(e.consume(R),_)}function T(R){return e.exit("codeFenced"),r(R)}function A(R,D,N){let M=0;return O;function O(V){return R.enter("lineEnding"),R.consume(V),R.exit("lineEnding"),F}function F(V){return R.enter("codeFencedFence"),Jt(V)?lr(R,L,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):L(V)}function L(V){return V===l?(R.enter("codeFencedFenceSequence"),U(V)):N(V)}function U(V){return V===l?(M++,R.consume(V),U):M>=s?(R.exit("codeFencedFenceSequence"),Jt(V)?lr(R,P,"whitespace")(V):P(V)):N(V)}function P(V){return V===null||Et(V)?(R.exit("codeFencedFence"),D(V)):N(V)}}}function nke(e,r,n){const o=this;return a;function a(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return o.parser.lazy[o.now().line]?n(s):r(s)}}const I8={name:"codeIndented",tokenize:ake},oke={partial:!0,tokenize:ike};function ake(e,r,n){const o=this;return a;function a(u){return e.enter("codeIndented"),lr(e,i,"linePrefix",5)(u)}function i(u){const d=o.events[o.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?c(u):Et(u)?e.attempt(oke,s,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||Et(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),r(u)}}function ike(e,r,n){const o=this;return a;function a(s){return o.parser.lazy[o.now().line]?n(s):Et(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):lr(e,i,"linePrefix",5)(s)}function i(s){const l=o.events[o.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?r(s):Et(s)?a(s):n(s)}}const ske={name:"codeText",previous:cke,resolve:lke,tokenize:uke};function lke(e){let r=e.length-4,n=3,o,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(o=n;++o=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return rthis.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(r,n,o){const a=n||0;this.setCursor(Math.trunc(r));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return o&&L1(this.left,o),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),L1(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),L1(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r=4?r(s):e.interrupt(o.parser.constructs.flow,n,r)(s)}}function GL(e,r,n,o,a,i,s,l,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return h;function h(k){return k===60?(e.enter(o),e.enter(a),e.enter(i),e.consume(k),e.exit(i),f):k===null||k===32||k===41||Sx(k)?n(k):(e.enter(o),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(k))}function f(k){return k===62?(e.enter(i),e.consume(k),e.exit(i),e.exit(a),e.exit(o),r):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===62?(e.exit("chunkString"),e.exit(l),f(k)):k===null||k===60||Et(k)?n(k):(e.consume(k),k===92?b:g)}function b(k){return k===60||k===62||k===92?(e.consume(k),g):g(k)}function x(k){return!d&&(k===null||k===41||Pr(k))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(o),r(k)):d999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(g):g===93?(e.exit(i),e.enter(a),e.consume(g),e.exit(a),e.exit(o),r):Et(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||Et(g)||l++>999?(e.exit("chunkString"),d(g)):(e.consume(g),c||(c=!Jt(g)),g===92?f:h)}function f(g){return g===91||g===92||g===93?(e.consume(g),l++,h):h(g)}}function KL(e,r,n,o,a,i){let s;return l;function l(f){return f===34||f===39||f===40?(e.enter(o),e.enter(a),e.consume(f),e.exit(a),s=f===40?41:f,c):n(f)}function c(f){return f===s?(e.enter(a),e.consume(f),e.exit(a),e.exit(o),r):(e.enter(i),u(f))}function u(f){return f===s?(e.exit(i),c(s)):f===null?n(f):Et(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),lr(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===s||f===null||Et(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?h:d)}function h(f){return f===s||f===92?(e.consume(f),d):d(f)}}function B1(e,r){let n;return o;function o(a){return Et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,o):Jt(a)?lr(e,o,n?"linePrefix":"lineSuffix")(a):r(a)}}const bke={name:"definition",tokenize:xke},vke={partial:!0,tokenize:wke};function xke(e,r,n){const o=this;let a;return i;function i(g){return e.enter("definition"),s(g)}function s(g){return XL.call(o,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return a=ts(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):n(g)}function c(g){return Pr(g)?B1(e,u)(g):u(g)}function u(g){return GL(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt(vke,h,h)(g)}function h(g){return Jt(g)?lr(e,f,"whitespace")(g):f(g)}function f(g){return g===null||Et(g)?(e.exit("definition"),o.parser.defined.push(a),r(g)):n(g)}}function wke(e,r,n){return o;function o(l){return Pr(l)?B1(e,a)(l):n(l)}function a(l){return KL(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return Jt(l)?lr(e,s,"whitespace")(l):s(l)}function s(l){return l===null||Et(l)?r(l):n(l)}}const kke={name:"hardBreakEscape",tokenize:_ke};function _ke(e,r,n){return o;function o(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return Et(i)?(e.exit("hardBreakEscape"),r(i)):n(i)}}const Eke={name:"headingAtx",resolve:Ske,tokenize:Cke};function Ske(e,r){let n=e.length-2,o=3,a,i;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(a={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},i={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Da(e,o,n-o+1,[["enter",a,r],["enter",i,r],["exit",i,r],["exit",a,r]])),e}function Cke(e,r,n){let o=0;return a;function a(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&o++<6?(e.consume(d),s):d===null||Pr(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||Et(d)?(e.exit("atxHeading"),r(d)):Jt(d)?lr(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||Pr(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}const Tke=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ZL=["pre","script","style","textarea"],Ake={concrete:!0,name:"htmlFlow",resolveTo:Dke,tokenize:$ke},Rke={partial:!0,tokenize:Pke},Nke={partial:!0,tokenize:Mke};function Dke(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function $ke(e,r,n){const o=this;let a,i,s,l,c;return u;function u(j){return d(j)}function d(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),h}function h(j){return j===33?(e.consume(j),f):j===47?(e.consume(j),i=!0,x):j===63?(e.consume(j),a=3,o.interrupt?r:W):Go(j)?(e.consume(j),s=String.fromCharCode(j),w):n(j)}function f(j){return j===45?(e.consume(j),a=2,g):j===91?(e.consume(j),a=5,l=0,b):Go(j)?(e.consume(j),a=4,o.interrupt?r:W):n(j)}function g(j){return j===45?(e.consume(j),o.interrupt?r:W):n(j)}function b(j){const Y="CDATA[";return j===Y.charCodeAt(l++)?(e.consume(j),l===Y.length?o.interrupt?r:L:b):n(j)}function x(j){return Go(j)?(e.consume(j),s=String.fromCharCode(j),w):n(j)}function w(j){if(j===null||j===47||j===62||Pr(j)){const Y=j===47,Q=s.toLowerCase();return!Y&&!i&&ZL.includes(Q)?(a=1,o.interrupt?r(j):L(j)):Tke.includes(s.toLowerCase())?(a=6,Y?(e.consume(j),k):o.interrupt?r(j):L(j)):(a=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(j):i?C(j):_(j))}return j===45||Po(j)?(e.consume(j),s+=String.fromCharCode(j),w):n(j)}function k(j){return j===62?(e.consume(j),o.interrupt?r:L):n(j)}function C(j){return Jt(j)?(e.consume(j),C):O(j)}function _(j){return j===47?(e.consume(j),O):j===58||j===95||Go(j)?(e.consume(j),T):Jt(j)?(e.consume(j),_):O(j)}function T(j){return j===45||j===46||j===58||j===95||Po(j)?(e.consume(j),T):A(j)}function A(j){return j===61?(e.consume(j),R):Jt(j)?(e.consume(j),A):_(j)}function R(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),c=j,D):Jt(j)?(e.consume(j),R):N(j)}function D(j){return j===c?(e.consume(j),c=null,M):j===null||Et(j)?n(j):(e.consume(j),D)}function N(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||Pr(j)?A(j):(e.consume(j),N)}function M(j){return j===47||j===62||Jt(j)?_(j):n(j)}function O(j){return j===62?(e.consume(j),F):n(j)}function F(j){return j===null||Et(j)?L(j):Jt(j)?(e.consume(j),F):n(j)}function L(j){return j===45&&a===2?(e.consume(j),I):j===60&&a===1?(e.consume(j),H):j===62&&a===4?(e.consume(j),G):j===63&&a===3?(e.consume(j),W):j===93&&a===5?(e.consume(j),Z):Et(j)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Rke,K,U)(j)):j===null||Et(j)?(e.exit("htmlFlowData"),U(j)):(e.consume(j),L)}function U(j){return e.check(Nke,P,K)(j)}function P(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),V}function V(j){return j===null||Et(j)?U(j):(e.enter("htmlFlowData"),L(j))}function I(j){return j===45?(e.consume(j),W):L(j)}function H(j){return j===47?(e.consume(j),s="",q):L(j)}function q(j){if(j===62){const Y=s.toLowerCase();return ZL.includes(Y)?(e.consume(j),G):L(j)}return Go(j)&&s.length<8?(e.consume(j),s+=String.fromCharCode(j),q):L(j)}function Z(j){return j===93?(e.consume(j),W):L(j)}function W(j){return j===62?(e.consume(j),G):j===45&&a===2?(e.consume(j),W):L(j)}function G(j){return j===null||Et(j)?(e.exit("htmlFlowData"),K(j)):(e.consume(j),G)}function K(j){return e.exit("htmlFlow"),r(j)}}function Mke(e,r,n){const o=this;return a;function a(s){return Et(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return o.parser.lazy[o.now().line]?n(s):r(s)}}function Pke(e,r,n){return o;function o(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(j1,r,n)}}const zke={name:"htmlText",tokenize:Ike};function Ike(e,r,n){const o=this;let a,i,s;return l;function l(W){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(W),c}function c(W){return W===33?(e.consume(W),u):W===47?(e.consume(W),A):W===63?(e.consume(W),_):Go(W)?(e.consume(W),N):n(W)}function u(W){return W===45?(e.consume(W),d):W===91?(e.consume(W),i=0,b):Go(W)?(e.consume(W),C):n(W)}function d(W){return W===45?(e.consume(W),g):n(W)}function h(W){return W===null?n(W):W===45?(e.consume(W),f):Et(W)?(s=h,H(W)):(e.consume(W),h)}function f(W){return W===45?(e.consume(W),g):h(W)}function g(W){return W===62?I(W):W===45?f(W):h(W)}function b(W){const G="CDATA[";return W===G.charCodeAt(i++)?(e.consume(W),i===G.length?x:b):n(W)}function x(W){return W===null?n(W):W===93?(e.consume(W),w):Et(W)?(s=x,H(W)):(e.consume(W),x)}function w(W){return W===93?(e.consume(W),k):x(W)}function k(W){return W===62?I(W):W===93?(e.consume(W),k):x(W)}function C(W){return W===null||W===62?I(W):Et(W)?(s=C,H(W)):(e.consume(W),C)}function _(W){return W===null?n(W):W===63?(e.consume(W),T):Et(W)?(s=_,H(W)):(e.consume(W),_)}function T(W){return W===62?I(W):_(W)}function A(W){return Go(W)?(e.consume(W),R):n(W)}function R(W){return W===45||Po(W)?(e.consume(W),R):D(W)}function D(W){return Et(W)?(s=D,H(W)):Jt(W)?(e.consume(W),D):I(W)}function N(W){return W===45||Po(W)?(e.consume(W),N):W===47||W===62||Pr(W)?M(W):n(W)}function M(W){return W===47?(e.consume(W),I):W===58||W===95||Go(W)?(e.consume(W),O):Et(W)?(s=M,H(W)):Jt(W)?(e.consume(W),M):I(W)}function O(W){return W===45||W===46||W===58||W===95||Po(W)?(e.consume(W),O):F(W)}function F(W){return W===61?(e.consume(W),L):Et(W)?(s=F,H(W)):Jt(W)?(e.consume(W),F):M(W)}function L(W){return W===null||W===60||W===61||W===62||W===96?n(W):W===34||W===39?(e.consume(W),a=W,U):Et(W)?(s=L,H(W)):Jt(W)?(e.consume(W),L):(e.consume(W),P)}function U(W){return W===a?(e.consume(W),a=void 0,V):W===null?n(W):Et(W)?(s=U,H(W)):(e.consume(W),U)}function P(W){return W===null||W===34||W===39||W===60||W===61||W===96?n(W):W===47||W===62||Pr(W)?M(W):(e.consume(W),P)}function V(W){return W===47||W===62||Pr(W)?M(W):n(W)}function I(W){return W===62?(e.consume(W),e.exit("htmlTextData"),e.exit("htmlText"),r):n(W)}function H(W){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(W),e.exit("lineEnding"),q}function q(W){return Jt(W)?lr(e,Z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):Z(W)}function Z(W){return e.enter("htmlTextData"),s(W)}}const O8={name:"labelEnd",resolveAll:Bke,resolveTo:Fke,tokenize:Hke},Oke={tokenize:Vke},jke={tokenize:qke},Lke={tokenize:Uke};function Bke(e){let r=-1;const n=[];for(;++r=3&&(u===null||Et(u))?(e.exit("thematicBreak"),r(u)):n(u)}function c(u){return u===a?(e.consume(u),o++,c):(e.exit("thematicBreakSequence"),Jt(u)?lr(e,l,"whitespace")(u):l(u))}}const ia={continuation:{tokenize:t5e},exit:n5e,name:"list",tokenize:e5e},Qke={partial:!0,tokenize:o5e},Jke={partial:!0,tokenize:r5e};function e5e(e,r,n){const o=this,a=o.events[o.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return l;function l(g){const b=o.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!o.containerState.marker||g===o.containerState.marker:S8(g)){if(o.containerState.type||(o.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Nx,n,u)(g):u(g);if(!o.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return n(g)}function c(g){return S8(g)&&++s<10?(e.consume(g),c):(!o.interrupt||s<2)&&(o.containerState.marker?g===o.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),u(g)):n(g)}function u(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||g,e.check(j1,o.interrupt?n:d,e.attempt(Qke,f,h))}function d(g){return o.containerState.initialBlankLine=!0,i++,f(g)}function h(g){return Jt(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),f):n(g)}function f(g){return o.containerState.size=i+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(g)}}function t5e(e,r,n){const o=this;return o.containerState._closeFlow=void 0,e.check(j1,a,i);function a(l){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,lr(e,r,"listItemIndent",o.containerState.size+1)(l)}function i(l){return o.containerState.furtherBlankLines||!Jt(l)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,s(l)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Jke,r,s)(l))}function s(l){return o.containerState._closeFlow=!0,o.interrupt=void 0,lr(e,e.attempt(ia,r,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function r5e(e,r,n){const o=this;return lr(e,a,"listItemIndent",o.containerState.size+1);function a(i){const s=o.events[o.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===o.containerState.size?r(i):n(i)}}function n5e(e){e.exit(this.containerState.type)}function o5e(e,r,n){const o=this;return lr(e,a,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const s=o.events[o.events.length-1];return!Jt(i)&&s&&s[1].type==="listItemPrefixWhitespace"?r(i):n(i)}}const QL={name:"setextUnderline",resolveTo:a5e,tokenize:i5e};function a5e(e,r){let n=e.length,o,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,r]),e.splice(i+1,0,["exit",e[o][1],r]),e[o][1].end={...e[i][1].end}):e[o][1]=s,e.push(["exit",s,r]),e}function i5e(e,r,n){const o=this;let a;return i;function i(u){let d=o.events.length,h;for(;d--;)if(o.events[d][1].type!=="lineEnding"&&o.events[d][1].type!=="linePrefix"&&o.events[d][1].type!=="content"){h=o.events[d][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||h)?(e.enter("setextHeadingLine"),a=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===a?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Jt(u)?lr(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Et(u)?(e.exit("setextHeadingLine"),r(u)):n(u)}}const s5e={tokenize:m5e,partial:!0};function l5e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:p5e,continuation:{tokenize:h5e},exit:f5e}},text:{91:{name:"gfmFootnoteCall",tokenize:d5e},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:c5e,resolveTo:u5e}}}}function c5e(e,r,n){const o=this;let a=o.events.length;const i=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let s;for(;a--;){const c=o.events[a][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!s||!s._balanced)return n(c);const u=ts(o.sliceSerialize({start:s.end,end:o.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),r(c))}}function u5e(e,r){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",o,r],e[n+3],e[n+4],["enter",a,r],["exit",a,r],["enter",i,r],["enter",s,r],["exit",s,r],["exit",i,r],e[e.length-2],e[e.length-1],["exit",o,r]];return e.splice(n,e.length-n+1,...l),e}function d5e(e,r,n){const o=this,a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i=0,s;return l;function l(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(i>999||h===93&&!s||h===null||h===91||Pr(h))return n(h);if(h===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return a.includes(ts(o.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):n(h)}return Pr(h)||(s=!0),i++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),i++,u):u(h)}}function p5e(e,r,n){const o=this,a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i,s=0,l;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(b)}function d(b){if(s>999||b===93&&!l||b===null||b===91||Pr(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return i=ts(o.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Pr(b)||(l=!0),s++,e.consume(b),b===92?h:d}function h(b){return b===91||b===92||b===93?(e.consume(b),s++,d):d(b)}function f(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),a.includes(i)||a.push(i),lr(e,g,"gfmFootnoteDefinitionWhitespace")):n(b)}function g(b){return r(b)}}function h5e(e,r,n){return e.check(j1,r,e.attempt(s5e,r,n))}function f5e(e){e.exit("gfmFootnoteDefinition")}function m5e(e,r,n){const o=this;return lr(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const s=o.events[o.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?r(i):n(i)}}function g5e(e){let n=(e||{}).singleTilde;const o={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function a(s,l){let c=-1;for(;++c1?c(b):(s.consume(b),h++,g);if(h<2&&!n)return c(b);const w=s.exit("strikethroughSequenceTemporary"),k=yf(b);return w._open=!k||k===2&&!!x,w._close=!x||x===2&&!!k,l(b)}}}class y5e{constructor(){this.map=[]}add(r,n,o){b5e(this,r,n,o)}consume(r){if(this.map.sort(function(i,s){return i[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const o=[];for(;n>0;)n-=1,o.push(r.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),r.length=this.map[n][0];o.push(r.slice()),r.length=0;let a=o.pop();for(;a;){for(const i of a)r.push(i);a=o.pop()}this.map.length=0}}function b5e(e,r,n,o){let a=0;if(!(n===0&&o.length===0)){for(;a-1;){const P=o.events[F][1].type;if(P==="lineEnding"||P==="linePrefix")F--;else break}const L=F>-1?o.events[F][1].type:null,U=L==="tableHead"||L==="tableRow"?R:c;return U===R&&o.parser.lazy[o.now().line]?n(O):U(O)}function c(O){return e.enter("tableHead"),e.enter("tableRow"),u(O)}function u(O){return O===124||(s=!0,i+=1),d(O)}function d(O){return O===null?n(O):Et(O)?i>1?(i=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),g):n(O):Jt(O)?lr(e,d,"whitespace")(O):(i+=1,s&&(s=!1,a+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),s=!0,d):(e.enter("data"),h(O)))}function h(O){return O===null||O===124||Pr(O)?(e.exit("data"),d(O)):(e.consume(O),O===92?f:h)}function f(O){return O===92||O===124?(e.consume(O),h):h(O)}function g(O){return o.interrupt=!1,o.parser.lazy[o.now().line]?n(O):(e.enter("tableDelimiterRow"),s=!1,Jt(O)?lr(e,b,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):b(O))}function b(O){return O===45||O===58?w(O):O===124?(s=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),x):A(O)}function x(O){return Jt(O)?lr(e,w,"whitespace")(O):w(O)}function w(O){return O===58?(i+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),k):O===45?(i+=1,k(O)):O===null||Et(O)?T(O):A(O)}function k(O){return O===45?(e.enter("tableDelimiterFiller"),C(O)):A(O)}function C(O){return O===45?(e.consume(O),C):O===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(O))}function _(O){return Jt(O)?lr(e,T,"whitespace")(O):T(O)}function T(O){return O===124?b(O):O===null||Et(O)?!s||a!==i?A(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r(O)):A(O)}function A(O){return n(O)}function R(O){return e.enter("tableRow"),D(O)}function D(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),D):O===null||Et(O)?(e.exit("tableRow"),r(O)):Jt(O)?lr(e,D,"whitespace")(O):(e.enter("data"),N(O))}function N(O){return O===null||O===124||Pr(O)?(e.exit("data"),D(O)):(e.consume(O),O===92?M:N)}function M(O){return O===92||O===124?(e.consume(O),N):N(O)}}function k5e(e,r){let n=-1,o=!0,a=0,i=[0,0,0,0],s=[0,0,0,0],l=!1,c=0,u,d,h;const f=new y5e;for(;++nn[2]+1){const b=n[2]+1,x=n[3]-n[2]-1;e.add(b,x,[])}}e.add(n[3]+1,0,[["exit",h,r]])}return a!==void 0&&(i.end=Object.assign({},vf(r.events,a)),e.add(a,0,[["exit",i,r]]),i=void 0),i}function JL(e,r,n,o,a){const i=[],s=vf(r.events,n);a&&(a.end=Object.assign({},s),i.push(["exit",a,r])),o.end=Object.assign({},s),i.push(["exit",o,r]),e.add(n+1,0,i)}function vf(e,r){const n=e[r],o=n[0]==="enter"?"start":"end";return n[1][o]}const _5e={name:"tasklistCheck",tokenize:S5e};function E5e(){return{text:{91:_5e}}}function S5e(e,r,n){const o=this;return a;function a(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return Pr(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return Et(c)?r(c):Jt(c)?e.check({tokenize:C5e},r,n)(c):n(c)}}function C5e(e,r,n){return lr(e,o,"whitespace");function o(a){return a===null?n(a):r(a)}}function T5e(e){return $L([O4e(),l5e(),g5e(e),x5e(),E5e()])}const A5e={};function R5e(e){const r=this,n=e||A5e,o=r.data(),a=o.micromarkExtensions||(o.micromarkExtensions=[]),i=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),s=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);a.push(T5e(n)),i.push(D4e()),s.push($4e(n))}const N5e={tokenize:D5e};function D5e(e){const r=e.attempt(this.parser.constructs.contentInitial,o,a);let n;return r;function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),lr(e,r,"linePrefix")}function a(l){return e.enter("paragraph"),i(l)}function i(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Et(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),s)}}const $5e={tokenize:M5e},eB={tokenize:P5e};function M5e(e){const r=this,n=[];let o=0,a,i,s;return l;function l(_){if(os))return;const D=r.events.length;let N=D,M,O;for(;N--;)if(r.events[N][0]==="exit"&&r.events[N][1].type==="chunkFlow"){if(M){O=r.events[N][1].end;break}M=!0}for(k(o),R=D;R_;){const A=n[T];r.containerState=A[1],A[0].exit.call(r,e)}n.length=_}function C(){a.write([null]),i=void 0,a=void 0,r.containerState._closeFlow=void 0}}function P5e(e,r,n){return lr(e,e.attempt(this.parser.constructs.document,r,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const z5e={tokenize:I5e};function I5e(e){const r=this,n=e.attempt(j1,o,e.attempt(this.parser.constructs.flowInitial,a,lr(e,e.attempt(this.parser.constructs.flow,a,e.attempt(hke,a)),"linePrefix")));return n;function o(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),r.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r.currentConstruct=void 0,n}}const O5e={resolveAll:rB()},j5e=tB("string"),L5e=tB("text");function tB(e){return{resolveAll:rB(e==="text"?B5e:void 0),tokenize:r};function r(n){const o=this,a=this.parser.constructs[e],i=n.attempt(a,s,l);return s;function s(d){return u(d)?i(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),i(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const h=a[d];let f=-1;if(h)for(;++f-1){const l=s[0];typeof l=="string"?s[0]=l.slice(o):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function q5e(e,r){let n=-1;const o=[];let a;for(;++na?0:a+r:r=r>a?a:r,n=n>0?n:0,o.length<1e4)s=Array.from(o),s.unshift(r,n),e.splice(...s);else for(n&&e.splice(r,n);i0?(Da(e,e.length,0,r),e):r}const DL={}.hasOwnProperty;function $L(e){const r={};let n=-1;for(;++n0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function bf(e){const r=[];let n=-1,o=0,a=0;for(;++n55295&&i<57344){const l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(s=String.fromCharCode(i,l),a=1):s="�"}else s=String.fromCharCode(i);s&&(r.push(e.slice(o,n),encodeURIComponent(s)),o=n+a+1,s=""),a&&(n+=a,a=0)}return r.join("")+e.slice(o)}function R3(e,r,n){const o=[];let a=-1;for(;++a1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[o][1].end},f={...e[n][1].start};FL(h,-c),FL(f,c),s={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[o][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},i={type:c>1?"strongText":"emphasisText",start:{...e[o][1].end},end:{...e[n][1].start}},a={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[o][1].end={...s.start},e[n][1].start={...l.end},d=[],e[o][1].end.offset-e[o][1].start.offset&&(d=ui(d,[["enter",e[o][1],r],["exit",e[o][1],r]])),d=ui(d,[["enter",a,r],["enter",s,r],["exit",s,r],["enter",i,r]]),d=ui(d,R3(r.parser.constructs.insideSpan.null,e.slice(o+1,n),r)),d=ui(d,[["exit",i,r],["enter",l,r],["exit",l,r],["exit",a,r]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,d=ui(d,[["enter",e[n][1],r],["exit",e[n][1],r]])):u=0,Da(e,o-1,n-o+3,d),n=o+d.length-u-2;break}}for(n=-1;++n0&&Jt(R)?lr(e,C,"linePrefix",i+1)(R):C(R)}function C(R){return R===null||Et(R)?e.check(UL,x,T)(R):(e.enter("codeFlowValue"),_(R))}function _(R){return R===null||Et(R)?(e.exit("codeFlowValue"),C(R)):(e.consume(R),_)}function T(R){return e.exit("codeFenced"),r(R)}function A(R,D,N){let P=0;return O;function O(V){return R.enter("lineEnding"),R.consume(V),R.exit("lineEnding"),F}function F(V){return R.enter("codeFencedFence"),Jt(V)?lr(R,L,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):L(V)}function L(V){return V===l?(R.enter("codeFencedFenceSequence"),U(V)):N(V)}function U(V){return V===l?(P++,R.consume(V),U):P>=s?(R.exit("codeFencedFenceSequence"),Jt(V)?lr(R,M,"whitespace")(V):M(V)):N(V)}function M(V){return V===null||Et(V)?(R.exit("codeFencedFence"),D(V)):N(V)}}}function nke(e,r,n){const o=this;return a;function a(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return o.parser.lazy[o.now().line]?n(s):r(s)}}const I8={name:"codeIndented",tokenize:ake},oke={partial:!0,tokenize:ike};function ake(e,r,n){const o=this;return a;function a(d){return e.enter("codeIndented"),lr(e,i,"linePrefix",5)(d)}function i(d){const u=o.events[o.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(d):n(d)}function s(d){return d===null?c(d):Et(d)?e.attempt(oke,s,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||Et(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),r(d)}}function ike(e,r,n){const o=this;return a;function a(s){return o.parser.lazy[o.now().line]?n(s):Et(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):lr(e,i,"linePrefix",5)(s)}function i(s){const l=o.events[o.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?r(s):Et(s)?a(s):n(s)}}const ske={name:"codeText",previous:cke,resolve:lke,tokenize:dke};function lke(e){let r=e.length-4,n=3,o,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[r][1].type==="lineEnding"||e[r][1].type==="space")){for(o=n;++o=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return rthis.left.length?this.right.slice(this.right.length-o+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-o+this.left.length).reverse())}splice(r,n,o){const a=n||0;this.setCursor(Math.trunc(r));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return o&&L1(this.left,o),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),L1(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),L1(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r=4?r(s):e.interrupt(o.parser.constructs.flow,n,r)(s)}}function GL(e,r,n,o,a,i,s,l,c){const d=c||Number.POSITIVE_INFINITY;let u=0;return h;function h(k){return k===60?(e.enter(o),e.enter(a),e.enter(i),e.consume(k),e.exit(i),f):k===null||k===32||k===41||S3(k)?n(k):(e.enter(o),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(k))}function f(k){return k===62?(e.enter(i),e.consume(k),e.exit(i),e.exit(a),e.exit(o),r):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===62?(e.exit("chunkString"),e.exit(l),f(k)):k===null||k===60||Et(k)?n(k):(e.consume(k),k===92?b:g)}function b(k){return k===60||k===62||k===92?(e.consume(k),g):g(k)}function x(k){return!u&&(k===null||k===41||Mr(k))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(o),r(k)):u999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(g):g===93?(e.exit(i),e.enter(a),e.consume(g),e.exit(a),e.exit(o),r):Et(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||Et(g)||l++>999?(e.exit("chunkString"),u(g)):(e.consume(g),c||(c=!Jt(g)),g===92?f:h)}function f(g){return g===91||g===92||g===93?(e.consume(g),l++,h):h(g)}}function KL(e,r,n,o,a,i){let s;return l;function l(f){return f===34||f===39||f===40?(e.enter(o),e.enter(a),e.consume(f),e.exit(a),s=f===40?41:f,c):n(f)}function c(f){return f===s?(e.enter(a),e.consume(f),e.exit(a),e.exit(o),r):(e.enter(i),d(f))}function d(f){return f===s?(e.exit(i),c(s)):f===null?n(f):Et(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),lr(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===s||f===null||Et(f)?(e.exit("chunkString"),d(f)):(e.consume(f),f===92?h:u)}function h(f){return f===s||f===92?(e.consume(f),u):u(f)}}function B1(e,r){let n;return o;function o(a){return Et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,o):Jt(a)?lr(e,o,n?"linePrefix":"lineSuffix")(a):r(a)}}const bke={name:"definition",tokenize:xke},vke={partial:!0,tokenize:wke};function xke(e,r,n){const o=this;let a;return i;function i(g){return e.enter("definition"),s(g)}function s(g){return XL.call(o,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return a=ts(o.sliceSerialize(o.events[o.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):n(g)}function c(g){return Mr(g)?B1(e,d)(g):d(g)}function d(g){return GL(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function u(g){return e.attempt(vke,h,h)(g)}function h(g){return Jt(g)?lr(e,f,"whitespace")(g):f(g)}function f(g){return g===null||Et(g)?(e.exit("definition"),o.parser.defined.push(a),r(g)):n(g)}}function wke(e,r,n){return o;function o(l){return Mr(l)?B1(e,a)(l):n(l)}function a(l){return KL(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return Jt(l)?lr(e,s,"whitespace")(l):s(l)}function s(l){return l===null||Et(l)?r(l):n(l)}}const kke={name:"hardBreakEscape",tokenize:_ke};function _ke(e,r,n){return o;function o(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return Et(i)?(e.exit("hardBreakEscape"),r(i)):n(i)}}const Eke={name:"headingAtx",resolve:Ske,tokenize:Cke};function Ske(e,r){let n=e.length-2,o=3,a,i;return e[o][1].type==="whitespace"&&(o+=2),n-2>o&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(o===n-1||n-4>o&&e[n-2][1].type==="whitespace")&&(n-=o+1===n?2:4),n>o&&(a={type:"atxHeadingText",start:e[o][1].start,end:e[n][1].end},i={type:"chunkText",start:e[o][1].start,end:e[n][1].end,contentType:"text"},Da(e,o,n-o+1,[["enter",a,r],["enter",i,r],["exit",i,r],["exit",a,r]])),e}function Cke(e,r,n){let o=0;return a;function a(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&o++<6?(e.consume(u),s):u===null||Mr(u)?(e.exit("atxHeadingSequence"),l(u)):n(u)}function l(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||Et(u)?(e.exit("atxHeading"),r(u)):Jt(u)?lr(e,l,"whitespace")(u):(e.enter("atxHeadingText"),d(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),l(u))}function d(u){return u===null||u===35||Mr(u)?(e.exit("atxHeadingText"),l(u)):(e.consume(u),d)}}const Tke=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ZL=["pre","script","style","textarea"],Ake={concrete:!0,name:"htmlFlow",resolveTo:Dke,tokenize:$ke},Rke={partial:!0,tokenize:Mke},Nke={partial:!0,tokenize:Pke};function Dke(e){let r=e.length;for(;r--&&!(e[r][0]==="enter"&&e[r][1].type==="htmlFlow"););return r>1&&e[r-2][1].type==="linePrefix"&&(e[r][1].start=e[r-2][1].start,e[r+1][1].start=e[r-2][1].start,e.splice(r-2,2)),e}function $ke(e,r,n){const o=this;let a,i,s,l,c;return d;function d(j){return u(j)}function u(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),h}function h(j){return j===33?(e.consume(j),f):j===47?(e.consume(j),i=!0,x):j===63?(e.consume(j),a=3,o.interrupt?r:W):Go(j)?(e.consume(j),s=String.fromCharCode(j),w):n(j)}function f(j){return j===45?(e.consume(j),a=2,g):j===91?(e.consume(j),a=5,l=0,b):Go(j)?(e.consume(j),a=4,o.interrupt?r:W):n(j)}function g(j){return j===45?(e.consume(j),o.interrupt?r:W):n(j)}function b(j){const Y="CDATA[";return j===Y.charCodeAt(l++)?(e.consume(j),l===Y.length?o.interrupt?r:L:b):n(j)}function x(j){return Go(j)?(e.consume(j),s=String.fromCharCode(j),w):n(j)}function w(j){if(j===null||j===47||j===62||Mr(j)){const Y=j===47,Q=s.toLowerCase();return!Y&&!i&&ZL.includes(Q)?(a=1,o.interrupt?r(j):L(j)):Tke.includes(s.toLowerCase())?(a=6,Y?(e.consume(j),k):o.interrupt?r(j):L(j)):(a=7,o.interrupt&&!o.parser.lazy[o.now().line]?n(j):i?C(j):_(j))}return j===45||Mo(j)?(e.consume(j),s+=String.fromCharCode(j),w):n(j)}function k(j){return j===62?(e.consume(j),o.interrupt?r:L):n(j)}function C(j){return Jt(j)?(e.consume(j),C):O(j)}function _(j){return j===47?(e.consume(j),O):j===58||j===95||Go(j)?(e.consume(j),T):Jt(j)?(e.consume(j),_):O(j)}function T(j){return j===45||j===46||j===58||j===95||Mo(j)?(e.consume(j),T):A(j)}function A(j){return j===61?(e.consume(j),R):Jt(j)?(e.consume(j),A):_(j)}function R(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),c=j,D):Jt(j)?(e.consume(j),R):N(j)}function D(j){return j===c?(e.consume(j),c=null,P):j===null||Et(j)?n(j):(e.consume(j),D)}function N(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||Mr(j)?A(j):(e.consume(j),N)}function P(j){return j===47||j===62||Jt(j)?_(j):n(j)}function O(j){return j===62?(e.consume(j),F):n(j)}function F(j){return j===null||Et(j)?L(j):Jt(j)?(e.consume(j),F):n(j)}function L(j){return j===45&&a===2?(e.consume(j),I):j===60&&a===1?(e.consume(j),H):j===62&&a===4?(e.consume(j),G):j===63&&a===3?(e.consume(j),W):j===93&&a===5?(e.consume(j),Z):Et(j)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Rke,K,U)(j)):j===null||Et(j)?(e.exit("htmlFlowData"),U(j)):(e.consume(j),L)}function U(j){return e.check(Nke,M,K)(j)}function M(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),V}function V(j){return j===null||Et(j)?U(j):(e.enter("htmlFlowData"),L(j))}function I(j){return j===45?(e.consume(j),W):L(j)}function H(j){return j===47?(e.consume(j),s="",q):L(j)}function q(j){if(j===62){const Y=s.toLowerCase();return ZL.includes(Y)?(e.consume(j),G):L(j)}return Go(j)&&s.length<8?(e.consume(j),s+=String.fromCharCode(j),q):L(j)}function Z(j){return j===93?(e.consume(j),W):L(j)}function W(j){return j===62?(e.consume(j),G):j===45&&a===2?(e.consume(j),W):L(j)}function G(j){return j===null||Et(j)?(e.exit("htmlFlowData"),K(j)):(e.consume(j),G)}function K(j){return e.exit("htmlFlow"),r(j)}}function Pke(e,r,n){const o=this;return a;function a(s){return Et(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return o.parser.lazy[o.now().line]?n(s):r(s)}}function Mke(e,r,n){return o;function o(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(j1,r,n)}}const zke={name:"htmlText",tokenize:Ike};function Ike(e,r,n){const o=this;let a,i,s;return l;function l(W){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(W),c}function c(W){return W===33?(e.consume(W),d):W===47?(e.consume(W),A):W===63?(e.consume(W),_):Go(W)?(e.consume(W),N):n(W)}function d(W){return W===45?(e.consume(W),u):W===91?(e.consume(W),i=0,b):Go(W)?(e.consume(W),C):n(W)}function u(W){return W===45?(e.consume(W),g):n(W)}function h(W){return W===null?n(W):W===45?(e.consume(W),f):Et(W)?(s=h,H(W)):(e.consume(W),h)}function f(W){return W===45?(e.consume(W),g):h(W)}function g(W){return W===62?I(W):W===45?f(W):h(W)}function b(W){const G="CDATA[";return W===G.charCodeAt(i++)?(e.consume(W),i===G.length?x:b):n(W)}function x(W){return W===null?n(W):W===93?(e.consume(W),w):Et(W)?(s=x,H(W)):(e.consume(W),x)}function w(W){return W===93?(e.consume(W),k):x(W)}function k(W){return W===62?I(W):W===93?(e.consume(W),k):x(W)}function C(W){return W===null||W===62?I(W):Et(W)?(s=C,H(W)):(e.consume(W),C)}function _(W){return W===null?n(W):W===63?(e.consume(W),T):Et(W)?(s=_,H(W)):(e.consume(W),_)}function T(W){return W===62?I(W):_(W)}function A(W){return Go(W)?(e.consume(W),R):n(W)}function R(W){return W===45||Mo(W)?(e.consume(W),R):D(W)}function D(W){return Et(W)?(s=D,H(W)):Jt(W)?(e.consume(W),D):I(W)}function N(W){return W===45||Mo(W)?(e.consume(W),N):W===47||W===62||Mr(W)?P(W):n(W)}function P(W){return W===47?(e.consume(W),I):W===58||W===95||Go(W)?(e.consume(W),O):Et(W)?(s=P,H(W)):Jt(W)?(e.consume(W),P):I(W)}function O(W){return W===45||W===46||W===58||W===95||Mo(W)?(e.consume(W),O):F(W)}function F(W){return W===61?(e.consume(W),L):Et(W)?(s=F,H(W)):Jt(W)?(e.consume(W),F):P(W)}function L(W){return W===null||W===60||W===61||W===62||W===96?n(W):W===34||W===39?(e.consume(W),a=W,U):Et(W)?(s=L,H(W)):Jt(W)?(e.consume(W),L):(e.consume(W),M)}function U(W){return W===a?(e.consume(W),a=void 0,V):W===null?n(W):Et(W)?(s=U,H(W)):(e.consume(W),U)}function M(W){return W===null||W===34||W===39||W===60||W===61||W===96?n(W):W===47||W===62||Mr(W)?P(W):(e.consume(W),M)}function V(W){return W===47||W===62||Mr(W)?P(W):n(W)}function I(W){return W===62?(e.consume(W),e.exit("htmlTextData"),e.exit("htmlText"),r):n(W)}function H(W){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(W),e.exit("lineEnding"),q}function q(W){return Jt(W)?lr(e,Z,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):Z(W)}function Z(W){return e.enter("htmlTextData"),s(W)}}const O8={name:"labelEnd",resolveAll:Bke,resolveTo:Fke,tokenize:Hke},Oke={tokenize:Vke},jke={tokenize:qke},Lke={tokenize:Uke};function Bke(e){let r=-1;const n=[];for(;++r=3&&(d===null||Et(d))?(e.exit("thematicBreak"),r(d)):n(d)}function c(d){return d===a?(e.consume(d),o++,c):(e.exit("thematicBreakSequence"),Jt(d)?lr(e,l,"whitespace")(d):l(d))}}const ia={continuation:{tokenize:t5e},exit:n5e,name:"list",tokenize:e5e},Qke={partial:!0,tokenize:o5e},Jke={partial:!0,tokenize:r5e};function e5e(e,r,n){const o=this,a=o.events[o.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return l;function l(g){const b=o.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!o.containerState.marker||g===o.containerState.marker:S8(g)){if(o.containerState.type||(o.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(N3,n,d)(g):d(g);if(!o.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return n(g)}function c(g){return S8(g)&&++s<10?(e.consume(g),c):(!o.interrupt||s<2)&&(o.containerState.marker?g===o.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),d(g)):n(g)}function d(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),o.containerState.marker=o.containerState.marker||g,e.check(j1,o.interrupt?n:u,e.attempt(Qke,f,h))}function u(g){return o.containerState.initialBlankLine=!0,i++,f(g)}function h(g){return Jt(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),f):n(g)}function f(g){return o.containerState.size=i+o.sliceSerialize(e.exit("listItemPrefix"),!0).length,r(g)}}function t5e(e,r,n){const o=this;return o.containerState._closeFlow=void 0,e.check(j1,a,i);function a(l){return o.containerState.furtherBlankLines=o.containerState.furtherBlankLines||o.containerState.initialBlankLine,lr(e,r,"listItemIndent",o.containerState.size+1)(l)}function i(l){return o.containerState.furtherBlankLines||!Jt(l)?(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,s(l)):(o.containerState.furtherBlankLines=void 0,o.containerState.initialBlankLine=void 0,e.attempt(Jke,r,s)(l))}function s(l){return o.containerState._closeFlow=!0,o.interrupt=void 0,lr(e,e.attempt(ia,r,n),"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function r5e(e,r,n){const o=this;return lr(e,a,"listItemIndent",o.containerState.size+1);function a(i){const s=o.events[o.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===o.containerState.size?r(i):n(i)}}function n5e(e){e.exit(this.containerState.type)}function o5e(e,r,n){const o=this;return lr(e,a,"listItemPrefixWhitespace",o.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const s=o.events[o.events.length-1];return!Jt(i)&&s&&s[1].type==="listItemPrefixWhitespace"?r(i):n(i)}}const QL={name:"setextUnderline",resolveTo:a5e,tokenize:i5e};function a5e(e,r){let n=e.length,o,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){o=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:{...e[o][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,r]),e.splice(i+1,0,["exit",e[o][1],r]),e[o][1].end={...e[i][1].end}):e[o][1]=s,e.push(["exit",s,r]),e}function i5e(e,r,n){const o=this;let a;return i;function i(d){let u=o.events.length,h;for(;u--;)if(o.events[u][1].type!=="lineEnding"&&o.events[u][1].type!=="linePrefix"&&o.events[u][1].type!=="content"){h=o.events[u][1].type==="paragraph";break}return!o.parser.lazy[o.now().line]&&(o.interrupt||h)?(e.enter("setextHeadingLine"),a=d,s(d)):n(d)}function s(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===a?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),Jt(d)?lr(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||Et(d)?(e.exit("setextHeadingLine"),r(d)):n(d)}}const s5e={tokenize:m5e,partial:!0};function l5e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:p5e,continuation:{tokenize:h5e},exit:f5e}},text:{91:{name:"gfmFootnoteCall",tokenize:u5e},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:c5e,resolveTo:d5e}}}}function c5e(e,r,n){const o=this;let a=o.events.length;const i=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let s;for(;a--;){const c=o.events[a][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!s||!s._balanced)return n(c);const d=ts(o.sliceSerialize({start:s.end,end:o.now()}));return d.codePointAt(0)!==94||!i.includes(d.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),r(c))}}function d5e(e,r){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",o,r],e[n+3],e[n+4],["enter",a,r],["exit",a,r],["enter",i,r],["enter",s,r],["exit",s,r],["exit",i,r],e[e.length-2],e[e.length-1],["exit",o,r]];return e.splice(n,e.length-n+1,...l),e}function u5e(e,r,n){const o=this,a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i=0,s;return l;function l(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(h){if(i>999||h===93&&!s||h===null||h===91||Mr(h))return n(h);if(h===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return a.includes(ts(o.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),r):n(h)}return Mr(h)||(s=!0),i++,e.consume(h),h===92?u:d}function u(h){return h===91||h===92||h===93?(e.consume(h),i++,d):d(h)}}function p5e(e,r,n){const o=this,a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i,s=0,l;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(b)}function u(b){if(s>999||b===93&&!l||b===null||b===91||Mr(b))return n(b);if(b===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return i=ts(o.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Mr(b)||(l=!0),s++,e.consume(b),b===92?h:u}function h(b){return b===91||b===92||b===93?(e.consume(b),s++,u):u(b)}function f(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),a.includes(i)||a.push(i),lr(e,g,"gfmFootnoteDefinitionWhitespace")):n(b)}function g(b){return r(b)}}function h5e(e,r,n){return e.check(j1,r,e.attempt(s5e,r,n))}function f5e(e){e.exit("gfmFootnoteDefinition")}function m5e(e,r,n){const o=this;return lr(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const s=o.events[o.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?r(i):n(i)}}function g5e(e){let n=(e||{}).singleTilde;const o={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function a(s,l){let c=-1;for(;++c1?c(b):(s.consume(b),h++,g);if(h<2&&!n)return c(b);const w=s.exit("strikethroughSequenceTemporary"),k=yf(b);return w._open=!k||k===2&&!!x,w._close=!x||x===2&&!!k,l(b)}}}class y5e{constructor(){this.map=[]}add(r,n,o){b5e(this,r,n,o)}consume(r){if(this.map.sort(function(i,s){return i[0]-s[0]}),this.map.length===0)return;let n=this.map.length;const o=[];for(;n>0;)n-=1,o.push(r.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),r.length=this.map[n][0];o.push(r.slice()),r.length=0;let a=o.pop();for(;a;){for(const i of a)r.push(i);a=o.pop()}this.map.length=0}}function b5e(e,r,n,o){let a=0;if(!(n===0&&o.length===0)){for(;a-1;){const M=o.events[F][1].type;if(M==="lineEnding"||M==="linePrefix")F--;else break}const L=F>-1?o.events[F][1].type:null,U=L==="tableHead"||L==="tableRow"?R:c;return U===R&&o.parser.lazy[o.now().line]?n(O):U(O)}function c(O){return e.enter("tableHead"),e.enter("tableRow"),d(O)}function d(O){return O===124||(s=!0,i+=1),u(O)}function u(O){return O===null?n(O):Et(O)?i>1?(i=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),g):n(O):Jt(O)?lr(e,u,"whitespace")(O):(i+=1,s&&(s=!1,a+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),s=!0,u):(e.enter("data"),h(O)))}function h(O){return O===null||O===124||Mr(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?f:h)}function f(O){return O===92||O===124?(e.consume(O),h):h(O)}function g(O){return o.interrupt=!1,o.parser.lazy[o.now().line]?n(O):(e.enter("tableDelimiterRow"),s=!1,Jt(O)?lr(e,b,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):b(O))}function b(O){return O===45||O===58?w(O):O===124?(s=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),x):A(O)}function x(O){return Jt(O)?lr(e,w,"whitespace")(O):w(O)}function w(O){return O===58?(i+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),k):O===45?(i+=1,k(O)):O===null||Et(O)?T(O):A(O)}function k(O){return O===45?(e.enter("tableDelimiterFiller"),C(O)):A(O)}function C(O){return O===45?(e.consume(O),C):O===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(O))}function _(O){return Jt(O)?lr(e,T,"whitespace")(O):T(O)}function T(O){return O===124?b(O):O===null||Et(O)?!s||a!==i?A(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),r(O)):A(O)}function A(O){return n(O)}function R(O){return e.enter("tableRow"),D(O)}function D(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),D):O===null||Et(O)?(e.exit("tableRow"),r(O)):Jt(O)?lr(e,D,"whitespace")(O):(e.enter("data"),N(O))}function N(O){return O===null||O===124||Mr(O)?(e.exit("data"),D(O)):(e.consume(O),O===92?P:N)}function P(O){return O===92||O===124?(e.consume(O),N):N(O)}}function k5e(e,r){let n=-1,o=!0,a=0,i=[0,0,0,0],s=[0,0,0,0],l=!1,c=0,d,u,h;const f=new y5e;for(;++nn[2]+1){const b=n[2]+1,x=n[3]-n[2]-1;e.add(b,x,[])}}e.add(n[3]+1,0,[["exit",h,r]])}return a!==void 0&&(i.end=Object.assign({},vf(r.events,a)),e.add(a,0,[["exit",i,r]]),i=void 0),i}function JL(e,r,n,o,a){const i=[],s=vf(r.events,n);a&&(a.end=Object.assign({},s),i.push(["exit",a,r])),o.end=Object.assign({},s),i.push(["exit",o,r]),e.add(n+1,0,i)}function vf(e,r){const n=e[r],o=n[0]==="enter"?"start":"end";return n[1][o]}const _5e={name:"tasklistCheck",tokenize:S5e};function E5e(){return{text:{91:_5e}}}function S5e(e,r,n){const o=this;return a;function a(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return Mr(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return Et(c)?r(c):Jt(c)?e.check({tokenize:C5e},r,n)(c):n(c)}}function C5e(e,r,n){return lr(e,o,"whitespace");function o(a){return a===null?n(a):r(a)}}function T5e(e){return $L([O4e(),l5e(),g5e(e),x5e(),E5e()])}const A5e={};function R5e(e){const r=this,n=e||A5e,o=r.data(),a=o.micromarkExtensions||(o.micromarkExtensions=[]),i=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),s=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);a.push(T5e(n)),i.push(D4e()),s.push($4e(n))}const N5e={tokenize:D5e};function D5e(e){const r=e.attempt(this.parser.constructs.contentInitial,o,a);let n;return r;function o(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),lr(e,r,"linePrefix")}function a(l){return e.enter("paragraph"),i(l)}function i(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Et(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),s)}}const $5e={tokenize:P5e},eB={tokenize:M5e};function P5e(e){const r=this,n=[];let o=0,a,i,s;return l;function l(_){if(os))return;const D=r.events.length;let N=D,P,O;for(;N--;)if(r.events[N][0]==="exit"&&r.events[N][1].type==="chunkFlow"){if(P){O=r.events[N][1].end;break}P=!0}for(k(o),R=D;R_;){const A=n[T];r.containerState=A[1],A[0].exit.call(r,e)}n.length=_}function C(){a.write([null]),i=void 0,a=void 0,r.containerState._closeFlow=void 0}}function M5e(e,r,n){return lr(e,e.attempt(this.parser.constructs.document,r,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const z5e={tokenize:I5e};function I5e(e){const r=this,n=e.attempt(j1,o,e.attempt(this.parser.constructs.flowInitial,a,lr(e,e.attempt(this.parser.constructs.flow,a,e.attempt(hke,a)),"linePrefix")));return n;function o(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),r.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r.currentConstruct=void 0,n}}const O5e={resolveAll:rB()},j5e=tB("string"),L5e=tB("text");function tB(e){return{resolveAll:rB(e==="text"?B5e:void 0),tokenize:r};function r(n){const o=this,a=this.parser.constructs[e],i=n.attempt(a,s,l);return s;function s(u){return d(u)?i(u):l(u)}function l(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),c}function c(u){return d(u)?(n.exit("data"),i(u)):(n.consume(u),c)}function d(u){if(u===null)return!0;const h=a[u];let f=-1;if(h)for(;++f-1){const l=s[0];typeof l=="string"?s[0]=l.slice(o):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function q5e(e,r){let n=-1;const o=[];let a;for(;++n0){const Fr=it.tokenStack[it.tokenStack.length-1];(Fr[1]||cB).call(it,void 0,Fr[0])}for(Se.position={start:gu(Ee.length>0?Ee[0][1].start:{line:1,column:1,offset:0}),end:gu(Ee.length>0?Ee[Ee.length-2][1].end:{line:1,column:1,offset:0})},zt=-1;++zt0){const Fr=it.tokenStack[it.tokenStack.length-1];(Fr[1]||cB).call(it,void 0,Fr[0])}for(Se.position={start:gd(Ee.length>0?Ee[0][1].start:{line:1,column:1,offset:0}),end:gd(Ee.length>0?Ee[Ee.length-2][1].end:{line:1,column:1,offset:0})},zt=-1;++zt1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(r,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(r,u),e.applyData(r,u)}function n_e(e,r){const n={type:"element",tagName:"h"+r.depth,properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function o_e(e,r){if(e.options.allowDangerousHtml){const n={type:"raw",value:r.value};return e.patch(r,n),e.applyData(r,n)}}function uB(e,r){const n=r.referenceType;let o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+o}];const a=e.all(r),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=o:a.push({type:"text",value:o}),a}function a_e(e,r){const n=String(r.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return uB(e,r);const a={src:bf(o.url||""),alt:r.alt};o.title!==null&&o.title!==void 0&&(a.title=o.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(r,i),e.applyData(r,i)}function i_e(e,r){const n={src:bf(r.url)};r.alt!==null&&r.alt!==void 0&&(n.alt=r.alt),r.title!==null&&r.title!==void 0&&(n.title=r.title);const o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(r,o),e.applyData(r,o)}function s_e(e,r){const n={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,n);const o={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(r,o),e.applyData(r,o)}function l_e(e,r){const n=String(r.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return uB(e,r);const a={href:bf(o.url||"")};o.title!==null&&o.title!==void 0&&(a.title=o.title);const i={type:"element",tagName:"a",properties:a,children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function c_e(e,r){const n={href:bf(r.url)};r.title!==null&&r.title!==void 0&&(n.title=r.title);const o={type:"element",tagName:"a",properties:n,children:e.all(r)};return e.patch(r,o),e.applyData(r,o)}function u_e(e,r,n){const o=e.all(r),a=n?d_e(n):dB(r),i={},s=[];if(typeof r.checked=="boolean"){const d=o[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},o.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l1}function p_e(e,r){const n={},o=e.all(r);let a=-1;for(typeof r.start=="number"&&r.start!==1&&(n.start=r.start);++a0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=rc(r.children[1]),c=vx(r.children[r.children.length-1]);l&&c&&(s.position={start:l,end:c}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(r,i),e.applyData(r,i)}function y_e(e,r,n){const o=n?n.children:void 0,i=(o?o.indexOf(r):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:r.children.length;let c=-1;const u=[];for(;++c0,!0),o[0]),a=o.index+o[0].length,o=n.exec(r);return i.push(fB(r.slice(a),a>0,!1)),i.join("")}function fB(e,r,n){let o=0,a=e.length;if(r){let i=e.codePointAt(o);for(;i===pB||i===hB;)o++,i=e.codePointAt(o)}if(n){let i=e.codePointAt(a-1);for(;i===pB||i===hB;)a--,i=e.codePointAt(a-1)}return a>o?e.slice(o,a):""}function x_e(e,r){const n={type:"text",value:v_e(String(r.value))};return e.patch(r,n),e.applyData(r,n)}function w_e(e,r){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,n),e.applyData(r,n)}const k_e={blockquote:Z5e,break:Q5e,code:J5e,delete:e_e,emphasis:t_e,footnoteReference:r_e,heading:n_e,html:o_e,imageReference:a_e,image:i_e,inlineCode:s_e,linkReference:l_e,link:c_e,listItem:u_e,list:p_e,paragraph:h_e,root:f_e,strong:m_e,table:g_e,tableCell:b_e,tableRow:y_e,text:x_e,thematicBreak:w_e,toml:$x,yaml:$x,definition:$x,footnoteDefinition:$x};function $x(){}function __e(e,r){const n=[{type:"text",value:"↩"}];return r>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),n}function E_e(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function S_e(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||__e,o=e.options.footnoteBackLabel||E_e,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c0&&b.push({type:"text",value:" "});let C=typeof n=="string"?n:n(c,g);typeof C=="string"&&(C={type:"text",value:C}),b.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+f+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(c,g),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const w=d[d.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const C=w.children[w.children.length-1];C&&C.type==="text"?C.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...b)}else d.push(...b);const k={type:"element",tagName:"li",properties:{id:r+"fn-"+f},children:e.wrap(d,!0)};e.patch(u,k),l.push(k)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Ld(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
+`:"",o={};r.lang&&(o.className=["language-"+r.lang]);let a={type:"element",tagName:"code",properties:o,children:[{type:"text",value:n}]};return r.meta&&(a.data={meta:r.meta}),e.patch(r,a),a=e.applyData(r,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(r,a),a}function e_e(e,r){const n={type:"element",tagName:"del",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function t_e(e,r){const n={type:"element",tagName:"em",properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function r_e(e,r){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",o=String(r.identifier).toUpperCase(),a=bf(o.toLowerCase()),i=e.footnoteOrder.indexOf(o);let s,l=e.footnoteCounts.get(o);l===void 0?(l=0,e.footnoteOrder.push(o),s=e.footnoteOrder.length):s=i+1,l+=1,e.footnoteCounts.set(o,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(r,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(r,d),e.applyData(r,d)}function n_e(e,r){const n={type:"element",tagName:"h"+r.depth,properties:{},children:e.all(r)};return e.patch(r,n),e.applyData(r,n)}function o_e(e,r){if(e.options.allowDangerousHtml){const n={type:"raw",value:r.value};return e.patch(r,n),e.applyData(r,n)}}function dB(e,r){const n=r.referenceType;let o="]";if(n==="collapsed"?o+="[]":n==="full"&&(o+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+o}];const a=e.all(r),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=o:a.push({type:"text",value:o}),a}function a_e(e,r){const n=String(r.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return dB(e,r);const a={src:bf(o.url||""),alt:r.alt};o.title!==null&&o.title!==void 0&&(a.title=o.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(r,i),e.applyData(r,i)}function i_e(e,r){const n={src:bf(r.url)};r.alt!==null&&r.alt!==void 0&&(n.alt=r.alt),r.title!==null&&r.title!==void 0&&(n.title=r.title);const o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(r,o),e.applyData(r,o)}function s_e(e,r){const n={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};e.patch(r,n);const o={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(r,o),e.applyData(r,o)}function l_e(e,r){const n=String(r.identifier).toUpperCase(),o=e.definitionById.get(n);if(!o)return dB(e,r);const a={href:bf(o.url||"")};o.title!==null&&o.title!==void 0&&(a.title=o.title);const i={type:"element",tagName:"a",properties:a,children:e.all(r)};return e.patch(r,i),e.applyData(r,i)}function c_e(e,r){const n={href:bf(r.url)};r.title!==null&&r.title!==void 0&&(n.title=r.title);const o={type:"element",tagName:"a",properties:n,children:e.all(r)};return e.patch(r,o),e.applyData(r,o)}function d_e(e,r,n){const o=e.all(r),a=n?u_e(n):uB(r),i={},s=[];if(typeof r.checked=="boolean"){const u=o[0];let h;u&&u.type==="element"&&u.tagName==="p"?h=u:(h={type:"element",tagName:"p",properties:{},children:[]},o.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l1}function p_e(e,r){const n={},o=e.all(r);let a=-1;for(typeof r.start=="number"&&r.start!==1&&(n.start=r.start);++a0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=rc(r.children[1]),c=v3(r.children[r.children.length-1]);l&&c&&(s.position={start:l,end:c}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(r,i),e.applyData(r,i)}function y_e(e,r,n){const o=n?n.children:void 0,i=(o?o.indexOf(r):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:r.children.length;let c=-1;const d=[];for(;++c0,!0),o[0]),a=o.index+o[0].length,o=n.exec(r);return i.push(fB(r.slice(a),a>0,!1)),i.join("")}function fB(e,r,n){let o=0,a=e.length;if(r){let i=e.codePointAt(o);for(;i===pB||i===hB;)o++,i=e.codePointAt(o)}if(n){let i=e.codePointAt(a-1);for(;i===pB||i===hB;)a--,i=e.codePointAt(a-1)}return a>o?e.slice(o,a):""}function x_e(e,r){const n={type:"text",value:v_e(String(r.value))};return e.patch(r,n),e.applyData(r,n)}function w_e(e,r){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(r,n),e.applyData(r,n)}const k_e={blockquote:Z5e,break:Q5e,code:J5e,delete:e_e,emphasis:t_e,footnoteReference:r_e,heading:n_e,html:o_e,imageReference:a_e,image:i_e,inlineCode:s_e,linkReference:l_e,link:c_e,listItem:d_e,list:p_e,paragraph:h_e,root:f_e,strong:m_e,table:g_e,tableCell:b_e,tableRow:y_e,text:x_e,thematicBreak:w_e,toml:$3,yaml:$3,definition:$3,footnoteDefinition:$3};function $3(){}function __e(e,r){const n=[{type:"text",value:"↩"}];return r>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),n}function E_e(e,r){return"Back to reference "+(e+1)+(r>1?"-"+r:"")}function S_e(e){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||__e,o=e.options.footnoteBackLabel||E_e,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c0&&b.push({type:"text",value:" "});let C=typeof n=="string"?n:n(c,g);typeof C=="string"&&(C={type:"text",value:C}),b.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+f+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof o=="string"?o:o(c,g),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const w=u[u.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const C=w.children[w.children.length-1];C&&C.type==="text"?C.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...b)}else u.push(...b);const k={type:"element",tagName:"li",properties:{id:r+"fn-"+f},children:e.wrap(u,!0)};e.patch(d,k),l.push(k)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Lu(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
-`}]}}const B8={}.hasOwnProperty,C_e={};function T_e(e,r){const n=r||C_e,o=new Map,a=new Map,i=new Map,s={...k_e,...n.handlers},l={all:u,applyData:R_e,definitionById:o,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:c,options:n,patch:A_e,wrap:D_e};return v8(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?o:a,f=String(d.identifier).toUpperCase();h.has(f)||h.set(f,d)}}),l;function c(d,h){const f=d.type,g=l.handlers[f];if(B8.call(l.handlers,f)&&g)return g(l,d,h);if(l.options.passThrough&&l.options.passThrough.includes(f)){if("children"in d){const{children:x,...w}=d,k=Ld(w);return k.children=l.all(d),k}return Ld(d)}return(l.options.unknownHandler||N_e)(l,d,h)}function u(d){const h=[];if("children"in d){const f=d.children;let g=-1;for(;++g0&&n.push({type:"text",value:`
`}),n}function mB(e){let r=0,n=e.charCodeAt(r);for(;n===9||n===32;)r++,n=e.charCodeAt(r);return e.slice(r)}function gB(e,r){const n=T_e(e,r),o=n.one(e,void 0),a=S_e(n),i=Array.isArray(o)?{type:"root",children:o}:o||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
-`},a),i}function $_e(e,r){return e&&"run"in e?async function(n,o){const a=gB(n,{file:o,...r});await e.run(a,o)}:function(n,o){return gB(n,{file:o,...e||r})}}function yB(e){if(e)throw e}var F8,bB;function M_e(){if(bB)return F8;bB=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(u){return typeof Array.isArray=="function"?Array.isArray(u):r.call(u)==="[object Array]"},i=function(u){if(!u||r.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!h)return!1;var f;for(f in u);return typeof f>"u"||e.call(u,f)},s=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},l=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(o)return o(u,d).value}else return;return u[d]};return F8=function c(){var u,d,h,f,g,b,x=arguments[0],w=1,k=arguments.length,C=!1;for(typeof x=="boolean"&&(C=x,x=arguments[1]||{},w=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});ws.length;let c;l&&s.push(a);try{c=e.apply(this,s)}catch(u){const d=u;if(l&&n)throw d;return a(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,a):c instanceof Error?a(c):i(c))}function a(s,...l){n||(n=!0,r(s,...l))}function i(s){a(null,s)}}class sa extends Error{constructor(r,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof r=="string"?a=r:!i.cause&&r&&(s=!0,a=r.message,i.cause=r),!i.ruleId&&!i.source&&typeof o=="string"){const c=o.indexOf(":");c===-1?i.ruleId=o:(i.source=o.slice(0,c),i.ruleId=o.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=a,this.line=l?l.line:void 0,this.name=F1(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}sa.prototype.file="",sa.prototype.name="",sa.prototype.reason="",sa.prototype.message="",sa.prototype.stack="",sa.prototype.column=void 0,sa.prototype.line=void 0,sa.prototype.ancestors=void 0,sa.prototype.cause=void 0,sa.prototype.fatal=void 0,sa.prototype.place=void 0,sa.prototype.ruleId=void 0,sa.prototype.source=void 0;const al={basename:O_e,dirname:j_e,extname:L_e,join:B_e,sep:"/"};function O_e(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');H1(e);let n=0,o=-1,a=e.length,i;if(r===void 0||r.length===0||r.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else o<0&&(i=!0,o=a+1);return o<0?"":e.slice(n,o)}if(r===e)return"";let s=-1,l=r.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),l>-1&&(e.codePointAt(a)===r.codePointAt(l--)?l<0&&(o=a):(l=-1,o=s));return n===o?o=s:o<0&&(o=e.length),e.slice(n,o)}function j_e(e){if(H1(e),e.length===0)return".";let r=-1,n=e.length,o;for(;--n;)if(e.codePointAt(n)===47){if(o){r=n;break}}else o||(o=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function L_e(e){H1(e);let r=e.length,n=-1,o=0,a=-1,i=0,s;for(;r--;){const l=e.codePointAt(r);if(l===47){if(s){o=r+1;break}continue}n<0&&(s=!0,n=r+1),l===46?a<0?a=r:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===o+1?"":e.slice(a,n)}function B_e(...e){let r=-1,n;for(;++r0&&e.codePointAt(e.length-1)===47&&(n+="/"),r?"/"+n:n}function H_e(e,r){let n="",o=0,a=-1,i=0,s=-1,l,c;for(;++s<=e.length;){if(s2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",o=0):(n=n.slice(0,c),o=n.length-1-n.lastIndexOf("/")),a=s,i=0;continue}}else if(n.length>0){n="",o=0,a=s,i=0;continue}}r&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),o=s-a-1;a=s,i=0}else l===46&&i>-1?i++:i=-1}return n}function H1(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const V_e={cwd:q_e};function q_e(){return"/"}function q8(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function U_e(e){if(typeof e=="string")e=new URL(e);else if(!q8(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return W_e(e)}function W_e(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const r=e.pathname;let n=-1;for(;++n0){let[g,...b]=d;const x=o[f][1];V8(x)&&V8(g)&&(g=H8(!0,x,g)),o[f]=[u,g,...b]}}}}const Z_e=new G8().freeze();function X8(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function K8(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Z8(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xB(e){if(!V8(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function wB(e,r,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function Mx(e){return Q_e(e)?e:new Y_e(e)}function Q_e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function J_e(e){return typeof e=="string"||e6e(e)}function e6e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function t6e(){return Z_e().use(K5e).use(R5e).use($_e,{allowDangerousHtml:!0,clobberPrefix:"",tableCellPadding:!1,tight:!0}).use(P3e).use(q3e).use(G2e,{closeSelfClosing:!0,tightSelfClosing:!0})}function r6e(e){return String(t6e().processSync(e.trim())).trim()}function n6e(e){return Ax(sB(e),{includeHtml:!1,includeImageAlt:!1})}var Q8,kB;function o6e(){if(kB)return Q8;kB=1;var e=iO(),r=ox();function n(){this.clear()}return n.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},n.prototype.enqueue=function(o){return this.items.push(o),++this.size},n.prototype.dequeue=function(){if(this.size){var o=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,o}},n.prototype.peek=function(){if(this.size)return this.items[this.offset]},n.prototype.forEach=function(o,a){a=arguments.length>1?a:this;for(var i=this.offset,s=0,l=this.items.length;i=o.length)return{done:!0};var i=o[a];return a++,{value:i,done:!1}})},n.prototype.entries=function(){var o=this.items,a=this.offset,i=0;return new e(function(){if(a>=o.length)return{done:!0};var s=o[a];return a++,{value:[i++,s],done:!1}})},typeof Symbol<"u"&&(n.prototype[Symbol.iterator]=n.prototype.values),n.prototype.toString=function(){return this.toArray().join(",")},n.prototype.toJSON=function(){return this.toArray()},n.prototype.inspect=function(){var o=this.toArray();return Object.defineProperty(o,"constructor",{value:n,enumerable:!1}),o},typeof Symbol<"u"&&(n.prototype[Symbol.for("nodejs.util.inspect.custom")]=n.prototype.inspect),n.from=function(o){var a=new n;return r(o,function(i){a.enqueue(i)}),a},n.of=function(){return n.from(arguments)},Q8=n,Q8}var a6e=o6e();const J8=m1(a6e);var eE,_B;function i6e(){if(_B)return eE;_B=1;function e(r){if(typeof r!="function")throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");this.items=new Map,this.factory=r,this.size=0}return e.prototype.clear=function(){this.items.clear(),this.size=0},e.prototype.get=function(r){var n=this.items.get(r);return typeof n>"u"&&(n=this.factory(r,this.size),this.items.set(r,n),this.size++),n},e.prototype.peek=function(r){return this.items.get(r)},e.prototype.set=function(r,n){return this.items.set(r,n),this.size=this.items.size,this},e.prototype.has=function(r){return this.items.has(r)},e.prototype.delete=function(r){var n=this.items.delete(r);return this.size=this.items.size,n},e.prototype.forEach=function(r,n){n=arguments.length>1?n:this,this.items.forEach(r,n)},e.prototype.entries=function(){return this.items.entries()},e.prototype.keys=function(){return this.items.keys()},e.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=e.prototype.entries),e.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(e.prototype[Symbol.for("nodejs.util.inspect.custom")]=e.prototype.inspect),e.autoIncrement=function(){var r=0;return function(){return r++}},eE=e,eE}var s6e=i6e();const Xn=m1(s6e);function xf(e){return e.summary??e.description}function wf(e){return e.description??e.summary}function la(e){return!!e}const V1="@group";function l6e(e){return e.kind===V1}function EB(e,r){return at(typeof e=="string"&&e!=""),"@"+e+"."+r}function c6e(e){return e.startsWith("@")}function u6e(e){if(!e.startsWith("@"))return[null,e];const r=e.indexOf(".");if(r<2)throw new Error("Invalid global FQN");const n=e.slice(1,r),o=e.slice(r+1);return[n,o]}function q1(e){return e.startsWith("step-")}function SB(e){if(!q1(e))throw new Error(`Invalid step edge id: ${e}`);return parseFloat(e.slice(5))}function d6e(...e){return Do(p6e,e)}function p6e(e,r){let n={...e};for(let[o,a]of Object.entries(n))r(a,o,e)&&delete n[o];return n}var tE={},CB;function rE(){return CB||(CB=1,(function(e){var r=Math.pow(2,8)-1,n=Math.pow(2,16)-1,o=Math.pow(2,32)-1,a=Math.pow(2,7)-1,i=Math.pow(2,15)-1,s=Math.pow(2,31)-1;e.getPointerArray=function(c){var u=c-1;if(u<=r)return Uint8Array;if(u<=n)return Uint16Array;if(u<=o)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},e.getSignedPointerArray=function(c){var u=c-1;return u<=a?Int8Array:u<=i?Int16Array:u<=s?Int32Array:Float64Array},e.getNumberType=function(c){return c===(c|0)?Math.sign(c)===-1?c<=127&&c>=-128?Int8Array:c<=32767&&c>=-32768?Int16Array:Int32Array:c<=255?Uint8Array:c<=65535?Uint16Array:Uint32Array:Float64Array};var l={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(c,u){var d=null,h=0,f,g,b,x,w;for(x=0,w=c.length;xh&&(h=f,d=g);return d},e.isTypedArray=function(c){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(c)},e.concat=function(){var c=0,u,d,h;for(u=0,h=arguments.length;u"u"))return this.splayOnTop(s),this.V[s]},a.prototype.peek=function(i){var s=this.items[i];if(!(typeof s>"u"))return this.V[s]},a.prototype.forEach=function(i,s){s=arguments.length>1?s:this;for(var l=0,c=this.size,u=this.head,d=this.K,h=this.V,f=this.forward;l=s)return{done:!0};var d=c[l];return i++,i=s)return{done:!0};var d=c[l];return i++,i=s)return{done:!0};var h=c[l],f=u[l];return i++,i"u"))return this.splayOnTop(s),this.V[s]},a.prototype.peek=function(i){var s=this.items.get(i);if(!(typeof s>"u"))return this.V[s]},a.prototype.splayOnTop=e.prototype.splayOnTop,a.prototype.forEach=e.prototype.forEach,a.prototype.keys=e.prototype.keys,a.prototype.values=e.prototype.values,a.prototype.entries=e.prototype.entries,typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=a.prototype.entries),a.prototype.inspect=e.prototype.inspect,a.from=function(i,s,l,c){if(arguments.length<2){if(c=o.guessLength(i),typeof c!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(c=s,s=null,l=null);var u=new a(s,l,c);return r(i,function(d,h){u.set(h,d)}),u},oE=a,oE}var m6e=f6e();const DB=m1(m6e);function U1(e){return d6e(e,r=>r===void 0)}const g6e=Symbol.for("text"),y6e=Symbol.for("html"),oc="",$B=new DB(500),MB=new DB(500);class or{static getOrCreateFromText(r){if(r.trim()===oc)return or.EMPTY;let n=MB.get(r);return n||(n=new or({txt:r}),MB.set(r,n),n)}static getOrCreateFromMarkdown(r){if(r.trim()===oc)return or.EMPTY;let n=$B.get(r);return n||(n=new or({md:r}),$B.set(r,n),n)}static memoize(r,n,o){return yr(r,n,()=>or.from(o))}static from(r){return r==null||r===or.EMPTY?or.EMPTY:r instanceof or?r:typeof r=="string"?this.getOrCreateFromText(r):"isEmpty"in r&&r.isEmpty?or.EMPTY:"md"in r?this.getOrCreateFromMarkdown(r.md):this.getOrCreateFromText(r.txt)}static EMPTY=new class extends or{isEmpty=!0;nonEmpty=!1;isMarkdown=!1;$source=null;constructor(){super({txt:oc})}get text(){return null}get md(){return null}get html(){return null}};$source;isEmpty;nonEmpty;isMarkdown;constructor(r){this.isMarkdown=!1,typeof r=="string"?(this.$source={txt:r},this.isEmpty=r.trim()===oc):(this.$source=r,this.isEmpty=!0,"md"in r?(this.isEmpty=r.md===oc,this.isMarkdown=!0):this.isEmpty=r.txt===oc),this.nonEmpty=!this.isEmpty}get text(){if(this.isEmpty||this.$source===null)return oc;const r=this.$source;return"txt"in r?r.txt:yr(this,g6e,()=>n6e(r.md))}get md(){if(this.isEmpty||this.$source===null)return oc;const r=this.$source;if("md"in r)return r.md;if("txt"in r)return r.txt;Zi(r)}get html(){if(this.isEmpty||this.$source===null)return oc;const r=this.$source;return"txt"in r?r.txt:yr(this,y6e,()=>r6e(r.md))}equals(r){return this===r?!0:r instanceof or?this.isEmpty&&r.isEmpty?!0:this.isEmpty!==r.isEmpty||this.isMarkdown!==r.isMarkdown?!1:this.isMarkdown?this.$source?.md===r.$source?.md:this.$source?.txt===r.$source?.txt:!1}}function PB(e){return r=>!e(r)}function b6e(...e){return Do(v6e,e)}const v6e=(e,r)=>r.every(n=>n(e));function x6e(...e){return Do(w6e,e)}const w6e=(e,r)=>r.some(n=>n(e));function rs(e){return e==null}function zB(e,r){return e[Gd]===r}const Gd="_stage",W1="_type",IB="_layout";function k6e(e){return la(e.kind)&&!la(e.element)}function _6e(e){return"tag"in e}function E6e(e){return"kind"in e}function S6e(e){return"participant"in e}function C6e(e){return"not"in e}function T6e(e){return"and"in e}function A6e(e){return"or"in e}function Xd(e){switch(!0){case S6e(e):{const r=e.participant,n=Xd(e.operator);return R6e(r,n)}case _6e(e):{if(cu(e.tag)||"eq"in e.tag){const n=cu(e.tag)?e.tag:e.tag.eq;return o=>Array.isArray(o.tags)&&o.tags.includes(n)}const r=e.tag.neq;return n=>!Array.isArray(n.tags)||!n.tags.includes(r)}case E6e(e):{if(cu(e.kind)||"eq"in e.kind){const n=cu(e.kind)?e.kind:e.kind.eq;return o=>o.kind===n}const r=e.kind.neq;return n=>rs(n.kind)||n.kind!==r}case C6e(e):{const r=Xd(e.not);return PB(r)}case T6e(e):{const r=e.and.map(Xd);return b6e(r)}case A6e(e):{const r=e.or.map(Xd);return x6e(r)}default:Zi(e)}}function R6e(e,r){return n=>{if(!n.source||!n.target)return!1;switch(e){case"source":return r(n.source);case"target":return r(n.target)}}}function N6e(e){return e._type==="dynamic"}var Y1;(e=>{function r(c){return"model"in c&&!("project"in c)}e.isElementRef=r;function n(c){return"project"in c&&"model"in c}e.isImportRef=n;function o(c){if(cu(c))throw new Error(`Expected FqnRef, got: "${c}"`);if(n(c))return EB(c.project,c.model);if(r(c))return c.model;throw new Error("Expected FqnRef.ModelRef or FqnRef.ImportRef")}e.flatten=o;function a(c){return r(c)||n(c)}e.isModelRef=a;function i(c){return"deployment"in c&&"element"in c}e.isInsideInstanceRef=i;function s(c){return"deployment"in c&&!("element"in c)}e.isDeploymentElementRef=s;function l(c){return s(c)||i(c)}e.isDeploymentRef=l})(Y1||(Y1={}));function aE(e){return q1(e)&&e.includes(".")?e.slice(0,e.indexOf(".")+1):null}var il;(e=>{function r({x:u,y:d,width:h,height:f}){return{x:u+h/2,y:d+f/2}}e.center=r;function n(u){const{x1:d,y1:h,x2:f,y2:g}=iE.fromPoints(u);return{x:d,y:h,width:f-d,height:g-h}}e.fromPoints=n;function o(...u){if(at(Kl(u,1),"No boxes provided"),u.length===1)return u[0];let d=1/0,h=1/0,f=-1/0,g=-1/0;for(const b of u)d=Math.min(d,b.x),h=Math.min(h,b.y),f=Math.max(f,b.x+b.width),g=Math.max(g,b.y+b.height);return{x:d,y:h,width:f-d,height:g-h}}e.merge=o;function a(u){return{x:Math.min(u.x1,u.x2),y:Math.min(u.y1,u.y2),width:Math.abs(u.x2-u.x1),height:Math.abs(u.y2-u.y1)}}e.fromRectBox=a;function i(u){return{x1:u.x,y1:u.y,x2:u.x+u.width,y2:u.y+u.height}}e.toRectBox=i;function s(u,d){return d===0?u:{x:u.x-d,y:u.y-d,width:u.width+d*2,height:u.height+d*2}}e.expand=s;function l(u,d){return d===0?u:{x:u.x+d,y:u.y+d,width:u.width-d*2,height:u.height-d*2}}e.shrink=l;function c(u,d){return u===d?!0:u.x<=d.x&&u.y<=d.y&&u.x+u.width>=d.x+d.width&&u.y+u.height>=d.y+d.height}e.includes=c})(il||(il={}));var iE;(e=>{function r({x1:s,y1:l,x2:c,y2:u}){return{x:(s+c)/2,y:(l+u)/2}}e.center=r;function n(s){at(s.length>0,"At least one point is required");let l=1/0,c=1/0,u=-1/0,d=-1/0;for(const[h,f]of s)l=Math.min(l,h),c=Math.min(c,f),u=Math.max(u,h),d=Math.max(d,f);return{x1:l,y1:c,x2:u,y2:d}}e.fromPoints=n;function o(...s){at(s.length>0,"No boxes provided");let l=1/0,c=1/0,u=-1/0,d=-1/0;for(const h of s)l=Math.min(l,h.x1),c=Math.min(c,h.y1),u=Math.max(u,h.x2),d=Math.max(d,h.y2);return{x1:l,y1:c,x2:u,y2:d}}e.merge=o;function a(s){return{x:s.x1,y:s.y1,width:s.x2-s.x1,height:s.y2-s.y1}}e.toBBox=a;function i(s,l){return s===l?!0:s.x1<=l.x1&&s.y1<=l.y1&&s.x2>=l.x2&&s.y2>=l.y2}e.includes=i})(iE||(iE={}));function OB(e){const r=typeof e=="string"?e:e.color;return r.startsWith("#")||r.startsWith("rgb")}const sE={done:!1,hasNext:!1};function Kd(e,...r){let n=e,o=r.map(i=>"lazy"in i?D6e(i):void 0),a=0;for(;aLB(n,e,...r):LB(e,...r)}function LB(e,...r){let n=e;for(let o of r){if(n==null)return;n=n[o]}return n}function lE(...e){return Do(M6e,e)}function M6e(e,r){let n=[...e];return n.sort(r),n}function Px(...e){return Do(P6e,e,z6e)}const P6e=(e,r)=>e.map(r),z6e=e=>(r,n,o)=>({done:!1,hasNext:!0,next:e(r,n,o)}),I6e=["tomato","grass","blue","ruby","orange","indigo","pink","teal","purple","amber","crimson","red","lime","yellow","violet"];function O6e(e,r,n){let o=e.get(r);return o||(o=n(r),e.set(r,o)),o}var cE={},BB;function j6e(){return BB||(BB=1,(function(e){e.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var r=new Set,n=1/0,o=null,a,i,s=arguments.length;for(i=0;in.size)return!1;for(;a=o.next(),!a.done;)if(!n.has(a.value))return!1;return!0},e.isSuperset=function(r,n){return e.isSubset(n,r)},e.add=function(r,n){for(var o=n.values(),a;a=o.next(),!a.done;)r.add(a.value)},e.subtract=function(r,n){for(var o=n.values(),a;a=o.next(),!a.done;)r.delete(a.value)},e.intersect=function(r,n){for(var o=r.values(),a;a=o.next(),!a.done;)n.has(a.value)||r.delete(a.value)},e.disjunct=function(r,n){for(var o=r.values(),a,i=[];a=o.next(),!a.done;)n.has(a.value)&&i.push(a.value);for(o=n.values();a=o.next(),!a.done;)r.has(a.value)||r.add(a.value);for(var s=0,l=i.length;sn.size&&(o=r,r=n,n=o),r.size===0)return 0;if(r===n)return r.size;for(var a=r.values(),i,s=0;i=a.next(),!i.done;)n.has(i.value)&&s++;return s},e.unionSize=function(r,n){var o=e.intersectionSize(r,n);return r.size+n.size-o},e.jaccard=function(r,n){var o=e.intersectionSize(r,n);if(o===0)return 0;var a=r.size+n.size-o;return o/a},e.overlap=function(r,n){var o=e.intersectionSize(r,n);return o===0?0:o/Math.min(r.size,n.size)}})(cE)),cE}var FB=j6e();function uE(...e){let r=new Set;for(const n of e)for(const o of n)r.add(o);return r}function _f(e,...r){let n=new Set;if(e.size===0)return n;let o=Kl(r,2)?FB.intersection(...r):r[0];if(o.size===0)return n;for(const a of e)o.has(a)&&n.add(a);return n}function dE(e,r){if(e.size===0)return new Set;if(r.size===0)return new Set(e);let n=new Set;for(const o of e)r.has(o)||n.add(o);return n}function L6e(e,r){return e.size===r.size&&[...e].every(n=>r.has(n))}function pE(e,r){return FB.symmetricDifference(e,r)}function B6e(e){let r=5381;const n=e.length;at(n>0,"stringHash: empty string");for(let o=0;o>>0).toString(36)}const zx=e=>typeof e=="function";function Qd(e,r){const n=r??e;at(zx(n));function*o(a){for(const i of a)n(i)&&(yield i)}return r?o(e):o}function X1(e,r){const n=r??e;at(zx(n));function o(a){for(const i of a)if(n(i))return i}return r?o(e):o}function hE(e){return e?HB(e):HB}function HB(e){const r=e[Symbol.iterator](),{value:n}=r.next();return n}function F6e(e,r){const n=e;at(zx(n));function*o(a){for(const i of a)yield n(i)}return o}function K1(e){return e?Array.from(e):r=>Array.from(r)}function H6e(e){return e?new Set(e):r=>new Set(r)}function VB(e,r){const n=r??e;at(zx(n));function o(a){for(const i of a)if(n(i))return!0;return!1}return r?o(e):o}function V6e(e,r){const n=e;at(n>=0,"Count must be a non-negative number");function*o(a){let i=0;for(const s of a){if(i>=n)break;yield s,i++}}return a=>o(a)}function q6e(e,r){let n=Math.ceil(e),o=Math.floor(r);if(o{setTimeout(()=>{n(U6e)},r??100)})}function Ix(e){const r=uu([...e]),n=new Set(r),o=new Map(r.map(s=>[s._literalId,s])),a=new Xn(()=>null),i=r.reduce((s,l,c,u)=>(s.set(l,u.slice(c+1).filter(rO(l)).map(d=>(n.delete(d),d)).reduce((d,h)=>(d.some(to(h))||(d.push(h),a.set(h,l)),d),[])),s),new Xn(()=>[]));return{sorted:r,byId:s=>bt(o.get(s),`Element not found by id: ${s}`),root:n,parent:s=>a.get(s),children:s=>i.get(s),flatten:()=>new Set([...n,...r.reduce((s,l)=>{const c=i.get(l);return c.length===0?(s.push(l),s):(c.length>1&&s.push(...c),s)},[])])}}const fE=(e,r)=>e.size>2&&r.size!==e.size?new Set(uu([...Ix(e).flatten(),...r])):e.size>1?new Set(uu([...e])):e;function UB(e,r,n){const o=c=>r.has(c);let a=new Set([e]);const i={incomers:new Set,subjects:new Set([e]),outgoers:new Set};let s=new Set(n.incoming.flatMap(c=>{if(i.subjects.add(c.target),i.incomers.add(c.source),a.add(c.target),c.target!==e){let h=c.target.parent;for(;h&&h!==e;)a.add(h),h=h.parent}let u=c.source;const d=[];for(;d.push(u),!(o(u)||!u.parent);)u=u.parent;return d})),l=new Set(n.outgoing.flatMap(c=>{if(i.subjects.add(c.source),i.outgoers.add(c.target),a.add(c.source),c.source!==e){let h=c.source.parent;for(;h&&h!==e;)a.add(h),h=h.parent}let u=c.target;const d=[];for(;d.push(u),!(o(u)||!u.parent);)u=u.parent;return d}));return{incomers:fE(s,i.incomers),incoming:new Set(n.incoming),subjects:fE(a,i.subjects),outgoing:new Set(n.outgoing),outgoers:fE(l,i.outgoers)}}function WB(e,r,n,o="global"){const a=n?r.findView(n):null;if(o==="view")return at(a,'Scope view id is required when scope is "view"'),W6e(e,a,r);const i=r.element(e),s=H6e(i.ascendingSiblings());return UB(i,s,{incoming:[...i.incoming()],outgoing:[...i.outgoing()]})}function W6e(e,r,n){const o=n.element(e);let a={incoming:K1(Qd(o.incoming(),l=>r.includesRelation(l.id))),outgoing:K1(Qd(o.outgoing(),l=>r.includesRelation(l.id)))};const i=rO(o),s=new Set([...o.ascendingSiblings(),...Kd(r.elements(),F6e(l=>l.element),Qd(l=>l!==o&&i(l)))]);return UB(o,s,a)}var YB;(e=>{e.isInside=r=>n=>to(r,n.source.id)&&to(r,n.target.id),e.isDirectedBetween=(r,n)=>o=>(o.source.id===r||to(r,o.source.id))&&(o.target.id===n||to(n,o.target.id)),e.isAnyBetween=(r,n)=>{const o=(0,e.isDirectedBetween)(r,n),a=(0,e.isDirectedBetween)(n,r);return i=>o(i)||a(i)},e.isIncoming=r=>n=>(n.target.id===r||to(r,n.target.id))&&!to(r,n.source.id),e.isOutgoing=r=>n=>(n.source.id===r||to(r,n.source.id))&&!to(r,n.target.id),e.isAnyInOut=r=>{const n=(0,e.isIncoming)(r),o=(0,e.isOutgoing)(r);return a=>n(a)||o(a)}})(YB||(YB={}));const Y6e=Symbol.for("nodejs.util.inspect.custom");function G6e(e,r){let n=r.length-e.length;if(n===1){let[o,...a]=r;return Kd(o,{lazy:e,lazyArgs:a})}if(n===0){let o={lazy:e,lazyArgs:r};return Object.assign(a=>Kd(a,o),o)}throw Error("Wrong number of arguments")}function Ef(e){return e===""||e===void 0?!0:Array.isArray(e)?e.length===0:Object.keys(e).length===0}function mE(...e){return Do(X6e,e)}function X6e(e,r){if(e===r||Object.is(e,r))return!0;if(typeof e!="object"||!e||typeof r!="object"||!r)return!1;if(e instanceof Map&&r instanceof Map)return K6e(e,r);if(e instanceof Set&&r instanceof Set)return Z6e(e,r);let n=Object.keys(e);if(n.length!==Object.keys(r).length)return!1;for(let o of n){if(!Object.hasOwn(r,o))return!1;let{[o]:a}=e,{[o]:i}=r;if(a!==i||!Object.is(a,i))return!1}return!0}function K6e(e,r){if(e.size!==r.size)return!1;for(let[n,o]of e){let a=r.get(n);if(o!==a||!Object.is(o,a))return!1}return!0}function Z6e(e,r){if(e.size!==r.size)return!1;for(let n of e)if(!r.has(n))return!1;return!0}function Ox(...e){return G6e(Q6e,e)}function Q6e(){let e=new Set;return r=>e.has(r)?sE:(e.add(r),{done:!1,hasNext:!0,next:r})}class GB{Aux;get style(){return yr(this,"style",()=>U1({shape:this.$model.$styles.defaults.shape,color:this.$model.$styles.defaults.color,border:this.$model.$styles.defaults.border,opacity:this.$model.$styles.defaults.opacity,size:this.$model.$styles.defaults.size,padding:this.$model.$styles.defaults.padding,textSize:this.$model.$styles.defaults.text,...this.$node.style}))}get name(){return g1(this.id)}get shape(){return this.style.shape}get color(){return this.style.color}get summary(){return or.memoize(this,"summary",xf(this.$node))}get description(){return or.memoize(this,"description",wf(this.$node))}get technology(){return this.$node.technology??null}get links(){return this.$node.links??[]}ancestors(){return this.$model.ancestors(this)}commonAncestor(r){const n=b1(this.id,r.id);return n?this.$model.node(n):null}siblings(){return this.$model.siblings(this)}isSibling(r){return this.parent===r.parent}*ascendingSiblings(){yield*this.siblings();for(const r of this.ancestors())yield*r.siblings()}*descendingSiblings(){for(const r of[...this.ancestors()].reverse())yield*r.siblings();yield*this.siblings()}incoming(r="all"){return this.$model.incoming(this,r)}outgoing(r="all"){return this.$model.outgoing(this,r)}*incomers(r="all"){const n=new Set;for(const o of this.incoming(r))n.has(o.source.id)||(n.add(o.source.id),yield o.source)}*outgoers(r="all"){const n=new Set;for(const o of this.outgoing(r))n.has(o.target.id)||(n.add(o.target.id),yield o.target)}*views(){for(const r of this.$model.views())r._type==="deployment"&&r.includesDeployment(this.id)&&(yield r)}isDeploymentNode(){return!1}isInstance(){return!1}get allOutgoing(){return yr(this,Symbol.for("allOutgoing"),()=>yu.from(new Set(this.outgoingModelRelationships()),new Set(this.outgoing())))}get allIncoming(){return yr(this,Symbol.for("allIncoming"),()=>yu.from(new Set(this.incomingModelRelationships()),new Set(this.incoming())))}hasMetadata(){return!!this.$node.metadata&&!Ef(this.$node.metadata)}getMetadata(r){return r?this.$node.metadata?.[r]:this.$node.metadata??{}}isTagged(r){return this.tags.includes(r)}}class XB extends GB{constructor(r,n){super(),this.$model=r,this.$node=n,this.id=n.id,this._literalId=n.id,this.title=n.title,this.hierarchyLevel=rx(n.id)}id;_literalId;title;hierarchyLevel;get parent(){return this.$model.parent(this)}get kind(){return this.$node.kind}get tags(){return yr(this,Symbol.for("tags"),()=>Ox([...this.$node.tags??[],...this.$model.$model.specification.deployments[this.kind]?.tags??[]]))}children(){return this.$model.children(this)}descendants(r="desc"){return this.$model.descendants(this,r)}isDeploymentNode(){return!0}*instances(){for(const r of this.descendants("desc"))r.isInstance()&&(yield r)}onlyOneInstance(){const r=this.children();if(r.size!==1)return null;const n=hE(r);return n?n.isInstance()?n:n.onlyOneInstance():null}_relationshipsFromInstances=null;relationshipsFromInstances(){if(this._relationshipsFromInstances)return this._relationshipsFromInstances;const{outgoing:r,incoming:n}=this._relationshipsFromInstances={outgoing:new Set,incoming:new Set};for(const o of this.instances()){for(const a of o.element.outgoing())r.add(a);for(const a of o.element.incoming())n.add(a)}return this._relationshipsFromInstances}outgoingModelRelationships(){return this.relationshipsFromInstances().outgoing.values()}incomingModelRelationships(){return this.relationshipsFromInstances().incoming.values()}internalModelRelationships(){const{outgoing:r,incoming:n}=this.relationshipsFromInstances();return _f(n,r)}}class KB extends GB{constructor(r,n,o){super(),this.$model=r,this.$instance=n,this.element=o,this.id=n.id,this._literalId=n.id,this.title=n.title??o.title,this.hierarchyLevel=rx(n.id)}id;_literalId;title;hierarchyLevel;get $node(){return this.$instance}get parent(){return bt(this.$model.parent(this),`Parent of ${this.id} not found`)}get style(){return yr(this,"style",()=>U1({shape:this.$model.$styles.defaults.shape,color:this.$model.$styles.defaults.color,border:this.$model.$styles.defaults.border,opacity:this.$model.$styles.defaults.opacity,size:this.$model.$styles.defaults.size,padding:this.$model.$styles.defaults.padding,textSize:this.$model.$styles.defaults.text,...this.element.$element.style,...this.$instance.style}))}get tags(){return yr(this,Symbol.for("tags"),()=>Ox([...this.$instance.tags??[],...this.element.tags]))}get kind(){return this.element.kind}get summary(){return or.memoize(this,"summary",xf(this.$instance)??xf(this.element.$element))}get description(){return or.memoize(this,"description",wf(this.$instance)??wf(this.element.$element))}get technology(){return this.$instance.technology??this.element.technology??null}get links(){return this.$instance.links??this.element.links}isInstance(){return!0}outgoingModelRelationships(){return this.element.outgoing()}incomingModelRelationships(){return this.element.incoming()}*views(){for(const r of this.$model.views())if(r._type==="deployment"){if(r.includesDeployment(this.id)){yield r;continue}r.includesDeployment(this.parent.id)&&this.parent.onlyOneInstance()&&(yield r)}}}class J6e{constructor(r,n){this.instance=r,this.element=n}get id(){return this.instance.id}get _literalId(){return this.instance.id}get style(){return yr(this,"style ",()=>({shape:this.element.shape,color:this.element.color,...this.element.$element.style}))}get shape(){return this.element.shape}get color(){return this.element.color}get title(){return this.element.title}get summary(){return this.element.summary}get description(){return this.element.description}get technology(){return this.element.technology}isDeploymentNode(){return!1}isInstance(){return!1}}class e8e{constructor(r,n){this.$model=r,this.$relationship=n,this.source=r.deploymentRef(n.source),this.target=r.deploymentRef(n.target);const o=b1(this.source.id,this.target.id);this.boundary=o?this.$model.node(o):null}boundary;source;target;get id(){return this.$relationship.id}get expression(){return`${this.source.id} -> ${this.target.id}`}get title(){return la(this.$relationship.title)?this.$relationship.title:null}get technology(){return this.$relationship.technology??null}get hasSummary(){return!!this.$relationship.summary&&!!this.$relationship.description&&!mE(this.$relationship.summary,this.$relationship.description)}get summary(){return or.memoize(this,"summary",xf(this.$relationship))}get description(){return or.memoize(this,"description",wf(this.$relationship))}get tags(){return this.$relationship.tags??[]}get kind(){return this.$relationship.kind??null}get navigateTo(){return this.$relationship.navigateTo?this.$model.$model.view(this.$relationship.navigateTo):null}get links(){return this.$relationship.links??[]}get color(){return this.$relationship.color??this.$model.$styles.defaults.relationship.color}get line(){return this.$relationship.line??this.$model.$styles.defaults.relationship.line}get head(){return this.$relationship.head??this.$model.$styles.defaults.relationship.arrow}get tail(){return this.$relationship.tail}*views(){for(const r of this.$model.views())r.includesRelation(this.id)&&(yield r)}isDeploymentRelation(){return!0}isModelRelation(){return!1}hasMetadata(){return!!this.$relationship.metadata&&!Ef(this.$relationship.metadata)}getMetadata(r){return r?this.$relationship.metadata?.[r]:this.$relationship.metadata??{}}isTagged(r){return this.tags.includes(r)}}class yu{constructor(r=new Set,n=new Set){this.model=r,this.deployment=n}static empty(){return new yu}static from(r,n){return new yu(new Set(r),new Set(n))}get isEmpty(){return this.model.size===0&&this.deployment.size===0}get nonEmpty(){return this.model.size>0||this.deployment.size>0}get size(){return this.model.size+this.deployment.size}intersect(r){return yu.from(_f(this.model,r.model),_f(this.deployment,r.deployment))}difference(r){return yu.from(dE(this.model,r.model),dE(this.deployment,r.deployment))}union(r){return yu.from(uE(this.model,r.model),uE(this.deployment,r.deployment))}}function ZB(e,r){return n=>e.source===n.source&&e.target===n.target}function gE(e,r,n="directed"){if(e===r)return[];if(tO(e,r))return[];const o=_f(e.allOutgoing,r.allIncoming),a=o.size>0?new pi(e,r,o):null;if(n==="directed")return a?[a]:[];const i=_f(e.allIncoming,r.allOutgoing),s=i.size>0?new pi(r,e,i):null;return a&&s?[a,s]:a?[a]:s?[s]:[]}function QB(e,r,n="both"){if(e.allIncoming.size===0&&e.allOutgoing.size===0)return[];const o=[],a=[];for(const i of r)if(e!==i)for(const s of gE(e,i,n))s.source===e?o.push(s):a.push(s);return[...o,...a]}function t8e(e){return[...e].reduce((r,n,o,a)=>(o===a.length-1||r.push(...QB(n,a.slice(o+1),"both")),r),[])}const r8e={__proto__:null,findConnection:gE,findConnectionsBetween:QB,findConnectionsWithin:t8e};class pi{constructor(r,n,o=new Set){this.source=r,this.target=n,this.relations=o,this.id=B6e(`model:${r.id}:${n.id}`)}id;_boundary;get boundary(){return this._boundary??=this.source.commonAncestor(this.target)}get expression(){return`${this.source.id} -> ${this.target.id}`}get isDirect(){return this.nonEmpty()&&!this.isImplicit}get isImplicit(){return this.nonEmpty()&&VB(this.relations,PB(ZB(this)))}get directRelations(){return new Set(Qd(this.relations,ZB(this)))}nonEmpty(){return this.relations.size>0}mergeWith(r){return at(this.source.id===r.source.id,"Cannot merge connections with different sources"),at(this.target.id===r.target.id,"Cannot merge connections with different targets"),new pi(this.source,this.target,uE(this.relations,r.relations))}difference(r){return new pi(this.source,this.target,dE(this.relations,r.relations))}intersect(r){return at(r instanceof pi,"Cannot intersect connection with different type"),new pi(this.source,this.target,_f(this.relations,r.relations))}equals(r){at(r instanceof pi,"Cannot merge connection with different type");const n=r;return this.id===n.id&&this.source.id===n.source.id&&this.target.id===n.target.id&&L6e(this.relations,n.relations)}update(r){return new pi(this.source,this.target,r)}[Y6e](r,n,o){const a=this.toString();return Object.defineProperty(a,"constructor",{value:pi,enumerable:!1}),a}toString(){return[this.expression,this.relations.size?" relations:":" relations: [ ]",...[...this.relations].map(r=>" "+r.expression)].join(`
-`)}reversed(r=!1){if(!r)return new pi(this.target,this.source);const[n]=gE(this.target,this.source,"directed");return n??new pi(this.target,this.source,new Set)}}const JB={asc:(e,r)=>e>r,desc:(e,r)=>ee(i,a)}function yE(e,r,...n){let o=typeof e=="function"?e:e[0],a=typeof e=="function"?"asc":e[1],{[a]:i}=JB,s=r===void 0?void 0:yE(r,...n);return(l,c)=>{let u=o(l),d=o(c);return i(u,d)?1:i(d,u)?-1:s?.(l,c)??0}}function o8e(e){if(eF(e))return!0;if(typeof e!="object"||!Array.isArray(e))return!1;let[r,n,...o]=e;return eF(r)&&typeof n=="string"&&n in JB&&o.length===0}const eF=e=>typeof e=="function"&&e.length===1;function a8e(...e){return Do(i8e,e,s8e)}const i8e=(e,r)=>e.filter(r),s8e=e=>(r,n,o)=>e(r,n,o)?{done:!1,hasNext:!0,next:r}:sE;function tF(...e){return Do(l8e,e,c8e)}const l8e=(e,r)=>e.flatMap(r),c8e=e=>(r,n,o)=>{let a=e(r,n,o);return Array.isArray(a)?{done:!1,hasNext:!0,hasMany:!0,next:a}:{done:!1,hasNext:!0,next:a}};function bE(...e){return Do(u8e,e)}const u8e=(e,r)=>{let n=Object.create(null);for(let o=0;oe.at(-1);function vE(...e){return Do(f8e,e)}function f8e(e,r){let n={};for(let[o,a]of Object.entries(e))n[o]=r(a,o,e);return n}function xE(...e){return r=>Kd(r,...e)}function rF(...e){return n8e(m8e,e)}const m8e=(e,r)=>[...e].sort(r);function nF(e,r,n){return typeof r=="number"||r===void 0?o=>o.split(e,r):e.split(r,n)}function Z1(...e){return Do(Object.values,e)}class jx{constructor(r,n){this.$model=r,this.$element=n,this.id=this.$element.id,this._literalId=this.$element.id;const[o,a]=u6e(this.id);o?(this.imported={from:o,fqn:a},this.hierarchyLevel=rx(a)):(this.imported=null,this.hierarchyLevel=rx(this.id))}Aux;id;_literalId;hierarchyLevel;imported;get name(){return g1(this.id)}get parent(){return this.$model.parent(this)}get kind(){return this.$element.kind}get shape(){return this.style.shape}get color(){return this.style.color}get icon(){return this.style.icon??null}get tags(){return yr(this,Symbol.for("tags"),()=>Ox([...this.$element.tags??[],...this.$model.specification.elements[this.$element.kind]?.tags??[]]))}get title(){return this.$element.title}get hasSummary(){return!!this.$element.summary&&!!this.$element.description&&!mE(this.$element.summary,this.$element.description)}get summary(){return or.memoize(this,"summary",xf(this.$element))}get description(){return or.memoize(this,"description",wf(this.$element))}get technology(){return this.$element.technology??null}get links(){return this.$element.links??[]}get defaultView(){return yr(this,Symbol.for("defaultView"),()=>hE(this.scopedViews())??null)}get isRoot(){return this.parent===null}get style(){return yr(this,"style",()=>U1({shape:this.$model.$styles.defaults.shape,color:this.$model.$styles.defaults.color,border:this.$model.$styles.defaults.border,opacity:this.$model.$styles.defaults.opacity,size:this.$model.$styles.defaults.size,padding:this.$model.$styles.defaults.padding,textSize:this.$model.$styles.defaults.text,...this.$element.style}))}isAncestorOf(r){return to(this,r)}isDescendantOf(r){return to(r,this)}ancestors(){return this.$model.ancestors(this)}commonAncestor(r){const n=b1(this.id,r.id);return n?this.$model.element(n):null}children(){return this.$model.children(this)}descendants(r){return r?nO([...this.$model.descendants(this)],r)[Symbol.iterator]():this.$model.descendants(this)}siblings(){return this.$model.siblings(this)}*ascendingSiblings(){yield*this.siblings();for(const r of this.ancestors())yield*r.siblings()}*descendingSiblings(){for(const r of[...this.ancestors()].reverse())yield*r.siblings();yield*this.siblings()}incoming(r="all"){return this.$model.incoming(this,r)}*incomers(r="all"){const n=new Set;for(const o of this.incoming(r))n.has(o.source.id)||(n.add(o.source.id),yield o.source)}outgoing(r="all"){return this.$model.outgoing(this,r)}*outgoers(r="all"){const n=new Set;for(const o of this.outgoing(r))n.has(o.target.id)||(n.add(o.target.id),yield o.target)}get allOutgoing(){return yr(this,Symbol.for("allOutgoing"),()=>new Set(this.outgoing()))}get allIncoming(){return yr(this,Symbol.for("allIncoming"),()=>new Set(this.incoming()))}views(){return yr(this,Symbol.for("views"),()=>{const r=new Set;for(const n of this.$model.views())n.includesElement(this.id)&&r.add(n);return r})}scopedViews(){return yr(this,Symbol.for("scopedViews"),()=>{const r=new Set;for(const n of this.$model.views())n.isScopedElementView()&&n.viewOf.id===this.id&&r.add(n);return r})}isDeployed(){return la(hE(this.deployments()))}deployments(){return this.$model.deployment.instancesOf(this)}hasMetadata(){return!!this.$element.metadata&&!Ef(this.$element.metadata)}getMetadata(r){return r?this.$element.metadata?.[r]:this.$element.metadata??{}}isTagged(r){return this.tags.includes(r)}}const Tr=e=>typeof e=="string"?e:e.id,$a="/",wE=e=>{if(at(!e.includes(`
-`),"View title cannot contain newlines"),e.includes($a)){const r=e.split($a).map(n=>n.trim()).filter(n=>n.length>0);return Kl(r,1)?r:[""]}return[e.trim()]},Lx=e=>wE(e).join($a),g8e=e=>{const r=wE(e);return Kl(r,2)?r.slice(0,-1).join($a):null},kE=e=>e.includes($a)?wE(e).pop()??e:e.trim();class y8e{constructor(r){this.$model=r;const n=this.$deployments=r.$data.deployments,o=Z1(n.elements);for(const a of uu(o)){const i=this.addElement(a);for(const s of i.tags)this.#c.get(s).add(i);i.isInstance()&&this.#r.get(i.element.id).add(i)}for(const a of Z1(n.relations)){const i=this.addRelation(a);for(const s of i.tags)this.#c.get(s).add(i)}}#e=new Map;#i=new Map;#t=new Xn(()=>new Set);#r=new Xn(()=>new Set);#s=new Set;#n=new Map;#l=new Xn(()=>new Set);#a=new Xn(()=>new Set);#o=new Xn(()=>new Set);#c=new Xn(()=>new Set);#u=new Map;$deployments;get $styles(){return this.$model.$styles}element(r){if(r instanceof XB||r instanceof KB)return r;const n=Tr(r);return bt(this.#e.get(n),`Element ${n} not found`)}findElement(r){return this.#e.get(r)??null}node(r){const n=this.element(r);return at(n.isDeploymentNode(),`Element ${n.id} is not a deployment node`),n}findNode(r){const n=this.findElement(r);return n?(at(n.isDeploymentNode(),`Element ${n?.id} is not a deployment node`),n):null}instance(r){const n=this.element(r);return at(n.isInstance(),`Element ${n.id} is not a deployed instance`),n}findInstance(r){const n=this.findElement(r);return n?(at(n.isInstance(),`Element ${n?.id} is not a deployed instance`),n):null}roots(){return this.#s.values()}elements(){return this.#e.values()}*nodes(){for(const r of this.#e.values())r.isDeploymentNode()&&(yield r)}*nodesOfKind(r){for(const n of this.#e.values())n.isDeploymentNode()&&n.kind===r&&(yield n)}*instances(){for(const r of this.#e.values())r.isInstance()&&(yield r)}*instancesOf(r){const n=Tr(r),o=this.#r.get(n);o&&(yield*o)}deploymentRef(r){if(Y1.isInsideInstanceRef(r)){const{deployment:n,element:o}=r;return O6e(this.#u,`${n}@${o}`,()=>new J6e(this.instance(n),this.$model.element(o)))}return this.element(r.deployment)}relationships(){return this.#n.values()}relationship(r){return bt(this.#n.get(Tr(r)),`DeploymentRelationModel ${r} not found`)}findRelationship(r){return this.#n.get(r)??null}*views(){for(const r of this.$model.views())r.isDeploymentView()&&(yield r)}parent(r){const n=Tr(r);return this.#i.get(n)||null}children(r){const n=Tr(r);return this.#t.get(n)}*siblings(r){const n=Tr(r),o=this.parent(r)?.children()??this.roots();for(const a of o)a.id!==n&&(yield a)}*ancestors(r){let n=Tr(r),o;for(;o=this.#i.get(n);)yield o,n=o.id}*descendants(r,n="desc"){for(const o of this.children(r))n==="asc"?(yield o,yield*this.descendants(o.id)):(yield*this.descendants(o.id),yield o)}*incoming(r,n="all"){const o=Tr(r);for(const a of this.#l.get(o))switch(!0){case n==="all":case(n==="direct"&&a.target.id===o):case(n==="to-descendants"&&a.target.id!==o):yield a;break}}*outgoing(r,n="all"){const o=Tr(r);for(const a of this.#a.get(o))switch(!0){case n==="all":case(n==="direct"&&a.source.id===o):case(n==="from-descendants"&&a.source.id!==o):yield a;break}}addElement(r){if(this.#e.has(r.id))throw new Error(`Element ${r.id} already exists`);const n=k6e(r)?new XB(this,Object.freeze(r)):new KB(this,Object.freeze(r),this.$model.element(r.element));this.#e.set(n.id,n);const o=tx(n.id);return o?(at(this.#e.has(o),`Parent ${o} of ${n.id} not found`),this.#i.set(n.id,this.node(o)),this.#t.get(o).add(n)):(at(n.isDeploymentNode(),`Root element ${n.id} is not a deployment node`),this.#s.add(n)),n}addRelation(r){if(this.#n.has(r.id))throw new Error(`Relation ${r.id} already exists`);const n=new e8e(this,Object.freeze(r));this.#n.set(n.id,n),this.#l.get(n.target.id).add(n),this.#a.get(n.source.id).add(n);const o=n.boundary?.id??null;if(o)for(const a of[o,...jd(o)])this.#o.get(a).add(n);for(const a of jd(n.source.id)){if(a===o)break;this.#a.get(a).add(n)}for(const a of jd(n.target.id)){if(a===o)break;this.#l.get(a).add(n)}return n}}class oF{constructor(r,n){this.model=r,this.$relationship=n,this.source=r.element(Y1.flatten(n.source)),this.target=r.element(Y1.flatten(n.target));const o=b1(this.source.id,this.target.id);this.boundary=o?this.model.element(o):null}source;target;boundary;get id(){return this.$relationship.id}get expression(){return`${this.source.id} -> ${this.target.id}`}get title(){return la(this.$relationship.title)?this.$relationship.title:null}get technology(){return la(this.$relationship.technology)?this.$relationship.technology:null}get hasSummary(){return!!this.$relationship.summary&&!!this.$relationship.description&&!mE(this.$relationship.summary,this.$relationship.description)}get summary(){return or.memoize(this,"summary",xf(this.$relationship))}get description(){return or.memoize(this,"description",wf(this.$relationship))}get navigateTo(){return this.$relationship.navigateTo?this.model.view(this.$relationship.navigateTo):null}get tags(){return this.$relationship.tags??[]}get kind(){return this.$relationship.kind??null}get links(){return this.$relationship.links??[]}get color(){return this.$relationship.color??this.model.$styles.defaults.relationship.color}get line(){return this.$relationship.line??this.model.$styles.defaults.relationship.line}get head(){return this.$relationship.head??this.model.$styles.defaults.relationship.arrow}get tail(){return this.$relationship.tail}*views(){for(const r of this.model.views())r.includesRelation(this.id)&&(yield r)}isDeploymentRelation(){return!1}isModelRelation(){return!0}hasMetadata(){return!!this.$relationship.metadata&&!Ef(this.$relationship.metadata)}getMetadata(r){return r?this.$relationship.metadata?.[r]:this.$relationship.metadata??{}}isTagged(r){return this.tags.includes(r)}}var aF=Symbol.for("immer-nothing"),iF=Symbol.for("immer-draftable"),Ma=Symbol.for("immer-state");function ns(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Q1=Object.getPrototypeOf;function Sf(e){return!!e&&!!e[Ma]}function Jd(e){return e?lF(e)||Array.isArray(e)||!!e[iF]||!!e.constructor?.[iF]||J1(e)||Hx(e):!1}var b8e=Object.prototype.constructor.toString(),sF=new WeakMap;function lF(e){if(!e||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;const n=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let o=sF.get(n);return o===void 0&&(o=Function.toString.call(n),sF.set(n,o)),o===b8e}function Bx(e,r,n=!0){Fx(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{r(a,e[a],e)}):e.forEach((o,a)=>r(a,o,e))}function Fx(e){const r=e[Ma];return r?r.type_:Array.isArray(e)?1:J1(e)?2:Hx(e)?3:0}function _E(e,r){return Fx(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function cF(e,r,n){const o=Fx(e);o===2?e.set(r,n):o===3?e.add(n):e[r]=n}function v8e(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function J1(e){return e instanceof Map}function Hx(e){return e instanceof Set}function ep(e){return e.copy_||e.base_}function EE(e,r){if(J1(e))return new Map(e);if(Hx(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=lF(e);if(r===!0||r==="class_only"&&!n){const o=Object.getOwnPropertyDescriptors(e);delete o[Ma];let a=Reflect.ownKeys(o);for(let i=0;i1&&Object.defineProperties(e,{set:Vx,add:Vx,clear:Vx,delete:Vx}),Object.freeze(e),r&&Object.values(e).forEach(n=>SE(n,!0))),e}function x8e(){ns(2)}var Vx={value:x8e};function qx(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var w8e={};function tp(e){const r=w8e[e];return r||ns(0,e),r}var e0;function uF(){return e0}function k8e(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function dF(e,r){r&&(tp("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function CE(e){TE(e),e.drafts_.forEach(_8e),e.drafts_=null}function TE(e){e===e0&&(e0=e.parent_)}function pF(e){return e0=k8e(e0,e)}function _8e(e){const r=e[Ma];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function hF(e,r){r.unfinalizedDrafts_=r.drafts_.length;const n=r.drafts_[0];return e!==void 0&&e!==n?(n[Ma].modified_&&(CE(r),ns(4)),Jd(e)&&(e=Ux(r,e),r.parent_||Wx(r,e)),r.patches_&&tp("Patches").generateReplacementPatches_(n[Ma].base_,e,r.patches_,r.inversePatches_)):e=Ux(r,n,[]),CE(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==aF?e:void 0}function Ux(e,r,n){if(qx(r))return r;const o=e.immer_.shouldUseStrictIteration(),a=r[Ma];if(!a)return Bx(r,(i,s)=>fF(e,a,r,i,s,n),o),r;if(a.scope_!==e)return r;if(!a.modified_)return Wx(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const i=a.copy_;let s=i,l=!1;a.type_===3&&(s=new Set(i),i.clear(),l=!0),Bx(s,(c,u)=>fF(e,a,i,c,u,n,l),o),Wx(e,i,!1),n&&e.patches_&&tp("Patches").generatePatches_(a,n,e.patches_,e.inversePatches_)}return a.copy_}function fF(e,r,n,o,a,i,s){if(a==null||typeof a!="object"&&!s)return;const l=qx(a);if(!(l&&!s)){if(Sf(a)){const c=i&&r&&r.type_!==3&&!_E(r.assigned_,o)?i.concat(o):void 0,u=Ux(e,a,c);if(cF(n,o,u),Sf(u))e.canAutoFreeze_=!1;else return}else s&&n.add(a);if(Jd(a)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||r&&r.base_&&r.base_[o]===a&&l)return;Ux(e,a),(!r||!r.scope_.parent_)&&typeof o!="symbol"&&(J1(n)?n.has(o):Object.prototype.propertyIsEnumerable.call(n,o))&&Wx(e,a)}}}function Wx(e,r,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&SE(r,n)}function E8e(e,r){const n=Array.isArray(e),o={type_:n?1:0,scope_:r?r.scope_:uF(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=o,i=AE;n&&(a=[o],i=t0);const{revoke:s,proxy:l}=Proxy.revocable(a,i);return o.draft_=l,o.revoke_=s,l}var AE={get(e,r){if(r===Ma)return e;const n=ep(e);if(!_E(n,r))return S8e(e,n,r);const o=n[r];return e.finalized_||!Jd(o)?o:o===RE(e.base_,r)?(DE(e),e.copy_[r]=$E(o,e)):o},has(e,r){return r in ep(e)},ownKeys(e){return Reflect.ownKeys(ep(e))},set(e,r,n){const o=mF(ep(e),r);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const a=RE(ep(e),r),i=a?.[Ma];if(i&&i.base_===n)return e.copy_[r]=n,e.assigned_[r]=!1,!0;if(v8e(n,a)&&(n!==void 0||_E(e.base_,r)))return!0;DE(e),NE(e)}return e.copy_[r]===n&&(n!==void 0||r in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=n,e.assigned_[r]=!0),!0},deleteProperty(e,r){return RE(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,DE(e),NE(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const n=ep(e),o=Reflect.getOwnPropertyDescriptor(n,r);return o&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:o.enumerable,value:n[r]}},defineProperty(){ns(11)},getPrototypeOf(e){return Q1(e.base_)},setPrototypeOf(){ns(12)}},t0={};Bx(AE,(e,r)=>{t0[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),t0.deleteProperty=function(e,r){return t0.set.call(this,e,r,void 0)},t0.set=function(e,r,n){return AE.set.call(this,e[0],r,n,e[0])};function RE(e,r){const n=e[Ma];return(n?ep(n):e)[r]}function S8e(e,r,n){const o=mF(r,n);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function mF(e,r){if(!(r in e))return;let n=Q1(e);for(;n;){const o=Object.getOwnPropertyDescriptor(n,r);if(o)return o;n=Q1(n)}}function NE(e){e.modified_||(e.modified_=!0,e.parent_&&NE(e.parent_))}function DE(e){e.copy_||(e.copy_=EE(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var C8e=class{constructor(r){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(n,o,a)=>{if(typeof n=="function"&&typeof o!="function"){const s=o;o=n;const l=this;return function(u=s,...d){return l.produce(u,h=>o.call(this,h,...d))}}typeof o!="function"&&ns(6),a!==void 0&&typeof a!="function"&&ns(7);let i;if(Jd(n)){const s=pF(this),l=$E(n,void 0);let c=!0;try{i=o(l),c=!1}finally{c?CE(s):TE(s)}return dF(s,a),hF(i,s)}else if(!n||typeof n!="object"){if(i=o(n),i===void 0&&(i=n),i===aF&&(i=void 0),this.autoFreeze_&&SE(i,!0),a){const s=[],l=[];tp("Patches").generateReplacementPatches_(n,i,s,l),a(s,l)}return i}else ns(1,n)},this.produceWithPatches=(n,o)=>{if(typeof n=="function")return(l,...c)=>this.produceWithPatches(l,u=>n(u,...c));let a,i;return[this.produce(n,o,(l,c)=>{a=l,i=c}),a,i]},typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze),typeof r?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(r.useStrictShallowCopy),typeof r?.useStrictIteration=="boolean"&&this.setUseStrictIteration(r.useStrictIteration)}createDraft(r){Jd(r)||ns(8),Sf(r)&&(r=T8e(r));const n=pF(this),o=$E(r,void 0);return o[Ma].isManual_=!0,TE(n),o}finishDraft(r,n){const o=r&&r[Ma];(!o||!o.isManual_)&&ns(9);const{scope_:a}=o;return dF(a,n),hF(void 0,a)}setAutoFreeze(r){this.autoFreeze_=r}setUseStrictShallowCopy(r){this.useStrictShallowCopy_=r}setUseStrictIteration(r){this.useStrictIteration_=r}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(r,n){let o;for(o=n.length-1;o>=0;o--){const i=n[o];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}o>-1&&(n=n.slice(o+1));const a=tp("Patches").applyPatches_;return Sf(r)?a(r,n):this.produce(r,i=>a(i,n))}};function $E(e,r){const n=J1(e)?tp("MapSet").proxyMap_(e,r):Hx(e)?tp("MapSet").proxySet_(e,r):E8e(e,r);return(r?r.scope_:uF()).drafts_.push(n),n}function T8e(e){return Sf(e)||ns(10,e),gF(e)}function gF(e){if(!Jd(e)||qx(e))return e;const r=e[Ma];let n,o=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=EE(e,r.scope_.immer_.useStrictShallowCopy_),o=r.scope_.immer_.shouldUseStrictIteration()}else n=EE(e,!0);return Bx(n,(a,i)=>{cF(n,a,gF(i))},o),r&&(r.finalized_=!1),n}var A8e=new C8e,yF=A8e.produce;function R8e(e){return Kd(e,a8e(r=>!!r.notation),bE(Zd("notation")),vE(xE(bE(Zd("shape")),vE(xE(bE(Zd("color")),vE(xE(Px(Zd("kind")),Ox())),G1(),Px(([r,n])=>({kinds:n,color:r})))),G1(),tF(([r,n])=>n.map(({color:o,kinds:a})=>({shape:r,color:o,kinds:a}))))),G1(),tF(([r,n])=>n.map(({shape:o,color:a,kinds:i})=>({title:r,shape:o,color:a,kinds:i}))),rF(Zd("shape"),Zd("title"),[r=>r.kinds.length,"desc"]))}const sl=(e,r)=>e===r||rs(e)&&rs(r)?!1:!Vv(e,r),bF=5;function N8e(e,r){e.color=r.color,e.kind=r.kind,e.navigateTo=r.navigateTo??null,e.links=r.links?[...r.links]:null,e.tags=[...r.tags],rs(r.style.border)?delete e.style.border:e.style.border=r.style.border,d8e(r.style.opacity)?e.style.opacity=r.style.opacity:delete e.style.opacity,rs(r.style.multiple)?delete e.style.multiple:e.style.multiple=r.style.multiple}function D8e(e,r,n){if(sl(r.icon??"none",e.icon??"none")){const o=la(e.icon)&&e.icon!=="none";switch(!0){case(o&&la(r.icon)&&r.icon!=="none"):return e.icon=r.icon,!0;case(o&&(rs(r.icon)||r.icon==="none")):return e.icon="none",!0;case(!o&&la(r.icon)&&r.icon!=="none"):return n?(e.icon=r.icon,!0):!1}}return!0}function $8e(e,r,n){let o=!0;return sl(e.title,r.title)&&(n?e.title=r.title:o=!1),sl(e.description,r.description)&&(rs(r.description)?delete e.description:n?e.description=r.description:o=!1),sl(e.technology,r.technology)&&(rs(r.technology)?delete e.technology:n?e.technology=r.technology:o=!1),o}function M8e(e,r,n){return e.title=r.title,rs(r.description)?delete e.description:e.description=r.description,rs(r.technology)?delete e.technology:e.technology=r.technology,!0}function vF(e,r){at(e.id===r.id,"applyManualLayout: view ids do not match"),at(e._stage==="layouted","applyManualLayout: expected layouted view"),at(r._stage==="layouted","applyManualLayout: expected layouted snapshot"),at(e._layout!=="manual","applyManualLayout: expected auto-layouted view");const n=new Set;e._type!==r._type&&n.add("type-changed");const o=new Map(e.nodes.map(b=>[b.id,b])),a=new Map(e.edges.map(b=>[b.id,b])),i=new Set(o.keys()),s=new Set(a.keys()),l=new Set(r.nodes.map(b=>b.id)),c=new Set(r.edges.map(b=>b.id));pE(i,l).size>0&&n.add("nodes-mismatch"),pE(s,c).size>0&&n.add("edges-mismatch");const u=r.nodes.map(b=>{const x=o.get(b.id);return yF(b,w=>{if(!x){w.drifts=["missing"];return}N8e(w,x);const k=new Set,C=b.children.length>0,_=x.children.length>0;(sl(w.modelRef,x.modelRef)||sl(w.deploymentRef,x.deploymentRef))&&k.add("modelRef-changed"),_&&!C&&k.add("became-compound"),!_&&C&&k.add("became-leaf"),sl(w.parent,x.parent)&&k.add("parent-changed");const T=w.width+bF>=x.width&&w.height+bF>=x.height;sl(w.shape,x.shape)&&(T?w.shape=x.shape:k.add("shape-changed")),D8e(w,x,T&&_===C)||k.add("label-changed"),(C?M8e:$8e)(w,x,T)||k.add("label-changed"),sl(b.notation,x.notation)&&(w.notation=x.notation??null),C&&_&&pE(new Set(b.children),new Set(x.children)).size>0&&k.add("children-changed");const R=[...k];Kl(R,1)&&(n.add("nodes-mismatch"),w.drifts=R)})}),d=r.edges.map(b=>{const x=a.get(b.id);return yF(b,w=>{if(!x){w.drifts=["missing"];return}const k=new Set;w.source===x.target&&w.target===x.source?k.add("direction-changed"):(w.source!==x.source&&k.add("source-changed"),w.target!==x.target&&k.add("target-changed")),k.size===0&&sl(w.dir??"forward",x.dir??"forward")&&k.add("direction-changed"),w.color=x.color,w.line=x.line,w.navigateTo=x.navigateTo??null,w.tags=x.tags?[...x.tags]:null,rs(x.notes)?delete w.notes:w.notes=x.notes,x.astPath&&(w.astPath=x.astPath),x.labelBBox?((!w.labelBBox||!la(w.label)&&la(x.label))&&k.add("label-changed"),w.labelBBox={x:w.labelBBox?.x??x.labelBBox.x,y:w.labelBBox?.y??x.labelBBox.y,width:x.labelBBox.width,height:x.labelBBox.height},w.label=x.label,w.description=x.description??null,w.technology=x.technology??null):b.labelBBox&&k.add("label-changed");const C=[...k];Kl(C,1)&&(n.add("edges-mismatch"),w.drifts=C)})}),h=R8e(u),f={...r};Object.assign(f,{title:e.title??r.title,description:e.description??r.description,tags:e.tags?[...e.tags]:null,links:e.links?[...e.links]:null,[IB]:"manual",...h&&h.length>0?{notation:{nodes:h}}:{},nodes:u,edges:d}),N6e(e)&&f._type==="dynamic"&&Object.assign(f,{variant:e.variant});const g=[...n];return Kl(g,1)?f.drifts=g:"drifts"in f&&delete f.drifts,f}function P8e(e,r){const{drifts:n}=vF(e,r);if(n)Object.assign(e,{[IB]:"auto",drifts:n});else{const o=e;"drifts"in e&&delete o.drifts}return e}class z8e{constructor(r,n,o,a){this.source=o,this.target=a,this.$viewModel=r,this.$view=r.$view,this.$edge=n}Aux;$viewModel;$view;$edge;get id(){return this.$edge.id}get parent(){return this.$edge.parent?this.$viewModel.node(this.$edge.parent):null}get label(){return this.$edge.label??null}get description(){return or.memoize(this,"description",this.$edge.description)}get technology(){return this.$edge.technology??null}hasParent(){return this.$edge.parent!==null}get tags(){return this.$edge.tags??[]}get stepNumber(){return this.isStep()?SB(this.id):null}get navigateTo(){return this.$edge.navigateTo?this.$viewModel.$model.view(this.$edge.navigateTo):null}get color(){return this.$edge.color}get line(){return this.$edge.line??this.$viewModel.$styles.defaults.relationship.line}get head(){return this.$edge.head??this.$viewModel.$styles.defaults.relationship.arrow}get tail(){return this.$edge.tail}isStep(){return q1(this.id)}*relationships(r){for(const n of this.$edge.relations)if(r){const o=this.$viewModel.$model.findRelationship(n,r);o&&(yield o)}else yield this.$viewModel.$model.relationship(n)}includesRelation(r){const n=typeof r=="string"?r:r.id;return this.$edge.relations.includes(n)}isTagged(r){return this.tags.includes(r)}}class I8e{Aux;$viewModel;$view;$node;constructor(r,n){this.$viewModel=r,this.$view=r.$view,this.$node=n}get id(){return this.$node.id}get title(){return this.$node.title}get kind(){return this.$node.kind}get description(){return or.memoize(this,"description",this.$node.description)}get technology(){return this.$node.technology??null}get parent(){return this.$node.parent?this.$viewModel.node(this.$node.parent):null}get element(){const r=this.$node.modelRef;return r?this.$viewModel.$model.element(r):null}get deployment(){const r=this.$node.deploymentRef;return r?this.$viewModel.$model.deployment.element(r):null}get shape(){return this.$node.shape}get color(){return this.$node.color}get icon(){return this.$node.icon??null}get tags(){return this.$node.tags}get links(){return this.$node.links??[]}get navigateTo(){return this.$node.navigateTo?this.$viewModel.$model.view(this.$node.navigateTo):null}get style(){return this.$node.style}get x(){return"x"in this.$node?this.$node.x:void 0}get y(){return"y"in this.$node?this.$node.y:void 0}get width(){return"width"in this.$node?this.$node.width:void 0}get height(){return"height"in this.$node?this.$node.height:void 0}children(){return yr(this,"children",()=>new Set(this.$node.children.map(r=>this.$viewModel.node(r))))}*ancestors(){let r=this.parent;for(;r;)yield r,r=r.parent}*siblings(){const r=this.parent?.children()??this.$viewModel.roots();for(const n of r)n.id!==this.id&&(yield n)}*incoming(r="all"){for(const n of this.$node.inEdges){const o=this.$viewModel.edge(n);switch(!0){case r==="all":case(r==="direct"&&o.target.id===this.id):case(r==="to-descendants"&&o.target.id!==this.id):yield o;break}}}*incomers(r="all"){const n=new Set;for(const o of this.incoming(r))n.has(o.source.id)||(n.add(o.source.id),yield o.source)}*outgoing(r="all"){for(const n of this.$node.outEdges){const o=this.$viewModel.edge(n);switch(!0){case r==="all":case(r==="direct"&&o.source.id===this.id):case(r==="from-descendants"&&o.source.id!==this.id):yield o;break}}}*outgoers(r="all"){const n=new Set;for(const o of this.outgoing(r))n.has(o.target.id)||(n.add(o.target.id),yield o.target)}isLayouted(){return"width"in this.$node&&"height"in this.$node}hasChildren(){return this.$node.children.length>0}hasParent(){return this.$node.parent!==null}hasElement(){return la(this.$node.modelRef)}hasDeployment(){return la(this.$node.deploymentRef)}hasDeployedInstance(){return this.hasElement()&&this.hasDeployment()}isGroup(){return l6e(this.$node)}isTagged(r){return this.tags.includes(r)}}class ME{Aux;#e;#i=new Set;#t=new Map;#r=new Map;#s=new Set;#n=new Set;#l=new Set;#a=new Xn(r=>new Set);#o;id;$model;title;folder;viewPath;constructor(r,n,o,a){this.$model=r,this.#e=o,this.id=o.id,this.folder=n,this.#o=a;for(const i of this.#e.nodes){const s=new I8e(this,Object.freeze(i));this.#t.set(i.id,s),i.parent||this.#i.add(s),i.deploymentRef&&this.#n.add(i.deploymentRef),i.modelRef&&this.#s.add(i.modelRef);for(const l of s.tags)this.#a.get(l).add(s)}for(const i of this.#e.edges){const s=new z8e(this,Object.freeze(i),this.node(i.source),this.node(i.target));for(const l of s.tags)this.#a.get(l).add(s);for(const l of i.relations)this.#l.add(l);this.#r.set(i.id,s)}this.title=o.title?kE(o.title):null,this.viewPath=o.title?Lx(o.title):o.id}get $styles(){return this.$model.$styles}get _type(){return this.#e[W1]}get stage(){return this.#e[Gd]}get bounds(){if("bounds"in this.#e)return this.#e.bounds;if(this.#o)return this.#o.bounds;throw new Error("View is not layouted")}get titleOrId(){return this.title??this.viewOf?.title??this.id}get titleOrUntitled(){return this.title??"Untitled"}get breadcrumbs(){return yr(this,"breadcrumbs",()=>this.folder.isRoot?[this]:[...this.folder.breadcrumbs,this])}get description(){return or.memoize(this,"description",this.#e.description)}get tags(){return this.#e.tags??[]}get links(){return this.#e.links??[]}get viewOf(){if(this.isElementView()){const r=this.#e.viewOf;return r?this.$model.element(r):null}return null}get mode(){return this.isDynamicView()?this.#e.variant??"diagram":null}get includedTags(){return[...this.#a.keys()]}get $view(){if(!this.isLayouted()||"drifts"in this.#e)return this.#e;const r=this.#o;return r?yr(this,"withDriftReasons",()=>P8e(this.#e,r)):this.#e}get $layouted(){if(!this.isLayouted())throw new Error("View is not layouted");return this.manualLayouted??this.#e}get hasManualLayout(){return this.#o!==void 0}get manualLayouted(){if(!this.isLayouted())return null;const r=this.#o;return r?yr(this,"snapshotWithManualLayout",()=>vF(this.#e,r)):null}get driftReasons(){return this.isLayouted()?this.$view.drifts??[]:[]}roots(){return this.#i.values()}*compounds(){for(const r of this.#t.values())r.hasChildren()&&(yield r)}node(r){const n=Tr(r);return bt(this.#t.get(n),`Node ${n} not found in view ${this.#e.id}`)}findNode(r){return this.#t.get(Tr(r))??null}findNodeWithElement(r){const n=Tr(r);return this.#s.has(n)?X1(this.#t.values(),o=>o.hasElement()&&o.element.id===n)??null:null}nodes(){return this.#t.values()}edge(r){const n=Tr(r);return bt(this.#r.get(n),`Edge ${n} not found in view ${this.#e.id}`)}findEdge(r){return this.#r.get(Tr(r))??null}edges(){return this.#r.values()}*edgesWithRelation(r){for(const n of this.#r.values())n.includesRelation(r)&&(yield n)}*elements(){for(const r of this.#t.values())r.hasElement()&&(yield r)}isTagged(r){return this.tags.includes(r)}includesElement(r){return this.#s.has(Tr(r))}includesDeployment(r){return this.#n.has(Tr(r))}includesRelation(r){return this.#l.has(Tr(r))}isComputed(){return this.#e[Gd]==="computed"}isLayouted(){return this.#e[Gd]==="layouted"}isDiagram(){return this.#e[Gd]==="layouted"}isElementView(){return this.#e[W1]==="element"}isScopedElementView(){return this.#e[W1]==="element"&&la(this.#e.viewOf)}isDeploymentView(){return this.#e[W1]==="deployment"}isDynamicView(){return this.#e[W1]==="dynamic"}}class Yx{$model;path;title;isRoot;parentPath;defaultViewId;constructor(r,n,o){this.$model=r,this.path=n.join("/"),this.isRoot=this.path==="",this.title=p8e(n),this.isRoot?this.parentPath=void 0:this.parentPath=n.slice(0,-1).join("/"),this.defaultViewId=o}get defaultView(){return this.defaultViewId?this.$model.view(this.defaultViewId):null}get breadcrumbs(){return at(!this.isRoot,"Root view folder has no breadcrumbs"),yr(this,"breadcrumbs",()=>{const r=this.parent;return r?r.isRoot?[r,this]:[...r.breadcrumbs,this]:[this]})}get parent(){return at(!this.isRoot,"Root view folder has no parent"),Ef(this.parentPath)?null:this.$model.viewFolder(this.parentPath)}get children(){return this.$model.viewFolderItems(this.path)}get folders(){return yr(this,"folders",()=>{const r=[];for(const n of this.children)n instanceof Yx&&r.push(n);return r})}get views(){return yr(this,"views",()=>{const r=[];for(const n of this.children)n instanceof ME&&r.push(n);return r})}}class rp{Aux;_elements=new Map;_parents=new Map;_children=new Xn(()=>new Set);_rootElements=new Set;_relations=new Map;_incoming=new Xn(()=>new Set);_outgoing=new Xn(()=>new Set);_internal=new Xn(()=>new Set);_views=new Map;_rootViewFolder;_viewFolders=new Map;_viewFolderItems=new Xn(()=>new Set);_allTags=new Xn(()=>new Set);static fromParsed(r){return new rp(r)}static create(r){return new rp(r)}static fromDump(r){const{_stage:n="layouted",projectId:o="unknown",project:a,globals:i,imports:s,deployments:l,views:c,relations:u,elements:d,specification:h}=r;return new rp({[Gd]:n,projectId:o,project:a,globals:{predicates:i?.predicates??{},dynamicPredicates:i?.dynamicPredicates??{},styles:i?.styles??{}},imports:s??{},deployments:{elements:l?.elements??{},relations:l?.relations??{}},views:c??{},relations:u??{},elements:d??{},specification:h})}deployment;$data;constructor(r){this.$data=r;for(const[,n]of G1(r.elements)){const o=this.addElement(n);for(const a of o.tags)this._allTags.get(a).add(o)}for(const[n,o]of G1(r.imports??{}))for(const a of uu(o)){const i=this.addImportedElement(n,a);for(const s of i.tags)this._allTags.get(s).add(i)}for(const n of Z1(r.relations)){const o=this.addRelation(n);for(const a of o.tags)this._allTags.get(a).add(o)}if(this.deployment=new y8e(this),zB(r,"computed")||zB(r,"layouted")){const n=eO($a);Z1(r.views);const o=Kd(Z1(r.views),Px(i=>({view:i,path:Lx(i.title??i.id),folderPath:i.title&&g8e(i.title)||""})),lE((i,s)=>n(i.folderPath,s.folderPath))),a=i=>{let s=this._viewFolders.get(i);if(!s){const l=nF(i,$a);at(Kl(l,1),`View group path "${i}" must have at least one element`);let c;i===""?c=o.find(u=>u.view.id==="index"):c=o.find(u=>u.path===i),s=new Yx(this,l,c?.view.id),this._viewFolders.set(i,s)}return s};this._rootViewFolder=a("");for(const{folderPath:i}of o)this._viewFolders.has(i)||nF(i,$a).reduce((s,l)=>{const c=s.join($a),u=Ef(c)?l:c+$a+l,d=a(u);return this._viewFolderItems.get(c).add(d),s.push(l),s},[]);for(const{view:i,folderPath:s}of o){const l=new ME(this,a(s),i,r.manualLayouts?.[i.id]);this._viewFolderItems.get(s).add(l),this._views.set(i.id,l);for(const c of l.tags)this._allTags.get(c).add(l)}}else this._rootViewFolder=new Yx(this,[""],void 0),this._viewFolders.set(this._rootViewFolder.path,this._rootViewFolder)}get asParsed(){return this}get asComputed(){return this}get asLayouted(){return this}get $styles(){return yr(this,"styles",()=>ZI.from(this.$data.project.styles,this.$data.specification.customColors?{theme:{colors:this.$data.specification.customColors}}:void 0))}isParsed(){return this.stage==="parsed"}isLayouted(){return this.stage==="layouted"}isComputed(){return this.stage==="computed"}get $model(){return this.$data}get stage(){return this.$data[Gd]}get projectId(){return this.$data.projectId??"default"}get project(){return this.$data.project??yr(this,Symbol.for("project"),()=>({id:this.projectId}))}get specification(){return this.$data.specification}get globals(){return yr(this,Symbol.for("globals"),()=>({predicates:{...this.$data.globals?.predicates},dynamicPredicates:{...this.$data.globals?.dynamicPredicates},styles:{...this.$data.globals?.styles}}))}element(r){if(r instanceof jx)return r;const n=Tr(r);return bt(this._elements.get(n),`Element ${n} not found`)}findElement(r){return this._elements.get(Tr(r))??null}roots(){return this._rootElements.values()}elements(){return this._elements.values()}relationships(){return this._relations.values()}relationship(r,n){if(n==="deployment")return this.deployment.relationship(r);const o=Tr(r);let a=this._relations.get(o)??null;return a||n==="model"?bt(a,`Model relation ${o} not found`):bt(this.deployment.findRelationship(o),`No model/deployment relation ${o} not found`)}findRelationship(r,n){if(n==="deployment")return this.deployment.findRelationship(r);let o=this._relations.get(Tr(r))??null;return o||n==="model"?o:this.deployment.findRelationship(r)}views(){return this._views.values()}view(r){const n=Tr(r);return bt(this._views.get(n),`View ${n} not found`)}findView(r){return this._views.get(r)??null}viewFolder(r){return bt(this._viewFolders.get(r),`View folder ${r} not found`)}get rootViewFolder(){return this._rootViewFolder}get hasViewFolders(){return this._viewFolders.size>1}viewFolderItems(r){return at(this._viewFolders.has(r),`View folder ${r} not found`),this._viewFolderItems.get(r)}parent(r){const n=Tr(r);return this._parents.get(n)||null}children(r){const n=Tr(r);return this._children.get(n)}*siblings(r){const n=Tr(r),o=this._parents.get(n),a=o?this._children.get(o.id).values():this.roots();for(const i of a)i.id!==n&&(yield i)}*ancestors(r){let n=Tr(r),o;for(;o=this._parents.get(n);)yield o,n=o.id}*descendants(r){for(const n of this.children(r))yield n,yield*this.descendants(n.id)}*incoming(r,n="all"){const o=Tr(r);for(const a of this._incoming.get(o))switch(!0){case n==="all":case(n==="direct"&&a.target.id===o):case(n==="to-descendants"&&a.target.id!==o):yield a;break}}*outgoing(r,n="all"){const o=Tr(r);for(const a of this._outgoing.get(o))switch(!0){case n==="all":case(n==="direct"&&a.source.id===o):case(n==="from-descendants"&&a.source.id!==o):yield a;break}}get tags(){return yr(this,"tags",()=>lE([...this._allTags.keys()],ex))}get tagsSortedByUsage(){return yr(this,"tagsSortedByUsage",()=>Kd([...this._allTags.entries()],Px(([r,n])=>({tag:r,count:n.size,tagged:n})),lE((r,n)=>ex(r.tag,n.tag)),rF([Zd("count"),"desc"])))}findByTag(r,n){return Qd(this._allTags.get(r),o=>n==="elements"?o instanceof jx:n==="views"?o instanceof ME:n==="relationships"?o instanceof oF:!0)}*elementsOfKind(r){for(const n of this._elements.values())n.kind===r&&(yield n)}*elementsWhere(r){const n=Xd(r);for(const o of this._elements.values())n(o)&&(yield o)}*relationshipsWhere(r){const n=Xd(r);for(const o of this._relations.values())n(o)&&(yield o)}addElement(r){if(this._elements.has(r.id))throw new Error(`Element ${r.id} already exists`);const n=new jx(this,Object.freeze(r));this._elements.set(n.id,n);const o=tx(n.id);return o?(at(this._elements.has(o),`Parent ${o} of ${n.id} not found`),this._parents.set(n.id,this.element(o)),this._children.get(o).add(n)):this._rootElements.add(n),n}addImportedElement(r,n){at(!c6e(n.id),"Imported element already has global FQN");const o=EB(r,n.id);if(this._elements.has(o))throw new Error(`Element ${o} already exists`);const a=new jx(this,Object.freeze({...n,id:o}));this._elements.set(a.id,a);let i=tx(a.id);for(;i;){if(i.includes(".")&&this._elements.has(i))return this._parents.set(a.id,this.element(i)),this._children.get(i).add(a),a;i=tx(i)}return this._rootElements.add(a),a}addRelation(r){if(this._relations.has(r.id))throw new Error(`Relation ${r.id} already exists`);const n=new oF(this,Object.freeze(r)),{source:o,target:a}=n;this._relations.set(n.id,n),this._incoming.get(a.id).add(n),this._outgoing.get(o.id).add(n);const i=b1(o.id,a.id);if(i)for(const s of[i,...jd(i)])this._internal.get(s).add(n);for(const s of jd(o.id)){if(s===i)break;this._outgoing.get(s).add(n)}for(const s of jd(a.id)){if(s===i)break;this._incoming.get(s).add(n)}return n}}(e=>{e.EMPTY=e.create({_stage:"computed",projectId:"default",project:{id:"default"},specification:{elements:{},relationships:{},deployments:{},tags:{}},globals:{predicates:{},dynamicPredicates:{},styles:{}},deployments:{elements:{},relations:{}},elements:{},relations:{},views:{},imports:{}})})(rp||(rp={}));function Gx(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}var O8e=e=>typeof e=="object"&&e!==null;function np(e){return Object.fromEntries(Object.entries(e??{}).filter(([r,n])=>n!==void 0))}var j8e=e=>e==="base";function L8e(e){return e.slice().filter(r=>!j8e(r))}function xF(e){return String.fromCharCode(e+(e>25?39:97))}function B8e(e){let r="",n;for(n=Math.abs(e);n>52;n=n/52|0)r=xF(n%52)+r;return xF(n%52)+r}function F8e(e,r){let n=r.length;for(;n;)e=e*33^r.charCodeAt(--n);return e}function H8e(e){return B8e(F8e(5381,e)>>>0)}var wF=/\s*!(important)?/i;function V8e(e){return typeof e=="string"?wF.test(e):!1}function q8e(e){return typeof e=="string"?e.replace(wF,"").trim():e}function PE(e){return typeof e=="string"?e.replaceAll(" ","_"):e}var go=e=>{const r=new Map;return(...n)=>{const o=JSON.stringify(n);if(r.has(o))return r.get(o);const a=e(...n);return r.set(o,a),a}},U8e=new Set(["__proto__","constructor","prototype"]);function zE(...e){return e.reduce((r,n)=>(n&&Object.keys(n).forEach(o=>{if(U8e.has(o))return;const a=r[o],i=n[o];Gx(a)&&Gx(i)?r[o]=zE(a,i):r[o]=i}),r),{})}var W8e=e=>e!=null;function IE(e,r,n={}){const{stop:o,getKey:a}=n;function i(s,l=[]){if(O8e(s)){const c={};for(const[u,d]of Object.entries(s)){const h=a?.(u,d)??u,f=[...l,h];if(o?.(s,f))return r(s,l);const g=i(d,f);W8e(g)&&(c[h]=g)}return c}return r(s,l)}return i(e)}function Y8e(e,r){return Array.isArray(e)?e.map(n=>r(n)):Gx(e)?IE(e,n=>r(n)):r(e)}function G8e(e,r){return e.reduce((n,o,a)=>{const i=r[a];return o!=null&&(n[i]=o),n},{})}function kF(e,r,n=!0){const{utility:o,conditions:a}=r,{hasShorthand:i,resolveShorthand:s}=o;return IE(e,l=>Array.isArray(l)?G8e(l,a.breakpoints.keys):l,{stop:l=>Array.isArray(l),getKey:n?l=>i?s(l):l:void 0})}var X8e={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},K8e=e=>typeof e=="string"?e.replaceAll(/[\n\s]+/g," "):e;function _F(e){const{utility:r,hash:n,conditions:o=X8e}=e,a=s=>[r.prefix,s].filter(Boolean).join("-"),i=(s,l)=>{let c;if(n){const u=[...o.finalize(s),l];c=a(r.toHash(u,H8e))}else c=[...o.finalize(s),a(l)].join(":");return c};return go(({base:s,...l}={})=>{const c=Object.assign(l,s),u=kF(c,e),d=new Set;return IE(u,(h,f)=>{if(h==null)return;const g=V8e(h),[b,...x]=o.shift(f),w=L8e(x),k=r.transform(b,q8e(K8e(h)));let C=i(w,k.className);g&&(C=`${C}!`),d.add(C)}),Array.from(d).join(" ")})}function Z8e(...e){return e.flat().filter(r=>Gx(r)&&Object.keys(np(r)).length>0)}function Q8e(e){function r(a){const i=Z8e(...a);return i.length===1?i:i.map(s=>kF(s,e))}function n(...a){return zE(...r(a))}function o(...a){return Object.assign({},...r(a))}return{mergeCss:go(n),assignCss:o}}var J8e=/([A-Z])/g,eEe=/^ms-/,tEe=go(e=>e.startsWith("--")?e:e.replace(J8e,"-$1").replace(eEe,"-ms-").toLowerCase()),rEe=["min","max","clamp","calc"],nEe=new RegExp(`^(${rEe.join("|")})\\(.*\\)`),oEe=e=>typeof e=="string"&&nEe.test(e),aEe="cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%",iEe=`(?:${aEe.split(",").join("|")})`,sEe=new RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${iEe}$`),lEe=e=>typeof e=="string"&&sEe.test(e),cEe=e=>typeof e=="string"&&/^var\(--.+\)$/.test(e),r0={map:Y8e,isCssFunction:oEe,isCssVar:cEe,isCssUnit:lEe},n0=(e,r)=>{if(!e?.defaultValues)return r;const n=typeof e.defaultValues=="function"?e.defaultValues(r):e.defaultValues;return Object.assign({},n,np(r))},uEe=(e={})=>{const r=o=>({className:[e.className,o].filter(Boolean).join("__"),base:e.base?.[o]??{},variants:{},defaultVariants:e.defaultVariants??{},compoundVariants:e.compoundVariants?OE(e.compoundVariants,o):[]}),n=(e.slots??[]).map(o=>[o,r(o)]);for(const[o,a]of Object.entries(e.variants??{}))for(const[i,s]of Object.entries(a))n.forEach(([l,c])=>{c.variants[o]??={},c.variants[o][i]=s[l]??{}});return Object.fromEntries(n)},OE=(e,r)=>e.filter(n=>n.css[r]).map(n=>({...n,css:n.css[r]}));function oo(e,...r){const n=Object.getOwnPropertyDescriptors(e),o=Object.keys(n),a=s=>{const l={};for(let c=0;ca(Array.isArray(s)?s:o.filter(s));return r.map(i).concat(a(o))}var jE=(...e)=>{const r=e.reduce((n,o)=>(o&&o.forEach(a=>n.add(a)),n),new Set([]));return Array.from(r)},EF=["htmlSize","htmlTranslate","htmlWidth","htmlHeight"];function dEe(e){return EF.includes(e)?e.replace("html","").toLowerCase():e}function LE(e){return Object.fromEntries(Object.entries(e).map(([r,n])=>[dEe(r),n]))}LE.keys=EF;const pEe="_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelectable,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,base",SF=new Set(pEe.split(",")),hEe=/^@|&|&$/;function CF(e){return SF.has(e)||hEe.test(e)}const fEe=/^_/,mEe=/&|@/;function TF(e){return e.map(r=>SF.has(r)?r.replace(fEe,""):mEe.test(r)?`[${PE(r.trim())}]`:r)}function AF(e){return e.sort((r,n)=>{const o=CF(r),a=CF(n);return o&&!a?1:!o&&a?-1:0})}const gEe="aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,focusRing:focus-ring,focusVisibleRing:focus-v-ring,focusRingColor:focus-ring-c,focusRingOffset:focus-ring-o,focusRingWidth:focus-ring-w,focusRingStyle:focus-ring-s,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,boxSize:size,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,backgroundLinear:bg-linear/bgLinear,backgroundRadial:bg-radial/bgRadial,backgroundConic:bg-conic/bgConic,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderBlockStartWidth:bd-bs-w,borderBlockEndWidth:bd-be-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:transition,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,cursor:cursor,textStyle:textStyle,layerStyle:layerStyle,animationStyle:animationStyle",RF=new Map,NF=new Map;gEe.split(",").forEach(e=>{const[r,n]=e.split(":"),[o,...a]=n.split("/");RF.set(r,o),a.length&&a.forEach(i=>{NF.set(i==="1"?o:i,r)})});const DF=e=>NF.get(e)||e,$F={conditions:{shift:AF,finalize:TF,breakpoints:{keys:["base","xs","sm","md","lg","xl"]}},utility:{transform:(e,r)=>{const n=DF(e);return{className:`${RF.get(n)||tEe(n)}_${PE(r)}`}},hasShorthand:!0,toHash:(e,r)=>r(e.join(":")),resolveShorthand:DF}},yEe=_F($F),be=(...e)=>yEe(op(...e));be.raw=(...e)=>op(...e);const{mergeCss:op}=Q8e($F);function et(){let e="",r=0,n;for(;r({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function o0(e){const{base:r,variants:n,defaultVariants:o,compoundVariants:a}=MF(e),i=f=>({...o,...np(f)});function s(f={}){const g=i(f);let b={...r};for(const[w,k]of Object.entries(g))n[w]?.[k]&&(b=op(b,n[w][k]));const x=BE(a,g);return op(b,x)}function l(f){const g=MF(f.config),b=jE(f.variantKeys,Object.keys(n));return o0({base:op(r,g.base),variants:Object.fromEntries(b.map(x=>[x,op(n[x],g.variants[x])])),defaultVariants:zE(o,g.defaultVariants),compoundVariants:[...a,...g.compoundVariants]})}function c(f){return be(s(f))}const u=Object.keys(n);function d(f){return oo(f,u)}const h=Object.fromEntries(Object.entries(n).map(([f,g])=>[f,Object.keys(g)]));return Object.assign(go(c),{__cva__:!0,variantMap:h,variantKeys:u,raw:s,config:e,merge:l,splitVariantProps:d,getVariantProps:i})}function BE(e,r){let n={};return e.forEach(o=>{Object.entries(o).every(([a,i])=>a==="css"?!0:(Array.isArray(i)?i:[i]).some(s=>r[a]===s))&&(n=op(n,o.css))}),n}function bEe(e,r,n,o){if(r.length>0&&typeof n?.[o]=="object")throw new Error(`[recipe:${e}:${o}] Conditions are not supported when using compound variants.`)}function vEe(e){const r=Object.entries(uEe(e)).map(([h,f])=>[h,o0(f)]),n=e.defaultVariants??{},o=r.reduce((h,[f,g])=>(e.className&&(h[f]=g.config.className),h),{});function a(h){const f=r.map(([g,b])=>[g,et(b(h),o[g])]);return Object.fromEntries(f)}function i(h){const f=r.map(([g,b])=>[g,b.raw(h)]);return Object.fromEntries(f)}const s=e.variants??{},l=Object.keys(s);function c(h){return oo(h,l)}const u=h=>({...n,...np(h)}),d=Object.fromEntries(Object.entries(s).map(([h,f])=>[h,Object.keys(f)]));return Object.assign(go(a),{__cva__:!1,raw:i,config:e,variantMap:d,variantKeys:l,classNameMap:o,splitVariantProps:c,getVariantProps:u})}var xEe={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const Nt=(e,r,n,o)=>{const a=E.forwardRef(({color:i="currentColor",size:s=24,stroke:l=2,title:c,className:u,children:d,...h},f)=>E.createElement("svg",{ref:f,...xEe[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${r}`,u].join(" "),...e==="filled"?{fill:i}:{strokeWidth:l,stroke:i},...h},[c&&E.createElement("title",{key:"svg-title"},c),...o.map(([g,b])=>E.createElement(g,b)),...Array.isArray(d)?d:[d]]));return a.displayName=`${n}`,a},wEe=[["path",{d:"M12 6m-7 0a7 3 0 1 0 14 0a7 3 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M5 6v12c0 1.657 3.134 3 7 3s7 -1.343 7 -3v-12",key:"svg-1"}]],PF=Nt("outline","cylinder","Cylinder",wEe),kEe=[["path",{d:"M21 14.008v-5.018a1.98 1.98 0 0 0 -1 -1.717l-4 -2.008a2.016 2.016 0 0 0 -2 0l-10 5.008c-.619 .355 -1 1.01 -1 1.718v5.018c0 .709 .381 1.363 1 1.717l4 2.008a2.016 2.016 0 0 0 2 0l10 -5.008c.619 -.355 1 -1.01 1 -1.718z",key:"svg-0"}],["path",{d:"M9 21v-7.5",key:"svg-1"}],["path",{d:"M9 13.5l11.5 -5.5",key:"svg-2"}],["path",{d:"M3.5 11l5.5 2.5",key:"svg-3"}]],_Ee=Nt("outline","rectangular-prism","RectangularPrism",kEe),EEe=[["path",{d:"M3 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M17 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M5 11v-3a3 3 0 0 1 3 -3h8a3 3 0 0 1 3 3v3",key:"svg-3"}],["path",{d:"M16.5 8.5l2.5 2.5l2.5 -2.5",key:"svg-4"}]],SEe=Nt("outline","reorder","Reorder",EEe),CEe=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],TEe=Nt("outline","user","User",CEe),AEe=[["path",{d:"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M11 4h2",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}]],REe=Nt("outline","device-mobile","DeviceMobile",AEe),NEe=[["path",{d:"M4 8h16",key:"svg-0"}],["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-1"}],["path",{d:"M8 4v4",key:"svg-2"}]],DEe=Nt("outline","browser","Browser",NEe),FE=E.createContext(null);function $Ee({value:e,children:r}){return E.useContext(FE)?y.jsx(y.Fragment,{children:r}):y.jsx(FE.Provider,{value:e,children:r})}function Xx({element:e,className:r,style:n}){const o=E.useContext(FE);if(!e||!e.icon||e.icon==="none")return null;let a;return e.icon.startsWith("http://")||e.icon.startsWith("https://")?a=y.jsx("img",{src:e.icon,alt:e.title}):o&&(a=y.jsx(o,{node:e})),a?y.jsx("div",{className:et(r,"likec4-element-icon"),"data-likec4-icon":e.icon,style:n,children:a}):null}const MEe={browser:DEe,cylinder:PF,mobile:REe,person:TEe,queue:SEe,rectangle:_Ee,storage:PF};function PEe({element:e,className:r}){const n=y.jsx(Xx,{element:e,className:r});if(n)return n;const o=MEe[e.shape];return y.jsx("div",{className:et(r,"likec4-shape-icon"),children:y.jsx(o,{})})}function Cf(e){const r=E.useRef(e);return r.current=e,E.useMemo(()=>Object.freeze({get current(){return r.current}}),[])}function zF(e){const r=Cf(e);E.useEffect(()=>()=>{r.current()},[])}function HE(e,r,n,o=0){const a=E.useRef(void 0),i=E.useRef(void 0),s=E.useRef(e),l=E.useRef(void 0),c=()=>{a.current&&(clearTimeout(a.current),a.current=void 0),i.current&&(clearTimeout(i.current),i.current=void 0)};return zF(c),E.useEffect(()=>{s.current=e},r),E.useMemo(()=>{const u=()=>{if(c(),!l.current)return;const h=l.current;l.current=void 0,s.current.apply(h.this,h.args)},d=function(...h){a.current&&clearTimeout(a.current),l.current={args:h,this:this},a.current=setTimeout(u,n),o>0&&!i.current&&(i.current=setTimeout(u,o))};return Object.defineProperties(d,{length:{value:e.length},name:{value:`${e.name||"anonymous"}__debounced__${n}`}}),d},[n,o,...r])}const zEe=()=>{},Kx=typeof globalThis<"u"&&typeof navigator<"u"&&typeof document<"u";function IEe(e){const r=Cf(e),n=E.useRef(0),o=E.useCallback(()=>{Kx&&n.current&&(cancelAnimationFrame(n.current),n.current=0)},[]);return zF(o),[E.useMemo(()=>{const a=(...i)=>{Kx&&(o(),n.current=requestAnimationFrame(()=>{r.current(...i),n.current=0}))};return Object.defineProperties(a,{length:{value:e.length},name:{value:`${e.name||"anonymous"}__raf`}}),a},[]),o]}const OEe=(e,r)=>{if(e===r)return!0;if(e.length!==r.length)return!1;for(const[n,o]of e.entries())if(o!==r[n])return!1;return!0};function jEe(e,r,n=OEe,o=E.useEffect,...a){const i=E.useRef(void 0);(i.current===void 0||Kx&&!n(i.current,r))&&(i.current=r),o(e,i.current,...a)}function IF(){const e=E.useRef(!0);return E.useEffect(()=>{e.current=!1},[]),e.current}const VE=Kx?E.useLayoutEffect:E.useEffect;function LEe(e){E.useEffect(()=>{e()},[])}function qE(e,r){const[n,o]=IEe(e);E.useEffect(()=>(n(),o),r)}const BEe=e=>(e+1)%Number.MAX_SAFE_INTEGER;function FEe(){const[,e]=E.useState(0);return E.useCallback(()=>{e(BEe)},[])}function OF(e,r){const n=IF();E.useEffect(n?zEe:e,r)}const HEe=e=>{e&&clearTimeout(e)};function Zx(e,r){const n=Cf(e),o=Cf(r),a=E.useRef(null),i=E.useCallback(()=>{HEe(a.current)},[]),s=E.useCallback(()=>{o.current!==void 0&&(i(),a.current=setTimeout(()=>{n.current()},o.current))},[]);return E.useEffect(()=>(s(),i),[r]),[i,s]}const jF=(e,r,n)=>{const o=E.useRef(void 0);return(o.current===void 0||!n(o.current,r))&&(o.current=r),E.useMemo(e,o.current)};function _n(e){if(typeof e=="string"||typeof e=="number")return""+e;let r="";if(Array.isArray(e))for(let n=0,o;n{}};function Qx(){for(var e=0,r=arguments.length,n={},o;e=0&&(o=n.slice(a+1),n=n.slice(0,a)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}Jx.prototype=Qx.prototype={constructor:Jx,on:function(e,r){var n=this._,o=qEe(e+"",n),a,i=-1,s=o.length;if(arguments.length<2){for(;++i0)for(var n=new Array(a),o=0,a,i;o=0&&(r=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),BF.hasOwnProperty(r)?{space:BF[r],local:e}:e}function WEe(e){return function(){var r=this.ownerDocument,n=this.namespaceURI;return n===UE&&r.documentElement.namespaceURI===UE?r.createElement(e):r.createElementNS(n,e)}}function YEe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function FF(e){var r=e3(e);return(r.local?YEe:WEe)(r)}function GEe(){}function WE(e){return e==null?GEe:function(){return this.querySelector(e)}}function XEe(e){typeof e!="function"&&(e=WE(e));for(var r=this._groups,n=r.length,o=new Array(n),a=0;a=_&&(_=C+1);!(A=w[_])&&++_=0;)(s=o[a])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function x9e(e){e||(e=w9e);function r(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var n=this._groups,o=n.length,a=new Array(o),i=0;ir?1:e>=r?0:NaN}function k9e(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function _9e(){return Array.from(this)}function E9e(){for(var e=this._groups,r=0,n=e.length;r1?this.each((r==null?z9e:typeof r=="function"?O9e:I9e)(e,r,n??"")):Tf(this.node(),e)}function Tf(e,r){return e.style.getPropertyValue(r)||WF(e).getComputedStyle(e,null).getPropertyValue(r)}function L9e(e){return function(){delete this[e]}}function B9e(e,r){return function(){this[e]=r}}function F9e(e,r){return function(){var n=r.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function H9e(e,r){return arguments.length>1?this.each((r==null?L9e:typeof r=="function"?F9e:B9e)(e,r)):this.node()[e]}function YF(e){return e.trim().split(/^|\s+/)}function YE(e){return e.classList||new GF(e)}function GF(e){this._node=e,this._names=YF(e.getAttribute("class")||"")}GF.prototype={add:function(e){var r=this._names.indexOf(e);r<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var r=this._names.indexOf(e);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function XF(e,r){for(var n=YE(e),o=-1,a=r.length;++o=0&&(n=r.slice(o+1),r=r.slice(0,o)),{type:r,name:n}})}function g7e(e){return function(){var r=this.__on;if(r){for(var n=0,o=-1,a=r.length,i;n()=>e;function XE(e,{sourceEvent:r,subject:n,target:o,identifier:a,active:i,x:s,y:l,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}XE.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function C7e(e){return!e.ctrlKey&&!e.button}function T7e(){return this.parentNode}function A7e(e,r){return r??{x:e.x,y:e.y}}function R7e(){return navigator.maxTouchPoints||"ontouchstart"in this}function tH(){var e=C7e,r=T7e,n=A7e,o=R7e,a={},i=Qx("start","drag","end"),s=0,l,c,u,d,h=0;function f(T){T.on("mousedown.drag",g).filter(o).on("touchstart.drag",w).on("touchmove.drag",k,S7e).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(T,A){if(!(d||!e.call(this,T,A))){var R=_(this,r.call(this,T,A),T,A,"mouse");R&&(za(T.view).on("mousemove.drag",b,i0).on("mouseup.drag",x,i0),JF(T.view),GE(T),u=!1,l=T.clientX,c=T.clientY,R("start",T))}}function b(T){if(Af(T),!u){var A=T.clientX-l,R=T.clientY-c;u=A*A+R*R>h}a.mouse("drag",T)}function x(T){za(T.view).on("mousemove.drag mouseup.drag",null),eH(T.view,u),Af(T),a.mouse("end",T)}function w(T,A){if(e.call(this,T,A)){var R=T.changedTouches,D=r.call(this,T,A),N=R.length,M,O;for(M=0;M>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):n===8?o3(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):n===4?o3(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=D7e.exec(e))?new ca(r[1],r[2],r[3],1):(r=$7e.exec(e))?new ca(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=M7e.exec(e))?o3(r[1],r[2],r[3],r[4]):(r=P7e.exec(e))?o3(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=z7e.exec(e))?cH(r[1],r[2]/100,r[3]/100,1):(r=I7e.exec(e))?cH(r[1],r[2]/100,r[3]/100,r[4]):nH.hasOwnProperty(e)?iH(nH[e]):e==="transparent"?new ca(NaN,NaN,NaN,0):null}function iH(e){return new ca(e>>16&255,e>>8&255,e&255,1)}function o3(e,r,n,o){return o<=0&&(e=r=n=NaN),new ca(e,r,n,o)}function L7e(e){return e instanceof s0||(e=ap(e)),e?(e=e.rgb(),new ca(e.r,e.g,e.b,e.opacity)):new ca}function ZE(e,r,n,o){return arguments.length===1?L7e(e):new ca(e,r,n,o??1)}function ca(e,r,n,o){this.r=+e,this.g=+r,this.b=+n,this.opacity=+o}KE(ca,ZE,rH(s0,{brighter(e){return e=e==null?n3:Math.pow(n3,e),new ca(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?l0:Math.pow(l0,e),new ca(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ca(ip(this.r),ip(this.g),ip(this.b),a3(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:sH,formatHex:sH,formatHex8:B7e,formatRgb:lH,toString:lH}));function sH(){return`#${sp(this.r)}${sp(this.g)}${sp(this.b)}`}function B7e(){return`#${sp(this.r)}${sp(this.g)}${sp(this.b)}${sp((isNaN(this.opacity)?1:this.opacity)*255)}`}function lH(){const e=a3(this.opacity);return`${e===1?"rgb(":"rgba("}${ip(this.r)}, ${ip(this.g)}, ${ip(this.b)}${e===1?")":`, ${e})`}`}function a3(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ip(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sp(e){return e=ip(e),(e<16?"0":"")+e.toString(16)}function cH(e,r,n,o){return o<=0?e=r=n=NaN:n<=0||n>=1?e=r=NaN:r<=0&&(e=NaN),new as(e,r,n,o)}function uH(e){if(e instanceof as)return new as(e.h,e.s,e.l,e.opacity);if(e instanceof s0||(e=ap(e)),!e)return new as;if(e instanceof as)return e;e=e.rgb();var r=e.r/255,n=e.g/255,o=e.b/255,a=Math.min(r,n,o),i=Math.max(r,n,o),s=NaN,l=i-a,c=(i+a)/2;return l?(r===i?s=(n-o)/l+(n0&&c<1?0:s,new as(s,l,c,e.opacity)}function F7e(e,r,n,o){return arguments.length===1?uH(e):new as(e,r,n,o??1)}function as(e,r,n,o){this.h=+e,this.s=+r,this.l=+n,this.opacity=+o}KE(as,F7e,rH(s0,{brighter(e){return e=e==null?n3:Math.pow(n3,e),new as(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?l0:Math.pow(l0,e),new as(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,r=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*r,a=2*n-o;return new ca(QE(e>=240?e-240:e+120,a,o),QE(e,a,o),QE(e<120?e+240:e-120,a,o),this.opacity)},clamp(){return new as(dH(this.h),i3(this.s),i3(this.l),a3(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 e=a3(this.opacity);return`${e===1?"hsl(":"hsla("}${dH(this.h)}, ${i3(this.s)*100}%, ${i3(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dH(e){return e=(e||0)%360,e<0?e+360:e}function i3(e){return Math.max(0,Math.min(1,e||0))}function QE(e,r,n){return(e<60?r+(n-r)*e/60:e<180?n:e<240?r+(n-r)*(240-e)/60:r)*255}const JE=e=>()=>e;function H7e(e,r){return function(n){return e+n*r}}function V7e(e,r,n){return e=Math.pow(e,n),r=Math.pow(r,n)-e,n=1/n,function(o){return Math.pow(e+o*r,n)}}function q7e(e){return(e=+e)==1?pH:function(r,n){return n-r?V7e(r,n,e):JE(isNaN(r)?n:r)}}function pH(e,r){var n=r-e;return n?H7e(e,n):JE(isNaN(e)?r:e)}const s3=(function e(r){var n=q7e(r);function o(a,i){var s=n((a=ZE(a)).r,(i=ZE(i)).r),l=n(a.g,i.g),c=n(a.b,i.b),u=pH(a.opacity,i.opacity);return function(d){return a.r=s(d),a.g=l(d),a.b=c(d),a.opacity=u(d),a+""}}return o.gamma=e,o})(1);function U7e(e,r){r||(r=[]);var n=e?Math.min(r.length,e.length):0,o=r.slice(),a;return function(i){for(a=0;an&&(i=r.slice(n,i),l[s]?l[s]+=i:l[++s]=i),(o=o[0])===(a=a[0])?l[s]?l[s]+=a:l[++s]=a:(l[++s]=null,c.push({i:s,x:cl(o,a)})),n=t9.lastIndex;return n180?d+=360:d-u>180&&(u+=360),f.push({i:h.push(a(h)+"rotate(",null,o)-2,x:cl(u,d)})):d&&h.push(a(h)+"rotate("+d+o)}function l(u,d,h,f){u!==d?f.push({i:h.push(a(h)+"skewX(",null,o)-2,x:cl(u,d)}):d&&h.push(a(h)+"skewX("+d+o)}function c(u,d,h,f,g,b){if(u!==h||d!==f){var x=g.push(a(g)+"scale(",null,",",null,")");b.push({i:x-4,x:cl(u,h)},{i:x-2,x:cl(d,f)})}else(h!==1||f!==1)&&g.push(a(g)+"scale("+h+","+f+")")}return function(u,d){var h=[],f=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,h,f),s(u.rotate,d.rotate,h,f),l(u.skewX,d.skewX,h,f),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,h,f),u=d=null,function(g){for(var b=-1,x=f.length,w;++b=0&&e._call.call(void 0,r),e=e._next;--Nf}function kH(){lp=(d3=f0.now())+p3,Nf=d0=0;try{iSe()}finally{Nf=0,lSe(),lp=0}}function sSe(){var e=f0.now(),r=e-d3;r>vH&&(p3-=r,d3=e)}function lSe(){for(var e,r=u3,n,o=1/0;r;)r._call?(o>r._time&&(o=r._time),e=r,r=r._next):(n=r._next,r._next=null,r=e?e._next=n:u3=n);h0=e,n9(o)}function n9(e){if(!Nf){d0&&(d0=clearTimeout(d0));var r=e-lp;r>24?(e<1/0&&(d0=setTimeout(kH,e-f0.now()-p3)),p0&&(p0=clearInterval(p0))):(p0||(d3=f0.now(),p0=setInterval(sSe,vH)),Nf=1,xH(kH))}}function _H(e,r,n){var o=new h3;return r=r==null?0:+r,o.restart(a=>{o.stop(),e(a+r)},r,n),o}var cSe=Qx("start","end","cancel","interrupt"),uSe=[],EH=0,SH=1,o9=2,f3=3,CH=4,a9=5,m3=6;function g3(e,r,n,o,a,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;dSe(e,n,{name:r,index:o,group:a,on:cSe,tween:uSe,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:EH})}function i9(e,r){var n=is(e,r);if(n.state>EH)throw new Error("too late; already scheduled");return n}function ul(e,r){var n=is(e,r);if(n.state>f3)throw new Error("too late; already running");return n}function is(e,r){var n=e.__transition;if(!n||!(n=n[r]))throw new Error("transition not found");return n}function dSe(e,r,n){var o=e.__transition,a;o[r]=n,n.timer=wH(i,0,n.time);function i(u){n.state=SH,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var d,h,f,g;if(n.state!==SH)return c();for(d in o)if(g=o[d],g.name===n.name){if(g.state===f3)return _H(s);g.state===CH?(g.state=m3,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete o[d]):+do9&&o.state=0&&(r=r.slice(0,n)),!r||r==="start"})}function FSe(e,r,n){var o,a,i=BSe(r)?i9:ul;return function(){var s=i(this,e),l=s.on;l!==o&&(a=(o=l).copy()).on(r,n),s.on=a}}function HSe(e,r){var n=this._id;return arguments.length<2?is(this.node(),n).on.on(e):this.each(FSe(n,e,r))}function VSe(e){return function(){var r=this.parentNode;for(var n in this.__transition)if(+n!==e)return;r&&r.removeChild(this)}}function qSe(){return this.on("end.remove",VSe(this._id))}function USe(e){var r=this._name,n=this._id;typeof e!="function"&&(e=WE(e));for(var o=this._groups,a=o.length,i=new Array(a),s=0;s()=>e;function gCe(e,{sourceEvent:r,target:n,transform:o,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:a}})}function sc(e,r,n){this.k=e,this.x=r,this.y=n}sc.prototype={constructor:sc,scale:function(e){return e===1?this:new sc(this.k*e,this.x,this.y)},translate:function(e,r){return e===0&r===0?this:new sc(this.k,this.x+this.k*e,this.y+this.k*r)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var v3=new sc(1,0,0);NH.prototype=sc.prototype;function NH(e){for(;!e.__zoom;)if(!(e=e.parentNode))return v3;return e.__zoom}function l9(e){e.stopImmediatePropagation()}function m0(e){e.preventDefault(),e.stopImmediatePropagation()}function yCe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function bCe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function DH(){return this.__zoom||v3}function vCe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function xCe(){return navigator.maxTouchPoints||"ontouchstart"in this}function wCe(e,r,n){var o=e.invertX(r[0][0])-n[0][0],a=e.invertX(r[1][0])-n[1][0],i=e.invertY(r[0][1])-n[0][1],s=e.invertY(r[1][1])-n[1][1];return e.translate(a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function $H(){var e=yCe,r=bCe,n=wCe,o=vCe,a=xCe,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=c3,u=Qx("start","zoom","end"),d,h,f,g=500,b=150,x=0,w=10;function k(P){P.property("__zoom",DH).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",O).filter(a).on("touchstart.zoom",F).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(P,V,I,H){var q=P.selection?P.selection():P;q.property("__zoom",DH),P!==q?A(P,V,I,H):q.interrupt().each(function(){R(this,arguments).event(H).start().zoom(null,typeof V=="function"?V.apply(this,arguments):V).end()})},k.scaleBy=function(P,V,I,H){k.scaleTo(P,function(){var q=this.__zoom.k,Z=typeof V=="function"?V.apply(this,arguments):V;return q*Z},I,H)},k.scaleTo=function(P,V,I,H){k.transform(P,function(){var q=r.apply(this,arguments),Z=this.__zoom,W=I==null?T(q):typeof I=="function"?I.apply(this,arguments):I,G=Z.invert(W),K=typeof V=="function"?V.apply(this,arguments):V;return n(_(C(Z,K),W,G),q,s)},I,H)},k.translateBy=function(P,V,I,H){k.transform(P,function(){return n(this.__zoom.translate(typeof V=="function"?V.apply(this,arguments):V,typeof I=="function"?I.apply(this,arguments):I),r.apply(this,arguments),s)},null,H)},k.translateTo=function(P,V,I,H,q){k.transform(P,function(){var Z=r.apply(this,arguments),W=this.__zoom,G=H==null?T(Z):typeof H=="function"?H.apply(this,arguments):H;return n(v3.translate(G[0],G[1]).scale(W.k).translate(typeof V=="function"?-V.apply(this,arguments):-V,typeof I=="function"?-I.apply(this,arguments):-I),Z,s)},H,q)};function C(P,V){return V=Math.max(i[0],Math.min(i[1],V)),V===P.k?P:new sc(V,P.x,P.y)}function _(P,V,I){var H=V[0]-I[0]*P.k,q=V[1]-I[1]*P.k;return H===P.x&&q===P.y?P:new sc(P.k,H,q)}function T(P){return[(+P[0][0]+ +P[1][0])/2,(+P[0][1]+ +P[1][1])/2]}function A(P,V,I,H){P.on("start.zoom",function(){R(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(H).end()}).tween("zoom",function(){var q=this,Z=arguments,W=R(q,Z).event(H),G=r.apply(q,Z),K=I==null?T(G):typeof I=="function"?I.apply(q,Z):I,j=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),Y=q.__zoom,Q=typeof V=="function"?V.apply(q,Z):V,J=c(Y.invert(K).concat(j/Y.k),Q.invert(K).concat(j/Q.k));return function(ie){if(ie===1)ie=Q;else{var ne=J(ie),re=j/ne[2];ie=new sc(re,K[0]-ne[0]*re,K[1]-ne[1]*re)}W.zoom(null,ie)}})}function R(P,V,I){return!I&&P.__zooming||new D(P,V)}function D(P,V){this.that=P,this.args=V,this.active=0,this.sourceEvent=null,this.extent=r.apply(P,V),this.taps=0}D.prototype={event:function(P){return P&&(this.sourceEvent=P),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(P,V){return this.mouse&&P!=="mouse"&&(this.mouse[1]=V.invert(this.mouse[0])),this.touch0&&P!=="touch"&&(this.touch0[1]=V.invert(this.touch0[0])),this.touch1&&P!=="touch"&&(this.touch1[1]=V.invert(this.touch1[0])),this.that.__zoom=V,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(P){var V=za(this.that).datum();u.call(P,this.that,new gCe(P,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:u}),V)}};function N(P,...V){if(!e.apply(this,arguments))return;var I=R(this,V).event(P),H=this.__zoom,q=Math.max(i[0],Math.min(i[1],H.k*Math.pow(2,o.apply(this,arguments)))),Z=os(P);if(I.wheel)(I.mouse[0][0]!==Z[0]||I.mouse[0][1]!==Z[1])&&(I.mouse[1]=H.invert(I.mouse[0]=Z)),clearTimeout(I.wheel);else{if(H.k===q)return;I.mouse=[Z,H.invert(Z)],y3(this),I.start()}m0(P),I.wheel=setTimeout(W,b),I.zoom("mouse",n(_(C(H,q),I.mouse[0],I.mouse[1]),I.extent,s));function W(){I.wheel=null,I.end()}}function M(P,...V){if(f||!e.apply(this,arguments))return;var I=P.currentTarget,H=R(this,V,!0).event(P),q=za(P.view).on("mousemove.zoom",K,!0).on("mouseup.zoom",j,!0),Z=os(P,I),W=P.clientX,G=P.clientY;JF(P.view),l9(P),H.mouse=[Z,this.__zoom.invert(Z)],y3(this),H.start();function K(Y){if(m0(Y),!H.moved){var Q=Y.clientX-W,J=Y.clientY-G;H.moved=Q*Q+J*J>x}H.event(Y).zoom("mouse",n(_(H.that.__zoom,H.mouse[0]=os(Y,I),H.mouse[1]),H.extent,s))}function j(Y){q.on("mousemove.zoom mouseup.zoom",null),eH(Y.view,H.moved),m0(Y),H.event(Y).end()}}function O(P,...V){if(e.apply(this,arguments)){var I=this.__zoom,H=os(P.changedTouches?P.changedTouches[0]:P,this),q=I.invert(H),Z=I.k*(P.shiftKey?.5:2),W=n(_(C(I,Z),H,q),r.apply(this,V),s);m0(P),l>0?za(this).transition().duration(l).call(A,W,H,P):za(this).call(k.transform,W,H,P)}}function F(P,...V){if(e.apply(this,arguments)){var I=P.touches,H=I.length,q=R(this,V,P.changedTouches.length===H).event(P),Z,W,G,K;for(l9(P),W=0;W"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:r,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${r}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},g0=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],MH=["Enter"," ","Escape"],PH={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:r,y:n})=>`Moved selected node ${e}. New position, x: ${r}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Df;(function(e){e.Strict="strict",e.Loose="loose"})(Df||(Df={}));var cp;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(cp||(cp={}));var y0;(function(e){e.Partial="partial",e.Full="full"})(y0||(y0={}));const zH={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var bu;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(bu||(bu={}));var x3;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(x3||(x3={}));var tt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(tt||(tt={}));const IH={[tt.Left]:tt.Right,[tt.Right]:tt.Left,[tt.Top]:tt.Bottom,[tt.Bottom]:tt.Top};function OH(e){return e===null?null:e?"valid":"invalid"}const jH=e=>"id"in e&&"source"in e&&"target"in e,kCe=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),c9=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),b0=(e,r=[0,0])=>{const{width:n,height:o}=ao(e),a=e.origin??r,i=n*a[0],s=o*a[1];return{x:e.position.x-i,y:e.position.y-s}},LH=(e,r={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((o,a)=>{const i=typeof a=="string";let s=!r.nodeLookup&&!i?a:void 0;r.nodeLookup&&(s=i?r.nodeLookup.get(a):c9(a)?a:r.nodeLookup.get(a.id));const l=s?_3(s,r.nodeOrigin):{x:0,y:0,x2:0,y2:0};return w3(o,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return k3(n)},$f=(e,r={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(a=>{(r.filter===void 0||r.filter(a))&&(n=w3(n,_3(a)),o=!0)}),o?k3(n):{x:0,y:0,width:0,height:0}},u9=(e,r,[n,o,a]=[0,0,1],i=!1,s=!1)=>{const l={...w0(r,[n,o,a]),width:r.width/a,height:r.height/a},c=[];for(const u of e.values()){const{measured:d,selectable:h=!0,hidden:f=!1}=u;if(s&&!h||f)continue;const g=d.width??u.width??u.initialWidth??null,b=d.height??u.height??u.initialHeight??null,x=v0(l,dp(u)),w=(g??0)*(b??0),k=i&&x>0;(!u.internals.handleBounds||k||x>=w||u.dragging)&&c.push(u)}return c},_Ce=(e,r)=>{const n=new Set;return e.forEach(o=>{n.add(o.id)}),r.filter(o=>n.has(o.source)||n.has(o.target))};function ECe(e,r){const n=new Map,o=r?.nodes?new Set(r.nodes.map(a=>a.id)):null;return e.forEach(a=>{a.measured.width&&a.measured.height&&(r?.includeHiddenNodes||!a.hidden)&&(!o||o.has(a.id))&&n.set(a.id,a)}),n}async function SCe({nodes:e,width:r,height:n,panZoom:o,minZoom:a,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const l=ECe(e,s),c=$f(l),u=vu(c,r,n,s?.minZoom??a,s?.maxZoom??i,s?.padding??.1);return await o.setViewport(u,{duration:s?.duration,ease:s?.ease,interpolate:s?.interpolate}),Promise.resolve(!0)}function BH({nodeId:e,nextPosition:r,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:a,onError:i}){const s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=s.origin??o;let h=s.extent||a;if(s.extent==="parent"&&!s.expandParent)if(!l)i?.("005",dl.error005());else{const g=l.measured.width,b=l.measured.height;g&&b&&(h=[[c,u],[c+g,u+b]])}else l&&If(s.extent)&&(h=[[s.extent[0][0]+c,s.extent[0][1]+u],[s.extent[1][0]+c,s.extent[1][1]+u]]);const f=If(h)?up(r,h,s.measured):r;return(s.measured.width===void 0||s.measured.height===void 0)&&i?.("015",dl.error015()),{position:{x:f.x-c+(s.measured.width??0)*d[0],y:f.y-u+(s.measured.height??0)*d[1]},positionAbsolute:f}}async function CCe({nodesToRemove:e=[],edgesToRemove:r=[],nodes:n,edges:o,onBeforeDelete:a}){const i=new Set(e.map(h=>h.id)),s=[];for(const h of n){if(h.deletable===!1)continue;const f=i.has(h.id),g=!f&&h.parentId&&s.find(b=>b.id===h.parentId);(f||g)&&s.push(h)}const l=new Set(r.map(h=>h.id)),c=o.filter(h=>h.deletable!==!1),u=_Ce(s,c);for(const h of c)l.has(h.id)&&!u.find(f=>f.id===h.id)&&u.push(h);if(!a)return{edges:u,nodes:s};const d=await a({nodes:s,edges:u});return typeof d=="boolean"?d?{edges:u,nodes:s}:{edges:[],nodes:[]}:d}const Mf=(e,r=0,n=1)=>Math.min(Math.max(e,r),n),up=(e={x:0,y:0},r,n)=>({x:Mf(e.x,r[0][0],r[1][0]-(n?.width??0)),y:Mf(e.y,r[0][1],r[1][1]-(n?.height??0))});function FH(e,r,n){const{width:o,height:a}=ao(n),{x:i,y:s}=n.internals.positionAbsolute;return up(e,[[i,s],[i+o,s+a]],r)}const HH=(e,r,n)=>en?-Mf(Math.abs(e-n),1,r)/r:0,VH=(e,r,n=15,o=40)=>{const a=HH(e.x,o,r.width-o)*n,i=HH(e.y,o,r.height-o)*n;return[a,i]},w3=(e,r)=>({x:Math.min(e.x,r.x),y:Math.min(e.y,r.y),x2:Math.max(e.x2,r.x2),y2:Math.max(e.y2,r.y2)}),d9=({x:e,y:r,width:n,height:o})=>({x:e,y:r,x2:e+n,y2:r+o}),k3=({x:e,y:r,x2:n,y2:o})=>({x:e,y:r,width:n-e,height:o-r}),dp=(e,r=[0,0])=>{const{x:n,y:o}=c9(e)?e.internals.positionAbsolute:b0(e,r);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},_3=(e,r=[0,0])=>{const{x:n,y:o}=c9(e)?e.internals.positionAbsolute:b0(e,r);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},qH=(e,r)=>k3(w3(d9(e),d9(r))),v0=(e,r)=>{const n=Math.max(0,Math.min(e.x+e.width,r.x+r.width)-Math.max(e.x,r.x)),o=Math.max(0,Math.min(e.y+e.height,r.y+r.height)-Math.max(e.y,r.y));return Math.ceil(n*o)},UH=e=>ss(e.width)&&ss(e.height)&&ss(e.x)&&ss(e.y),ss=e=>!isNaN(e)&&isFinite(e),TCe=(e,r)=>{},x0=(e,r=[1,1])=>({x:r[0]*Math.round(e.x/r[0]),y:r[1]*Math.round(e.y/r[1])}),w0=({x:e,y:r},[n,o,a],i=!1,s=[1,1])=>{const l={x:(e-n)/a,y:(r-o)/a};return i?x0(l,s):l},E3=({x:e,y:r},[n,o,a])=>({x:e*a+n,y:r*a+o});function Pf(e,r){if(typeof e=="number")return Math.floor((r-r/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(r*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function ACe(e,r,n){if(typeof e=="string"||typeof e=="number"){const o=Pf(e,n),a=Pf(e,r);return{top:o,right:a,bottom:o,left:a,x:a*2,y:o*2}}if(typeof e=="object"){const o=Pf(e.top??e.y??0,n),a=Pf(e.bottom??e.y??0,n),i=Pf(e.left??e.x??0,r),s=Pf(e.right??e.x??0,r);return{top:o,right:s,bottom:a,left:i,x:i+s,y:o+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function RCe(e,r,n,o,a,i){const{x:s,y:l}=E3(e,[r,n,o]),{x:c,y:u}=E3({x:e.x+e.width,y:e.y+e.height},[r,n,o]),d=a-c,h=i-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(h)}}const vu=(e,r,n,o,a,i)=>{const s=ACe(i,r,n),l=(r-s.x)/e.width,c=(n-s.y)/e.height,u=Math.min(l,c),d=Mf(u,o,a),h=e.x+e.width/2,f=e.y+e.height/2,g=r/2-h*d,b=n/2-f*d,x=RCe(e,g,b,d,r,n),w={left:Math.min(x.left-s.left,0),top:Math.min(x.top-s.top,0),right:Math.min(x.right-s.right,0),bottom:Math.min(x.bottom-s.bottom,0)};return{x:g-w.left+w.right,y:b-w.top+w.bottom,zoom:d}},zf=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function If(e){return e!=null&&e!=="parent"}function ao(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function WH(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function YH(e,r={width:0,height:0},n,o,a){const i={...e},s=o.get(n);if(s){const l=s.origin||a;i.x+=s.internals.positionAbsolute.x-(r.width??0)*l[0],i.y+=s.internals.positionAbsolute.y-(r.height??0)*l[1]}return i}function GH(e,r){if(e.size!==r.size)return!1;for(const n of e)if(!r.has(n))return!1;return!0}function NCe(){let e,r;return{promise:new Promise((n,o)=>{e=n,r=o}),resolve:e,reject:r}}function DCe(e){return{...PH,...e||{}}}function k0(e,{snapGrid:r=[0,0],snapToGrid:n=!1,transform:o,containerBounds:a}){const{x:i,y:s}=ls(e),l=w0({x:i-(a?.left??0),y:s-(a?.top??0)},o),{x:c,y:u}=n?x0(l,r):l;return{xSnapped:c,ySnapped:u,...l}}const p9=e=>({width:e.offsetWidth,height:e.offsetHeight}),XH=e=>e?.getRootNode?.()||window?.document,$Ce=["INPUT","SELECT","TEXTAREA"];function KH(e){const r=e.composedPath?.()?.[0]||e.target;return r?.nodeType!==1?!1:$Ce.includes(r.nodeName)||r.hasAttribute("contenteditable")||!!r.closest(".nokey")}const ZH=e=>"clientX"in e,ls=(e,r)=>{const n=ZH(e),o=n?e.clientX:e.touches?.[0].clientX,a=n?e.clientY:e.touches?.[0].clientY;return{x:o-(r?.left??0),y:a-(r?.top??0)}},QH=(e,r,n,o,a)=>{const i=r.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:a,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o,...p9(s)}})};function JH({sourceX:e,sourceY:r,targetX:n,targetY:o,sourceControlX:a,sourceControlY:i,targetControlX:s,targetControlY:l}){const c=e*.125+a*.375+s*.375+n*.125,u=r*.125+i*.375+l*.375+o*.125,d=Math.abs(c-e),h=Math.abs(u-r);return[c,u,d,h]}function S3(e,r){return e>=0?.5*e:r*25*Math.sqrt(-e)}function eV({pos:e,x1:r,y1:n,x2:o,y2:a,c:i}){switch(e){case tt.Left:return[r-S3(r-o,i),n];case tt.Right:return[r+S3(o-r,i),n];case tt.Top:return[r,n-S3(n-a,i)];case tt.Bottom:return[r,n+S3(a-n,i)]}}function C3({sourceX:e,sourceY:r,sourcePosition:n=tt.Bottom,targetX:o,targetY:a,targetPosition:i=tt.Top,curvature:s=.25}){const[l,c]=eV({pos:n,x1:e,y1:r,x2:o,y2:a,c:s}),[u,d]=eV({pos:i,x1:o,y1:a,x2:e,y2:r,c:s}),[h,f,g,b]=JH({sourceX:e,sourceY:r,targetX:o,targetY:a,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${r} C${l},${c} ${u},${d} ${o},${a}`,h,f,g,b]}function tV({sourceX:e,sourceY:r,targetX:n,targetY:o}){const a=Math.abs(n-e)/2,i=n0}const zCe=({source:e,sourceHandle:r,target:n,targetHandle:o})=>`xy-edge__${e}${r||""}-${n}${o||""}`,ICe=(e,r)=>r.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),OCe=(e,r)=>{if(!e.source||!e.target)return r;let n;return jH(e)?n={...e}:n={...e,id:zCe(e)},ICe(n,r)?r:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,r.concat(n))};function rV({sourceX:e,sourceY:r,targetX:n,targetY:o}){const[a,i,s,l]=tV({sourceX:e,sourceY:r,targetX:n,targetY:o});return[`M ${e},${r}L ${n},${o}`,a,i,s,l]}const nV={[tt.Left]:{x:-1,y:0},[tt.Right]:{x:1,y:0},[tt.Top]:{x:0,y:-1},[tt.Bottom]:{x:0,y:1}},jCe=({source:e,sourcePosition:r=tt.Bottom,target:n})=>r===tt.Left||r===tt.Right?e.xMath.sqrt(Math.pow(r.x-e.x,2)+Math.pow(r.y-e.y,2));function LCe({source:e,sourcePosition:r=tt.Bottom,target:n,targetPosition:o=tt.Top,center:a,offset:i,stepPosition:s}){const l=nV[r],c=nV[o],u={x:e.x+l.x*i,y:e.y+l.y*i},d={x:n.x+c.x*i,y:n.y+c.y*i},h=jCe({source:u,sourcePosition:r,target:d}),f=h.x!==0?"x":"y",g=h[f];let b=[],x,w;const k={x:0,y:0},C={x:0,y:0},[,,_,T]=tV({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[f]*c[f]===-1){f==="x"?(x=a.x??u.x+(d.x-u.x)*s,w=a.y??(u.y+d.y)/2):(x=a.x??(u.x+d.x)/2,w=a.y??u.y+(d.y-u.y)*s);const A=[{x,y:u.y},{x,y:d.y}],R=[{x:u.x,y:w},{x:d.x,y:w}];l[f]===g?b=f==="x"?A:R:b=f==="x"?R:A}else{const A=[{x:u.x,y:d.y}],R=[{x:d.x,y:u.y}];if(f==="x"?b=l.x===g?R:A:b=l.y===g?A:R,r===o){const F=Math.abs(e[f]-n[f]);if(F<=i){const L=Math.min(i-1,i-F);l[f]===g?k[f]=(u[f]>e[f]?-1:1)*L:C[f]=(d[f]>n[f]?-1:1)*L}}if(r!==o){const F=f==="x"?"y":"x",L=l[f]===c[F],U=u[F]>d[F],P=u[F]=O?(x=(D.x+N.x)/2,w=b[0].y):(x=b[0].x,w=(D.y+N.y)/2)}return[[e,{x:u.x+k.x,y:u.y+k.y},...b,{x:d.x+C.x,y:d.y+C.y},n],x,w,_,T]}function BCe(e,r,n,o){const a=Math.min(oV(e,r)/2,oV(r,n)/2,o),{x:i,y:s}=r;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const u=e.x{let _="";return C>0&&Cn.id===r):e[0])||null}function h9(e,r){return e?typeof e=="string"?e:`${r?`${r}__`:""}${Object.keys(e).sort().map(n=>`${n}=${e[n]}`).join("&")}`:""}function FCe(e,{id:r,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:a}){const i=new Set;return e.reduce((s,l)=>([l.markerStart||o,l.markerEnd||a].forEach(c=>{if(c&&typeof c=="object"){const u=h9(c,r);i.has(u)||(s.push({id:u,color:c.color||n,...c}),i.add(u))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}function HCe(e,r,n,o,a){let i=.5;a==="start"?i=0:a==="end"&&(i=1);let s=[(e.x+e.width*i)*r.zoom+r.x,e.y*r.zoom+r.y-o],l=[-100*i,-100];switch(n){case tt.Right:s=[(e.x+e.width)*r.zoom+r.x+o,(e.y+e.height*i)*r.zoom+r.y],l=[0,-100*i];break;case tt.Bottom:s[1]=(e.y+e.height)*r.zoom+r.y+o,l[1]=0;break;case tt.Left:s=[e.x*r.zoom+r.x-o,(e.y+e.height*i)*r.zoom+r.y],l=[-100,-100*i];break}return`translate(${s[0]}px, ${s[1]}px) translate(${l[0]}%, ${l[1]}%)`}const cV=1e3,VCe=10,f9={nodeOrigin:[0,0],nodeExtent:g0,elevateNodesOnSelect:!0,defaults:{}},qCe={...f9,checkEquality:!0};function m9(e,r){const n={...e};for(const o in r)r[o]!==void 0&&(n[o]=r[o]);return n}function UCe(e,r,n){const o=m9(f9,n);for(const a of e.values())if(a.parentId)y9(a,e,r,o);else{const i=b0(a,o.nodeOrigin),s=If(a.extent)?a.extent:o.nodeExtent,l=up(i,s,ao(a));a.internals.positionAbsolute=l}}function WCe(e,r){if(!e.handles)return e.measured?r?.internals.handleBounds:void 0;const n=[],o=[];for(const a of e.handles){const i={id:a.id,width:a.width??1,height:a.height??1,nodeId:e.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?n.push(i):a.type==="target"&&o.push(i)}return{source:n,target:o}}function g9(e,r,n,o){const a=m9(qCe,o);let i={i:-1},s=e.length>0;const l=new Map(r),c=a?.elevateNodesOnSelect?cV:0;r.clear(),n.clear();for(const u of e){let d=l.get(u.id);if(a.checkEquality&&u===d?.internals.userNode)r.set(u.id,d);else{const h=b0(u,a.nodeOrigin),f=If(u.extent)?u.extent:a.nodeExtent,g=up(h,f,ao(u));d={...a.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:g,handleBounds:WCe(u,d),z:uV(u,c),userNode:u}},r.set(u.id,d)}(d.measured===void 0||d.measured.width===void 0||d.measured.height===void 0)&&!d.hidden&&(s=!1),u.parentId&&y9(d,r,n,o,i)}return s}function YCe(e,r){if(!e.parentId)return;const n=r.get(e.parentId);n?n.set(e.id,e):r.set(e.parentId,new Map([[e.id,e]]))}function y9(e,r,n,o,a){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l}=m9(f9,o),c=e.parentId,u=r.get(c);if(!u){console.warn(`Parent node ${c} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}YCe(e,n),a&&!u.parentId&&u.internals.rootParentIndex===void 0&&(u.internals.rootParentIndex=++a.i,u.internals.z=u.internals.z+a.i*VCe),a&&u.internals.rootParentIndex!==void 0&&(a.i=u.internals.rootParentIndex);const d=i?cV:0,{x:h,y:f,z:g}=GCe(e,u,s,l,d),{positionAbsolute:b}=e.internals,x=h!==b.x||f!==b.y;(x||g!==e.internals.z)&&r.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:h,y:f}:b,z:g}})}function uV(e,r){return(ss(e.zIndex)?e.zIndex:0)+(e.selected?r:0)}function GCe(e,r,n,o,a){const{x:i,y:s}=r.internals.positionAbsolute,l=ao(e),c=b0(e,n),u=If(e.extent)?up(c,e.extent,l):c;let d=up({x:i+u.x,y:s+u.y},o,l);e.extent==="parent"&&(d=FH(d,l,r));const h=uV(e,a),f=r.internals.z??0;return{x:d.x,y:d.y,z:f>=h?f+1:h}}function b9(e,r,n,o=[0,0]){const a=[],i=new Map;for(const s of e){const l=r.get(s.parentId);if(!l)continue;const c=i.get(s.parentId)?.expandedRect??dp(l),u=qH(c,s.rect);i.set(s.parentId,{expandedRect:u,parent:l})}return i.size>0&&i.forEach(({expandedRect:s,parent:l},c)=>{const u=l.internals.positionAbsolute,d=ao(l),h=l.origin??o,f=s.x0||g>0||w||k)&&(a.push({id:c,type:"position",position:{x:l.position.x-f+w,y:l.position.y-g+k}}),n.get(c)?.forEach(C=>{e.some(_=>_.id===C.id)||a.push({id:C.id,type:"position",position:{x:C.position.x+f,y:C.position.y+g}})})),(d.width0){const f=b9(h,r,n,a);c.push(...f)}return{changes:c,updatedInternals:l}}async function KCe({delta:e,panZoom:r,transform:n,translateExtent:o,width:a,height:i}){if(!r||!e.x&&!e.y)return Promise.resolve(!1);const s=await r.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[a,i]],o),l=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(l)}function dV(e,r,n,o,a,i){let s=a;const l=o.get(s)||new Map;o.set(s,l.set(n,r)),s=`${a}-${e}`;const c=o.get(s)||new Map;if(o.set(s,c.set(n,r)),i){s=`${a}-${e}-${i}`;const u=o.get(s)||new Map;o.set(s,u.set(n,r))}}function pV(e,r,n){e.clear(),r.clear();for(const o of n){const{source:a,target:i,sourceHandle:s=null,targetHandle:l=null}=o,c={edgeId:o.id,source:a,target:i,sourceHandle:s,targetHandle:l},u=`${a}-${s}--${i}-${l}`,d=`${i}-${l}--${a}-${s}`;dV("source",c,d,e,a,s),dV("target",c,u,e,i,l),r.set(o.id,o)}}function hV(e,r){if(!e.parentId)return!1;const n=r.get(e.parentId);return n?n.selected?!0:hV(n,r):!1}function fV(e,r,n){let o=e;do{if(o?.matches?.(r))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function ZCe(e,r,n,o){const a=new Map;for(const[i,s]of e)if((s.selected||s.id===o)&&(!s.parentId||!hV(s,e))&&(s.draggable||r&&typeof s.draggable>"u")){const l=e.get(i);l&&a.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return a}function v9({nodeId:e,dragItems:r,nodeLookup:n,dragging:o=!0}){const a=[];for(const[s,l]of r){const c=n.get(s)?.internals.userNode;c&&a.push({...c,position:l.position,dragging:o})}if(!e)return[a[0],a];const i=n.get(e)?.internals.userNode;return[i?{...i,position:r.get(e)?.position||i.position,dragging:o}:a[0],a]}function QCe({dragItems:e,snapGrid:r,x:n,y:o}){const a=e.values().next().value;if(!a)return null;const i={x:n-a.distance.x,y:o-a.distance.y},s=x0(i,r);return{x:s.x-i.x,y:s.y-i.y}}function JCe({onNodeMouseDown:e,getStoreItems:r,onDragStart:n,onDrag:o,onDragStop:a}){let i={x:null,y:null},s=0,l=new Map,c=!1,u={x:0,y:0},d=null,h=!1,f=null,g=!1,b=!1,x=null;function w({noDragClassName:C,handleSelector:_,domNode:T,isSelectable:A,nodeId:R,nodeClickDistance:D=0}){f=za(T);function N({x:L,y:U}){const{nodeLookup:P,nodeExtent:V,snapGrid:I,snapToGrid:H,nodeOrigin:q,onNodeDrag:Z,onSelectionDrag:W,onError:G,updateNodePositions:K}=r();i={x:L,y:U};let j=!1;const Y=l.size>1,Q=Y&&V?d9($f(l)):null,J=Y&&H?QCe({dragItems:l,snapGrid:I,x:L,y:U}):null;for(const[ie,ne]of l){if(!P.has(ie))continue;let re={x:L-ne.distance.x,y:U-ne.distance.y};H&&(re=J?{x:Math.round(re.x+J.x),y:Math.round(re.y+J.y)}:x0(re,I));let ge=null;if(Y&&V&&!ne.extent&&Q){const{positionAbsolute:me}=ne.internals,Te=me.x-Q.x+V[0][0],Ie=me.x+ne.measured.width-Q.x2+V[1][0],Ze=me.y-Q.y+V[0][1],rt=me.y+ne.measured.height-Q.y2+V[1][1];ge=[[Te,Ze],[Ie,rt]]}const{position:De,positionAbsolute:he}=BH({nodeId:ie,nextPosition:re,nodeLookup:P,nodeExtent:ge||V,nodeOrigin:q,onError:G});j=j||ne.position.x!==De.x||ne.position.y!==De.y,ne.position=De,ne.internals.positionAbsolute=he}if(b=b||j,!!j&&(K(l,!0),x&&(o||Z||!R&&W))){const[ie,ne]=v9({nodeId:R,dragItems:l,nodeLookup:P});o?.(x,l,ie,ne),Z?.(x,ie,ne),R||W?.(x,ne)}}async function M(){if(!d)return;const{transform:L,panBy:U,autoPanSpeed:P,autoPanOnNodeDrag:V}=r();if(!V){c=!1,cancelAnimationFrame(s);return}const[I,H]=VH(u,d,P);(I!==0||H!==0)&&(i.x=(i.x??0)-I/L[2],i.y=(i.y??0)-H/L[2],await U({x:I,y:H})&&N(i)),s=requestAnimationFrame(M)}function O(L){const{nodeLookup:U,multiSelectionActive:P,nodesDraggable:V,transform:I,snapGrid:H,snapToGrid:q,selectNodesOnDrag:Z,onNodeDragStart:W,onSelectionDragStart:G,unselectNodesAndEdges:K}=r();h=!0,(!Z||!A)&&!P&&R&&(U.get(R)?.selected||K()),A&&Z&&R&&e?.(R);const j=k0(L.sourceEvent,{transform:I,snapGrid:H,snapToGrid:q,containerBounds:d});if(i=j,l=ZCe(U,V,j,R),l.size>0&&(n||W||!R&&G)){const[Y,Q]=v9({nodeId:R,dragItems:l,nodeLookup:U});n?.(L.sourceEvent,l,Y,Q),W?.(L.sourceEvent,Y,Q),R||G?.(L.sourceEvent,Q)}}const F=tH().clickDistance(D).on("start",L=>{const{domNode:U,nodeDragThreshold:P,transform:V,snapGrid:I,snapToGrid:H}=r();d=U?.getBoundingClientRect()||null,g=!1,b=!1,x=L.sourceEvent,P===0&&O(L),i=k0(L.sourceEvent,{transform:V,snapGrid:I,snapToGrid:H,containerBounds:d}),u=ls(L.sourceEvent,d)}).on("drag",L=>{const{autoPanOnNodeDrag:U,transform:P,snapGrid:V,snapToGrid:I,nodeDragThreshold:H,nodeLookup:q}=r(),Z=k0(L.sourceEvent,{transform:P,snapGrid:V,snapToGrid:I,containerBounds:d});if(x=L.sourceEvent,(L.sourceEvent.type==="touchmove"&&L.sourceEvent.touches.length>1||R&&!q.has(R))&&(g=!0),!g){if(!c&&U&&h&&(c=!0,M()),!h){const W=ls(L.sourceEvent,d),G=W.x-u.x,K=W.y-u.y;Math.sqrt(G*G+K*K)>H&&O(L)}(i.x!==Z.xSnapped||i.y!==Z.ySnapped)&&l&&h&&(u=ls(L.sourceEvent,d),N(Z))}}).on("end",L=>{if(!(!h||g)&&(c=!1,h=!1,cancelAnimationFrame(s),l.size>0)){const{nodeLookup:U,updateNodePositions:P,onNodeDragStop:V,onSelectionDragStop:I}=r();if(b&&(P(l,!1),b=!1),a||V||!R&&I){const[H,q]=v9({nodeId:R,dragItems:l,nodeLookup:U,dragging:!1});a?.(L.sourceEvent,l,H,q),V?.(L.sourceEvent,H,q),R||I?.(L.sourceEvent,q)}}}).filter(L=>{const U=L.target;return!L.button&&(!C||!fV(U,`.${C}`,T))&&(!_||fV(U,_,T))});f.call(F)}function k(){f?.on(".drag",null)}return{update:w,destroy:k}}function eTe(e,r,n){const o=[],a={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of r.values())v0(a,dp(i))>0&&o.push(i);return o}const tTe=250;function rTe(e,r,n,o){let a=[],i=1/0;const s=eTe(e,n,r+tTe);for(const l of s){const c=[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]];for(const u of c){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;const{x:d,y:h}=_0(l,u,u.position,!0),f=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(h-e.y,2));f>r||(f1){const l=o.type==="source"?"target":"source";return a.find(c=>c.type===l)??a[0]}return a[0]}function mV(e,r,n,o,a,i=!1){const s=o.get(e);if(!s)return null;const l=a==="strict"?s.internals.handleBounds?.[r]:[...s.internals.handleBounds?.source??[],...s.internals.handleBounds?.target??[]],c=(n?l?.find(u=>u.id===n):l?.[0])??null;return c&&i?{...c,..._0(s,c,c.position,!0)}:c}function gV(e,r){return e||(r?.classList.contains("target")?"target":r?.classList.contains("source")?"source":null)}function nTe(e,r){let n=null;return r?n=!0:e&&!r&&(n=!1),n}const yV=()=>!0;function oTe(e,{connectionMode:r,connectionRadius:n,handleId:o,nodeId:a,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:h,panBy:f,cancelConnection:g,onConnectStart:b,onConnect:x,onConnectEnd:w,isValidConnection:k=yV,onReconnectEnd:C,updateConnection:_,getTransform:T,getFromHandle:A,autoPanSpeed:R,dragThreshold:D=1,handleDomNode:N}){const M=XH(e.target);let O=0,F;const{x:L,y:U}=ls(e),P=gV(i,N),V=l?.getBoundingClientRect();let I=!1;if(!V||!P)return;const H=mV(a,P,o,c,r);if(!H)return;let q=ls(e,V),Z=!1,W=null,G=!1,K=null;function j(){if(!d||!V)return;const[ge,De]=VH(q,V,R);f({x:ge,y:De}),O=requestAnimationFrame(j)}const Y={...H,nodeId:a,type:P,position:H.position},Q=c.get(a);let J={inProgress:!0,isValid:null,from:_0(Q,Y,tt.Left,!0),fromHandle:Y,fromPosition:Y.position,fromNode:Q,to:q,toHandle:null,toPosition:IH[Y.position],toNode:null};function ie(){I=!0,_(J),b?.(e,{nodeId:a,handleId:o,handleType:P})}D===0&&ie();function ne(ge){if(!I){const{x:Te,y:Ie}=ls(ge),Ze=Te-L,rt=Ie-U;if(!(Ze*Ze+rt*rt>D*D))return;ie()}if(!A()||!Y){re(ge);return}const De=T();q=ls(ge,V),F=rTe(w0(q,De,!1,[1,1]),n,c,Y),Z||(j(),Z=!0);const he=bV(ge,{handle:F,connectionMode:r,fromNodeId:a,fromHandleId:o,fromType:s?"target":"source",isValidConnection:k,doc:M,lib:u,flowId:h,nodeLookup:c});K=he.handleDomNode,W=he.connection,G=nTe(!!F,he.isValid);const me={...J,isValid:G,to:he.toHandle&&G?E3({x:he.toHandle.x,y:he.toHandle.y},De):q,toHandle:he.toHandle,toPosition:G&&he.toHandle?he.toHandle.position:IH[Y.position],toNode:he.toHandle?c.get(he.toHandle.nodeId):null};G&&F&&J.toHandle&&me.toHandle&&J.toHandle.type===me.toHandle.type&&J.toHandle.nodeId===me.toHandle.nodeId&&J.toHandle.id===me.toHandle.id&&J.to.x===me.to.x&&J.to.y===me.to.y||(_(me),J=me)}function re(ge){if(!("touches"in ge&&ge.touches.length>0)){if(I){(F||K)&&W&&G&&x?.(W);const{inProgress:De,...he}=J,me={...he,toPosition:J.toHandle?J.toPosition:null};w?.(ge,me),i&&C?.(ge,me)}g(),cancelAnimationFrame(O),Z=!1,G=!1,W=null,K=null,M.removeEventListener("mousemove",ne),M.removeEventListener("mouseup",re),M.removeEventListener("touchmove",ne),M.removeEventListener("touchend",re)}}M.addEventListener("mousemove",ne),M.addEventListener("mouseup",re),M.addEventListener("touchmove",ne),M.addEventListener("touchend",re)}function bV(e,{handle:r,connectionMode:n,fromNodeId:o,fromHandleId:a,fromType:i,doc:s,lib:l,flowId:c,isValidConnection:u=yV,nodeLookup:d}){const h=i==="target",f=r?s.querySelector(`.${l}-flow__handle[data-id="${c}-${r?.nodeId}-${r?.id}-${r?.type}"]`):null,{x:g,y:b}=ls(e),x=s.elementFromPoint(g,b),w=x?.classList.contains(`${l}-flow__handle`)?x:f,k={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const C=gV(void 0,w),_=w.getAttribute("data-nodeid"),T=w.getAttribute("data-handleid"),A=w.classList.contains("connectable"),R=w.classList.contains("connectableend");if(!_||!C)return k;const D={source:h?_:o,sourceHandle:h?T:a,target:h?o:_,targetHandle:h?a:T};k.connection=D;const N=A&&R&&(n===Df.Strict?h&&C==="source"||!h&&C==="target":_!==o||T!==a);k.isValid=N&&u(D),k.toHandle=mV(_,C,T,d,n,!0)}return k}const x9={onPointerDown:oTe,isValid:bV};function aTe({domNode:e,panZoom:r,getTransform:n,getViewScale:o}){const a=za(e);function i({translateExtent:l,width:c,height:u,zoomStep:d=1,pannable:h=!0,zoomable:f=!0,inversePan:g=!1}){const b=_=>{if(_.sourceEvent.type!=="wheel"||!r)return;const T=n(),A=_.sourceEvent.ctrlKey&&zf()?10:1,R=-_.sourceEvent.deltaY*(_.sourceEvent.deltaMode===1?.05:_.sourceEvent.deltaMode?1:.002)*d,D=T[2]*Math.pow(2,R*A);r.scaleTo(D)};let x=[0,0];const w=_=>{(_.sourceEvent.type==="mousedown"||_.sourceEvent.type==="touchstart")&&(x=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY])},k=_=>{const T=n();if(_.sourceEvent.type!=="mousemove"&&_.sourceEvent.type!=="touchmove"||!r)return;const A=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY],R=[A[0]-x[0],A[1]-x[1]];x=A;const D=o()*Math.max(T[2],Math.log(T[2]))*(g?-1:1),N={x:T[0]-R[0]*D,y:T[1]-R[1]*D},M=[[0,0],[c,u]];r.setViewportConstrained({x:N.x,y:N.y,zoom:T[2]},M,l)},C=$H().on("start",w).on("zoom",h?k:null).on("zoom.wheel",f?b:null);a.call(C,{})}function s(){a.on("zoom",null)}return{update:i,destroy:s,pointer:os}}const A3=e=>({x:e.x,y:e.y,zoom:e.k}),w9=({x:e,y:r,zoom:n})=>v3.translate(e,r).scale(n),Of=(e,r)=>e.target.closest(`.${r}`),vV=(e,r)=>r===2&&Array.isArray(e)&&e.includes(2),iTe=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,k9=(e,r=0,n=iTe,o=()=>{})=>{const a=typeof r=="number"&&r>0;return a||o(),a?e.transition().duration(r).ease(n).on("end",o):e},xV=e=>{const r=e.ctrlKey&&zf()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*r};function sTe({zoomPanValues:e,noWheelClassName:r,d3Selection:n,d3Zoom:o,panOnScrollMode:a,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(Of(d,r))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(d.ctrlKey&&s){const w=os(d),k=xV(d),C=h*Math.pow(2,k);o.scaleTo(n,C,w,d);return}const f=d.deltaMode===1?20:1;let g=a===cp.Vertical?0:d.deltaX*f,b=a===cp.Horizontal?0:d.deltaY*f;!zf()&&d.shiftKey&&a!==cp.Vertical&&(g=d.deltaY*f,b=0),o.translateBy(n,-(g/h)*i,-(b/h)*i,{internal:!0});const x=A3(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c?.(d,x),e.panScrollTimeout=setTimeout(()=>{u?.(d,x),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l?.(d,x))}}function lTe({noWheelClassName:e,preventScrolling:r,d3ZoomHandler:n}){return function(o,a){const i=o.type==="wheel",s=!r&&i&&!o.ctrlKey,l=Of(o,e);if(o.ctrlKey&&i&&l&&o.preventDefault(),s||l)return null;o.preventDefault(),n.call(this,o,a)}}function cTe({zoomPanValues:e,onDraggingChange:r,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;const a=A3(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=a,o.sourceEvent?.type==="mousedown"&&r(!0),n&&n?.(o.sourceEvent,a)}}function uTe({zoomPanValues:e,panOnDrag:r,onPaneContextMenu:n,onTransformChange:o,onPanZoom:a}){return i=>{e.usedRightMouseButton=!!(n&&vV(r,e.mouseButton??0)),i.sourceEvent?.sync||o([i.transform.x,i.transform.y,i.transform.k]),a&&!i.sourceEvent?.internal&&a?.(i.sourceEvent,A3(i.transform))}}function dTe({zoomPanValues:e,panOnDrag:r,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:a,onPaneContextMenu:i}){return s=>{if(!s.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&vV(r,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,o(!1),a)){const l=A3(s.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{a?.(s.sourceEvent,l)},n?150:0)}}}function pTe({zoomActivationKeyPressed:e,zoomOnScroll:r,zoomOnPinch:n,panOnDrag:o,panOnScroll:a,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:d}){return h=>{const f=e||r,g=n&&h.ctrlKey,b=h.type==="wheel";if(h.button===1&&h.type==="mousedown"&&(Of(h,`${u}-flow__node`)||Of(h,`${u}-flow__edge`)))return!0;if(!o&&!f&&!a&&!i&&!n||s||d&&!b||Of(h,l)&&b||Of(h,c)&&(!b||a&&b&&!e)||!n&&h.ctrlKey&&b)return!1;if(!n&&h.type==="touchstart"&&h.touches?.length>1)return h.preventDefault(),!1;if(!f&&!a&&!g&&b||!o&&(h.type==="mousedown"||h.type==="touchstart")||Array.isArray(o)&&!o.includes(h.button)&&h.type==="mousedown")return!1;const x=Array.isArray(o)&&o.includes(h.button)||!h.button||h.button<=1;return(!h.ctrlKey||b)&&x}}function hTe({domNode:e,minZoom:r,maxZoom:n,paneClickDistance:o,translateExtent:a,viewport:i,onPanZoom:s,onPanZoomStart:l,onPanZoomEnd:c,onDraggingChange:u}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),f=$H().clickDistance(!ss(o)||o<0?0:o).scaleExtent([r,n]).translateExtent(a),g=za(e).call(f);_({x:i.x,y:i.y,zoom:Mf(i.zoom,r,n)},[[0,0],[h.width,h.height]],a);const b=g.on("wheel.zoom"),x=g.on("dblclick.zoom");f.wheelDelta(xV);function w(L,U){return g?new Promise(P=>{f?.interpolate(U?.interpolate==="linear"?u0:c3).transform(k9(g,U?.duration,U?.ease,()=>P(!0)),L)}):Promise.resolve(!1)}function k({noWheelClassName:L,noPanClassName:U,onPaneContextMenu:P,userSelectionActive:V,panOnScroll:I,panOnDrag:H,panOnScrollMode:q,panOnScrollSpeed:Z,preventScrolling:W,zoomOnPinch:G,zoomOnScroll:K,zoomOnDoubleClick:j,zoomActivationKeyPressed:Y,lib:Q,onTransformChange:J,connectionInProgress:ie}){V&&!d.isZoomingOrPanning&&C();const ne=I&&!Y&&!V?sTe({zoomPanValues:d,noWheelClassName:L,d3Selection:g,d3Zoom:f,panOnScrollMode:q,panOnScrollSpeed:Z,zoomOnPinch:G,onPanZoomStart:l,onPanZoom:s,onPanZoomEnd:c}):lTe({noWheelClassName:L,preventScrolling:W,d3ZoomHandler:b});if(g.on("wheel.zoom",ne,{passive:!1}),!V){const ge=cTe({zoomPanValues:d,onDraggingChange:u,onPanZoomStart:l});f.on("start",ge);const De=uTe({zoomPanValues:d,panOnDrag:H,onPaneContextMenu:!!P,onPanZoom:s,onTransformChange:J});f.on("zoom",De);const he=dTe({zoomPanValues:d,panOnDrag:H,panOnScroll:I,onPaneContextMenu:P,onPanZoomEnd:c,onDraggingChange:u});f.on("end",he)}const re=pTe({zoomActivationKeyPressed:Y,panOnDrag:H,zoomOnScroll:K,panOnScroll:I,zoomOnDoubleClick:j,zoomOnPinch:G,userSelectionActive:V,noPanClassName:U,noWheelClassName:L,lib:Q,connectionInProgress:ie});f.filter(re),j?g.on("dblclick.zoom",x):g.on("dblclick.zoom",null)}function C(){f.on("zoom",null)}async function _(L,U,P){const V=w9(L),I=f?.constrain()(V,U,P);return I&&await w(I),new Promise(H=>H(I))}async function T(L,U){const P=w9(L);return await w(P,U),new Promise(V=>V(P))}function A(L){if(g){const U=w9(L),P=g.property("__zoom");(P.k!==L.zoom||P.x!==L.x||P.y!==L.y)&&f?.transform(g,U,null,{sync:!0})}}function R(){const L=g?NH(g.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}function D(L,U){return g?new Promise(P=>{f?.interpolate(U?.interpolate==="linear"?u0:c3).scaleTo(k9(g,U?.duration,U?.ease,()=>P(!0)),L)}):Promise.resolve(!1)}function N(L,U){return g?new Promise(P=>{f?.interpolate(U?.interpolate==="linear"?u0:c3).scaleBy(k9(g,U?.duration,U?.ease,()=>P(!0)),L)}):Promise.resolve(!1)}function M(L){f?.scaleExtent(L)}function O(L){f?.translateExtent(L)}function F(L){const U=!ss(L)||L<0?0:L;f?.clickDistance(U)}return{update:k,destroy:C,setViewport:T,setViewportConstrained:_,getViewport:R,scaleTo:D,scaleBy:N,setScaleExtent:M,setTranslateExtent:O,syncViewport:A,setClickDistance:F}}var jf;(function(e){e.Line="line",e.Handle="handle"})(jf||(jf={}));function fTe({width:e,prevWidth:r,height:n,prevHeight:o,affectsX:a,affectsY:i}){const s=e-r,l=n-o,c=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&a&&(c[0]=c[0]*-1),l&&i&&(c[1]=c[1]*-1),c}function wV(e){const r=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),a=e.includes("top");return{isHorizontal:r,isVertical:n,affectsX:o,affectsY:a}}function xu(e,r){return Math.max(0,r-e)}function wu(e,r){return Math.max(0,e-r)}function R3(e,r,n){return Math.max(0,r-e,e-n)}function kV(e,r){return e?!r:r}function mTe(e,r,n,o,a,i,s,l){let{affectsX:c,affectsY:u}=r;const{isHorizontal:d,isVertical:h}=r,f=d&&h,{xSnapped:g,ySnapped:b}=n,{minWidth:x,maxWidth:w,minHeight:k,maxHeight:C}=o,{x:_,y:T,width:A,height:R,aspectRatio:D}=e;let N=Math.floor(d?g-e.pointerX:0),M=Math.floor(h?b-e.pointerY:0);const O=A+(c?-N:N),F=R+(u?-M:M),L=-i[0]*A,U=-i[1]*R;let P=R3(O,x,w),V=R3(F,k,C);if(s){let q=0,Z=0;c&&N<0?q=xu(_+N+L,s[0][0]):!c&&N>0&&(q=wu(_+O+L,s[1][0])),u&&M<0?Z=xu(T+M+U,s[0][1]):!u&&M>0&&(Z=wu(T+F+U,s[1][1])),P=Math.max(P,q),V=Math.max(V,Z)}if(l){let q=0,Z=0;c&&N>0?q=wu(_+N,l[0][0]):!c&&N<0&&(q=xu(_+O,l[1][0])),u&&M>0?Z=wu(T+M,l[0][1]):!u&&M<0&&(Z=xu(T+F,l[1][1])),P=Math.max(P,q),V=Math.max(V,Z)}if(a){if(d){const q=R3(O/D,k,C)*D;if(P=Math.max(P,q),s){let Z=0;!c&&!u||c&&!u&&f?Z=wu(T+U+O/D,s[1][1])*D:Z=xu(T+U+(c?N:-N)/D,s[0][1])*D,P=Math.max(P,Z)}if(l){let Z=0;!c&&!u||c&&!u&&f?Z=xu(T+O/D,l[1][1])*D:Z=wu(T+(c?N:-N)/D,l[0][1])*D,P=Math.max(P,Z)}}if(h){const q=R3(F*D,x,w)/D;if(V=Math.max(V,q),s){let Z=0;!c&&!u||u&&!c&&f?Z=wu(_+F*D+L,s[1][0])/D:Z=xu(_+(u?M:-M)*D+L,s[0][0])/D,V=Math.max(V,Z)}if(l){let Z=0;!c&&!u||u&&!c&&f?Z=xu(_+F*D,l[1][0])/D:Z=wu(_+(u?M:-M)*D,l[0][0])/D,V=Math.max(V,Z)}}}M=M+(M<0?V:-V),N=N+(N<0?P:-P),a&&(f?O>F*D?M=(kV(c,u)?-N:N)/D:N=(kV(c,u)?-M:M)*D:d?(M=N/D,u=c):(N=M*D,c=u));const I=c?_+N:_,H=u?T+M:T;return{width:A+(c?-N:N),height:R+(u?-M:M),x:i[0]*N*(c?-1:1)+I,y:i[1]*M*(u?-1:1)+H}}const _V={width:0,height:0,x:0,y:0},gTe={..._V,pointerX:0,pointerY:0,aspectRatio:1};function yTe(e){return[[0,0],[e.measured.width,e.measured.height]]}function bTe(e,r,n){const o=r.position.x+e.position.x,a=r.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,l=n[0]*i,c=n[1]*s;return[[o-l,a-c],[o+i-l,a+s-c]]}function vTe({domNode:e,nodeId:r,getStoreItems:n,onChange:o,onEnd:a}){const i=za(e);let s={controlDirection:wV("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:d,keepAspectRatio:h,resizeDirection:f,onResizeStart:g,onResize:b,onResizeEnd:x,shouldResize:w}){let k={..._V},C={...gTe};s={boundaries:d,resizeDirection:f,keepAspectRatio:h,controlDirection:wV(u)};let _,T=null,A=[],R,D,N,M=!1;const O=tH().on("start",F=>{const{nodeLookup:L,transform:U,snapGrid:P,snapToGrid:V,nodeOrigin:I,paneDomNode:H}=n();if(_=L.get(r),!_)return;T=H?.getBoundingClientRect()??null;const{xSnapped:q,ySnapped:Z}=k0(F.sourceEvent,{transform:U,snapGrid:P,snapToGrid:V,containerBounds:T});k={width:_.measured.width??0,height:_.measured.height??0,x:_.position.x??0,y:_.position.y??0},C={...k,pointerX:q,pointerY:Z,aspectRatio:k.width/k.height},R=void 0,_.parentId&&(_.extent==="parent"||_.expandParent)&&(R=L.get(_.parentId),D=R&&_.extent==="parent"?yTe(R):void 0),A=[],N=void 0;for(const[W,G]of L)if(G.parentId===r&&(A.push({id:W,position:{...G.position},extent:G.extent}),G.extent==="parent"||G.expandParent)){const K=bTe(G,_,G.origin??I);N?N=[[Math.min(K[0][0],N[0][0]),Math.min(K[0][1],N[0][1])],[Math.max(K[1][0],N[1][0]),Math.max(K[1][1],N[1][1])]]:N=K}g?.(F,{...k})}).on("drag",F=>{const{transform:L,snapGrid:U,snapToGrid:P,nodeOrigin:V}=n(),I=k0(F.sourceEvent,{transform:L,snapGrid:U,snapToGrid:P,containerBounds:T}),H=[];if(!_)return;const{x:q,y:Z,width:W,height:G}=k,K={},j=_.origin??V,{width:Y,height:Q,x:J,y:ie}=mTe(C,s.controlDirection,I,s.boundaries,s.keepAspectRatio,j,D,N),ne=Y!==W,re=Q!==G,ge=J!==q&&ne,De=ie!==Z&&re;if(!ge&&!De&&!ne&&!re)return;if((ge||De||j[0]===1||j[1]===1)&&(K.x=ge?J:k.x,K.y=De?ie:k.y,k.x=K.x,k.y=K.y,A.length>0)){const Te=J-q,Ie=ie-Z;for(const Ze of A)Ze.position={x:Ze.position.x-Te+j[0]*(Y-W),y:Ze.position.y-Ie+j[1]*(Q-G)},H.push(Ze)}if((ne||re)&&(K.width=ne&&(!s.resizeDirection||s.resizeDirection==="horizontal")?Y:k.width,K.height=re&&(!s.resizeDirection||s.resizeDirection==="vertical")?Q:k.height,k.width=K.width,k.height=K.height),R&&_.expandParent){const Te=j[0]*(K.width??0);K.x&&K.x{M&&(x?.(F,{...k}),a?.({...k}),M=!1)});i.call(O)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}function _9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var EV={exports:{}},E9={},SV={exports:{}},S9={},CV;function xTe(){if(CV)return S9;CV=1;var e=dn;function r(h,f){return h===f&&(h!==0||1/h===1/f)||h!==h&&f!==f}var n=typeof Object.is=="function"?Object.is:r,o=e.useState,a=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function l(h,f){var g=f(),b=o({inst:{value:g,getSnapshot:f}}),x=b[0].inst,w=b[1];return i(function(){x.value=g,x.getSnapshot=f,c(x)&&w({inst:x})},[h,g,f]),a(function(){return c(x)&&w({inst:x}),h(function(){c(x)&&w({inst:x})})},[h]),s(g),g}function c(h){var f=h.getSnapshot;h=h.value;try{var g=f();return!n(h,g)}catch{return!0}}function u(h,f){return f()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return S9.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,S9}var TV;function AV(){return TV||(TV=1,SV.exports=xTe()),SV.exports}var RV;function wTe(){if(RV)return E9;RV=1;var e=dn,r=AV();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var o=typeof Object.is=="function"?Object.is:n,a=r.useSyncExternalStore,i=e.useRef,s=e.useEffect,l=e.useMemo,c=e.useDebugValue;return E9.useSyncExternalStoreWithSelector=function(u,d,h,f,g){var b=i(null);if(b.current===null){var x={hasValue:!1,value:null};b.current=x}else x=b.current;b=l(function(){function k(R){if(!C){if(C=!0,_=R,R=f(R),g!==void 0&&x.hasValue){var D=x.value;if(g(D,R))return T=D}return T=R}if(D=T,o(_,R))return D;var N=f(R);return g!==void 0&&g(D,N)?(_=R,D):(_=R,T=N)}var C=!1,_,T,A=h===void 0?null:h;return[function(){return k(d())},A===null?void 0:function(){return k(A())}]},[d,h,f,g]);var w=a(u,b[0],b[1]);return s(function(){x.hasValue=!0,x.value=w},[w]),c(w),w},E9}var NV;function kTe(){return NV||(NV=1,EV.exports=wTe()),EV.exports}var DV=kTe();const _Te=_9(DV),ETe={},$V=e=>{let r;const n=new Set,o=(l,c)=>{const u=typeof l=="function"?l(r):l;if(!Object.is(u,r)){const d=r;r=c??(typeof u!="object"||u===null)?u:Object.assign({},r,u),n.forEach(h=>h(r,d))}},a=()=>r,i={setState:o,getState:a,getInitialState:()=>s,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(ETe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=r=e(o,a,i);return i},STe=e=>e?$V(e):$V,{useDebugValue:CTe}=dn,{useSyncExternalStoreWithSelector:TTe}=_Te,ATe=e=>e;function MV(e,r=ATe,n){const o=TTe(e.subscribe,e.getState,e.getServerState||e.getInitialState,r,n);return CTe(o),o}const PV=(e,r)=>{const n=STe(e),o=(a,i=r)=>MV(n,a,i);return Object.assign(o,n),o},RTe=(e,r)=>e?PV(e,r):PV;function Kr(e,r){if(Object.is(e,r))return!0;if(typeof e!="object"||e===null||typeof r!="object"||r===null)return!1;if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(const[o,a]of e)if(!Object.is(a,r.get(o)))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(const o of e)if(!r.has(o))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(r).length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(r,o)||!Object.is(e[o],r[o]))return!1;return!0}const N3=E.createContext(null),NTe=N3.Provider,zV=dl.error001();function qt(e,r){const n=E.useContext(N3);if(n===null)throw new Error(zV);return MV(n,e,r)}function Ar(){const e=E.useContext(N3);if(e===null)throw new Error(zV);return E.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const IV={display:"none"},DTe={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},OV="react-flow__node-desc",jV="react-flow__edge-desc",$Te="react-flow__aria-live",MTe=e=>e.ariaLiveMessage,PTe=e=>e.ariaLabelConfig;function zTe({rfId:e}){const r=qt(MTe);return y.jsx("div",{id:`${$Te}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:DTe,children:r})}function ITe({rfId:e,disableKeyboardA11y:r}){const n=qt(PTe);return y.jsxs(y.Fragment,{children:[y.jsx("div",{id:`${OV}-${e}`,style:IV,children:r?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),y.jsx("div",{id:`${jV}-${e}`,style:IV,children:n["edge.a11yDescription.default"]}),!r&&y.jsx(zTe,{rfId:e})]})}const ku=E.forwardRef(({position:e="top-left",children:r,className:n,style:o,...a},i)=>{const s=`${e}`.split("-");return y.jsx("div",{className:_n(["react-flow__panel",n,...s]),style:o,ref:i,...a,children:r})});ku.displayName="Panel";function OTe({proOptions:e,position:r="bottom-right"}){return e?.hideAttribution?null:y.jsx(ku,{position:r,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:y.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const jTe=e=>{const r=[],n=[];for(const[,o]of e.nodeLookup)o.selected&&r.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:r,selectedEdges:n}},D3=e=>e.id;function LTe(e,r){return Kr(e.selectedNodes.map(D3),r.selectedNodes.map(D3))&&Kr(e.selectedEdges.map(D3),r.selectedEdges.map(D3))}function BTe({onSelectionChange:e}){const r=Ar(),{selectedNodes:n,selectedEdges:o}=qt(jTe,LTe);return E.useEffect(()=>{const a={nodes:n,edges:o};e?.(a),r.getState().onSelectionChangeHandlers.forEach(i=>i(a))},[n,o,e]),null}const FTe=e=>!!e.onSelectionChangeHandlers;function HTe({onSelectionChange:e}){const r=qt(FTe);return e||r?y.jsx(BTe,{onSelectionChange:e}):null}const LV=[0,0],VTe={x:0,y:0,zoom:1},qTe=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance","ariaLabelConfig"],BV=[...qTe,"rfId"],UTe=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),FV={translateExtent:g0,nodeOrigin:LV,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function WTe(e){const{setNodes:r,setEdges:n,setMinZoom:o,setMaxZoom:a,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:c,setPaneClickDistance:u}=qt(UTe,Kr),d=Ar();E.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=FV,l()}),[]);const h=E.useRef(FV);return E.useEffect(()=>{for(const f of BV){const g=e[f],b=h.current[f];g!==b&&(typeof e[f]>"u"||(f==="nodes"?r(g):f==="edges"?n(g):f==="minZoom"?o(g):f==="maxZoom"?a(g):f==="translateExtent"?i(g):f==="nodeExtent"?s(g):f==="paneClickDistance"?u(g):f==="ariaLabelConfig"?d.setState({ariaLabelConfig:DCe(g)}):f==="fitView"?d.setState({fitViewQueued:g}):f==="fitViewOptions"?d.setState({fitViewOptions:g}):d.setState({[f]:g})))}h.current=e},BV.map(f=>e[f])),null}function HV(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function YTe(e){const[r,n]=E.useState(e==="system"?null:e);return E.useEffect(()=>{if(e!=="system"){n(e);return}const o=HV(),a=()=>n(o?.matches?"dark":"light");return a(),o?.addEventListener("change",a),()=>{o?.removeEventListener("change",a)}},[e]),r!==null?r:HV()?.matches?"dark":"light"}const VV=typeof document<"u"?document:null;function E0(e=null,r={target:VV,actInsideInputWithModifier:!0}){const[n,o]=E.useState(!1),a=E.useRef(!1),i=E.useRef(new Set([])),[s,l]=E.useMemo(()=>{if(e!==null){const c=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
+`},a),i}function $_e(e,r){return e&&"run"in e?async function(n,o){const a=gB(n,{file:o,...r});await e.run(a,o)}:function(n,o){return gB(n,{file:o,...e||r})}}function yB(e){if(e)throw e}var F8,bB;function P_e(){if(bB)return F8;bB=1;var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=function(d){return typeof Array.isArray=="function"?Array.isArray(d):r.call(d)==="[object Array]"},i=function(d){if(!d||r.call(d)!=="[object Object]")return!1;var u=e.call(d,"constructor"),h=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!u&&!h)return!1;var f;for(f in d);return typeof f>"u"||e.call(d,f)},s=function(d,u){n&&u.name==="__proto__"?n(d,u.name,{enumerable:!0,configurable:!0,value:u.newValue,writable:!0}):d[u.name]=u.newValue},l=function(d,u){if(u==="__proto__")if(e.call(d,u)){if(o)return o(d,u).value}else return;return d[u]};return F8=function c(){var d,u,h,f,g,b,x=arguments[0],w=1,k=arguments.length,C=!1;for(typeof x=="boolean"&&(C=x,x=arguments[1]||{},w=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});ws.length;let c;l&&s.push(a);try{c=e.apply(this,s)}catch(d){const u=d;if(l&&n)throw u;return a(u)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,a):c instanceof Error?a(c):i(c))}function a(s,...l){n||(n=!0,r(s,...l))}function i(s){a(null,s)}}class sa extends Error{constructor(r,n,o){super(),typeof n=="string"&&(o=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof r=="string"?a=r:!i.cause&&r&&(s=!0,a=r.message,i.cause=r),!i.ruleId&&!i.source&&typeof o=="string"){const c=o.indexOf(":");c===-1?i.ruleId=o:(i.source=o.slice(0,c),i.ruleId=o.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file,this.message=a,this.line=l?l.line:void 0,this.name=F1(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}sa.prototype.file="",sa.prototype.name="",sa.prototype.reason="",sa.prototype.message="",sa.prototype.stack="",sa.prototype.column=void 0,sa.prototype.line=void 0,sa.prototype.ancestors=void 0,sa.prototype.cause=void 0,sa.prototype.fatal=void 0,sa.prototype.place=void 0,sa.prototype.ruleId=void 0,sa.prototype.source=void 0;const al={basename:O_e,dirname:j_e,extname:L_e,join:B_e,sep:"/"};function O_e(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');H1(e);let n=0,o=-1,a=e.length,i;if(r===void 0||r.length===0||r.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else o<0&&(i=!0,o=a+1);return o<0?"":e.slice(n,o)}if(r===e)return"";let s=-1,l=r.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),l>-1&&(e.codePointAt(a)===r.codePointAt(l--)?l<0&&(o=a):(l=-1,o=s));return n===o?o=s:o<0&&(o=e.length),e.slice(n,o)}function j_e(e){if(H1(e),e.length===0)return".";let r=-1,n=e.length,o;for(;--n;)if(e.codePointAt(n)===47){if(o){r=n;break}}else o||(o=!0);return r<0?e.codePointAt(0)===47?"/":".":r===1&&e.codePointAt(0)===47?"//":e.slice(0,r)}function L_e(e){H1(e);let r=e.length,n=-1,o=0,a=-1,i=0,s;for(;r--;){const l=e.codePointAt(r);if(l===47){if(s){o=r+1;break}continue}n<0&&(s=!0,n=r+1),l===46?a<0?a=r:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===o+1?"":e.slice(a,n)}function B_e(...e){let r=-1,n;for(;++r0&&e.codePointAt(e.length-1)===47&&(n+="/"),r?"/"+n:n}function H_e(e,r){let n="",o=0,a=-1,i=0,s=-1,l,c;for(;++s<=e.length;){if(s2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",o=0):(n=n.slice(0,c),o=n.length-1-n.lastIndexOf("/")),a=s,i=0;continue}}else if(n.length>0){n="",o=0,a=s,i=0;continue}}r&&(n=n.length>0?n+"/..":"..",o=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),o=s-a-1;a=s,i=0}else l===46&&i>-1?i++:i=-1}return n}function H1(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const V_e={cwd:q_e};function q_e(){return"/"}function q8(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function U_e(e){if(typeof e=="string")e=new URL(e);else if(!q8(e)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(e.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return W_e(e)}function W_e(e){if(e.hostname!==""){const o=new TypeError('File URL host must be "localhost" or empty on darwin');throw o.code="ERR_INVALID_FILE_URL_HOST",o}const r=e.pathname;let n=-1;for(;++n0){let[g,...b]=u;const x=o[f][1];V8(x)&&V8(g)&&(g=H8(!0,x,g)),o[f]=[d,g,...b]}}}}const Z_e=new G8().freeze();function X8(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function K8(e,r){if(typeof r!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Z8(e,r){if(r)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xB(e){if(!V8(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function wB(e,r,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+r+"` instead")}function P3(e){return Q_e(e)?e:new Y_e(e)}function Q_e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function J_e(e){return typeof e=="string"||e6e(e)}function e6e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function t6e(){return Z_e().use(K5e).use(R5e).use($_e,{allowDangerousHtml:!0,clobberPrefix:"",tableCellPadding:!1,tight:!0}).use(Mxe).use(qxe).use(G2e,{closeSelfClosing:!0,tightSelfClosing:!0})}function r6e(e){return String(t6e().processSync(e.trim())).trim()}function n6e(e){return A3(sB(e),{includeHtml:!1,includeImageAlt:!1})}var Q8,kB;function o6e(){if(kB)return Q8;kB=1;var e=iO(),r=o3();function n(){this.clear()}return n.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},n.prototype.enqueue=function(o){return this.items.push(o),++this.size},n.prototype.dequeue=function(){if(this.size){var o=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,o}},n.prototype.peek=function(){if(this.size)return this.items[this.offset]},n.prototype.forEach=function(o,a){a=arguments.length>1?a:this;for(var i=this.offset,s=0,l=this.items.length;i=o.length)return{done:!0};var i=o[a];return a++,{value:i,done:!1}})},n.prototype.entries=function(){var o=this.items,a=this.offset,i=0;return new e(function(){if(a>=o.length)return{done:!0};var s=o[a];return a++,{value:[i++,s],done:!1}})},typeof Symbol<"u"&&(n.prototype[Symbol.iterator]=n.prototype.values),n.prototype.toString=function(){return this.toArray().join(",")},n.prototype.toJSON=function(){return this.toArray()},n.prototype.inspect=function(){var o=this.toArray();return Object.defineProperty(o,"constructor",{value:n,enumerable:!1}),o},typeof Symbol<"u"&&(n.prototype[Symbol.for("nodejs.util.inspect.custom")]=n.prototype.inspect),n.from=function(o){var a=new n;return r(o,function(i){a.enqueue(i)}),a},n.of=function(){return n.from(arguments)},Q8=n,Q8}var a6e=o6e();const J8=m1(a6e);var eE,_B;function i6e(){if(_B)return eE;_B=1;function e(r){if(typeof r!="function")throw new Error("mnemonist/DefaultMap.constructor: expecting a function.");this.items=new Map,this.factory=r,this.size=0}return e.prototype.clear=function(){this.items.clear(),this.size=0},e.prototype.get=function(r){var n=this.items.get(r);return typeof n>"u"&&(n=this.factory(r,this.size),this.items.set(r,n),this.size++),n},e.prototype.peek=function(r){return this.items.get(r)},e.prototype.set=function(r,n){return this.items.set(r,n),this.size=this.items.size,this},e.prototype.has=function(r){return this.items.has(r)},e.prototype.delete=function(r){var n=this.items.delete(r);return this.size=this.items.size,n},e.prototype.forEach=function(r,n){n=arguments.length>1?n:this,this.items.forEach(r,n)},e.prototype.entries=function(){return this.items.entries()},e.prototype.keys=function(){return this.items.keys()},e.prototype.values=function(){return this.items.values()},typeof Symbol<"u"&&(e.prototype[Symbol.iterator]=e.prototype.entries),e.prototype.inspect=function(){return this.items},typeof Symbol<"u"&&(e.prototype[Symbol.for("nodejs.util.inspect.custom")]=e.prototype.inspect),e.autoIncrement=function(){var r=0;return function(){return r++}},eE=e,eE}var s6e=i6e();const Xn=m1(s6e);function xf(e){return e.summary??e.description}function wf(e){return e.description??e.summary}function la(e){return!!e}const V1="@group";function l6e(e){return e.kind===V1}function EB(e,r){return at(typeof e=="string"&&e!=""),"@"+e+"."+r}function c6e(e){return e.startsWith("@")}function d6e(e){if(!e.startsWith("@"))return[null,e];const r=e.indexOf(".");if(r<2)throw new Error("Invalid global FQN");const n=e.slice(1,r),o=e.slice(r+1);return[n,o]}function q1(e){return e.startsWith("step-")}function SB(e){if(!q1(e))throw new Error(`Invalid step edge id: ${e}`);return parseFloat(e.slice(5))}function u6e(...e){return Do(p6e,e)}function p6e(e,r){let n={...e};for(let[o,a]of Object.entries(n))r(a,o,e)&&delete n[o];return n}var tE={},CB;function rE(){return CB||(CB=1,(function(e){var r=Math.pow(2,8)-1,n=Math.pow(2,16)-1,o=Math.pow(2,32)-1,a=Math.pow(2,7)-1,i=Math.pow(2,15)-1,s=Math.pow(2,31)-1;e.getPointerArray=function(c){var d=c-1;if(d<=r)return Uint8Array;if(d<=n)return Uint16Array;if(d<=o)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},e.getSignedPointerArray=function(c){var d=c-1;return d<=a?Int8Array:d<=i?Int16Array:d<=s?Int32Array:Float64Array},e.getNumberType=function(c){return c===(c|0)?Math.sign(c)===-1?c<=127&&c>=-128?Int8Array:c<=32767&&c>=-32768?Int16Array:Int32Array:c<=255?Uint8Array:c<=65535?Uint16Array:Uint32Array:Float64Array};var l={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(c,d){var u=null,h=0,f,g,b,x,w;for(x=0,w=c.length;xh&&(h=f,u=g);return u},e.isTypedArray=function(c){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(c)},e.concat=function(){var c=0,d,u,h;for(d=0,h=arguments.length;d"u"))return this.splayOnTop(s),this.V[s]},a.prototype.peek=function(i){var s=this.items[i];if(!(typeof s>"u"))return this.V[s]},a.prototype.forEach=function(i,s){s=arguments.length>1?s:this;for(var l=0,c=this.size,d=this.head,u=this.K,h=this.V,f=this.forward;l=s)return{done:!0};var u=c[l];return i++,i=s)return{done:!0};var u=c[l];return i++,i=s)return{done:!0};var h=c[l],f=d[l];return i++,i"u"))return this.splayOnTop(s),this.V[s]},a.prototype.peek=function(i){var s=this.items.get(i);if(!(typeof s>"u"))return this.V[s]},a.prototype.splayOnTop=e.prototype.splayOnTop,a.prototype.forEach=e.prototype.forEach,a.prototype.keys=e.prototype.keys,a.prototype.values=e.prototype.values,a.prototype.entries=e.prototype.entries,typeof Symbol<"u"&&(a.prototype[Symbol.iterator]=a.prototype.entries),a.prototype.inspect=e.prototype.inspect,a.from=function(i,s,l,c){if(arguments.length<2){if(c=o.guessLength(i),typeof c!="number")throw new Error("mnemonist/lru-cache.from: could not guess iterable length. Please provide desired capacity as last argument.")}else arguments.length===2&&(c=s,s=null,l=null);var d=new a(s,l,c);return r(i,function(u,h){d.set(h,u)}),d},oE=a,oE}var m6e=f6e();const DB=m1(m6e);function U1(e){return u6e(e,r=>r===void 0)}const g6e=Symbol.for("text"),y6e=Symbol.for("html"),oc="",$B=new DB(500),PB=new DB(500);class or{static getOrCreateFromText(r){if(r.trim()===oc)return or.EMPTY;let n=PB.get(r);return n||(n=new or({txt:r}),PB.set(r,n),n)}static getOrCreateFromMarkdown(r){if(r.trim()===oc)return or.EMPTY;let n=$B.get(r);return n||(n=new or({md:r}),$B.set(r,n),n)}static memoize(r,n,o){return yr(r,n,()=>or.from(o))}static from(r){return r==null||r===or.EMPTY?or.EMPTY:r instanceof or?r:typeof r=="string"?this.getOrCreateFromText(r):"isEmpty"in r&&r.isEmpty?or.EMPTY:"md"in r?this.getOrCreateFromMarkdown(r.md):this.getOrCreateFromText(r.txt)}static EMPTY=new class extends or{isEmpty=!0;nonEmpty=!1;isMarkdown=!1;$source=null;constructor(){super({txt:oc})}get text(){return null}get md(){return null}get html(){return null}};$source;isEmpty;nonEmpty;isMarkdown;constructor(r){this.isMarkdown=!1,typeof r=="string"?(this.$source={txt:r},this.isEmpty=r.trim()===oc):(this.$source=r,this.isEmpty=!0,"md"in r?(this.isEmpty=r.md===oc,this.isMarkdown=!0):this.isEmpty=r.txt===oc),this.nonEmpty=!this.isEmpty}get text(){if(this.isEmpty||this.$source===null)return oc;const r=this.$source;return"txt"in r?r.txt:yr(this,g6e,()=>n6e(r.md))}get md(){if(this.isEmpty||this.$source===null)return oc;const r=this.$source;if("md"in r)return r.md;if("txt"in r)return r.txt;Zi(r)}get html(){if(this.isEmpty||this.$source===null)return oc;const r=this.$source;return"txt"in r?r.txt:yr(this,y6e,()=>r6e(r.md))}equals(r){return this===r?!0:r instanceof or?this.isEmpty&&r.isEmpty?!0:this.isEmpty!==r.isEmpty||this.isMarkdown!==r.isMarkdown?!1:this.isMarkdown?this.$source?.md===r.$source?.md:this.$source?.txt===r.$source?.txt:!1}}function MB(e){return r=>!e(r)}function b6e(...e){return Do(v6e,e)}const v6e=(e,r)=>r.every(n=>n(e));function x6e(...e){return Do(w6e,e)}const w6e=(e,r)=>r.some(n=>n(e));function rs(e){return e==null}function zB(e,r){return e[Gu]===r}const Gu="_stage",W1="_type",IB="_layout";function k6e(e){return la(e.kind)&&!la(e.element)}function _6e(e){return"tag"in e}function E6e(e){return"kind"in e}function S6e(e){return"participant"in e}function C6e(e){return"not"in e}function T6e(e){return"and"in e}function A6e(e){return"or"in e}function Xu(e){switch(!0){case S6e(e):{const r=e.participant,n=Xu(e.operator);return R6e(r,n)}case _6e(e):{if(cd(e.tag)||"eq"in e.tag){const n=cd(e.tag)?e.tag:e.tag.eq;return o=>Array.isArray(o.tags)&&o.tags.includes(n)}const r=e.tag.neq;return n=>!Array.isArray(n.tags)||!n.tags.includes(r)}case E6e(e):{if(cd(e.kind)||"eq"in e.kind){const n=cd(e.kind)?e.kind:e.kind.eq;return o=>o.kind===n}const r=e.kind.neq;return n=>rs(n.kind)||n.kind!==r}case C6e(e):{const r=Xu(e.not);return MB(r)}case T6e(e):{const r=e.and.map(Xu);return b6e(r)}case A6e(e):{const r=e.or.map(Xu);return x6e(r)}default:Zi(e)}}function R6e(e,r){return n=>{if(!n.source||!n.target)return!1;switch(e){case"source":return r(n.source);case"target":return r(n.target)}}}function N6e(e){return e._type==="dynamic"}var Y1;(e=>{function r(c){return"model"in c&&!("project"in c)}e.isElementRef=r;function n(c){return"project"in c&&"model"in c}e.isImportRef=n;function o(c){if(cd(c))throw new Error(`Expected FqnRef, got: "${c}"`);if(n(c))return EB(c.project,c.model);if(r(c))return c.model;throw new Error("Expected FqnRef.ModelRef or FqnRef.ImportRef")}e.flatten=o;function a(c){return r(c)||n(c)}e.isModelRef=a;function i(c){return"deployment"in c&&"element"in c}e.isInsideInstanceRef=i;function s(c){return"deployment"in c&&!("element"in c)}e.isDeploymentElementRef=s;function l(c){return s(c)||i(c)}e.isDeploymentRef=l})(Y1||(Y1={}));function aE(e){return q1(e)&&e.includes(".")?e.slice(0,e.indexOf(".")+1):null}var il;(e=>{function r({x:d,y:u,width:h,height:f}){return{x:d+h/2,y:u+f/2}}e.center=r;function n(d){const{x1:u,y1:h,x2:f,y2:g}=iE.fromPoints(d);return{x:u,y:h,width:f-u,height:g-h}}e.fromPoints=n;function o(...d){if(at(Kl(d,1),"No boxes provided"),d.length===1)return d[0];let u=1/0,h=1/0,f=-1/0,g=-1/0;for(const b of d)u=Math.min(u,b.x),h=Math.min(h,b.y),f=Math.max(f,b.x+b.width),g=Math.max(g,b.y+b.height);return{x:u,y:h,width:f-u,height:g-h}}e.merge=o;function a(d){return{x:Math.min(d.x1,d.x2),y:Math.min(d.y1,d.y2),width:Math.abs(d.x2-d.x1),height:Math.abs(d.y2-d.y1)}}e.fromRectBox=a;function i(d){return{x1:d.x,y1:d.y,x2:d.x+d.width,y2:d.y+d.height}}e.toRectBox=i;function s(d,u){return u===0?d:{x:d.x-u,y:d.y-u,width:d.width+u*2,height:d.height+u*2}}e.expand=s;function l(d,u){return u===0?d:{x:d.x+u,y:d.y+u,width:d.width-u*2,height:d.height-u*2}}e.shrink=l;function c(d,u){return d===u?!0:d.x<=u.x&&d.y<=u.y&&d.x+d.width>=u.x+u.width&&d.y+d.height>=u.y+u.height}e.includes=c})(il||(il={}));var iE;(e=>{function r({x1:s,y1:l,x2:c,y2:d}){return{x:(s+c)/2,y:(l+d)/2}}e.center=r;function n(s){at(s.length>0,"At least one point is required");let l=1/0,c=1/0,d=-1/0,u=-1/0;for(const[h,f]of s)l=Math.min(l,h),c=Math.min(c,f),d=Math.max(d,h),u=Math.max(u,f);return{x1:l,y1:c,x2:d,y2:u}}e.fromPoints=n;function o(...s){at(s.length>0,"No boxes provided");let l=1/0,c=1/0,d=-1/0,u=-1/0;for(const h of s)l=Math.min(l,h.x1),c=Math.min(c,h.y1),d=Math.max(d,h.x2),u=Math.max(u,h.y2);return{x1:l,y1:c,x2:d,y2:u}}e.merge=o;function a(s){return{x:s.x1,y:s.y1,width:s.x2-s.x1,height:s.y2-s.y1}}e.toBBox=a;function i(s,l){return s===l?!0:s.x1<=l.x1&&s.y1<=l.y1&&s.x2>=l.x2&&s.y2>=l.y2}e.includes=i})(iE||(iE={}));function OB(e){const r=typeof e=="string"?e:e.color;return r.startsWith("#")||r.startsWith("rgb")}const sE={done:!1,hasNext:!1};function Ku(e,...r){let n=e,o=r.map(i=>"lazy"in i?D6e(i):void 0),a=0;for(;aLB(n,e,...r):LB(e,...r)}function LB(e,...r){let n=e;for(let o of r){if(n==null)return;n=n[o]}return n}function lE(...e){return Do(P6e,e)}function P6e(e,r){let n=[...e];return n.sort(r),n}function M3(...e){return Do(M6e,e,z6e)}const M6e=(e,r)=>e.map(r),z6e=e=>(r,n,o)=>({done:!1,hasNext:!0,next:e(r,n,o)}),I6e=["tomato","grass","blue","ruby","orange","indigo","pink","teal","purple","amber","crimson","red","lime","yellow","violet"];function O6e(e,r,n){let o=e.get(r);return o||(o=n(r),e.set(r,o)),o}var cE={},BB;function j6e(){return BB||(BB=1,(function(e){e.intersection=function(){if(arguments.length<2)throw new Error("mnemonist/Set.intersection: needs at least two arguments.");var r=new Set,n=1/0,o=null,a,i,s=arguments.length;for(i=0;in.size)return!1;for(;a=o.next(),!a.done;)if(!n.has(a.value))return!1;return!0},e.isSuperset=function(r,n){return e.isSubset(n,r)},e.add=function(r,n){for(var o=n.values(),a;a=o.next(),!a.done;)r.add(a.value)},e.subtract=function(r,n){for(var o=n.values(),a;a=o.next(),!a.done;)r.delete(a.value)},e.intersect=function(r,n){for(var o=r.values(),a;a=o.next(),!a.done;)n.has(a.value)||r.delete(a.value)},e.disjunct=function(r,n){for(var o=r.values(),a,i=[];a=o.next(),!a.done;)n.has(a.value)&&i.push(a.value);for(o=n.values();a=o.next(),!a.done;)r.has(a.value)||r.add(a.value);for(var s=0,l=i.length;sn.size&&(o=r,r=n,n=o),r.size===0)return 0;if(r===n)return r.size;for(var a=r.values(),i,s=0;i=a.next(),!i.done;)n.has(i.value)&&s++;return s},e.unionSize=function(r,n){var o=e.intersectionSize(r,n);return r.size+n.size-o},e.jaccard=function(r,n){var o=e.intersectionSize(r,n);if(o===0)return 0;var a=r.size+n.size-o;return o/a},e.overlap=function(r,n){var o=e.intersectionSize(r,n);return o===0?0:o/Math.min(r.size,n.size)}})(cE)),cE}var FB=j6e();function dE(...e){let r=new Set;for(const n of e)for(const o of n)r.add(o);return r}function _f(e,...r){let n=new Set;if(e.size===0)return n;let o=Kl(r,2)?FB.intersection(...r):r[0];if(o.size===0)return n;for(const a of e)o.has(a)&&n.add(a);return n}function uE(e,r){if(e.size===0)return new Set;if(r.size===0)return new Set(e);let n=new Set;for(const o of e)r.has(o)||n.add(o);return n}function L6e(e,r){return e.size===r.size&&[...e].every(n=>r.has(n))}function pE(e,r){return FB.symmetricDifference(e,r)}function B6e(e){let r=5381;const n=e.length;at(n>0,"stringHash: empty string");for(let o=0;o>>0).toString(36)}const z3=e=>typeof e=="function";function Qu(e,r){const n=r??e;at(z3(n));function*o(a){for(const i of a)n(i)&&(yield i)}return r?o(e):o}function X1(e,r){const n=r??e;at(z3(n));function o(a){for(const i of a)if(n(i))return i}return r?o(e):o}function hE(e){return e?HB(e):HB}function HB(e){const r=e[Symbol.iterator](),{value:n}=r.next();return n}function F6e(e,r){const n=e;at(z3(n));function*o(a){for(const i of a)yield n(i)}return o}function K1(e){return e?Array.from(e):r=>Array.from(r)}function H6e(e){return e?new Set(e):r=>new Set(r)}function VB(e,r){const n=r??e;at(z3(n));function o(a){for(const i of a)if(n(i))return!0;return!1}return r?o(e):o}function V6e(e,r){const n=e;at(n>=0,"Count must be a non-negative number");function*o(a){let i=0;for(const s of a){if(i>=n)break;yield s,i++}}return a=>o(a)}function q6e(e,r){let n=Math.ceil(e),o=Math.floor(r);if(o{setTimeout(()=>{n(U6e)},r??100)})}function I3(e){const r=dd([...e]),n=new Set(r),o=new Map(r.map(s=>[s._literalId,s])),a=new Xn(()=>null),i=r.reduce((s,l,c,d)=>(s.set(l,d.slice(c+1).filter(rO(l)).map(u=>(n.delete(u),u)).reduce((u,h)=>(u.some(to(h))||(u.push(h),a.set(h,l)),u),[])),s),new Xn(()=>[]));return{sorted:r,byId:s=>bt(o.get(s),`Element not found by id: ${s}`),root:n,parent:s=>a.get(s),children:s=>i.get(s),flatten:()=>new Set([...n,...r.reduce((s,l)=>{const c=i.get(l);return c.length===0?(s.push(l),s):(c.length>1&&s.push(...c),s)},[])])}}const fE=(e,r)=>e.size>2&&r.size!==e.size?new Set(dd([...I3(e).flatten(),...r])):e.size>1?new Set(dd([...e])):e;function UB(e,r,n){const o=c=>r.has(c);let a=new Set([e]);const i={incomers:new Set,subjects:new Set([e]),outgoers:new Set};let s=new Set(n.incoming.flatMap(c=>{if(i.subjects.add(c.target),i.incomers.add(c.source),a.add(c.target),c.target!==e){let h=c.target.parent;for(;h&&h!==e;)a.add(h),h=h.parent}let d=c.source;const u=[];for(;u.push(d),!(o(d)||!d.parent);)d=d.parent;return u})),l=new Set(n.outgoing.flatMap(c=>{if(i.subjects.add(c.source),i.outgoers.add(c.target),a.add(c.source),c.source!==e){let h=c.source.parent;for(;h&&h!==e;)a.add(h),h=h.parent}let d=c.target;const u=[];for(;u.push(d),!(o(d)||!d.parent);)d=d.parent;return u}));return{incomers:fE(s,i.incomers),incoming:new Set(n.incoming),subjects:fE(a,i.subjects),outgoing:new Set(n.outgoing),outgoers:fE(l,i.outgoers)}}function WB(e,r,n,o="global"){const a=n?r.findView(n):null;if(o==="view")return at(a,'Scope view id is required when scope is "view"'),W6e(e,a,r);const i=r.element(e),s=H6e(i.ascendingSiblings());return UB(i,s,{incoming:[...i.incoming()],outgoing:[...i.outgoing()]})}function W6e(e,r,n){const o=n.element(e);let a={incoming:K1(Qu(o.incoming(),l=>r.includesRelation(l.id))),outgoing:K1(Qu(o.outgoing(),l=>r.includesRelation(l.id)))};const i=rO(o),s=new Set([...o.ascendingSiblings(),...Ku(r.elements(),F6e(l=>l.element),Qu(l=>l!==o&&i(l)))]);return UB(o,s,a)}var YB;(e=>{e.isInside=r=>n=>to(r,n.source.id)&&to(r,n.target.id),e.isDirectedBetween=(r,n)=>o=>(o.source.id===r||to(r,o.source.id))&&(o.target.id===n||to(n,o.target.id)),e.isAnyBetween=(r,n)=>{const o=(0,e.isDirectedBetween)(r,n),a=(0,e.isDirectedBetween)(n,r);return i=>o(i)||a(i)},e.isIncoming=r=>n=>(n.target.id===r||to(r,n.target.id))&&!to(r,n.source.id),e.isOutgoing=r=>n=>(n.source.id===r||to(r,n.source.id))&&!to(r,n.target.id),e.isAnyInOut=r=>{const n=(0,e.isIncoming)(r),o=(0,e.isOutgoing)(r);return a=>n(a)||o(a)}})(YB||(YB={}));const Y6e=Symbol.for("nodejs.util.inspect.custom");function G6e(e,r){let n=r.length-e.length;if(n===1){let[o,...a]=r;return Ku(o,{lazy:e,lazyArgs:a})}if(n===0){let o={lazy:e,lazyArgs:r};return Object.assign(a=>Ku(a,o),o)}throw Error("Wrong number of arguments")}function Ef(e){return e===""||e===void 0?!0:Array.isArray(e)?e.length===0:Object.keys(e).length===0}function mE(...e){return Do(X6e,e)}function X6e(e,r){if(e===r||Object.is(e,r))return!0;if(typeof e!="object"||!e||typeof r!="object"||!r)return!1;if(e instanceof Map&&r instanceof Map)return K6e(e,r);if(e instanceof Set&&r instanceof Set)return Z6e(e,r);let n=Object.keys(e);if(n.length!==Object.keys(r).length)return!1;for(let o of n){if(!Object.hasOwn(r,o))return!1;let{[o]:a}=e,{[o]:i}=r;if(a!==i||!Object.is(a,i))return!1}return!0}function K6e(e,r){if(e.size!==r.size)return!1;for(let[n,o]of e){let a=r.get(n);if(o!==a||!Object.is(o,a))return!1}return!0}function Z6e(e,r){if(e.size!==r.size)return!1;for(let n of e)if(!r.has(n))return!1;return!0}function O3(...e){return G6e(Q6e,e)}function Q6e(){let e=new Set;return r=>e.has(r)?sE:(e.add(r),{done:!1,hasNext:!0,next:r})}class GB{Aux;get style(){return yr(this,"style",()=>U1({shape:this.$model.$styles.defaults.shape,color:this.$model.$styles.defaults.color,border:this.$model.$styles.defaults.border,opacity:this.$model.$styles.defaults.opacity,size:this.$model.$styles.defaults.size,padding:this.$model.$styles.defaults.padding,textSize:this.$model.$styles.defaults.text,...this.$node.style}))}get name(){return g1(this.id)}get shape(){return this.style.shape}get color(){return this.style.color}get summary(){return or.memoize(this,"summary",xf(this.$node))}get description(){return or.memoize(this,"description",wf(this.$node))}get technology(){return this.$node.technology??null}get links(){return this.$node.links??[]}ancestors(){return this.$model.ancestors(this)}commonAncestor(r){const n=b1(this.id,r.id);return n?this.$model.node(n):null}siblings(){return this.$model.siblings(this)}isSibling(r){return this.parent===r.parent}*ascendingSiblings(){yield*this.siblings();for(const r of this.ancestors())yield*r.siblings()}*descendingSiblings(){for(const r of[...this.ancestors()].reverse())yield*r.siblings();yield*this.siblings()}incoming(r="all"){return this.$model.incoming(this,r)}outgoing(r="all"){return this.$model.outgoing(this,r)}*incomers(r="all"){const n=new Set;for(const o of this.incoming(r))n.has(o.source.id)||(n.add(o.source.id),yield o.source)}*outgoers(r="all"){const n=new Set;for(const o of this.outgoing(r))n.has(o.target.id)||(n.add(o.target.id),yield o.target)}*views(){for(const r of this.$model.views())r._type==="deployment"&&r.includesDeployment(this.id)&&(yield r)}isDeploymentNode(){return!1}isInstance(){return!1}get allOutgoing(){return yr(this,Symbol.for("allOutgoing"),()=>yd.from(new Set(this.outgoingModelRelationships()),new Set(this.outgoing())))}get allIncoming(){return yr(this,Symbol.for("allIncoming"),()=>yd.from(new Set(this.incomingModelRelationships()),new Set(this.incoming())))}hasMetadata(){return!!this.$node.metadata&&!Ef(this.$node.metadata)}getMetadata(r){return r?this.$node.metadata?.[r]:this.$node.metadata??{}}isTagged(r){return this.tags.includes(r)}}class XB extends GB{constructor(r,n){super(),this.$model=r,this.$node=n,this.id=n.id,this._literalId=n.id,this.title=n.title,this.hierarchyLevel=r3(n.id)}id;_literalId;title;hierarchyLevel;get parent(){return this.$model.parent(this)}get kind(){return this.$node.kind}get tags(){return yr(this,Symbol.for("tags"),()=>O3([...this.$node.tags??[],...this.$model.$model.specification.deployments[this.kind]?.tags??[]]))}children(){return this.$model.children(this)}descendants(r="desc"){return this.$model.descendants(this,r)}isDeploymentNode(){return!0}*instances(){for(const r of this.descendants("desc"))r.isInstance()&&(yield r)}onlyOneInstance(){const r=this.children();if(r.size!==1)return null;const n=hE(r);return n?n.isInstance()?n:n.onlyOneInstance():null}_relationshipsFromInstances=null;relationshipsFromInstances(){if(this._relationshipsFromInstances)return this._relationshipsFromInstances;const{outgoing:r,incoming:n}=this._relationshipsFromInstances={outgoing:new Set,incoming:new Set};for(const o of this.instances()){for(const a of o.element.outgoing())r.add(a);for(const a of o.element.incoming())n.add(a)}return this._relationshipsFromInstances}outgoingModelRelationships(){return this.relationshipsFromInstances().outgoing.values()}incomingModelRelationships(){return this.relationshipsFromInstances().incoming.values()}internalModelRelationships(){const{outgoing:r,incoming:n}=this.relationshipsFromInstances();return _f(n,r)}}class KB extends GB{constructor(r,n,o){super(),this.$model=r,this.$instance=n,this.element=o,this.id=n.id,this._literalId=n.id,this.title=n.title??o.title,this.hierarchyLevel=r3(n.id)}id;_literalId;title;hierarchyLevel;get $node(){return this.$instance}get parent(){return bt(this.$model.parent(this),`Parent of ${this.id} not found`)}get style(){return yr(this,"style",()=>U1({shape:this.$model.$styles.defaults.shape,color:this.$model.$styles.defaults.color,border:this.$model.$styles.defaults.border,opacity:this.$model.$styles.defaults.opacity,size:this.$model.$styles.defaults.size,padding:this.$model.$styles.defaults.padding,textSize:this.$model.$styles.defaults.text,...this.element.$element.style,...this.$instance.style}))}get tags(){return yr(this,Symbol.for("tags"),()=>O3([...this.$instance.tags??[],...this.element.tags]))}get kind(){return this.element.kind}get summary(){return or.memoize(this,"summary",xf(this.$instance)??xf(this.element.$element))}get description(){return or.memoize(this,"description",wf(this.$instance)??wf(this.element.$element))}get technology(){return this.$instance.technology??this.element.technology??null}get links(){return this.$instance.links??this.element.links}isInstance(){return!0}outgoingModelRelationships(){return this.element.outgoing()}incomingModelRelationships(){return this.element.incoming()}*views(){for(const r of this.$model.views())if(r._type==="deployment"){if(r.includesDeployment(this.id)){yield r;continue}r.includesDeployment(this.parent.id)&&this.parent.onlyOneInstance()&&(yield r)}}}class J6e{constructor(r,n){this.instance=r,this.element=n}get id(){return this.instance.id}get _literalId(){return this.instance.id}get style(){return yr(this,"style ",()=>({shape:this.element.shape,color:this.element.color,...this.element.$element.style}))}get shape(){return this.element.shape}get color(){return this.element.color}get title(){return this.element.title}get summary(){return this.element.summary}get description(){return this.element.description}get technology(){return this.element.technology}isDeploymentNode(){return!1}isInstance(){return!1}}class e8e{constructor(r,n){this.$model=r,this.$relationship=n,this.source=r.deploymentRef(n.source),this.target=r.deploymentRef(n.target);const o=b1(this.source.id,this.target.id);this.boundary=o?this.$model.node(o):null}boundary;source;target;get id(){return this.$relationship.id}get expression(){return`${this.source.id} -> ${this.target.id}`}get title(){return la(this.$relationship.title)?this.$relationship.title:null}get technology(){return this.$relationship.technology??null}get hasSummary(){return!!this.$relationship.summary&&!!this.$relationship.description&&!mE(this.$relationship.summary,this.$relationship.description)}get summary(){return or.memoize(this,"summary",xf(this.$relationship))}get description(){return or.memoize(this,"description",wf(this.$relationship))}get tags(){return this.$relationship.tags??[]}get kind(){return this.$relationship.kind??null}get navigateTo(){return this.$relationship.navigateTo?this.$model.$model.view(this.$relationship.navigateTo):null}get links(){return this.$relationship.links??[]}get color(){return this.$relationship.color??this.$model.$styles.defaults.relationship.color}get line(){return this.$relationship.line??this.$model.$styles.defaults.relationship.line}get head(){return this.$relationship.head??this.$model.$styles.defaults.relationship.arrow}get tail(){return this.$relationship.tail}*views(){for(const r of this.$model.views())r.includesRelation(this.id)&&(yield r)}isDeploymentRelation(){return!0}isModelRelation(){return!1}hasMetadata(){return!!this.$relationship.metadata&&!Ef(this.$relationship.metadata)}getMetadata(r){return r?this.$relationship.metadata?.[r]:this.$relationship.metadata??{}}isTagged(r){return this.tags.includes(r)}}class yd{constructor(r=new Set,n=new Set){this.model=r,this.deployment=n}static empty(){return new yd}static from(r,n){return new yd(new Set(r),new Set(n))}get isEmpty(){return this.model.size===0&&this.deployment.size===0}get nonEmpty(){return this.model.size>0||this.deployment.size>0}get size(){return this.model.size+this.deployment.size}intersect(r){return yd.from(_f(this.model,r.model),_f(this.deployment,r.deployment))}difference(r){return yd.from(uE(this.model,r.model),uE(this.deployment,r.deployment))}union(r){return yd.from(dE(this.model,r.model),dE(this.deployment,r.deployment))}}function ZB(e,r){return n=>e.source===n.source&&e.target===n.target}function gE(e,r,n="directed"){if(e===r)return[];if(tO(e,r))return[];const o=_f(e.allOutgoing,r.allIncoming),a=o.size>0?new pi(e,r,o):null;if(n==="directed")return a?[a]:[];const i=_f(e.allIncoming,r.allOutgoing),s=i.size>0?new pi(r,e,i):null;return a&&s?[a,s]:a?[a]:s?[s]:[]}function QB(e,r,n="both"){if(e.allIncoming.size===0&&e.allOutgoing.size===0)return[];const o=[],a=[];for(const i of r)if(e!==i)for(const s of gE(e,i,n))s.source===e?o.push(s):a.push(s);return[...o,...a]}function t8e(e){return[...e].reduce((r,n,o,a)=>(o===a.length-1||r.push(...QB(n,a.slice(o+1),"both")),r),[])}const r8e={__proto__:null,findConnection:gE,findConnectionsBetween:QB,findConnectionsWithin:t8e};class pi{constructor(r,n,o=new Set){this.source=r,this.target=n,this.relations=o,this.id=B6e(`model:${r.id}:${n.id}`)}id;_boundary;get boundary(){return this._boundary??=this.source.commonAncestor(this.target)}get expression(){return`${this.source.id} -> ${this.target.id}`}get isDirect(){return this.nonEmpty()&&!this.isImplicit}get isImplicit(){return this.nonEmpty()&&VB(this.relations,MB(ZB(this)))}get directRelations(){return new Set(Qu(this.relations,ZB(this)))}nonEmpty(){return this.relations.size>0}mergeWith(r){return at(this.source.id===r.source.id,"Cannot merge connections with different sources"),at(this.target.id===r.target.id,"Cannot merge connections with different targets"),new pi(this.source,this.target,dE(this.relations,r.relations))}difference(r){return new pi(this.source,this.target,uE(this.relations,r.relations))}intersect(r){return at(r instanceof pi,"Cannot intersect connection with different type"),new pi(this.source,this.target,_f(this.relations,r.relations))}equals(r){at(r instanceof pi,"Cannot merge connection with different type");const n=r;return this.id===n.id&&this.source.id===n.source.id&&this.target.id===n.target.id&&L6e(this.relations,n.relations)}update(r){return new pi(this.source,this.target,r)}[Y6e](r,n,o){const a=this.toString();return Object.defineProperty(a,"constructor",{value:pi,enumerable:!1}),a}toString(){return[this.expression,this.relations.size?" relations:":" relations: [ ]",...[...this.relations].map(r=>" "+r.expression)].join(`
+`)}reversed(r=!1){if(!r)return new pi(this.target,this.source);const[n]=gE(this.target,this.source,"directed");return n??new pi(this.target,this.source,new Set)}}const JB={asc:(e,r)=>e>r,desc:(e,r)=>ee(i,a)}function yE(e,r,...n){let o=typeof e=="function"?e:e[0],a=typeof e=="function"?"asc":e[1],{[a]:i}=JB,s=r===void 0?void 0:yE(r,...n);return(l,c)=>{let d=o(l),u=o(c);return i(d,u)?1:i(u,d)?-1:s?.(l,c)??0}}function o8e(e){if(eF(e))return!0;if(typeof e!="object"||!Array.isArray(e))return!1;let[r,n,...o]=e;return eF(r)&&typeof n=="string"&&n in JB&&o.length===0}const eF=e=>typeof e=="function"&&e.length===1;function a8e(...e){return Do(i8e,e,s8e)}const i8e=(e,r)=>e.filter(r),s8e=e=>(r,n,o)=>e(r,n,o)?{done:!1,hasNext:!0,next:r}:sE;function tF(...e){return Do(l8e,e,c8e)}const l8e=(e,r)=>e.flatMap(r),c8e=e=>(r,n,o)=>{let a=e(r,n,o);return Array.isArray(a)?{done:!1,hasNext:!0,hasMany:!0,next:a}:{done:!1,hasNext:!0,next:a}};function bE(...e){return Do(d8e,e)}const d8e=(e,r)=>{let n=Object.create(null);for(let o=0;oe.at(-1);function vE(...e){return Do(f8e,e)}function f8e(e,r){let n={};for(let[o,a]of Object.entries(e))n[o]=r(a,o,e);return n}function xE(...e){return r=>Ku(r,...e)}function rF(...e){return n8e(m8e,e)}const m8e=(e,r)=>[...e].sort(r);function nF(e,r,n){return typeof r=="number"||r===void 0?o=>o.split(e,r):e.split(r,n)}function Z1(...e){return Do(Object.values,e)}class j3{constructor(r,n){this.$model=r,this.$element=n,this.id=this.$element.id,this._literalId=this.$element.id;const[o,a]=d6e(this.id);o?(this.imported={from:o,fqn:a},this.hierarchyLevel=r3(a)):(this.imported=null,this.hierarchyLevel=r3(this.id))}Aux;id;_literalId;hierarchyLevel;imported;get name(){return g1(this.id)}get parent(){return this.$model.parent(this)}get kind(){return this.$element.kind}get shape(){return this.style.shape}get color(){return this.style.color}get icon(){return this.style.icon??null}get tags(){return yr(this,Symbol.for("tags"),()=>O3([...this.$element.tags??[],...this.$model.specification.elements[this.$element.kind]?.tags??[]]))}get title(){return this.$element.title}get hasSummary(){return!!this.$element.summary&&!!this.$element.description&&!mE(this.$element.summary,this.$element.description)}get summary(){return or.memoize(this,"summary",xf(this.$element))}get description(){return or.memoize(this,"description",wf(this.$element))}get technology(){return this.$element.technology??null}get links(){return this.$element.links??[]}get defaultView(){return yr(this,Symbol.for("defaultView"),()=>hE(this.scopedViews())??null)}get isRoot(){return this.parent===null}get style(){return yr(this,"style",()=>U1({shape:this.$model.$styles.defaults.shape,color:this.$model.$styles.defaults.color,border:this.$model.$styles.defaults.border,opacity:this.$model.$styles.defaults.opacity,size:this.$model.$styles.defaults.size,padding:this.$model.$styles.defaults.padding,textSize:this.$model.$styles.defaults.text,...this.$element.style}))}isAncestorOf(r){return to(this,r)}isDescendantOf(r){return to(r,this)}ancestors(){return this.$model.ancestors(this)}commonAncestor(r){const n=b1(this.id,r.id);return n?this.$model.element(n):null}children(){return this.$model.children(this)}descendants(r){return r?nO([...this.$model.descendants(this)],r)[Symbol.iterator]():this.$model.descendants(this)}siblings(){return this.$model.siblings(this)}*ascendingSiblings(){yield*this.siblings();for(const r of this.ancestors())yield*r.siblings()}*descendingSiblings(){for(const r of[...this.ancestors()].reverse())yield*r.siblings();yield*this.siblings()}incoming(r="all"){return this.$model.incoming(this,r)}*incomers(r="all"){const n=new Set;for(const o of this.incoming(r))n.has(o.source.id)||(n.add(o.source.id),yield o.source)}outgoing(r="all"){return this.$model.outgoing(this,r)}*outgoers(r="all"){const n=new Set;for(const o of this.outgoing(r))n.has(o.target.id)||(n.add(o.target.id),yield o.target)}get allOutgoing(){return yr(this,Symbol.for("allOutgoing"),()=>new Set(this.outgoing()))}get allIncoming(){return yr(this,Symbol.for("allIncoming"),()=>new Set(this.incoming()))}views(){return yr(this,Symbol.for("views"),()=>{const r=new Set;for(const n of this.$model.views())n.includesElement(this.id)&&r.add(n);return r})}scopedViews(){return yr(this,Symbol.for("scopedViews"),()=>{const r=new Set;for(const n of this.$model.views())n.isScopedElementView()&&n.viewOf.id===this.id&&r.add(n);return r})}isDeployed(){return la(hE(this.deployments()))}deployments(){return this.$model.deployment.instancesOf(this)}hasMetadata(){return!!this.$element.metadata&&!Ef(this.$element.metadata)}getMetadata(r){return r?this.$element.metadata?.[r]:this.$element.metadata??{}}isTagged(r){return this.tags.includes(r)}}const Tr=e=>typeof e=="string"?e:e.id,$a="/",wE=e=>{if(at(!e.includes(`
+`),"View title cannot contain newlines"),e.includes($a)){const r=e.split($a).map(n=>n.trim()).filter(n=>n.length>0);return Kl(r,1)?r:[""]}return[e.trim()]},L3=e=>wE(e).join($a),g8e=e=>{const r=wE(e);return Kl(r,2)?r.slice(0,-1).join($a):null},kE=e=>e.includes($a)?wE(e).pop()??e:e.trim();class y8e{constructor(r){this.$model=r;const n=this.$deployments=r.$data.deployments,o=Z1(n.elements);for(const a of dd(o)){const i=this.addElement(a);for(const s of i.tags)this.#c.get(s).add(i);i.isInstance()&&this.#r.get(i.element.id).add(i)}for(const a of Z1(n.relations)){const i=this.addRelation(a);for(const s of i.tags)this.#c.get(s).add(i)}}#e=new Map;#i=new Map;#t=new Xn(()=>new Set);#r=new Xn(()=>new Set);#s=new Set;#n=new Map;#l=new Xn(()=>new Set);#a=new Xn(()=>new Set);#o=new Xn(()=>new Set);#c=new Xn(()=>new Set);#d=new Map;$deployments;get $styles(){return this.$model.$styles}element(r){if(r instanceof XB||r instanceof KB)return r;const n=Tr(r);return bt(this.#e.get(n),`Element ${n} not found`)}findElement(r){return this.#e.get(r)??null}node(r){const n=this.element(r);return at(n.isDeploymentNode(),`Element ${n.id} is not a deployment node`),n}findNode(r){const n=this.findElement(r);return n?(at(n.isDeploymentNode(),`Element ${n?.id} is not a deployment node`),n):null}instance(r){const n=this.element(r);return at(n.isInstance(),`Element ${n.id} is not a deployed instance`),n}findInstance(r){const n=this.findElement(r);return n?(at(n.isInstance(),`Element ${n?.id} is not a deployed instance`),n):null}roots(){return this.#s.values()}elements(){return this.#e.values()}*nodes(){for(const r of this.#e.values())r.isDeploymentNode()&&(yield r)}*nodesOfKind(r){for(const n of this.#e.values())n.isDeploymentNode()&&n.kind===r&&(yield n)}*instances(){for(const r of this.#e.values())r.isInstance()&&(yield r)}*instancesOf(r){const n=Tr(r),o=this.#r.get(n);o&&(yield*o)}deploymentRef(r){if(Y1.isInsideInstanceRef(r)){const{deployment:n,element:o}=r;return O6e(this.#d,`${n}@${o}`,()=>new J6e(this.instance(n),this.$model.element(o)))}return this.element(r.deployment)}relationships(){return this.#n.values()}relationship(r){return bt(this.#n.get(Tr(r)),`DeploymentRelationModel ${r} not found`)}findRelationship(r){return this.#n.get(r)??null}*views(){for(const r of this.$model.views())r.isDeploymentView()&&(yield r)}parent(r){const n=Tr(r);return this.#i.get(n)||null}children(r){const n=Tr(r);return this.#t.get(n)}*siblings(r){const n=Tr(r),o=this.parent(r)?.children()??this.roots();for(const a of o)a.id!==n&&(yield a)}*ancestors(r){let n=Tr(r),o;for(;o=this.#i.get(n);)yield o,n=o.id}*descendants(r,n="desc"){for(const o of this.children(r))n==="asc"?(yield o,yield*this.descendants(o.id)):(yield*this.descendants(o.id),yield o)}*incoming(r,n="all"){const o=Tr(r);for(const a of this.#l.get(o))switch(!0){case n==="all":case(n==="direct"&&a.target.id===o):case(n==="to-descendants"&&a.target.id!==o):yield a;break}}*outgoing(r,n="all"){const o=Tr(r);for(const a of this.#a.get(o))switch(!0){case n==="all":case(n==="direct"&&a.source.id===o):case(n==="from-descendants"&&a.source.id!==o):yield a;break}}addElement(r){if(this.#e.has(r.id))throw new Error(`Element ${r.id} already exists`);const n=k6e(r)?new XB(this,Object.freeze(r)):new KB(this,Object.freeze(r),this.$model.element(r.element));this.#e.set(n.id,n);const o=t3(n.id);return o?(at(this.#e.has(o),`Parent ${o} of ${n.id} not found`),this.#i.set(n.id,this.node(o)),this.#t.get(o).add(n)):(at(n.isDeploymentNode(),`Root element ${n.id} is not a deployment node`),this.#s.add(n)),n}addRelation(r){if(this.#n.has(r.id))throw new Error(`Relation ${r.id} already exists`);const n=new e8e(this,Object.freeze(r));this.#n.set(n.id,n),this.#l.get(n.target.id).add(n),this.#a.get(n.source.id).add(n);const o=n.boundary?.id??null;if(o)for(const a of[o,...ju(o)])this.#o.get(a).add(n);for(const a of ju(n.source.id)){if(a===o)break;this.#a.get(a).add(n)}for(const a of ju(n.target.id)){if(a===o)break;this.#l.get(a).add(n)}return n}}class oF{constructor(r,n){this.model=r,this.$relationship=n,this.source=r.element(Y1.flatten(n.source)),this.target=r.element(Y1.flatten(n.target));const o=b1(this.source.id,this.target.id);this.boundary=o?this.model.element(o):null}source;target;boundary;get id(){return this.$relationship.id}get expression(){return`${this.source.id} -> ${this.target.id}`}get title(){return la(this.$relationship.title)?this.$relationship.title:null}get technology(){return la(this.$relationship.technology)?this.$relationship.technology:null}get hasSummary(){return!!this.$relationship.summary&&!!this.$relationship.description&&!mE(this.$relationship.summary,this.$relationship.description)}get summary(){return or.memoize(this,"summary",xf(this.$relationship))}get description(){return or.memoize(this,"description",wf(this.$relationship))}get navigateTo(){return this.$relationship.navigateTo?this.model.view(this.$relationship.navigateTo):null}get tags(){return this.$relationship.tags??[]}get kind(){return this.$relationship.kind??null}get links(){return this.$relationship.links??[]}get color(){return this.$relationship.color??this.model.$styles.defaults.relationship.color}get line(){return this.$relationship.line??this.model.$styles.defaults.relationship.line}get head(){return this.$relationship.head??this.model.$styles.defaults.relationship.arrow}get tail(){return this.$relationship.tail}*views(){for(const r of this.model.views())r.includesRelation(this.id)&&(yield r)}isDeploymentRelation(){return!1}isModelRelation(){return!0}hasMetadata(){return!!this.$relationship.metadata&&!Ef(this.$relationship.metadata)}getMetadata(r){return r?this.$relationship.metadata?.[r]:this.$relationship.metadata??{}}isTagged(r){return this.tags.includes(r)}}var aF=Symbol.for("immer-nothing"),iF=Symbol.for("immer-draftable"),Pa=Symbol.for("immer-state");function ns(e,...r){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Q1=Object.getPrototypeOf;function Sf(e){return!!e&&!!e[Pa]}function Ju(e){return e?lF(e)||Array.isArray(e)||!!e[iF]||!!e.constructor?.[iF]||J1(e)||H3(e):!1}var b8e=Object.prototype.constructor.toString(),sF=new WeakMap;function lF(e){if(!e||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;const n=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let o=sF.get(n);return o===void 0&&(o=Function.toString.call(n),sF.set(n,o)),o===b8e}function B3(e,r,n=!0){F3(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{r(a,e[a],e)}):e.forEach((o,a)=>r(a,o,e))}function F3(e){const r=e[Pa];return r?r.type_:Array.isArray(e)?1:J1(e)?2:H3(e)?3:0}function _E(e,r){return F3(e)===2?e.has(r):Object.prototype.hasOwnProperty.call(e,r)}function cF(e,r,n){const o=F3(e);o===2?e.set(r,n):o===3?e.add(n):e[r]=n}function v8e(e,r){return e===r?e!==0||1/e===1/r:e!==e&&r!==r}function J1(e){return e instanceof Map}function H3(e){return e instanceof Set}function ep(e){return e.copy_||e.base_}function EE(e,r){if(J1(e))return new Map(e);if(H3(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=lF(e);if(r===!0||r==="class_only"&&!n){const o=Object.getOwnPropertyDescriptors(e);delete o[Pa];let a=Reflect.ownKeys(o);for(let i=0;i1&&Object.defineProperties(e,{set:V3,add:V3,clear:V3,delete:V3}),Object.freeze(e),r&&Object.values(e).forEach(n=>SE(n,!0))),e}function x8e(){ns(2)}var V3={value:x8e};function q3(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var w8e={};function tp(e){const r=w8e[e];return r||ns(0,e),r}var e0;function dF(){return e0}function k8e(e,r){return{drafts_:[],parent_:e,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function uF(e,r){r&&(tp("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=r)}function CE(e){TE(e),e.drafts_.forEach(_8e),e.drafts_=null}function TE(e){e===e0&&(e0=e.parent_)}function pF(e){return e0=k8e(e0,e)}function _8e(e){const r=e[Pa];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function hF(e,r){r.unfinalizedDrafts_=r.drafts_.length;const n=r.drafts_[0];return e!==void 0&&e!==n?(n[Pa].modified_&&(CE(r),ns(4)),Ju(e)&&(e=U3(r,e),r.parent_||W3(r,e)),r.patches_&&tp("Patches").generateReplacementPatches_(n[Pa].base_,e,r.patches_,r.inversePatches_)):e=U3(r,n,[]),CE(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),e!==aF?e:void 0}function U3(e,r,n){if(q3(r))return r;const o=e.immer_.shouldUseStrictIteration(),a=r[Pa];if(!a)return B3(r,(i,s)=>fF(e,a,r,i,s,n),o),r;if(a.scope_!==e)return r;if(!a.modified_)return W3(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const i=a.copy_;let s=i,l=!1;a.type_===3&&(s=new Set(i),i.clear(),l=!0),B3(s,(c,d)=>fF(e,a,i,c,d,n,l),o),W3(e,i,!1),n&&e.patches_&&tp("Patches").generatePatches_(a,n,e.patches_,e.inversePatches_)}return a.copy_}function fF(e,r,n,o,a,i,s){if(a==null||typeof a!="object"&&!s)return;const l=q3(a);if(!(l&&!s)){if(Sf(a)){const c=i&&r&&r.type_!==3&&!_E(r.assigned_,o)?i.concat(o):void 0,d=U3(e,a,c);if(cF(n,o,d),Sf(d))e.canAutoFreeze_=!1;else return}else s&&n.add(a);if(Ju(a)&&!l){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||r&&r.base_&&r.base_[o]===a&&l)return;U3(e,a),(!r||!r.scope_.parent_)&&typeof o!="symbol"&&(J1(n)?n.has(o):Object.prototype.propertyIsEnumerable.call(n,o))&&W3(e,a)}}}function W3(e,r,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&SE(r,n)}function E8e(e,r){const n=Array.isArray(e),o={type_:n?1:0,scope_:r?r.scope_:dF(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=o,i=AE;n&&(a=[o],i=t0);const{revoke:s,proxy:l}=Proxy.revocable(a,i);return o.draft_=l,o.revoke_=s,l}var AE={get(e,r){if(r===Pa)return e;const n=ep(e);if(!_E(n,r))return S8e(e,n,r);const o=n[r];return e.finalized_||!Ju(o)?o:o===RE(e.base_,r)?(DE(e),e.copy_[r]=$E(o,e)):o},has(e,r){return r in ep(e)},ownKeys(e){return Reflect.ownKeys(ep(e))},set(e,r,n){const o=mF(ep(e),r);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const a=RE(ep(e),r),i=a?.[Pa];if(i&&i.base_===n)return e.copy_[r]=n,e.assigned_[r]=!1,!0;if(v8e(n,a)&&(n!==void 0||_E(e.base_,r)))return!0;DE(e),NE(e)}return e.copy_[r]===n&&(n!==void 0||r in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[r])||(e.copy_[r]=n,e.assigned_[r]=!0),!0},deleteProperty(e,r){return RE(e.base_,r)!==void 0||r in e.base_?(e.assigned_[r]=!1,DE(e),NE(e)):delete e.assigned_[r],e.copy_&&delete e.copy_[r],!0},getOwnPropertyDescriptor(e,r){const n=ep(e),o=Reflect.getOwnPropertyDescriptor(n,r);return o&&{writable:!0,configurable:e.type_!==1||r!=="length",enumerable:o.enumerable,value:n[r]}},defineProperty(){ns(11)},getPrototypeOf(e){return Q1(e.base_)},setPrototypeOf(){ns(12)}},t0={};B3(AE,(e,r)=>{t0[e]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}}),t0.deleteProperty=function(e,r){return t0.set.call(this,e,r,void 0)},t0.set=function(e,r,n){return AE.set.call(this,e[0],r,n,e[0])};function RE(e,r){const n=e[Pa];return(n?ep(n):e)[r]}function S8e(e,r,n){const o=mF(r,n);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function mF(e,r){if(!(r in e))return;let n=Q1(e);for(;n;){const o=Object.getOwnPropertyDescriptor(n,r);if(o)return o;n=Q1(n)}}function NE(e){e.modified_||(e.modified_=!0,e.parent_&&NE(e.parent_))}function DE(e){e.copy_||(e.copy_=EE(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var C8e=class{constructor(r){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(n,o,a)=>{if(typeof n=="function"&&typeof o!="function"){const s=o;o=n;const l=this;return function(d=s,...u){return l.produce(d,h=>o.call(this,h,...u))}}typeof o!="function"&&ns(6),a!==void 0&&typeof a!="function"&&ns(7);let i;if(Ju(n)){const s=pF(this),l=$E(n,void 0);let c=!0;try{i=o(l),c=!1}finally{c?CE(s):TE(s)}return uF(s,a),hF(i,s)}else if(!n||typeof n!="object"){if(i=o(n),i===void 0&&(i=n),i===aF&&(i=void 0),this.autoFreeze_&&SE(i,!0),a){const s=[],l=[];tp("Patches").generateReplacementPatches_(n,i,s,l),a(s,l)}return i}else ns(1,n)},this.produceWithPatches=(n,o)=>{if(typeof n=="function")return(l,...c)=>this.produceWithPatches(l,d=>n(d,...c));let a,i;return[this.produce(n,o,(l,c)=>{a=l,i=c}),a,i]},typeof r?.autoFreeze=="boolean"&&this.setAutoFreeze(r.autoFreeze),typeof r?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(r.useStrictShallowCopy),typeof r?.useStrictIteration=="boolean"&&this.setUseStrictIteration(r.useStrictIteration)}createDraft(r){Ju(r)||ns(8),Sf(r)&&(r=T8e(r));const n=pF(this),o=$E(r,void 0);return o[Pa].isManual_=!0,TE(n),o}finishDraft(r,n){const o=r&&r[Pa];(!o||!o.isManual_)&&ns(9);const{scope_:a}=o;return uF(a,n),hF(void 0,a)}setAutoFreeze(r){this.autoFreeze_=r}setUseStrictShallowCopy(r){this.useStrictShallowCopy_=r}setUseStrictIteration(r){this.useStrictIteration_=r}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(r,n){let o;for(o=n.length-1;o>=0;o--){const i=n[o];if(i.path.length===0&&i.op==="replace"){r=i.value;break}}o>-1&&(n=n.slice(o+1));const a=tp("Patches").applyPatches_;return Sf(r)?a(r,n):this.produce(r,i=>a(i,n))}};function $E(e,r){const n=J1(e)?tp("MapSet").proxyMap_(e,r):H3(e)?tp("MapSet").proxySet_(e,r):E8e(e,r);return(r?r.scope_:dF()).drafts_.push(n),n}function T8e(e){return Sf(e)||ns(10,e),gF(e)}function gF(e){if(!Ju(e)||q3(e))return e;const r=e[Pa];let n,o=!0;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,n=EE(e,r.scope_.immer_.useStrictShallowCopy_),o=r.scope_.immer_.shouldUseStrictIteration()}else n=EE(e,!0);return B3(n,(a,i)=>{cF(n,a,gF(i))},o),r&&(r.finalized_=!1),n}var A8e=new C8e,yF=A8e.produce;function R8e(e){return Ku(e,a8e(r=>!!r.notation),bE(Zu("notation")),vE(xE(bE(Zu("shape")),vE(xE(bE(Zu("color")),vE(xE(M3(Zu("kind")),O3())),G1(),M3(([r,n])=>({kinds:n,color:r})))),G1(),tF(([r,n])=>n.map(({color:o,kinds:a})=>({shape:r,color:o,kinds:a}))))),G1(),tF(([r,n])=>n.map(({shape:o,color:a,kinds:i})=>({title:r,shape:o,color:a,kinds:i}))),rF(Zu("shape"),Zu("title"),[r=>r.kinds.length,"desc"]))}const sl=(e,r)=>e===r||rs(e)&&rs(r)?!1:!Vv(e,r),bF=5;function N8e(e,r){e.color=r.color,e.kind=r.kind,e.navigateTo=r.navigateTo??null,e.links=r.links?[...r.links]:null,e.tags=[...r.tags],rs(r.style.border)?delete e.style.border:e.style.border=r.style.border,u8e(r.style.opacity)?e.style.opacity=r.style.opacity:delete e.style.opacity,rs(r.style.multiple)?delete e.style.multiple:e.style.multiple=r.style.multiple}function D8e(e,r,n){if(sl(r.icon??"none",e.icon??"none")){const o=la(e.icon)&&e.icon!=="none";switch(!0){case(o&&la(r.icon)&&r.icon!=="none"):return e.icon=r.icon,!0;case(o&&(rs(r.icon)||r.icon==="none")):return e.icon="none",!0;case(!o&&la(r.icon)&&r.icon!=="none"):return n?(e.icon=r.icon,!0):!1}}return!0}function $8e(e,r,n){let o=!0;return sl(e.title,r.title)&&(n?e.title=r.title:o=!1),sl(e.description,r.description)&&(rs(r.description)?delete e.description:n?e.description=r.description:o=!1),sl(e.technology,r.technology)&&(rs(r.technology)?delete e.technology:n?e.technology=r.technology:o=!1),o}function P8e(e,r,n){return e.title=r.title,rs(r.description)?delete e.description:e.description=r.description,rs(r.technology)?delete e.technology:e.technology=r.technology,!0}function vF(e,r){at(e.id===r.id,"applyManualLayout: view ids do not match"),at(e._stage==="layouted","applyManualLayout: expected layouted view"),at(r._stage==="layouted","applyManualLayout: expected layouted snapshot"),at(e._layout!=="manual","applyManualLayout: expected auto-layouted view");const n=new Set;e._type!==r._type&&n.add("type-changed");const o=new Map(e.nodes.map(b=>[b.id,b])),a=new Map(e.edges.map(b=>[b.id,b])),i=new Set(o.keys()),s=new Set(a.keys()),l=new Set(r.nodes.map(b=>b.id)),c=new Set(r.edges.map(b=>b.id));pE(i,l).size>0&&n.add("nodes-mismatch"),pE(s,c).size>0&&n.add("edges-mismatch");const d=r.nodes.map(b=>{const x=o.get(b.id);return yF(b,w=>{if(!x){w.drifts=["missing"];return}N8e(w,x);const k=new Set,C=b.children.length>0,_=x.children.length>0;(sl(w.modelRef,x.modelRef)||sl(w.deploymentRef,x.deploymentRef))&&k.add("modelRef-changed"),_&&!C&&k.add("became-compound"),!_&&C&&k.add("became-leaf"),sl(w.parent,x.parent)&&k.add("parent-changed");const T=w.width+bF>=x.width&&w.height+bF>=x.height;sl(w.shape,x.shape)&&(T?w.shape=x.shape:k.add("shape-changed")),D8e(w,x,T&&_===C)||k.add("label-changed"),(C?P8e:$8e)(w,x,T)||k.add("label-changed"),sl(b.notation,x.notation)&&(w.notation=x.notation??null),C&&_&&pE(new Set(b.children),new Set(x.children)).size>0&&k.add("children-changed");const R=[...k];Kl(R,1)&&(n.add("nodes-mismatch"),w.drifts=R)})}),u=r.edges.map(b=>{const x=a.get(b.id);return yF(b,w=>{if(!x){w.drifts=["missing"];return}const k=new Set;w.source===x.target&&w.target===x.source?k.add("direction-changed"):(w.source!==x.source&&k.add("source-changed"),w.target!==x.target&&k.add("target-changed")),k.size===0&&sl(w.dir??"forward",x.dir??"forward")&&k.add("direction-changed"),w.color=x.color,w.line=x.line,w.navigateTo=x.navigateTo??null,w.tags=x.tags?[...x.tags]:null,rs(x.notes)?delete w.notes:w.notes=x.notes,x.astPath&&(w.astPath=x.astPath),x.labelBBox?((!w.labelBBox||!la(w.label)&&la(x.label))&&k.add("label-changed"),w.labelBBox={x:w.labelBBox?.x??x.labelBBox.x,y:w.labelBBox?.y??x.labelBBox.y,width:x.labelBBox.width,height:x.labelBBox.height},w.label=x.label,w.description=x.description??null,w.technology=x.technology??null):b.labelBBox&&k.add("label-changed");const C=[...k];Kl(C,1)&&(n.add("edges-mismatch"),w.drifts=C)})}),h=R8e(d),f={...r};Object.assign(f,{title:e.title??r.title,description:e.description??r.description,tags:e.tags?[...e.tags]:null,links:e.links?[...e.links]:null,[IB]:"manual",...h&&h.length>0?{notation:{nodes:h}}:{},nodes:d,edges:u}),N6e(e)&&f._type==="dynamic"&&Object.assign(f,{variant:e.variant});const g=[...n];return Kl(g,1)?f.drifts=g:"drifts"in f&&delete f.drifts,f}function M8e(e,r){const{drifts:n}=vF(e,r);if(n)Object.assign(e,{[IB]:"auto",drifts:n});else{const o=e;"drifts"in e&&delete o.drifts}return e}class z8e{constructor(r,n,o,a){this.source=o,this.target=a,this.$viewModel=r,this.$view=r.$view,this.$edge=n}Aux;$viewModel;$view;$edge;get id(){return this.$edge.id}get parent(){return this.$edge.parent?this.$viewModel.node(this.$edge.parent):null}get label(){return this.$edge.label??null}get description(){return or.memoize(this,"description",this.$edge.description)}get technology(){return this.$edge.technology??null}hasParent(){return this.$edge.parent!==null}get tags(){return this.$edge.tags??[]}get stepNumber(){return this.isStep()?SB(this.id):null}get navigateTo(){return this.$edge.navigateTo?this.$viewModel.$model.view(this.$edge.navigateTo):null}get color(){return this.$edge.color}get line(){return this.$edge.line??this.$viewModel.$styles.defaults.relationship.line}get head(){return this.$edge.head??this.$viewModel.$styles.defaults.relationship.arrow}get tail(){return this.$edge.tail}isStep(){return q1(this.id)}*relationships(r){for(const n of this.$edge.relations)if(r){const o=this.$viewModel.$model.findRelationship(n,r);o&&(yield o)}else yield this.$viewModel.$model.relationship(n)}includesRelation(r){const n=typeof r=="string"?r:r.id;return this.$edge.relations.includes(n)}isTagged(r){return this.tags.includes(r)}}class I8e{Aux;$viewModel;$view;$node;constructor(r,n){this.$viewModel=r,this.$view=r.$view,this.$node=n}get id(){return this.$node.id}get title(){return this.$node.title}get kind(){return this.$node.kind}get description(){return or.memoize(this,"description",this.$node.description)}get technology(){return this.$node.technology??null}get parent(){return this.$node.parent?this.$viewModel.node(this.$node.parent):null}get element(){const r=this.$node.modelRef;return r?this.$viewModel.$model.element(r):null}get deployment(){const r=this.$node.deploymentRef;return r?this.$viewModel.$model.deployment.element(r):null}get shape(){return this.$node.shape}get color(){return this.$node.color}get icon(){return this.$node.icon??null}get tags(){return this.$node.tags}get links(){return this.$node.links??[]}get navigateTo(){return this.$node.navigateTo?this.$viewModel.$model.view(this.$node.navigateTo):null}get style(){return this.$node.style}get x(){return"x"in this.$node?this.$node.x:void 0}get y(){return"y"in this.$node?this.$node.y:void 0}get width(){return"width"in this.$node?this.$node.width:void 0}get height(){return"height"in this.$node?this.$node.height:void 0}children(){return yr(this,"children",()=>new Set(this.$node.children.map(r=>this.$viewModel.node(r))))}*ancestors(){let r=this.parent;for(;r;)yield r,r=r.parent}*siblings(){const r=this.parent?.children()??this.$viewModel.roots();for(const n of r)n.id!==this.id&&(yield n)}*incoming(r="all"){for(const n of this.$node.inEdges){const o=this.$viewModel.edge(n);switch(!0){case r==="all":case(r==="direct"&&o.target.id===this.id):case(r==="to-descendants"&&o.target.id!==this.id):yield o;break}}}*incomers(r="all"){const n=new Set;for(const o of this.incoming(r))n.has(o.source.id)||(n.add(o.source.id),yield o.source)}*outgoing(r="all"){for(const n of this.$node.outEdges){const o=this.$viewModel.edge(n);switch(!0){case r==="all":case(r==="direct"&&o.source.id===this.id):case(r==="from-descendants"&&o.source.id!==this.id):yield o;break}}}*outgoers(r="all"){const n=new Set;for(const o of this.outgoing(r))n.has(o.target.id)||(n.add(o.target.id),yield o.target)}isLayouted(){return"width"in this.$node&&"height"in this.$node}hasChildren(){return this.$node.children.length>0}hasParent(){return this.$node.parent!==null}hasElement(){return la(this.$node.modelRef)}hasDeployment(){return la(this.$node.deploymentRef)}hasDeployedInstance(){return this.hasElement()&&this.hasDeployment()}isGroup(){return l6e(this.$node)}isTagged(r){return this.tags.includes(r)}}class PE{Aux;#e;#i=new Set;#t=new Map;#r=new Map;#s=new Set;#n=new Set;#l=new Set;#a=new Xn(r=>new Set);#o;id;$model;title;folder;viewPath;constructor(r,n,o,a){this.$model=r,this.#e=o,this.id=o.id,this.folder=n,this.#o=a;for(const i of this.#e.nodes){const s=new I8e(this,Object.freeze(i));this.#t.set(i.id,s),i.parent||this.#i.add(s),i.deploymentRef&&this.#n.add(i.deploymentRef),i.modelRef&&this.#s.add(i.modelRef);for(const l of s.tags)this.#a.get(l).add(s)}for(const i of this.#e.edges){const s=new z8e(this,Object.freeze(i),this.node(i.source),this.node(i.target));for(const l of s.tags)this.#a.get(l).add(s);for(const l of i.relations)this.#l.add(l);this.#r.set(i.id,s)}this.title=o.title?kE(o.title):null,this.viewPath=o.title?L3(o.title):o.id}get $styles(){return this.$model.$styles}get _type(){return this.#e[W1]}get stage(){return this.#e[Gu]}get bounds(){if("bounds"in this.#e)return this.#e.bounds;if(this.#o)return this.#o.bounds;throw new Error("View is not layouted")}get titleOrId(){return this.title??this.viewOf?.title??this.id}get titleOrUntitled(){return this.title??"Untitled"}get breadcrumbs(){return yr(this,"breadcrumbs",()=>this.folder.isRoot?[this]:[...this.folder.breadcrumbs,this])}get description(){return or.memoize(this,"description",this.#e.description)}get tags(){return this.#e.tags??[]}get links(){return this.#e.links??[]}get viewOf(){if(this.isElementView()){const r=this.#e.viewOf;return r?this.$model.element(r):null}return null}get mode(){return this.isDynamicView()?this.#e.variant??"diagram":null}get includedTags(){return[...this.#a.keys()]}get $view(){if(!this.isLayouted()||"drifts"in this.#e)return this.#e;const r=this.#o;return r?yr(this,"withDriftReasons",()=>M8e(this.#e,r)):this.#e}get $layouted(){if(!this.isLayouted())throw new Error("View is not layouted");return this.manualLayouted??this.#e}get hasManualLayout(){return this.#o!==void 0}get manualLayouted(){if(!this.isLayouted())return null;const r=this.#o;return r?yr(this,"snapshotWithManualLayout",()=>vF(this.#e,r)):null}get driftReasons(){return this.isLayouted()?this.$view.drifts??[]:[]}roots(){return this.#i.values()}*compounds(){for(const r of this.#t.values())r.hasChildren()&&(yield r)}node(r){const n=Tr(r);return bt(this.#t.get(n),`Node ${n} not found in view ${this.#e.id}`)}findNode(r){return this.#t.get(Tr(r))??null}findNodeWithElement(r){const n=Tr(r);return this.#s.has(n)?X1(this.#t.values(),o=>o.hasElement()&&o.element.id===n)??null:null}nodes(){return this.#t.values()}edge(r){const n=Tr(r);return bt(this.#r.get(n),`Edge ${n} not found in view ${this.#e.id}`)}findEdge(r){return this.#r.get(Tr(r))??null}edges(){return this.#r.values()}*edgesWithRelation(r){for(const n of this.#r.values())n.includesRelation(r)&&(yield n)}*elements(){for(const r of this.#t.values())r.hasElement()&&(yield r)}isTagged(r){return this.tags.includes(r)}includesElement(r){return this.#s.has(Tr(r))}includesDeployment(r){return this.#n.has(Tr(r))}includesRelation(r){return this.#l.has(Tr(r))}isComputed(){return this.#e[Gu]==="computed"}isLayouted(){return this.#e[Gu]==="layouted"}isDiagram(){return this.#e[Gu]==="layouted"}isElementView(){return this.#e[W1]==="element"}isScopedElementView(){return this.#e[W1]==="element"&&la(this.#e.viewOf)}isDeploymentView(){return this.#e[W1]==="deployment"}isDynamicView(){return this.#e[W1]==="dynamic"}}class Y3{$model;path;title;isRoot;parentPath;defaultViewId;constructor(r,n,o){this.$model=r,this.path=n.join("/"),this.isRoot=this.path==="",this.title=p8e(n),this.isRoot?this.parentPath=void 0:this.parentPath=n.slice(0,-1).join("/"),this.defaultViewId=o}get defaultView(){return this.defaultViewId?this.$model.view(this.defaultViewId):null}get breadcrumbs(){return at(!this.isRoot,"Root view folder has no breadcrumbs"),yr(this,"breadcrumbs",()=>{const r=this.parent;return r?r.isRoot?[r,this]:[...r.breadcrumbs,this]:[this]})}get parent(){return at(!this.isRoot,"Root view folder has no parent"),Ef(this.parentPath)?null:this.$model.viewFolder(this.parentPath)}get children(){return this.$model.viewFolderItems(this.path)}get folders(){return yr(this,"folders",()=>{const r=[];for(const n of this.children)n instanceof Y3&&r.push(n);return r})}get views(){return yr(this,"views",()=>{const r=[];for(const n of this.children)n instanceof PE&&r.push(n);return r})}}class rp{Aux;_elements=new Map;_parents=new Map;_children=new Xn(()=>new Set);_rootElements=new Set;_relations=new Map;_incoming=new Xn(()=>new Set);_outgoing=new Xn(()=>new Set);_internal=new Xn(()=>new Set);_views=new Map;_rootViewFolder;_viewFolders=new Map;_viewFolderItems=new Xn(()=>new Set);_allTags=new Xn(()=>new Set);static fromParsed(r){return new rp(r)}static create(r){return new rp(r)}static fromDump(r){const{_stage:n="layouted",projectId:o="unknown",project:a,globals:i,imports:s,deployments:l,views:c,relations:d,elements:u,specification:h}=r;return new rp({[Gu]:n,projectId:o,project:a,globals:{predicates:i?.predicates??{},dynamicPredicates:i?.dynamicPredicates??{},styles:i?.styles??{}},imports:s??{},deployments:{elements:l?.elements??{},relations:l?.relations??{}},views:c??{},relations:d??{},elements:u??{},specification:h})}deployment;$data;constructor(r){this.$data=r;for(const[,n]of G1(r.elements)){const o=this.addElement(n);for(const a of o.tags)this._allTags.get(a).add(o)}for(const[n,o]of G1(r.imports??{}))for(const a of dd(o)){const i=this.addImportedElement(n,a);for(const s of i.tags)this._allTags.get(s).add(i)}for(const n of Z1(r.relations)){const o=this.addRelation(n);for(const a of o.tags)this._allTags.get(a).add(o)}if(this.deployment=new y8e(this),zB(r,"computed")||zB(r,"layouted")){const n=eO($a);Z1(r.views);const o=Ku(Z1(r.views),M3(i=>({view:i,path:L3(i.title??i.id),folderPath:i.title&&g8e(i.title)||""})),lE((i,s)=>n(i.folderPath,s.folderPath))),a=i=>{let s=this._viewFolders.get(i);if(!s){const l=nF(i,$a);at(Kl(l,1),`View group path "${i}" must have at least one element`);let c;i===""?c=o.find(d=>d.view.id==="index"):c=o.find(d=>d.path===i),s=new Y3(this,l,c?.view.id),this._viewFolders.set(i,s)}return s};this._rootViewFolder=a("");for(const{folderPath:i}of o)this._viewFolders.has(i)||nF(i,$a).reduce((s,l)=>{const c=s.join($a),d=Ef(c)?l:c+$a+l,u=a(d);return this._viewFolderItems.get(c).add(u),s.push(l),s},[]);for(const{view:i,folderPath:s}of o){const l=new PE(this,a(s),i,r.manualLayouts?.[i.id]);this._viewFolderItems.get(s).add(l),this._views.set(i.id,l);for(const c of l.tags)this._allTags.get(c).add(l)}}else this._rootViewFolder=new Y3(this,[""],void 0),this._viewFolders.set(this._rootViewFolder.path,this._rootViewFolder)}get asParsed(){return this}get asComputed(){return this}get asLayouted(){return this}get $styles(){return yr(this,"styles",()=>ZI.from(this.$data.project.styles,this.$data.specification.customColors?{theme:{colors:this.$data.specification.customColors}}:void 0))}isParsed(){return this.stage==="parsed"}isLayouted(){return this.stage==="layouted"}isComputed(){return this.stage==="computed"}get $model(){return this.$data}get stage(){return this.$data[Gu]}get projectId(){return this.$data.projectId??"default"}get project(){return this.$data.project??yr(this,Symbol.for("project"),()=>({id:this.projectId}))}get specification(){return this.$data.specification}get globals(){return yr(this,Symbol.for("globals"),()=>({predicates:{...this.$data.globals?.predicates},dynamicPredicates:{...this.$data.globals?.dynamicPredicates},styles:{...this.$data.globals?.styles}}))}element(r){if(r instanceof j3)return r;const n=Tr(r);return bt(this._elements.get(n),`Element ${n} not found`)}findElement(r){return this._elements.get(Tr(r))??null}roots(){return this._rootElements.values()}elements(){return this._elements.values()}relationships(){return this._relations.values()}relationship(r,n){if(n==="deployment")return this.deployment.relationship(r);const o=Tr(r);let a=this._relations.get(o)??null;return a||n==="model"?bt(a,`Model relation ${o} not found`):bt(this.deployment.findRelationship(o),`No model/deployment relation ${o} not found`)}findRelationship(r,n){if(n==="deployment")return this.deployment.findRelationship(r);let o=this._relations.get(Tr(r))??null;return o||n==="model"?o:this.deployment.findRelationship(r)}views(){return this._views.values()}view(r){const n=Tr(r);return bt(this._views.get(n),`View ${n} not found`)}findView(r){return this._views.get(r)??null}viewFolder(r){return bt(this._viewFolders.get(r),`View folder ${r} not found`)}get rootViewFolder(){return this._rootViewFolder}get hasViewFolders(){return this._viewFolders.size>1}viewFolderItems(r){return at(this._viewFolders.has(r),`View folder ${r} not found`),this._viewFolderItems.get(r)}parent(r){const n=Tr(r);return this._parents.get(n)||null}children(r){const n=Tr(r);return this._children.get(n)}*siblings(r){const n=Tr(r),o=this._parents.get(n),a=o?this._children.get(o.id).values():this.roots();for(const i of a)i.id!==n&&(yield i)}*ancestors(r){let n=Tr(r),o;for(;o=this._parents.get(n);)yield o,n=o.id}*descendants(r){for(const n of this.children(r))yield n,yield*this.descendants(n.id)}*incoming(r,n="all"){const o=Tr(r);for(const a of this._incoming.get(o))switch(!0){case n==="all":case(n==="direct"&&a.target.id===o):case(n==="to-descendants"&&a.target.id!==o):yield a;break}}*outgoing(r,n="all"){const o=Tr(r);for(const a of this._outgoing.get(o))switch(!0){case n==="all":case(n==="direct"&&a.source.id===o):case(n==="from-descendants"&&a.source.id!==o):yield a;break}}get tags(){return yr(this,"tags",()=>lE([...this._allTags.keys()],e3))}get tagsSortedByUsage(){return yr(this,"tagsSortedByUsage",()=>Ku([...this._allTags.entries()],M3(([r,n])=>({tag:r,count:n.size,tagged:n})),lE((r,n)=>e3(r.tag,n.tag)),rF([Zu("count"),"desc"])))}findByTag(r,n){return Qu(this._allTags.get(r),o=>n==="elements"?o instanceof j3:n==="views"?o instanceof PE:n==="relationships"?o instanceof oF:!0)}*elementsOfKind(r){for(const n of this._elements.values())n.kind===r&&(yield n)}*elementsWhere(r){const n=Xu(r);for(const o of this._elements.values())n(o)&&(yield o)}*relationshipsWhere(r){const n=Xu(r);for(const o of this._relations.values())n(o)&&(yield o)}addElement(r){if(this._elements.has(r.id))throw new Error(`Element ${r.id} already exists`);const n=new j3(this,Object.freeze(r));this._elements.set(n.id,n);const o=t3(n.id);return o?(at(this._elements.has(o),`Parent ${o} of ${n.id} not found`),this._parents.set(n.id,this.element(o)),this._children.get(o).add(n)):this._rootElements.add(n),n}addImportedElement(r,n){at(!c6e(n.id),"Imported element already has global FQN");const o=EB(r,n.id);if(this._elements.has(o))throw new Error(`Element ${o} already exists`);const a=new j3(this,Object.freeze({...n,id:o}));this._elements.set(a.id,a);let i=t3(a.id);for(;i;){if(i.includes(".")&&this._elements.has(i))return this._parents.set(a.id,this.element(i)),this._children.get(i).add(a),a;i=t3(i)}return this._rootElements.add(a),a}addRelation(r){if(this._relations.has(r.id))throw new Error(`Relation ${r.id} already exists`);const n=new oF(this,Object.freeze(r)),{source:o,target:a}=n;this._relations.set(n.id,n),this._incoming.get(a.id).add(n),this._outgoing.get(o.id).add(n);const i=b1(o.id,a.id);if(i)for(const s of[i,...ju(i)])this._internal.get(s).add(n);for(const s of ju(o.id)){if(s===i)break;this._outgoing.get(s).add(n)}for(const s of ju(a.id)){if(s===i)break;this._incoming.get(s).add(n)}return n}}(e=>{e.EMPTY=e.create({_stage:"computed",projectId:"default",project:{id:"default"},specification:{elements:{},relationships:{},deployments:{},tags:{}},globals:{predicates:{},dynamicPredicates:{},styles:{}},deployments:{elements:{},relations:{}},elements:{},relations:{},views:{},imports:{}})})(rp||(rp={}));function G3(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)}var O8e=e=>typeof e=="object"&&e!==null;function np(e){return Object.fromEntries(Object.entries(e??{}).filter(([r,n])=>n!==void 0))}var j8e=e=>e==="base";function L8e(e){return e.slice().filter(r=>!j8e(r))}function xF(e){return String.fromCharCode(e+(e>25?39:97))}function B8e(e){let r="",n;for(n=Math.abs(e);n>52;n=n/52|0)r=xF(n%52)+r;return xF(n%52)+r}function F8e(e,r){let n=r.length;for(;n;)e=e*33^r.charCodeAt(--n);return e}function H8e(e){return B8e(F8e(5381,e)>>>0)}var wF=/\s*!(important)?/i;function V8e(e){return typeof e=="string"?wF.test(e):!1}function q8e(e){return typeof e=="string"?e.replace(wF,"").trim():e}function ME(e){return typeof e=="string"?e.replaceAll(" ","_"):e}var go=e=>{const r=new Map;return(...n)=>{const o=JSON.stringify(n);if(r.has(o))return r.get(o);const a=e(...n);return r.set(o,a),a}},U8e=new Set(["__proto__","constructor","prototype"]);function zE(...e){return e.reduce((r,n)=>(n&&Object.keys(n).forEach(o=>{if(U8e.has(o))return;const a=r[o],i=n[o];G3(a)&&G3(i)?r[o]=zE(a,i):r[o]=i}),r),{})}var W8e=e=>e!=null;function IE(e,r,n={}){const{stop:o,getKey:a}=n;function i(s,l=[]){if(O8e(s)){const c={};for(const[d,u]of Object.entries(s)){const h=a?.(d,u)??d,f=[...l,h];if(o?.(s,f))return r(s,l);const g=i(u,f);W8e(g)&&(c[h]=g)}return c}return r(s,l)}return i(e)}function Y8e(e,r){return Array.isArray(e)?e.map(n=>r(n)):G3(e)?IE(e,n=>r(n)):r(e)}function G8e(e,r){return e.reduce((n,o,a)=>{const i=r[a];return o!=null&&(n[i]=o),n},{})}function kF(e,r,n=!0){const{utility:o,conditions:a}=r,{hasShorthand:i,resolveShorthand:s}=o;return IE(e,l=>Array.isArray(l)?G8e(l,a.breakpoints.keys):l,{stop:l=>Array.isArray(l),getKey:n?l=>i?s(l):l:void 0})}var X8e={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},K8e=e=>typeof e=="string"?e.replaceAll(/[\n\s]+/g," "):e;function _F(e){const{utility:r,hash:n,conditions:o=X8e}=e,a=s=>[r.prefix,s].filter(Boolean).join("-"),i=(s,l)=>{let c;if(n){const d=[...o.finalize(s),l];c=a(r.toHash(d,H8e))}else c=[...o.finalize(s),a(l)].join(":");return c};return go(({base:s,...l}={})=>{const c=Object.assign(l,s),d=kF(c,e),u=new Set;return IE(d,(h,f)=>{if(h==null)return;const g=V8e(h),[b,...x]=o.shift(f),w=L8e(x),k=r.transform(b,q8e(K8e(h)));let C=i(w,k.className);g&&(C=`${C}!`),u.add(C)}),Array.from(u).join(" ")})}function Z8e(...e){return e.flat().filter(r=>G3(r)&&Object.keys(np(r)).length>0)}function Q8e(e){function r(a){const i=Z8e(...a);return i.length===1?i:i.map(s=>kF(s,e))}function n(...a){return zE(...r(a))}function o(...a){return Object.assign({},...r(a))}return{mergeCss:go(n),assignCss:o}}var J8e=/([A-Z])/g,eEe=/^ms-/,tEe=go(e=>e.startsWith("--")?e:e.replace(J8e,"-$1").replace(eEe,"-ms-").toLowerCase()),rEe=["min","max","clamp","calc"],nEe=new RegExp(`^(${rEe.join("|")})\\(.*\\)`),oEe=e=>typeof e=="string"&&nEe.test(e),aEe="cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%",iEe=`(?:${aEe.split(",").join("|")})`,sEe=new RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${iEe}$`),lEe=e=>typeof e=="string"&&sEe.test(e),cEe=e=>typeof e=="string"&&/^var\(--.+\)$/.test(e),r0={map:Y8e,isCssFunction:oEe,isCssVar:cEe,isCssUnit:lEe},n0=(e,r)=>{if(!e?.defaultValues)return r;const n=typeof e.defaultValues=="function"?e.defaultValues(r):e.defaultValues;return Object.assign({},n,np(r))},dEe=(e={})=>{const r=o=>({className:[e.className,o].filter(Boolean).join("__"),base:e.base?.[o]??{},variants:{},defaultVariants:e.defaultVariants??{},compoundVariants:e.compoundVariants?OE(e.compoundVariants,o):[]}),n=(e.slots??[]).map(o=>[o,r(o)]);for(const[o,a]of Object.entries(e.variants??{}))for(const[i,s]of Object.entries(a))n.forEach(([l,c])=>{c.variants[o]??={},c.variants[o][i]=s[l]??{}});return Object.fromEntries(n)},OE=(e,r)=>e.filter(n=>n.css[r]).map(n=>({...n,css:n.css[r]}));function oo(e,...r){const n=Object.getOwnPropertyDescriptors(e),o=Object.keys(n),a=s=>{const l={};for(let c=0;ca(Array.isArray(s)?s:o.filter(s));return r.map(i).concat(a(o))}var jE=(...e)=>{const r=e.reduce((n,o)=>(o&&o.forEach(a=>n.add(a)),n),new Set([]));return Array.from(r)},EF=["htmlSize","htmlTranslate","htmlWidth","htmlHeight"];function uEe(e){return EF.includes(e)?e.replace("html","").toLowerCase():e}function LE(e){return Object.fromEntries(Object.entries(e).map(([r,n])=>[uEe(r),n]))}LE.keys=EF;const pEe="_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelectable,_whenSelected,_whenDimmed,_whenFocused,_p3,_srgb,_rec2020,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,base",SF=new Set(pEe.split(",")),hEe=/^@|&|&$/;function CF(e){return SF.has(e)||hEe.test(e)}const fEe=/^_/,mEe=/&|@/;function TF(e){return e.map(r=>SF.has(r)?r.replace(fEe,""):mEe.test(r)?`[${ME(r.trim())}]`:r)}function AF(e){return e.sort((r,n)=>{const o=CF(r),a=CF(n);return o&&!a?1:!o&&a?-1:0})}const gEe="aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,focusRing:focus-ring,focusVisibleRing:focus-v-ring,focusRingColor:focus-ring-c,focusRingOffset:focus-ring-o,focusRingWidth:focus-ring-w,focusRingStyle:focus-ring-s,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,boxSize:size,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,backgroundLinear:bg-linear/bgLinear,backgroundRadial:bg-radial/bgRadial,backgroundConic:bg-conic/bgConic,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderBlockStartWidth:bd-bs-w,borderBlockEndWidth:bd-be-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:transition,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,cursor:cursor,textStyle:textStyle,layerStyle:layerStyle,animationStyle:animationStyle",RF=new Map,NF=new Map;gEe.split(",").forEach(e=>{const[r,n]=e.split(":"),[o,...a]=n.split("/");RF.set(r,o),a.length&&a.forEach(i=>{NF.set(i==="1"?o:i,r)})});const DF=e=>NF.get(e)||e,$F={conditions:{shift:AF,finalize:TF,breakpoints:{keys:["base","xs","sm","md","lg","xl"]}},utility:{transform:(e,r)=>{const n=DF(e);return{className:`${RF.get(n)||tEe(n)}_${ME(r)}`}},hasShorthand:!0,toHash:(e,r)=>r(e.join(":")),resolveShorthand:DF}},yEe=_F($F),be=(...e)=>yEe(op(...e));be.raw=(...e)=>op(...e);const{mergeCss:op}=Q8e($F);function et(){let e="",r=0,n;for(;r({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function o0(e){const{base:r,variants:n,defaultVariants:o,compoundVariants:a}=PF(e),i=f=>({...o,...np(f)});function s(f={}){const g=i(f);let b={...r};for(const[w,k]of Object.entries(g))n[w]?.[k]&&(b=op(b,n[w][k]));const x=BE(a,g);return op(b,x)}function l(f){const g=PF(f.config),b=jE(f.variantKeys,Object.keys(n));return o0({base:op(r,g.base),variants:Object.fromEntries(b.map(x=>[x,op(n[x],g.variants[x])])),defaultVariants:zE(o,g.defaultVariants),compoundVariants:[...a,...g.compoundVariants]})}function c(f){return be(s(f))}const d=Object.keys(n);function u(f){return oo(f,d)}const h=Object.fromEntries(Object.entries(n).map(([f,g])=>[f,Object.keys(g)]));return Object.assign(go(c),{__cva__:!0,variantMap:h,variantKeys:d,raw:s,config:e,merge:l,splitVariantProps:u,getVariantProps:i})}function BE(e,r){let n={};return e.forEach(o=>{Object.entries(o).every(([a,i])=>a==="css"?!0:(Array.isArray(i)?i:[i]).some(s=>r[a]===s))&&(n=op(n,o.css))}),n}function bEe(e,r,n,o){if(r.length>0&&typeof n?.[o]=="object")throw new Error(`[recipe:${e}:${o}] Conditions are not supported when using compound variants.`)}function vEe(e){const r=Object.entries(dEe(e)).map(([h,f])=>[h,o0(f)]),n=e.defaultVariants??{},o=r.reduce((h,[f,g])=>(e.className&&(h[f]=g.config.className),h),{});function a(h){const f=r.map(([g,b])=>[g,et(b(h),o[g])]);return Object.fromEntries(f)}function i(h){const f=r.map(([g,b])=>[g,b.raw(h)]);return Object.fromEntries(f)}const s=e.variants??{},l=Object.keys(s);function c(h){return oo(h,l)}const d=h=>({...n,...np(h)}),u=Object.fromEntries(Object.entries(s).map(([h,f])=>[h,Object.keys(f)]));return Object.assign(go(a),{__cva__:!1,raw:i,config:e,variantMap:u,variantKeys:l,classNameMap:o,splitVariantProps:c,getVariantProps:d})}var xEe={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const Nt=(e,r,n,o)=>{const a=E.forwardRef(({color:i="currentColor",size:s=24,stroke:l=2,title:c,className:d,children:u,...h},f)=>E.createElement("svg",{ref:f,...xEe[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${r}`,d].join(" "),...e==="filled"?{fill:i}:{strokeWidth:l,stroke:i},...h},[c&&E.createElement("title",{key:"svg-title"},c),...o.map(([g,b])=>E.createElement(g,b)),...Array.isArray(u)?u:[u]]));return a.displayName=`${n}`,a},wEe=[["path",{d:"M12 6m-7 0a7 3 0 1 0 14 0a7 3 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M5 6v12c0 1.657 3.134 3 7 3s7 -1.343 7 -3v-12",key:"svg-1"}]],MF=Nt("outline","cylinder","Cylinder",wEe),kEe=[["path",{d:"M21 14.008v-5.018a1.98 1.98 0 0 0 -1 -1.717l-4 -2.008a2.016 2.016 0 0 0 -2 0l-10 5.008c-.619 .355 -1 1.01 -1 1.718v5.018c0 .709 .381 1.363 1 1.717l4 2.008a2.016 2.016 0 0 0 2 0l10 -5.008c.619 -.355 1 -1.01 1 -1.718z",key:"svg-0"}],["path",{d:"M9 21v-7.5",key:"svg-1"}],["path",{d:"M9 13.5l11.5 -5.5",key:"svg-2"}],["path",{d:"M3.5 11l5.5 2.5",key:"svg-3"}]],_Ee=Nt("outline","rectangular-prism","RectangularPrism",kEe),EEe=[["path",{d:"M3 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M17 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-2"}],["path",{d:"M5 11v-3a3 3 0 0 1 3 -3h8a3 3 0 0 1 3 3v3",key:"svg-3"}],["path",{d:"M16.5 8.5l2.5 2.5l2.5 -2.5",key:"svg-4"}]],SEe=Nt("outline","reorder","Reorder",EEe),CEe=[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]],TEe=Nt("outline","user","User",CEe),AEe=[["path",{d:"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M11 4h2",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}]],REe=Nt("outline","device-mobile","DeviceMobile",AEe),NEe=[["path",{d:"M4 8h16",key:"svg-0"}],["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-1"}],["path",{d:"M8 4v4",key:"svg-2"}]],DEe=Nt("outline","browser","Browser",NEe),FE=E.createContext(null);function $Ee({value:e,children:r}){return E.useContext(FE)?y.jsx(y.Fragment,{children:r}):y.jsx(FE.Provider,{value:e,children:r})}function X3({element:e,className:r,style:n}){const o=E.useContext(FE);if(!e||!e.icon||e.icon==="none")return null;let a;return e.icon.startsWith("http://")||e.icon.startsWith("https://")?a=y.jsx("img",{src:e.icon,alt:e.title}):o&&(a=y.jsx(o,{node:e})),a?y.jsx("div",{className:et(r,"likec4-element-icon"),"data-likec4-icon":e.icon,style:n,children:a}):null}const PEe={browser:DEe,cylinder:MF,mobile:REe,person:TEe,queue:SEe,rectangle:_Ee,storage:MF};function MEe({element:e,className:r}){const n=y.jsx(X3,{element:e,className:r});if(n)return n;const o=PEe[e.shape];return y.jsx("div",{className:et(r,"likec4-shape-icon"),children:y.jsx(o,{})})}function Cf(e){const r=E.useRef(e);return r.current=e,E.useMemo(()=>Object.freeze({get current(){return r.current}}),[])}function zF(e){const r=Cf(e);E.useEffect(()=>()=>{r.current()},[])}function HE(e,r,n,o=0){const a=E.useRef(void 0),i=E.useRef(void 0),s=E.useRef(e),l=E.useRef(void 0),c=()=>{a.current&&(clearTimeout(a.current),a.current=void 0),i.current&&(clearTimeout(i.current),i.current=void 0)};return zF(c),E.useEffect(()=>{s.current=e},r),E.useMemo(()=>{const d=()=>{if(c(),!l.current)return;const h=l.current;l.current=void 0,s.current.apply(h.this,h.args)},u=function(...h){a.current&&clearTimeout(a.current),l.current={args:h,this:this},a.current=setTimeout(d,n),o>0&&!i.current&&(i.current=setTimeout(d,o))};return Object.defineProperties(u,{length:{value:e.length},name:{value:`${e.name||"anonymous"}__debounced__${n}`}}),u},[n,o,...r])}const zEe=()=>{},K3=typeof globalThis<"u"&&typeof navigator<"u"&&typeof document<"u";function IEe(e){const r=Cf(e),n=E.useRef(0),o=E.useCallback(()=>{K3&&n.current&&(cancelAnimationFrame(n.current),n.current=0)},[]);return zF(o),[E.useMemo(()=>{const a=(...i)=>{K3&&(o(),n.current=requestAnimationFrame(()=>{r.current(...i),n.current=0}))};return Object.defineProperties(a,{length:{value:e.length},name:{value:`${e.name||"anonymous"}__raf`}}),a},[]),o]}const OEe=(e,r)=>{if(e===r)return!0;if(e.length!==r.length)return!1;for(const[n,o]of e.entries())if(o!==r[n])return!1;return!0};function jEe(e,r,n=OEe,o=E.useEffect,...a){const i=E.useRef(void 0);(i.current===void 0||K3&&!n(i.current,r))&&(i.current=r),o(e,i.current,...a)}function IF(){const e=E.useRef(!0);return E.useEffect(()=>{e.current=!1},[]),e.current}const VE=K3?E.useLayoutEffect:E.useEffect;function LEe(e){E.useEffect(()=>{e()},[])}function qE(e,r){const[n,o]=IEe(e);E.useEffect(()=>(n(),o),r)}const BEe=e=>(e+1)%Number.MAX_SAFE_INTEGER;function FEe(){const[,e]=E.useState(0);return E.useCallback(()=>{e(BEe)},[])}function OF(e,r){const n=IF();E.useEffect(n?zEe:e,r)}const HEe=e=>{e&&clearTimeout(e)};function Z3(e,r){const n=Cf(e),o=Cf(r),a=E.useRef(null),i=E.useCallback(()=>{HEe(a.current)},[]),s=E.useCallback(()=>{o.current!==void 0&&(i(),a.current=setTimeout(()=>{n.current()},o.current))},[]);return E.useEffect(()=>(s(),i),[r]),[i,s]}const jF=(e,r,n)=>{const o=E.useRef(void 0);return(o.current===void 0||!n(o.current,r))&&(o.current=r),E.useMemo(e,o.current)};function _n(e){if(typeof e=="string"||typeof e=="number")return""+e;let r="";if(Array.isArray(e))for(let n=0,o;n{}};function Q3(){for(var e=0,r=arguments.length,n={},o;e=0&&(o=n.slice(a+1),n=n.slice(0,a)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}J3.prototype=Q3.prototype={constructor:J3,on:function(e,r){var n=this._,o=qEe(e+"",n),a,i=-1,s=o.length;if(arguments.length<2){for(;++i0)for(var n=new Array(a),o=0,a,i;o=0&&(r=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),BF.hasOwnProperty(r)?{space:BF[r],local:e}:e}function WEe(e){return function(){var r=this.ownerDocument,n=this.namespaceURI;return n===UE&&r.documentElement.namespaceURI===UE?r.createElement(e):r.createElementNS(n,e)}}function YEe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function FF(e){var r=ex(e);return(r.local?YEe:WEe)(r)}function GEe(){}function WE(e){return e==null?GEe:function(){return this.querySelector(e)}}function XEe(e){typeof e!="function"&&(e=WE(e));for(var r=this._groups,n=r.length,o=new Array(n),a=0;a=_&&(_=C+1);!(A=w[_])&&++_=0;)(s=o[a])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function x7e(e){e||(e=w7e);function r(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var n=this._groups,o=n.length,a=new Array(o),i=0;ir?1:e>=r?0:NaN}function k7e(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function _7e(){return Array.from(this)}function E7e(){for(var e=this._groups,r=0,n=e.length;r