@dayinxisheng/zreadbrow 1.17.0 → 1.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/zreadbrow.js +14 -2
- package/dist/public/assets/{AIPanel-CScovBuP.js → AIPanel-C-YfdAam.js} +7 -7
- package/dist/public/assets/MermaidBlock-CPVuAdRJ.js +1 -0
- package/dist/public/assets/{MermaidViewerModal-C6aHO871.js → MermaidViewerModal-BRk7-q4K.js} +1 -1
- package/dist/public/assets/{ReferenceModal-DSe6-vS0.js → ReferenceModal-B916Di7q.js} +11 -11
- package/dist/public/assets/{SettingsModal--k8PL66i.js → SettingsModal-CTBLFFSS.js} +1 -1
- package/dist/public/assets/{_baseUniq-y4by9G-Q.js → _baseUniq-m7cimItk.js} +1 -1
- package/dist/public/assets/{architectureDiagram-Q4EWVU46-BEmzXJbV.js → architectureDiagram-Q4EWVU46-DtqSqMGf.js} +1 -1
- package/dist/public/assets/{blockDiagram-DXYQGD6D-YFH-77U0.js → blockDiagram-DXYQGD6D-CgFuSL-z.js} +5 -5
- package/dist/public/assets/{c4Diagram-AHTNJAMY-CLoKIvmw.js → c4Diagram-AHTNJAMY-CUE7rn2p.js} +1 -1
- package/dist/public/assets/{chunk-4BX2VUAB-BYEuseZS.js → chunk-4BX2VUAB-zMHqNRcr.js} +1 -1
- package/dist/public/assets/{chunk-4TB4RGXK-FI8K-3Xx.js → chunk-4TB4RGXK-BpV3pxqF.js} +1 -1
- package/dist/public/assets/{chunk-55IACEB6-CTAvomwk.js → chunk-55IACEB6-1YjEpZd0.js} +1 -1
- package/dist/public/assets/{chunk-EDXVE4YY-oyJ-O6qG.js → chunk-EDXVE4YY-CeBjdSJX.js} +1 -1
- package/dist/public/assets/{chunk-FMBD7UC4-C9K9lOWs.js → chunk-FMBD7UC4-oyXy72V1.js} +1 -1
- package/dist/public/assets/{chunk-OYMX7WX6-CmKnZ9RU.js → chunk-OYMX7WX6-CQB5A9wm.js} +1 -1
- package/dist/public/assets/{chunk-QZHKN3VN-BIbiz9Rm.js → chunk-QZHKN3VN-C6V5KhDH.js} +1 -1
- package/dist/public/assets/chunk-YZCP3GAM-Cvl0MM85.js +1 -0
- package/dist/public/assets/classDiagram-6PBFFD2Q-DHxKXnDK.js +1 -0
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-DHxKXnDK.js +1 -0
- package/dist/public/assets/clone-B_44hGXQ.js +1 -0
- package/dist/public/assets/{cose-bilkent-S5V4N54A-DIBlD9wz.js → cose-bilkent-S5V4N54A-tP2GUtP-.js} +1 -1
- package/dist/public/assets/{dagre-KV5264BT-BOhPW5QL.js → dagre-KV5264BT-Evq-yC-H.js} +1 -1
- package/dist/public/assets/diagram-5BDNPKRD-C9IEP2hE.js +10 -0
- package/dist/public/assets/diagram-G4DWMVQ6-BCLMvrx-.js +24 -0
- package/dist/public/assets/{diagram-MMDJMWI5-DmCtOKnk.js → diagram-MMDJMWI5-DxJ3dga5.js} +2 -2
- package/dist/public/assets/{diagram-TYMM5635-B4qsiTWn.js → diagram-TYMM5635-BOJIcEla.js} +2 -2
- package/dist/public/assets/{erDiagram-SMLLAGMA-pXEv9R-9.js → erDiagram-SMLLAGMA-aXA9Q1fI.js} +1 -1
- package/dist/public/assets/{flowDiagram-DWJPFMVM-BP7auCOg.js → flowDiagram-DWJPFMVM-BjEk7JcK.js} +1 -1
- package/dist/public/assets/{ganttDiagram-T4ZO3ILL-CZv87GYZ.js → ganttDiagram-T4ZO3ILL-D3u7X5y3.js} +2 -2
- package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-BNsUvZWe.js → gitGraphDiagram-UUTBAWPF-oEcGoRSk.js} +5 -5
- package/dist/public/assets/{graph-p3cnnF-t.js → graph-lVZ_cjbT.js} +1 -1
- package/dist/public/assets/{highlighted-body-OFNGDK62--vm9zfDs.js → highlighted-body-OFNGDK62-DkdBx1s2.js} +1 -1
- package/dist/public/assets/index-BmQ-wOlB.js +482 -0
- package/dist/public/assets/index-F37uDERb.css +1 -0
- package/dist/public/assets/{infoDiagram-42DDH7IO-BzfFYcZ2.js → infoDiagram-42DDH7IO-C28F97oa.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-BlTbVd-H.js → ishikawaDiagram-UXIWVN3A-D59D4ZGk.js} +5 -5
- package/dist/public/assets/{journeyDiagram-VCZTEJTY-V5hNOIqg.js → journeyDiagram-VCZTEJTY-DshaLFkN.js} +1 -1
- package/dist/public/assets/{kanban-definition-6JOO6SKY-BWt5uYAr.js → kanban-definition-6JOO6SKY-C2g7cjfd.js} +2 -2
- package/dist/public/assets/{layout-D6ldE2fP.js → layout-CnqOUuXe.js} +1 -1
- package/dist/public/assets/{mermaid-CKheD1Go.js → mermaid-CF-QbALk.js} +4 -4
- package/dist/public/assets/{min-CwSB4Wao.js → min-DIoUV2Ll.js} +1 -1
- package/dist/public/assets/{mindmap-definition-QFDTVHPH-BNS4IjMS.js → mindmap-definition-QFDTVHPH-Cuart2gs.js} +7 -7
- package/dist/public/assets/{pieDiagram-DEJITSTG-DWiOvKqY.js → pieDiagram-DEJITSTG-DDYdBumO.js} +2 -2
- package/dist/public/assets/{quadrantDiagram-34T5L4WZ-BeGjJ6HS.js → quadrantDiagram-34T5L4WZ-1M4jQ4aT.js} +3 -3
- package/dist/public/assets/{requirementDiagram-MS252O5E-Bg9ysArQ.js → requirementDiagram-MS252O5E-cbWppHFa.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-XADWPNL6-BYRCYtrJ.js → sankeyDiagram-XADWPNL6-4D4rvcjw.js} +4 -4
- package/dist/public/assets/{sequenceDiagram-FGHM5R23-CQFXgNL8.js → sequenceDiagram-FGHM5R23-ComC2-Sc.js} +1 -1
- package/dist/public/assets/stateDiagram-FHFEXIEX-8nR4RqyL.js +1 -0
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-sni4Ws2p.js +1 -0
- package/dist/public/assets/{timeline-definition-GMOUNBTQ-Rn8InxFI.js → timeline-definition-GMOUNBTQ-CWEAkGhb.js} +1 -1
- package/dist/public/assets/{vennDiagram-DHZGUBPP-BWKM7U6N.js → vennDiagram-DHZGUBPP-BCUB4Y59.js} +5 -5
- package/dist/public/assets/{wardley-RL74JXVD-BGUd-VPm.js → wardley-RL74JXVD-fcUo-Wrg.js} +1 -1
- package/dist/public/assets/{wardleyDiagram-NUSXRM2D-BJ8q8ZAA.js → wardleyDiagram-NUSXRM2D-q0nyo3Bx.js} +2 -2
- package/dist/public/assets/{xychartDiagram-5P7HB3ND-CFKLrNXJ.js → xychartDiagram-5P7HB3ND-tZNDsxpi.js} +4 -4
- package/dist/public/index.html +3 -3
- package/dist/server/index.js +1 -1
- package/dist/server/middleware/errorHandler.js +1 -1
- package/dist/server/middleware/requestId.js +1 -1
- package/dist/server/routes/ai.js +1 -1
- package/dist/server/routes/config.js +1 -1
- package/dist/server/routes/files.js +1 -1
- package/dist/server/routes/projects.js +1 -1
- package/dist/server/routes/scan.js +1 -1
- package/dist/server/routes/search.js +1 -1
- package/dist/server/routes/wiki.js +1 -1
- package/dist/server/services/ai.js +1 -1
- package/dist/server/services/cache.js +1 -1
- package/dist/server/services/config.js +1 -1
- package/dist/server/services/jieba.js +1 -1
- package/dist/server/services/logger.js +1 -1
- package/dist/server/services/scanner.js +1 -1
- package/dist/server/services/search-db.js +1 -1
- package/dist/server/services/search-index.js +1 -1
- package/dist/server/services/search-query.js +1 -1
- package/dist/server/services/tokenizer.js +1 -1
- package/dist/server/services/wiki-loader.js +1 -1
- package/dist/server/services/wire-reader.js +1 -1
- package/package.json +6 -2
- package/dist/public/assets/MermaidBlock-CwSB1vTi.js +0 -1
- package/dist/public/assets/chunk-YZCP3GAM-CipzN9Ll.js +0 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-BYEeftLU.js +0 -1
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-BYEeftLU.js +0 -1
- package/dist/public/assets/clipboard-DZvD3OhL.js +0 -1
- package/dist/public/assets/clone-CSrQO5m9.js +0 -1
- package/dist/public/assets/diagram-5BDNPKRD-CokDfnAE.js +0 -10
- package/dist/public/assets/diagram-G4DWMVQ6-BRRM2XLs.js +0 -24
- package/dist/public/assets/index-5zPgI2iS.css +0 -1
- package/dist/public/assets/index-CqfyOQhq.js +0 -332
- package/dist/public/assets/index-WbpvO67V.js +0 -153
- package/dist/public/assets/stateDiagram-FHFEXIEX-axjES2Uc.js +0 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-CADBRSGI.js +0 -1
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-DkdBx1s2.js","assets/mermaid-CF-QbALk.js","assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/MermaidBlock-CPVuAdRJ.js","assets/SettingsModal-CTBLFFSS.js","assets/ReferenceModal-B916Di7q.js","assets/MermaidViewerModal-BRk7-q4K.js","assets/AIPanel-C-YfdAam.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Mw=Object.defineProperty;var Bw=Object.getPrototypeOf;var Fw=Reflect.get;var Xg=e=>{throw TypeError(e)};var jw=(e,t,n)=>t in e?Mw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>jw(e,typeof t!="symbol"?t+"":t,n),hf=(e,t,n)=>t.has(e)||Xg("Cannot "+n);var Xt=(e,t,n)=>(hf(e,t,"read from private field"),n?n.call(e):t.get(e)),Ri=(e,t,n)=>t.has(e)?Xg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Wn=(e,t,n,r)=>(hf(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),pf=(e,t,n)=>(hf(e,t,"access private method"),n);var Zg=(e,t,n)=>Fw(Bw(e),n,t);import{aE as Ao,ap as A}from"./mermaid-CF-QbALk.js";function Hw(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var mf={exports:{}},Fa={},gf={exports:{}},ze={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var Jg;function Uw(){if(Jg)return ze;Jg=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.iterator;function _(H){return H===null||typeof H!="object"?null:(H=h&&H[h]||H["@@iterator"],typeof H=="function"?H:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,C={};function k(H,Z,O){this.props=H,this.context=Z,this.refs=C,this.updater=O||g}k.prototype.isReactComponent={},k.prototype.setState=function(H,Z){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,Z,"setState")},k.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function w(){}w.prototype=k.prototype;function D(H,Z,O){this.props=H,this.context=Z,this.refs=C,this.updater=O||g}var N=D.prototype=new w;N.constructor=D,y(N,k.prototype),N.isPureReactComponent=!0;var U=Array.isArray,z=Object.prototype.hasOwnProperty,B={current:null},X={key:!0,ref:!0,__self:!0,__source:!0};function Q(H,Z,O){var Ae,be={},_e=null,Fe=null;if(Z!=null)for(Ae in Z.ref!==void 0&&(Fe=Z.ref),Z.key!==void 0&&(_e=""+Z.key),Z)z.call(Z,Ae)&&!X.hasOwnProperty(Ae)&&(be[Ae]=Z[Ae]);var De=arguments.length-2;if(De===1)be.children=O;else if(1<De){for(var Ie=Array(De),tt=0;tt<De;tt++)Ie[tt]=arguments[tt+2];be.children=Ie}if(H&&H.defaultProps)for(Ae in De=H.defaultProps,De)be[Ae]===void 0&&(be[Ae]=De[Ae]);return{$$typeof:e,type:H,key:_e,ref:Fe,props:be,_owner:B.current}}function ne(H,Z){return{$$typeof:e,type:H.type,key:Z,ref:H.ref,props:H.props,_owner:H._owner}}function $(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function oe(H){var Z={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(O){return Z[O]})}var ue=/\/+/g;function ve(H,Z){return typeof H=="object"&&H!==null&&H.key!=null?oe(""+H.key):Z.toString(36)}function he(H,Z,O,Ae,be){var _e=typeof H;(_e==="undefined"||_e==="boolean")&&(H=null);var Fe=!1;if(H===null)Fe=!0;else switch(_e){case"string":case"number":Fe=!0;break;case"object":switch(H.$$typeof){case e:case t:Fe=!0}}if(Fe)return Fe=H,be=be(Fe),H=Ae===""?"."+ve(Fe,0):Ae,U(be)?(O="",H!=null&&(O=H.replace(ue,"$&/")+"/"),he(be,Z,O,"",function(tt){return tt})):be!=null&&($(be)&&(be=ne(be,O+(!be.key||Fe&&Fe.key===be.key?"":(""+be.key).replace(ue,"$&/")+"/")+H)),Z.push(be)),1;if(Fe=0,Ae=Ae===""?".":Ae+":",U(H))for(var De=0;De<H.length;De++){_e=H[De];var Ie=Ae+ve(_e,De);Fe+=he(_e,Z,O,Ie,be)}else if(Ie=_(H),typeof Ie=="function")for(H=Ie.call(H),De=0;!(_e=H.next()).done;)_e=_e.value,Ie=Ae+ve(_e,De++),Fe+=he(_e,Z,O,Ie,be);else if(_e==="object")throw Z=String(H),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.");return Fe}function te(H,Z,O){if(H==null)return H;var Ae=[],be=0;return he(H,Ae,"","",function(_e){return Z.call(O,_e,be++)}),Ae}function ee(H){if(H._status===-1){var Z=H._result;Z=Z(),Z.then(function(O){(H._status===0||H._status===-1)&&(H._status=1,H._result=O)},function(O){(H._status===0||H._status===-1)&&(H._status=2,H._result=O)}),H._status===-1&&(H._status=0,H._result=Z)}if(H._status===1)return H._result.default;throw H._result}var me={current:null},re={transition:null},ge={ReactCurrentDispatcher:me,ReactCurrentBatchConfig:re,ReactCurrentOwner:B};function S(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:te,forEach:function(H,Z,O){te(H,function(){Z.apply(this,arguments)},O)},count:function(H){var Z=0;return te(H,function(){Z++}),Z},toArray:function(H){return te(H,function(Z){return Z})||[]},only:function(H){if(!$(H))throw Error("React.Children.only expected to receive a single React element child.");return H}},ze.Component=k,ze.Fragment=n,ze.Profiler=i,ze.PureComponent=D,ze.StrictMode=r,ze.Suspense=c,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ge,ze.act=S,ze.cloneElement=function(H,Z,O){if(H==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+H+".");var Ae=y({},H.props),be=H.key,_e=H.ref,Fe=H._owner;if(Z!=null){if(Z.ref!==void 0&&(_e=Z.ref,Fe=B.current),Z.key!==void 0&&(be=""+Z.key),H.type&&H.type.defaultProps)var De=H.type.defaultProps;for(Ie in Z)z.call(Z,Ie)&&!X.hasOwnProperty(Ie)&&(Ae[Ie]=Z[Ie]===void 0&&De!==void 0?De[Ie]:Z[Ie])}var Ie=arguments.length-2;if(Ie===1)Ae.children=O;else if(1<Ie){De=Array(Ie);for(var tt=0;tt<Ie;tt++)De[tt]=arguments[tt+2];Ae.children=De}return{$$typeof:e,type:H.type,key:be,ref:_e,props:Ae,_owner:Fe}},ze.createContext=function(H){return H={$$typeof:u,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},H.Provider={$$typeof:a,_context:H},H.Consumer=H},ze.createElement=Q,ze.createFactory=function(H){var Z=Q.bind(null,H);return Z.type=H,Z},ze.createRef=function(){return{current:null}},ze.forwardRef=function(H){return{$$typeof:l,render:H}},ze.isValidElement=$,ze.lazy=function(H){return{$$typeof:m,_payload:{_status:-1,_result:H},_init:ee}},ze.memo=function(H,Z){return{$$typeof:f,type:H,compare:Z===void 0?null:Z}},ze.startTransition=function(H){var Z=re.transition;re.transition={};try{H()}finally{re.transition=Z}},ze.unstable_act=S,ze.useCallback=function(H,Z){return me.current.useCallback(H,Z)},ze.useContext=function(H){return me.current.useContext(H)},ze.useDebugValue=function(){},ze.useDeferredValue=function(H){return me.current.useDeferredValue(H)},ze.useEffect=function(H,Z){return me.current.useEffect(H,Z)},ze.useId=function(){return me.current.useId()},ze.useImperativeHandle=function(H,Z,O){return me.current.useImperativeHandle(H,Z,O)},ze.useInsertionEffect=function(H,Z){return me.current.useInsertionEffect(H,Z)},ze.useLayoutEffect=function(H,Z){return me.current.useLayoutEffect(H,Z)},ze.useMemo=function(H,Z){return me.current.useMemo(H,Z)},ze.useReducer=function(H,Z,O){return me.current.useReducer(H,Z,O)},ze.useRef=function(H){return me.current.useRef(H)},ze.useState=function(H){return me.current.useState(H)},ze.useSyncExternalStore=function(H,Z,O){return me.current.useSyncExternalStore(H,Z,O)},ze.useTransition=function(){return me.current.useTransition()},ze.version="18.3.1",ze}var e1;function Xh(){return e1||(e1=1,gf.exports=Uw()),gf.exports}/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var t1;function $w(){if(t1)return Fa;t1=1;var e=Xh(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(l,c,f){var m,h={},_=null,g=null;f!==void 0&&(_=""+f),c.key!==void 0&&(_=""+c.key),c.ref!==void 0&&(g=c.ref);for(m in c)r.call(c,m)&&!a.hasOwnProperty(m)&&(h[m]=c[m]);if(l&&l.defaultProps)for(m in c=l.defaultProps,c)h[m]===void 0&&(h[m]=c[m]);return{$$typeof:t,type:l,key:_,ref:g,props:h,_owner:i.current}}return Fa.Fragment=n,Fa.jsx=u,Fa.jsxs=u,Fa}var n1;function zw(){return n1||(n1=1,mf.exports=$w()),mf.exports}var T=zw(),P=Xh();const yt=Ao(P),$F=Hw({__proto__:null,default:yt},[P]);var Xu={},Ef={exports:{}},ln={},_f={exports:{}},bf={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var r1;function Vw(){return r1||(r1=1,(function(e){function t(re,ge){var S=re.length;re.push(ge);e:for(;0<S;){var H=S-1>>>1,Z=re[H];if(0<i(Z,ge))re[H]=ge,re[S]=Z,S=H;else break e}}function n(re){return re.length===0?null:re[0]}function r(re){if(re.length===0)return null;var ge=re[0],S=re.pop();if(S!==ge){re[0]=S;e:for(var H=0,Z=re.length,O=Z>>>1;H<O;){var Ae=2*(H+1)-1,be=re[Ae],_e=Ae+1,Fe=re[_e];if(0>i(be,S))_e<Z&&0>i(Fe,be)?(re[H]=Fe,re[_e]=S,H=_e):(re[H]=be,re[Ae]=S,H=Ae);else if(_e<Z&&0>i(Fe,S))re[H]=Fe,re[_e]=S,H=_e;else break e}}return ge}function i(re,ge){var S=re.sortIndex-ge.sortIndex;return S!==0?S:re.id-ge.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var c=[],f=[],m=1,h=null,_=3,g=!1,y=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(re){for(var ge=n(f);ge!==null;){if(ge.callback===null)r(f);else if(ge.startTime<=re)r(f),ge.sortIndex=ge.expirationTime,t(c,ge);else break;ge=n(f)}}function U(re){if(C=!1,N(re),!y)if(n(c)!==null)y=!0,ee(z);else{var ge=n(f);ge!==null&&me(U,ge.startTime-re)}}function z(re,ge){y=!1,C&&(C=!1,w(Q),Q=-1),g=!0;var S=_;try{for(N(ge),h=n(c);h!==null&&(!(h.expirationTime>ge)||re&&!oe());){var H=h.callback;if(typeof H=="function"){h.callback=null,_=h.priorityLevel;var Z=H(h.expirationTime<=ge);ge=e.unstable_now(),typeof Z=="function"?h.callback=Z:h===n(c)&&r(c),N(ge)}else r(c);h=n(c)}if(h!==null)var O=!0;else{var Ae=n(f);Ae!==null&&me(U,Ae.startTime-ge),O=!1}return O}finally{h=null,_=S,g=!1}}var B=!1,X=null,Q=-1,ne=5,$=-1;function oe(){return!(e.unstable_now()-$<ne)}function ue(){if(X!==null){var re=e.unstable_now();$=re;var ge=!0;try{ge=X(!0,re)}finally{ge?ve():(B=!1,X=null)}}else B=!1}var ve;if(typeof D=="function")ve=function(){D(ue)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,te=he.port2;he.port1.onmessage=ue,ve=function(){te.postMessage(null)}}else ve=function(){k(ue,0)};function ee(re){X=re,B||(B=!0,ve())}function me(re,ge){Q=k(function(){re(e.unstable_now())},ge)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(re){re.callback=null},e.unstable_continueExecution=function(){y||g||(y=!0,ee(z))},e.unstable_forceFrameRate=function(re){0>re||125<re?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<re?Math.floor(1e3/re):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(re){switch(_){case 1:case 2:case 3:var ge=3;break;default:ge=_}var S=_;_=ge;try{return re()}finally{_=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(re,ge){switch(re){case 1:case 2:case 3:case 4:case 5:break;default:re=3}var S=_;_=re;try{return ge()}finally{_=S}},e.unstable_scheduleCallback=function(re,ge,S){var H=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?H+S:H):S=H,re){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=S+Z,re={id:m++,callback:ge,priorityLevel:re,startTime:S,expirationTime:Z,sortIndex:-1},S>H?(re.sortIndex=S,t(f,re),n(c)===null&&re===n(f)&&(C?(w(Q),Q=-1):C=!0,me(U,S-H))):(re.sortIndex=Z,t(c,re),y||g||(y=!0,ee(z))),re},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(re){var ge=_;return function(){var S=_;_=ge;try{return re.apply(this,arguments)}finally{_=S}}}})(bf)),bf}var i1;function Gw(){return i1||(i1=1,_f.exports=Vw()),_f.exports}/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var s1;function Ww(){if(s1)return ln;s1=1;var e=Xh(),t=Gw();function n(s){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+s,d=1;d<arguments.length;d++)o+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+s+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function a(s,o){u(s,o),u(s+"Capture",o)}function u(s,o){for(i[s]=o,s=0;s<o.length;s++)r.add(o[s])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},h={};function _(s){return c.call(h,s)?!0:c.call(m,s)?!1:f.test(s)?h[s]=!0:(m[s]=!0,!1)}function g(s,o,d,p){if(d!==null&&d.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return p?!1:d!==null?!d.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function y(s,o,d,p){if(o===null||typeof o>"u"||g(s,o,d,p))return!0;if(p)return!1;if(d!==null)switch(d.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function C(s,o,d,p,b,x,v){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=p,this.attributeNamespace=b,this.mustUseProperty=d,this.propertyName=s,this.type=o,this.sanitizeURL=x,this.removeEmptyString=v}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){k[s]=new C(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var o=s[0];k[o]=new C(o,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){k[s]=new C(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){k[s]=new C(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){k[s]=new C(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){k[s]=new C(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){k[s]=new C(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){k[s]=new C(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){k[s]=new C(s,5,!1,s.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function D(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var o=s.replace(w,D);k[o]=new C(o,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var o=s.replace(w,D);k[o]=new C(o,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var o=s.replace(w,D);k[o]=new C(o,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){k[s]=new C(s,1,!1,s.toLowerCase(),null,!1,!1)}),k.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){k[s]=new C(s,1,!1,s.toLowerCase(),null,!0,!0)});function N(s,o,d,p){var b=k.hasOwnProperty(o)?k[o]:null;(b!==null?b.type!==0:p||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(y(o,d,b,p)&&(d=null),p||b===null?_(o)&&(d===null?s.removeAttribute(o):s.setAttribute(o,""+d)):b.mustUseProperty?s[b.propertyName]=d===null?b.type===3?!1:"":d:(o=b.attributeName,p=b.attributeNamespace,d===null?s.removeAttribute(o):(b=b.type,d=b===3||b===4&&d===!0?"":""+d,p?s.setAttributeNS(p,o,d):s.setAttribute(o,d))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,z=Symbol.for("react.element"),B=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),oe=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),me=Symbol.for("react.offscreen"),re=Symbol.iterator;function ge(s){return s===null||typeof s!="object"?null:(s=re&&s[re]||s["@@iterator"],typeof s=="function"?s:null)}var S=Object.assign,H;function Z(s){if(H===void 0)try{throw Error()}catch(d){var o=d.stack.trim().match(/\n( *(at )?)/);H=o&&o[1]||""}return`
|
|
35
|
+
`+H+s}var O=!1;function Ae(s,o){if(!s||O)return"";O=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(q){var p=q}Reflect.construct(s,[],o)}else{try{o.call()}catch(q){p=q}s.call(o.prototype)}else{try{throw Error()}catch(q){p=q}s()}}catch(q){if(q&&p&&typeof q.stack=="string"){for(var b=q.stack.split(`
|
|
36
|
+
`),x=p.stack.split(`
|
|
37
|
+
`),v=b.length-1,R=x.length-1;1<=v&&0<=R&&b[v]!==x[R];)R--;for(;1<=v&&0<=R;v--,R--)if(b[v]!==x[R]){if(v!==1||R!==1)do if(v--,R--,0>R||b[v]!==x[R]){var F=`
|
|
38
|
+
`+b[v].replace(" at new "," at ");return s.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",s.displayName)),F}while(1<=v&&0<=R);break}}}finally{O=!1,Error.prepareStackTrace=d}return(s=s?s.displayName||s.name:"")?Z(s):""}function be(s){switch(s.tag){case 5:return Z(s.type);case 16:return Z("Lazy");case 13:return Z("Suspense");case 19:return Z("SuspenseList");case 0:case 2:case 15:return s=Ae(s.type,!1),s;case 11:return s=Ae(s.type.render,!1),s;case 1:return s=Ae(s.type,!0),s;default:return""}}function _e(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case X:return"Fragment";case B:return"Portal";case ne:return"Profiler";case Q:return"StrictMode";case ve:return"Suspense";case he:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case oe:return(s.displayName||"Context")+".Consumer";case $:return(s._context.displayName||"Context")+".Provider";case ue:var o=s.render;return s=s.displayName,s||(s=o.displayName||o.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case te:return o=s.displayName||null,o!==null?o:_e(s.type)||"Memo";case ee:o=s._payload,s=s._init;try{return _e(s(o))}catch{}}return null}function Fe(s){var o=s.type;switch(s.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=o.render,s=s.displayName||s.name||"",o.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _e(o);case 8:return o===Q?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function De(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Ie(s){var o=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function tt(s){var o=Ie(s)?"checked":"value",d=Object.getOwnPropertyDescriptor(s.constructor.prototype,o),p=""+s[o];if(!s.hasOwnProperty(o)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var b=d.get,x=d.set;return Object.defineProperty(s,o,{configurable:!0,get:function(){return b.call(this)},set:function(v){p=""+v,x.call(this,v)}}),Object.defineProperty(s,o,{enumerable:d.enumerable}),{getValue:function(){return p},setValue:function(v){p=""+v},stopTracking:function(){s._valueTracker=null,delete s[o]}}}}function jt(s){s._valueTracker||(s._valueTracker=tt(s))}function Tn(s){if(!s)return!1;var o=s._valueTracker;if(!o)return!0;var d=o.getValue(),p="";return s&&(p=Ie(s)?s.checked?"true":"false":s.value),s=p,s!==d?(o.setValue(s),!0):!1}function hn(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function pn(s,o){var d=o.checked;return S({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??s._wrapperState.initialChecked})}function Or(s,o){var d=o.defaultValue==null?"":o.defaultValue,p=o.checked!=null?o.checked:o.defaultChecked;d=De(o.value!=null?o.value:d),s._wrapperState={initialChecked:p,initialValue:d,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function pr(s,o){o=o.checked,o!=null&&N(s,"checked",o,!1)}function Pr(s,o){pr(s,o);var d=De(o.value),p=o.type;if(d!=null)p==="number"?(d===0&&s.value===""||s.value!=d)&&(s.value=""+d):s.value!==""+d&&(s.value=""+d);else if(p==="submit"||p==="reset"){s.removeAttribute("value");return}o.hasOwnProperty("value")?Xe(s,o.type,d):o.hasOwnProperty("defaultValue")&&Xe(s,o.type,De(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(s.defaultChecked=!!o.defaultChecked)}function je(s,o,d){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var p=o.type;if(!(p!=="submit"&&p!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+s._wrapperState.initialValue,d||o===s.value||(s.value=o),s.defaultValue=o}d=s.name,d!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,d!==""&&(s.name=d)}function Xe(s,o,d){(o!=="number"||hn(s.ownerDocument)!==s)&&(d==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+d&&(s.defaultValue=""+d))}var Et=Array.isArray;function Pt(s,o,d,p){if(s=s.options,o){o={};for(var b=0;b<d.length;b++)o["$"+d[b]]=!0;for(d=0;d<s.length;d++)b=o.hasOwnProperty("$"+s[d].value),s[d].selected!==b&&(s[d].selected=b),b&&p&&(s[d].defaultSelected=!0)}else{for(d=""+De(d),o=null,b=0;b<s.length;b++){if(s[b].value===d){s[b].selected=!0,p&&(s[b].defaultSelected=!0);return}o!==null||s[b].disabled||(o=s[b])}o!==null&&(o.selected=!0)}}function Fn(s,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},o,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function Uo(s,o){var d=o.value;if(d==null){if(d=o.children,o=o.defaultValue,d!=null){if(o!=null)throw Error(n(92));if(Et(d)){if(1<d.length)throw Error(n(93));d=d[0]}o=d}o==null&&(o=""),d=o}s._wrapperState={initialValue:De(d)}}function $o(s,o){var d=De(o.value),p=De(o.defaultValue);d!=null&&(d=""+d,d!==s.value&&(s.value=d),o.defaultValue==null&&s.defaultValue!==d&&(s.defaultValue=d)),p!=null&&(s.defaultValue=""+p)}function zo(s){var o=s.textContent;o===s._wrapperState.initialValue&&o!==""&&o!==null&&(s.value=o)}function J(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function pe(s,o){return s==null||s==="http://www.w3.org/1999/xhtml"?J(o):s==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var Oe,$e=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,d,p,b){MSApp.execUnsafeLocalFunction(function(){return s(o,d,p,b)})}:s})(function(s,o){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=o;else{for(Oe=Oe||document.createElement("div"),Oe.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Oe.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;o.firstChild;)s.appendChild(o.firstChild)}});function Ye(s,o){if(o){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=o;return}}s.textContent=o}var Dt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},mr=["Webkit","ms","Moz","O"];Object.keys(Dt).forEach(function(s){mr.forEach(function(o){o=o+s.charAt(0).toUpperCase()+s.substring(1),Dt[o]=Dt[s]})});function kn(s,o,d){return o==null||typeof o=="boolean"||o===""?"":d||typeof o!="number"||o===0||Dt.hasOwnProperty(s)&&Dt[s]?(""+o).trim():o+"px"}function Dr(s,o){s=s.style;for(var d in o)if(o.hasOwnProperty(d)){var p=d.indexOf("--")===0,b=kn(d,o[d],p);d==="float"&&(d="cssFloat"),p?s.setProperty(d,b):s[d]=b}}var _i=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Mt(s,o){if(o){if(_i[s]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Jn(s,o){if(s.indexOf("-")===-1)return typeof o.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var mn=null;function Sc(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Ac=null,rs=null,is=null;function pm(s){if(s=ka(s)){if(typeof Ac!="function")throw Error(n(280));var o=s.stateNode;o&&(o=fu(o),Ac(s.stateNode,s.type,o))}}function mm(s){rs?is?is.push(s):is=[s]:rs=s}function gm(){if(rs){var s=rs,o=is;if(is=rs=null,pm(s),o)for(s=0;s<o.length;s++)pm(o[s])}}function Em(s,o){return s(o)}function _m(){}var Ic=!1;function bm(s,o,d){if(Ic)return s(o,d);Ic=!0;try{return Em(s,o,d)}finally{Ic=!1,(rs!==null||is!==null)&&(_m(),gm())}}function na(s,o){var d=s.stateNode;if(d===null)return null;var p=fu(d);if(p===null)return null;d=p[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(s=s.type,p=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!p;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(n(231,o,typeof d));return d}var Nc=!1;if(l)try{var ra={};Object.defineProperty(ra,"passive",{get:function(){Nc=!0}}),window.addEventListener("test",ra,ra),window.removeEventListener("test",ra,ra)}catch{Nc=!1}function $k(s,o,d,p,b,x,v,R,F){var q=Array.prototype.slice.call(arguments,3);try{o.apply(d,q)}catch(ae){this.onError(ae)}}var ia=!1,Vo=null,Go=!1,Lc=null,zk={onError:function(s){ia=!0,Vo=s}};function Vk(s,o,d,p,b,x,v,R,F){ia=!1,Vo=null,$k.apply(zk,arguments)}function Gk(s,o,d,p,b,x,v,R,F){if(Vk.apply(this,arguments),ia){if(ia){var q=Vo;ia=!1,Vo=null}else throw Error(n(198));Go||(Go=!0,Lc=q)}}function bi(s){var o=s,d=s;if(s.alternate)for(;o.return;)o=o.return;else{s=o;do o=s,(o.flags&4098)!==0&&(d=o.return),s=o.return;while(s)}return o.tag===3?d:null}function ym(s){if(s.tag===13){var o=s.memoizedState;if(o===null&&(s=s.alternate,s!==null&&(o=s.memoizedState)),o!==null)return o.dehydrated}return null}function xm(s){if(bi(s)!==s)throw Error(n(188))}function Wk(s){var o=s.alternate;if(!o){if(o=bi(s),o===null)throw Error(n(188));return o!==s?null:s}for(var d=s,p=o;;){var b=d.return;if(b===null)break;var x=b.alternate;if(x===null){if(p=b.return,p!==null){d=p;continue}break}if(b.child===x.child){for(x=b.child;x;){if(x===d)return xm(b),s;if(x===p)return xm(b),o;x=x.sibling}throw Error(n(188))}if(d.return!==p.return)d=b,p=x;else{for(var v=!1,R=b.child;R;){if(R===d){v=!0,d=b,p=x;break}if(R===p){v=!0,p=b,d=x;break}R=R.sibling}if(!v){for(R=x.child;R;){if(R===d){v=!0,d=x,p=b;break}if(R===p){v=!0,p=x,d=b;break}R=R.sibling}if(!v)throw Error(n(189))}}if(d.alternate!==p)throw Error(n(190))}if(d.tag!==3)throw Error(n(188));return d.stateNode.current===d?s:o}function Tm(s){return s=Wk(s),s!==null?km(s):null}function km(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var o=km(s);if(o!==null)return o;s=s.sibling}return null}var wm=t.unstable_scheduleCallback,Cm=t.unstable_cancelCallback,qk=t.unstable_shouldYield,Yk=t.unstable_requestPaint,ft=t.unstable_now,Qk=t.unstable_getCurrentPriorityLevel,Rc=t.unstable_ImmediatePriority,vm=t.unstable_UserBlockingPriority,Wo=t.unstable_NormalPriority,Kk=t.unstable_LowPriority,Sm=t.unstable_IdlePriority,qo=null,er=null;function Xk(s){if(er&&typeof er.onCommitFiberRoot=="function")try{er.onCommitFiberRoot(qo,s,void 0,(s.current.flags&128)===128)}catch{}}var jn=Math.clz32?Math.clz32:e2,Zk=Math.log,Jk=Math.LN2;function e2(s){return s>>>=0,s===0?32:31-(Zk(s)/Jk|0)|0}var Yo=64,Qo=4194304;function sa(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Ko(s,o){var d=s.pendingLanes;if(d===0)return 0;var p=0,b=s.suspendedLanes,x=s.pingedLanes,v=d&268435455;if(v!==0){var R=v&~b;R!==0?p=sa(R):(x&=v,x!==0&&(p=sa(x)))}else v=d&~b,v!==0?p=sa(v):x!==0&&(p=sa(x));if(p===0)return 0;if(o!==0&&o!==p&&(o&b)===0&&(b=p&-p,x=o&-o,b>=x||b===16&&(x&4194240)!==0))return o;if((p&4)!==0&&(p|=d&16),o=s.entangledLanes,o!==0)for(s=s.entanglements,o&=p;0<o;)d=31-jn(o),b=1<<d,p|=s[d],o&=~b;return p}function t2(s,o){switch(s){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function n2(s,o){for(var d=s.suspendedLanes,p=s.pingedLanes,b=s.expirationTimes,x=s.pendingLanes;0<x;){var v=31-jn(x),R=1<<v,F=b[v];F===-1?((R&d)===0||(R&p)!==0)&&(b[v]=t2(R,o)):F<=o&&(s.expiredLanes|=R),x&=~R}}function Oc(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function Am(){var s=Yo;return Yo<<=1,(Yo&4194240)===0&&(Yo=64),s}function Pc(s){for(var o=[],d=0;31>d;d++)o.push(s);return o}function aa(s,o,d){s.pendingLanes|=o,o!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,o=31-jn(o),s[o]=d}function r2(s,o){var d=s.pendingLanes&~o;s.pendingLanes=o,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=o,s.mutableReadLanes&=o,s.entangledLanes&=o,o=s.entanglements;var p=s.eventTimes;for(s=s.expirationTimes;0<d;){var b=31-jn(d),x=1<<b;o[b]=0,p[b]=-1,s[b]=-1,d&=~x}}function Dc(s,o){var d=s.entangledLanes|=o;for(s=s.entanglements;d;){var p=31-jn(d),b=1<<p;b&o|s[p]&o&&(s[p]|=o),d&=~b}}var Ze=0;function Im(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var Nm,Mc,Lm,Rm,Om,Bc=!1,Xo=[],Mr=null,Br=null,Fr=null,oa=new Map,ua=new Map,jr=[],i2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Pm(s,o){switch(s){case"focusin":case"focusout":Mr=null;break;case"dragenter":case"dragleave":Br=null;break;case"mouseover":case"mouseout":Fr=null;break;case"pointerover":case"pointerout":oa.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ua.delete(o.pointerId)}}function la(s,o,d,p,b,x){return s===null||s.nativeEvent!==x?(s={blockedOn:o,domEventName:d,eventSystemFlags:p,nativeEvent:x,targetContainers:[b]},o!==null&&(o=ka(o),o!==null&&Mc(o)),s):(s.eventSystemFlags|=p,o=s.targetContainers,b!==null&&o.indexOf(b)===-1&&o.push(b),s)}function s2(s,o,d,p,b){switch(o){case"focusin":return Mr=la(Mr,s,o,d,p,b),!0;case"dragenter":return Br=la(Br,s,o,d,p,b),!0;case"mouseover":return Fr=la(Fr,s,o,d,p,b),!0;case"pointerover":var x=b.pointerId;return oa.set(x,la(oa.get(x)||null,s,o,d,p,b)),!0;case"gotpointercapture":return x=b.pointerId,ua.set(x,la(ua.get(x)||null,s,o,d,p,b)),!0}return!1}function Dm(s){var o=yi(s.target);if(o!==null){var d=bi(o);if(d!==null){if(o=d.tag,o===13){if(o=ym(d),o!==null){s.blockedOn=o,Om(s.priority,function(){Lm(d)});return}}else if(o===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Zo(s){if(s.blockedOn!==null)return!1;for(var o=s.targetContainers;0<o.length;){var d=jc(s.domEventName,s.eventSystemFlags,o[0],s.nativeEvent);if(d===null){d=s.nativeEvent;var p=new d.constructor(d.type,d);mn=p,d.target.dispatchEvent(p),mn=null}else return o=ka(d),o!==null&&Mc(o),s.blockedOn=d,!1;o.shift()}return!0}function Mm(s,o,d){Zo(s)&&d.delete(o)}function a2(){Bc=!1,Mr!==null&&Zo(Mr)&&(Mr=null),Br!==null&&Zo(Br)&&(Br=null),Fr!==null&&Zo(Fr)&&(Fr=null),oa.forEach(Mm),ua.forEach(Mm)}function ca(s,o){s.blockedOn===o&&(s.blockedOn=null,Bc||(Bc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,a2)))}function da(s){function o(b){return ca(b,s)}if(0<Xo.length){ca(Xo[0],s);for(var d=1;d<Xo.length;d++){var p=Xo[d];p.blockedOn===s&&(p.blockedOn=null)}}for(Mr!==null&&ca(Mr,s),Br!==null&&ca(Br,s),Fr!==null&&ca(Fr,s),oa.forEach(o),ua.forEach(o),d=0;d<jr.length;d++)p=jr[d],p.blockedOn===s&&(p.blockedOn=null);for(;0<jr.length&&(d=jr[0],d.blockedOn===null);)Dm(d),d.blockedOn===null&&jr.shift()}var ss=U.ReactCurrentBatchConfig,Jo=!0;function o2(s,o,d,p){var b=Ze,x=ss.transition;ss.transition=null;try{Ze=1,Fc(s,o,d,p)}finally{Ze=b,ss.transition=x}}function u2(s,o,d,p){var b=Ze,x=ss.transition;ss.transition=null;try{Ze=4,Fc(s,o,d,p)}finally{Ze=b,ss.transition=x}}function Fc(s,o,d,p){if(Jo){var b=jc(s,o,d,p);if(b===null)nd(s,o,p,eu,d),Pm(s,p);else if(s2(b,s,o,d,p))p.stopPropagation();else if(Pm(s,p),o&4&&-1<i2.indexOf(s)){for(;b!==null;){var x=ka(b);if(x!==null&&Nm(x),x=jc(s,o,d,p),x===null&&nd(s,o,p,eu,d),x===b)break;b=x}b!==null&&p.stopPropagation()}else nd(s,o,p,null,d)}}var eu=null;function jc(s,o,d,p){if(eu=null,s=Sc(p),s=yi(s),s!==null)if(o=bi(s),o===null)s=null;else if(d=o.tag,d===13){if(s=ym(o),s!==null)return s;s=null}else if(d===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;s=null}else o!==s&&(s=null);return eu=s,null}function Bm(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qk()){case Rc:return 1;case vm:return 4;case Wo:case Kk:return 16;case Sm:return 536870912;default:return 16}default:return 16}}var Hr=null,Hc=null,tu=null;function Fm(){if(tu)return tu;var s,o=Hc,d=o.length,p,b="value"in Hr?Hr.value:Hr.textContent,x=b.length;for(s=0;s<d&&o[s]===b[s];s++);var v=d-s;for(p=1;p<=v&&o[d-p]===b[x-p];p++);return tu=b.slice(s,1<p?1-p:void 0)}function nu(s){var o=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&o===13&&(s=13)):s=o,s===10&&(s=13),32<=s||s===13?s:0}function ru(){return!0}function jm(){return!1}function gn(s){function o(d,p,b,x,v){this._reactName=d,this._targetInst=b,this.type=p,this.nativeEvent=x,this.target=v,this.currentTarget=null;for(var R in s)s.hasOwnProperty(R)&&(d=s[R],this[R]=d?d(x):x[R]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?ru:jm,this.isPropagationStopped=jm,this}return S(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=ru)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=ru)},persist:function(){},isPersistent:ru}),o}var as={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uc=gn(as),fa=S({},as,{view:0,detail:0}),l2=gn(fa),$c,zc,ha,iu=S({},fa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gc,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==ha&&(ha&&s.type==="mousemove"?($c=s.screenX-ha.screenX,zc=s.screenY-ha.screenY):zc=$c=0,ha=s),$c)},movementY:function(s){return"movementY"in s?s.movementY:zc}}),Hm=gn(iu),c2=S({},iu,{dataTransfer:0}),d2=gn(c2),f2=S({},fa,{relatedTarget:0}),Vc=gn(f2),h2=S({},as,{animationName:0,elapsedTime:0,pseudoElement:0}),p2=gn(h2),m2=S({},as,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),g2=gn(m2),E2=S({},as,{data:0}),Um=gn(E2),_2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},b2={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},y2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function x2(s){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(s):(s=y2[s])?!!o[s]:!1}function Gc(){return x2}var T2=S({},fa,{key:function(s){if(s.key){var o=_2[s.key]||s.key;if(o!=="Unidentified")return o}return s.type==="keypress"?(s=nu(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?b2[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gc,charCode:function(s){return s.type==="keypress"?nu(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?nu(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),k2=gn(T2),w2=S({},iu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$m=gn(w2),C2=S({},fa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gc}),v2=gn(C2),S2=S({},as,{propertyName:0,elapsedTime:0,pseudoElement:0}),A2=gn(S2),I2=S({},iu,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),N2=gn(I2),L2=[9,13,27,32],Wc=l&&"CompositionEvent"in window,pa=null;l&&"documentMode"in document&&(pa=document.documentMode);var R2=l&&"TextEvent"in window&&!pa,zm=l&&(!Wc||pa&&8<pa&&11>=pa),Vm=" ",Gm=!1;function Wm(s,o){switch(s){case"keyup":return L2.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qm(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var os=!1;function O2(s,o){switch(s){case"compositionend":return qm(o);case"keypress":return o.which!==32?null:(Gm=!0,Vm);case"textInput":return s=o.data,s===Vm&&Gm?null:s;default:return null}}function P2(s,o){if(os)return s==="compositionend"||!Wc&&Wm(s,o)?(s=Fm(),tu=Hc=Hr=null,os=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return zm&&o.locale!=="ko"?null:o.data;default:return null}}var D2={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ym(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o==="input"?!!D2[s.type]:o==="textarea"}function Qm(s,o,d,p){mm(p),o=lu(o,"onChange"),0<o.length&&(d=new Uc("onChange","change",null,d,p),s.push({event:d,listeners:o}))}var ma=null,ga=null;function M2(s){h0(s,0)}function su(s){var o=fs(s);if(Tn(o))return s}function B2(s,o){if(s==="change")return o}var Km=!1;if(l){var qc;if(l){var Yc="oninput"in document;if(!Yc){var Xm=document.createElement("div");Xm.setAttribute("oninput","return;"),Yc=typeof Xm.oninput=="function"}qc=Yc}else qc=!1;Km=qc&&(!document.documentMode||9<document.documentMode)}function Zm(){ma&&(ma.detachEvent("onpropertychange",Jm),ga=ma=null)}function Jm(s){if(s.propertyName==="value"&&su(ga)){var o=[];Qm(o,ga,s,Sc(s)),bm(M2,o)}}function F2(s,o,d){s==="focusin"?(Zm(),ma=o,ga=d,ma.attachEvent("onpropertychange",Jm)):s==="focusout"&&Zm()}function j2(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return su(ga)}function H2(s,o){if(s==="click")return su(o)}function U2(s,o){if(s==="input"||s==="change")return su(o)}function $2(s,o){return s===o&&(s!==0||1/s===1/o)||s!==s&&o!==o}var Hn=typeof Object.is=="function"?Object.is:$2;function Ea(s,o){if(Hn(s,o))return!0;if(typeof s!="object"||s===null||typeof o!="object"||o===null)return!1;var d=Object.keys(s),p=Object.keys(o);if(d.length!==p.length)return!1;for(p=0;p<d.length;p++){var b=d[p];if(!c.call(o,b)||!Hn(s[b],o[b]))return!1}return!0}function e0(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function t0(s,o){var d=e0(s);s=0;for(var p;d;){if(d.nodeType===3){if(p=s+d.textContent.length,s<=o&&p>=o)return{node:d,offset:o-s};s=p}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=e0(d)}}function n0(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?n0(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function r0(){for(var s=window,o=hn();o instanceof s.HTMLIFrameElement;){try{var d=typeof o.contentWindow.location.href=="string"}catch{d=!1}if(d)s=o.contentWindow;else break;o=hn(s.document)}return o}function Qc(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}function z2(s){var o=r0(),d=s.focusedElem,p=s.selectionRange;if(o!==d&&d&&d.ownerDocument&&n0(d.ownerDocument.documentElement,d)){if(p!==null&&Qc(d)){if(o=p.start,s=p.end,s===void 0&&(s=o),"selectionStart"in d)d.selectionStart=o,d.selectionEnd=Math.min(s,d.value.length);else if(s=(o=d.ownerDocument||document)&&o.defaultView||window,s.getSelection){s=s.getSelection();var b=d.textContent.length,x=Math.min(p.start,b);p=p.end===void 0?x:Math.min(p.end,b),!s.extend&&x>p&&(b=p,p=x,x=b),b=t0(d,x);var v=t0(d,p);b&&v&&(s.rangeCount!==1||s.anchorNode!==b.node||s.anchorOffset!==b.offset||s.focusNode!==v.node||s.focusOffset!==v.offset)&&(o=o.createRange(),o.setStart(b.node,b.offset),s.removeAllRanges(),x>p?(s.addRange(o),s.extend(v.node,v.offset)):(o.setEnd(v.node,v.offset),s.addRange(o)))}}for(o=[],s=d;s=s.parentNode;)s.nodeType===1&&o.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<o.length;d++)s=o[d],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var V2=l&&"documentMode"in document&&11>=document.documentMode,us=null,Kc=null,_a=null,Xc=!1;function i0(s,o,d){var p=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Xc||us==null||us!==hn(p)||(p=us,"selectionStart"in p&&Qc(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),_a&&Ea(_a,p)||(_a=p,p=lu(Kc,"onSelect"),0<p.length&&(o=new Uc("onSelect","select",null,o,d),s.push({event:o,listeners:p}),o.target=us)))}function au(s,o){var d={};return d[s.toLowerCase()]=o.toLowerCase(),d["Webkit"+s]="webkit"+o,d["Moz"+s]="moz"+o,d}var ls={animationend:au("Animation","AnimationEnd"),animationiteration:au("Animation","AnimationIteration"),animationstart:au("Animation","AnimationStart"),transitionend:au("Transition","TransitionEnd")},Zc={},s0={};l&&(s0=document.createElement("div").style,"AnimationEvent"in window||(delete ls.animationend.animation,delete ls.animationiteration.animation,delete ls.animationstart.animation),"TransitionEvent"in window||delete ls.transitionend.transition);function ou(s){if(Zc[s])return Zc[s];if(!ls[s])return s;var o=ls[s],d;for(d in o)if(o.hasOwnProperty(d)&&d in s0)return Zc[s]=o[d];return s}var a0=ou("animationend"),o0=ou("animationiteration"),u0=ou("animationstart"),l0=ou("transitionend"),c0=new Map,d0="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ur(s,o){c0.set(s,o),a(o,[s])}for(var Jc=0;Jc<d0.length;Jc++){var ed=d0[Jc],G2=ed.toLowerCase(),W2=ed[0].toUpperCase()+ed.slice(1);Ur(G2,"on"+W2)}Ur(a0,"onAnimationEnd"),Ur(o0,"onAnimationIteration"),Ur(u0,"onAnimationStart"),Ur("dblclick","onDoubleClick"),Ur("focusin","onFocus"),Ur("focusout","onBlur"),Ur(l0,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ba="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),q2=new Set("cancel close invalid load scroll toggle".split(" ").concat(ba));function f0(s,o,d){var p=s.type||"unknown-event";s.currentTarget=d,Gk(p,o,void 0,s),s.currentTarget=null}function h0(s,o){o=(o&4)!==0;for(var d=0;d<s.length;d++){var p=s[d],b=p.event;p=p.listeners;e:{var x=void 0;if(o)for(var v=p.length-1;0<=v;v--){var R=p[v],F=R.instance,q=R.currentTarget;if(R=R.listener,F!==x&&b.isPropagationStopped())break e;f0(b,R,q),x=F}else for(v=0;v<p.length;v++){if(R=p[v],F=R.instance,q=R.currentTarget,R=R.listener,F!==x&&b.isPropagationStopped())break e;f0(b,R,q),x=F}}}if(Go)throw s=Lc,Go=!1,Lc=null,s}function it(s,o){var d=o[ud];d===void 0&&(d=o[ud]=new Set);var p=s+"__bubble";d.has(p)||(p0(o,s,2,!1),d.add(p))}function td(s,o,d){var p=0;o&&(p|=4),p0(d,s,p,o)}var uu="_reactListening"+Math.random().toString(36).slice(2);function ya(s){if(!s[uu]){s[uu]=!0,r.forEach(function(d){d!=="selectionchange"&&(q2.has(d)||td(d,!1,s),td(d,!0,s))});var o=s.nodeType===9?s:s.ownerDocument;o===null||o[uu]||(o[uu]=!0,td("selectionchange",!1,o))}}function p0(s,o,d,p){switch(Bm(o)){case 1:var b=o2;break;case 4:b=u2;break;default:b=Fc}d=b.bind(null,o,d,s),b=void 0,!Nc||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(b=!0),p?b!==void 0?s.addEventListener(o,d,{capture:!0,passive:b}):s.addEventListener(o,d,!0):b!==void 0?s.addEventListener(o,d,{passive:b}):s.addEventListener(o,d,!1)}function nd(s,o,d,p,b){var x=p;if((o&1)===0&&(o&2)===0&&p!==null)e:for(;;){if(p===null)return;var v=p.tag;if(v===3||v===4){var R=p.stateNode.containerInfo;if(R===b||R.nodeType===8&&R.parentNode===b)break;if(v===4)for(v=p.return;v!==null;){var F=v.tag;if((F===3||F===4)&&(F=v.stateNode.containerInfo,F===b||F.nodeType===8&&F.parentNode===b))return;v=v.return}for(;R!==null;){if(v=yi(R),v===null)return;if(F=v.tag,F===5||F===6){p=x=v;continue e}R=R.parentNode}}p=p.return}bm(function(){var q=x,ae=Sc(d),le=[];e:{var ie=c0.get(s);if(ie!==void 0){var Ee=Uc,xe=s;switch(s){case"keypress":if(nu(d)===0)break e;case"keydown":case"keyup":Ee=k2;break;case"focusin":xe="focus",Ee=Vc;break;case"focusout":xe="blur",Ee=Vc;break;case"beforeblur":case"afterblur":Ee=Vc;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ee=Hm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ee=d2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ee=v2;break;case a0:case o0:case u0:Ee=p2;break;case l0:Ee=A2;break;case"scroll":Ee=l2;break;case"wheel":Ee=N2;break;case"copy":case"cut":case"paste":Ee=g2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ee=$m}var Ce=(o&4)!==0,ht=!Ce&&s==="scroll",V=Ce?ie!==null?ie+"Capture":null:ie;Ce=[];for(var j=q,W;j!==null;){W=j;var fe=W.stateNode;if(W.tag===5&&fe!==null&&(W=fe,V!==null&&(fe=na(j,V),fe!=null&&Ce.push(xa(j,fe,W)))),ht)break;j=j.return}0<Ce.length&&(ie=new Ee(ie,xe,null,d,ae),le.push({event:ie,listeners:Ce}))}}if((o&7)===0){e:{if(ie=s==="mouseover"||s==="pointerover",Ee=s==="mouseout"||s==="pointerout",ie&&d!==mn&&(xe=d.relatedTarget||d.fromElement)&&(yi(xe)||xe[gr]))break e;if((Ee||ie)&&(ie=ae.window===ae?ae:(ie=ae.ownerDocument)?ie.defaultView||ie.parentWindow:window,Ee?(xe=d.relatedTarget||d.toElement,Ee=q,xe=xe?yi(xe):null,xe!==null&&(ht=bi(xe),xe!==ht||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(Ee=null,xe=q),Ee!==xe)){if(Ce=Hm,fe="onMouseLeave",V="onMouseEnter",j="mouse",(s==="pointerout"||s==="pointerover")&&(Ce=$m,fe="onPointerLeave",V="onPointerEnter",j="pointer"),ht=Ee==null?ie:fs(Ee),W=xe==null?ie:fs(xe),ie=new Ce(fe,j+"leave",Ee,d,ae),ie.target=ht,ie.relatedTarget=W,fe=null,yi(ae)===q&&(Ce=new Ce(V,j+"enter",xe,d,ae),Ce.target=W,Ce.relatedTarget=ht,fe=Ce),ht=fe,Ee&&xe)t:{for(Ce=Ee,V=xe,j=0,W=Ce;W;W=cs(W))j++;for(W=0,fe=V;fe;fe=cs(fe))W++;for(;0<j-W;)Ce=cs(Ce),j--;for(;0<W-j;)V=cs(V),W--;for(;j--;){if(Ce===V||V!==null&&Ce===V.alternate)break t;Ce=cs(Ce),V=cs(V)}Ce=null}else Ce=null;Ee!==null&&m0(le,ie,Ee,Ce,!1),xe!==null&&ht!==null&&m0(le,ht,xe,Ce,!0)}}e:{if(ie=q?fs(q):window,Ee=ie.nodeName&&ie.nodeName.toLowerCase(),Ee==="select"||Ee==="input"&&ie.type==="file")var Se=B2;else if(Ym(ie))if(Km)Se=U2;else{Se=j2;var Ne=F2}else(Ee=ie.nodeName)&&Ee.toLowerCase()==="input"&&(ie.type==="checkbox"||ie.type==="radio")&&(Se=H2);if(Se&&(Se=Se(s,q))){Qm(le,Se,d,ae);break e}Ne&&Ne(s,ie,q),s==="focusout"&&(Ne=ie._wrapperState)&&Ne.controlled&&ie.type==="number"&&Xe(ie,"number",ie.value)}switch(Ne=q?fs(q):window,s){case"focusin":(Ym(Ne)||Ne.contentEditable==="true")&&(us=Ne,Kc=q,_a=null);break;case"focusout":_a=Kc=us=null;break;case"mousedown":Xc=!0;break;case"contextmenu":case"mouseup":case"dragend":Xc=!1,i0(le,d,ae);break;case"selectionchange":if(V2)break;case"keydown":case"keyup":i0(le,d,ae)}var Le;if(Wc)e:{switch(s){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else os?Wm(s,d)&&(Pe="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(Pe="onCompositionStart");Pe&&(zm&&d.locale!=="ko"&&(os||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&os&&(Le=Fm()):(Hr=ae,Hc="value"in Hr?Hr.value:Hr.textContent,os=!0)),Ne=lu(q,Pe),0<Ne.length&&(Pe=new Um(Pe,s,null,d,ae),le.push({event:Pe,listeners:Ne}),Le?Pe.data=Le:(Le=qm(d),Le!==null&&(Pe.data=Le)))),(Le=R2?O2(s,d):P2(s,d))&&(q=lu(q,"onBeforeInput"),0<q.length&&(ae=new Um("onBeforeInput","beforeinput",null,d,ae),le.push({event:ae,listeners:q}),ae.data=Le))}h0(le,o)})}function xa(s,o,d){return{instance:s,listener:o,currentTarget:d}}function lu(s,o){for(var d=o+"Capture",p=[];s!==null;){var b=s,x=b.stateNode;b.tag===5&&x!==null&&(b=x,x=na(s,d),x!=null&&p.unshift(xa(s,x,b)),x=na(s,o),x!=null&&p.push(xa(s,x,b))),s=s.return}return p}function cs(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function m0(s,o,d,p,b){for(var x=o._reactName,v=[];d!==null&&d!==p;){var R=d,F=R.alternate,q=R.stateNode;if(F!==null&&F===p)break;R.tag===5&&q!==null&&(R=q,b?(F=na(d,x),F!=null&&v.unshift(xa(d,F,R))):b||(F=na(d,x),F!=null&&v.push(xa(d,F,R)))),d=d.return}v.length!==0&&s.push({event:o,listeners:v})}var Y2=/\r\n?/g,Q2=/\u0000|\uFFFD/g;function g0(s){return(typeof s=="string"?s:""+s).replace(Y2,`
|
|
39
|
+
`).replace(Q2,"")}function cu(s,o,d){if(o=g0(o),g0(s)!==o&&d)throw Error(n(425))}function du(){}var rd=null,id=null;function sd(s,o){return s==="textarea"||s==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var ad=typeof setTimeout=="function"?setTimeout:void 0,K2=typeof clearTimeout=="function"?clearTimeout:void 0,E0=typeof Promise=="function"?Promise:void 0,X2=typeof queueMicrotask=="function"?queueMicrotask:typeof E0<"u"?function(s){return E0.resolve(null).then(s).catch(Z2)}:ad;function Z2(s){setTimeout(function(){throw s})}function od(s,o){var d=o,p=0;do{var b=d.nextSibling;if(s.removeChild(d),b&&b.nodeType===8)if(d=b.data,d==="/$"){if(p===0){s.removeChild(b),da(o);return}p--}else d!=="$"&&d!=="$?"&&d!=="$!"||p++;d=b}while(d);da(o)}function $r(s){for(;s!=null;s=s.nextSibling){var o=s.nodeType;if(o===1||o===3)break;if(o===8){if(o=s.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return s}function _0(s){s=s.previousSibling;for(var o=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"){if(o===0)return s;o--}else d==="/$"&&o++}s=s.previousSibling}return null}var ds=Math.random().toString(36).slice(2),tr="__reactFiber$"+ds,Ta="__reactProps$"+ds,gr="__reactContainer$"+ds,ud="__reactEvents$"+ds,J2="__reactListeners$"+ds,ew="__reactHandles$"+ds;function yi(s){var o=s[tr];if(o)return o;for(var d=s.parentNode;d;){if(o=d[gr]||d[tr]){if(d=o.alternate,o.child!==null||d!==null&&d.child!==null)for(s=_0(s);s!==null;){if(d=s[tr])return d;s=_0(s)}return o}s=d,d=s.parentNode}return null}function ka(s){return s=s[tr]||s[gr],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function fs(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function fu(s){return s[Ta]||null}var ld=[],hs=-1;function zr(s){return{current:s}}function st(s){0>hs||(s.current=ld[hs],ld[hs]=null,hs--)}function nt(s,o){hs++,ld[hs]=s.current,s.current=o}var Vr={},Ht=zr(Vr),rn=zr(!1),xi=Vr;function ps(s,o){var d=s.type.contextTypes;if(!d)return Vr;var p=s.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===o)return p.__reactInternalMemoizedMaskedChildContext;var b={},x;for(x in d)b[x]=o[x];return p&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=o,s.__reactInternalMemoizedMaskedChildContext=b),b}function sn(s){return s=s.childContextTypes,s!=null}function hu(){st(rn),st(Ht)}function b0(s,o,d){if(Ht.current!==Vr)throw Error(n(168));nt(Ht,o),nt(rn,d)}function y0(s,o,d){var p=s.stateNode;if(o=o.childContextTypes,typeof p.getChildContext!="function")return d;p=p.getChildContext();for(var b in p)if(!(b in o))throw Error(n(108,Fe(s)||"Unknown",b));return S({},d,p)}function pu(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Vr,xi=Ht.current,nt(Ht,s),nt(rn,rn.current),!0}function x0(s,o,d){var p=s.stateNode;if(!p)throw Error(n(169));d?(s=y0(s,o,xi),p.__reactInternalMemoizedMergedChildContext=s,st(rn),st(Ht),nt(Ht,s)):st(rn),nt(rn,d)}var Er=null,mu=!1,cd=!1;function T0(s){Er===null?Er=[s]:Er.push(s)}function tw(s){mu=!0,T0(s)}function Gr(){if(!cd&&Er!==null){cd=!0;var s=0,o=Ze;try{var d=Er;for(Ze=1;s<d.length;s++){var p=d[s];do p=p(!0);while(p!==null)}Er=null,mu=!1}catch(b){throw Er!==null&&(Er=Er.slice(s+1)),wm(Rc,Gr),b}finally{Ze=o,cd=!1}}return null}var ms=[],gs=0,gu=null,Eu=0,wn=[],Cn=0,Ti=null,_r=1,br="";function ki(s,o){ms[gs++]=Eu,ms[gs++]=gu,gu=s,Eu=o}function k0(s,o,d){wn[Cn++]=_r,wn[Cn++]=br,wn[Cn++]=Ti,Ti=s;var p=_r;s=br;var b=32-jn(p)-1;p&=~(1<<b),d+=1;var x=32-jn(o)+b;if(30<x){var v=b-b%5;x=(p&(1<<v)-1).toString(32),p>>=v,b-=v,_r=1<<32-jn(o)+b|d<<b|p,br=x+s}else _r=1<<x|d<<b|p,br=s}function dd(s){s.return!==null&&(ki(s,1),k0(s,1,0))}function fd(s){for(;s===gu;)gu=ms[--gs],ms[gs]=null,Eu=ms[--gs],ms[gs]=null;for(;s===Ti;)Ti=wn[--Cn],wn[Cn]=null,br=wn[--Cn],wn[Cn]=null,_r=wn[--Cn],wn[Cn]=null}var En=null,_n=null,at=!1,Un=null;function w0(s,o){var d=In(5,null,null,0);d.elementType="DELETED",d.stateNode=o,d.return=s,o=s.deletions,o===null?(s.deletions=[d],s.flags|=16):o.push(d)}function C0(s,o){switch(s.tag){case 5:var d=s.type;return o=o.nodeType!==1||d.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(s.stateNode=o,En=s,_n=$r(o.firstChild),!0):!1;case 6:return o=s.pendingProps===""||o.nodeType!==3?null:o,o!==null?(s.stateNode=o,En=s,_n=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(d=Ti!==null?{id:_r,overflow:br}:null,s.memoizedState={dehydrated:o,treeContext:d,retryLane:1073741824},d=In(18,null,null,0),d.stateNode=o,d.return=s,s.child=d,En=s,_n=null,!0):!1;default:return!1}}function hd(s){return(s.mode&1)!==0&&(s.flags&128)===0}function pd(s){if(at){var o=_n;if(o){var d=o;if(!C0(s,o)){if(hd(s))throw Error(n(418));o=$r(d.nextSibling);var p=En;o&&C0(s,o)?w0(p,d):(s.flags=s.flags&-4097|2,at=!1,En=s)}}else{if(hd(s))throw Error(n(418));s.flags=s.flags&-4097|2,at=!1,En=s}}}function v0(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;En=s}function _u(s){if(s!==En)return!1;if(!at)return v0(s),at=!0,!1;var o;if((o=s.tag!==3)&&!(o=s.tag!==5)&&(o=s.type,o=o!=="head"&&o!=="body"&&!sd(s.type,s.memoizedProps)),o&&(o=_n)){if(hd(s))throw S0(),Error(n(418));for(;o;)w0(s,o),o=$r(o.nextSibling)}if(v0(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));e:{for(s=s.nextSibling,o=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"){if(o===0){_n=$r(s.nextSibling);break e}o--}else d!=="$"&&d!=="$!"&&d!=="$?"||o++}s=s.nextSibling}_n=null}}else _n=En?$r(s.stateNode.nextSibling):null;return!0}function S0(){for(var s=_n;s;)s=$r(s.nextSibling)}function Es(){_n=En=null,at=!1}function md(s){Un===null?Un=[s]:Un.push(s)}var nw=U.ReactCurrentBatchConfig;function wa(s,o,d){if(s=d.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(n(309));var p=d.stateNode}if(!p)throw Error(n(147,s));var b=p,x=""+s;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===x?o.ref:(o=function(v){var R=b.refs;v===null?delete R[x]:R[x]=v},o._stringRef=x,o)}if(typeof s!="string")throw Error(n(284));if(!d._owner)throw Error(n(290,s))}return s}function bu(s,o){throw s=Object.prototype.toString.call(o),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":s))}function A0(s){var o=s._init;return o(s._payload)}function I0(s){function o(V,j){if(s){var W=V.deletions;W===null?(V.deletions=[j],V.flags|=16):W.push(j)}}function d(V,j){if(!s)return null;for(;j!==null;)o(V,j),j=j.sibling;return null}function p(V,j){for(V=new Map;j!==null;)j.key!==null?V.set(j.key,j):V.set(j.index,j),j=j.sibling;return V}function b(V,j){return V=Jr(V,j),V.index=0,V.sibling=null,V}function x(V,j,W){return V.index=W,s?(W=V.alternate,W!==null?(W=W.index,W<j?(V.flags|=2,j):W):(V.flags|=2,j)):(V.flags|=1048576,j)}function v(V){return s&&V.alternate===null&&(V.flags|=2),V}function R(V,j,W,fe){return j===null||j.tag!==6?(j=of(W,V.mode,fe),j.return=V,j):(j=b(j,W),j.return=V,j)}function F(V,j,W,fe){var Se=W.type;return Se===X?ae(V,j,W.props.children,fe,W.key):j!==null&&(j.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===ee&&A0(Se)===j.type)?(fe=b(j,W.props),fe.ref=wa(V,j,W),fe.return=V,fe):(fe=zu(W.type,W.key,W.props,null,V.mode,fe),fe.ref=wa(V,j,W),fe.return=V,fe)}function q(V,j,W,fe){return j===null||j.tag!==4||j.stateNode.containerInfo!==W.containerInfo||j.stateNode.implementation!==W.implementation?(j=uf(W,V.mode,fe),j.return=V,j):(j=b(j,W.children||[]),j.return=V,j)}function ae(V,j,W,fe,Se){return j===null||j.tag!==7?(j=Li(W,V.mode,fe,Se),j.return=V,j):(j=b(j,W),j.return=V,j)}function le(V,j,W){if(typeof j=="string"&&j!==""||typeof j=="number")return j=of(""+j,V.mode,W),j.return=V,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case z:return W=zu(j.type,j.key,j.props,null,V.mode,W),W.ref=wa(V,null,j),W.return=V,W;case B:return j=uf(j,V.mode,W),j.return=V,j;case ee:var fe=j._init;return le(V,fe(j._payload),W)}if(Et(j)||ge(j))return j=Li(j,V.mode,W,null),j.return=V,j;bu(V,j)}return null}function ie(V,j,W,fe){var Se=j!==null?j.key:null;if(typeof W=="string"&&W!==""||typeof W=="number")return Se!==null?null:R(V,j,""+W,fe);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case z:return W.key===Se?F(V,j,W,fe):null;case B:return W.key===Se?q(V,j,W,fe):null;case ee:return Se=W._init,ie(V,j,Se(W._payload),fe)}if(Et(W)||ge(W))return Se!==null?null:ae(V,j,W,fe,null);bu(V,W)}return null}function Ee(V,j,W,fe,Se){if(typeof fe=="string"&&fe!==""||typeof fe=="number")return V=V.get(W)||null,R(j,V,""+fe,Se);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case z:return V=V.get(fe.key===null?W:fe.key)||null,F(j,V,fe,Se);case B:return V=V.get(fe.key===null?W:fe.key)||null,q(j,V,fe,Se);case ee:var Ne=fe._init;return Ee(V,j,W,Ne(fe._payload),Se)}if(Et(fe)||ge(fe))return V=V.get(W)||null,ae(j,V,fe,Se,null);bu(j,fe)}return null}function xe(V,j,W,fe){for(var Se=null,Ne=null,Le=j,Pe=j=0,It=null;Le!==null&&Pe<W.length;Pe++){Le.index>Pe?(It=Le,Le=null):It=Le.sibling;var Ke=ie(V,Le,W[Pe],fe);if(Ke===null){Le===null&&(Le=It);break}s&&Le&&Ke.alternate===null&&o(V,Le),j=x(Ke,j,Pe),Ne===null?Se=Ke:Ne.sibling=Ke,Ne=Ke,Le=It}if(Pe===W.length)return d(V,Le),at&&ki(V,Pe),Se;if(Le===null){for(;Pe<W.length;Pe++)Le=le(V,W[Pe],fe),Le!==null&&(j=x(Le,j,Pe),Ne===null?Se=Le:Ne.sibling=Le,Ne=Le);return at&&ki(V,Pe),Se}for(Le=p(V,Le);Pe<W.length;Pe++)It=Ee(Le,V,Pe,W[Pe],fe),It!==null&&(s&&It.alternate!==null&&Le.delete(It.key===null?Pe:It.key),j=x(It,j,Pe),Ne===null?Se=It:Ne.sibling=It,Ne=It);return s&&Le.forEach(function(ei){return o(V,ei)}),at&&ki(V,Pe),Se}function Ce(V,j,W,fe){var Se=ge(W);if(typeof Se!="function")throw Error(n(150));if(W=Se.call(W),W==null)throw Error(n(151));for(var Ne=Se=null,Le=j,Pe=j=0,It=null,Ke=W.next();Le!==null&&!Ke.done;Pe++,Ke=W.next()){Le.index>Pe?(It=Le,Le=null):It=Le.sibling;var ei=ie(V,Le,Ke.value,fe);if(ei===null){Le===null&&(Le=It);break}s&&Le&&ei.alternate===null&&o(V,Le),j=x(ei,j,Pe),Ne===null?Se=ei:Ne.sibling=ei,Ne=ei,Le=It}if(Ke.done)return d(V,Le),at&&ki(V,Pe),Se;if(Le===null){for(;!Ke.done;Pe++,Ke=W.next())Ke=le(V,Ke.value,fe),Ke!==null&&(j=x(Ke,j,Pe),Ne===null?Se=Ke:Ne.sibling=Ke,Ne=Ke);return at&&ki(V,Pe),Se}for(Le=p(V,Le);!Ke.done;Pe++,Ke=W.next())Ke=Ee(Le,V,Pe,Ke.value,fe),Ke!==null&&(s&&Ke.alternate!==null&&Le.delete(Ke.key===null?Pe:Ke.key),j=x(Ke,j,Pe),Ne===null?Se=Ke:Ne.sibling=Ke,Ne=Ke);return s&&Le.forEach(function(Dw){return o(V,Dw)}),at&&ki(V,Pe),Se}function ht(V,j,W,fe){if(typeof W=="object"&&W!==null&&W.type===X&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case z:e:{for(var Se=W.key,Ne=j;Ne!==null;){if(Ne.key===Se){if(Se=W.type,Se===X){if(Ne.tag===7){d(V,Ne.sibling),j=b(Ne,W.props.children),j.return=V,V=j;break e}}else if(Ne.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===ee&&A0(Se)===Ne.type){d(V,Ne.sibling),j=b(Ne,W.props),j.ref=wa(V,Ne,W),j.return=V,V=j;break e}d(V,Ne);break}else o(V,Ne);Ne=Ne.sibling}W.type===X?(j=Li(W.props.children,V.mode,fe,W.key),j.return=V,V=j):(fe=zu(W.type,W.key,W.props,null,V.mode,fe),fe.ref=wa(V,j,W),fe.return=V,V=fe)}return v(V);case B:e:{for(Ne=W.key;j!==null;){if(j.key===Ne)if(j.tag===4&&j.stateNode.containerInfo===W.containerInfo&&j.stateNode.implementation===W.implementation){d(V,j.sibling),j=b(j,W.children||[]),j.return=V,V=j;break e}else{d(V,j);break}else o(V,j);j=j.sibling}j=uf(W,V.mode,fe),j.return=V,V=j}return v(V);case ee:return Ne=W._init,ht(V,j,Ne(W._payload),fe)}if(Et(W))return xe(V,j,W,fe);if(ge(W))return Ce(V,j,W,fe);bu(V,W)}return typeof W=="string"&&W!==""||typeof W=="number"?(W=""+W,j!==null&&j.tag===6?(d(V,j.sibling),j=b(j,W),j.return=V,V=j):(d(V,j),j=of(W,V.mode,fe),j.return=V,V=j),v(V)):d(V,j)}return ht}var _s=I0(!0),N0=I0(!1),yu=zr(null),xu=null,bs=null,gd=null;function Ed(){gd=bs=xu=null}function _d(s){var o=yu.current;st(yu),s._currentValue=o}function bd(s,o,d){for(;s!==null;){var p=s.alternate;if((s.childLanes&o)!==o?(s.childLanes|=o,p!==null&&(p.childLanes|=o)):p!==null&&(p.childLanes&o)!==o&&(p.childLanes|=o),s===d)break;s=s.return}}function ys(s,o){xu=s,gd=bs=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&o)!==0&&(an=!0),s.firstContext=null)}function vn(s){var o=s._currentValue;if(gd!==s)if(s={context:s,memoizedValue:o,next:null},bs===null){if(xu===null)throw Error(n(308));bs=s,xu.dependencies={lanes:0,firstContext:s}}else bs=bs.next=s;return o}var wi=null;function yd(s){wi===null?wi=[s]:wi.push(s)}function L0(s,o,d,p){var b=o.interleaved;return b===null?(d.next=d,yd(o)):(d.next=b.next,b.next=d),o.interleaved=d,yr(s,p)}function yr(s,o){s.lanes|=o;var d=s.alternate;for(d!==null&&(d.lanes|=o),d=s,s=s.return;s!==null;)s.childLanes|=o,d=s.alternate,d!==null&&(d.childLanes|=o),d=s,s=s.return;return d.tag===3?d.stateNode:null}var Wr=!1;function xd(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function R0(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function xr(s,o){return{eventTime:s,lane:o,tag:0,payload:null,callback:null,next:null}}function qr(s,o,d){var p=s.updateQueue;if(p===null)return null;if(p=p.shared,(Qe&2)!==0){var b=p.pending;return b===null?o.next=o:(o.next=b.next,b.next=o),p.pending=o,yr(s,d)}return b=p.interleaved,b===null?(o.next=o,yd(p)):(o.next=b.next,b.next=o),p.interleaved=o,yr(s,d)}function Tu(s,o,d){if(o=o.updateQueue,o!==null&&(o=o.shared,(d&4194240)!==0)){var p=o.lanes;p&=s.pendingLanes,d|=p,o.lanes=d,Dc(s,d)}}function O0(s,o){var d=s.updateQueue,p=s.alternate;if(p!==null&&(p=p.updateQueue,d===p)){var b=null,x=null;if(d=d.firstBaseUpdate,d!==null){do{var v={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};x===null?b=x=v:x=x.next=v,d=d.next}while(d!==null);x===null?b=x=o:x=x.next=o}else b=x=o;d={baseState:p.baseState,firstBaseUpdate:b,lastBaseUpdate:x,shared:p.shared,effects:p.effects},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=o:s.next=o,d.lastBaseUpdate=o}function ku(s,o,d,p){var b=s.updateQueue;Wr=!1;var x=b.firstBaseUpdate,v=b.lastBaseUpdate,R=b.shared.pending;if(R!==null){b.shared.pending=null;var F=R,q=F.next;F.next=null,v===null?x=q:v.next=q,v=F;var ae=s.alternate;ae!==null&&(ae=ae.updateQueue,R=ae.lastBaseUpdate,R!==v&&(R===null?ae.firstBaseUpdate=q:R.next=q,ae.lastBaseUpdate=F))}if(x!==null){var le=b.baseState;v=0,ae=q=F=null,R=x;do{var ie=R.lane,Ee=R.eventTime;if((p&ie)===ie){ae!==null&&(ae=ae.next={eventTime:Ee,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var xe=s,Ce=R;switch(ie=o,Ee=d,Ce.tag){case 1:if(xe=Ce.payload,typeof xe=="function"){le=xe.call(Ee,le,ie);break e}le=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Ce.payload,ie=typeof xe=="function"?xe.call(Ee,le,ie):xe,ie==null)break e;le=S({},le,ie);break e;case 2:Wr=!0}}R.callback!==null&&R.lane!==0&&(s.flags|=64,ie=b.effects,ie===null?b.effects=[R]:ie.push(R))}else Ee={eventTime:Ee,lane:ie,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ae===null?(q=ae=Ee,F=le):ae=ae.next=Ee,v|=ie;if(R=R.next,R===null){if(R=b.shared.pending,R===null)break;ie=R,R=ie.next,ie.next=null,b.lastBaseUpdate=ie,b.shared.pending=null}}while(!0);if(ae===null&&(F=le),b.baseState=F,b.firstBaseUpdate=q,b.lastBaseUpdate=ae,o=b.shared.interleaved,o!==null){b=o;do v|=b.lane,b=b.next;while(b!==o)}else x===null&&(b.shared.lanes=0);Si|=v,s.lanes=v,s.memoizedState=le}}function P0(s,o,d){if(s=o.effects,o.effects=null,s!==null)for(o=0;o<s.length;o++){var p=s[o],b=p.callback;if(b!==null){if(p.callback=null,p=d,typeof b!="function")throw Error(n(191,b));b.call(p)}}}var Ca={},nr=zr(Ca),va=zr(Ca),Sa=zr(Ca);function Ci(s){if(s===Ca)throw Error(n(174));return s}function Td(s,o){switch(nt(Sa,o),nt(va,s),nt(nr,Ca),s=o.nodeType,s){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:pe(null,"");break;default:s=s===8?o.parentNode:o,o=s.namespaceURI||null,s=s.tagName,o=pe(o,s)}st(nr),nt(nr,o)}function xs(){st(nr),st(va),st(Sa)}function D0(s){Ci(Sa.current);var o=Ci(nr.current),d=pe(o,s.type);o!==d&&(nt(va,s),nt(nr,d))}function kd(s){va.current===s&&(st(nr),st(va))}var ut=zr(0);function wu(s){for(var o=s;o!==null;){if(o.tag===13){var d=o.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var wd=[];function Cd(){for(var s=0;s<wd.length;s++)wd[s]._workInProgressVersionPrimary=null;wd.length=0}var Cu=U.ReactCurrentDispatcher,vd=U.ReactCurrentBatchConfig,vi=0,lt=null,xt=null,St=null,vu=!1,Aa=!1,Ia=0,rw=0;function Ut(){throw Error(n(321))}function Sd(s,o){if(o===null)return!1;for(var d=0;d<o.length&&d<s.length;d++)if(!Hn(s[d],o[d]))return!1;return!0}function Ad(s,o,d,p,b,x){if(vi=x,lt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Cu.current=s===null||s.memoizedState===null?ow:uw,s=d(p,b),Aa){x=0;do{if(Aa=!1,Ia=0,25<=x)throw Error(n(301));x+=1,St=xt=null,o.updateQueue=null,Cu.current=lw,s=d(p,b)}while(Aa)}if(Cu.current=Iu,o=xt!==null&&xt.next!==null,vi=0,St=xt=lt=null,vu=!1,o)throw Error(n(300));return s}function Id(){var s=Ia!==0;return Ia=0,s}function rr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?lt.memoizedState=St=s:St=St.next=s,St}function Sn(){if(xt===null){var s=lt.alternate;s=s!==null?s.memoizedState:null}else s=xt.next;var o=St===null?lt.memoizedState:St.next;if(o!==null)St=o,xt=s;else{if(s===null)throw Error(n(310));xt=s,s={memoizedState:xt.memoizedState,baseState:xt.baseState,baseQueue:xt.baseQueue,queue:xt.queue,next:null},St===null?lt.memoizedState=St=s:St=St.next=s}return St}function Na(s,o){return typeof o=="function"?o(s):o}function Nd(s){var o=Sn(),d=o.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=s;var p=xt,b=p.baseQueue,x=d.pending;if(x!==null){if(b!==null){var v=b.next;b.next=x.next,x.next=v}p.baseQueue=b=x,d.pending=null}if(b!==null){x=b.next,p=p.baseState;var R=v=null,F=null,q=x;do{var ae=q.lane;if((vi&ae)===ae)F!==null&&(F=F.next={lane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),p=q.hasEagerState?q.eagerState:s(p,q.action);else{var le={lane:ae,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null};F===null?(R=F=le,v=p):F=F.next=le,lt.lanes|=ae,Si|=ae}q=q.next}while(q!==null&&q!==x);F===null?v=p:F.next=R,Hn(p,o.memoizedState)||(an=!0),o.memoizedState=p,o.baseState=v,o.baseQueue=F,d.lastRenderedState=p}if(s=d.interleaved,s!==null){b=s;do x=b.lane,lt.lanes|=x,Si|=x,b=b.next;while(b!==s)}else b===null&&(d.lanes=0);return[o.memoizedState,d.dispatch]}function Ld(s){var o=Sn(),d=o.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=s;var p=d.dispatch,b=d.pending,x=o.memoizedState;if(b!==null){d.pending=null;var v=b=b.next;do x=s(x,v.action),v=v.next;while(v!==b);Hn(x,o.memoizedState)||(an=!0),o.memoizedState=x,o.baseQueue===null&&(o.baseState=x),d.lastRenderedState=x}return[x,p]}function M0(){}function B0(s,o){var d=lt,p=Sn(),b=o(),x=!Hn(p.memoizedState,b);if(x&&(p.memoizedState=b,an=!0),p=p.queue,Rd(H0.bind(null,d,p,s),[s]),p.getSnapshot!==o||x||St!==null&&St.memoizedState.tag&1){if(d.flags|=2048,La(9,j0.bind(null,d,p,b,o),void 0,null),At===null)throw Error(n(349));(vi&30)!==0||F0(d,o,b)}return b}function F0(s,o,d){s.flags|=16384,s={getSnapshot:o,value:d},o=lt.updateQueue,o===null?(o={lastEffect:null,stores:null},lt.updateQueue=o,o.stores=[s]):(d=o.stores,d===null?o.stores=[s]:d.push(s))}function j0(s,o,d,p){o.value=d,o.getSnapshot=p,U0(o)&&$0(s)}function H0(s,o,d){return d(function(){U0(o)&&$0(s)})}function U0(s){var o=s.getSnapshot;s=s.value;try{var d=o();return!Hn(s,d)}catch{return!0}}function $0(s){var o=yr(s,1);o!==null&&Gn(o,s,1,-1)}function z0(s){var o=rr();return typeof s=="function"&&(s=s()),o.memoizedState=o.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:s},o.queue=s,s=s.dispatch=aw.bind(null,lt,s),[o.memoizedState,s]}function La(s,o,d,p){return s={tag:s,create:o,destroy:d,deps:p,next:null},o=lt.updateQueue,o===null?(o={lastEffect:null,stores:null},lt.updateQueue=o,o.lastEffect=s.next=s):(d=o.lastEffect,d===null?o.lastEffect=s.next=s:(p=d.next,d.next=s,s.next=p,o.lastEffect=s)),s}function V0(){return Sn().memoizedState}function Su(s,o,d,p){var b=rr();lt.flags|=s,b.memoizedState=La(1|o,d,void 0,p===void 0?null:p)}function Au(s,o,d,p){var b=Sn();p=p===void 0?null:p;var x=void 0;if(xt!==null){var v=xt.memoizedState;if(x=v.destroy,p!==null&&Sd(p,v.deps)){b.memoizedState=La(o,d,x,p);return}}lt.flags|=s,b.memoizedState=La(1|o,d,x,p)}function G0(s,o){return Su(8390656,8,s,o)}function Rd(s,o){return Au(2048,8,s,o)}function W0(s,o){return Au(4,2,s,o)}function q0(s,o){return Au(4,4,s,o)}function Y0(s,o){if(typeof o=="function")return s=s(),o(s),function(){o(null)};if(o!=null)return s=s(),o.current=s,function(){o.current=null}}function Q0(s,o,d){return d=d!=null?d.concat([s]):null,Au(4,4,Y0.bind(null,o,s),d)}function Od(){}function K0(s,o){var d=Sn();o=o===void 0?null:o;var p=d.memoizedState;return p!==null&&o!==null&&Sd(o,p[1])?p[0]:(d.memoizedState=[s,o],s)}function X0(s,o){var d=Sn();o=o===void 0?null:o;var p=d.memoizedState;return p!==null&&o!==null&&Sd(o,p[1])?p[0]:(s=s(),d.memoizedState=[s,o],s)}function Z0(s,o,d){return(vi&21)===0?(s.baseState&&(s.baseState=!1,an=!0),s.memoizedState=d):(Hn(d,o)||(d=Am(),lt.lanes|=d,Si|=d,s.baseState=!0),o)}function iw(s,o){var d=Ze;Ze=d!==0&&4>d?d:4,s(!0);var p=vd.transition;vd.transition={};try{s(!1),o()}finally{Ze=d,vd.transition=p}}function J0(){return Sn().memoizedState}function sw(s,o,d){var p=Xr(s);if(d={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null},eg(s))tg(o,d);else if(d=L0(s,o,d,p),d!==null){var b=Kt();Gn(d,s,p,b),ng(d,o,p)}}function aw(s,o,d){var p=Xr(s),b={lane:p,action:d,hasEagerState:!1,eagerState:null,next:null};if(eg(s))tg(o,b);else{var x=s.alternate;if(s.lanes===0&&(x===null||x.lanes===0)&&(x=o.lastRenderedReducer,x!==null))try{var v=o.lastRenderedState,R=x(v,d);if(b.hasEagerState=!0,b.eagerState=R,Hn(R,v)){var F=o.interleaved;F===null?(b.next=b,yd(o)):(b.next=F.next,F.next=b),o.interleaved=b;return}}catch{}finally{}d=L0(s,o,b,p),d!==null&&(b=Kt(),Gn(d,s,p,b),ng(d,o,p))}}function eg(s){var o=s.alternate;return s===lt||o!==null&&o===lt}function tg(s,o){Aa=vu=!0;var d=s.pending;d===null?o.next=o:(o.next=d.next,d.next=o),s.pending=o}function ng(s,o,d){if((d&4194240)!==0){var p=o.lanes;p&=s.pendingLanes,d|=p,o.lanes=d,Dc(s,d)}}var Iu={readContext:vn,useCallback:Ut,useContext:Ut,useEffect:Ut,useImperativeHandle:Ut,useInsertionEffect:Ut,useLayoutEffect:Ut,useMemo:Ut,useReducer:Ut,useRef:Ut,useState:Ut,useDebugValue:Ut,useDeferredValue:Ut,useTransition:Ut,useMutableSource:Ut,useSyncExternalStore:Ut,useId:Ut,unstable_isNewReconciler:!1},ow={readContext:vn,useCallback:function(s,o){return rr().memoizedState=[s,o===void 0?null:o],s},useContext:vn,useEffect:G0,useImperativeHandle:function(s,o,d){return d=d!=null?d.concat([s]):null,Su(4194308,4,Y0.bind(null,o,s),d)},useLayoutEffect:function(s,o){return Su(4194308,4,s,o)},useInsertionEffect:function(s,o){return Su(4,2,s,o)},useMemo:function(s,o){var d=rr();return o=o===void 0?null:o,s=s(),d.memoizedState=[s,o],s},useReducer:function(s,o,d){var p=rr();return o=d!==void 0?d(o):o,p.memoizedState=p.baseState=o,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:o},p.queue=s,s=s.dispatch=sw.bind(null,lt,s),[p.memoizedState,s]},useRef:function(s){var o=rr();return s={current:s},o.memoizedState=s},useState:z0,useDebugValue:Od,useDeferredValue:function(s){return rr().memoizedState=s},useTransition:function(){var s=z0(!1),o=s[0];return s=iw.bind(null,s[1]),rr().memoizedState=s,[o,s]},useMutableSource:function(){},useSyncExternalStore:function(s,o,d){var p=lt,b=rr();if(at){if(d===void 0)throw Error(n(407));d=d()}else{if(d=o(),At===null)throw Error(n(349));(vi&30)!==0||F0(p,o,d)}b.memoizedState=d;var x={value:d,getSnapshot:o};return b.queue=x,G0(H0.bind(null,p,x,s),[s]),p.flags|=2048,La(9,j0.bind(null,p,x,d,o),void 0,null),d},useId:function(){var s=rr(),o=At.identifierPrefix;if(at){var d=br,p=_r;d=(p&~(1<<32-jn(p)-1)).toString(32)+d,o=":"+o+"R"+d,d=Ia++,0<d&&(o+="H"+d.toString(32)),o+=":"}else d=rw++,o=":"+o+"r"+d.toString(32)+":";return s.memoizedState=o},unstable_isNewReconciler:!1},uw={readContext:vn,useCallback:K0,useContext:vn,useEffect:Rd,useImperativeHandle:Q0,useInsertionEffect:W0,useLayoutEffect:q0,useMemo:X0,useReducer:Nd,useRef:V0,useState:function(){return Nd(Na)},useDebugValue:Od,useDeferredValue:function(s){var o=Sn();return Z0(o,xt.memoizedState,s)},useTransition:function(){var s=Nd(Na)[0],o=Sn().memoizedState;return[s,o]},useMutableSource:M0,useSyncExternalStore:B0,useId:J0,unstable_isNewReconciler:!1},lw={readContext:vn,useCallback:K0,useContext:vn,useEffect:Rd,useImperativeHandle:Q0,useInsertionEffect:W0,useLayoutEffect:q0,useMemo:X0,useReducer:Ld,useRef:V0,useState:function(){return Ld(Na)},useDebugValue:Od,useDeferredValue:function(s){var o=Sn();return xt===null?o.memoizedState=s:Z0(o,xt.memoizedState,s)},useTransition:function(){var s=Ld(Na)[0],o=Sn().memoizedState;return[s,o]},useMutableSource:M0,useSyncExternalStore:B0,useId:J0,unstable_isNewReconciler:!1};function $n(s,o){if(s&&s.defaultProps){o=S({},o),s=s.defaultProps;for(var d in s)o[d]===void 0&&(o[d]=s[d]);return o}return o}function Pd(s,o,d,p){o=s.memoizedState,d=d(p,o),d=d==null?o:S({},o,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var Nu={isMounted:function(s){return(s=s._reactInternals)?bi(s)===s:!1},enqueueSetState:function(s,o,d){s=s._reactInternals;var p=Kt(),b=Xr(s),x=xr(p,b);x.payload=o,d!=null&&(x.callback=d),o=qr(s,x,b),o!==null&&(Gn(o,s,b,p),Tu(o,s,b))},enqueueReplaceState:function(s,o,d){s=s._reactInternals;var p=Kt(),b=Xr(s),x=xr(p,b);x.tag=1,x.payload=o,d!=null&&(x.callback=d),o=qr(s,x,b),o!==null&&(Gn(o,s,b,p),Tu(o,s,b))},enqueueForceUpdate:function(s,o){s=s._reactInternals;var d=Kt(),p=Xr(s),b=xr(d,p);b.tag=2,o!=null&&(b.callback=o),o=qr(s,b,p),o!==null&&(Gn(o,s,p,d),Tu(o,s,p))}};function rg(s,o,d,p,b,x,v){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(p,x,v):o.prototype&&o.prototype.isPureReactComponent?!Ea(d,p)||!Ea(b,x):!0}function ig(s,o,d){var p=!1,b=Vr,x=o.contextType;return typeof x=="object"&&x!==null?x=vn(x):(b=sn(o)?xi:Ht.current,p=o.contextTypes,x=(p=p!=null)?ps(s,b):Vr),o=new o(d,x),s.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Nu,s.stateNode=o,o._reactInternals=s,p&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=b,s.__reactInternalMemoizedMaskedChildContext=x),o}function sg(s,o,d,p){s=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(d,p),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(d,p),o.state!==s&&Nu.enqueueReplaceState(o,o.state,null)}function Dd(s,o,d,p){var b=s.stateNode;b.props=d,b.state=s.memoizedState,b.refs={},xd(s);var x=o.contextType;typeof x=="object"&&x!==null?b.context=vn(x):(x=sn(o)?xi:Ht.current,b.context=ps(s,x)),b.state=s.memoizedState,x=o.getDerivedStateFromProps,typeof x=="function"&&(Pd(s,o,x,d),b.state=s.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(o=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),o!==b.state&&Nu.enqueueReplaceState(b,b.state,null),ku(s,d,b,p),b.state=s.memoizedState),typeof b.componentDidMount=="function"&&(s.flags|=4194308)}function Ts(s,o){try{var d="",p=o;do d+=be(p),p=p.return;while(p);var b=d}catch(x){b=`
|
|
40
|
+
Error generating stack: `+x.message+`
|
|
41
|
+
`+x.stack}return{value:s,source:o,stack:b,digest:null}}function Md(s,o,d){return{value:s,source:null,stack:d??null,digest:o??null}}function Bd(s,o){try{console.error(o.value)}catch(d){setTimeout(function(){throw d})}}var cw=typeof WeakMap=="function"?WeakMap:Map;function ag(s,o,d){d=xr(-1,d),d.tag=3,d.payload={element:null};var p=o.value;return d.callback=function(){Bu||(Bu=!0,Zd=p),Bd(s,o)},d}function og(s,o,d){d=xr(-1,d),d.tag=3;var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var b=o.value;d.payload=function(){return p(b)},d.callback=function(){Bd(s,o)}}var x=s.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(d.callback=function(){Bd(s,o),typeof p!="function"&&(Qr===null?Qr=new Set([this]):Qr.add(this));var v=o.stack;this.componentDidCatch(o.value,{componentStack:v!==null?v:""})}),d}function ug(s,o,d){var p=s.pingCache;if(p===null){p=s.pingCache=new cw;var b=new Set;p.set(o,b)}else b=p.get(o),b===void 0&&(b=new Set,p.set(o,b));b.has(d)||(b.add(d),s=ww.bind(null,s,o,d),o.then(s,s))}function lg(s){do{var o;if((o=s.tag===13)&&(o=s.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return s;s=s.return}while(s!==null);return null}function cg(s,o,d,p,b){return(s.mode&1)===0?(s===o?s.flags|=65536:(s.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(o=xr(-1,1),o.tag=2,qr(d,o,1))),d.lanes|=1),s):(s.flags|=65536,s.lanes=b,s)}var dw=U.ReactCurrentOwner,an=!1;function Qt(s,o,d,p){o.child=s===null?N0(o,null,d,p):_s(o,s.child,d,p)}function dg(s,o,d,p,b){d=d.render;var x=o.ref;return ys(o,b),p=Ad(s,o,d,p,x,b),d=Id(),s!==null&&!an?(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~b,Tr(s,o,b)):(at&&d&&dd(o),o.flags|=1,Qt(s,o,p,b),o.child)}function fg(s,o,d,p,b){if(s===null){var x=d.type;return typeof x=="function"&&!af(x)&&x.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(o.tag=15,o.type=x,hg(s,o,x,p,b)):(s=zu(d.type,null,p,o,o.mode,b),s.ref=o.ref,s.return=o,o.child=s)}if(x=s.child,(s.lanes&b)===0){var v=x.memoizedProps;if(d=d.compare,d=d!==null?d:Ea,d(v,p)&&s.ref===o.ref)return Tr(s,o,b)}return o.flags|=1,s=Jr(x,p),s.ref=o.ref,s.return=o,o.child=s}function hg(s,o,d,p,b){if(s!==null){var x=s.memoizedProps;if(Ea(x,p)&&s.ref===o.ref)if(an=!1,o.pendingProps=p=x,(s.lanes&b)!==0)(s.flags&131072)!==0&&(an=!0);else return o.lanes=s.lanes,Tr(s,o,b)}return Fd(s,o,d,p,b)}function pg(s,o,d){var p=o.pendingProps,b=p.children,x=s!==null?s.memoizedState:null;if(p.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},nt(ws,bn),bn|=d;else{if((d&1073741824)===0)return s=x!==null?x.baseLanes|d:d,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:s,cachePool:null,transitions:null},o.updateQueue=null,nt(ws,bn),bn|=s,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=x!==null?x.baseLanes:d,nt(ws,bn),bn|=p}else x!==null?(p=x.baseLanes|d,o.memoizedState=null):p=d,nt(ws,bn),bn|=p;return Qt(s,o,b,d),o.child}function mg(s,o){var d=o.ref;(s===null&&d!==null||s!==null&&s.ref!==d)&&(o.flags|=512,o.flags|=2097152)}function Fd(s,o,d,p,b){var x=sn(d)?xi:Ht.current;return x=ps(o,x),ys(o,b),d=Ad(s,o,d,p,x,b),p=Id(),s!==null&&!an?(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~b,Tr(s,o,b)):(at&&p&&dd(o),o.flags|=1,Qt(s,o,d,b),o.child)}function gg(s,o,d,p,b){if(sn(d)){var x=!0;pu(o)}else x=!1;if(ys(o,b),o.stateNode===null)Ru(s,o),ig(o,d,p),Dd(o,d,p,b),p=!0;else if(s===null){var v=o.stateNode,R=o.memoizedProps;v.props=R;var F=v.context,q=d.contextType;typeof q=="object"&&q!==null?q=vn(q):(q=sn(d)?xi:Ht.current,q=ps(o,q));var ae=d.getDerivedStateFromProps,le=typeof ae=="function"||typeof v.getSnapshotBeforeUpdate=="function";le||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(R!==p||F!==q)&&sg(o,v,p,q),Wr=!1;var ie=o.memoizedState;v.state=ie,ku(o,p,v,b),F=o.memoizedState,R!==p||ie!==F||rn.current||Wr?(typeof ae=="function"&&(Pd(o,d,ae,p),F=o.memoizedState),(R=Wr||rg(o,d,R,p,ie,F,q))?(le||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(o.flags|=4194308)):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=p,o.memoizedState=F),v.props=p,v.state=F,v.context=q,p=R):(typeof v.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{v=o.stateNode,R0(s,o),R=o.memoizedProps,q=o.type===o.elementType?R:$n(o.type,R),v.props=q,le=o.pendingProps,ie=v.context,F=d.contextType,typeof F=="object"&&F!==null?F=vn(F):(F=sn(d)?xi:Ht.current,F=ps(o,F));var Ee=d.getDerivedStateFromProps;(ae=typeof Ee=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(R!==le||ie!==F)&&sg(o,v,p,F),Wr=!1,ie=o.memoizedState,v.state=ie,ku(o,p,v,b);var xe=o.memoizedState;R!==le||ie!==xe||rn.current||Wr?(typeof Ee=="function"&&(Pd(o,d,Ee,p),xe=o.memoizedState),(q=Wr||rg(o,d,q,p,ie,xe,F)||!1)?(ae||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(p,xe,F),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(p,xe,F)),typeof v.componentDidUpdate=="function"&&(o.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof v.componentDidUpdate!="function"||R===s.memoizedProps&&ie===s.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&ie===s.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=xe),v.props=p,v.state=xe,v.context=F,p=q):(typeof v.componentDidUpdate!="function"||R===s.memoizedProps&&ie===s.memoizedState||(o.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||R===s.memoizedProps&&ie===s.memoizedState||(o.flags|=1024),p=!1)}return jd(s,o,d,p,x,b)}function jd(s,o,d,p,b,x){mg(s,o);var v=(o.flags&128)!==0;if(!p&&!v)return b&&x0(o,d,!1),Tr(s,o,x);p=o.stateNode,dw.current=o;var R=v&&typeof d.getDerivedStateFromError!="function"?null:p.render();return o.flags|=1,s!==null&&v?(o.child=_s(o,s.child,null,x),o.child=_s(o,null,R,x)):Qt(s,o,R,x),o.memoizedState=p.state,b&&x0(o,d,!0),o.child}function Eg(s){var o=s.stateNode;o.pendingContext?b0(s,o.pendingContext,o.pendingContext!==o.context):o.context&&b0(s,o.context,!1),Td(s,o.containerInfo)}function _g(s,o,d,p,b){return Es(),md(b),o.flags|=256,Qt(s,o,d,p),o.child}var Hd={dehydrated:null,treeContext:null,retryLane:0};function Ud(s){return{baseLanes:s,cachePool:null,transitions:null}}function bg(s,o,d){var p=o.pendingProps,b=ut.current,x=!1,v=(o.flags&128)!==0,R;if((R=v)||(R=s!==null&&s.memoizedState===null?!1:(b&2)!==0),R?(x=!0,o.flags&=-129):(s===null||s.memoizedState!==null)&&(b|=1),nt(ut,b&1),s===null)return pd(o),s=o.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((o.mode&1)===0?o.lanes=1:s.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(v=p.children,s=p.fallback,x?(p=o.mode,x=o.child,v={mode:"hidden",children:v},(p&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=v):x=Vu(v,p,0,null),s=Li(s,p,d,null),x.return=o,s.return=o,x.sibling=s,o.child=x,o.child.memoizedState=Ud(d),o.memoizedState=Hd,s):$d(o,v));if(b=s.memoizedState,b!==null&&(R=b.dehydrated,R!==null))return fw(s,o,v,p,R,b,d);if(x){x=p.fallback,v=o.mode,b=s.child,R=b.sibling;var F={mode:"hidden",children:p.children};return(v&1)===0&&o.child!==b?(p=o.child,p.childLanes=0,p.pendingProps=F,o.deletions=null):(p=Jr(b,F),p.subtreeFlags=b.subtreeFlags&14680064),R!==null?x=Jr(R,x):(x=Li(x,v,d,null),x.flags|=2),x.return=o,p.return=o,p.sibling=x,o.child=p,p=x,x=o.child,v=s.child.memoizedState,v=v===null?Ud(d):{baseLanes:v.baseLanes|d,cachePool:null,transitions:v.transitions},x.memoizedState=v,x.childLanes=s.childLanes&~d,o.memoizedState=Hd,p}return x=s.child,s=x.sibling,p=Jr(x,{mode:"visible",children:p.children}),(o.mode&1)===0&&(p.lanes=d),p.return=o,p.sibling=null,s!==null&&(d=o.deletions,d===null?(o.deletions=[s],o.flags|=16):d.push(s)),o.child=p,o.memoizedState=null,p}function $d(s,o){return o=Vu({mode:"visible",children:o},s.mode,0,null),o.return=s,s.child=o}function Lu(s,o,d,p){return p!==null&&md(p),_s(o,s.child,null,d),s=$d(o,o.pendingProps.children),s.flags|=2,o.memoizedState=null,s}function fw(s,o,d,p,b,x,v){if(d)return o.flags&256?(o.flags&=-257,p=Md(Error(n(422))),Lu(s,o,v,p)):o.memoizedState!==null?(o.child=s.child,o.flags|=128,null):(x=p.fallback,b=o.mode,p=Vu({mode:"visible",children:p.children},b,0,null),x=Li(x,b,v,null),x.flags|=2,p.return=o,x.return=o,p.sibling=x,o.child=p,(o.mode&1)!==0&&_s(o,s.child,null,v),o.child.memoizedState=Ud(v),o.memoizedState=Hd,x);if((o.mode&1)===0)return Lu(s,o,v,null);if(b.data==="$!"){if(p=b.nextSibling&&b.nextSibling.dataset,p)var R=p.dgst;return p=R,x=Error(n(419)),p=Md(x,p,void 0),Lu(s,o,v,p)}if(R=(v&s.childLanes)!==0,an||R){if(p=At,p!==null){switch(v&-v){case 4:b=2;break;case 16:b=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:b=32;break;case 536870912:b=268435456;break;default:b=0}b=(b&(p.suspendedLanes|v))!==0?0:b,b!==0&&b!==x.retryLane&&(x.retryLane=b,yr(s,b),Gn(p,s,b,-1))}return sf(),p=Md(Error(n(421))),Lu(s,o,v,p)}return b.data==="$?"?(o.flags|=128,o.child=s.child,o=Cw.bind(null,s),b._reactRetry=o,null):(s=x.treeContext,_n=$r(b.nextSibling),En=o,at=!0,Un=null,s!==null&&(wn[Cn++]=_r,wn[Cn++]=br,wn[Cn++]=Ti,_r=s.id,br=s.overflow,Ti=o),o=$d(o,p.children),o.flags|=4096,o)}function yg(s,o,d){s.lanes|=o;var p=s.alternate;p!==null&&(p.lanes|=o),bd(s.return,o,d)}function zd(s,o,d,p,b){var x=s.memoizedState;x===null?s.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:p,tail:d,tailMode:b}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=p,x.tail=d,x.tailMode=b)}function xg(s,o,d){var p=o.pendingProps,b=p.revealOrder,x=p.tail;if(Qt(s,o,p.children,d),p=ut.current,(p&2)!==0)p=p&1|2,o.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=o.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&yg(s,d,o);else if(s.tag===19)yg(s,d,o);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}p&=1}if(nt(ut,p),(o.mode&1)===0)o.memoizedState=null;else switch(b){case"forwards":for(d=o.child,b=null;d!==null;)s=d.alternate,s!==null&&wu(s)===null&&(b=d),d=d.sibling;d=b,d===null?(b=o.child,o.child=null):(b=d.sibling,d.sibling=null),zd(o,!1,b,d,x);break;case"backwards":for(d=null,b=o.child,o.child=null;b!==null;){if(s=b.alternate,s!==null&&wu(s)===null){o.child=b;break}s=b.sibling,b.sibling=d,d=b,b=s}zd(o,!0,d,null,x);break;case"together":zd(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Ru(s,o){(o.mode&1)===0&&s!==null&&(s.alternate=null,o.alternate=null,o.flags|=2)}function Tr(s,o,d){if(s!==null&&(o.dependencies=s.dependencies),Si|=o.lanes,(d&o.childLanes)===0)return null;if(s!==null&&o.child!==s.child)throw Error(n(153));if(o.child!==null){for(s=o.child,d=Jr(s,s.pendingProps),o.child=d,d.return=o;s.sibling!==null;)s=s.sibling,d=d.sibling=Jr(s,s.pendingProps),d.return=o;d.sibling=null}return o.child}function hw(s,o,d){switch(o.tag){case 3:Eg(o),Es();break;case 5:D0(o);break;case 1:sn(o.type)&&pu(o);break;case 4:Td(o,o.stateNode.containerInfo);break;case 10:var p=o.type._context,b=o.memoizedProps.value;nt(yu,p._currentValue),p._currentValue=b;break;case 13:if(p=o.memoizedState,p!==null)return p.dehydrated!==null?(nt(ut,ut.current&1),o.flags|=128,null):(d&o.child.childLanes)!==0?bg(s,o,d):(nt(ut,ut.current&1),s=Tr(s,o,d),s!==null?s.sibling:null);nt(ut,ut.current&1);break;case 19:if(p=(d&o.childLanes)!==0,(s.flags&128)!==0){if(p)return xg(s,o,d);o.flags|=128}if(b=o.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),nt(ut,ut.current),p)break;return null;case 22:case 23:return o.lanes=0,pg(s,o,d)}return Tr(s,o,d)}var Tg,Vd,kg,wg;Tg=function(s,o){for(var d=o.child;d!==null;){if(d.tag===5||d.tag===6)s.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===o)break;for(;d.sibling===null;){if(d.return===null||d.return===o)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},Vd=function(){},kg=function(s,o,d,p){var b=s.memoizedProps;if(b!==p){s=o.stateNode,Ci(nr.current);var x=null;switch(d){case"input":b=pn(s,b),p=pn(s,p),x=[];break;case"select":b=S({},b,{value:void 0}),p=S({},p,{value:void 0}),x=[];break;case"textarea":b=Fn(s,b),p=Fn(s,p),x=[];break;default:typeof b.onClick!="function"&&typeof p.onClick=="function"&&(s.onclick=du)}Mt(d,p);var v;d=null;for(q in b)if(!p.hasOwnProperty(q)&&b.hasOwnProperty(q)&&b[q]!=null)if(q==="style"){var R=b[q];for(v in R)R.hasOwnProperty(v)&&(d||(d={}),d[v]="")}else q!=="dangerouslySetInnerHTML"&&q!=="children"&&q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(i.hasOwnProperty(q)?x||(x=[]):(x=x||[]).push(q,null));for(q in p){var F=p[q];if(R=b!=null?b[q]:void 0,p.hasOwnProperty(q)&&F!==R&&(F!=null||R!=null))if(q==="style")if(R){for(v in R)!R.hasOwnProperty(v)||F&&F.hasOwnProperty(v)||(d||(d={}),d[v]="");for(v in F)F.hasOwnProperty(v)&&R[v]!==F[v]&&(d||(d={}),d[v]=F[v])}else d||(x||(x=[]),x.push(q,d)),d=F;else q==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,R=R?R.__html:void 0,F!=null&&R!==F&&(x=x||[]).push(q,F)):q==="children"?typeof F!="string"&&typeof F!="number"||(x=x||[]).push(q,""+F):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&(i.hasOwnProperty(q)?(F!=null&&q==="onScroll"&&it("scroll",s),x||R===F||(x=[])):(x=x||[]).push(q,F))}d&&(x=x||[]).push("style",d);var q=x;(o.updateQueue=q)&&(o.flags|=4)}},wg=function(s,o,d,p){d!==p&&(o.flags|=4)};function Ra(s,o){if(!at)switch(s.tailMode){case"hidden":o=s.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var p=null;d!==null;)d.alternate!==null&&(p=d),d=d.sibling;p===null?o||s.tail===null?s.tail=null:s.tail.sibling=null:p.sibling=null}}function $t(s){var o=s.alternate!==null&&s.alternate.child===s.child,d=0,p=0;if(o)for(var b=s.child;b!==null;)d|=b.lanes|b.childLanes,p|=b.subtreeFlags&14680064,p|=b.flags&14680064,b.return=s,b=b.sibling;else for(b=s.child;b!==null;)d|=b.lanes|b.childLanes,p|=b.subtreeFlags,p|=b.flags,b.return=s,b=b.sibling;return s.subtreeFlags|=p,s.childLanes=d,o}function pw(s,o,d){var p=o.pendingProps;switch(fd(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(o),null;case 1:return sn(o.type)&&hu(),$t(o),null;case 3:return p=o.stateNode,xs(),st(rn),st(Ht),Cd(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(_u(o)?o.flags|=4:s===null||s.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Un!==null&&(tf(Un),Un=null))),Vd(s,o),$t(o),null;case 5:kd(o);var b=Ci(Sa.current);if(d=o.type,s!==null&&o.stateNode!=null)kg(s,o,d,p,b),s.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!p){if(o.stateNode===null)throw Error(n(166));return $t(o),null}if(s=Ci(nr.current),_u(o)){p=o.stateNode,d=o.type;var x=o.memoizedProps;switch(p[tr]=o,p[Ta]=x,s=(o.mode&1)!==0,d){case"dialog":it("cancel",p),it("close",p);break;case"iframe":case"object":case"embed":it("load",p);break;case"video":case"audio":for(b=0;b<ba.length;b++)it(ba[b],p);break;case"source":it("error",p);break;case"img":case"image":case"link":it("error",p),it("load",p);break;case"details":it("toggle",p);break;case"input":Or(p,x),it("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!x.multiple},it("invalid",p);break;case"textarea":Uo(p,x),it("invalid",p)}Mt(d,x),b=null;for(var v in x)if(x.hasOwnProperty(v)){var R=x[v];v==="children"?typeof R=="string"?p.textContent!==R&&(x.suppressHydrationWarning!==!0&&cu(p.textContent,R,s),b=["children",R]):typeof R=="number"&&p.textContent!==""+R&&(x.suppressHydrationWarning!==!0&&cu(p.textContent,R,s),b=["children",""+R]):i.hasOwnProperty(v)&&R!=null&&v==="onScroll"&&it("scroll",p)}switch(d){case"input":jt(p),je(p,x,!0);break;case"textarea":jt(p),zo(p);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(p.onclick=du)}p=b,o.updateQueue=p,p!==null&&(o.flags|=4)}else{v=b.nodeType===9?b:b.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=J(d)),s==="http://www.w3.org/1999/xhtml"?d==="script"?(s=v.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof p.is=="string"?s=v.createElement(d,{is:p.is}):(s=v.createElement(d),d==="select"&&(v=s,p.multiple?v.multiple=!0:p.size&&(v.size=p.size))):s=v.createElementNS(s,d),s[tr]=o,s[Ta]=p,Tg(s,o,!1,!1),o.stateNode=s;e:{switch(v=Jn(d,p),d){case"dialog":it("cancel",s),it("close",s),b=p;break;case"iframe":case"object":case"embed":it("load",s),b=p;break;case"video":case"audio":for(b=0;b<ba.length;b++)it(ba[b],s);b=p;break;case"source":it("error",s),b=p;break;case"img":case"image":case"link":it("error",s),it("load",s),b=p;break;case"details":it("toggle",s),b=p;break;case"input":Or(s,p),b=pn(s,p),it("invalid",s);break;case"option":b=p;break;case"select":s._wrapperState={wasMultiple:!!p.multiple},b=S({},p,{value:void 0}),it("invalid",s);break;case"textarea":Uo(s,p),b=Fn(s,p),it("invalid",s);break;default:b=p}Mt(d,b),R=b;for(x in R)if(R.hasOwnProperty(x)){var F=R[x];x==="style"?Dr(s,F):x==="dangerouslySetInnerHTML"?(F=F?F.__html:void 0,F!=null&&$e(s,F)):x==="children"?typeof F=="string"?(d!=="textarea"||F!=="")&&Ye(s,F):typeof F=="number"&&Ye(s,""+F):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(i.hasOwnProperty(x)?F!=null&&x==="onScroll"&&it("scroll",s):F!=null&&N(s,x,F,v))}switch(d){case"input":jt(s),je(s,p,!1);break;case"textarea":jt(s),zo(s);break;case"option":p.value!=null&&s.setAttribute("value",""+De(p.value));break;case"select":s.multiple=!!p.multiple,x=p.value,x!=null?Pt(s,!!p.multiple,x,!1):p.defaultValue!=null&&Pt(s,!!p.multiple,p.defaultValue,!0);break;default:typeof b.onClick=="function"&&(s.onclick=du)}switch(d){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return $t(o),null;case 6:if(s&&o.stateNode!=null)wg(s,o,s.memoizedProps,p);else{if(typeof p!="string"&&o.stateNode===null)throw Error(n(166));if(d=Ci(Sa.current),Ci(nr.current),_u(o)){if(p=o.stateNode,d=o.memoizedProps,p[tr]=o,(x=p.nodeValue!==d)&&(s=En,s!==null))switch(s.tag){case 3:cu(p.nodeValue,d,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&cu(p.nodeValue,d,(s.mode&1)!==0)}x&&(o.flags|=4)}else p=(d.nodeType===9?d:d.ownerDocument).createTextNode(p),p[tr]=o,o.stateNode=p}return $t(o),null;case 13:if(st(ut),p=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(at&&_n!==null&&(o.mode&1)!==0&&(o.flags&128)===0)S0(),Es(),o.flags|=98560,x=!1;else if(x=_u(o),p!==null&&p.dehydrated!==null){if(s===null){if(!x)throw Error(n(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(n(317));x[tr]=o}else Es(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;$t(o),x=!1}else Un!==null&&(tf(Un),Un=null),x=!0;if(!x)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=d,o):(p=p!==null,p!==(s!==null&&s.memoizedState!==null)&&p&&(o.child.flags|=8192,(o.mode&1)!==0&&(s===null||(ut.current&1)!==0?Tt===0&&(Tt=3):sf())),o.updateQueue!==null&&(o.flags|=4),$t(o),null);case 4:return xs(),Vd(s,o),s===null&&ya(o.stateNode.containerInfo),$t(o),null;case 10:return _d(o.type._context),$t(o),null;case 17:return sn(o.type)&&hu(),$t(o),null;case 19:if(st(ut),x=o.memoizedState,x===null)return $t(o),null;if(p=(o.flags&128)!==0,v=x.rendering,v===null)if(p)Ra(x,!1);else{if(Tt!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(v=wu(s),v!==null){for(o.flags|=128,Ra(x,!1),p=v.updateQueue,p!==null&&(o.updateQueue=p,o.flags|=4),o.subtreeFlags=0,p=d,d=o.child;d!==null;)x=d,s=p,x.flags&=14680066,v=x.alternate,v===null?(x.childLanes=0,x.lanes=s,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=v.childLanes,x.lanes=v.lanes,x.child=v.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=v.memoizedProps,x.memoizedState=v.memoizedState,x.updateQueue=v.updateQueue,x.type=v.type,s=v.dependencies,x.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),d=d.sibling;return nt(ut,ut.current&1|2),o.child}s=s.sibling}x.tail!==null&&ft()>Cs&&(o.flags|=128,p=!0,Ra(x,!1),o.lanes=4194304)}else{if(!p)if(s=wu(v),s!==null){if(o.flags|=128,p=!0,d=s.updateQueue,d!==null&&(o.updateQueue=d,o.flags|=4),Ra(x,!0),x.tail===null&&x.tailMode==="hidden"&&!v.alternate&&!at)return $t(o),null}else 2*ft()-x.renderingStartTime>Cs&&d!==1073741824&&(o.flags|=128,p=!0,Ra(x,!1),o.lanes=4194304);x.isBackwards?(v.sibling=o.child,o.child=v):(d=x.last,d!==null?d.sibling=v:o.child=v,x.last=v)}return x.tail!==null?(o=x.tail,x.rendering=o,x.tail=o.sibling,x.renderingStartTime=ft(),o.sibling=null,d=ut.current,nt(ut,p?d&1|2:d&1),o):($t(o),null);case 22:case 23:return rf(),p=o.memoizedState!==null,s!==null&&s.memoizedState!==null!==p&&(o.flags|=8192),p&&(o.mode&1)!==0?(bn&1073741824)!==0&&($t(o),o.subtreeFlags&6&&(o.flags|=8192)):$t(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function mw(s,o){switch(fd(o),o.tag){case 1:return sn(o.type)&&hu(),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return xs(),st(rn),st(Ht),Cd(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 5:return kd(o),null;case 13:if(st(ut),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Es()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return st(ut),null;case 4:return xs(),null;case 10:return _d(o.type._context),null;case 22:case 23:return rf(),null;case 24:return null;default:return null}}var Ou=!1,zt=!1,gw=typeof WeakSet=="function"?WeakSet:Set,ye=null;function ks(s,o){var d=s.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(p){ct(s,o,p)}else d.current=null}function Gd(s,o,d){try{d()}catch(p){ct(s,o,p)}}var Cg=!1;function Ew(s,o){if(rd=Jo,s=r0(),Qc(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var p=d.getSelection&&d.getSelection();if(p&&p.rangeCount!==0){d=p.anchorNode;var b=p.anchorOffset,x=p.focusNode;p=p.focusOffset;try{d.nodeType,x.nodeType}catch{d=null;break e}var v=0,R=-1,F=-1,q=0,ae=0,le=s,ie=null;t:for(;;){for(var Ee;le!==d||b!==0&&le.nodeType!==3||(R=v+b),le!==x||p!==0&&le.nodeType!==3||(F=v+p),le.nodeType===3&&(v+=le.nodeValue.length),(Ee=le.firstChild)!==null;)ie=le,le=Ee;for(;;){if(le===s)break t;if(ie===d&&++q===b&&(R=v),ie===x&&++ae===p&&(F=v),(Ee=le.nextSibling)!==null)break;le=ie,ie=le.parentNode}le=Ee}d=R===-1||F===-1?null:{start:R,end:F}}else d=null}d=d||{start:0,end:0}}else d=null;for(id={focusedElem:s,selectionRange:d},Jo=!1,ye=o;ye!==null;)if(o=ye,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,ye=s;else for(;ye!==null;){o=ye;try{var xe=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var Ce=xe.memoizedProps,ht=xe.memoizedState,V=o.stateNode,j=V.getSnapshotBeforeUpdate(o.elementType===o.type?Ce:$n(o.type,Ce),ht);V.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var W=o.stateNode.containerInfo;W.nodeType===1?W.textContent="":W.nodeType===9&&W.documentElement&&W.removeChild(W.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(fe){ct(o,o.return,fe)}if(s=o.sibling,s!==null){s.return=o.return,ye=s;break}ye=o.return}return xe=Cg,Cg=!1,xe}function Oa(s,o,d){var p=o.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var b=p=p.next;do{if((b.tag&s)===s){var x=b.destroy;b.destroy=void 0,x!==void 0&&Gd(o,d,x)}b=b.next}while(b!==p)}}function Pu(s,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var d=o=o.next;do{if((d.tag&s)===s){var p=d.create;d.destroy=p()}d=d.next}while(d!==o)}}function Wd(s){var o=s.ref;if(o!==null){var d=s.stateNode;switch(s.tag){case 5:s=d;break;default:s=d}typeof o=="function"?o(s):o.current=s}}function vg(s){var o=s.alternate;o!==null&&(s.alternate=null,vg(o)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(o=s.stateNode,o!==null&&(delete o[tr],delete o[Ta],delete o[ud],delete o[J2],delete o[ew])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Sg(s){return s.tag===5||s.tag===3||s.tag===4}function Ag(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Sg(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function qd(s,o,d){var p=s.tag;if(p===5||p===6)s=s.stateNode,o?d.nodeType===8?d.parentNode.insertBefore(s,o):d.insertBefore(s,o):(d.nodeType===8?(o=d.parentNode,o.insertBefore(s,d)):(o=d,o.appendChild(s)),d=d._reactRootContainer,d!=null||o.onclick!==null||(o.onclick=du));else if(p!==4&&(s=s.child,s!==null))for(qd(s,o,d),s=s.sibling;s!==null;)qd(s,o,d),s=s.sibling}function Yd(s,o,d){var p=s.tag;if(p===5||p===6)s=s.stateNode,o?d.insertBefore(s,o):d.appendChild(s);else if(p!==4&&(s=s.child,s!==null))for(Yd(s,o,d),s=s.sibling;s!==null;)Yd(s,o,d),s=s.sibling}var Bt=null,zn=!1;function Yr(s,o,d){for(d=d.child;d!==null;)Ig(s,o,d),d=d.sibling}function Ig(s,o,d){if(er&&typeof er.onCommitFiberUnmount=="function")try{er.onCommitFiberUnmount(qo,d)}catch{}switch(d.tag){case 5:zt||ks(d,o);case 6:var p=Bt,b=zn;Bt=null,Yr(s,o,d),Bt=p,zn=b,Bt!==null&&(zn?(s=Bt,d=d.stateNode,s.nodeType===8?s.parentNode.removeChild(d):s.removeChild(d)):Bt.removeChild(d.stateNode));break;case 18:Bt!==null&&(zn?(s=Bt,d=d.stateNode,s.nodeType===8?od(s.parentNode,d):s.nodeType===1&&od(s,d),da(s)):od(Bt,d.stateNode));break;case 4:p=Bt,b=zn,Bt=d.stateNode.containerInfo,zn=!0,Yr(s,o,d),Bt=p,zn=b;break;case 0:case 11:case 14:case 15:if(!zt&&(p=d.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){b=p=p.next;do{var x=b,v=x.destroy;x=x.tag,v!==void 0&&((x&2)!==0||(x&4)!==0)&&Gd(d,o,v),b=b.next}while(b!==p)}Yr(s,o,d);break;case 1:if(!zt&&(ks(d,o),p=d.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=d.memoizedProps,p.state=d.memoizedState,p.componentWillUnmount()}catch(R){ct(d,o,R)}Yr(s,o,d);break;case 21:Yr(s,o,d);break;case 22:d.mode&1?(zt=(p=zt)||d.memoizedState!==null,Yr(s,o,d),zt=p):Yr(s,o,d);break;default:Yr(s,o,d)}}function Ng(s){var o=s.updateQueue;if(o!==null){s.updateQueue=null;var d=s.stateNode;d===null&&(d=s.stateNode=new gw),o.forEach(function(p){var b=vw.bind(null,s,p);d.has(p)||(d.add(p),p.then(b,b))})}}function Vn(s,o){var d=o.deletions;if(d!==null)for(var p=0;p<d.length;p++){var b=d[p];try{var x=s,v=o,R=v;e:for(;R!==null;){switch(R.tag){case 5:Bt=R.stateNode,zn=!1;break e;case 3:Bt=R.stateNode.containerInfo,zn=!0;break e;case 4:Bt=R.stateNode.containerInfo,zn=!0;break e}R=R.return}if(Bt===null)throw Error(n(160));Ig(x,v,b),Bt=null,zn=!1;var F=b.alternate;F!==null&&(F.return=null),b.return=null}catch(q){ct(b,o,q)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Lg(o,s),o=o.sibling}function Lg(s,o){var d=s.alternate,p=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Vn(o,s),ir(s),p&4){try{Oa(3,s,s.return),Pu(3,s)}catch(Ce){ct(s,s.return,Ce)}try{Oa(5,s,s.return)}catch(Ce){ct(s,s.return,Ce)}}break;case 1:Vn(o,s),ir(s),p&512&&d!==null&&ks(d,d.return);break;case 5:if(Vn(o,s),ir(s),p&512&&d!==null&&ks(d,d.return),s.flags&32){var b=s.stateNode;try{Ye(b,"")}catch(Ce){ct(s,s.return,Ce)}}if(p&4&&(b=s.stateNode,b!=null)){var x=s.memoizedProps,v=d!==null?d.memoizedProps:x,R=s.type,F=s.updateQueue;if(s.updateQueue=null,F!==null)try{R==="input"&&x.type==="radio"&&x.name!=null&&pr(b,x),Jn(R,v);var q=Jn(R,x);for(v=0;v<F.length;v+=2){var ae=F[v],le=F[v+1];ae==="style"?Dr(b,le):ae==="dangerouslySetInnerHTML"?$e(b,le):ae==="children"?Ye(b,le):N(b,ae,le,q)}switch(R){case"input":Pr(b,x);break;case"textarea":$o(b,x);break;case"select":var ie=b._wrapperState.wasMultiple;b._wrapperState.wasMultiple=!!x.multiple;var Ee=x.value;Ee!=null?Pt(b,!!x.multiple,Ee,!1):ie!==!!x.multiple&&(x.defaultValue!=null?Pt(b,!!x.multiple,x.defaultValue,!0):Pt(b,!!x.multiple,x.multiple?[]:"",!1))}b[Ta]=x}catch(Ce){ct(s,s.return,Ce)}}break;case 6:if(Vn(o,s),ir(s),p&4){if(s.stateNode===null)throw Error(n(162));b=s.stateNode,x=s.memoizedProps;try{b.nodeValue=x}catch(Ce){ct(s,s.return,Ce)}}break;case 3:if(Vn(o,s),ir(s),p&4&&d!==null&&d.memoizedState.isDehydrated)try{da(o.containerInfo)}catch(Ce){ct(s,s.return,Ce)}break;case 4:Vn(o,s),ir(s);break;case 13:Vn(o,s),ir(s),b=s.child,b.flags&8192&&(x=b.memoizedState!==null,b.stateNode.isHidden=x,!x||b.alternate!==null&&b.alternate.memoizedState!==null||(Xd=ft())),p&4&&Ng(s);break;case 22:if(ae=d!==null&&d.memoizedState!==null,s.mode&1?(zt=(q=zt)||ae,Vn(o,s),zt=q):Vn(o,s),ir(s),p&8192){if(q=s.memoizedState!==null,(s.stateNode.isHidden=q)&&!ae&&(s.mode&1)!==0)for(ye=s,ae=s.child;ae!==null;){for(le=ye=ae;ye!==null;){switch(ie=ye,Ee=ie.child,ie.tag){case 0:case 11:case 14:case 15:Oa(4,ie,ie.return);break;case 1:ks(ie,ie.return);var xe=ie.stateNode;if(typeof xe.componentWillUnmount=="function"){p=ie,d=ie.return;try{o=p,xe.props=o.memoizedProps,xe.state=o.memoizedState,xe.componentWillUnmount()}catch(Ce){ct(p,d,Ce)}}break;case 5:ks(ie,ie.return);break;case 22:if(ie.memoizedState!==null){Pg(le);continue}}Ee!==null?(Ee.return=ie,ye=Ee):Pg(le)}ae=ae.sibling}e:for(ae=null,le=s;;){if(le.tag===5){if(ae===null){ae=le;try{b=le.stateNode,q?(x=b.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(R=le.stateNode,F=le.memoizedProps.style,v=F!=null&&F.hasOwnProperty("display")?F.display:null,R.style.display=kn("display",v))}catch(Ce){ct(s,s.return,Ce)}}}else if(le.tag===6){if(ae===null)try{le.stateNode.nodeValue=q?"":le.memoizedProps}catch(Ce){ct(s,s.return,Ce)}}else if((le.tag!==22&&le.tag!==23||le.memoizedState===null||le===s)&&le.child!==null){le.child.return=le,le=le.child;continue}if(le===s)break e;for(;le.sibling===null;){if(le.return===null||le.return===s)break e;ae===le&&(ae=null),le=le.return}ae===le&&(ae=null),le.sibling.return=le.return,le=le.sibling}}break;case 19:Vn(o,s),ir(s),p&4&&Ng(s);break;case 21:break;default:Vn(o,s),ir(s)}}function ir(s){var o=s.flags;if(o&2){try{e:{for(var d=s.return;d!==null;){if(Sg(d)){var p=d;break e}d=d.return}throw Error(n(160))}switch(p.tag){case 5:var b=p.stateNode;p.flags&32&&(Ye(b,""),p.flags&=-33);var x=Ag(s);Yd(s,x,b);break;case 3:case 4:var v=p.stateNode.containerInfo,R=Ag(s);qd(s,R,v);break;default:throw Error(n(161))}}catch(F){ct(s,s.return,F)}s.flags&=-3}o&4096&&(s.flags&=-4097)}function _w(s,o,d){ye=s,Rg(s)}function Rg(s,o,d){for(var p=(s.mode&1)!==0;ye!==null;){var b=ye,x=b.child;if(b.tag===22&&p){var v=b.memoizedState!==null||Ou;if(!v){var R=b.alternate,F=R!==null&&R.memoizedState!==null||zt;R=Ou;var q=zt;if(Ou=v,(zt=F)&&!q)for(ye=b;ye!==null;)v=ye,F=v.child,v.tag===22&&v.memoizedState!==null?Dg(b):F!==null?(F.return=v,ye=F):Dg(b);for(;x!==null;)ye=x,Rg(x),x=x.sibling;ye=b,Ou=R,zt=q}Og(s)}else(b.subtreeFlags&8772)!==0&&x!==null?(x.return=b,ye=x):Og(s)}}function Og(s){for(;ye!==null;){var o=ye;if((o.flags&8772)!==0){var d=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:zt||Pu(5,o);break;case 1:var p=o.stateNode;if(o.flags&4&&!zt)if(d===null)p.componentDidMount();else{var b=o.elementType===o.type?d.memoizedProps:$n(o.type,d.memoizedProps);p.componentDidUpdate(b,d.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var x=o.updateQueue;x!==null&&P0(o,x,p);break;case 3:var v=o.updateQueue;if(v!==null){if(d=null,o.child!==null)switch(o.child.tag){case 5:d=o.child.stateNode;break;case 1:d=o.child.stateNode}P0(o,v,d)}break;case 5:var R=o.stateNode;if(d===null&&o.flags&4){d=R;var F=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":F.autoFocus&&d.focus();break;case"img":F.src&&(d.src=F.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var q=o.alternate;if(q!==null){var ae=q.memoizedState;if(ae!==null){var le=ae.dehydrated;le!==null&&da(le)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}zt||o.flags&512&&Wd(o)}catch(ie){ct(o,o.return,ie)}}if(o===s){ye=null;break}if(d=o.sibling,d!==null){d.return=o.return,ye=d;break}ye=o.return}}function Pg(s){for(;ye!==null;){var o=ye;if(o===s){ye=null;break}var d=o.sibling;if(d!==null){d.return=o.return,ye=d;break}ye=o.return}}function Dg(s){for(;ye!==null;){var o=ye;try{switch(o.tag){case 0:case 11:case 15:var d=o.return;try{Pu(4,o)}catch(F){ct(o,d,F)}break;case 1:var p=o.stateNode;if(typeof p.componentDidMount=="function"){var b=o.return;try{p.componentDidMount()}catch(F){ct(o,b,F)}}var x=o.return;try{Wd(o)}catch(F){ct(o,x,F)}break;case 5:var v=o.return;try{Wd(o)}catch(F){ct(o,v,F)}}}catch(F){ct(o,o.return,F)}if(o===s){ye=null;break}var R=o.sibling;if(R!==null){R.return=o.return,ye=R;break}ye=o.return}}var bw=Math.ceil,Du=U.ReactCurrentDispatcher,Qd=U.ReactCurrentOwner,An=U.ReactCurrentBatchConfig,Qe=0,At=null,_t=null,Ft=0,bn=0,ws=zr(0),Tt=0,Pa=null,Si=0,Mu=0,Kd=0,Da=null,on=null,Xd=0,Cs=1/0,kr=null,Bu=!1,Zd=null,Qr=null,Fu=!1,Kr=null,ju=0,Ma=0,Jd=null,Hu=-1,Uu=0;function Kt(){return(Qe&6)!==0?ft():Hu!==-1?Hu:Hu=ft()}function Xr(s){return(s.mode&1)===0?1:(Qe&2)!==0&&Ft!==0?Ft&-Ft:nw.transition!==null?(Uu===0&&(Uu=Am()),Uu):(s=Ze,s!==0||(s=window.event,s=s===void 0?16:Bm(s.type)),s)}function Gn(s,o,d,p){if(50<Ma)throw Ma=0,Jd=null,Error(n(185));aa(s,d,p),((Qe&2)===0||s!==At)&&(s===At&&((Qe&2)===0&&(Mu|=d),Tt===4&&Zr(s,Ft)),un(s,p),d===1&&Qe===0&&(o.mode&1)===0&&(Cs=ft()+500,mu&&Gr()))}function un(s,o){var d=s.callbackNode;n2(s,o);var p=Ko(s,s===At?Ft:0);if(p===0)d!==null&&Cm(d),s.callbackNode=null,s.callbackPriority=0;else if(o=p&-p,s.callbackPriority!==o){if(d!=null&&Cm(d),o===1)s.tag===0?tw(Bg.bind(null,s)):T0(Bg.bind(null,s)),X2(function(){(Qe&6)===0&&Gr()}),d=null;else{switch(Im(p)){case 1:d=Rc;break;case 4:d=vm;break;case 16:d=Wo;break;case 536870912:d=Sm;break;default:d=Wo}d=Gg(d,Mg.bind(null,s))}s.callbackPriority=o,s.callbackNode=d}}function Mg(s,o){if(Hu=-1,Uu=0,(Qe&6)!==0)throw Error(n(327));var d=s.callbackNode;if(vs()&&s.callbackNode!==d)return null;var p=Ko(s,s===At?Ft:0);if(p===0)return null;if((p&30)!==0||(p&s.expiredLanes)!==0||o)o=$u(s,p);else{o=p;var b=Qe;Qe|=2;var x=jg();(At!==s||Ft!==o)&&(kr=null,Cs=ft()+500,Ii(s,o));do try{Tw();break}catch(R){Fg(s,R)}while(!0);Ed(),Du.current=x,Qe=b,_t!==null?o=0:(At=null,Ft=0,o=Tt)}if(o!==0){if(o===2&&(b=Oc(s),b!==0&&(p=b,o=ef(s,b))),o===1)throw d=Pa,Ii(s,0),Zr(s,p),un(s,ft()),d;if(o===6)Zr(s,p);else{if(b=s.current.alternate,(p&30)===0&&!yw(b)&&(o=$u(s,p),o===2&&(x=Oc(s),x!==0&&(p=x,o=ef(s,x))),o===1))throw d=Pa,Ii(s,0),Zr(s,p),un(s,ft()),d;switch(s.finishedWork=b,s.finishedLanes=p,o){case 0:case 1:throw Error(n(345));case 2:Ni(s,on,kr);break;case 3:if(Zr(s,p),(p&130023424)===p&&(o=Xd+500-ft(),10<o)){if(Ko(s,0)!==0)break;if(b=s.suspendedLanes,(b&p)!==p){Kt(),s.pingedLanes|=s.suspendedLanes&b;break}s.timeoutHandle=ad(Ni.bind(null,s,on,kr),o);break}Ni(s,on,kr);break;case 4:if(Zr(s,p),(p&4194240)===p)break;for(o=s.eventTimes,b=-1;0<p;){var v=31-jn(p);x=1<<v,v=o[v],v>b&&(b=v),p&=~x}if(p=b,p=ft()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*bw(p/1960))-p,10<p){s.timeoutHandle=ad(Ni.bind(null,s,on,kr),p);break}Ni(s,on,kr);break;case 5:Ni(s,on,kr);break;default:throw Error(n(329))}}}return un(s,ft()),s.callbackNode===d?Mg.bind(null,s):null}function ef(s,o){var d=Da;return s.current.memoizedState.isDehydrated&&(Ii(s,o).flags|=256),s=$u(s,o),s!==2&&(o=on,on=d,o!==null&&tf(o)),s}function tf(s){on===null?on=s:on.push.apply(on,s)}function yw(s){for(var o=s;;){if(o.flags&16384){var d=o.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var p=0;p<d.length;p++){var b=d[p],x=b.getSnapshot;b=b.value;try{if(!Hn(x(),b))return!1}catch{return!1}}}if(d=o.child,o.subtreeFlags&16384&&d!==null)d.return=o,o=d;else{if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Zr(s,o){for(o&=~Kd,o&=~Mu,s.suspendedLanes|=o,s.pingedLanes&=~o,s=s.expirationTimes;0<o;){var d=31-jn(o),p=1<<d;s[d]=-1,o&=~p}}function Bg(s){if((Qe&6)!==0)throw Error(n(327));vs();var o=Ko(s,0);if((o&1)===0)return un(s,ft()),null;var d=$u(s,o);if(s.tag!==0&&d===2){var p=Oc(s);p!==0&&(o=p,d=ef(s,p))}if(d===1)throw d=Pa,Ii(s,0),Zr(s,o),un(s,ft()),d;if(d===6)throw Error(n(345));return s.finishedWork=s.current.alternate,s.finishedLanes=o,Ni(s,on,kr),un(s,ft()),null}function nf(s,o){var d=Qe;Qe|=1;try{return s(o)}finally{Qe=d,Qe===0&&(Cs=ft()+500,mu&&Gr())}}function Ai(s){Kr!==null&&Kr.tag===0&&(Qe&6)===0&&vs();var o=Qe;Qe|=1;var d=An.transition,p=Ze;try{if(An.transition=null,Ze=1,s)return s()}finally{Ze=p,An.transition=d,Qe=o,(Qe&6)===0&&Gr()}}function rf(){bn=ws.current,st(ws)}function Ii(s,o){s.finishedWork=null,s.finishedLanes=0;var d=s.timeoutHandle;if(d!==-1&&(s.timeoutHandle=-1,K2(d)),_t!==null)for(d=_t.return;d!==null;){var p=d;switch(fd(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&hu();break;case 3:xs(),st(rn),st(Ht),Cd();break;case 5:kd(p);break;case 4:xs();break;case 13:st(ut);break;case 19:st(ut);break;case 10:_d(p.type._context);break;case 22:case 23:rf()}d=d.return}if(At=s,_t=s=Jr(s.current,null),Ft=bn=o,Tt=0,Pa=null,Kd=Mu=Si=0,on=Da=null,wi!==null){for(o=0;o<wi.length;o++)if(d=wi[o],p=d.interleaved,p!==null){d.interleaved=null;var b=p.next,x=d.pending;if(x!==null){var v=x.next;x.next=b,p.next=v}d.pending=p}wi=null}return s}function Fg(s,o){do{var d=_t;try{if(Ed(),Cu.current=Iu,vu){for(var p=lt.memoizedState;p!==null;){var b=p.queue;b!==null&&(b.pending=null),p=p.next}vu=!1}if(vi=0,St=xt=lt=null,Aa=!1,Ia=0,Qd.current=null,d===null||d.return===null){Tt=1,Pa=o,_t=null;break}e:{var x=s,v=d.return,R=d,F=o;if(o=Ft,R.flags|=32768,F!==null&&typeof F=="object"&&typeof F.then=="function"){var q=F,ae=R,le=ae.tag;if((ae.mode&1)===0&&(le===0||le===11||le===15)){var ie=ae.alternate;ie?(ae.updateQueue=ie.updateQueue,ae.memoizedState=ie.memoizedState,ae.lanes=ie.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var Ee=lg(v);if(Ee!==null){Ee.flags&=-257,cg(Ee,v,R,x,o),Ee.mode&1&&ug(x,q,o),o=Ee,F=q;var xe=o.updateQueue;if(xe===null){var Ce=new Set;Ce.add(F),o.updateQueue=Ce}else xe.add(F);break e}else{if((o&1)===0){ug(x,q,o),sf();break e}F=Error(n(426))}}else if(at&&R.mode&1){var ht=lg(v);if(ht!==null){(ht.flags&65536)===0&&(ht.flags|=256),cg(ht,v,R,x,o),md(Ts(F,R));break e}}x=F=Ts(F,R),Tt!==4&&(Tt=2),Da===null?Da=[x]:Da.push(x),x=v;do{switch(x.tag){case 3:x.flags|=65536,o&=-o,x.lanes|=o;var V=ag(x,F,o);O0(x,V);break e;case 1:R=F;var j=x.type,W=x.stateNode;if((x.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||W!==null&&typeof W.componentDidCatch=="function"&&(Qr===null||!Qr.has(W)))){x.flags|=65536,o&=-o,x.lanes|=o;var fe=og(x,R,o);O0(x,fe);break e}}x=x.return}while(x!==null)}Ug(d)}catch(Se){o=Se,_t===d&&d!==null&&(_t=d=d.return);continue}break}while(!0)}function jg(){var s=Du.current;return Du.current=Iu,s===null?Iu:s}function sf(){(Tt===0||Tt===3||Tt===2)&&(Tt=4),At===null||(Si&268435455)===0&&(Mu&268435455)===0||Zr(At,Ft)}function $u(s,o){var d=Qe;Qe|=2;var p=jg();(At!==s||Ft!==o)&&(kr=null,Ii(s,o));do try{xw();break}catch(b){Fg(s,b)}while(!0);if(Ed(),Qe=d,Du.current=p,_t!==null)throw Error(n(261));return At=null,Ft=0,Tt}function xw(){for(;_t!==null;)Hg(_t)}function Tw(){for(;_t!==null&&!qk();)Hg(_t)}function Hg(s){var o=Vg(s.alternate,s,bn);s.memoizedProps=s.pendingProps,o===null?Ug(s):_t=o,Qd.current=null}function Ug(s){var o=s;do{var d=o.alternate;if(s=o.return,(o.flags&32768)===0){if(d=pw(d,o,bn),d!==null){_t=d;return}}else{if(d=mw(d,o),d!==null){d.flags&=32767,_t=d;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Tt=6,_t=null;return}}if(o=o.sibling,o!==null){_t=o;return}_t=o=s}while(o!==null);Tt===0&&(Tt=5)}function Ni(s,o,d){var p=Ze,b=An.transition;try{An.transition=null,Ze=1,kw(s,o,d,p)}finally{An.transition=b,Ze=p}return null}function kw(s,o,d,p){do vs();while(Kr!==null);if((Qe&6)!==0)throw Error(n(327));d=s.finishedWork;var b=s.finishedLanes;if(d===null)return null;if(s.finishedWork=null,s.finishedLanes=0,d===s.current)throw Error(n(177));s.callbackNode=null,s.callbackPriority=0;var x=d.lanes|d.childLanes;if(r2(s,x),s===At&&(_t=At=null,Ft=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||Fu||(Fu=!0,Gg(Wo,function(){return vs(),null})),x=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||x){x=An.transition,An.transition=null;var v=Ze;Ze=1;var R=Qe;Qe|=4,Qd.current=null,Ew(s,d),Lg(d,s),z2(id),Jo=!!rd,id=rd=null,s.current=d,_w(d),Yk(),Qe=R,Ze=v,An.transition=x}else s.current=d;if(Fu&&(Fu=!1,Kr=s,ju=b),x=s.pendingLanes,x===0&&(Qr=null),Xk(d.stateNode),un(s,ft()),o!==null)for(p=s.onRecoverableError,d=0;d<o.length;d++)b=o[d],p(b.value,{componentStack:b.stack,digest:b.digest});if(Bu)throw Bu=!1,s=Zd,Zd=null,s;return(ju&1)!==0&&s.tag!==0&&vs(),x=s.pendingLanes,(x&1)!==0?s===Jd?Ma++:(Ma=0,Jd=s):Ma=0,Gr(),null}function vs(){if(Kr!==null){var s=Im(ju),o=An.transition,d=Ze;try{if(An.transition=null,Ze=16>s?16:s,Kr===null)var p=!1;else{if(s=Kr,Kr=null,ju=0,(Qe&6)!==0)throw Error(n(331));var b=Qe;for(Qe|=4,ye=s.current;ye!==null;){var x=ye,v=x.child;if((ye.flags&16)!==0){var R=x.deletions;if(R!==null){for(var F=0;F<R.length;F++){var q=R[F];for(ye=q;ye!==null;){var ae=ye;switch(ae.tag){case 0:case 11:case 15:Oa(8,ae,x)}var le=ae.child;if(le!==null)le.return=ae,ye=le;else for(;ye!==null;){ae=ye;var ie=ae.sibling,Ee=ae.return;if(vg(ae),ae===q){ye=null;break}if(ie!==null){ie.return=Ee,ye=ie;break}ye=Ee}}}var xe=x.alternate;if(xe!==null){var Ce=xe.child;if(Ce!==null){xe.child=null;do{var ht=Ce.sibling;Ce.sibling=null,Ce=ht}while(Ce!==null)}}ye=x}}if((x.subtreeFlags&2064)!==0&&v!==null)v.return=x,ye=v;else e:for(;ye!==null;){if(x=ye,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:Oa(9,x,x.return)}var V=x.sibling;if(V!==null){V.return=x.return,ye=V;break e}ye=x.return}}var j=s.current;for(ye=j;ye!==null;){v=ye;var W=v.child;if((v.subtreeFlags&2064)!==0&&W!==null)W.return=v,ye=W;else e:for(v=j;ye!==null;){if(R=ye,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:Pu(9,R)}}catch(Se){ct(R,R.return,Se)}if(R===v){ye=null;break e}var fe=R.sibling;if(fe!==null){fe.return=R.return,ye=fe;break e}ye=R.return}}if(Qe=b,Gr(),er&&typeof er.onPostCommitFiberRoot=="function")try{er.onPostCommitFiberRoot(qo,s)}catch{}p=!0}return p}finally{Ze=d,An.transition=o}}return!1}function $g(s,o,d){o=Ts(d,o),o=ag(s,o,1),s=qr(s,o,1),o=Kt(),s!==null&&(aa(s,1,o),un(s,o))}function ct(s,o,d){if(s.tag===3)$g(s,s,d);else for(;o!==null;){if(o.tag===3){$g(o,s,d);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Qr===null||!Qr.has(p))){s=Ts(d,s),s=og(o,s,1),o=qr(o,s,1),s=Kt(),o!==null&&(aa(o,1,s),un(o,s));break}}o=o.return}}function ww(s,o,d){var p=s.pingCache;p!==null&&p.delete(o),o=Kt(),s.pingedLanes|=s.suspendedLanes&d,At===s&&(Ft&d)===d&&(Tt===4||Tt===3&&(Ft&130023424)===Ft&&500>ft()-Xd?Ii(s,0):Kd|=d),un(s,o)}function zg(s,o){o===0&&((s.mode&1)===0?o=1:(o=Qo,Qo<<=1,(Qo&130023424)===0&&(Qo=4194304)));var d=Kt();s=yr(s,o),s!==null&&(aa(s,o,d),un(s,d))}function Cw(s){var o=s.memoizedState,d=0;o!==null&&(d=o.retryLane),zg(s,d)}function vw(s,o){var d=0;switch(s.tag){case 13:var p=s.stateNode,b=s.memoizedState;b!==null&&(d=b.retryLane);break;case 19:p=s.stateNode;break;default:throw Error(n(314))}p!==null&&p.delete(o),zg(s,d)}var Vg;Vg=function(s,o,d){if(s!==null)if(s.memoizedProps!==o.pendingProps||rn.current)an=!0;else{if((s.lanes&d)===0&&(o.flags&128)===0)return an=!1,hw(s,o,d);an=(s.flags&131072)!==0}else an=!1,at&&(o.flags&1048576)!==0&&k0(o,Eu,o.index);switch(o.lanes=0,o.tag){case 2:var p=o.type;Ru(s,o),s=o.pendingProps;var b=ps(o,Ht.current);ys(o,d),b=Ad(null,o,p,s,b,d);var x=Id();return o.flags|=1,typeof b=="object"&&b!==null&&typeof b.render=="function"&&b.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,sn(p)?(x=!0,pu(o)):x=!1,o.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,xd(o),b.updater=Nu,o.stateNode=b,b._reactInternals=o,Dd(o,p,s,d),o=jd(null,o,p,!0,x,d)):(o.tag=0,at&&x&&dd(o),Qt(null,o,b,d),o=o.child),o;case 16:p=o.elementType;e:{switch(Ru(s,o),s=o.pendingProps,b=p._init,p=b(p._payload),o.type=p,b=o.tag=Aw(p),s=$n(p,s),b){case 0:o=Fd(null,o,p,s,d);break e;case 1:o=gg(null,o,p,s,d);break e;case 11:o=dg(null,o,p,s,d);break e;case 14:o=fg(null,o,p,$n(p.type,s),d);break e}throw Error(n(306,p,""))}return o;case 0:return p=o.type,b=o.pendingProps,b=o.elementType===p?b:$n(p,b),Fd(s,o,p,b,d);case 1:return p=o.type,b=o.pendingProps,b=o.elementType===p?b:$n(p,b),gg(s,o,p,b,d);case 3:e:{if(Eg(o),s===null)throw Error(n(387));p=o.pendingProps,x=o.memoizedState,b=x.element,R0(s,o),ku(o,p,null,d);var v=o.memoizedState;if(p=v.element,x.isDehydrated)if(x={element:p,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},o.updateQueue.baseState=x,o.memoizedState=x,o.flags&256){b=Ts(Error(n(423)),o),o=_g(s,o,p,d,b);break e}else if(p!==b){b=Ts(Error(n(424)),o),o=_g(s,o,p,d,b);break e}else for(_n=$r(o.stateNode.containerInfo.firstChild),En=o,at=!0,Un=null,d=N0(o,null,p,d),o.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Es(),p===b){o=Tr(s,o,d);break e}Qt(s,o,p,d)}o=o.child}return o;case 5:return D0(o),s===null&&pd(o),p=o.type,b=o.pendingProps,x=s!==null?s.memoizedProps:null,v=b.children,sd(p,b)?v=null:x!==null&&sd(p,x)&&(o.flags|=32),mg(s,o),Qt(s,o,v,d),o.child;case 6:return s===null&&pd(o),null;case 13:return bg(s,o,d);case 4:return Td(o,o.stateNode.containerInfo),p=o.pendingProps,s===null?o.child=_s(o,null,p,d):Qt(s,o,p,d),o.child;case 11:return p=o.type,b=o.pendingProps,b=o.elementType===p?b:$n(p,b),dg(s,o,p,b,d);case 7:return Qt(s,o,o.pendingProps,d),o.child;case 8:return Qt(s,o,o.pendingProps.children,d),o.child;case 12:return Qt(s,o,o.pendingProps.children,d),o.child;case 10:e:{if(p=o.type._context,b=o.pendingProps,x=o.memoizedProps,v=b.value,nt(yu,p._currentValue),p._currentValue=v,x!==null)if(Hn(x.value,v)){if(x.children===b.children&&!rn.current){o=Tr(s,o,d);break e}}else for(x=o.child,x!==null&&(x.return=o);x!==null;){var R=x.dependencies;if(R!==null){v=x.child;for(var F=R.firstContext;F!==null;){if(F.context===p){if(x.tag===1){F=xr(-1,d&-d),F.tag=2;var q=x.updateQueue;if(q!==null){q=q.shared;var ae=q.pending;ae===null?F.next=F:(F.next=ae.next,ae.next=F),q.pending=F}}x.lanes|=d,F=x.alternate,F!==null&&(F.lanes|=d),bd(x.return,d,o),R.lanes|=d;break}F=F.next}}else if(x.tag===10)v=x.type===o.type?null:x.child;else if(x.tag===18){if(v=x.return,v===null)throw Error(n(341));v.lanes|=d,R=v.alternate,R!==null&&(R.lanes|=d),bd(v,d,o),v=x.sibling}else v=x.child;if(v!==null)v.return=x;else for(v=x;v!==null;){if(v===o){v=null;break}if(x=v.sibling,x!==null){x.return=v.return,v=x;break}v=v.return}x=v}Qt(s,o,b.children,d),o=o.child}return o;case 9:return b=o.type,p=o.pendingProps.children,ys(o,d),b=vn(b),p=p(b),o.flags|=1,Qt(s,o,p,d),o.child;case 14:return p=o.type,b=$n(p,o.pendingProps),b=$n(p.type,b),fg(s,o,p,b,d);case 15:return hg(s,o,o.type,o.pendingProps,d);case 17:return p=o.type,b=o.pendingProps,b=o.elementType===p?b:$n(p,b),Ru(s,o),o.tag=1,sn(p)?(s=!0,pu(o)):s=!1,ys(o,d),ig(o,p,b),Dd(o,p,b,d),jd(null,o,p,!0,s,d);case 19:return xg(s,o,d);case 22:return pg(s,o,d)}throw Error(n(156,o.tag))};function Gg(s,o){return wm(s,o)}function Sw(s,o,d,p){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function In(s,o,d,p){return new Sw(s,o,d,p)}function af(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Aw(s){if(typeof s=="function")return af(s)?1:0;if(s!=null){if(s=s.$$typeof,s===ue)return 11;if(s===te)return 14}return 2}function Jr(s,o){var d=s.alternate;return d===null?(d=In(s.tag,o,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=o,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&14680064,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,o=s.dependencies,d.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d}function zu(s,o,d,p,b,x){var v=2;if(p=s,typeof s=="function")af(s)&&(v=1);else if(typeof s=="string")v=5;else e:switch(s){case X:return Li(d.children,b,x,o);case Q:v=8,b|=8;break;case ne:return s=In(12,d,o,b|2),s.elementType=ne,s.lanes=x,s;case ve:return s=In(13,d,o,b),s.elementType=ve,s.lanes=x,s;case he:return s=In(19,d,o,b),s.elementType=he,s.lanes=x,s;case me:return Vu(d,b,x,o);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case $:v=10;break e;case oe:v=9;break e;case ue:v=11;break e;case te:v=14;break e;case ee:v=16,p=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return o=In(v,d,o,b),o.elementType=s,o.type=p,o.lanes=x,o}function Li(s,o,d,p){return s=In(7,s,p,o),s.lanes=d,s}function Vu(s,o,d,p){return s=In(22,s,p,o),s.elementType=me,s.lanes=d,s.stateNode={isHidden:!1},s}function of(s,o,d){return s=In(6,s,null,o),s.lanes=d,s}function uf(s,o,d){return o=In(4,s.children!==null?s.children:[],s.key,o),o.lanes=d,o.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},o}function Iw(s,o,d,p,b){this.tag=o,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Pc(0),this.expirationTimes=Pc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pc(0),this.identifierPrefix=p,this.onRecoverableError=b,this.mutableSourceEagerHydrationData=null}function lf(s,o,d,p,b,x,v,R,F){return s=new Iw(s,o,d,R,F),o===1?(o=1,x===!0&&(o|=8)):o=0,x=In(3,null,null,o),s.current=x,x.stateNode=s,x.memoizedState={element:p,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},xd(x),s}function Nw(s,o,d){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:p==null?null:""+p,children:s,containerInfo:o,implementation:d}}function Wg(s){if(!s)return Vr;s=s._reactInternals;e:{if(bi(s)!==s||s.tag!==1)throw Error(n(170));var o=s;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(sn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(s.tag===1){var d=s.type;if(sn(d))return y0(s,d,o)}return o}function qg(s,o,d,p,b,x,v,R,F){return s=lf(d,p,!0,s,b,x,v,R,F),s.context=Wg(null),d=s.current,p=Kt(),b=Xr(d),x=xr(p,b),x.callback=o??null,qr(d,x,b),s.current.lanes=b,aa(s,b,p),un(s,p),s}function Gu(s,o,d,p){var b=o.current,x=Kt(),v=Xr(b);return d=Wg(d),o.context===null?o.context=d:o.pendingContext=d,o=xr(x,v),o.payload={element:s},p=p===void 0?null:p,p!==null&&(o.callback=p),s=qr(b,o,v),s!==null&&(Gn(s,b,v,x),Tu(s,b,v)),v}function Wu(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function Yg(s,o){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<o?d:o}}function cf(s,o){Yg(s,o),(s=s.alternate)&&Yg(s,o)}function Lw(){return null}var Qg=typeof reportError=="function"?reportError:function(s){console.error(s)};function df(s){this._internalRoot=s}qu.prototype.render=df.prototype.render=function(s){var o=this._internalRoot;if(o===null)throw Error(n(409));Gu(s,o,null,null)},qu.prototype.unmount=df.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var o=s.containerInfo;Ai(function(){Gu(null,s,null,null)}),o[gr]=null}};function qu(s){this._internalRoot=s}qu.prototype.unstable_scheduleHydration=function(s){if(s){var o=Rm();s={blockedOn:null,target:s,priority:o};for(var d=0;d<jr.length&&o!==0&&o<jr[d].priority;d++);jr.splice(d,0,s),d===0&&Dm(s)}};function ff(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Yu(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function Kg(){}function Rw(s,o,d,p,b){if(b){if(typeof p=="function"){var x=p;p=function(){var q=Wu(v);x.call(q)}}var v=qg(o,p,s,0,null,!1,!1,"",Kg);return s._reactRootContainer=v,s[gr]=v.current,ya(s.nodeType===8?s.parentNode:s),Ai(),v}for(;b=s.lastChild;)s.removeChild(b);if(typeof p=="function"){var R=p;p=function(){var q=Wu(F);R.call(q)}}var F=lf(s,0,!1,null,null,!1,!1,"",Kg);return s._reactRootContainer=F,s[gr]=F.current,ya(s.nodeType===8?s.parentNode:s),Ai(function(){Gu(o,F,d,p)}),F}function Qu(s,o,d,p,b){var x=d._reactRootContainer;if(x){var v=x;if(typeof b=="function"){var R=b;b=function(){var F=Wu(v);R.call(F)}}Gu(o,v,s,b)}else v=Rw(d,o,s,b,p);return Wu(v)}Nm=function(s){switch(s.tag){case 3:var o=s.stateNode;if(o.current.memoizedState.isDehydrated){var d=sa(o.pendingLanes);d!==0&&(Dc(o,d|1),un(o,ft()),(Qe&6)===0&&(Cs=ft()+500,Gr()))}break;case 13:Ai(function(){var p=yr(s,1);if(p!==null){var b=Kt();Gn(p,s,1,b)}}),cf(s,1)}},Mc=function(s){if(s.tag===13){var o=yr(s,134217728);if(o!==null){var d=Kt();Gn(o,s,134217728,d)}cf(s,134217728)}},Lm=function(s){if(s.tag===13){var o=Xr(s),d=yr(s,o);if(d!==null){var p=Kt();Gn(d,s,o,p)}cf(s,o)}},Rm=function(){return Ze},Om=function(s,o){var d=Ze;try{return Ze=s,o()}finally{Ze=d}},Ac=function(s,o,d){switch(o){case"input":if(Pr(s,d),o=d.name,d.type==="radio"&&o!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<d.length;o++){var p=d[o];if(p!==s&&p.form===s.form){var b=fu(p);if(!b)throw Error(n(90));Tn(p),Pr(p,b)}}}break;case"textarea":$o(s,d);break;case"select":o=d.value,o!=null&&Pt(s,!!d.multiple,o,!1)}},Em=nf,_m=Ai;var Ow={usingClientEntryPoint:!1,Events:[ka,fs,fu,mm,gm,nf]},Ba={findFiberByHostInstance:yi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Pw={bundleType:Ba.bundleType,version:Ba.version,rendererPackageName:Ba.rendererPackageName,rendererConfig:Ba.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Tm(s),s===null?null:s.stateNode},findFiberByHostInstance:Ba.findFiberByHostInstance||Lw,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ku.isDisabled&&Ku.supportsFiber)try{qo=Ku.inject(Pw),er=Ku}catch{}}return ln.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ow,ln.createPortal=function(s,o){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ff(o))throw Error(n(200));return Nw(s,o,null,d)},ln.createRoot=function(s,o){if(!ff(s))throw Error(n(299));var d=!1,p="",b=Qg;return o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onRecoverableError!==void 0&&(b=o.onRecoverableError)),o=lf(s,1,!1,null,null,d,!1,p,b),s[gr]=o.current,ya(s.nodeType===8?s.parentNode:s),new df(o)},ln.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var o=s._reactInternals;if(o===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=Tm(o),s=s===null?null:s.stateNode,s},ln.flushSync=function(s){return Ai(s)},ln.hydrate=function(s,o,d){if(!Yu(o))throw Error(n(200));return Qu(null,s,o,!0,d)},ln.hydrateRoot=function(s,o,d){if(!ff(s))throw Error(n(405));var p=d!=null&&d.hydratedSources||null,b=!1,x="",v=Qg;if(d!=null&&(d.unstable_strictMode===!0&&(b=!0),d.identifierPrefix!==void 0&&(x=d.identifierPrefix),d.onRecoverableError!==void 0&&(v=d.onRecoverableError)),o=qg(o,null,s,1,d??null,b,!1,x,v),s[gr]=o.current,ya(s),p)for(s=0;s<p.length;s++)d=p[s],b=d._getVersion,b=b(d._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[d,b]:o.mutableSourceEagerHydrationData.push(d,b);return new qu(o)},ln.render=function(s,o,d){if(!Yu(o))throw Error(n(200));return Qu(null,s,o,!1,d)},ln.unmountComponentAtNode=function(s){if(!Yu(s))throw Error(n(40));return s._reactRootContainer?(Ai(function(){Qu(null,null,s,!1,function(){s._reactRootContainer=null,s[gr]=null})}),!0):!1},ln.unstable_batchedUpdates=nf,ln.unstable_renderSubtreeIntoContainer=function(s,o,d,p){if(!Yu(d))throw Error(n(200));if(s==null||s._reactInternals===void 0)throw Error(n(38));return Qu(s,o,d,!1,p)},ln.version="18.3.1-next-f1338f8080-20240426",ln}var a1;function $_(){if(a1)return Ef.exports;a1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ef.exports=Ww(),Ef.exports}var o1;function qw(){if(o1)return Xu;o1=1;var e=$_();return Xu.createRoot=e.createRoot,Xu.hydrateRoot=e.hydrateRoot,Xu}var Yw=qw();const Qw=Ao(Yw);class Kw extends yt.Component{constructor(t){super(t),this.handleRetry=()=>{this.setState({hasError:!1,error:null})},this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught an error:",t,n)}render(){var t,n;return this.state.hasError?T.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:"40px",color:"var(--text-primary)"},children:[T.jsx("div",{style:{fontSize:"48px",marginBottom:"16px"},children:":("}),T.jsx("h2",{style:{fontSize:"18px",fontWeight:600,marginBottom:"8px"},children:"出现了一些问题"}),T.jsx("p",{style:{fontSize:"14px",color:"var(--text-secondary)",marginBottom:"8px",maxWidth:"400px",textAlign:"center"},children:((t=this.state.error)==null?void 0:t.message)||"发生了未知错误"}),T.jsx("pre",{style:{fontSize:"12px",color:"var(--text-tertiary)",marginBottom:"20px",maxWidth:"600px",overflow:"auto",padding:"12px",background:"var(--bg-secondary)",borderRadius:"8px",border:"1px solid var(--border)",maxHeight:"150px",width:"100%"},children:(n=this.state.error)==null?void 0:n.stack}),T.jsx("button",{onClick:this.handleRetry,style:{padding:"8px 24px",border:"1px solid var(--border)",borderRadius:"8px",background:"var(--accent)",color:"var(--text-inverse)",fontSize:"14px",cursor:"pointer",fontWeight:500},children:"重试"})]}):this.props.children}}const u1=e=>{let t;const n=new Set,r=(f,m)=>{const h=typeof f=="function"?f(t):f;if(!Object.is(h,t)){const _=t;t=m??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(g=>g(t,_))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:f=>(n.add(f),()=>n.delete(f))},c=t=e(r,i,l);return l},Xw=(e=>e?u1(e):u1),Zw=e=>e;function Jw(e,t=Zw){const n=yt.useSyncExternalStore(e.subscribe,yt.useCallback(()=>t(e.getState()),[e,t]),yt.useCallback(()=>t(e.getInitialState()),[e,t]));return yt.useDebugValue(n),n}const l1=e=>{const t=Xw(e),n=r=>Jw(t,r);return Object.assign(n,t),n},z_=(e=>e?l1(e):l1),eC="/api";async function mi(e,t){const r=await(await fetch(`${eC}${e}`,{headers:{"Content-Type":"application/json",...t==null?void 0:t.headers},...t})).json();if(!r.success)throw new Error(r.error.message);return r.data}const Sl=new Map,Zu=new Map,tC=300*1e3;function Io(e,t){const r=`GET:${e}`;{const a=Sl.get(r);if(a&&a.expiry>Date.now())return a.data;const u=Zu.get(r);if(u)return u}const i=mi(e,t).then(a=>(Sl.set(r,{data:a,expiry:Date.now()+tC}),Zu.delete(`GET:${e}`),a)).catch(a=>{throw Zu.delete(`GET:${e}`),a});return Zu.set(`GET:${e}`,i),i}function Xl(e){for(const t of Sl.keys())t.includes(e)&&Sl.delete(t)}async function nC(){return Io("/projects")}async function Zh(e){return Io(`/wiki/${encodeURIComponent(e)}`)}async function qi(e,t,n){return Io(`/wiki/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${encodeURIComponent(n)}`)}async function sh(e,t,n,r,i){const a=await mi(`/wiki/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,{method:"PUT",body:JSON.stringify({content:r,expectedMtime:i})});return Xl("/wiki/"),a}async function V_(e,t){return mi(`/search/${encodeURIComponent(e)}?q=${encodeURIComponent(t)}`)}async function G_(){return Io("/config")}async function rC(e){const t=await mi("/config",{method:"PUT",body:JSON.stringify(e)});return Xl("/config"),t}async function iC(e){const t=await mi("/projects",{method:"POST",body:JSON.stringify({path:e})});return Xl("/projects"),t}async function sC(e){const t=await mi(`/projects/${encodeURIComponent(e)}`,{method:"DELETE"});return Xl("/projects"),t}async function aC(){return mi("/scan",{method:"POST"})}async function oC(){return mi("/scan/status")}async function uC(e,t,n){const r=new URLSearchParams({path:e});return t&&r.append("startLine",t.toString()),n&&r.append("endLine",n.toString()),Io(`/files/content?${r.toString()}`)}const lC=Object.freeze(Object.defineProperty({__proto__:null,addProject:iC,deleteProject:sC,getConfig:G_,getFileContent:uC,getPage:qi,getProjects:nC,getScanStatus:oC,getWiki:Zh,putPage:sh,searchProject:V_,triggerScan:aC,updateConfig:rC},Symbol.toStringTag,{value:"Module"})),c1={projects:[],config:null,currentWiki:null,currentView:null,sidebarOpen:!0,settingsOpen:!1,searchOpen:!1,searchQuery:"",searchResults:[],expandedSections:[],expandedGroups:[],referenceOpen:!1,referenceData:null,mermaidViewerOpen:!1,mermaidViewerData:null,loadingWiki:!1,loadingPage:!1,loadingProjects:!1},we=z_((e,t)=>({...c1,setProjects:n=>e({projects:n}),setConfig:n=>e({config:n}),setCurrentWiki:n=>e({currentWiki:n}),setCurrentView:n=>e({currentView:n}),setCurrentProject:n=>e(r=>({config:r.config?{...r.config,lastOpenedProject:n}:r.config})),toggleSidebar:()=>e(n=>({sidebarOpen:!n.sidebarOpen})),setSidebarOpen:n=>e({sidebarOpen:n}),toggleSettings:()=>e(n=>({settingsOpen:!n.settingsOpen})),setSettingsOpen:n=>e({settingsOpen:n}),toggleSearch:()=>e(n=>({searchOpen:!n.searchOpen})),setSearchOpen:n=>e(r=>({searchOpen:n,searchQuery:n?r.searchQuery:"",searchResults:n?r.searchResults:[]})),setSearchQuery:n=>e({searchQuery:n}),setSearchResults:n=>e({searchResults:n}),openReference:(n,r,i)=>e({referenceOpen:!0,referenceData:{filePath:n,startLine:r,endLine:i}}),closeReference:()=>e({referenceOpen:!1,referenceData:null}),openMermaidViewer:(n,r)=>e({mermaidViewerOpen:!0,mermaidViewerData:{svg:n,code:r}}),closeMermaidViewer:()=>e({mermaidViewerOpen:!1,mermaidViewerData:null}),toggleSection:n=>e(r=>({expandedSections:r.expandedSections.includes(n)?r.expandedSections.filter(i=>i!==n):[...r.expandedSections,n]})),toggleGroup:n=>e(r=>({expandedGroups:r.expandedGroups.includes(n)?r.expandedGroups.filter(i=>i!==n):[...r.expandedGroups,n]})),setExpandedSections:n=>e({expandedSections:n}),setExpandedGroups:n=>e({expandedGroups:n}),setLoadingWiki:n=>e({loadingWiki:n}),setLoadingPage:n=>e({loadingPage:n}),setLoadingProjects:n=>e({loadingProjects:n}),setEditMode:()=>e(n=>n.currentView?{currentView:{...n.currentView,mode:"edit",editContent:n.currentView.content,isDirty:!1}}:n),setReadMode:()=>e(n=>n.currentView?{currentView:{...n.currentView,mode:"read",editContent:null,isDirty:!1}}:n),updateEditContent:n=>e(r=>!r.currentView||r.currentView.editContent===n?r:{currentView:{...r.currentView,editContent:n,isDirty:n!==r.currentView.content}}),savePage:async()=>{var i,a;const{currentView:n}=t();if(!n)return;const r=n.mode==="edit"?n.editContent:n.content;try{const{mtime:u}=await sh(n.projectId,n.version,n.slug,r,n.fileMtime??void 0);e(l=>({currentView:l.currentView?{...l.currentView,content:l.currentView.mode==="edit"?l.currentView.editContent:l.currentView.content,mode:"read",editContent:null,isDirty:!1,fileMtime:u,conflictData:null}:null}))}catch(u){if(!(((i=u==null?void 0:u.message)==null?void 0:i.includes("modified since load"))||((a=u==null?void 0:u.message)==null?void 0:a.includes("CONFLICT"))))throw u;if(n.mode==="read"){const f=await qi(n.projectId,n.version,n.slug);e(m=>({currentView:m.currentView?{...m.currentView,content:f.content,fileMtime:f.mtime,conflictData:null}:null}));return}const c=await qi(n.projectId,n.version,n.slug);e(f=>({currentView:f.currentView?{...f.currentView,conflictData:{serverContent:c.content,serverMtime:c.mtime}}:null}))}},resolveConflict:n=>{const{currentView:r}=t();r!=null&&r.conflictData&&e(n==="server"?i=>({currentView:i.currentView?{...i.currentView,editContent:i.currentView.conflictData.serverContent,fileMtime:i.currentView.conflictData.serverMtime,isDirty:!1,conflictData:null}:null}):i=>({currentView:i.currentView?{...i.currentView,fileMtime:i.currentView.conflictData.serverMtime,conflictData:null}:null}))},saveCalloutAction:async n=>{const{currentView:r}=t();if(!r)return;const{mtime:i}=await sh(r.projectId,r.version,r.slug,n,r.fileMtime??void 0);e(a=>({currentView:a.currentView?{...a.currentView,content:n,fileMtime:i}:null}))},reset:()=>e(c1)})),d1={aiPanelOpen:!1,aiPanelWidth:400,aiStatus:null,showInstallPrompt:!1,aiSessions:[],activeSessionId:null,aiMessages:[],aiStreaming:!1,aiConnected:!1,statusInfo:{},sessionStatus:"idle",aiError:null},Al=z_(e=>({...d1,toggleAIPanel:()=>e(t=>({aiPanelOpen:!t.aiPanelOpen})),setAIPanelOpen:t=>e({aiPanelOpen:t}),setAIPanelWidth:t=>e({aiPanelWidth:t}),setAIStatus:t=>e({aiStatus:t}),setShowInstallPrompt:t=>e({showInstallPrompt:t}),setAISessions:t=>e({aiSessions:t}),setActiveSession:t=>e({activeSessionId:t}),setAIMessages:t=>e({aiMessages:t}),addMessage:t=>e(n=>({aiMessages:[...n.aiMessages,t]})),updateMessage:(t,n)=>e(r=>({aiMessages:r.aiMessages.map(i=>i.id===t?{...i,...n}:i)})),appendToMessage:(t,n,r)=>e(i=>({aiMessages:i.aiMessages.map(a=>{if(a.id!==t)return a;const u=a.content,l=u[n]||"";return{...a,content:{...u,[n]:l+r}}})})),setStreaming:t=>e({aiStreaming:t}),setConnected:t=>e({aiConnected:t}),setStatusInfo:t=>e(n=>({statusInfo:{...n.statusInfo,...t}})),setSessionStatus:t=>e({sessionStatus:t}),appendToToolCallArgs:(t,n)=>e(r=>({aiMessages:r.aiMessages.map(i=>{if(i.type!=="tool_call")return i;const a=i.content;return a.toolCallId!==t?i:{...i,content:{...a,arguments:a.arguments+n}}})})),setAIError:t=>e({aiError:t}),addSubagentEvent:(t,n,r,i)=>e(a=>{const u=a.aiMessages,l=u.findIndex(c=>c.type==="subagent"&&c.content.parentToolCallId===t&&c.content.agentId===n);if(l>=0)return{aiMessages:u.map((c,f)=>{if(f!==l)return c;const m=c.content;return{...c,content:{...m,events:[...m.events,i]}}})};{const c={id:`ai-subagent-${Date.now()}`,sessionId:a.activeSessionId,role:"assistant",type:"subagent",content:{parentToolCallId:t,agentId:n,subagentType:r,events:[i],status:"running"},timestamp:Date.now()};return{aiMessages:[...u,c]}}}),updateSubagentStatus:(t,n,r)=>e(i=>({aiMessages:i.aiMessages.map(a=>{if(a.type!=="subagent")return a;const u=a.content;return u.parentToolCallId!==t||u.agentId!==n?a:{...a,content:{...u,status:r}}})})),clearMessages:()=>e({aiMessages:[],aiStreaming:!1}),resetAI:()=>e(d1)})),cC=({size:e=16})=>T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:T.jsx("path",{d:"M6 9l6 6 6-6"})}),dC=({size:e=16})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("circle",{cx:"11",cy:"11",r:"8"}),T.jsx("path",{d:"M21 21l-4.35-4.35"})]}),fC=({size:e=18})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("circle",{cx:"12",cy:"12",r:"3"}),T.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),ah=({size:e=20})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),T.jsx("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})]}),hC=({size:e=14})=>T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",children:T.jsx("path",{d:"M12 2L14.09 8.26L20 9.27L15.55 13.97L16.91 20L12 16.9L7.09 20L8.45 13.97L4 9.27L9.91 8.26L12 2Z"})}),pC=()=>{const e=we(f=>f.projects),t=we(f=>f.config),n=we(f=>f.setCurrentProject),[r,i]=P.useState(!1),a=P.useRef(null),u=t==null?void 0:t.lastOpenedProject,l=e.find(f=>f.id===u);P.useEffect(()=>{function f(m){a.current&&!a.current.contains(m.target)&&i(!1)}return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[]);const c=async f=>{n(f.id),i(!1);try{const{updateConfig:m}=await A(async()=>{const{updateConfig:h}=await Promise.resolve().then(()=>lC);return{updateConfig:h}},void 0);await m({lastOpenedProject:f.id})}catch(m){console.error("Failed to persist project selection:",m)}};return e.length===0?T.jsx("span",{className:"text-[13px] text-content-tertiary",children:"暂无项目"}):T.jsxs("div",{ref:a,className:"relative",children:[T.jsxs("button",{onClick:()=>i(!r),className:`
|
|
42
|
+
flex items-center gap-2
|
|
43
|
+
px-3 py-1.5 min-w-[140px]
|
|
44
|
+
border border-edge rounded-lg
|
|
45
|
+
bg-surface-secondary text-content
|
|
46
|
+
text-[13px] font-medium
|
|
47
|
+
transition-colors duration-150
|
|
48
|
+
hover:border-content-tertiary
|
|
49
|
+
`,children:[T.jsx(ah,{size:14}),T.jsx("span",{className:"flex-1 text-left truncate",children:(l==null?void 0:l.name)||"选择项目"}),T.jsx(cC,{size:14})]}),r&&T.jsx("div",{className:`
|
|
50
|
+
absolute top-full left-0 mt-1
|
|
51
|
+
min-w-[220px]
|
|
52
|
+
bg-surface border border-edge
|
|
53
|
+
rounded-lg shadow-lg
|
|
54
|
+
z-50 overflow-hidden
|
|
55
|
+
animate-fade-in
|
|
56
|
+
`,children:e.map(f=>T.jsxs("button",{onClick:()=>c(f),className:`
|
|
57
|
+
flex items-center gap-2 w-full
|
|
58
|
+
px-3 py-2
|
|
59
|
+
text-[13px] text-left
|
|
60
|
+
transition-colors duration-150
|
|
61
|
+
hover:bg-surface-hover
|
|
62
|
+
${f.id===u?"bg-accent-light text-accent-text":"text-content"}
|
|
63
|
+
`,children:[T.jsx(ah,{size:14}),T.jsx("span",{className:"truncate",children:f.name})]},f.id))})]})},mC=()=>{const e=we(i=>i.toggleSearch),t=we(i=>i.toggleSettings),n=Al(i=>i.toggleAIPanel),r=Al(i=>i.aiPanelOpen);return T.jsxs("header",{className:`
|
|
64
|
+
h-14 flex items-center justify-between
|
|
65
|
+
px-5 border-b border-edge
|
|
66
|
+
bg-surface-secondary/80 backdrop-blur-md
|
|
67
|
+
shrink-0 z-10
|
|
68
|
+
`,children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsxs("div",{className:"flex items-center gap-2.5 select-none",children:[T.jsx(ah,{size:20}),T.jsx("span",{className:"font-semibold text-[15px] text-content",children:"Zread Browser"})]}),T.jsx("div",{className:"w-px h-6 bg-edge"}),T.jsx(pC,{})]}),T.jsxs("button",{onClick:e,className:`
|
|
69
|
+
flex items-center gap-2
|
|
70
|
+
px-3.5 py-2 min-w-[200px]
|
|
71
|
+
border border-edge rounded-lg
|
|
72
|
+
bg-surface-secondary text-content-tertiary
|
|
73
|
+
text-[13px]
|
|
74
|
+
transition-colors duration-150
|
|
75
|
+
hover:border-content-tertiary hover:text-content
|
|
76
|
+
`,children:[T.jsx(dC,{size:14}),T.jsx("span",{className:"flex-1 text-left",children:"搜索..."}),T.jsx("kbd",{className:"text-[11px] px-1.5 py-0.5 rounded bg-surface-tertiary border border-edge-light font-mono",children:"⌘K"})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsxs("button",{onClick:n,"aria-pressed":r,className:`
|
|
77
|
+
flex items-center gap-1.5 px-3 py-1.5
|
|
78
|
+
rounded-lg border
|
|
79
|
+
transition-all duration-150
|
|
80
|
+
border-edge bg-surface-secondary text-content-tertiary
|
|
81
|
+
hover:bg-surface-hover hover:text-content
|
|
82
|
+
aria-pressed:border-accent
|
|
83
|
+
aria-pressed:bg-accent-light
|
|
84
|
+
aria-pressed:text-accent-text
|
|
85
|
+
aria-pressed:hover:bg-accent-light
|
|
86
|
+
`,title:"问问 AI",children:[T.jsx(hC,{size:14}),T.jsx("span",{className:"text-[13px] font-medium",children:"问问 AI"})]}),T.jsx("button",{onClick:t,className:`
|
|
87
|
+
w-9 h-9
|
|
88
|
+
flex items-center justify-center
|
|
89
|
+
rounded-lg border border-edge
|
|
90
|
+
bg-surface-secondary text-content-tertiary
|
|
91
|
+
hover:bg-surface-hover hover:text-content
|
|
92
|
+
transition-colors duration-150
|
|
93
|
+
`,title:"设置",children:T.jsx(fC,{size:18})})]})]})},W_=({size:e=14,rotated:t})=>T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`shrink-0 transition-transform duration-150 ${t?"rotate-90":""}`,children:T.jsx("path",{d:"M9 18l6-6-6-6"})}),gC=({size:e=16})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),T.jsx("line",{x1:"9",y1:"3",x2:"9",y2:"21"})]}),EC=({size:e=16})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),T.jsx("line",{x1:"14",y1:"3",x2:"14",y2:"21"})]});function _C(e){const t=new Map;for(const r of e.pages){t.has(r.section)||t.set(r.section,{grouped:new Map,ungrouped:[]});const i=t.get(r.section);r.group?(i.grouped.has(r.group)||i.grouped.set(r.group,[]),i.grouped.get(r.group).push(r)):i.ungrouped.push(r)}const n=[];for(const[r,i]of t){const a=[];for(const[u,l]of i.grouped)a.push({name:u,pages:l});n.push({name:r,groups:a,ungroupedPages:i.ungrouped})}return{sections:n}}const q_=yt.memo(({page:e,isActive:t,onClick:n})=>{var _,g,y;const[r,i]=P.useState(!1),[a,u]=P.useState("bottom"),l=P.useRef(null),c=P.useRef(null),f=e.level==="Beginner"?"bg-accent-light text-accent-text border-accent/15":e.level==="Intermediate"?"bg-warning-light text-[#92400e] border-warning/15":"bg-danger-light text-[#991b1b] border-danger/15",m=P.useCallback(()=>{l.current=setTimeout(()=>{var k;const C=(k=c.current)==null?void 0:k.getBoundingClientRect();if(C){const w=C.top;u(w>80?"top":"bottom")}i(!0)},300)},[]),h=P.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null),i(!1)},[]);return P.useEffect(()=>()=>{l.current&&clearTimeout(l.current)},[]),T.jsxs("div",{className:"relative",children:[T.jsxs("button",{ref:c,onClick:n,"aria-selected":t,className:`
|
|
94
|
+
relative flex items-center w-full
|
|
95
|
+
pl-9 pr-2.5 py-[7px]
|
|
96
|
+
text-[13px] text-content
|
|
97
|
+
rounded-lg
|
|
98
|
+
transition-colors duration-150
|
|
99
|
+
hover:bg-surface-hover
|
|
100
|
+
aria-selected:bg-accent-light
|
|
101
|
+
aria-selected:text-accent-text
|
|
102
|
+
aria-selected:hover:bg-accent-light
|
|
103
|
+
`,onMouseEnter:m,onMouseLeave:h,children:[t&&T.jsx("div",{className:"absolute left-1 top-1/2 -translate-y-1/2 w-[3px] h-3/5 rounded-r-full bg-accent"}),T.jsx("span",{className:"truncate",children:e.title})]}),r&&T.jsxs("div",{className:`
|
|
104
|
+
fixed z-[1000]
|
|
105
|
+
bg-surface border border-edge
|
|
106
|
+
rounded-lg shadow-lg
|
|
107
|
+
p-2.5 min-w-[120px]
|
|
108
|
+
pointer-events-none
|
|
109
|
+
animate-fade-in
|
|
110
|
+
`,style:{left:((_=c.current)==null?void 0:_.getBoundingClientRect().left)??0,top:a==="top"?(((g=c.current)==null?void 0:g.getBoundingClientRect().top)??0)-60:(((y=c.current)==null?void 0:y.getBoundingClientRect().bottom)??0)+8},children:[T.jsx("div",{className:"text-[13px] font-semibold text-content mb-1.5 leading-snug",children:e.title}),T.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-[11px] font-medium leading-snug border ${f}`,children:e.level})]})]})}),bC=({name:e,pages:t,expanded:n,currentSlug:r,onToggle:i,onPageClick:a})=>T.jsxs("div",{children:[T.jsxs("button",{onClick:i,className:`
|
|
111
|
+
flex items-center gap-1.5 w-full text-left
|
|
112
|
+
pl-7 pr-2.5 py-1.5
|
|
113
|
+
text-[13px] font-medium text-content-secondary
|
|
114
|
+
rounded-lg
|
|
115
|
+
transition-colors duration-150
|
|
116
|
+
hover:bg-surface-hover
|
|
117
|
+
`,children:[T.jsx(W_,{size:11,rotated:n}),T.jsx("span",{className:"flex-1 truncate",children:e}),T.jsx("span",{className:"text-[11px] text-content-muted",children:t.length})]}),n&&T.jsx("div",{children:t.map(u=>T.jsx(q_,{page:u,isActive:u.slug===r,onClick:()=>a(u)},u.slug))})]}),yC=({section:e,expanded:t,currentSlug:n,expandedGroups:r,onToggleSection:i,onToggleGroup:a,onPageClick:u})=>T.jsxs("div",{className:"mb-0.5",children:[T.jsxs("button",{onClick:i,className:`
|
|
118
|
+
flex items-center gap-2 w-full text-left
|
|
119
|
+
px-2.5 py-2
|
|
120
|
+
text-[13px] font-semibold text-content
|
|
121
|
+
rounded-lg
|
|
122
|
+
transition-colors duration-150
|
|
123
|
+
hover:bg-surface-hover
|
|
124
|
+
`,children:[T.jsx(W_,{size:12,rotated:t}),T.jsx("span",{className:"flex-1 truncate",children:e.name})]}),t&&T.jsxs("div",{children:[e.groups.map(l=>T.jsx(bC,{name:l.name,pages:l.pages,expanded:r.includes(`${e.name}::${l.name}`),currentSlug:n,onToggle:()=>a(`${e.name}::${l.name}`),onPageClick:u},l.name)),e.ungroupedPages.map(l=>T.jsx(q_,{page:l,isActive:l.slug===n,onClick:()=>u(l)},l.slug))]})]}),xC=({section:e,isActive:t,currentSlug:n,onPageClick:r})=>{var y,C,k;const[i,a]=P.useState(!1),[u,l]=P.useState(!1),c=P.useRef(null),f=P.useRef(null),m=[...e.ungroupedPages,...e.groups.flatMap(w=>w.pages)],h=P.useCallback(()=>{c.current=setTimeout(()=>{var D;const w=(D=f.current)==null?void 0:D.getBoundingClientRect();w&&l(window.innerHeight-w.bottom<200),a(!0)},200)},[]),_=P.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),a(!1)},[]),g=e.name.charAt(0).toUpperCase();return T.jsxs("div",{className:"relative",onMouseEnter:h,onMouseLeave:_,children:[T.jsx("button",{ref:f,className:`
|
|
125
|
+
w-9 h-9 rounded-lg text-[13px] font-semibold
|
|
126
|
+
flex items-center justify-center
|
|
127
|
+
transition-colors duration-150 cursor-pointer
|
|
128
|
+
${t?"bg-accent-light text-accent-text":"text-content-tertiary hover:bg-surface-hover hover:text-content"}
|
|
129
|
+
`,title:e.name,children:g}),i&&T.jsxs("div",{className:`
|
|
130
|
+
fixed z-[1000]
|
|
131
|
+
bg-surface border border-edge
|
|
132
|
+
rounded-lg shadow-lg
|
|
133
|
+
py-1.5 min-w-[180px] max-h-[400px] overflow-y-auto
|
|
134
|
+
pointer-events-auto
|
|
135
|
+
`,style:{left:(((y=f.current)==null?void 0:y.getBoundingClientRect().right)??0)+8,top:u?(((C=f.current)==null?void 0:C.getBoundingClientRect().bottom)??0)-Math.min(m.length*36+40,400):((k=f.current)==null?void 0:k.getBoundingClientRect().top)??0},onMouseEnter:()=>{c.current&&(clearTimeout(c.current),c.current=null)},onMouseLeave:_,children:[T.jsx("div",{className:"px-3 py-1.5 text-[11px] font-semibold text-content-muted uppercase tracking-wider",children:e.name}),e.groups.map(w=>T.jsxs("div",{children:[T.jsx("div",{className:"px-3 py-1 text-[11px] font-medium text-content-tertiary",children:w.name}),w.pages.map(D=>T.jsx("button",{onClick:()=>{r(D),a(!1)},className:`
|
|
136
|
+
w-full text-left px-4 py-1.5 text-[12px] truncate
|
|
137
|
+
transition-colors duration-100 cursor-pointer
|
|
138
|
+
${D.slug===n?"text-accent font-medium bg-accent-light":"text-content-secondary hover:bg-surface-hover hover:text-content"}
|
|
139
|
+
`,children:D.title},D.slug))]},w.name)),e.ungroupedPages.map(w=>T.jsx("button",{onClick:()=>{r(w),a(!1)},className:`
|
|
140
|
+
w-full text-left px-4 py-1.5 text-[12px] truncate
|
|
141
|
+
transition-colors duration-100 cursor-pointer
|
|
142
|
+
${w.slug===n?"text-accent font-medium bg-accent-light":"text-content-secondary hover:bg-surface-hover hover:text-content"}
|
|
143
|
+
`,children:w.title},w.slug))]})]})},TC=()=>{const e=we(k=>k.currentWiki),t=we(k=>k.currentView),n=we(k=>k.config),r=we(k=>k.expandedSections),i=we(k=>k.expandedGroups),a=we(k=>k.toggleSection),u=we(k=>k.toggleGroup),l=we(k=>k.setCurrentView),c=we(k=>k.setCurrentWiki),f=we(k=>k.setLoadingWiki);we(k=>k.setLoadingPage);const m=we(k=>k.sidebarOpen),h=we(k=>k.toggleSidebar),_=n==null?void 0:n.lastOpenedProject;P.useEffect(()=>{if(!_){c(null),l(null);return}let k=!1;return f(!0),l(null),Zh(_).then(w=>{k||c(w)}).catch(w=>{console.error("Failed to load wiki:",w),k||c(null)}).finally(()=>{k||f(!1)}),()=>{k=!0}},[_,c,l,f]);const g=P.useMemo(()=>e?_C(e):null,[e]);P.useEffect(()=>{var k;if(g&&g.sections.length>0){const w=g.sections.map(z=>z.name),D=g.sections.flatMap(z=>z.groups.map(B=>`${z.name}::${B.name}`));we.getState().setExpandedSections(w),we.getState().setExpandedGroups(D);const N=g.sections[0],U=((k=N.groups[0])==null?void 0:k.pages[0])||N.ungroupedPages[0];U&&!C&&y(U)}},[g]);const y=async k=>{if(!_)return;const w=we.getState().projects.find(N=>N.id===_),D=(w==null?void 0:w.currentVersion)||"latest";l({projectId:_,version:D,slug:k.slug,content:"",loading:!0,mode:"read",editContent:null,isDirty:!1,fileMtime:null,conflictData:null});try{const N=await qi(_,D,k.slug);l({projectId:_,version:D,slug:k.slug,content:N.content,loading:!1,mode:"read",editContent:null,isDirty:!1,fileMtime:N.mtime,conflictData:null})}catch(N){l({projectId:_,version:D,slug:k.slug,content:"",loading:!1,error:N instanceof Error?N.message:"Failed to load page",mode:"read",editContent:null,isDirty:!1,fileMtime:null,conflictData:null})}},C=t==null?void 0:t.slug;return m?T.jsxs("aside",{className:"w-[260px] h-full border-r border-edge bg-surface-tertiary flex flex-col shrink-0 overflow-hidden shadow-[inset_-4px_0_12px_rgba(0,0,0,0.05)]",children:[T.jsxs("div",{className:`
|
|
144
|
+
flex items-center justify-between
|
|
145
|
+
px-4 py-3.5
|
|
146
|
+
border-b border-edge
|
|
147
|
+
text-[11px] font-semibold uppercase tracking-wider
|
|
148
|
+
text-content-muted select-none
|
|
149
|
+
`,children:[T.jsx("span",{children:"导航"}),T.jsx("button",{onClick:h,className:"p-1 rounded text-content-muted hover:text-content hover:bg-surface-hover transition-colors duration-150 cursor-pointer",title:"折叠导航",children:T.jsx(gC,{size:14})})]}),T.jsx("nav",{className:"flex-1 overflow-y-auto py-2 px-2",children:g?g.sections.length===0?T.jsx("div",{className:"px-4 py-6 text-center text-[13px] text-content-tertiary",children:"暂无内容"}):g.sections.map(k=>T.jsx(yC,{section:k,expanded:r.includes(k.name),currentSlug:C,expandedGroups:i,onToggleSection:()=>a(k.name),onToggleGroup:w=>u(w),onPageClick:y},k.name)):T.jsx("div",{className:"px-4 py-6 text-center text-[13px] text-content-tertiary",children:_?"加载中...":"请先选择一个项目"})})]}):T.jsxs("aside",{className:"w-[48px] h-full border-r border-edge bg-surface-tertiary flex flex-col shrink-0 items-center py-3 gap-1 shadow-[inset_-4px_0_12px_rgba(0,0,0,0.05)]",children:[T.jsx("button",{onClick:h,className:"p-2 rounded-lg text-content-tertiary hover:bg-surface-hover hover:text-content transition-colors duration-150 cursor-pointer",title:"展开导航",children:T.jsx(EC,{size:16})}),g==null?void 0:g.sections.map(k=>{const D=[...k.ungroupedPages,...k.groups.flatMap(N=>N.pages)].some(N=>N.slug===C);return T.jsx(xC,{section:k,isActive:D,currentSlug:C,onPageClick:N=>{y(N)}},k.name)})]})};function f1(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(i,r).trim();(u||!a)&&t.push(u),i=r+1,r=n.indexOf(",",i)}return t}function Jh(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const kC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CC={};function h1(e,t){return(CC.jsx?wC:kC).test(e)}const vC=/[ \t\n\f\r]/g;function Zl(e){return typeof e=="object"?e.type==="text"?p1(e.value):!1:p1(e)}function p1(e){return e.replace(vC,"")===""}class No{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}No.prototype.normal={};No.prototype.property={};No.prototype.space=void 0;function Y_(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new No(n,r,t)}function fo(e){return e.toLowerCase()}class fn{constructor(t,n){this.attribute=n,this.property=t}}fn.prototype.attribute="";fn.prototype.booleanish=!1;fn.prototype.boolean=!1;fn.prototype.commaOrSpaceSeparated=!1;fn.prototype.commaSeparated=!1;fn.prototype.defined=!1;fn.prototype.mustUseProperty=!1;fn.prototype.number=!1;fn.prototype.overloadedBoolean=!1;fn.prototype.property="";fn.prototype.spaceSeparated=!1;fn.prototype.space=void 0;let SC=0;const Be=Zi(),bt=Zi(),oh=Zi(),de=Zi(),rt=Zi(),Fs=Zi(),yn=Zi();function Zi(){return 2**++SC}const uh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:bt,commaOrSpaceSeparated:yn,commaSeparated:Fs,number:de,overloadedBoolean:oh,spaceSeparated:rt},Symbol.toStringTag,{value:"Module"})),yf=Object.keys(uh);class ep extends fn{constructor(t,n,r,i){let a=-1;if(super(t,n),m1(this,"space",i),typeof r=="number")for(;++a<yf.length;){const u=yf[a];m1(this,yf[a],(r&uh[u])===uh[u])}}}ep.prototype.defined=!0;function m1(e,t,n){n&&(e[t]=n)}function Gs(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new ep(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[fo(r)]=r,n[fo(a.attribute)]=r}return new No(t,n,e.space)}const Q_=Gs({properties:{ariaActiveDescendant:null,ariaAtomic:bt,ariaAutoComplete:null,ariaBusy:bt,ariaChecked:bt,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:rt,ariaCurrent:null,ariaDescribedBy:rt,ariaDetails:null,ariaDisabled:bt,ariaDropEffect:rt,ariaErrorMessage:null,ariaExpanded:bt,ariaFlowTo:rt,ariaGrabbed:bt,ariaHasPopup:null,ariaHidden:bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:rt,ariaLevel:de,ariaLive:null,ariaModal:bt,ariaMultiLine:bt,ariaMultiSelectable:bt,ariaOrientation:null,ariaOwns:rt,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:bt,ariaReadOnly:bt,ariaRelevant:null,ariaRequired:bt,ariaRoleDescription:rt,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:bt,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function K_(e,t){return t in e?e[t]:t}function X_(e,t){return K_(e,t.toLowerCase())}const AC=Gs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fs,acceptCharset:rt,accessKey:rt,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:rt,autoFocus:Be,autoPlay:Be,blocking:rt,capture:null,charSet:null,checked:Be,cite:null,className:rt,cols:de,colSpan:null,content:null,contentEditable:bt,controls:Be,controlsList:rt,coords:de|Fs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:oh,draggable:bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:rt,height:de,hidden:oh,high:de,href:null,hrefLang:null,htmlFor:rt,httpEquiv:rt,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:rt,itemRef:rt,itemScope:Be,itemType:rt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Be,optimum:de,pattern:null,ping:rt,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:rt,required:Be,reversed:Be,rows:de,rowSpan:de,sandbox:rt,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:Be,useMap:null,value:bt,width:de,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:rt,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:bt,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Be,disableRemotePlayback:Be,prefix:null,property:null,results:de,security:null,unselectable:null},space:"html",transform:X_}),IC=Gs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:yn,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:rt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:Be,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Fs,g2:Fs,glyphName:Fs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:yn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:de,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:rt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yn,rev:yn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yn,requiredFeatures:yn,requiredFonts:yn,requiredFormats:yn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:yn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yn,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:K_}),Z_=Gs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),J_=Gs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:X_}),eb=Gs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),NC={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},LC=/[A-Z]/g,g1=/-[a-z]/g,RC=/^data[-\w.:]+$/i;function Lo(e,t){const n=fo(t);let r=t,i=fn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&RC.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(g1,PC);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!g1.test(a)){let u=a.replace(LC,OC);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}i=ep}return new i(r,t)}function OC(e){return"-"+e.toLowerCase()}function PC(e){return e.charAt(1).toUpperCase()}const Ws=Y_([Q_,AC,Z_,J_,eb],"html"),cr=Y_([Q_,IC,Z_,J_,eb],"svg");function E1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function tp(e){return e.join(" ").trim()}var Ss={},xf,_1;function DC(){if(_1)return xf;_1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
|
|
150
|
+
`,f="/",m="*",h="",_="comment",g="declaration";function y(k,w){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];w=w||{};var D=1,N=1;function U(he){var te=he.match(t);te&&(D+=te.length);var ee=he.lastIndexOf(c);N=~ee?he.length-ee:N+he.length}function z(){var he={line:D,column:N};return function(te){return te.position=new B(he),ne(),te}}function B(he){this.start=he,this.end={line:D,column:N},this.source=w.source}B.prototype.content=k;function X(he){var te=new Error(w.source+":"+D+":"+N+": "+he);if(te.reason=he,te.filename=w.source,te.line=D,te.column=N,te.source=k,!w.silent)throw te}function Q(he){var te=he.exec(k);if(te){var ee=te[0];return U(ee),k=k.slice(ee.length),te}}function ne(){Q(n)}function $(he){var te;for(he=he||[];te=oe();)te!==!1&&he.push(te);return he}function oe(){var he=z();if(!(f!=k.charAt(0)||m!=k.charAt(1))){for(var te=2;h!=k.charAt(te)&&(m!=k.charAt(te)||f!=k.charAt(te+1));)++te;if(te+=2,h===k.charAt(te-1))return X("End of comment missing");var ee=k.slice(2,te-2);return N+=2,U(ee),k=k.slice(te),N+=2,he({type:_,comment:ee})}}function ue(){var he=z(),te=Q(r);if(te){if(oe(),!Q(i))return X("property missing ':'");var ee=Q(a),me=he({type:g,property:C(te[0].replace(e,h)),value:ee?C(ee[0].replace(e,h)):h});return Q(u),me}}function ve(){var he=[];$(he);for(var te;te=ue();)te!==!1&&(he.push(te),$(he));return he}return ne(),ve()}function C(k){return k?k.replace(l,h):h}return xf=y,xf}var b1;function MC(){if(b1)return Ss;b1=1;var e=Ss&&Ss.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.default=n;const t=e(DC());function n(r,i){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof i=="function";return u.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:m}=c;l?i(f,m,c):m&&(a=a||{},a[f]=m)}),a}return Ss}var ja={},y1;function BC(){if(y1)return ja;y1=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,m){return m.toUpperCase()},l=function(f,m){return"".concat(m,"-")},c=function(f,m){return m===void 0&&(m={}),a(f)?f:(f=f.toLowerCase(),m.reactCompat?f=f.replace(i,l):f=f.replace(r,l),f.replace(t,u))};return ja.camelCase=c,ja}var Ha,x1;function FC(){if(x1)return Ha;x1=1;var e=Ha&&Ha.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(MC()),n=BC();function r(i,a){var u={};return!i||typeof i!="string"||(0,t.default)(i,function(l,c){l&&c&&(u[(0,n.camelCase)(l,a)]=c)}),u}return r.default=r,Ha=r,Ha}var jC=FC();const HC=Ao(jC),Jl=tb("end"),dr=tb("start");function tb(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function nb(e){const t=dr(e),n=Jl(e);if(t&&n)return{start:t,end:n}}function eo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?T1(e.position):"start"in e||"end"in e?T1(e):"line"in e||"column"in e?lh(e):""}function lh(e){return k1(e&&e.line)+":"+k1(e&&e.column)}function T1(e){return lh(e&&e.start)+"-"+lh(e&&e.end)}function k1(e){return e&&typeof e=="number"?e:1}class qt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(u=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=eo(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}qt.prototype.file="";qt.prototype.name="";qt.prototype.reason="";qt.prototype.message="";qt.prototype.stack="";qt.prototype.column=void 0;qt.prototype.line=void 0;qt.prototype.ancestors=void 0;qt.prototype.cause=void 0;qt.prototype.fatal=void 0;qt.prototype.place=void 0;qt.prototype.ruleId=void 0;qt.prototype.source=void 0;const np={}.hasOwnProperty,UC=new Map,$C=/[A-Z]/g,zC=new Set(["table","tbody","thead","tfoot","tr"]),VC=new Set(["td","th"]),rb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ib(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ZC(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=XC(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?cr:Ws,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=sb(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function sb(e,t,n){if(t.type==="element")return GC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return WC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return YC(e,t,n);if(t.type==="mdxjsEsm")return qC(e,t);if(t.type==="root")return QC(e,t,n);if(t.type==="text")return KC(e,t)}function GC(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=cr,e.schema=i),e.ancestors.push(t);const a=ob(e,t.tagName,!1),u=JC(e,t);let l=ip(e,t);return zC.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!Zl(c):!0})),ab(e,u,a,t),rp(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function WC(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ho(e,t.position)}function qC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ho(e,t.position)}function YC(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=cr,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:ob(e,t.name,!0),u=ev(e,t),l=ip(e,t);return ab(e,u,a,t),rp(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function QC(e,t,n){const r={};return rp(r,ip(e,t)),e.create(t,e.Fragment,r,n)}function KC(e,t){return t.value}function ab(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function rp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function XC(e,t,n){return r;function r(i,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function ZC(e,t){return n;function n(r,i,a,u){const l=Array.isArray(a.children),c=dr(r);return t(i,a,u,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function JC(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&np.call(t.properties,i)){const a=tv(e,i,t.properties[i]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&VC.has(t.tagName)?r=l:n[u]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function ev(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const l=u.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ho(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else ho(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function ip(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:UC;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const f=i.get(c)||0;u=c+"-"+f,i.set(c,f+1)}}const l=sb(e,a,u);l!==void 0&&n.push(l)}return n}function tv(e,t,n){const r=Lo(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Jh(n):tp(n)),r.property==="style"){let i=typeof n=="object"?n:nv(e,String(n));return e.stylePropertyNameCase==="css"&&(i=rv(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?NC[r.property]||r.property:r.attribute,n]}}function nv(e,t){try{return HC(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new qt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=rb+"#cannot-parse-style-attribute",i}}function ob(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,u;for(;++a<i.length;){const l=h1(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=u}else r=h1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return np.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ho(e)}function ho(e,t){const n=new qt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=rb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function rv(e){const t={};let n;for(n in e)np.call(e,n)&&(t[iv(n)]=e[n]);return t}function iv(e){let t=e.replace($C,sv);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function sv(e){return"-"+e.toLowerCase()}const js={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},av={};function sp(e,t){const n=av,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ub(e,r,i)}function ub(e,t,n){if(ov(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return w1(e.children,t,n)}return Array.isArray(e)?w1(e,t,n):""}function w1(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ub(e[i],t,n);return r.join("")}function ov(e){return!!(e&&typeof e=="object")}const C1=document.createElement("i");function ap(e){const t="&"+e+";";C1.innerHTML=t;const n=C1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function xn(e,t,n,r){const i=e.length;let a=0,u;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function Ln(e,t){return e.length>0?(xn(e,e.length,0,t),e):t}const v1={}.hasOwnProperty;function lb(e){const t={};let n=-1;for(;++n<e.length;)uv(t,e[n]);return t}function uv(e,t){let n;for(n in t){const i=(v1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){v1.call(i,u)||(i[u]=[]);const l=a[u];lv(i[u],Array.isArray(l)?l:l?[l]:[])}}}function lv(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xn(e,0,0,r)}function cb(e,t){const n=Number.parseInt(e,t);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)}function Qn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Jt=gi(/[A-Za-z]/),Wt=gi(/[\dA-Za-z]/),cv=gi(/[#-'*+\--9=?A-Z^-~]/);function Il(e){return e!==null&&(e<32||e===127)}const ch=gi(/\d/),dv=gi(/[\dA-Fa-f]/),fv=gi(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function et(e){return e!==null&&(e<0||e===32)}function Ge(e){return e===-2||e===-1||e===32}const ec=gi(new RegExp("\\p{P}|\\p{S}","u")),Yi=gi(/\s/);function gi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qs(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Wt(e.charCodeAt(n+1))&&Wt(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),i=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+i+1,u=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function We(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(c){return Ge(c)?(e.enter(n),l(c)):t(c)}function l(c){return Ge(c)&&a++<i?(e.consume(c),l):(e.exit(n),t(c))}}const hv={tokenize:pv};function pv(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),We(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,u(l)}function u(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return Re(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const mv={tokenize:gv},S1={tokenize:Ev};function gv(e){const t=this,n=[];let r=0,i,a,u;return l;function l(N){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,c,f)(N)}return f(N)}function c(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&D();const U=t.events.length;let z=U,B;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){B=t.events[z][1].end;break}w(r);let X=U;for(;X<t.events.length;)t.events[X][1].end={...B},X++;return xn(t.events,z+1,0,t.events.slice(U)),t.events.length=X,f(N)}return l(N)}function f(N){if(r===n.length){if(!i)return _(N);if(i.currentConstruct&&i.currentConstruct.concrete)return y(N);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(S1,m,h)(N)}function m(N){return i&&D(),w(r),_(N)}function h(N){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,y(N)}function _(N){return t.containerState={},e.attempt(S1,g,y)(N)}function g(N){return r++,n.push([t.currentConstruct,t.containerState]),_(N)}function y(N){if(N===null){i&&D(),w(0),e.consume(N);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),C(N)}function C(N){if(N===null){k(e.exit("chunkFlow"),!0),w(0),e.consume(N);return}return Re(N)?(e.consume(N),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(N),C)}function k(N,U){const z=t.sliceStream(N);if(U&&z.push(null),N.previous=a,a&&(a.next=N),a=N,i.defineSkip(N.start),i.write(z),t.parser.lazy[N.start.line]){let B=i.events.length;for(;B--;)if(i.events[B][1].start.offset<u&&(!i.events[B][1].end||i.events[B][1].end.offset>u))return;const X=t.events.length;let Q=X,ne,$;for(;Q--;)if(t.events[Q][0]==="exit"&&t.events[Q][1].type==="chunkFlow"){if(ne){$=t.events[Q][1].end;break}ne=!0}for(w(r),B=X;B<t.events.length;)t.events[B][1].end={...$},B++;xn(t.events,Q+1,0,t.events.slice(X)),t.events.length=B}}function w(N){let U=n.length;for(;U-- >N;){const z=n[U];t.containerState=z[1],z[0].exit.call(t,e)}n.length=N}function D(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ev(e,t,n){return We(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Us(e){if(e===null||et(e)||Yi(e))return 1;if(ec(e))return 2}function tc(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const dh={name:"attention",resolveAll:_v,tokenize:bv};function _v(e,t){let n=-1,r,i,a,u,l,c,f,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},_={...e[n][1].start};A1(h,-c),A1(_,c),u={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:_},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...u.start},end:{...l.end}},e[r][1].end={...u.start},e[n][1].start={...l.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Ln(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Ln(f,[["enter",i,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Ln(f,tc(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Ln(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,f=Ln(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,xn(e,r-1,n-r+3,f),n=r+f.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function bv(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Us(r);let a;return u;function u(c){return a=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===a)return e.consume(c),l;const f=e.exit("attentionSequence"),m=Us(c),h=!m||m===2&&i||n.includes(c),_=!i||i===2&&m||n.includes(r);return f._open=!!(a===42?h:h&&(i||!_)),f._close=!!(a===42?_:_&&(m||!h)),t(c)}}function A1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const yv={name:"autolink",tokenize:xv};function xv(e,t,n){let r=0;return i;function i(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(g){return Jt(g)?(e.consume(g),u):g===64?n(g):f(g)}function u(g){return g===43||g===45||g===46||Wt(g)?(r=1,l(g)):f(g)}function l(g){return g===58?(e.consume(g),r=0,c):(g===43||g===45||g===46||Wt(g))&&r++<32?(e.consume(g),l):(r=0,f(g))}function c(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||Il(g)?n(g):(e.consume(g),c)}function f(g){return g===64?(e.consume(g),m):cv(g)?(e.consume(g),f):n(g)}function m(g){return Wt(g)?h(g):n(g)}function h(g){return g===46?(e.consume(g),r=0,m):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):_(g)}function _(g){if((g===45||Wt(g))&&r++<63){const y=g===45?_:h;return e.consume(g),y}return n(g)}}const Ro={partial:!0,tokenize:Tv};function Tv(e,t,n){return r;function r(a){return Ge(a)?We(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Re(a)?t(a):n(a)}}const db={continuation:{tokenize:wv},exit:Cv,name:"blockQuote",tokenize:kv};function kv(e,t,n){const r=this;return i;function i(u){if(u===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ge(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function wv(e,t,n){const r=this;return i;function i(u){return Ge(u)?We(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(db,t,n)(u)}}function Cv(e){e.exit("blockQuote")}const fb={name:"characterEscape",tokenize:vv};function vv(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return fv(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const hb={name:"characterReference",tokenize:Sv};function Sv(e,t,n){const r=this;let i=0,a,u;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=Wt,m(h))}function f(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=dv,m):(e.enter("characterReferenceValue"),a=7,u=ch,m(h))}function m(h){if(h===59&&i){const _=e.exit("characterReferenceValue");return u===Wt&&!ap(r.sliceSerialize(_))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(h)&&i++<a?(e.consume(h),m):n(h)}}const I1={partial:!0,tokenize:Iv},N1={concrete:!0,name:"codeFenced",tokenize:Av};function Av(e,t,n){const r=this,i={partial:!0,tokenize:z};let a=0,u=0,l;return c;function c(B){return f(B)}function f(B){const X=r.events[r.events.length-1];return a=X&&X[1].type==="linePrefix"?X[2].sliceSerialize(X[1],!0).length:0,l=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(B)}function m(B){return B===l?(u++,e.consume(B),m):u<3?n(B):(e.exit("codeFencedFenceSequence"),Ge(B)?We(e,h,"whitespace")(B):h(B))}function h(B){return B===null||Re(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(I1,C,U)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||Re(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(B)):Ge(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),We(e,g,"whitespace")(B)):B===96&&B===l?n(B):(e.consume(B),_)}function g(B){return B===null||Re(B)?h(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(B))}function y(B){return B===null||Re(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(B)):B===96&&B===l?n(B):(e.consume(B),y)}function C(B){return e.attempt(i,U,k)(B)}function k(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),w}function w(B){return a>0&&Ge(B)?We(e,D,"linePrefix",a+1)(B):D(B)}function D(B){return B===null||Re(B)?e.check(I1,C,U)(B):(e.enter("codeFlowValue"),N(B))}function N(B){return B===null||Re(B)?(e.exit("codeFlowValue"),D(B)):(e.consume(B),N)}function U(B){return e.exit("codeFenced"),t(B)}function z(B,X,Q){let ne=0;return $;function $(te){return B.enter("lineEnding"),B.consume(te),B.exit("lineEnding"),oe}function oe(te){return B.enter("codeFencedFence"),Ge(te)?We(B,ue,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):ue(te)}function ue(te){return te===l?(B.enter("codeFencedFenceSequence"),ve(te)):Q(te)}function ve(te){return te===l?(ne++,B.consume(te),ve):ne>=u?(B.exit("codeFencedFenceSequence"),Ge(te)?We(B,he,"whitespace")(te):he(te)):Q(te)}function he(te){return te===null||Re(te)?(B.exit("codeFencedFence"),X(te)):Q(te)}}}function Iv(e,t,n){const r=this;return i;function i(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Tf={name:"codeIndented",tokenize:Lv},Nv={partial:!0,tokenize:Rv};function Lv(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),We(e,a,"linePrefix",5)(f)}function a(f){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?c(f):Re(f)?e.attempt(Nv,u,c)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||Re(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function c(f){return e.exit("codeIndented"),t(f)}}function Rv(e,t,n){const r=this;return i;function i(u){return r.parser.lazy[r.now().line]?n(u):Re(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),i):We(e,a,"linePrefix",5)(u)}function a(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):Re(u)?i(u):n(u)}}const Ov={name:"codeText",previous:Dv,resolve:Pv,tokenize:Mv};function Pv(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Dv(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Mv(e,t,n){let r=0,i,a;return u;function u(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(a=e.enter("codeTextSequence"),i=0,m(h)):Re(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),f(h))}function f(h){return h===null||h===32||h===96||Re(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),f)}function m(h){return h===96?(e.consume(h),i++,m):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(a.type="codeTextData",f(h))}}class Bv{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ua(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ua(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ua(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ua(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ua(this.left,n.reverse())}}}function Ua(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function pb(e){const t={};let n=-1,r,i,a,u,l,c,f;const m=new Bv(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Fv(m,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(u=m.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(i&&(m.get(i)[1].type="lineEndingBlank"),u[1].type="lineEnding",i=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;i&&(r[1].end={...m.get(i)[1].start},l=m.slice(i,n),l.unshift(r),m.splice(i,n-i+1,l))}}return xn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!f}function Fv(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const l=u.events,c=[],f={};let m,h,_=-1,g=n,y=0,C=0;const k=[C];for(;g;){for(;e.get(++i)[1]!==g;);a.push(i),g._tokenizer||(m=r.sliceStream(g),g.next||m.push(null),h&&u.defineSkip(g.start),g._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),g._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),h=g,g=g.next}for(g=n;++_<l.length;)l[_][0]==="exit"&&l[_-1][0]==="enter"&&l[_][1].type===l[_-1][1].type&&l[_][1].start.line!==l[_][1].end.line&&(C=_+1,k.push(C),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(u.events=[],g?(g._tokenizer=void 0,g.previous=void 0):k.pop(),_=k.length;_--;){const w=l.slice(k[_],k[_+1]),D=a.pop();c.push([D,D+w.length-1]),e.splice(D,2,w)}for(c.reverse(),_=-1;++_<c.length;)f[y+c[_][0]]=y+c[_][1],y+=c[_][1]-c[_][0]-1;return f}const jv={resolve:Uv,tokenize:$v},Hv={partial:!0,tokenize:zv};function Uv(e){return pb(e),e}function $v(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):Re(l)?e.check(Hv,u,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function u(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function zv(e,t,n){const r=this;return i;function i(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),We(e,a,"linePrefix")}function a(u){if(u===null||Re(u))return n(u);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function mb(e,t,n,r,i,a,u,l,c){const f=c||Number.POSITIVE_INFINITY;let m=0;return h;function h(w){return w===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(w),e.exit(a),_):w===null||w===32||w===41||Il(w)?n(w):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),C(w))}function _(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(w))}function g(w){return w===62?(e.exit("chunkString"),e.exit(l),_(w)):w===null||w===60||Re(w)?n(w):(e.consume(w),w===92?y:g)}function y(w){return w===60||w===62||w===92?(e.consume(w),g):g(w)}function C(w){return!m&&(w===null||w===41||et(w))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(w)):m<f&&w===40?(e.consume(w),m++,C):w===41?(e.consume(w),m--,C):w===null||w===32||w===40||Il(w)?n(w):(e.consume(w),w===92?k:C)}function k(w){return w===40||w===41||w===92?(e.consume(w),C):C(w)}}function gb(e,t,n,r,i,a){const u=this;let l=0,c;return f;function f(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),e.enter(a),m}function m(g){return l>999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(g):g===93?(e.exit(a),e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):Re(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===null||g===91||g===93||Re(g)||l++>999?(e.exit("chunkString"),m(g)):(e.consume(g),c||(c=!Ge(g)),g===92?_:h)}function _(g){return g===91||g===92||g===93?(e.consume(g),l++,h):h(g)}}function Eb(e,t,n,r,i,a){let u;return l;function l(_){return _===34||_===39||_===40?(e.enter(r),e.enter(i),e.consume(_),e.exit(i),u=_===40?41:_,c):n(_)}function c(_){return _===u?(e.enter(i),e.consume(_),e.exit(i),e.exit(r),t):(e.enter(a),f(_))}function f(_){return _===u?(e.exit(a),c(u)):_===null?n(_):Re(_)?(e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),We(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(_))}function m(_){return _===u||_===null||Re(_)?(e.exit("chunkString"),f(_)):(e.consume(_),_===92?h:m)}function h(_){return _===u||_===92?(e.consume(_),m):m(_)}}function to(e,t){let n;return r;function r(i){return Re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ge(i)?We(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Vv={name:"definition",tokenize:Wv},Gv={partial:!0,tokenize:qv};function Wv(e,t,n){const r=this;let i;return a;function a(g){return e.enter("definition"),u(g)}function u(g){return gb.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return i=Qn(r.sliceSerialize(r.events[r.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 et(g)?to(e,f)(g):f(g)}function f(g){return mb(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function m(g){return e.attempt(Gv,h,h)(g)}function h(g){return Ge(g)?We(e,_,"whitespace")(g):_(g)}function _(g){return g===null||Re(g)?(e.exit("definition"),r.parser.defined.push(i),t(g)):n(g)}}function qv(e,t,n){return r;function r(l){return et(l)?to(e,i)(l):n(l)}function i(l){return Eb(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Ge(l)?We(e,u,"whitespace")(l):u(l)}function u(l){return l===null||Re(l)?t(l):n(l)}}const Yv={name:"hardBreakEscape",tokenize:Qv};function Qv(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Re(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Kv={name:"headingAtx",resolve:Xv,tokenize:Zv};function Xv(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},xn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Zv(e,t,n){let r=0;return i;function i(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&r++<6?(e.consume(m),u):m===null||et(m)?(e.exit("atxHeadingSequence"),l(m)):n(m)}function l(m){return m===35?(e.enter("atxHeadingSequence"),c(m)):m===null||Re(m)?(e.exit("atxHeading"),t(m)):Ge(m)?We(e,l,"whitespace")(m):(e.enter("atxHeadingText"),f(m))}function c(m){return m===35?(e.consume(m),c):(e.exit("atxHeadingSequence"),l(m))}function f(m){return m===null||m===35||et(m)?(e.exit("atxHeadingText"),l(m)):(e.consume(m),f)}}const Jv=["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"],L1=["pre","script","style","textarea"],eS={concrete:!0,name:"htmlFlow",resolveTo:rS,tokenize:iS},tS={partial:!0,tokenize:aS},nS={partial:!0,tokenize:sS};function rS(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function iS(e,t,n){const r=this;let i,a,u,l,c;return f;function f(O){return m(O)}function m(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),h}function h(O){return O===33?(e.consume(O),_):O===47?(e.consume(O),a=!0,C):O===63?(e.consume(O),i=3,r.interrupt?t:S):Jt(O)?(e.consume(O),u=String.fromCharCode(O),k):n(O)}function _(O){return O===45?(e.consume(O),i=2,g):O===91?(e.consume(O),i=5,l=0,y):Jt(O)?(e.consume(O),i=4,r.interrupt?t:S):n(O)}function g(O){return O===45?(e.consume(O),r.interrupt?t:S):n(O)}function y(O){const Ae="CDATA[";return O===Ae.charCodeAt(l++)?(e.consume(O),l===Ae.length?r.interrupt?t:ue:y):n(O)}function C(O){return Jt(O)?(e.consume(O),u=String.fromCharCode(O),k):n(O)}function k(O){if(O===null||O===47||O===62||et(O)){const Ae=O===47,be=u.toLowerCase();return!Ae&&!a&&L1.includes(be)?(i=1,r.interrupt?t(O):ue(O)):Jv.includes(u.toLowerCase())?(i=6,Ae?(e.consume(O),w):r.interrupt?t(O):ue(O)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?D(O):N(O))}return O===45||Wt(O)?(e.consume(O),u+=String.fromCharCode(O),k):n(O)}function w(O){return O===62?(e.consume(O),r.interrupt?t:ue):n(O)}function D(O){return Ge(O)?(e.consume(O),D):$(O)}function N(O){return O===47?(e.consume(O),$):O===58||O===95||Jt(O)?(e.consume(O),U):Ge(O)?(e.consume(O),N):$(O)}function U(O){return O===45||O===46||O===58||O===95||Wt(O)?(e.consume(O),U):z(O)}function z(O){return O===61?(e.consume(O),B):Ge(O)?(e.consume(O),z):N(O)}function B(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),c=O,X):Ge(O)?(e.consume(O),B):Q(O)}function X(O){return O===c?(e.consume(O),c=null,ne):O===null||Re(O)?n(O):(e.consume(O),X)}function Q(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||et(O)?z(O):(e.consume(O),Q)}function ne(O){return O===47||O===62||Ge(O)?N(O):n(O)}function $(O){return O===62?(e.consume(O),oe):n(O)}function oe(O){return O===null||Re(O)?ue(O):Ge(O)?(e.consume(O),oe):n(O)}function ue(O){return O===45&&i===2?(e.consume(O),ee):O===60&&i===1?(e.consume(O),me):O===62&&i===4?(e.consume(O),H):O===63&&i===3?(e.consume(O),S):O===93&&i===5?(e.consume(O),ge):Re(O)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(tS,Z,ve)(O)):O===null||Re(O)?(e.exit("htmlFlowData"),ve(O)):(e.consume(O),ue)}function ve(O){return e.check(nS,he,Z)(O)}function he(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),te}function te(O){return O===null||Re(O)?ve(O):(e.enter("htmlFlowData"),ue(O))}function ee(O){return O===45?(e.consume(O),S):ue(O)}function me(O){return O===47?(e.consume(O),u="",re):ue(O)}function re(O){if(O===62){const Ae=u.toLowerCase();return L1.includes(Ae)?(e.consume(O),H):ue(O)}return Jt(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),re):ue(O)}function ge(O){return O===93?(e.consume(O),S):ue(O)}function S(O){return O===62?(e.consume(O),H):O===45&&i===2?(e.consume(O),S):ue(O)}function H(O){return O===null||Re(O)?(e.exit("htmlFlowData"),Z(O)):(e.consume(O),H)}function Z(O){return e.exit("htmlFlow"),t(O)}}function sS(e,t,n){const r=this;return i;function i(u){return Re(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function aS(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ro,t,n)}}const oS={name:"htmlText",tokenize:uS};function uS(e,t,n){const r=this;let i,a,u;return l;function l(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),c}function c(S){return S===33?(e.consume(S),f):S===47?(e.consume(S),z):S===63?(e.consume(S),N):Jt(S)?(e.consume(S),Q):n(S)}function f(S){return S===45?(e.consume(S),m):S===91?(e.consume(S),a=0,y):Jt(S)?(e.consume(S),D):n(S)}function m(S){return S===45?(e.consume(S),g):n(S)}function h(S){return S===null?n(S):S===45?(e.consume(S),_):Re(S)?(u=h,me(S)):(e.consume(S),h)}function _(S){return S===45?(e.consume(S),g):h(S)}function g(S){return S===62?ee(S):S===45?_(S):h(S)}function y(S){const H="CDATA[";return S===H.charCodeAt(a++)?(e.consume(S),a===H.length?C:y):n(S)}function C(S){return S===null?n(S):S===93?(e.consume(S),k):Re(S)?(u=C,me(S)):(e.consume(S),C)}function k(S){return S===93?(e.consume(S),w):C(S)}function w(S){return S===62?ee(S):S===93?(e.consume(S),w):C(S)}function D(S){return S===null||S===62?ee(S):Re(S)?(u=D,me(S)):(e.consume(S),D)}function N(S){return S===null?n(S):S===63?(e.consume(S),U):Re(S)?(u=N,me(S)):(e.consume(S),N)}function U(S){return S===62?ee(S):N(S)}function z(S){return Jt(S)?(e.consume(S),B):n(S)}function B(S){return S===45||Wt(S)?(e.consume(S),B):X(S)}function X(S){return Re(S)?(u=X,me(S)):Ge(S)?(e.consume(S),X):ee(S)}function Q(S){return S===45||Wt(S)?(e.consume(S),Q):S===47||S===62||et(S)?ne(S):n(S)}function ne(S){return S===47?(e.consume(S),ee):S===58||S===95||Jt(S)?(e.consume(S),$):Re(S)?(u=ne,me(S)):Ge(S)?(e.consume(S),ne):ee(S)}function $(S){return S===45||S===46||S===58||S===95||Wt(S)?(e.consume(S),$):oe(S)}function oe(S){return S===61?(e.consume(S),ue):Re(S)?(u=oe,me(S)):Ge(S)?(e.consume(S),oe):ne(S)}function ue(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,ve):Re(S)?(u=ue,me(S)):Ge(S)?(e.consume(S),ue):(e.consume(S),he)}function ve(S){return S===i?(e.consume(S),i=void 0,te):S===null?n(S):Re(S)?(u=ve,me(S)):(e.consume(S),ve)}function he(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||et(S)?ne(S):(e.consume(S),he)}function te(S){return S===47||S===62||et(S)?ne(S):n(S)}function ee(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function me(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),re}function re(S){return Ge(S)?We(e,ge,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):ge(S)}function ge(S){return e.enter("htmlTextData"),u(S)}}const op={name:"labelEnd",resolveAll:fS,resolveTo:hS,tokenize:pS},lS={tokenize:mS},cS={tokenize:gS},dS={tokenize:ES};function fS(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&xn(e,0,e.length,n),e}function hS(e,t){let n=e.length,r=0,i,a,u,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(u=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[a][1].start},end:{...e[u][1].end}},m={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[u-2][1].start}};return l=[["enter",c,t],["enter",f,t]],l=Ln(l,e.slice(a+1,a+r+3)),l=Ln(l,[["enter",m,t]]),l=Ln(l,tc(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=Ln(l,[["exit",m,t],e[u-2],e[u-1],["exit",f,t]]),l=Ln(l,e.slice(u+1)),l=Ln(l,[["exit",c,t]]),xn(e,a,e.length,l),e}function pS(e,t,n){const r=this;let i=r.events.length,a,u;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(_){return a?a._inactive?h(_):(u=r.parser.defined.includes(Qn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(_),e.exit("labelMarker"),e.exit("labelEnd"),c):n(_)}function c(_){return _===40?e.attempt(lS,m,u?m:h)(_):_===91?e.attempt(cS,m,u?f:h)(_):u?m(_):h(_)}function f(_){return e.attempt(dS,m,h)(_)}function m(_){return t(_)}function h(_){return a._balanced=!0,n(_)}}function mS(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return et(h)?to(e,a)(h):a(h)}function a(h){return h===41?m(h):mb(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function u(h){return et(h)?to(e,c)(h):m(h)}function l(h){return n(h)}function c(h){return h===34||h===39||h===40?Eb(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):m(h)}function f(h){return et(h)?to(e,m)(h):m(h)}function m(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function gS(e,t,n){const r=this;return i;function i(l){return gb.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Qn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function ES(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const _S={name:"labelStartImage",resolveAll:op.resolveAll,tokenize:bS};function bS(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),u):n(l)}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const yS={name:"labelStartLink",resolveAll:op.resolveAll,tokenize:xS};function xS(e,t,n){const r=this;return i;function i(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const kf={name:"lineEnding",tokenize:TS};function TS(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),We(e,t,"linePrefix")}}const El={name:"thematicBreak",tokenize:kS};function kS(e,t,n){let r=0,i;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return i=f,l(f)}function l(f){return f===i?(e.enter("thematicBreakSequence"),c(f)):r>=3&&(f===null||Re(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),Ge(f)?We(e,l,"whitespace")(f):l(f))}}const dn={continuation:{tokenize:SS},exit:IS,name:"list",tokenize:vS},wS={partial:!0,tokenize:NS},CS={partial:!0,tokenize:AS};function vS(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,u=0;return l;function l(g){const y=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:ch(g)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(El,n,f)(g):f(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return n(g)}function c(g){return ch(g)&&++u<10?(e.consume(g),c):(!r.interrupt||u<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),f(g)):n(g)}function f(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Ro,r.interrupt?n:m,e.attempt(wS,_,h))}function m(g){return r.containerState.initialBlankLine=!0,a++,_(g)}function h(g){return Ge(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),_):n(g)}function _(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function SS(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ro,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,We(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Ge(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(CS,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,We(e,e.attempt(dn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function AS(e,t,n){const r=this;return We(e,i,"listItemIndent",r.containerState.size+1);function i(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function IS(e){e.exit(this.containerState.type)}function NS(e,t,n){const r=this;return We(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const u=r.events[r.events.length-1];return!Ge(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const R1={name:"setextUnderline",resolveTo:LS,tokenize:RS};function LS(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=u,e.push(["exit",u,t]),e}function RS(e,t,n){const r=this;let i;return a;function a(f){let m=r.events.length,h;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){h=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===i?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Ge(f)?We(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||Re(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const OS={tokenize:PS};function PS(e){const t=this,n=e.attempt(Ro,r,e.attempt(this.parser.constructs.flowInitial,i,We(e,e.attempt(this.parser.constructs.flow,i,e.attempt(jv,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const DS={resolveAll:bb()},MS=_b("string"),BS=_b("text");function _b(e){return{resolveAll:bb(e==="text"?FS:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,u,l);return u;function u(m){return f(m)?a(m):l(m)}function l(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),c}function c(m){return f(m)?(n.exit("data"),a(m)):(n.consume(m),c)}function f(m){if(m===null)return!0;const h=i[m];let _=-1;if(h)for(;++_<h.length;){const g=h[_];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function bb(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function FS(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,u=-1,l=0,c;for(;a--;){const f=i[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)l++,u--;if(u)break;u=-1}else if(f===-2)c=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const jS={42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:db},HS={91:Vv},US={[-2]:Tf,[-1]:Tf,32:Tf},$S={35:Kv,42:El,45:[R1,El],60:eS,61:R1,95:El,96:N1,126:N1},zS={38:hb,92:fb},VS={[-5]:kf,[-4]:kf,[-3]:kf,33:_S,38:hb,42:dh,60:[yv,oS],91:yS,92:[Yv,fb],93:op,95:dh,96:Ov},GS={null:[dh,DS]},WS={null:[42,95]},qS={null:[]},YS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:WS,contentInitial:HS,disable:qS,document:jS,flow:$S,flowInitial:US,insideSpan:GS,string:zS,text:VS},Symbol.toStringTag,{value:"Module"}));function QS(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let u=[],l=[];const c={attempt:X(z),check:X(B),consume:D,enter:N,exit:U,interrupt:X(B,{interrupt:!0})},f={code:null,containerState:{},defineSkip:C,events:[],now:y,parser:e,previous:null,sliceSerialize:_,sliceStream:g,write:h};let m=t.tokenize.call(f,c);return t.resolveAll&&a.push(t),f;function h(oe){return u=Ln(u,oe),k(),u[u.length-1]!==null?[]:(Q(t,0),f.events=tc(a,f.events,f),f.events)}function _(oe,ue){return XS(g(oe),ue)}function g(oe){return KS(u,oe)}function y(){const{_bufferIndex:oe,_index:ue,line:ve,column:he,offset:te}=r;return{_bufferIndex:oe,_index:ue,line:ve,column:he,offset:te}}function C(oe){i[oe.line]=oe.column,$()}function k(){let oe;for(;r._index<u.length;){const ue=u[r._index];if(typeof ue=="string")for(oe=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===oe&&r._bufferIndex<ue.length;)w(ue.charCodeAt(r._bufferIndex));else w(ue)}}function w(oe){m=m(oe)}function D(oe){Re(oe)?(r.line++,r.column=1,r.offset+=oe===-3?2:1,$()):oe!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=oe}function N(oe,ue){const ve=ue||{};return ve.type=oe,ve.start=y(),f.events.push(["enter",ve,f]),l.push(ve),ve}function U(oe){const ue=l.pop();return ue.end=y(),f.events.push(["exit",ue,f]),ue}function z(oe,ue){Q(oe,ue.from)}function B(oe,ue){ue.restore()}function X(oe,ue){return ve;function ve(he,te,ee){let me,re,ge,S;return Array.isArray(he)?Z(he):"tokenize"in he?Z([he]):H(he);function H(_e){return Fe;function Fe(De){const Ie=De!==null&&_e[De],tt=De!==null&&_e.null,jt=[...Array.isArray(Ie)?Ie:Ie?[Ie]:[],...Array.isArray(tt)?tt:tt?[tt]:[]];return Z(jt)(De)}}function Z(_e){return me=_e,re=0,_e.length===0?ee:O(_e[re])}function O(_e){return Fe;function Fe(De){return S=ne(),ge=_e,_e.partial||(f.currentConstruct=_e),_e.name&&f.parser.constructs.disable.null.includes(_e.name)?be():_e.tokenize.call(ue?Object.assign(Object.create(f),ue):f,c,Ae,be)(De)}}function Ae(_e){return oe(ge,S),te}function be(_e){return S.restore(),++re<me.length?O(me[re]):ee}}}function Q(oe,ue){oe.resolveAll&&!a.includes(oe)&&a.push(oe),oe.resolve&&xn(f.events,ue,f.events.length-ue,oe.resolve(f.events.slice(ue),f)),oe.resolveTo&&(f.events=oe.resolveTo(f.events,f))}function ne(){const oe=y(),ue=f.previous,ve=f.currentConstruct,he=f.events.length,te=Array.from(l);return{from:he,restore:ee};function ee(){r=oe,f.previous=ue,f.currentConstruct=ve,f.events.length=he,l=te,$()}}function $(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function KS(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let u;if(n===i)u=[e[n].slice(r,a)];else{if(u=e.slice(n,i),r>-1){const l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[i].slice(0,a))}return u}function XS(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
151
|
+
`;break}case-3:{u=`\r
|
|
152
|
+
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&i)continue;u=" ";break}default:u=String.fromCharCode(a)}i=a===-2,r.push(u)}return r.join("")}function ZS(e){const r={constructs:lb([YS,...(e||{}).extensions||[]]),content:i(hv),defined:[],document:i(mv),flow:i(OS),lazy:{},string:i(MS),text:i(BS)};return r;function i(a){return u;function u(l){return QS(r,a,l)}}}function JS(e){for(;!pb(e););return e}const O1=/[\0\t\n\r]/g;function eA(){let e=1,t="",n=!0,r;return i;function i(a,u,l){const c=[];let f,m,h,_,g;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),h=0,t="",n&&(a.charCodeAt(0)===65279&&h++,n=void 0);h<a.length;){if(O1.lastIndex=h,f=O1.exec(a),_=f&&f.index!==void 0?f.index:a.length,g=a.charCodeAt(_),!f){t=a.slice(h);break}if(g===10&&h===_&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<_&&(c.push(a.slice(h,_)),e+=_-h),g){case 0:{c.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,c.push(-2);e++<m;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=_+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const tA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nA(e){return e.replace(tA,rA)}function rA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return cb(n.slice(a?2:1),a?16:10)}return ap(n)||e}const yb={}.hasOwnProperty;function iA(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),sA(n)(JS(ZS(n).document().write(eA()(e,t,!0))))}function sA(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Xe),autolinkProtocol:ne,autolinkEmail:ne,atxHeading:a(Or),blockQuote:a(tt),characterEscape:ne,characterReference:ne,codeFenced:a(jt),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(jt,u),codeText:a(Tn,u),codeTextData:ne,data:ne,codeFlowValue:ne,definition:a(hn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(pn),hardBreakEscape:a(pr),hardBreakTrailing:a(pr),htmlFlow:a(Pr,u),htmlFlowData:ne,htmlText:a(Pr,u),htmlTextData:ne,image:a(je),label:u,link:a(Xe),listItem:a(Pt),listItemValue:_,listOrdered:a(Et,h),listUnordered:a(Et),paragraph:a(Fn),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Or),strong:a(Uo),thematicBreak:a(zo)},exit:{atxHeading:c(),atxHeadingSequence:z,autolink:c(),autolinkEmail:Ie,autolinkProtocol:De,blockQuote:c(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:_e,characterReference:Fe,codeFenced:c(k),codeFencedFence:C,codeFencedFenceInfo:g,codeFencedFenceMeta:y,codeFlowValue:$,codeIndented:c(w),codeText:c(te),codeTextData:$,data:$,definition:c(),definitionDestinationString:U,definitionLabelString:D,definitionTitleString:N,emphasis:c(),hardBreakEscape:c(ue),hardBreakTrailing:c(ue),htmlFlow:c(ve),htmlFlowData:$,htmlText:c(he),htmlTextData:$,image:c(me),label:ge,labelText:re,lineEnding:oe,link:c(ee),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Ae,resourceDestinationString:S,resourceTitleString:H,resource:Z,setextHeading:c(Q),setextHeadingLineSequence:X,setextHeadingText:B,strong:c(),thematicBreak:c()}};xb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let pe={type:"root",children:[]};const Oe={stack:[pe],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:m,data:n},$e=[];let Ye=-1;for(;++Ye<J.length;)if(J[Ye][1].type==="listOrdered"||J[Ye][1].type==="listUnordered")if(J[Ye][0]==="enter")$e.push(Ye);else{const Dt=$e.pop();Ye=i(J,Dt,Ye)}for(Ye=-1;++Ye<J.length;){const Dt=t[J[Ye][0]];yb.call(Dt,J[Ye][1].type)&&Dt[J[Ye][1].type].call(Object.assign({sliceSerialize:J[Ye][2].sliceSerialize},Oe),J[Ye][1])}if(Oe.tokenStack.length>0){const Dt=Oe.tokenStack[Oe.tokenStack.length-1];(Dt[1]||P1).call(Oe,void 0,Dt[0])}for(pe.position={start:ti(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:ti(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye<t.transforms.length;)pe=t.transforms[Ye](pe)||pe;return pe}function i(J,pe,Oe){let $e=pe-1,Ye=-1,Dt=!1,mr,kn,Dr,_i;for(;++$e<=Oe;){const Mt=J[$e];switch(Mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Mt[0]==="enter"?Ye++:Ye--,_i=void 0;break}case"lineEndingBlank":{Mt[0]==="enter"&&(mr&&!_i&&!Ye&&!Dr&&(Dr=$e),_i=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_i=void 0}if(!Ye&&Mt[0]==="enter"&&Mt[1].type==="listItemPrefix"||Ye===-1&&Mt[0]==="exit"&&(Mt[1].type==="listUnordered"||Mt[1].type==="listOrdered")){if(mr){let Jn=$e;for(kn=void 0;Jn--;){const mn=J[Jn];if(mn[1].type==="lineEnding"||mn[1].type==="lineEndingBlank"){if(mn[0]==="exit")continue;kn&&(J[kn][1].type="lineEndingBlank",Dt=!0),mn[1].type="lineEnding",kn=Jn}else if(!(mn[1].type==="linePrefix"||mn[1].type==="blockQuotePrefix"||mn[1].type==="blockQuotePrefixWhitespace"||mn[1].type==="blockQuoteMarker"||mn[1].type==="listItemIndent"))break}Dr&&(!kn||Dr<kn)&&(mr._spread=!0),mr.end=Object.assign({},kn?J[kn][1].start:Mt[1].end),J.splice(kn||$e,0,["exit",mr,Mt[2]]),$e++,Oe++}if(Mt[1].type==="listItemPrefix"){const Jn={type:"listItem",_spread:!1,start:Object.assign({},Mt[1].start),end:void 0};mr=Jn,J.splice($e,0,["enter",Jn,Mt[2]]),$e++,Oe++,Dr=void 0,_i=!0}}}return J[pe][1]._spread=Dt,Oe}function a(J,pe){return Oe;function Oe($e){l.call(this,J($e),$e),pe&&pe.call(this,$e)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(J,pe,Oe){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([pe,Oe||void 0]),J.position={start:ti(pe.start),end:void 0}}function c(J){return pe;function pe(Oe){J&&J.call(this,Oe),f.call(this,Oe)}}function f(J,pe){const Oe=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==J.type&&(pe?pe.call(this,J,$e[0]):($e[1]||P1).call(this,J,$e[0]));else throw new Error("Cannot close `"+J.type+"` ("+eo({start:J.start,end:J.end})+"): it’s not open");Oe.position.end=ti(J.end)}function m(){return sp(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function _(J){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function g(){const J=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=J}function y(){const J=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=J}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const J=this.resume(),pe=this.stack[this.stack.length-1];pe.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const J=this.resume(),pe=this.stack[this.stack.length-1];pe.value=J.replace(/(\r?\n|\r)$/g,"")}function D(J){const pe=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=pe,Oe.identifier=Qn(this.sliceSerialize(J)).toLowerCase()}function N(){const J=this.resume(),pe=this.stack[this.stack.length-1];pe.title=J}function U(){const J=this.resume(),pe=this.stack[this.stack.length-1];pe.url=J}function z(J){const pe=this.stack[this.stack.length-1];if(!pe.depth){const Oe=this.sliceSerialize(J).length;pe.depth=Oe}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function X(J){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function Q(){this.data.setextHeadingSlurpLineEnding=void 0}function ne(J){const Oe=this.stack[this.stack.length-1].children;let $e=Oe[Oe.length-1];(!$e||$e.type!=="text")&&($e=$o(),$e.position={start:ti(J.start),end:void 0},Oe.push($e)),this.stack.push($e)}function $(J){const pe=this.stack.pop();pe.value+=this.sliceSerialize(J),pe.position.end=ti(J.end)}function oe(J){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Oe=pe.children[pe.children.length-1];Oe.position.end=ti(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(pe.type)&&(ne.call(this,J),$.call(this,J))}function ue(){this.data.atHardBreak=!0}function ve(){const J=this.resume(),pe=this.stack[this.stack.length-1];pe.value=J}function he(){const J=this.resume(),pe=this.stack[this.stack.length-1];pe.value=J}function te(){const J=this.resume(),pe=this.stack[this.stack.length-1];pe.value=J}function ee(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=pe,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function me(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=pe,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function re(J){const pe=this.sliceSerialize(J),Oe=this.stack[this.stack.length-2];Oe.label=nA(pe),Oe.identifier=Qn(pe).toLowerCase()}function ge(){const J=this.stack[this.stack.length-1],pe=this.resume(),Oe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Oe.type==="link"){const $e=J.children;Oe.children=$e}else Oe.alt=pe}function S(){const J=this.resume(),pe=this.stack[this.stack.length-1];pe.url=J}function H(){const J=this.resume(),pe=this.stack[this.stack.length-1];pe.title=J}function Z(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function Ae(J){const pe=this.resume(),Oe=this.stack[this.stack.length-1];Oe.label=pe,Oe.identifier=Qn(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function be(J){this.data.characterReferenceType=J.type}function _e(J){const pe=this.sliceSerialize(J),Oe=this.data.characterReferenceType;let $e;Oe?($e=cb(pe,Oe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=ap(pe);const Ye=this.stack[this.stack.length-1];Ye.value+=$e}function Fe(J){const pe=this.stack.pop();pe.position.end=ti(J.end)}function De(J){$.call(this,J);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(J)}function Ie(J){$.call(this,J);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(J)}function tt(){return{type:"blockquote",children:[]}}function jt(){return{type:"code",lang:null,meta:null,value:""}}function Tn(){return{type:"inlineCode",value:""}}function hn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pn(){return{type:"emphasis",children:[]}}function Or(){return{type:"heading",depth:0,children:[]}}function pr(){return{type:"break"}}function Pr(){return{type:"html",value:""}}function je(){return{type:"image",title:null,url:"",alt:null}}function Xe(){return{type:"link",title:null,url:"",children:[]}}function Et(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function Pt(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Fn(){return{type:"paragraph",children:[]}}function Uo(){return{type:"strong",children:[]}}function $o(){return{type:"text",value:""}}function zo(){return{type:"thematicBreak"}}}function ti(e){return{line:e.line,column:e.column,offset:e.offset}}function xb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?xb(e,r):aA(e,r)}}function aA(e,t){let n;for(n in t)if(yb.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function P1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+eo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+eo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+eo({start:t.start,end:t.end})+") is still open")}function Tb(e){const t=this;t.parser=n;function n(r){return iA(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function oA(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function uA(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
153
|
+
`}]}function lA(e,t){const n=t.value?t.value+`
|
|
154
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function cA(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dA(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fA(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qs(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,c);const f={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,f),e.applyData(t,f)}function hA(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pA(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function kb(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const u=i[i.length-1];return u&&u.type==="text"?u.value+=r:i.push({type:"text",value:r}),i}function mA(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kb(e,t);const i={src:qs(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function gA(e,t){const n={src:qs(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function EA(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function _A(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kb(e,t);const i={href:qs(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function bA(e,t){const n={href:qs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function yA(e,t,n){const r=e.all(t),i=n?xA(n):wb(t),a={},u=[];if(typeof t.checked=="boolean"){const m=r[0];let h;m&&m.type==="element"&&m.tagName==="p"?h=m:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const m=r[l];(i||l!==0||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
|
|
155
|
+
`}),m.type==="element"&&m.tagName==="p"&&!i?u.push(...m.children):u.push(m)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&u.push({type:"text",value:`
|
|
156
|
+
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function xA(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=wb(n[r])}return t}function wb(e){const t=e.spread;return t??e.children.length>1}function TA(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const u=r[i];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function kA(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wA(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function CA(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vA(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),i.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=dr(t.children[1]),c=Jl(t.children[t.children.length-1]);l&&c&&(u.position={start:l,end:c}),i.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function SA(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,l=u?u.length:t.children.length;let c=-1;const f=[];for(;++c<l;){const h=t.children[c],_={},g=u?u[c]:void 0;g&&(_.align=g);let y={type:"element",tagName:a,properties:_,children:[]};h&&(y.children=e.all(h),e.patch(h,y),y=e.applyData(h,y)),f.push(y)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,m),e.applyData(t,m)}function AA(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const D1=9,M1=32;function IA(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(B1(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(B1(t.slice(i),i>0,!1)),a.join("")}function B1(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===D1||a===M1;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===D1||a===M1;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function NA(e,t){const n={type:"text",value:IA(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function LA(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const RA={blockquote:oA,break:uA,code:lA,delete:cA,emphasis:dA,footnoteReference:fA,heading:hA,html:pA,imageReference:mA,image:gA,inlineCode:EA,linkReference:_A,link:bA,listItem:yA,list:TA,paragraph:kA,root:wA,strong:CA,table:vA,tableCell:AA,tableRow:SA,text:NA,thematicBreak:LA,toml:Ju,yaml:Ju,definition:Ju,footnoteDefinition:Ju};function Ju(){}const Cb=-1,nc=0,no=1,Nl=2,up=3,lp=4,cp=5,dp=6,vb=7,Sb=8,F1=typeof self=="object"?self:globalThis,OA=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,u]=t[i];switch(a){case nc:case Cb:return n(u,i);case no:{const l=n([],i);for(const c of u)l.push(r(c));return l}case Nl:{const l=n({},i);for(const[c,f]of u)l[r(c)]=r(f);return l}case up:return n(new Date(u),i);case lp:{const{source:l,flags:c}=u;return n(new RegExp(l,c),i)}case cp:{const l=n(new Map,i);for(const[c,f]of u)l.set(r(c),r(f));return l}case dp:{const l=n(new Set,i);for(const c of u)l.add(r(c));return l}case vb:{const{name:l,message:c}=u;return n(new F1[l](c),i)}case Sb:return n(BigInt(u),i);case"BigInt":return n(Object(BigInt(u)),i);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:l}=new Uint8Array(u);return n(new DataView(l),u)}}return n(new F1[a](u),i)};return r},j1=e=>OA(new Map,e)(0),As="",{toString:PA}={},{keys:DA}=Object,$a=e=>{const t=typeof e;if(t!=="object"||!e)return[nc,t];const n=PA.call(e).slice(8,-1);switch(n){case"Array":return[no,As];case"Object":return[Nl,As];case"Date":return[up,As];case"RegExp":return[lp,As];case"Map":return[cp,As];case"Set":return[dp,As];case"DataView":return[no,n]}return n.includes("Array")?[no,n]:n.includes("Error")?[vb,n]:[Nl,n]},el=([e,t])=>e===nc&&(t==="function"||t==="symbol"),MA=(e,t,n,r)=>{const i=(u,l)=>{const c=r.push(u)-1;return n.set(l,c),c},a=u=>{if(n.has(u))return n.get(u);let[l,c]=$a(u);switch(l){case nc:{let m=u;switch(c){case"bigint":l=Sb,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);m=null;break;case"undefined":return i([Cb],u)}return i([l,m],u)}case no:{if(c){let _=u;return c==="DataView"?_=new Uint8Array(u.buffer):c==="ArrayBuffer"&&(_=new Uint8Array(u)),i([c,[..._]],u)}const m=[],h=i([l,m],u);for(const _ of u)m.push(a(_));return h}case Nl:{if(c)switch(c){case"BigInt":return i([c,u.toString()],u);case"Boolean":case"Number":case"String":return i([c,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const m=[],h=i([l,m],u);for(const _ of DA(u))(e||!el($a(u[_])))&&m.push([a(_),a(u[_])]);return h}case up:return i([l,u.toISOString()],u);case lp:{const{source:m,flags:h}=u;return i([l,{source:m,flags:h}],u)}case cp:{const m=[],h=i([l,m],u);for(const[_,g]of u)(e||!(el($a(_))||el($a(g))))&&m.push([a(_),a(g)]);return h}case dp:{const m=[],h=i([l,m],u);for(const _ of u)(e||!el($a(_)))&&m.push(a(_));return h}}const{message:f}=u;return i([l,{name:c,message:f}],u)};return a},H1=(e,{json:t,lossy:n}={})=>{const r=[];return MA(!(t||n),!!t,new Map,r)(e),r},Qi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?j1(H1(e,t)):structuredClone(e):(e,t)=>j1(H1(e,t));function BA(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function FA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function jA(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||BA,r=e.options.footnoteBackLabel||FA,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[c]);if(!f)continue;const m=e.all(f),h=String(f.identifier).toUpperCase(),_=qs(h.toLowerCase());let g=0;const y=[],C=e.footnoteCounts.get(h);for(;C!==void 0&&++g<=C;){y.length>0&&y.push({type:"text",value:" "});let D=typeof n=="string"?n:n(c,g);typeof D=="string"&&(D={type:"text",value:D}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+_+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(D)?D:[D]})}const k=m[m.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const D=k.children[k.children.length-1];D&&D.type==="text"?D.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...y)}else m.push(...y);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+_},children:e.wrap(m,!0)};e.patch(f,w),l.push(w)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Qi(u),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
157
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
|
|
158
|
+
`}]}}const rc=(function(e){if(e==null)return zA;if(typeof e=="function")return ic(e);if(typeof e=="object")return Array.isArray(e)?HA(e):UA(e);if(typeof e=="string")return $A(e);throw new Error("Expected function, string, or object as test")});function HA(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rc(e[n]);return ic(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function UA(e){const t=e;return ic(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function $A(e){return ic(t);function t(n){return n&&n.type===e}}function ic(e){return t;function t(n,r,i){return!!(VA(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function zA(){return!0}function VA(e){return e!==null&&typeof e=="object"&&"type"in e}const Ab=[],Qa=!0,fh=!1,Ds="skip";function fp(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=rc(i),u=r?-1:1;l(e,void 0,[])();function l(c,f,m){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const g=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(_,"name",{value:"node ("+(c.type+(g?"<"+g+">":""))+")"})}return _;function _(){let g=Ab,y,C,k;if((!t||a(c,f,m[m.length-1]||void 0))&&(g=GA(n(c,m)),g[0]===fh))return g;if("children"in c&&c.children){const w=c;if(w.children&&g[0]!==Ds)for(C=(r?w.children.length:-1)+u,k=m.concat(w);C>-1&&C<w.children.length;){const D=w.children[C];if(y=l(D,C,k)(),y[0]===fh)return y;C=typeof y[1]=="number"?y[1]:C+u}}return g}}}function GA(e){return Array.isArray(e)?e:typeof e=="number"?[Qa,e]:e==null?Ab:[e]}function Xn(e,t,n,r){let i,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,i=n):(a=t,u=n,i=r),fp(e,a,l,i);function l(c,f){const m=f[f.length-1],h=m?m.children.indexOf(c):void 0;return u(c,h,m)}}const hh={}.hasOwnProperty,WA={};function qA(e,t){const n=t||WA,r=new Map,i=new Map,a=new Map,u={...RA,...n.handlers},l={all:f,applyData:QA,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:u,one:c,options:n,patch:YA,wrap:XA};return Xn(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const h=m.type==="definition"?r:i,_=String(m.identifier).toUpperCase();h.has(_)||h.set(_,m)}}),l;function c(m,h){const _=m.type,g=l.handlers[_];if(hh.call(l.handlers,_)&&g)return g(l,m,h);if(l.options.passThrough&&l.options.passThrough.includes(_)){if("children"in m){const{children:C,...k}=m,w=Qi(k);return w.children=l.all(m),w}return Qi(m)}return(l.options.unknownHandler||KA)(l,m,h)}function f(m){const h=[];if("children"in m){const _=m.children;let g=-1;for(;++g<_.length;){const y=l.one(_[g],m);if(y){if(g&&_[g-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=U1(y.value)),!Array.isArray(y)&&y.type==="element")){const C=y.children[0];C&&C.type==="text"&&(C.value=U1(C.value))}Array.isArray(y)?h.push(...y):h.push(y)}}}return h}}function YA(e,t){e.position&&(t.position=nb(e))}function QA(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&a&&Object.assign(n.properties,Qi(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function KA(e,t){const n=t.data||{},r="value"in t&&!(hh.call(n,"hProperties")||hh.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function XA(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
159
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
160
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
161
|
+
`}),n}function U1(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function $1(e,t){const n=qA(e,t),r=n.one(e,void 0),i=jA(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
162
|
+
`},i),a}function Ib(e,t){return e&&"run"in e?async function(n,r){const i=$1(n,{file:r,...t});await e.run(i,r)}:function(n,r){return $1(n,{file:r,...e||t})}}function z1(e){if(e)throw e}var wf,V1;function ZA(){if(V1)return wf;V1=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var m=e.call(f,"constructor"),h=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!m&&!h)return!1;var _;for(_ in f);return typeof _>"u"||e.call(f,_)},u=function(f,m){n&&m.name==="__proto__"?n(f,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):f[m.name]=m.newValue},l=function(f,m){if(m==="__proto__")if(e.call(f,m)){if(r)return r(f,m).value}else return;return f[m]};return wf=function c(){var f,m,h,_,g,y,C=arguments[0],k=1,w=arguments.length,D=!1;for(typeof C=="boolean"&&(D=C,C=arguments[1]||{},k=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});k<w;++k)if(f=arguments[k],f!=null)for(m in f)h=l(C,m),_=l(f,m),C!==_&&(D&&_&&(a(_)||(g=i(_)))?(g?(g=!1,y=h&&i(h)?h:[]):y=h&&a(h)?h:{},u(C,{name:m,newValue:c(D,y,_)})):typeof _<"u"&&u(C,{name:m,newValue:_}));return C},wf}var JA=ZA();const Cf=Ao(JA);function ph(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function e3(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const u=i.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);l(null,...i);function l(c,...f){const m=e[++a];let h=-1;if(c){u(c);return}for(;++h<i.length;)(f[h]===null||f[h]===void 0)&&(f[h]=i[h]);i=f,m?t3(m,l)(...f):u(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function t3(e,t){let n;return r;function r(...u){const l=e.length>u.length;let c;l&&u.push(i);try{c=e.apply(this,u)}catch(f){const m=f;if(l&&n)throw m;return i(m)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(u,...l){n||(n=!0,t(u,...l))}function a(u){i(null,u)}}const ur={basename:n3,dirname:r3,extname:i3,join:s3,sep:"/"};function n3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Oo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else u<0&&(a=!0,u=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function r3(e){if(Oo(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function i3(e){Oo(e);let t=e.length,n=-1,r=0,i=-1,a=0,u;for(;t--;){const l=e.codePointAt(t);if(l===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function s3(...e){let t=-1,n;for(;++t<e.length;)Oo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":a3(n)}function a3(e){Oo(e);const t=e.codePointAt(0)===47;let n=o3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function o3(e,t){let n="",r=0,i=-1,a=0,u=-1,l,c;for(;++u<=e.length;){if(u<e.length)l=e.codePointAt(u);else{if(l===47)break;l=47}if(l===47){if(!(i===u-1||a===1))if(i!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=u,a=0;continue}}else if(n.length>0){n="",r=0,i=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,u):n=e.slice(i+1,u),r=u-i-1;i=u,a=0}else l===46&&a>-1?a++:a=-1}return n}function Oo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const u3={cwd:l3};function l3(){return"/"}function mh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function c3(e){if(typeof e=="string")e=new URL(e);else if(!mh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return d3(e)}function d3(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const vf=["history","path","basename","stem","extname","dirname"];class Nb{constructor(t){let n;t?mh(t)?n={path:t}:typeof t=="string"||f3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":u3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<vf.length;){const a=vf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)vf.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ur.basename(this.path):void 0}set basename(t){Af(t,"basename"),Sf(t,"basename"),this.path=ur.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ur.dirname(this.path):void 0}set dirname(t){G1(this.basename,"dirname"),this.path=ur.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ur.extname(this.path):void 0}set extname(t){if(Sf(t,"extname"),G1(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ur.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){mh(t)&&(t=c3(t)),Af(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ur.basename(this.path,this.extname):void 0}set stem(t){Af(t,"stem"),Sf(t,"stem"),this.path=ur.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new qt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Sf(e,t){if(e&&e.includes(ur.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ur.sep+"`")}function Af(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function G1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function f3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const h3=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),p3={}.hasOwnProperty;class hp extends h3{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=e3()}copy(){const t=new hp;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Cf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Lf("data",this.frozen),this.namespace[t]=n,this):p3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Lf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=tl(t),r=this.parser||this.Parser;return If("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),If("process",this.parser||this.Parser),Nf("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,u){const l=tl(t),c=r.parse(l);r.run(c,l,function(m,h,_){if(m||!h||!_)return f(m);const g=h,y=r.stringify(g,_);g3(y)?_.value=y:_.result=y,f(m,_)});function f(m,h){m||!h?u(m):a?a(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),If("processSync",this.parser||this.Parser),Nf("processSync",this.compiler||this.Compiler),this.process(t,i),q1("processSync","process",n),r;function i(a,u){n=!0,z1(a),r=u}}run(t,n,r){W1(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,l){const c=tl(n);i.run(t,c,f);function f(m,h,_){const g=h||t;m?l(m):u?u(g):r(void 0,g,_)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),q1("runSync","run",r),i;function a(u,l){z1(u),i=l,r=!0}}stringify(t,n){this.freeze();const r=tl(n),i=this.compiler||this.Compiler;return Nf("stringify",i),W1(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Lf("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")c(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[m,...h]=f;c(m,h)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(i.settings=Cf(!0,i.settings,f.settings))}function l(f){let m=-1;if(f!=null)if(Array.isArray(f))for(;++m<f.length;){const h=f[m];a(h)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function c(f,m){let h=-1,_=-1;for(;++h<r.length;)if(r[h][0]===f){_=h;break}if(_===-1)r.push([f,...m]);else if(m.length>0){let[g,...y]=m;const C=r[_][1];ph(C)&&ph(g)&&(g=Cf(!0,C,g)),r[_]=[f,g,...y]}}}}const Lb=new hp().freeze();function If(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Lf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function W1(e){if(!ph(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function q1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function tl(e){return m3(e)?e:new Nb(e)}function m3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function g3(e){return typeof e=="string"||E3(e)}function E3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Y1=[],Q1={allowDangerousHtml:!0},b3=/^(https?|ircs?|mailto|xmpp)$/i,y3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function x3(e){const t=T3(e),n=k3(e);return w3(t.runSync(t.parse(n),n),e)}function T3(e){const t=e.rehypePlugins||Y1,n=e.remarkPlugins||Y1,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Q1}:Q1;return Lb().use(Tb).use(n).use(Ib,r).use(t)}function k3(e){const t=e.children||"",n=new Nb;return typeof t=="string"&&(n.value=t),n}function w3(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||C3;for(const m of y3)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+_3+m.id,void 0);return Xn(e,f),ib(e,{Fragment:T.Fragment,components:i,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function f(m,h,_){if(m.type==="raw"&&_&&typeof h=="number")return u?_.children.splice(h,1):_.children[h]={type:"text",value:m.value},h;if(m.type==="element"){let g;for(g in js)if(Object.hasOwn(js,g)&&Object.hasOwn(m.properties,g)){const y=m.properties[g],C=js[g];(C===null||C.includes(m.tagName))&&(m.properties[g]=c(String(y||""),g,m))}}if(m.type==="element"){let g=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!g&&r&&typeof h=="number"&&(g=!r(m,h,_)),g&&_&&typeof h=="number")return l&&m.children?_.children.splice(h,1,...m.children):_.children.splice(h,1),h}}}function C3(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||b3.test(e.slice(0,t))?e:""}function Ll(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function v3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function S3(e,t,n){const i=rc((n||{}).ignore||[]),a=A3(t);let u=-1;for(;++u<a.length;)fp(e,"text",l);function l(f,m){let h=-1,_;for(;++h<m.length;){const g=m[h],y=_?_.children:void 0;if(i(g,y?y.indexOf(g):void 0,_))return;_=g}if(_)return c(f,m)}function c(f,m){const h=m[m.length-1],_=a[u][0],g=a[u][1];let y=0;const k=h.children.indexOf(f);let w=!1,D=[];_.lastIndex=0;let N=_.exec(f.value);for(;N;){const U=N.index,z={index:N.index,input:N.input,stack:[...m,f]};let B=g(...N,z);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?_.lastIndex=U+1:(y!==U&&D.push({type:"text",value:f.value.slice(y,U)}),Array.isArray(B)?D.push(...B):B&&D.push(B),y=U+N[0].length,w=!0),!_.global)break;N=_.exec(f.value)}return w?(y<f.value.length&&D.push({type:"text",value:f.value.slice(y)}),h.children.splice(k,1,...D)):D=[f],k+D.length}}function A3(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([I3(i[0]),N3(i[1])])}return t}function I3(e){return typeof e=="string"?new RegExp(v3(e),"g"):e}function N3(e){return typeof e=="function"?e:function(){return e}}const Rf="phrasing",Of=["autolink","link","image","label"];function L3(){return{transforms:[F3],enter:{literalAutolink:O3,literalAutolinkEmail:Pf,literalAutolinkHttp:Pf,literalAutolinkWww:Pf},exit:{literalAutolink:B3,literalAutolinkEmail:M3,literalAutolinkHttp:P3,literalAutolinkWww:D3}}}function R3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Rf,notInConstruct:Of},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Rf,notInConstruct:Of},{character:":",before:"[ps]",after:"\\/",inConstruct:Rf,notInConstruct:Of}]}}function O3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Pf(e){this.config.enter.autolinkProtocol.call(this,e)}function P3(e){this.config.exit.autolinkProtocol.call(this,e)}function D3(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function M3(e){this.config.exit.autolinkEmail.call(this,e)}function B3(e){this.exit(e)}function F3(e){S3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,j3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),H3]],{ignore:["link","linkReference"]})}function j3(e,t,n,r,i){let a="";if(!Rb(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!U3(n)))return!1;const u=$3(n+r);if(!u[0])return!1;const l={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[l,{type:"text",value:u[1]}]:l}function H3(e,t,n,r){return!Rb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function U3(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function $3(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Ll(e,"(");let a=Ll(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Rb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yi(n)||ec(n))&&(!t||n!==47)}Ob.peek=X3;function z3(){this.buffer()}function V3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function G3(){this.buffer()}function W3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function q3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Qn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Y3(e){this.exit(e)}function Q3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Qn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function K3(e){this.exit(e)}function X3(){return"["}function Ob(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=i.move("]"),a}function Z3(){return{enter:{gfmFootnoteCallString:z3,gfmFootnoteCall:V3,gfmFootnoteDefinitionLabelString:G3,gfmFootnoteDefinition:W3},exit:{gfmFootnoteCallString:q3,gfmFootnoteCall:Y3,gfmFootnoteDefinitionLabelString:Q3,gfmFootnoteDefinition:K3}}}function J3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ob},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,a,u){const l=a.createTracker(u);let c=l.move("[^");const f=a.enter("footnoteDefinition"),m=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),m(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
|
|
163
|
+
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?Pb:eI))),f(),c}}function eI(e,t,n){return t===0?e:Pb(e,t,n)}function Pb(e,t,n){return(n?"":" ")+e}const tI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Db.peek=aI;function nI(){return{canContainEols:["delete"],enter:{strikethrough:iI},exit:{strikethrough:sI}}}function rI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:tI}],handlers:{delete:Db}}}function iI(e){this.enter({type:"delete",children:[]},e)}function sI(e){this.exit(e)}function Db(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let u=i.move("~~");return u+=n.containerPhrasing(e,{...i.current(),before:u,after:"~"}),u+=i.move("~~"),a(),u}function aI(){return"~"}function oI(e){return e.length}function uI(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||oI,a=[],u=[],l=[],c=[];let f=0,m=-1;for(;++m<e.length;){const C=[],k=[];let w=-1;for(e[m].length>f&&(f=e[m].length);++w<e[m].length;){const D=lI(e[m][w]);if(n.alignDelimiters!==!1){const N=i(D);k[w]=N,(c[w]===void 0||N>c[w])&&(c[w]=N)}C.push(D)}u[m]=C,l[m]=k}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<f;)a[h]=K1(r[h]);else{const C=K1(r);for(;++h<f;)a[h]=C}h=-1;const _=[],g=[];for(;++h<f;){const C=a[h];let k="",w="";C===99?(k=":",w=":"):C===108?k=":":C===114&&(w=":");let D=n.alignDelimiters===!1?1:Math.max(1,c[h]-k.length-w.length);const N=k+"-".repeat(D)+w;n.alignDelimiters!==!1&&(D=k.length+D+w.length,D>c[h]&&(c[h]=D),g[h]=D),_[h]=N}u.splice(1,0,_),l.splice(1,0,g),m=-1;const y=[];for(;++m<u.length;){const C=u[m],k=l[m];h=-1;const w=[];for(;++h<f;){const D=C[h]||"";let N="",U="";if(n.alignDelimiters!==!1){const z=c[h]-(k[h]||0),B=a[h];B===114?N=" ".repeat(z):B===99?z%2?(N=" ".repeat(z/2+.5),U=" ".repeat(z/2-.5)):(N=" ".repeat(z/2),U=N):U=" ".repeat(z)}n.delimiterStart!==!1&&!h&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&D==="")&&(n.delimiterStart!==!1||h)&&w.push(" "),n.alignDelimiters!==!1&&w.push(N),w.push(D),n.alignDelimiters!==!1&&w.push(U),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||h!==f-1)&&w.push("|")}y.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return y.join(`
|
|
164
|
+
`)}function lI(e){return e==null?"":String(e)}function K1(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const X1={}.hasOwnProperty;function pp(e,t){const n=t||{};function r(i,...a){let u=r.invalid;const l=r.handlers;if(i&&X1.call(i,e)){const c=String(i[e]);u=X1.call(l,c)?l[c]:r.unknown}if(u)return u.call(this,i,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function cI(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),dI);return i(),u}function dI(e,t,n){return">"+(n?"":" ")+e}function fI(e,t){return Z1(e,t.inConstruct,!0)&&!Z1(e,t.notInConstruct,!1)}function Z1(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function J1(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
165
|
+
`&&fI(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
166
|
+
`}function hI(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>u&&(u=a):a=1,i=r+t.length,r=n.indexOf(t,i);return u}function pI(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function mI(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function gI(e,t,n,r){const i=mI(n),a=e.value||"",u=i==="`"?"GraveAccent":"Tilde";if(pI(e,n)){const h=n.enter("codeIndented"),_=n.indentLines(a,EI);return h(),_}const l=n.createTracker(r),c=i.repeat(Math.max(hI(a,i)+1,3)),f=n.enter("codeFenced");let m=l.move(c);if(e.lang){const h=n.enter(`codeFencedLang${u}`);m+=l.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${u}`);m+=l.move(" "),m+=l.move(n.safe(e.meta,{before:m,after:`
|
|
167
|
+
`,encode:["`"],...l.current()})),h()}return m+=l.move(`
|
|
168
|
+
`),a&&(m+=l.move(a+`
|
|
169
|
+
`)),m+=l.move(c),f(),m}function EI(e,t,n){return(n?"":" ")+e}function mp(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function _I(e,t,n,r){const i=mp(n),a=i==='"'?"Quote":"Apostrophe",u=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");return f+=c.move(n.safe(n.associationId(e),{before:f,after:"]",...c.current()})),f+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
170
|
+
`,...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),l()),u(),f}function bI(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function po(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Rl(e,t,n){const r=Us(e),i=Us(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Mb.peek=yI;function Mb(e,t,n,r){const i=bI(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(i);let c=u.move(n.containerPhrasing(e,{after:i,before:l,...u.current()}));const f=c.charCodeAt(0),m=Rl(r.before.charCodeAt(r.before.length-1),f,i);m.inside&&(c=po(f)+c.slice(1));const h=c.charCodeAt(c.length-1),_=Rl(r.after.charCodeAt(0),h,i);_.inside&&(c=c.slice(0,-1)+po(h));const g=u.move(i);return a(),n.attentionEncodeSurroundingInfo={after:_.outside,before:m.outside},l+c+g}function yI(e,t,n){return n.options.emphasis||"*"}function xI(e,t){let n=!1;return Xn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,fh}),!!((!e.depth||e.depth<3)&&sp(e)&&(t.options.setext||n))}function TI(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(xI(e,n)){const m=n.enter("headingSetext"),h=n.enter("phrasing"),_=n.containerPhrasing(e,{...a.current(),before:`
|
|
171
|
+
`,after:`
|
|
172
|
+
`});return h(),m(),_+`
|
|
173
|
+
`+(i===1?"=":"-").repeat(_.length-(Math.max(_.lastIndexOf("\r"),_.lastIndexOf(`
|
|
174
|
+
`))+1))}const u="#".repeat(i),l=n.enter("headingAtx"),c=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
175
|
+
`,...a.current()});return/^[\t ]/.test(f)&&(f=po(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),c(),l(),f}Bb.peek=kI;function Bb(e){return e.value||""}function kI(){return"<"}Fb.peek=wI;function Fb(e,t,n,r){const i=mp(n),a=i==='"'?"Quote":"Apostrophe",u=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");return f+=c.move(n.safe(e.alt,{before:f,after:"]",...c.current()})),f+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(l=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${a}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),l()),f+=c.move(")"),u(),f}function wI(){return"!"}jb.peek=CI;function jb(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const f=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return u(),n.stack=m,a(),i==="full"||!f||f!==h?c+=l.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function CI(){return"!"}Hb.peek=vI;function Hb(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],l=n.compilePattern(u);let c;if(u.atBreak)for(;c=l.exec(r);){let f=c.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(c.index+1)}}return i+r+i}function vI(){return"`"}function Ub(e,t){const n=sp(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}$b.peek=SI;function $b(e,t,n,r){const i=mp(n),a=i==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,c;if(Ub(e,n)){const m=n.stack;n.stack=[],l=n.enter("autolink");let h=u.move("<");return h+=u.move(n.containerPhrasing(e,{before:h,after:">",...u.current()})),h+=u.move(">"),l(),n.stack=m,h}l=n.enter("link"),c=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,{before:f,after:"](",...u.current()})),f+=u.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(c=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,{before:f,after:e.title?" ":")",...u.current()}))),c(),e.title&&(c=n.enter(`title${a}`),f+=u.move(" "+i),f+=u.move(n.safe(e.title,{before:f,after:i,...u.current()})),f+=u.move(i),c()),f+=u.move(")"),l(),f}function SI(e,t,n){return Ub(e,n)?"<":"["}zb.peek=AI;function zb(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const f=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(f+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return u(),n.stack=m,a(),i==="full"||!f||f!==h?c+=l.move(h+"]"):i==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function AI(){return"["}function gp(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function II(e){const t=gp(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function NI(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Vb(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function LI(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?NI(n):gp(n);const l=e.ordered?u==="."?")":".":II(n);let c=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&m&&(!m.children||!m.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),Vb(n)===u&&m){let h=-1;for(;++h<e.children.length;){const _=e.children[h];if(_&&_.type==="listItem"&&_.children&&_.children[0]&&_.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(u=l),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,i(),f}function RI(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function OI(e,t,n,r){const i=RI(n);let a=n.bulletCurrent||gp(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const l=n.createTracker(r);l.move(a+" ".repeat(u-a.length)),l.shift(u);const c=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),m);return c(),f;function m(h,_,g){return _?(g?"":" ".repeat(u))+h:(g?a:a+" ".repeat(u-a.length))+h}}function PI(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),i(),u}const DI=rc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MI(e,t,n,r){return(e.children.some(function(u){return DI(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function BI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Gb.peek=FI;function Gb(e,t,n,r){const i=BI(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(i+i);let c=u.move(n.containerPhrasing(e,{after:i,before:l,...u.current()}));const f=c.charCodeAt(0),m=Rl(r.before.charCodeAt(r.before.length-1),f,i);m.inside&&(c=po(f)+c.slice(1));const h=c.charCodeAt(c.length-1),_=Rl(r.after.charCodeAt(0),h,i);_.inside&&(c=c.slice(0,-1)+po(h));const g=u.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:_.outside,before:m.outside},l+c+g}function FI(e,t,n){return n.options.strong||"*"}function jI(e,t,n,r){return n.safe(e.value,r)}function HI(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function UI(e,t,n){const r=(Vb(n)+(n.options.ruleSpaces?" ":"")).repeat(HI(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Wb={blockquote:cI,break:J1,code:gI,definition:_I,emphasis:Mb,hardBreak:J1,heading:TI,html:Bb,image:Fb,imageReference:jb,inlineCode:Hb,link:$b,linkReference:zb,list:LI,listItem:OI,paragraph:PI,root:MI,strong:Gb,text:jI,thematicBreak:UI};function $I(){return{enter:{table:zI,tableData:eE,tableHeader:eE,tableRow:GI},exit:{codeText:WI,table:VI,tableData:Df,tableHeader:Df,tableRow:Df}}}function zI(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function VI(e){this.exit(e),this.data.inTable=void 0}function GI(e){this.enter({type:"tableRow",children:[]},e)}function Df(e){this.exit(e)}function eE(e){this.enter({type:"tableCell",children:[]},e)}function WI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,qI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function qI(e,t){return t==="|"?t:e}function YI(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
176
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:_,table:u,tableCell:c,tableRow:l}};function u(g,y,C,k){return f(m(g,C,k),g.align)}function l(g,y,C,k){const w=h(g,C,k),D=f([w]);return D.slice(0,D.indexOf(`
|
|
177
|
+
`))}function c(g,y,C,k){const w=C.enter("tableCell"),D=C.enter("phrasing"),N=C.containerPhrasing(g,{...k,before:a,after:a});return D(),w(),N}function f(g,y){return uI(g,{align:y,alignDelimiters:r,padding:n,stringLength:i})}function m(g,y,C){const k=g.children;let w=-1;const D=[],N=y.enter("table");for(;++w<k.length;)D[w]=h(k[w],y,C);return N(),D}function h(g,y,C){const k=g.children;let w=-1;const D=[],N=y.enter("tableRow");for(;++w<k.length;)D[w]=c(k[w],g,y,C);return N(),D}function _(g,y,C){let k=Wb.inlineCode(g,y,C);return C.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function QI(){return{exit:{taskListCheckValueChecked:tE,taskListCheckValueUnchecked:tE,paragraph:XI}}}function KI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ZI}}}function tE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function XI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,u;for(;++a<i.length;){const l=i[a];if(l.type==="paragraph"){u=l;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function ZI(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let c=Wb.listItem(e,t,n,{...r,...l.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),c;function f(m){return m+u}}function JI(){return[L3(),Z3(),nI(),$I(),QI()]}function eN(e){return{extensions:[R3(),J3(e),rI(),YI(e),KI()]}}const tN={tokenize:oN,partial:!0},qb={tokenize:uN,partial:!0},Yb={tokenize:lN,partial:!0},Qb={tokenize:cN,partial:!0},nN={tokenize:dN,partial:!0},Kb={name:"wwwAutolink",tokenize:sN,previous:Zb},Xb={name:"protocolAutolink",tokenize:aN,previous:Jb},Rr={name:"emailAutolink",tokenize:iN,previous:ey},fr={};function rN(){return{text:fr}}let Oi=48;for(;Oi<123;)fr[Oi]=Rr,Oi++,Oi===58?Oi=65:Oi===91&&(Oi=97);fr[43]=Rr;fr[45]=Rr;fr[46]=Rr;fr[95]=Rr;fr[72]=[Rr,Xb];fr[104]=[Rr,Xb];fr[87]=[Rr,Kb];fr[119]=[Rr,Kb];function iN(e,t,n){const r=this;let i,a;return u;function u(h){return!gh(h)||!ey.call(r,r.previous)||Ep(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(h))}function l(h){return gh(h)?(e.consume(h),l):h===64?(e.consume(h),c):n(h)}function c(h){return h===46?e.check(nN,m,f)(h):h===45||h===95||Wt(h)?(a=!0,e.consume(h),c):m(h)}function f(h){return e.consume(h),i=!0,c}function m(h){return a&&i&&Jt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function sN(e,t,n){const r=this;return i;function i(u){return u!==87&&u!==119||!Zb.call(r,r.previous)||Ep(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(tN,e.attempt(qb,e.attempt(Yb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function aN(e,t,n){const r=this;let i="",a=!1;return u;function u(h){return(h===72||h===104)&&Jb.call(r,r.previous)&&!Ep(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),e.consume(h),l):n(h)}function l(h){if(Jt(h)&&i.length<5)return i+=String.fromCodePoint(h),e.consume(h),l;if(h===58){const _=i.toLowerCase();if(_==="http"||_==="https")return e.consume(h),c}return n(h)}function c(h){return h===47?(e.consume(h),a?f:(a=!0,c)):n(h)}function f(h){return h===null||Il(h)||et(h)||Yi(h)||ec(h)?n(h):e.attempt(qb,e.attempt(Yb,m),n)(h)}function m(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function oN(e,t,n){let r=0;return i;function i(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),i):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function uN(e,t,n){let r,i,a;return u;function u(f){return f===46||f===95?e.check(Qb,c,l)(f):f===null||et(f)||Yi(f)||f!==45&&ec(f)?c(f):(a=!0,e.consume(f),u)}function l(f){return f===95?r=!0:(i=r,r=void 0),e.consume(f),u}function c(f){return i||r||!a?n(f):t(f)}}function lN(e,t){let n=0,r=0;return i;function i(u){return u===40?(n++,e.consume(u),i):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(Qb,t,a)(u):u===null||et(u)||Yi(u)?t(u):(e.consume(u),i)}function a(u){return u===41&&r++,e.consume(u),i}}function cN(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),i):l===60||l===null||et(l)||Yi(l)?t(l):n(l)}function i(l){return l===null||l===40||l===91||et(l)||Yi(l)?t(l):r(l)}function a(l){return Jt(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):Jt(l)?(e.consume(l),u):n(l)}}function dN(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return Wt(a)?n(a):t(a)}}function Zb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||et(e)}function Jb(e){return!Jt(e)}function ey(e){return!(e===47||gh(e))}function gh(e){return e===43||e===45||e===46||e===95||Wt(e)}function Ep(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const fN={tokenize:yN,partial:!0};function hN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:EN,continuation:{tokenize:_N},exit:bN}},text:{91:{name:"gfmFootnoteCall",tokenize:gN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pN,resolveTo:mN}}}}function pN(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){u=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(!u||!u._balanced)return n(c);const f=Qn(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function mN(e,t){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 r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function gN(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;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",f)}function f(h){if(a>999||h===93&&!u||h===null||h===91||et(h))return n(h);if(h===93){e.exit("chunkString");const _=e.exit("gfmFootnoteCallString");return i.includes(Qn(r.sliceSerialize(_)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return et(h)||(u=!0),a++,e.consume(h),h===92?m:f}function m(h){return h===91||h===92||h===93?(e.consume(h),a++,f):f(h)}}function EN(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return c;function c(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(y)}function m(y){if(u>999||y===93&&!l||y===null||y===91||et(y))return n(y);if(y===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return a=Qn(r.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),_}return et(y)||(l=!0),u++,e.consume(y),y===92?h:m}function h(y){return y===91||y===92||y===93?(e.consume(y),u++,m):m(y)}function _(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),i.includes(a)||i.push(a),We(e,g,"gfmFootnoteDefinitionWhitespace")):n(y)}function g(y){return t(y)}}function _N(e,t,n){return e.check(Ro,t,e.attempt(fN,t,n))}function bN(e){e.exit("gfmFootnoteDefinition")}function yN(e,t,n){const r=this;return We(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function xN(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(u,l){let c=-1;for(;++c<u.length;)if(u[c][0]==="enter"&&u[c][1].type==="strikethroughSequenceTemporary"&&u[c][1]._close){let f=c;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[c][1].end.offset-u[c][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[c][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[c][1].end)},h={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[c][1].start)},_=[["enter",m,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",h,l]],g=l.parser.constructs.insideSpan.null;g&&xn(_,_.length,0,tc(g,u.slice(f+1,c),l)),xn(_,_.length,0,[["exit",h,l],["enter",u[c][1],l],["exit",u[c][1],l],["exit",m,l]]),xn(u,f-1,c-f+3,_),c=f+_.length-2;break}}for(c=-1;++c<u.length;)u[c][1].type==="strikethroughSequenceTemporary"&&(u[c][1].type="data");return u}function a(u,l,c){const f=this.previous,m=this.events;let h=0;return _;function _(y){return f===126&&m[m.length-1][1].type!=="characterEscape"?c(y):(u.enter("strikethroughSequenceTemporary"),g(y))}function g(y){const C=Us(f);if(y===126)return h>1?c(y):(u.consume(y),h++,g);if(h<2&&!n)return c(y);const k=u.exit("strikethroughSequenceTemporary"),w=Us(y);return k._open=!w||w===2&&!!C,k._close=!C||C===2&&!!w,l(y)}}}class TN{constructor(){this.map=[]}add(t,n,r){kN(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const a of i)t.push(a);i=r.pop()}this.map.length=0}}function kN(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function wN(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function CN(){return{flow:{null:{name:"table",tokenize:vN,resolveAll:SN}}}}function vN(e,t,n){const r=this;let i=0,a=0,u;return l;function l($){let oe=r.events.length-1;for(;oe>-1;){const he=r.events[oe][1].type;if(he==="lineEnding"||he==="linePrefix")oe--;else break}const ue=oe>-1?r.events[oe][1].type:null,ve=ue==="tableHead"||ue==="tableRow"?B:c;return ve===B&&r.parser.lazy[r.now().line]?n($):ve($)}function c($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),m($)}function m($){return $===null?n($):Re($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),g):n($):Ge($)?We(e,m,"whitespace")($):(a+=1,u&&(u=!1,i+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),u=!0,m):(e.enter("data"),h($)))}function h($){return $===null||$===124||et($)?(e.exit("data"),m($)):(e.consume($),$===92?_:h)}function _($){return $===92||$===124?(e.consume($),h):h($)}function g($){return r.interrupt=!1,r.parser.lazy[r.now().line]?n($):(e.enter("tableDelimiterRow"),u=!1,Ge($)?We(e,y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):y($))}function y($){return $===45||$===58?k($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),C):z($)}function C($){return Ge($)?We(e,k,"whitespace")($):k($)}function k($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),w):$===45?(a+=1,w($)):$===null||Re($)?U($):z($)}function w($){return $===45?(e.enter("tableDelimiterFiller"),D($)):z($)}function D($){return $===45?(e.consume($),D):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N($))}function N($){return Ge($)?We(e,U,"whitespace")($):U($)}function U($){return $===124?y($):$===null||Re($)?!u||i!==a?z($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):z($)}function z($){return n($)}function B($){return e.enter("tableRow"),X($)}function X($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),X):$===null||Re($)?(e.exit("tableRow"),t($)):Ge($)?We(e,X,"whitespace")($):(e.enter("data"),Q($))}function Q($){return $===null||$===124||et($)?(e.exit("data"),X($)):(e.consume($),$===92?ne:Q)}function ne($){return $===92||$===124?(e.consume($),Q):Q($)}}function SN(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,c=0,f,m,h;const _=new TN;for(;++n<e.length;){const g=e[n],y=g[1];g[0]==="enter"?y.type==="tableHead"?(l=!1,c!==0&&(nE(_,t,c,f,m),m=void 0,c=0),f={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},_.add(n,0,[["enter",f,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,h=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,m={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},_.add(n,0,[["enter",m,t]])),i=y.type==="tableDelimiterRow"?2:m?3:1):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],h=nl(_,t,a,i,void 0,h),a=[0,0,0,0]),u[2]=n)):y.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],h=nl(_,t,a,i,void 0,h)),a=u,u=[a[1],n,0,0])):y.type==="tableHead"?(l=!0,c=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(c=n,a[1]!==0?(u[0]=u[1],h=nl(_,t,a,i,n,h)):u[1]!==0&&(h=nl(_,t,u,i,n,h)),i=0):i&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(u[3]=n)}for(c!==0&&nE(_,t,c,f,m),_.consume(t.events),n=-1;++n<t.events.length;){const g=t.events[n];g[0]==="enter"&&g[1].type==="table"&&(g[1]._align=wN(t.events,n))}return e}function nl(e,t,n,r,i,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},Rs(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=Rs(t.events,n[1]);if(a={type:u,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=Rs(t.events,n[2]),m=Rs(t.events,n[3]),h={type:l,start:Object.assign({},f),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const _=t.events[n[2]],g=t.events[n[3]];if(_[1].end=Object.assign({},g[1].end),_[1].type="chunkText",_[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,C=n[3]-n[2]-1;e.add(y,C,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return i!==void 0&&(a.end=Object.assign({},Rs(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function nE(e,t,n,r,i){const a=[],u=Rs(t.events,n);i&&(i.end=Object.assign({},u),a.push(["exit",i,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function Rs(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const AN={name:"tasklistCheck",tokenize:NN};function IN(){return{text:{91:AN}}}function NN(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return et(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),u):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),u):n(c)}function u(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return Re(c)?t(c):Ge(c)?e.check({tokenize:LN},t,n)(c):n(c)}}function LN(e,t,n){return We(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function RN(e){return lb([rN(),hN(),xN(e),CN(),IN()])}const ON={};function ty(e){const t=this,n=e||ON,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(RN(n)),a.push(JI()),u.push(eN(n))}async function PN(e){var t;if((t=navigator.clipboard)!=null&&t.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}try{const n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",n.style.opacity="0",document.body.appendChild(n),n.select();const r=document.execCommand("copy");return document.body.removeChild(n),r}catch{return!1}}const $s={indicator:"indicator",textOnly:"text-only",remove:"remove"};function DN({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:u="text-gray-500",linkBlockPolicy:l=$s.indicator,imageBlockPolicy:c=$s.indicator}){const f=t.length&&!t.every(h=>h==="*"),m=n.length&&!n.every(h=>h==="*");if(!e&&(f||m))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return h=>{const _=UN(e,t,n,r,i,a,u,l,c);ny(h),Xn(h,_)}}function rE(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function MN(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const BN=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),FN=new Set(["javascript:","data:","file:","vbscript:"]);function iE(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const m=e.substring(5);if(m&&m.length>0&&m!=="invalid")return e}}catch{return null}return null}const u=rE(e,n);if(!u||FN.has(u.protocol)||!(BN.has(u.protocol)||a.includes(u.protocol)||a.includes("*")))return null;if(u.protocol==="mailto:"||!u.protocol.match(/^https?:$/))return u.href;const c=MN(e);return u&&t.some(f=>{const m=rE(f,n);return!m||m.origin!==u.origin?!1:u.href.startsWith(m.href)})?c?u.pathname+u.search+u.hash:u.href:t.includes("*")?u.protocol!=="https:"&&u.protocol!=="http:"?null:c?u.pathname+u.search+u.hash:u.href:null}function ny(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)ny(t)}}const Mf=Symbol("node-seen");function jN(e,t,n){return t===$s.remove?{type:"remove"}:t===$s.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function HN(e,t,n){if(t===$s.remove)return{type:"remove"};if(t===$s.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const UN=(e,t,n,r,i,a,u,l,c)=>{const f=(m,h,_)=>{if(m.type!=="element"||m[Mf])return Qa;if(m.tagName==="a"){const g=iE(m.properties.href,t,e,!1,!1,i);if(g===null){if(m[Mf]=!0,Xn(m,f),_&&typeof h=="number"){const y=jN(m,l,u);if(y.type==="remove")return _.children.splice(h,1),[Ds,h];_.children[h]=y.element}return Ds}else return m.properties.href=g,m.properties.target="_blank",m.properties.rel="noopener noreferrer",Qa}if(m.tagName==="img"){const g=iE(m.properties.src,n,e,r,!0,i);if(g===null){if(m[Mf]=!0,Xn(m,f),_&&typeof h=="number"){const y=HN(m,c,a);if(y.type==="remove")return _.children.splice(h,1),[Ds,h];_.children[h]=y.element}return Ds}else return m.properties.src=g,Qa}return Qa};return f},sE=/[#.]/g;function $N(e,t){const n=e||"",r={};let i=0,a,u;for(;i<n.length;){sE.lastIndex=i;const l=sE.exec(n),c=n.slice(i,l?l.index:n.length);c&&(a?a==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:u=c,i+=c.length),l&&(a=l[0],i++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function ry(e,t,n){const r=n?WN(n):void 0;function i(a,u,...l){let c;if(a==null){c={type:"root",children:[]};const f=u;l.unshift(f)}else{c=$N(a,t);const f=c.tagName.toLowerCase(),m=r?r.get(f):void 0;if(c.tagName=m||f,zN(u))l.unshift(u);else for(const[h,_]of Object.entries(u))VN(e,c.properties,h,_)}for(const f of l)Eh(c.children,f);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return i}function zN(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function VN(e,t,n,r){const i=Lo(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?i.spaceSeparated?a=E1(r):i.commaSeparated?a=f1(r):i.commaOrSpaceSeparated?a=E1(f1(r).join(" ")):a=aE(i,i.property,r):Array.isArray(r)?a=[...r]:a=i.property==="style"?GN(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(aE(i,i.property,l));a=u}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Eh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Eh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Eh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function aE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||fo(n)===fo(t)))return!0}return n}function GN(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function WN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const qN=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],YN=ry(Ws,"div"),QN=ry(cr,"g",qN);function KN(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let l=n[u];if(l===void 0){const c=oE(t,n[u-1]);l=c===-1?t.length+1:c+1,n[u]=l}if(l>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const l=n[n.length-1],c=oE(t,l),f=c===-1?t.length+1:c+1;if(l===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function oE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
178
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Hi={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},iy={}.hasOwnProperty,XN=Object.prototype;function ZN(e,t){const n=t||{};return _p({file:n.file||void 0,location:!1,schema:n.space==="svg"?cr:Ws,verbose:n.verbose||!1},e)}function _p(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},_l(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:sy(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),u=KN(a),l=u.toPoint(0),c=u.toPoint(a.length);n.position={start:l,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},_l(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},_l(e,r,n),n}default:return n=JN(e,t),n}}function sy(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=_p(e,t[n]);r.push(i)}return r}function JN(e,t){const n=e.schema;e.schema=t.namespaceURI===Hi.svg?cr:Ws;let r=-1;const i={};for(;++r<t.attrs.length;){const l=t.attrs[r],c=(l.prefix?l.prefix+":":"")+l.name;iy.call(XN,c)||(i[c]=l.value)}const u=(e.schema.space==="svg"?QN:YN)(t.tagName,i,sy(e,t.childNodes));if(_l(e,t,u),u.tagName==="template"){const l=t,c=l.sourceCodeLocation,f=c&&c.startTag&&Ms(c.startTag),m=c&&c.endTag&&Ms(c.endTag),h=_p(e,l.content);f&&m&&e.file&&(h.position={start:f.end,end:m.start}),u.content=h}return e.schema=n,u}function _l(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=eL(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function eL(e,t,n){const r=Ms(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)iy.call(n.attrs,u)&&(a[Lo(e.schema,u).property]=Ms(n.attrs[u]));n.startTag;const l=Ms(n.startTag),c=n.endTag?Ms(n.endTag):void 0,f={opening:l};c&&(f.closing=c),f.properties=a,t.data={position:f}}}return r}function Ms(e){const t=uE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=uE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function uE(e){return e.line&&e.column?e:void 0}const tL={},nL={}.hasOwnProperty,ay=pp("type",{handlers:{root:iL,element:lL,text:oL,comment:uL,doctype:aL}});function rL(e,t){const r=(t||tL).space;return ay(e,r==="svg"?cr:Ws)}function iL(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=bp(e.children,n,t),Ys(e,n),n}function sL(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=bp(e.children,n,t),Ys(e,n),n}function aL(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ys(e,t),t}function oL(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ys(e,t),t}function uL(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ys(e,t),t}function lL(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=cr);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&nL.call(e.properties,a)){const c=cL(r,a,e.properties[a]);c&&i.push(c)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Hi[u],childNodes:[],parentNode:null};return l.childNodes=bp(e.children,l,r),Ys(e,l),e.tagName==="template"&&e.content&&(l.content=sL(e.content,r)),l}function cL(e,t,n){const r=Lo(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Jh(n):tp(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=r.attribute.slice(0,a)),i.namespace=Hi[r.space]}return i}function bp(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const a=ay(e[r],n);a.parentNode=t,i.push(a)}return i}function Ys(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const oy=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],dL=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),ot="�";var I;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(I||(I={}));const cn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function uy(e){return e>=55296&&e<=57343}function fL(e){return e>=56320&&e<=57343}function hL(e,t){return(e-55296)*1024+9216+t}function ly(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function cy(e){return e>=64976&&e<=65007||dL.has(e)}var K;(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"})(K||(K={}));const pL=65536;class mL{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=pL,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(t,n){const{line:r,col:i,offset:a}=this,u=i+n,l=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(fL(n))return this.pos++,this._addGap(),hL(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(K.surrogateInInputStream),t}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(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,I.EOF;const r=this.html.charCodeAt(n);return r===I.CARRIAGE_RETURN?I.LINE_FEED:r}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,I.EOF;let t=this.html.charCodeAt(this.pos);return t===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):t===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===I.LINE_FEED||t===I.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ly(t)?this._err(K.controlCharacterInInputStream):cy(t)&&this._err(K.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ve;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ve||(Ve={}));function dy(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const gL=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))),EL=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]]);function _L(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=EL.get(e))!==null&&t!==void 0?t:e}var Rt;(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"})(Rt||(Rt={}));const bL=32;var di;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(di||(di={}));function _h(e){return e>=Rt.ZERO&&e<=Rt.NINE}function yL(e){return e>=Rt.UPPER_A&&e<=Rt.UPPER_F||e>=Rt.LOWER_A&&e<=Rt.LOWER_F}function xL(e){return e>=Rt.UPPER_A&&e<=Rt.UPPER_Z||e>=Rt.LOWER_A&&e<=Rt.LOWER_Z||_h(e)}function TL(e){return e===Rt.EQUALS||xL(e)}var Nt;(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"})(Nt||(Nt={}));var Ar;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ar||(Ar={}));class kL{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Nt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ar.Strict}startEntity(t){this.decodeMode=t,this.state=Nt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Nt.EntityStart:return t.charCodeAt(n)===Rt.NUM?(this.state=Nt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Nt.NamedEntity,this.stateNamedEntity(t,n));case Nt.NumericStart:return this.stateNumericStart(t,n);case Nt.NumericDecimal:return this.stateNumericDecimal(t,n);case Nt.NumericHex:return this.stateNumericHex(t,n);case Nt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|bL)===Rt.LOWER_X?(this.state=Nt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Nt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const a=r-n;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(n,a),i),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(_h(i)||yL(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(_h(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Rt.SEMI)this.consumed+=1;else if(this.decodeMode===Ar.Strict)return 0;return this.emitCodePoint(_L(this.result),this.consumed),this.errors&&(t!==Rt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],a=(i&di.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=wL(r,i,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ar.Attribute&&(a===0||TL(u))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],a=(i&di.VALUE_LENGTH)>>14,a!==0){if(u===Rt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Ar.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&di.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~di.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Nt.NamedEntity:return this.result!==0&&(this.decodeMode!==Ar.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Nt.NumericDecimal:return this.emitNumericEntity(0,2);case Nt.NumericHex:return this.emitNumericEntity(0,3);case Nt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Nt.EntityStart:return 0}}}function wL(e,t,n,r){const i=(t&di.BRANCH_LENGTH)>>7,a=t&di.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){const c=r-a;return c<0||c>=i?-1:e[n+c]-1}let u=n,l=u+i-1;for(;u<=l;){const c=u+l>>>1,f=e[c];if(f<r)u=c+1;else if(f>r)l=c-1;else return e[c+i]}return-1}var se;(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/"})(se||(se={}));var Gi;(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"})(Gi||(Gi={}));var Rn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Rn||(Rn={}));var G;(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"})(G||(G={}));var E;(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"})(E||(E={}));const CL=new Map([[G.A,E.A],[G.ADDRESS,E.ADDRESS],[G.ANNOTATION_XML,E.ANNOTATION_XML],[G.APPLET,E.APPLET],[G.AREA,E.AREA],[G.ARTICLE,E.ARTICLE],[G.ASIDE,E.ASIDE],[G.B,E.B],[G.BASE,E.BASE],[G.BASEFONT,E.BASEFONT],[G.BGSOUND,E.BGSOUND],[G.BIG,E.BIG],[G.BLOCKQUOTE,E.BLOCKQUOTE],[G.BODY,E.BODY],[G.BR,E.BR],[G.BUTTON,E.BUTTON],[G.CAPTION,E.CAPTION],[G.CENTER,E.CENTER],[G.CODE,E.CODE],[G.COL,E.COL],[G.COLGROUP,E.COLGROUP],[G.DD,E.DD],[G.DESC,E.DESC],[G.DETAILS,E.DETAILS],[G.DIALOG,E.DIALOG],[G.DIR,E.DIR],[G.DIV,E.DIV],[G.DL,E.DL],[G.DT,E.DT],[G.EM,E.EM],[G.EMBED,E.EMBED],[G.FIELDSET,E.FIELDSET],[G.FIGCAPTION,E.FIGCAPTION],[G.FIGURE,E.FIGURE],[G.FONT,E.FONT],[G.FOOTER,E.FOOTER],[G.FOREIGN_OBJECT,E.FOREIGN_OBJECT],[G.FORM,E.FORM],[G.FRAME,E.FRAME],[G.FRAMESET,E.FRAMESET],[G.H1,E.H1],[G.H2,E.H2],[G.H3,E.H3],[G.H4,E.H4],[G.H5,E.H5],[G.H6,E.H6],[G.HEAD,E.HEAD],[G.HEADER,E.HEADER],[G.HGROUP,E.HGROUP],[G.HR,E.HR],[G.HTML,E.HTML],[G.I,E.I],[G.IMG,E.IMG],[G.IMAGE,E.IMAGE],[G.INPUT,E.INPUT],[G.IFRAME,E.IFRAME],[G.KEYGEN,E.KEYGEN],[G.LABEL,E.LABEL],[G.LI,E.LI],[G.LINK,E.LINK],[G.LISTING,E.LISTING],[G.MAIN,E.MAIN],[G.MALIGNMARK,E.MALIGNMARK],[G.MARQUEE,E.MARQUEE],[G.MATH,E.MATH],[G.MENU,E.MENU],[G.META,E.META],[G.MGLYPH,E.MGLYPH],[G.MI,E.MI],[G.MO,E.MO],[G.MN,E.MN],[G.MS,E.MS],[G.MTEXT,E.MTEXT],[G.NAV,E.NAV],[G.NOBR,E.NOBR],[G.NOFRAMES,E.NOFRAMES],[G.NOEMBED,E.NOEMBED],[G.NOSCRIPT,E.NOSCRIPT],[G.OBJECT,E.OBJECT],[G.OL,E.OL],[G.OPTGROUP,E.OPTGROUP],[G.OPTION,E.OPTION],[G.P,E.P],[G.PARAM,E.PARAM],[G.PLAINTEXT,E.PLAINTEXT],[G.PRE,E.PRE],[G.RB,E.RB],[G.RP,E.RP],[G.RT,E.RT],[G.RTC,E.RTC],[G.RUBY,E.RUBY],[G.S,E.S],[G.SCRIPT,E.SCRIPT],[G.SEARCH,E.SEARCH],[G.SECTION,E.SECTION],[G.SELECT,E.SELECT],[G.SOURCE,E.SOURCE],[G.SMALL,E.SMALL],[G.SPAN,E.SPAN],[G.STRIKE,E.STRIKE],[G.STRONG,E.STRONG],[G.STYLE,E.STYLE],[G.SUB,E.SUB],[G.SUMMARY,E.SUMMARY],[G.SUP,E.SUP],[G.TABLE,E.TABLE],[G.TBODY,E.TBODY],[G.TEMPLATE,E.TEMPLATE],[G.TEXTAREA,E.TEXTAREA],[G.TFOOT,E.TFOOT],[G.TD,E.TD],[G.TH,E.TH],[G.THEAD,E.THEAD],[G.TITLE,E.TITLE],[G.TR,E.TR],[G.TRACK,E.TRACK],[G.TT,E.TT],[G.U,E.U],[G.UL,E.UL],[G.SVG,E.SVG],[G.VAR,E.VAR],[G.WBR,E.WBR],[G.XMP,E.XMP]]);function Qs(e){var t;return(t=CL.get(e))!==null&&t!==void 0?t:E.UNKNOWN}const ce=E,vL={[se.HTML]:new Set([ce.ADDRESS,ce.APPLET,ce.AREA,ce.ARTICLE,ce.ASIDE,ce.BASE,ce.BASEFONT,ce.BGSOUND,ce.BLOCKQUOTE,ce.BODY,ce.BR,ce.BUTTON,ce.CAPTION,ce.CENTER,ce.COL,ce.COLGROUP,ce.DD,ce.DETAILS,ce.DIR,ce.DIV,ce.DL,ce.DT,ce.EMBED,ce.FIELDSET,ce.FIGCAPTION,ce.FIGURE,ce.FOOTER,ce.FORM,ce.FRAME,ce.FRAMESET,ce.H1,ce.H2,ce.H3,ce.H4,ce.H5,ce.H6,ce.HEAD,ce.HEADER,ce.HGROUP,ce.HR,ce.HTML,ce.IFRAME,ce.IMG,ce.INPUT,ce.LI,ce.LINK,ce.LISTING,ce.MAIN,ce.MARQUEE,ce.MENU,ce.META,ce.NAV,ce.NOEMBED,ce.NOFRAMES,ce.NOSCRIPT,ce.OBJECT,ce.OL,ce.P,ce.PARAM,ce.PLAINTEXT,ce.PRE,ce.SCRIPT,ce.SECTION,ce.SELECT,ce.SOURCE,ce.STYLE,ce.SUMMARY,ce.TABLE,ce.TBODY,ce.TD,ce.TEMPLATE,ce.TEXTAREA,ce.TFOOT,ce.TH,ce.THEAD,ce.TITLE,ce.TR,ce.TRACK,ce.UL,ce.WBR,ce.XMP]),[se.MATHML]:new Set([ce.MI,ce.MO,ce.MN,ce.MS,ce.MTEXT,ce.ANNOTATION_XML]),[se.SVG]:new Set([ce.TITLE,ce.FOREIGN_OBJECT,ce.DESC]),[se.XLINK]:new Set,[se.XML]:new Set,[se.XMLNS]:new Set},bh=new Set([ce.H1,ce.H2,ce.H3,ce.H4,ce.H5,ce.H6]);G.STYLE,G.SCRIPT,G.XMP,G.IFRAME,G.NOEMBED,G.NOFRAMES,G.PLAINTEXT;var L;(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"})(L||(L={}));const gt={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function SL(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function Ka(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function AL(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function ii(e){return AL(e)||Ka(e)}function lE(e){return ii(e)||SL(e)}function rl(e){return e+32}function fy(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function cE(e){return fy(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function IL(e){return e===I.NULL?K.nullCharacterReference:e>1114111?K.characterReferenceOutsideUnicodeRange:uy(e)?K.surrogateCharacterReference:cy(e)?K.noncharacterCharacterReference:ly(e)||e===I.CARRIAGE_RETURN?K.controlCharacterReference:null}class NL{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=L.DATA,this.returnState=L.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new mL(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new kL(gL,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(K.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(K.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=IL(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),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(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ve.START_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ve.END_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ve.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ve.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(dy(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(K.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Qs(t.tagName),t.type===Ve.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(K.endTagWithAttributes),t.selfClosing&&this._err(K.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ve.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ve.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ve.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ve.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=fy(t)?Ve.WHITESPACE_CHARACTER:t===I.NULL?Ve.NULL_CHARACTER:Ve.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ve.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ar.Attribute:Ar.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case L.DATA:{this._stateData(t);break}case L.RCDATA:{this._stateRcdata(t);break}case L.RAWTEXT:{this._stateRawtext(t);break}case L.SCRIPT_DATA:{this._stateScriptData(t);break}case L.PLAINTEXT:{this._statePlaintext(t);break}case L.TAG_OPEN:{this._stateTagOpen(t);break}case L.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case L.TAG_NAME:{this._stateTagName(t);break}case L.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case L.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case L.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case L.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case L.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case L.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case L.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case L.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case L.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case L.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case L.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case L.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case L.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case L.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case L.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case L.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case L.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case L.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case L.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case L.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case L.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case L.BOGUS_COMMENT:{this._stateBogusComment(t);break}case L.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case L.COMMENT_START:{this._stateCommentStart(t);break}case L.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case L.COMMENT:{this._stateComment(t);break}case L.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case L.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case L.COMMENT_END:{this._stateCommentEnd(t);break}case L.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case L.DOCTYPE:{this._stateDoctype(t);break}case L.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case L.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case L.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case L.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case L.CDATA_SECTION:{this._stateCdataSection(t);break}case L.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case L.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case L.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case L.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(K.unexpectedNullCharacter),this._emitCodePoint(t);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case I.AMPERSAND:{this._startCharacterReference();break}case I.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(ot);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(ot);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(ot);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(ot);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ii(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(K.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(K.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(K.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ii(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(K.missingEndTagName),this.state=L.DATA;break}case I.EOF:{this._err(K.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(K.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(K.unexpectedNullCharacter),n.tagName+=ot;break}case I.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ka(t)?rl(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ii(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case I.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=L.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===I.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ii(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case I.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case I.EXCLAMATION_MARK:{this.state=L.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=L.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ii(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===I.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(ot);break}case I.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(K.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(ot);break}case I.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(K.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(ot);break}case I.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ii(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ii(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(cn.SCRIPT,!1)&&cE(this.preprocessor.peek(cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<cn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(K.unexpectedNullCharacter),this._emitChars(ot);break}case I.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(K.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ot);break}case I.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(K.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ot);break}case I.EOF:{this._err(K.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(cn.SCRIPT,!1)&&cE(this.preprocessor.peek(cn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<cn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(K.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=L.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(K.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(K.unexpectedNullCharacter),this.currentAttr.name+=ot;break}default:this.currentAttr.name+=String.fromCodePoint(Ka(t)?rl(t):t)}}_stateAfterAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(K.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(K.unexpectedNullCharacter),this.currentAttr.value+=ot;break}case I.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(K.unexpectedNullCharacter),this.currentAttr.value+=ot;break}case I.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(K.unexpectedNullCharacter),this.currentAttr.value+=ot;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(K.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this._err(K.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(K.eofInTag),this._emitEOFToken();break}default:this._err(K.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(K.unexpectedNullCharacter),n.data+=ot;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(cn.DASH_DASH,!0)?(this._createCommentToken(cn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(cn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(cn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(cn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(K.cdataInHtmlContent),this._createCommentToken(cn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(K.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(K.abruptClosingOfEmptyComment),this.state=L.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(K.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(K.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(K.unexpectedNullCharacter),n.data+=ot;break}case I.EOF:{this._err(K.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case I.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(K.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case I.EOF:{this._err(K.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(K.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(K.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(K.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(K.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ka(t))this._createDoctypeToken(String.fromCharCode(rl(t))),this.state=L.DOCTYPE_NAME;else switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:{this._err(K.unexpectedNullCharacter),this._createDoctypeToken(ot),this.state=L.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(K.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(K.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=L.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(K.unexpectedNullCharacter),n.name+=ot;break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ka(t)?rl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(cn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(cn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(K.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(K.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(K.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(K.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(K.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(K.unexpectedNullCharacter),n.publicId+=ot;break}case I.GREATER_THAN_SIGN:{this._err(K.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(K.unexpectedNullCharacter),n.publicId+=ot;break}case I.GREATER_THAN_SIGN:{this._err(K.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(K.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(K.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(K.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(K.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(K.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(K.unexpectedNullCharacter),n.systemId+=ot;break}case I.GREATER_THAN_SIGN:{this._err(K.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(K.unexpectedNullCharacter),n.systemId+=ot;break}case I.GREATER_THAN_SIGN:{this._err(K.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.EOF:{this._err(K.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(K.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case I.NULL:{this._err(K.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(K.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=L.DATA;break}case I.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&lE(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){lE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(K.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const hy=new Set([E.DD,E.DT,E.LI,E.OPTGROUP,E.OPTION,E.P,E.RB,E.RP,E.RT,E.RTC]),dE=new Set([...hy,E.CAPTION,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]),Ol=new Set([E.APPLET,E.CAPTION,E.HTML,E.MARQUEE,E.OBJECT,E.TABLE,E.TD,E.TEMPLATE,E.TH]),LL=new Set([...Ol,E.OL,E.UL]),RL=new Set([...Ol,E.BUTTON]),fE=new Set([E.ANNOTATION_XML,E.MI,E.MN,E.MO,E.MS,E.MTEXT]),hE=new Set([E.DESC,E.FOREIGN_OBJECT,E.TITLE]),OL=new Set([E.TR,E.TEMPLATE,E.HTML]),PL=new Set([E.TBODY,E.TFOOT,E.THEAD,E.TEMPLATE,E.HTML]),DL=new Set([E.TABLE,E.TEMPLATE,E.HTML]),ML=new Set([E.TD,E.TH]);class BL{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=E.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===E.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===se.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==se.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(bh,se.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ML,se.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(DL,se.HTML)}clearBackToTableBodyContext(){this.clearBackTo(PL,se.HTML)}clearBackToTableRowContext(){this.clearBackTo(OL,se.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===E.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===E.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case se.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case se.SVG:{if(hE.has(i))return!1;break}case se.MATHML:{if(fE.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ol)}hasInListItemScope(t){return this.hasInDynamicScope(t,LL)}hasInButtonScope(t){return this.hasInDynamicScope(t,RL)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case se.HTML:{if(bh.has(n))return!0;if(Ol.has(n))return!1;break}case se.SVG:{if(hE.has(n))return!1;break}case se.MATHML:{if(fE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===se.HTML)switch(this.tagIDs[n]){case t:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===se.HTML)switch(this.tagIDs[t]){case E.TBODY:case E.THEAD:case E.TFOOT:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===se.HTML)switch(this.tagIDs[n]){case t:return!0;case E.OPTION:case E.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&hy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&dE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&dE.has(this.currentTagId);)this.pop()}}const Bf=3;var lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(lr||(lr={}));const pE={type:lr.Marker};class FL{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const c=this.entries[l];if(c.type===lr.Marker)break;const{element:f}=c;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const m=this.treeAdapter.getAttrList(f);m.length===i&&r.push({idx:l,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Bf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Bf)return;const i=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(c=>i.get(c.name)===c.value)&&(a+=1,a>=Bf&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(pE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:lr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(pE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===lr.Element&&n.element===t)}}const si={createDocument(){return{nodeName:"#document",mode:Rn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};si.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(si.isTextNode(n)){n.value+=t;return}}si.appendChild(e,si.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&si.isTextNode(r)?r.value+=t:si.insertBefore(e,si.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},py="html",jL="about:legacy-compat",HL="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",my=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],UL=[...my,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],$L=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),gy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],zL=[...gy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function mE(e,t){return t.some(n=>e.startsWith(n))}function VL(e){return e.name===py&&e.publicId===null&&(e.systemId===null||e.systemId===jL)}function GL(e){if(e.name!==py)return Rn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===HL)return Rn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),$L.has(n))return Rn.QUIRKS;let r=t===null?UL:my;if(mE(n,r))return Rn.QUIRKS;if(r=t===null?gy:zL,mE(n,r))return Rn.LIMITED_QUIRKS}return Rn.NO_QUIRKS}const gE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},WL="definitionurl",qL="definitionURL",YL=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])),QL=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:se.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:se.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:se.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:se.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:se.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:se.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:se.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:se.XML}],["xml:space",{prefix:"xml",name:"space",namespace:se.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:se.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:se.XMLNS}]]),KL=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])),XL=new Set([E.B,E.BIG,E.BLOCKQUOTE,E.BODY,E.BR,E.CENTER,E.CODE,E.DD,E.DIV,E.DL,E.DT,E.EM,E.EMBED,E.H1,E.H2,E.H3,E.H4,E.H5,E.H6,E.HEAD,E.HR,E.I,E.IMG,E.LI,E.LISTING,E.MENU,E.META,E.NOBR,E.OL,E.P,E.PRE,E.RUBY,E.S,E.SMALL,E.SPAN,E.STRONG,E.STRIKE,E.SUB,E.SUP,E.TABLE,E.TT,E.U,E.UL,E.VAR]);function ZL(e){const t=e.tagID;return t===E.FONT&&e.attrs.some(({name:r})=>r===Gi.COLOR||r===Gi.SIZE||r===Gi.FACE)||XL.has(t)}function Ey(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===WL){e.attrs[t].name=qL;break}}function _y(e){for(let t=0;t<e.attrs.length;t++){const n=YL.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function yp(e){for(let t=0;t<e.attrs.length;t++){const n=QL.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function JL(e){const t=KL.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Qs(e.tagName))}function eR(e,t){return t===se.MATHML&&(e===E.MI||e===E.MO||e===E.MN||e===E.MS||e===E.MTEXT)}function tR(e,t,n){if(t===se.MATHML&&e===E.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Gi.ENCODING){const i=n[r].value.toLowerCase();return i===gE.TEXT_HTML||i===gE.APPLICATION_XML}}return t===se.SVG&&(e===E.FOREIGN_OBJECT||e===E.DESC||e===E.TITLE)}function nR(e,t,n,r){return(!r||r===se.HTML)&&tR(e,t,n)||(!r||r===se.MATHML)&&eR(e,t)}const rR="hidden",iR=8,sR=3;var M;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(M||(M={}));const aR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},by=new Set([E.TABLE,E.TBODY,E.TFOOT,E.THEAD,E.TR]),EE={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:si,onParseError:null};class _E{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...EE,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new NL(this.options,this),this.activeFormattingElements=new FL(this.treeAdapter),this.fragmentContextID=r?Qs(this.treeAdapter.getTagName(r)):E.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new BL(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...EE,...n};t??(t=r.treeAdapter.createElement(G.TEMPLATE,se.HTML,[]));const i=r.treeAdapter.createElement("documentmock",se.HTML,[]),a=new this(r,i,t);return a.fragmentContextID===E.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:aR,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===se.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,se.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=gt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===G.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==se.HTML))switch(this.fragmentContextID){case E.TITLE:case E.TEXTAREA:{this.tokenizer.state=gt.RCDATA;break}case E.STYLE:case E.XMP:case E.IFRAME:case E.NOEMBED:case E.NOFRAMES:case E.NOSCRIPT:{this.tokenizer.state=gt.RAWTEXT;break}case E.SCRIPT:{this.tokenizer.state=gt.SCRIPT_DATA;break}case E.PLAINTEXT:{this.tokenizer.state=gt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,se.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,se.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(G.HTML,se.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,E.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),a=r?i.lastIndexOf(r):i.length,u=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:c,endCol:f,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:c,endCol:f,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),a=n.type===Ve.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===E.SVG&&this.treeAdapter.getTagName(n)===G.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===se.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===E.MGLYPH||t.tagID===E.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,se.HTML)}_processToken(t){switch(t.type){case Ve.CHARACTER:{this.onCharacter(t);break}case Ve.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ve.COMMENT:{this.onComment(t);break}case Ve.DOCTYPE:{this.onDoctype(t);break}case Ve.START_TAG:{this._processStartTag(t);break}case Ve.END_TAG:{this.onEndTag(t);break}case Ve.EOF:{this.onEof(t);break}case Ve.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return nR(t,i,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===lr.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(E.P),this.openElements.popUntilTagNamePopped(E.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case E.TR:{this.insertionMode=M.IN_ROW;return}case E.TBODY:case E.THEAD:case E.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case E.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case E.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case E.TABLE:{this.insertionMode=M.IN_TABLE;return}case E.BODY:{this.insertionMode=M.IN_BODY;return}case E.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case E.SELECT:{this._resetInsertionModeForSelect(t);return}case E.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case E.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case E.TD:case E.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case E.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===E.TEMPLATE)break;if(r===E.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return by.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case E.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===se.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case E.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return vL[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){M6(this,t);return}switch(this.insertionMode){case M.INITIAL:{za(this,t);break}case M.BEFORE_HTML:{ro(this,t);break}case M.BEFORE_HEAD:{io(this,t);break}case M.IN_HEAD:{so(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ao(this,t);break}case M.AFTER_HEAD:{oo(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{xy(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Ff(this,t);break}case M.IN_TABLE_TEXT:{Sy(this,t);break}case M.IN_COLUMN_GROUP:{Pl(this,t);break}case M.AFTER_BODY:{Dl(this,t);break}case M.AFTER_AFTER_BODY:{bl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){D6(this,t);return}switch(this.insertionMode){case M.INITIAL:{za(this,t);break}case M.BEFORE_HTML:{ro(this,t);break}case M.BEFORE_HEAD:{io(this,t);break}case M.IN_HEAD:{so(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ao(this,t);break}case M.AFTER_HEAD:{oo(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Ff(this,t);break}case M.IN_COLUMN_GROUP:{Pl(this,t);break}case M.AFTER_BODY:{Dl(this,t);break}case M.AFTER_AFTER_BODY:{bl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){yh(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{yh(this,t);break}case M.IN_TABLE_TEXT:{Va(this,t);break}case M.AFTER_BODY:{hR(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{pR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{mR(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,K.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Va(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,K.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?B6(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{za(this,t);break}case M.BEFORE_HTML:{gR(this,t);break}case M.BEFORE_HEAD:{_R(this,t);break}case M.IN_HEAD:{Zn(this,t);break}case M.IN_HEAD_NO_SCRIPT:{xR(this,t);break}case M.AFTER_HEAD:{kR(this,t);break}case M.IN_BODY:{Yt(this,t);break}case M.IN_TABLE:{zs(this,t);break}case M.IN_TABLE_TEXT:{Va(this,t);break}case M.IN_CAPTION:{b6(this,t);break}case M.IN_COLUMN_GROUP:{kp(this,t);break}case M.IN_TABLE_BODY:{oc(this,t);break}case M.IN_ROW:{uc(this,t);break}case M.IN_CELL:{T6(this,t);break}case M.IN_SELECT:{Ny(this,t);break}case M.IN_SELECT_IN_TABLE:{w6(this,t);break}case M.IN_TEMPLATE:{v6(this,t);break}case M.AFTER_BODY:{A6(this,t);break}case M.IN_FRAMESET:{I6(this,t);break}case M.AFTER_FRAMESET:{L6(this,t);break}case M.AFTER_AFTER_BODY:{O6(this,t);break}case M.AFTER_AFTER_FRAMESET:{P6(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?F6(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{za(this,t);break}case M.BEFORE_HTML:{ER(this,t);break}case M.BEFORE_HEAD:{bR(this,t);break}case M.IN_HEAD:{yR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{TR(this,t);break}case M.AFTER_HEAD:{wR(this,t);break}case M.IN_BODY:{ac(this,t);break}case M.TEXT:{l6(this,t);break}case M.IN_TABLE:{mo(this,t);break}case M.IN_TABLE_TEXT:{Va(this,t);break}case M.IN_CAPTION:{y6(this,t);break}case M.IN_COLUMN_GROUP:{x6(this,t);break}case M.IN_TABLE_BODY:{xh(this,t);break}case M.IN_ROW:{Iy(this,t);break}case M.IN_CELL:{k6(this,t);break}case M.IN_SELECT:{Ly(this,t);break}case M.IN_SELECT_IN_TABLE:{C6(this,t);break}case M.IN_TEMPLATE:{S6(this,t);break}case M.AFTER_BODY:{Oy(this,t);break}case M.IN_FRAMESET:{N6(this,t);break}case M.AFTER_FRAMESET:{R6(this,t);break}case M.AFTER_AFTER_BODY:{bl(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{za(this,t);break}case M.BEFORE_HTML:{ro(this,t);break}case M.BEFORE_HEAD:{io(this,t);break}case M.IN_HEAD:{so(this,t);break}case M.IN_HEAD_NO_SCRIPT:{ao(this,t);break}case M.AFTER_HEAD:{oo(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{Cy(this,t);break}case M.TEXT:{c6(this,t);break}case M.IN_TABLE_TEXT:{Va(this,t);break}case M.IN_TEMPLATE:{Ry(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Tp(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===I.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{yy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Ff(this,t);break}case M.IN_TABLE_TEXT:{vy(this,t);break}}}}function oR(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):wy(e,t),n}function uR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function lR(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,u=i;u!==n;a++,u=i){i=e.openElements.getCommonAncestor(u);const l=e.activeFormattingElements.getElementEntry(u),c=l&&a>=sR;!l||c?(c&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=cR(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function cR(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function dR(e,t,n){const r=e.treeAdapter.getTagName(t),i=Qs(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);i===E.TEMPLATE&&a===se.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function fR(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function xp(e,t){for(let n=0;n<iR;n++){const r=oR(e,t);if(!r)break;const i=uR(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const a=lR(e,i,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&dR(e,u,a),fR(e,i,r)}}function yh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function hR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function pR(e,t){e._appendCommentNode(t,e.document)}function Tp(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function mR(e,t){e._setDocumentType(t);const n=t.forceQuirks?Rn.QUIRKS:GL(t);VL(t)||e._err(t,K.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function za(e,t){e._err(t,K.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Rn.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function gR(e,t){t.tagID===E.HTML?(e._insertElement(t,se.HTML),e.insertionMode=M.BEFORE_HEAD):ro(e,t)}function ER(e,t){const n=t.tagID;(n===E.HTML||n===E.HEAD||n===E.BODY||n===E.BR)&&ro(e,t)}function ro(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function _R(e,t){switch(t.tagID){case E.HTML:{Yt(e,t);break}case E.HEAD:{e._insertElement(t,se.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:io(e,t)}}function bR(e,t){const n=t.tagID;n===E.HEAD||n===E.BODY||n===E.HTML||n===E.BR?io(e,t):e._err(t,K.endTagWithoutMatchingOpenElement)}function io(e,t){e._insertFakeElement(G.HEAD,E.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function Zn(e,t){switch(t.tagID){case E.HTML:{Yt(e,t);break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:{e._appendElement(t,se.HTML),t.ackSelfClosing=!0;break}case E.TITLE:{e._switchToTextParsing(t,gt.RCDATA);break}case E.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,gt.RAWTEXT):(e._insertElement(t,se.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case E.NOFRAMES:case E.STYLE:{e._switchToTextParsing(t,gt.RAWTEXT);break}case E.SCRIPT:{e._switchToTextParsing(t,gt.SCRIPT_DATA);break}case E.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case E.HEAD:{e._err(t,K.misplacedStartTagForHeadElement);break}default:so(e,t)}}function yR(e,t){switch(t.tagID){case E.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case E.BODY:case E.BR:case E.HTML:{so(e,t);break}case E.TEMPLATE:{Ji(e,t);break}default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function Ji(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==E.TEMPLATE&&e._err(t,K.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,K.endTagWithoutMatchingOpenElement)}function so(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function xR(e,t){switch(t.tagID){case E.HTML:{Yt(e,t);break}case E.BASEFONT:case E.BGSOUND:case E.HEAD:case E.LINK:case E.META:case E.NOFRAMES:case E.STYLE:{Zn(e,t);break}case E.NOSCRIPT:{e._err(t,K.nestedNoscriptInHead);break}default:ao(e,t)}}function TR(e,t){switch(t.tagID){case E.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case E.BR:{ao(e,t);break}default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function ao(e,t){const n=t.type===Ve.EOF?K.openElementsLeftAfterEof:K.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function kR(e,t){switch(t.tagID){case E.HTML:{Yt(e,t);break}case E.BODY:{e._insertElement(t,se.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case E.FRAMESET:{e._insertElement(t,se.HTML),e.insertionMode=M.IN_FRAMESET;break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{e._err(t,K.abandonedHeadElementChild),e.openElements.push(e.headElement,E.HEAD),Zn(e,t),e.openElements.remove(e.headElement);break}case E.HEAD:{e._err(t,K.misplacedStartTagForHeadElement);break}default:oo(e,t)}}function wR(e,t){switch(t.tagID){case E.BODY:case E.HTML:case E.BR:{oo(e,t);break}case E.TEMPLATE:{Ji(e,t);break}default:e._err(t,K.endTagWithoutMatchingOpenElement)}}function oo(e,t){e._insertFakeElement(G.BODY,E.BODY),e.insertionMode=M.IN_BODY,sc(e,t)}function sc(e,t){switch(t.type){case Ve.CHARACTER:{xy(e,t);break}case Ve.WHITESPACE_CHARACTER:{yy(e,t);break}case Ve.COMMENT:{yh(e,t);break}case Ve.START_TAG:{Yt(e,t);break}case Ve.END_TAG:{ac(e,t);break}case Ve.EOF:{Cy(e,t);break}}}function yy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function xy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function CR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function vR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function SR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,se.HTML),e.insertionMode=M.IN_FRAMESET)}function AR(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,se.HTML)}function IR(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&bh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,se.HTML)}function NR(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,se.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function LR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,se.HTML),n||(e.formElement=e.openElements.current))}function RR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===E.LI&&i===E.LI||(n===E.DD||n===E.DT)&&(i===E.DD||i===E.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==E.ADDRESS&&i!==E.DIV&&i!==E.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,se.HTML)}function OR(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,se.HTML),e.tokenizer.state=gt.PLAINTEXT}function PR(e,t){e.openElements.hasInScope(E.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.framesetOk=!1}function DR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(G.A);n&&(xp(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function MR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function BR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(E.NOBR)&&(xp(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,se.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function FR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function jR(e,t){e.treeAdapter.getDocumentMode(e.document)!==Rn.QUIRKS&&e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,se.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function Ty(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,se.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ky(e){const t=dy(e,Gi.TYPE);return t!=null&&t.toLowerCase()===rR}function HR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,se.HTML),ky(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function UR(e,t){e._appendElement(t,se.HTML),t.ackSelfClosing=!0}function $R(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._appendElement(t,se.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function zR(e,t){t.tagName=G.IMG,t.tagID=E.IMG,Ty(e,t)}function VR(e,t){e._insertElement(t,se.HTML),e.skipNextNewLine=!0,e.tokenizer.state=gt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function GR(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,gt.RAWTEXT)}function WR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,gt.RAWTEXT)}function bE(e,t){e._switchToTextParsing(t,gt.RAWTEXT)}function qR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function YR(e,t){e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML)}function QR(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,se.HTML)}function KR(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(E.RTC),e._insertElement(t,se.HTML)}function XR(e,t){e._reconstructActiveFormattingElements(),Ey(t),yp(t),t.selfClosing?e._appendElement(t,se.MATHML):e._insertElement(t,se.MATHML),t.ackSelfClosing=!0}function ZR(e,t){e._reconstructActiveFormattingElements(),_y(t),yp(t),t.selfClosing?e._appendElement(t,se.SVG):e._insertElement(t,se.SVG),t.ackSelfClosing=!0}function yE(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML)}function Yt(e,t){switch(t.tagID){case E.I:case E.S:case E.B:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.SMALL:case E.STRIKE:case E.STRONG:{MR(e,t);break}case E.A:{DR(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{IR(e,t);break}case E.P:case E.DL:case E.OL:case E.UL:case E.DIV:case E.DIR:case E.NAV:case E.MAIN:case E.MENU:case E.ASIDE:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.DETAILS:case E.ADDRESS:case E.ARTICLE:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{AR(e,t);break}case E.LI:case E.DD:case E.DT:{RR(e,t);break}case E.BR:case E.IMG:case E.WBR:case E.AREA:case E.EMBED:case E.KEYGEN:{Ty(e,t);break}case E.HR:{$R(e,t);break}case E.RB:case E.RTC:{QR(e,t);break}case E.RT:case E.RP:{KR(e,t);break}case E.PRE:case E.LISTING:{NR(e,t);break}case E.XMP:{GR(e,t);break}case E.SVG:{ZR(e,t);break}case E.HTML:{CR(e,t);break}case E.BASE:case E.LINK:case E.META:case E.STYLE:case E.TITLE:case E.SCRIPT:case E.BGSOUND:case E.BASEFONT:case E.TEMPLATE:{Zn(e,t);break}case E.BODY:{vR(e,t);break}case E.FORM:{LR(e,t);break}case E.NOBR:{BR(e,t);break}case E.MATH:{XR(e,t);break}case E.TABLE:{jR(e,t);break}case E.INPUT:{HR(e,t);break}case E.PARAM:case E.TRACK:case E.SOURCE:{UR(e,t);break}case E.IMAGE:{zR(e,t);break}case E.BUTTON:{PR(e,t);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{FR(e,t);break}case E.IFRAME:{WR(e,t);break}case E.SELECT:{qR(e,t);break}case E.OPTION:case E.OPTGROUP:{YR(e,t);break}case E.NOEMBED:case E.NOFRAMES:{bE(e,t);break}case E.FRAMESET:{SR(e,t);break}case E.TEXTAREA:{VR(e,t);break}case E.NOSCRIPT:{e.options.scriptingEnabled?bE(e,t):yE(e,t);break}case E.PLAINTEXT:{OR(e,t);break}case E.COL:case E.TH:case E.TD:case E.TR:case E.HEAD:case E.FRAME:case E.TBODY:case E.TFOOT:case E.THEAD:case E.CAPTION:case E.COLGROUP:break;default:yE(e,t)}}function JR(e,t){if(e.openElements.hasInScope(E.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function e6(e,t){e.openElements.hasInScope(E.BODY)&&(e.insertionMode=M.AFTER_BODY,Oy(e,t))}function t6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function n6(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(E.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(E.FORM):n&&e.openElements.remove(n))}function r6(e){e.openElements.hasInButtonScope(E.P)||e._insertFakeElement(G.P,E.P),e._closePElement()}function i6(e){e.openElements.hasInListItemScope(E.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(E.LI),e.openElements.popUntilTagNamePopped(E.LI))}function s6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function a6(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function o6(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function u6(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(G.BR,E.BR),e.openElements.pop(),e.framesetOk=!1}function wy(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],u=e.openElements.tagIDs[i];if(r===u&&(r!==E.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,u))break}}function ac(e,t){switch(t.tagID){case E.A:case E.B:case E.I:case E.S:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.NOBR:case E.SMALL:case E.STRIKE:case E.STRONG:{xp(e,t);break}case E.P:{r6(e);break}case E.DL:case E.UL:case E.OL:case E.DIR:case E.DIV:case E.NAV:case E.PRE:case E.MAIN:case E.MENU:case E.ASIDE:case E.BUTTON:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.ADDRESS:case E.ARTICLE:case E.DETAILS:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.LISTING:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{t6(e,t);break}case E.LI:{i6(e);break}case E.DD:case E.DT:{s6(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{a6(e);break}case E.BR:{u6(e);break}case E.BODY:{JR(e,t);break}case E.HTML:{e6(e,t);break}case E.FORM:{n6(e);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{o6(e,t);break}case E.TEMPLATE:{Ji(e,t);break}default:wy(e,t)}}function Cy(e,t){e.tmplInsertionModeStack.length>0?Ry(e,t):Tp(e,t)}function l6(e,t){var n;t.tagID===E.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function c6(e,t){e._err(t,K.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ff(e,t){if(e.openElements.currentTagId!==void 0&&by.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Ve.CHARACTER:{Sy(e,t);break}case Ve.WHITESPACE_CHARACTER:{vy(e,t);break}}else Po(e,t)}function d6(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,se.HTML),e.insertionMode=M.IN_CAPTION}function f6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,se.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function h6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.COLGROUP,E.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,kp(e,t)}function p6(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,se.HTML),e.insertionMode=M.IN_TABLE_BODY}function m6(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.TBODY,E.TBODY),e.insertionMode=M.IN_TABLE_BODY,oc(e,t)}function g6(e,t){e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function E6(e,t){ky(t)?e._appendElement(t,se.HTML):Po(e,t),t.ackSelfClosing=!0}function _6(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,se.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function zs(e,t){switch(t.tagID){case E.TD:case E.TH:case E.TR:{m6(e,t);break}case E.STYLE:case E.SCRIPT:case E.TEMPLATE:{Zn(e,t);break}case E.COL:{h6(e,t);break}case E.FORM:{_6(e,t);break}case E.TABLE:{g6(e,t);break}case E.TBODY:case E.TFOOT:case E.THEAD:{p6(e,t);break}case E.INPUT:{E6(e,t);break}case E.CAPTION:{d6(e,t);break}case E.COLGROUP:{f6(e,t);break}default:Po(e,t)}}function mo(e,t){switch(t.tagID){case E.TABLE:{e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode());break}case E.TEMPLATE:{Ji(e,t);break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:Po(e,t)}}function Po(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,sc(e,t),e.fosterParentingEnabled=n}function vy(e,t){e.pendingCharacterTokens.push(t)}function Sy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Va(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Po(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ay=new Set([E.CAPTION,E.COL,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]);function b6(e,t){const n=t.tagID;Ay.has(n)?e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,zs(e,t)):Yt(e,t)}function y6(e,t){const n=t.tagID;switch(n){case E.CAPTION:case E.TABLE:{e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===E.TABLE&&mo(e,t));break}case E.BODY:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:ac(e,t)}}function kp(e,t){switch(t.tagID){case E.HTML:{Yt(e,t);break}case E.COL:{e._appendElement(t,se.HTML),t.ackSelfClosing=!0;break}case E.TEMPLATE:{Zn(e,t);break}default:Pl(e,t)}}function x6(e,t){switch(t.tagID){case E.COLGROUP:{e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case E.TEMPLATE:{Ji(e,t);break}case E.COL:break;default:Pl(e,t)}}function Pl(e,t){e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function oc(e,t){switch(t.tagID){case E.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,se.HTML),e.insertionMode=M.IN_ROW;break}case E.TH:case E.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(G.TR,E.TR),e.insertionMode=M.IN_ROW,uc(e,t);break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,zs(e,t));break}default:zs(e,t)}}function xh(e,t){const n=t.tagID;switch(t.tagID){case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case E.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,mo(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:case E.TR:break;default:mo(e,t)}}function uc(e,t){switch(t.tagID){case E.TH:case E.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,se.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,oc(e,t));break}default:zs(e,t)}}function Iy(e,t){switch(t.tagID){case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case E.TABLE:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,xh(e,t));break}case E.TBODY:case E.TFOOT:case E.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(E.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,xh(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:break;default:mo(e,t)}}function T6(e,t){const n=t.tagID;Ay.has(n)?(e.openElements.hasInTableScope(E.TD)||e.openElements.hasInTableScope(E.TH))&&(e._closeTableCell(),uc(e,t)):Yt(e,t)}function k6(e,t){const n=t.tagID;switch(n){case E.TD:case E.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case E.TABLE:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Iy(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:break;default:ac(e,t)}}function Ny(e,t){switch(t.tagID){case E.HTML:{Yt(e,t);break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._insertElement(t,se.HTML);break}case E.OPTGROUP:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._insertElement(t,se.HTML);break}case E.HR:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._appendElement(t,se.HTML),t.ackSelfClosing=!0;break}case E.INPUT:case E.KEYGEN:case E.TEXTAREA:case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),t.tagID!==E.SELECT&&e._processStartTag(t));break}case E.SCRIPT:case E.TEMPLATE:{Zn(e,t);break}}}function Ly(e,t){switch(t.tagID){case E.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===E.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===E.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop();break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop();break}case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode());break}case E.TEMPLATE:{Ji(e,t);break}}}function w6(e,t){const n=t.tagID;n===E.CAPTION||n===E.TABLE||n===E.TBODY||n===E.TFOOT||n===E.THEAD||n===E.TR||n===E.TD||n===E.TH?(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Ny(e,t)}function C6(e,t){const n=t.tagID;n===E.CAPTION||n===E.TABLE||n===E.TBODY||n===E.TFOOT||n===E.THEAD||n===E.TR||n===E.TD||n===E.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ly(e,t)}function v6(e,t){switch(t.tagID){case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{Zn(e,t);break}case E.CAPTION:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,zs(e,t);break}case E.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,kp(e,t);break}case E.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,oc(e,t);break}case E.TD:case E.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,uc(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,Yt(e,t)}}function S6(e,t){t.tagID===E.TEMPLATE&&Ji(e,t)}function Ry(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Tp(e,t)}function A6(e,t){t.tagID===E.HTML?Yt(e,t):Dl(e,t)}function Oy(e,t){var n;if(t.tagID===E.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===E.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Dl(e,t)}function Dl(e,t){e.insertionMode=M.IN_BODY,sc(e,t)}function I6(e,t){switch(t.tagID){case E.HTML:{Yt(e,t);break}case E.FRAMESET:{e._insertElement(t,se.HTML);break}case E.FRAME:{e._appendElement(t,se.HTML),t.ackSelfClosing=!0;break}case E.NOFRAMES:{Zn(e,t);break}}}function N6(e,t){t.tagID===E.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==E.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function L6(e,t){switch(t.tagID){case E.HTML:{Yt(e,t);break}case E.NOFRAMES:{Zn(e,t);break}}}function R6(e,t){t.tagID===E.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function O6(e,t){t.tagID===E.HTML?Yt(e,t):bl(e,t)}function bl(e,t){e.insertionMode=M.IN_BODY,sc(e,t)}function P6(e,t){switch(t.tagID){case E.HTML:{Yt(e,t);break}case E.NOFRAMES:{Zn(e,t);break}}}function D6(e,t){t.chars=ot,e._insertCharacters(t)}function M6(e,t){e._insertCharacters(t),e.framesetOk=!1}function Py(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==se.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function B6(e,t){if(ZL(t))Py(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===se.MATHML?Ey(t):r===se.SVG&&(JL(t),_y(t)),yp(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function F6(e,t){if(t.tagID===E.P||t.tagID===E.BR){Py(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===se.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}G.AREA,G.BASE,G.BASEFONT,G.BGSOUND,G.BR,G.COL,G.EMBED,G.FRAME,G.HR,G.IMG,G.INPUT,G.KEYGEN,G.LINK,G.META,G.PARAM,G.SOURCE,G.TRACK,G.WBR;const j6=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,H6=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),xE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Dy(e,t){const n=K6(e),r=pp("type",{handlers:{root:U6,element:$6,text:z6,comment:By,doctype:V6,raw:W6},unknown:q6}),i={parser:n?new _E(xE):_E.getFragmentParser(void 0,xE),handle(l){r(l,i)},stitches:!1,options:t||{}};r(e,i),Ks(i,dr());const a=n?i.parser.document:i.parser.getFragment(),u=ZN(a,{file:i.options.file});return i.stitches&&Xn(u,"comment",function(l,c,f){const m=l;if(m.value.stitch&&f&&c!==void 0){const h=f.children;return h[c]=m.value.stitch,c}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function My(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function U6(e,t){My(e.children,t)}function $6(e,t){Y6(e,t),My(e.children,t),Q6(e,t)}function z6(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ve.CHARACTER,chars:e.value,location:Do(e)};Ks(t,dr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function V6(e,t){const n={type:Ve.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Do(e)};Ks(t,dr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function G6(e,t){t.stitches=!0;const n=X6(e);if("children"in e&&"children"in n){const r=Dy({type:"root",children:e.children},t.options);n.children=r.children}By({type:"comment",value:{stitch:n}},t)}function By(e,t){const n=e.value,r={type:Ve.COMMENT,data:n,location:Do(e)};Ks(t,dr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function W6(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Fy(t,dr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(j6,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function q6(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))G6(n,t);else{let r="";throw H6.has(n.type)&&(r=". 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"+r)}}function Ks(e,t){Fy(e,t);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=gt.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 Fy(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Y6(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===gt.PLAINTEXT)return;Ks(t,dr(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Hi.html;i===Hi.html&&n==="svg"&&(i=Hi.svg);const a=rL({...e,children:[]},{space:i===Hi.svg?"svg":"html"}),u={type:Ve.START_TAG,tagName:n,tagID:Qs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Do(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Q6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&oy.includes(n)||t.parser.tokenizer.state===gt.PLAINTEXT)return;Ks(t,Jl(e));const r={type:Ve.END_TAG,tagName:n,tagID:Qs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Do(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===gt.RCDATA||t.parser.tokenizer.state===gt.RAWTEXT||t.parser.tokenizer.state===gt.SCRIPT_DATA)&&(t.parser.tokenizer.state=gt.DATA)}function K6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Do(e){const t=dr(e)||{line:void 0,column:void 0,offset:void 0},n=Jl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function X6(e){return"children"in e?Qi({...e,children:[]}):Qi(e)}function Th(e){return function(t,n){return Dy(t,{...e,file:n})}}const Pi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Bi={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Pi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Pi],h2:[["className","sr-only"]],img:[...Pi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Pi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Pi],table:[...Pi],ul:[...Pi,["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"]},ui={}.hasOwnProperty;function Z6(e,t){let n={type:"root",children:[]};const r={schema:t?{...Bi,...t}:Bi,stack:[]},i=jy(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function jy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return J6(e,n);case"doctype":return eO(e,n);case"element":return tO(e,n);case"root":return nO(e,n);case"text":return rO(e,n)}}}function J6(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Mo(a,t),a}}function eO(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Mo(n,t),n}}function tO(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Hy(e,t.children),i=iO(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&ui.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let c=-1;for(a=!1;++c<l.length;)e.stack.includes(l[c])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:i,children:r};return Mo(u,t),u}function nO(e,t){const r={type:"root",children:Hy(e,t.children)};return Mo(r,t),r}function rO(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Mo(r,t),r}function Hy(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const a=jy(e,r[i]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function iO(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&ui.call(r,n)?r[n]:void 0,u=r&&ui.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},c={};let f;for(f in l)if(ui.call(l,f)){const m=l[f];let h=TE(e,kE(a,f),f,m);h==null&&(h=TE(e,kE(u,f),f,m)),h!=null&&(c[f]=h)}if(i&&ui.call(i,n)){const m=i[n];for(f in m)ui.call(m,f)&&!ui.call(c,f)&&(c[f]=m[f])}return c}function TE(e,t,n,r){return t?Array.isArray(r)?sO(e,t,n,r):Uy(e,t,n,r):void 0}function sO(e,t,n,r){let i=-1;const a=[];for(;++i<r.length;){const u=Uy(e,t,n,r[i]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Uy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&aO(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){i=!0;break}}else if(u===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function aO(e,t,n){const r=e.schema.protocols&&ui.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),a=i.indexOf(":"),u=i.indexOf("?"),l=i.indexOf("#"),c=i.indexOf("/");if(a<0||c>-1&&a>c||u>-1&&a>u||l>-1&&a>l)return!0;let f=-1;for(;++f<r.length;){const m=r[f];if(a===m.length&&i.slice(0,m.length)===m)return!0}return!1}function Mo(e,t){const n=nb(t);t.data&&(e.data=Qi(t.data)),n&&(e.position=n)}function kE(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function $y(e){return function(t){return Z6(t,e)}}var oO=Object.defineProperty,uO=Object.defineProperties,lO=Object.getOwnPropertyDescriptors,wE=Object.getOwnPropertySymbols,cO=Object.prototype.hasOwnProperty,dO=Object.prototype.propertyIsEnumerable,CE=(e,t,n)=>t in e?oO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zy=(e,t)=>{for(var n in t||(t={}))cO.call(t,n)&&CE(e,n,t[n]);if(wE)for(var n of wE(t))dO.call(t,n)&&CE(e,n,t[n]);return e},Vy=(e,t)=>uO(e,lO(t)),tn=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},fO=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},hO=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!fO(e,n)&&(t+=1)}return t},hi=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},pO=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,mO=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(pO,(t,n,r,i)=>tn(e,i)?t:`${n}\\>${r}`),gO=/(\*\*)([^*]*\*?)$/,EO=/(__)([^_]*?)$/,_O=/(\*\*\*)([^*]*?)$/,bO=/(\*)([^*]*?)$/,yO=/(_)([^_]*?)$/,xO=/(`)([^`]*?)$/,TO=/(~~)([^~]*?)$/,es=/^[\s_~*`]*$/,Gy=/^[\s]*[-*+][\s]+$/,kO=/[\p{L}\p{N}_]/u,wO=/^```[^`\n]*```?$/,CO=/^\*{4,}$/,vO=/(__)([^_]+)_$/,SO=/(~~)([^~]+)~$/,vE=/~~/g,pi=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:kO.test(e)},AO=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Wy=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},lc=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},IO=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
179
|
+
`)return!1}return!1},qy=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?IO(e,t):!1;if(e[n]===`
|
|
180
|
+
`)return!1}return!1},NO=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
|
|
181
|
+
`)return!1}return!1},wp=(e,t,n)=>{let r=0;for(let c=t-1;c>=0;c-=1)if(e[c]===`
|
|
182
|
+
`){r=c+1;break}let i=e.length;for(let c=t;c<e.length;c+=1)if(e[c]===`
|
|
183
|
+
`){i=c;break}let a=e.substring(r,i),u=0,l=!1;for(let c of a)if(c===n)u+=1;else if(c!==" "&&c!==" "){l=!0;break}return u>=3&&!l},LO=(e,t,n,r)=>n==="\\"||e.includes("$")&&lc(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&pi(n)&&pi(r)||(!n||n===" "||n===" "||n===`
|
|
184
|
+
`)&&(!r||r===" "||r===" "||r===`
|
|
185
|
+
`)),Yy=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let a=i>0?e[i-1]:"",u=i<r-1?e[i+1]:"";LO(e,i,a,u)||(t+=1)}return t},RO=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&lc(e,t)||qy(e,t)||NO(e,t)||n==="_"||r==="_"||n&&r&&pi(n)&&pi(r)),OO=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let a=i>0?e[i-1]:"",u=i<r-1?e[i+1]:"";RO(e,i,a,u)||(t+=1)}return t},PO=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},Cp=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},SE=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},DO=(e,t,n)=>{if(!t||es.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
186
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return Gy.test(a)&&t.includes(`
|
|
187
|
+
`)?!0:wp(e,n,"*")},MO=e=>{let t=e.match(gO);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return tn(e,r)||hi(e,r)||DO(e,n,r)?e:Cp(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},BO=(e,t,n)=>{if(!t||es.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
188
|
+
`),i=r===-1?0:r+1,a=e.substring(i,n);return Gy.test(a)&&t.includes(`
|
|
189
|
+
`)?!0:wp(e,n,"_")},FO=e=>{let t=e.match(EO);if(!t){let i=e.match(vO);if(i){let a=e.lastIndexOf(i[1]);if(!(tn(e,a)||hi(e,a))&&SE(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return tn(e,r)||hi(e,r)||BO(e,n,r)?e:SE(e)%2===1?`${e}__`:e},jO=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!lc(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
|
|
190
|
+
`)&&(!i||i===" "||i===" "||i===`
|
|
191
|
+
`)||r&&i&&pi(r)&&pi(i))continue;return n}}return-1},HO=e=>{if(!e.match(bO))return e;let t=jO(e);if(t===-1||tn(e,t)||hi(e,t))return e;let n=e.substring(t+1);return!n||es.test(n)?e:Yy(e)%2===1?`${e}*`:e},Qy=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!lc(e,n)&&!qy(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&pi(r)&&pi(i))continue;return n}}return-1},UO=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
192
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},$O=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Cp(t)%2!==1)return null;let n=t.indexOf("**"),r=Qy(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},zO=e=>{if(!e.match(yO))return e;let t=Qy(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||es.test(n)||tn(e,t)||hi(e,t))return e;if(OO(e)%2===1){let r=$O(e);return r!==null?r:UO(e)}return e},VO=e=>{let t=Cp(e),n=Yy(e);return t%2===0&&n%2===0},GO=(e,t,n)=>!t||es.test(t)||tn(e,n)||hi(e,n)?!0:wp(e,n,"*"),WO=e=>{if(CO.test(e))return e;let t=e.match(_O);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return GO(e,n,r)?e:PO(e)%2===1?VO(e)?e:`${e}***`:e},qO=/<[a-zA-Z/][^>]*$/,YO=e=>{let t=e.match(qO);return!t||t.index===void 0||tn(e,t.index)?e:e.substring(0,t.index).trimEnd()},QO=e=>!e.match(wO)||e.includes(`
|
|
193
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,KO=e=>(e.match(/```/g)||[]).length%2===1,XO=e=>{let t=QO(e);if(t!==null)return t;let n=e.match(xO);if(n&&!KO(e)){let r=n[2];if(!r||es.test(r))return e;if(hO(e)%2===1)return`${e}\``}return e},Ky=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",ZO=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Ky(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},JO=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!Ky(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},eP=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
194
|
+
`,t)!==-1&&!e.endsWith(`
|
|
195
|
+
`)?`${e}
|
|
196
|
+
$$`:`${e}$$`},tP=e=>ZO(e)%2===0?e:eP(e),nP=e=>JO(e)%2===1?`${e}$`:e,rP=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=AO(e,t);if(r===-1||tn(e,r))return null;let i=r>0&&e[r-1]==="!",a=i?r-1:r,u=e.substring(0,a);if(i)return u;let l=e.substring(r+1,t);return n==="text-only"?`${u}${l}`:`${u}[${l}](streamdown:incomplete-link)`},AE=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!tn(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Wy(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},iP=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let u=AE(e,t);return e.substring(0,u)+e.substring(u+1)}return`${e}](streamdown:incomplete-link)`}if(Wy(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n==="text-only"){let u=AE(e,t);return e.substring(0,u)+e.substring(u+1)}return`${e}](streamdown:incomplete-link)`}return null},Xy=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!tn(e,n)){let r=rP(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!tn(e,r)){let i=iP(e,r,t);if(i!==null)return i}return e},sP=/^-{1,2}$/,aP=/^[\s]*-{1,2}[\s]+$/,oP=/^={1,2}$/,uP=/^[\s]*={1,2}[\s]+$/,lP=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
197
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(sP.test(i)&&!n.match(aP)){let a=r.split(`
|
|
198
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}if(oP.test(i)&&!n.match(uP)){let a=r.split(`
|
|
199
|
+
`).at(-1);if(a&&a.trim().length>0)return`${e}`}return e},cP=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),dP=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(cP,(t,n)=>tn(e,n)?t:"\\~"),fP=e=>{var t,n;let r=e.match(TO);if(r){let i=r[2];if(!i||es.test(i))return e;let a=e.lastIndexOf(r[1]);if(tn(e,a)||hi(e,a))return e;if(((t=e.match(vE))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(SO);if(i){let a=e.lastIndexOf(i[0].slice(0,2));if(tn(e,a)||hi(e,a))return e;if(((n=e.match(vE))==null?void 0:n.length)%2===1)return`${e}~`}}return e},jf=e=>e!==!1,hP=e=>e===!0,Zt={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},pP=[{handler:{name:"singleTilde",handle:dP,priority:Zt.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:mO,priority:Zt.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:YO,priority:Zt.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:lP,priority:Zt.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Xy,priority:Zt.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:WO,priority:Zt.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:MO,priority:Zt.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:FO,priority:Zt.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:HO,priority:Zt.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:zO,priority:Zt.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:XO,priority:Zt.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:fP,priority:Zt.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:tP,priority:Zt.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:nP,priority:Zt.INLINE_KATEX},optionKey:"inlineKatex"}],mP=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return pP.filter(({handler:r,optionKey:i})=>r.name==="links"?jf(e==null?void 0:e.links)||jf(e==null?void 0:e.images):r.name==="inlineKatex"?hP(e==null?void 0:e.inlineKatex):jf(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:Vy(zy({},r),{handle:a=>Xy(a,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},gP=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=mP(t),a=((n=t==null?void 0:t.handlers)!=null?n:[]).map(l=>{var c;return{handler:Vy(zy({},l),{priority:(c=l.priority)!=null?c:Zt.DEFAULT}),earlyReturn:void 0}}),u=[...i,...a].sort((l,c)=>{var f,m;return((f=l.handler.priority)!=null?f:0)-((m=c.handler.priority)!=null?m:0)});for(let{handler:l,earlyReturn:c}of u)if(r=l.handle(r),c!=null&&c(r))return r;return r},EP=gP;function Zy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Zy(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Jy(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Zy(e))&&(r&&(r+=" "),r+=t);return r}const _P=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},bP=(e,t)=>({classGroupId:e,validator:t}),ex=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ml="-",IE=[],yP="arbitrary..",xP=e=>{const t=kP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return TP(u);const l=u.split(Ml),c=l[0]===""&&l.length>1?1:0;return tx(l,c,t)},getConflictingClassGroupIds:(u,l)=>{if(l){const c=r[u],f=n[u];return c?f?_P(f,c):c:f||IE}return n[u]||IE}}},tx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],a=n.nextPart.get(i);if(a){const f=tx(e,t+1,a);if(f)return f}const u=n.validators;if(u===null)return;const l=t===0?e.join(Ml):e.slice(t).join(Ml),c=u.length;for(let f=0;f<c;f++){const m=u[f];if(m.validator(l))return m.classGroupId}},TP=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?yP+r:void 0})(),kP=e=>{const{theme:t,classGroups:n}=e;return wP(n,t)},wP=(e,t)=>{const n=ex();for(const r in e){const i=e[r];vp(i,n,r,t)}return n},vp=(e,t,n,r)=>{const i=e.length;for(let a=0;a<i;a++){const u=e[a];CP(u,t,n,r)}},CP=(e,t,n,r)=>{if(typeof e=="string"){vP(e,t,n);return}if(typeof e=="function"){SP(e,t,n,r);return}AP(e,t,n,r)},vP=(e,t,n)=>{const r=e===""?t:nx(t,e);r.classGroupId=n},SP=(e,t,n,r)=>{if(IP(e)){vp(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bP(n,e))},AP=(e,t,n,r)=>{const i=Object.entries(e),a=i.length;for(let u=0;u<a;u++){const[l,c]=i[u];vp(c,nx(t,l),n,r)}},nx=(e,t)=>{let n=e;const r=t.split(Ml),i=r.length;for(let a=0;a<i;a++){const u=r[a];let l=n.nextPart.get(u);l||(l=ex(),n.nextPart.set(u,l)),n=l}return n},IP=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,NP=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(a,u)=>{n[a]=u,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(a){let u=n[a];if(u!==void 0)return u;if((u=r[a])!==void 0)return i(a,u),u},set(a,u){a in n?n[a]=u:i(a,u)}}},kh="!",NE=":",LP=[],LE=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),RP=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let u=0,l=0,c=0,f;const m=i.length;for(let C=0;C<m;C++){const k=i[C];if(u===0&&l===0){if(k===NE){a.push(i.slice(c,C)),c=C+1;continue}if(k==="/"){f=C;continue}}k==="["?u++:k==="]"?u--:k==="("?l++:k===")"&&l--}const h=a.length===0?i:i.slice(c);let _=h,g=!1;h.endsWith(kh)?(_=h.slice(0,-1),g=!0):h.startsWith(kh)&&(_=h.slice(1),g=!0);const y=f&&f>c?f-c:void 0;return LE(a,g,_,y)};if(t){const i=t+NE,a=r;r=u=>u.startsWith(i)?a(u.slice(i.length)):LE(LP,!1,u,void 0,!0)}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},OP=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let a=0;a<n.length;a++){const u=n[a],l=u[0]==="[",c=t.has(u);l||c?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(u)):i.push(u)}return i.length>0&&(i.sort(),r.push(...i)),r}},PP=e=>({cache:NP(e.cacheSize),parseClassName:RP(e),sortModifiers:OP(e),...xP(e)}),DP=/\s+/,MP=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,u=[],l=e.trim().split(DP);let c="";for(let f=l.length-1;f>=0;f-=1){const m=l[f],{isExternal:h,modifiers:_,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:C}=n(m);if(h){c=m+(c.length>0?" "+c:c);continue}let k=!!C,w=r(k?y.substring(0,C):y);if(!w){if(!k){c=m+(c.length>0?" "+c:c);continue}if(w=r(y),!w){c=m+(c.length>0?" "+c:c);continue}k=!1}const D=_.length===0?"":_.length===1?_[0]:a(_).join(":"),N=g?D+kh:D,U=N+w;if(u.indexOf(U)>-1)continue;u.push(U);const z=i(w,k);for(let B=0;B<z.length;++B){const X=z[B];u.push(N+X)}c=m+(c.length>0?" "+c:c)}return c},BP=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=rx(n))&&(i&&(i+=" "),i+=r);return i},rx=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=rx(e[r]))&&(n&&(n+=" "),n+=t);return n},FP=(e,...t)=>{let n,r,i,a;const u=c=>{const f=t.reduce((m,h)=>h(m),e());return n=PP(f),r=n.cache.get,i=n.cache.set,a=l,l(c)},l=c=>{const f=r(c);if(f)return f;const m=MP(c,n);return i(c,m),m};return a=u,(...c)=>a(BP(...c))},jP=[],kt=e=>{const t=n=>n[e]||jP;return t.isThemeGetter=!0,t},ix=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HP=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,UP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$P=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,VP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ni=e=>HP.test(e),He=e=>!!e&&!Number.isNaN(Number(e)),ri=e=>!!e&&Number.isInteger(Number(e)),Hf=e=>e.endsWith("%")&&He(e.slice(0,-1)),wr=e=>UP.test(e),ax=()=>!0,WP=e=>$P.test(e)&&!zP.test(e),Sp=()=>!1,qP=e=>VP.test(e),YP=e=>GP.test(e),QP=e=>!Te(e)&&!ke(e),KP=e=>Ei(e,lx,Sp),Te=e=>ix.test(e),Di=e=>Ei(e,cx,WP),RE=e=>Ei(e,i4,He),XP=e=>Ei(e,fx,ax),ZP=e=>Ei(e,dx,Sp),OE=e=>Ei(e,ox,Sp),JP=e=>Ei(e,ux,YP),il=e=>Ei(e,hx,qP),ke=e=>sx.test(e),Ga=e=>ts(e,cx),e4=e=>ts(e,dx),PE=e=>ts(e,ox),t4=e=>ts(e,lx),n4=e=>ts(e,ux),sl=e=>ts(e,hx,!0),r4=e=>ts(e,fx,!0),Ei=(e,t,n)=>{const r=ix.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ts=(e,t,n=!1)=>{const r=sx.exec(e);return r?r[1]?t(r[1]):n:!1},ox=e=>e==="position"||e==="percentage",ux=e=>e==="image"||e==="url",lx=e=>e==="length"||e==="size"||e==="bg-size",cx=e=>e==="length",i4=e=>e==="number",dx=e=>e==="family-name",fx=e=>e==="number"||e==="weight",hx=e=>e==="shadow",s4=()=>{const e=kt("color"),t=kt("font"),n=kt("text"),r=kt("font-weight"),i=kt("tracking"),a=kt("leading"),u=kt("breakpoint"),l=kt("container"),c=kt("spacing"),f=kt("radius"),m=kt("shadow"),h=kt("inset-shadow"),_=kt("text-shadow"),g=kt("drop-shadow"),y=kt("blur"),C=kt("perspective"),k=kt("aspect"),w=kt("ease"),D=kt("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],z=()=>[...U(),ke,Te],B=()=>["auto","hidden","clip","visible","scroll"],X=()=>["auto","contain","none"],Q=()=>[ke,Te,c],ne=()=>[ni,"full","auto",...Q()],$=()=>[ri,"none","subgrid",ke,Te],oe=()=>["auto",{span:["full",ri,ke,Te]},ri,ke,Te],ue=()=>[ri,"auto",ke,Te],ve=()=>["auto","min","max","fr",ke,Te],he=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],ee=()=>["auto",...Q()],me=()=>[ni,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Q()],re=()=>[ni,"screen","full","dvw","lvw","svw","min","max","fit",...Q()],ge=()=>[ni,"screen","full","lh","dvh","lvh","svh","min","max","fit",...Q()],S=()=>[e,ke,Te],H=()=>[...U(),PE,OE,{position:[ke,Te]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",t4,KP,{size:[ke,Te]}],Ae=()=>[Hf,Ga,Di],be=()=>["","none","full",f,ke,Te],_e=()=>["",He,Ga,Di],Fe=()=>["solid","dashed","dotted","double"],De=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ie=()=>[He,Hf,PE,OE],tt=()=>["","none",y,ke,Te],jt=()=>["none",He,ke,Te],Tn=()=>["none",He,ke,Te],hn=()=>[He,ke,Te],pn=()=>[ni,"full",...Q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wr],breakpoint:[wr],color:[ax],container:[wr],"drop-shadow":[wr],ease:["in","out","in-out"],font:[QP],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wr],shadow:[wr],spacing:["px",He],text:[wr],"text-shadow":[wr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ni,Te,ke,k]}],container:["container"],columns:[{columns:[He,Te,ke,l]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:z()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:X()}],"overscroll-x":[{"overscroll-x":X()}],"overscroll-y":[{"overscroll-y":X()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{"inset-s":ne(),start:ne()}],end:[{"inset-e":ne(),end:ne()}],"inset-bs":[{"inset-bs":ne()}],"inset-be":[{"inset-be":ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:["visible","invisible","collapse"],z:[{z:[ri,"auto",ke,Te]}],basis:[{basis:[ni,"full","auto",l,...Q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,ni,"auto","initial","none",Te]}],grow:[{grow:["",He,ke,Te]}],shrink:[{shrink:["",He,ke,Te]}],order:[{order:[ri,"first","last","none",ke,Te]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ve()}],"auto-rows":[{"auto-rows":ve()}],gap:[{gap:Q()}],"gap-x":[{"gap-x":Q()}],"gap-y":[{"gap-y":Q()}],"justify-content":[{justify:[...he(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...he()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":he()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:Q()}],px:[{px:Q()}],py:[{py:Q()}],ps:[{ps:Q()}],pe:[{pe:Q()}],pbs:[{pbs:Q()}],pbe:[{pbe:Q()}],pt:[{pt:Q()}],pr:[{pr:Q()}],pb:[{pb:Q()}],pl:[{pl:Q()}],m:[{m:ee()}],mx:[{mx:ee()}],my:[{my:ee()}],ms:[{ms:ee()}],me:[{me:ee()}],mbs:[{mbs:ee()}],mbe:[{mbe:ee()}],mt:[{mt:ee()}],mr:[{mr:ee()}],mb:[{mb:ee()}],ml:[{ml:ee()}],"space-x":[{"space-x":Q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Q()}],"space-y-reverse":["space-y-reverse"],size:[{size:me()}],"inline-size":[{inline:["auto",...re()]}],"min-inline-size":[{"min-inline":["auto",...re()]}],"max-inline-size":[{"max-inline":["none",...re()]}],"block-size":[{block:["auto",...ge()]}],"min-block-size":[{"min-block":["auto",...ge()]}],"max-block-size":[{"max-block":["none",...ge()]}],w:[{w:[l,"screen",...me()]}],"min-w":[{"min-w":[l,"screen","none",...me()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[u]},...me()]}],h:[{h:["screen","lh",...me()]}],"min-h":[{"min-h":["screen","lh","none",...me()]}],"max-h":[{"max-h":["screen","lh",...me()]}],"font-size":[{text:["base",n,Ga,Di]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,r4,XP]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hf,Te]}],"font-family":[{font:[e4,ZP,t]}],"font-features":[{"font-features":[Te]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ke,Te]}],"line-clamp":[{"line-clamp":[He,"none",ke,RE]}],leading:[{leading:[a,...Q()]}],"list-image":[{"list-image":["none",ke,Te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,Te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:S()}],"text-color":[{text:S()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",ke,Di]}],"text-decoration-color":[{decoration:S()}],"underline-offset":[{"underline-offset":[He,"auto",ke,Te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,Te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke,Te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ri,ke,Te],radial:["",ke,Te],conic:[ri,ke,Te]},n4,JP]}],"bg-color":[{bg:S()}],"gradient-from-pos":[{from:Ae()}],"gradient-via-pos":[{via:Ae()}],"gradient-to-pos":[{to:Ae()}],"gradient-from":[{from:S()}],"gradient-via":[{via:S()}],"gradient-to":[{to:S()}],rounded:[{rounded:be()}],"rounded-s":[{"rounded-s":be()}],"rounded-e":[{"rounded-e":be()}],"rounded-t":[{"rounded-t":be()}],"rounded-r":[{"rounded-r":be()}],"rounded-b":[{"rounded-b":be()}],"rounded-l":[{"rounded-l":be()}],"rounded-ss":[{"rounded-ss":be()}],"rounded-se":[{"rounded-se":be()}],"rounded-ee":[{"rounded-ee":be()}],"rounded-es":[{"rounded-es":be()}],"rounded-tl":[{"rounded-tl":be()}],"rounded-tr":[{"rounded-tr":be()}],"rounded-br":[{"rounded-br":be()}],"rounded-bl":[{"rounded-bl":be()}],"border-w":[{border:_e()}],"border-w-x":[{"border-x":_e()}],"border-w-y":[{"border-y":_e()}],"border-w-s":[{"border-s":_e()}],"border-w-e":[{"border-e":_e()}],"border-w-bs":[{"border-bs":_e()}],"border-w-be":[{"border-be":_e()}],"border-w-t":[{"border-t":_e()}],"border-w-r":[{"border-r":_e()}],"border-w-b":[{"border-b":_e()}],"border-w-l":[{"border-l":_e()}],"divide-x":[{"divide-x":_e()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":_e()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Fe(),"hidden","none"]}],"divide-style":[{divide:[...Fe(),"hidden","none"]}],"border-color":[{border:S()}],"border-color-x":[{"border-x":S()}],"border-color-y":[{"border-y":S()}],"border-color-s":[{"border-s":S()}],"border-color-e":[{"border-e":S()}],"border-color-bs":[{"border-bs":S()}],"border-color-be":[{"border-be":S()}],"border-color-t":[{"border-t":S()}],"border-color-r":[{"border-r":S()}],"border-color-b":[{"border-b":S()}],"border-color-l":[{"border-l":S()}],"divide-color":[{divide:S()}],"outline-style":[{outline:[...Fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,ke,Te]}],"outline-w":[{outline:["",He,Ga,Di]}],"outline-color":[{outline:S()}],shadow:[{shadow:["","none",m,sl,il]}],"shadow-color":[{shadow:S()}],"inset-shadow":[{"inset-shadow":["none",h,sl,il]}],"inset-shadow-color":[{"inset-shadow":S()}],"ring-w":[{ring:_e()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:S()}],"ring-offset-w":[{"ring-offset":[He,Di]}],"ring-offset-color":[{"ring-offset":S()}],"inset-ring-w":[{"inset-ring":_e()}],"inset-ring-color":[{"inset-ring":S()}],"text-shadow":[{"text-shadow":["none",_,sl,il]}],"text-shadow-color":[{"text-shadow":S()}],opacity:[{opacity:[He,ke,Te]}],"mix-blend":[{"mix-blend":[...De(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":De()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[He]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ie()}],"mask-image-linear-from-color":[{"mask-linear-from":S()}],"mask-image-linear-to-color":[{"mask-linear-to":S()}],"mask-image-t-from-pos":[{"mask-t-from":Ie()}],"mask-image-t-to-pos":[{"mask-t-to":Ie()}],"mask-image-t-from-color":[{"mask-t-from":S()}],"mask-image-t-to-color":[{"mask-t-to":S()}],"mask-image-r-from-pos":[{"mask-r-from":Ie()}],"mask-image-r-to-pos":[{"mask-r-to":Ie()}],"mask-image-r-from-color":[{"mask-r-from":S()}],"mask-image-r-to-color":[{"mask-r-to":S()}],"mask-image-b-from-pos":[{"mask-b-from":Ie()}],"mask-image-b-to-pos":[{"mask-b-to":Ie()}],"mask-image-b-from-color":[{"mask-b-from":S()}],"mask-image-b-to-color":[{"mask-b-to":S()}],"mask-image-l-from-pos":[{"mask-l-from":Ie()}],"mask-image-l-to-pos":[{"mask-l-to":Ie()}],"mask-image-l-from-color":[{"mask-l-from":S()}],"mask-image-l-to-color":[{"mask-l-to":S()}],"mask-image-x-from-pos":[{"mask-x-from":Ie()}],"mask-image-x-to-pos":[{"mask-x-to":Ie()}],"mask-image-x-from-color":[{"mask-x-from":S()}],"mask-image-x-to-color":[{"mask-x-to":S()}],"mask-image-y-from-pos":[{"mask-y-from":Ie()}],"mask-image-y-to-pos":[{"mask-y-to":Ie()}],"mask-image-y-from-color":[{"mask-y-from":S()}],"mask-image-y-to-color":[{"mask-y-to":S()}],"mask-image-radial":[{"mask-radial":[ke,Te]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ie()}],"mask-image-radial-from-color":[{"mask-radial-from":S()}],"mask-image-radial-to-color":[{"mask-radial-to":S()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":U()}],"mask-image-conic-pos":[{"mask-conic":[He]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ie()}],"mask-image-conic-from-color":[{"mask-conic-from":S()}],"mask-image-conic-to-color":[{"mask-conic-to":S()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,Te]}],filter:[{filter:["","none",ke,Te]}],blur:[{blur:tt()}],brightness:[{brightness:[He,ke,Te]}],contrast:[{contrast:[He,ke,Te]}],"drop-shadow":[{"drop-shadow":["","none",g,sl,il]}],"drop-shadow-color":[{"drop-shadow":S()}],grayscale:[{grayscale:["",He,ke,Te]}],"hue-rotate":[{"hue-rotate":[He,ke,Te]}],invert:[{invert:["",He,ke,Te]}],saturate:[{saturate:[He,ke,Te]}],sepia:[{sepia:["",He,ke,Te]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,Te]}],"backdrop-blur":[{"backdrop-blur":tt()}],"backdrop-brightness":[{"backdrop-brightness":[He,ke,Te]}],"backdrop-contrast":[{"backdrop-contrast":[He,ke,Te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,ke,Te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,ke,Te]}],"backdrop-invert":[{"backdrop-invert":["",He,ke,Te]}],"backdrop-opacity":[{"backdrop-opacity":[He,ke,Te]}],"backdrop-saturate":[{"backdrop-saturate":[He,ke,Te]}],"backdrop-sepia":[{"backdrop-sepia":["",He,ke,Te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Q()}],"border-spacing-x":[{"border-spacing-x":Q()}],"border-spacing-y":[{"border-spacing-y":Q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,Te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",ke,Te]}],ease:[{ease:["linear","initial",w,ke,Te]}],delay:[{delay:[He,ke,Te]}],animate:[{animate:["none",D,ke,Te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ke,Te]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:jt()}],"rotate-x":[{"rotate-x":jt()}],"rotate-y":[{"rotate-y":jt()}],"rotate-z":[{"rotate-z":jt()}],scale:[{scale:Tn()}],"scale-x":[{"scale-x":Tn()}],"scale-y":[{"scale-y":Tn()}],"scale-z":[{"scale-z":Tn()}],"scale-3d":["scale-3d"],skew:[{skew:hn()}],"skew-x":[{"skew-x":hn()}],"skew-y":[{"skew-y":hn()}],transform:[{transform:[ke,Te,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pn()}],"translate-x":[{"translate-x":pn()}],"translate-y":[{"translate-y":pn()}],"translate-z":[{"translate-z":pn()}],"translate-none":["translate-none"],accent:[{accent:S()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:S()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke,Te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q()}],"scroll-mx":[{"scroll-mx":Q()}],"scroll-my":[{"scroll-my":Q()}],"scroll-ms":[{"scroll-ms":Q()}],"scroll-me":[{"scroll-me":Q()}],"scroll-mbs":[{"scroll-mbs":Q()}],"scroll-mbe":[{"scroll-mbe":Q()}],"scroll-mt":[{"scroll-mt":Q()}],"scroll-mr":[{"scroll-mr":Q()}],"scroll-mb":[{"scroll-mb":Q()}],"scroll-ml":[{"scroll-ml":Q()}],"scroll-p":[{"scroll-p":Q()}],"scroll-px":[{"scroll-px":Q()}],"scroll-py":[{"scroll-py":Q()}],"scroll-ps":[{"scroll-ps":Q()}],"scroll-pe":[{"scroll-pe":Q()}],"scroll-pbs":[{"scroll-pbs":Q()}],"scroll-pbe":[{"scroll-pbe":Q()}],"scroll-pt":[{"scroll-pt":Q()}],"scroll-pr":[{"scroll-pr":Q()}],"scroll-pb":[{"scroll-pb":Q()}],"scroll-pl":[{"scroll-pl":Q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke,Te]}],fill:[{fill:["none",...S()]}],"stroke-w":[{stroke:[He,Ga,Di,RE]}],stroke:[{stroke:["none",...S()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},px=FP(s4);var Ap=$_();const zF=Ao(Ap);function Ip(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ns=Ip();function mx(e){ns=e}var Fi={exec:()=>null};function qe(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,a)=>{let u=typeof a=="string"?a:a.source;return u=u.replace(en.caret,"$1"),n=n.replace(i,u),r},getRegex:()=>new RegExp(n,t)};return r}var a4=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),en={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},o4=/^(?:[ \t]*(?:\n|$))+/,u4=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,l4=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Bo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c4=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Np=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,gx=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ex=qe(gx).replace(/bull/g,Np).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),d4=qe(gx).replace(/bull/g,Np).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Lp=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,f4=/^[^\n]+/,Rp=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,h4=qe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Rp).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p4=qe(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Np).getRegex(),cc="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Op=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,m4=qe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Op).replace("tag",cc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_x=qe(Lp).replace("hr",Bo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",cc).getRegex(),g4=qe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_x).getRegex(),Pp={blockquote:g4,code:u4,def:h4,fences:l4,heading:c4,hr:Bo,html:m4,lheading:Ex,list:p4,newline:o4,paragraph:_x,table:Fi,text:f4},DE=qe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Bo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",cc).getRegex(),E4={...Pp,lheading:d4,table:DE,paragraph:qe(Lp).replace("hr",Bo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",DE).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",cc).getRegex()},_4={...Pp,html:qe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Op).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Fi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:qe(Lp).replace("hr",Bo).replace("heading",` *#{1,6} *[^
|
|
200
|
+
]`).replace("lheading",Ex).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},b4=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,y4=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,bx=/^( {2,}|\\)\n(?!\s*$)/,x4=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Xs=/[\p{P}\p{S}]/u,dc=/[\s\p{P}\p{S}]/u,Dp=/[^\s\p{P}\p{S}]/u,T4=qe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,dc).getRegex(),yx=/(?!~)[\p{P}\p{S}]/u,k4=/(?!~)[\s\p{P}\p{S}]/u,w4=/(?:[^\s\p{P}\p{S}]|~)/u,C4=qe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",a4?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),xx=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,v4=qe(xx,"u").replace(/punct/g,Xs).getRegex(),S4=qe(xx,"u").replace(/punct/g,yx).getRegex(),Tx="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",A4=qe(Tx,"gu").replace(/notPunctSpace/g,Dp).replace(/punctSpace/g,dc).replace(/punct/g,Xs).getRegex(),I4=qe(Tx,"gu").replace(/notPunctSpace/g,w4).replace(/punctSpace/g,k4).replace(/punct/g,yx).getRegex(),N4=qe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Dp).replace(/punctSpace/g,dc).replace(/punct/g,Xs).getRegex(),L4=qe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Xs).getRegex(),R4="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",O4=qe(R4,"gu").replace(/notPunctSpace/g,Dp).replace(/punctSpace/g,dc).replace(/punct/g,Xs).getRegex(),P4=qe(/\\(punct)/,"gu").replace(/punct/g,Xs).getRegex(),D4=qe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),M4=qe(Op).replace("(?:-->|$)","-->").getRegex(),B4=qe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",M4).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bl=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,F4=qe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Bl).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),kx=qe(/^!?\[(label)\]\[(ref)\]/).replace("label",Bl).replace("ref",Rp).getRegex(),wx=qe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Rp).getRegex(),j4=qe("reflink|nolink(?!\\()","g").replace("reflink",kx).replace("nolink",wx).getRegex(),ME=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Mp={_backpedal:Fi,anyPunctuation:P4,autolink:D4,blockSkip:C4,br:bx,code:y4,del:Fi,delLDelim:Fi,delRDelim:Fi,emStrongLDelim:v4,emStrongRDelimAst:A4,emStrongRDelimUnd:N4,escape:b4,link:F4,nolink:wx,punctuation:T4,reflink:kx,reflinkSearch:j4,tag:B4,text:x4,url:Fi},H4={...Mp,link:qe(/^!?\[(label)\]\((.*?)\)/).replace("label",Bl).getRegex(),reflink:qe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Bl).getRegex()},wh={...Mp,emStrongRDelimAst:I4,emStrongLDelim:S4,delLDelim:L4,delRDelim:O4,url:qe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ME).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:qe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ME).getRegex()},U4={...wh,br:qe(bx).replace("{2,}","*").getRegex(),text:qe(wh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},al={normal:Pp,gfm:E4,pedantic:_4},Wa={normal:Mp,gfm:wh,breaks:U4,pedantic:H4},$4={"&":"&","<":"<",">":">",'"':""","'":"'"},BE=e=>$4[e];function sr(e,t){if(t){if(en.escapeTest.test(e))return e.replace(en.escapeReplace,BE)}else if(en.escapeTestNoEncode.test(e))return e.replace(en.escapeReplaceNoEncode,BE);return e}function FE(e){try{e=encodeURI(e).replace(en.percentDecode,"%")}catch{return null}return e}function jE(e,t){var a;let n=e.replace(en.findPipe,(u,l,c)=>{let f=!1,m=l;for(;--m>=0&&c[m]==="\\";)f=!f;return f?"|":" |"}),r=n.split(en.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((a=r.at(-1))!=null&&a.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(en.slashPipe,"|");return r}function qa(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function z4(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function V4(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let a=4-n%4;r+=" ".repeat(a),n+=a}else r+=i,n++;return r}function HE(e,t,n,r,i){let a=t.href,u=t.title||null,l=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:u,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,c}function G4(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
201
|
+
`).map(a=>{let u=a.match(n.other.beginningSpace);if(u===null)return a;let[l]=u;return l.length>=i.length?a.slice(i.length):a}).join(`
|
|
202
|
+
`)}var Fl=class{constructor(t){Y(this,"options");Y(this,"rules");Y(this,"lexer");this.options=t||ns}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:qa(r,`
|
|
203
|
+
`)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],i=G4(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let i=qa(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:qa(n[0],`
|
|
204
|
+
`)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=qa(n[0],`
|
|
205
|
+
`).split(`
|
|
206
|
+
`),i="",a="",u=[];for(;r.length>0;){let l=!1,c=[],f;for(f=0;f<r.length;f++)if(this.rules.other.blockquoteStart.test(r[f]))c.push(r[f]),l=!0;else if(!l)c.push(r[f]);else break;r=r.slice(f);let m=c.join(`
|
|
207
|
+
`),h=m.replace(this.rules.other.blockquoteSetextReplace,`
|
|
208
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
209
|
+
${m}`:m,a=a?`${a}
|
|
210
|
+
${h}`:h;let _=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,u,!0),this.lexer.state.top=_,r.length===0)break;let g=u.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let y=g,C=y.raw+`
|
|
211
|
+
`+r.join(`
|
|
212
|
+
`),k=this.blockquote(C);u[u.length-1]=k,i=i.substring(0,i.length-y.raw.length)+k.raw,a=a.substring(0,a.length-y.text.length)+k.text;break}else if((g==null?void 0:g.type)==="list"){let y=g,C=y.raw+`
|
|
213
|
+
`+r.join(`
|
|
214
|
+
`),k=this.list(C);u[u.length-1]=k,i=i.substring(0,i.length-g.raw.length)+k.raw,a=a.substring(0,a.length-y.raw.length)+k.raw,r=C.substring(u.at(-1).raw.length).split(`
|
|
215
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:u,text:a}}}list(t){var r,i;let n=this.rules.block.list.exec(t);if(n){let a=n[1].trim(),u=a.length>1,l={type:"list",raw:"",ordered:u,start:u?+a.slice(0,-1):"",loose:!1,items:[]};a=u?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=u?a:"[*+-]");let c=this.rules.other.listItemRegex(a),f=!1;for(;t;){let h=!1,_="",g="";if(!(n=c.exec(t))||this.rules.block.hr.test(t))break;_=n[0],t=t.substring(_.length);let y=V4(n[2].split(`
|
|
216
|
+
`,1)[0],n[1].length),C=t.split(`
|
|
217
|
+
`,1)[0],k=!y.trim(),w=0;if(this.options.pedantic?(w=2,g=y.trimStart()):k?w=n[1].length+1:(w=y.search(this.rules.other.nonSpaceChar),w=w>4?1:w,g=y.slice(w),w+=n[1].length),k&&this.rules.other.blankLine.test(C)&&(_+=C+`
|
|
218
|
+
`,t=t.substring(C.length+1),h=!0),!h){let D=this.rules.other.nextBulletRegex(w),N=this.rules.other.hrRegex(w),U=this.rules.other.fencesBeginRegex(w),z=this.rules.other.headingBeginRegex(w),B=this.rules.other.htmlBeginRegex(w),X=this.rules.other.blockquoteBeginRegex(w);for(;t;){let Q=t.split(`
|
|
219
|
+
`,1)[0],ne;if(C=Q,this.options.pedantic?(C=C.replace(this.rules.other.listReplaceNesting," "),ne=C):ne=C.replace(this.rules.other.tabCharGlobal," "),U.test(C)||z.test(C)||B.test(C)||X.test(C)||D.test(C)||N.test(C))break;if(ne.search(this.rules.other.nonSpaceChar)>=w||!C.trim())g+=`
|
|
220
|
+
`+ne.slice(w);else{if(k||y.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||U.test(y)||z.test(y)||N.test(y))break;g+=`
|
|
221
|
+
`+C}k=!C.trim(),_+=Q+`
|
|
222
|
+
`,t=t.substring(Q.length+1),y=ne.slice(w)}}l.loose||(f?l.loose=!0:this.rules.other.doubleBlankLine.test(_)&&(f=!0)),l.items.push({type:"list_item",raw:_,task:!!this.options.gfm&&this.rules.other.listIsTask.test(g),loose:!1,text:g,tokens:[]}),l.raw+=_}let m=l.items.at(-1);if(m)m.raw=m.raw.trimEnd(),m.text=m.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let h of l.items){if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),h.task){if(h.text=h.text.replace(this.rules.other.listReplaceTask,""),((r=h.tokens[0])==null?void 0:r.type)==="text"||((i=h.tokens[0])==null?void 0:i.type)==="paragraph"){h.tokens[0].raw=h.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),h.tokens[0].text=h.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}}let _=this.rules.other.listTaskCheckbox.exec(h.raw);if(_){let g={type:"checkbox",raw:_[0]+" ",checked:_[0]!=="[ ]"};h.checked=g.checked,l.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=g.raw+h.tokens[0].raw,h.tokens[0].text=g.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(g)):h.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):h.tokens.unshift(g)}}if(!l.loose){let _=h.tokens.filter(y=>y.type==="space"),g=_.length>0&&_.some(y=>this.rules.other.anyLine.test(y.raw));l.loose=g}}if(l.loose)for(let h of l.items){h.loose=!0;for(let _ of h.tokens)_.type==="text"&&(_.type="paragraph")}return l}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:a}}}table(t){var l;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=jE(n[1]),i=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(l=n[3])!=null&&l.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
223
|
+
`):[],u={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let c of i)this.rules.other.tableAlignRight.test(c)?u.align.push("right"):this.rules.other.tableAlignCenter.test(c)?u.align.push("center"):this.rules.other.tableAlignLeft.test(c)?u.align.push("left"):u.align.push(null);for(let c=0;c<r.length;c++)u.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:u.align[c]});for(let c of a)u.rows.push(jE(c,u.header.length).map((f,m)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:u.align[m]})));return u}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n){let r=n[1].trim();return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let r=n[1].charAt(n[1].length-1)===`
|
|
224
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let u=qa(r.slice(0,-1),"\\");if((r.length-u.length)%2===0)return}else{let u=z4(n[2],"()");if(u===-2)return;if(u>-1){let l=(n[0].indexOf("!")===0?5:4)+n[1].length+u;n[2]=n[2].substring(0,u),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let i=n[2],a="";if(this.options.pedantic){let u=this.rules.other.pedanticHrefTitle.exec(i);u&&(i=u[1],a=u[3])}else a=n[3]?n[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),HE(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=n[i.toLowerCase()];if(!a){let u=r[0].charAt(0);return{type:"text",raw:u,text:u}}return HE(r,a,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!r||this.rules.inline.punctuation.exec(r))){let a=[...i[0]].length-1,u,l,c=a,f=0,m=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,n=n.slice(-1*t.length+a);(i=m.exec(n))!==null;){if(u=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!u)continue;if(l=[...u].length,i[3]||i[4]){c+=l;continue}else if((i[5]||i[6])&&a%3&&!((a+l)%3)){f+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+f);let h=[...i[0]][0].length,_=t.slice(0,a+i.index+h+l);if(Math.min(a,l)%2){let y=_.slice(1,-1);return{type:"em",raw:_,text:y,tokens:this.lexer.inlineTokens(y)}}let g=_.slice(2,-2);return{type:"strong",raw:_,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),a=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&a&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t,n,r=""){let i=this.rules.inline.delLDelim.exec(t);if(i&&(!i[1]||!r||this.rules.inline.punctuation.exec(r))){let a=[...i[0]].length-1,u,l,c=a,f=this.rules.inline.delRDelim;for(f.lastIndex=0,n=n.slice(-1*t.length+a);(i=f.exec(n))!==null;){if(u=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!u||(l=[...u].length,l!==a))continue;if(i[3]||i[4]){c+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c);let m=[...i[0]][0].length,h=t.slice(0,a+i.index+m+l),_=h.slice(a,-a);return{type:"del",raw:h,text:_,tokens:this.lexer.inlineTokens(_)}}}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,i;return n[2]==="@"?(r=n[1],i="mailto:"+r):(r=n[1],i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let n;if(n=this.rules.inline.url.exec(t)){let i,a;if(n[2]==="@")i=n[0],a="mailto:"+i;else{let u;do u=n[0],n[0]=((r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])??"";while(u!==n[0]);i=n[0],n[1]==="www."?a="http://"+n[0]:a=n[0]}return{type:"link",raw:n[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},On=class Ch{constructor(t){Y(this,"tokens");Y(this,"options");Y(this,"state");Y(this,"inlineQueue");Y(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ns,this.options.tokenizer=this.options.tokenizer||new Fl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:en,block:al.normal,inline:Wa.normal};this.options.pedantic?(n.block=al.pedantic,n.inline=Wa.pedantic):this.options.gfm&&(n.block=al.gfm,this.options.breaks?n.inline=Wa.breaks:n.inline=Wa.gfm),this.tokenizer.rules=n}static get rules(){return{block:al,inline:Wa}}static lex(t,n){return new Ch(n).lex(t)}static lexInline(t,n){return new Ch(n).inlineTokens(t)}lex(t){t=t.replace(en.carriageReturn,`
|
|
225
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var i,a,u;for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(en.tabCharGlobal," ").replace(en.spaceLine,""));t;){let l;if((a=(i=this.options.extensions)==null?void 0:i.block)!=null&&a.some(f=>(l=f.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let f=n.at(-1);l.raw.length===1&&f!==void 0?f.raw+=`
|
|
226
|
+
`:n.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let f=n.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
|
|
227
|
+
`)?"":`
|
|
228
|
+
`)+l.raw,f.text+=`
|
|
229
|
+
`+l.text,this.inlineQueue.at(-1).src=f.text):n.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let f=n.at(-1);(f==null?void 0:f.type)==="paragraph"||(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
|
|
230
|
+
`)?"":`
|
|
231
|
+
`)+l.raw,f.text+=`
|
|
232
|
+
`+l.raw,this.inlineQueue.at(-1).src=f.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},n.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),n.push(l);continue}let c=t;if((u=this.options.extensions)!=null&&u.startBlock){let f=1/0,m=t.slice(1),h;this.options.extensions.startBlock.forEach(_=>{h=_.call({lexer:this},m),typeof h=="number"&&h>=0&&(f=Math.min(f,h))}),f<1/0&&f>=0&&(c=t.substring(0,f+1))}if(this.state.top&&(l=this.tokenizer.paragraph(c))){let f=n.at(-1);r&&(f==null?void 0:f.type)==="paragraph"?(f.raw+=(f.raw.endsWith(`
|
|
233
|
+
`)?"":`
|
|
234
|
+
`)+l.raw,f.text+=`
|
|
235
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):n.push(l),r=c.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let f=n.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=(f.raw.endsWith(`
|
|
236
|
+
`)?"":`
|
|
237
|
+
`)+l.raw,f.text+=`
|
|
238
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=f.text):n.push(l);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var c,f,m,h,_;this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)g.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)a=i[2]?i[2].length:0,r=r.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((f=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:f.call({lexer:this},r))??r;let u=!1,l="";for(;t;){u||(l=""),u=!1;let g;if((h=(m=this.options.extensions)==null?void 0:m.inline)!=null&&h.some(C=>(g=C.call({lexer:this},t,n))?(t=t.substring(g.raw.length),n.push(g),!0):!1))continue;if(g=this.tokenizer.escape(t)){t=t.substring(g.raw.length),n.push(g);continue}if(g=this.tokenizer.tag(t)){t=t.substring(g.raw.length),n.push(g);continue}if(g=this.tokenizer.link(t)){t=t.substring(g.raw.length),n.push(g);continue}if(g=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(g.raw.length);let C=n.at(-1);g.type==="text"&&(C==null?void 0:C.type)==="text"?(C.raw+=g.raw,C.text+=g.text):n.push(g);continue}if(g=this.tokenizer.emStrong(t,r,l)){t=t.substring(g.raw.length),n.push(g);continue}if(g=this.tokenizer.codespan(t)){t=t.substring(g.raw.length),n.push(g);continue}if(g=this.tokenizer.br(t)){t=t.substring(g.raw.length),n.push(g);continue}if(g=this.tokenizer.del(t,r,l)){t=t.substring(g.raw.length),n.push(g);continue}if(g=this.tokenizer.autolink(t)){t=t.substring(g.raw.length),n.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(t))){t=t.substring(g.raw.length),n.push(g);continue}let y=t;if((_=this.options.extensions)!=null&&_.startInline){let C=1/0,k=t.slice(1),w;this.options.extensions.startInline.forEach(D=>{w=D.call({lexer:this},k),typeof w=="number"&&w>=0&&(C=Math.min(C,w))}),C<1/0&&C>=0&&(y=t.substring(0,C+1))}if(g=this.tokenizer.inlineText(y)){t=t.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(l=g.raw.slice(-1)),u=!0;let C=n.at(-1);(C==null?void 0:C.type)==="text"?(C.raw+=g.raw,C.text+=g.text):n.push(g);continue}if(t){let C="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(C);break}else throw new Error(C)}}return n}},jl=class{constructor(t){Y(this,"options");Y(this,"parser");this.options=t||ns}space(t){return""}code({text:t,lang:n,escaped:r}){var u;let i=(u=(n||"").match(en.notSpaceStart))==null?void 0:u[0],a=t.replace(en.endingNewline,"")+`
|
|
239
|
+
`;return i?'<pre><code class="language-'+sr(i)+'">'+(r?a:sr(a,!0))+`</code></pre>
|
|
240
|
+
`:"<pre><code>"+(r?a:sr(a,!0))+`</code></pre>
|
|
241
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
242
|
+
${this.parser.parse(t)}</blockquote>
|
|
243
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
244
|
+
`}hr(t){return`<hr>
|
|
245
|
+
`}list(t){let n=t.ordered,r=t.start,i="";for(let l=0;l<t.items.length;l++){let c=t.items[l];i+=this.listitem(c)}let a=n?"ol":"ul",u=n&&r!==1?' start="'+r+'"':"";return"<"+a+u+`>
|
|
246
|
+
`+i+"</"+a+`>
|
|
247
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
248
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
249
|
+
`}table(t){let n="",r="";for(let a=0;a<t.header.length;a++)r+=this.tablecell(t.header[a]);n+=this.tablerow({text:r});let i="";for(let a=0;a<t.rows.length;a++){let u=t.rows[a];r="";for(let l=0;l<u.length;l++)r+=this.tablecell(u[l]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
250
|
+
<thead>
|
|
251
|
+
`+n+`</thead>
|
|
252
|
+
`+i+`</table>
|
|
253
|
+
`}tablerow({text:t}){return`<tr>
|
|
254
|
+
${t}</tr>
|
|
255
|
+
`}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
|
|
256
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${sr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let i=this.parser.parseInline(r),a=FE(t);if(a===null)return i;t=a;let u='<a href="'+t+'"';return n&&(u+=' title="'+sr(n)+'"'),u+=">"+i+"</a>",u}image({href:t,title:n,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let a=FE(t);if(a===null)return sr(r);t=a;let u=`<img src="${t}" alt="${sr(r)}"`;return n&&(u+=` title="${sr(n)}"`),u+=">",u}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:sr(t.text)}},Bp=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},qn=class vh{constructor(t){Y(this,"options");Y(this,"renderer");Y(this,"textRenderer");this.options=t||ns,this.options.renderer=this.options.renderer||new jl,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Bp}static parse(t,n){return new vh(n).parse(t)}static parseInline(t,n){return new vh(n).parseInline(t)}parse(t){var r,i;this.renderer.parser=this;let n="";for(let a=0;a<t.length;a++){let u=t[a];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[u.type]){let c=u,f=this.options.extensions.renderers[c.type].call({parser:this},c);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){n+=f||"";continue}}let l=u;switch(l.type){case"space":{n+=this.renderer.space(l);break}case"hr":{n+=this.renderer.hr(l);break}case"heading":{n+=this.renderer.heading(l);break}case"code":{n+=this.renderer.code(l);break}case"table":{n+=this.renderer.table(l);break}case"blockquote":{n+=this.renderer.blockquote(l);break}case"list":{n+=this.renderer.list(l);break}case"checkbox":{n+=this.renderer.checkbox(l);break}case"html":{n+=this.renderer.html(l);break}case"def":{n+=this.renderer.def(l);break}case"paragraph":{n+=this.renderer.paragraph(l);break}case"text":{n+=this.renderer.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}parseInline(t,n=this.renderer){var i,a;this.renderer.parser=this;let r="";for(let u=0;u<t.length;u++){let l=t[u];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[l.type]){let f=this.options.extensions.renderers[l.type].call({parser:this},l);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){r+=f||"";continue}}let c=l;switch(c.type){case"escape":{r+=n.text(c);break}case"html":{r+=n.html(c);break}case"link":{r+=n.link(c);break}case"image":{r+=n.image(c);break}case"checkbox":{r+=n.checkbox(c);break}case"strong":{r+=n.strong(c);break}case"em":{r+=n.em(c);break}case"codespan":{r+=n.codespan(c);break}case"br":{r+=n.br(c);break}case"del":{r+=n.del(c);break}case"text":{r+=n.text(c);break}default:{let f='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return r}},gl,Xa=(gl=class{constructor(t){Y(this,"options");Y(this,"block");this.options=t||ns}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?On.lex:On.lexInline}provideParser(t=this.block){return t?qn.parse:qn.parseInline}},Y(gl,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Y(gl,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),gl),W4=class{constructor(...t){Y(this,"defaults",Ip());Y(this,"options",this.setOptions);Y(this,"parse",this.parseMarkdown(!0));Y(this,"parseInline",this.parseMarkdown(!1));Y(this,"Parser",qn);Y(this,"Renderer",jl);Y(this,"TextRenderer",Bp);Y(this,"Lexer",On);Y(this,"Tokenizer",Fl);Y(this,"Hooks",Xa);this.use(...t)}walkTokens(t,n){var i,a;let r=[];for(let u of t)switch(r=r.concat(n.call(this,u)),u.type){case"table":{let l=u;for(let c of l.header)r=r.concat(this.walkTokens(c.tokens,n));for(let c of l.rows)for(let f of c)r=r.concat(this.walkTokens(f.tokens,n));break}case"list":{let l=u;r=r.concat(this.walkTokens(l.items,n));break}default:{let l=u;(a=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&a[l.type]?this.defaults.extensions.childTokens[l.type].forEach(c=>{let f=l[c].flat(1/0);r=r.concat(this.walkTokens(f,n))}):l.tokens&&(r=r.concat(this.walkTokens(l.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let u=n.renderers[a.name];u?n.renderers[a.name]=function(...l){let c=a.renderer.apply(this,l);return c===!1&&(c=u.apply(this,l)),c}:n.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let u=n[a.level];u?u.unshift(a.tokenizer):n[a.level]=[a.tokenizer],a.start&&(a.level==="block"?n.startBlock?n.startBlock.push(a.start):n.startBlock=[a.start]:a.level==="inline"&&(n.startInline?n.startInline.push(a.start):n.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(n.childTokens[a.name]=a.childTokens)}),i.extensions=n),r.renderer){let a=this.defaults.renderer||new jl(this.defaults);for(let u in r.renderer){if(!(u in a))throw new Error(`renderer '${u}' does not exist`);if(["options","parser"].includes(u))continue;let l=u,c=r.renderer[l],f=a[l];a[l]=(...m)=>{let h=c.apply(a,m);return h===!1&&(h=f.apply(a,m)),h||""}}i.renderer=a}if(r.tokenizer){let a=this.defaults.tokenizer||new Fl(this.defaults);for(let u in r.tokenizer){if(!(u in a))throw new Error(`tokenizer '${u}' does not exist`);if(["options","rules","lexer"].includes(u))continue;let l=u,c=r.tokenizer[l],f=a[l];a[l]=(...m)=>{let h=c.apply(a,m);return h===!1&&(h=f.apply(a,m)),h}}i.tokenizer=a}if(r.hooks){let a=this.defaults.hooks||new Xa;for(let u in r.hooks){if(!(u in a))throw new Error(`hook '${u}' does not exist`);if(["options","block"].includes(u))continue;let l=u,c=r.hooks[l],f=a[l];Xa.passThroughHooks.has(u)?a[l]=m=>{if(this.defaults.async&&Xa.passThroughHooksRespectAsync.has(u))return(async()=>{let _=await c.call(a,m);return f.call(a,_)})();let h=c.call(a,m);return f.call(a,h)}:a[l]=(...m)=>{if(this.defaults.async)return(async()=>{let _=await c.apply(a,m);return _===!1&&(_=await f.apply(a,m)),_})();let h=c.apply(a,m);return h===!1&&(h=f.apply(a,m)),h}}i.hooks=a}if(r.walkTokens){let a=this.defaults.walkTokens,u=r.walkTokens;i.walkTokens=function(l){let c=[];return c.push(u.call(this,l)),a&&(c=c.concat(a.call(this,l))),c}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return On.lex(t,n??this.defaults)}parser(t,n){return qn.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},a={...this.defaults,...i},u=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return u(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return u(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return u(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let l=a.hooks?await a.hooks.preprocess(n):n,c=await(a.hooks?await a.hooks.provideLexer(t):t?On.lex:On.lexInline)(l,a),f=a.hooks?await a.hooks.processAllTokens(c):c;a.walkTokens&&await Promise.all(this.walkTokens(f,a.walkTokens));let m=await(a.hooks?await a.hooks.provideParser(t):t?qn.parse:qn.parseInline)(f,a);return a.hooks?await a.hooks.postprocess(m):m})().catch(u);try{a.hooks&&(n=a.hooks.preprocess(n));let l=(a.hooks?a.hooks.provideLexer(t):t?On.lex:On.lexInline)(n,a);a.hooks&&(l=a.hooks.processAllTokens(l)),a.walkTokens&&this.walkTokens(l,a.walkTokens);let c=(a.hooks?a.hooks.provideParser(t):t?qn.parse:qn.parseInline)(l,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(l){return u(l)}}}onError(t,n){return r=>{if(r.message+=`
|
|
257
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+sr(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Ki=new W4;function Je(e,t){return Ki.parse(e,t)}Je.options=Je.setOptions=function(e){return Ki.setOptions(e),Je.defaults=Ki.defaults,mx(Je.defaults),Je};Je.getDefaults=Ip;Je.defaults=ns;Je.use=function(...e){return Ki.use(...e),Je.defaults=Ki.defaults,mx(Je.defaults),Je};Je.walkTokens=function(e,t){return Ki.walkTokens(e,t)};Je.parseInline=Ki.parseInline;Je.Parser=qn;Je.parser=qn.parse;Je.Renderer=jl;Je.TextRenderer=Bp;Je.Lexer=On;Je.lexer=On.lex;Je.Tokenizer=Fl;Je.Hooks=Xa;Je.parse=Je;Je.options;Je.setOptions;Je.use;Je.walkTokens;Je.parseInline;qn.parse;On.lex;var q4=300,Y4="300px",Q4=500;function K4(e={}){let{immediate:t=!1,debounceDelay:n=q4,rootMargin:r=Y4,idleTimeout:i=Q4}=e,[a,u]=P.useState(!1),l=P.useRef(null),c=P.useRef(null),f=P.useRef(null),m=P.useMemo(()=>g=>{let y=Date.now();return window.setTimeout(()=>{g({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-y))})},1)},[]),h=P.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(g,y)=>window.requestIdleCallback(g,y):m,[m]),_=P.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?g=>window.cancelIdleCallback(g):g=>{clearTimeout(g)},[]);return P.useEffect(()=>{if(t){u(!0);return}let g=l.current;if(!g)return;c.current&&(clearTimeout(c.current),c.current=null),f.current&&(_(f.current),f.current=null);let y=()=>{c.current&&(clearTimeout(c.current),c.current=null),f.current&&(_(f.current),f.current=null)},C=N=>{f.current=h(U=>{U.timeRemaining()>0||U.didTimeout?(u(!0),N.disconnect()):f.current=h(()=>{u(!0),N.disconnect()},{timeout:i/2})},{timeout:i})},k=N=>{y(),c.current=window.setTimeout(()=>{var U,z;let B=N.takeRecords();(B.length===0||(z=(U=B.at(-1))==null?void 0:U.isIntersecting)!=null&&z)&&C(N)},n)},w=(N,U)=>{N.isIntersecting?k(U):y()},D=new IntersectionObserver(N=>{for(let U of N)w(U,D)},{rootMargin:r,threshold:0});return D.observe(g),()=>{c.current&&clearTimeout(c.current),f.current&&_(f.current),D.disconnect()}},[t,n,r,i,_,h]),{shouldRender:a,containerRef:l}}var Cx=/\s/,X4=/^\s+$/,Z4=new Set(["code","pre","svg","math","annotation"]),J4=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",eD=e=>e.some(t=>J4(t)&&Z4.has(t.tagName)),tD=e=>{let t=[],n="",r=!1;for(let i of e){let a=Cx.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},nD=e=>{let t=[],n="";for(let r of e)Cx.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},rD=(e,t,n,r,i,a)=>{let u=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(u+=`;--sd-delay:${a}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:u},children:[{type:"text",value:e}]}},iD=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&"children"in a))return;if(eD(t))return Ds;let u=a,l=u.children.indexOf(e);if(l===-1)return;let c=e.value;if(!c.trim()){i.count+=c.length;return}let f=n.sep==="char"?nD(c):tD(c),m=r.prevContentLength,h=f.map(_=>{let g=i.count;if(i.count+=_.length,X4.test(_))return{type:"text",value:_};let y=m>0&&g<m,C=y?0:i.newIndex++*n.stagger;return rD(_,n.animation,n.duration,n.easing,y,C)});return u.children.splice(l,1,...h),l+h.length},sD=0;function Hl(e){var t,n,r,i,a;let u={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word",stagger:(a=e==null?void 0:e.stagger)!=null?a:40},l={prevContentLength:0,lastRenderCharCount:0},c=sD++,f=()=>m=>{let h={count:0,newIndex:0};fp(m,"text",(_,g)=>iD(_,g,u,l,h)),l.lastRenderCharCount=h.count,l.prevContentLength=0};return Object.defineProperty(f,"name",{value:`rehypeAnimate$${c}`}),{name:"animate",type:"animate",rehypePlugin:f,setPrevContentLength(m){l.prevContentLength=m},getLastRenderCharCount(){let m=l.lastRenderCharCount;return l.lastRenderCharCount=0,m}}}Hl();var vx=P.createContext(!1),Sx=()=>P.useContext(vx),Fp=(...e)=>px(Jy(e)),aD=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},oD=e=>e?(...t)=>aD(e,px(Jy(t))):Fp,Wi=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),u=document.createElement("a");u.href=a,u.download=e,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(a)},Sh=P.createContext(Fp),Ue=()=>P.useContext(Sh),uD=Fp("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),lD=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},cD=P.memo(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:a=!0,...u})=>{let l=Ue(),c=P.useMemo(()=>l(uD),[l]),f=P.useMemo(()=>{let m={};return t.bg&&(m["--sdm-bg"]=t.bg),t.fg&&(m["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(m,lD(t.rootStyle)),m},[t.bg,t.fg,t.rootStyle]);return T.jsx("div",{className:l(r,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...u,children:T.jsx("pre",{className:l(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:f,children:T.jsx("code",{className:a?l("[counter-increment:line_0] [counter-reset:line]"):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((m,h)=>T.jsx("span",{className:a?c:void 0,children:m.length===0||m.length===1&&m[0].content===""?`
|
|
258
|
+
`:m.map((_,g)=>{let y={},C=!!_.bgColor;if(_.color&&(y["--sdm-c"]=_.color),_.bgColor&&(y["--sdm-tbg"]=_.bgColor),_.htmlStyle)for(let[k,w]of Object.entries(_.htmlStyle))k==="color"?y["--sdm-c"]=w:k==="background-color"?(y["--sdm-tbg"]=w,C=!0):y[k]=w;return T.jsx("span",{className:l("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",C&&"bg-[var(--sdm-tbg)]",C&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:y,..._.htmlAttrs,children:_.content},g)})},h))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),Ax=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let a=Ue();return T.jsx("div",{className:a("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},Ix=P.createContext({code:""}),Nx=()=>P.useContext(Ix),Lx=({language:e})=>{let t=Ue();return T.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:T.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},dD=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
259
|
+
`;)t--;return e.slice(0,t)},fD=P.lazy(()=>A(()=>import("./highlighted-body-OFNGDK62-DkdBx1s2.js"),__vite__mapDeps([0,1])).then(e=>({default:e.HighlightedCodeBlockBody}))),Rx=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:u,...l})=>{let c=Ue(),f=P.useMemo(()=>dD(e),[e]),m=P.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:f.split(`
|
|
260
|
+
`).map(h=>[{content:h,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[f]);return T.jsx(Ix.Provider,{value:{code:e},children:T.jsxs(Ax,{isIncomplete:i,language:t,children:[T.jsx(Lx,{language:t}),r?T.jsx("div",{className:c("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:T.jsx("div",{className:c("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,T.jsx(P.Suspense,{fallback:T.jsx(cD,{className:n,language:t,lineNumbers:u,result:m,startLine:a,...l}),children:T.jsx(fD,{className:n,code:f,language:t,lineNumbers:u,raw:m,startLine:a,...l})})]})})},hD=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),pD=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),mD=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),gD=e=>T.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[T.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),ED=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),_D=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),bD=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),yD=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),xD=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),TD=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Za={CheckIcon:hD,CopyIcon:pD,DownloadIcon:mD,ExternalLinkIcon:yD,Loader2Icon:gD,Maximize2Icon:ED,RotateCcwIcon:_D,XIcon:bD,ZoomInIcon:xD,ZoomOutIcon:TD},Ox=P.createContext(Za),kD=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},UE=({icons:e,children:t})=>{let n=P.useRef(e),r=P.useRef(e?{...Za,...e}:Za);kD(n.current,e)||(n.current=e,r.current=e?{...Za,...e}:Za);let i=r.current;return T.jsx(Ox.Provider,{value:i,children:t})},Bn=()=>P.useContext(Ox),jp={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Ah=P.createContext(jp),hr=()=>P.useContext(Ah),Ih=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...u})=>{let l=Ue(),[c,f]=P.useState(!1),m=P.useRef(0),{code:h}=Nx(),{isAnimating:_}=P.useContext(nn),g=hr(),y=a??h,C=async()=>{var D;if(typeof window>"u"||!((D=navigator==null?void 0:navigator.clipboard)!=null&&D.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{c||(await navigator.clipboard.writeText(y),f(!0),e==null||e(),m.current=window.setTimeout(()=>f(!1),n))}catch(N){t==null||t(N)}};P.useEffect(()=>()=>{window.clearTimeout(m.current)},[]);let k=Bn(),w=c?k.CheckIcon:k.CopyIcon;return T.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:_,onClick:C,title:g.copyCode,type:"button",...u,children:r??T.jsx(w,{size:14})})},$E={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},Px=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...u})=>{let l=Ue(),{code:c}=Nx(),{isAnimating:f}=P.useContext(nn),m=hr(),h=Bn(),_=a??c,g=`file.${n&&n in $E?$E[n]:"txt"}`,y="text/plain",C=()=>{try{Wi(g,_,y),e==null||e()}catch(k){t==null||t(k)}};return T.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:f,onClick:C,title:m.downloadFile,type:"button",...u,children:r??T.jsx(h.DownloadIcon,{size:14})})},Nh=()=>{let{Loader2Icon:e}=Bn(),t=Ue();return T.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[T.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),T.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:T.jsx(e,{className:t("size-4 animate-spin")})})]})},wD=/\.[^/.]+$/,CD=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...u})=>{let{DownloadIcon:l}=Bn(),c=Ue(),f=P.useRef(null),[m,h]=P.useState(!1),[_,g]=P.useState(!1),y=hr(),C=u.width!=null||u.height!=null,k=(m||C)&&!_,w=_&&!C;P.useEffect(()=>{let z=f.current;if(z!=null&&z.complete){let B=z.naturalWidth>0;h(B),g(!B)}},[]);let D=P.useCallback(z=>{h(!0),g(!1),i==null||i(z)},[i]),N=P.useCallback(z=>{h(!1),g(!0),a==null||a(z)},[a]),U=async()=>{if(n)try{let z=await(await fetch(n)).blob(),B=new URL(n,window.location.origin).pathname.split("/").pop()||"",X=B.split(".").pop(),Q=B.includes(".")&&X!==void 0&&X.length<=4,ne="";if(Q)ne=B;else{let $=z.type,oe="png";$.includes("jpeg")||$.includes("jpg")?oe="jpg":$.includes("png")?oe="png":$.includes("svg")?oe="svg":$.includes("gif")?oe="gif":$.includes("webp")&&(oe="webp"),ne=`${(r||B||"image").replace(wD,"")}.${oe}`}Wi(ne,z,z.type)}catch{window.open(n,"_blank")}};return n?T.jsxs("div",{className:c("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[T.jsx("img",{alt:r,className:c("max-w-full rounded-lg",w&&"hidden",t),"data-streamdown":"image",onError:N,onLoad:D,ref:f,src:n,...u}),w&&T.jsx("span",{className:c("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:y.imageNotAvailable}),T.jsx("div",{className:c("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),k&&T.jsx("button",{className:c("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:U,title:y.downloadImage,type:"button",children:T.jsx(l,{size:14})})]}):null},uo=0,Hp=()=>{uo+=1,uo===1&&(document.body.style.overflow="hidden")},Up=()=>{uo=Math.max(0,uo-1),uo===0&&(document.body.style.overflow="")},vD=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:u,XIcon:l}=Bn(),c=Ue(),[f,m]=P.useState(!1),h=hr(),_=P.useCallback(async()=>{try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)}catch{}},[e]),g=P.useCallback(()=>{r(),n()},[r,n]);return P.useEffect(()=>{if(t){Hp();let y=C=>{C.key==="Escape"&&n()};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),Up()}}},[t,n]),t?T.jsx("div",{className:c("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:y=>{y.key==="Escape"&&n()},role:"button",tabIndex:0,children:T.jsxs("div",{className:c("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:[T.jsx("button",{className:c("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:h.close,type:"button",children:T.jsx(l,{size:16})}),T.jsxs("div",{className:c("flex flex-col gap-2"),children:[T.jsxs("div",{className:c("flex items-center gap-2 font-semibold text-lg"),children:[T.jsx(u,{size:20}),T.jsx("span",{children:h.openExternalLink})]}),T.jsx("p",{className:c("text-muted-foreground text-sm"),children:h.externalLinkWarning})]}),T.jsx("div",{className:c("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),T.jsxs("div",{className:c("flex gap-2"),children:[T.jsx("button",{className:c("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:_,type:"button",children:f?T.jsxs(T.Fragment,{children:[T.jsx(i,{size:14}),T.jsx("span",{children:h.copied})]}):T.jsxs(T.Fragment,{children:[T.jsx(a,{size:14}),T.jsx("span",{children:h.copyLink})]})}),T.jsxs("button",{className:c("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:g,type:"button",children:[T.jsx(u,{size:14}),T.jsx("span",{children:h.openLink})]})]})]})}):null},Lh=P.createContext(null),$p=()=>P.useContext(Lh),QF=()=>{var e;let t=$p();return(e=t==null?void 0:t.code)!=null?e:null},zp=()=>{var e;let t=$p();return(e=t==null?void 0:t.mermaid)!=null?e:null},SD=e=>{var t;let n=$p();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},AD=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let u="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),l=new Image;l.crossOrigin="anonymous",l.onload=()=>{let c=document.createElement("canvas"),f=l.width*r,m=l.height*r;c.width=f,c.height=m;let h=c.getContext("2d");if(!h){a(new Error("Failed to create 2D canvas context for PNG export"));return}h.drawImage(l,0,0,f,m),c.toBlob(_=>{if(!_){a(new Error("Failed to create PNG blob"));return}i(_)},"image/png")},l.onerror=()=>a(new Error("Failed to load SVG image")),l.src=u})},ID=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let u=Ue(),[l,c]=P.useState(!1),f=P.useRef(null),{isAnimating:m}=P.useContext(nn),h=Bn(),_=zp(),g=hr(),y=async C=>{try{if(C==="mmd"){Wi("diagram.mmd",e,"text/plain"),c(!1),r==null||r(C);return}if(!_){a==null||a(new Error("Mermaid plugin not available"));return}let k=_.getMermaid(i),w=e.split("").reduce((U,z)=>(U<<5)-U+z.charCodeAt(0)|0,0),D=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await k.render(D,e);if(!N){a==null||a(new Error("SVG not found. Please wait for the diagram to render."));return}if(C==="svg"){Wi("diagram.svg",N,"image/svg+xml"),c(!1),r==null||r(C);return}if(C==="png"){let U=await AD(N);Wi("diagram.png",U,"image/png"),r==null||r(C),c(!1);return}}catch(k){a==null||a(k)}};return P.useEffect(()=>{let C=k=>{let w=k.composedPath();f.current&&!w.includes(f.current)&&c(!1)};return document.addEventListener("mousedown",C),()=>{document.removeEventListener("mousedown",C)}},[]),T.jsxs("div",{className:u("relative"),ref:f,children:[T.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:m,onClick:()=>c(!l),title:g.downloadDiagram,type:"button",children:t??T.jsx(h.DownloadIcon,{size:14})}),l?T.jsxs("div",{className:u("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("svg"),title:g.downloadDiagramAsSvg,type:"button",children:g.mermaidFormatSvg}),T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("png"),title:g.downloadDiagramAsPng,type:"button",children:g.mermaidFormatPng}),T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("mmd"),title:g.downloadDiagramAsMmd,type:"button",children:g.mermaidFormatMmd})]}):null]})},ND=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:u,XIcon:l}=Bn(),c=Ue(),[f,m]=P.useState(!1),{isAnimating:h,controls:_}=P.useContext(nn),g=hr(),y=(()=>{if(typeof _=="boolean")return _;let k=_.mermaid;return k===!1?!1:k===!0||k===void 0?!0:k.panZoom!==!1})(),C=()=>{m(!f)};return P.useEffect(()=>{if(f){Hp();let k=w=>{w.key==="Escape"&&m(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k),Up()}}},[f]),P.useEffect(()=>{f?n==null||n():r&&r()},[f,n,r]),T.jsxs(T.Fragment,{children:[T.jsx("button",{className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:h,onClick:C,title:g.viewFullscreen,type:"button",...a,children:T.jsx(u,{size:14})}),f?Ap.createPortal(T.jsxs("div",{className:c("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:C,onKeyDown:k=>{k.key==="Escape"&&C()},role:"button",tabIndex:0,children:[T.jsx("button",{className:c("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:C,title:g.exitFullscreen,type:"button",children:T.jsx(l,{size:20})}),T.jsx("div",{className:c("flex size-full items-center justify-center p-4"),onClick:k=>k.stopPropagation(),onKeyDown:k=>k.stopPropagation(),role:"presentation",children:T.jsx(pT,{chart:e,className:c("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:y})})]}),document.body):null]})},fc=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let l of a)r.push(((t=l.textContent)==null?void 0:t.trim())||"");let u=e.querySelectorAll("tbody tr");for(let l of u){let c=[],f=l.querySelectorAll("td");for(let m of f)c.push(((n=m.textContent)==null?void 0:n.trim())||"");i.push(c)}return{headers:r,rows:i}},go=e=>{let{headers:t,rows:n}=e,r=l=>{let c=!1,f=!1;for(let m of l){if(m==='"'){c=!0,f=!0;break}(m===","||m===`
|
|
261
|
+
`)&&(c=!0)}return c?f?`"${l.replace(/"/g,'""')}"`:`"${l}"`:l},i=t.length>0?n.length+1:n.length,a=new Array(i),u=0;t.length>0&&(a[u]=t.map(r).join(","),u+=1);for(let l of n)a[u]=l.map(r).join(","),u+=1;return a.join(`
|
|
262
|
+
`)},Dx=e=>{let{headers:t,rows:n}=e,r=l=>{let c=!1;for(let m of l)if(m===" "||m===`
|
|
263
|
+
`||m==="\r"){c=!0;break}if(!c)return l;let f=[];for(let m of l)m===" "?f.push("\\t"):m===`
|
|
264
|
+
`?f.push("\\n"):m==="\r"?f.push("\\r"):f.push(m);return f.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),u=0;t.length>0&&(a[u]=t.map(r).join(" "),u+=1);for(let l of n)a[u]=l.map(r).join(" "),u+=1;return a.join(`
|
|
265
|
+
`)},yl=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},Eo=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(l=>yl(l));r[i]=`| ${a.join(" | ")} |`,i+=1;let u=new Array(t.length);for(let l=0;l<t.length;l+=1)u[l]="---";r[i]=`| ${u.join(" | ")} |`,i+=1;for(let l of n)if(l.length<t.length){let c=new Array(t.length);for(let f=0;f<t.length;f+=1)c[f]=f<l.length?yl(l[f]):"";r[i]=`| ${c.join(" | ")} |`,i+=1}else{let c=l.map(f=>yl(f));r[i]=`| ${c.join(" | ")} |`,i+=1}return r.join(`
|
|
266
|
+
`)},Vp=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=Ue(),[u,l]=P.useState(!1),[c,f]=P.useState(!1),m=P.useRef(null),h=P.useRef(0),{isAnimating:_}=P.useContext(nn),g=hr(),y=async w=>{var D,N;if(typeof window>"u"||!((D=navigator==null?void 0:navigator.clipboard)!=null&&D.write)){r==null||r(new Error("Clipboard API not available"));return}try{let U=(N=m.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),z=U==null?void 0:U.querySelector("table");if(!z){r==null||r(new Error("Table not found"));return}let B=fc(z),X=({csv:go,tsv:Dx,md:Eo}[w]||Eo)(B),Q=new ClipboardItem({"text/plain":new Blob([X],{type:"text/plain"}),"text/html":new Blob([z.outerHTML],{type:"text/html"})});await navigator.clipboard.write([Q]),f(!0),l(!1),n==null||n(w),h.current=window.setTimeout(()=>f(!1),i)}catch(U){r==null||r(U)}};P.useEffect(()=>{let w=D=>{let N=D.composedPath();m.current&&!N.includes(m.current)&&l(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w),window.clearTimeout(h.current)}},[]);let C=Bn(),k=c?C.CheckIcon:C.CopyIcon;return T.jsxs("div",{className:a("relative"),ref:m,children:[T.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:_,onClick:()=>l(!u),title:g.copyTable,type:"button",children:e??T.jsx(k,{height:14,width:14})}),u?T.jsxs("div",{className:a("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("md"),title:g.copyTableAsMarkdown,type:"button",children:g.tableFormatMarkdown}),T.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("csv"),title:g.copyTableAsCsv,type:"button",children:g.tableFormatCsv}),T.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>y("tsv"),title:g.copyTableAsTsv,type:"button",children:g.tableFormatTsv})]}):null]})},LD=({children:e,className:t,onDownload:n,onError:r,format:i="csv",filename:a})=>{let u=Ue(),{isAnimating:l}=P.useContext(nn),c=hr(),f=Bn(),m=h=>{try{let _=h.currentTarget.closest('[data-streamdown="table-wrapper"]'),g=_==null?void 0:_.querySelector("table");if(!g){r==null||r(new Error("Table not found"));return}let y=fc(g),C="",k="",w="";switch(i){case"csv":C=go(y),k="text/csv",w="csv";break;case"markdown":C=Eo(y),k="text/markdown",w="md";break;default:C=go(y),k="text/csv",w="csv"}Wi(`${a||"table"}.${w}`,C,k),n==null||n()}catch(_){r==null||r(_)}};return T.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:m,title:i==="csv"?c.downloadTableAsCsv:c.downloadTableAsMarkdown,type:"button",children:e??T.jsx(f.DownloadIcon,{size:14})})},Gp=({children:e,className:t,onDownload:n,onError:r})=>{let i=Ue(),[a,u]=P.useState(!1),l=P.useRef(null),{isAnimating:c}=P.useContext(nn),f=hr(),m=Bn(),h=_=>{var g;try{let y=(g=l.current)==null?void 0:g.closest('[data-streamdown="table-wrapper"]'),C=y==null?void 0:y.querySelector("table");if(!C){r==null||r(new Error("Table not found"));return}let k=fc(C),w=_==="csv"?go(k):Eo(k);Wi(`table.${_==="csv"?"csv":"md"}`,w,_==="csv"?"text/csv":"text/markdown"),u(!1),n==null||n(_)}catch(y){r==null||r(y)}};return P.useEffect(()=>{let _=g=>{let y=g.composedPath();l.current&&!y.includes(l.current)&&u(!1)};return document.addEventListener("mousedown",_),()=>{document.removeEventListener("mousedown",_)}},[]),T.jsxs("div",{className:i("relative"),ref:l,children:[T.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:()=>u(!a),title:f.downloadTable,type:"button",children:e??T.jsx(m.DownloadIcon,{size:14})}),a?T.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>h("csv"),title:f.downloadTableAsCsv,type:"button",children:f.tableFormatCsv}),T.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>h("markdown"),title:f.downloadTableAsMarkdown,type:"button",children:f.tableFormatMarkdown})]}):null]})},RD=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=Bn(),u=Ue(),[l,c]=P.useState(!1),{isAnimating:f}=P.useContext(nn),m=hr(),h=()=>{c(!0)},_=()=>{c(!1)};return P.useEffect(()=>{if(l){Hp();let g=y=>{y.key==="Escape"&&c(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),Up()}}},[l]),T.jsxs(T.Fragment,{children:[T.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:h,title:m.viewFullscreen,type:"button",children:T.jsx(i,{size:14})}),l?Ap.createPortal(T.jsx("div",{"aria-label":m.viewFullscreen,"aria-modal":"true",className:u("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:_,onKeyDown:g=>{g.key==="Escape"&&_()},role:"dialog",children:T.jsxs("div",{className:u("flex h-full flex-col"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:[T.jsxs("div",{className:u("flex items-center justify-end gap-1 p-4"),children:[n?T.jsx(Vp,{}):null,r?T.jsx(Gp,{}):null,T.jsx("button",{className:u("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:_,title:m.exitFullscreen,type:"button",children:T.jsx(a,{size:20})})]}),T.jsx("div",{className:u("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:T.jsx("table",{className:u("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},OD=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...u})=>{let l=Ue(),c=n&&r,f=n&&i,m=n&&a,h=c||f||m;return T.jsxs("div",{className:l("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[h?T.jsxs("div",{className:l("flex items-center justify-end gap-1"),children:[c?T.jsx(Vp,{}):null,f?T.jsx(Gp,{}):null,m?T.jsx(RD,{showCopy:c,showDownload:f,children:e}):null]}):null,T.jsx("div",{className:l("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:T.jsx("table",{className:l("w-full divide-y divide-border",t),"data-streamdown":"table",...u,children:e})})]})},PD=/startLine=(\d+)/,DD=/\bnoLineNumbers\b/,MD=P.lazy(()=>A(()=>Promise.resolve().then(()=>jF),void 0).then(e=>({default:e.Mermaid}))),BD=/language-([^\s]+)/;function hc(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(i==null?void 0:i.line)===(a==null?void 0:a.line)&&(i==null?void 0:i.column)===(a==null?void 0:a.column)}function dt(e,t){return e.className===t.className&&hc(e.node,t.node)}var Rh=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Uf=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},zE=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},ol=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Wp=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>dt(e,t));Wp.displayName="MarkdownOl";var Mx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&hc(e.node,t.node));Mx.displayName="MarkdownLi";var Bx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>dt(e,t));Bx.displayName="MarkdownUl";var Fx=P.memo(({className:e,node:t,...n})=>{let r=Ue();return T.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>dt(e,t));Fx.displayName="MarkdownHr";var jx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>dt(e,t));jx.displayName="MarkdownStrong";var FD=({children:e,className:t,href:n,node:r,...i})=>{let a=Ue(),{linkSafety:u}=P.useContext(nn),[l,c]=P.useState(!1),f=n==="streamdown:incomplete-link",m=P.useCallback(async y=>{if(!(!(u!=null&&u.enabled&&n)||f)){if(y.preventDefault(),u.onLinkCheck&&await u.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}c(!0)}},[u,n,f]),h=P.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),_=P.useCallback(()=>{c(!1)},[]),g={url:n??"",isOpen:l,onClose:_,onConfirm:h};return u!=null&&u.enabled&&n?T.jsxs(T.Fragment,{children:[T.jsx("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":f,"data-streamdown":"link",onClick:m,type:"button",children:e}),u.renderModal?u.renderModal(g):T.jsx(vD,{...g})]}):T.jsx("a",{className:a("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":f,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Hx=P.memo(FD,(e,t)=>dt(e,t)&&e.href===t.href);Hx.displayName="MarkdownA";var Ux=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>dt(e,t));Ux.displayName="MarkdownH1";var $x=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>dt(e,t));$x.displayName="MarkdownH2";var zx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>dt(e,t));zx.displayName="MarkdownH3";var Vx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>dt(e,t));Vx.displayName="MarkdownH4";var Gx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>dt(e,t));Gx.displayName="MarkdownH5";var Wx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>dt(e,t));Wx.displayName="MarkdownH6";var qx=P.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=P.useContext(nn),a=Rh(i,"table"),u=Uf(i,"copy"),l=Uf(i,"download"),c=Uf(i,"fullscreen");return T.jsx(OD,{className:t,showControls:a,showCopy:u,showDownload:l,showFullscreen:c,...r,children:e})},(e,t)=>dt(e,t));qx.displayName="MarkdownTable";var Yx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>dt(e,t));Yx.displayName="MarkdownThead";var Qx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>dt(e,t));Qx.displayName="MarkdownTbody";var Kx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>dt(e,t));Kx.displayName="MarkdownTr";var Xx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>dt(e,t));Xx.displayName="MarkdownTh";var Zx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>dt(e,t));Zx.displayName="MarkdownTd";var Jx=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>dt(e,t));Jx.displayName="MarkdownBlockquote";var eT=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>dt(e,t));eT.displayName="MarkdownSup";var tT=P.memo(({children:e,className:t,node:n,...r})=>{let i=Ue();return T.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>dt(e,t));tT.displayName="MarkdownSub";var nT=P.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=u=>{var l,c;if(!P.isValidElement(u))return!1;let f=Array.isArray(u.props.children)?u.props.children:[u.props.children],m=!1,h=!1;for(let _ of f)if(_){if(typeof _=="string")_.trim()!==""&&(m=!0);else if(P.isValidElement(_))if(((l=_.props)==null?void 0:l["data-footnote-backref"])!==void 0)h=!0;else{let g=Array.isArray(_.props.children)?_.props.children:[_.props.children];for(let y of g){if(typeof y=="string"&&y.trim()!==""){m=!0;break}if(P.isValidElement(y)&&((c=y.props)==null?void 0:c["data-footnote-backref"])===void 0){m=!0;break}}}}return h&&!m},a=Array.isArray(e)?e.map(u=>{if(!P.isValidElement(u))return u;if(u.type===Wp){let l=(Array.isArray(u.props.children)?u.props.children:[u.props.children]).filter(c=>!i(c));return l.length===0?null:{...u,props:{...u.props,children:l}}}return u}):e;return(Array.isArray(a)?a.some(u=>u!==null):a!==null)?T.jsx("section",{className:t,...r,children:a}):null}return T.jsx("section",{className:t,...r,children:e})},(e,t)=>dt(e,t));nT.displayName="MarkdownSection";var jD=({node:e,className:t,children:n,...r})=>{var i,a;let u=Ue(),l=!("data-block"in r),{mermaid:c,controls:f,lineNumbers:m}=P.useContext(nn),h=zp(),_=Sx(),g=t==null?void 0:t.match(BD),y=(i=g==null?void 0:g.at(1))!=null?i:"",C=SD(y);if(l)return T.jsx("code",{className:u("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let k=(a=e==null?void 0:e.properties)==null?void 0:a.metastring,w=k==null?void 0:k.match(PD),D=w?Number.parseInt(w[1],10):void 0,N=D!==void 0&&D>=1?D:void 0,U=!(k&&DD.test(k))&&m!==!1,z="";if(P.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?z=n.props.children:typeof n=="string"&&(z=n),C){let ne=C.component;return T.jsx(P.Suspense,{fallback:T.jsx(Nh,{}),children:T.jsx(ne,{code:z,isIncomplete:_,language:y,meta:k})})}if(y==="mermaid"&&h){let ne=Rh(f,"mermaid"),$=ol(f,"download"),oe=ol(f,"copy"),ue=ol(f,"fullscreen"),ve=ol(f,"panZoom"),he=ne&&($||oe||ue);return T.jsx(P.Suspense,{fallback:T.jsx(Nh,{}),children:T.jsxs("div",{className:u("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[T.jsx("div",{className:u("flex h-8 items-center text-muted-foreground text-xs"),children:T.jsx("span",{className:u("ml-1 font-mono lowercase"),children:"mermaid"})}),he?T.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:T.jsxs("div",{className:u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[$?T.jsx(ID,{chart:z,config:c==null?void 0:c.config}):null,oe?T.jsx(Ih,{code:z}):null,ue?T.jsx(ND,{chart:z,config:c==null?void 0:c.config}):null]})}):null,T.jsx("div",{className:u("rounded-md border border-border bg-background"),children:T.jsx(MD,{chart:z,config:c==null?void 0:c.config,showControls:ve})})]})})}let B=Rh(f,"code"),X=zE(f,"download"),Q=zE(f,"copy");return T.jsx(Rx,{className:t,code:z,isIncomplete:_,language:y,lineNumbers:U,startLine:N,children:B?T.jsxs(T.Fragment,{children:[X?T.jsx(Px,{code:z,language:y}):null,Q?T.jsx(Ih,{}):null]}):null})},rT=P.memo(jD,(e,t)=>e.className===t.className&&hc(e.node,t.node));rT.displayName="MarkdownCode";var iT=P.memo(CD,(e,t)=>e.className===t.className&&hc(e.node,t.node));iT.displayName="MarkdownImg";var sT=P.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&P.isValidElement(r[0])){let i=r[0].props.node,a=i==null?void 0:i.tagName;if(a==="img")return T.jsx(T.Fragment,{children:e});if(a==="code"&&"data-block"in r[0].props)return T.jsx(T.Fragment,{children:e})}return T.jsx("p",{...n,children:e})},(e,t)=>dt(e,t));sT.displayName="MarkdownParagraph";var HD={ol:Wp,li:Mx,ul:Bx,hr:Fx,strong:jx,a:Hx,h1:Ux,h2:$x,h3:zx,h4:Vx,h5:Gx,h6:Wx,table:qx,thead:Yx,tbody:Qx,tr:Kx,th:Xx,td:Zx,blockquote:Jx,code:rT,img:iT,pre:({children:e})=>P.isValidElement(e)?P.cloneElement(e,{"data-block":"true"}):e,sup:eT,sub:tT,p:sT,section:nT},UD=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,$D=new RegExp("\\p{L}","u");function Oh(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(UD.test(n))return"rtl";if($D.test(n))return"ltr"}return"ltr"}var zD=/^[ \t]{0,3}(`{3,}|~{3,})/,VD=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,VE=e=>{let t=e.split(`
|
|
267
|
+
`),n=null,r=0;for(let i of t){let a=zD.exec(i);if(n===null){if(a){let u=a[1];n=u[0],r=u.length}}else if(a){let u=a[1],l=u[0],c=u.length;l===n&&c>=r&&(n=null,r=0)}}return n!==null},GD=e=>{let t=e.split(`
|
|
268
|
+
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&VD.test(r))return!0}return!1},WD=()=>e=>{Xn(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},GE=[],WE={allowDangerousHtml:!0},ul=new WeakMap,qD=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let m="default";return this.keyCache.set(e,m),m}let a=m=>{if(!m||m.length===0)return"";let h="";for(let _=0;_<m.length;_+=1){let g=m[_];if(_>0&&(h+=","),Array.isArray(g)){let[y,C]=g;if(typeof y=="function"){let k=ul.get(y);k||(k=y.name,ul.set(y,k)),h+=k}else h+=String(y);h+=":",h+=JSON.stringify(C)}else if(typeof g=="function"){let y=ul.get(g);y||(y=g.name,ul.set(g,y)),h+=y}else h+=String(g)}return h},u=a(n),l=a(r),c=i?JSON.stringify(i):"",f=`${l}::${u}::${c}`;return this.keyCache.set(e,f),f}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},qE=new qD,aT=e=>{let t=YD(e),n=e.children||"",r=t.runSync(t.parse(n),n);return e5(r,e)},YD=e=>{let t=qE.get(e);if(t)return t;let n=KD(e);return qE.set(e,n),n},QD=e=>e.some(t=>Array.isArray(t)?t[0]===Th:t===Th),KD=e=>{let t=e.rehypePlugins||GE,n=e.remarkPlugins||GE,r=QD(t)?n:[...n,WD],i=e.remarkRehypeOptions?{...WE,...e.remarkRehypeOptions}:WE;return Lb().use(Tb).use(r).use(Ib,i).use(t)},oT=e=>e,XD=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},ZD=(e,t)=>{var n;for(let r in js)if(Object.hasOwn(js,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=js[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},JD=(e,t,n,r,i,a)=>{let u=!1;return r?u=!r.includes(e.tagName):i&&(u=i.includes(e.tagName)),!u&&a&&typeof t=="number"&&(u=!a(e,t,n)),u},e5=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:u,urlTransform:l}=t;if(n||r||i||a||l){let c=l||oT;Xn(e,(f,m,h)=>{if(f.type==="raw"&&h&&typeof m=="number")return XD(h,m,a,f.value),m;if(f.type==="element"&&(ZD(f,c),JD(f,m,h,r,i,n)&&h&&typeof m=="number"))return u&&f.children?h.children.splice(m,1,...f.children):h.children.splice(m,1),m})}return ib(e,{Fragment:T.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0})},t5=/\[\^[\w-]{1,200}\](?!:)/,n5=/\[\^[\w-]{1,200}\]:/,r5=/<(\w+)[\s>]/,i5=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),YE=new Map,QE=new Map,s5=e=>{let t=e.toLowerCase(),n=YE.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return YE.set(t,r),r},a5=e=>{let t=e.toLowerCase(),n=QE.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return QE.set(t,r),r},KE=(e,t)=>{if(i5.has(t.toLowerCase()))return 0;let n=e.match(s5(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},XE=(e,t)=>{let n=e.match(a5(t));return n?n.length:0},o5=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},uT=e=>{let t=t5.test(e),n=n5.test(e);if(t||n)return[e];let r=On.lex(e,{gfm:!0}),i=[],a=[],u=!1;for(let l of r){let c=l.raw,f=i.length;if(a.length>0){i[f-1]+=c;let m=a.at(-1),h=KE(c,m),_=XE(c,m);for(let g=0;g<h;g+=1)a.push(m);for(let g=0;g<_;g+=1)a.length>0&&a.at(-1)===m&&a.pop();continue}if(l.type==="html"&&l.block){let m=c.match(r5);if(m){let h=m[1],_=KE(c,h),g=XE(c,h);_>g&&a.push(h)}}if(f>0&&!u){let m=i[f-1];if(o5(m)%2===1){i[f-1]=m+c;continue}}i.push(c),l.type!=="space"&&(u=l.type==="code")}return i},u5=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,u,l,c)=>{if(!l.includes(`
|
|
269
|
+
|
|
270
|
+
`))return u+l+c;let f=l.replace(/\n\n/g,`
|
|
271
|
+
<!---->
|
|
272
|
+
`),m=(f.startsWith(`
|
|
273
|
+
`)?"":`
|
|
274
|
+
`)+f+(f.endsWith(`
|
|
275
|
+
`)?"":`
|
|
276
|
+
`);return`${u}${m}${c}
|
|
277
|
+
|
|
278
|
+
`})}return n},l5=/([\\`*_~[\]|])/g,c5=e=>e.replace(l5,"\\$1"),d5=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,u,l,c)=>{let f=c5(l).replace(/\n\n/g," ");return u+f+c})}return n},lT=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(lT).join(""):"",f5=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));Xn(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=lT(r);r.children=i?[{type:"text",value:i}]:[]}})},h5=()=>e=>{Xn(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},p5=/^[ \t]*<[\w!/?-]/,m5=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,cT=e=>typeof e!="string"||e.length===0||!p5.test(e)?e:e.replace(m5,"$1"),ZE,JE,e_,t_,xl={...Bi,protocols:{...Bi.protocols,href:[...(JE=(ZE=Bi.protocols)==null?void 0:ZE.href)!=null?JE:[],"tel"]},attributes:{...Bi.attributes,code:[...(t_=(e_=Bi.attributes)==null?void 0:e_.code)!=null?t_:[],"metastring"]}},Ul={raw:Th,sanitize:[$y,xl],harden:[DN,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},dT={gfm:[ty,{}],codeMeta:h5},n_=Object.values(Ul),g5=Object.values(dT),E5={block:" ▋",circle:" ●"},fT=["github-light","github-dark"],hT={enabled:!0},_5={shikiTheme:fT,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:hT},nn=P.createContext(_5),qp=P.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:u,...l})=>{if(u){let m=u.getLastRenderCharCount();u.setPrevContentLength(m)}let c=typeof e=="string"&&n?cT(e):e,f=T.jsx(aT,{...l,children:c});return T.jsx(vx.Provider,{value:i,children:a?T.jsx("div",{dir:a,style:{display:"contents"},children:f}):f})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,u;return((a=e.components)==null?void 0:a[i])!==((u=t.components)==null?void 0:u[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});qp.displayName="Block";var pc=P.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:u=n_,remarkPlugins:l=g5,className:c,shikiTheme:f=fT,mermaid:m,controls:h=!0,isAnimating:_=!1,animated:g,BlockComponent:y=qp,parseMarkdownIntoBlocksFn:C=uT,caret:k,plugins:w,remend:D,linkSafety:N=hT,lineNumbers:U=!0,allowedTags:z,literalTagContent:B,translations:X,icons:Q,prefix:ne,onAnimationStart:$,onAnimationEnd:oe,...ue})=>{let ve=P.useId(),[he,te]=P.useTransition(),ee=P.useMemo(()=>oD(ne),[ne]),me=P.useRef(null),re=P.useRef($),ge=P.useRef(oe);re.current=$,ge.current=oe,P.useEffect(()=>{var je,Xe,Et;if(t==="static")return;let Pt=me.current;if(me.current=_,Pt===null){_&&((je=re.current)==null||je.call(re));return}_&&!Pt?(Xe=re.current)==null||Xe.call(re):!_&&Pt&&((Et=ge.current)==null||Et.call(ge))},[_,t]);let S=P.useMemo(()=>z?Object.keys(z):[],[z]),H=P.useMemo(()=>{if(typeof e!="string")return"";let je=t==="streaming"&&r?EP(e,D):e;return B&&B.length>0&&(je=d5(je,B)),S.length>0&&(je=u5(je,S)),je},[e,t,r,D,S,B]),Z=P.useMemo(()=>C(H),[H,C]),[O,Ae]=P.useState(Z);P.useEffect(()=>{t==="streaming"&&!Ie?te(()=>{Ae(Z)}):Ae(Z)},[Z,t]);let be=t==="streaming"?O:Z,_e=P.useMemo(()=>n==="auto"?be.map(Oh):void 0,[be,n]),Fe=P.useMemo(()=>be.map((je,Xe)=>`${ve}-${Xe}`),[be.length,ve]),De=P.useMemo(()=>g===!0?"true":g?JSON.stringify(g):"",[g]),Ie=P.useMemo(()=>De?De==="true"?Hl():Hl(g):null,[De]),tt=P.useMemo(()=>{var je,Xe;return{shikiTheme:(Xe=(je=w==null?void 0:w.code)==null?void 0:je.getThemes())!=null?Xe:f,controls:h,isAnimating:_,lineNumbers:U,mode:t,mermaid:m,linkSafety:N}},[f,h,_,U,t,m,N,w==null?void 0:w.code]),jt=P.useMemo(()=>X?JSON.stringify(X):"",[X]),Tn=P.useMemo(()=>({...jp,...X}),[jt]),hn=P.useMemo(()=>{let{inlineCode:je,...Xe}=a??{},Et={...HD,...Xe};if(je){let Pt=Et.code;Et.code=Fn=>"data-block"in Fn?Pt?P.createElement(Pt,Fn):null:P.createElement(je,Fn)}return Et},[a]),pn=P.useMemo(()=>{let je=[];return w!=null&&w.cjk&&(je=[...je,...w.cjk.remarkPluginsBefore]),je=[...je,...l],w!=null&&w.cjk&&(je=[...je,...w.cjk.remarkPluginsAfter]),w!=null&&w.math&&(je=[...je,w.math.remarkPlugin]),je},[l,w==null?void 0:w.math,w==null?void 0:w.cjk]),Or=P.useMemo(()=>{var je;let Xe=u;if(z&&Object.keys(z).length>0&&u===n_){let Et={...xl,tagNames:[...(je=xl.tagNames)!=null?je:[],...Object.keys(z)],attributes:{...xl.attributes,...z}};Xe=[Ul.raw,[$y,Et],Ul.harden]}return B&&B.length>0&&(Xe=[...Xe,[f5,B]]),w!=null&&w.math&&(Xe=[...Xe,w.math.rehypePlugin]),Ie&&_&&(Xe=[...Xe,Ie.rehypePlugin]),Xe},[u,w==null?void 0:w.math,Ie,_,z,B]),pr=P.useMemo(()=>{if(!_||be.length===0)return!1;let je=be.at(-1);return VE(je)||GD(je)},[_,be]),Pr=P.useMemo(()=>k&&_&&!pr?{"--streamdown-caret":`"${E5[k]}"`}:void 0,[k,_,pr]);return t==="static"?T.jsx(Ah.Provider,{value:Tn,children:T.jsx(Lh.Provider,{value:w??null,children:T.jsx(nn.Provider,{value:tt,children:T.jsx(UE,{icons:Q,children:T.jsx(Sh.Provider,{value:ee,children:T.jsx("div",{className:ee("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",c),dir:n==="auto"?Oh(H):n,children:T.jsx(aT,{components:hn,rehypePlugins:Or,remarkPlugins:pn,...ue,children:H})})})})})})}):T.jsx(Ah.Provider,{value:Tn,children:T.jsx(Lh.Provider,{value:w??null,children:T.jsx(nn.Provider,{value:tt,children:T.jsx(UE,{icons:Q,children:T.jsx(Sh.Provider,{value:ee,children:T.jsxs("div",{className:ee("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",k&&!pr?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,c),style:Pr,children:[be.length===0&&k&&_&&T.jsx("span",{}),be.map((je,Xe)=>{var Et;let Pt=Xe===be.length-1,Fn=_&&Pt&&VE(je);return T.jsx(y,{animatePlugin:Ie,components:hn,content:je,dir:(Et=_e==null?void 0:_e[Xe])!=null?Et:n!=="auto"?n:void 0,index:Xe,isIncomplete:Fn,rehypePlugins:Or,remarkPlugins:pn,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...ue},Fe[Xe])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);pc.displayName="Streamdown";var b5=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:u=1,fullscreen:l=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:f,ZoomOutIcon:m}=Bn(),h=Ue(),_=P.useRef(null),g=P.useRef(null),[y,C]=P.useState(u),[k,w]=P.useState({x:0,y:0}),[D,N]=P.useState(!1),[U,z]=P.useState({x:0,y:0}),[B,X]=P.useState({x:0,y:0}),Q=P.useCallback(ee=>{C(me=>Math.max(n,Math.min(r,me+ee)))},[n,r]),ne=P.useCallback(()=>{Q(i)},[Q,i]),$=P.useCallback(()=>{Q(-i)},[Q,i]),oe=P.useCallback(()=>{C(u),w({x:0,y:0})},[u]),ue=P.useCallback(ee=>{ee.preventDefault();let me=ee.deltaY>0?-i:i;Q(me)},[Q,i]),ve=P.useCallback(ee=>{if(ee.button!==0||ee.isPrimary===!1)return;N(!0),z({x:ee.clientX,y:ee.clientY}),X(k);let me=ee.currentTarget;me instanceof HTMLElement&&me.setPointerCapture(ee.pointerId)},[k]),he=P.useCallback(ee=>{if(!D)return;ee.preventDefault();let me=ee.clientX-U.x,re=ee.clientY-U.y;w({x:B.x+me,y:B.y+re})},[D,U,B]),te=P.useCallback(ee=>{N(!1);let me=ee.currentTarget;me instanceof HTMLElement&&me.releasePointerCapture(ee.pointerId)},[]);return P.useEffect(()=>{let ee=_.current;if(ee)return ee.addEventListener("wheel",ue,{passive:!1}),()=>{ee.removeEventListener("wheel",ue)}},[ue]),P.useEffect(()=>{let ee=g.current;if(ee&&D)return document.body.style.userSelect="none",ee.addEventListener("pointermove",he,{passive:!1}),ee.addEventListener("pointerup",te),ee.addEventListener("pointercancel",te),()=>{document.body.style.userSelect="",ee.removeEventListener("pointermove",he),ee.removeEventListener("pointerup",te),ee.removeEventListener("pointercancel",te)}},[D,he,te]),T.jsxs("div",{className:h("relative flex flex-col",l?"h-full w-full":"min-h-28 w-full",t),ref:_,style:{cursor:D?"grabbing":"grab"},children:[a?T.jsxs("div",{className:h("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",l?"bottom-4 left-4":"bottom-2 left-2"),children:[T.jsx("button",{className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:y>=r,onClick:ne,title:"Zoom in",type:"button",children:T.jsx(f,{size:16})}),T.jsx("button",{className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:y<=n,onClick:$,title:"Zoom out",type:"button",children:T.jsx(m,{size:16})}),T.jsx("button",{className:h("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:oe,title:"Reset zoom and pan",type:"button",children:T.jsx(c,{size:16})})]}):null,T.jsx("div",{className:h("flex-1 origin-center transition-transform duration-150 ease-out",l?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:ve,ref:g,role:"application",style:{transform:`translate(${k.x}px, ${k.y}px) scale(${y})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},pT=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=Ue(),[u,l]=P.useState(null),[c,f]=P.useState(!1),[m,h]=P.useState(""),[_,g]=P.useState(""),[y,C]=P.useState(0),{mermaid:k}=P.useContext(nn),w=zp(),D=k==null?void 0:k.errorComponent,{shouldRender:N,containerRef:U}=K4({immediate:r});if(P.useEffect(()=>{if(N){if(!w){l("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{l(null),f(!0);let B=w.getMermaid(n),X=e.split("").reduce(($,oe)=>($<<5)-$+oe.charCodeAt(0)|0,0),Q=`mermaid-${Math.abs(X)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:ne}=await B.render(Q,e);h(ne),g(ne)}catch(B){if(!(_||m)){let X=B instanceof Error?B.message:"Failed to render Mermaid chart";l(X)}}finally{f(!1)}})()}},[e,n,y,N,w]),!(N||m||_))return T.jsx("div",{className:a("my-4 min-h-[200px]",t),ref:U});if(c&&!m&&!_)return T.jsx("div",{className:a("my-4 flex justify-center p-4",t),ref:U,children:T.jsxs("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[T.jsx("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),T.jsx("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(u&&!m&&!_){let B=()=>C(X=>X+1);return D?T.jsx("div",{ref:U,children:T.jsx(D,{chart:e,error:u,retry:B})}):T.jsxs("div",{className:a("rounded-md bg-red-50 p-4",t),ref:U,children:[T.jsxs("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",u]}),T.jsxs("details",{className:a("mt-2"),children:[T.jsx("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),T.jsx("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let z=m||_;return T.jsx("div",{className:a("size-full",t),"data-streamdown":"mermaid",ref:U,children:T.jsx(b5,{className:a(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:T.jsx("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:z},role:"img"})})})};const KF=Object.freeze(Object.defineProperty({__proto__:null,Block:qp,CodeBlock:Rx,CodeBlockContainer:Ax,CodeBlockCopyButton:Ih,CodeBlockDownloadButton:Px,CodeBlockHeader:Lx,CodeBlockSkeleton:Nh,Streamdown:pc,StreamdownContext:nn,TableCopyDropdown:Vp,TableDownloadButton:LD,TableDownloadDropdown:Gp,createAnimatePlugin:Hl,defaultRehypePlugins:Ul,defaultRemarkPlugins:dT,defaultTranslations:jp,defaultUrlTransform:oT,detectTextDirection:Oh,escapeMarkdownTableCell:yl,extractTableDataFromElement:fc,normalizeHtmlIndentation:cT,parseMarkdownIntoBlocks:uT,tableDataToCSV:go,tableDataToMarkdown:Eo,tableDataToTSV:Dx,useIsCodeFenceIncomplete:Sx},Symbol.toStringTag,{value:"Module"}));let mt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function y5(e){return Yp(e)}function Yp(e){return Array.isArray(e)?x5(e):e instanceof RegExp?e:typeof e=="object"?T5(e):e}function x5(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Yp(e[n]);return t}function T5(e){let t={};for(let n in e)t[n]=Yp(e[n]);return t}function mT(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function gT(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?gT(e.substring(0,e.length-1)):e.substr(~t+1)}var $f=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ll=class{static hasCaptures(e){return e===null?!1:($f.lastIndex=0,$f.test(e))}static replaceCaptures(e,t,n){return e.replace($f,(r,i,a,u)=>{let l=n[parseInt(i||a,10)];if(l){let c=t.substring(l.start,l.end);for(;c[0]===".";)c=c.substring(1);switch(u){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function ET(e,t){return e<t?-1:e>t?1:0}function _T(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let a=ET(e[i],t[i]);if(a!==0)return a}return 0}return n-r}function r_(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function bT(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var yT=class{constructor(e){Y(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},$l=class{constructor(e,t,n){Y(this,"_cachedMatchRoot",new yT(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(C5(e),t)}static createFromParsedTheme(e,t){return S5(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>k5(e.parent,i.parentScopes));return r?new xT(r.fontStyle,r.foreground,r.background):null}},zf=class Tl{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Tl(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Tl(n,t[r]);return n}push(t){return new Tl(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function k5(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!w5(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function w5(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var xT=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function C5(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,a=t.length;i<a;i++){let u=t[i];if(!u.settings)continue;let l;if(typeof u.scope=="string"){let h=u.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(u.scope)?l=u.scope:l=[""];let c=-1;if(typeof u.settings.fontStyle=="string"){c=0;let h=u.settings.fontStyle.split(" ");for(let _=0,g=h.length;_<g;_++)switch(h[_]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let f=null;typeof u.settings.foreground=="string"&&r_(u.settings.foreground)&&(f=u.settings.foreground);let m=null;typeof u.settings.background=="string"&&r_(u.settings.background)&&(m=u.settings.background);for(let h=0,_=l.length;h<_;h++){let y=l[h].trim().split(" "),C=y[y.length-1],k=null;y.length>1&&(k=y.slice(0,y.length-1),k.reverse()),n[r++]=new v5(C,k,i,c,f,m)}}return n}var v5=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Gt=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Gt||{});function S5(e,t){e.sort((c,f)=>{let m=ET(c.scope,f.scope);return m!==0||(m=_T(c.parentScopes,f.parentScopes),m!==0)?m:c.index-f.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let c=e.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(r=c.foreground),c.background!==null&&(i=c.background)}let a=new A5(t),u=new xT(n,a.getId(r),a.getId(i)),l=new N5(new Ph(0,null,-1,0,0),[]);for(let c=0,f=e.length;c<f;c++){let m=e[c];l.insert(0,m.scope,m.parentScopes,m.fontStyle,a.getId(m.foreground),a.getId(m.background))}return new $l(a,u,l)}var A5=class{constructor(e){Y(this,"_isFrozen");Y(this,"_lastColorId");Y(this,"_id2color");Y(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},I5=Object.freeze([]),Ph=class TT{constructor(t,n,r,i,a){Y(this,"scopeDepth");Y(this,"parentScopes");Y(this,"fontStyle");Y(this,"foreground");Y(this,"background");this.scopeDepth=t,this.parentScopes=n||I5,this.fontStyle=r,this.foreground=i,this.background=a}clone(){return new TT(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},N5=class Dh{constructor(t,n=[],r={}){Y(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const a=n.parentScopes[i].length-t.parentScopes[r].length;if(a!==0)return a;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,a;if(r===-1?(i=t,a=""):(i=t.substring(0,r),a=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(a)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Dh._cmpBySpecificity),n}insert(t,n,r,i,a,u){if(n===""){this._doInsertHere(t,r,i,a,u);return}let l=n.indexOf("."),c,f;l===-1?(c=n,f=""):(c=n.substring(0,l),f=n.substring(l+1));let m;this._children.hasOwnProperty(c)?m=this._children[c]:(m=new Dh(this._mainRule.clone(),Ph.cloneArr(this._rulesWithParentScopes)),this._children[c]=m),m.insert(t+1,f,r,i,a,u)}_doInsertHere(t,n,r,i,a){if(n===null){this._mainRule.acceptOverwrite(t,r,i,a);return}for(let u=0,l=this._rulesWithParentScopes.length;u<l;u++){let c=this._rulesWithParentScopes[u];if(_T(c.parentScopes,n)===0){c.acceptOverwrite(t,r,i,a);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),a===0&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new Ph(t,n,r,i,a))}},Vs=class Nn{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=Nn.getLanguageId(t),r=Nn.getTokenType(t),i=Nn.getFontStyle(t),a=Nn.getForeground(t),u=Nn.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:u})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,a,u,l){let c=Nn.getLanguageId(t),f=Nn.getTokenType(t),m=Nn.containsBalancedBrackets(t)?1:0,h=Nn.getFontStyle(t),_=Nn.getForeground(t),g=Nn.getBackground(t);return n!==0&&(c=n),r!==8&&(f=r),i!==null&&(m=i?1:0),a!==-1&&(h=a),u!==0&&(_=u),l!==0&&(g=l),(c<<0|f<<8|m<<10|h<<11|_<<15|g<<24)>>>0}};function zl(e,t){const n=[],r=L5(e);let i=r.next();for(;i!==null;){let c=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let f=u();if(n.push({matcher:f,priority:c}),i!==",")break;i=r.next()}return n;function a(){if(i==="-"){i=r.next();const c=a();return f=>!!c&&!c(f)}if(i==="("){i=r.next();const c=l();return i===")"&&(i=r.next()),c}if(i_(i)){const c=[];do c.push(i),i=r.next();while(i_(i));return f=>t(c,f)}return null}function u(){const c=[];let f=a();for(;f;)c.push(f),f=a();return m=>c.every(h=>h(m))}function l(){const c=[];let f=u();for(;f&&(c.push(f),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");f=u()}return m=>c.some(h=>h(m))}}function i_(e){return!!e&&!!e.match(/[\w\.:]+/)}function L5(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function kT(e){typeof e.dispose=="function"&&e.dispose()}var _o=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},R5=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},O5=class{constructor(){Y(this,"_references",[]);Y(this,"_seenReferenceKeys",new Set);Y(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},P5=class{constructor(e,t){Y(this,"seenFullScopeRequests",new Set);Y(this,"seenPartialScopeRequests",new Set);Y(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new _o(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new O5;for(const n of e)D5(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof _o){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function D5(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const a=n.lookup(t);e instanceof _o?kl({baseGrammar:a,selfGrammar:i},r):Mh(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);const u=n.injections(e.scopeName);if(u)for(const l of u)r.add(new _o(l))}function Mh(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Vl([r],t,n)}}function kl(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Vl(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Vl(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Vl(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?mT({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Vl(r.patterns,{...t,repository:i},n);const a=r.include;if(!a)continue;const u=wT(a);switch(u.kind){case 0:kl({...t,selfGrammar:t.baseGrammar},n);break;case 1:kl(t,n);break;case 2:Mh(u.ruleName,{...t,repository:i},n);break;case 3:case 4:const l=u.scopeName===t.selfGrammar.scopeName?t.selfGrammar:u.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(l){const c={baseGrammar:t.baseGrammar,selfGrammar:l,repository:i};u.kind===4?Mh(u.ruleName,c,n):kl(c,n)}else u.kind===4?n.add(new R5(u.scopeName,u.ruleName)):n.add(new _o(u.scopeName));break}}}var M5=class{constructor(){Y(this,"kind",0)}},B5=class{constructor(){Y(this,"kind",1)}},F5=class{constructor(e){Y(this,"kind",2);this.ruleName=e}},j5=class{constructor(e){Y(this,"kind",3);this.scopeName=e}},H5=class{constructor(e,t){Y(this,"kind",4);this.scopeName=e,this.ruleName=t}};function wT(e){if(e==="$base")return new M5;if(e==="$self")return new B5;const t=e.indexOf("#");if(t===-1)return new j5(e);if(t===0)return new F5(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new H5(n,r)}}var U5=/\\(\d+)/,s_=/\\(\d+)/g,$5=-1,CT=-2;var Fo=class{constructor(e,t,n,r){Y(this,"$location");Y(this,"id");Y(this,"_nameIsCapturing");Y(this,"_name");Y(this,"_contentNameIsCapturing");Y(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=ll.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=ll.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${gT(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:ll.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ll.replaceCaptures(this._contentName,e,t)}},z5=class extends Fo{constructor(t,n,r,i,a){super(t,n,r,i);Y(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,i){throw new Error("Not supported!")}},V5=class extends Fo{constructor(t,n,r,i,a){super(t,n,r,null);Y(this,"_match");Y(this,"captures");Y(this,"_cachedCompiledPatterns");this._match=new bo(i,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new yo,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},a_=class extends Fo{constructor(t,n,r,i,a){super(t,n,r,i);Y(this,"hasMissingPatterns");Y(this,"patterns");Y(this,"_cachedCompiledPatterns");this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new yo,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Bh=class extends Fo{constructor(t,n,r,i,a,u,l,c,f,m){super(t,n,r,i);Y(this,"_begin");Y(this,"beginCaptures");Y(this,"_end");Y(this,"endHasBackReferences");Y(this,"endCaptures");Y(this,"applyEndPatternLast");Y(this,"hasMissingPatterns");Y(this,"patterns");Y(this,"_cachedCompiledPatterns");this._begin=new bo(a,this.id),this.beginCaptures=u,this._end=new bo(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=f||!1,this.patterns=m.patterns,this.hasMissingPatterns=m.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,i)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new yo;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Gl=class extends Fo{constructor(t,n,r,i,a,u,l,c,f){super(t,n,r,i);Y(this,"_begin");Y(this,"beginCaptures");Y(this,"whileCaptures");Y(this,"_while");Y(this,"whileHasBackReferences");Y(this,"hasMissingPatterns");Y(this,"patterns");Y(this,"_cachedCompiledPatterns");Y(this,"_cachedCompiledWhilePatterns");this._begin=new bo(a,this.id),this.beginCaptures=u,this.whileCaptures=c,this._while=new bo(l,CT),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new yo;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,i){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,i)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new yo,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},vT=class Vt{static createCaptureRule(t,n,r,i,a){return t.registerRule(u=>new z5(n,u,r,i,a))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new V5(t.$vscodeTextmateLocation,t.id,t.name,t.match,Vt._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=mT({},r,t.repository));let a=t.patterns;return typeof a>"u"&&t.include&&(a=[{include:t.include}]),new a_(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Vt._compilePatterns(a,n,r))}return t.while?new Gl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Vt._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Vt._compileCaptures(t.whileCaptures||t.captures,n,r),Vt._compilePatterns(t.patterns,n,r)):new Bh(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Vt._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Vt._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Vt._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(const u in t){if(u==="$vscodeTextmateLocation")continue;const l=parseInt(u,10);l>a&&(a=l)}for(let u=0;u<=a;u++)i[u]=null;for(const u in t){if(u==="$vscodeTextmateLocation")continue;const l=parseInt(u,10);let c=0;t[u].patterns&&(c=Vt.getCompiledRuleId(t[u],n,r)),i[l]=Vt.createCaptureRule(n,t[u].$vscodeTextmateLocation,t[u].name,t[u].contentName,c)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,u=t.length;a<u;a++){const l=t[a];let c=-1;if(l.include){const f=wT(l.include);switch(f.kind){case 0:case 1:c=Vt.getCompiledRuleId(r[l.include],n,r);break;case 2:let m=r[f.ruleName];m&&(c=Vt.getCompiledRuleId(m,n,r));break;case 3:case 4:const h=f.scopeName,_=f.kind===4?f.ruleName:null,g=n.getExternalGrammar(h,r);if(g)if(_){let y=g.repository[_];y&&(c=Vt.getCompiledRuleId(y,n,g.repository))}else c=Vt.getCompiledRuleId(g.repository.$self,n,g.repository);break}}else c=Vt.getCompiledRuleId(l,n,r);if(c!==-1){const f=n.getRule(c);let m=!1;if((f instanceof a_||f instanceof Bh||f instanceof Gl)&&f.hasMissingPatterns&&f.patterns.length===0&&(m=!0),m)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},bo=class ST{constructor(t,n){Y(this,"source");Y(this,"ruleId");Y(this,"hasAnchor");Y(this,"hasBackReferences");Y(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let i=0,a=[],u=!1;for(let l=0;l<r;l++)if(t.charAt(l)==="\\"&&l+1<r){const f=t.charAt(l+1);f==="z"?(a.push(t.substring(i,l)),a.push("$(?!\\n)(?<!\\n)"),i=l+2):(f==="A"||f==="G")&&(u=!0),l++}this.hasAnchor=u,i===0?this.source=t:(a.push(t.substring(i,r)),this.source=a.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=U5.test(this.source):this.hasBackReferences=!1}clone(){return new ST(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return s_.lastIndex=0,this.source.replace(s_,(i,a)=>bT(r[parseInt(a,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],a,u,l,c;for(a=0,u=this.source.length;a<u;a++)l=this.source.charAt(a),t[a]=l,n[a]=l,r[a]=l,i[a]=l,l==="\\"&&a+1<u&&(c=this.source.charAt(a+1),c==="A"?(t[a+1]="",n[a+1]="",r[a+1]="A",i[a+1]="A"):c==="G"?(t[a+1]="",n[a+1]="G",r[a+1]="",i[a+1]="G"):(t[a+1]=c,n[a+1]=c,r[a+1]=c,i[a+1]=c),a++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},yo=class{constructor(){Y(this,"_items");Y(this,"_hasAnchors");Y(this,"_cached");Y(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new o_(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new o_(e,r,this._items.map(i=>i.ruleId))}},o_=class{constructor(e,t,n){Y(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
279
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Vf=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Ir,G5=(Ir=class{constructor(t,n){Y(this,"_defaultAttributes");Y(this,"_embeddedLanguagesMatcher");Y(this,"_getBasicScopeAttributes",new yT(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Vf(n,r)}));this._defaultAttributes=new Vf(t,8),this._embeddedLanguagesMatcher=new W5(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Ir._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Ir.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},Y(Ir,"_NULL_SCOPE_METADATA",new Vf(0,0)),Y(Ir,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Ir),W5=class{constructor(e){Y(this,"values");Y(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>bT(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},u_=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function AT(e,t,n,r,i,a,u,l){const c=t.content.length;let f=!1,m=-1;if(u){const g=q5(e,t,n,r,i,a);i=g.stack,r=g.linePos,n=g.isFirstLine,m=g.anchorPosition}const h=Date.now();for(;!f;){if(l!==0&&Date.now()-h>l)return new u_(i,!0);_()}return new u_(i,!1);function _(){const g=Y5(e,t,n,r,i,m);if(!g){a.produce(i,c),f=!0;return}const y=g.captureIndices,C=g.matchedRuleId,k=y&&y.length>0?y[0].end>r:!1;if(C===$5){const w=i.getRule(e);a.produce(i,y[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ja(e,t,n,i,a,w.endCaptures,y),a.produce(i,y[0].end);const D=i;if(i=i.parent,m=D.getAnchorPos(),!k&&D.getEnterPos()===r){i=D,a.produce(i,c),f=!0;return}}else{const w=e.getRule(C);a.produce(i,y[0].start);const D=i,N=w.getName(t.content,y),U=i.contentNameScopesList.pushAttributed(N,e);if(i=i.push(C,r,m,y[0].end===c,null,U,U),w instanceof Bh){const z=w;Ja(e,t,n,i,a,z.beginCaptures,y),a.produce(i,y[0].end),m=y[0].end;const B=z.getContentName(t.content,y),X=U.pushAttributed(B,e);if(i=i.withContentNameScopesList(X),z.endHasBackReferences&&(i=i.withEndRule(z.getEndWithResolvedBackReferences(t.content,y))),!k&&D.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),f=!0;return}}else if(w instanceof Gl){const z=w;Ja(e,t,n,i,a,z.beginCaptures,y),a.produce(i,y[0].end),m=y[0].end;const B=z.getContentName(t.content,y),X=U.pushAttributed(B,e);if(i=i.withContentNameScopesList(X),z.whileHasBackReferences&&(i=i.withEndRule(z.getWhileWithResolvedBackReferences(t.content,y))),!k&&D.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),f=!0;return}}else if(Ja(e,t,n,i,a,w.captures,y),a.produce(i,y[0].end),i=i.pop(),!k){i=i.safePop(),a.produce(i,c),f=!0;return}}y[0].end>r&&(r=y[0].end,n=!1)}}function q5(e,t,n,r,i,a){let u=i.beginRuleCapturedEOL?0:-1;const l=[];for(let c=i;c;c=c.pop()){const f=c.getRule(e);f instanceof Gl&&l.push({rule:f,stack:c})}for(let c=l.pop();c;c=l.pop()){const{ruleScanner:f,findOptions:m}=X5(c.rule,e,c.stack.endRule,n,r===u),h=f.findNextMatchSync(t,r,m);if(h){if(h.ruleId!==CT){i=c.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(a.produce(c.stack,h.captureIndices[0].start),Ja(e,t,n,c.stack,a,c.rule.whileCaptures,h.captureIndices),a.produce(c.stack,h.captureIndices[0].end),u=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:u,isFirstLine:n}}function Y5(e,t,n,r,i,a){const u=Q5(e,t,n,r,i,a),l=e.getInjections();if(l.length===0)return u;const c=K5(l,e,t,n,r,i,a);if(!c)return u;if(!u)return c;const f=u.captureIndices[0].start,m=c.captureIndices[0].start;return m<f||c.priorityMatch&&m===f?c:u}function Q5(e,t,n,r,i,a){const u=i.getRule(e),{ruleScanner:l,findOptions:c}=IT(u,e,i.endRule,n,r===a),f=l.findNextMatchSync(t,r,c);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function K5(e,t,n,r,i,a,u){let l=Number.MAX_VALUE,c=null,f,m=0;const h=a.contentNameScopesList.getScopeNames();for(let _=0,g=e.length;_<g;_++){const y=e[_];if(!y.matcher(h))continue;const C=t.getRule(y.ruleId),{ruleScanner:k,findOptions:w}=IT(C,t,null,r,i===u),D=k.findNextMatchSync(n,i,w);if(!D)continue;const N=D.captureIndices[0].start;if(!(N>=l)&&(l=N,c=D.captureIndices,f=D.ruleId,m=y.priority,l===i))break}return c?{priorityMatch:m===-1,captureIndices:c,matchedRuleId:f}:null}function IT(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function X5(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Ja(e,t,n,r,i,a,u){if(a.length===0)return;const l=t.content,c=Math.min(a.length,u.length),f=[],m=u[0].end;for(let h=0;h<c;h++){const _=a[h];if(_===null)continue;const g=u[h];if(g.length===0)continue;if(g.start>m)break;for(;f.length>0&&f[f.length-1].endPos<=g.start;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?i.produceFromScopes(f[f.length-1].scopes,g.start):i.produce(r,g.start),_.retokenizeCapturedWithRuleId){const C=_.getName(l,u),k=r.contentNameScopesList.pushAttributed(C,e),w=_.getContentName(l,u),D=k.pushAttributed(w,e),N=r.push(_.retokenizeCapturedWithRuleId,g.start,-1,!1,null,k,D),U=e.createOnigString(l.substring(0,g.end));AT(e,U,n&&g.start===0,g.start,N,i,!1,0),kT(U);continue}const y=_.getName(l,u);if(y!==null){const k=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(y,e);f.push(new Z5(k,g.end))}}for(;f.length>0;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var Z5=class{constructor(e,t){Y(this,"scopes");Y(this,"endPos");this.scopes=e,this.endPos=t}};function J5(e,t,n,r,i,a,u,l){return new t8(e,t,n,r,i,a,u,l)}function l_(e,t,n,r,i){const a=zl(t,Wl),u=vT.getCompiledRuleId(n,r,i.repository);for(const l of a)e.push({debugSelector:t,matcher:l.matcher,ruleId:u,grammar:i,priority:l.priority})}function Wl(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(e8(t[i],r))return n=i+1,!0;return!1})}function e8(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var t8=class{constructor(e,t,n,r,i,a,u,l){Y(this,"_rootId");Y(this,"_lastRuleId");Y(this,"_ruleId2desc");Y(this,"_includedGrammars");Y(this,"_grammarRepository");Y(this,"_grammar");Y(this,"_injections");Y(this,"_basicScopeAttributesProvider");Y(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=l,this._basicScopeAttributesProvider=new G5(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=u,this._grammar=c_(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const f=zl(c,Wl);for(const m of f)this._tokenTypeMatchers.push({matcher:m.matcher,type:i[c]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let u in i)l_(t,u,i[u],this,r);const a=this._grammarRepository.injections(n);a&&a.forEach(u=>{const l=this.getExternalGrammar(u);if(l){const c=l.injectionSelector;c&&l_(t,c,l,this,l)}})}return t.sort((i,a)=>i.priority-a.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=c_(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=vT.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Fh.NULL){i=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),m=this.themeProvider.getDefaults(),h=Vs.set(0,f.languageId,f.tokenType,null,m.fontStyle,m.foregroundId,m.backgroundId),_=this.getRule(this._rootId).getName(null,null);let g;_?g=lo.createRootAndLookUpScopeName(_,h,this):g=lo.createRoot("unknown",h),t=new Fh(null,this._rootId,-1,-1,!1,null,g,g)}else i=!1,t.reset();e=e+`
|
|
280
|
+
`;const a=this.createOnigString(e),u=a.content.length,l=new r8(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=AT(this,a,i,0,t,l,!0,r);return kT(a),{lineLength:u,lineTokens:l,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function c_(e,t){return e=y5(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var lo=class ar{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=(t==null?void 0:t.scopePath)??null;for(const a of n)i=zf.push(i,a.scopeNames),r=new ar(r,i,a.encodedTokenAttributes);return r}static createRoot(t,n){return new ar(null,new zf(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),a=new zf(null,t),u=r.themeProvider.themeMatch(a),l=ar.mergeAttributes(n,i,u);return new ar(null,a,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return ar.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,a=0,u=0;return r!==null&&(i=r.fontStyle,a=r.foregroundId,u=r.backgroundId),Vs.set(t,n.languageId,n.tokenType,null,i,a,u)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return ar._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const a of r)i=ar._pushAttributed(i,a,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),a=t.scopePath.push(n),u=r.themeProvider.themeMatch(a),l=ar.mergeAttributes(t.tokenAttributes,i,u);return new ar(t,a,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var i;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((i=r.parent)==null?void 0:i.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},Pn,Fh=(Pn=class{constructor(t,n,r,i,a,u,l,c){Y(this,"_stackElementBrand");Y(this,"_enterPos");Y(this,"_anchorPos");Y(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=a,this.endRule=u,this.nameScopesList=l,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(t){return t===null?!1:Pn._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?lo.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Pn._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,u,l){return new Pn(this,t,n,r,i,a,u,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var r,i;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Pn(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=lo.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new Pn(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,lo.fromExtension(r,n.contentNameScopesList))}},Y(Pn,"NULL",new Pn(null,0,0,0,!1,null,null,null)),Pn),n8=class{constructor(e,t){Y(this,"balancedBracketScopes");Y(this,"unbalancedBracketScopes");Y(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):zl(n,Wl).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>zl(n,Wl).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},r8=class{constructor(e,t,n,r){Y(this,"_emitBinaryTokens");Y(this,"_lineText");Y(this,"_tokens");Y(this,"_binaryTokens");Y(this,"_lastTokenEndIndex");Y(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=(e==null?void 0:e.tokenAttributes)??0,a=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const u=(e==null?void 0:e.getScopeNames())??[];for(const l of this._tokenTypeOverrides)l.matcher(u)&&(i=Vs.set(i,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(u))}if(a&&(i=Vs.set(i,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},i8=class{constructor(e,t){Y(this,"_grammars",new Map);Y(this,"_rawGrammars",new Map);Y(this,"_injectionGrammars",new Map);Y(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,J5(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},s8=class{constructor(t){Y(this,"_options");Y(this,"_syncRegistry");Y(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new i8($l.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme($l.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new n8(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,a){const u=new P5(this._syncRegistry,t);for(;u.Q.length>0;)u.Q.map(l=>this._loadSingleGrammar(l.scopeName)),u.processQueue();return this._grammarForScopeName(t,n,r,i,a)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,a=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,a)}},jh=Fh.NULL;const a8=/["&'<>`]/g,o8=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u8=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l8=/[|\\{}()[\]^$+*?.]/g,d_=new WeakMap;function c8(e,t){if(e=e.replace(t.subset?d8(t.subset):a8,r),t.subset||t.escapeOnly)return e;return e.replace(o8,n).replace(u8,r);function n(i,a,u){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,u.charCodeAt(a+2),t)}function r(i,a,u){return t.format(i.charCodeAt(0),u.charCodeAt(a+1),t)}}function d8(e){let t=d_.get(e);return t||(t=f8(e),d_.set(e,t)),t}function f8(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(l8,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const h8=/[\dA-Fa-f]/;function p8(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!h8.test(String.fromCharCode(t))?r:r+";"}const m8=/\d/;function g8(e,t,n){const r="&#"+String(e);return n&&t&&!m8.test(String.fromCharCode(t))?r:r+";"}const E8=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Gf={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",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:"€"},_8=["cent","copy","divide","gt","lt","not","para","times"],NT={}.hasOwnProperty,Hh={};let cl;for(cl in Gf)NT.call(Gf,cl)&&(Hh[Gf[cl]]=cl);const b8=/[^\dA-Za-z]/;function y8(e,t,n,r){const i=String.fromCharCode(e);if(NT.call(Hh,i)){const a=Hh[i],u="&"+a;return n&&E8.includes(a)&&!_8.includes(a)&&(!r||t&&t!==61&&b8.test(String.fromCharCode(t)))?u:u+";"}return""}function x8(e,t,n){let r=p8(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=y8(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const a=g8(e,t,n.omitOptionalSemicolons);a.length<r.length&&(r=a)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Hs(e,t){return c8(e,Object.assign({format:x8},t))}const T8=/^>|^->|<!--|-->|--!>|<!-$/g,k8=[">"],w8=["<",">"];function C8(e,t,n,r){return r.settings.bogusComments?"<?"+Hs(e.value,Object.assign({},r.settings.characterReferences,{subset:k8}))+">":"<!--"+e.value.replace(T8,i)+"-->";function i(a){return Hs(a,Object.assign({},r.settings.characterReferences,{subset:w8}))}}function v8(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}const vt=RT(1),LT=RT(-1),S8=[];function RT(e){return t;function t(n,r,i){const a=n?n.children:S8;let u=(r||0)+e,l=a[u];if(!i)for(;l&&Zl(l);)u+=e,l=a[u];return l}}const A8={}.hasOwnProperty;function OT(e){return t;function t(n,r,i){return A8.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const Qp=OT({body:N8,caption:Wf,colgroup:Wf,dd:P8,dt:O8,head:Wf,html:I8,li:R8,optgroup:D8,option:M8,p:L8,rp:f_,rt:f_,tbody:F8,td:h_,tfoot:j8,th:h_,thead:B8,tr:H8});function Wf(e,t,n){const r=vt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Zl(r.value.charAt(0)))}function I8(e,t,n){const r=vt(n,t);return!r||r.type!=="comment"}function N8(e,t,n){const r=vt(n,t);return!r||r.type!=="comment"}function L8(e,t,n){const r=vt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.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 R8(e,t,n){const r=vt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function O8(e,t,n){const r=vt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function P8(e,t,n){const r=vt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function f_(e,t,n){const r=vt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function D8(e,t,n){const r=vt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function M8(e,t,n){const r=vt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function B8(e,t,n){const r=vt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function F8(e,t,n){const r=vt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function j8(e,t,n){return!vt(n,t)}function H8(e,t,n){const r=vt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function h_(e,t,n){const r=vt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const U8=OT({body:V8,colgroup:G8,head:z8,html:$8,tbody:W8});function $8(e){const t=vt(e,-1);return!t||t.type!=="comment"}function z8(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function V8(e){const t=vt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Zl(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function G8(e,t,n){const r=LT(n,t),i=vt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Qp(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function W8(e,t,n){const r=LT(n,t),i=vt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Qp(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const dl={name:[[`
|
|
281
|
+
\f\r &/=>`.split(""),`
|
|
282
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
283
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
284
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
285
|
+
\f\r &>`.split(""),`\0
|
|
286
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
287
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
288
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function q8(e,t,n,r){const i=r.schema,a=i.space==="svg"?!1:r.settings.omitOptionalTags;let u=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const l=[];let c;i.space==="html"&&e.tagName==="svg"&&(r.schema=cr);const f=Y8(r,e.properties),m=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,m&&(u=!1),(f||!a||!U8(e,t,n))&&(l.push("<",e.tagName,f?" "+f:""),u&&(i.space==="svg"||r.settings.closeSelfClosing)&&(c=f.charAt(f.length-1),(!r.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(m),!u&&(!a||!Qp(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function Y8(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const a=Q8(e,i,t[i]);a&&n.push(a)}}for(;++r<n.length;){const a=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&a!=='"'&&a!=="'"&&(n[r]+=" ")}return n.join("")}function Q8(e,t,n){const r=Lo(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,a=e.settings.allowDangerousCharacters?0:1;let u=e.quote,l;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=Hs(r.attribute,Object.assign({},e.settings.characterReferences,{subset:dl.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Jh:tp)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(l=Hs(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:dl.unquoted[i][a]}))),l!==n&&(e.settings.quoteSmart&&Ll(n,u)>Ll(n,e.alternative)&&(u=e.alternative),l=u+Hs(n,Object.assign({},e.settings.characterReferences,{subset:(u==="'"?dl.single:dl.double)[i][a],attribute:!0}))+u),c+(l&&"="+l))}const K8=["<","&"];function PT(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Hs(e.value,Object.assign({},r.settings.characterReferences,{subset:K8}))}function X8(e,t,n,r){return r.settings.allowDangerousHtml?e.value:PT(e,t,n,r)}function Z8(e,t,n,r){return r.all(e)}const J8=pp("type",{invalid:eM,unknown:tM,handlers:{comment:C8,doctype:v8,element:q8,raw:X8,root:Z8,text:PT}});function eM(e){throw new Error("Expected node, not `"+e+"`")}function tM(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const nM={},rM={},iM=[];function sM(e,t){const n=t||nM,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:aM,all:oM,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||oy,characterReferences:n.characterReferences||rM,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?cr:Ws,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function aM(e,t,n){return J8(e,t,n,this)}function oM(e){const t=[],n=e&&e.children||iM;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function xo(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,a]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof a=="string"?n[i]=a:i===r&&Object.assign(n,a);return n}function Lr(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function DT(e){return Array.isArray(e)?e:[e]}async function Kp(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function mc(e){return!e||["plaintext","txt","text","plain"].includes(e)}function Xp(e){return e==="ansi"||mc(e)}function gc(e){return e==="none"}function Zp(e){return gc(e)}function Jp(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const i of n)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}function jo(e,t=!1){var a;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const i=[];for(let u=0;u<n.length;u+=2){const l=t?n[u]+(n[u+1]||""):n[u];i.push([l,r]),r+=n[u].length,r+=((a=n[u+1])==null?void 0:a.length)||0}return i}function MT(e){const t=jo(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let a=i,u=0;for(const l of t){if(a<l.length)break;a-=l.length,u++}return{line:u,character:a}}function r(i,a){let u=0;for(let l=0;l<i;l++)u+=t[l].length;return u+=a,u}return{lines:t,indexToPos:n,posToIndex:r}}function BT(e,t,n){const r=new Set;for(const a of e.matchAll(/:?lang=["']([^"']+)["']/g)){const u=a[1].toLowerCase().trim();u&&r.add(u)}for(const a of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const u=a[1].toLowerCase().trim();u&&r.add(u)}for(const a of e.matchAll(/\\begin\{([\w-]+)\}/g)){const u=a[1].toLowerCase().trim();u&&r.add(u)}for(const a of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const u=a[1].toLowerCase().trim(),l=u.includes("/")?u.split("/").pop():u;l&&r.add(l)}if(!n)return Array.from(r);const i=n.getBundledLanguages();return Array.from(r).filter(a=>a&&i[a])}const em="light-dark()",uM=["color","background-color"];function FT(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function jT(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const a=n.filter(u=>i.offset<u&&u<i.offset+i.content.length).map(u=>u-i.offset).sort((u,l)=>u-l);return a.length?FT(i,a):i})):e}function HT(e,t,n,r,i="css-vars"){const a={content:e.content,explanation:e.explanation,offset:e.offset},u=t.map(m=>To(e.variants[m])),l=new Set(u.flatMap(m=>Object.keys(m))),c={},f=(m,h)=>{const _=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return n+t[m]+(h==="color"?"":_)};return u.forEach((m,h)=>{for(const _ of l){const g=m[_]||"inherit";if(h===0&&r&&uM.includes(_))if(r===em&&u.length>1){const y=t.findIndex(D=>D==="light"),C=t.findIndex(D=>D==="dark");if(y===-1||C===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const k=u[y][_]||"inherit",w=u[C][_]||"inherit";c[_]=`light-dark(${k}, ${w})`,i==="css-vars"&&(c[f(h,_)]=g)}else c[_]=g;else i==="css-vars"&&(c[f(h,_)]=g)}}),a.htmlStyle=c,a}function To(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Gt.Italic&&(t["font-style"]="italic"),e.fontStyle&Gt.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Gt.Underline&&n.push("underline"),e.fontStyle&Gt.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function ql(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const UT=new WeakMap;function Ec(e,t){UT.set(e,t)}function ko(e){return UT.get(e)}class Zs{constructor(...t){Y(this,"_stacks",{});Y(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Zs(Object.fromEntries(DT(n).map(r=>[r,jh])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return lM(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function lM(e){const t=[],n=new Set;function r(i){var u;if(n.has(i))return;n.add(i);const a=(u=i==null?void 0:i.nameScopesList)==null?void 0:u.scopeName;a&&t.push(a),i.parent&&r(i.parent)}return r(e),t}function cM(e,t){if(!(e instanceof Zs))throw new mt("Invalid grammar state");return e.getInternalStack(t)}function $T(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(u){if(typeof u=="number"){if(u<0||u>n.source.length)throw new mt(`Invalid decoration offset: ${u}. Code length: ${n.source.length}`);return{...i.indexToPos(u),offset:u}}else{const l=i.lines[u.line];if(l===void 0)throw new mt(`Invalid decoration position ${JSON.stringify(u)}. Lines length: ${i.lines.length}`);let c=u.character;if(c<0&&(c=l.length+c),c<0||c>l.length)throw new mt(`Invalid decoration position ${JSON.stringify(u)}. Line ${u.line} length: ${l.length}`);return{...u,character:c,offset:i.posToIndex(u.line,c)}}};const i=MT(n.source),a=(n.options.decorations||[]).map(u=>({...u,start:r(u.start),end:r(u.end)}));dM(a),e.set(n.meta,{decorations:a,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var u;if(!((u=this.options.decorations)!=null&&u.length))return;const i=t(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]);return jT(n,i)},code(n){var m;if(!((m=this.options.decorations)!=null&&m.length))return;const r=t(this),i=Array.from(n.children).filter(h=>h.type==="element"&&h.tagName==="span");if(i.length!==r.converter.lines.length)throw new mt(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function a(h,_,g,y){const C=i[h];let k="",w=-1,D=-1;if(_===0&&(w=0),g===0&&(D=0),g===Number.POSITIVE_INFINITY&&(D=C.children.length),w===-1||D===-1)for(let U=0;U<C.children.length;U++)k+=zT(C.children[U]),w===-1&&k.length===_&&(w=U+1),D===-1&&k.length===g&&(D=U+1);if(w===-1)throw new mt(`Failed to find start index for decoration ${JSON.stringify(y.start)}`);if(D===-1)throw new mt(`Failed to find end index for decoration ${JSON.stringify(y.end)}`);const N=C.children.slice(w,D);if(!y.alwaysWrap&&N.length===C.children.length)l(C,y,"line");else if(!y.alwaysWrap&&N.length===1&&N[0].type==="element")l(N[0],y,"token");else{const U={type:"element",tagName:"span",properties:{},children:N};l(U,y,"wrapper"),C.children.splice(w,N.length,U)}}function u(h,_){i[h]=l(i[h],_,"line")}function l(h,_,g){var k;const y=_.properties||{},C=_.transform||(w=>w);return h.tagName=_.tagName||"span",h.properties={...h.properties,...y,class:h.properties.class},(k=_.properties)!=null&&k.class&&Jp(h,_.properties.class),h=C(h,g)||h,h}const c=[],f=r.decorations.sort((h,_)=>_.start.offset-h.start.offset||h.end.offset-_.end.offset);for(const h of f){const{start:_,end:g}=h;if(_.line===g.line)a(_.line,_.character,g.character,h);else if(_.line<g.line){a(_.line,_.character,Number.POSITIVE_INFINITY,h);for(let y=_.line+1;y<g.line;y++)c.unshift(()=>u(y,h));a(g.line,0,g.character,h)}}c.forEach(h=>h())}}}function dM(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new mt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],a=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,u=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,l=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,c=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(a||u||l||c){if(a&&u||l&&c||l&&n.start.offset===n.end.offset||u&&i.start.offset===i.end.offset)continue;throw new mt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function zT(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(zT).join(""):""}const fM=[$T()];function Yl(e){const t=hM(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...fM]}function hM(e){const t=[],n=[],r=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Ui=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],qf={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function pM(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function p_(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function mM(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)qf[r]&&t.push({type:"setDecoration",value:qf[r]});else if(r<=29){const i=qf[r-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Ui[r-30]}});else if(r===38){const i=p_(e);i&&t.push({type:"setForegroundColor",value:i})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Ui[r-40]}});else if(r===48){const i=p_(e);i&&t.push({type:"setBackgroundColor",value:i})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Ui[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Ui[r-100+8]}})}return t}function gM(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let a=0;do{const u=pM(r,a),l=u.sequence?r.substring(a,u.startPosition):r.substring(a);if(l.length>0&&i.push({value:l,foreground:e,background:t,decorations:new Set(n)}),u.sequence){const c=mM(u.sequence);for(const f of c)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of c)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}a=u.position}while(a<r.length);return i}}}var EM={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function _M(e=EM){function t(l){return e[l]}function n(l){return`#${l.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let f=0;f<Ui.length;f++)r.push(t(Ui[f]));let l=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let m=0;m<6;m++)for(let h=0;h<6;h++)r.push(n([l[f],l[m],l[h]]));let c=8;for(let f=0;f<24;f++,c+=10)r.push(n([c,c,c]));return r}function a(l){return i()[l]}function u(l){switch(l.type){case"named":return t(l.name);case"rgb":return n(l.rgb);case"table":return a(l.index)}}return{value:u}}const bM={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function VT(e,t,n){const r=xo(e,n),i=jo(t),a=Object.fromEntries(Ui.map(c=>{var h;const f=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`,m=(h=e.colors)==null?void 0:h[f];return[c,m||bM[c]]})),u=_M(a),l=gM();return i.map(c=>l.parse(c[0]).map(f=>{let m,h;f.decorations.has("reverse")?(m=f.background?u.value(f.background):e.bg,h=f.foreground?u.value(f.foreground):e.fg):(m=f.foreground?u.value(f.foreground):e.fg,h=f.background?u.value(f.background):void 0),m=Lr(m,r),h=Lr(h,r),f.decorations.has("dim")&&(m=yM(m));let _=Gt.None;return f.decorations.has("bold")&&(_|=Gt.Bold),f.decorations.has("italic")&&(_|=Gt.Italic),f.decorations.has("underline")&&(_|=Gt.Underline),f.decorations.has("strikethrough")&&(_|=Gt.Strikethrough),{content:f.value,offset:c[1],color:m,bgColor:h,fontStyle:_}}))}function yM(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],a=r[1],u=r[2],l=r[3],c=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${a}${a}${u}${u}${c}`}else if(r.length===3){const i=r[0],a=r[1],u=r[2];return`#${i}${i}${a}${a}${u}${u}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function _c(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(mc(i)||gc(r))return jo(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:a,colorMap:u}=e.setTheme(r);if(i==="ansi")return VT(a,t,n);const l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new mt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(a.name))throw new mt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return WT(t,l,a,u,n)}function GT(...e){if(e.length===2)return ko(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:a=t.getLoadedThemes()[0]}=r;if(mc(i)||gc(a))throw new mt("Plain language does not have grammar state");if(i==="ansi")throw new mt("ANSI language does not have grammar state");const{theme:u,colorMap:l}=t.setTheme(a),c=t.getLanguage(i);return new Zs(tm(n,c,u,l,r).stateStack,c.name,u.name)}function WT(e,t,n,r,i){const a=tm(e,t,n,r,i),u=new Zs(a.stateStack,t.name,n.name);return Ec(a.tokens,u),a.tokens}function tm(e,t,n,r,i){const a=xo(n,i),{tokenizeMaxLineLength:u=0,tokenizeTimeLimit:l=500}=i,c=jo(e);let f=i.grammarState?cM(i.grammarState,n.name)??jh:i.grammarContextCode!=null?tm(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:jh,m=[];const h=[];for(let _=0,g=c.length;_<g;_++){const[y,C]=c[_];if(y===""){m=[],h.push([]);continue}if(u>0&&y.length>=u){m=[],h.push([{content:y,offset:C,color:"",fontStyle:0}]);continue}let k,w,D;i.includeExplanation&&(k=t.tokenizeLine(y,f,l),w=k.tokens,D=0);const N=t.tokenizeLine2(y,f,l),U=N.tokens.length/2;for(let z=0;z<U;z++){const B=N.tokens[2*z],X=z+1<U?N.tokens[2*z+2]:y.length;if(B===X)continue;const Q=N.tokens[2*z+1],ne=Lr(r[Vs.getForeground(Q)],a),$=Vs.getFontStyle(Q),oe={content:y.substring(B,X),offset:C+B,color:ne,fontStyle:$};if(i.includeExplanation){const ue=[];if(i.includeExplanation!=="scopeName")for(const he of n.settings){let te;switch(typeof he.scope){case"string":te=he.scope.split(/,/).map(ee=>ee.trim());break;case"object":te=he.scope;break;default:continue}ue.push({settings:he,selectors:te.map(ee=>ee.split(/ /))})}oe.explanation=[];let ve=0;for(;B+ve<X;){const he=w[D],te=y.substring(he.startIndex,he.endIndex);ve+=te.length,oe.explanation.push({content:te,scopes:i.includeExplanation==="scopeName"?xM(he.scopes):TM(ue,he.scopes)}),D+=1}}m.push(oe)}h.push(m),m=[],f=N.ruleStack}return{tokens:h,stateStack:f}}function xM(e){return e.map(t=>({scopeName:t}))}function TM(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const a=t[r];n[r]={scopeName:a,themeMatches:wM(e,a,t.slice(0,r))}}return n}function m_(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function kM(e,t,n){if(!m_(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)m_(e[r],n[i])&&(r-=1),i-=1;return r===-1}function wM(e,t,n){const r=[];for(const{selectors:i,settings:a}of e)for(const u of i)if(kM(u,t,n)){r.push(a);break}return r}function nm(e,t,n){const r=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),i=r.map(c=>{const f=_c(e,t,{...n,theme:c.theme}),m=ko(f),h=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:f,state:m,theme:h}}),a=CM(...i.map(c=>c.tokens)),u=a[0].map((c,f)=>c.map((m,h)=>{const _={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(_.explanation=m.explanation),a.forEach((g,y)=>{const{content:C,explanation:k,offset:w,...D}=g[f][h];_.variants[r[y].color]=D}),_})),l=i[0].state?new Zs(Object.fromEntries(i.map(c=>{var f;return[c.theme,(f=c.state)==null?void 0:f.getInternalStack(c.theme)]})),i[0].state.lang):void 0;return l&&Ec(u,l),u}function CM(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(c=>c[r]),a=t.map(()=>[]);t.forEach((c,f)=>c.push(a[f]));const u=i.map(()=>0),l=i.map(c=>c[0]);for(;l.every(c=>c);){const c=Math.min(...l.map(f=>f.content.length));for(let f=0;f<n;f++){const m=l[f];m.content.length===c?(a[f].push(m),u[f]+=1,l[f]=i[f][u[f]]):(a[f].push({...m,content:m.content.slice(0,c)}),l[f]={...m,content:m.content.slice(c),offset:m.offset+c})}}}return t}function wo(e,t,n){let r,i,a,u,l,c;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:m="--shiki-",colorsRendering:h="css-vars"}=n,_=Object.entries(n.themes).filter(w=>w[1]).map(w=>({color:w[0],theme:w[1]})).sort((w,D)=>w.color===f?-1:D.color===f?1:0);if(_.length===0)throw new mt("`themes` option must not be empty");const g=nm(e,t,n);if(c=ko(g),f&&em!==f&&!_.find(w=>w.color===f))throw new mt(`\`themes\` option must contain the defaultColor key \`${f}\``);const y=_.map(w=>e.getTheme(w.theme)),C=_.map(w=>w.color);a=g.map(w=>w.map(D=>HT(D,C,m,f,h))),c&&Ec(a,c);const k=_.map(w=>xo(w.theme,n));i=g_(_,y,k,m,f,"fg",h),r=g_(_,y,k,m,f,"bg",h),u=`shiki-themes ${y.map(w=>w.name).join(" ")}`,l=f?void 0:[i,r].join(";")}else if("theme"in n){const f=xo(n.theme,n);a=_c(e,t,n);const m=e.getTheme(n.theme);r=Lr(m.bg,f),i=Lr(m.fg,f),u=m.name,c=ko(a)}else throw new mt("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:u,rootStyle:l,grammarState:c}}function g_(e,t,n,r,i,a,u){return e.map((l,c)=>{const f=Lr(t[c][a],n[c])||"inherit",m=`${r+l.color}${a==="bg"?"-bg":""}:${f}`;if(c===0&&i){if(i===em&&e.length>1){const h=e.findIndex(C=>C.color==="light"),_=e.findIndex(C=>C.color==="dark");if(h===-1||_===-1)throw new mt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const g=Lr(t[h][a],n[h])||"inherit",y=Lr(t[_][a],n[_])||"inherit";return`light-dark(${g}, ${y});${m}`}return f}return u==="css-vars"?m:null}).filter(l=>!!l).join(";")}function Co(e,t,n,r={meta:{},options:n,codeToHast:(i,a)=>Co(e,i,a),codeToTokens:(i,a)=>wo(e,i,a)}){var y,C;let i=t;for(const k of Yl(n))i=((y=k.preprocess)==null?void 0:y.call(r,i,n))||i;let{tokens:a,fg:u,bg:l,themeName:c,rootStyle:f,grammarState:m}=wo(e,i,n);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:_=!1}=n;h===!0?a=vM(a):h==="never"&&(a=SM(a)),_&&(a=AM(a));const g={...r,get source(){return i}};for(const k of Yl(n))a=((C=k.tokens)==null?void 0:C.call(g,a))||a;return qT(a,{...n,fg:u,bg:l,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},g,m)}function qT(e,t,n,r=ko(e)){var C,k,w,D;const i=Yl(t),a=[],u={type:"root",children:[]},{structure:l="classic",tabindex:c="0"}=t,f={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?f.style=t.rootStyle:f.style=`background-color:${t.bg};color:${t.fg}`),c!==!1&&c!=null&&(f.tabindex=c.toString());for(const[N,U]of Object.entries(t.meta||{}))N.startsWith("_")||(f[N]=U);let m={type:"element",tagName:"pre",properties:f,children:[],data:t.data},h={type:"element",tagName:"code",properties:{},children:a};const _=[],g={...n,structure:l,addClassToHast:Jp,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return u},get pre(){return m},get code(){return h},get lines(){return _}};if(e.forEach((N,U)=>{var X,Q;U&&(l==="inline"?u.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&a.push({type:"text",value:`
|
|
289
|
+
`}));let z={type:"element",tagName:"span",properties:{class:"line"},children:[]},B=0;for(const ne of N){let $={type:"element",tagName:"span",properties:{...ne.htmlAttrs},children:[{type:"text",value:ne.content}]};const oe=ql(ne.htmlStyle||To(ne));oe&&($.properties.style=oe);for(const ue of i)$=((X=ue==null?void 0:ue.span)==null?void 0:X.call(g,$,U+1,B,z,ne))||$;l==="inline"?u.children.push($):l==="classic"&&z.children.push($),B+=ne.content.length}if(l==="classic"){for(const ne of i)z=((Q=ne==null?void 0:ne.line)==null?void 0:Q.call(g,z,U+1))||z;_.push(z),a.push(z)}else l==="inline"&&_.push(z)}),l==="classic"){for(const N of i)h=((C=N==null?void 0:N.code)==null?void 0:C.call(g,h))||h;m.children.push(h);for(const N of i)m=((k=N==null?void 0:N.pre)==null?void 0:k.call(g,m))||m;u.children.push(m)}else if(l==="inline"){const N=[];let U={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const X of u.children)X.type==="element"&&X.tagName==="br"?(N.push(U),U={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(X.type==="element"||X.type==="text")&&U.children.push(X);N.push(U);let B={type:"element",tagName:"code",properties:{},children:N};for(const X of i)B=((w=X==null?void 0:X.code)==null?void 0:w.call(g,B))||B;u.children=[];for(let X=0;X<B.children.length;X++){X>0&&u.children.push({type:"element",tagName:"br",properties:{},children:[]});const Q=B.children[X];Q.type==="element"&&u.children.push(...Q.children)}}let y=u;for(const N of i)y=((D=N==null?void 0:N.root)==null?void 0:D.call(g,y))||y;return r&&Ec(y,r),y}function vM(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((a,u)=>{const c=!(a.fontStyle&&(a.fontStyle&Gt.Underline||a.fontStyle&Gt.Strikethrough));c&&a.content.match(/^\s+$/)&&t[u+1]?(i===void 0&&(i=a.offset),r+=a.content):r?(c?n.push({...a,offset:i,content:r+a.content}):n.push({content:r,offset:i},a),i=void 0,r=""):n.push(a)}),n})}function SM(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,a,u]=r;if(!i&&!u)return n;const l=[{...n,offset:n.offset+i.length,content:a}];return i&&l.unshift({content:i,offset:n.offset}),u&&l.push({content:u,offset:n.offset+i.length+a.length}),l}))}function AM(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n[n.length-1],a=ql(i.htmlStyle||To(i)),u=ql(r.htmlStyle||To(r)),l=i.fontStyle&&(i.fontStyle&Gt.Underline||i.fontStyle&Gt.Strikethrough),c=r.fontStyle&&(r.fontStyle&Gt.Underline||r.fontStyle&Gt.Strikethrough);!l&&!c&&a===u?i.content+=r.content:n.push({...r})}return n})}const YT=sM;function QT(e,t,n){var a;const r={meta:{},options:n,codeToHast:(u,l)=>Co(e,u,l),codeToTokens:(u,l)=>wo(e,u,l)};let i=YT(Co(e,t,n,r));for(const u of Yl(n))i=((a=u.postprocess)==null?void 0:a.call(r,i,n))||i;return i}const E_={light:"#333333",dark:"#bbbbbb"},__={light:"#fffffe",dark:"#1e1e1e"},b_="__shiki_resolved";function bc(e){var l,c,f,m,h;if(e!=null&&e[b_])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const _=t.settings?t.settings.find(g=>!g.name&&!g.scope):void 0;(l=_==null?void 0:_.settings)!=null&&l.foreground&&(r=_.settings.foreground),(c=_==null?void 0:_.settings)!=null&&c.background&&(n=_.settings.background),!r&&((f=t==null?void 0:t.colors)!=null&&f["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((m=t==null?void 0:t.colors)!=null&&m["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?E_.light:E_.dark),n||(n=t.type==="light"?__.light:__.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const a=new Map;function u(_){var y;if(a.has(_))return a.get(_);i+=1;const g=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(y=t.colorReplacements)!=null&&y[`#${g}`]?u(_):(a.set(_,g),g)}t.settings=t.settings.map(_=>{var k,w;const g=((k=_.settings)==null?void 0:k.foreground)&&!_.settings.foreground.startsWith("#"),y=((w=_.settings)==null?void 0:w.background)&&!_.settings.background.startsWith("#");if(!g&&!y)return _;const C={..._,settings:{..._.settings}};if(g){const D=u(_.settings.foreground);t.colorReplacements[D]=_.settings.foreground,C.settings.foreground=D}if(y){const D=u(_.settings.background);t.colorReplacements[D]=_.settings.background,C.settings.background=D}return C});for(const _ of Object.keys(t.colors||{}))if((_==="editor.foreground"||_==="editor.background"||_.startsWith("terminal.ansi"))&&!((h=t.colors[_])!=null&&h.startsWith("#"))){const g=u(t.colors[_]);t.colorReplacements[g]=t.colors[_],t.colors[_]=g}return Object.defineProperty(t,b_,{enumerable:!1,writable:!1,value:!0}),t}async function KT(e){return Array.from(new Set((await Promise.all(e.filter(t=>!Xp(t)).map(async t=>await Kp(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function XT(e){return(await Promise.all(e.map(async n=>Zp(n)?null:bc(await Kp(n))))).filter(n=>!!n)}let wl=3,ZT=!1;function IM(e=!0,t=!1){wl=e,ZT=t}function JT(e,t=3){if(wl&&!(typeof wl=="number"&&t>wl)){if(ZT)throw new Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}let Bs=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function ek(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Bs(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class NM extends s8{constructor(n,r,i,a={}){super(n);Y(this,"_resolvedThemes",new Map);Y(this,"_resolvedGrammars",new Map);Y(this,"_langMap",new Map);Y(this,"_langGraph",new Map);Y(this,"_textmateThemeCache",new WeakMap);Y(this,"_loadedThemesCache",null);Y(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=i,this._alias=a,this._themes.map(u=>this.loadTheme(u)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=bc(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=$l.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){return n=ek(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var u,l,c,f;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(m=>{var h;return(h=m.embeddedLangsLazy)==null?void 0:h.includes(n.name)}));this._resolver.addLanguage(n);const i={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const a=this.loadGrammarWithConfiguration(n.scopeName,1,i);if(a.name=n.name,this._resolvedGrammars.set(n.name,a),n.aliases&&n.aliases.forEach(m=>{this._alias[m]=n.name}),this._loadedLanguagesCache=null,r.size)for(const m of r)this._resolvedGrammars.delete(m.name),this._loadedLanguagesCache=null,(l=(u=this._syncRegistry)==null?void 0:u._injectionGrammars)==null||l.delete(m.scopeName),(f=(c=this._syncRegistry)==null?void 0:c._grammars)==null||f.delete(m.scopeName),this.loadLanguage(this._langMap.get(m.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const a of n)this.resolveEmbeddedLanguages(a);const r=Array.from(this._langGraph.entries()),i=r.filter(([a,u])=>!u);if(i.length){const a=r.filter(([u,l])=>{if(!l)return!1;const c=l.embeddedLanguages||l.embeddedLangs;return c==null?void 0:c.some(f=>i.map(([m])=>m).includes(f))}).filter(u=>!i.includes(u));throw new Bs(`Missing languages ${i.map(([u])=>`\`${u}\``).join(", ")}, required by ${a.map(([u])=>`\`${u}\``).join(", ")}`)}for(const[a,u]of r)this._resolver.addLanguage(u);for(const[a,u]of r)this.loadLanguage(u)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const r=n.embeddedLanguages??n.embeddedLangs;if(r)for(const i of r)this._langGraph.set(i,this._langMap.get(i))}}class LM{constructor(t,n){Y(this,"_langs",new Map);Y(this,"_scopeToLang",new Map);Y(this,"_injections",new Map);Y(this,"_onigLib");this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let i=1;i<=n.length;i++){const a=n.slice(0,i).join(".");r=[...r,...this._injections.get(a)||[]]}return r}}let Ya=0;function rm(e){Ya+=1,e.warnings!==!1&&Ya>=10&&Ya%10===0&&console.warn(`[Shiki] ${Ya} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Bs("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(bc),i=new LM(e.engine,n),a=new NM(i,r,n,e.langAlias);let u;function l(N){return ek(N,e.langAlias)}function c(N){w();const U=a.getGrammar(typeof N=="string"?N:N.name);if(!U)throw new Bs(`Language \`${N}\` not found, you may need to load it first`);return U}function f(N){if(N==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};w();const U=a.getTheme(N);if(!U)throw new Bs(`Theme \`${N}\` not found, you may need to load it first`);return U}function m(N){w();const U=f(N);u!==N&&(a.setTheme(U),u=N);const z=a.getColorMap();return{theme:U,colorMap:z}}function h(){return w(),a.getLoadedThemes()}function _(){return w(),a.getLoadedLanguages()}function g(...N){w(),a.loadLanguages(N.flat(1))}async function y(...N){return g(await KT(N))}function C(...N){w();for(const U of N.flat(1))a.loadTheme(U)}async function k(...N){return w(),C(await XT(N))}function w(){if(t)throw new Bs("Shiki instance has been disposed")}function D(){t||(t=!0,a.dispose(),Ya-=1)}return{setTheme:m,getTheme:f,getLanguage:c,getLoadedThemes:h,getLoadedLanguages:_,resolveLangAlias:l,loadLanguage:y,loadLanguageSync:g,loadTheme:k,loadThemeSync:C,dispose:D,[Symbol.dispose]:D}}async function tk(e){e.engine||JT("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([XT(e.themes||[]),KT(e.langs||[]),e.engine]);return rm({...e,themes:t,langs:n,engine:r})}async function im(e){const t=await tk(e);return{getLastGrammarState:(...n)=>GT(t,...n),codeToTokensBase:(n,r)=>_c(t,n,r),codeToTokensWithThemes:(n,r)=>nm(t,n,r),codeToTokens:(n,r)=>wo(t,n,r),codeToHast:(n,r)=>Co(t,n,r),codeToHtml:(n,r)=>QT(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function RM(e){const t=rm(e);return{getLastGrammarState:(...n)=>GT(t,...n),codeToTokensBase:(n,r)=>_c(t,n,r),codeToTokensWithThemes:(n,r)=>nm(t,n,r),codeToTokens:(n,r)=>wo(t,n,r),codeToHast:(n,r)=>Co(t,n,r),codeToHtml:(n,r)=>QT(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function nk(e){let t;async function n(r){if(t){const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else return t=e({...r,themes:r.themes||[],langs:r.langs||[]}),t}return n}const OM=nk(im);function sm(e){const t=e.langs,n=e.themes,r=e.engine;async function i(a){function u(h){var _;if(typeof h=="string"){if(h=((_=a.langAlias)==null?void 0:_[h])||h,Xp(h))return[];const g=t[h];if(!g)throw new mt(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return g}return h}function l(h){if(Zp(h))return"none";if(typeof h=="string"){const _=n[h];if(!_)throw new mt(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return _}return h}const c=(a.themes??[]).map(h=>l(h)),f=(a.langs??[]).map(h=>u(h)),m=await im({engine:a.engine??r(),...a,themes:c,langs:f});return{...m,loadLanguage(...h){return m.loadLanguage(...h.map(u))},loadTheme(...h){return m.loadTheme(...h.map(l))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function rk(e){let t;async function n(r={}){if(t){const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else{t=e({...r,themes:[],langs:[]});const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}}return n}function ik(e,t){const n=rk(e);async function r(i,a){var c;const u=await n({langs:[a.lang],themes:"theme"in a?[a.theme]:Object.values(a.themes)}),l=await((c=t==null?void 0:t.guessEmbeddedLanguages)==null?void 0:c.call(t,i,a.lang,u));return l&&await u.loadLanguage(...l),u}return{getSingletonHighlighter(i){return n(i)},async codeToHtml(i,a){return(await r(i,a)).codeToHtml(i,a)},async codeToHast(i,a){return(await r(i,a)).codeToHast(i,a)},async codeToTokens(i,a){return(await r(i,a)).codeToTokens(i,a)},async codeToTokensBase(i,a){return(await r(i,a)).codeToTokensBase(i,a)},async codeToTokensWithThemes(i,a){return(await r(i,a)).codeToTokensWithThemes(i,a)},async getLastGrammarState(i,a){return(await n({langs:[a.lang],themes:[a.theme]})).getLastGrammarState(i,a)}}}const PM=sm;function DM(e={}){var u;const{name:t="css-variables",variablePrefix:n="--shiki-",fontStyle:r=!0}=e,i=l=>{var c;return(c=e.variableDefaults)!=null&&c[l]?`var(${n}${l}, ${e.variableDefaults[l]})`:`var(${n}${l})`},a={name:t,type:"dark",colors:{"editor.foreground":i("foreground"),"editor.background":i("background"),"terminal.ansiBlack":i("ansi-black"),"terminal.ansiRed":i("ansi-red"),"terminal.ansiGreen":i("ansi-green"),"terminal.ansiYellow":i("ansi-yellow"),"terminal.ansiBlue":i("ansi-blue"),"terminal.ansiMagenta":i("ansi-magenta"),"terminal.ansiCyan":i("ansi-cyan"),"terminal.ansiWhite":i("ansi-white"),"terminal.ansiBrightBlack":i("ansi-bright-black"),"terminal.ansiBrightRed":i("ansi-bright-red"),"terminal.ansiBrightGreen":i("ansi-bright-green"),"terminal.ansiBrightYellow":i("ansi-bright-yellow"),"terminal.ansiBrightBlue":i("ansi-bright-blue"),"terminal.ansiBrightMagenta":i("ansi-bright-magenta"),"terminal.ansiBrightCyan":i("ansi-bright-cyan"),"terminal.ansiBrightWhite":i("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:i("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:i("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:i("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:i("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:i("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:i("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:i("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:i("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:i("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:i("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:i("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:i("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:i("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:i("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:i("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:i("token-changed")}}]};return r||(a.tokenColors=(u=a.tokenColors)==null?void 0:u.map(l=>{var c;return(c=l.settings)!=null&&c.fontStyle&&delete l.settings.fontStyle,l})),a}const yc=[{id:"abap",name:"ABAP",import:(()=>A(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>A(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>A(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>A(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([2,3,4,5])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>A(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([6,2,3,4,5,7])))},{id:"apache",name:"Apache Conf",import:(()=>A(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>A(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>A(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([8,3,4,5,9,10,11])))},{id:"applescript",name:"AppleScript",import:(()=>A(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>A(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>A(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>A(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>A(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([12,11,4,13,5,14,15])))},{id:"awk",name:"AWK",import:(()=>A(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>A(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>A(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>A(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>A(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>A(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>A(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>A(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>A(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([16,17,3,4,5,9,10,18,11])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>A(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([19,20])))},{id:"c",name:"C",import:(()=>A(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>A(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>A(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>A(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([21,22])))},{id:"clarity",name:"Clarity",import:(()=>A(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>A(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>A(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>A(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([23,3,4,5,10])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>A(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>A(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>A(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([24,4])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>A(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>A(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>A(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([25,26,27,28,18])))},{id:"crystal",name:"Crystal",import:(()=>A(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([29,3,4,5,18,28,30])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>A(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>A(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>A(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>A(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>A(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>A(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>A(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>A(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>A(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>A(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>A(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>A(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>A(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>A(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([31,13,3,4,5,17])))},{id:"elixir",name:"Elixir",import:(()=>A(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([32,3,4,5])))},{id:"elm",name:"Elm",import:(()=>A(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([33,27,28])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>A(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>A(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([34,3,4,5,35,36,9,10,18,37,13,38,15,25,26,27,28,30,39,40])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>A(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([41,42])))},{id:"fennel",name:"Fennel",import:(()=>A(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>A(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>A(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>A(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([43,44])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>A(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>A(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([45,42])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>A(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([46,47,48])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>A(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>A(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>A(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>A(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>A(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([49,50])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>A(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([51,30])))},{id:"gleam",name:"Gleam",import:(()=>A(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>A(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([52,4,13,5,3])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>A(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([53,13,5,4,3])))},{id:"glsl",name:"GLSL",import:(()=>A(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([27,28])))},{id:"gn",name:"GN",import:(()=>A(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>A(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>A(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>A(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([37,4,13,38,15])))},{id:"groovy",name:"Groovy",import:(()=>A(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>A(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([54,3,4,5,18])))},{id:"haml",name:"Ruby Haml",import:(()=>A(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([36,4,5])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>A(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([55,3,4,5,40])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>A(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>A(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>A(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>A(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>A(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>A(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([3,4,5])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>A(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([17,3,4,5])))},{id:"http",name:"HTTP",import:(()=>A(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([56,30,11,9,10,37,4,13,38,15])))},{id:"hurl",name:"Hurl",import:(()=>A(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([57,37,4,13,38,15,9,10,58])))},{id:"hxml",name:"HXML",import:(()=>A(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([59,60])))},{id:"hy",name:"Hy",import:(()=>A(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>A(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>A(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>A(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>A(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>A(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([61,3,4,5])))},{id:"jison",name:"Jison",import:(()=>A(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([62,4])))},{id:"json",name:"JSON",import:(()=>A(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>A(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>A(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>A(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>A(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>A(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>A(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>A(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([63,25,26,27,28,18,22,4,64])))},{id:"just",name:"Just",import:(()=>A(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([65,30,4,13,66,3,5,9,10,18,22,35,36,37,38,15,25,26,27,28,39,40])))},{id:"kdl",name:"KDL",import:(()=>A(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>A(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>A(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>A(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([67,68,64])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>A(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>A(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>A(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([69,3,4,5,11])))},{id:"llvm",name:"LLVM IR",import:(()=>A(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>A(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>A(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>A(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([39,28])))},{id:"luau",name:"Luau",import:(()=>A(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>A(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>A(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>A(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([70,5,71,7,13])))},{id:"matlab",name:"MATLAB",import:(()=>A(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>A(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([72,42,40,17,3,4,5])))},{id:"mdx",name:"MDX",import:(()=>A(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>A(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>A(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>A(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>A(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>A(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>A(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>A(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([73,74])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>A(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>A(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([75,39,28])))},{id:"nim",name:"Nim",import:(()=>A(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([76,28,3,4,5,9,10,27,42])))},{id:"nix",name:"Nix",import:(()=>A(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>A(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>A(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>A(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>A(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>A(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>A(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>A(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>A(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([66,3,4,5,9,10,18])))},{id:"php",name:"PHP",import:(()=>A(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([77,3,4,5,9,10,18,11])))},{id:"pkl",name:"Pkl",import:(()=>A(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>A(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>A(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>A(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>A(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>A(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>A(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>A(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>A(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>A(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>A(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([78,4,5,3])))},{id:"puppet",name:"Puppet",import:(()=>A(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>A(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>A(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>A(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([79,4])))},{id:"qmldir",name:"QML Directory",import:(()=>A(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>A(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>A(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>A(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>A(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>A(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([80,3,4,5,81])))},{id:"reg",name:"Windows Registry Script",import:(()=>A(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>A(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>A(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>A(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>A(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>A(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>A(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([82,17,3,4,5,25,26,27,28,18,22,30,40,83,35,36,9,10,37,13,38,15,39])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>A(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([35,3,4,5,36,9,10,18,37,13,38,15,25,26,27,28,30,39,40])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>A(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>A(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([84,18])))},{id:"sass",name:"Sass",import:(()=>A(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>A(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>A(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>A(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([7,5])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>A(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>A(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([85,86])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>A(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>A(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([87,30])))},{id:"smalltalk",name:"Smalltalk",import:(()=>A(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>A(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>A(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([88,3,4,5])))},{id:"sparql",name:"SPARQL",import:(()=>A(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([89,90])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>A(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>A(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>A(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>A(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([91,18])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>A(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>A(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([92,4])))},{id:"svelte",name:"Svelte",import:(()=>A(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([93,4,13,5,14])))},{id:"swift",name:"Swift",import:(()=>A(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>A(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>A(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>A(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>A(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>A(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>A(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([94,95,4,5])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>A(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>A(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([68,64])))},{id:"toml",name:"TOML",import:(()=>A(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>A(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([96,13,5,4,27,28,3,18,9,10])))},{id:"tsv",name:"TSV",import:(()=>A(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>A(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>A(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>A(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([97,5,4,7,77,3,9,10,18,11,22,35,36,37,13,38,15,25,26,27,28,30,39,40])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>A(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>A(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>A(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>A(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>A(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>A(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>A(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>A(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>A(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>A(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([98,5,4,13,11,3,17])))},{id:"vue-html",name:"Vue HTML",import:(()=>A(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([99,4])))},{id:"vue-vine",name:"Vue Vine",import:(()=>A(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([100,5,7,71,101,14,4])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>A(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>A(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>A(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>A(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>A(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>A(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>A(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>A(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([9,10])))},{id:"xsl",name:"XSL",import:(()=>A(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([102,9,10])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>A(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>A(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>A(()=>import("./zig-VOosw3JB.js"),[]))}],sk=Object.fromEntries(yc.map(e=>[e.id,e.import])),ak=Object.fromEntries(yc.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))||[]})),am={...sk,...ak},ok=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>A(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>A(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>A(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>A(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>A(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>A(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>A(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>A(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>A(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>A(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>A(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>A(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>A(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>A(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>A(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>A(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>A(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>A(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>A(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>A(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>A(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>A(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>A(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>A(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>A(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>A(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>A(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>A(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>A(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>A(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>A(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>A(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>A(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>A(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>A(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>A(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>A(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>A(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>A(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>A(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>A(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>A(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>A(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>A(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>A(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>A(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>A(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>A(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>A(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>A(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>A(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>A(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>A(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>A(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>A(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>A(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>A(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>A(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>A(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>A(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>A(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>A(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>A(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],uk=Object.fromEntries(ok.map(e=>[e.id,e.import]));class om extends Error{constructor(t){super(t),this.name="ShikiError"}}function MM(){return 2147483648}function BM(){return typeof performance<"u"?performance.now():Date.now()}const FM=(e,t)=>e+(t-e%t)%t;async function jM(e){let t,n;const r={};function i(g){n=g,r.HEAPU8=new Uint8Array(g),r.HEAPU32=new Uint32Array(g)}function a(g,y,C){r.HEAPU8.copyWithin(g,y,y+C)}function u(g){try{return t.grow(g-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function l(g){const y=r.HEAPU8.length;g=g>>>0;const C=MM();if(g>C)return!1;for(let k=1;k<=4;k*=2){let w=y*(1+.2/k);w=Math.min(w,g+100663296);const D=Math.min(C,FM(Math.max(g,w),65536));if(u(D))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function f(g,y,C=1024){const k=y+C;let w=y;for(;g[w]&&!(w>=k);)++w;if(w-y>16&&g.buffer&&c)return c.decode(g.subarray(y,w));let D="";for(;y<w;){let N=g[y++];if(!(N&128)){D+=String.fromCharCode(N);continue}const U=g[y++]&63;if((N&224)===192){D+=String.fromCharCode((N&31)<<6|U);continue}const z=g[y++]&63;if((N&240)===224?N=(N&15)<<12|U<<6|z:N=(N&7)<<18|U<<12|z<<6|g[y++]&63,N<65536)D+=String.fromCharCode(N);else{const B=N-65536;D+=String.fromCharCode(55296|B>>10,56320|B&1023)}}return D}function m(g,y){return g?f(r.HEAPU8,g,y):""}const h={emscripten_get_now:BM,emscripten_memcpy_big:a,emscripten_resize_heap:l,fd_write:()=>0};async function _(){const y=await e({env:h,wasi_snapshot_preview1:h});t=y.memory,i(t.buffer),Object.assign(r,y),r.UTF8ToString=m}return await _(),r}var HM=Object.defineProperty,UM=(e,t,n)=>t in e?HM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wt=(e,t,n)=>UM(e,typeof t!="symbol"?t+"":t,n);let Lt=null;function $M(e){throw new om(e.UTF8ToString(e.getLastOnigError()))}class xc{constructor(t){wt(this,"utf16Length"),wt(this,"utf8Length"),wt(this,"utf16Value"),wt(this,"utf8Value"),wt(this,"utf16OffsetToUtf8"),wt(this,"utf8OffsetToUtf16");const n=t.length,r=xc._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);const u=i?new Uint32Array(r+1):null;i&&(u[r]=n);const l=new Uint8Array(r);let c=0;for(let f=0;f<n;f++){const m=t.charCodeAt(f);let h=m,_=!1;if(m>=55296&&m<=56319&&f+1<n){const g=t.charCodeAt(f+1);g>=56320&&g<=57343&&(h=(m-55296<<10)+65536|g-56320,_=!0)}i&&(a[f]=c,_&&(a[f+1]=c),h<=127?u[c+0]=f:h<=2047?(u[c+0]=f,u[c+1]=f):h<=65535?(u[c+0]=f,u[c+1]=f,u[c+2]=f):(u[c+0]=f,u[c+1]=f,u[c+2]=f,u[c+3]=f)),h<=127?l[c++]=h:h<=2047?(l[c++]=192|(h&1984)>>>6,l[c++]=128|(h&63)>>>0):h<=65535?(l[c++]=224|(h&61440)>>>12,l[c++]=128|(h&4032)>>>6,l[c++]=128|(h&63)>>>0):(l[c++]=240|(h&1835008)>>>18,l[c++]=128|(h&258048)>>>12,l[c++]=128|(h&4032)>>>6,l[c++]=128|(h&63)>>>0),_&&f++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=l,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=u}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const a=t.charCodeAt(r);let u=a,l=!1;if(a>=55296&&a<=56319&&r+1<i){const c=t.charCodeAt(r+1);c>=56320&&c<=57343&&(u=(a-55296<<10)+65536|c-56320,l=!0)}u<=127?n+=1:u<=2047?n+=2:u<=65535?n+=3:n+=4,l&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const Tc=class or{constructor(t){if(wt(this,"id",++or.LAST_ID),wt(this,"_onigBinding"),wt(this,"content"),wt(this,"utf16Length"),wt(this,"utf8Length"),wt(this,"utf16OffsetToUtf8"),wt(this,"utf8OffsetToUtf16"),wt(this,"ptr"),!Lt)throw new om("Must invoke loadWasm first.");this._onigBinding=Lt,this.content=t;const n=new xc(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!or._sharedPtrInUse?(or._sharedPtr||(or._sharedPtr=Lt.omalloc(1e4)),or._sharedPtrInUse=!0,Lt.HEAPU8.set(n.utf8Value,or._sharedPtr),this.ptr=or._sharedPtr):this.ptr=n.createString(Lt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===or._sharedPtr?or._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};wt(Tc,"LAST_ID",0);wt(Tc,"_sharedPtr",0);wt(Tc,"_sharedPtrInUse",!1);let lk=Tc;class zM{constructor(t){if(wt(this,"_onigBinding"),wt(this,"_ptr"),!Lt)throw new om("Must invoke loadWasm first.");const n=[],r=[];for(let l=0,c=t.length;l<c;l++){const f=new xc(t[l]);n[l]=f.createString(Lt),r[l]=f.utf8Length}const i=Lt.omalloc(4*t.length);Lt.HEAPU32.set(n,i/4);const a=Lt.omalloc(4*t.length);Lt.HEAPU32.set(r,a/4);const u=Lt.createOnigScanner(i,a,t.length);for(let l=0,c=t.length;l<c;l++)Lt.ofree(n[l]);Lt.ofree(a),Lt.ofree(i),u===0&&$M(Lt),this._onigBinding=Lt,this._ptr=u}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new lk(t);const a=this._findNextMatchSync(t,n,!1,i);return t.dispose(),a}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const a=this._onigBinding,u=a.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(u===0)return null;const l=a.HEAPU32;let c=u/4;const f=l[c++],m=l[c++],h=[];for(let _=0;_<m;_++){const g=t.convertUtf8OffsetToUtf16(l[c++]),y=t.convertUtf8OffsetToUtf16(l[c++]);h[_]={start:g,end:y,length:y-g}}return{index:f,captureIndices:h}}}function VM(e){return typeof e.instantiator=="function"}function GM(e){return typeof e.default=="function"}function WM(e){return typeof e.data<"u"}function qM(e){return typeof Response<"u"&&e instanceof Response}function YM(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let fl;function ck(e){if(fl)return fl;async function t(){Lt=await jM(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),VM(r)?r=await r.instantiator(n):GM(r)?r=await r.default(n):(WM(r)&&(r=r.data),qM(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await QM(r)(n):r=await KM(r)(n):YM(r)?r=await Yf(r)(n):r instanceof WebAssembly.Module?r=await Yf(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Yf(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return fl=t(),fl}function Yf(e){return t=>WebAssembly.instantiate(e,t)}function QM(e){return t=>WebAssembly.instantiateStreaming(e,t)}function KM(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function dk(e){return e&&await ck(e),{createScanner(t){return new zM(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new lk(t)}}}const um=sm({langs:am,themes:uk,engine:()=>dk(A(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:XM,codeToHast:ZM,codeToTokens:JM,codeToTokensBase:e9,codeToTokensWithThemes:t9,getSingletonHighlighter:n9,getLastGrammarState:r9}=ik(um,{guessEmbeddedLanguages:BT});function Js(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function i9(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const lm=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Ot=String.raw;function ea(e,t){if(e==null)throw new Error(t??"Value expected");return e}const fk=Ot`\[\^?`,hk=`c.? | C(?:-.?)?|${Ot`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Ot`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Ot`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Ot`o\{[^\}]*\}?`}|${Ot`\d{1,3}`}`,cm=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,hl=new RegExp(Ot`
|
|
290
|
+
\\ (?:
|
|
291
|
+
${hk}
|
|
292
|
+
| [gk]<[^>]*>?
|
|
293
|
+
| [gk]'[^']*'?
|
|
294
|
+
| .
|
|
295
|
+
)
|
|
296
|
+
| \( (?:
|
|
297
|
+
\? (?:
|
|
298
|
+
[:=!>({]
|
|
299
|
+
| <[=!]
|
|
300
|
+
| <[^>]*>
|
|
301
|
+
| '[^']*'
|
|
302
|
+
| ~\|?
|
|
303
|
+
| #(?:[^)\\]|\\.?)*
|
|
304
|
+
| [^:)]*[:)]
|
|
305
|
+
)?
|
|
306
|
+
| \*[^\)]*\)?
|
|
307
|
+
)?
|
|
308
|
+
| (?:${cm.source})+
|
|
309
|
+
| ${fk}
|
|
310
|
+
| .
|
|
311
|
+
`.replace(/\s+/g,""),"gsu"),Qf=new RegExp(Ot`
|
|
312
|
+
\\ (?:
|
|
313
|
+
${hk}
|
|
314
|
+
| .
|
|
315
|
+
)
|
|
316
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
317
|
+
| ${fk}
|
|
318
|
+
| &&
|
|
319
|
+
| .
|
|
320
|
+
`.replace(/\s+/g,""),"gsu");function s9(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=w9(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(h){i.push(h)},replaceCurrentModX(h){i[i.length-1]=h},singleline:n.rules.singleline};let u=[],l;for(hl.lastIndex=0;l=hl.exec(e);){const h=a9(a,e,l[0],hl.lastIndex);h.tokens?u.push(...h.tokens):h.token&&u.push(h.token),h.lastIndex!==void 0&&(hl.lastIndex=h.lastIndex)}const c=[];let f=0;u.filter(h=>h.type==="GroupOpen").forEach(h=>{h.kind==="capturing"?h.number=++f:h.raw==="("&&c.push(h)}),f||c.forEach((h,_)=>{h.kind="capturing",h.number=_+1});const m=f||c.length;return{tokens:u.map(h=>h.type==="EscapedNumber"?v9(h,m):h).flat(),flags:r}}function a9(e,t,n,r){const[i,a]=n;if(n==="["||n==="[^"){const u=o9(t,n,r);return{tokens:u.tokens,lastIndex:u.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(a))return{token:y_(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:E9(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:mk(n)}}if(a==="K")return{token:gk("keep",n)};if(a==="N"||a==="R")return{token:$i("newline",n,{negate:a==="N"})};if(a==="O")return{token:$i("any",n)};if(a==="X")return{token:$i("text_segment",n)};const u=pk(n,{inCharClass:!1});return Array.isArray(u)?{tokens:u}:{token:u}}if(i==="("){if(a==="*")return{token:x9(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:y9(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Os("group",n)};if(n==="(?>")return{token:Os("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Os(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Os("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Os("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:p9(n)}}if(e.getCurrentModX()){if(n==="#"){const u=t.indexOf(`
|
|
321
|
+
`,r);return{lastIndex:u===-1?t.length:u}}if(/^\s$/.test(n)){const u=/\s+/y;return u.lastIndex=r,{lastIndex:u.exec(t)?u.lastIndex:r}}}if(n===".")return{token:$i("dot",n)};if(n==="^"||n==="$"){const u=e.singleline?{"^":Ot`\A`,$:Ot`\Z`}[n]:n;return{token:y_(u,n)}}return n==="|"?{token:l9(n)}:cm.test(n)?{tokens:S9(n)}:{token:Nr(Js(n),n)}}function o9(e,t,n){const r=[x_(t[1]==="^",t)];let i=1,a;for(Qf.lastIndex=n;a=Qf.exec(e);){const u=a[0];if(u[0]==="["&&u[1]!==":")i++,r.push(x_(u[1]==="^",u));else if(u==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Nr(93,u));else if(i--,r.push(c9(u)),!i)break}else{const l=u9(u);Array.isArray(l)?r.push(...l):r.push(l)}}return{tokens:r,lastIndex:Qf.lastIndex||e.length}}function u9(e){if(e[0]==="\\")return pk(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!lm.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return $i("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?d9(e):e==="&&"?f9(e):Nr(Js(e),e)}function pk(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return b9(e);if("dDhHsSwW".includes(n))return T9(e);if(e.startsWith(Ot`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return k9(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(u=>parseInt(u,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),a=new TextEncoder;return[...i].map(u=>{const l=[...a.encode(u)].map(c=>`\\x${c.toString(16)}`).join("");return Nr(Js(u),l)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Nr(C9(e),e);if(T_.has(n))return Nr(T_.get(n),e);if(/\d/.test(n))return h9(t,e);if(e==="\\")throw new Error(Ot`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Nr(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function l9(e){return{type:"Alternator",raw:e}}function y_(e,t){return{type:"Assertion",kind:e,raw:t}}function mk(e){return{type:"Backreference",raw:e}}function Nr(e,t){return{type:"Character",value:e,raw:t}}function c9(e){return{type:"CharacterClassClose",raw:e}}function d9(e){return{type:"CharacterClassHyphen",raw:e}}function f9(e){return{type:"CharacterClassIntersector",raw:e}}function x_(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function $i(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function gk(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:ea(n.flags),raw:t}}function h9(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function p9(e){return{type:"GroupClose",raw:e}}function Os(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function m9(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function g9(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function E9(e){return{type:"Subroutine",raw:e}}const _9=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),T_=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function b9(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Nr(Js(t.toUpperCase())-64,e)}function y9(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??(r="");const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),a=w_(n),u=w_(r),l={};if(a&&(l.enable=a),u&&(l.disable=u),e.endsWith(")"))return t.replaceCurrentModX(i),gk("flags",e,{flags:l});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,Os("group",e,{...(a||u)&&{flags:l}});throw new Error(`Unexpected flag modifier "${e}"`)}function x9(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:i}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const a=i?i.split(",").filter(m=>m!=="").map(m=>/^[+-]?\d+$/.test(m)?+m:m):[],[u,l,c]=a,f=_9.has(n)?n.toLowerCase():"custom";switch(f){case"fail":case"mismatch":case"skip":if(a.length>0)throw new Error(`Named callout arguments not allowed "${a}"`);break;case"error":if(a.length>1)throw new Error(`Named callout allows only one argument "${a}"`);if(typeof u=="string")throw new Error(`Named callout argument must be a number "${u}"`);break;case"max":if(!a.length||a.length>2)throw new Error(`Named callout must have one or two arguments "${a}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument one must be a tag or number "${u}"`);if(a.length===2&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${l}"`);break;case"count":case"total_count":if(a.length>1)throw new Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof u=="number"||!/^[<>X]$/.test(u)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${u}"`);break;case"cmp":if(a.length!==3)throw new Error(`Named callout must have three arguments "${a}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument one must be a tag or number "${u}"`);if(typeof l=="number"||!/^(?:[<>!=]=|[<>])$/.test(l))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${l}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${f}"`)}return m9(f,r??null,(i==null?void 0:i.split(","))??null,e)}function k_(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,u=1e5;if(+i>u||a&&+a>u)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=a===void 0?+i:a===""?1/0:+a,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return g9(t,n,r,e)}function T9(e){const t=e[1].toLowerCase();return $i({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function k9(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return $i("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function w_(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function w9(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function C9(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function v9(e,t){const{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[mk(n)];const a=[],u=i.match(/^[0-7]+|\d/g);for(let l=0;l<u.length;l++){const c=u[l];let f;if(l===0&&c!=="8"&&c!=="9"){if(f=parseInt(c,8),f>127)throw new Error(Ot`Octal encoded byte above 177 unsupported "${n}"`)}else f=Js(c);a.push(Nr(f,(l===0?"\\":"")+c))}return a}function S9(e){const t=[],n=new RegExp(cm,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const a=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(a){const{min:u,max:l}=a.groups;if(+u>+l&&i.endsWith("?")){n.lastIndex--,t.push(k_(i.slice(0,-1)));continue}}}t.push(k_(i))}return t}function Ek(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function A9(e){return I9.has(e.type)}const I9=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function _k(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=s9(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(_,g)=>{const y=r.tokens[a.nextIndex];switch(a.parent=_,a.nextIndex++,y.type){case"Alternator":return Xi();case"Assertion":return N9(y);case"Backreference":return L9(y,a);case"Character":return kc(y.value,{useLastValid:!!g.isCheckingRangeEnd});case"CharacterClassHyphen":return R9(y,a,g);case"CharacterClassOpen":return O9(y,a,g);case"CharacterSet":return P9(y,a);case"Directive":return H9(y.kind,{flags:y.flags});case"GroupOpen":return D9(y,a,g);case"NamedCallout":return $9(y.kind,y.tag,y.arguments);case"Quantifier":return M9(y,a);case"Subroutine":return B9(y,a);default:throw new Error(`Unexpected token type "${y.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},u=V9(U9(r.flags));let l=u.body[0];for(;a.nextIndex<r.tokens.length;){const _=i(l,{});_.type==="Alternative"?(u.body.push(_),l=_):l.body.push(_)}const{capturingGroups:c,hasNumberedRef:f,namedGroupsByName:m,subroutines:h}=a;if(f&&m.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:_}of h)if(typeof _=="number"){if(_>c.length)throw new Error("Subroutine uses a group number that's not defined");_&&(c[_-1].isSubroutined=!0)}else if(m.has(_)){if(m.get(_).length>1)throw new Error(Ot`Subroutine uses a duplicate group name "\g<${_}>"`);m.get(_)[0].isSubroutined=!0}else throw new Error(Ot`Subroutine uses a group name that's not defined "\g<${_}>"`);return u}function N9({kind:e}){return Uh(ea({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Ot`\B`||e===Ot`\Y`})}function L9({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(a,u=!1)=>{const l=t.capturingGroups.length;let c=!1;if(a>l)if(t.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,$h(u?l+1-a:a,{orphan:c})};if(n){const a=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(a)return i(+a.groups.num,!!a.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return $h(r)}return i(+r)}function R9(e,t,n){const{tokens:r,walk:i}=t,a=t.parent,u=a.body.at(-1),l=r[t.nextIndex];if(!n.isCheckingRangeEnd&&u&&u.type!=="CharacterClass"&&u.type!=="CharacterClassRange"&&l&&l.type!=="CharacterClassOpen"&&l.type!=="CharacterClassClose"&&l.type!=="CharacterClassIntersector"){const c=i(a,{...n,isCheckingRangeEnd:!0});if(u.type==="Character"&&c.type==="Character")return a.body.pop(),j9(u,c);throw new Error("Invalid character class range")}return kc(Js("-"))}function O9({negate:e},t,n){const{tokens:r,walk:i}=t,a=r[t.nextIndex],u=[Cl()];let l=S_(a);for(;l.type!=="CharacterClassClose";){if(l.type==="CharacterClassIntersector")u.push(Cl()),t.nextIndex++;else{const f=u.at(-1);f.body.push(i(f,n))}l=S_(r[t.nextIndex],a)}const c=Cl({negate:e});return u.length===1?c.body=u[0].body:(c.kind="intersection",c.body=u.map(f=>f.body.length===1?f.body[0]:f)),t.nextIndex++,c}function P9({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:u}=r;if(e==="property"){const l=wc(n);if(lm.has(l)&&!(u!=null&&u.has(l)))e="posix",n=l;else return Ps(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:u})}return e==="posix"?z9(n,{negate:t}):zh(e,{negate:t})}function D9(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:u,walk:l}=t,c=G9(e),f=c.type==="AbsenceFunction",m=v_(c),h=m&&c.negate;if(c.type==="CapturingGroup"&&(i.push(c),c.name&&i9(a,c.name,[]).push(c)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let _=A_(r[t.nextIndex]);for(;_.type!=="GroupClose";){if(_.type==="Alternator")c.body.push(Xi()),t.nextIndex++;else{const g=c.body.at(-1),y=l(g,{...n,isInAbsenceFunction:n.isInAbsenceFunction||f,isInLookbehind:n.isInLookbehind||m,isInNegLookbehind:n.isInNegLookbehind||h});if(g.body.push(y),(m||n.isInLookbehind)&&!u){const C="Lookbehind includes a pattern not allowed by Oniguruma";if(h||n.isInNegLookbehind){if(C_(y)||y.type==="CapturingGroup")throw new Error(C)}else if(C_(y)||v_(y)&&y.negate)throw new Error(C)}}_=A_(r[t.nextIndex])}return t.nextIndex++,c}function M9({kind:e,min:t,max:n},r){const i=r.parent,a=i.body.at(-1);if(!a||!A9(a))throw new Error("Quantifier requires a repeatable token");const u=yk(e,t,n,a);return i.body.pop(),u}function B9({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){const l=+a.groups.num,c=n.length;if(t.hasNumberedRef=!0,i={"":l,"+":c+l,"-":c+1-l}[a.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const u=xk(i);return r.push(u),u}function F9(e,t){return{type:"AbsenceFunction",kind:e,body:Ho(t==null?void 0:t.body)}}function Xi(e){return{type:"Alternative",body:Tk(e==null?void 0:e.body)}}function Uh(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function $h(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function bk(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!W9(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Ho(t==null?void 0:t.body)}}function kc(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function Cl(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:Tk(e==null?void 0:e.body)}}function j9(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function zh(e,t){const n=!!(t!=null&&t.negate),r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function H9(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:ea(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function U9(e){return{type:"Flags",...e}}function Yn(e){const t=e==null?void 0:e.atomic,n=e==null?void 0:e.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Ho(e==null?void 0:e.body)}}function ji(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Ho(e==null?void 0:e.body)}}function $9(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function z9(e,t){const n=!!(t!=null&&t.negate);if(!lm.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function yk(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function V9(e,t){return{type:"Regex",body:Ho(t==null?void 0:t.body),flags:e}}function xk(e){return{type:"Subroutine",ref:e}}function Ps(e,t){var i;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=(i=n.unicodePropertyMap)==null?void 0:i.get(wc(e));if(!r){if(n.normalizeUnknownPropertyNames)r=q9(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Ot`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function G9({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return F9("repeater");case"atomic":return Yn({atomic:!0});case"capturing":return bk(i,{name:n});case"group":return Yn({flags:e});case"lookahead":case"lookbehind":return ji({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function Ho(e){if(e===void 0)e=[Xi()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function Tk(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function C_(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function v_(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function W9(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function q9(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function wc(e){return e.replace(/[- _]+/g,"").toLowerCase()}function S_(e,t){return ea(e,`${(t==null?void 0:t.type)==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function A_(e){return ea(e,"Unclosed group")}function co(e,t,n=null){function r(a,u){for(let l=0;l<a.length;l++){const c=i(a[l],u,l,a);l=Math.max(-1,l+c)}}function i(a,u=null,l=null,c=null){var w,D;let f=0,m=!1;const h={node:a,parent:u,key:l,container:c,root:e,remove(){pl(c).splice(Math.max(0,Is(l)+f),1),f--,m=!0},removeAllNextSiblings(){return pl(c).splice(Is(l)+1)},removeAllPrevSiblings(){const N=Is(l)+f;return f-=N,pl(c).splice(0,Math.max(0,N))},replaceWith(N,U={}){const z=!!U.traverse;c?c[Math.max(0,Is(l)+f)]=N:ea(u,"Can't replace root node")[l]=N,z&&i(N,u,l,c),m=!0},replaceWithMultiple(N,U={}){const z=!!U.traverse;if(pl(c).splice(Math.max(0,Is(l)+f),1,...N),f+=N.length-1,z){let B=0;for(let X=0;X<N.length;X++)B+=i(N[X],u,Is(l)+X+B,c)}m=!0},skip(){m=!0}},{type:_}=a,g=t["*"],y=t[_],C=typeof g=="function"?g:g==null?void 0:g.enter,k=typeof y=="function"?y:y==null?void 0:y.enter;if(C==null||C(h,n),k==null||k(h,n),!m)switch(_){case"AbsenceFunction":case"CapturingGroup":case"Group":r(a.body,a);break;case"Alternative":case"CharacterClass":r(a.body,a);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(a.min,a,"min"),i(a.max,a,"max");break;case"LookaroundAssertion":r(a.body,a);break;case"Quantifier":i(a.body,a,"body");break;case"Regex":r(a.body,a),i(a.flags,a,"flags");break;default:throw new Error(`Unexpected node type "${_}"`)}return(w=y==null?void 0:y.exit)==null||w.call(y,h,n),(D=g==null?void 0:g.exit)==null||D.call(g,h,n),f}return i(e),e}function pl(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Is(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const Y9=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Q9(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function K9(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const Mn=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function dm(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),a=[!1];let u=0,l="";for(const c of e.matchAll(i)){const{0:f,groups:{$skip:m}}=c;if(!m&&(!r||r===Mn.DEFAULT==!u)){n instanceof Function?l+=n(c,{context:u?Mn.CHAR_CLASS:Mn.DEFAULT,negated:a[a.length-1]}):l+=n;continue}f[0]==="["?(u++,a.push(f[1]==="^")):f==="]"&&u&&(u--,a.pop()),l+=f}return l}function kk(e,t,n,r){dm(e,t,n,r)}function X9(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=n;let a=0,u;for(;u=i.exec(e);){const{0:l,groups:{$skip:c}}=u;if(!c&&(!r||r===Mn.DEFAULT==!a))return u;l==="["?a++:l==="]"&&a&&a--,i.lastIndex==u.index&&i.lastIndex++}return null}function ml(e,t,n){return!!X9(e,t,0,n)}function Z9(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,u;for(;u=n.exec(e);){const[l]=u;if(l==="[")i++;else if(i)l==="]"&&i--;else if(l==="(")a++;else if(l===")"&&(a--,!a)){r=u.index;break}}return e.slice(t,r)}const I_=new RegExp(String.raw`(?<noncapturingStart>${Y9})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function J9(e,t){const n=(t==null?void 0:t.hiddenCaptures)??[];let r=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const i="(?>",a="(?:(?=(",u=[0],l=[];let c=0,f=0,m=NaN,h;do{h=!1;let _=0,g=0,y=!1,C;for(I_.lastIndex=Number.isNaN(m)?0:m+a.length;C=I_.exec(e);){const{0:k,index:w,groups:{capturingStart:D,noncapturingStart:N}}=C;if(k==="[")_++;else if(_)k==="]"&&_--;else if(k===i&&!y)m=w,y=!0;else if(y&&N)g++;else if(D)y?g++:(c++,u.push(c+f));else if(k===")"&&y){if(!g){f++;const U=c+f;if(e=`${e.slice(0,m)}${a}${e.slice(m+i.length,w)}))<$$${U}>)${e.slice(w+1)}`,h=!0,l.push(U),Q9(n,U),r.size){const z=new Map;r.forEach((B,X)=>{z.set(X>=U?X+1:X,B.map(Q=>Q>=U?Q+1:Q))}),r=z}break}g--}}}while(h);return n.push(...l),e=dm(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:_,groups:{backrefNum:g,wrappedBackrefNum:y}})=>{if(g){const C=+g;if(C>u.length-1)throw new Error(`Backref "${_}" greater than number of captures`);return`\\${u[C]}`}return`\\${y}`},Mn.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const wk=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Kf=new RegExp(String.raw`
|
|
322
|
+
\\(?: \d+
|
|
323
|
+
| c[A-Za-z]
|
|
324
|
+
| [gk]<[^>]+>
|
|
325
|
+
| [pPu]\{[^\}]+\}
|
|
326
|
+
| u[A-Fa-f\d]{4}
|
|
327
|
+
| x[A-Fa-f\d]{2}
|
|
328
|
+
)
|
|
329
|
+
| \((?: \? (?: [:=!>]
|
|
330
|
+
| <(?:[=!]|[^>]+>)
|
|
331
|
+
| [A-Za-z\-]+:
|
|
332
|
+
| \(DEFINE\)
|
|
333
|
+
))?
|
|
334
|
+
| (?<qBase>${wk})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
335
|
+
| \\?.
|
|
336
|
+
`.replace(/\s+/g,""),"gsu");function eB(e){if(!new RegExp(`${wk}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",a=0,u;for(Kf.lastIndex=0;u=Kf.exec(e);){const{0:l,index:c,groups:{qBase:f,qMod:m,invalidQ:h}}=u;if(l==="[")a||(r=c),a++;else if(l==="]")a?a--:r=null;else if(!a)if(m==="+"&&i&&!i.startsWith("(")){if(h)throw new Error(`Invalid quantifier "${l}"`);let _=-1;if(/^\{\d+\}$/.test(f))e=K9(e,c+f.length,m,"");else{if(i===")"||i==="]"){const g=i===")"?n:r;if(g===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,g)}(?>${e.slice(g,c)}${f})${e.slice(c+l.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${f})${e.slice(c+l.length)}`;_+=4}Kf.lastIndex+=_}else l[0]==="("?t.push(c):l===")"&&(n=t.length?t.pop():null);i=l}return{pattern:e}}const Dn=String.raw,tB=Dn`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Vh=Dn`\(\?R=(?<rDepth>[^\)]+)\)|${tB}`,Cc=Dn`\(\?<(?![=!])(?<captureName>[^>]+)>`,Ck=Dn`${Cc}|(?<unnamed>\()(?!\?)`,Mi=new RegExp(Dn`${Cc}|${Vh}|\(\?|\\?.`,"gsu"),Xf="Cannot use multiple overlapping recursions";function nB(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(Vh,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&ml(e,Dn`\(\?\(DEFINE\)`,Mn.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const a=[],u=ml(e,Dn`\\[1-9]`,Mn.DEFAULT),l=new Map,c=[];let f=!1,m=0,h=0,_;for(Mi.lastIndex=0;_=Mi.exec(e);){const{0:g,groups:{captureName:y,rDepth:C,gRNameOrNum:k,gRDepth:w}}=_;if(g==="[")m++;else if(m)g==="]"&&m--;else if(C){if(N_(C),f)throw new Error(Xf);if(u)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const D=e.slice(0,_.index),N=e.slice(Mi.lastIndex);if(ml(N,Vh,Mn.DEFAULT))throw new Error(Xf);const U=+C-1;e=L_(D,N,U,!1,n,a,h),i=O_(i,D,U,a.length,0,h);break}else if(k){N_(w);let D=!1;for(const ue of c)if(ue.name===k||ue.num===+k){if(D=!0,ue.hasRecursedWithin)throw new Error(Xf);break}if(!D)throw new Error(Dn`Recursive \g cannot be used outside the referenced group "${r==="external"?k:Dn`\g<${k}&R=${w}>`}"`);const N=l.get(k),U=Z9(e,N);if(u&&ml(U,Dn`${Cc}|\((?!\?)`,Mn.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const z=e.slice(N,_.index),B=U.slice(z.length+g.length),X=a.length,Q=+w-1,ne=L_(z,B,Q,!0,n,a,h);i=O_(i,z,Q,a.length-X,X,h);const $=e.slice(0,N),oe=e.slice(N+U.length);e=`${$}${ne}${oe}`,Mi.lastIndex+=ne.length-g.length-z.length-B.length,c.forEach(ue=>ue.hasRecursedWithin=!0),f=!0}else if(y)h++,l.set(String(h),Mi.lastIndex),l.set(y,Mi.lastIndex),c.push({num:h,name:y});else if(g[0]==="("){const D=g==="(";D&&(h++,l.set(String(h),Mi.lastIndex)),c.push(D?{num:h}:{})}else g===")"&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function N_(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function L_(e,t,n,r,i,a,u){const l=new Set;r&&kk(e+t,Cc,({groups:{captureName:f}})=>{l.add(f)},Mn.DEFAULT);const c=[n,r?l:null,i,a,u];return`${e}${R_(`(?:${e}`,"forward",...c)}(?:)${R_(`${t})`,"backward",...c)}${t}`}function R_(e,t,n,r,i,a,u){const c=m=>t==="forward"?m+2:n-m+2-1;let f="";for(let m=0;m<n;m++){const h=c(m);f+=dm(e,Dn`${Ck}|\\k<(?<backref>[^>]+)>`,({0:_,groups:{captureName:g,unnamed:y,backref:C}})=>{if(C&&r&&!r.has(C))return _;const k=`_$${h}`;if(y||g){const w=u+a.length+1;return a.push(w),rB(i,w),y?_:`(?<${g}${k}>`}return Dn`\k<${C}${k}>`},Mn.DEFAULT)}return f}function rB(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function O_(e,t,n,r,i,a){if(e.size&&r){let u=0;kk(t,Ck,()=>u++,Mn.DEFAULT);const l=a-u+i,c=new Map;return e.forEach((f,m)=>{const h=(r-u*n)/n,_=u*n,g=m>l+u?m+r:m,y=[];for(const C of f)if(C<=l)y.push(C);else if(C>l+u+h)y.push(C+r);else if(C<=l+u)for(let k=0;k<=n;k++)y.push(C+u*k);else for(let k=0;k<=n;k++)y.push(C+_+h*k);c.set(g,y)}),c}return e}var Ct=String.fromCodePoint,Me=String.raw,Kn={},vc=globalThis.RegExp;Kn.flagGroups=(()=>{try{new vc("(?i:)")}catch{return!1}return!0})();Kn.unicodeSets=(()=>{try{new vc("[[]]","v")}catch{return!1}return!0})();Kn.bugFlagVLiteralHyphenIsRange=Kn.unicodeSets?(()=>{try{new vc(Me`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Kn.bugNestedClassIgnoresNegation=Kn.unicodeSets&&new vc("[[^a]]","v").test("a");function Ql(e,{enable:t,disable:n}){return{dotAll:!(n!=null&&n.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(n!=null&&n.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function vo(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Gh(e,t){return P_[e]>=P_[t]}function iB(e,t){if(e==null)throw new Error(t??"Value expected");return e}var P_={ES2025:2025,ES2024:2024,ES2018:2018},sB={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function vk(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!sB[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Kn.flagGroups?"ES2025":Kn.unicodeSets?"ES2024":"ES2018"),t}var aB="[ -\r ]",oB=new Set([Ct(304),Ct(305)]),Cr=Me`[\p{L}\p{M}\p{N}\p{Pc}]`;function Sk(e){if(oB.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=cB.get(n),a=uB.get(n),u=lB.get(n);return[...r].length===1&&t.add(r),u&&t.add(u),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var fm=new Map(`C Other
|
|
337
|
+
Cc Control cntrl
|
|
338
|
+
Cf Format
|
|
339
|
+
Cn Unassigned
|
|
340
|
+
Co Private_Use
|
|
341
|
+
Cs Surrogate
|
|
342
|
+
L Letter
|
|
343
|
+
LC Cased_Letter
|
|
344
|
+
Ll Lowercase_Letter
|
|
345
|
+
Lm Modifier_Letter
|
|
346
|
+
Lo Other_Letter
|
|
347
|
+
Lt Titlecase_Letter
|
|
348
|
+
Lu Uppercase_Letter
|
|
349
|
+
M Mark Combining_Mark
|
|
350
|
+
Mc Spacing_Mark
|
|
351
|
+
Me Enclosing_Mark
|
|
352
|
+
Mn Nonspacing_Mark
|
|
353
|
+
N Number
|
|
354
|
+
Nd Decimal_Number digit
|
|
355
|
+
Nl Letter_Number
|
|
356
|
+
No Other_Number
|
|
357
|
+
P Punctuation punct
|
|
358
|
+
Pc Connector_Punctuation
|
|
359
|
+
Pd Dash_Punctuation
|
|
360
|
+
Pe Close_Punctuation
|
|
361
|
+
Pf Final_Punctuation
|
|
362
|
+
Pi Initial_Punctuation
|
|
363
|
+
Po Other_Punctuation
|
|
364
|
+
Ps Open_Punctuation
|
|
365
|
+
S Symbol
|
|
366
|
+
Sc Currency_Symbol
|
|
367
|
+
Sk Modifier_Symbol
|
|
368
|
+
Sm Math_Symbol
|
|
369
|
+
So Other_Symbol
|
|
370
|
+
Z Separator
|
|
371
|
+
Zl Line_Separator
|
|
372
|
+
Zp Paragraph_Separator
|
|
373
|
+
Zs Space_Separator
|
|
374
|
+
ASCII
|
|
375
|
+
ASCII_Hex_Digit AHex
|
|
376
|
+
Alphabetic Alpha
|
|
377
|
+
Any
|
|
378
|
+
Assigned
|
|
379
|
+
Bidi_Control Bidi_C
|
|
380
|
+
Bidi_Mirrored Bidi_M
|
|
381
|
+
Case_Ignorable CI
|
|
382
|
+
Cased
|
|
383
|
+
Changes_When_Casefolded CWCF
|
|
384
|
+
Changes_When_Casemapped CWCM
|
|
385
|
+
Changes_When_Lowercased CWL
|
|
386
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
387
|
+
Changes_When_Titlecased CWT
|
|
388
|
+
Changes_When_Uppercased CWU
|
|
389
|
+
Dash
|
|
390
|
+
Default_Ignorable_Code_Point DI
|
|
391
|
+
Deprecated Dep
|
|
392
|
+
Diacritic Dia
|
|
393
|
+
Emoji
|
|
394
|
+
Emoji_Component EComp
|
|
395
|
+
Emoji_Modifier EMod
|
|
396
|
+
Emoji_Modifier_Base EBase
|
|
397
|
+
Emoji_Presentation EPres
|
|
398
|
+
Extended_Pictographic ExtPict
|
|
399
|
+
Extender Ext
|
|
400
|
+
Grapheme_Base Gr_Base
|
|
401
|
+
Grapheme_Extend Gr_Ext
|
|
402
|
+
Hex_Digit Hex
|
|
403
|
+
IDS_Binary_Operator IDSB
|
|
404
|
+
IDS_Trinary_Operator IDST
|
|
405
|
+
ID_Continue IDC
|
|
406
|
+
ID_Start IDS
|
|
407
|
+
Ideographic Ideo
|
|
408
|
+
Join_Control Join_C
|
|
409
|
+
Logical_Order_Exception LOE
|
|
410
|
+
Lowercase Lower
|
|
411
|
+
Math
|
|
412
|
+
Noncharacter_Code_Point NChar
|
|
413
|
+
Pattern_Syntax Pat_Syn
|
|
414
|
+
Pattern_White_Space Pat_WS
|
|
415
|
+
Quotation_Mark QMark
|
|
416
|
+
Radical
|
|
417
|
+
Regional_Indicator RI
|
|
418
|
+
Sentence_Terminal STerm
|
|
419
|
+
Soft_Dotted SD
|
|
420
|
+
Terminal_Punctuation Term
|
|
421
|
+
Unified_Ideograph UIdeo
|
|
422
|
+
Uppercase Upper
|
|
423
|
+
Variation_Selector VS
|
|
424
|
+
White_Space space
|
|
425
|
+
XID_Continue XIDC
|
|
426
|
+
XID_Start XIDS`.split(/\s/).map(e=>[wc(e),e])),uB=new Map([["s",Ct(383)],[Ct(383),"s"]]),lB=new Map([[Ct(223),Ct(7838)],[Ct(107),Ct(8490)],[Ct(229),Ct(8491)],[Ct(969),Ct(8486)]]),cB=new Map([ai(453),ai(456),ai(459),ai(498),...Zf(8072,8079),...Zf(8088,8095),...Zf(8104,8111),ai(8124),ai(8140),ai(8188)]),dB=new Map([["alnum",Me`[\p{Alpha}\p{Nd}]`],["alpha",Me`\p{Alpha}`],["ascii",Me`\p{ASCII}`],["blank",Me`[\p{Zs}\t]`],["cntrl",Me`\p{Cc}`],["digit",Me`\p{Nd}`],["graph",Me`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Me`\p{Lower}`],["print",Me`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Me`[\p{P}\p{S}]`],["space",Me`\p{space}`],["upper",Me`\p{Upper}`],["word",Me`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Me`\p{AHex}`]]);function fB(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function ai(e){const t=Ct(e);return[t.toLowerCase(),t]}function Zf(e,t){return fB(e,t).map(n=>ai(n))}var Ak=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function hB(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};Ik(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Gh(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};co(e,pB,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};co(e,mB,a);const u={groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer};return co(e,gB,u),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var pB={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const a=Yn();a.body[0].body.push(ji({negate:!0,body:r}),Ps("Any"));const u=Yn();u.body[0].body.push(yk("greedy",0,1/0,a)),n(pt(u,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(a=>a.kind==="flags");for(let a=n+1;a<t.body.length;a++){const u=t.body[a];vo(r,u,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=Lk(t.get(e));if(r){const i=Yn({flags:r});i.body[0].body=e.body,e.body=[pt(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:u},l){const{kind:c,negate:f}=e,{asciiWordBoundaries:m,avoidSubclass:h,supportedGNodes:_,wordIsAscii:g}=l;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${f?"Y":"y"}"`);if(c==="line_end")u(pt(ji({body:[Xi({body:[Uh("string_end")]}),Xi({body:[kc(10)]})]}),t));else if(c==="line_start")u(pt(vr(Me`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c==="search_start")if(_.has(e))i.flags.sticky=!0,a();else{const y=r[n-1];if(y&&TB(y))u(pt(ji({negate:!0}),t));else{if(h)throw new Error(Me`Uses "\G" in a way that requires a subclass`);u(oi(Uh("string_start"),t)),l.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")u(pt(vr(Me`(?=\n?\z)`),t));else if(c==="word_boundary"){if(!g&&!m){const y=`(?:(?<=${Cr})(?!${Cr})|(?<!${Cr})(?=${Cr}))`,C=`(?:(?<=${Cr})(?=${Cr})|(?<!${Cr})(?!${Cr}))`;u(pt(vr(f?C:y),t))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!eh(n)&&(n=Jf(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!eh(r)&&(r=Jf(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=Cl({body:[e]});n(pt(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:u,wordIsAscii:l}){const{kind:c,negate:f,value:m}=e;if(a&&(c==="digit"||m==="digit")){n(oi(zh("digit",{negate:f}),t));return}if(u&&(c==="space"||m==="space")){n(pt(th(vr(aB),f),t));return}if(l&&(c==="word"||m==="word")){n(oi(zh("word",{negate:f}),t));return}if(c==="any")n(oi(Ps("Any"),t));else if(c==="digit")n(oi(Ps("Nd",{negate:f}),t));else if(c!=="dot")if(c==="text_segment"){if(r==="strict")throw new Error(Me`Use of "\X" requires non-strict accuracy`);const h="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",_=Me`\p{RI}{2}|${h}(?:\u200D${h})*`;n(pt(vr(Me`(?>\r\n|${i?Me`\p{RGI_Emoji}`:_}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c==="hex")n(oi(Ps("AHex",{negate:f}),t));else if(c==="newline")n(pt(vr(f?`[^
|
|
427
|
+
]`:`(?>\r
|
|
428
|
+
?|[
|
|
429
|
+
\v\f
\u2028\u2029])`),t));else if(c==="posix")if(!i&&(m==="graph"||m==="print")){if(r==="strict")throw new Error(`POSIX class "${m}" requires min target ES2024 or non-strict accuracy`);let h={graph:"!-~",print:" -~"}[m];f&&(h=`\0-${Ct(h.codePointAt(0)-1)}${Ct(h.codePointAt(2)+1)}-`),n(pt(vr(`[${h}]`),t))}else n(pt(th(vr(dB.get(m)),f),t));else if(c==="property")fm.has(wc(m))||(e.key="sc");else if(c==="space")n(oi(Ps("space",{negate:f}),t));else if(c==="word")n(pt(th(vr(Cr),f),t));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:u}){const{kind:l,flags:c}=e;if(l==="flags")if(!c.enable&&!c.disable)r();else{const f=Yn({flags:c});f.body[0].body=u(),i(pt(f,t),{traverse:!0})}else if(l==="keep"){const f=n.body[0],h=n.body.length===1&&Ek(f,{type:"Group"})&&f.body[0].body.length===1?f.body[0]:n;if(t.parent!==h||h.body.length>1)throw new Error(Me`Uses "\K" in a way that's unsupported`);const _=ji({behind:!0});_.body[0].body=a(),i(pt(_,t))}else throw new Error(`Unexpected directive kind "${l}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(pt(ji({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Yn();t.body[0].body.push(e.body),e.body=pt(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const a of e.body)if(a.body.length===1&&a.body[0].kind==="search_start")a.body.pop();else{const u=Ok(a.body);u?(r=!0,Array.isArray(u)?n.push(...u):n.push(u)):i=!0}r&&!i&&n.forEach(a=>t.add(a))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(Me`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!eh(n)&&(n=Jf(n,t),e.ref=n)}},mB={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:a})=>a)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:u,openRefs:l,reffedNodesByReferencer:c}){const f=i.get(e);if(f&&l.has(e.number)){const h=oi(D_(e.number),t);c.set(h,l.get(e.number)),n(h);return}l.set(e.number,e),u.set(e.number,[]),e.name&&vo(u,e.name,[]);const m=u.get(e.name??e.number);for(let h=0;h<m.length;h++){const _=m[h];if(f===_.node||f&&f===_.origin||e===_.origin){m.splice(h,1);break}}if(u.get(e.number).push({node:e,origin:f}),e.name&&u.get(e.name).push({node:e,origin:f}),e.name){const h=vo(a,e.name,new Map);let _=!1;if(f)_=!0;else for(const g of h.values())if(!g.hasDuplicateNameToRemove){_=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:_})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Ql(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:a}=e;if(i){let m=t;for(;(m=m.parent)&&!(m.type==="CapturingGroup"&&(m.name===a||m.number===a)););r.reffedNodesByReferencer.set(e,m);return}const u=r.subroutineRefMap.get(a),l=a===0,c=l?D_(0):Nk(u,r.groupOriginByCopy,null);let f=c;if(!l){const m=Lk(bB(u,_=>_.type==="Group"&&!!_.flags)),h=m?Ql(r.globalFlags,m):r.globalFlags;EB(h,r.currentFlags)||(f=Yn({flags:yB(h)}),f.body[0].body.push(c))}n(pt(f,t),{traverse:!l})}},gB={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const a=r.reffedNodesByReferencer.get(e).filter(u=>_B(u,e));if(!a.length)n(pt(ji({negate:!0}),t));else if(a.length>1){const u=Yn({atomic:!0,body:a.reverse().map(l=>Xi({body:[$h(l.number)]}))});n(pt(u,t))}else e.ref=a[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const i=bk();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Ik(e){co(e,{"*"({node:t,parent:n}){t.parent=n}})}function EB(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function _B(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=Rk(n.parent);for(const i of r){if(i===n)break;if(i===e||Pk(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function Nk(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[a,u]of Object.entries(e))a==="parent"?i.parent=Array.isArray(n)?r:n:u&&typeof u=="object"?i[a]=Nk(u,t,i,n):(a==="type"&&u==="CapturingGroup"&&t.set(i,t.get(e)??e),i[a]=u);return i}function D_(e){const t=xk(e);return t.isRecursive=!0,t}function bB(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Jf(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function Lk(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{var a,u;(a=r.enable)!=null&&a[i]&&(delete n.disable[i],n.enable[i]=!0),(u=r.disable)!=null&&u[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function yB({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function Rk(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Ok(e){const t=e.find(n=>n.kind==="search_start"||kB(n,{negate:!1})||!xB(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=Ok(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function Pk(e,t){const n=Rk(e)??[];for(const r of n)if(r===t||Pk(r,t))return!0;return!1}function xB({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function TB(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function kB(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Ek(e.body[0],{type:"Assertion",kind:"search_start"})}function eh(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function vr(e,t){const r=_k(e,{...t,unicodePropertyMap:fm}).body;return r.length>1||r[0].body.length>1?Yn({body:r}):r[0].body[0]}function th(e,t){return e.negate=t,e}function oi(e,t){return e.parent=t,e}function pt(e,t){return Ik(e),e.parent=t,e}function wB(e,t){const n=vk(t),r=Gh(n.target,"ES2024"),i=Gh(n.target,"ES2025"),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw new Error("Invalid recursionLimit; use 2-20");let u=null,l=null;if(!i){const g=[e.flags.ignoreCase];co(e,CB,{getCurrentModI:()=>g.at(-1),popModI(){g.pop()},pushModI(y){g.push(y)},setHasCasedChar(){g.at(-1)?u=!0:l=!0}})}const c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||u)&&!l)};let f=e;const m={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:f,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&u&&l),useFlagMods:i,useFlagV:r,verbose:n.verbose};function h(g){return m.lastNode=f,f=g,iB(vB[g.type],`Unexpected node type "${g.type}"`)(g,m,h)}const _={pattern:e.body.map(h).join("|"),flags:h(e.flags),options:{...e.options}};return r||(delete _.options.force.v,_.options.disable.v=!0,_.options.unicodeSetsPlugin=null),_._captureTransfers=new Map,_._hiddenCaptures=[],m.captureMap.forEach((g,y)=>{g.hidden&&_._hiddenCaptures.push(y),g.transferTo&&vo(_._captureTransfers,g.transferTo,[]).push(y)}),_}var CB={"*":{enter({node:e},t){if(B_(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Ql({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){B_(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){hm(Ct(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),Dk(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&Ak.has(e.value)&&t.setHasCasedChar()}},vB={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Me`\B`:Me`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:a}=e,u={ignoreCase:t.currentFlags.ignoreCase},l=t.originMap.get(e);return l&&(u.hidden=!0,a>l.number&&(u.transferTo=l.number)),t.captureMap.set(a,u),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=Ct(e),r=Ns(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&hm(n)){const i=Sk(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:a}=e;let{body:u}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Kn.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&u.some(F_)&&(u=[kc(45),...u.filter(f=>!F_(f))]);const l=()=>`[${i?"^":""}${u.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Kn.bugNestedClassIgnoresNegation)&&!i){const m=u.filter(h=>h.type==="CharacterClass"&&h.kind==="union"&&h.negate);if(m.length){const h=Yn(),_=h.body[0];return h.parent=a,_.parent=h,u=u.filter(g=>!m.includes(g)),e.body=u,u.length?(e.parent=_,_.body.push(e)):h.body.pop(),m.forEach(g=>{const y=Xi({body:[g]});g.parent=y,y.parent=h,h.body.push(y)}),n(h)}}t.inCharClass=!0;const f=l();return t.inCharClass=!1,f}const c=u[0];if(r==="union"&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind==="union"&&!(Kn.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind==="intersection"&&u.length===1&&c.type!=="CharacterClassRange"))return u.map(n).join("");if(!t.useFlagV&&a.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return l()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=Ns(n,i),u=Ns(r,i),l=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=Dk(e);LB(c).forEach(m=>{l.add(Array.isArray(m)?`${Ns(m[0],i)}-${Ns(m[1],i)}`:Ns(m,i))})}return`${a}-${u}${[...l].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":Me`[^\n]`;if(e==="digit")return t?Me`\D`:Me`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Ak.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Me`\P`:Me`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?Me`\W`:Me`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,a){const u=i.currentFlags;n&&(i.currentFlags=Ql(u,n));const l=t.map(a).join("|"),c=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?l:`(?${RB(e,n,i.useFlagMods)}${l})`;return i.currentFlags=u,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+OB(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:Me`\g<${t}&R=${r}>`}},SB=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),AB=new Set(["-","\\","]","^","["]),IB=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),M_=new Map([[9,Me`\t`],[10,Me`\n`],[11,Me`\v`],[12,Me`\f`],[13,Me`\r`],[8232,Me`\u2028`],[8233,Me`\u2029`],[65279,Me`\uFEFF`]]),NB=new RegExp("^\\p{Cased}$","u");function hm(e){return NB.test(e)}function Dk(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let u=r;u<=i;u++){const l=Ct(u);if(!hm(l))continue;const c=Sk(l).filter(f=>{const m=f.codePointAt(0);return m<r||m>i});if(c.length&&(a.push(...c),n))break}return a}function Ns(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(M_.has(e))return M_.get(e);if(e<32||e>126&&e<160||e>262143||t&&PB(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?IB:AB:SB,a=Ct(e);return(i.has(a)?"\\":"")+a}function LB(e){const t=e.map(i=>i.codePointAt(0)).sort((i,a)=>i-a),n=[];let r=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?r??(r=t[i]):r===null?n.push(t[i]):(n.push([r,t[i]]),r=null);return n}function RB(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:a}=t;r=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(a?"-":"")+(a!=null&&a.ignoreCase?"i":"")+(a!=null&&a.dotAll?"s":"")}return`${r}:`}function OB({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function B_({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function PB(e){return e>47&&e<58}function F_({type:e,value:t}){return e==="Character"&&t===45}var li,Sr,zi,ci,Vi,So,Wh,fi,DB=(fi=class extends RegExp{constructor(n,r,i){var t=(...D7)=>(super(...D7),Ri(this,So),Ri(this,li,new Map),Ri(this,Sr,null),Ri(this,zi),Ri(this,ci,null),Ri(this,Vi,null),Y(this,"rawOptions",{}),this);const a=!!(i!=null&&i.lazyCompile);if(n instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const u=n;t(u,r),Wn(this,zi,u.source),u instanceof fi&&(Wn(this,li,Xt(u,li)),Wn(this,ci,Xt(u,ci)),Wn(this,Vi,Xt(u,Vi)),this.rawOptions=u.rawOptions)}else{const u={hiddenCaptures:[],strategy:null,transfers:[],...i};t(a?"":n,r),Wn(this,zi,n),Wn(this,li,BB(u.hiddenCaptures,u.transfers)),Wn(this,Vi,u.strategy),this.rawOptions=i??{}}a||Wn(this,Sr,this)}get source(){return Xt(this,zi)||"(?:)"}exec(n){if(!Xt(this,Sr)){const{lazyCompile:a,...u}=this.rawOptions;Wn(this,Sr,new fi(Xt(this,zi),this.flags,u))}const r=this.global||this.sticky,i=this.lastIndex;if(Xt(this,Vi)==="clip_search"&&r&&i){this.lastIndex=0;const a=pf(this,So,Wh).call(this,n.slice(i));return a&&(MB(a,i,n,this.hasIndices),this.lastIndex+=i),a}return pf(this,So,Wh).call(this,n)}},li=new WeakMap,Sr=new WeakMap,zi=new WeakMap,ci=new WeakMap,Vi=new WeakMap,So=new WeakSet,Wh=function(n){Xt(this,Sr).lastIndex=this.lastIndex;const r=Zg(fi.prototype,this,"exec").call(Xt(this,Sr),n);if(this.lastIndex=Xt(this,Sr).lastIndex,!r||!Xt(this,li).size)return r;const i=[...r];r.length=1;let a;this.hasIndices&&(a=[...r.indices],r.indices.length=1);const u=[0];for(let l=1;l<i.length;l++){const{hidden:c,transferTo:f}=Xt(this,li).get(l)??{};if(c?u.push(null):(u.push(r.length),r.push(i[l]),this.hasIndices&&r.indices.push(a[l])),f&&i[l]!==void 0){const m=u[f];if(!m)throw new Error(`Invalid capture transfer to "${m}"`);if(r[m]=i[l],this.hasIndices&&(r.indices[m]=a[l]),r.groups){Xt(this,ci)||Wn(this,ci,FB(this.source));const h=Xt(this,ci).get(f);h&&(r.groups[h]=i[l],this.hasIndices&&(r.indices.groups[h]=a[l]))}}}return r},fi);function MB(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let u=0;u<i.length;u++){const l=i[u];l&&(i[u]=[l[0]+t,l[1]+t])}const a=i.groups;a&&Object.keys(a).forEach(u=>{const l=a[u];l&&(a[u]=[l[0]+t,l[1]+t])})}}function BB(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const a of i)vo(n,a,{}).transferTo=r;return n}function FB(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,a;for(;a=t.exec(e);){const{0:u,groups:{capture:l,name:c}}=a;u==="["?r++:r?u==="]"&&r--:l&&(i++,c&&n.set(i,c))}return n}function jB(e,t){const n=HB(e,t);return n.options?new DB(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function HB(e,t){const n=vk(t),r=_k(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:fm}),i=hB(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),a=wB(i,n),u=nB(a.pattern,{captureTransfers:a._captureTransfers,hiddenCaptures:a._hiddenCaptures,mode:"external"}),l=eB(u.pattern),c=J9(l.pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),f={pattern:c.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${a.flags}${a.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const m=c.hiddenCaptures.sort((y,C)=>y-C),h=Array.from(c.captureTransfers),_=i._strategy,g=f.pattern.length>=n.lazyCompileLength;(m.length||h.length||_||g)&&(f.options={...m.length&&{hiddenCaptures:m},...h.length&&{transfers:h},..._&&{strategy:_},...g&&{lazyCompile:g}})}return f}const j_=4294967295;class UB{constructor(t,n={}){Y(this,"regexps");this.patterns=t,this.options=n;const{forgiving:r=!1,cache:i,regexConstructor:a}=n;if(!a)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(u=>{if(typeof u!="string")return u;const l=i==null?void 0:i.get(u);if(l){if(l instanceof RegExp)return l;if(r)return null;throw l}try{const c=a(u);return i==null||i.set(u,c),c}catch(c){if(i==null||i.set(u,c),r)return null;throw c}})}findNextMatchSync(t,n,r){const i=typeof t=="string"?t:t.content,a=[];function u(l,c,f=0){return{index:l,captureIndices:c.indices.map(m=>m==null?{start:j_,end:j_,length:0}:{start:m[0]+f,end:m[1]+f,length:m[1]-m[0]})}}for(let l=0;l<this.regexps.length;l++){const c=this.regexps[l];if(c)try{c.lastIndex=n;const f=c.exec(i);if(!f)continue;if(f.index===n)return u(l,f,0);a.push([l,f,0])}catch(f){if(this.options.forgiving)continue;throw f}}if(a.length){const l=Math.min(...a.map(c=>c[1].index));for(const[c,f,m]of a)if(f.index===l)return u(c,f,m)}return null}}function Mk(e,t){return jB(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Bk(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>Mk(n,{target:t.target})),{createScanner(n){return new UB(n,t)},createString(n){return{content:n}}}}const e7=Object.freeze(Object.defineProperty({__proto__:null,ShikiError:mt,addClassToHast:Jp,applyColorReplacements:Lr,bundledLanguages:am,bundledLanguagesAlias:ak,bundledLanguagesBase:sk,bundledLanguagesInfo:yc,bundledThemes:uk,bundledThemesInfo:ok,codeToHast:ZM,codeToHtml:XM,codeToTokens:JM,codeToTokensBase:e9,codeToTokensWithThemes:t9,createBundledHighlighter:sm,createCssVariablesTheme:DM,createHighlighter:um,createHighlighterCore:im,createHighlighterCoreSync:RM,createJavaScriptRegexEngine:Bk,createOnigurumaEngine:dk,createPositionConverter:MT,createShikiInternal:tk,createShikiInternalSync:rm,createSingletonShorthands:ik,createdBundledHighlighter:PM,defaultJavaScriptRegexConstructor:Mk,enableDeprecationWarnings:IM,flatTokenVariants:HT,getLastGrammarState:r9,getSingletonHighlighter:n9,getSingletonHighlighterCore:OM,getTokenStyleObject:To,guessEmbeddedLanguages:BT,hastToHtml:YT,isNoneTheme:gc,isPlainLang:mc,isSpecialLang:Xp,isSpecialTheme:Zp,loadWasm:ck,makeSingletonHighlighter:rk,makeSingletonHighlighterCore:nk,normalizeGetter:Kp,normalizeTheme:bc,resolveColorReplacements:xo,splitLines:jo,splitToken:FT,splitTokens:jT,stringifyTokenStyle:ql,toArray:DT,tokenizeAnsiWithTheme:VT,tokenizeWithTheme:WT,tokensToHast:qT,transformerDecorations:$T,warnDeprecated:JT},Symbol.toStringTag,{value:"Module"}));var $B=Bk({forgiving:!0}),zB=Object.fromEntries(yc.flatMap(e=>{var t;return((t=e.aliases)!=null?t:[]).map(n=>[n,e.id])})),vl=new Set(Object.keys(am)),H_=e=>{let t=e.trim().toLowerCase();return zB[t]||(vl.has(t),t)},nh=new Map,rh=new Map,Ls=new Map,Kl=e=>{var t;return typeof e=="string"?e:(t=e.name)!=null?t:"custom"},VB=(e,t)=>`${e}-${Kl(t[0])}-${Kl(t[1])}`,GB=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):"";return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},WB=(e,t)=>{let n=VB(e,t);if(nh.has(n))return nh.get(n);let r=um({themes:t,langs:[e],engine:$B});return nh.set(n,r),r};function qB(e={}){var t;let n=(t=e.themes)!=null?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(r){let i=H_(r);return vl.has(i)},getSupportedLanguages(){return Array.from(vl)},getThemes(){return n},highlight({code:r,language:i,themes:a},u){let l=H_(i),c=[Kl(a[0]),Kl(a[1])],f=GB(r,l,c);if(rh.has(f))return rh.get(f);u&&(Ls.has(f)||Ls.set(f,new Set),Ls.get(f).add(u));let m=vl.has(l)?l:"text";return WB(m,a).then(h=>{let _=h.getLoadedLanguages().includes(l)?l:"text",g=h.codeToTokens(r,{lang:_,themes:{light:c[0],dark:c[1]}});rh.set(f,g);let y=Ls.get(f);if(y){for(let C of y)C(g);Ls.delete(f)}}).catch(h=>{console.error("[Streamdown Code] Failed to highlight code:",h),Ls.delete(f)}),null}}}var YB=qB();const QB="one-light",KB="one-dark-pro",Fk=[QB,KB],jk={code:YB},Hk={code:{copy:!1,download:!1}},t7=({content:e,streaming:t})=>{const n=t?"streaming":"static",r=P.useMemo(()=>e?T.jsx(pc,{children:e,mode:n,parseIncompleteMarkdown:t,shikiTheme:Fk,plugins:jk,controls:Hk}):null,[e,n,t]);return e?T.jsx("div",{className:"text-[14px] leading-[1.7]",children:r}):null},XB=({code:e,language:t,filename:n})=>{const r=P.useMemo(()=>{const i=t||"text";return`\`\`\`${n?`${i} ${n}`:i}
|
|
430
|
+
${e}
|
|
431
|
+
\`\`\``},[e,t,n]);return T.jsx(pc,{children:r,mode:"static",shikiTheme:Fk,plugins:jk,controls:Hk})},ZB=({size:e=14})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),T.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),JB=({size:e=14})=>T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:T.jsx("polyline",{points:"20 6 9 17 4 12"})});function qh(e){return typeof e=="string"?e:typeof e=="number"?String(e):e?Array.isArray(e)?e.map(qh).join(""):typeof e=="object"&&"props"in e?qh(e.props.children):"":""}const eF=({children:e,rawCode:t,language:n})=>{const[r,i]=P.useState(!1),a=t??qh(e),u=n||"text",l=a.replace(/\n$/,""),c=P.useCallback(async()=>{await PN(l)&&(i(!0),setTimeout(()=>i(!1),2e3))},[l]);return T.jsxs("div",{className:"group/code relative",children:[T.jsx(XB,{code:l,language:u}),T.jsx("button",{onClick:c,className:"absolute top-2 right-2 p-1.5 rounded-md bg-surface-secondary/80 border border-edge-light text-content-tertiary opacity-0 group-hover/code:opacity-100 transition-all duration-150 hover:bg-surface-hover hover:text-content cursor-pointer",title:r?"已复制":"复制代码",type:"button",children:r?T.jsx(JB,{size:14}):T.jsx(ZB,{size:14})})]})},tF={NOTE:{icon:"ℹ️",className:"callout-note"},TIP:{icon:"💡",className:"callout-tip"},WARNING:{icon:"⚠️",className:"callout-warning"},CAUTION:{icon:"🚫",className:"callout-caution"},IMPORTANT:{icon:"❗",className:"callout-important"}},nF=({calloutType:e,title:t,bodyText:n,bodyChildren:r,rawBodyMd:i,onEdit:a,onDelete:u})=>{const[l,c]=P.useState(!1),[f,m]=P.useState(e),[h,_]=P.useState(t),[g,y]=P.useState(i||n||Yh(r)),C=tF[e],k=()=>{a==null||a(f,h,g),c(!1)},w=()=>{m(e),_(t),y(i||n||Yh(r)),c(!1)};return l?T.jsxs("div",{className:"callout-edit-form",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[T.jsx("label",{className:"text-[12px] text-content-tertiary",children:"类型"}),T.jsxs("select",{value:f,onChange:D=>m(D.target.value),className:"text-[13px] px-2 py-1 rounded border border-edge-light bg-surface text-content",children:[T.jsx("option",{value:"NOTE",children:"NOTE"}),T.jsx("option",{value:"TIP",children:"TIP"}),T.jsx("option",{value:"WARNING",children:"WARNING"}),T.jsx("option",{value:"CAUTION",children:"CAUTION"}),T.jsx("option",{value:"IMPORTANT",children:"IMPORTANT"})]}),T.jsx("input",{value:h,onChange:D=>_(D.target.value),placeholder:"标题(可选)",className:"flex-1 text-[13px] px-2 py-1 rounded border border-edge-light bg-surface text-content outline-none focus:border-accent"})]}),T.jsx("textarea",{value:g,onChange:D=>y(D.target.value),placeholder:"内容...",rows:3,className:"w-full text-[13px] px-2 py-1.5 rounded border border-edge-light bg-surface text-content outline-none focus:border-accent resize-y font-mono"}),T.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[T.jsx("button",{onClick:w,className:"px-3 py-1 text-[12px] rounded-md text-content-secondary hover:bg-surface-hover transition-colors",children:"取消"}),T.jsx("button",{onClick:k,className:"px-3 py-1 text-[12px] rounded-md bg-accent text-white hover:bg-accent-hover transition-colors",children:"确认"})]})]}):T.jsxs("div",{className:`callout ${C.className}`,children:[T.jsxs("div",{className:"flex items-start gap-2",children:[T.jsx("span",{className:"text-[14px] mt-0.5 shrink-0",children:C.icon}),T.jsxs("div",{className:"flex-1 min-w-0",children:[t&&T.jsx("p",{className:"font-semibold text-[14px] mb-1",children:t}),T.jsxs("div",{className:"text-[14px] text-content-secondary callout-body",children:[n&&T.jsx("p",{className:"whitespace-pre-wrap",children:n}),r]})]})]}),T.jsxs("div",{className:"callout-actions",children:[T.jsx("button",{onClick:()=>c(!0),title:"编辑 callout",className:"p-1 rounded hover:bg-surface-hover text-content-muted hover:text-content transition-colors",children:T.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:T.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})})}),T.jsx("button",{onClick:()=>u==null?void 0:u(),title:"删除 callout",className:"p-1 rounded hover:bg-surface-hover text-content-muted hover:text-danger transition-colors",children:T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M3 6h18"}),T.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),T.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})})]})]})};function Yh(e){return typeof e=="string"?e:e?yt.Children.toArray(e).map(t=>{if(typeof t=="string")return t;if(typeof t=="number")return String(t);if(yt.isValidElement(t)){const n=t.props;return Yh(n.children)}return""}).join(`
|
|
432
|
+
`):""}const rF=[{type:"NOTE",label:"NOTE",icon:"ℹ️"},{type:"TIP",label:"TIP",icon:"💡"},{type:"WARNING",label:"WARNING",icon:"⚠️"},{type:"CAUTION",label:"CAUTION",icon:"🚫"},{type:"IMPORTANT",label:"IMPORTANT",icon:"❗"}],iF=({position:e,onSelectType:t,onClose:n})=>{const r=P.useRef(null);return P.useEffect(()=>{const i=u=>{r.current&&!r.current.contains(u.target)&&n()},a=setTimeout(()=>{document.addEventListener("mousedown",i)},100);return()=>{clearTimeout(a),document.removeEventListener("mousedown",i)}},[n]),T.jsx("div",{ref:r,className:"floating-toolbar",style:{position:"absolute",top:e.top-48,left:e.left,transform:"translateX(-50%)",zIndex:50},children:rF.map(({type:i,label:a,icon:u})=>T.jsxs("button",{onClick:()=>t(i),title:`插入 ${a} callout`,children:[u," ",a]},i))})},sF=/^\[!(NOTE|TIP|WARNING|CAUTION|IMPORTANT)\]\s*(.*)/;function aF(e){const t=yt.Children.toArray(e);if(t.length===0)return null;const n=t.find(_=>yt.isValidElement(_));if(!n)return null;const r=Qh(n),i=r.match(sF);if(!i)return null;const a=i[1],u=i[2].trim();let l="";const c=i[0].trimEnd(),f=r.trimStart();if(f.startsWith(c)){const _=f.slice(c.length);l=_.startsWith(`
|
|
433
|
+
`)?_.slice(1):_.trim()}const m=t.indexOf(n),h=t.slice(m+1);return{calloutType:a,title:u,bodyText:l,bodyChildren:h}}function Qh(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(!e)return"";if(yt.isValidElement(e)){const t=e.props;if(t.children)return yt.Children.toArray(t.children).map(Qh).join("")}return Array.isArray(e)?e.map(Qh).join(""):""}function ih(e,t){const n=e.split(`
|
|
434
|
+
`);switch(t.type){case"insert":{const r=["",`> [!${t.calloutType}] ${t.title}`,...t.content.split(`
|
|
435
|
+
`).map(i=>`> ${i}`),""];n.splice(t.afterLine,0,...r);break}case"edit":{const r=[`> [!${t.calloutType}] ${t.title}`,...t.content.split(`
|
|
436
|
+
`).map(i=>`> ${i}`)];n.splice(t.startLine-1,t.endLine-t.startLine+1,...r);break}case"delete":{const r=t.startLine-1;let i=t.endLine-t.startLine+1;r>0&&n[r-1]===""&&(i+=1),n.splice(r,i);break}}return n.join(`
|
|
437
|
+
`)}const U_=yt.lazy(()=>A(()=>import("./MermaidBlock-CPVuAdRJ.js"),__vite__mapDeps([103,1])));function oF(e){return e.toLowerCase().replace(/[^\w\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"")||"heading"}function Kh(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(Kh).join(""):yt.isValidElement(e)&&e.props.children?Kh(e.props.children):""}function ta(e){const t=({node:n,children:r})=>{var l,c;const i=Kh(r),a=oF(i),u=(c=(l=n==null?void 0:n.position)==null?void 0:l.start)==null?void 0:c.line;return yt.createElement(e,{id:a,"data-source-line":u},r)};return t.displayName=`Heading_${e}`,t}const uF=ta("h1"),lF=ta("h2"),cF=ta("h3"),dF=ta("h4"),fF=ta("h5"),hF=ta("h6");async function pF(e,t){t.preventDefault();const{currentView:n,projects:r,setCurrentView:i,setLoadingPage:a,openReference:u}=we.getState(),l=e.match(/^(.+?)(?:#L(\d+)(?:-L(\d+))?)?$/);if(!l){window.open(e,"_blank");return}const[,c,f,m]=l;if(/^https?:\/\//.test(c)){window.open(c,"_blank");return}let h=c;for(;h.startsWith("./");)h=h.slice(2);if(h.includes("../")&&(h=h.split("/").pop()||h),/^[A-Za-z]:\\/.test(h)){u(h,f?parseInt(f,10):void 0,m?parseInt(m,10):void 0);return}const _=/\.[^/.\\]+$/.test(h),g=h.endsWith(".md");if(_&&!g){if(!n)return;const C=r.find(w=>w.id===n.projectId);if(!C)return;const k=h.startsWith("/")?h:`${C.path}/${c}`;u(k,f?parseInt(f,10):void 0,m?parseInt(m,10):void 0);return}if(!n){console.warn("No current view");return}let y=h;y.startsWith("/")&&(y=y.slice(1)),g&&(y=y.slice(0,-3)),a(!0);try{const C=await qi(n.projectId,n.version,y);i({...n,slug:y,content:C.content,fileMtime:C.mtime});return}catch{if(g){const C=r.find(k=>k.id===n.projectId);if(C){const k=h.startsWith("/")?h:`${C.path}/${c}`;u(k,f?parseInt(f,10):void 0,m?parseInt(m,10):void 0)}}}finally{a(!1)}}const mF=({content:e})=>{const t=P.useRef(null),[n,r]=P.useState(null),i=we(m=>m.saveCalloutAction),a=P.useCallback(()=>{const m=window.getSelection();if(!m||m.isCollapsed||!m.toString().trim()){r(null);return}const h=m.getRangeAt(0),_=t.current;if(!_||!_.contains(h.commonAncestorContainer)){r(null);return}const g=h.getBoundingClientRect();r({top:g.top+window.scrollY,left:g.left+g.width/2,selectedText:m.toString()})},[]),u=P.useCallback(async m=>{const h=window.getSelection();if(!h||h.isCollapsed)return;let g=h.getRangeAt(0).startContainer.parentElement;for(;g&&!g.dataset.sourceLine;)g=g.parentElement;if(!g)return;const y=parseInt(g.dataset.sourceLine,10);let C=y,k=g.nextElementSibling;for(;k&&!k.dataset.sourceLine;)k=k.nextElementSibling;if(k)C=parseInt(k.dataset.sourceLine,10)-1;else{const N=we.getState().currentView;C=(N==null?void 0:N.content.split(`
|
|
438
|
+
`).length)??y}const w=we.getState().currentView;if(!w)return;const D=ih(w.content,{type:"insert",afterLine:C,calloutType:m,title:"",content:""});r(null),h.removeAllRanges();try{await i(D)}catch(N){console.error("Failed to insert callout:",N)}},[i]),l=P.useCallback(async(m,h,_,g,y)=>{const C=we.getState().currentView;if(!C)return;const k=ih(C.content,{type:"edit",startLine:m,endLine:h,calloutType:_,title:g,content:y});try{await i(k)}catch(w){console.error("Failed to edit callout:",w)}},[i]),c=P.useCallback(async(m,h)=>{const _=we.getState().currentView;if(!_)return;const g=ih(_.content,{type:"delete",startLine:m,endLine:h});try{await i(g)}catch(y){console.error("Failed to delete callout:",y)}},[i]),f=P.useMemo(()=>({h1:uF,h2:lF,h3:cF,h4:dF,h5:fF,h6:hF,p({node:m,children:h}){var g,y;const _=(y=(g=m==null?void 0:m.position)==null?void 0:g.start)==null?void 0:y.line;return T.jsx("p",{"data-source-line":_,children:h})},blockquote({node:m,children:h}){var C,k,w,D;const _=(k=(C=m==null?void 0:m.position)==null?void 0:C.start)==null?void 0:k.line,g=(D=(w=m==null?void 0:m.position)==null?void 0:w.end)==null?void 0:D.line,y=aF(h);if(y){let N;if(_!=null&&g!=null){const U=e.split(`
|
|
439
|
+
`),z=[];let B=!1;for(let X=_-1;X<g&&X<U.length;X++){const ne=U[X].replace(/^>\s?/,"");if(!B){B=!0;continue}z.push(ne)}N=z.join(`
|
|
440
|
+
`).trim()}return T.jsx(nF,{calloutType:y.calloutType,title:y.title,bodyText:y.bodyText,bodyChildren:y.bodyChildren,rawBodyMd:N,startLine:_,endLine:g,onEdit:(U,z,B)=>l(_,g,U,z,B),onDelete:()=>c(_,g)})}return T.jsx("blockquote",{"data-source-line":_,children:h})},ul({node:m,children:h}){var g,y;const _=(y=(g=m==null?void 0:m.position)==null?void 0:g.start)==null?void 0:y.line;return T.jsx("ul",{"data-source-line":_,children:h})},ol({node:m,children:h}){var g,y;const _=(y=(g=m==null?void 0:m.position)==null?void 0:g.start)==null?void 0:y.line;return T.jsx("ol",{"data-source-line":_,children:h})},table({node:m,children:h}){var g,y;const _=(y=(g=m==null?void 0:m.position)==null?void 0:g.start)==null?void 0:y.line;return T.jsx("table",{"data-source-line":_,children:h})},pre({node:m,children:h}){var D,N,U;const _=(D=m==null?void 0:m.children)==null?void 0:D[0],g=((N=_==null?void 0:_.properties)==null?void 0:N.className)||[];if(g.includes("language-mermaid")||yt.isValidElement(h)&&h.type===U_)return h;const C=g.find(z=>z.startsWith("language-")),k=C?C.replace("language-",""):void 0,w=yt.isValidElement(h)&&typeof((U=h.props)==null?void 0:U.children)=="string"?h.props.children:void 0;return T.jsx(eF,{rawCode:w,language:k,children:h})},code({className:m,children:h,..._}){const g=/language-(\w+)/.exec(m||""),y=g?g[1]:"",C=String(h).replace(/\n$/,"");return y==="mermaid"?T.jsx(P.Suspense,{fallback:T.jsx("div",{className:"mermaid-loading",children:"加载图表..."}),children:T.jsx(U_,{chart:C})}):T.jsx("code",{className:m,..._,children:h})},a({href:m,children:h}){return T.jsx("a",{href:m,onClick:_=>{m&&pF(m,_)},className:"text-accent no-underline cursor-pointer",children:h})}}),[l,c,e]);return e?T.jsxs("div",{className:"markdown-body",ref:t,onMouseUp:a,children:[T.jsx(x3,{remarkPlugins:[ty],components:f,children:e}),n&&T.jsx(iF,{position:n,onSelectType:u,onClose:()=>r(null)})]}):null},gF=()=>{const e=we(a=>{var u;return(u=a.currentView)==null?void 0:u.conflictData}),t=we(a=>a.resolveConflict),[n,r]=P.useState(!0);if(!e)return null;const i=e.serverContent.split(`
|
|
441
|
+
`).slice(0,30);return T.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:T.jsxs("div",{className:"w-full max-w-lg mx-4 bg-surface-secondary rounded-xl shadow-2xl border border-edge overflow-hidden",children:[T.jsxs("div",{className:"px-6 py-4 border-b border-edge-light",children:[T.jsxs("div",{className:"flex items-center gap-2 text-warning text-base font-semibold",children:[T.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),T.jsx("path",{d:"M12 9v4"}),T.jsx("path",{d:"M12 17h.01"})]}),"此页面已被外部修改"]}),T.jsx("p",{className:"text-[13px] text-content-secondary mt-1.5",children:"你可以选择加载最新版本,或保留你当前的修改继续编辑。"})]}),n&&T.jsxs("div",{className:"px-6 py-3 max-h-48 overflow-y-auto bg-surface-tertiary border-b border-edge-light",children:[T.jsx("p",{className:"text-[11px] text-content-muted mb-2 font-medium",children:"服务器最新版本(预览)"}),T.jsxs("pre",{className:"text-[12px] font-mono text-content-secondary whitespace-pre-wrap leading-relaxed",children:[i.join(`
|
|
442
|
+
`),e.serverContent.split(`
|
|
443
|
+
`).length>30&&`
|
|
444
|
+
...`]})]}),T.jsx("div",{className:"px-6 py-1",children:T.jsx("button",{onClick:()=>r(!n),className:"text-[12px] text-accent hover:underline",children:n?"收起预览":"展开预览"})}),T.jsxs("div",{className:"px-6 py-4 flex justify-end gap-3",children:[T.jsx("button",{onClick:()=>t("server"),className:`px-4 py-2 rounded-lg text-[13px] font-medium
|
|
445
|
+
text-content-secondary hover:text-content hover:bg-surface-hover
|
|
446
|
+
border border-edge-light transition-colors duration-150`,children:"加载最新版本"}),T.jsx("button",{onClick:()=>t("mine"),className:`px-4 py-2 rounded-lg text-[13px] font-medium
|
|
447
|
+
bg-accent text-white hover:bg-accent-hover
|
|
448
|
+
transition-colors duration-150`,children:"保留我的修改"})]})]})})},EF=()=>{const e=we(h=>{var _;return((_=h.currentView)==null?void 0:_.editContent)??""}),t=we(h=>{var _;return((_=h.currentView)==null?void 0:_.isDirty)??!1}),n=we(h=>{var _;return(_=h.currentView)==null?void 0:_.conflictData}),r=we(h=>h.updateEditContent),i=we(h=>h.setReadMode),a=we(h=>h.savePage),[u,l]=P.useState(!1),c=P.useRef(null),f=P.useCallback(async()=>{if(!u){l(!0);try{await a()}catch(h){console.error("Save failed:",h),alert("保存失败: "+(h instanceof Error?h.message:"未知错误"))}finally{l(!1)}}},[a,u]),m=P.useCallback(()=>{t&&!window.confirm("未保存的修改将丢失,是否继续?")||i()},[t,i]);return P.useEffect(()=>{const h=_=>{(_.metaKey||_.ctrlKey)&&_.key==="s"&&(_.preventDefault(),f())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[f]),T.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[T.jsxs("div",{className:"editor-toolbar",children:[T.jsxs("button",{onClick:m,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[13px] font-medium
|
|
449
|
+
text-content-secondary hover:text-content hover:bg-surface-hover
|
|
450
|
+
transition-colors duration-150`,children:[T.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"m12 19-7-7 7-7"}),T.jsx("path",{d:"M19 12H5"})]}),"返回阅读"]}),T.jsxs("div",{className:"flex items-center gap-2",children:[t&&T.jsx("span",{className:"text-[12px] text-content-tertiary",children:"未保存"}),T.jsxs("button",{onClick:f,disabled:u||!t,className:`flex items-center gap-1.5 px-4 py-1.5 rounded-lg text-[13px] font-medium
|
|
451
|
+
bg-accent text-white hover:bg-accent-hover
|
|
452
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
453
|
+
transition-colors duration-150`,children:[T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),T.jsx("polyline",{points:"17,21 17,13 7,13 7,21"}),T.jsx("polyline",{points:"7,3 7,8 15,8"})]}),u?"保存中...":"保存",T.jsx("kbd",{className:"text-[10px] px-1 py-0.5 rounded bg-white/20 ml-1 font-mono",children:"⌘S"})]})]})]}),T.jsx("textarea",{ref:c,value:e,onChange:h=>r(h.target.value),className:"markdown-editor",spellCheck:!1}),n&&T.jsx(gF,{})]})},_F=()=>{const e=we(a=>{var u;return(u=a.currentView)==null?void 0:u.mode}),t=we(a=>{var u;return(u=a.currentView)==null?void 0:u.isDirty}),n=we(a=>a.setEditMode),r=we(a=>a.setReadMode),i=()=>{if(e==="edit"){if(t&&!window.confirm("未保存的修改将丢失,是否继续?"))return;r()}else n()};return T.jsx("button",{onClick:i,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[13px] font-medium
|
|
454
|
+
text-content-secondary hover:text-content hover:bg-surface-hover
|
|
455
|
+
border border-edge-light transition-colors duration-150`,title:e==="edit"?"切换到阅读模式":"切换到编辑模式",children:e==="edit"?T.jsxs(T.Fragment,{children:[T.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"}),T.jsx("path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"})]}),"阅读"]}):T.jsxs(T.Fragment,{children:[T.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),T.jsx("path",{d:"m15 5 4 4"})]}),"编辑"]})})};function bF(e,t){return e.toLowerCase().replace(/[^\w\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"")||`heading-${t}`}function yF(e){var r;const t=e.split(`
|
|
456
|
+
`),n=[];for(let i=0;i<t.length;i++){const a=t[i].match(/^(#{1,6})\s+(.+?)\r?$/);if(a){const u=a[1].length,l=a[2].trim(),c=bF(l,n.length);n.push({id:c,text:l,level:u,position:i,contentLength:0})}}for(let i=0;i<n.length;i++){const a=((r=n[i+1])==null?void 0:r.position)??t.length;n[i].contentLength=a-n[i].position}return n}function xF(e){const[t,n]=P.useState(null);return P.useEffect(()=>{if(e.length===0)return;const r=new IntersectionObserver(i=>{const a=i.filter(u=>u.isIntersecting);if(a.length>0){const u=a.sort((l,c)=>l.boundingClientRect.top-c.boundingClientRect.top)[0];n(u.target.id)}},{rootMargin:"-20% 0px -70% 0px"});return e.forEach(i=>{const a=document.getElementById(i);a&&r.observe(a)}),()=>r.disconnect()},[e]),t}function TF(e){const t=P.useMemo(()=>yF(e),[e]),n=P.useMemo(()=>t.map(a=>a.id),[t]),r=xF(n),i=P.useCallback(a=>{const u=document.getElementById(a);u&&u.scrollIntoView({behavior:"smooth",block:"start"})},[]);return{items:t,activeId:r,scrollToHeading:i}}const kF=({content:e})=>{const{items:t,activeId:n,scrollToHeading:r}=TF(e);return t.length===0?null:T.jsxs("aside",{className:"w-[220px] h-full shrink-0 border-l border-edge bg-surface-tertiary overflow-y-auto py-5 px-3 shadow-[inset_4px_0_12px_rgba(0,0,0,0.05)]",children:[T.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wider text-content-muted mb-3 select-none",children:"目录"}),T.jsx("nav",{className:"flex flex-col gap-0.5",children:t.map(i=>T.jsx("a",{href:`#${i.id}`,title:i.text,className:`
|
|
457
|
+
block py-1 text-[12px] leading-snug truncate
|
|
458
|
+
transition-colors duration-150
|
|
459
|
+
hover:text-content
|
|
460
|
+
${i.id===n?"text-accent font-medium":"text-content-tertiary"}
|
|
461
|
+
`,style:{paddingLeft:`${(i.level-1)*12}px`},onClick:a=>{a.preventDefault(),r(i.id)},children:i.text},i.id))})]})},wF=({size:e=32})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),T.jsx("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})]}),CF=()=>{const e=we(u=>u.currentView),t=we(u=>u.currentWiki),n=Al(u=>u.aiPanelOpen),r=t==null?void 0:t.pages.find(u=>u.slug===(e==null?void 0:e.slug)),i=(r==null?void 0:r.level)==="Beginner"?"bg-accent-light text-accent-text border-accent/15":(r==null?void 0:r.level)==="Intermediate"?"bg-warning-light text-[#92400e] border-warning/15":"bg-danger-light text-[#991b1b] border-danger/15";if(!e)return T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-5 text-content-tertiary",children:[T.jsx("div",{className:"w-16 h-16 rounded-2xl bg-surface-tertiary flex items-center justify-center text-content-muted",children:T.jsx(wF,{size:32})}),T.jsxs("div",{className:"text-center",children:[T.jsx("p",{className:"text-base font-semibold text-content mb-1",children:"开始阅读"}),T.jsxs("p",{className:"text-[13px] text-content-tertiary",children:["从左侧导航选择一个页面,或按",T.jsx("kbd",{className:"text-[11px] px-1.5 py-0.5 mx-1 rounded bg-surface-tertiary border border-edge-light font-mono",children:"⌘K"}),"搜索"]})]})]});if(e.loading)return T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 text-content-tertiary",children:[T.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-edge border-t-accent animate-spin"}),T.jsx("p",{className:"text-[13px]",children:"加载中..."})]});if(e.error)return T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 p-10",children:[T.jsx("div",{className:"w-14 h-14 rounded-[14px] bg-danger-light text-danger flex items-center justify-center text-2xl font-bold",children:"!"}),T.jsx("p",{className:"text-base font-semibold text-content",children:"加载失败"}),T.jsx("p",{className:"text-[13px] text-content-secondary max-w-md text-center leading-relaxed",children:e.error})]});const a=e.mode==="edit";return T.jsxs("div",{className:"flex-1 min-w-0 flex overflow-hidden",children:[T.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col",children:[r&&!a&&T.jsxs("div",{className:"px-12 pt-7 pb-0 border-b border-edge-light bg-surface",children:[T.jsx("h1",{className:"text-[26px] font-bold text-content leading-snug tracking-tight mb-2",children:r.title}),T.jsxs("div",{className:"flex items-center gap-3 pb-4 text-xs text-content-tertiary flex-wrap",children:[T.jsx("span",{children:r.section}),r.group&&T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"text-edge",children:"·"}),T.jsx("span",{children:r.group})]}),T.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-[11px] font-medium leading-snug border ${i}`,children:r.level}),T.jsx("div",{className:"flex-1"}),T.jsx(_F,{})]})]}),a?T.jsx(EF,{}):T.jsx(T.Fragment,{children:T.jsx("div",{className:"flex-1 px-12 pt-8 pb-20 max-w-[860px] mx-auto overflow-x-hidden",children:T.jsx(mF,{content:e.content})})})]}),e.content&&!n&&!a&&T.jsx(kF,{content:e.content})]})};function vF(e,t,n,r){var i=this,a=P.useRef(null),u=P.useRef(0),l=P.useRef(0),c=P.useRef(null),f=P.useRef([]),m=P.useRef(),h=P.useRef(),_=P.useRef(e),g=P.useRef(!0),y=P.useRef(),C=P.useRef();_.current=e;var k=typeof window<"u",w=!t&&t!==0&&k;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var D=!!(n=n||{}).leading,N=!("trailing"in n)||!!n.trailing,U=!!n.flushOnExit&&N,z="maxWait"in n,B="debounceOnServer"in n&&!!n.debounceOnServer,X=z?Math.max(+n.maxWait||0,t):null,Q=P.useMemo(function(){var ne=function(ee){var me=f.current,re=m.current;return f.current=m.current=null,u.current=ee,l.current=l.current||ee,h.current=_.current.apply(re,me)},$=function(ee,me){w&&cancelAnimationFrame(c.current),c.current=w?requestAnimationFrame(ee):setTimeout(ee,me)},oe=function(ee){if(!g.current)return!1;var me=ee-a.current;return!a.current||me>=t||me<0||z&&ee-u.current>=X},ue=function(ee){return c.current=null,N&&f.current?ne(ee):(f.current=m.current=null,h.current)},ve=function ee(){var me=Date.now();if(D&&l.current===u.current&&he(),oe(me))return ue(me);if(g.current){var re=t-(me-a.current),ge=z?Math.min(re,X-(me-u.current)):re;$(ee,ge)}},he=function(){},te=function(){if(k||B){var ee,me=Date.now(),re=oe(me);if(f.current=[].slice.call(arguments),m.current=i,a.current=me,U&&!y.current&&(y.current=function(){var ge;((ge=globalThis.document)==null?void 0:ge.visibilityState)==="hidden"&&C.current.flush()},(ee=globalThis.document)==null||ee.addEventListener==null||ee.addEventListener("visibilitychange",y.current)),re){if(!c.current&&g.current)return u.current=a.current,$(ve,t),D?ne(a.current):h.current;if(z)return $(ve,t),ne(a.current)}return c.current||$(ve,t),h.current}};return te.cancel=function(){var ee=c.current;ee&&(w?cancelAnimationFrame(c.current):clearTimeout(c.current)),u.current=0,f.current=a.current=m.current=c.current=null},te.isPending=function(){return!!c.current},te.flush=function(){return c.current?ue(Date.now()):h.current},te},[D,z,t,X,N,U,w,k,B,r]);return C.current=Q,P.useEffect(function(){return g.current=!0,function(){var ne;U&&C.current.flush(),y.current&&((ne=globalThis.document)==null||ne.removeEventListener==null||ne.removeEventListener("visibilitychange",y.current),y.current=null),g.current=!1}},[U]),Q}const SF=({size:e=16})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("circle",{cx:"11",cy:"11",r:"8"}),T.jsx("path",{d:"M21 21l-4.35-4.35"})]}),AF=({size:e=18})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M18 6L6 18"}),T.jsx("path",{d:"M6 6l12 12"})]}),IF=({size:e=14})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),T.jsx("polyline",{points:"14 2 14 8 20 8"})]}),NF=yt.memo(({result:e,onClick:t})=>{const n=e.page.level==="Beginner"?"badge-beginner":e.page.level==="Intermediate"?"badge-intermediate":"badge-advanced";return T.jsxs("button",{onClick:t,className:`
|
|
462
|
+
flex items-start gap-2.5 w-full px-3.5 py-2.5
|
|
463
|
+
border-none bg-transparent text-content
|
|
464
|
+
cursor-pointer text-left rounded-md
|
|
465
|
+
transition-colors duration-150
|
|
466
|
+
hover:bg-surface-hover
|
|
467
|
+
`,children:[T.jsx(IF,{size:16}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[T.jsx("span",{className:"font-medium text-[13px] truncate",children:e.page.title}),T.jsx("span",{className:`badge ${n}`,children:e.page.level})]}),T.jsxs("div",{className:"text-[12px] text-content-tertiary truncate",children:[e.page.section,e.page.group?` / ${e.page.group}`:""]}),e.content&&T.jsx("div",{className:"text-[12px] text-content-secondary mt-1 truncate max-w-full",children:e.content})]})]})}),LF=()=>{const e=we(y=>y.searchOpen),t=we(y=>y.searchQuery),n=we(y=>y.searchResults),r=we(y=>y.config),i=we(y=>y.setSearchOpen),a=we(y=>y.setSearchQuery),u=we(y=>y.setSearchResults),l=we(y=>y.setCurrentProject),c=we(y=>y.setCurrentView),f=P.useRef(null);P.useEffect(()=>{e&&setTimeout(()=>{var y;(y=f.current)==null||y.focus()},50)},[e]);const m=vF(async y=>{if(!y.trim()){u([]);return}const C=r==null?void 0:r.lastOpenedProject;if(!C){u([]);return}try{const k=await V_(C,y);u(k)}catch(k){console.error("Search failed:",k),u([])}},200),h=P.useCallback(y=>{const C=y.target.value;a(C),m(C)},[a,m]),_=P.useCallback(y=>{y.projectId!==(r==null?void 0:r.lastOpenedProject)&&l(y.projectId);const C=we.getState().projects.find(w=>w.id===y.projectId),k=(C==null?void 0:C.currentVersion)||"latest";c({projectId:y.projectId,version:k,slug:y.page.slug,content:"",loading:!0,mode:"read",editContent:null,isDirty:!1,fileMtime:null,conflictData:null}),qi(y.projectId,k,y.page.slug).then(w=>{c({projectId:y.projectId,version:k,slug:y.page.slug,content:w.content,loading:!1,mode:"read",editContent:null,isDirty:!1,fileMtime:w.mtime,conflictData:null})}).catch(w=>{c({projectId:y.projectId,version:k,slug:y.page.slug,content:"",loading:!1,error:w instanceof Error?w.message:"Failed to load page",mode:"read",editContent:null,isDirty:!1,fileMtime:null,conflictData:null})}),i(!1)},[r==null?void 0:r.lastOpenedProject,l,c,i,qi]),g=P.useCallback(y=>{y.target===y.currentTarget&&i(!1)},[i]);return e?T.jsx("div",{className:"overlay overlay-centered",onClick:g,children:T.jsxs("div",{className:`
|
|
468
|
+
modal w-[560px] max-h-[70vh]
|
|
469
|
+
bg-surface-secondary border border-edge
|
|
470
|
+
rounded-xl shadow-lg
|
|
471
|
+
flex flex-col overflow-hidden
|
|
472
|
+
`,children:[T.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3.5 border-b border-edge",children:[T.jsx(SF,{size:18}),T.jsx("input",{ref:f,type:"text",value:t,onChange:h,placeholder:"搜索文档...",className:`
|
|
473
|
+
flex-1 border-none outline-none bg-transparent
|
|
474
|
+
text-content text-[15px]
|
|
475
|
+
`}),T.jsx("button",{onClick:()=>i(!1),className:`
|
|
476
|
+
flex items-center justify-center
|
|
477
|
+
w-7 h-7 border border-edge rounded-md
|
|
478
|
+
bg-surface-tertiary text-content-tertiary
|
|
479
|
+
cursor-pointer text-[11px]
|
|
480
|
+
hover:bg-surface-hover hover:text-content
|
|
481
|
+
transition-colors duration-150
|
|
482
|
+
`,title:"关闭 (Esc)",children:T.jsx(AF,{size:14})})]}),T.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:t&&n.length===0?T.jsx("div",{className:"py-6 px-4 text-center text-content-tertiary text-[13px]",children:"没有找到相关结果"}):t?n.map((y,C)=>T.jsx(NF,{result:y,onClick:()=>_(y)},`${y.projectId}-${y.page.slug}-${C}`)):T.jsx("div",{className:"py-6 px-4 text-center text-content-tertiary text-[13px]",children:"输入关键词开始搜索"})}),n.length>0&&T.jsxs("div",{className:"px-4 py-2 border-t border-edge text-[11px] text-content-tertiary text-center",children:["找到 ",n.length," 个结果"]})]})}):null};function RF(){const e=we(t=>t.config);P.useEffect(()=>{const t=(e==null?void 0:e.theme)||"light";document.documentElement.setAttribute("data-theme",t)},[e==null?void 0:e.theme])}function OF(){const e=we(u=>u.toggleSearch),t=we(u=>u.setSearchOpen),n=we(u=>u.setSettingsOpen),r=we(u=>u.toggleSidebar),i=we(u=>u.searchOpen),a=we(u=>u.settingsOpen);P.useEffect(()=>{function u(l){const c=l.ctrlKey||l.metaKey;if(c&&l.key==="k"){l.preventDefault(),e();return}if(c&&l.key==="b"){l.preventDefault(),r();return}l.key==="Escape"&&(i?t(!1):a&&n(!1))}return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[e,t,n,r,i,a])}const PF=P.lazy(()=>A(()=>import("./SettingsModal-CTBLFFSS.js"),__vite__mapDeps([104,1]))),DF=P.lazy(()=>A(()=>import("./ReferenceModal-B916Di7q.js"),__vite__mapDeps([105,1]))),MF=P.lazy(()=>A(()=>import("./MermaidViewerModal-BRk7-q4K.js"),__vite__mapDeps([106,1]))),BF=P.lazy(()=>A(()=>import("./AIPanel-C-YfdAam.js"),__vite__mapDeps([107,1])).then(e=>({default:e.AIPanel}))),FF=()=>{const e=we(i=>i.setConfig),t=we(i=>i.setProjects),n=we(i=>i.setCurrentWiki);we(i=>i.setCurrentView),we(i=>i.setCurrentProject);const r=Al(i=>i.aiPanelOpen);return RF(),OF(),P.useEffect(()=>{let i=!1;async function a(){try{const u=await G_();if(i)return;if(e(u),t(u.projects),u.lastOpenedProject)try{const l=await Zh(u.lastOpenedProject);if(i)return;n(l)}catch(l){console.error("Failed to load last opened project wiki:",l)}}catch(u){console.error("Failed to initialize app:",u)}}return a(),()=>{i=!0}},[e,t,n]),T.jsxs(Kw,{children:[T.jsxs("div",{className:"flex flex-col h-screen bg-surface text-content overflow-hidden",children:[T.jsx(mC,{}),T.jsxs("div",{className:"flex flex-1 min-h-0",children:[T.jsx(TC,{}),T.jsx("main",{className:"flex-1 flex flex-col min-w-0",children:T.jsx(CF,{})}),r&&T.jsx(P.Suspense,{fallback:T.jsx("div",{className:"ai-panel-loading",children:"加载 AI..."}),children:T.jsx(BF,{})})]})]}),T.jsx(LF,{}),T.jsxs(P.Suspense,{fallback:null,children:[T.jsx(PF,{}),T.jsx(DF,{}),T.jsx(MF,{})]})]})},Uk=document.getElementById("root");if(!Uk)throw new Error("Root element not found");Qw.createRoot(Uk).render(T.jsx(yt.StrictMode,{children:T.jsx(FF,{})}));const jF=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:pT},Symbol.toStringTag,{value:"Module"}));export{cD as A,yt as E,QF as L,nn as R,t7 as S,rC as a,iC as b,G_ as c,sC as d,PN as e,uC as f,oC as g,Al as h,zF as i,T as j,$F as k,KF as l,e7 as m,P as r,aC as t,we as u};
|