@hyperflow.fun/ghost 0.0.7 → 0.0.9

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.
Files changed (86) hide show
  1. package/README.md +11 -9
  2. package/dist/index.js +79499 -44452
  3. package/dist/package.json +1 -1
  4. package/dist/templates/SOUL.md +8 -0
  5. package/dist/web/dist/assets/{Chart-234Kdnfi.js → Chart-DpKu5h2M.js} +1 -1
  6. package/dist/web/dist/assets/{Config-BYGKgURp.js → Config-gzLZUKBZ.js} +1 -1
  7. package/dist/web/dist/assets/{Cost-BQAkdVIa.js → Cost-BVMipOkN.js} +1 -1
  8. package/dist/web/dist/assets/{Cron-D5wFcTwJ.js → Cron-C9SB1S0l.js} +1 -1
  9. package/dist/web/dist/assets/{Dashboard-BdZ2aC9H.js → Dashboard-BG-glqRY.js} +1 -1
  10. package/dist/web/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  11. package/dist/web/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  12. package/dist/web/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  13. package/dist/web/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  14. package/dist/web/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  15. package/dist/web/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  16. package/dist/web/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  17. package/dist/web/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  18. package/dist/web/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  19. package/dist/web/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  20. package/dist/web/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  21. package/dist/web/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  22. package/dist/web/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  23. package/dist/web/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  24. package/dist/web/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  25. package/dist/web/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  26. package/dist/web/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  27. package/dist/web/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  28. package/dist/web/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  29. package/dist/web/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  30. package/dist/web/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  31. package/dist/web/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  32. package/dist/web/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  33. package/dist/web/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  34. package/dist/web/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  35. package/dist/web/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  36. package/dist/web/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  37. package/dist/web/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  38. package/dist/web/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  39. package/dist/web/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  40. package/dist/web/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  41. package/dist/web/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  42. package/dist/web/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  43. package/dist/web/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  44. package/dist/web/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  45. package/dist/web/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  46. package/dist/web/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  47. package/dist/web/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  48. package/dist/web/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  49. package/dist/web/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  50. package/dist/web/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  51. package/dist/web/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  52. package/dist/web/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  53. package/dist/web/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  54. package/dist/web/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  55. package/dist/web/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  56. package/dist/web/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  57. package/dist/web/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  58. package/dist/web/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  59. package/dist/web/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  60. package/dist/web/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  61. package/dist/web/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  62. package/dist/web/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  63. package/dist/web/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  64. package/dist/web/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  65. package/dist/web/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  66. package/dist/web/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  67. package/dist/web/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  68. package/dist/web/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  69. package/dist/web/dist/assets/{Logs-D47Y9BIl.js → Logs-C6SDjLaq.js} +1 -1
  70. package/dist/web/dist/assets/{Memory-BexXuxoQ.js → Memory-c_I-OUzC.js} +1 -1
  71. package/dist/web/dist/assets/{Sessions-D3walnqk.js → Sessions-3ZsT5zN5.js} +1 -1
  72. package/dist/web/dist/assets/{Skills-pAthDu4_.js → Skills-osDspDnu.js} +1 -1
  73. package/dist/web/dist/assets/{Tools-BFHGHPXB.js → Tools-BmiDKDjv.js} +1 -1
  74. package/dist/web/dist/assets/{activity-DoII5Fp-.js → activity-Dhq3V6kN.js} +1 -1
  75. package/dist/web/dist/assets/{clock-RU3zeFmt.js → clock-dqJWkiuE.js} +1 -1
  76. package/dist/web/dist/assets/{highlighted-body-OFNGDK62-y6A7wCrG.js → highlighted-body-OFNGDK62-BxVZVvj8.js} +1 -1
  77. package/dist/web/dist/assets/index-C9j7T7rz.css +1 -0
  78. package/dist/web/dist/assets/index-Du3VgAo4.js +57 -0
  79. package/dist/web/dist/assets/mermaid-GHXKKRXX-CNibSrez.js +550 -0
  80. package/dist/web/dist/assets/mermaid-GHXKKRXX-Ds5qNABy.css +1 -0
  81. package/dist/web/dist/assets/{refresh-cw-BYmwU45d.js → refresh-cw-BoPT0lMd.js} +1 -1
  82. package/dist/web/dist/index.html +2 -2
  83. package/package.json +6 -1
  84. package/dist/web/dist/assets/index-BcTR6SiD.js +0 -59
  85. package/dist/web/dist/assets/index-PX2emSv9.css +0 -1
  86. package/dist/web/dist/assets/mermaid-GHXKKRXX-DC3T5XzO.js +0 -282
@@ -1,282 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-y6A7wCrG.js","assets/vendor-react-B0mWfPOm.js","assets/vendor-viem-wp7lz4Hc.js","assets/index-BcTR6SiD.js","assets/vendor-charts-CfOL2F-E.js","assets/index-PX2emSv9.css","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"])))=>i.map(i=>d[i]);
2
- var A0=Object.defineProperty;var C0=Object.getPrototypeOf;var w0=Reflect.get;var Pu=e=>{throw TypeError(e)};var I0=(e,t,n)=>t in e?A0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var O=(e,t,n)=>I0(e,typeof t!="symbol"?t+"":t,n),$s=(e,t,n)=>t.has(e)||Pu("Cannot "+n);var We=(e,t,n)=>($s(e,t,"read from private field"),n?n.call(e):t.get(e)),gn=(e,t,n)=>t.has(e)?Pu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Et=(e,t,n,r)=>($s(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),js=(e,t,n)=>($s(e,t,"access private method"),n);var Du=(e,t,n)=>w0(C0(e),n,t);import{g as Td,r as k,j as E,a as yo,f as S0,h as N0,o as L0,s as R0,i as v0,k as O0,l as P0,m as D0,n as M0,p as B0,q as F0}from"./vendor-react-B0mWfPOm.js";import{_}from"./vendor-viem-wp7lz4Hc.js";import{T as H0,d as U0,e as zt,f as Gt,B as qr,g as yd,G as $i,F as xd,h as kd,i as Ad,j as Cd,k as xo,l as ko,m as Mu,R as Bu,a as $0,n as j0}from"./index-BcTR6SiD.js";import{q as ji,R as Ao,n as An,V as V0,K as wd,W as Id,h as Fu}from"./vendor-charts-CfOL2F-E.js";const ps=(function(e){if(e==null)return q0;if(typeof e=="function")return ms(e);if(typeof e=="object")return Array.isArray(e)?z0(e):G0(e);if(typeof e=="string")return W0(e);throw new Error("Expected function, string, or object as test")});function z0(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ps(e[n]);return ms(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function G0(e){const t=e;return ms(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function W0(e){return ms(t);function t(n){return n&&n.type===e}}function ms(e){return t;function t(n,r,i){return!!(Y0(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function q0(){return!0}function Y0(e){return e!==null&&typeof e=="object"&&"type"in e}const Sd=[],Rr=!0,Ra=!1,Zn="skip";function Co(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=ps(i),a=r?-1:1;o(e,void 0,[])();function o(u,l,c){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(u.type+(f?"<"+f+">":""))+")"})}return p;function p(){let f=Sd,m,b,y;if((!t||s(u,l,c[c.length-1]||void 0))&&(f=Q0(n(u,c)),f[0]===Ra))return f;if("children"in u&&u.children){const g=u;if(g.children&&f[0]!==Zn)for(b=(r?g.children.length:-1)+a,y=c.concat(g);b>-1&&b<g.children.length;){const I=g.children[b];if(m=o(I,b,y)(),m[0]===Ra)return m;b=typeof m[1]=="number"?m[1]:b+a}}return f}}}function Q0(e){return Array.isArray(e)?e:typeof e=="number"?[Rr,e]:e==null?Sd:[e]}function Rt(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),Co(e,s,o,i);function o(u,l){const c=l[l.length-1],d=c?c.children.indexOf(u):void 0;return a(u,d,c)}}const ir={indicator:"indicator",textOnly:"text-only",remove:"remove"};function K0({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="text-gray-500",linkBlockPolicy:o=ir.indicator,imageBlockPolicy:u=ir.indicator}){const l=t.length&&!t.every(d=>d==="*"),c=n.length&&!n.every(d=>d==="*");if(!e&&(l||c))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const p=ng(e,t,n,r,i,s,a,o,u);Nd(d),Rt(d,p)}}function Hu(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 X0(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const Z0=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),J0=new Set(["javascript:","data:","file:","vbscript:"]);function Uu(e,t,n,r=!1,i=!1,s=[]){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 c=e.substring(5);if(c&&c.length>0&&c!=="invalid")return e}}catch{return null}return null}const a=Hu(e,n);if(!a||J0.has(a.protocol)||!(Z0.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const u=X0(e);return a&&t.some(l=>{const c=Hu(l,n);return!c||c.origin!==a.origin?!1:a.href.startsWith(c.href)})?u?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:u?a.pathname+a.search+a.hash:a.href:null}function Nd(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Nd(t)}}const Vs=Symbol("node-seen");function eg(e,t,n){return t===ir.remove?{type:"remove"}:t===ir.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 tg(e,t,n){if(t===ir.remove)return{type:"remove"};if(t===ir.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 ng=(e,t,n,r,i,s,a,o,u)=>{const l=(c,d,p)=>{if(c.type!=="element"||c[Vs])return Rr;if(c.tagName==="a"){const f=Uu(c.properties.href,t,e,!1,!1,i);if(f===null){if(c[Vs]=!0,Rt(c,l),p&&typeof d=="number"){const m=eg(c,o,a);if(m.type==="remove")return p.children.splice(d,1),[Zn,d];p.children[d]=m.element}return Zn}else return c.properties.href=f,c.properties.target="_blank",c.properties.rel="noopener noreferrer",Rr}if(c.tagName==="img"){const f=Uu(c.properties.src,n,e,r,!0,i);if(f===null){if(c[Vs]=!0,Rt(c,l),p&&typeof d=="number"){const m=tg(c,u,s);if(m.type==="remove")return p.children.splice(d,1),[Zn,d];p.children[d]=m.element}return Zn}else return c.properties.src=f,Rr}return Rr};return l},Ld=-1,gs=0,Mr=1,Vi=2,wo=3,Io=4,So=5,No=6,Rd=7,vd=8,$u=typeof self=="object"?self:globalThis,rg=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case gs:case Ld:return n(a,i);case Mr:{const o=n([],i);for(const u of a)o.push(r(u));return o}case Vi:{const o=n({},i);for(const[u,l]of a)o[r(u)]=r(l);return o}case wo:return n(new Date(a),i);case Io:{const{source:o,flags:u}=a;return n(new RegExp(o,u),i)}case So:{const o=n(new Map,i);for(const[u,l]of a)o.set(r(u),r(l));return o}case No:{const o=n(new Set,i);for(const u of a)o.add(r(u));return o}case Rd:{const{name:o,message:u}=a;return n(new $u[o](u),i)}case vd:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new $u[s](a),i)};return r},ju=e=>rg(new Map,e)(0),zn="",{toString:ig}={},{keys:sg}=Object,yr=e=>{const t=typeof e;if(t!=="object"||!e)return[gs,t];const n=ig.call(e).slice(8,-1);switch(n){case"Array":return[Mr,zn];case"Object":return[Vi,zn];case"Date":return[wo,zn];case"RegExp":return[Io,zn];case"Map":return[So,zn];case"Set":return[No,zn];case"DataView":return[Mr,n]}return n.includes("Array")?[Mr,n]:n.includes("Error")?[Rd,n]:[Vi,n]},pi=([e,t])=>e===gs&&(t==="function"||t==="symbol"),ag=(e,t,n,r)=>{const i=(a,o)=>{const u=r.push(a)-1;return n.set(o,u),u},s=a=>{if(n.has(a))return n.get(a);let[o,u]=yr(a);switch(o){case gs:{let c=a;switch(u){case"bigint":o=vd,c=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([Ld],a)}return i([o,c],a)}case Mr:{if(u){let p=a;return u==="DataView"?p=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(p=new Uint8Array(a)),i([u,[...p]],a)}const c=[],d=i([o,c],a);for(const p of a)c.push(s(p));return d}case Vi:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const c=[],d=i([o,c],a);for(const p of sg(a))(e||!pi(yr(a[p])))&&c.push([s(p),s(a[p])]);return d}case wo:return i([o,a.toISOString()],a);case Io:{const{source:c,flags:d}=a;return i([o,{source:c,flags:d}],a)}case So:{const c=[],d=i([o,c],a);for(const[p,f]of a)(e||!(pi(yr(p))||pi(yr(f))))&&c.push([s(p),s(f)]);return d}case No:{const c=[],d=i([o,c],a);for(const p of a)(e||!pi(yr(p)))&&c.push(s(p));return d}}const{message:l}=a;return i([o,{name:u,message:l}],a)};return s},Vu=(e,{json:t,lossy:n}={})=>{const r=[];return ag(!(t||n),!!t,new Map,r)(e),r},Rn=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ju(Vu(e,t)):structuredClone(e):(e,t)=>ju(Vu(e,t));class ii{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ii.prototype.normal={};ii.prototype.property={};ii.prototype.space=void 0;function Od(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ii(n,r,t)}function Yr(e){return e.toLowerCase()}class nt{constructor(t,n){this.attribute=n,this.property=t}}nt.prototype.attribute="";nt.prototype.booleanish=!1;nt.prototype.boolean=!1;nt.prototype.commaOrSpaceSeparated=!1;nt.prototype.commaSeparated=!1;nt.prototype.defined=!1;nt.prototype.mustUseProperty=!1;nt.prototype.number=!1;nt.prototype.overloadedBoolean=!1;nt.prototype.property="";nt.prototype.spaceSeparated=!1;nt.prototype.space=void 0;let og=0;const ne=Mn(),Se=Mn(),va=Mn(),j=Mn(),_e=Mn(),tr=Mn(),it=Mn();function Mn(){return 2**++og}const Oa=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Se,commaOrSpaceSeparated:it,commaSeparated:tr,number:j,overloadedBoolean:va,spaceSeparated:_e},Symbol.toStringTag,{value:"Module"})),zs=Object.keys(Oa);class Lo extends nt{constructor(t,n,r,i){let s=-1;if(super(t,n),zu(this,"space",i),typeof r=="number")for(;++s<zs.length;){const a=zs[s];zu(this,zs[s],(r&Oa[a])===Oa[a])}}}Lo.prototype.defined=!0;function zu(e,t,n){n&&(e[t]=n)}function ur(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Lo(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Yr(r)]=r,n[Yr(s.attribute)]=r}return new ii(t,n,e.space)}const Pd=ur({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:_e,ariaCurrent:null,ariaDescribedBy:_e,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:_e,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:_e,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_e,ariaLevel:j,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:_e,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:_e,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:Se,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Dd(e,t){return t in e?e[t]:t}function Md(e,t){return Dd(e,t.toLowerCase())}const ug=ur({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:tr,acceptCharset:_e,accessKey:_e,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:_e,autoFocus:ne,autoPlay:ne,blocking:_e,capture:null,charSet:null,checked:ne,cite:null,className:_e,cols:j,colSpan:null,content:null,contentEditable:Se,controls:ne,controlsList:_e,coords:j|tr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:va,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:_e,height:j,hidden:va,high:j,href:null,hrefLang:null,htmlFor:_e,httpEquiv:_e,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:_e,itemRef:_e,itemScope:ne,itemType:_e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,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:ne,optimum:j,pattern:null,ping:_e,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:_e,required:ne,reversed:ne,rows:j,rowSpan:j,sandbox:_e,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Se,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_e,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ne,disableRemotePlayback:ne,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:Md}),lg=ur({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:it,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:_e,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:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,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:tr,g2:tr,glyphName:tr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:it,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,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:j,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:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:it,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:it,rev:it,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:it,requiredFeatures:it,requiredFonts:it,requiredFormats:it,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:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:it,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:it,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:it,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Dd}),Bd=ur({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()}}),Fd=ur({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Md}),Hd=ur({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),cg={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"},dg=/[A-Z]/g,Gu=/-[a-z]/g,hg=/^data[-\w.:]+$/i;function si(e,t){const n=Yr(t);let r=t,i=nt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&hg.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Gu,pg);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Gu.test(s)){let a=s.replace(dg,fg);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Lo}return new i(r,t)}function fg(e){return"-"+e.toLowerCase()}function pg(e){return e.charAt(1).toUpperCase()}const lr=Od([Pd,ug,Bd,Fd,Hd],"html"),vt=Od([Pd,lg,Bd,Fd,Hd],"svg");function Wu(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function Ro(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const qu=/[#.]/g;function mg(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){qu.lastIndex=i;const o=qu.exec(n),u=n.slice(i,o?o.index:n.length);u&&(s?s==="#"?r.id=u:Array.isArray(r.className)?r.className.push(u):r.className=[u]:a=u,i+=u.length),o&&(s=o[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function Yu(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function vo(e){return e.join(" ").trim()}function Ud(e,t,n){const r=n?_g(n):void 0;function i(s,a,...o){let u;if(s==null){u={type:"root",children:[]};const l=a;o.unshift(l)}else{u=mg(s,t);const l=u.tagName.toLowerCase(),c=r?r.get(l):void 0;if(u.tagName=c||l,gg(a))o.unshift(a);else for(const[d,p]of Object.entries(a))bg(e,u.properties,d,p)}for(const l of o)Pa(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function gg(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 s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function bg(e,t,n,r){const i=si(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=Yu(r):i.commaSeparated?s=Wu(r):i.commaOrSpaceSeparated?s=Yu(Wu(r).join(" ")):s=Qu(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?Eg(r):String(r);if(Array.isArray(s)){const a=[];for(const o of s)a.push(Qu(i,i.property,o));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function Pa(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)Pa(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Pa(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Qu(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Yr(n)===Yr(t)))return!0}return n}function Eg(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function _g(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Tg=["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"],yg=Ud(lr,"div"),xg=Ud(vt,"g",Tg);function kg(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const u=Ku(t,n[a-1]);o=u===-1?t.length+1:u+1,n[a]=o}if(o>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const o=n[n.length-1],u=Ku(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;n.push(l)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function Ku(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
3
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Cn={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/"},$d={}.hasOwnProperty,Ag=Object.prototype;function Cg(e,t){const n=t||{};return Oo({file:n.file||void 0,location:!1,schema:n.space==="svg"?vt:lr,verbose:n.verbose||!1},e)}function Oo(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Oi(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:jd(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=kg(s),o=a.toPoint(0),u=a.toPoint(s.length);n.position={start:o,end:u}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Oi(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Oi(e,r,n),n}default:return n=wg(e,t),n}}function jd(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Oo(e,t[n]);r.push(i)}return r}function wg(e,t){const n=e.schema;e.schema=t.namespaceURI===Cn.svg?vt:lr;let r=-1;const i={};for(;++r<t.attrs.length;){const o=t.attrs[r],u=(o.prefix?o.prefix+":":"")+o.name;$d.call(Ag,u)||(i[u]=o.value)}const a=(e.schema.space==="svg"?xg:yg)(t.tagName,i,jd(e,t.childNodes));if(Oi(e,t,a),a.tagName==="template"){const o=t,u=o.sourceCodeLocation,l=u&&u.startTag&&Jn(u.startTag),c=u&&u.endTag&&Jn(u.endTag),d=Oo(e,o.content);l&&c&&e.file&&(d.position={start:l.end,end:c.start}),a.content=d}return e.schema=n,a}function Oi(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=Ig(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Ig(e,t,n){const r=Jn(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 s={};let a;if(n.attrs)for(a in n.attrs)$d.call(n.attrs,a)&&(s[si(e.schema,a).property]=Jn(n.attrs[a]));n.startTag;const o=Jn(n.startTag),u=n.endTag?Jn(n.endTag):void 0,l={opening:o};u&&(l.closing=u),l.properties=s,t.data={position:l}}}return r}function Jn(e){const t=Xu({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Xu({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Xu(e){return e.line&&e.column?e:void 0}const Zu={}.hasOwnProperty;function Po(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const o=r.handlers;if(i&&Zu.call(i,e)){const u=String(i[e]);a=Zu.call(o,u)?o[u]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Sg={},Ng={}.hasOwnProperty,Vd=Po("type",{handlers:{root:Rg,element:Mg,text:Pg,comment:Dg,doctype:Og}});function Lg(e,t){const r=(t||Sg).space;return Vd(e,r==="svg"?vt:lr)}function Rg(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Do(e.children,n,t),cr(e,n),n}function vg(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Do(e.children,n,t),cr(e,n),n}function Og(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return cr(e,t),t}function Pg(e){const t={nodeName:"#text",value:e.value,parentNode:null};return cr(e,t),t}function Dg(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return cr(e,t),t}function Mg(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=vt);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&Ng.call(e.properties,s)){const u=Bg(r,s,e.properties[s]);u&&i.push(u)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Cn[a],childNodes:[],parentNode:null};return o.childNodes=Do(e.children,o,r),cr(e,o),e.tagName==="template"&&e.content&&(o.content=vg(e.content,r)),o}function Bg(e,t,n){const r=si(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?Ro(n):vo(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Cn[r.space]}return i}function Do(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=Vd(e[r],n);s.parentNode=t,i.push(s)}return i}function cr(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 zd=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Fg=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]),ye="�";var T;(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"})(T||(T={}));const et={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Gd(e){return e>=55296&&e<=57343}function Hg(e){return e>=56320&&e<=57343}function Ug(e,t){return(e-55296)*1024+9216+t}function Wd(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function qd(e){return e>=64976&&e<=65007||Fg.has(e)}var D;(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"})(D||(D={}));const $g=65536;class jg{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=$g,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:s}=this,a=i+n,o=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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(Hg(n))return this.pos++,this._addGap(),Ug(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,T.EOF;return this._err(D.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,T.EOF;const r=this.html.charCodeAt(n);return r===T.CARRIAGE_RETURN?T.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,T.EOF;let t=this.html.charCodeAt(this.pos);return t===T.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,T.LINE_FEED):t===T.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Gd(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===T.LINE_FEED||t===T.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Wd(t)?this._err(D.controlCharacterInInputStream):qd(t)&&this._err(D.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var ae;(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"})(ae||(ae={}));function Yd(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 Vg=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୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢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;怳Ādp໩໮uct;戏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ǣጓ\0጖y;䐎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Ā;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀ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Ā;e᜚᜜lƀ;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\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩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ↄⅪ←ٖ↛ǰ↉\0↎proø₞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;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\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\0⹻m;櫳;櫽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))),zg=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 Gg(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=zg.get(e))!==null&&t!==void 0?t:e}var Be;(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"})(Be||(Be={}));const Wg=32;var an;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(an||(an={}));function Da(e){return e>=Be.ZERO&&e<=Be.NINE}function qg(e){return e>=Be.UPPER_A&&e<=Be.UPPER_F||e>=Be.LOWER_A&&e<=Be.LOWER_F}function Yg(e){return e>=Be.UPPER_A&&e<=Be.UPPER_Z||e>=Be.LOWER_A&&e<=Be.LOWER_Z||Da(e)}function Qg(e){return e===Be.EQUALS||Yg(e)}var De;(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"})(De||(De={}));var $t;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})($t||($t={}));class Kg{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=De.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=$t.Strict}startEntity(t){this.decodeMode=t,this.state=De.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case De.EntityStart:return t.charCodeAt(n)===Be.NUM?(this.state=De.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=De.NamedEntity,this.stateNamedEntity(t,n));case De.NumericStart:return this.stateNumericStart(t,n);case De.NumericDecimal:return this.stateNumericDecimal(t,n);case De.NumericHex:return this.stateNumericHex(t,n);case De.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Wg)===Be.LOWER_X?(this.state=De.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=De.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Da(i)||qg(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(Da(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===Be.SEMI)this.consumed+=1;else if(this.decodeMode===$t.Strict)return 0;return this.emitCodePoint(Gg(this.result),this.consumed),this.errors&&(t!==Be.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&an.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=Xg(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===$t.Attribute&&(s===0||Qg(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&an.VALUE_LENGTH)>>14,s!==0){if(a===Be.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==$t.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]&an.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]&~an.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case De.NamedEntity:return this.result!==0&&(this.decodeMode!==$t.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case De.NumericDecimal:return this.emitNumericEntity(0,2);case De.NumericHex:return this.emitNumericEntity(0,3);case De.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case De.EntityStart:return 0}}}function Xg(e,t,n,r){const i=(t&an.BRANCH_LENGTH)>>7,s=t&an.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const u=r-s;return u<0||u>=i?-1:e[n+u]-1}let a=n,o=a+i-1;for(;a<=o;){const u=a+o>>>1,l=e[u];if(l<r)a=u+1;else if(l>r)o=u-1;else return e[u+i]}return-1}var H;(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/"})(H||(H={}));var Ln;(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"})(Ln||(Ln={}));var ct;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ct||(ct={}));var R;(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"})(R||(R={}));var h;(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"})(h||(h={}));const Zg=new Map([[R.A,h.A],[R.ADDRESS,h.ADDRESS],[R.ANNOTATION_XML,h.ANNOTATION_XML],[R.APPLET,h.APPLET],[R.AREA,h.AREA],[R.ARTICLE,h.ARTICLE],[R.ASIDE,h.ASIDE],[R.B,h.B],[R.BASE,h.BASE],[R.BASEFONT,h.BASEFONT],[R.BGSOUND,h.BGSOUND],[R.BIG,h.BIG],[R.BLOCKQUOTE,h.BLOCKQUOTE],[R.BODY,h.BODY],[R.BR,h.BR],[R.BUTTON,h.BUTTON],[R.CAPTION,h.CAPTION],[R.CENTER,h.CENTER],[R.CODE,h.CODE],[R.COL,h.COL],[R.COLGROUP,h.COLGROUP],[R.DD,h.DD],[R.DESC,h.DESC],[R.DETAILS,h.DETAILS],[R.DIALOG,h.DIALOG],[R.DIR,h.DIR],[R.DIV,h.DIV],[R.DL,h.DL],[R.DT,h.DT],[R.EM,h.EM],[R.EMBED,h.EMBED],[R.FIELDSET,h.FIELDSET],[R.FIGCAPTION,h.FIGCAPTION],[R.FIGURE,h.FIGURE],[R.FONT,h.FONT],[R.FOOTER,h.FOOTER],[R.FOREIGN_OBJECT,h.FOREIGN_OBJECT],[R.FORM,h.FORM],[R.FRAME,h.FRAME],[R.FRAMESET,h.FRAMESET],[R.H1,h.H1],[R.H2,h.H2],[R.H3,h.H3],[R.H4,h.H4],[R.H5,h.H5],[R.H6,h.H6],[R.HEAD,h.HEAD],[R.HEADER,h.HEADER],[R.HGROUP,h.HGROUP],[R.HR,h.HR],[R.HTML,h.HTML],[R.I,h.I],[R.IMG,h.IMG],[R.IMAGE,h.IMAGE],[R.INPUT,h.INPUT],[R.IFRAME,h.IFRAME],[R.KEYGEN,h.KEYGEN],[R.LABEL,h.LABEL],[R.LI,h.LI],[R.LINK,h.LINK],[R.LISTING,h.LISTING],[R.MAIN,h.MAIN],[R.MALIGNMARK,h.MALIGNMARK],[R.MARQUEE,h.MARQUEE],[R.MATH,h.MATH],[R.MENU,h.MENU],[R.META,h.META],[R.MGLYPH,h.MGLYPH],[R.MI,h.MI],[R.MO,h.MO],[R.MN,h.MN],[R.MS,h.MS],[R.MTEXT,h.MTEXT],[R.NAV,h.NAV],[R.NOBR,h.NOBR],[R.NOFRAMES,h.NOFRAMES],[R.NOEMBED,h.NOEMBED],[R.NOSCRIPT,h.NOSCRIPT],[R.OBJECT,h.OBJECT],[R.OL,h.OL],[R.OPTGROUP,h.OPTGROUP],[R.OPTION,h.OPTION],[R.P,h.P],[R.PARAM,h.PARAM],[R.PLAINTEXT,h.PLAINTEXT],[R.PRE,h.PRE],[R.RB,h.RB],[R.RP,h.RP],[R.RT,h.RT],[R.RTC,h.RTC],[R.RUBY,h.RUBY],[R.S,h.S],[R.SCRIPT,h.SCRIPT],[R.SEARCH,h.SEARCH],[R.SECTION,h.SECTION],[R.SELECT,h.SELECT],[R.SOURCE,h.SOURCE],[R.SMALL,h.SMALL],[R.SPAN,h.SPAN],[R.STRIKE,h.STRIKE],[R.STRONG,h.STRONG],[R.STYLE,h.STYLE],[R.SUB,h.SUB],[R.SUMMARY,h.SUMMARY],[R.SUP,h.SUP],[R.TABLE,h.TABLE],[R.TBODY,h.TBODY],[R.TEMPLATE,h.TEMPLATE],[R.TEXTAREA,h.TEXTAREA],[R.TFOOT,h.TFOOT],[R.TD,h.TD],[R.TH,h.TH],[R.THEAD,h.THEAD],[R.TITLE,h.TITLE],[R.TR,h.TR],[R.TRACK,h.TRACK],[R.TT,h.TT],[R.U,h.U],[R.UL,h.UL],[R.SVG,h.SVG],[R.VAR,h.VAR],[R.WBR,h.WBR],[R.XMP,h.XMP]]);function dr(e){var t;return(t=Zg.get(e))!==null&&t!==void 0?t:h.UNKNOWN}const U=h,Jg={[H.HTML]:new Set([U.ADDRESS,U.APPLET,U.AREA,U.ARTICLE,U.ASIDE,U.BASE,U.BASEFONT,U.BGSOUND,U.BLOCKQUOTE,U.BODY,U.BR,U.BUTTON,U.CAPTION,U.CENTER,U.COL,U.COLGROUP,U.DD,U.DETAILS,U.DIR,U.DIV,U.DL,U.DT,U.EMBED,U.FIELDSET,U.FIGCAPTION,U.FIGURE,U.FOOTER,U.FORM,U.FRAME,U.FRAMESET,U.H1,U.H2,U.H3,U.H4,U.H5,U.H6,U.HEAD,U.HEADER,U.HGROUP,U.HR,U.HTML,U.IFRAME,U.IMG,U.INPUT,U.LI,U.LINK,U.LISTING,U.MAIN,U.MARQUEE,U.MENU,U.META,U.NAV,U.NOEMBED,U.NOFRAMES,U.NOSCRIPT,U.OBJECT,U.OL,U.P,U.PARAM,U.PLAINTEXT,U.PRE,U.SCRIPT,U.SECTION,U.SELECT,U.SOURCE,U.STYLE,U.SUMMARY,U.TABLE,U.TBODY,U.TD,U.TEMPLATE,U.TEXTAREA,U.TFOOT,U.TH,U.THEAD,U.TITLE,U.TR,U.TRACK,U.UL,U.WBR,U.XMP]),[H.MATHML]:new Set([U.MI,U.MO,U.MN,U.MS,U.MTEXT,U.ANNOTATION_XML]),[H.SVG]:new Set([U.TITLE,U.FOREIGN_OBJECT,U.DESC]),[H.XLINK]:new Set,[H.XML]:new Set,[H.XMLNS]:new Set},Ma=new Set([U.H1,U.H2,U.H3,U.H4,U.H5,U.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var x;(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"})(x||(x={}));const Ae={DATA:x.DATA,RCDATA:x.RCDATA,RAWTEXT:x.RAWTEXT,SCRIPT_DATA:x.SCRIPT_DATA,PLAINTEXT:x.PLAINTEXT,CDATA_SECTION:x.CDATA_SECTION};function e1(e){return e>=T.DIGIT_0&&e<=T.DIGIT_9}function vr(e){return e>=T.LATIN_CAPITAL_A&&e<=T.LATIN_CAPITAL_Z}function t1(e){return e>=T.LATIN_SMALL_A&&e<=T.LATIN_SMALL_Z}function Zt(e){return t1(e)||vr(e)}function Ju(e){return Zt(e)||e1(e)}function mi(e){return e+32}function Qd(e){return e===T.SPACE||e===T.LINE_FEED||e===T.TABULATION||e===T.FORM_FEED}function el(e){return Qd(e)||e===T.SOLIDUS||e===T.GREATER_THAN_SIGN}function n1(e){return e===T.NULL?D.nullCharacterReference:e>1114111?D.characterReferenceOutsideUnicodeRange:Gd(e)?D.surrogateCharacterReference:qd(e)?D.noncharacterCharacterReference:Wd(e)||e===T.CARRIAGE_RETURN?D.controlCharacterReference:null}class r1{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=x.DATA,this.returnState=x.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new jg(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Kg(Vg,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(D.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(D.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=n1(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:ae.START_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:ae.END_TAG,tagName:"",tagID:h.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:ae.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:ae.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(Yd(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(D.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=dr(t.tagName),t.type===ae.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(D.endTagWithAttributes),t.selfClosing&&this._err(D.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 ae.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case ae.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case ae.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:ae.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=Qd(t)?ae.WHITESPACE_CHARACTER:t===T.NULL?ae.NULL_CHARACTER:ae.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(ae.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=x.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?$t.Attribute:$t.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===x.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===x.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case x.DATA:{this._stateData(t);break}case x.RCDATA:{this._stateRcdata(t);break}case x.RAWTEXT:{this._stateRawtext(t);break}case x.SCRIPT_DATA:{this._stateScriptData(t);break}case x.PLAINTEXT:{this._statePlaintext(t);break}case x.TAG_OPEN:{this._stateTagOpen(t);break}case x.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case x.TAG_NAME:{this._stateTagName(t);break}case x.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case x.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case x.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case x.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case x.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case x.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case x.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case x.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case x.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case x.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case x.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case x.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case x.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case x.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case x.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case x.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case x.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case x.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case x.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case x.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case x.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case x.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case x.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case x.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case x.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case x.BOGUS_COMMENT:{this._stateBogusComment(t);break}case x.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case x.COMMENT_START:{this._stateCommentStart(t);break}case x.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case x.COMMENT:{this._stateComment(t);break}case x.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case x.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case x.COMMENT_END:{this._stateCommentEnd(t);break}case x.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case x.DOCTYPE:{this._stateDoctype(t);break}case x.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case x.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case x.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case x.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case x.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case x.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case x.CDATA_SECTION:{this._stateCdataSection(t);break}case x.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case x.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case x.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case x.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case T.LESS_THAN_SIGN:{this.state=x.TAG_OPEN;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitCodePoint(t);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case T.AMPERSAND:{this._startCharacterReference();break}case T.LESS_THAN_SIGN:{this.state=x.RCDATA_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case T.LESS_THAN_SIGN:{this.state=x.RAWTEXT_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Zt(t))this._createStartTagToken(),this.state=x.TAG_NAME,this._stateTagName(t);else switch(t){case T.EXCLAMATION_MARK:{this.state=x.MARKUP_DECLARATION_OPEN;break}case T.SOLIDUS:{this.state=x.END_TAG_OPEN;break}case T.QUESTION_MARK:{this._err(D.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t);break}case T.EOF:{this._err(D.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=x.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Zt(t))this._createEndTagToken(),this.state=x.TAG_NAME,this._stateTagName(t);else switch(t){case T.GREATER_THAN_SIGN:{this._err(D.missingEndTagName),this.state=x.DATA;break}case T.EOF:{this._err(D.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(D.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_ATTRIBUTE_NAME;break}case T.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.tagName+=ye;break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(vr(t)?mi(t):t)}}_stateRcdataLessThanSign(t){t===T.SOLIDUS?this.state=x.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Zt(t)?(this.state=x.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=x.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 T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=x.BEFORE_ATTRIBUTE_NAME,!1;case T.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=x.SELF_CLOSING_START_TAG,!1;case T.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=x.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===T.SOLIDUS?this.state=x.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Zt(t)?(this.state=x.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case T.SOLIDUS:{this.state=x.SCRIPT_DATA_END_TAG_OPEN;break}case T.EXCLAMATION_MARK:{this.state=x.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=x.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Zt(t)?(this.state=x.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===T.HYPHEN_MINUS?(this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=x.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case T.HYPHEN_MINUS:{this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case T.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_ESCAPED,this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===T.SOLIDUS?this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Zt(t)?(this._emitChars("<"),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Zt(t)?(this.state=x.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(et.SCRIPT,!1)&&el(this.preprocessor.peek(et.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<et.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case T.HYPHEN_MINUS:{this._emitChars("-");break}case T.LESS_THAN_SIGN:{this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case T.GREATER_THAN_SIGN:{this.state=x.SCRIPT_DATA,this._emitChars(">");break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(ye);break}case T.EOF:{this._err(D.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===T.SOLIDUS?(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(et.SCRIPT,!1)&&el(this.preprocessor.peek(et.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<et.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=x.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=x.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:{this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case T.EQUALS_SIGN:{this._err(D.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=x.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:case T.SOLIDUS:case T.GREATER_THAN_SIGN:case T.EOF:{this._leaveAttrName(),this.state=x.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case T.EQUALS_SIGN:{this._leaveAttrName(),this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:{this._err(D.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.name+=ye;break}default:this.currentAttr.name+=String.fromCodePoint(vr(t)?mi(t):t)}}_stateAfterAttributeName(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.SOLIDUS:{this.state=x.SELF_CLOSING_START_TAG;break}case T.EQUALS_SIGN:{this.state=x.BEFORE_ATTRIBUTE_VALUE;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=x.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{this.state=x.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this.state=x.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingAttributeValue),this.state=x.DATA,this.emitCurrentTagToken();break}default:this.state=x.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case T.QUOTATION_MARK:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case T.APOSTROPHE:{this.state=x.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case T.AMPERSAND:{this._startCharacterReference();break}case T.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case T.NULL:{this._err(D.unexpectedNullCharacter),this.currentAttr.value+=ye;break}case T.QUOTATION_MARK:case T.APOSTROPHE:case T.LESS_THAN_SIGN:case T.EQUALS_SIGN:case T.GRAVE_ACCENT:{this._err(D.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this._leaveAttrValue(),this.state=x.BEFORE_ATTRIBUTE_NAME;break}case T.SOLIDUS:{this._leaveAttrValue(),this.state=x.SELF_CLOSING_START_TAG;break}case T.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBetweenAttributes),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case T.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=x.DATA,this.emitCurrentTagToken();break}case T.EOF:{this._err(D.eofInTag),this._emitEOFToken();break}default:this._err(D.unexpectedSolidusInTag),this.state=x.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case T.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.data+=ye;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(et.DASH_DASH,!0)?(this._createCommentToken(et.DASH_DASH.length+1),this.state=x.COMMENT_START):this._consumeSequenceIfMatch(et.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(et.DOCTYPE.length+1),this.state=x.DOCTYPE):this._consumeSequenceIfMatch(et.CDATA_START,!0)?this.inForeignNode?this.state=x.CDATA_SECTION:(this._err(D.cdataInHtmlContent),this._createCommentToken(et.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=x.BOGUS_COMMENT):this._ensureHibernation()||(this._err(D.incorrectlyOpenedComment),this._createCommentToken(2),this.state=x.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_START_DASH;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=x.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=x.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptClosingOfEmptyComment),this.state=x.DATA,this.emitCurrentComment(n);break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_END_DASH;break}case T.LESS_THAN_SIGN:{n.data+="<",this.state=x.COMMENT_LESS_THAN_SIGN;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.data+=ye;break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case T.EXCLAMATION_MARK:{n.data+="!",this.state=x.COMMENT_LESS_THAN_SIGN_BANG;break}case T.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=x.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=x.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===T.HYPHEN_MINUS?this.state=x.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=x.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==T.GREATER_THAN_SIGN&&t!==T.EOF&&this._err(D.nestedComment),this.state=x.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{this.state=x.COMMENT_END;break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=x.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentComment(n);break}case T.EXCLAMATION_MARK:{this.state=x.COMMENT_END_BANG;break}case T.HYPHEN_MINUS:{n.data+="-";break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=x.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case T.HYPHEN_MINUS:{n.data+="--!",this.state=x.COMMENT_END_DASH;break}case T.GREATER_THAN_SIGN:{this._err(D.incorrectlyClosedComment),this.state=x.DATA,this.emitCurrentComment(n);break}case T.EOF:{this._err(D.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=x.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case T.EOF:{this._err(D.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingWhitespaceBeforeDoctypeName),this.state=x.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(vr(t))this._createDoctypeToken(String.fromCharCode(mi(t))),this.state=x.DOCTYPE_NAME;else switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.NULL:{this._err(D.unexpectedNullCharacter),this._createDoctypeToken(ye),this.state=x.DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.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=x.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.AFTER_DOCTYPE_NAME;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.name+=ye;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(vr(t)?mi(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(et.PUBLIC,!1)?this.state=x.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(et.SYSTEM,!1)?this.state=x.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(D.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.publicId="",this.state=x.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case T.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=ye;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.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 T.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.publicId+=ye;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.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 T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case T.GREATER_THAN_SIGN:{this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.QUOTATION_MARK:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(D.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:{this.state=x.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.QUOTATION_MARK:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{this._err(D.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.QUOTATION_MARK:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case T.APOSTROPHE:{n.systemId="",this.state=x.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case T.GREATER_THAN_SIGN:{this._err(D.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.DATA,this.emitCurrentDoctype(n);break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case T.QUOTATION_MARK:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=ye;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.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 T.APOSTROPHE:{this.state=x.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case T.NULL:{this._err(D.unexpectedNullCharacter),n.systemId+=ye;break}case T.GREATER_THAN_SIGN:{this._err(D.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.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 T.SPACE:case T.LINE_FEED:case T.TABULATION:case T.FORM_FEED:break;case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.EOF:{this._err(D.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(D.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=x.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case T.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=x.DATA;break}case T.NULL:{this._err(D.unexpectedNullCharacter);break}case T.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case T.RIGHT_SQUARE_BRACKET:{this.state=x.CDATA_SECTION_BRACKET;break}case T.EOF:{this._err(D.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===T.RIGHT_SQUARE_BRACKET?this.state=x.CDATA_SECTION_END:(this._emitChars("]"),this.state=x.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case T.GREATER_THAN_SIGN:{this.state=x.DATA;break}case T.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=x.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(T.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Ju(this.preprocessor.peek(1))?x.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Ju(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===T.SEMICOLON&&this._err(D.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Kd=new Set([h.DD,h.DT,h.LI,h.OPTGROUP,h.OPTION,h.P,h.RB,h.RP,h.RT,h.RTC]),tl=new Set([...Kd,h.CAPTION,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]),zi=new Set([h.APPLET,h.CAPTION,h.HTML,h.MARQUEE,h.OBJECT,h.TABLE,h.TD,h.TEMPLATE,h.TH]),i1=new Set([...zi,h.OL,h.UL]),s1=new Set([...zi,h.BUTTON]),nl=new Set([h.ANNOTATION_XML,h.MI,h.MN,h.MO,h.MS,h.MTEXT]),rl=new Set([h.DESC,h.FOREIGN_OBJECT,h.TITLE]),a1=new Set([h.TR,h.TEMPLATE,h.HTML]),o1=new Set([h.TBODY,h.TFOOT,h.THEAD,h.TEMPLATE,h.HTML]),u1=new Set([h.TABLE,h.TEMPLATE,h.HTML]),l1=new Set([h.TD,h.TH]);class c1{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=h.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===h.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===H.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])!==H.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(Ma,H.HTML)}popUntilTableCellPopped(){this.popUntilPopped(l1,H.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(u1,H.HTML)}clearBackToTableBodyContext(){this.clearBackTo(o1,H.HTML)}clearBackToTableRowContext(){this.clearBackTo(a1,H.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]===h.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]===h.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 H.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case H.SVG:{if(rl.has(i))return!1;break}case H.MATHML:{if(nl.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,zi)}hasInListItemScope(t){return this.hasInDynamicScope(t,i1)}hasInButtonScope(t){return this.hasInDynamicScope(t,s1)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case H.HTML:{if(Ma.has(n))return!0;if(zi.has(n))return!1;break}case H.SVG:{if(rl.has(n))return!1;break}case H.MATHML:{if(nl.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===H.HTML)switch(this.tagIDs[n]){case t:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===H.HTML)switch(this.tagIDs[t]){case h.TBODY:case h.THEAD:case h.TFOOT:return!0;case h.TABLE:case h.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===H.HTML)switch(this.tagIDs[n]){case t:return!0;case h.OPTION:case h.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Kd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&tl.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&tl.has(this.currentTagId);)this.pop()}}const Gs=3;var Lt;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lt||(Lt={}));const il={type:Lt.Marker};class d1{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===Lt.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===s&&this.treeAdapter.getNamespaceURI(l)===a){const c=this.treeAdapter.getAttrList(l);c.length===i&&r.push({idx:o,attrs:c})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Gs)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Gs)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const o=r[a];o.attrs.every(u=>i.get(u.name)===u.value)&&(s+=1,s>=Gs&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(il)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Lt.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Lt.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(il);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Lt.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Lt.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Lt.Element&&n.element===t)}}const Jt={createDocument(){return{nodeName:"#document",mode:ct.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(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Jt.appendChild(e,s)}},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(Jt.isTextNode(n)){n.value+=t;return}}Jt.appendChild(e,Jt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Jt.isTextNode(r)?r.value+=t:Jt.insertBefore(e,Jt.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}}},Xd="html",h1="about:legacy-compat",f1="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Zd=["+//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//"],p1=[...Zd,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],m1=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Jd=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],g1=[...Jd,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function sl(e,t){return t.some(n=>e.startsWith(n))}function b1(e){return e.name===Xd&&e.publicId===null&&(e.systemId===null||e.systemId===h1)}function E1(e){if(e.name!==Xd)return ct.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===f1)return ct.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),m1.has(n))return ct.QUIRKS;let r=t===null?p1:Zd;if(sl(n,r))return ct.QUIRKS;if(r=t===null?Jd:g1,sl(n,r))return ct.LIMITED_QUIRKS}return ct.NO_QUIRKS}const al={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},_1="definitionurl",T1="definitionURL",y1=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])),x1=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:H.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:H.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:H.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:H.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:H.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:H.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:H.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:H.XML}],["xml:space",{prefix:"xml",name:"space",namespace:H.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:H.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:H.XMLNS}]]),k1=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])),A1=new Set([h.B,h.BIG,h.BLOCKQUOTE,h.BODY,h.BR,h.CENTER,h.CODE,h.DD,h.DIV,h.DL,h.DT,h.EM,h.EMBED,h.H1,h.H2,h.H3,h.H4,h.H5,h.H6,h.HEAD,h.HR,h.I,h.IMG,h.LI,h.LISTING,h.MENU,h.META,h.NOBR,h.OL,h.P,h.PRE,h.RUBY,h.S,h.SMALL,h.SPAN,h.STRONG,h.STRIKE,h.SUB,h.SUP,h.TABLE,h.TT,h.U,h.UL,h.VAR]);function C1(e){const t=e.tagID;return t===h.FONT&&e.attrs.some(({name:r})=>r===Ln.COLOR||r===Ln.SIZE||r===Ln.FACE)||A1.has(t)}function eh(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===_1){e.attrs[t].name=T1;break}}function th(e){for(let t=0;t<e.attrs.length;t++){const n=y1.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Mo(e){for(let t=0;t<e.attrs.length;t++){const n=x1.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 w1(e){const t=k1.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=dr(e.tagName))}function I1(e,t){return t===H.MATHML&&(e===h.MI||e===h.MO||e===h.MN||e===h.MS||e===h.MTEXT)}function S1(e,t,n){if(t===H.MATHML&&e===h.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ln.ENCODING){const i=n[r].value.toLowerCase();return i===al.TEXT_HTML||i===al.APPLICATION_XML}}return t===H.SVG&&(e===h.FOREIGN_OBJECT||e===h.DESC||e===h.TITLE)}function N1(e,t,n,r){return(!r||r===H.HTML)&&S1(e,t,n)||(!r||r===H.MATHML)&&I1(e,t)}const L1="hidden",R1=8,v1=3;var w;(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"})(w||(w={}));const O1={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},nh=new Set([h.TABLE,h.TBODY,h.TFOOT,h.THEAD,h.TR]),ol={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Jt,onParseError:null};class ul{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=w.INITIAL,this.originalInsertionMode=w.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={...ol,...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 r1(this.options,this),this.activeFormattingElements=new d1(this.treeAdapter),this.fragmentContextID=r?dr(this.treeAdapter.getTagName(r)):h.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new c1(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={...ol,...n};t??(t=r.treeAdapter.createElement(R.TEMPLATE,H.HTML,[]));const i=r.treeAdapter.createElement("documentmock",H.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===h.TEMPLATE&&s.tmplInsertionModeStack.unshift(w.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}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 s=(i=t.location)!==null&&i!==void 0?i:O1,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.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 s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===H.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,H.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=w.TEXT}switchToPlaintextParsing(){this.insertionMode=w.TEXT,this.originalInsertionMode=w.IN_BODY,this.tokenizer.state=Ae.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)===R.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==H.HTML))switch(this.fragmentContextID){case h.TITLE:case h.TEXTAREA:{this.tokenizer.state=Ae.RCDATA;break}case h.STYLE:case h.XMP:case h.IFRAME:case h.NOEMBED:case h.NOFRAMES:case h.NOSCRIPT:{this.tokenizer.state=Ae.RAWTEXT;break}case h.SCRIPT:{this.tokenizer.state=Ae.SCRIPT_DATA;break}case h.PLAINTEXT:{this.tokenizer.state=Ae.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 a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,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,H.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,H.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(R.HTML,H.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,h.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),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:u,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:u,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,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),s=n.type===ae.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,s)}}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===h.SVG&&this.treeAdapter.getTagName(n)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===H.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===h.MGLYPH||t.tagID===h.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,H.HTML)}_processToken(t){switch(t.type){case ae.CHARACTER:{this.onCharacter(t);break}case ae.NULL_CHARACTER:{this.onNullCharacter(t);break}case ae.COMMENT:{this.onComment(t);break}case ae.DOCTYPE:{this.onDoctype(t);break}case ae.START_TAG:{this._processStartTag(t);break}case ae.END_TAG:{this.onEndTag(t);break}case ae.EOF:{this.onEof(t);break}case ae.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return N1(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Lt.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=w.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(h.P),this.openElements.popUntilTagNamePopped(h.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case h.TR:{this.insertionMode=w.IN_ROW;return}case h.TBODY:case h.THEAD:case h.TFOOT:{this.insertionMode=w.IN_TABLE_BODY;return}case h.CAPTION:{this.insertionMode=w.IN_CAPTION;return}case h.COLGROUP:{this.insertionMode=w.IN_COLUMN_GROUP;return}case h.TABLE:{this.insertionMode=w.IN_TABLE;return}case h.BODY:{this.insertionMode=w.IN_BODY;return}case h.FRAMESET:{this.insertionMode=w.IN_FRAMESET;return}case h.SELECT:{this._resetInsertionModeForSelect(t);return}case h.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case h.HTML:{this.insertionMode=this.headElement?w.AFTER_HEAD:w.BEFORE_HEAD;return}case h.TD:case h.TH:{if(t>0){this.insertionMode=w.IN_CELL;return}break}case h.HEAD:{if(t>0){this.insertionMode=w.IN_HEAD;return}break}}this.insertionMode=w.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===h.TEMPLATE)break;if(r===h.TABLE){this.insertionMode=w.IN_SELECT_IN_TABLE;return}}this.insertionMode=w.IN_SELECT}_isElementCausesFosterParenting(t){return nh.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 h.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===H.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case h.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 Jg[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){lE(this,t);return}switch(this.insertionMode){case w.INITIAL:{xr(this,t);break}case w.BEFORE_HTML:{Br(this,t);break}case w.BEFORE_HEAD:{Fr(this,t);break}case w.IN_HEAD:{Hr(this,t);break}case w.IN_HEAD_NO_SCRIPT:{Ur(this,t);break}case w.AFTER_HEAD:{$r(this,t);break}case w.IN_BODY:case w.IN_CAPTION:case w.IN_CELL:case w.IN_TEMPLATE:{ih(this,t);break}case w.TEXT:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case w.IN_TABLE:case w.IN_TABLE_BODY:case w.IN_ROW:{Ws(this,t);break}case w.IN_TABLE_TEXT:{ch(this,t);break}case w.IN_COLUMN_GROUP:{Gi(this,t);break}case w.AFTER_BODY:{Wi(this,t);break}case w.AFTER_AFTER_BODY:{Pi(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){uE(this,t);return}switch(this.insertionMode){case w.INITIAL:{xr(this,t);break}case w.BEFORE_HTML:{Br(this,t);break}case w.BEFORE_HEAD:{Fr(this,t);break}case w.IN_HEAD:{Hr(this,t);break}case w.IN_HEAD_NO_SCRIPT:{Ur(this,t);break}case w.AFTER_HEAD:{$r(this,t);break}case w.TEXT:{this._insertCharacters(t);break}case w.IN_TABLE:case w.IN_TABLE_BODY:case w.IN_ROW:{Ws(this,t);break}case w.IN_COLUMN_GROUP:{Gi(this,t);break}case w.AFTER_BODY:{Wi(this,t);break}case w.AFTER_AFTER_BODY:{Pi(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ba(this,t);return}switch(this.insertionMode){case w.INITIAL:case w.BEFORE_HTML:case w.BEFORE_HEAD:case w.IN_HEAD:case w.IN_HEAD_NO_SCRIPT:case w.AFTER_HEAD:case w.IN_BODY:case w.IN_TABLE:case w.IN_CAPTION:case w.IN_COLUMN_GROUP:case w.IN_TABLE_BODY:case w.IN_ROW:case w.IN_CELL:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:case w.IN_TEMPLATE:case w.IN_FRAMESET:case w.AFTER_FRAMESET:{Ba(this,t);break}case w.IN_TABLE_TEXT:{kr(this,t);break}case w.AFTER_BODY:{U1(this,t);break}case w.AFTER_AFTER_BODY:case w.AFTER_AFTER_FRAMESET:{$1(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case w.INITIAL:{j1(this,t);break}case w.BEFORE_HEAD:case w.IN_HEAD:case w.IN_HEAD_NO_SCRIPT:case w.AFTER_HEAD:{this._err(t,D.misplacedDoctype);break}case w.IN_TABLE_TEXT:{kr(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,D.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?cE(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case w.INITIAL:{xr(this,t);break}case w.BEFORE_HTML:{V1(this,t);break}case w.BEFORE_HEAD:{G1(this,t);break}case w.IN_HEAD:{kt(this,t);break}case w.IN_HEAD_NO_SCRIPT:{Y1(this,t);break}case w.AFTER_HEAD:{K1(this,t);break}case w.IN_BODY:{je(this,t);break}case w.IN_TABLE:{sr(this,t);break}case w.IN_TABLE_TEXT:{kr(this,t);break}case w.IN_CAPTION:{Wb(this,t);break}case w.IN_COLUMN_GROUP:{Ho(this,t);break}case w.IN_TABLE_BODY:{_s(this,t);break}case w.IN_ROW:{Ts(this,t);break}case w.IN_CELL:{Qb(this,t);break}case w.IN_SELECT:{fh(this,t);break}case w.IN_SELECT_IN_TABLE:{Xb(this,t);break}case w.IN_TEMPLATE:{Jb(this,t);break}case w.AFTER_BODY:{tE(this,t);break}case w.IN_FRAMESET:{nE(this,t);break}case w.AFTER_FRAMESET:{iE(this,t);break}case w.AFTER_AFTER_BODY:{aE(this,t);break}case w.AFTER_AFTER_FRAMESET:{oE(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?dE(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case w.INITIAL:{xr(this,t);break}case w.BEFORE_HTML:{z1(this,t);break}case w.BEFORE_HEAD:{W1(this,t);break}case w.IN_HEAD:{q1(this,t);break}case w.IN_HEAD_NO_SCRIPT:{Q1(this,t);break}case w.AFTER_HEAD:{X1(this,t);break}case w.IN_BODY:{Es(this,t);break}case w.TEXT:{Mb(this,t);break}case w.IN_TABLE:{Qr(this,t);break}case w.IN_TABLE_TEXT:{kr(this,t);break}case w.IN_CAPTION:{qb(this,t);break}case w.IN_COLUMN_GROUP:{Yb(this,t);break}case w.IN_TABLE_BODY:{Fa(this,t);break}case w.IN_ROW:{hh(this,t);break}case w.IN_CELL:{Kb(this,t);break}case w.IN_SELECT:{ph(this,t);break}case w.IN_SELECT_IN_TABLE:{Zb(this,t);break}case w.IN_TEMPLATE:{eE(this,t);break}case w.AFTER_BODY:{gh(this,t);break}case w.IN_FRAMESET:{rE(this,t);break}case w.AFTER_FRAMESET:{sE(this,t);break}case w.AFTER_AFTER_BODY:{Pi(this,t);break}}}onEof(t){switch(this.insertionMode){case w.INITIAL:{xr(this,t);break}case w.BEFORE_HTML:{Br(this,t);break}case w.BEFORE_HEAD:{Fr(this,t);break}case w.IN_HEAD:{Hr(this,t);break}case w.IN_HEAD_NO_SCRIPT:{Ur(this,t);break}case w.AFTER_HEAD:{$r(this,t);break}case w.IN_BODY:case w.IN_TABLE:case w.IN_CAPTION:case w.IN_COLUMN_GROUP:case w.IN_TABLE_BODY:case w.IN_ROW:case w.IN_CELL:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:{uh(this,t);break}case w.TEXT:{Bb(this,t);break}case w.IN_TABLE_TEXT:{kr(this,t);break}case w.IN_TEMPLATE:{mh(this,t);break}case w.AFTER_BODY:case w.IN_FRAMESET:case w.AFTER_FRAMESET:case w.AFTER_AFTER_BODY:case w.AFTER_AFTER_FRAMESET:{Fo(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===T.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 w.IN_HEAD:case w.IN_HEAD_NO_SCRIPT:case w.AFTER_HEAD:case w.TEXT:case w.IN_COLUMN_GROUP:case w.IN_SELECT:case w.IN_SELECT_IN_TABLE:case w.IN_FRAMESET:case w.AFTER_FRAMESET:{this._insertCharacters(t);break}case w.IN_BODY:case w.IN_CAPTION:case w.IN_CELL:case w.IN_TEMPLATE:case w.AFTER_BODY:case w.AFTER_AFTER_BODY:case w.AFTER_AFTER_FRAMESET:{rh(this,t);break}case w.IN_TABLE:case w.IN_TABLE_BODY:case w.IN_ROW:{Ws(this,t);break}case w.IN_TABLE_TEXT:{lh(this,t);break}}}}function P1(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):oh(e,t),n}function D1(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 M1(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),u=o&&s>=v1;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=B1(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function B1(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 F1(e,t,n){const r=e.treeAdapter.getTagName(t),i=dr(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===h.TEMPLATE&&s===H.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function H1(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function Bo(e,t){for(let n=0;n<R1;n++){const r=P1(e,t);if(!r)break;const i=D1(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=M1(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&F1(e,a,s),H1(e,i,r)}}function Ba(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function U1(e,t){e._appendCommentNode(t,e.openElements.items[0])}function $1(e,t){e._appendCommentNode(t,e.document)}function Fo(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 s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function j1(e,t){e._setDocumentType(t);const n=t.forceQuirks?ct.QUIRKS:E1(t);b1(t)||e._err(t,D.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=w.BEFORE_HTML}function xr(e,t){e._err(t,D.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ct.QUIRKS),e.insertionMode=w.BEFORE_HTML,e._processToken(t)}function V1(e,t){t.tagID===h.HTML?(e._insertElement(t,H.HTML),e.insertionMode=w.BEFORE_HEAD):Br(e,t)}function z1(e,t){const n=t.tagID;(n===h.HTML||n===h.HEAD||n===h.BODY||n===h.BR)&&Br(e,t)}function Br(e,t){e._insertFakeRootElement(),e.insertionMode=w.BEFORE_HEAD,e._processToken(t)}function G1(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.HEAD:{e._insertElement(t,H.HTML),e.headElement=e.openElements.current,e.insertionMode=w.IN_HEAD;break}default:Fr(e,t)}}function W1(e,t){const n=t.tagID;n===h.HEAD||n===h.BODY||n===h.HTML||n===h.BR?Fr(e,t):e._err(t,D.endTagWithoutMatchingOpenElement)}function Fr(e,t){e._insertFakeElement(R.HEAD,h.HEAD),e.headElement=e.openElements.current,e.insertionMode=w.IN_HEAD,e._processToken(t)}function kt(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:{e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break}case h.TITLE:{e._switchToTextParsing(t,Ae.RCDATA);break}case h.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ae.RAWTEXT):(e._insertElement(t,H.HTML),e.insertionMode=w.IN_HEAD_NO_SCRIPT);break}case h.NOFRAMES:case h.STYLE:{e._switchToTextParsing(t,Ae.RAWTEXT);break}case h.SCRIPT:{e._switchToTextParsing(t,Ae.SCRIPT_DATA);break}case h.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=w.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(w.IN_TEMPLATE);break}case h.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:Hr(e,t)}}function q1(e,t){switch(t.tagID){case h.HEAD:{e.openElements.pop(),e.insertionMode=w.AFTER_HEAD;break}case h.BODY:case h.BR:case h.HTML:{Hr(e,t);break}case h.TEMPLATE:{Bn(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function Bn(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==h.TEMPLATE&&e._err(t,D.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,D.endTagWithoutMatchingOpenElement)}function Hr(e,t){e.openElements.pop(),e.insertionMode=w.AFTER_HEAD,e._processToken(t)}function Y1(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.BASEFONT:case h.BGSOUND:case h.HEAD:case h.LINK:case h.META:case h.NOFRAMES:case h.STYLE:{kt(e,t);break}case h.NOSCRIPT:{e._err(t,D.nestedNoscriptInHead);break}default:Ur(e,t)}}function Q1(e,t){switch(t.tagID){case h.NOSCRIPT:{e.openElements.pop(),e.insertionMode=w.IN_HEAD;break}case h.BR:{Ur(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function Ur(e,t){const n=t.type===ae.EOF?D.openElementsLeftAfterEof:D.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=w.IN_HEAD,e._processToken(t)}function K1(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.BODY:{e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=w.IN_BODY;break}case h.FRAMESET:{e._insertElement(t,H.HTML),e.insertionMode=w.IN_FRAMESET;break}case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{e._err(t,D.abandonedHeadElementChild),e.openElements.push(e.headElement,h.HEAD),kt(e,t),e.openElements.remove(e.headElement);break}case h.HEAD:{e._err(t,D.misplacedStartTagForHeadElement);break}default:$r(e,t)}}function X1(e,t){switch(t.tagID){case h.BODY:case h.HTML:case h.BR:{$r(e,t);break}case h.TEMPLATE:{Bn(e,t);break}default:e._err(t,D.endTagWithoutMatchingOpenElement)}}function $r(e,t){e._insertFakeElement(R.BODY,h.BODY),e.insertionMode=w.IN_BODY,bs(e,t)}function bs(e,t){switch(t.type){case ae.CHARACTER:{ih(e,t);break}case ae.WHITESPACE_CHARACTER:{rh(e,t);break}case ae.COMMENT:{Ba(e,t);break}case ae.START_TAG:{je(e,t);break}case ae.END_TAG:{Es(e,t);break}case ae.EOF:{uh(e,t);break}}}function rh(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ih(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Z1(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function J1(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function eb(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_FRAMESET)}function tb(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML)}function nb(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ma.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,H.HTML)}function rb(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ib(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),n||(e.formElement=e.openElements.current))}function sb(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===h.LI&&i===h.LI||(n===h.DD||n===h.DT)&&(i===h.DD||i===h.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==h.ADDRESS&&i!==h.DIV&&i!==h.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML)}function ab(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.tokenizer.state=Ae.PLAINTEXT}function ob(e,t){e.openElements.hasInScope(h.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.framesetOk=!1}function ub(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(Bo(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function lb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function cb(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(h.NOBR)&&(Bo(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,H.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function db(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function hb(e,t){e.treeAdapter.getDocumentMode(e.document)!==ct.QUIRKS&&e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=w.IN_TABLE}function sh(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,H.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ah(e){const t=Yd(e,Ln.TYPE);return t!=null&&t.toLowerCase()===L1}function fb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,H.HTML),ah(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function pb(e,t){e._appendElement(t,H.HTML),t.ackSelfClosing=!0}function mb(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._appendElement(t,H.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function gb(e,t){t.tagName=R.IMG,t.tagID=h.IMG,sh(e,t)}function bb(e,t){e._insertElement(t,H.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ae.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=w.TEXT}function Eb(e,t){e.openElements.hasInButtonScope(h.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ae.RAWTEXT)}function _b(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ae.RAWTEXT)}function ll(e,t){e._switchToTextParsing(t,Ae.RAWTEXT)}function Tb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===w.IN_TABLE||e.insertionMode===w.IN_CAPTION||e.insertionMode===w.IN_TABLE_BODY||e.insertionMode===w.IN_ROW||e.insertionMode===w.IN_CELL?w.IN_SELECT_IN_TABLE:w.IN_SELECT}function yb(e,t){e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML)}function xb(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,H.HTML)}function kb(e,t){e.openElements.hasInScope(h.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(h.RTC),e._insertElement(t,H.HTML)}function Ab(e,t){e._reconstructActiveFormattingElements(),eh(t),Mo(t),t.selfClosing?e._appendElement(t,H.MATHML):e._insertElement(t,H.MATHML),t.ackSelfClosing=!0}function Cb(e,t){e._reconstructActiveFormattingElements(),th(t),Mo(t),t.selfClosing?e._appendElement(t,H.SVG):e._insertElement(t,H.SVG),t.ackSelfClosing=!0}function cl(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,H.HTML)}function je(e,t){switch(t.tagID){case h.I:case h.S:case h.B:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.SMALL:case h.STRIKE:case h.STRONG:{lb(e,t);break}case h.A:{ub(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{nb(e,t);break}case h.P:case h.DL:case h.OL:case h.UL:case h.DIV:case h.DIR:case h.NAV:case h.MAIN:case h.MENU:case h.ASIDE:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.DETAILS:case h.ADDRESS:case h.ARTICLE:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{tb(e,t);break}case h.LI:case h.DD:case h.DT:{sb(e,t);break}case h.BR:case h.IMG:case h.WBR:case h.AREA:case h.EMBED:case h.KEYGEN:{sh(e,t);break}case h.HR:{mb(e,t);break}case h.RB:case h.RTC:{xb(e,t);break}case h.RT:case h.RP:{kb(e,t);break}case h.PRE:case h.LISTING:{rb(e,t);break}case h.XMP:{Eb(e,t);break}case h.SVG:{Cb(e,t);break}case h.HTML:{Z1(e,t);break}case h.BASE:case h.LINK:case h.META:case h.STYLE:case h.TITLE:case h.SCRIPT:case h.BGSOUND:case h.BASEFONT:case h.TEMPLATE:{kt(e,t);break}case h.BODY:{J1(e,t);break}case h.FORM:{ib(e,t);break}case h.NOBR:{cb(e,t);break}case h.MATH:{Ab(e,t);break}case h.TABLE:{hb(e,t);break}case h.INPUT:{fb(e,t);break}case h.PARAM:case h.TRACK:case h.SOURCE:{pb(e,t);break}case h.IMAGE:{gb(e,t);break}case h.BUTTON:{ob(e,t);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{db(e,t);break}case h.IFRAME:{_b(e,t);break}case h.SELECT:{Tb(e,t);break}case h.OPTION:case h.OPTGROUP:{yb(e,t);break}case h.NOEMBED:case h.NOFRAMES:{ll(e,t);break}case h.FRAMESET:{eb(e,t);break}case h.TEXTAREA:{bb(e,t);break}case h.NOSCRIPT:{e.options.scriptingEnabled?ll(e,t):cl(e,t);break}case h.PLAINTEXT:{ab(e,t);break}case h.COL:case h.TH:case h.TD:case h.TR:case h.HEAD:case h.FRAME:case h.TBODY:case h.TFOOT:case h.THEAD:case h.CAPTION:case h.COLGROUP:break;default:cl(e,t)}}function wb(e,t){if(e.openElements.hasInScope(h.BODY)&&(e.insertionMode=w.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Ib(e,t){e.openElements.hasInScope(h.BODY)&&(e.insertionMode=w.AFTER_BODY,gh(e,t))}function Sb(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Nb(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(h.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(h.FORM):n&&e.openElements.remove(n))}function Lb(e){e.openElements.hasInButtonScope(h.P)||e._insertFakeElement(R.P,h.P),e._closePElement()}function Rb(e){e.openElements.hasInListItemScope(h.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(h.LI),e.openElements.popUntilTagNamePopped(h.LI))}function vb(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Ob(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Pb(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Db(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,h.BR),e.openElements.pop(),e.framesetOk=!1}function oh(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==h.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function Es(e,t){switch(t.tagID){case h.A:case h.B:case h.I:case h.S:case h.U:case h.EM:case h.TT:case h.BIG:case h.CODE:case h.FONT:case h.NOBR:case h.SMALL:case h.STRIKE:case h.STRONG:{Bo(e,t);break}case h.P:{Lb(e);break}case h.DL:case h.UL:case h.OL:case h.DIR:case h.DIV:case h.NAV:case h.PRE:case h.MAIN:case h.MENU:case h.ASIDE:case h.BUTTON:case h.CENTER:case h.FIGURE:case h.FOOTER:case h.HEADER:case h.HGROUP:case h.DIALOG:case h.ADDRESS:case h.ARTICLE:case h.DETAILS:case h.SEARCH:case h.SECTION:case h.SUMMARY:case h.LISTING:case h.FIELDSET:case h.BLOCKQUOTE:case h.FIGCAPTION:{Sb(e,t);break}case h.LI:{Rb(e);break}case h.DD:case h.DT:{vb(e,t);break}case h.H1:case h.H2:case h.H3:case h.H4:case h.H5:case h.H6:{Ob(e);break}case h.BR:{Db(e);break}case h.BODY:{wb(e,t);break}case h.HTML:{Ib(e,t);break}case h.FORM:{Nb(e);break}case h.APPLET:case h.OBJECT:case h.MARQUEE:{Pb(e,t);break}case h.TEMPLATE:{Bn(e,t);break}default:oh(e,t)}}function uh(e,t){e.tmplInsertionModeStack.length>0?mh(e,t):Fo(e,t)}function Mb(e,t){var n;t.tagID===h.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Bb(e,t){e._err(t,D.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ws(e,t){if(e.openElements.currentTagId!==void 0&&nh.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=w.IN_TABLE_TEXT,t.type){case ae.CHARACTER:{ch(e,t);break}case ae.WHITESPACE_CHARACTER:{lh(e,t);break}}else ai(e,t)}function Fb(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_CAPTION}function Hb(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_COLUMN_GROUP}function Ub(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,h.COLGROUP),e.insertionMode=w.IN_COLUMN_GROUP,Ho(e,t)}function $b(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_TABLE_BODY}function jb(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,h.TBODY),e.insertionMode=w.IN_TABLE_BODY,_s(e,t)}function Vb(e,t){e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function zb(e,t){ah(t)?e._appendElement(t,H.HTML):ai(e,t),t.ackSelfClosing=!0}function Gb(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,H.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function sr(e,t){switch(t.tagID){case h.TD:case h.TH:case h.TR:{jb(e,t);break}case h.STYLE:case h.SCRIPT:case h.TEMPLATE:{kt(e,t);break}case h.COL:{Ub(e,t);break}case h.FORM:{Gb(e,t);break}case h.TABLE:{Vb(e,t);break}case h.TBODY:case h.TFOOT:case h.THEAD:{$b(e,t);break}case h.INPUT:{zb(e,t);break}case h.CAPTION:{Fb(e,t);break}case h.COLGROUP:{Hb(e,t);break}default:ai(e,t)}}function Qr(e,t){switch(t.tagID){case h.TABLE:{e.openElements.hasInTableScope(h.TABLE)&&(e.openElements.popUntilTagNamePopped(h.TABLE),e._resetInsertionMode());break}case h.TEMPLATE:{Bn(e,t);break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:ai(e,t)}}function ai(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,bs(e,t),e.fosterParentingEnabled=n}function lh(e,t){e.pendingCharacterTokens.push(t)}function ch(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function kr(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ai(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const dh=new Set([h.CAPTION,h.COL,h.COLGROUP,h.TBODY,h.TD,h.TFOOT,h.TH,h.THEAD,h.TR]);function Wb(e,t){const n=t.tagID;dh.has(n)?e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=w.IN_TABLE,sr(e,t)):je(e,t)}function qb(e,t){const n=t.tagID;switch(n){case h.CAPTION:case h.TABLE:{e.openElements.hasInTableScope(h.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(h.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=w.IN_TABLE,n===h.TABLE&&Qr(e,t));break}case h.BODY:case h.COL:case h.COLGROUP:case h.HTML:case h.TBODY:case h.TD:case h.TFOOT:case h.TH:case h.THEAD:case h.TR:break;default:Es(e,t)}}function Ho(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.COL:{e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break}case h.TEMPLATE:{kt(e,t);break}default:Gi(e,t)}}function Yb(e,t){switch(t.tagID){case h.COLGROUP:{e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=w.IN_TABLE);break}case h.TEMPLATE:{Bn(e,t);break}case h.COL:break;default:Gi(e,t)}}function Gi(e,t){e.openElements.currentTagId===h.COLGROUP&&(e.openElements.pop(),e.insertionMode=w.IN_TABLE,e._processToken(t))}function _s(e,t){switch(t.tagID){case h.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_ROW;break}case h.TH:case h.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,h.TR),e.insertionMode=w.IN_ROW,Ts(e,t);break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE,sr(e,t));break}default:sr(e,t)}}function Fa(e,t){const n=t.tagID;switch(t.tagID){case h.TBODY:case h.TFOOT:case h.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE);break}case h.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE,Qr(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:case h.TR:break;default:Qr(e,t)}}function Ts(e,t){switch(t.tagID){case h.TH:case h.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,H.HTML),e.insertionMode=w.IN_CELL,e.activeFormattingElements.insertMarker();break}case h.CAPTION:case h.COL:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE_BODY,_s(e,t));break}default:sr(e,t)}}function hh(e,t){switch(t.tagID){case h.TR:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE_BODY);break}case h.TABLE:{e.openElements.hasInTableScope(h.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE_BODY,Fa(e,t));break}case h.TBODY:case h.TFOOT:case h.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(h.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=w.IN_TABLE_BODY,Fa(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:case h.TD:case h.TH:break;default:Qr(e,t)}}function Qb(e,t){const n=t.tagID;dh.has(n)?(e.openElements.hasInTableScope(h.TD)||e.openElements.hasInTableScope(h.TH))&&(e._closeTableCell(),Ts(e,t)):je(e,t)}function Kb(e,t){const n=t.tagID;switch(n){case h.TD:case h.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=w.IN_ROW);break}case h.TABLE:case h.TBODY:case h.TFOOT:case h.THEAD:case h.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),hh(e,t));break}case h.BODY:case h.CAPTION:case h.COL:case h.COLGROUP:case h.HTML:break;default:Es(e,t)}}function fh(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e._insertElement(t,H.HTML);break}case h.OPTGROUP:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._insertElement(t,H.HTML);break}case h.HR:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop(),e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break}case h.INPUT:case h.KEYGEN:case h.TEXTAREA:case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),t.tagID!==h.SELECT&&e._processStartTag(t));break}case h.SCRIPT:case h.TEMPLATE:{kt(e,t);break}}}function ph(e,t){switch(t.tagID){case h.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===h.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===h.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===h.OPTGROUP&&e.openElements.pop();break}case h.OPTION:{e.openElements.currentTagId===h.OPTION&&e.openElements.pop();break}case h.SELECT:{e.openElements.hasInSelectScope(h.SELECT)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode());break}case h.TEMPLATE:{Bn(e,t);break}}}function Xb(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e._processStartTag(t)):fh(e,t)}function Zb(e,t){const n=t.tagID;n===h.CAPTION||n===h.TABLE||n===h.TBODY||n===h.TFOOT||n===h.THEAD||n===h.TR||n===h.TD||n===h.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(h.SELECT),e._resetInsertionMode(),e.onEndTag(t)):ph(e,t)}function Jb(e,t){switch(t.tagID){case h.BASE:case h.BASEFONT:case h.BGSOUND:case h.LINK:case h.META:case h.NOFRAMES:case h.SCRIPT:case h.STYLE:case h.TEMPLATE:case h.TITLE:{kt(e,t);break}case h.CAPTION:case h.COLGROUP:case h.TBODY:case h.TFOOT:case h.THEAD:{e.tmplInsertionModeStack[0]=w.IN_TABLE,e.insertionMode=w.IN_TABLE,sr(e,t);break}case h.COL:{e.tmplInsertionModeStack[0]=w.IN_COLUMN_GROUP,e.insertionMode=w.IN_COLUMN_GROUP,Ho(e,t);break}case h.TR:{e.tmplInsertionModeStack[0]=w.IN_TABLE_BODY,e.insertionMode=w.IN_TABLE_BODY,_s(e,t);break}case h.TD:case h.TH:{e.tmplInsertionModeStack[0]=w.IN_ROW,e.insertionMode=w.IN_ROW,Ts(e,t);break}default:e.tmplInsertionModeStack[0]=w.IN_BODY,e.insertionMode=w.IN_BODY,je(e,t)}}function eE(e,t){t.tagID===h.TEMPLATE&&Bn(e,t)}function mh(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(h.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Fo(e,t)}function tE(e,t){t.tagID===h.HTML?je(e,t):Wi(e,t)}function gh(e,t){var n;if(t.tagID===h.HTML){if(e.fragmentContext||(e.insertionMode=w.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===h.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 Wi(e,t)}function Wi(e,t){e.insertionMode=w.IN_BODY,bs(e,t)}function nE(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.FRAMESET:{e._insertElement(t,H.HTML);break}case h.FRAME:{e._appendElement(t,H.HTML),t.ackSelfClosing=!0;break}case h.NOFRAMES:{kt(e,t);break}}}function rE(e,t){t.tagID===h.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==h.FRAMESET&&(e.insertionMode=w.AFTER_FRAMESET))}function iE(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.NOFRAMES:{kt(e,t);break}}}function sE(e,t){t.tagID===h.HTML&&(e.insertionMode=w.AFTER_AFTER_FRAMESET)}function aE(e,t){t.tagID===h.HTML?je(e,t):Pi(e,t)}function Pi(e,t){e.insertionMode=w.IN_BODY,bs(e,t)}function oE(e,t){switch(t.tagID){case h.HTML:{je(e,t);break}case h.NOFRAMES:{kt(e,t);break}}}function uE(e,t){t.chars=ye,e._insertCharacters(t)}function lE(e,t){e._insertCharacters(t),e.framesetOk=!1}function bh(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==H.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function cE(e,t){if(C1(t))bh(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===H.MATHML?eh(t):r===H.SVG&&(w1(t),th(t)),Mo(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function dE(e,t){if(t.tagID===h.P||t.tagID===h.BR){bh(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)===H.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;const ys=Eh("end"),Ot=Eh("start");function Eh(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 _h(e){const t=Ot(e),n=ys(e);if(t&&n)return{start:t,end:n}}const hE=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,fE=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),dl={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Th(e,t){const n=kE(e),r=Po("type",{handlers:{root:pE,element:mE,text:gE,comment:xh,doctype:bE,raw:_E},unknown:TE}),i={parser:n?new ul(dl):ul.getFragmentParser(void 0,dl),handle(o){r(o,i)},stitches:!1,options:t||{}};r(e,i),hr(i,Ot());const s=n?i.parser.document:i.parser.getFragment(),a=Cg(s,{file:i.options.file});return i.stitches&&Rt(a,"comment",function(o,u,l){const c=o;if(c.value.stitch&&l&&u!==void 0){const d=l.children;return d[u]=c.value.stitch,u}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function yh(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function pE(e,t){yh(e.children,t)}function mE(e,t){yE(e,t),yh(e.children,t),xE(e,t)}function gE(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:ae.CHARACTER,chars:e.value,location:oi(e)};hr(t,Ot(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function bE(e,t){const n={type:ae.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:oi(e)};hr(t,Ot(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function EE(e,t){t.stitches=!0;const n=AE(e);if("children"in e&&"children"in n){const r=Th({type:"root",children:e.children},t.options);n.children=r.children}xh({type:"comment",value:{stitch:n}},t)}function xh(e,t){const n=e.value,r={type:ae.COMMENT,data:n,location:oi(e)};hr(t,Ot(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function _E(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,kh(t,Ot(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(hE,"&lt;$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 TE(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))EE(n,t);else{let r="";throw fE.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 hr(e,t){kh(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=Ae.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 kh(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 yE(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ae.PLAINTEXT)return;hr(t,Ot(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Cn.html;i===Cn.html&&n==="svg"&&(i=Cn.svg);const s=Lg({...e,children:[]},{space:i===Cn.svg?"svg":"html"}),a={type:ae.START_TAG,tagName:n,tagID:dr(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:oi(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function xE(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&zd.includes(n)||t.parser.tokenizer.state===Ae.PLAINTEXT)return;hr(t,ys(e));const r={type:ae.END_TAG,tagName:n,tagID:dr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:oi(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ae.RCDATA||t.parser.tokenizer.state===Ae.RAWTEXT||t.parser.tokenizer.state===Ae.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ae.DATA)}function kE(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function oi(e){const t=Ot(e)||{line:void 0,column:void 0,offset:void 0},n=ys(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 AE(e){return"children"in e?Rn({...e,children:[]}):Rn(e)}function Ha(e){return function(t,n){return Th(t,{...e,file:n})}}const bn=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],yn={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...bn,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...bn],h2:[["className","sr-only"]],img:[...bn,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...bn,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...bn],table:[...bn],ul:[...bn,["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"]},nn={}.hasOwnProperty;function CE(e,t){let n={type:"root",children:[]};const r={schema:t?{...yn,...t}:yn,stack:[]},i=Ah(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function Ah(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return wE(e,n);case"doctype":return IE(e,n);case"element":return SE(e,n);case"root":return NE(e,n);case"text":return LE(e,n)}}}function wE(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),s={type:"comment",value:r<0?n:n.slice(0,r)};return ui(s,t),s}}function IE(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ui(n,t),n}}function SE(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Ch(e,t.children),i=RE(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&nn.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let u=-1;for(s=!1;++u<o.length;)e.stack.includes(o[u])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:i,children:r};return ui(a,t),a}function NE(e,t){const r={type:"root",children:Ch(e,t.children)};return ui(r,t),r}function LE(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return ui(r,t),r}function Ch(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=Ah(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function RE(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&nn.call(r,n)?r[n]:void 0,a=r&&nn.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},u={};let l;for(l in o)if(nn.call(o,l)){const c=o[l];let d=hl(e,fl(s,l),l,c);d==null&&(d=hl(e,fl(a,l),l,c)),d!=null&&(u[l]=d)}if(i&&nn.call(i,n)){const c=i[n];for(l in c)nn.call(c,l)&&!nn.call(u,l)&&(u[l]=c[l])}return u}function hl(e,t,n,r){return t?Array.isArray(r)?vE(e,t,n,r):wh(e,t,n,r):void 0}function vE(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const a=wh(e,t,n,r[i]);(typeof a=="number"||typeof a=="string")&&s.push(a)}return s}function wh(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&OE(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const a=t[s];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){i=!0;break}}else if(a===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 OE(e,t,n){const r=e.schema.protocols&&nn.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),s=i.indexOf(":"),a=i.indexOf("?"),o=i.indexOf("#"),u=i.indexOf("/");if(s<0||u>-1&&s>u||a>-1&&s>a||o>-1&&s>o)return!0;let l=-1;for(;++l<r.length;){const c=r[l];if(s===c.length&&i.slice(0,c.length)===c)return!0}return!1}function ui(e,t){const n=_h(t);t.data&&(e.data=Rn(t.data)),n&&(e.position=n)}function fl(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Ih(e){return function(t){return CE(t,e)}}function qi(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}const Ye=dn(/[A-Za-z]/),$e=dn(/[\dA-Za-z]/),PE=dn(/[#-'*+\--9=?A-Z^-~]/);function Yi(e){return e!==null&&(e<32||e===127)}const Ua=dn(/\d/),DE=dn(/[\dA-Fa-f]/),ME=dn(/[!-/:-@[-`{-~]/);function X(e){return e!==null&&e<-2}function Ee(e){return e!==null&&(e<0||e===32)}function ue(e){return e===-2||e===-1||e===32}const xs=dn(new RegExp("\\p{P}|\\p{S}","u")),vn=dn(/\s/);function dn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function BE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function FE(e,t,n){const i=ps((n||{}).ignore||[]),s=HE(t);let a=-1;for(;++a<s.length;)Co(e,"text",o);function o(l,c){let d=-1,p;for(;++d<c.length;){const f=c[d],m=p?p.children:void 0;if(i(f,m?m.indexOf(f):void 0,p))return;p=f}if(p)return u(l,c)}function u(l,c){const d=c[c.length-1],p=s[a][0],f=s[a][1];let m=0;const y=d.children.indexOf(l);let g=!1,I=[];p.lastIndex=0;let C=p.exec(l.value);for(;C;){const v=C.index,P={index:C.index,input:C.input,stack:[...c,l]};let N=f(...C,P);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?p.lastIndex=v+1:(m!==v&&I.push({type:"text",value:l.value.slice(m,v)}),Array.isArray(N)?I.push(...N):N&&I.push(N),m=v+C[0].length,g=!0),!p.global)break;C=p.exec(l.value)}return g?(m<l.value.length&&I.push({type:"text",value:l.value.slice(m)}),d.children.splice(y,1,...I)):I=[l],y+I.length}}function HE(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([UE(i[0]),$E(i[1])])}return t}function UE(e){return typeof e=="string"?new RegExp(BE(e),"g"):e}function $E(e){return typeof e=="function"?e:function(){return e}}const qs="phrasing",Ys=["autolink","link","image","label"];function jE(){return{transforms:[QE],enter:{literalAutolink:zE,literalAutolinkEmail:Qs,literalAutolinkHttp:Qs,literalAutolinkWww:Qs},exit:{literalAutolink:YE,literalAutolinkEmail:qE,literalAutolinkHttp:GE,literalAutolinkWww:WE}}}function VE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:qs,notInConstruct:Ys},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:qs,notInConstruct:Ys},{character:":",before:"[ps]",after:"\\/",inConstruct:qs,notInConstruct:Ys}]}}function zE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Qs(e){this.config.enter.autolinkProtocol.call(this,e)}function GE(e){this.config.exit.autolinkProtocol.call(this,e)}function WE(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 qE(e){this.config.exit.autolinkEmail.call(this,e)}function YE(e){this.exit(e)}function QE(e){FE(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,KE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),XE]],{ignore:["link","linkReference"]})}function KE(e,t,n,r,i){let s="";if(!Sh(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!ZE(n)))return!1;const a=JE(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function XE(e,t,n,r){return!Sh(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ZE(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 JE(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=qi(e,"(");let s=qi(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function Sh(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||vn(n)||xs(n))&&(!t||n!==47)}function yt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Nh.peek=u_;function e_(){this.buffer()}function t_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function n_(){this.buffer()}function r_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function i_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function s_(e){this.exit(e)}function a_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function o_(e){this.exit(e)}function u_(){return"["}function Nh(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function l_(){return{enter:{gfmFootnoteCallString:e_,gfmFootnoteCall:t_,gfmFootnoteDefinitionLabelString:n_,gfmFootnoteDefinition:r_},exit:{gfmFootnoteCallString:i_,gfmFootnoteCall:s_,gfmFootnoteDefinitionLabelString:a_,gfmFootnoteDefinition:o_}}}function c_(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Nh},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let u=o.move("[^");const l=s.enter("footnoteDefinition"),c=s.enter("label");return u+=o.move(s.safe(s.associationId(r),{before:u,after:"]"})),c(),u+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),u+=o.move((t?`
4
- `:" ")+s.indentLines(s.containerFlow(r,o.current()),t?Lh:d_))),l(),u}}function d_(e,t,n){return t===0?e:Lh(e,t,n)}function Lh(e,t,n){return(n?"":" ")+e}const h_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Rh.peek=b_;function f_(){return{canContainEols:["delete"],enter:{strikethrough:m_},exit:{strikethrough:g_}}}function p_(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:h_}],handlers:{delete:Rh}}}function m_(e){this.enter({type:"delete",children:[]},e)}function g_(e){this.exit(e)}function Rh(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function b_(){return"~"}function E_(e){return e.length}function __(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||E_,s=[],a=[],o=[],u=[];let l=0,c=-1;for(;++c<e.length;){const b=[],y=[];let g=-1;for(e[c].length>l&&(l=e[c].length);++g<e[c].length;){const I=T_(e[c][g]);if(n.alignDelimiters!==!1){const C=i(I);y[g]=C,(u[g]===void 0||C>u[g])&&(u[g]=C)}b.push(I)}a[c]=b,o[c]=y}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<l;)s[d]=pl(r[d]);else{const b=pl(r);for(;++d<l;)s[d]=b}d=-1;const p=[],f=[];for(;++d<l;){const b=s[d];let y="",g="";b===99?(y=":",g=":"):b===108?y=":":b===114&&(g=":");let I=n.alignDelimiters===!1?1:Math.max(1,u[d]-y.length-g.length);const C=y+"-".repeat(I)+g;n.alignDelimiters!==!1&&(I=y.length+I+g.length,I>u[d]&&(u[d]=I),f[d]=I),p[d]=C}a.splice(1,0,p),o.splice(1,0,f),c=-1;const m=[];for(;++c<a.length;){const b=a[c],y=o[c];d=-1;const g=[];for(;++d<l;){const I=b[d]||"";let C="",v="";if(n.alignDelimiters!==!1){const P=u[d]-(y[d]||0),N=s[d];N===114?C=" ".repeat(P):N===99?P%2?(C=" ".repeat(P/2+.5),v=" ".repeat(P/2-.5)):(C=" ".repeat(P/2),v=C):v=" ".repeat(P)}n.delimiterStart!==!1&&!d&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&I==="")&&(n.delimiterStart!==!1||d)&&g.push(" "),n.alignDelimiters!==!1&&g.push(C),g.push(I),n.alignDelimiters!==!1&&g.push(v),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||d!==l-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(`
5
- `)}function T_(e){return e==null?"":String(e)}function pl(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}function y_(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),x_);return i(),a}function x_(e,t,n){return">"+(n?"":" ")+e}function k_(e,t){return ml(e,t.inConstruct,!0)&&!ml(e,t.notInConstruct,!1)}function ml(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 gl(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
6
- `&&k_(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
7
- `}function A_(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function C_(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 w_(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 I_(e,t,n,r){const i=w_(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(C_(e,n)){const d=n.enter("codeIndented"),p=n.indentLines(s,S_);return d(),p}const o=n.createTracker(r),u=i.repeat(Math.max(A_(s,i)+1,3)),l=n.enter("codeFenced");let c=o.move(u);if(e.lang){const d=n.enter(`codeFencedLang${a}`);c+=o.move(n.safe(e.lang,{before:c,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);c+=o.move(" "),c+=o.move(n.safe(e.meta,{before:c,after:`
8
- `,encode:["`"],...o.current()})),d()}return c+=o.move(`
9
- `),s&&(c+=o.move(s+`
10
- `)),c+=o.move(u),l(),c}function S_(e,t,n){return(n?"":" ")+e}function Uo(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 N_(e,t,n,r){const i=Uo(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("[");return l+=u.move(n.safe(n.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":`
11
- `,...u.current()}))),o(),e.title&&(o=n.enter(`title${s}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),a(),l}function L_(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 Kr(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ar(e){if(e===null||Ee(e)||vn(e))return 1;if(xs(e))return 2}function Qi(e,t,n){const r=ar(e),i=ar(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}}vh.peek=R_;function vh(e,t,n,r){const i=L_(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let u=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const l=u.charCodeAt(0),c=Qi(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(u=Kr(l)+u.slice(1));const d=u.charCodeAt(u.length-1),p=Qi(r.after.charCodeAt(0),d,i);p.inside&&(u=u.slice(0,-1)+Kr(d));const f=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},o+u+f}function R_(e,t,n){return n.options.emphasis||"*"}const v_={};function $o(e,t){const n=v_,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Oh(e,r,i)}function Oh(e,t,n){if(O_(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 bl(e.children,t,n)}return Array.isArray(e)?bl(e,t,n):""}function bl(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Oh(e[i],t,n);return r.join("")}function O_(e){return!!(e&&typeof e=="object")}function P_(e,t){let n=!1;return Rt(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ra}),!!((!e.depth||e.depth<3)&&$o(e)&&(t.options.setext||n))}function D_(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(P_(e,n)){const c=n.enter("headingSetext"),d=n.enter("phrasing"),p=n.containerPhrasing(e,{...s.current(),before:`
12
- `,after:`
13
- `});return d(),c(),p+`
14
- `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
15
- `))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");s.move(a+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
16
- `,...s.current()});return/^[\t ]/.test(l)&&(l=Kr(l.charCodeAt(0))+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),u(),o(),l}Ph.peek=M_;function Ph(e){return e.value||""}function M_(){return"<"}Dh.peek=B_;function Dh(e,t,n,r){const i=Uo(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=n.enter(`title${s}`),l+=u.move(" "+i),l+=u.move(n.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),l+=u.move(")"),a(),l}function B_(){return"!"}Mh.peek=F_;function Mh(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const l=n.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return a(),n.stack=c,s(),i==="full"||!l||l!==d?u+=o.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function F_(){return"!"}Bh.peek=H_;function Bh(e,t,n){let r=e.value||"",i="`",s=-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+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let u;if(a.atBreak)for(;u=o.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function H_(){return"`"}function Fh(e,t){const n=$o(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))}Hh.peek=U_;function Hh(e,t,n,r){const i=Uo(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,u;if(Fh(e,n)){const c=n.stack;n.stack=[],o=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),o(),n.stack=c,d}o=n.enter("link"),u=n.enter("label");let l=a.move("[");return l+=a.move(n.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(u=n.enter("destinationRaw"),l+=a.move(n.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),u(),e.title&&(u=n.enter(`title${s}`),l+=a.move(" "+i),l+=a.move(n.safe(e.title,{before:l,after:i,...a.current()})),l+=a.move(i),u()),l+=a.move(")"),o(),l}function U_(e,t,n){return Fh(e,n)?"<":"["}Uh.peek=$_;function Uh(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const l=n.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),a();const c=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:u,after:"]",...o.current()});return a(),n.stack=c,s(),i==="full"||!l||l!==d?u+=o.move(d+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function $_(){return"["}function jo(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 j_(e){const t=jo(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 V_(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 $h(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 z_(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?V_(n):jo(n);const o=e.ordered?a==="."?")":".":j_(n);let u=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&c&&(!c.children||!c.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&&(u=!0),$h(n)===a&&c){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=o),n.bulletCurrent=a;const l=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),l}function G_(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 W_(e,t,n,r){const i=G_(n);let s=n.bulletCurrent||jo(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,o.current()),c);return u(),l;function c(d,p,f){return p?(f?"":" ".repeat(a))+d:(f?s:s+" ".repeat(a-s.length))+d}}function q_(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const Y_=ps(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Q_(e,t,n,r){return(e.children.some(function(a){return Y_(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function K_(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}jh.peek=X_;function jh(e,t,n,r){const i=K_(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let u=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const l=u.charCodeAt(0),c=Qi(r.before.charCodeAt(r.before.length-1),l,i);c.inside&&(u=Kr(l)+u.slice(1));const d=u.charCodeAt(u.length-1),p=Qi(r.after.charCodeAt(0),d,i);p.inside&&(u=u.slice(0,-1)+Kr(d));const f=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:c.outside},o+u+f}function X_(e,t,n){return n.options.strong||"*"}function Z_(e,t,n,r){return n.safe(e.value,r)}function J_(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 eT(e,t,n){const r=($h(n)+(n.options.ruleSpaces?" ":"")).repeat(J_(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Vh={blockquote:y_,break:gl,code:I_,definition:N_,emphasis:vh,hardBreak:gl,heading:D_,html:Ph,image:Dh,imageReference:Mh,inlineCode:Bh,link:Hh,linkReference:Uh,list:z_,listItem:W_,paragraph:q_,root:Q_,strong:jh,text:Z_,thematicBreak:eT},El=document.createElement("i");function Vo(e){const t="&"+e+";";El.innerHTML=t;const n=El.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zh(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)}const tT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nT(e){return e.replace(tT,rT)}function rT(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return zh(n.slice(s?2:1),s?16:10)}return Vo(n)||e}function iT(){return{enter:{table:sT,tableData:_l,tableHeader:_l,tableRow:oT},exit:{codeText:uT,table:aT,tableData:Ks,tableHeader:Ks,tableRow:Ks}}}function sT(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 aT(e){this.exit(e),this.data.inTable=void 0}function oT(e){this.enter({type:"tableRow",children:[]},e)}function Ks(e){this.exit(e)}function _l(e){this.enter({type:"tableCell",children:[]},e)}function uT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lT));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function lT(e,t){return t==="|"?t:e}function cT(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
17
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:u,tableRow:o}};function a(f,m,b,y){return l(c(f,b,y),f.align)}function o(f,m,b,y){const g=d(f,b,y),I=l([g]);return I.slice(0,I.indexOf(`
18
- `))}function u(f,m,b,y){const g=b.enter("tableCell"),I=b.enter("phrasing"),C=b.containerPhrasing(f,{...y,before:s,after:s});return I(),g(),C}function l(f,m){return __(f,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function c(f,m,b){const y=f.children;let g=-1;const I=[],C=m.enter("table");for(;++g<y.length;)I[g]=d(y[g],m,b);return C(),I}function d(f,m,b){const y=f.children;let g=-1;const I=[],C=m.enter("tableRow");for(;++g<y.length;)I[g]=u(y[g],f,m,b);return C(),I}function p(f,m,b){let y=Vh.inlineCode(f,m,b);return b.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function dT(){return{exit:{taskListCheckValueChecked:Tl,taskListCheckValueUnchecked:Tl,paragraph:fT}}}function hT(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:pT}}}function Tl(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function fT(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 s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===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 pT(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let u=Vh.listItem(e,t,n,{...r,...o.current()});return s&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+a}}function mT(){return[jE(),l_(),f_(),iT(),dT()]}function gT(e){return{extensions:[VE(),c_(e),p_(),cT(e),hT()]}}function st(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function dt(e,t){return e.length>0?(st(e,e.length,0,t),e):t}const yl={}.hasOwnProperty;function Gh(e){const t={};let n=-1;for(;++n<e.length;)bT(t,e[n]);return t}function bT(e,t){let n;for(n in t){const i=(yl.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){yl.call(i,a)||(i[a]=[]);const o=s[a];ET(i[a],Array.isArray(o)?o:o?[o]:[])}}}function ET(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);st(e,0,0,r)}const _T={tokenize:CT,partial:!0},Wh={tokenize:wT,partial:!0},qh={tokenize:IT,partial:!0},Yh={tokenize:ST,partial:!0},TT={tokenize:NT,partial:!0},Qh={name:"wwwAutolink",tokenize:kT,previous:Xh},Kh={name:"protocolAutolink",tokenize:AT,previous:Zh},Wt={name:"emailAutolink",tokenize:xT,previous:Jh},Pt={};function yT(){return{text:Pt}}let En=48;for(;En<123;)Pt[En]=Wt,En++,En===58?En=65:En===91&&(En=97);Pt[43]=Wt;Pt[45]=Wt;Pt[46]=Wt;Pt[95]=Wt;Pt[72]=[Wt,Kh];Pt[104]=[Wt,Kh];Pt[87]=[Wt,Qh];Pt[119]=[Wt,Qh];function xT(e,t,n){const r=this;let i,s;return a;function a(d){return!$a(d)||!Jh.call(r,r.previous)||zo(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return $a(d)?(e.consume(d),o):d===64?(e.consume(d),u):n(d)}function u(d){return d===46?e.check(TT,c,l)(d):d===45||d===95||$e(d)?(s=!0,e.consume(d),u):c(d)}function l(d){return e.consume(d),i=!0,u}function c(d){return s&&i&&Ye(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function kT(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!Xh.call(r,r.previous)||zo(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_T,e.attempt(Wh,e.attempt(qh,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function AT(e,t,n){const r=this;let i="",s=!1;return a;function a(d){return(d===72||d===104)&&Zh.call(r,r.previous)&&!zo(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),e.consume(d),o):n(d)}function o(d){if(Ye(d)&&i.length<5)return i+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(d),u}return n(d)}function u(d){return d===47?(e.consume(d),s?l:(s=!0,u)):n(d)}function l(d){return d===null||Yi(d)||Ee(d)||vn(d)||xs(d)?n(d):e.attempt(Wh,e.attempt(qh,c),n)(d)}function c(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function CT(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function wT(e,t,n){let r,i,s;return a;function a(l){return l===46||l===95?e.check(Yh,u,o)(l):l===null||Ee(l)||vn(l)||l!==45&&xs(l)?u(l):(s=!0,e.consume(l),a)}function o(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),a}function u(l){return i||r||!s?n(l):t(l)}}function IT(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Yh,t,s)(a):a===null||Ee(a)||vn(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function ST(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||Ee(o)||vn(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||Ee(o)||vn(o)?t(o):r(o)}function s(o){return Ye(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):Ye(o)?(e.consume(o),a):n(o)}}function NT(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return $e(s)?n(s):t(s)}}function Xh(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ee(e)}function Zh(e){return!Ye(e)}function Jh(e){return!(e===47||$a(e))}function $a(e){return e===43||e===45||e===46||e===95||$e(e)}function zo(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}function fr(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&$e(e.charCodeAt(n+1))&&$e(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ks(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const ja={name:"attention",resolveAll:LT,tokenize:RT};function LT(e,t){let n=-1,r,i,s,a,o,u,l,c;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;u=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 d={...e[r][1].end},p={...e[n][1].start};xl(d,-u),xl(p,u),a={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},s={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=dt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=dt(l,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),l=dt(l,ks(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=dt(l,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,l=dt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,st(e,r-1,n-r+3,l),n=r+l.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function RT(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ar(r);let s;return a;function a(u){return s=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===s)return e.consume(u),o;const l=e.exit("attentionSequence"),c=ar(u),d=!c||c===2&&i||n.includes(u),p=!i||i===2&&c||n.includes(r);return l._open=!!(s===42?d:d&&(i||!p)),l._close=!!(s===42?p:p&&(c||!d)),t(u)}}function xl(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const vT={name:"autolink",tokenize:OT};function OT(e,t,n){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(f){return Ye(f)?(e.consume(f),a):f===64?n(f):l(f)}function a(f){return f===43||f===45||f===46||$e(f)?(r=1,o(f)):l(f)}function o(f){return f===58?(e.consume(f),r=0,u):(f===43||f===45||f===46||$e(f))&&r++<32?(e.consume(f),o):(r=0,l(f))}function u(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Yi(f)?n(f):(e.consume(f),u)}function l(f){return f===64?(e.consume(f),c):PE(f)?(e.consume(f),l):n(f)}function c(f){return $e(f)?d(f):n(f)}function d(f){return f===46?(e.consume(f),r=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||$e(f))&&r++<63){const m=f===45?p:d;return e.consume(f),m}return n(f)}}function he(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(u){return ue(u)?(e.enter(n),o(u)):t(u)}function o(u){return ue(u)&&s++<i?(e.consume(u),o):(e.exit(n),t(u))}}const li={partial:!0,tokenize:PT};function PT(e,t,n){return r;function r(s){return ue(s)?he(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||X(s)?t(s):n(s)}}const ef={continuation:{tokenize:MT},exit:BT,name:"blockQuote",tokenize:DT};function DT(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return ue(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function MT(e,t,n){const r=this;return i;function i(a){return ue(a)?he(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(ef,t,n)(a)}}function BT(e){e.exit("blockQuote")}const tf={name:"characterEscape",tokenize:FT};function FT(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return ME(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const nf={name:"characterReference",tokenize:HT};function HT(e,t,n){const r=this;let i=0,s,a;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),s=31,a=$e,c(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=DE,c):(e.enter("characterReferenceValue"),s=7,a=Ua,c(d))}function c(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return a===$e&&!Vo(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<s?(e.consume(d),c):n(d)}}const kl={partial:!0,tokenize:$T},Al={concrete:!0,name:"codeFenced",tokenize:UT};function UT(e,t,n){const r=this,i={partial:!0,tokenize:P};let s=0,a=0,o;return u;function u(N){return l(N)}function l(N){const B=r.events[r.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,o=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(N)}function c(N){return N===o?(a++,e.consume(N),c):a<3?n(N):(e.exit("codeFencedFenceSequence"),ue(N)?he(e,d,"whitespace")(N):d(N))}function d(N){return N===null||X(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(kl,b,v)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(N))}function p(N){return N===null||X(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(N)):ue(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),he(e,f,"whitespace")(N)):N===96&&N===o?n(N):(e.consume(N),p)}function f(N){return N===null||X(N)?d(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(N))}function m(N){return N===null||X(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(N)):N===96&&N===o?n(N):(e.consume(N),m)}function b(N){return e.attempt(i,v,y)(N)}function y(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),g}function g(N){return s>0&&ue(N)?he(e,I,"linePrefix",s+1)(N):I(N)}function I(N){return N===null||X(N)?e.check(kl,b,v)(N):(e.enter("codeFlowValue"),C(N))}function C(N){return N===null||X(N)?(e.exit("codeFlowValue"),I(N)):(e.consume(N),C)}function v(N){return e.exit("codeFenced"),t(N)}function P(N,B,M){let z=0;return L;function L($){return N.enter("lineEnding"),N.consume($),N.exit("lineEnding"),V}function V($){return N.enter("codeFencedFence"),ue($)?he(N,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):G($)}function G($){return $===o?(N.enter("codeFencedFenceSequence"),Z($)):M($)}function Z($){return $===o?(z++,N.consume($),Z):z>=a?(N.exit("codeFencedFenceSequence"),ue($)?he(N,Y,"whitespace")($):Y($)):M($)}function Y($){return $===null||X($)?(N.exit("codeFencedFence"),B($)):M($)}}}function $T(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Xs={name:"codeIndented",tokenize:VT},jT={partial:!0,tokenize:zT};function VT(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),he(e,s,"linePrefix",5)(l)}function s(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?a(l):n(l)}function a(l){return l===null?u(l):X(l)?e.attempt(jT,a,u)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||X(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),o)}function u(l){return e.exit("codeIndented"),t(l)}}function zT(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):X(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):he(e,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):X(a)?i(a):n(a)}}const GT={name:"codeText",previous:qT,resolve:WT,tokenize:YT};function WT(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 qT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function YT(e,t,n){let r=0,i,s;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(s=e.enter("codeTextSequence"),i=0,c(d)):X(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||X(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),l)}function c(d){return d===96?(e.consume(d),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(s.type="codeTextData",l(d))}}class QT{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 s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ar(this.left,r),s.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),Ar(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ar(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);Ar(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ar(this.left,n.reverse())}}}function Ar(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 rf(e){const t={};let n=-1,r,i,s,a,o,u,l;const c=new QT(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,s=0,s<u.length&&u[s][1].type==="lineEndingBlank"&&(s+=2),s<u.length&&u[s][1].type==="content"))for(;++s<u.length&&u[s][1].type!=="content";)u[s][1].type==="chunkText"&&(u[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,KT(c,n)),n=t[n],l=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=c.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},o=c.slice(i,n),o.unshift(r),c.splice(i,n-i+1,o))}}return st(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function KT(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,u=[],l={};let c,d,p=-1,f=n,m=0,b=0;const y=[b];for(;f;){for(;e.get(++i)[1]!==f;);s.push(i),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(c),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<o.length;)o[p][0]==="exit"&&o[p-1][0]==="enter"&&o[p][1].type===o[p-1][1].type&&o[p][1].start.line!==o[p][1].end.line&&(b=p+1,y.push(b),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):y.pop(),p=y.length;p--;){const g=o.slice(y[p],y[p+1]),I=s.pop();u.push([I,I+g.length-1]),e.splice(I,2,g)}for(u.reverse(),p=-1;++p<u.length;)l[m+u[p][0]]=m+u[p][1],m+=u[p][1]-u[p][0]-1;return l}const XT={resolve:JT,tokenize:ey},ZT={partial:!0,tokenize:ty};function JT(e){return rf(e),e}function ey(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):X(o)?e.check(ZT,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function ty(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),he(e,s,"linePrefix")}function s(a){if(a===null||X(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function sf(e,t,n,r,i,s,a,o,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return d;function d(g){return g===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(g),e.exit(s),p):g===null||g===32||g===41||Yi(g)?n(g):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),b(g))}function p(g){return g===62?(e.enter(s),e.consume(g),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(o),p(g)):g===null||g===60||X(g)?n(g):(e.consume(g),g===92?m:f)}function m(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function b(g){return!c&&(g===null||g===41||Ee(g))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(g)):c<l&&g===40?(e.consume(g),c++,b):g===41?(e.consume(g),c--,b):g===null||g===32||g===40||Yi(g)?n(g):(e.consume(g),g===92?y:b)}function y(g){return g===40||g===41||g===92?(e.consume(g),b):b(g)}}function af(e,t,n,r,i,s){const a=this;let o=0,u;return l;function l(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(s),c}function c(f){return o>999||f===null||f===91||f===93&&!u||f===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):f===93?(e.exit(s),e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):X(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||X(f)||o++>999?(e.exit("chunkString"),c(f)):(e.consume(f),u||(u=!ue(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),o++,d):d(f)}}function of(e,t,n,r,i,s){let a;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,u):n(p)}function u(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(s),l(p))}function l(p){return p===a?(e.exit(s),u(a)):p===null?n(p):X(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),he(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(p))}function c(p){return p===a||p===null||X(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?d:c)}function d(p){return p===a||p===92?(e.consume(p),c):c(p)}}function jr(e,t){let n;return r;function r(i){return X(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ue(i)?he(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ny={name:"definition",tokenize:iy},ry={partial:!0,tokenize:sy};function iy(e,t,n){const r=this;let i;return s;function s(f){return e.enter("definition"),a(f)}function a(f){return af.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return i=yt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),u):n(f)}function u(f){return Ee(f)?jr(e,l)(f):l(f)}function l(f){return sf(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(ry,d,d)(f)}function d(f){return ue(f)?he(e,p,"whitespace")(f):p(f)}function p(f){return f===null||X(f)?(e.exit("definition"),r.parser.defined.push(i),t(f)):n(f)}}function sy(e,t,n){return r;function r(o){return Ee(o)?jr(e,i)(o):n(o)}function i(o){return of(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return ue(o)?he(e,a,"whitespace")(o):a(o)}function a(o){return o===null||X(o)?t(o):n(o)}}const ay={name:"hardBreakEscape",tokenize:oy};function oy(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return X(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const uy={name:"headingAtx",resolve:ly,tokenize:cy};function ly(e,t){let n=e.length-2,r=3,i,s;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},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},st(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function cy(e,t,n){let r=0;return i;function i(c){return e.enter("atxHeading"),s(c)}function s(c){return e.enter("atxHeadingSequence"),a(c)}function a(c){return c===35&&r++<6?(e.consume(c),a):c===null||Ee(c)?(e.exit("atxHeadingSequence"),o(c)):n(c)}function o(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||X(c)?(e.exit("atxHeading"),t(c)):ue(c)?he(e,o,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),o(c))}function l(c){return c===null||c===35||Ee(c)?(e.exit("atxHeadingText"),o(c)):(e.consume(c),l)}}const dy=["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"],Cl=["pre","script","style","textarea"],hy={concrete:!0,name:"htmlFlow",resolveTo:my,tokenize:gy},fy={partial:!0,tokenize:Ey},py={partial:!0,tokenize:by};function my(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 gy(e,t,n){const r=this;let i,s,a,o,u;return l;function l(S){return c(S)}function c(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),d}function d(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),s=!0,b):S===63?(e.consume(S),i=3,r.interrupt?t:A):Ye(S)?(e.consume(S),a=String.fromCharCode(S),y):n(S)}function p(S){return S===45?(e.consume(S),i=2,f):S===91?(e.consume(S),i=5,o=0,m):Ye(S)?(e.consume(S),i=4,r.interrupt?t:A):n(S)}function f(S){return S===45?(e.consume(S),r.interrupt?t:A):n(S)}function m(S){const Ie="CDATA[";return S===Ie.charCodeAt(o++)?(e.consume(S),o===Ie.length?r.interrupt?t:G:m):n(S)}function b(S){return Ye(S)?(e.consume(S),a=String.fromCharCode(S),y):n(S)}function y(S){if(S===null||S===47||S===62||Ee(S)){const Ie=S===47,le=a.toLowerCase();return!Ie&&!s&&Cl.includes(le)?(i=1,r.interrupt?t(S):G(S)):dy.includes(a.toLowerCase())?(i=6,Ie?(e.consume(S),g):r.interrupt?t(S):G(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):s?I(S):C(S))}return S===45||$e(S)?(e.consume(S),a+=String.fromCharCode(S),y):n(S)}function g(S){return S===62?(e.consume(S),r.interrupt?t:G):n(S)}function I(S){return ue(S)?(e.consume(S),I):L(S)}function C(S){return S===47?(e.consume(S),L):S===58||S===95||Ye(S)?(e.consume(S),v):ue(S)?(e.consume(S),C):L(S)}function v(S){return S===45||S===46||S===58||S===95||$e(S)?(e.consume(S),v):P(S)}function P(S){return S===61?(e.consume(S),N):ue(S)?(e.consume(S),P):C(S)}function N(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),u=S,B):ue(S)?(e.consume(S),N):M(S)}function B(S){return S===u?(e.consume(S),u=null,z):S===null||X(S)?n(S):(e.consume(S),B)}function M(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||Ee(S)?P(S):(e.consume(S),M)}function z(S){return S===47||S===62||ue(S)?C(S):n(S)}function L(S){return S===62?(e.consume(S),V):n(S)}function V(S){return S===null||X(S)?G(S):ue(S)?(e.consume(S),V):n(S)}function G(S){return S===45&&i===2?(e.consume(S),W):S===60&&i===1?(e.consume(S),J):S===62&&i===4?(e.consume(S),Te):S===63&&i===3?(e.consume(S),A):S===93&&i===5?(e.consume(S),Ce):X(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(fy,we,Z)(S)):S===null||X(S)?(e.exit("htmlFlowData"),Z(S)):(e.consume(S),G)}function Z(S){return e.check(py,Y,we)(S)}function Y(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),$}function $(S){return S===null||X(S)?Z(S):(e.enter("htmlFlowData"),G(S))}function W(S){return S===45?(e.consume(S),A):G(S)}function J(S){return S===47?(e.consume(S),a="",me):G(S)}function me(S){if(S===62){const Ie=a.toLowerCase();return Cl.includes(Ie)?(e.consume(S),Te):G(S)}return Ye(S)&&a.length<8?(e.consume(S),a+=String.fromCharCode(S),me):G(S)}function Ce(S){return S===93?(e.consume(S),A):G(S)}function A(S){return S===62?(e.consume(S),Te):S===45&&i===2?(e.consume(S),A):G(S)}function Te(S){return S===null||X(S)?(e.exit("htmlFlowData"),we(S)):(e.consume(S),Te)}function we(S){return e.exit("htmlFlow"),t(S)}}function by(e,t,n){const r=this;return i;function i(a){return X(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Ey(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(li,t,n)}}const _y={name:"htmlText",tokenize:Ty};function Ty(e,t,n){const r=this;let i,s,a;return o;function o(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),u}function u(A){return A===33?(e.consume(A),l):A===47?(e.consume(A),P):A===63?(e.consume(A),C):Ye(A)?(e.consume(A),M):n(A)}function l(A){return A===45?(e.consume(A),c):A===91?(e.consume(A),s=0,m):Ye(A)?(e.consume(A),I):n(A)}function c(A){return A===45?(e.consume(A),f):n(A)}function d(A){return A===null?n(A):A===45?(e.consume(A),p):X(A)?(a=d,J(A)):(e.consume(A),d)}function p(A){return A===45?(e.consume(A),f):d(A)}function f(A){return A===62?W(A):A===45?p(A):d(A)}function m(A){const Te="CDATA[";return A===Te.charCodeAt(s++)?(e.consume(A),s===Te.length?b:m):n(A)}function b(A){return A===null?n(A):A===93?(e.consume(A),y):X(A)?(a=b,J(A)):(e.consume(A),b)}function y(A){return A===93?(e.consume(A),g):b(A)}function g(A){return A===62?W(A):A===93?(e.consume(A),g):b(A)}function I(A){return A===null||A===62?W(A):X(A)?(a=I,J(A)):(e.consume(A),I)}function C(A){return A===null?n(A):A===63?(e.consume(A),v):X(A)?(a=C,J(A)):(e.consume(A),C)}function v(A){return A===62?W(A):C(A)}function P(A){return Ye(A)?(e.consume(A),N):n(A)}function N(A){return A===45||$e(A)?(e.consume(A),N):B(A)}function B(A){return X(A)?(a=B,J(A)):ue(A)?(e.consume(A),B):W(A)}function M(A){return A===45||$e(A)?(e.consume(A),M):A===47||A===62||Ee(A)?z(A):n(A)}function z(A){return A===47?(e.consume(A),W):A===58||A===95||Ye(A)?(e.consume(A),L):X(A)?(a=z,J(A)):ue(A)?(e.consume(A),z):W(A)}function L(A){return A===45||A===46||A===58||A===95||$e(A)?(e.consume(A),L):V(A)}function V(A){return A===61?(e.consume(A),G):X(A)?(a=V,J(A)):ue(A)?(e.consume(A),V):z(A)}function G(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),i=A,Z):X(A)?(a=G,J(A)):ue(A)?(e.consume(A),G):(e.consume(A),Y)}function Z(A){return A===i?(e.consume(A),i=void 0,$):A===null?n(A):X(A)?(a=Z,J(A)):(e.consume(A),Z)}function Y(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||Ee(A)?z(A):(e.consume(A),Y)}function $(A){return A===47||A===62||Ee(A)?z(A):n(A)}function W(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function J(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),me}function me(A){return ue(A)?he(e,Ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):Ce(A)}function Ce(A){return e.enter("htmlTextData"),a(A)}}const Go={name:"labelEnd",resolveAll:Ay,resolveTo:Cy,tokenize:wy},yy={tokenize:Iy},xy={tokenize:Sy},ky={tokenize:Ny};function Ay(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&&st(e,0,e.length,n),e}function Cy(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const u={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},c={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",u,t],["enter",l,t]],o=dt(o,e.slice(s+1,s+r+3)),o=dt(o,[["enter",c,t]]),o=dt(o,ks(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=dt(o,[["exit",c,t],e[a-2],e[a-1],["exit",l,t]]),o=dt(o,e.slice(a+1)),o=dt(o,[["exit",u,t]]),st(e,s,e.length,o),e}function wy(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(p){return s?s._inactive?d(p):(a=r.parser.defined.includes(yt(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),u):n(p)}function u(p){return p===40?e.attempt(yy,c,a?c:d)(p):p===91?e.attempt(xy,c,a?l:d)(p):a?c(p):d(p)}function l(p){return e.attempt(ky,c,d)(p)}function c(p){return t(p)}function d(p){return s._balanced=!0,n(p)}}function Iy(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Ee(d)?jr(e,s)(d):s(d)}function s(d){return d===41?c(d):sf(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return Ee(d)?jr(e,u)(d):c(d)}function o(d){return n(d)}function u(d){return d===34||d===39||d===40?of(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function l(d){return Ee(d)?jr(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function Sy(e,t,n){const r=this;return i;function i(o){return af.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(yt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function Ny(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const Ly={name:"labelStartImage",resolveAll:Go.resolveAll,tokenize:Ry};function Ry(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const vy={name:"labelStartLink",resolveAll:Go.resolveAll,tokenize:Oy};function Oy(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Zs={name:"lineEnding",tokenize:Py};function Py(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),he(e,t,"linePrefix")}}const Di={name:"thematicBreak",tokenize:Dy};function Dy(e,t,n){let r=0,i;return s;function s(l){return e.enter("thematicBreak"),a(l)}function a(l){return i=l,o(l)}function o(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):r>=3&&(l===null||X(l))?(e.exit("thematicBreak"),t(l)):n(l)}function u(l){return l===i?(e.consume(l),r++,u):(e.exit("thematicBreakSequence"),ue(l)?he(e,o,"whitespace")(l):o(l))}}const tt={continuation:{tokenize:Hy},exit:$y,name:"list",tokenize:Fy},My={partial:!0,tokenize:jy},By={partial:!0,tokenize:Uy};function Fy(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(f){const m=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Ua(f)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Di,n,l)(f):l(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(f)}return n(f)}function u(f){return Ua(f)&&++a<10?(e.consume(f),u):(!r.interrupt||a<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),l(f)):n(f)}function l(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(li,r.interrupt?n:c,e.attempt(My,p,d))}function c(f){return r.containerState.initialBlankLine=!0,s++,p(f)}function d(f){return ue(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):n(f)}function p(f){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function Hy(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(li,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,he(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!ue(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(By,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,he(e,e.attempt(tt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Uy(e,t,n){const r=this;return he(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function $y(e){e.exit(this.containerState.type)}function jy(e,t,n){const r=this;return he(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!ue(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const wl={name:"setextUnderline",resolveTo:Vy,tokenize:zy};function Vy(e,t){let n=e.length,r,i,s;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),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function zy(e,t,n){const r=this;let i;return s;function s(l){let c=r.events.length,d;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){d=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=l,a(l)):n(l)}function a(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===i?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),ue(l)?he(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||X(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const Gy={tokenize:Jy,partial:!0};function Wy(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ky,continuation:{tokenize:Xy},exit:Zy}},text:{91:{name:"gfmFootnoteCall",tokenize:Qy},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:qy,resolveTo:Yy}}}}function qy(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!a||!a._balanced)return n(u);const l=yt(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!s.includes(l.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function Yy(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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function Qy(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),u}function u(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(s>999||d===93&&!a||d===null||d===91||Ee(d))return n(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(yt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Ee(d)||(a=!0),s++,e.consume(d),d===92?c:l}function c(d){return d===91||d===92||d===93?(e.consume(d),s++,l):l(d)}}function Ky(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return u;function u(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(m)}function c(m){if(a>999||m===93&&!o||m===null||m===91||Ee(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return s=yt(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ee(m)||(o=!0),a++,e.consume(m),m===92?d:c}function d(m){return m===91||m===92||m===93?(e.consume(m),a++,c):c(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(s)||i.push(s),he(e,f,"gfmFootnoteDefinitionWhitespace")):n(m)}function f(m){return t(m)}}function Xy(e,t,n){return e.check(li,t,e.attempt(Gy,t,n))}function Zy(e){e.exit("gfmFootnoteDefinition")}function Jy(e,t,n){const r=this;return he(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function ex(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},d={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},p=[["enter",c,o],["enter",a[l][1],o],["exit",a[l][1],o],["enter",d,o]],f=o.parser.constructs.insideSpan.null;f&&st(p,p.length,0,ks(f,a.slice(l+1,u),o)),st(p,p.length,0,[["exit",d,o],["enter",a[u][1],o],["exit",a[u][1],o],["exit",c,o]]),st(a,l-1,u-l+3,p),u=l+p.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function s(a,o,u){const l=this.previous,c=this.events;let d=0;return p;function p(m){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(m):(a.enter("strikethroughSequenceTemporary"),f(m))}function f(m){const b=ar(l);if(m===126)return d>1?u(m):(a.consume(m),d++,f);if(d<2&&!n)return u(m);const y=a.exit("strikethroughSequenceTemporary"),g=ar(m);return y._open=!g||g===2&&!!b,y._close=!b||b===2&&!!g,o(m)}}}class tx{constructor(){this.map=[]}add(t,n,r){nx(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[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 s of i)t.push(s);i=r.pop()}this.map.length=0}}function nx(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 rx(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 s=r.length-1;r[s]=r[s]==="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 ix(){return{flow:{null:{name:"table",tokenize:sx,resolveAll:ax}}}}function sx(e,t,n){const r=this;let i=0,s=0,a;return o;function o(L){let V=r.events.length-1;for(;V>-1;){const Y=r.events[V][1].type;if(Y==="lineEnding"||Y==="linePrefix")V--;else break}const G=V>-1?r.events[V][1].type:null,Z=G==="tableHead"||G==="tableRow"?N:u;return Z===N&&r.parser.lazy[r.now().line]?n(L):Z(L)}function u(L){return e.enter("tableHead"),e.enter("tableRow"),l(L)}function l(L){return L===124||(a=!0,s+=1),c(L)}function c(L){return L===null?n(L):X(L)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),f):n(L):ue(L)?he(e,c,"whitespace")(L):(s+=1,a&&(a=!1,i+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),a=!0,c):(e.enter("data"),d(L)))}function d(L){return L===null||L===124||Ee(L)?(e.exit("data"),c(L)):(e.consume(L),L===92?p:d)}function p(L){return L===92||L===124?(e.consume(L),d):d(L)}function f(L){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(L):(e.enter("tableDelimiterRow"),a=!1,ue(L)?he(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):m(L))}function m(L){return L===45||L===58?y(L):L===124?(a=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),b):P(L)}function b(L){return ue(L)?he(e,y,"whitespace")(L):y(L)}function y(L){return L===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),g):L===45?(s+=1,g(L)):L===null||X(L)?v(L):P(L)}function g(L){return L===45?(e.enter("tableDelimiterFiller"),I(L)):P(L)}function I(L){return L===45?(e.consume(L),I):L===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(L))}function C(L){return ue(L)?he(e,v,"whitespace")(L):v(L)}function v(L){return L===124?m(L):L===null||X(L)?!a||i!==s?P(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):P(L)}function P(L){return n(L)}function N(L){return e.enter("tableRow"),B(L)}function B(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),B):L===null||X(L)?(e.exit("tableRow"),t(L)):ue(L)?he(e,B,"whitespace")(L):(e.enter("data"),M(L))}function M(L){return L===null||L===124||Ee(L)?(e.exit("data"),B(L)):(e.consume(L),L===92?z:M)}function z(L){return L===92||L===124?(e.consume(L),M):M(L)}}function ax(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,u=0,l,c,d;const p=new tx;for(;++n<e.length;){const f=e[n],m=f[1];f[0]==="enter"?m.type==="tableHead"?(o=!1,u!==0&&(Il(p,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",l,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,c={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",c,t]])),i=m.type==="tableDelimiterRow"?2:c?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],d=gi(p,t,s,i,void 0,d),s=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],d=gi(p,t,s,i,void 0,d)),s=a,a=[s[1],n,0,0])):m.type==="tableHead"?(o=!0,u=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(u=n,s[1]!==0?(a[0]=a[1],d=gi(p,t,s,i,n,d)):a[1]!==0&&(d=gi(p,t,a,i,n,d)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&Il(p,t,u,l,c),p.consume(t.events),n=-1;++n<t.events.length;){const f=t.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=rx(t.events,n))}return e}function gi(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},Qn(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const u=Qn(t.events,n[1]);if(s={type:a,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const l=Qn(t.events,n[2]),c=Qn(t.events,n[3]),d={type:o,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const p=t.events[n[2]],f=t.events[n[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,b=n[3]-n[2]-1;e.add(m,b,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return i!==void 0&&(s.end=Object.assign({},Qn(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function Il(e,t,n,r,i){const s=[],a=Qn(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Qn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ox={name:"tasklistCheck",tokenize:lx};function ux(){return{text:{91:ox}}}function lx(e,t,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),s)}function s(u){return Ee(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(u)}function o(u){return X(u)?t(u):ue(u)?e.check({tokenize:cx},t,n)(u):n(u)}}function cx(e,t,n){return he(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function dx(e){return Gh([yT(),Wy(),ex(e),ix(),ux()])}const hx={};function fx(e){const t=this,n=e||hx,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(dx(n)),s.push(mT()),a.push(gT(n))}var px=Object.defineProperty,mx=Object.defineProperties,gx=Object.getOwnPropertyDescriptors,Sl=Object.getOwnPropertySymbols,bx=Object.prototype.hasOwnProperty,Ex=Object.prototype.propertyIsEnumerable,Nl=(e,t,n)=>t in e?px(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uf=(e,t)=>{for(var n in t||(t={}))bx.call(t,n)&&Nl(e,n,t[n]);if(Sl)for(var n of Sl(t))Ex.call(t,n)&&Nl(e,n,t[n]);return e},lf=(e,t)=>mx(e,gx(t)),Ke=(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},_x=(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},Tx=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]==="`"&&!_x(e,n)&&(t+=1)}return t},ln=(e,t)=>{let n=!1,r=!1,i=-1;for(let s=0;s<e.length;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){r=!r,s+=2;continue}if(!r&&e[s]==="`")if(n){if(i<t&&t<s)return!0;n=!1,i=-1}else n=!0,i=s}return!1},yx=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,xx=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(yx,(t,n,r,i)=>Ke(e,i)?t:`${n}\\>${r}`),kx=/(\*\*)([^*]*\*?)$/,Ax=/(__)([^_]*?)$/,Cx=/(\*\*\*)([^*]*?)$/,wx=/(\*)([^*]*?)$/,Ix=/(_)([^_]*?)$/,Sx=/(`)([^`]*?)$/,Nx=/(~~)([^~]*?)$/,Fn=/^[\s_~*`]*$/,cf=/^[\s]*[-*+][\s]+$/,Lx=/[\p{L}\p{N}_]/u,Rx=/^```[^`\n]*```?$/,vx=/^\*{4,}$/,Ox=/(__)([^_]+)_$/,Px=/(~~)([^~]+)~$/,Ll=/~~/g,cn=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:Lx.test(e)},Dx=(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},df=(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},As=(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},Mx=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
19
- `)return!1}return!1},hf=(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]==="]"?Mx(e,t):!1;if(e[n]===`
20
- `)return!1}return!1},Bx=(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]===`
21
- `)return!1}return!1},Wo=(e,t,n)=>{let r=0;for(let u=t-1;u>=0;u-=1)if(e[u]===`
22
- `){r=u+1;break}let i=e.length;for(let u=t;u<e.length;u+=1)if(e[u]===`
23
- `){i=u;break}let s=e.substring(r,i),a=0,o=!1;for(let u of s)if(u===n)a+=1;else if(u!==" "&&u!==" "){o=!0;break}return a>=3&&!o},Fx=(e,t,n,r)=>n==="\\"||e.includes("$")&&As(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&cn(n)&&cn(r)||(!n||n===" "||n===" "||n===`
24
- `)&&(!r||r===" "||r===" "||r===`
25
- `)),ff=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 s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";Fx(e,i,s,a)||(t+=1)}return t},Hx=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&As(e,t)||hf(e,t)||Bx(e,t)||n==="_"||r==="_"||n&&r&&cn(n)&&cn(r)),Ux=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 s=i>0?e[i-1]:"",a=i<r-1?e[i+1]:"";Hx(e,i,s,a)||(t+=1)}return t},$x=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},qo=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},Rl=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},jx=(e,t,n)=>{if(!t||Fn.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
26
- `),i=r===-1?0:r+1,s=e.substring(i,n);return cf.test(s)&&t.includes(`
27
- `)?!0:Wo(e,n,"*")},Vx=e=>{let t=e.match(kx);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Ke(e,r)||ln(e,r)||jx(e,n,r)?e:qo(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},zx=(e,t,n)=>{if(!t||Fn.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
28
- `),i=r===-1?0:r+1,s=e.substring(i,n);return cf.test(s)&&t.includes(`
29
- `)?!0:Wo(e,n,"_")},Gx=e=>{let t=e.match(Ax);if(!t){let i=e.match(Ox);if(i){let s=e.lastIndexOf(i[1]);if(!(Ke(e,s)||ln(e,s))&&Rl(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Ke(e,r)||ln(e,r)||zx(e,n,r)?e:Rl(e)%2===1?`${e}__`:e},Wx=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]!=="\\"&&!As(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
30
- `)&&(!i||i===" "||i===" "||i===`
31
- `)||r&&i&&cn(r)&&cn(i))continue;return n}}return-1},qx=e=>{if(!e.match(wx))return e;let t=Wx(e);if(t===-1||Ke(e,t)||ln(e,t))return e;let n=e.substring(t+1);return!n||Fn.test(n)?e:ff(e)%2===1?`${e}*`:e},pf=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]!=="\\"&&!As(e,n)&&!hf(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&cn(r)&&cn(i))continue;return n}}return-1},Yx=e=>{let t=e.length;for(;t>0&&e[t-1]===`
32
- `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},Qx=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(qo(t)%2!==1)return null;let n=t.indexOf("**"),r=pf(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},Kx=e=>{if(!e.match(Ix))return e;let t=pf(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Fn.test(n)||Ke(e,t)||ln(e,t))return e;if(Ux(e)%2===1){let r=Qx(e);return r!==null?r:Yx(e)}return e},Xx=e=>{let t=qo(e),n=ff(e);return t%2===0&&n%2===0},Zx=(e,t,n)=>!t||Fn.test(t)||Ke(e,n)||ln(e,n)?!0:Wo(e,n,"*"),Jx=e=>{if(vx.test(e))return e;let t=e.match(Cx);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Zx(e,n,r)?e:$x(e)%2===1?Xx(e)?e:`${e}***`:e},ek=/<[a-zA-Z/][^>]*$/,tk=e=>{let t=e.match(ek);return!t||t.index===void 0||Ke(e,t.index)?e:e.substring(0,t.index).trimEnd()},nk=e=>!e.match(Rx)||e.includes(`
33
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,rk=e=>(e.match(/```/g)||[]).length%2===1,ik=e=>{let t=nk(e);if(t!==null)return t;let n=e.match(Sx);if(n&&!rk(e)){let r=n[2];if(!r||Fn.test(r))return e;if(Tx(e)%2===1)return`${e}\``}return e},mf=(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)==="```",sk=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!mf(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},ak=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!mf(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},ok=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
34
- `,t)!==-1&&!e.endsWith(`
35
- `)?`${e}
36
- $$`:`${e}$$`},uk=e=>sk(e)%2===0?e:ok(e),lk=e=>ak(e)%2===1?`${e}$`:e,ck=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=Dx(e,t);if(r===-1||Ke(e,r))return null;let i=r>0&&e[r-1]==="!",s=i?r-1:r,a=e.substring(0,s);if(i)return a;let o=e.substring(r+1,t);return n==="text-only"?`${a}${o}`:`${a}[${o}](streamdown:incomplete-link)`},vl=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!Ke(e,n)){if(n>0&&e[n-1]==="!")continue;let r=df(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},dk=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=vl(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(df(e,t)===-1){let s=e.substring(0,i);if(r)return s;if(n==="text-only"){let a=vl(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},gf=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Ke(e,n)){let r=ck(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!Ke(e,r)){let i=dk(e,r,t);if(i!==null)return i}return e},hk=/^-{1,2}$/,fk=/^[\s]*-{1,2}[\s]+$/,pk=/^={1,2}$/,mk=/^[\s]*={1,2}[\s]+$/,gk=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
37
- `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(hk.test(i)&&!n.match(fk)){let s=r.split(`
38
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}if(pk.test(i)&&!n.match(mk)){let s=r.split(`
39
- `).at(-1);if(s&&s.trim().length>0)return`${e}​`}return e},bk=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),Ek=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(bk,(t,n)=>Ke(e,n)?t:"\\~"),_k=e=>{var t,n;let r=e.match(Nx);if(r){let i=r[2];if(!i||Fn.test(i))return e;let s=e.lastIndexOf(r[1]);if(Ke(e,s)||ln(e,s))return e;if(((t=e.match(Ll))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(Px);if(i){let s=e.lastIndexOf(i[0].slice(0,2));if(Ke(e,s)||ln(e,s))return e;if(((n=e.match(Ll))==null?void 0:n.length)%2===1)return`${e}~`}}return e},Js=e=>e!==!1,Tk=e=>e===!0,qe={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},yk=[{handler:{name:"singleTilde",handle:Ek,priority:qe.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:xx,priority:qe.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:tk,priority:qe.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:gk,priority:qe.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:gf,priority:qe.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:Jx,priority:qe.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:Vx,priority:qe.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Gx,priority:qe.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:qx,priority:qe.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:Kx,priority:qe.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:ik,priority:qe.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:_k,priority:qe.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:uk,priority:qe.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:lk,priority:qe.INLINE_KATEX},optionKey:"inlineKatex"}],xk=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return yk.filter(({handler:r,optionKey:i})=>r.name==="links"?Js(e==null?void 0:e.links)||Js(e==null?void 0:e.images):r.name==="inlineKatex"?Tk(e==null?void 0:e.inlineKatex):Js(e==null?void 0:e[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:lf(uf({},r),{handle:s=>gf(s,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},kk=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=xk(t),s=((n=t==null?void 0:t.handlers)!=null?n:[]).map(o=>{var u;return{handler:lf(uf({},o),{priority:(u=o.priority)!=null?u:qe.DEFAULT}),earlyReturn:void 0}}),a=[...i,...s].sort((o,u)=>{var l,c;return((l=o.handler.priority)!=null?l:0)-((c=u.handler.priority)!=null?c:0)});for(let{handler:o,earlyReturn:u}of a)if(r=o.handle(r),u!=null&&u(r))return r;return r},Ak=kk;function bf(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=bf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ef(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=bf(e))&&(r&&(r+=" "),r+=t);return r}const Ck=(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},wk=(e,t)=>({classGroupId:e,validator:t}),_f=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ki="-",Ol=[],Ik="arbitrary..",Sk=e=>{const t=Lk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Nk(a);const o=a.split(Ki),u=o[0]===""&&o.length>1?1:0;return Tf(o,u,t)},getConflictingClassGroupIds:(a,o)=>{if(o){const u=r[a],l=n[a];return u?l?Ck(l,u):u:l||Ol}return n[a]||Ol}}},Tf=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],s=n.nextPart.get(i);if(s){const l=Tf(e,t+1,s);if(l)return l}const a=n.validators;if(a===null)return;const o=t===0?e.join(Ki):e.slice(t).join(Ki),u=a.length;for(let l=0;l<u;l++){const c=a[l];if(c.validator(o))return c.classGroupId}},Nk=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?Ik+r:void 0})(),Lk=e=>{const{theme:t,classGroups:n}=e;return Rk(n,t)},Rk=(e,t)=>{const n=_f();for(const r in e){const i=e[r];Yo(i,n,r,t)}return n},Yo=(e,t,n,r)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];vk(a,t,n,r)}},vk=(e,t,n,r)=>{if(typeof e=="string"){Ok(e,t,n);return}if(typeof e=="function"){Pk(e,t,n,r);return}Dk(e,t,n,r)},Ok=(e,t,n)=>{const r=e===""?t:yf(t,e);r.classGroupId=n},Pk=(e,t,n,r)=>{if(Mk(e)){Yo(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(wk(n,e))},Dk=(e,t,n,r)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[o,u]=i[a];Yo(u,yf(t,o),n,r)}},yf=(e,t)=>{let n=e;const r=t.split(Ki),i=r.length;for(let s=0;s<i;s++){const a=r[s];let o=n.nextPart.get(a);o||(o=_f(),n.nextPart.set(a,o)),n=o}return n},Mk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Bk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return i(s,a),a},set(s,a){s in n?n[s]=a:i(s,a)}}},Va="!",Pl=":",Fk=[],Dl=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Hk=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,o=0,u=0,l;const c=i.length;for(let b=0;b<c;b++){const y=i[b];if(a===0&&o===0){if(y===Pl){s.push(i.slice(u,b)),u=b+1;continue}if(y==="/"){l=b;continue}}y==="["?a++:y==="]"?a--:y==="("?o++:y===")"&&o--}const d=s.length===0?i:i.slice(u);let p=d,f=!1;d.endsWith(Va)?(p=d.slice(0,-1),f=!0):d.startsWith(Va)&&(p=d.slice(1),f=!0);const m=l&&l>u?l-u:void 0;return Dl(s,f,p,m)};if(t){const i=t+Pl,s=r;r=a=>a.startsWith(i)?s(a.slice(i.length)):Dl(Fk,!1,a,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},Uk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let s=0;s<n.length;s++){const a=n[s],o=a[0]==="[",u=t.has(a);o||u?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},$k=e=>({cache:Bk(e.cacheSize),parseClassName:Hk(e),sortModifiers:Uk(e),...Sk(e)}),jk=/\s+/,Vk=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],o=e.trim().split(jk);let u="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{isExternal:d,modifiers:p,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:b}=n(c);if(d){u=c+(u.length>0?" "+u:u);continue}let y=!!b,g=r(y?m.substring(0,b):m);if(!g){if(!y){u=c+(u.length>0?" "+u:u);continue}if(g=r(m),!g){u=c+(u.length>0?" "+u:u);continue}y=!1}const I=p.length===0?"":p.length===1?p[0]:s(p).join(":"),C=f?I+Va:I,v=C+g;if(a.indexOf(v)>-1)continue;a.push(v);const P=i(g,y);for(let N=0;N<P.length;++N){const B=P[N];a.push(C+B)}u=c+(u.length>0?" "+u:u)}return u},zk=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=xf(n))&&(i&&(i+=" "),i+=r);return i},xf=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=xf(e[r]))&&(n&&(n+=" "),n+=t);return n},Gk=(e,...t)=>{let n,r,i,s;const a=u=>{const l=t.reduce((c,d)=>d(c),e());return n=$k(l),r=n.cache.get,i=n.cache.set,s=o,o(u)},o=u=>{const l=r(u);if(l)return l;const c=Vk(u,n);return i(u,c),c};return s=a,(...u)=>s(zk(...u))},Wk=[],Le=e=>{const t=n=>n[e]||Wk;return t.isThemeGetter=!0,t},kf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Af=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qk=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Qk=/\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$/,Kk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qt=e=>qk.test(e),re=e=>!!e&&!Number.isNaN(Number(e)),Kt=e=>!!e&&Number.isInteger(Number(e)),ea=e=>e.endsWith("%")&&re(e.slice(0,-1)),Bt=e=>Yk.test(e),Cf=()=>!0,Jk=e=>Qk.test(e)&&!Kk.test(e),Qo=()=>!1,eA=e=>Xk.test(e),tA=e=>Zk.test(e),nA=e=>!Q(e)&&!K(e),rA=e=>hn(e,Sf,Qo),Q=e=>kf.test(e),_n=e=>hn(e,Nf,Jk),Ml=e=>hn(e,dA,re),iA=e=>hn(e,Rf,Cf),sA=e=>hn(e,Lf,Qo),Bl=e=>hn(e,wf,Qo),aA=e=>hn(e,If,tA),bi=e=>hn(e,vf,eA),K=e=>Af.test(e),Cr=e=>Hn(e,Nf),oA=e=>Hn(e,Lf),Fl=e=>Hn(e,wf),uA=e=>Hn(e,Sf),lA=e=>Hn(e,If),Ei=e=>Hn(e,vf,!0),cA=e=>Hn(e,Rf,!0),hn=(e,t,n)=>{const r=kf.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Hn=(e,t,n=!1)=>{const r=Af.exec(e);return r?r[1]?t(r[1]):n:!1},wf=e=>e==="position"||e==="percentage",If=e=>e==="image"||e==="url",Sf=e=>e==="length"||e==="size"||e==="bg-size",Nf=e=>e==="length",dA=e=>e==="number",Lf=e=>e==="family-name",Rf=e=>e==="number"||e==="weight",vf=e=>e==="shadow",hA=()=>{const e=Le("color"),t=Le("font"),n=Le("text"),r=Le("font-weight"),i=Le("tracking"),s=Le("leading"),a=Le("breakpoint"),o=Le("container"),u=Le("spacing"),l=Le("radius"),c=Le("shadow"),d=Le("inset-shadow"),p=Le("text-shadow"),f=Le("drop-shadow"),m=Le("blur"),b=Le("perspective"),y=Le("aspect"),g=Le("ease"),I=Le("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],P=()=>[...v(),K,Q],N=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],M=()=>[K,Q,u],z=()=>[Qt,"full","auto",...M()],L=()=>[Kt,"none","subgrid",K,Q],V=()=>["auto",{span:["full",Kt,K,Q]},Kt,K,Q],G=()=>[Kt,"auto",K,Q],Z=()=>["auto","min","max","fr",K,Q],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...M()],J=()=>[Qt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],me=()=>[Qt,"screen","full","dvw","lvw","svw","min","max","fit",...M()],Ce=()=>[Qt,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],A=()=>[e,K,Q],Te=()=>[...v(),Fl,Bl,{position:[K,Q]}],we=()=>["no-repeat",{repeat:["","x","y","space","round"]}],S=()=>["auto","cover","contain",uA,rA,{size:[K,Q]}],Ie=()=>[ea,Cr,_n],le=()=>["","none","full",l,K,Q],ie=()=>["",re,Cr,_n],ze=()=>["solid","dashed","dotted","double"],Pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[re,ea,Fl,Bl],Ge=()=>["","none",m,K,Q],Xe=()=>["none",re,K,Q],ot=()=>["none",re,K,Q],Ze=()=>[re,K,Q],ut=()=>[Qt,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Bt],breakpoint:[Bt],color:[Cf],container:[Bt],"drop-shadow":[Bt],ease:["in","out","in-out"],font:[nA],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Bt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Bt],shadow:[Bt],spacing:["px",re],text:[Bt],"text-shadow":[Bt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qt,Q,K,y]}],container:["container"],columns:[{columns:[re,Q,K,o]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:P()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[Kt,"auto",K,Q]}],basis:[{basis:[Qt,"full","auto",o,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[re,Qt,"auto","initial","none",Q]}],grow:[{grow:["",re,K,Q]}],shrink:[{shrink:["",re,K,Q]}],order:[{order:[Kt,"first","last","none",K,Q]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Z()}],"auto-rows":[{"auto-rows":Z()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...me()]}],"min-inline-size":[{"min-inline":["auto",...me()]}],"max-inline-size":[{"max-inline":["none",...me()]}],"block-size":[{block:["auto",...Ce()]}],"min-block-size":[{"min-block":["auto",...Ce()]}],"max-block-size":[{"max-block":["none",...Ce()]}],w:[{w:[o,"screen",...J()]}],"min-w":[{"min-w":[o,"screen","none",...J()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",n,Cr,_n]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,cA,iA]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ea,Q]}],"font-family":[{font:[oA,sA,t]}],"font-features":[{"font-features":[Q]}],"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,K,Q]}],"line-clamp":[{"line-clamp":[re,"none",K,Ml]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",K,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ze(),"wavy"]}],"text-decoration-thickness":[{decoration:[re,"from-font","auto",K,_n]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[re,"auto",K,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,Q]}],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",K,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Te()}],"bg-repeat":[{bg:we()}],"bg-size":[{bg:S()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Kt,K,Q],radial:["",K,Q],conic:[Kt,K,Q]},lA,aA]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:Ie()}],"gradient-via-pos":[{via:Ie()}],"gradient-to-pos":[{to:Ie()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ze(),"hidden","none"]}],"divide-style":[{divide:[...ze(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...ze(),"none","hidden"]}],"outline-offset":[{"outline-offset":[re,K,Q]}],"outline-w":[{outline:["",re,Cr,_n]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",c,Ei,bi]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",d,Ei,bi]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[re,_n]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",p,Ei,bi]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[re,K,Q]}],"mix-blend":[{"mix-blend":[...Pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Pe()}],"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":[re]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[K,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":v()}],"mask-image-conic-pos":[{"mask-conic":[re]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Te()}],"mask-repeat":[{mask:we()}],"mask-size":[{mask:S()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,Q]}],filter:[{filter:["","none",K,Q]}],blur:[{blur:Ge()}],brightness:[{brightness:[re,K,Q]}],contrast:[{contrast:[re,K,Q]}],"drop-shadow":[{"drop-shadow":["","none",f,Ei,bi]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",re,K,Q]}],"hue-rotate":[{"hue-rotate":[re,K,Q]}],invert:[{invert:["",re,K,Q]}],saturate:[{saturate:[re,K,Q]}],sepia:[{sepia:["",re,K,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",K,Q]}],"backdrop-blur":[{"backdrop-blur":Ge()}],"backdrop-brightness":[{"backdrop-brightness":[re,K,Q]}],"backdrop-contrast":[{"backdrop-contrast":[re,K,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",re,K,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[re,K,Q]}],"backdrop-invert":[{"backdrop-invert":["",re,K,Q]}],"backdrop-opacity":[{"backdrop-opacity":[re,K,Q]}],"backdrop-saturate":[{"backdrop-saturate":[re,K,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",re,K,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[re,"initial",K,Q]}],ease:[{ease:["linear","initial",g,K,Q]}],delay:[{delay:[re,K,Q]}],animate:[{animate:["none",I,K,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,K,Q]}],"perspective-origin":[{"perspective-origin":P()}],rotate:[{rotate:Xe()}],"rotate-x":[{"rotate-x":Xe()}],"rotate-y":[{"rotate-y":Xe()}],"rotate-z":[{"rotate-z":Xe()}],scale:[{scale:ot()}],"scale-x":[{"scale-x":ot()}],"scale-y":[{"scale-y":ot()}],"scale-z":[{"scale-z":ot()}],"scale-3d":["scale-3d"],skew:[{skew:Ze()}],"skew-x":[{"skew-x":Ze()}],"skew-y":[{"skew-y":Ze()}],transform:[{transform:[K,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:P()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ut()}],"translate-x":[{"translate-x":ut()}],"translate-y":[{"translate-y":ut()}],"translate-z":[{"translate-z":ut()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"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",K,Q]}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",K,Q]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[re,Cr,_n,Ml]}],stroke:[{stroke:["none",...A()]}],"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"]}},Of=Gk(hA),fA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,mA={};function Hl(e,t){return(mA.jsx?pA:fA).test(e)}const gA=/[ \t\n\f\r]/g;function Cs(e){return typeof e=="object"?e.type==="text"?Ul(e.value):!1:Ul(e)}function Ul(e){return e.replace(gA,"")===""}var Gn={},ta,$l;function bA(){if($l)return ta;$l=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
40
- `,l="/",c="*",d="",p="comment",f="declaration";function m(y,g){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];g=g||{};var I=1,C=1;function v(Y){var $=Y.match(t);$&&(I+=$.length);var W=Y.lastIndexOf(u);C=~W?Y.length-W:C+Y.length}function P(){var Y={line:I,column:C};return function($){return $.position=new N(Y),z(),$}}function N(Y){this.start=Y,this.end={line:I,column:C},this.source=g.source}N.prototype.content=y;function B(Y){var $=new Error(g.source+":"+I+":"+C+": "+Y);if($.reason=Y,$.filename=g.source,$.line=I,$.column=C,$.source=y,!g.silent)throw $}function M(Y){var $=Y.exec(y);if($){var W=$[0];return v(W),y=y.slice(W.length),$}}function z(){M(n)}function L(Y){var $;for(Y=Y||[];$=V();)$!==!1&&Y.push($);return Y}function V(){var Y=P();if(!(l!=y.charAt(0)||c!=y.charAt(1))){for(var $=2;d!=y.charAt($)&&(c!=y.charAt($)||l!=y.charAt($+1));)++$;if($+=2,d===y.charAt($-1))return B("End of comment missing");var W=y.slice(2,$-2);return C+=2,v(W),y=y.slice($),C+=2,Y({type:p,comment:W})}}function G(){var Y=P(),$=M(r);if($){if(V(),!M(i))return B("property missing ':'");var W=M(s),J=Y({type:f,property:b($[0].replace(e,d)),value:W?b(W[0].replace(e,d)):d});return M(a),J}}function Z(){var Y=[];L(Y);for(var $;$=G();)$!==!1&&(Y.push($),L(Y));return Y}return z(),Z()}function b(y){return y?y.replace(o,d):d}return ta=m,ta}var jl;function EA(){if(jl)return Gn;jl=1;var e=Gn&&Gn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.default=n;const t=e(bA());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const a=(0,t.default)(r),o=typeof i=="function";return a.forEach(u=>{if(u.type!=="declaration")return;const{property:l,value:c}=u;o?i(l,c,u):c&&(s=s||{},s[l]=c)}),s}return Gn}var wr={},Vl;function _A(){if(Vl)return wr;Vl=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(l){return!l||n.test(l)||e.test(l)},a=function(l,c){return c.toUpperCase()},o=function(l,c){return"".concat(c,"-")},u=function(l,c){return c===void 0&&(c={}),s(l)?l:(l=l.toLowerCase(),c.reactCompat?l=l.replace(i,o):l=l.replace(r,o),l.replace(t,a))};return wr.camelCase=u,wr}var Ir,zl;function TA(){if(zl)return Ir;zl=1;var e=Ir&&Ir.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(EA()),n=_A();function r(i,s){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(o,u){o&&u&&(a[(0,n.camelCase)(o,s)]=u)}),a}return r.default=r,Ir=r,Ir}var yA=TA();const xA=Td(yA);function Vr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Gl(e.position):"start"in e||"end"in e?Gl(e):"line"in e||"column"in e?za(e):""}function za(e){return Wl(e&&e.line)+":"+Wl(e&&e.column)}function Gl(e){return za(e&&e.start)+"-"+za(e&&e.end)}function Wl(e){return e&&typeof e=="number"?e:1}class Ve extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Vr(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ve.prototype.file="";Ve.prototype.name="";Ve.prototype.reason="";Ve.prototype.message="";Ve.prototype.stack="";Ve.prototype.column=void 0;Ve.prototype.line=void 0;Ve.prototype.ancestors=void 0;Ve.prototype.cause=void 0;Ve.prototype.fatal=void 0;Ve.prototype.place=void 0;Ve.prototype.ruleId=void 0;Ve.prototype.source=void 0;const Ko={}.hasOwnProperty,kA=new Map,AA=/[A-Z]/g,CA=new Set(["table","tbody","thead","tfoot","tr"]),wA=new Set(["td","th"]),Pf="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function IA(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=DA(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=PA(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"?vt:lr,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Df(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function Df(e,t,n){if(t.type==="element")return SA(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return NA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return RA(e,t,n);if(t.type==="mdxjsEsm")return LA(e,t);if(t.type==="root")return vA(e,t,n);if(t.type==="text")return OA(e,t)}function SA(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=vt,e.schema=i),e.ancestors.push(t);const s=Bf(e,t.tagName,!1),a=MA(e,t);let o=Zo(e,t);return CA.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Cs(u):!0})),Mf(e,a,s,t),Xo(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function NA(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)}Xr(e,t.position)}function LA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xr(e,t.position)}function RA(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=vt,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:Bf(e,t.name,!0),a=BA(e,t),o=Zo(e,t);return Mf(e,a,s,t),Xo(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function vA(e,t,n){const r={};return Xo(r,Zo(e,t)),e.create(t,e.Fragment,r,n)}function OA(e,t){return t.value}function Mf(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xo(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function PA(e,t,n){return r;function r(i,s,a,o){const l=Array.isArray(a.children)?n:t;return o?l(s,a,o):l(s,a)}}function DA(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),u=Ot(r);return t(i,s,a,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function MA(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Ko.call(t.properties,i)){const s=FA(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&wA.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function BA(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Xr(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else Xr(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Zo(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:kA;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const u=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(u){const l=i.get(u)||0;a=u+"-"+l,i.set(u,l+1)}}const o=Df(e,s,a);o!==void 0&&n.push(o)}return n}function FA(e,t,n){const r=si(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ro(n):vo(n)),r.property==="style"){let i=typeof n=="object"?n:HA(e,String(n));return e.stylePropertyNameCase==="css"&&(i=UA(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?cg[r.property]||r.property:r.attribute,n]}}function HA(e,t){try{return xA(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ve("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=Pf+"#cannot-parse-style-attribute",i}}function Bf(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=Hl(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=Hl(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Ko.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xr(e)}function Xr(e,t){const n=new Ve("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=Pf+"#cannot-handle-mdx-estrees-without-createevaluater",n}function UA(e){const t={};let n;for(n in e)Ko.call(e,n)&&(t[$A(n)]=e[n]);return t}function $A(e){let t=e.replace(AA,jA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jA(e){return"-"+e.toLowerCase()}const na={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"]},VA={tokenize:zA};function zA(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),he(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return X(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const GA={tokenize:WA},ql={tokenize:qA};function WA(e){const t=this,n=[];let r=0,i,s,a;return o;function o(C){if(r<n.length){const v=n[r];return t.containerState=v[1],e.attempt(v[0].continuation,u,l)(C)}return l(C)}function u(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&I();const v=t.events.length;let P=v,N;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){N=t.events[P][1].end;break}g(r);let B=v;for(;B<t.events.length;)t.events[B][1].end={...N},B++;return st(t.events,P+1,0,t.events.slice(v)),t.events.length=B,l(C)}return o(C)}function l(C){if(r===n.length){if(!i)return p(C);if(i.currentConstruct&&i.currentConstruct.concrete)return m(C);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ql,c,d)(C)}function c(C){return i&&I(),g(r),p(C)}function d(C){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(C)}function p(C){return t.containerState={},e.attempt(ql,f,m)(C)}function f(C){return r++,n.push([t.currentConstruct,t.containerState]),p(C)}function m(C){if(C===null){i&&I(),g(0),e.consume(C);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),b(C)}function b(C){if(C===null){y(e.exit("chunkFlow"),!0),g(0),e.consume(C);return}return X(C)?(e.consume(C),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(C),b)}function y(C,v){const P=t.sliceStream(C);if(v&&P.push(null),C.previous=s,s&&(s.next=C),s=C,i.defineSkip(C.start),i.write(P),t.parser.lazy[C.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<a&&(!i.events[N][1].end||i.events[N][1].end.offset>a))return;const B=t.events.length;let M=B,z,L;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(z){L=t.events[M][1].end;break}z=!0}for(g(r),N=B;N<t.events.length;)t.events[N][1].end={...L},N++;st(t.events,M+1,0,t.events.slice(B)),t.events.length=N}}function g(C){let v=n.length;for(;v-- >C;){const P=n[v];t.containerState=P[1],P[0].exit.call(t,e)}n.length=C}function I(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function qA(e,t,n){return he(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const YA={tokenize:QA};function QA(e){const t=this,n=e.attempt(li,r,e.attempt(this.parser.constructs.flowInitial,i,he(e,e.attempt(this.parser.constructs.flow,i,e.attempt(XT,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const KA={resolveAll:Hf()},XA=Ff("string"),ZA=Ff("text");function Ff(e){return{resolveAll:Hf(e==="text"?JA:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(c){return l(c)?s(c):o(c)}function o(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),u}function u(c){return l(c)?(n.exit("data"),s(c)):(n.consume(c),u)}function l(c){if(c===null)return!0;const d=i[c];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Hf(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function JA(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 s=i.length,a=-1,o=0,u;for(;s--;){const l=i[s];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(l===-2)u=!0,o++;else if(l!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const l={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const eC={42:tt,43:tt,45:tt,48:tt,49:tt,50:tt,51:tt,52:tt,53:tt,54:tt,55:tt,56:tt,57:tt,62:ef},tC={91:ny},nC={[-2]:Xs,[-1]:Xs,32:Xs},rC={35:uy,42:Di,45:[wl,Di],60:hy,61:wl,95:Di,96:Al,126:Al},iC={38:nf,92:tf},sC={[-5]:Zs,[-4]:Zs,[-3]:Zs,33:Ly,38:nf,42:ja,60:[vT,_y],91:vy,92:[ay,tf],93:Go,95:ja,96:GT},aC={null:[ja,KA]},oC={null:[42,95]},uC={null:[]},lC=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:oC,contentInitial:tC,disable:uC,document:eC,flow:rC,flowInitial:nC,insideSpan:aC,string:iC,text:sC},Symbol.toStringTag,{value:"Module"}));function cC(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={},s=[];let a=[],o=[];const u={attempt:B(P),check:B(N),consume:I,enter:C,exit:v,interrupt:B(N,{interrupt:!0})},l={code:null,containerState:{},defineSkip:b,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:f,write:d};let c=t.tokenize.call(l,u);return t.resolveAll&&s.push(t),l;function d(V){return a=dt(a,V),y(),a[a.length-1]!==null?[]:(M(t,0),l.events=ks(s,l.events,l),l.events)}function p(V,G){return hC(f(V),G)}function f(V){return dC(a,V)}function m(){const{_bufferIndex:V,_index:G,line:Z,column:Y,offset:$}=r;return{_bufferIndex:V,_index:G,line:Z,column:Y,offset:$}}function b(V){i[V.line]=V.column,L()}function y(){let V;for(;r._index<a.length;){const G=a[r._index];if(typeof G=="string")for(V=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===V&&r._bufferIndex<G.length;)g(G.charCodeAt(r._bufferIndex));else g(G)}}function g(V){c=c(V)}function I(V){X(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,L()):V!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=V}function C(V,G){const Z=G||{};return Z.type=V,Z.start=m(),l.events.push(["enter",Z,l]),o.push(Z),Z}function v(V){const G=o.pop();return G.end=m(),l.events.push(["exit",G,l]),G}function P(V,G){M(V,G.from)}function N(V,G){G.restore()}function B(V,G){return Z;function Z(Y,$,W){let J,me,Ce,A;return Array.isArray(Y)?we(Y):"tokenize"in Y?we([Y]):Te(Y);function Te(ie){return ze;function ze(Pe){const de=Pe!==null&&ie[Pe],Ge=Pe!==null&&ie.null,Xe=[...Array.isArray(de)?de:de?[de]:[],...Array.isArray(Ge)?Ge:Ge?[Ge]:[]];return we(Xe)(Pe)}}function we(ie){return J=ie,me=0,ie.length===0?W:S(ie[me])}function S(ie){return ze;function ze(Pe){return A=z(),Ce=ie,ie.partial||(l.currentConstruct=ie),ie.name&&l.parser.constructs.disable.null.includes(ie.name)?le():ie.tokenize.call(G?Object.assign(Object.create(l),G):l,u,Ie,le)(Pe)}}function Ie(ie){return V(Ce,A),$}function le(ie){return A.restore(),++me<J.length?S(J[me]):W}}}function M(V,G){V.resolveAll&&!s.includes(V)&&s.push(V),V.resolve&&st(l.events,G,l.events.length-G,V.resolve(l.events.slice(G),l)),V.resolveTo&&(l.events=V.resolveTo(l.events,l))}function z(){const V=m(),G=l.previous,Z=l.currentConstruct,Y=l.events.length,$=Array.from(o);return{from:Y,restore:W};function W(){r=V,l.previous=G,l.currentConstruct=Z,l.events.length=Y,o=$,L()}}function L(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function dC(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function hC(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
41
- `;break}case-3:{a=`\r
42
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function fC(e){const r={constructs:Gh([lC,...(e||{}).extensions||[]]),content:i(VA),defined:[],document:i(GA),flow:i(YA),lazy:{},string:i(XA),text:i(ZA)};return r;function i(s){return a;function a(o){return cC(r,s,o)}}}function pC(e){for(;!rf(e););return e}const Yl=/[\0\t\n\r]/g;function mC(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const u=[];let l,c,d,p,f;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),d=0,t="",n&&(s.charCodeAt(0)===65279&&d++,n=void 0);d<s.length;){if(Yl.lastIndex=d,l=Yl.exec(s),p=l&&l.index!==void 0?l.index:s.length,f=s.charCodeAt(p),!l){t=s.slice(d);break}if(f===10&&d===p&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<p&&(u.push(s.slice(d,p)),e+=p-d),f){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const Uf={}.hasOwnProperty;function gC(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),bC(n)(pC(fC(n).document().write(mC()(e,t,!0))))}function bC(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(pe),autolinkProtocol:z,autolinkEmail:z,atxHeading:s(fn),blockQuote:s(Ge),characterEscape:z,characterReference:z,codeFenced:s(Xe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Xe,a),codeText:s(ot,a),codeTextData:z,data:z,codeFlowValue:z,definition:s(Ze),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(ut),hardBreakEscape:s(Yt),hardBreakTrailing:s(Yt),htmlFlow:s(jn,a),htmlFlowData:z,htmlText:s(jn,a),htmlTextData:z,image:s(se),label:a,link:s(pe),listItem:s(Ct),listItemValue:p,listOrdered:s(Je,d),listUnordered:s(Je),paragraph:s(pn),reference:S,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(fn),strong:s(y0),thematicBreak:s(k0)},exit:{atxHeading:u(),atxHeadingSequence:P,autolink:u(),autolinkEmail:de,autolinkProtocol:Pe,blockQuote:u(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ie,characterReference:ze,codeFenced:u(y),codeFencedFence:b,codeFencedFenceInfo:f,codeFencedFenceMeta:m,codeFlowValue:L,codeIndented:u(g),codeText:u($),codeTextData:L,data:L,definition:u(),definitionDestinationString:v,definitionLabelString:I,definitionTitleString:C,emphasis:u(),hardBreakEscape:u(G),hardBreakTrailing:u(G),htmlFlow:u(Z),htmlFlowData:L,htmlText:u(Y),htmlTextData:L,image:u(J),label:Ce,labelText:me,lineEnding:V,link:u(W),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Ie,resourceDestinationString:A,resourceTitleString:Te,resource:we,setextHeading:u(M),setextHeadingLineSequence:B,setextHeadingText:N,strong:u(),thematicBreak:u()}};$f(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(F){let q={type:"root",children:[]};const ee={stack:[q],tokenStack:[],config:t,enter:o,exit:l,buffer:a,resume:c,data:n},ce=[];let be=-1;for(;++be<F.length;)if(F[be][1].type==="listOrdered"||F[be][1].type==="listUnordered")if(F[be][0]==="enter")ce.push(be);else{const bt=ce.pop();be=i(F,bt,be)}for(be=-1;++be<F.length;){const bt=t[F[be][0]];Uf.call(bt,F[be][1].type)&&bt[F[be][1].type].call(Object.assign({sliceSerialize:F[be][2].sliceSerialize},ee),F[be][1])}if(ee.tokenStack.length>0){const bt=ee.tokenStack[ee.tokenStack.length-1];(bt[1]||Ql).call(ee,void 0,bt[0])}for(q.position={start:Xt(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:Xt(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},be=-1;++be<t.transforms.length;)q=t.transforms[be](q)||q;return q}function i(F,q,ee){let ce=q-1,be=-1,bt=!1,mn,Dt,_r,Tr;for(;++ce<=ee;){const rt=F[ce];switch(rt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{rt[0]==="enter"?be++:be--,Tr=void 0;break}case"lineEndingBlank":{rt[0]==="enter"&&(mn&&!Tr&&!be&&!_r&&(_r=ce),Tr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tr=void 0}if(!be&&rt[0]==="enter"&&rt[1].type==="listItemPrefix"||be===-1&&rt[0]==="exit"&&(rt[1].type==="listUnordered"||rt[1].type==="listOrdered")){if(mn){let Vn=ce;for(Dt=void 0;Vn--;){const Mt=F[Vn];if(Mt[1].type==="lineEnding"||Mt[1].type==="lineEndingBlank"){if(Mt[0]==="exit")continue;Dt&&(F[Dt][1].type="lineEndingBlank",bt=!0),Mt[1].type="lineEnding",Dt=Vn}else if(!(Mt[1].type==="linePrefix"||Mt[1].type==="blockQuotePrefix"||Mt[1].type==="blockQuotePrefixWhitespace"||Mt[1].type==="blockQuoteMarker"||Mt[1].type==="listItemIndent"))break}_r&&(!Dt||_r<Dt)&&(mn._spread=!0),mn.end=Object.assign({},Dt?F[Dt][1].start:rt[1].end),F.splice(Dt||ce,0,["exit",mn,rt[2]]),ce++,ee++}if(rt[1].type==="listItemPrefix"){const Vn={type:"listItem",_spread:!1,start:Object.assign({},rt[1].start),end:void 0};mn=Vn,F.splice(ce,0,["enter",Vn,rt[2]]),ce++,ee++,_r=void 0,Tr=!0}}}return F[q][1]._spread=bt,ee}function s(F,q){return ee;function ee(ce){o.call(this,F(ce),ce),q&&q.call(this,ce)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(F,q,ee){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([q,ee||void 0]),F.position={start:Xt(q.start),end:void 0}}function u(F){return q;function q(ee){F&&F.call(this,ee),l.call(this,ee)}}function l(F,q){const ee=this.stack.pop(),ce=this.tokenStack.pop();if(ce)ce[0].type!==F.type&&(q?q.call(this,F,ce[0]):(ce[1]||Ql).call(this,F,ce[0]));else throw new Error("Cannot close `"+F.type+"` ("+Vr({start:F.start,end:F.end})+"): it’s not open");ee.position.end=Xt(F.end)}function c(){return $o(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(F){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function f(){const F=this.resume(),q=this.stack[this.stack.length-1];q.lang=F}function m(){const F=this.resume(),q=this.stack[this.stack.length-1];q.meta=F}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F.replace(/(\r?\n|\r)$/g,"")}function I(F){const q=this.resume(),ee=this.stack[this.stack.length-1];ee.label=q,ee.identifier=yt(this.sliceSerialize(F)).toLowerCase()}function C(){const F=this.resume(),q=this.stack[this.stack.length-1];q.title=F}function v(){const F=this.resume(),q=this.stack[this.stack.length-1];q.url=F}function P(F){const q=this.stack[this.stack.length-1];if(!q.depth){const ee=this.sliceSerialize(F).length;q.depth=ee}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function B(F){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function z(F){const ee=this.stack[this.stack.length-1].children;let ce=ee[ee.length-1];(!ce||ce.type!=="text")&&(ce=x0(),ce.position={start:Xt(F.start),end:void 0},ee.push(ce)),this.stack.push(ce)}function L(F){const q=this.stack.pop();q.value+=this.sliceSerialize(F),q.position.end=Xt(F.end)}function V(F){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ee=q.children[q.children.length-1];ee.position.end=Xt(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(z.call(this,F),L.call(this,F))}function G(){this.data.atHardBreak=!0}function Z(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F}function Y(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F}function $(){const F=this.resume(),q=this.stack[this.stack.length-1];q.value=F}function W(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=q,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function J(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=q,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function me(F){const q=this.sliceSerialize(F),ee=this.stack[this.stack.length-2];ee.label=nT(q),ee.identifier=yt(q).toLowerCase()}function Ce(){const F=this.stack[this.stack.length-1],q=this.resume(),ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,ee.type==="link"){const ce=F.children;ee.children=ce}else ee.alt=q}function A(){const F=this.resume(),q=this.stack[this.stack.length-1];q.url=F}function Te(){const F=this.resume(),q=this.stack[this.stack.length-1];q.title=F}function we(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function Ie(F){const q=this.resume(),ee=this.stack[this.stack.length-1];ee.label=q,ee.identifier=yt(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function le(F){this.data.characterReferenceType=F.type}function ie(F){const q=this.sliceSerialize(F),ee=this.data.characterReferenceType;let ce;ee?(ce=zh(q,ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ce=Vo(q);const be=this.stack[this.stack.length-1];be.value+=ce}function ze(F){const q=this.stack.pop();q.position.end=Xt(F.end)}function Pe(F){L.call(this,F);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(F)}function de(F){L.call(this,F);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(F)}function Ge(){return{type:"blockquote",children:[]}}function Xe(){return{type:"code",lang:null,meta:null,value:""}}function ot(){return{type:"inlineCode",value:""}}function Ze(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ut(){return{type:"emphasis",children:[]}}function fn(){return{type:"heading",depth:0,children:[]}}function Yt(){return{type:"break"}}function jn(){return{type:"html",value:""}}function se(){return{type:"image",title:null,url:"",alt:null}}function pe(){return{type:"link",title:null,url:"",children:[]}}function Je(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function Ct(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function pn(){return{type:"paragraph",children:[]}}function y0(){return{type:"strong",children:[]}}function x0(){return{type:"text",value:""}}function k0(){return{type:"thematicBreak"}}}function Xt(e){return{line:e.line,column:e.column,offset:e.offset}}function $f(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?$f(e,r):EC(e,r)}}function EC(e,t){let n;for(n in t)if(Uf.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 Ql(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Vr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Vr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Vr({start:t.start,end:t.end})+") is still open")}function _C(e){const t=this;t.parser=n;function n(r){return gC(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function TC(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 yC(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
43
- `}]}function xC(e,t){const n=t.value?t.value+`
44
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function kC(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AC(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CC(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=fr(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function wC(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 IC(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function jf(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),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function SC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return jf(e,t);const i={src:fr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function NC(e,t){const n={src:fr(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 LC(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 RC(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return jf(e,t);const i={href:fr(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function vC(e,t){const n={href:fr(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 OC(e,t,n){const r=e.all(t),i=n?PC(n):Vf(t),s={},a=[];if(typeof t.checked=="boolean"){const c=r[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const c=r[o];(i||o!==0||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
45
- `}),c.type==="element"&&c.tagName==="p"&&!i?a.push(...c.children):a.push(c)}const u=r[r.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
46
- `});const l={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,l),e.applyData(t,l)}function PC(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=Vf(n[r])}return t}function Vf(e){const t=e.spread;return t??e.children.length>1}function DC(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 a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function MC(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BC(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function FC(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HC(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Ot(t.children[1]),u=ys(t.children[t.children.length-1]);o&&u&&(a.position={start:o,end:u}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function UC(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let u=-1;const l=[];for(;++u<o;){const d=t.children[u],p={},f=a?a[u]:void 0;f&&(p.align=f);let m={type:"element",tagName:s,properties:p,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),l.push(m)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)}function $C(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Kl=9,Xl=32;function jC(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Zl(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Zl(t.slice(i),i>0,!1)),s.join("")}function Zl(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Kl||s===Xl;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Kl||s===Xl;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function VC(e,t){const n={type:"text",value:jC(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function zC(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const GC={blockquote:TC,break:yC,code:xC,delete:kC,emphasis:AC,footnoteReference:CC,heading:wC,html:IC,imageReference:SC,image:NC,inlineCode:LC,linkReference:RC,link:vC,listItem:OC,list:DC,paragraph:MC,root:BC,strong:FC,table:HC,tableCell:$C,tableRow:UC,text:VC,thematicBreak:zC,toml:_i,yaml:_i,definition:_i,footnoteDefinition:_i};function _i(){}function WC(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 qC(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function YC(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||WC,r=e.options.footnoteBackLabel||qC,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const c=e.all(l),d=String(l.identifier).toUpperCase(),p=fr(d.toLowerCase());let f=0;const m=[],b=e.footnoteCounts.get(d);for(;b!==void 0&&++f<=b;){m.length>0&&m.push({type:"text",value:" "});let I=typeof n=="string"?n:n(u,f);typeof I=="string"&&(I={type:"text",value:I}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(u,f),className:["data-footnote-backref"]},children:Array.isArray(I)?I:[I]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const I=y.children[y.children.length-1];I&&I.type==="text"?I.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...m)}else c.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(c,!0)};e.patch(l,g),o.push(g)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Rn(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
47
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
48
- `}]}}const Ga={}.hasOwnProperty,QC={};function KC(e,t){const n=t||QC,r=new Map,i=new Map,s=new Map,a={...GC,...n.handlers},o={all:l,applyData:ZC,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:u,options:n,patch:XC,wrap:e2};return Rt(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?r:i,p=String(c.identifier).toUpperCase();d.has(p)||d.set(p,c)}}),o;function u(c,d){const p=c.type,f=o.handlers[p];if(Ga.call(o.handlers,p)&&f)return f(o,c,d);if(o.options.passThrough&&o.options.passThrough.includes(p)){if("children"in c){const{children:b,...y}=c,g=Rn(y);return g.children=o.all(c),g}return Rn(c)}return(o.options.unknownHandler||JC)(o,c,d)}function l(c){const d=[];if("children"in c){const p=c.children;let f=-1;for(;++f<p.length;){const m=o.one(p[f],c);if(m){if(f&&p[f-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Jl(m.value)),!Array.isArray(m)&&m.type==="element")){const b=m.children[0];b&&b.type==="text"&&(b.value=Jl(b.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function XC(e,t){e.position&&(t.position=_h(e))}function ZC(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,Rn(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function JC(e,t){const n=t.data||{},r="value"in t&&!(Ga.call(n,"hProperties")||Ga.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 e2(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
49
- `});++r<e.length;)r&&n.push({type:"text",value:`
50
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
51
- `}),n}function Jl(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ec(e,t){const n=KC(e,t),r=n.one(e,void 0),i=YC(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
52
- `},i),s}function t2(e,t){return e&&"run"in e?async function(n,r){const i=ec(n,{file:r,...t});await e.run(i,r)}:function(n,r){return ec(n,{file:r,...e||t})}}function tc(e){if(e)throw e}var ra,nc;function n2(){if(nc)return ra;nc=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},s=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var c=e.call(l,"constructor"),d=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!c&&!d)return!1;var p;for(p in l);return typeof p>"u"||e.call(l,p)},a=function(l,c){n&&c.name==="__proto__"?n(l,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):l[c.name]=c.newValue},o=function(l,c){if(c==="__proto__")if(e.call(l,c)){if(r)return r(l,c).value}else return;return l[c]};return ra=function u(){var l,c,d,p,f,m,b=arguments[0],y=1,g=arguments.length,I=!1;for(typeof b=="boolean"&&(I=b,b=arguments[1]||{},y=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});y<g;++y)if(l=arguments[y],l!=null)for(c in l)d=o(b,c),p=o(l,c),b!==p&&(I&&p&&(s(p)||(f=i(p)))?(f?(f=!1,m=d&&i(d)?d:[]):m=d&&s(d)?d:{},a(b,{name:c,newValue:u(I,m,p)})):typeof p<"u"&&a(b,{name:c,newValue:p}));return b},ra}var r2=n2();const ia=Td(r2);function Wa(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 i2(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(u,...l){const c=e[++s];let d=-1;if(u){a(u);return}for(;++d<i.length;)(l[d]===null||l[d]===void 0)&&(l[d]=i[d]);i=l,c?s2(c,o)(...l):a(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function s2(e,t){let n;return r;function r(...a){const o=e.length>a.length;let u;o&&a.push(i);try{u=e.apply(this,a)}catch(l){const c=l;if(o&&n)throw c;return i(c)}o||(u&&u.then&&typeof u.then=="function"?u.then(s,i):u instanceof Error?i(u):s(u))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const Nt={basename:a2,dirname:o2,extname:u2,join:l2,sep:"/"};function a2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ci(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function o2(e){if(ci(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 u2(e){ci(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function l2(...e){let t=-1,n;for(;++t<e.length;)ci(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":c2(n)}function c2(e){ci(e);const t=e.codePointAt(0)===47;let n=d2(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function d2(e,t){let n="",r=0,i=-1,s=0,a=-1,o,u;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function ci(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const h2={cwd:f2};function f2(){return"/"}function qa(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function p2(e){if(typeof e=="string")e=new URL(e);else if(!qa(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 m2(e)}function m2(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 sa=["history","path","basename","stem","extname","dirname"];class g2{constructor(t){let n;t?qa(t)?n={path:t}:typeof t=="string"||b2(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":h2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<sa.length;){const s=sa[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)sa.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Nt.basename(this.path):void 0}set basename(t){oa(t,"basename"),aa(t,"basename"),this.path=Nt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Nt.dirname(this.path):void 0}set dirname(t){rc(this.basename,"dirname"),this.path=Nt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Nt.extname(this.path):void 0}set extname(t){if(aa(t,"extname"),rc(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=Nt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){qa(t)&&(t=p2(t)),oa(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Nt.basename(this.path,this.extname):void 0}set stem(t){oa(t,"stem"),aa(t,"stem"),this.path=Nt.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 Ve(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 aa(e,t){if(e&&e.includes(Nt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Nt.sep+"`")}function oa(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function rc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function b2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const E2=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),_2={}.hasOwnProperty;class Jo extends E2{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=i2()}copy(){const t=new Jo;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ia(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ca("data",this.frozen),this.namespace[t]=n,this):_2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ca("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=Ti(t),r=this.parser||this.Parser;return ua("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ua("process",this.parser||this.Parser),la("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=Ti(t),u=r.parse(o);r.run(u,o,function(c,d,p){if(c||!d||!p)return l(c);const f=d,m=r.stringify(f,p);x2(m)?p.value=m:p.result=m,l(c,p)});function l(c,d){c||!d?a(c):s?s(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),ua("processSync",this.parser||this.Parser),la("processSync",this.compiler||this.Compiler),this.process(t,i),sc("processSync","process",n),r;function i(s,a){n=!0,tc(s),r=a}}run(t,n,r){ic(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const u=Ti(n);i.run(t,u,l);function l(c,d,p){const f=d||t;c?o(c):a?a(f):r(void 0,f,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),sc("runSync","run",r),i;function s(a,o){tc(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=Ti(n),i=this.compiler||this.Compiler;return la("stringify",i),ic(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(ca("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...d]=l;u(c,d)}else a(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function a(l){if(!("plugins"in l)&&!("settings"in l))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");o(l.plugins),l.settings&&(i.settings=ia(!0,i.settings,l.settings))}function o(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const d=l[c];s(d)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===l){p=d;break}if(p===-1)r.push([l,...c]);else if(c.length>0){let[f,...m]=c;const b=r[p][1];Wa(b)&&Wa(f)&&(f=ia(!0,b,f)),r[p]=[l,f,...m]}}}}const T2=new Jo().freeze();function ua(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function la(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ca(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 ic(e){if(!Wa(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function sc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ti(e){return y2(e)?e:new g2(e)}function y2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function x2(e){return typeof e=="string"||k2(e)}function k2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function eu(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Un=eu();function zf(e){Un=e}var xn={exec:()=>null};function fe(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(Qe.caret,"$1"),n=n.replace(i,a),r},getRegex:()=>new RegExp(n,t)};return r}var A2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Qe={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)}}>`)},C2=/^(?:[ \t]*(?:\n|$))+/,w2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,I2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,di=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,S2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tu=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Gf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Wf=fe(Gf).replace(/bull/g,tu).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(),N2=fe(Gf).replace(/bull/g,tu).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(),nu=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,L2=/^[^\n]+/,ru=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,R2=fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ru).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),v2=fe(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tu).getRegex(),ws="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",iu=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,O2=fe("^ {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",iu).replace("tag",ws).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),qf=fe(nu).replace("hr",di).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",ws).getRegex(),P2=fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",qf).getRegex(),su={blockquote:P2,code:w2,def:R2,fences:I2,heading:S2,hr:di,html:O2,lheading:Wf,list:v2,newline:C2,paragraph:qf,table:xn,text:L2},ac=fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",di).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",ws).getRegex(),D2={...su,lheading:N2,table:ac,paragraph:fe(nu).replace("hr",di).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ac).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",ws).getRegex()},M2={...su,html:fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",iu).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:xn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fe(nu).replace("hr",di).replace("heading",` *#{1,6} *[^
53
- ]`).replace("lheading",Wf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},B2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,F2=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Yf=/^( {2,}|\\)\n(?!\s*$)/,H2=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,pr=/[\p{P}\p{S}]/u,Is=/[\s\p{P}\p{S}]/u,au=/[^\s\p{P}\p{S}]/u,U2=fe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Is).getRegex(),Qf=/(?!~)[\p{P}\p{S}]/u,$2=/(?!~)[\s\p{P}\p{S}]/u,j2=/(?:[^\s\p{P}\p{S}]|~)/u,V2=fe(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",A2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Kf=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,z2=fe(Kf,"u").replace(/punct/g,pr).getRegex(),G2=fe(Kf,"u").replace(/punct/g,Qf).getRegex(),Xf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",W2=fe(Xf,"gu").replace(/notPunctSpace/g,au).replace(/punctSpace/g,Is).replace(/punct/g,pr).getRegex(),q2=fe(Xf,"gu").replace(/notPunctSpace/g,j2).replace(/punctSpace/g,$2).replace(/punct/g,Qf).getRegex(),Y2=fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,au).replace(/punctSpace/g,Is).replace(/punct/g,pr).getRegex(),Q2=fe(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,pr).getRegex(),K2="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",X2=fe(K2,"gu").replace(/notPunctSpace/g,au).replace(/punctSpace/g,Is).replace(/punct/g,pr).getRegex(),Z2=fe(/\\(punct)/,"gu").replace(/punct/g,pr).getRegex(),J2=fe(/^<(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(),ew=fe(iu).replace("(?:-->|$)","-->").getRegex(),tw=fe("^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",ew).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Xi=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,nw=fe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Xi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Zf=fe(/^!?\[(label)\]\[(ref)\]/).replace("label",Xi).replace("ref",ru).getRegex(),Jf=fe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ru).getRegex(),rw=fe("reflink|nolink(?!\\()","g").replace("reflink",Zf).replace("nolink",Jf).getRegex(),oc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ou={_backpedal:xn,anyPunctuation:Z2,autolink:J2,blockSkip:V2,br:Yf,code:F2,del:xn,delLDelim:xn,delRDelim:xn,emStrongLDelim:z2,emStrongRDelimAst:W2,emStrongRDelimUnd:Y2,escape:B2,link:nw,nolink:Jf,punctuation:U2,reflink:Zf,reflinkSearch:rw,tag:tw,text:H2,url:xn},iw={...ou,link:fe(/^!?\[(label)\]\((.*?)\)/).replace("label",Xi).getRegex(),reflink:fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Xi).getRegex()},Ya={...ou,emStrongRDelimAst:q2,emStrongLDelim:G2,delLDelim:Q2,delRDelim:X2,url:fe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",oc).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:fe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",oc).getRegex()},sw={...Ya,br:fe(Yf).replace("{2,}","*").getRegex(),text:fe(Ya.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},yi={normal:su,gfm:D2,pedantic:M2},Sr={normal:ou,gfm:Ya,breaks:sw,pedantic:iw},aw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},uc=e=>aw[e];function wt(e,t){if(t){if(Qe.escapeTest.test(e))return e.replace(Qe.escapeReplace,uc)}else if(Qe.escapeTestNoEncode.test(e))return e.replace(Qe.escapeReplaceNoEncode,uc);return e}function lc(e){try{e=encodeURI(e).replace(Qe.percentDecode,"%")}catch{return null}return e}function cc(e,t){var s;let n=e.replace(Qe.findPipe,(a,o,u)=>{let l=!1,c=o;for(;--c>=0&&u[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(Qe.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!((s=r.at(-1))!=null&&s.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(Qe.slashPipe,"|");return r}function Nr(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 ow(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 uw(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let s=4-n%4;r+=" ".repeat(s),n+=s}else r+=i,n++;return r}function dc(e,t,n,r,i){let s=t.href,a=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:a,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,u}function lw(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
54
- `).map(s=>{let a=s.match(n.other.beginningSpace);if(a===null)return s;let[o]=a;return o.length>=i.length?s.slice(i.length):s}).join(`
55
- `)}var Zi=class{constructor(t){O(this,"options");O(this,"rules");O(this,"lexer");this.options=t||Un}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:Nr(r,`
56
- `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],i=lw(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=Nr(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:Nr(n[0],`
57
- `)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=Nr(n[0],`
58
- `).split(`
59
- `),i="",s="",a=[];for(;r.length>0;){let o=!1,u=[],l;for(l=0;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))u.push(r[l]),o=!0;else if(!o)u.push(r[l]);else break;r=r.slice(l);let c=u.join(`
60
- `),d=c.replace(this.rules.other.blockquoteSetextReplace,`
61
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
62
- ${c}`:c,s=s?`${s}
63
- ${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=p,r.length===0)break;let f=a.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){let m=f,b=m.raw+`
64
- `+r.join(`
65
- `),y=this.blockquote(b);a[a.length-1]=y,i=i.substring(0,i.length-m.raw.length)+y.raw,s=s.substring(0,s.length-m.text.length)+y.text;break}else if((f==null?void 0:f.type)==="list"){let m=f,b=m.raw+`
66
- `+r.join(`
67
- `),y=this.list(b);a[a.length-1]=y,i=i.substring(0,i.length-f.raw.length)+y.raw,s=s.substring(0,s.length-m.raw.length)+y.raw,r=b.substring(a.at(-1).raw.length).split(`
68
- `);continue}}return{type:"blockquote",raw:i,tokens:a,text:s}}}list(t){var r,i;let n=this.rules.block.list.exec(t);if(n){let s=n[1].trim(),a=s.length>1,o={type:"list",raw:"",ordered:a,start:a?+s.slice(0,-1):"",loose:!1,items:[]};s=a?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=a?s:"[*+-]");let u=this.rules.other.listItemRegex(s),l=!1;for(;t;){let d=!1,p="",f="";if(!(n=u.exec(t))||this.rules.block.hr.test(t))break;p=n[0],t=t.substring(p.length);let m=uw(n[2].split(`
69
- `,1)[0],n[1].length),b=t.split(`
70
- `,1)[0],y=!m.trim(),g=0;if(this.options.pedantic?(g=2,f=m.trimStart()):y?g=n[1].length+1:(g=m.search(this.rules.other.nonSpaceChar),g=g>4?1:g,f=m.slice(g),g+=n[1].length),y&&this.rules.other.blankLine.test(b)&&(p+=b+`
71
- `,t=t.substring(b.length+1),d=!0),!d){let I=this.rules.other.nextBulletRegex(g),C=this.rules.other.hrRegex(g),v=this.rules.other.fencesBeginRegex(g),P=this.rules.other.headingBeginRegex(g),N=this.rules.other.htmlBeginRegex(g),B=this.rules.other.blockquoteBeginRegex(g);for(;t;){let M=t.split(`
72
- `,1)[0],z;if(b=M,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),z=b):z=b.replace(this.rules.other.tabCharGlobal," "),v.test(b)||P.test(b)||N.test(b)||B.test(b)||I.test(b)||C.test(b))break;if(z.search(this.rules.other.nonSpaceChar)>=g||!b.trim())f+=`
73
- `+z.slice(g);else{if(y||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(m)||P.test(m)||C.test(m))break;f+=`
74
- `+b}y=!b.trim(),p+=M+`
75
- `,t=t.substring(M.length+1),m=z.slice(g)}}o.loose||(l?o.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(l=!0)),o.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]}),o.raw+=p}let c=o.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let d of o.items){if(this.lexer.state.top=!1,d.tokens=this.lexer.blockTokens(d.text,[]),d.task){if(d.text=d.text.replace(this.rules.other.listReplaceTask,""),((r=d.tokens[0])==null?void 0:r.type)==="text"||((i=d.tokens[0])==null?void 0:i.type)==="paragraph"){d.tokens[0].raw=d.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),d.tokens[0].text=d.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(d.raw);if(p){let f={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};d.checked=f.checked,o.loose?d.tokens[0]&&["paragraph","text"].includes(d.tokens[0].type)&&"tokens"in d.tokens[0]&&d.tokens[0].tokens?(d.tokens[0].raw=f.raw+d.tokens[0].raw,d.tokens[0].text=f.raw+d.tokens[0].text,d.tokens[0].tokens.unshift(f)):d.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):d.tokens.unshift(f)}}if(!o.loose){let p=d.tokens.filter(m=>m.type==="space"),f=p.length>0&&p.some(m=>this.rules.other.anyLine.test(m.raw));o.loose=f}}if(o.loose)for(let d of o.items){d.loose=!0;for(let p of d.tokens)p.type==="text"&&(p.type="paragraph")}return o}}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"):"",s=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:s}}}table(t){var o;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=cc(n[1]),i=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(o=n[3])!=null&&o.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
76
- `):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let u of i)this.rules.other.tableAlignRight.test(u)?a.align.push("right"):this.rules.other.tableAlignCenter.test(u)?a.align.push("center"):this.rules.other.tableAlignLeft.test(u)?a.align.push("left"):a.align.push(null);for(let u=0;u<r.length;u++)a.header.push({text:r[u],tokens:this.lexer.inline(r[u]),header:!0,align:a.align[u]});for(let u of s)a.rows.push(cc(u,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}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)===`
77
- `?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 a=Nr(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=ow(n[2],"()");if(a===-2)return;if(a>-1){let o=(n[0].indexOf("!")===0?5:4)+n[1].length+a;n[2]=n[2].substring(0,a),n[0]=n[0].substring(0,o).trim(),n[3]=""}}let i=n[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],s=a[3])}else s=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)),dc(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.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," "),s=n[i.toLowerCase()];if(!s){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return dc(r,s,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 s=[...i[0]].length-1,a,o,u=s,l=0,c=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,n=n.slice(-1*t.length+s);(i=c.exec(n))!==null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(o=[...a].length,i[3]||i[4]){u+=o;continue}else if((i[5]||i[6])&&s%3&&!((s+o)%3)){l+=o;continue}if(u-=o,u>0)continue;o=Math.min(o,o+u+l);let d=[...i[0]][0].length,p=t.slice(0,s+i.index+d+o);if(Math.min(s,o)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}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),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&s&&(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 s=[...i[0]].length-1,a,o,u=s,l=this.rules.inline.delRDelim;for(l.lastIndex=0,n=n.slice(-1*t.length+s);(i=l.exec(n))!==null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a||(o=[...a].length,o!==s))continue;if(i[3]||i[4]){u+=o;continue}if(u-=o,u>0)continue;o=Math.min(o,o+u);let c=[...i[0]][0].length,d=t.slice(0,s+i.index+c+o),p=d.slice(s,-s);return{type:"del",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}}}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,s;if(n[2]==="@")i=n[0],s="mailto:"+i;else{let a;do a=n[0],n[0]=((r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])??"";while(a!==n[0]);i=n[0],n[1]==="www."?s="http://"+n[0]:s=n[0]}return{type:"link",raw:n[0],text:i,href:s,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}}}},ht=class Qa{constructor(t){O(this,"tokens");O(this,"options");O(this,"state");O(this,"inlineQueue");O(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Un,this.options.tokenizer=this.options.tokenizer||new Zi,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:Qe,block:yi.normal,inline:Sr.normal};this.options.pedantic?(n.block=yi.pedantic,n.inline=Sr.pedantic):this.options.gfm&&(n.block=yi.gfm,this.options.breaks?n.inline=Sr.breaks:n.inline=Sr.gfm),this.tokenizer.rules=n}static get rules(){return{block:yi,inline:Sr}}static lex(t,n){return new Qa(n).lex(t)}static lexInline(t,n){return new Qa(n).inlineTokens(t)}lex(t){t=t.replace(Qe.carriageReturn,`
78
- `),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,s,a;for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Qe.tabCharGlobal," ").replace(Qe.spaceLine,""));t;){let o;if((s=(i=this.options.extensions)==null?void 0:i.block)!=null&&s.some(l=>(o=l.call({lexer:this},t,n))?(t=t.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let l=n.at(-1);o.raw.length===1&&l!==void 0?l.raw+=`
79
- `:n.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
80
- `)?"":`
81
- `)+o.raw,l.text+=`
82
- `+o.text,this.inlineQueue.at(-1).src=l.text):n.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
83
- `)?"":`
84
- `)+o.raw,l.text+=`
85
- `+o.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},n.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),n.push(o);continue}let u=t;if((a=this.options.extensions)!=null&&a.startBlock){let l=1/0,c=t.slice(1),d;this.options.extensions.startBlock.forEach(p=>{d=p.call({lexer:this},c),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(u=t.substring(0,l+1))}if(this.state.top&&(o=this.tokenizer.paragraph(u))){let l=n.at(-1);r&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=(l.raw.endsWith(`
86
- `)?"":`
87
- `)+o.raw,l.text+=`
88
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o),r=u.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let l=n.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=(l.raw.endsWith(`
89
- `)?"":`
90
- `)+o.raw,l.text+=`
91
- `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(o);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var u,l,c,d,p;this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)f.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 s;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)s=i[2]?i[2].length:0,r=r.slice(0,i.index+s)+"["+"a".repeat(i[0].length-s-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=((l=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:l.call({lexer:this},r))??r;let a=!1,o="";for(;t;){a||(o=""),a=!1;let f;if((d=(c=this.options.extensions)==null?void 0:c.inline)!=null&&d.some(b=>(f=b.call({lexer:this},t,n))?(t=t.substring(f.raw.length),n.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let b=n.at(-1);f.type==="text"&&(b==null?void 0:b.type)==="text"?(b.raw+=f.raw,b.text+=f.text):n.push(f);continue}if(f=this.tokenizer.emStrong(t,r,o)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.del(t,r,o)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),n.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),n.push(f);continue}let m=t;if((p=this.options.extensions)!=null&&p.startInline){let b=1/0,y=t.slice(1),g;this.options.extensions.startInline.forEach(I=>{g=I.call({lexer:this},y),typeof g=="number"&&g>=0&&(b=Math.min(b,g))}),b<1/0&&b>=0&&(m=t.substring(0,b+1))}if(f=this.tokenizer.inlineText(m)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(o=f.raw.slice(-1)),a=!0;let b=n.at(-1);(b==null?void 0:b.type)==="text"?(b.raw+=f.raw,b.text+=f.text):n.push(f);continue}if(t){let b="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(b);break}else throw new Error(b)}}return n}},Ji=class{constructor(t){O(this,"options");O(this,"parser");this.options=t||Un}space(t){return""}code({text:t,lang:n,escaped:r}){var a;let i=(a=(n||"").match(Qe.notSpaceStart))==null?void 0:a[0],s=t.replace(Qe.endingNewline,"")+`
92
- `;return i?'<pre><code class="language-'+wt(i)+'">'+(r?s:wt(s,!0))+`</code></pre>
93
- `:"<pre><code>"+(r?s:wt(s,!0))+`</code></pre>
94
- `}blockquote({tokens:t}){return`<blockquote>
95
- ${this.parser.parse(t)}</blockquote>
96
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
97
- `}hr(t){return`<hr>
98
- `}list(t){let n=t.ordered,r=t.start,i="";for(let o=0;o<t.items.length;o++){let u=t.items[o];i+=this.listitem(u)}let s=n?"ol":"ul",a=n&&r!==1?' start="'+r+'"':"";return"<"+s+a+`>
99
- `+i+"</"+s+`>
100
- `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
101
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
102
- `}table(t){let n="",r="";for(let s=0;s<t.header.length;s++)r+=this.tablecell(t.header[s]);n+=this.tablerow({text:r});let i="";for(let s=0;s<t.rows.length;s++){let a=t.rows[s];r="";for(let o=0;o<a.length;o++)r+=this.tablecell(a[o]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
103
- <thead>
104
- `+n+`</thead>
105
- `+i+`</table>
106
- `}tablerow({text:t}){return`<tr>
107
- ${t}</tr>
108
- `}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
109
- `}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>${wt(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),s=lc(t);if(s===null)return i;t=s;let a='<a href="'+t+'"';return n&&(a+=' title="'+wt(n)+'"'),a+=">"+i+"</a>",a}image({href:t,title:n,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let s=lc(t);if(s===null)return wt(r);t=s;let a=`<img src="${t}" alt="${wt(r)}"`;return n&&(a+=` title="${wt(n)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:wt(t.text)}},uu=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}},_t=class Ka{constructor(t){O(this,"options");O(this,"renderer");O(this,"textRenderer");this.options=t||Un,this.options.renderer=this.options.renderer||new Ji,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new uu}static parse(t,n){return new Ka(n).parse(t)}static parseInline(t,n){return new Ka(n).parseInline(t)}parse(t){var r,i;this.renderer.parser=this;let n="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[a.type]){let u=a,l=this.options.extensions.renderers[u.type].call({parser:this},u);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){n+=l||"";continue}}let o=a;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let u='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,n=this.renderer){var i,s;this.renderer.parser=this;let r="";for(let a=0;a<t.length;a++){let o=t[a];if((s=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&s[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=l||"";continue}}let u=o;switch(u.type){case"escape":{r+=n.text(u);break}case"html":{r+=n.html(u);break}case"link":{r+=n.link(u);break}case"image":{r+=n.image(u);break}case"checkbox":{r+=n.checkbox(u);break}case"strong":{r+=n.strong(u);break}case"em":{r+=n.em(u);break}case"codespan":{r+=n.codespan(u);break}case"br":{r+=n.br(u);break}case"del":{r+=n.del(u);break}case"text":{r+=n.text(u);break}default:{let l='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},vi,Or=(vi=class{constructor(t){O(this,"options");O(this,"block");this.options=t||Un}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?ht.lex:ht.lexInline}provideParser(t=this.block){return t?_t.parse:_t.parseInline}},O(vi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),O(vi,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),vi),cw=class{constructor(...t){O(this,"defaults",eu());O(this,"options",this.setOptions);O(this,"parse",this.parseMarkdown(!0));O(this,"parseInline",this.parseMarkdown(!1));O(this,"Parser",_t);O(this,"Renderer",Ji);O(this,"TextRenderer",uu);O(this,"Lexer",ht);O(this,"Tokenizer",Zi);O(this,"Hooks",Or);this.use(...t)}walkTokens(t,n){var i,s;let r=[];for(let a of t)switch(r=r.concat(n.call(this,a)),a.type){case"table":{let o=a;for(let u of o.header)r=r.concat(this.walkTokens(u.tokens,n));for(let u of o.rows)for(let l of u)r=r.concat(this.walkTokens(l.tokens,n));break}case"list":{let o=a;r=r.concat(this.walkTokens(o.items,n));break}default:{let o=a;(s=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&s[o.type]?this.defaults.extensions.childTokens[o.type].forEach(u=>{let l=o[u].flat(1/0);r=r.concat(this.walkTokens(l,n))}):o.tokens&&(r=r.concat(this.walkTokens(o.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(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let a=n.renderers[s.name];a?n.renderers[s.name]=function(...o){let u=s.renderer.apply(this,o);return u===!1&&(u=a.apply(this,o)),u}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[s.level];a?a.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),i.extensions=n),r.renderer){let s=this.defaults.renderer||new Ji(this.defaults);for(let a in r.renderer){if(!(a in s))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,u=r.renderer[o],l=s[o];s[o]=(...c)=>{let d=u.apply(s,c);return d===!1&&(d=l.apply(s,c)),d||""}}i.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new Zi(this.defaults);for(let a in r.tokenizer){if(!(a in s))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,u=r.tokenizer[o],l=s[o];s[o]=(...c)=>{let d=u.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}i.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new Or;for(let a in r.hooks){if(!(a in s))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,u=r.hooks[o],l=s[o];Or.passThroughHooks.has(a)?s[o]=c=>{if(this.defaults.async&&Or.passThroughHooksRespectAsync.has(a))return(async()=>{let p=await u.call(s,c);return l.call(s,p)})();let d=u.call(s,c);return l.call(s,d)}:s[o]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await u.apply(s,c);return p===!1&&(p=await l.apply(s,c)),p})();let d=u.apply(s,c);return d===!1&&(d=l.apply(s,c)),d}}i.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(o){let u=[];return u.push(a.call(this,o)),s&&(u=u.concat(s.call(this,o))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return ht.lex(t,n??this.defaults)}parser(t,n){return _t.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},s={...this.defaults,...i},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return a(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 a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let o=s.hooks?await s.hooks.preprocess(n):n,u=await(s.hooks?await s.hooks.provideLexer(t):t?ht.lex:ht.lexInline)(o,s),l=s.hooks?await s.hooks.processAllTokens(u):u;s.walkTokens&&await Promise.all(this.walkTokens(l,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser(t):t?_t.parse:_t.parseInline)(l,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let o=(s.hooks?s.hooks.provideLexer(t):t?ht.lex:ht.lexInline)(n,s);s.hooks&&(o=s.hooks.processAllTokens(o)),s.walkTokens&&this.walkTokens(o,s.walkTokens);let u=(s.hooks?s.hooks.provideParser(t):t?_t.parse:_t.parseInline)(o,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(o){return a(o)}}}onError(t,n){return r=>{if(r.message+=`
110
- Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+wt(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},On=new cw;function ge(e,t){return On.parse(e,t)}ge.options=ge.setOptions=function(e){return On.setOptions(e),ge.defaults=On.defaults,zf(ge.defaults),ge};ge.getDefaults=eu;ge.defaults=Un;ge.use=function(...e){return On.use(...e),ge.defaults=On.defaults,zf(ge.defaults),ge};ge.walkTokens=function(e,t){return On.walkTokens(e,t)};ge.parseInline=On.parseInline;ge.Parser=_t;ge.parser=_t.parse;ge.Renderer=Ji;ge.TextRenderer=uu;ge.Lexer=ht;ge.lexer=ht.lex;ge.Tokenizer=Zi;ge.Hooks=Or;ge.parse=ge;ge.options;ge.setOptions;ge.use;ge.walkTokens;ge.parseInline;_t.parse;ht.lex;var dw=300,hw="300px",fw=500;function pw(e={}){let{immediate:t=!1,debounceDelay:n=dw,rootMargin:r=hw,idleTimeout:i=fw}=e,[s,a]=k.useState(!1),o=k.useRef(null),u=k.useRef(null),l=k.useRef(null),c=k.useMemo(()=>f=>{let m=Date.now();return window.setTimeout(()=>{f({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),d=k.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(f,m)=>window.requestIdleCallback(f,m):c,[c]),p=k.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?f=>window.cancelIdleCallback(f):f=>{clearTimeout(f)},[]);return k.useEffect(()=>{if(t){a(!0);return}let f=o.current;if(!f)return;u.current&&(clearTimeout(u.current),u.current=null),l.current&&(p(l.current),l.current=null);let m=()=>{u.current&&(clearTimeout(u.current),u.current=null),l.current&&(p(l.current),l.current=null)},b=C=>{l.current=d(v=>{v.timeRemaining()>0||v.didTimeout?(a(!0),C.disconnect()):l.current=d(()=>{a(!0),C.disconnect()},{timeout:i/2})},{timeout:i})},y=C=>{m(),u.current=window.setTimeout(()=>{var v,P;let N=C.takeRecords();(N.length===0||(P=(v=N.at(-1))==null?void 0:v.isIntersecting)!=null&&P)&&b(C)},n)},g=(C,v)=>{C.isIntersecting?y(v):m()},I=new IntersectionObserver(C=>{for(let v of C)g(v,I)},{rootMargin:r,threshold:0});return I.observe(f),()=>{u.current&&clearTimeout(u.current),l.current&&p(l.current),I.disconnect()}},[t,n,r,i,p,d]),{shouldRender:s,containerRef:o}}var ep=/\s/,mw=/^\s+$/,gw=new Set(["code","pre","svg","math","annotation"]),bw=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",Ew=e=>e.some(t=>bw(t)&&gw.has(t.tagName)),_w=e=>{let t=[],n="",r=!1;for(let i of e){let s=ep.test(i);s!==r&&n&&(t.push(n),n=""),n+=i,r=s}return n&&t.push(n),t},Tw=e=>{let t=[],n="";for(let r of e)ep.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},yw=(e,t,n,r,i,s)=>{let a=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return s&&(a+=`;--sd-delay:${s}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:a},children:[{type:"text",value:e}]}},xw=(e,t,n,r,i)=>{let s=t.at(-1);if(!(s&&"children"in s))return;if(Ew(t))return Zn;let a=s,o=a.children.indexOf(e);if(o===-1)return;let u=e.value;if(!u.trim()){i.count+=u.length;return}let l=n.sep==="char"?Tw(u):_w(u),c=r.prevContentLength,d=l.map(p=>{let f=i.count;if(i.count+=p.length,mw.test(p))return{type:"text",value:p};let m=c>0&&f<c,b=m?0:i.newIndex++*n.stagger;return yw(p,n.animation,n.duration,n.easing,m,b)});return a.children.splice(o,1,...d),o+d.length},kw=0;function Xa(e){var t,n,r,i,s;let a={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:(s=e==null?void 0:e.stagger)!=null?s:40},o={prevContentLength:0,lastRenderCharCount:0},u=kw++,l=()=>c=>{let d={count:0,newIndex:0};Co(c,"text",(p,f)=>xw(p,f,a,o,d)),o.lastRenderCharCount=d.count,o.prevContentLength=0};return Object.defineProperty(l,"name",{value:`rehypeAnimate$${u}`}),{name:"animate",type:"animate",rehypePlugin:l,setPrevContentLength(c){o.prevContentLength=c},getLastRenderCharCount(){let c=o.lastRenderCharCount;return o.lastRenderCharCount=0,c}}}Xa();var tp=k.createContext(!1),Aw=()=>k.useContext(tp),lu=(...e)=>Of(Ef(e)),Cw=(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(" ")},ww=e=>e?(...t)=>Cw(e,Of(Ef(t))):lu,nr=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,s=URL.createObjectURL(i),a=document.createElement("a");a.href=s,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s)},Za=k.createContext(lu),oe=()=>k.useContext(Za),Iw=lu("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"),Sw=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),s=n.slice(r+1).trim();i&&s&&(t[i]=s)}}return t},Nw=k.memo(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:s=!0,...a})=>{let o=oe(),u=k.useMemo(()=>o(Iw),[o]),l=k.useMemo(()=>{let c={};return t.bg&&(c["--sdm-bg"]=t.bg),t.fg&&(c["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(c,Sw(t.rootStyle)),c},[t.bg,t.fg,t.rootStyle]);return E.jsx("div",{className:o(r,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...a,children:E.jsx("pre",{className:o(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:l,children:E.jsx("code",{className:s?o("[counter-increment:line_0] [counter-reset:line]"):void 0,style:s&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((c,d)=>E.jsx("span",{className:s?u:void 0,children:c.length===0||c.length===1&&c[0].content===""?`
111
- `:c.map((p,f)=>{let m={},b=!!p.bgColor;if(p.color&&(m["--sdm-c"]=p.color),p.bgColor&&(m["--sdm-tbg"]=p.bgColor),p.htmlStyle)for(let[y,g]of Object.entries(p.htmlStyle))y==="color"?m["--sdm-c"]=g:y==="background-color"?(m["--sdm-tbg"]=g,b=!0):m[y]=g;return E.jsx("span",{className:o("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",b&&"bg-[var(--sdm-tbg)]",b&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:m,...p.htmlAttrs,children:p.content},f)})},d))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),Lw=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let s=oe();return E.jsx("div",{className:s("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})},np=k.createContext({code:""}),rp=()=>k.useContext(np),Rw=({language:e})=>{let t=oe();return E.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:E.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},vw=e=>{let t=e.length;for(;t>0&&e[t-1]===`
112
- `;)t--;return e.slice(0,t)},Ow=k.lazy(()=>_(()=>import("./highlighted-body-OFNGDK62-y6A7wCrG.js"),__vite__mapDeps([0,1,2,3,4,5])).then(e=>({default:e.HighlightedCodeBlockBody}))),Pw=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:s,lineNumbers:a,...o})=>{let u=oe(),l=k.useMemo(()=>vw(e),[e]),c=k.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:l.split(`
113
- `).map(d=>[{content:d,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[l]);return E.jsx(np.Provider,{value:{code:e},children:E.jsxs(Lw,{isIncomplete:i,language:t,children:[E.jsx(Rw,{language:t}),r?E.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsx("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":"code-block-actions",children:r})}):null,E.jsx(k.Suspense,{fallback:E.jsx(Nw,{className:n,language:t,lineNumbers:a,result:c,startLine:s,...o}),children:E.jsx(Ow,{className:n,code:l,language:t,lineNumbers:a,raw:c,startLine:s,...o})})]})})},Dw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.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"})}),Mw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.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"})}),Bw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.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"})}),Fw=e=>E.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[E.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Hw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.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"})}),Uw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.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"})}),$w=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.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"})}),jw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.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"})}),Vw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.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"})}),zw=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.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"})}),Pr={CheckIcon:Dw,CopyIcon:Mw,DownloadIcon:Bw,ExternalLinkIcon:jw,Loader2Icon:Fw,Maximize2Icon:Hw,RotateCcwIcon:Uw,XIcon:$w,ZoomInIcon:Vw,ZoomOutIcon:zw},ip=k.createContext(Pr),Gw=(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])},hc=({icons:e,children:t})=>{let n=k.useRef(e),r=k.useRef(e?{...Pr,...e}:Pr);Gw(n.current,e)||(n.current=e,r.current=e?{...Pr,...e}:Pr);let i=r.current;return E.jsx(ip.Provider,{value:i,children:t})},At=()=>k.useContext(ip),sp={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"},Ja=k.createContext(sp),qt=()=>k.useContext(Ja),fc=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:s,...a})=>{let o=oe(),[u,l]=k.useState(!1),c=k.useRef(0),{code:d}=rp(),{isAnimating:p}=k.useContext(at),f=qt(),m=s??d,b=async()=>{var I;if(typeof window>"u"||!((I=navigator==null?void 0:navigator.clipboard)!=null&&I.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(m),l(!0),e==null||e(),c.current=window.setTimeout(()=>l(!1),n))}catch(C){t==null||t(C)}};k.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let y=At(),g=u?y.CheckIcon:y.CopyIcon;return E.jsx("button",{className:o("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:p,onClick:b,title:f.copyCode,type:"button",...a,children:r??E.jsx(g,{size:14})})},pc={"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"},Ww=({onDownload:e,onError:t,language:n,children:r,className:i,code:s,...a})=>{let o=oe(),{code:u}=rp(),{isAnimating:l}=k.useContext(at),c=qt(),d=At(),p=s??u,f=`file.${n&&n in pc?pc[n]:"txt"}`,m="text/plain",b=()=>{try{nr(f,p,m),e==null||e()}catch(y){t==null||t(y)}};return E.jsx("button",{className:o("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:l,onClick:b,title:c.downloadFile,type:"button",...a,children:r??E.jsx(d.DownloadIcon,{size:14})})},mc=()=>{let{Loader2Icon:e}=At(),t=oe();return E.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[E.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),E.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:E.jsx(e,{className:t("size-4 animate-spin")})})]})},qw=/\.[^/.]+$/,Yw=({node:e,className:t,src:n,alt:r,onLoad:i,onError:s,...a})=>{let{DownloadIcon:o}=At(),u=oe(),l=k.useRef(null),[c,d]=k.useState(!1),[p,f]=k.useState(!1),m=qt(),b=a.width!=null||a.height!=null,y=(c||b)&&!p,g=p&&!b;k.useEffect(()=>{let P=l.current;if(P!=null&&P.complete){let N=P.naturalWidth>0;d(N),f(!N)}},[]);let I=k.useCallback(P=>{d(!0),f(!1),i==null||i(P)},[i]),C=k.useCallback(P=>{d(!1),f(!0),s==null||s(P)},[s]),v=async()=>{if(n)try{let P=await(await fetch(n)).blob(),N=new URL(n,window.location.origin).pathname.split("/").pop()||"",B=N.split(".").pop(),M=N.includes(".")&&B!==void 0&&B.length<=4,z="";if(M)z=N;else{let L=P.type,V="png";L.includes("jpeg")||L.includes("jpg")?V="jpg":L.includes("png")?V="png":L.includes("svg")?V="svg":L.includes("gif")?V="gif":L.includes("webp")&&(V="webp"),z=`${(r||N||"image").replace(qw,"")}.${V}`}nr(z,P,P.type)}catch{window.open(n,"_blank")}};return n?E.jsxs("div",{className:u("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[E.jsx("img",{alt:r,className:u("max-w-full rounded-lg",g&&"hidden",t),"data-streamdown":"image",onError:C,onLoad:I,ref:l,src:n,...a}),g&&E.jsx("span",{className:u("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:m.imageNotAvailable}),E.jsx("div",{className:u("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),y&&E.jsx("button",{className:u("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:v,title:m.downloadImage,type:"button",children:E.jsx(o,{size:14})})]}):null},zr=0,cu=()=>{zr+=1,zr===1&&(document.body.style.overflow="hidden")},du=()=>{zr=Math.max(0,zr-1),zr===0&&(document.body.style.overflow="")},Qw=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:s,ExternalLinkIcon:a,XIcon:o}=At(),u=oe(),[l,c]=k.useState(!1),d=qt(),p=k.useCallback(async()=>{try{await navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)}catch{}},[e]),f=k.useCallback(()=>{r(),n()},[r,n]);return k.useEffect(()=>{if(t){cu();let m=b=>{b.key==="Escape"&&n()};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m),du()}}},[t,n]),t?E.jsx("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:m=>{m.key==="Escape"&&n()},role:"button",tabIndex:0,children:E.jsxs("div",{className:u("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),role:"presentation",children:[E.jsx("button",{className:u("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:d.close,type:"button",children:E.jsx(o,{size:16})}),E.jsxs("div",{className:u("flex flex-col gap-2"),children:[E.jsxs("div",{className:u("flex items-center gap-2 font-semibold text-lg"),children:[E.jsx(a,{size:20}),E.jsx("span",{children:d.openExternalLink})]}),E.jsx("p",{className:u("text-muted-foreground text-sm"),children:d.externalLinkWarning})]}),E.jsx("div",{className:u("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),E.jsxs("div",{className:u("flex gap-2"),children:[E.jsx("button",{className:u("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:p,type:"button",children:l?E.jsxs(E.Fragment,{children:[E.jsx(i,{size:14}),E.jsx("span",{children:d.copied})]}):E.jsxs(E.Fragment,{children:[E.jsx(s,{size:14}),E.jsx("span",{children:d.copyLink})]})}),E.jsxs("button",{className:u("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:f,type:"button",children:[E.jsx(a,{size:14}),E.jsx("span",{children:d.openLink})]})]})]})}):null},eo=k.createContext(null),hu=()=>k.useContext(eo),mO=()=>{var e;let t=hu();return(e=t==null?void 0:t.code)!=null?e:null},fu=()=>{var e;let t=hu();return(e=t==null?void 0:t.mermaid)!=null?e:null},Kw=e=>{var t;let n=hu();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},Xw=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,s)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let u=document.createElement("canvas"),l=o.width*r,c=o.height*r;u.width=l,u.height=c;let d=u.getContext("2d");if(!d){s(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,l,c),u.toBlob(p=>{if(!p){s(new Error("Failed to create PNG blob"));return}i(p)},"image/png")},o.onerror=()=>s(new Error("Failed to load SVG image")),o.src=a})},Zw=({chart:e,children:t,className:n,onDownload:r,config:i,onError:s})=>{let a=oe(),[o,u]=k.useState(!1),l=k.useRef(null),{isAnimating:c}=k.useContext(at),d=At(),p=fu(),f=qt(),m=async b=>{try{if(b==="mmd"){nr("diagram.mmd",e,"text/plain"),u(!1),r==null||r(b);return}if(!p){s==null||s(new Error("Mermaid plugin not available"));return}let y=p.getMermaid(i),g=e.split("").reduce((v,P)=>(v<<5)-v+P.charCodeAt(0)|0,0),I=`mermaid-${Math.abs(g)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:C}=await y.render(I,e);if(!C){s==null||s(new Error("SVG not found. Please wait for the diagram to render."));return}if(b==="svg"){nr("diagram.svg",C,"image/svg+xml"),u(!1),r==null||r(b);return}if(b==="png"){let v=await Xw(C);nr("diagram.png",v,"image/png"),r==null||r(b),u(!1);return}}catch(y){s==null||s(y)}};return k.useEffect(()=>{let b=y=>{let g=y.composedPath();l.current&&!g.includes(l.current)&&u(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]),E.jsxs("div",{className:a("relative"),ref:l,children:[E.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:c,onClick:()=>u(!o),title:f.downloadDiagram,type:"button",children:t??E.jsx(d.DownloadIcon,{size:14})}),o?E.jsxs("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("svg"),title:f.downloadDiagramAsSvg,type:"button",children:f.mermaidFormatSvg}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("png"),title:f.downloadDiagramAsPng,type:"button",children:f.mermaidFormatPng}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("mmd"),title:f.downloadDiagramAsMmd,type:"button",children:f.mermaidFormatMmd})]}):null]})},Jw=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...s})=>{let{Maximize2Icon:a,XIcon:o}=At(),u=oe(),[l,c]=k.useState(!1),{isAnimating:d,controls:p}=k.useContext(at),f=qt(),m=(()=>{if(typeof p=="boolean")return p;let y=p.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.panZoom!==!1})(),b=()=>{c(!l)};return k.useEffect(()=>{if(l){cu();let y=g=>{g.key==="Escape"&&c(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),du()}}},[l]),k.useEffect(()=>{l?n==null||n():r&&r()},[l,n,r]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:d,onClick:b,title:f.viewFullscreen,type:"button",...s,children:E.jsx(a,{size:14})}),l?yo.createPortal(E.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:b,onKeyDown:y=>{y.key==="Escape"&&b()},role:"button",tabIndex:0,children:[E.jsx("button",{className:u("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:b,title:f.exitFullscreen,type:"button",children:E.jsx(o,{size:20})}),E.jsx("div",{className:u("flex size-full items-center justify-center p-4"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:E.jsx(Up,{chart:e,className:u("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},ap=e=>{var t,n;let r=[],i=[],s=e.querySelectorAll("thead th");for(let o of s)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let a=e.querySelectorAll("tbody tr");for(let o of a){let u=[],l=o.querySelectorAll("td");for(let c of l)u.push(((n=c.textContent)==null?void 0:n.trim())||"");i.push(u)}return{headers:r,rows:i}},op=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1,l=!1;for(let c of o){if(c==='"'){u=!0,l=!0;break}(c===","||c===`
114
- `)&&(u=!0)}return u?l?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(","),a+=1);for(let o of n)s[a]=o.map(r).join(","),a+=1;return s.join(`
115
- `)},eI=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1;for(let c of o)if(c===" "||c===`
116
- `||c==="\r"){u=!0;break}if(!u)return o;let l=[];for(let c of o)c===" "?l.push("\\t"):c===`
117
- `?l.push("\\n"):c==="\r"?l.push("\\r"):l.push(c);return l.join("")},i=t.length>0?n.length+1:n.length,s=new Array(i),a=0;t.length>0&&(s[a]=t.map(r).join(" "),a+=1);for(let o of n)s[a]=o.map(r).join(" "),a+=1;return s.join(`
118
- `)},da=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("")},to=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,s=t.map(o=>da(o));r[i]=`| ${s.join(" | ")} |`,i+=1;let a=new Array(t.length);for(let o=0;o<t.length;o+=1)a[o]="---";r[i]=`| ${a.join(" | ")} |`,i+=1;for(let o of n)if(o.length<t.length){let u=new Array(t.length);for(let l=0;l<t.length;l+=1)u[l]=l<o.length?da(o[l]):"";r[i]=`| ${u.join(" | ")} |`,i+=1}else{let u=o.map(l=>da(l));r[i]=`| ${u.join(" | ")} |`,i+=1}return r.join(`
119
- `)},up=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let s=oe(),[a,o]=k.useState(!1),[u,l]=k.useState(!1),c=k.useRef(null),d=k.useRef(0),{isAnimating:p}=k.useContext(at),f=qt(),m=async g=>{var I,C;if(typeof window>"u"||!((I=navigator==null?void 0:navigator.clipboard)!=null&&I.write)){r==null||r(new Error("Clipboard API not available"));return}try{let v=(C=c.current)==null?void 0:C.closest('[data-streamdown="table-wrapper"]'),P=v==null?void 0:v.querySelector("table");if(!P){r==null||r(new Error("Table not found"));return}let N=ap(P),B=({csv:op,tsv:eI,md:to}[g]||to)(N),M=new ClipboardItem({"text/plain":new Blob([B],{type:"text/plain"}),"text/html":new Blob([P.outerHTML],{type:"text/html"})});await navigator.clipboard.write([M]),l(!0),o(!1),n==null||n(g),d.current=window.setTimeout(()=>l(!1),i)}catch(v){r==null||r(v)}};k.useEffect(()=>{let g=I=>{let C=I.composedPath();c.current&&!C.includes(c.current)&&o(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g),window.clearTimeout(d.current)}},[]);let b=At(),y=u?b.CheckIcon:b.CopyIcon;return E.jsxs("div",{className:s("relative"),ref:c,children:[E.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:p,onClick:()=>o(!a),title:f.copyTable,type:"button",children:e??E.jsx(y,{height:14,width:14})}),a?E.jsxs("div",{className:s("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("md"),title:f.copyTableAsMarkdown,type:"button",children:f.tableFormatMarkdown}),E.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("csv"),title:f.copyTableAsCsv,type:"button",children:f.tableFormatCsv}),E.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("tsv"),title:f.copyTableAsTsv,type:"button",children:f.tableFormatTsv})]}):null]})},lp=({children:e,className:t,onDownload:n,onError:r})=>{let i=oe(),[s,a]=k.useState(!1),o=k.useRef(null),{isAnimating:u}=k.useContext(at),l=qt(),c=At(),d=p=>{var f;try{let m=(f=o.current)==null?void 0:f.closest('[data-streamdown="table-wrapper"]'),b=m==null?void 0:m.querySelector("table");if(!b){r==null||r(new Error("Table not found"));return}let y=ap(b),g=p==="csv"?op(y):to(y);nr(`table.${p==="csv"?"csv":"md"}`,g,p==="csv"?"text/csv":"text/markdown"),a(!1),n==null||n(p)}catch(m){r==null||r(m)}};return k.useEffect(()=>{let p=f=>{let m=f.composedPath();o.current&&!m.includes(o.current)&&a(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[]),E.jsxs("div",{className:i("relative"),ref:o,children:[E.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:u,onClick:()=>a(!s),title:l.downloadTable,type:"button",children:e??E.jsx(c.DownloadIcon,{size:14})}),s?E.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:[E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:l.downloadTableAsCsv,type:"button",children:l.tableFormatCsv}),E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:l.downloadTableAsMarkdown,type:"button",children:l.tableFormatMarkdown})]}):null]})},tI=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:s}=At(),a=oe(),[o,u]=k.useState(!1),{isAnimating:l}=k.useContext(at),c=qt(),d=()=>{u(!0)},p=()=>{u(!1)};return k.useEffect(()=>{if(o){cu();let f=m=>{m.key==="Escape"&&u(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),du()}}},[o]),E.jsxs(E.Fragment,{children:[E.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:l,onClick:d,title:c.viewFullscreen,type:"button",children:E.jsx(i,{size:14})}),o?yo.createPortal(E.jsx("div",{"aria-label":c.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:p,onKeyDown:f=>{f.key==="Escape"&&p()},role:"dialog",children:E.jsxs("div",{className:a("flex h-full flex-col"),onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:[E.jsxs("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[n?E.jsx(up,{}):null,r?E.jsx(lp,{}):null,E.jsx("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:p,title:c.exitFullscreen,type:"button",children:E.jsx(s,{size:20})})]}),E.jsx("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:E.jsx("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},nI=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:s=!0,...a})=>{let o=oe(),u=n&&r,l=n&&i,c=n&&s,d=u||l||c;return E.jsxs("div",{className:o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[d?E.jsxs("div",{className:o("flex items-center justify-end gap-1"),children:[u?E.jsx(up,{}):null,l?E.jsx(lp,{}):null,c?E.jsx(tI,{showCopy:u,showDownload:l,children:e}):null]}):null,E.jsx("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:E.jsx("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...a,children:e})})]})},rI=/startLine=(\d+)/,iI=/\bnoLineNumbers\b/,sI=k.lazy(()=>_(()=>Promise.resolve().then(()=>iO),void 0).then(e=>({default:e.Mermaid}))),aI=/language-([^\s]+)/;function Ss(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,s=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)===(s==null?void 0:s.line)&&(i==null?void 0:i.column)===(s==null?void 0:s.column)}function xe(e,t){return e.className===t.className&&Ss(e.node,t.node)}var no=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,ha=(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},gc=(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},xi=(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},pu=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>xe(e,t));pu.displayName="MarkdownOl";var cp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&Ss(e.node,t.node));cp.displayName="MarkdownLi";var dp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>xe(e,t));dp.displayName="MarkdownUl";var hp=k.memo(({className:e,node:t,...n})=>{let r=oe();return E.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>xe(e,t));hp.displayName="MarkdownHr";var fp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>xe(e,t));fp.displayName="MarkdownStrong";var oI=({children:e,className:t,href:n,node:r,...i})=>{let s=oe(),{linkSafety:a}=k.useContext(at),[o,u]=k.useState(!1),l=n==="streamdown:incomplete-link",c=k.useCallback(async m=>{if(!(!(a!=null&&a.enabled&&n)||l)){if(m.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}u(!0)}},[a,n,l]),d=k.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),p=k.useCallback(()=>{u(!1)},[]),f={url:n??"",isOpen:o,onClose:p,onConfirm:d};return a!=null&&a.enabled&&n?E.jsxs(E.Fragment,{children:[E.jsx("button",{className:s("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:c,type:"button",children:e}),a.renderModal?a.renderModal(f):E.jsx(Qw,{...f})]}):E.jsx("a",{className:s("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},pp=k.memo(oI,(e,t)=>xe(e,t)&&e.href===t.href);pp.displayName="MarkdownA";var mp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>xe(e,t));mp.displayName="MarkdownH1";var gp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>xe(e,t));gp.displayName="MarkdownH2";var bp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>xe(e,t));bp.displayName="MarkdownH3";var Ep=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>xe(e,t));Ep.displayName="MarkdownH4";var _p=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>xe(e,t));_p.displayName="MarkdownH5";var Tp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>xe(e,t));Tp.displayName="MarkdownH6";var yp=k.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=k.useContext(at),s=no(i,"table"),a=ha(i,"copy"),o=ha(i,"download"),u=ha(i,"fullscreen");return E.jsx(nI,{className:t,showControls:s,showCopy:a,showDownload:o,showFullscreen:u,...r,children:e})},(e,t)=>xe(e,t));yp.displayName="MarkdownTable";var xp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>xe(e,t));xp.displayName="MarkdownThead";var kp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>xe(e,t));kp.displayName="MarkdownTbody";var Ap=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>xe(e,t));Ap.displayName="MarkdownTr";var Cp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.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)=>xe(e,t));Cp.displayName="MarkdownTh";var wp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>xe(e,t));wp.displayName="MarkdownTd";var Ip=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.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)=>xe(e,t));Ip.displayName="MarkdownBlockquote";var Sp=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>xe(e,t));Sp.displayName="MarkdownSup";var Np=k.memo(({children:e,className:t,node:n,...r})=>{let i=oe();return E.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>xe(e,t));Np.displayName="MarkdownSub";var Lp=k.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=a=>{var o,u;if(!k.isValidElement(a))return!1;let l=Array.isArray(a.props.children)?a.props.children:[a.props.children],c=!1,d=!1;for(let p of l)if(p){if(typeof p=="string")p.trim()!==""&&(c=!0);else if(k.isValidElement(p))if(((o=p.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let f=Array.isArray(p.props.children)?p.props.children:[p.props.children];for(let m of f){if(typeof m=="string"&&m.trim()!==""){c=!0;break}if(k.isValidElement(m)&&((u=m.props)==null?void 0:u["data-footnote-backref"])===void 0){c=!0;break}}}}return d&&!c},s=Array.isArray(e)?e.map(a=>{if(!k.isValidElement(a))return a;if(a.type===pu){let o=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(u=>!i(u));return o.length===0?null:{...a,props:{...a.props,children:o}}}return a}):e;return(Array.isArray(s)?s.some(a=>a!==null):s!==null)?E.jsx("section",{className:t,...r,children:s}):null}return E.jsx("section",{className:t,...r,children:e})},(e,t)=>xe(e,t));Lp.displayName="MarkdownSection";var uI=({node:e,className:t,children:n,...r})=>{var i,s;let a=oe(),o=!("data-block"in r),{mermaid:u,controls:l,lineNumbers:c}=k.useContext(at),d=fu(),p=Aw(),f=t==null?void 0:t.match(aI),m=(i=f==null?void 0:f.at(1))!=null?i:"",b=Kw(m);if(o)return E.jsx("code",{className:a("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let y=(s=e==null?void 0:e.properties)==null?void 0:s.metastring,g=y==null?void 0:y.match(rI),I=g?Number.parseInt(g[1],10):void 0,C=I!==void 0&&I>=1?I:void 0,v=!(y&&iI.test(y))&&c!==!1,P="";if(k.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?P=n.props.children:typeof n=="string"&&(P=n),b){let z=b.component;return E.jsx(k.Suspense,{fallback:E.jsx(mc,{}),children:E.jsx(z,{code:P,isIncomplete:p,language:m,meta:y})})}if(m==="mermaid"&&d){let z=no(l,"mermaid"),L=xi(l,"download"),V=xi(l,"copy"),G=xi(l,"fullscreen"),Z=xi(l,"panZoom"),Y=z&&(L||V||G);return E.jsx(k.Suspense,{fallback:E.jsx(mc,{}),children:E.jsxs("div",{className:a("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:[E.jsx("div",{className:a("flex h-8 items-center text-muted-foreground text-xs"),children:E.jsx("span",{className:a("ml-1 font-mono lowercase"),children:"mermaid"})}),Y?E.jsx("div",{className:a("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsxs("div",{className:a("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:[L?E.jsx(Zw,{chart:P,config:u==null?void 0:u.config}):null,V?E.jsx(fc,{code:P}):null,G?E.jsx(Jw,{chart:P,config:u==null?void 0:u.config}):null]})}):null,E.jsx("div",{className:a("rounded-md border border-border bg-background"),children:E.jsx(sI,{chart:P,config:u==null?void 0:u.config,showControls:Z})})]})})}let N=no(l,"code"),B=gc(l,"download"),M=gc(l,"copy");return E.jsx(Pw,{className:t,code:P,isIncomplete:p,language:m,lineNumbers:v,startLine:C,children:N?E.jsxs(E.Fragment,{children:[B?E.jsx(Ww,{code:P,language:m}):null,M?E.jsx(fc,{}):null]}):null})},Rp=k.memo(uI,(e,t)=>e.className===t.className&&Ss(e.node,t.node));Rp.displayName="MarkdownCode";var vp=k.memo(Yw,(e,t)=>e.className===t.className&&Ss(e.node,t.node));vp.displayName="MarkdownImg";var Op=k.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&k.isValidElement(r[0])){let i=r[0].props.node,s=i==null?void 0:i.tagName;if(s==="img")return E.jsx(E.Fragment,{children:e});if(s==="code"&&"data-block"in r[0].props)return E.jsx(E.Fragment,{children:e})}return E.jsx("p",{...n,children:e})},(e,t)=>xe(e,t));Op.displayName="MarkdownParagraph";var lI={ol:pu,li:cp,ul:dp,hr:hp,strong:fp,a:pp,h1:mp,h2:gp,h3:bp,h4:Ep,h5:_p,h6:Tp,table:yp,thead:xp,tbody:kp,tr:Ap,th:Cp,td:wp,blockquote:Ip,code:Rp,img:vp,pre:({children:e})=>k.isValidElement(e)?k.cloneElement(e,{"data-block":"true"}):e,sup:Sp,sub:Np,p:Op,section:Lp},cI=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,dI=new RegExp("\\p{L}","u");function bc(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(cI.test(n))return"rtl";if(dI.test(n))return"ltr"}return"ltr"}var hI=/^[ \t]{0,3}(`{3,}|~{3,})/,fI=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Ec=e=>{let t=e.split(`
120
- `),n=null,r=0;for(let i of t){let s=hI.exec(i);if(n===null){if(s){let a=s[1];n=a[0],r=a.length}}else if(s){let a=s[1],o=a[0],u=a.length;o===n&&u>=r&&(n=null,r=0)}}return n!==null},pI=e=>{let t=e.split(`
121
- `);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&fI.test(r))return!0}return!1},mI=()=>e=>{Rt(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},_c=[],Tc={allowDangerousHtml:!0},ki=new WeakMap,gI=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 c="default";return this.keyCache.set(e,c),c}let s=c=>{if(!c||c.length===0)return"";let d="";for(let p=0;p<c.length;p+=1){let f=c[p];if(p>0&&(d+=","),Array.isArray(f)){let[m,b]=f;if(typeof m=="function"){let y=ki.get(m);y||(y=m.name,ki.set(m,y)),d+=y}else d+=String(m);d+=":",d+=JSON.stringify(b)}else if(typeof f=="function"){let m=ki.get(f);m||(m=f.name,ki.set(f,m)),d+=m}else d+=String(f)}return d},a=s(n),o=s(r),u=i?JSON.stringify(i):"",l=`${o}::${a}::${u}`;return this.keyCache.set(e,l),l}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()}},yc=new gI,Pp=e=>{let t=bI(e),n=e.children||"",r=t.runSync(t.parse(n),n);return AI(r,e)},bI=e=>{let t=yc.get(e);if(t)return t;let n=_I(e);return yc.set(e,n),n},EI=e=>e.some(t=>Array.isArray(t)?t[0]===Ha:t===Ha),_I=e=>{let t=e.rehypePlugins||_c,n=e.remarkPlugins||_c,r=EI(t)?n:[...n,mI],i=e.remarkRehypeOptions?{...Tc,...e.remarkRehypeOptions}:Tc;return T2().use(_C).use(r).use(t2,i).use(t)},TI=e=>e,yI=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},xI=(e,t)=>{var n;for(let r in na)if(Object.hasOwn(na,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],s=na[r];(s===null||s.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},kI=(e,t,n,r,i,s)=>{let a=!1;return r?a=!r.includes(e.tagName):i&&(a=i.includes(e.tagName)),!a&&s&&typeof t=="number"&&(a=!s(e,t,n)),a},AI=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:s,unwrapDisallowed:a,urlTransform:o}=t;if(n||r||i||s||o){let u=o||TI;Rt(e,(l,c,d)=>{if(l.type==="raw"&&d&&typeof c=="number")return yI(d,c,s,l.value),c;if(l.type==="element"&&(xI(l,u),kI(l,c,d,r,i,n)&&d&&typeof c=="number"))return a&&l.children?d.children.splice(c,1,...l.children):d.children.splice(c,1),c})}return IA(e,{Fragment:E.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0})},CI=/\[\^[\w-]{1,200}\](?!:)/,wI=/\[\^[\w-]{1,200}\]:/,II=/<(\w+)[\s>]/,SI=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),xc=new Map,kc=new Map,NI=e=>{let t=e.toLowerCase(),n=xc.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return xc.set(t,r),r},LI=e=>{let t=e.toLowerCase(),n=kc.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return kc.set(t,r),r},Ac=(e,t)=>{if(SI.has(t.toLowerCase()))return 0;let n=e.match(NI(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Cc=(e,t)=>{let n=e.match(LI(t));return n?n.length:0},RI=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},vI=e=>{let t=CI.test(e),n=wI.test(e);if(t||n)return[e];let r=ht.lex(e,{gfm:!0}),i=[],s=[],a=!1;for(let o of r){let u=o.raw,l=i.length;if(s.length>0){i[l-1]+=u;let c=s.at(-1),d=Ac(u,c),p=Cc(u,c);for(let f=0;f<d;f+=1)s.push(c);for(let f=0;f<p;f+=1)s.length>0&&s.at(-1)===c&&s.pop();continue}if(o.type==="html"&&o.block){let c=u.match(II);if(c){let d=c[1],p=Ac(u,d),f=Cc(u,d);p>f&&s.push(d)}}if(l>0&&!a){let c=i[l-1];if(RI(c)%2===1){i[l-1]=c+u;continue}}i.push(u),o.type!=="space"&&(a=o.type==="code")}return i},OI=(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,(s,a,o,u)=>{if(!o.includes(`
122
-
123
- `))return a+o+u;let l=o.replace(/\n\n/g,`
124
- <!---->
125
- `),c=(l.startsWith(`
126
- `)?"":`
127
- `)+l+(l.endsWith(`
128
- `)?"":`
129
- `);return`${a}${c}${u}
130
-
131
- `})}return n},PI=/([\\`*_~[\]|])/g,DI=e=>e.replace(PI,"\\$1"),MI=(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,(s,a,o,u)=>{let l=DI(o).replace(/\n\n/g,"&#10;&#10;");return a+l+u})}return n},Dp=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Dp).join(""):"",BI=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));Rt(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=Dp(r);r.children=i?[{type:"text",value:i}]:[]}})},FI=()=>e=>{Rt(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})})},HI=/^[ \t]*<[\w!/?-]/,UI=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,$I=e=>typeof e!="string"||e.length===0||!HI.test(e)?e:e.replace(UI,"$1"),wc,Ic,Sc,Nc,Mi={...yn,protocols:{...yn.protocols,href:[...(Ic=(wc=yn.protocols)==null?void 0:wc.href)!=null?Ic:[],"tel"]},attributes:{...yn.attributes,code:[...(Nc=(Sc=yn.attributes)==null?void 0:Sc.code)!=null?Nc:[],"metastring"]}},ro={raw:Ha,sanitize:[Ih,Mi],harden:[K0,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},jI={gfm:[fx,{}],codeMeta:FI},Lc=Object.values(ro),VI=Object.values(jI),zI={block:" ▋",circle:" ●"},Mp=["github-light","github-dark"],Bp={enabled:!0},GI={shikiTheme:Mp,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Bp},at=k.createContext(GI),Fp=k.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:s,animatePlugin:a,...o})=>{if(a){let c=a.getLastRenderCharCount();a.setPrevContentLength(c)}let u=typeof e=="string"&&n?$I(e):e,l=E.jsx(Pp,{...o,children:u});return E.jsx(tp.Provider,{value:i,children:s?E.jsx("div",{dir:s,style:{display:"contents"},children:l}):l})},(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 s,a;return((s=e.components)==null?void 0:s[i])!==((a=t.components)==null?void 0:a[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Fp.displayName="Block";var Hp=k.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:s,rehypePlugins:a=Lc,remarkPlugins:o=VI,className:u,shikiTheme:l=Mp,mermaid:c,controls:d=!0,isAnimating:p=!1,animated:f,BlockComponent:m=Fp,parseMarkdownIntoBlocksFn:b=vI,caret:y,plugins:g,remend:I,linkSafety:C=Bp,lineNumbers:v=!0,allowedTags:P,literalTagContent:N,translations:B,icons:M,prefix:z,onAnimationStart:L,onAnimationEnd:V,...G})=>{let Z=k.useId(),[Y,$]=k.useTransition(),W=k.useMemo(()=>ww(z),[z]),J=k.useRef(null),me=k.useRef(L),Ce=k.useRef(V);me.current=L,Ce.current=V,k.useEffect(()=>{var se,pe,Je;if(t==="static")return;let Ct=J.current;if(J.current=p,Ct===null){p&&((se=me.current)==null||se.call(me));return}p&&!Ct?(pe=me.current)==null||pe.call(me):!p&&Ct&&((Je=Ce.current)==null||Je.call(Ce))},[p,t]);let A=k.useMemo(()=>P?Object.keys(P):[],[P]),Te=k.useMemo(()=>{if(typeof e!="string")return"";let se=t==="streaming"&&r?Ak(e,I):e;return N&&N.length>0&&(se=MI(se,N)),A.length>0&&(se=OI(se,A)),se},[e,t,r,I,A,N]),we=k.useMemo(()=>b(Te),[Te,b]),[S,Ie]=k.useState(we);k.useEffect(()=>{t==="streaming"&&!de?$(()=>{Ie(we)}):Ie(we)},[we,t]);let le=t==="streaming"?S:we,ie=k.useMemo(()=>n==="auto"?le.map(bc):void 0,[le,n]),ze=k.useMemo(()=>le.map((se,pe)=>`${Z}-${pe}`),[le.length,Z]),Pe=k.useMemo(()=>f===!0?"true":f?JSON.stringify(f):"",[f]),de=k.useMemo(()=>Pe?Pe==="true"?Xa():Xa(f):null,[Pe]),Ge=k.useMemo(()=>{var se,pe;return{shikiTheme:(pe=(se=g==null?void 0:g.code)==null?void 0:se.getThemes())!=null?pe:l,controls:d,isAnimating:p,lineNumbers:v,mode:t,mermaid:c,linkSafety:C}},[l,d,p,v,t,c,C,g==null?void 0:g.code]),Xe=k.useMemo(()=>B?JSON.stringify(B):"",[B]),ot=k.useMemo(()=>({...sp,...B}),[Xe]),Ze=k.useMemo(()=>{let{inlineCode:se,...pe}=s??{},Je={...lI,...pe};if(se){let Ct=Je.code;Je.code=pn=>"data-block"in pn?Ct?k.createElement(Ct,pn):null:k.createElement(se,pn)}return Je},[s]),ut=k.useMemo(()=>{let se=[];return g!=null&&g.cjk&&(se=[...se,...g.cjk.remarkPluginsBefore]),se=[...se,...o],g!=null&&g.cjk&&(se=[...se,...g.cjk.remarkPluginsAfter]),g!=null&&g.math&&(se=[...se,g.math.remarkPlugin]),se},[o,g==null?void 0:g.math,g==null?void 0:g.cjk]),fn=k.useMemo(()=>{var se;let pe=a;if(P&&Object.keys(P).length>0&&a===Lc){let Je={...Mi,tagNames:[...(se=Mi.tagNames)!=null?se:[],...Object.keys(P)],attributes:{...Mi.attributes,...P}};pe=[ro.raw,[Ih,Je],ro.harden]}return N&&N.length>0&&(pe=[...pe,[BI,N]]),g!=null&&g.math&&(pe=[...pe,g.math.rehypePlugin]),de&&p&&(pe=[...pe,de.rehypePlugin]),pe},[a,g==null?void 0:g.math,de,p,P,N]),Yt=k.useMemo(()=>{if(!p||le.length===0)return!1;let se=le.at(-1);return Ec(se)||pI(se)},[p,le]),jn=k.useMemo(()=>y&&p&&!Yt?{"--streamdown-caret":`"${zI[y]}"`}:void 0,[y,p,Yt]);return t==="static"?E.jsx(Ja.Provider,{value:ot,children:E.jsx(eo.Provider,{value:g??null,children:E.jsx(at.Provider,{value:Ge,children:E.jsx(hc,{icons:M,children:E.jsx(Za.Provider,{value:W,children:E.jsx("div",{className:W("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",u),dir:n==="auto"?bc(Te):n,children:E.jsx(Pp,{components:Ze,rehypePlugins:fn,remarkPlugins:ut,...G,children:Te})})})})})})}):E.jsx(Ja.Provider,{value:ot,children:E.jsx(eo.Provider,{value:g??null,children:E.jsx(at.Provider,{value:Ge,children:E.jsx(hc,{icons:M,children:E.jsx(Za.Provider,{value:W,children:E.jsxs("div",{className:W("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",y&&!Yt?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,u),style:jn,children:[le.length===0&&y&&p&&E.jsx("span",{}),le.map((se,pe)=>{var Je;let Ct=pe===le.length-1,pn=p&&Ct&&Ec(se);return E.jsx(m,{animatePlugin:de,components:Ze,content:se,dir:(Je=ie==null?void 0:ie[pe])!=null?Je:n!=="auto"?n:void 0,index:pe,isIncomplete:pn,rehypePlugins:fn,remarkPlugins:ut,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...G},ze[pe])})]})})})})})})},(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);Hp.displayName="Streamdown";var WI=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:s=!0,initialZoom:a=1,fullscreen:o=!1})=>{let{RotateCcwIcon:u,ZoomInIcon:l,ZoomOutIcon:c}=At(),d=oe(),p=k.useRef(null),f=k.useRef(null),[m,b]=k.useState(a),[y,g]=k.useState({x:0,y:0}),[I,C]=k.useState(!1),[v,P]=k.useState({x:0,y:0}),[N,B]=k.useState({x:0,y:0}),M=k.useCallback(W=>{b(J=>Math.max(n,Math.min(r,J+W)))},[n,r]),z=k.useCallback(()=>{M(i)},[M,i]),L=k.useCallback(()=>{M(-i)},[M,i]),V=k.useCallback(()=>{b(a),g({x:0,y:0})},[a]),G=k.useCallback(W=>{W.preventDefault();let J=W.deltaY>0?-i:i;M(J)},[M,i]),Z=k.useCallback(W=>{if(W.button!==0||W.isPrimary===!1)return;C(!0),P({x:W.clientX,y:W.clientY}),B(y);let J=W.currentTarget;J instanceof HTMLElement&&J.setPointerCapture(W.pointerId)},[y]),Y=k.useCallback(W=>{if(!I)return;W.preventDefault();let J=W.clientX-v.x,me=W.clientY-v.y;g({x:N.x+J,y:N.y+me})},[I,v,N]),$=k.useCallback(W=>{C(!1);let J=W.currentTarget;J instanceof HTMLElement&&J.releasePointerCapture(W.pointerId)},[]);return k.useEffect(()=>{let W=p.current;if(W)return W.addEventListener("wheel",G,{passive:!1}),()=>{W.removeEventListener("wheel",G)}},[G]),k.useEffect(()=>{let W=f.current;if(W&&I)return document.body.style.userSelect="none",W.addEventListener("pointermove",Y,{passive:!1}),W.addEventListener("pointerup",$),W.addEventListener("pointercancel",$),()=>{document.body.style.userSelect="",W.removeEventListener("pointermove",Y),W.removeEventListener("pointerup",$),W.removeEventListener("pointercancel",$)}},[I,Y,$]),E.jsxs("div",{className:d("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:p,style:{cursor:I?"grabbing":"grab"},children:[s?E.jsxs("div",{className:d("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",o?"bottom-4 left-4":"bottom-2 left-2"),children:[E.jsx("button",{className:d("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:m>=r,onClick:z,title:"Zoom in",type:"button",children:E.jsx(l,{size:16})}),E.jsx("button",{className:d("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:m<=n,onClick:L,title:"Zoom out",type:"button",children:E.jsx(c,{size:16})}),E.jsx("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:V,title:"Reset zoom and pan",type:"button",children:E.jsx(u,{size:16})})]}):null,E.jsx("div",{className:d("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Z,ref:f,role:"application",style:{transform:`translate(${y.x}px, ${y.y}px) scale(${m})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Up=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let s=oe(),[a,o]=k.useState(null),[u,l]=k.useState(!1),[c,d]=k.useState(""),[p,f]=k.useState(""),[m,b]=k.useState(0),{mermaid:y}=k.useContext(at),g=fu(),I=y==null?void 0:y.errorComponent,{shouldRender:C,containerRef:v}=pw({immediate:r});if(k.useEffect(()=>{if(C){if(!g){o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{o(null),l(!0);let N=g.getMermaid(n),B=e.split("").reduce((L,V)=>(L<<5)-L+V.charCodeAt(0)|0,0),M=`mermaid-${Math.abs(B)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:z}=await N.render(M,e);d(z),f(z)}catch(N){if(!(p||c)){let B=N instanceof Error?N.message:"Failed to render Mermaid chart";o(B)}}finally{l(!1)}})()}},[e,n,m,C,g]),!(C||c||p))return E.jsx("div",{className:s("my-4 min-h-[200px]",t),ref:v});if(u&&!c&&!p)return E.jsx("div",{className:s("my-4 flex justify-center p-4",t),ref:v,children:E.jsxs("div",{className:s("flex items-center space-x-2 text-muted-foreground"),children:[E.jsx("div",{className:s("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),E.jsx("span",{className:s("text-sm"),children:"Loading diagram..."})]})});if(a&&!c&&!p){let N=()=>b(B=>B+1);return I?E.jsx("div",{ref:v,children:E.jsx(I,{chart:e,error:a,retry:N})}):E.jsxs("div",{className:s("rounded-md bg-red-50 p-4",t),ref:v,children:[E.jsxs("p",{className:s("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",a]}),E.jsxs("details",{className:s("mt-2"),children:[E.jsx("summary",{className:s("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),E.jsx("pre",{className:s("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let P=c||p;return E.jsx("div",{className:s("size-full",t),"data-streamdown":"mermaid",ref:v,children:E.jsx(WI,{className:s(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:E.jsx("div",{"aria-label":"Mermaid chart",className:s("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:P},role:"img"})})})};let Ne=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function qI(e){return mu(e)}function mu(e){return Array.isArray(e)?YI(e):e instanceof RegExp?e:typeof e=="object"?QI(e):e}function YI(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=mu(e[n]);return t}function QI(e){let t={};for(let n in e)t[n]=mu(e[n]);return t}function $p(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function jp(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?jp(e.substring(0,e.length-1)):e.substr(~t+1)}var fa=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ai=class{static hasCaptures(e){return e===null?!1:(fa.lastIndex=0,fa.test(e))}static replaceCaptures(e,t,n){return e.replace(fa,(r,i,s,a)=>{let o=n[parseInt(i||s,10)];if(o){let u=t.substring(o.start,o.end);for(;u[0]===".";)u=u.substring(1);switch(a){case"downcase":return u.toLowerCase();case"upcase":return u.toUpperCase();default:return u}}else return r})}};function Vp(e,t){return e<t?-1:e>t?1:0}function zp(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 s=Vp(e[i],t[i]);if(s!==0)return s}return 0}return n-r}function Rc(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 Gp(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Wp=class{constructor(e){O(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}},es=class{constructor(e,t,n){O(this,"_cachedMatchRoot",new Wp(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(ZI(e),t)}static createFromParsedTheme(e,t){return eS(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=>KI(e.parent,i.parentScopes));return r?new qp(r.fontStyle,r.foreground,r.background):null}},pa=class Bi{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new Bi(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new Bi(n,t[r]);return n}push(t){return new Bi(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 KI(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&&!XI(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function XI(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var qp=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function ZI(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,s=t.length;i<s;i++){let a=t[i];if(!a.settings)continue;let o;if(typeof a.scope=="string"){let d=a.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),o=d.split(",")}else Array.isArray(a.scope)?o=a.scope:o=[""];let u=-1;if(typeof a.settings.fontStyle=="string"){u=0;let d=a.settings.fontStyle.split(" ");for(let p=0,f=d.length;p<f;p++)switch(d[p]){case"italic":u=u|1;break;case"bold":u=u|2;break;case"underline":u=u|4;break;case"strikethrough":u=u|8;break}}let l=null;typeof a.settings.foreground=="string"&&Rc(a.settings.foreground)&&(l=a.settings.foreground);let c=null;typeof a.settings.background=="string"&&Rc(a.settings.background)&&(c=a.settings.background);for(let d=0,p=o.length;d<p;d++){let m=o[d].trim().split(" "),b=m[m.length-1],y=null;m.length>1&&(y=m.slice(0,m.length-1),y.reverse()),n[r++]=new JI(b,y,i,u,l,c)}}return n}var JI=class{constructor(e,t,n,r,i,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},Ue=(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))(Ue||{});function eS(e,t){e.sort((u,l)=>{let c=Vp(u.scope,l.scope);return c!==0||(c=zp(u.parentScopes,l.parentScopes),c!==0)?c:u.index-l.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let u=e.shift();u.fontStyle!==-1&&(n=u.fontStyle),u.foreground!==null&&(r=u.foreground),u.background!==null&&(i=u.background)}let s=new tS(t),a=new qp(n,s.getId(r),s.getId(i)),o=new rS(new io(0,null,-1,0,0),[]);for(let u=0,l=e.length;u<l;u++){let c=e[u];o.insert(0,c.scope,c.parentScopes,c.fontStyle,s.getId(c.foreground),s.getId(c.background))}return new es(s,a,o)}var tS=class{constructor(e){O(this,"_isFrozen");O(this,"_lastColorId");O(this,"_id2color");O(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)}},nS=Object.freeze([]),io=class Yp{constructor(t,n,r,i,s){O(this,"scopeDepth");O(this,"parentScopes");O(this,"fontStyle");O(this,"foreground");O(this,"background");this.scopeDepth=t,this.parentScopes=n||nS,this.fontStyle=r,this.foreground=i,this.background=s}clone(){return new Yp(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)}},rS=class so{constructor(t,n=[],r={}){O(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 s=n.parentScopes[i].length-t.parentScopes[r].length;if(s!==0)return s;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,s;if(r===-1?(i=t,s=""):(i=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(so._cmpBySpecificity),n}insert(t,n,r,i,s,a){if(n===""){this._doInsertHere(t,r,i,s,a);return}let o=n.indexOf("."),u,l;o===-1?(u=n,l=""):(u=n.substring(0,o),l=n.substring(o+1));let c;this._children.hasOwnProperty(u)?c=this._children[u]:(c=new so(this._mainRule.clone(),io.cloneArr(this._rulesWithParentScopes)),this._children[u]=c),c.insert(t+1,l,r,i,s,a)}_doInsertHere(t,n,r,i,s){if(n===null){this._mainRule.acceptOverwrite(t,r,i,s);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let u=this._rulesWithParentScopes[a];if(zp(u.parentScopes,n)===0){u.acceptOverwrite(t,r,i,s);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new io(t,n,r,i,s))}},or=class lt{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=lt.getLanguageId(t),r=lt.getTokenType(t),i=lt.getFontStyle(t),s=lt.getForeground(t),a=lt.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:s,background:a})}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,s,a,o){let u=lt.getLanguageId(t),l=lt.getTokenType(t),c=lt.containsBalancedBrackets(t)?1:0,d=lt.getFontStyle(t),p=lt.getForeground(t),f=lt.getBackground(t);return n!==0&&(u=n),r!==8&&(l=r),i!==null&&(c=i?1:0),s!==-1&&(d=s),a!==0&&(p=a),o!==0&&(f=o),(u<<0|l<<8|c<<10|d<<11|p<<15|f<<24)>>>0}};function ts(e,t){const n=[],r=iS(e);let i=r.next();for(;i!==null;){let u=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let l=a();if(n.push({matcher:l,priority:u}),i!==",")break;i=r.next()}return n;function s(){if(i==="-"){i=r.next();const u=s();return l=>!!u&&!u(l)}if(i==="("){i=r.next();const u=o();return i===")"&&(i=r.next()),u}if(vc(i)){const u=[];do u.push(i),i=r.next();while(vc(i));return l=>t(u,l)}return null}function a(){const u=[];let l=s();for(;l;)u.push(l),l=s();return c=>u.every(d=>d(c))}function o(){const u=[];let l=a();for(;l&&(u.push(l),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");l=a()}return c=>u.some(d=>d(c))}}function vc(e){return!!e&&!!e.match(/[\w\.:]+/)}function iS(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 Qp(e){typeof e.dispose=="function"&&e.dispose()}var Zr=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},sS=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},aS=class{constructor(){O(this,"_references",[]);O(this,"_seenReferenceKeys",new Set);O(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))}},oS=class{constructor(e,t){O(this,"seenFullScopeRequests",new Set);O(this,"seenPartialScopeRequests",new Set);O(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Zr(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new aS;for(const n of e)uS(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Zr){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 uS(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 s=n.lookup(t);e instanceof Zr?Fi({baseGrammar:s,selfGrammar:i},r):ao(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);const a=n.injections(e.scopeName);if(a)for(const o of a)r.add(new Zr(o))}function ao(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];ns([r],t,n)}}function Fi(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ns(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ns(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ns(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?$p({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ns(r.patterns,{...t,repository:i},n);const s=r.include;if(!s)continue;const a=Kp(s);switch(a.kind){case 0:Fi({...t,selfGrammar:t.baseGrammar},n);break;case 1:Fi(t,n);break;case 2:ao(a.ruleName,{...t,repository:i},n);break;case 3:case 4:const o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){const u={baseGrammar:t.baseGrammar,selfGrammar:o,repository:i};a.kind===4?ao(a.ruleName,u,n):Fi(u,n)}else a.kind===4?n.add(new sS(a.scopeName,a.ruleName)):n.add(new Zr(a.scopeName));break}}}var lS=class{constructor(){O(this,"kind",0)}},cS=class{constructor(){O(this,"kind",1)}},dS=class{constructor(e){O(this,"kind",2);this.ruleName=e}},hS=class{constructor(e){O(this,"kind",3);this.scopeName=e}},fS=class{constructor(e,t){O(this,"kind",4);this.scopeName=e,this.ruleName=t}};function Kp(e){if(e==="$base")return new lS;if(e==="$self")return new cS;const t=e.indexOf("#");if(t===-1)return new hS(e);if(t===0)return new dS(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new fS(n,r)}}var pS=/\\(\d+)/,Oc=/\\(\d+)/g,mS=-1,Xp=-2;var hi=class{constructor(e,t,n,r){O(this,"$location");O(this,"id");O(this,"_nameIsCapturing");O(this,"_name");O(this,"_contentNameIsCapturing");O(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Ai.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Ai.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${jp(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:Ai.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ai.replaceCaptures(this._contentName,e,t)}},gS=class extends hi{constructor(t,n,r,i,s){super(t,n,r,i);O(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=s}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!")}},bS=class extends hi{constructor(t,n,r,i,s){super(t,n,r,null);O(this,"_match");O(this,"captures");O(this,"_cachedCompiledPatterns");this._match=new Jr(i,this.id),this.captures=s,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 ei,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Pc=class extends hi{constructor(t,n,r,i,s){super(t,n,r,i);O(this,"hasMissingPatterns");O(this,"patterns");O(this,"_cachedCompiledPatterns");this.patterns=s.patterns,this.hasMissingPatterns=s.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 ei,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},oo=class extends hi{constructor(t,n,r,i,s,a,o,u,l,c){super(t,n,r,i);O(this,"_begin");O(this,"beginCaptures");O(this,"_end");O(this,"endHasBackReferences");O(this,"endCaptures");O(this,"applyEndPatternLast");O(this,"hasMissingPatterns");O(this,"patterns");O(this,"_cachedCompiledPatterns");this._begin=new Jr(s,this.id),this.beginCaptures=a,this._end=new Jr(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=u,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.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 ei;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}},rs=class extends hi{constructor(t,n,r,i,s,a,o,u,l){super(t,n,r,i);O(this,"_begin");O(this,"beginCaptures");O(this,"whileCaptures");O(this,"_while");O(this,"whileHasBackReferences");O(this,"hasMissingPatterns");O(this,"patterns");O(this,"_cachedCompiledPatterns");O(this,"_cachedCompiledWhilePatterns");this._begin=new Jr(s,this.id),this.beginCaptures=a,this.whileCaptures=u,this._while=new Jr(o,Xp),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.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 ei;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 ei,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},Zp=class He{static createCaptureRule(t,n,r,i,s){return t.registerRule(a=>new gS(n,a,r,i,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new bS(t.$vscodeTextmateLocation,t.id,t.name,t.match,He._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=$p({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new Pc(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,He._compilePatterns(s,n,r))}return t.while?new rs(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,He._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,He._compileCaptures(t.whileCaptures||t.captures,n,r),He._compilePatterns(t.patterns,n,r)):new oo(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,He._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,He._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,He._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let s=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);o>s&&(s=o)}for(let a=0;a<=s;a++)i[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);let u=0;t[a].patterns&&(u=He.getCompiledRuleId(t[a],n,r)),i[o]=He.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,u)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let s=0,a=t.length;s<a;s++){const o=t[s];let u=-1;if(o.include){const l=Kp(o.include);switch(l.kind){case 0:case 1:u=He.getCompiledRuleId(r[o.include],n,r);break;case 2:let c=r[l.ruleName];c&&(u=He.getCompiledRuleId(c,n,r));break;case 3:case 4:const d=l.scopeName,p=l.kind===4?l.ruleName:null,f=n.getExternalGrammar(d,r);if(f)if(p){let m=f.repository[p];m&&(u=He.getCompiledRuleId(m,n,f.repository))}else u=He.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else u=He.getCompiledRuleId(o,n,r);if(u!==-1){const l=n.getRule(u);let c=!1;if((l instanceof Pc||l instanceof oo||l instanceof rs)&&l.hasMissingPatterns&&l.patterns.length===0&&(c=!0),c)continue;i.push(u)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Jr=class Jp{constructor(t,n){O(this,"source");O(this,"ruleId");O(this,"hasAnchor");O(this,"hasBackReferences");O(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let i=0,s=[],a=!1;for(let o=0;o<r;o++)if(t.charAt(o)==="\\"&&o+1<r){const l=t.charAt(o+1);l==="z"?(s.push(t.substring(i,o)),s.push("$(?!\\n)(?<!\\n)"),i=o+2):(l==="A"||l==="G")&&(a=!0),o++}this.hasAnchor=a,i===0?this.source=t:(s.push(t.substring(i,r)),this.source=s.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=pS.test(this.source):this.hasBackReferences=!1}clone(){return new Jp(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 Oc.lastIndex=0,this.source.replace(Oc,(i,s)=>Gp(r[parseInt(s,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=[],s,a,o,u;for(s=0,a=this.source.length;s<a;s++)o=this.source.charAt(s),t[s]=o,n[s]=o,r[s]=o,i[s]=o,o==="\\"&&s+1<a&&(u=this.source.charAt(s+1),u==="A"?(t[s+1]="￿",n[s+1]="￿",r[s+1]="A",i[s+1]="A"):u==="G"?(t[s+1]="￿",n[s+1]="G",r[s+1]="￿",i[s+1]="G"):(t[s+1]=u,n[s+1]=u,r[s+1]=u,i[s+1]=u),s++);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}},ei=class{constructor(){O(this,"_items");O(this,"_hasAnchors");O(this,"_cached");O(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 Dc(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 Dc(e,r,this._items.map(i=>i.ruleId))}},Dc=class{constructor(e,t,n){O(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(`
132
- `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},ma=class{constructor(e,t){this.languageId=e,this.tokenType=t}},jt,ES=(jt=class{constructor(t,n){O(this,"_defaultAttributes");O(this,"_embeddedLanguagesMatcher");O(this,"_getBasicScopeAttributes",new Wp(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new ma(n,r)}));this._defaultAttributes=new ma(t,8),this._embeddedLanguagesMatcher=new _S(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?jt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(jt.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!")}},O(jt,"_NULL_SCOPE_METADATA",new ma(0,0)),O(jt,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),jt),_S=class{constructor(e){O(this,"values");O(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>Gp(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])}},Mc=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function em(e,t,n,r,i,s,a,o){const u=t.content.length;let l=!1,c=-1;if(a){const f=TS(e,t,n,r,i,s);i=f.stack,r=f.linePos,n=f.isFirstLine,c=f.anchorPosition}const d=Date.now();for(;!l;){if(o!==0&&Date.now()-d>o)return new Mc(i,!0);p()}return new Mc(i,!1);function p(){const f=yS(e,t,n,r,i,c);if(!f){s.produce(i,u),l=!0;return}const m=f.captureIndices,b=f.matchedRuleId,y=m&&m.length>0?m[0].end>r:!1;if(b===mS){const g=i.getRule(e);s.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Dr(e,t,n,i,s,g.endCaptures,m),s.produce(i,m[0].end);const I=i;if(i=i.parent,c=I.getAnchorPos(),!y&&I.getEnterPos()===r){i=I,s.produce(i,u),l=!0;return}}else{const g=e.getRule(b);s.produce(i,m[0].start);const I=i,C=g.getName(t.content,m),v=i.contentNameScopesList.pushAttributed(C,e);if(i=i.push(b,r,c,m[0].end===u,null,v,v),g instanceof oo){const P=g;Dr(e,t,n,i,s,P.beginCaptures,m),s.produce(i,m[0].end),c=m[0].end;const N=P.getContentName(t.content,m),B=v.pushAttributed(N,e);if(i=i.withContentNameScopesList(B),P.endHasBackReferences&&(i=i.withEndRule(P.getEndWithResolvedBackReferences(t.content,m))),!y&&I.hasSameRuleAs(i)){i=i.pop(),s.produce(i,u),l=!0;return}}else if(g instanceof rs){const P=g;Dr(e,t,n,i,s,P.beginCaptures,m),s.produce(i,m[0].end),c=m[0].end;const N=P.getContentName(t.content,m),B=v.pushAttributed(N,e);if(i=i.withContentNameScopesList(B),P.whileHasBackReferences&&(i=i.withEndRule(P.getWhileWithResolvedBackReferences(t.content,m))),!y&&I.hasSameRuleAs(i)){i=i.pop(),s.produce(i,u),l=!0;return}}else if(Dr(e,t,n,i,s,g.captures,m),s.produce(i,m[0].end),i=i.pop(),!y){i=i.safePop(),s.produce(i,u),l=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function TS(e,t,n,r,i,s){let a=i.beginRuleCapturedEOL?0:-1;const o=[];for(let u=i;u;u=u.pop()){const l=u.getRule(e);l instanceof rs&&o.push({rule:l,stack:u})}for(let u=o.pop();u;u=o.pop()){const{ruleScanner:l,findOptions:c}=AS(u.rule,e,u.stack.endRule,n,r===a),d=l.findNextMatchSync(t,r,c);if(d){if(d.ruleId!==Xp){i=u.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(s.produce(u.stack,d.captureIndices[0].start),Dr(e,t,n,u.stack,s,u.rule.whileCaptures,d.captureIndices),s.produce(u.stack,d.captureIndices[0].end),a=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{i=u.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:a,isFirstLine:n}}function yS(e,t,n,r,i,s){const a=xS(e,t,n,r,i,s),o=e.getInjections();if(o.length===0)return a;const u=kS(o,e,t,n,r,i,s);if(!u)return a;if(!a)return u;const l=a.captureIndices[0].start,c=u.captureIndices[0].start;return c<l||u.priorityMatch&&c===l?u:a}function xS(e,t,n,r,i,s){const a=i.getRule(e),{ruleScanner:o,findOptions:u}=tm(a,e,i.endRule,n,r===s),l=o.findNextMatchSync(t,r,u);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function kS(e,t,n,r,i,s,a){let o=Number.MAX_VALUE,u=null,l,c=0;const d=s.contentNameScopesList.getScopeNames();for(let p=0,f=e.length;p<f;p++){const m=e[p];if(!m.matcher(d))continue;const b=t.getRule(m.ruleId),{ruleScanner:y,findOptions:g}=tm(b,t,null,r,i===a),I=y.findNextMatchSync(n,i,g);if(!I)continue;const C=I.captureIndices[0].start;if(!(C>=o)&&(o=C,u=I.captureIndices,l=I.ruleId,c=m.priority,o===i))break}return u?{priorityMatch:c===-1,captureIndices:u,matchedRuleId:l}:null}function tm(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function AS(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Dr(e,t,n,r,i,s,a){if(s.length===0)return;const o=t.content,u=Math.min(s.length,a.length),l=[],c=a[0].end;for(let d=0;d<u;d++){const p=s[d];if(p===null)continue;const f=a[d];if(f.length===0)continue;if(f.start>c)break;for(;l.length>0&&l[l.length-1].endPos<=f.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,f.start):i.produce(r,f.start),p.retokenizeCapturedWithRuleId){const b=p.getName(o,a),y=r.contentNameScopesList.pushAttributed(b,e),g=p.getContentName(o,a),I=y.pushAttributed(g,e),C=r.push(p.retokenizeCapturedWithRuleId,f.start,-1,!1,null,y,I),v=e.createOnigString(o.substring(0,f.end));em(e,v,n&&f.start===0,f.start,C,i,!1,0),Qp(v);continue}const m=p.getName(o,a);if(m!==null){const y=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);l.push(new CS(y,f.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var CS=class{constructor(e,t){O(this,"scopes");O(this,"endPos");this.scopes=e,this.endPos=t}};function wS(e,t,n,r,i,s,a,o){return new SS(e,t,n,r,i,s,a,o)}function Bc(e,t,n,r,i){const s=ts(t,is),a=Zp.getCompiledRuleId(n,r,i.repository);for(const o of s)e.push({debugSelector:t,matcher:o.matcher,ruleId:a,grammar:i,priority:o.priority})}function is(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(IS(t[i],r))return n=i+1,!0;return!1})}function IS(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 SS=class{constructor(e,t,n,r,i,s,a,o){O(this,"_rootId");O(this,"_lastRuleId");O(this,"_ruleId2desc");O(this,"_includedGrammars");O(this,"_grammarRepository");O(this,"_grammar");O(this,"_injections");O(this,"_basicScopeAttributesProvider");O(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=o,this._basicScopeAttributesProvider=new ES(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=Fc(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const u of Object.keys(i)){const l=ts(u,is);for(const c of l)this._tokenTypeMatchers.push({matcher:c.matcher,type:i[u]})}}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 a in i)Bc(t,a,i[a],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(a=>{const o=this.getExternalGrammar(a);if(o){const u=o.injectionSelector;u&&Bc(t,u,o,this,o)}})}return t.sort((i,s)=>i.priority-s.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]=Fc(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=Zp.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===uo.NULL){i=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),c=this.themeProvider.getDefaults(),d=or.set(0,l.languageId,l.tokenType,null,c.fontStyle,c.foregroundId,c.backgroundId),p=this.getRule(this._rootId).getName(null,null);let f;p?f=Gr.createRootAndLookUpScopeName(p,d,this):f=Gr.createRoot("unknown",d),t=new uo(null,this._rootId,-1,-1,!1,null,f,f)}else i=!1,t.reset();e=e+`
133
- `;const s=this.createOnigString(e),a=s.content.length,o=new LS(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),u=em(this,s,i,0,t,o,!0,r);return Qp(s),{lineLength:a,lineTokens:o,ruleStack:u.stack,stoppedEarly:u.stoppedEarly}}};function Fc(e,t){return e=qI(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 Gr=class It{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 s of n)i=pa.push(i,s.scopeNames),r=new It(r,i,s.encodedTokenAttributes);return r}static createRoot(t,n){return new It(null,new pa(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),s=new pa(null,t),a=r.themeProvider.themeMatch(s),o=It.mergeAttributes(n,i,a);return new It(null,s,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return It.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,s=0,a=0;return r!==null&&(i=r.fontStyle,s=r.foregroundId,a=r.backgroundId),or.set(t,n.languageId,n.tokenType,null,i,s,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return It._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const s of r)i=It._pushAttributed(i,s,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),s=t.scopePath.push(n),a=r.themeProvider.themeMatch(s),o=It.mergeAttributes(t.tokenAttributes,i,a);return new It(t,s,o)}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}},ft,uo=(ft=class{constructor(t,n,r,i,s,a,o,u){O(this,"_stackElementBrand");O(this,"_enterPos");O(this,"_anchorPos");O(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=u,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(t){return t===null?!1:ft._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Gr.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(){ft._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,a,o){return new ft(this,t,n,r,i,s,a,o)}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 ft(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=Gr.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new ft(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Gr.fromExtension(r,n.contentNameScopesList))}},O(ft,"NULL",new ft(null,0,0,0,!1,null,null,null)),ft),NS=class{constructor(e,t){O(this,"balancedBracketScopes");O(this,"unbalancedBracketScopes");O(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):ts(n,is).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>ts(n,is).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}},LS=class{constructor(e,t,n,r){O(this,"_emitBinaryTokens");O(this,"_lineText");O(this,"_tokens");O(this,"_binaryTokens");O(this,"_lastTokenEndIndex");O(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,s=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const a=(e==null?void 0:e.getScopeNames())??[];for(const o of this._tokenTypeOverrides)o.matcher(a)&&(i=or.set(i,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(a))}if(s&&(i=or.set(i,0,8,s,-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}},RS=class{constructor(e,t){O(this,"_grammars",new Map);O(this,"_rawGrammars",new Map);O(this,"_injectionGrammars",new Map);O(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 s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,wS(e,s,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},vS=class{constructor(t){O(this,"_options");O(this,"_syncRegistry");O(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new RS(es.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(es.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 NS(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,s){const a=new oS(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(o=>this._loadSingleGrammar(o.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,r,i,s)}_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,s=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,s)}},lo=uo.NULL;const OS=/["&'<>`]/g,PS=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,DS=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,MS=/[|\\{}()[\]^$+*?.]/g,Hc=new WeakMap;function BS(e,t){if(e=e.replace(t.subset?FS(t.subset):OS,r),t.subset||t.escapeOnly)return e;return e.replace(PS,n).replace(DS,r);function n(i,s,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(s+2),t)}function r(i,s,a){return t.format(i.charCodeAt(0),a.charCodeAt(s+1),t)}}function FS(e){let t=Hc.get(e);return t||(t=HS(e),Hc.set(e,t)),t}function HS(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(MS,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const US=/[\dA-Fa-f]/;function $S(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!US.test(String.fromCharCode(t))?r:r+";"}const jS=/\d/;function VS(e,t,n){const r="&#"+String(e);return n&&t&&!jS.test(String.fromCharCode(t))?r:r+";"}const zS=["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"],ga={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:"€"},GS=["cent","copy","divide","gt","lt","not","para","times"],nm={}.hasOwnProperty,co={};let Ci;for(Ci in ga)nm.call(ga,Ci)&&(co[ga[Ci]]=Ci);const WS=/[^\dA-Za-z]/;function qS(e,t,n,r){const i=String.fromCharCode(e);if(nm.call(co,i)){const s=co[i],a="&"+s;return n&&zS.includes(s)&&!GS.includes(s)&&(!r||t&&t!==61&&WS.test(String.fromCharCode(t)))?a:a+";"}return""}function YS(e,t,n){let r=$S(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=qS(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=VS(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function rr(e,t){return BS(e,Object.assign({format:YS},t))}const QS=/^>|^->|<!--|-->|--!>|<!-$/g,KS=[">"],XS=["<",">"];function ZS(e,t,n,r){return r.settings.bogusComments?"<?"+rr(e.value,Object.assign({},r.settings.characterReferences,{subset:KS}))+">":"<!--"+e.value.replace(QS,i)+"-->";function i(s){return rr(s,Object.assign({},r.settings.characterReferences,{subset:XS}))}}function JS(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}const Oe=im(1),rm=im(-1),e3=[];function im(e){return t;function t(n,r,i){const s=n?n.children:e3;let a=(r||0)+e,o=s[a];if(!i)for(;o&&Cs(o);)a+=e,o=s[a];return o}}const t3={}.hasOwnProperty;function sm(e){return t;function t(n,r,i){return t3.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const gu=sm({body:r3,caption:ba,colgroup:ba,dd:o3,dt:a3,head:ba,html:n3,li:s3,optgroup:u3,option:l3,p:i3,rp:Uc,rt:Uc,tbody:d3,td:$c,tfoot:h3,th:$c,thead:c3,tr:f3});function ba(e,t,n){const r=Oe(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Cs(r.value.charAt(0)))}function n3(e,t,n){const r=Oe(n,t);return!r||r.type!=="comment"}function r3(e,t,n){const r=Oe(n,t);return!r||r.type!=="comment"}function i3(e,t,n){const r=Oe(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 s3(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&r.tagName==="li"}function a3(e,t,n){const r=Oe(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function o3(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Uc(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function u3(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function l3(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function c3(e,t,n){const r=Oe(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function d3(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function h3(e,t,n){return!Oe(n,t)}function f3(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function $c(e,t,n){const r=Oe(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const p3=sm({body:b3,colgroup:E3,head:g3,html:m3,tbody:_3});function m3(e){const t=Oe(e,-1);return!t||t.type!=="comment"}function g3(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 b3(e){const t=Oe(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Cs(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function E3(e,t,n){const r=rm(n,t),i=Oe(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&gu(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function _3(e,t,n){const r=rm(n,t),i=Oe(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&gu(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const wi={name:[[`
134
- \f\r &/=>`.split(""),`
135
- \f\r "&'/=>\``.split("")],[`\0
136
- \f\r "&'/<=>`.split(""),`\0
137
- \f\r "&'/<=>\``.split("")]],unquoted:[[`
138
- \f\r &>`.split(""),`\0
139
- \f\r "&'<=>\``.split("")],[`\0
140
- \f\r "&'<=>\``.split(""),`\0
141
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function T3(e,t,n,r){const i=r.schema,s=i.space==="svg"?!1:r.settings.omitOptionalTags;let a=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const o=[];let u;i.space==="html"&&e.tagName==="svg"&&(r.schema=vt);const l=y3(r,e.properties),c=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,c&&(a=!1),(l||!s||!p3(e,t,n))&&(o.push("<",e.tagName,l?" "+l:""),a&&(i.space==="svg"||r.settings.closeSelfClosing)&&(u=l.charAt(l.length-1),(!r.settings.tightSelfClosing||u==="/"||u&&u!=='"'&&u!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(c),!a&&(!s||!gu(e,t,n))&&o.push("</"+e.tagName+">"),o.join("")}function y3(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const s=x3(e,i,t[i]);s&&n.push(s)}}for(;++r<n.length;){const s=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function x3(e,t,n){const r=si(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1;let a=e.quote,o;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 u=rr(r.attribute,Object.assign({},e.settings.characterReferences,{subset:wi.name[i][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Ro:vo)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?u:(e.settings.preferUnquoted&&(o=rr(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:wi.unquoted[i][s]}))),o!==n&&(e.settings.quoteSmart&&qi(n,a)>qi(n,e.alternative)&&(a=e.alternative),o=a+rr(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?wi.single:wi.double)[i][s],attribute:!0}))+a),u+(o&&"="+o))}const k3=["<","&"];function am(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:rr(e.value,Object.assign({},r.settings.characterReferences,{subset:k3}))}function A3(e,t,n,r){return r.settings.allowDangerousHtml?e.value:am(e,t,n,r)}function C3(e,t,n,r){return r.all(e)}const w3=Po("type",{invalid:I3,unknown:S3,handlers:{comment:ZS,doctype:JS,element:T3,raw:A3,root:C3,text:am}});function I3(e){throw new Error("Expected node, not `"+e+"`")}function S3(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const N3={},L3={},R3=[];function v3(e,t){const n=t||N3,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:O3,all:P3,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||zd,characterReferences:n.characterReferences||L3,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?vt:lr,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function O3(e,t,n){return w3(e,t,n,this)}function P3(e){const t=[],n=e&&e.children||R3;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function ss(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,s]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof s=="string"?n[i]=s:i===r&&Object.assign(n,s);return n}function on(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function D3(e){return Array.isArray(e)?e:[e]}async function om(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function bu(e){return!e||["plaintext","txt","text","plain"].includes(e)}function um(e){return e==="ansi"||bu(e)}function Eu(e){return e==="none"}function lm(e){return Eu(e)}function cm(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 Ns(e,t=!1){var s;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const i=[];for(let a=0;a<n.length;a+=2){const o=t?n[a]+(n[a+1]||""):n[a];i.push([o,r]),r+=n[a].length,r+=((s=n[a+1])==null?void 0:s.length)||0}return i}function M3(e){const t=Ns(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=i,a=0;for(const o of t){if(s<o.length)break;s-=o.length,a++}return{line:a,character:s}}function r(i,s){let a=0;for(let o=0;o<i;o++)a+=t[o].length;return a+=s,a}return{lines:t,indexToPos:n,posToIndex:r}}const _u="light-dark()",B3=["color","background-color"];function F3(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 H3(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 s=n.filter(a=>i.offset<a&&a<i.offset+i.content.length).map(a=>a-i.offset).sort((a,o)=>a-o);return s.length?F3(i,s):i})):e}function U3(e,t,n,r,i="css-vars"){const s={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(c=>as(e.variants[c])),o=new Set(a.flatMap(c=>Object.keys(c))),u={},l=(c,d)=>{const p=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[c]+(d==="color"?"":p)};return a.forEach((c,d)=>{for(const p of o){const f=c[p]||"inherit";if(d===0&&r&&B3.includes(p))if(r===_u&&a.length>1){const m=t.findIndex(I=>I==="light"),b=t.findIndex(I=>I==="dark");if(m===-1||b===-1)throw new Ne('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const y=a[m][p]||"inherit",g=a[b][p]||"inherit";u[p]=`light-dark(${y}, ${g})`,i==="css-vars"&&(u[l(d,p)]=f)}else u[p]=f;else i==="css-vars"&&(u[l(d,p)]=f)}}),s.htmlStyle=u,s}function as(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Ue.Italic&&(t["font-style"]="italic"),e.fontStyle&Ue.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Ue.Underline&&n.push("underline"),e.fontStyle&Ue.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function ho(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const dm=new WeakMap;function Ls(e,t){dm.set(e,t)}function ti(e){return dm.get(e)}class mr{constructor(...t){O(this,"_stacks",{});O(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 mr(Object.fromEntries(D3(n).map(r=>[r,lo])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return $3(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function $3(e){const t=[],n=new Set;function r(i){var a;if(n.has(i))return;n.add(i);const s=(a=i==null?void 0:i.nameScopesList)==null?void 0:a.scopeName;s&&t.push(s),i.parent&&r(i.parent)}return r(e),t}function j3(e,t){if(!(e instanceof mr))throw new Ne("Invalid grammar state");return e.getInternalStack(t)}function V3(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new Ne(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...i.indexToPos(a),offset:a}}else{const o=i.lines[a.line];if(o===void 0)throw new Ne(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${i.lines.length}`);let u=a.character;if(u<0&&(u=o.length+u),u<0||u>o.length)throw new Ne(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${o.length}`);return{...a,character:u,offset:i.posToIndex(a.line,u)}}};const i=M3(n.source),s=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));z3(s),e.set(n.meta,{decorations:s,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var a;if(!((a=this.options.decorations)!=null&&a.length))return;const i=t(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]);return H3(n,i)},code(n){var c;if(!((c=this.options.decorations)!=null&&c.length))return;const r=t(this),i=Array.from(n.children).filter(d=>d.type==="element"&&d.tagName==="span");if(i.length!==r.converter.lines.length)throw new Ne(`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 s(d,p,f,m){const b=i[d];let y="",g=-1,I=-1;if(p===0&&(g=0),f===0&&(I=0),f===Number.POSITIVE_INFINITY&&(I=b.children.length),g===-1||I===-1)for(let v=0;v<b.children.length;v++)y+=hm(b.children[v]),g===-1&&y.length===p&&(g=v+1),I===-1&&y.length===f&&(I=v+1);if(g===-1)throw new Ne(`Failed to find start index for decoration ${JSON.stringify(m.start)}`);if(I===-1)throw new Ne(`Failed to find end index for decoration ${JSON.stringify(m.end)}`);const C=b.children.slice(g,I);if(!m.alwaysWrap&&C.length===b.children.length)o(b,m,"line");else if(!m.alwaysWrap&&C.length===1&&C[0].type==="element")o(C[0],m,"token");else{const v={type:"element",tagName:"span",properties:{},children:C};o(v,m,"wrapper"),b.children.splice(g,C.length,v)}}function a(d,p){i[d]=o(i[d],p,"line")}function o(d,p,f){var y;const m=p.properties||{},b=p.transform||(g=>g);return d.tagName=p.tagName||"span",d.properties={...d.properties,...m,class:d.properties.class},(y=p.properties)!=null&&y.class&&cm(d,p.properties.class),d=b(d,f)||d,d}const u=[],l=r.decorations.sort((d,p)=>p.start.offset-d.start.offset||d.end.offset-p.end.offset);for(const d of l){const{start:p,end:f}=d;if(p.line===f.line)s(p.line,p.character,f.character,d);else if(p.line<f.line){s(p.line,p.character,Number.POSITIVE_INFINITY,d);for(let m=p.line+1;m<f.line;m++)u.unshift(()=>a(m,d));s(f.line,0,f.character,d)}}u.forEach(d=>d())}}}function z3(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Ne(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],s=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,a=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,o=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,u=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(s||a||o||u){if(s&&a||o&&u||o&&n.start.offset===n.end.offset||a&&i.start.offset===i.end.offset)continue;throw new Ne(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function hm(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(hm).join(""):""}const G3=[V3()];function os(e){const t=W3(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...G3]}function W3(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 wn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ea={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function q3(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 jc(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 Y3(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)Ea[r]&&t.push({type:"setDecoration",value:Ea[r]});else if(r<=29){const i=Ea[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:wn[r-30]}});else if(r===38){const i=jc(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:wn[r-40]}});else if(r===48){const i=jc(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:wn[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:wn[r-100+8]}})}return t}function Q3(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let s=0;do{const a=q3(r,s),o=a.sequence?r.substring(s,a.startPosition):r.substring(s);if(o.length>0&&i.push({value:o,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const u=Y3(a.sequence);for(const l of u)l.type==="resetAll"?(e=null,t=null,n.clear()):l.type==="resetForegroundColor"?e=null:l.type==="resetBackgroundColor"?t=null:l.type==="resetDecoration"&&n.delete(l.value);for(const l of u)l.type==="setForegroundColor"?e=l.value:l.type==="setBackgroundColor"?t=l.value:l.type==="setDecoration"&&n.add(l.value)}s=a.position}while(s<r.length);return i}}}var K3={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 X3(e=K3){function t(o){return e[o]}function n(o){return`#${o.map(u=>Math.max(0,Math.min(u,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let l=0;l<wn.length;l++)r.push(t(wn[l]));let o=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let c=0;c<6;c++)for(let d=0;d<6;d++)r.push(n([o[l],o[c],o[d]]));let u=8;for(let l=0;l<24;l++,u+=10)r.push(n([u,u,u]));return r}function s(o){return i()[o]}function a(o){switch(o.type){case"named":return t(o.name);case"rgb":return n(o.rgb);case"table":return s(o.index)}}return{value:a}}const Z3={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 J3(e,t,n){const r=ss(e,n),i=Ns(t),s=Object.fromEntries(wn.map(u=>{var d;const l=`terminal.ansi${u[0].toUpperCase()}${u.substring(1)}`,c=(d=e.colors)==null?void 0:d[l];return[u,c||Z3[u]]})),a=X3(s),o=Q3();return i.map(u=>o.parse(u[0]).map(l=>{let c,d;l.decorations.has("reverse")?(c=l.background?a.value(l.background):e.bg,d=l.foreground?a.value(l.foreground):e.fg):(c=l.foreground?a.value(l.foreground):e.fg,d=l.background?a.value(l.background):void 0),c=on(c,r),d=on(d,r),l.decorations.has("dim")&&(c=eN(c));let p=Ue.None;return l.decorations.has("bold")&&(p|=Ue.Bold),l.decorations.has("italic")&&(p|=Ue.Italic),l.decorations.has("underline")&&(p|=Ue.Underline),l.decorations.has("strikethrough")&&(p|=Ue.Strikethrough),{content:l.value,offset:u[1],color:c,bgColor:d,fontStyle:p}}))}function eN(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],s=r[1],a=r[2],o=r[3],u=Math.round(Number.parseInt(`${o}${o}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${s}${s}${a}${a}${u}`}else if(r.length===3){const i=r[0],s=r[1],a=r[2];return`#${i}${i}${s}${s}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Tu(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(bu(i)||Eu(r))return Ns(t).map(u=>[{content:u[0],offset:u[1]}]);const{theme:s,colorMap:a}=e.setTheme(r);if(i==="ansi")return J3(s,t,n);const o=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new Ne(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(s.name))throw new Ne(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return nN(t,o,s,a,n)}function tN(...e){if(e.length===2)return ti(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(bu(i)||Eu(s))throw new Ne("Plain language does not have grammar state");if(i==="ansi")throw new Ne("ANSI language does not have grammar state");const{theme:a,colorMap:o}=t.setTheme(s),u=t.getLanguage(i);return new mr(yu(n,u,a,o,r).stateStack,u.name,a.name)}function nN(e,t,n,r,i){const s=yu(e,t,n,r,i),a=new mr(s.stateStack,t.name,n.name);return Ls(s.tokens,a),s.tokens}function yu(e,t,n,r,i){const s=ss(n,i),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500}=i,u=Ns(e);let l=i.grammarState?j3(i.grammarState,n.name)??lo:i.grammarContextCode!=null?yu(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:lo,c=[];const d=[];for(let p=0,f=u.length;p<f;p++){const[m,b]=u[p];if(m===""){c=[],d.push([]);continue}if(a>0&&m.length>=a){c=[],d.push([{content:m,offset:b,color:"",fontStyle:0}]);continue}let y,g,I;i.includeExplanation&&(y=t.tokenizeLine(m,l,o),g=y.tokens,I=0);const C=t.tokenizeLine2(m,l,o),v=C.tokens.length/2;for(let P=0;P<v;P++){const N=C.tokens[2*P],B=P+1<v?C.tokens[2*P+2]:m.length;if(N===B)continue;const M=C.tokens[2*P+1],z=on(r[or.getForeground(M)],s),L=or.getFontStyle(M),V={content:m.substring(N,B),offset:b+N,color:z,fontStyle:L};if(i.includeExplanation){const G=[];if(i.includeExplanation!=="scopeName")for(const Y of n.settings){let $;switch(typeof Y.scope){case"string":$=Y.scope.split(/,/).map(W=>W.trim());break;case"object":$=Y.scope;break;default:continue}G.push({settings:Y,selectors:$.map(W=>W.split(/ /))})}V.explanation=[];let Z=0;for(;N+Z<B;){const Y=g[I],$=m.substring(Y.startIndex,Y.endIndex);Z+=$.length,V.explanation.push({content:$,scopes:i.includeExplanation==="scopeName"?rN(Y.scopes):iN(G,Y.scopes)}),I+=1}}c.push(V)}d.push(c),c=[],l=C.ruleStack}return{tokens:d,stateStack:l}}function rN(e){return e.map(t=>({scopeName:t}))}function iN(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];n[r]={scopeName:s,themeMatches:aN(e,s,t.slice(0,r))}}return n}function Vc(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function sN(e,t,n){if(!Vc(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Vc(e[r],n[i])&&(r-=1),i-=1;return r===-1}function aN(e,t,n){const r=[];for(const{selectors:i,settings:s}of e)for(const a of i)if(sN(a,t,n)){r.push(s);break}return r}function fm(e,t,n){const r=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),i=r.map(u=>{const l=Tu(e,t,{...n,theme:u.theme}),c=ti(l),d=typeof u.theme=="string"?u.theme:u.theme.name;return{tokens:l,state:c,theme:d}}),s=oN(...i.map(u=>u.tokens)),a=s[0].map((u,l)=>u.map((c,d)=>{const p={content:c.content,variants:{},offset:c.offset};return"includeExplanation"in n&&n.includeExplanation&&(p.explanation=c.explanation),s.forEach((f,m)=>{const{content:b,explanation:y,offset:g,...I}=f[l][d];p.variants[r[m].color]=I}),p})),o=i[0].state?new mr(Object.fromEntries(i.map(u=>{var l;return[u.theme,(l=u.state)==null?void 0:l.getInternalStack(u.theme)]})),i[0].state.lang):void 0;return o&&Ls(a,o),a}function oN(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(u=>u[r]),s=t.map(()=>[]);t.forEach((u,l)=>u.push(s[l]));const a=i.map(()=>0),o=i.map(u=>u[0]);for(;o.every(u=>u);){const u=Math.min(...o.map(l=>l.content.length));for(let l=0;l<n;l++){const c=o[l];c.content.length===u?(s[l].push(c),a[l]+=1,o[l]=i[l][a[l]]):(s[l].push({...c,content:c.content.slice(0,u)}),o[l]={...c,content:c.content.slice(u),offset:c.offset+u})}}}return t}function us(e,t,n){let r,i,s,a,o,u;if("themes"in n){const{defaultColor:l="light",cssVariablePrefix:c="--shiki-",colorsRendering:d="css-vars"}=n,p=Object.entries(n.themes).filter(g=>g[1]).map(g=>({color:g[0],theme:g[1]})).sort((g,I)=>g.color===l?-1:I.color===l?1:0);if(p.length===0)throw new Ne("`themes` option must not be empty");const f=fm(e,t,n);if(u=ti(f),l&&_u!==l&&!p.find(g=>g.color===l))throw new Ne(`\`themes\` option must contain the defaultColor key \`${l}\``);const m=p.map(g=>e.getTheme(g.theme)),b=p.map(g=>g.color);s=f.map(g=>g.map(I=>U3(I,b,c,l,d))),u&&Ls(s,u);const y=p.map(g=>ss(g.theme,n));i=zc(p,m,y,c,l,"fg",d),r=zc(p,m,y,c,l,"bg",d),a=`shiki-themes ${m.map(g=>g.name).join(" ")}`,o=l?void 0:[i,r].join(";")}else if("theme"in n){const l=ss(n.theme,n);s=Tu(e,t,n);const c=e.getTheme(n.theme);r=on(c.bg,l),i=on(c.fg,l),a=c.name,u=ti(s)}else throw new Ne("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:a,rootStyle:o,grammarState:u}}function zc(e,t,n,r,i,s,a){return e.map((o,u)=>{const l=on(t[u][s],n[u])||"inherit",c=`${r+o.color}${s==="bg"?"-bg":""}:${l}`;if(u===0&&i){if(i===_u&&e.length>1){const d=e.findIndex(b=>b.color==="light"),p=e.findIndex(b=>b.color==="dark");if(d===-1||p===-1)throw new Ne('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const f=on(t[d][s],n[d])||"inherit",m=on(t[p][s],n[p])||"inherit";return`light-dark(${f}, ${m});${c}`}return l}return a==="css-vars"?c:null}).filter(o=>!!o).join(";")}function ls(e,t,n,r={meta:{},options:n,codeToHast:(i,s)=>ls(e,i,s),codeToTokens:(i,s)=>us(e,i,s)}){var m,b;let i=t;for(const y of os(n))i=((m=y.preprocess)==null?void 0:m.call(r,i,n))||i;let{tokens:s,fg:a,bg:o,themeName:u,rootStyle:l,grammarState:c}=us(e,i,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:p=!1}=n;d===!0?s=lN(s):d==="never"&&(s=cN(s)),p&&(s=dN(s));const f={...r,get source(){return i}};for(const y of os(n))s=((b=y.tokens)==null?void 0:b.call(f,s))||s;return uN(s,{...n,fg:a,bg:o,themeName:u,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},f,c)}function uN(e,t,n,r=ti(e)){var b,y,g,I;const i=os(t),s=[],a={type:"root",children:[]},{structure:o="classic",tabindex:u="0"}=t,l={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?l.style=t.rootStyle:l.style=`background-color:${t.bg};color:${t.fg}`),u!==!1&&u!=null&&(l.tabindex=u.toString());for(const[C,v]of Object.entries(t.meta||{}))C.startsWith("_")||(l[C]=v);let c={type:"element",tagName:"pre",properties:l,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:s};const p=[],f={...n,structure:o,addClassToHast:cm,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return c},get code(){return d},get lines(){return p}};if(e.forEach((C,v)=>{var B,M;v&&(o==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&s.push({type:"text",value:`
142
- `}));let P={type:"element",tagName:"span",properties:{class:"line"},children:[]},N=0;for(const z of C){let L={type:"element",tagName:"span",properties:{...z.htmlAttrs},children:[{type:"text",value:z.content}]};const V=ho(z.htmlStyle||as(z));V&&(L.properties.style=V);for(const G of i)L=((B=G==null?void 0:G.span)==null?void 0:B.call(f,L,v+1,N,P,z))||L;o==="inline"?a.children.push(L):o==="classic"&&P.children.push(L),N+=z.content.length}if(o==="classic"){for(const z of i)P=((M=z==null?void 0:z.line)==null?void 0:M.call(f,P,v+1))||P;p.push(P),s.push(P)}else o==="inline"&&p.push(P)}),o==="classic"){for(const C of i)d=((b=C==null?void 0:C.code)==null?void 0:b.call(f,d))||d;c.children.push(d);for(const C of i)c=((y=C==null?void 0:C.pre)==null?void 0:y.call(f,c))||c;a.children.push(c)}else if(o==="inline"){const C=[];let v={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const B of a.children)B.type==="element"&&B.tagName==="br"?(C.push(v),v={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(B.type==="element"||B.type==="text")&&v.children.push(B);C.push(v);let N={type:"element",tagName:"code",properties:{},children:C};for(const B of i)N=((g=B==null?void 0:B.code)==null?void 0:g.call(f,N))||N;a.children=[];for(let B=0;B<N.children.length;B++){B>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const M=N.children[B];M.type==="element"&&a.children.push(...M.children)}}let m=a;for(const C of i)m=((I=C==null?void 0:C.root)==null?void 0:I.call(f,m))||m;return r&&Ls(m,r),m}function lN(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((s,a)=>{const u=!(s.fontStyle&&(s.fontStyle&Ue.Underline||s.fontStyle&Ue.Strikethrough));u&&s.content.match(/^\s+$/)&&t[a+1]?(i===void 0&&(i=s.offset),r+=s.content):r?(u?n.push({...s,offset:i,content:r+s.content}):n.push({content:r,offset:i},s),i=void 0,r=""):n.push(s)}),n})}function cN(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,s,a]=r;if(!i&&!a)return n;const o=[{...n,offset:n.offset+i.length,content:s}];return i&&o.unshift({content:i,offset:n.offset}),a&&o.push({content:a,offset:n.offset+i.length+s.length}),o}))}function dN(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],s=ho(i.htmlStyle||as(i)),a=ho(r.htmlStyle||as(r)),o=i.fontStyle&&(i.fontStyle&Ue.Underline||i.fontStyle&Ue.Strikethrough),u=r.fontStyle&&(r.fontStyle&Ue.Underline||r.fontStyle&Ue.Strikethrough);!o&&!u&&s===a?i.content+=r.content:n.push({...r})}return n})}const hN=v3;function fN(e,t,n){var s;const r={meta:{},options:n,codeToHast:(a,o)=>ls(e,a,o),codeToTokens:(a,o)=>us(e,a,o)};let i=hN(ls(e,t,n,r));for(const a of os(n))i=((s=a.postprocess)==null?void 0:s.call(r,i,n))||i;return i}const Gc={light:"#333333",dark:"#bbbbbb"},Wc={light:"#fffffe",dark:"#1e1e1e"},qc="__shiki_resolved";function xu(e){var o,u,l,c,d;if(e!=null&&e[qc])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 p=t.settings?t.settings.find(f=>!f.name&&!f.scope):void 0;(o=p==null?void 0:p.settings)!=null&&o.foreground&&(r=p.settings.foreground),(u=p==null?void 0:p.settings)!=null&&u.background&&(n=p.settings.background),!r&&((l=t==null?void 0:t.colors)!=null&&l["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((c=t==null?void 0:t.colors)!=null&&c["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?Gc.light:Gc.dark),n||(n=t.type==="light"?Wc.light:Wc.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 s=new Map;function a(p){var m;if(s.has(p))return s.get(p);i+=1;const f=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(m=t.colorReplacements)!=null&&m[`#${f}`]?a(p):(s.set(p,f),f)}t.settings=t.settings.map(p=>{var y,g;const f=((y=p.settings)==null?void 0:y.foreground)&&!p.settings.foreground.startsWith("#"),m=((g=p.settings)==null?void 0:g.background)&&!p.settings.background.startsWith("#");if(!f&&!m)return p;const b={...p,settings:{...p.settings}};if(f){const I=a(p.settings.foreground);t.colorReplacements[I]=p.settings.foreground,b.settings.foreground=I}if(m){const I=a(p.settings.background);t.colorReplacements[I]=p.settings.background,b.settings.background=I}return b});for(const p of Object.keys(t.colors||{}))if((p==="editor.foreground"||p==="editor.background"||p.startsWith("terminal.ansi"))&&!((d=t.colors[p])!=null&&d.startsWith("#"))){const f=a(t.colors[p]);t.colorReplacements[f]=t.colors[p],t.colors[p]=f}return Object.defineProperty(t,qc,{enumerable:!1,writable:!1,value:!0}),t}async function pm(e){return Array.from(new Set((await Promise.all(e.filter(t=>!um(t)).map(async t=>await om(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function mm(e){return(await Promise.all(e.map(async n=>lm(n)?null:xu(await om(n))))).filter(n=>!!n)}let pN=3;function mN(e,t=3){t>pN||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let er=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function gm(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 er(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class gN extends vS{constructor(n,r,i,s={}){super(n);O(this,"_resolvedThemes",new Map);O(this,"_resolvedGrammars",new Map);O(this,"_langMap",new Map);O(this,"_langGraph",new Map);O(this,"_textmateThemeCache",new WeakMap);O(this,"_loadedThemesCache",null);O(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=i,this._alias=s,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=xu(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=es.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){return n=gm(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var a,o,u,l;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(c=>{var d;return(d=c.embeddedLangsLazy)==null?void 0:d.includes(n.name)}));this._resolver.addLanguage(n);const i={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const s=this.loadGrammarWithConfiguration(n.scopeName,1,i);if(s.name=n.name,this._resolvedGrammars.set(n.name,s),n.aliases&&n.aliases.forEach(c=>{this._alias[c]=n.name}),this._loadedLanguagesCache=null,r.size)for(const c of r)this._resolvedGrammars.delete(c.name),this._loadedLanguagesCache=null,(o=(a=this._syncRegistry)==null?void 0:a._injectionGrammars)==null||o.delete(c.scopeName),(l=(u=this._syncRegistry)==null?void 0:u._grammars)==null||l.delete(c.scopeName),this.loadLanguage(this._langMap.get(c.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const s of n)this.resolveEmbeddedLanguages(s);const r=Array.from(this._langGraph.entries()),i=r.filter(([s,a])=>!a);if(i.length){const s=r.filter(([a,o])=>{if(!o)return!1;const u=o.embeddedLanguages||o.embeddedLangs;return u==null?void 0:u.some(l=>i.map(([c])=>c).includes(l))}).filter(a=>!i.includes(a));throw new er(`Missing languages ${i.map(([a])=>`\`${a}\``).join(", ")}, required by ${s.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[s,a]of r)this._resolver.addLanguage(a);for(const[s,a]of r)this.loadLanguage(a)}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 bN{constructor(t,n){O(this,"_langs",new Map);O(this,"_scopeToLang",new Map);O(this,"_injections",new Map);O(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 s=n.slice(0,i).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let Lr=0;function EN(e){Lr+=1,e.warnings!==!1&&Lr>=10&&Lr%10===0&&console.warn(`[Shiki] ${Lr} 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 er("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(xu),i=new bN(e.engine,n),s=new gN(i,r,n,e.langAlias);let a;function o(C){return gm(C,e.langAlias)}function u(C){g();const v=s.getGrammar(typeof C=="string"?C:C.name);if(!v)throw new er(`Language \`${C}\` not found, you may need to load it first`);return v}function l(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};g();const v=s.getTheme(C);if(!v)throw new er(`Theme \`${C}\` not found, you may need to load it first`);return v}function c(C){g();const v=l(C);a!==C&&(s.setTheme(v),a=C);const P=s.getColorMap();return{theme:v,colorMap:P}}function d(){return g(),s.getLoadedThemes()}function p(){return g(),s.getLoadedLanguages()}function f(...C){g(),s.loadLanguages(C.flat(1))}async function m(...C){return f(await pm(C))}function b(...C){g();for(const v of C.flat(1))s.loadTheme(v)}async function y(...C){return g(),b(await mm(C))}function g(){if(t)throw new er("Shiki instance has been disposed")}function I(){t||(t=!0,s.dispose(),Lr-=1)}return{setTheme:c,getTheme:l,getLanguage:u,getLoadedThemes:d,getLoadedLanguages:p,resolveLangAlias:o,loadLanguage:m,loadLanguageSync:f,loadTheme:y,loadThemeSync:b,dispose:I,[Symbol.dispose]:I}}async function _N(e){e.engine||mN("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([mm(e.themes||[]),pm(e.langs||[]),e.engine]);return EN({...e,themes:t,langs:n,engine:r})}async function TN(e){const t=await _N(e);return{getLastGrammarState:(...n)=>tN(t,...n),codeToTokensBase:(n,r)=>Tu(t,n,r),codeToTokensWithThemes:(n,r)=>fm(t,n,r),codeToTokens:(n,r)=>us(t,n,r),codeToHast:(n,r)=>ls(t,n,r),codeToHtml:(n,r)=>fN(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function yN(e){const t=e.langs,n=e.themes,r=e.engine;async function i(s){function a(d){var p;if(typeof d=="string"){if(d=((p=s.langAlias)==null?void 0:p[d])||d,um(d))return[];const f=t[d];if(!f)throw new Ne(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function o(d){if(lm(d))return"none";if(typeof d=="string"){const p=n[d];if(!p)throw new Ne(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return p}return d}const u=(s.themes??[]).map(d=>o(d)),l=(s.langs??[]).map(d=>a(d)),c=await TN({engine:s.engine??r(),...s,themes:u,langs:l});return{...c,loadLanguage(...d){return c.loadLanguage(...d.map(a))},loadTheme(...d){return c.loadTheme(...d.map(o))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}const ku=[{id:"abap",name:"ABAP",import:(()=>_(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>_(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>_(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>_(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([6,7,8,9])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>_(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([10,6,7,8,9,11])))},{id:"apache",name:"Apache Conf",import:(()=>_(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>_(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>_(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([12,7,8,9,13,14,15])))},{id:"applescript",name:"AppleScript",import:(()=>_(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>_(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>_(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>_(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>_(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([16,15,8,17,9,18,19])))},{id:"awk",name:"AWK",import:(()=>_(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>_(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>_(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>_(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>_(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>_(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>_(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>_(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>_(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([20,21,7,8,9,13,14,22,15])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>_(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([23,24])))},{id:"c",name:"C",import:(()=>_(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>_(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>_(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>_(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([25,26])))},{id:"clarity",name:"Clarity",import:(()=>_(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>_(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>_(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>_(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([27,7,8,9,14])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>_(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>_(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>_(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([28,8])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>_(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>_(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>_(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([29,30,31,32,22])))},{id:"crystal",name:"Crystal",import:(()=>_(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([33,7,8,9,22,32,34])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>_(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>_(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>_(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>_(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>_(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>_(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>_(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>_(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>_(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>_(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>_(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>_(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>_(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>_(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([35,17,7,8,9,21])))},{id:"elixir",name:"Elixir",import:(()=>_(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([36,7,8,9])))},{id:"elm",name:"Elm",import:(()=>_(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([37,31,32])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>_(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>_(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([38,7,8,9,39,40,13,14,22,41,17,42,19,29,30,31,32,34,43,44])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>_(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([45,46])))},{id:"fennel",name:"Fennel",import:(()=>_(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>_(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>_(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>_(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([47,48])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>_(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>_(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([49,46])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>_(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([50,51,52])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>_(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>_(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>_(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>_(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>_(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([53,54])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>_(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([55,34])))},{id:"gleam",name:"Gleam",import:(()=>_(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>_(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([56,8,17,9,7])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>_(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([57,17,9,8,7])))},{id:"glsl",name:"GLSL",import:(()=>_(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([31,32])))},{id:"gn",name:"GN",import:(()=>_(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>_(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>_(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>_(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([41,8,17,42,19])))},{id:"groovy",name:"Groovy",import:(()=>_(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>_(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([58,7,8,9,22])))},{id:"haml",name:"Ruby Haml",import:(()=>_(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([40,8,9])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>_(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([59,7,8,9,44])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>_(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>_(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>_(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>_(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>_(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>_(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([7,8,9])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>_(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([21,7,8,9])))},{id:"http",name:"HTTP",import:(()=>_(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([60,34,15,13,14,41,8,17,42,19])))},{id:"hurl",name:"Hurl",import:(()=>_(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([61,41,8,17,42,19,13,14,62])))},{id:"hxml",name:"HXML",import:(()=>_(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([63,64])))},{id:"hy",name:"Hy",import:(()=>_(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>_(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>_(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>_(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>_(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>_(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([65,7,8,9])))},{id:"jison",name:"Jison",import:(()=>_(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([66,8])))},{id:"json",name:"JSON",import:(()=>_(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>_(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>_(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>_(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>_(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>_(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>_(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>_(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([67,29,30,31,32,22,26,8,68])))},{id:"just",name:"Just",import:(()=>_(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([69,34,8,17,70,7,9,13,14,22,26,39,40,41,42,19,29,30,31,32,43,44])))},{id:"kdl",name:"KDL",import:(()=>_(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>_(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>_(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>_(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([71,72,68])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>_(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>_(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>_(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([73,7,8,9,15])))},{id:"llvm",name:"LLVM IR",import:(()=>_(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>_(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>_(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>_(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([43,32])))},{id:"luau",name:"Luau",import:(()=>_(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>_(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>_(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>_(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([74,9,75,11,17])))},{id:"matlab",name:"MATLAB",import:(()=>_(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>_(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([76,46,44,21,7,8,9])))},{id:"mdx",name:"MDX",import:(()=>_(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>_(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>_(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>_(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>_(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>_(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>_(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>_(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([77,78])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>_(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>_(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([79,43,32])))},{id:"nim",name:"Nim",import:(()=>_(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([80,32,7,8,9,13,14,31,46])))},{id:"nix",name:"Nix",import:(()=>_(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>_(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>_(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>_(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>_(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>_(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>_(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>_(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>_(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([70,7,8,9,13,14,22])))},{id:"php",name:"PHP",import:(()=>_(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([81,7,8,9,13,14,22,15])))},{id:"pkl",name:"Pkl",import:(()=>_(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>_(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>_(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>_(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>_(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>_(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>_(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>_(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>_(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>_(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>_(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([82,8,9,7])))},{id:"puppet",name:"Puppet",import:(()=>_(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>_(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>_(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>_(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([83,8])))},{id:"qmldir",name:"QML Directory",import:(()=>_(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>_(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>_(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>_(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>_(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>_(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([84,7,8,9,85])))},{id:"reg",name:"Windows Registry Script",import:(()=>_(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>_(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>_(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>_(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>_(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>_(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>_(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([86,21,7,8,9,29,30,31,32,22,26,34,44,87,39,40,13,14,41,17,42,19,43])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>_(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([39,7,8,9,40,13,14,22,41,17,42,19,29,30,31,32,34,43,44])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>_(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>_(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([88,22])))},{id:"sass",name:"Sass",import:(()=>_(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>_(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>_(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>_(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([11,9])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>_(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>_(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([89,90])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>_(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>_(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([91,34])))},{id:"smalltalk",name:"Smalltalk",import:(()=>_(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>_(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>_(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([92,7,8,9])))},{id:"sparql",name:"SPARQL",import:(()=>_(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([93,94])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>_(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>_(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>_(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>_(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([95,22])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>_(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>_(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([96,8])))},{id:"svelte",name:"Svelte",import:(()=>_(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([97,8,17,9,18])))},{id:"swift",name:"Swift",import:(()=>_(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>_(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>_(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>_(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>_(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>_(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>_(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([98,99,8,9])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>_(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>_(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([72,68])))},{id:"toml",name:"TOML",import:(()=>_(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>_(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([100,17,9,8,31,32,7,22,13,14])))},{id:"tsv",name:"TSV",import:(()=>_(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>_(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>_(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>_(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([101,9,8,11,81,7,13,14,22,15,26,39,40,41,17,42,19,29,30,31,32,34,43,44])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>_(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>_(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>_(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>_(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>_(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>_(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>_(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>_(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>_(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>_(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([102,9,8,17,15,7,21])))},{id:"vue-html",name:"Vue HTML",import:(()=>_(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([103,8])))},{id:"vue-vine",name:"Vue Vine",import:(()=>_(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([104,9,11,75,105,18,8])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>_(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>_(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>_(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>_(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>_(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>_(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>_(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>_(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([13,14])))},{id:"xsl",name:"XSL",import:(()=>_(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([106,13,14])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>_(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>_(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>_(()=>import("./zig-VOosw3JB.js"),[]))}],xN=Object.fromEntries(ku.map(e=>[e.id,e.import])),kN=Object.fromEntries(ku.flatMap(e=>{var t;return((t=e.aliases)==null?void 0:t.map(n=>[n,e.import]))||[]})),bm={...xN,...kN},AN=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>_(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>_(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>_(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>_(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>_(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>_(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>_(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>_(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>_(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>_(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>_(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>_(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>_(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>_(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>_(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>_(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>_(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>_(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>_(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>_(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>_(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>_(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>_(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>_(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>_(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>_(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>_(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>_(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>_(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>_(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>_(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>_(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>_(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>_(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>_(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>_(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>_(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>_(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>_(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>_(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>_(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>_(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>_(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>_(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>_(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>_(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>_(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>_(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>_(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>_(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>_(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>_(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>_(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>_(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>_(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>_(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>_(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>_(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>_(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>_(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>_(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>_(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>_(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>_(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>_(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],CN=Object.fromEntries(AN.map(e=>[e.id,e.import]));class Au extends Error{constructor(t){super(t),this.name="ShikiError"}}function wN(){return 2147483648}function IN(){return typeof performance<"u"?performance.now():Date.now()}const SN=(e,t)=>e+(t-e%t)%t;async function NN(e){let t,n;const r={};function i(f){n=f,r.HEAPU8=new Uint8Array(f),r.HEAPU32=new Uint32Array(f)}function s(f,m,b){r.HEAPU8.copyWithin(f,m,m+b)}function a(f){try{return t.grow(f-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function o(f){const m=r.HEAPU8.length;f=f>>>0;const b=wN();if(f>b)return!1;for(let y=1;y<=4;y*=2){let g=m*(1+.2/y);g=Math.min(g,f+100663296);const I=Math.min(b,SN(Math.max(f,g),65536));if(a(I))return!0}return!1}const u=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function l(f,m,b=1024){const y=m+b;let g=m;for(;f[g]&&!(g>=y);)++g;if(g-m>16&&f.buffer&&u)return u.decode(f.subarray(m,g));let I="";for(;m<g;){let C=f[m++];if(!(C&128)){I+=String.fromCharCode(C);continue}const v=f[m++]&63;if((C&224)===192){I+=String.fromCharCode((C&31)<<6|v);continue}const P=f[m++]&63;if((C&240)===224?C=(C&15)<<12|v<<6|P:C=(C&7)<<18|v<<12|P<<6|f[m++]&63,C<65536)I+=String.fromCharCode(C);else{const N=C-65536;I+=String.fromCharCode(55296|N>>10,56320|N&1023)}}return I}function c(f,m){return f?l(r.HEAPU8,f,m):""}const d={emscripten_get_now:IN,emscripten_memcpy_big:s,emscripten_resize_heap:o,fd_write:()=>0};async function p(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,i(t.buffer),Object.assign(r,m),r.UTF8ToString=c}return await p(),r}var LN=Object.defineProperty,RN=(e,t,n)=>t in e?LN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Re=(e,t,n)=>RN(e,typeof t!="symbol"?t+"":t,n);let Me=null;function vN(e){throw new Au(e.UTF8ToString(e.getLastOnigError()))}class Rs{constructor(t){Re(this,"utf16Length"),Re(this,"utf8Length"),Re(this,"utf16Value"),Re(this,"utf8Value"),Re(this,"utf16OffsetToUtf8"),Re(this,"utf8OffsetToUtf16");const n=t.length,r=Rs._utf8ByteLength(t),i=r!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const a=i?new Uint32Array(r+1):null;i&&(a[r]=n);const o=new Uint8Array(r);let u=0;for(let l=0;l<n;l++){const c=t.charCodeAt(l);let d=c,p=!1;if(c>=55296&&c<=56319&&l+1<n){const f=t.charCodeAt(l+1);f>=56320&&f<=57343&&(d=(c-55296<<10)+65536|f-56320,p=!0)}i&&(s[l]=u,p&&(s[l+1]=u),d<=127?a[u+0]=l:d<=2047?(a[u+0]=l,a[u+1]=l):d<=65535?(a[u+0]=l,a[u+1]=l,a[u+2]=l):(a[u+0]=l,a[u+1]=l,a[u+2]=l,a[u+3]=l)),d<=127?o[u++]=d:d<=2047?(o[u++]=192|(d&1984)>>>6,o[u++]=128|(d&63)>>>0):d<=65535?(o[u++]=224|(d&61440)>>>12,o[u++]=128|(d&4032)>>>6,o[u++]=128|(d&63)>>>0):(o[u++]=240|(d&1835008)>>>18,o[u++]=128|(d&258048)>>>12,o[u++]=128|(d&4032)>>>6,o[u++]=128|(d&63)>>>0),p&&l++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const s=t.charCodeAt(r);let a=s,o=!1;if(s>=55296&&s<=56319&&r+1<i){const u=t.charCodeAt(r+1);u>=56320&&u<=57343&&(a=(s-55296<<10)+65536|u-56320,o=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,o&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const vs=class St{constructor(t){if(Re(this,"id",++St.LAST_ID),Re(this,"_onigBinding"),Re(this,"content"),Re(this,"utf16Length"),Re(this,"utf8Length"),Re(this,"utf16OffsetToUtf8"),Re(this,"utf8OffsetToUtf16"),Re(this,"ptr"),!Me)throw new Au("Must invoke loadWasm first.");this._onigBinding=Me,this.content=t;const n=new Rs(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!St._sharedPtrInUse?(St._sharedPtr||(St._sharedPtr=Me.omalloc(1e4)),St._sharedPtrInUse=!0,Me.HEAPU8.set(n.utf8Value,St._sharedPtr),this.ptr=St._sharedPtr):this.ptr=n.createString(Me)}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===St._sharedPtr?St._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Re(vs,"LAST_ID",0);Re(vs,"_sharedPtr",0);Re(vs,"_sharedPtrInUse",!1);let Em=vs;class ON{constructor(t){if(Re(this,"_onigBinding"),Re(this,"_ptr"),!Me)throw new Au("Must invoke loadWasm first.");const n=[],r=[];for(let o=0,u=t.length;o<u;o++){const l=new Rs(t[o]);n[o]=l.createString(Me),r[o]=l.utf8Length}const i=Me.omalloc(4*t.length);Me.HEAPU32.set(n,i/4);const s=Me.omalloc(4*t.length);Me.HEAPU32.set(r,s/4);const a=Me.createOnigScanner(i,s,t.length);for(let o=0,u=t.length;o<u;o++)Me.ofree(n[o]);Me.ofree(s),Me.ofree(i),a===0&&vN(Me),this._onigBinding=Me,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new Em(t);const s=this._findNextMatchSync(t,n,!1,i);return t.dispose(),s}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const s=this._onigBinding,a=s.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(a===0)return null;const o=s.HEAPU32;let u=a/4;const l=o[u++],c=o[u++],d=[];for(let p=0;p<c;p++){const f=t.convertUtf8OffsetToUtf16(o[u++]),m=t.convertUtf8OffsetToUtf16(o[u++]);d[p]={start:f,end:m,length:m-f}}return{index:l,captureIndices:d}}}function PN(e){return typeof e.instantiator=="function"}function DN(e){return typeof e.default=="function"}function MN(e){return typeof e.data<"u"}function BN(e){return typeof Response<"u"&&e instanceof Response}function FN(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 Ii;function HN(e){if(Ii)return Ii;async function t(){Me=await NN(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),PN(r)?r=await r.instantiator(n):DN(r)?r=await r.default(n):(MN(r)&&(r=r.data),BN(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await UN(r)(n):r=await $N(r)(n):FN(r)?r=await _a(r)(n):r instanceof WebAssembly.Module?r=await _a(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await _a(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Ii=t(),Ii}function _a(e){return t=>WebAssembly.instantiate(e,t)}function UN(e){return t=>WebAssembly.instantiateStreaming(e,t)}function $N(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function jN(e){return e&&await HN(e),{createScanner(t){return new ON(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Em(t)}}}const VN=yN({langs:bm,themes:CN,engine:()=>jN(_(()=>import("./wasm-CG6Dc4jp.js"),[]))});function gr(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function zN(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const Cu=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Fe=String.raw;function br(e,t){if(e==null)throw new Error(t??"Value expected");return e}const _m=Fe`\[\^?`,Tm=`c.? | C(?:-.?)?|${Fe`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Fe`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Fe`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Fe`o\{[^\}]*\}?`}|${Fe`\d{1,3}`}`,wu=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Si=new RegExp(Fe`
143
- \\ (?:
144
- ${Tm}
145
- | [gk]<[^>]*>?
146
- | [gk]'[^']*'?
147
- | .
148
- )
149
- | \( (?:
150
- \? (?:
151
- [:=!>({]
152
- | <[=!]
153
- | <[^>]*>
154
- | '[^']*'
155
- | ~\|?
156
- | #(?:[^)\\]|\\.?)*
157
- | [^:)]*[:)]
158
- )?
159
- | \*[^\)]*\)?
160
- )?
161
- | (?:${wu.source})+
162
- | ${_m}
163
- | .
164
- `.replace(/\s+/g,""),"gsu"),Ta=new RegExp(Fe`
165
- \\ (?:
166
- ${Tm}
167
- | .
168
- )
169
- | \[:(?:\^?\p{Alpha}+|\^):\]
170
- | ${_m}
171
- | &&
172
- | .
173
- `.replace(/\s+/g,""),"gsu");function GN(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=cL(n.flags),i=[r.extended],s={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(d){i.push(d)},replaceCurrentModX(d){i[i.length-1]=d},singleline:n.rules.singleline};let a=[],o;for(Si.lastIndex=0;o=Si.exec(e);){const d=WN(s,e,o[0],Si.lastIndex);d.tokens?a.push(...d.tokens):d.token&&a.push(d.token),d.lastIndex!==void 0&&(Si.lastIndex=d.lastIndex)}const u=[];let l=0;a.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++l:d.raw==="("&&u.push(d)}),l||u.forEach((d,p)=>{d.kind="capturing",d.number=p+1});const c=l||u.length;return{tokens:a.map(d=>d.type==="EscapedNumber"?hL(d,c):d).flat(),flags:r}}function WN(e,t,n,r){const[i,s]=n;if(n==="["||n==="[^"){const a=qN(t,n,r);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(s))return{token:Yc(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:rL(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:xm(n)}}if(s==="K")return{token:km("keep",n)};if(s==="N"||s==="R")return{token:In("newline",n,{negate:s==="N"})};if(s==="O")return{token:In("any",n)};if(s==="X")return{token:In("text_segment",n)};const a=ym(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(i==="("){if(s==="*")return{token:oL(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:aL(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Kn("group",n)};if(n==="(?>")return{token:Kn("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Kn(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Kn("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Kn("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:eL(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
174
- `,r);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(n)){const a=/\s+/y;return a.lastIndex=r,{lastIndex:a.exec(t)?a.lastIndex:r}}}if(n===".")return{token:In("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":Fe`\A`,$:Fe`\Z`}[n]:n;return{token:Yc(a,n)}}return n==="|"?{token:QN(n)}:wu.test(n)?{tokens:fL(n)}:{token:Vt(gr(n),n)}}function qN(e,t,n){const r=[Qc(t[1]==="^",t)];let i=1,s;for(Ta.lastIndex=n;s=Ta.exec(e);){const a=s[0];if(a[0]==="["&&a[1]!==":")i++,r.push(Qc(a[1]==="^",a));else if(a==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Vt(93,a));else if(i--,r.push(KN(a)),!i)break}else{const o=YN(a);Array.isArray(o)?r.push(...o):r.push(o)}}return{tokens:r,lastIndex:Ta.lastIndex||e.length}}function YN(e){if(e[0]==="\\")return ym(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Cu.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return In("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?XN(e):e==="&&"?ZN(e):Vt(gr(e),e)}function ym(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return sL(e);if("dDhHsSwW".includes(n))return uL(e);if(e.startsWith(Fe`\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 lL(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),s=new TextEncoder;return[...i].map(a=>{const o=[...s.encode(a)].map(u=>`\\x${u.toString(16)}`).join("");return Vt(gr(a),o)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Vt(dL(e),e);if(Kc.has(n))return Vt(Kc.get(n),e);if(/\d/.test(n))return JN(t,e);if(e==="\\")throw new Error(Fe`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Vt(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function QN(e){return{type:"Alternator",raw:e}}function Yc(e,t){return{type:"Assertion",kind:e,raw:t}}function xm(e){return{type:"Backreference",raw:e}}function Vt(e,t){return{type:"Character",value:e,raw:t}}function KN(e){return{type:"CharacterClassClose",raw:e}}function XN(e){return{type:"CharacterClassHyphen",raw:e}}function ZN(e){return{type:"CharacterClassIntersector",raw:e}}function Qc(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function In(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function km(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:br(n.flags),raw:t}}function JN(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function eL(e){return{type:"GroupClose",raw:e}}function Kn(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function tL(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function nL(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function rL(e){return{type:"Subroutine",raw:e}}const iL=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),Kc=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function sL(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 Vt(gr(t.toUpperCase())-64,e)}function aL(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"),s=Zc(n),a=Zc(r),o={};if(s&&(o.enable=s),a&&(o.disable=a),e.endsWith(")"))return t.replaceCurrentModX(i),km("flags",e,{flags:o});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,Kn("group",e,{...(s||a)&&{flags:o}});throw new Error(`Unexpected flag modifier "${e}"`)}function oL(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 s=i?i.split(",").filter(c=>c!=="").map(c=>/^[+-]?\d+$/.test(c)?+c:c):[],[a,o,u]=s,l=iL.has(n)?n.toLowerCase():"custom";switch(l){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(s.length===2&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${o}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof o=="number"||!/^(?:[<>!=]=|[<>])$/.test(o))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${o}"`);if(typeof u=="string"&&!/^[A-Za-z_]\w*$/.test(u))throw new Error(`Named callout argument three must be a tag or number "${u}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${l}"`)}return tL(l,r??null,(i==null?void 0:i.split(","))??null,e)}function Xc(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+i>a||s&&+s>a)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=s===void 0?+i:s===""?1/0:+s,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 nL(t,n,r,e)}function uL(e){const t=e[1].toLowerCase();return In({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function lL(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return In("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function Zc(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 cL(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 dL(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 hL(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[xm(n)];const s=[],a=i.match(/^[0-7]+|\d/g);for(let o=0;o<a.length;o++){const u=a[o];let l;if(o===0&&u!=="8"&&u!=="9"){if(l=parseInt(u,8),l>127)throw new Error(Fe`Octal encoded byte above 177 unsupported "${n}"`)}else l=gr(u);s.push(Vt(l,(o===0?"\\":"")+u))}return s}function fL(e){const t=[],n=new RegExp(wu,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(s){const{min:a,max:o}=s.groups;if(+a>+o&&i.endsWith("?")){n.lastIndex--,t.push(Xc(i.slice(0,-1)));continue}}}t.push(Xc(i))}return t}function Am(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 pL(e){return mL.has(e.type)}const mL=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Cm(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=GN(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(p,f)=>{const m=r.tokens[s.nextIndex];switch(s.parent=p,s.nextIndex++,m.type){case"Alternator":return Pn();case"Assertion":return gL(m);case"Backreference":return bL(m,s);case"Character":return Os(m.value,{useLastValid:!!f.isCheckingRangeEnd});case"CharacterClassHyphen":return EL(m,s,f);case"CharacterClassOpen":return _L(m,s,f);case"CharacterSet":return TL(m,s);case"Directive":return wL(m.kind,{flags:m.flags});case"GroupOpen":return yL(m,s,f);case"NamedCallout":return SL(m.kind,m.tag,m.arguments);case"Quantifier":return xL(m,s);case"Subroutine":return kL(m,s);default:throw new Error(`Unexpected token type "${m.type}"`)}},s={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},a=LL(IL(r.flags));let o=a.body[0];for(;s.nextIndex<r.tokens.length;){const p=i(o,{});p.type==="Alternative"?(a.body.push(p),o=p):o.body.push(p)}const{capturingGroups:u,hasNumberedRef:l,namedGroupsByName:c,subroutines:d}=s;if(l&&c.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:p}of d)if(typeof p=="number"){if(p>u.length)throw new Error("Subroutine uses a group number that's not defined");p&&(u[p-1].isSubroutined=!0)}else if(c.has(p)){if(c.get(p).length>1)throw new Error(Fe`Subroutine uses a duplicate group name "\g<${p}>"`);c.get(p)[0].isSubroutined=!0}else throw new Error(Fe`Subroutine uses a group name that's not defined "\g<${p}>"`);return a}function gL({kind:e}){return fo(br({"^":"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===Fe`\B`||e===Fe`\Y`})}function bL({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(s,a=!1)=>{const o=t.capturingGroups.length;let u=!1;if(s>o)if(t.skipBackrefValidation)u=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,po(a?o+1-s:s,{orphan:u})};if(n){const s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(s)return i(+s.groups.num,!!s.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 po(r)}return i(+r)}function EL(e,t,n){const{tokens:r,walk:i}=t,s=t.parent,a=s.body.at(-1),o=r[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&o&&o.type!=="CharacterClassOpen"&&o.type!=="CharacterClassClose"&&o.type!=="CharacterClassIntersector"){const u=i(s,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&u.type==="Character")return s.body.pop(),CL(a,u);throw new Error("Invalid character class range")}return Os(gr("-"))}function _L({negate:e},t,n){const{tokens:r,walk:i}=t,s=r[t.nextIndex],a=[Hi()];let o=td(s);for(;o.type!=="CharacterClassClose";){if(o.type==="CharacterClassIntersector")a.push(Hi()),t.nextIndex++;else{const l=a.at(-1);l.body.push(i(l,n))}o=td(r[t.nextIndex],s)}const u=Hi({negate:e});return a.length===1?u.body=a[0].body:(u.kind="intersection",u.body=a.map(l=>l.body.length===1?l.body[0]:l)),t.nextIndex++,u}function TL({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:a}=r;if(e==="property"){const o=Ps(n);if(Cu.has(o)&&!(a!=null&&a.has(o)))e="posix",n=o;else return Xn(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:s,unicodePropertyMap:a})}return e==="posix"?NL(n,{negate:t}):mo(e,{negate:t})}function yL(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:s,skipLookbehindValidation:a,walk:o}=t,u=RL(e),l=u.type==="AbsenceFunction",c=ed(u),d=c&&u.negate;if(u.type==="CapturingGroup"&&(i.push(u),u.name&&zN(s,u.name,[]).push(u)),l&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let p=nd(r[t.nextIndex]);for(;p.type!=="GroupClose";){if(p.type==="Alternator")u.body.push(Pn()),t.nextIndex++;else{const f=u.body.at(-1),m=o(f,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||c,isInNegLookbehind:n.isInNegLookbehind||d});if(f.body.push(m),(c||n.isInLookbehind)&&!a){const b="Lookbehind includes a pattern not allowed by Oniguruma";if(d||n.isInNegLookbehind){if(Jc(m)||m.type==="CapturingGroup")throw new Error(b)}else if(Jc(m)||ed(m)&&m.negate)throw new Error(b)}}p=nd(r[t.nextIndex])}return t.nextIndex++,u}function xL({kind:e,min:t,max:n},r){const i=r.parent,s=i.body.at(-1);if(!s||!pL(s))throw new Error("Quantifier requires a repeatable token");const a=Im(e,t,n,s);return i.body.pop(),a}function kL({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(s){const o=+s.groups.num,u=n.length;if(t.hasNumberedRef=!0,i={"":o,"+":u+o,"-":u+1-o}[s.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const a=Sm(i);return r.push(a),a}function AL(e,t){return{type:"AbsenceFunction",kind:e,body:fi(t==null?void 0:t.body)}}function Pn(e){return{type:"Alternative",body:Nm(e==null?void 0:e.body)}}function fo(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function po(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function wm(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!vL(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:fi(t==null?void 0:t.body)}}function Os(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 Hi(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:Nm(e==null?void 0:e.body)}}function CL(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function mo(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 wL(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:br(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function IL(e){return{type:"Flags",...e}}function Tt(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:fi(e==null?void 0:e.body)}}function kn(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:fi(e==null?void 0:e.body)}}function SL(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function NL(e,t){const n=!!(t!=null&&t.negate);if(!Cu.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function Im(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 LL(e,t){return{type:"Regex",body:fi(t==null?void 0:t.body),flags:e}}function Sm(e){return{type:"Subroutine",ref:e}}function Xn(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(Ps(e));if(!r){if(n.normalizeUnknownPropertyNames)r=OL(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Fe`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function RL({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return AL("repeater");case"atomic":return Tt({atomic:!0});case"capturing":return wm(i,{name:n});case"group":return Tt({flags:e});case"lookahead":case"lookbehind":return kn({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function fi(e){if(e===void 0)e=[Pn()];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 Nm(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 Jc(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function ed(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function vL(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function OL(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 Ps(e){return e.replace(/[- _]+/g,"").toLowerCase()}function td(e,t){return br(e,`${(t==null?void 0:t.type)==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function nd(e){return br(e,"Unclosed group")}function Wr(e,t,n=null){function r(s,a){for(let o=0;o<s.length;o++){const u=i(s[o],a,o,s);o=Math.max(-1,o+u)}}function i(s,a=null,o=null,u=null){var g,I;let l=0,c=!1;const d={node:s,parent:a,key:o,container:u,root:e,remove(){Ni(u).splice(Math.max(0,Wn(o)+l),1),l--,c=!0},removeAllNextSiblings(){return Ni(u).splice(Wn(o)+1)},removeAllPrevSiblings(){const C=Wn(o)+l;return l-=C,Ni(u).splice(0,Math.max(0,C))},replaceWith(C,v={}){const P=!!v.traverse;u?u[Math.max(0,Wn(o)+l)]=C:br(a,"Can't replace root node")[o]=C,P&&i(C,a,o,u),c=!0},replaceWithMultiple(C,v={}){const P=!!v.traverse;if(Ni(u).splice(Math.max(0,Wn(o)+l),1,...C),l+=C.length-1,P){let N=0;for(let B=0;B<C.length;B++)N+=i(C[B],a,Wn(o)+B+N,u)}c=!0},skip(){c=!0}},{type:p}=s,f=t["*"],m=t[p],b=typeof f=="function"?f:f==null?void 0:f.enter,y=typeof m=="function"?m:m==null?void 0:m.enter;if(b==null||b(d,n),y==null||y(d,n),!c)switch(p){case"AbsenceFunction":case"CapturingGroup":case"Group":r(s.body,s);break;case"Alternative":case"CharacterClass":r(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(s.min,s,"min"),i(s.max,s,"max");break;case"LookaroundAssertion":r(s.body,s);break;case"Quantifier":i(s.body,s,"body");break;case"Regex":r(s.body,s),i(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${p}"`)}return(g=m==null?void 0:m.exit)==null||g.call(m,d,n),(I=f==null?void 0:f.exit)==null||I.call(f,d,n),l}return i(e),e}function Ni(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Wn(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const PL=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function DL(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function ML(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const gt=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Iu(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1];let a=0,o="";for(const u of e.matchAll(i)){const{0:l,groups:{$skip:c}}=u;if(!c&&(!r||r===gt.DEFAULT==!a)){n instanceof Function?o+=n(u,{context:a?gt.CHAR_CLASS:gt.DEFAULT,negated:s[s.length-1]}):o+=n;continue}l[0]==="["?(a++,s.push(l[1]==="^")):l==="]"&&a&&(a--,s.pop()),o+=l}return o}function Lm(e,t,n,r){Iu(e,t,n,r)}function BL(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 s=0,a;for(;a=i.exec(e);){const{0:o,groups:{$skip:u}}=a;if(!u&&(!r||r===gt.DEFAULT==!s))return a;o==="["?s++:o==="]"&&s&&s--,i.lastIndex==a.index&&i.lastIndex++}return null}function Li(e,t,n){return!!BL(e,t,0,n)}function FL(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,s=1,a;for(;a=n.exec(e);){const[o]=a;if(o==="[")i++;else if(i)o==="]"&&i--;else if(o==="(")s++;else if(o===")"&&(s--,!s)){r=a.index;break}}return e.slice(t,r)}const rd=new RegExp(String.raw`(?<noncapturingStart>${PL})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function HL(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="(?>",s="(?:(?=(",a=[0],o=[];let u=0,l=0,c=NaN,d;do{d=!1;let p=0,f=0,m=!1,b;for(rd.lastIndex=Number.isNaN(c)?0:c+s.length;b=rd.exec(e);){const{0:y,index:g,groups:{capturingStart:I,noncapturingStart:C}}=b;if(y==="[")p++;else if(p)y==="]"&&p--;else if(y===i&&!m)c=g,m=!0;else if(m&&C)f++;else if(I)m?f++:(u++,a.push(u+l));else if(y===")"&&m){if(!f){l++;const v=u+l;if(e=`${e.slice(0,c)}${s}${e.slice(c+i.length,g)}))<$$${v}>)${e.slice(g+1)}`,d=!0,o.push(v),DL(n,v),r.size){const P=new Map;r.forEach((N,B)=>{P.set(B>=v?B+1:B,N.map(M=>M>=v?M+1:M))}),r=P}break}f--}}}while(d);return n.push(...o),e=Iu(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:p,groups:{backrefNum:f,wrappedBackrefNum:m}})=>{if(f){const b=+f;if(b>a.length-1)throw new Error(`Backref "${p}" greater than number of captures`);return`\\${a[b]}`}return`\\${m}`},gt.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const Rm=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,ya=new RegExp(String.raw`
175
- \\(?: \d+
176
- | c[A-Za-z]
177
- | [gk]<[^>]+>
178
- | [pPu]\{[^\}]+\}
179
- | u[A-Fa-f\d]{4}
180
- | x[A-Fa-f\d]{2}
181
- )
182
- | \((?: \? (?: [:=!>]
183
- | <(?:[=!]|[^>]+>)
184
- | [A-Za-z\-]+:
185
- | \(DEFINE\)
186
- ))?
187
- | (?<qBase>${Rm})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
188
- | \\?.
189
- `.replace(/\s+/g,""),"gsu");function UL(e){if(!new RegExp(`${Rm}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",s=0,a;for(ya.lastIndex=0;a=ya.exec(e);){const{0:o,index:u,groups:{qBase:l,qMod:c,invalidQ:d}}=a;if(o==="[")s||(r=u),s++;else if(o==="]")s?s--:r=null;else if(!s)if(c==="+"&&i&&!i.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${o}"`);let p=-1;if(/^\{\d+\}$/.test(l))e=ML(e,u+l.length,c,"");else{if(i===")"||i==="]"){const f=i===")"?n:r;if(f===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,f)}(?>${e.slice(f,u)}${l})${e.slice(u+o.length)}`}else e=`${e.slice(0,u-i.length)}(?>${i}${l})${e.slice(u+o.length)}`;p+=4}ya.lastIndex+=p}else o[0]==="("?t.push(u):o===")"&&(n=t.length?t.pop():null);i=o}return{pattern:e}}const pt=String.raw,$L=pt`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,go=pt`\(\?R=(?<rDepth>[^\)]+)\)|${$L}`,Ds=pt`\(\?<(?![=!])(?<captureName>[^>]+)>`,vm=pt`${Ds}|(?<unnamed>\()(?!\?)`,Tn=new RegExp(pt`${Ds}|${go}|\(\?|\\?.`,"gsu"),xa="Cannot use multiple overlapping recursions";function jL(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(go,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&Li(e,pt`\(\?\(DEFINE\)`,gt.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const s=[],a=Li(e,pt`\\[1-9]`,gt.DEFAULT),o=new Map,u=[];let l=!1,c=0,d=0,p;for(Tn.lastIndex=0;p=Tn.exec(e);){const{0:f,groups:{captureName:m,rDepth:b,gRNameOrNum:y,gRDepth:g}}=p;if(f==="[")c++;else if(c)f==="]"&&c--;else if(b){if(id(b),l)throw new Error(xa);if(a)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const I=e.slice(0,p.index),C=e.slice(Tn.lastIndex);if(Li(C,go,gt.DEFAULT))throw new Error(xa);const v=+b-1;e=sd(I,C,v,!1,n,s,d),i=od(i,I,v,s.length,0,d);break}else if(y){id(g);let I=!1;for(const G of u)if(G.name===y||G.num===+y){if(I=!0,G.hasRecursedWithin)throw new Error(xa);break}if(!I)throw new Error(pt`Recursive \g cannot be used outside the referenced group "${r==="external"?y:pt`\g<${y}&R=${g}>`}"`);const C=o.get(y),v=FL(e,C);if(a&&Li(v,pt`${Ds}|\((?!\?)`,gt.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const P=e.slice(C,p.index),N=v.slice(P.length+f.length),B=s.length,M=+g-1,z=sd(P,N,M,!0,n,s,d);i=od(i,P,M,s.length-B,B,d);const L=e.slice(0,C),V=e.slice(C+v.length);e=`${L}${z}${V}`,Tn.lastIndex+=z.length-f.length-P.length-N.length,u.forEach(G=>G.hasRecursedWithin=!0),l=!0}else if(m)d++,o.set(String(d),Tn.lastIndex),o.set(m,Tn.lastIndex),u.push({num:d,name:m});else if(f[0]==="("){const I=f==="(";I&&(d++,o.set(String(d),Tn.lastIndex)),u.push(I?{num:d}:{})}else f===")"&&u.pop()}return n.push(...s),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function id(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 sd(e,t,n,r,i,s,a){const o=new Set;r&&Lm(e+t,Ds,({groups:{captureName:l}})=>{o.add(l)},gt.DEFAULT);const u=[n,r?o:null,i,s,a];return`${e}${ad(`(?:${e}`,"forward",...u)}(?:)${ad(`${t})`,"backward",...u)}${t}`}function ad(e,t,n,r,i,s,a){const u=c=>t==="forward"?c+2:n-c+2-1;let l="";for(let c=0;c<n;c++){const d=u(c);l+=Iu(e,pt`${vm}|\\k<(?<backref>[^>]+)>`,({0:p,groups:{captureName:f,unnamed:m,backref:b}})=>{if(b&&r&&!r.has(b))return p;const y=`_$${d}`;if(m||f){const g=a+s.length+1;return s.push(g),VL(i,g),m?p:`(?<${f}${y}>`}return pt`\k<${b}${y}>`},gt.DEFAULT)}return l}function VL(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function od(e,t,n,r,i,s){if(e.size&&r){let a=0;Lm(t,vm,()=>a++,gt.DEFAULT);const o=s-a+i,u=new Map;return e.forEach((l,c)=>{const d=(r-a*n)/n,p=a*n,f=c>o+a?c+r:c,m=[];for(const b of l)if(b<=o)m.push(b);else if(b>o+a+d)m.push(b+r);else if(b<=o+a)for(let y=0;y<=n;y++)m.push(b+a*y);else for(let y=0;y<=n;y++)m.push(b+p+d*y);u.set(f,m)}),u}return e}var ve=String.fromCodePoint,te=String.raw,xt={},Ms=globalThis.RegExp;xt.flagGroups=(()=>{try{new Ms("(?i:)")}catch{return!1}return!0})();xt.unicodeSets=(()=>{try{new Ms("[[]]","v")}catch{return!1}return!0})();xt.bugFlagVLiteralHyphenIsRange=xt.unicodeSets?(()=>{try{new Ms(te`[\d\-a]`,"v")}catch{return!0}return!1})():!1;xt.bugNestedClassIgnoresNegation=xt.unicodeSets&&new Ms("[[^a]]","v").test("a");function cs(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 ni(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function bo(e,t){return ud[e]>=ud[t]}function zL(e,t){if(e==null)throw new Error(t??"Value expected");return e}var ud={ES2025:2025,ES2024:2024,ES2018:2018},GL={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function Om(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!GL[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=xt.flagGroups?"ES2025":xt.unicodeSets?"ES2024":"ES2018"),t}var WL="[ -\r ]",qL=new Set([ve(304),ve(305)]),Ft=te`[\p{L}\p{M}\p{N}\p{Pc}]`;function Pm(e){if(qL.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=KL.get(n),s=YL.get(n),a=QL.get(n);return[...r].length===1&&t.add(r),a&&t.add(a),i&&t.add(i),t.add(n),s&&t.add(s),[...t]}var Su=new Map(`C Other
190
- Cc Control cntrl
191
- Cf Format
192
- Cn Unassigned
193
- Co Private_Use
194
- Cs Surrogate
195
- L Letter
196
- LC Cased_Letter
197
- Ll Lowercase_Letter
198
- Lm Modifier_Letter
199
- Lo Other_Letter
200
- Lt Titlecase_Letter
201
- Lu Uppercase_Letter
202
- M Mark Combining_Mark
203
- Mc Spacing_Mark
204
- Me Enclosing_Mark
205
- Mn Nonspacing_Mark
206
- N Number
207
- Nd Decimal_Number digit
208
- Nl Letter_Number
209
- No Other_Number
210
- P Punctuation punct
211
- Pc Connector_Punctuation
212
- Pd Dash_Punctuation
213
- Pe Close_Punctuation
214
- Pf Final_Punctuation
215
- Pi Initial_Punctuation
216
- Po Other_Punctuation
217
- Ps Open_Punctuation
218
- S Symbol
219
- Sc Currency_Symbol
220
- Sk Modifier_Symbol
221
- Sm Math_Symbol
222
- So Other_Symbol
223
- Z Separator
224
- Zl Line_Separator
225
- Zp Paragraph_Separator
226
- Zs Space_Separator
227
- ASCII
228
- ASCII_Hex_Digit AHex
229
- Alphabetic Alpha
230
- Any
231
- Assigned
232
- Bidi_Control Bidi_C
233
- Bidi_Mirrored Bidi_M
234
- Case_Ignorable CI
235
- Cased
236
- Changes_When_Casefolded CWCF
237
- Changes_When_Casemapped CWCM
238
- Changes_When_Lowercased CWL
239
- Changes_When_NFKC_Casefolded CWKCF
240
- Changes_When_Titlecased CWT
241
- Changes_When_Uppercased CWU
242
- Dash
243
- Default_Ignorable_Code_Point DI
244
- Deprecated Dep
245
- Diacritic Dia
246
- Emoji
247
- Emoji_Component EComp
248
- Emoji_Modifier EMod
249
- Emoji_Modifier_Base EBase
250
- Emoji_Presentation EPres
251
- Extended_Pictographic ExtPict
252
- Extender Ext
253
- Grapheme_Base Gr_Base
254
- Grapheme_Extend Gr_Ext
255
- Hex_Digit Hex
256
- IDS_Binary_Operator IDSB
257
- IDS_Trinary_Operator IDST
258
- ID_Continue IDC
259
- ID_Start IDS
260
- Ideographic Ideo
261
- Join_Control Join_C
262
- Logical_Order_Exception LOE
263
- Lowercase Lower
264
- Math
265
- Noncharacter_Code_Point NChar
266
- Pattern_Syntax Pat_Syn
267
- Pattern_White_Space Pat_WS
268
- Quotation_Mark QMark
269
- Radical
270
- Regional_Indicator RI
271
- Sentence_Terminal STerm
272
- Soft_Dotted SD
273
- Terminal_Punctuation Term
274
- Unified_Ideograph UIdeo
275
- Uppercase Upper
276
- Variation_Selector VS
277
- White_Space space
278
- XID_Continue XIDC
279
- XID_Start XIDS`.split(/\s/).map(e=>[Ps(e),e])),YL=new Map([["s",ve(383)],[ve(383),"s"]]),QL=new Map([[ve(223),ve(7838)],[ve(107),ve(8490)],[ve(229),ve(8491)],[ve(969),ve(8486)]]),KL=new Map([en(453),en(456),en(459),en(498),...ka(8072,8079),...ka(8088,8095),...ka(8104,8111),en(8124),en(8140),en(8188)]),XL=new Map([["alnum",te`[\p{Alpha}\p{Nd}]`],["alpha",te`\p{Alpha}`],["ascii",te`\p{ASCII}`],["blank",te`[\p{Zs}\t]`],["cntrl",te`\p{Cc}`],["digit",te`\p{Nd}`],["graph",te`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",te`\p{Lower}`],["print",te`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",te`[\p{P}\p{S}]`],["space",te`\p{space}`],["upper",te`\p{Upper}`],["word",te`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",te`\p{AHex}`]]);function ZL(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function en(e){const t=ve(e);return[t.toLowerCase(),t]}function ka(e,t){return ZL(e,t).map(n=>en(n))}var Dm=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function JL(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};Mm(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:bo(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};Wr(e,eR,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Wr(e,tR,s);const a={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Wr(e,nR,a),e._originMap=s.groupOriginByCopy,e._strategy=r.strategy,e}var eR={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const s=Tt();s.body[0].body.push(kn({negate:!0,body:r}),Xn("Any"));const a=Tt();a.body[0].body.push(Im("greedy",0,1/0,s)),n(ke(a,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(s=>s.kind==="flags");for(let s=n+1;s<t.body.length;s++){const a=t.body[s];ni(r,a,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=Fm(t.get(e));if(r){const i=Tt({flags:r});i.body[0].body=e.body,e.body=[ke(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:s,replaceWith:a},o){const{kind:u,negate:l}=e,{asciiWordBoundaries:c,avoidSubclass:d,supportedGNodes:p,wordIsAscii:f}=o;if(u==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${l?"Y":"y"}"`);if(u==="line_end")a(ke(kn({body:[Pn({body:[fo("string_end")]}),Pn({body:[Os(10)]})]}),t));else if(u==="line_start")a(ke(Ht(te`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(u==="search_start")if(p.has(e))i.flags.sticky=!0,s();else{const m=r[n-1];if(m&&uR(m))a(ke(kn({negate:!0}),t));else{if(d)throw new Error(te`Uses "\G" in a way that requires a subclass`);a(tn(fo("string_start"),t)),o.strategy="clip_search"}}else if(!(u==="string_end"||u==="string_start"))if(u==="string_end_newline")a(ke(Ht(te`(?=\n?\z)`),t));else if(u==="word_boundary"){if(!f&&!c){const m=`(?:(?<=${Ft})(?!${Ft})|(?<!${Ft})(?=${Ft}))`,b=`(?:(?<=${Ft})(?=${Ft})|(?<!${Ft})(?!${Ft}))`;a(ke(Ht(l?b:m),t))}}else throw new Error(`Unexpected assertion kind "${u}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Ca(n)&&(n=Aa(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Ca(r)&&(r=Aa(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=Hi({body:[e]});n(ke(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:s,spaceIsAscii:a,wordIsAscii:o}){const{kind:u,negate:l,value:c}=e;if(s&&(u==="digit"||c==="digit")){n(tn(mo("digit",{negate:l}),t));return}if(a&&(u==="space"||c==="space")){n(ke(wa(Ht(WL),l),t));return}if(o&&(u==="word"||c==="word")){n(tn(mo("word",{negate:l}),t));return}if(u==="any")n(tn(Xn("Any"),t));else if(u==="digit")n(tn(Xn("Nd",{negate:l}),t));else if(u!=="dot")if(u==="text_segment"){if(r==="strict")throw new Error(te`Use of "\X" requires non-strict accuracy`);const d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",p=te`\p{RI}{2}|${d}(?:\u200D${d})*`;n(ke(Ht(te`(?>\r\n|${i?te`\p{RGI_Emoji}`:p}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(u==="hex")n(tn(Xn("AHex",{negate:l}),t));else if(u==="newline")n(ke(Ht(l?`[^
280
- ]`:`(?>\r
281
- ?|[
282
- \v\f…\u2028\u2029])`),t));else if(u==="posix")if(!i&&(c==="graph"||c==="print")){if(r==="strict")throw new Error(`POSIX class "${c}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[c];l&&(d=`\0-${ve(d.codePointAt(0)-1)}${ve(d.codePointAt(2)+1)}-􏿿`),n(ke(Ht(`[${d}]`),t))}else n(ke(wa(Ht(XL.get(c)),l),t));else if(u==="property")Su.has(Ps(c))||(e.key="sc");else if(u==="space")n(tn(Xn("space",{negate:l}),t));else if(u==="word")n(ke(wa(Ht(Ft),l),t));else throw new Error(`Unexpected character set kind "${u}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:s,removeAllNextSiblings:a}){const{kind:o,flags:u}=e;if(o==="flags")if(!u.enable&&!u.disable)r();else{const l=Tt({flags:u});l.body[0].body=a(),i(ke(l,t),{traverse:!0})}else if(o==="keep"){const l=n.body[0],d=n.body.length===1&&Am(l,{type:"Group"})&&l.body[0].body.length===1?l.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(te`Uses "\K" in a way that's unsupported`);const p=kn({behind:!0});p.body[0].body=s(),i(ke(p,t))}else throw new Error(`Unexpected directive kind "${o}"`)},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(ke(kn({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Tt();t.body[0].body.push(e.body),e.body=ke(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{const a=Um(s.body);a?(r=!0,Array.isArray(a)?n.push(...a):n.push(a)):i=!0}r&&!i&&n.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(te`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Ca(n)&&(n=Aa(n,t),e.ref=n)}},tR={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:s,multiplexCapturesToLeftByRef:a,openRefs:o,reffedNodesByReferencer:u}){const l=i.get(e);if(l&&o.has(e.number)){const d=tn(ld(e.number),t);u.set(d,o.get(e.number)),n(d);return}o.set(e.number,e),a.set(e.number,[]),e.name&&ni(a,e.name,[]);const c=a.get(e.name??e.number);for(let d=0;d<c.length;d++){const p=c[d];if(l===p.node||l&&l===p.origin||e===p.origin){c.splice(d,1);break}}if(a.get(e.number).push({node:e,origin:l}),e.name&&a.get(e.name).push({node:e,origin:l}),e.name){const d=ni(s,e.name,new Map);let p=!1;if(l)p=!0;else for(const f of d.values())if(!f.hasDuplicateNameToRemove){p=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:p})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=cs(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:s}=e;if(i){let c=t;for(;(c=c.parent)&&!(c.type==="CapturingGroup"&&(c.name===s||c.number===s)););r.reffedNodesByReferencer.set(e,c);return}const a=r.subroutineRefMap.get(s),o=s===0,u=o?ld(0):Bm(a,r.groupOriginByCopy,null);let l=u;if(!o){const c=Fm(sR(a,p=>p.type==="Group"&&!!p.flags)),d=c?cs(r.globalFlags,c):r.globalFlags;rR(d,r.currentFlags)||(l=Tt({flags:aR(d)}),l.body[0].body.push(u))}n(ke(l,t),{traverse:!o})}},nR={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const s=r.reffedNodesByReferencer.get(e).filter(a=>iR(a,e));if(!s.length)n(ke(kn({negate:!0}),t));else if(s.length>1){const a=Tt({atomic:!0,body:s.reverse().map(o=>Pn({body:[po(o.number)]}))});n(ke(a,t))}else e.ref=s[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=wm();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Mm(e){Wr(e,{"*"({node:t,parent:n}){t.parent=n}})}function rR(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function iR(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=Hm(n.parent);for(const i of r){if(i===n)break;if(i===e||$m(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function Bm(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[s,a]of Object.entries(e))s==="parent"?i.parent=Array.isArray(n)?r:n:a&&typeof a=="object"?i[s]=Bm(a,t,i,n):(s==="type"&&a==="CapturingGroup"&&t.set(i,t.get(e)??e),i[s]=a);return i}function ld(e){const t=Sm(e);return t.isRecursive=!0,t}function sR(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Aa(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 Fm(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{var s,a;(s=r.enable)!=null&&s[i]&&(delete n.disable[i],n.enable[i]=!0),(a=r.disable)!=null&&a[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 aR({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 Hm(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Um(e){const t=e.find(n=>n.kind==="search_start"||lR(n,{negate:!1})||!oR(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=Um(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function $m(e,t){const n=Hm(e)??[];for(const r of n)if(r===t||$m(r,t))return!0;return!1}function oR({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function uR(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function lR(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Am(e.body[0],{type:"Assertion",kind:"search_start"})}function Ca(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Ht(e,t){const r=Cm(e,{...t,unicodePropertyMap:Su}).body;return r.length>1||r[0].body.length>1?Tt({body:r}):r[0].body[0]}function wa(e,t){return e.negate=t,e}function tn(e,t){return e.parent=t,e}function ke(e,t){return Mm(e),e.parent=t,e}function cR(e,t){const n=Om(t),r=bo(n.target,"ES2024"),i=bo(n.target,"ES2025"),s=n.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,o=null;if(!i){const f=[e.flags.ignoreCase];Wr(e,dR,{getCurrentModI:()=>f.at(-1),popModI(){f.pop()},pushModI(m){f.push(m)},setHasCasedChar(){f.at(-1)?a=!0:o=!0}})}const u={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!o)};let l=e;const c={accuracy:n.accuracy,appliedGlobalFlags:u,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!i&&a&&o),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(f){return c.lastNode=l,l=f,zL(hR[f.type],`Unexpected node type "${f.type}"`)(f,c,d)}const p={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete p.options.force.v,p.options.disable.v=!0,p.options.unicodeSetsPlugin=null),p._captureTransfers=new Map,p._hiddenCaptures=[],c.captureMap.forEach((f,m)=>{f.hidden&&p._hiddenCaptures.push(m),f.transferTo&&ni(p._captureTransfers,f.transferTo,[]).push(m)}),p}var dR={"*":{enter({node:e},t){if(dd(e)){const n=t.getCurrentModI();t.pushModI(e.flags?cs({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){dd(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Nu(ve(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),jm(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&Dm.has(e.value)&&t.setHasCasedChar()}},hR={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?te`\B`:te`\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:s}=e,a={ignoreCase:t.currentFlags.ignoreCase},o=t.originMap.get(e);return o&&(a.hidden=!0,s>o.number&&(a.transferTo=o.number)),t.captureMap.set(s,a),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=ve(e),r=qn(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Nu(n)){const i=Pm(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:s}=e;let{body:a}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");xt.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(hd)&&(a=[Os(45),...a.filter(l=>!hd(l))]);const o=()=>`[${i?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||xt.bugNestedClassIgnoresNegation)&&!i){const c=a.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(c.length){const d=Tt(),p=d.body[0];return d.parent=s,p.parent=d,a=a.filter(f=>!c.includes(f)),e.body=a,a.length?(e.parent=p,p.body.push(e)):d.body.pop(),c.forEach(f=>{const m=Pn({body:[f]});f.parent=m,m.parent=d,d.body.push(m)}),n(d)}}t.inCharClass=!0;const l=o();return t.inCharClass=!1,l}const u=a[0];if(r==="union"&&!i&&u&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(xt.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&a.length===1&&u.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return o()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=qn(n,i),a=qn(r,i),o=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const u=jm(e);bR(u).forEach(c=>{o.add(Array.isArray(c)?`${qn(c[0],i)}-${qn(c[1],i)}`:qn(c,i))})}return`${s}-${a}${[...o].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":te`[^\n]`;if(e==="digit")return t?te`\D`:te`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Dm.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?te`\P`:te`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?te`\W`:te`\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,s){const a=i.currentFlags;n&&(i.currentFlags=cs(a,n));const o=t.map(s).join("|"),u=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?o:`(?${ER(e,n,i.useFlagMods)}${o})`;return i.currentFlags=a,u},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)+_R(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})`:te`\g<${t}&R=${r}>`}},fR=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),pR=new Set(["-","\\","]","^","["]),mR=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),cd=new Map([[9,te`\t`],[10,te`\n`],[11,te`\v`],[12,te`\f`],[13,te`\r`],[8232,te`\u2028`],[8233,te`\u2029`],[65279,te`\uFEFF`]]),gR=new RegExp("^\\p{Cased}$","u");function Nu(e){return gR.test(e)}function jm(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,i=e.max.value,s=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return s;for(let a=r;a<=i;a++){const o=ve(a);if(!Nu(o))continue;const u=Pm(o).filter(l=>{const c=l.codePointAt(0);return c<r||c>i});if(u.length&&(s.push(...u),n))break}return s}function qn(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(cd.has(e))return cd.get(e);if(e<32||e>126&&e<160||e>262143||t&&TR(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?mR:pR:fR,s=ve(e);return(i.has(s)?"\\":"")+s}function bR(e){const t=e.map(i=>i.codePointAt(0)).sort((i,s)=>i-s),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 ER(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:s}=t;r=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(s?"-":"")+(s!=null&&s.ignoreCase?"i":"")+(s!=null&&s.dotAll?"s":"")}return`${r}:`}function _R({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 dd({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function TR(e){return e>47&&e<58}function hd({type:e,value:t}){return e==="Character"&&t===45}var rn,Ut,Sn,sn,Nn,ri,Eo,un,yR=(un=class extends RegExp{constructor(n,r,i){var t=(...JO)=>(super(...JO),gn(this,ri),gn(this,rn,new Map),gn(this,Ut,null),gn(this,Sn),gn(this,sn,null),gn(this,Nn,null),O(this,"rawOptions",{}),this);const s=!!(i!=null&&i.lazyCompile);if(n instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const a=n;t(a,r),Et(this,Sn,a.source),a instanceof un&&(Et(this,rn,We(a,rn)),Et(this,sn,We(a,sn)),Et(this,Nn,We(a,Nn)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...i};t(s?"":n,r),Et(this,Sn,n),Et(this,rn,kR(a.hiddenCaptures,a.transfers)),Et(this,Nn,a.strategy),this.rawOptions=i??{}}s||Et(this,Ut,this)}get source(){return We(this,Sn)||"(?:)"}exec(n){if(!We(this,Ut)){const{lazyCompile:s,...a}=this.rawOptions;Et(this,Ut,new un(We(this,Sn),this.flags,a))}const r=this.global||this.sticky,i=this.lastIndex;if(We(this,Nn)==="clip_search"&&r&&i){this.lastIndex=0;const s=js(this,ri,Eo).call(this,n.slice(i));return s&&(xR(s,i,n,this.hasIndices),this.lastIndex+=i),s}return js(this,ri,Eo).call(this,n)}},rn=new WeakMap,Ut=new WeakMap,Sn=new WeakMap,sn=new WeakMap,Nn=new WeakMap,ri=new WeakSet,Eo=function(n){We(this,Ut).lastIndex=this.lastIndex;const r=Du(un.prototype,this,"exec").call(We(this,Ut),n);if(this.lastIndex=We(this,Ut).lastIndex,!r||!We(this,rn).size)return r;const i=[...r];r.length=1;let s;this.hasIndices&&(s=[...r.indices],r.indices.length=1);const a=[0];for(let o=1;o<i.length;o++){const{hidden:u,transferTo:l}=We(this,rn).get(o)??{};if(u?a.push(null):(a.push(r.length),r.push(i[o]),this.hasIndices&&r.indices.push(s[o])),l&&i[o]!==void 0){const c=a[l];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(r[c]=i[o],this.hasIndices&&(r.indices[c]=s[o]),r.groups){We(this,sn)||Et(this,sn,AR(this.source));const d=We(this,sn).get(l);d&&(r.groups[d]=i[o],this.hasIndices&&(r.indices.groups[d]=s[o]))}}}return r},un);function xR(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let a=0;a<i.length;a++){const o=i[a];o&&(i[a]=[o[0]+t,o[1]+t])}const s=i.groups;s&&Object.keys(s).forEach(a=>{const o=s[a];o&&(s[a]=[o[0]+t,o[1]+t])})}}function kR(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const s of i)ni(n,s,{}).transferTo=r;return n}function AR(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,s;for(;s=t.exec(e);){const{0:a,groups:{capture:o,name:u}}=s;a==="["?r++:r?a==="]"&&r--:o&&(i++,u&&n.set(i,u))}return n}function CR(e,t){const n=wR(e,t);return n.options?new yR(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function wR(e,t){const n=Om(t),r=Cm(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Su}),i=JL(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),s=cR(i,n),a=jL(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),o=UL(a.pattern),u=HL(o.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),l={pattern:u.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const c=u.hiddenCaptures.sort((m,b)=>m-b),d=Array.from(u.captureTransfers),p=i._strategy,f=l.pattern.length>=n.lazyCompileLength;(c.length||d.length||p||f)&&(l.options={...c.length&&{hiddenCaptures:c},...d.length&&{transfers:d},...p&&{strategy:p},...f&&{lazyCompile:f}})}return l}const fd=4294967295;class IR{constructor(t,n={}){O(this,"regexps");this.patterns=t,this.options=n;const{forgiving:r=!1,cache:i,regexConstructor:s}=n;if(!s)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const o=i==null?void 0:i.get(a);if(o){if(o instanceof RegExp)return o;if(r)return null;throw o}try{const u=s(a);return i==null||i.set(a,u),u}catch(u){if(i==null||i.set(a,u),r)return null;throw u}})}findNextMatchSync(t,n,r){const i=typeof t=="string"?t:t.content,s=[];function a(o,u,l=0){return{index:o,captureIndices:u.indices.map(c=>c==null?{start:fd,end:fd,length:0}:{start:c[0]+l,end:c[1]+l,length:c[1]-c[0]})}}for(let o=0;o<this.regexps.length;o++){const u=this.regexps[o];if(u)try{u.lastIndex=n;const l=u.exec(i);if(!l)continue;if(l.index===n)return a(o,l,0);s.push([o,l,0])}catch(l){if(this.options.forgiving)continue;throw l}}if(s.length){const o=Math.min(...s.map(u=>u[1].index));for(const[u,l,c]of s)if(l.index===o)return a(u,l,c)}return null}}function SR(e,t){return CR(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function NR(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>SR(n,{target:t.target})),{createScanner(n){return new IR(n,t)},createString(n){return{content:n}}}}var LR=NR({forgiving:!0}),RR=Object.fromEntries(ku.flatMap(e=>{var t;return((t=e.aliases)!=null?t:[]).map(n=>[n,e.id])})),Ui=new Set(Object.keys(bm)),pd=e=>{let t=e.trim().toLowerCase();return RR[t]||(Ui.has(t),t)},Ia=new Map,Sa=new Map,Yn=new Map,ds=e=>{var t;return typeof e=="string"?e:(t=e.name)!=null?t:"custom"},vR=(e,t)=>`${e}-${ds(t[0])}-${ds(t[1])}`,OR=(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}`},PR=(e,t)=>{let n=vR(e,t);if(Ia.has(n))return Ia.get(n);let r=VN({themes:t,langs:[e],engine:LR});return Ia.set(n,r),r};function DR(e={}){var t;let n=(t=e.themes)!=null?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(r){let i=pd(r);return Ui.has(i)},getSupportedLanguages(){return Array.from(Ui)},getThemes(){return n},highlight({code:r,language:i,themes:s},a){let o=pd(i),u=[ds(s[0]),ds(s[1])],l=OR(r,o,u);if(Sa.has(l))return Sa.get(l);a&&(Yn.has(l)||Yn.set(l,new Set),Yn.get(l).add(a));let c=Ui.has(o)?o:"text";return PR(c,s).then(d=>{let p=d.getLoadedLanguages().includes(o)?o:"text",f=d.codeToTokens(r,{lang:p,themes:{light:u[0],dark:u[1]}});Sa.set(l,f);let m=Yn.get(l);if(m){for(let b of m)b(f);Yn.delete(l)}}).catch(d=>{console.error("[Streamdown Code] Failed to highlight code:",d),Yn.delete(l)}),null}}}var MR=DR();const BR=k.memo(function({url:t,onClose:n,onConfirm:r}){return k.useEffect(()=>{const i=s=>{s.key==="Enter"&&(s.preventDefault(),r())};return window.addEventListener("keydown",i,!0),()=>window.removeEventListener("keydown",i,!0)},[r]),E.jsxs(H0,{open:!0,title:"External Link",onClose:n,width:600,children:[E.jsx("div",{className:"text-body-sm text-[var(--color-brand-default)] break-all bg-[var(--color-surface-canvas)] rounded-[4px] px-3.5 py-2.5 border border-[var(--color-border-subtle)]",children:t}),E.jsxs("div",{className:"flex justify-end gap-2.5 mt-4",children:[E.jsx("button",{onClick:n,className:"bg-transparent border border-[var(--color-border-default)] rounded-[4px] px-5 py-2 text-[var(--color-text-secondary)] text-body-sm cursor-pointer transition-colors duration-base ease-out hover:bg-white/5 focus-visible:bg-white/5",children:"Cancel"}),E.jsx("button",{onClick:r,className:"bg-[var(--color-brand-subtle)] border border-[var(--color-brand-soft)] rounded-[4px] px-5 py-2 text-[var(--color-brand-default)] text-body-sm-medium cursor-pointer transition-colors duration-base ease-out hover:bg-[var(--color-brand-soft)] focus-visible:bg-[var(--color-brand-soft)]",children:"Open in new tab"})]})]})});function FR({children:e}){const[t,n]=k.useState(()=>new Map),r=k.useCallback(a=>t.get(a),[t]),i=k.useCallback(a=>{for(const o of t.values())if(a(o))return o},[t]),s=k.useCallback((a,o)=>{n(u=>{if(u.get(a)===o)return u;const l=new Map(u);return l.set(a,o),l})},[]);return E.jsx(U0.Provider,{value:{get:r,find:i,set:s},children:e})}const Vm={ema:{kind:"overlay",label:"EMA",color:"#f5c842"},bb:{kind:"overlay",label:"Bollinger Bands",color:"#7c4dff"},ichimoku:{kind:"overlay",label:"Ichimoku Cloud",color:"var(--color-success-default)"},keltner:{kind:"overlay",label:"Keltner Channel",color:"#ff7043"},rsi:{kind:"subpane",label:"RSI",color:"#ab47bc"},macd:{kind:"subpane",label:"MACD",color:"#42a5f5"},adx:{kind:"subpane",label:"ADX",color:"#ffa726"},stochrsi:{kind:"subpane",label:"StochRSI",color:"#ba68c8"},obv:{kind:"subpane",label:"OBV",color:"#4fc3f7"},williamsr:{kind:"subpane",label:"WilliamsR",color:"#ec407a"},cci:{kind:"subpane",label:"CCI",color:"#9ccc65"},atr:{kind:"subpane",label:"ATR",color:"#ffd54f"},vwap:{kind:"overlay",label:"VWAP",color:"#80deea"}},HR=new Set(Object.keys(Vm));function UR(e){return Vm[e.toLowerCase()]}function mt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function zm(e,t=[]){let n=[];function r(s,a){const o=k.createContext(a),u=n.length;n=[...n,a];const l=d=>{var g;const{scope:p,children:f,...m}=d,b=((g=p==null?void 0:p[e])==null?void 0:g[u])||o,y=k.useMemo(()=>m,Object.values(m));return E.jsx(b.Provider,{value:y,children:f})};l.displayName=s+"Provider";function c(d,p){var b;const f=((b=p==null?void 0:p[e])==null?void 0:b[u])||o,m=k.useContext(f);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,c]}const i=()=>{const s=n.map(a=>k.createContext(a));return function(o){const u=(o==null?void 0:o[e])||s;return k.useMemo(()=>({[`__scope${e}`]:{...o,[e]:u}}),[o,u])}};return i.scopeName=e,[r,$R(i,...t)]}function $R(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:u,scopeName:l})=>{const d=u(s)[`__scope${l}`];return{...o,...d}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Dn=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{},jR=S0[" useInsertionEffect ".trim().toString()]||Dn;function VR({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=zR({defaultProp:t,onChange:n}),o=e!==void 0,u=o?e:i;{const c=k.useRef(e!==void 0);k.useEffect(()=>{const d=c.current;d!==o&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=o},[o,r])}const l=k.useCallback(c=>{var d;if(o){const p=GR(c)?c(e):c;p!==e&&((d=a.current)==null||d.call(a,p))}else s(c)},[o,e,s,a]);return[u,l]}function zR({defaultProp:e,onChange:t}){const[n,r]=k.useState(e),i=k.useRef(n),s=k.useRef(t);return jR(()=>{s.current=t},[t]),k.useEffect(()=>{var a;i.current!==n&&((a=s.current)==null||a.call(s,n),i.current=n)},[n,i]),[n,r,s]}function GR(e){return typeof e=="function"}function md(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gm(...e){return t=>{let n=!1;const r=e.map(i=>{const s=md(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():md(e[i],null)}}}}function Er(...e){return k.useCallback(Gm(...e),e)}function WR(e){const t=qR(e),n=k.forwardRef((r,i)=>{const{children:s,...a}=r,o=k.Children.toArray(s),u=o.find(QR);if(u){const l=u.props.children,c=o.map(d=>d===u?k.Children.count(l)>1?k.Children.only(null):k.isValidElement(l)?l.props.children:null:d);return E.jsx(t,{...a,ref:i,children:k.isValidElement(l)?k.cloneElement(l,void 0,c):null})}return E.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function qR(e){const t=k.forwardRef((n,r)=>{const{children:i,...s}=n;if(k.isValidElement(i)){const a=XR(i),o=KR(s,i.props);return i.type!==k.Fragment&&(o.ref=r?Gm(r,a):a),k.cloneElement(i,o)}return k.Children.count(i)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var YR=Symbol("radix.slottable");function QR(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===YR}function KR(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const u=s(...o);return i(...o),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function XR(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$n=ZR.reduce((e,t)=>{const n=WR(`Primitive.${t}`),r=k.forwardRef((i,s)=>{const{asChild:a,...o}=i,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(u,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function JR(e,t){e&&yo.flushSync(()=>e.dispatchEvent(t))}var ev="Arrow",Wm=k.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return E.jsx($n.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:E.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wm.displayName=ev;var tv=Wm;function Bs(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function nv(e){const[t,n]=k.useState(void 0);return Dn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,o=l.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Lu="Popper",[qm,Ym]=zm(Lu),[rv,Qm]=qm(Lu),Km=e=>{const{__scopePopper:t,children:n}=e,[r,i]=k.useState(null);return E.jsx(rv,{scope:t,anchor:r,onAnchorChange:i,children:n})};Km.displayName=Lu;var Xm="PopperAnchor",Zm=k.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=Qm(Xm,n),a=k.useRef(null),o=Er(t,a),u=k.useRef(null);return k.useEffect(()=>{const l=u.current;u.current=(r==null?void 0:r.current)||a.current,l!==u.current&&s.onAnchorChange(u.current)}),r?null:E.jsx($n.div,{...i,ref:o})});Zm.displayName=Xm;var Ru="PopperContent",[iv,sv]=qm(Ru),Jm=k.forwardRef((e,t)=>{var ze,Pe,de,Ge,Xe,ot;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:f="optimized",onPlaced:m,...b}=e,y=Qm(Ru,n),[g,I]=k.useState(null),C=Er(t,Ze=>I(Ze)),[v,P]=k.useState(null),N=nv(v),B=(N==null?void 0:N.width)??0,M=(N==null?void 0:N.height)??0,z=r+(s!=="center"?"-"+s:""),L=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},V=Array.isArray(l)?l:[l],G=V.length>0,Z={padding:L,boundary:V.filter(ov),altBoundary:G},{refs:Y,floatingStyles:$,placement:W,isPositioned:J,middlewareData:me}=N0({strategy:"fixed",placement:z,whileElementsMounted:(...Ze)=>M0(...Ze,{animationFrame:f==="always"}),elements:{reference:y.anchor},middleware:[L0({mainAxis:i+M,alignmentAxis:a}),u&&R0({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?B0():void 0,...Z}),u&&v0({...Z}),O0({...Z,apply:({elements:Ze,rects:ut,availableWidth:fn,availableHeight:Yt})=>{const{width:jn,height:se}=ut.reference,pe=Ze.floating.style;pe.setProperty("--radix-popper-available-width",`${fn}px`),pe.setProperty("--radix-popper-available-height",`${Yt}px`),pe.setProperty("--radix-popper-anchor-width",`${jn}px`),pe.setProperty("--radix-popper-anchor-height",`${se}px`)}}),v&&P0({element:v,padding:o}),uv({arrowWidth:B,arrowHeight:M}),p&&D0({strategy:"referenceHidden",...Z})]}),[Ce,A]=n0(W),Te=Bs(m);Dn(()=>{J&&(Te==null||Te())},[J,Te]);const we=(ze=me.arrow)==null?void 0:ze.x,S=(Pe=me.arrow)==null?void 0:Pe.y,Ie=((de=me.arrow)==null?void 0:de.centerOffset)!==0,[le,ie]=k.useState();return Dn(()=>{g&&ie(window.getComputedStyle(g).zIndex)},[g]),E.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:J?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[(Ge=me.transformOrigin)==null?void 0:Ge.x,(Xe=me.transformOrigin)==null?void 0:Xe.y].join(" "),...((ot=me.hide)==null?void 0:ot.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(iv,{scope:n,placedSide:Ce,onArrowChange:P,arrowX:we,arrowY:S,shouldHideArrow:Ie,children:E.jsx($n.div,{"data-side":Ce,"data-align":A,...b,ref:C,style:{...b.style,animation:J?void 0:"none"}})})})});Jm.displayName=Ru;var e0="PopperArrow",av={top:"bottom",right:"left",bottom:"top",left:"right"},t0=k.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=sv(e0,r),a=av[s.placedSide];return E.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:E.jsx(tv,{...i,ref:n,style:{...i.style,display:"block"}})})});t0.displayName=e0;function ov(e){return e!==null}var uv=e=>({name:"transformOrigin",options:e,fn(t){var y,g,I;const{placement:n,rects:r,middlewareData:i}=t,a=((y=i.arrow)==null?void 0:y.centerOffset)!==0,o=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=n0(n),d={start:"0%",center:"50%",end:"100%"}[c],p=(((g=i.arrow)==null?void 0:g.x)??0)+o/2,f=(((I=i.arrow)==null?void 0:I.y)??0)+u/2;let m="",b="";return l==="bottom"?(m=a?d:`${p}px`,b=`${-u}px`):l==="top"?(m=a?d:`${p}px`,b=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,b=a?d:`${f}px`):l==="left"&&(m=`${r.floating.width+u}px`,b=a?d:`${f}px`),{data:{x:m,y:b}}}});function n0(e){const[t,n="center"]=e.split("-");return[t,n]}var lv=Km,cv=Zm,dv=Jm,hv=t0,fv="Portal",r0=k.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[i,s]=k.useState(!1);Dn(()=>s(!0),[]);const a=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?F0.createPortal(E.jsx($n.div,{...r,ref:t}),a):null});r0.displayName=fv;function pv(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var vu=e=>{const{present:t,children:n}=e,r=mv(t),i=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),s=Er(r.ref,gv(i));return typeof n=="function"||r.isPresent?k.cloneElement(i,{ref:s}):null};vu.displayName="Presence";function mv(e){const[t,n]=k.useState(),r=k.useRef(null),i=k.useRef(e),s=k.useRef("none"),a=e?"mounted":"unmounted",[o,u]=pv(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const l=Ri(r.current);s.current=o==="mounted"?l:"none"},[o]),Dn(()=>{const l=r.current,c=i.current;if(c!==e){const p=s.current,f=Ri(l);e?u("MOUNT"):f==="none"||(l==null?void 0:l.display)==="none"?u("UNMOUNT"):u(c&&p!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),Dn(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,d=f=>{const b=Ri(r.current).includes(CSS.escape(f.animationName));if(f.target===t&&b&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=f=>{f.target===t&&(s.current=Ri(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:k.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Ri(e){return(e==null?void 0:e.animationName)||"none"}function gv(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function bv(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e);k.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ev="DismissableLayer",_o="dismissableLayer.update",_v="dismissableLayer.pointerDownOutside",Tv="dismissableLayer.focusOutside",gd,i0=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),s0=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...u}=e,l=k.useContext(i0),[c,d]=k.useState(null),p=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=k.useState({}),m=Er(t,B=>d(B)),b=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=b.indexOf(y),I=c?b.indexOf(c):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,v=I>=g,P=kv(B=>{const M=B.target,z=[...l.branches].some(L=>L.contains(M));!v||z||(i==null||i(B),a==null||a(B),B.defaultPrevented||o==null||o())},p),N=Av(B=>{const M=B.target;[...l.branches].some(L=>L.contains(M))||(s==null||s(B),a==null||a(B),B.defaultPrevented||o==null||o())},p);return bv(B=>{I===l.layers.size-1&&(r==null||r(B),!B.defaultPrevented&&o&&(B.preventDefault(),o()))},p),k.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(gd=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),bd(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=gd)}},[c,p,n,l]),k.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),bd())},[c,l]),k.useEffect(()=>{const B=()=>f({});return document.addEventListener(_o,B),()=>document.removeEventListener(_o,B)},[]),E.jsx($n.div,{...u,ref:m,style:{pointerEvents:C?v?"auto":"none":void 0,...e.style},onFocusCapture:mt(e.onFocusCapture,N.onFocusCapture),onBlurCapture:mt(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:mt(e.onPointerDownCapture,P.onPointerDownCapture)})});s0.displayName=Ev;var yv="DismissableLayerBranch",xv=k.forwardRef((e,t)=>{const n=k.useContext(i0),r=k.useRef(null),i=Er(t,r);return k.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),E.jsx($n.div,{...e,ref:i})});xv.displayName=yv;function kv(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e),r=k.useRef(!1),i=k.useRef(()=>{});return k.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let u=function(){a0(_v,n,l,{discrete:!0})};const l={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Av(e,t=globalThis==null?void 0:globalThis.document){const n=Bs(e),r=k.useRef(!1);return k.useEffect(()=>{const i=s=>{s.target&&!r.current&&a0(Tv,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bd(){const e=new CustomEvent(_o);document.dispatchEvent(e)}function a0(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?JR(i,s):i.dispatchEvent(s)}var Na,Fs="HoverCard",[o0]=zm(Fs,[Ym]),Hs=Ym(),[Cv,Us]=o0(Fs),u0=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:s,openDelay:a=700,closeDelay:o=300}=e,u=Hs(t),l=k.useRef(0),c=k.useRef(0),d=k.useRef(!1),p=k.useRef(!1),[f,m]=VR({prop:r,defaultProp:i??!1,onChange:s,caller:Fs}),b=k.useCallback(()=>{clearTimeout(c.current),l.current=window.setTimeout(()=>m(!0),a)},[a,m]),y=k.useCallback(()=>{clearTimeout(l.current),!d.current&&!p.current&&(c.current=window.setTimeout(()=>m(!1),o))},[o,m]),g=k.useCallback(()=>m(!1),[m]);return k.useEffect(()=>()=>{clearTimeout(l.current),clearTimeout(c.current)},[]),E.jsx(Cv,{scope:t,open:f,onOpenChange:m,onOpen:b,onClose:y,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:p,children:E.jsx(lv,{...u,children:n})})};u0.displayName=Fs;var l0="HoverCardTrigger",c0=k.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=Us(l0,n),s=Hs(n);return E.jsx(cv,{asChild:!0,...s,children:E.jsx($n.a,{"data-state":i.open?"open":"closed",...r,ref:t,onPointerEnter:mt(e.onPointerEnter,fs(i.onOpen)),onPointerLeave:mt(e.onPointerLeave,fs(i.onClose)),onFocus:mt(e.onFocus,i.onOpen),onBlur:mt(e.onBlur,i.onClose),onTouchStart:mt(e.onTouchStart,a=>a.preventDefault())})})});c0.displayName=l0;var Ou="HoverCardPortal",[wv,Iv]=o0(Ou,{forceMount:void 0}),d0=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,s=Us(Ou,t);return E.jsx(wv,{scope:t,forceMount:n,children:E.jsx(vu,{present:n||s.open,children:E.jsx(r0,{asChild:!0,container:i,children:r})})})};d0.displayName=Ou;var hs="HoverCardContent",h0=k.forwardRef((e,t)=>{const n=Iv(hs,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,s=Us(hs,e.__scopeHoverCard);return E.jsx(vu,{present:r||s.open,children:E.jsx(Sv,{"data-state":s.open?"open":"closed",...i,onPointerEnter:mt(e.onPointerEnter,fs(s.onOpen)),onPointerLeave:mt(e.onPointerLeave,fs(s.onClose)),ref:t})})});h0.displayName=hs;var Sv=k.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,...o}=e,u=Us(hs,n),l=Hs(n),c=k.useRef(null),d=Er(t,c),[p,f]=k.useState(!1);return k.useEffect(()=>{if(p){const m=document.body;return Na=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=Na,m.style.webkitUserSelect=Na}}},[p]),k.useEffect(()=>{if(c.current){const m=()=>{f(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(u.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",m),()=>{document.removeEventListener("pointerup",m),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),k.useEffect(()=>{c.current&&Rv(c.current).forEach(b=>b.setAttribute("tabindex","-1"))}),E.jsx(s0,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:mt(s,m=>{m.preventDefault()}),onDismiss:u.onDismiss,children:E.jsx(dv,{...l,...o,onPointerDown:mt(o.onPointerDown,m=>{m.currentTarget.contains(m.target)&&f(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:d,style:{...o.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Nv="HoverCardArrow",Lv=k.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=Hs(n);return E.jsx(hv,{...i,...r,ref:t})});Lv.displayName=Nv;function fs(e){return t=>t.pointerType==="touch"?void 0:e()}function Rv(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var f0=u0,p0=c0,m0=d0,g0=h0;const b0=300,E0=180,vv=300,_0=140,Ov=_0+yd+4;function To(e,t){return{height:e,width:b0,layout:{background:{type:Id.Solid,color:Cd},textColor:Ad,fontFamily:kd,fontSize:xd},grid:{vertLines:{color:$i},horzLines:{color:$i}},crosshair:{mode:wd.Normal},rightPriceScale:{borderColor:qr,scaleMargins:{top:.05,bottom:.05}},timeScale:{borderColor:qr,timeVisible:!0,secondsVisible:!1,visible:t},handleScroll:{vertTouchDrag:!1}}}function Pv(e){return e.startsWith("rgba(")||e.startsWith("#")?e:e.startsWith("rgb(")?e.replace("rgb(","rgba(").replace(")",", 0.5)"):e}function Ed(e,t,n){const r=ji(e,To(E0,!0));r.addSeries(Ao,{upColor:zt,downColor:Gt,borderDownColor:Gt,borderUpColor:zt,wickDownColor:Gt,wickUpColor:zt}).setData(t.candles);const s=n.toLowerCase();if(s==="ema")for(const u of t.lineOverlays)u.label.toLowerCase().startsWith("ema")&&r.addSeries(An,{color:u.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(u.data);else{const u=t.lineOverlays.find(l=>l.label.toLowerCase()===s);u&&r.addSeries(An,{color:u.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(u.data);for(const l of t.bandOverlays)if(l.label.toLowerCase()===s){const c=Pv(l.color);r.addSeries(An,{color:c,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(l.upperData),r.addSeries(An,{color:c,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(l.lowerData)}}const a=t.candles.length,o=Math.min(50,a);return r.timeScale().setVisibleLogicalRange({from:a-o,to:a-1}),r}function Dv(e,t,n,r){const i=ji(e,To(_0,!1));i.addSeries(Ao,{upColor:zt,downColor:Gt,borderDownColor:Gt,borderUpColor:zt,wickDownColor:Gt,wickUpColor:zt}).setData(n.candles);const a=ji(t,{...To(yd,!0),rightPriceScale:{borderColor:qr,scaleMargins:{top:.1,bottom:.1}}});r.type==="macd"?(r.histogramData&&r.histogramData.length>0&&a.addSeries(V0,{priceFormat:{type:"price",precision:2,minMove:.01},priceLineVisible:!1,lastValueVisible:!1}).setData(r.histogramData),r.data.length>0&&a.addSeries(An,{color:r.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(r.data),r.signalData&&r.signalData.length>0&&a.addSeries(An,{color:"#ff9800",lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(r.signalData)):a.addSeries(An,{color:r.color,lineWidth:1,priceLineVisible:!1,lastValueVisible:!1,crosshairMarkerVisible:!1}).setData(r.data);const o=n.candles.length,u=Math.min(50,o),l={from:o-u,to:o-1};return i.timeScale().setVisibleLogicalRange(l),a.timeScale().setVisibleLogicalRange(l),[i,a]}const Mv=k.memo(function({data:t,indicatorName:n,indicatorKind:r}){const i=k.useRef(null),s=k.useRef(null);k.useEffect(()=>{const l=i.current;if(!l||t.candles.length===0)return;if(r==="overlay"){const b=Ed(l,t,n);return()=>{b.remove()}}const c=n.toLowerCase(),d=t.subPanes.find(b=>b.label.toLowerCase()===c);if(!d){const b=Ed(l,t,n);return()=>{b.remove()}}const p=s.current;if(!p)return;const[f,m]=Dv(l,p,t,d);return()=>{f.remove(),m.remove()}},[t,n,r]);const a=r==="subpane",o=a?vv:b0,u=a?Ov:E0;return E.jsxs("div",{className:"overflow-hidden rounded-[4px] bg-[var(--color-surface-canvas)]",style:{width:o,height:u},children:[E.jsx("div",{ref:i,style:{width:o}}),a&&E.jsx("div",{ref:s,className:"mt-1",style:{width:o}})]})});function Bv({data:e,indicatorName:t,indicatorKind:n,children:r}){return E.jsxs(f0,{openDelay:300,closeDelay:100,children:[E.jsx(p0,{asChild:!0,children:r}),E.jsx(m0,{children:E.jsx(g0,{side:"top",align:"center",sideOffset:6,className:"z-[9998] overflow-hidden rounded-[2px] border border-[rgba(121,121,121,0.15)] bg-[var(--color-surface-canvas)] shadow-[0_8px_32px_rgba(0,0,0,0.6)]",children:E.jsx(Mv,{data:e,indicatorName:t,indicatorKind:n})})})]})}const Fv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAE/UlEQVR4nO1YW0xcRRj+Zs5eD8uyuyDXUiMVsUCJpl7iJVobKyleaIi3mvCoibExjTEhfZDoqokxXtBAok9GqalJjSkt+KA0VoigPogCQg0SJIRyv+yye/Z6zphzoJRl4ezuWVhe9ksmm/n239n/m5n/n38GSCONNNJIIwkQtS8HBwcNglFwAqyegBQKXi/4jIwIm93iGNg1gLTyAb6xsrIyuJ2POjUBfqPgpIQ0XNdJCFHaRuwWR0AKATT4jQIDcGY7H6maABBSvz7gHjVQUq/mouoKcJQr3Dw7lERq3m0uLKFIswBB8EYNnkqOMaC5ywfNAiyWzIi+1+tBRoYlZdwXvSvoHAlrF0CxxfKmiOsYFPD1716QTVssIQGpyjgbIfd/Gw+i6YobiOF8HAKiZ2e3uZE5hje/d0FkVMneZXl6zGkV4PG5NynaXW7KzeDsDCAgKuqQl0nxxjE9qrUKyMqwRfTdggtWPmtXOJdPgvPHRSz7iOK81UTxUZ0D++26JLbQFgGmlWv9Q0Tb4BwO5ulx9FYTHjpghG7NzhdieP2iCxMuCaAUJh3BByccuNmuV3U+pgC6RYBp4abcIs7/JUFiBH2TYfRNetDU7UV5HsFjZT70/BfAP3OiEg8cAd4+bkNlviGm8zEF7FR2uTDohySvyAYzkQED03JbO8jWgvml+zg8WGKKy/mYAtx+V5RjiXIhEbg4FFp38EQFxdgiw8AMgyRF/t8Ld1LUVnJR42kWYOcdEf1l3xJsZntCXMdVP9xBOacDRVkcGo5mgxJgySehY3gJPeMcRubCqK0w4ZX7LXD5o8fb0y307YB/ffbrDmWAk70H4OA5PFnOof6wPeZ4alA96uQMsbHJs6h8MoqmbgFHPl9Ecy+DKG1td3VGwvCspASnUU9RW27e0o7E4jQL2KZGb/nVh3P9AfjCBJeGCV6+4IIrwKLszv+9NvuE4sgBCpuZ03YnUIHqt/0Tf8q3oQi0DQHNPdG2RVbgnWpg39pZ5QkAz58DAmvFZHMtUHYTNKGq+A6iKQayzZH/+M3APFp6lTVWUJrD4d95EbLKyRXgtXaKj5/IxD7bMn4esyAgehXbijwdbs8NwWHKiRhv0T8fF7cjW6h7PIQPf6FgchBSgsPFBpx91o7GRwlMBqpwS0GGF9vcuDxK8N2QX+Hk9lyVOblrZbIncf9MGGd+ECAxKpcpKM3m8EmNVTnyHy6R+1k43eHBgk+Sr4B4r2v193LwZpkIjt9mwkrIo/lkTyoLjS4ynGoX4BPlrUNRbNPhs6eyYDVyq1mCEFTlGdD6tA23OHTrQXu91ZXzMHKrdpuzC4mTU/dRBZdHhtir7RwWhNW+3czw6ePieqBuhicINHZy6JtaHVbeQWefCaMg8maaMA7mVxBNAu5uGWVKhQgg00jQVBPCvQWRgT0fmEWOMXe9HxIZ3upaxE9jOpysNOLUPaYt7RLhcmw52rLQhHzXkA8hHdBSY8H+7IXooFLK9xucQUdw+gER7x7NUbVLiEumlJDL2/eP8birSI+5QOpe5uJFzDux8xEe1SWGlL9KxAtVqc4ro+zkIfV3mVSgNLtMWxC7Pe6IUmI2OI1cQz5SzVktVm1BTAiZIiAFe/k2ysCm1XxU3WwU9KtkSoCdaBT0SzUfVVeA5/lGwS/IQ8lP3AWpyDjkBneNgbXyZr5Rzcc00kgjjTSQDP4H+Yvkqb5uHfkAAAAASUVORK5CYII=";function T0({size:e=18}){return E.jsx("img",{src:Fv,width:e,height:e,alt:"","aria-hidden":"true"})}function Hv(e,t){const n=t.toLowerCase();return n==="ema"?e.lineOverlays.some(r=>r.label.toLowerCase().startsWith("ema")):e.lineOverlays.some(r=>r.label.toLowerCase()===n)||e.bandOverlays.some(r=>r.label.toLowerCase()===n)||e.subPanes.some(r=>r.label.toLowerCase()===n)}function Uv({name:e,children:t}){const n=xo(),r=ko(),i=(e==null?void 0:e.toLowerCase().trim().replace(/^user-content-/,""))??"",s=UR(i);if(!HR.has(i)||!s)return E.jsx(E.Fragment,{children:t});let a;if(n&&(a=n.find(u=>Hv(u,i))),!a)return E.jsx(E.Fragment,{children:t});const o=()=>{!r||!a||r.open({symbol:a.symbol,interval:a.interval,focus:{kind:"indicator",name:i}})};return E.jsxs("span",{className:"inline-flex items-center gap-1",children:[E.jsx("span",{className:"font-semibold text-[#42a5f5]",children:t}),E.jsx(Bv,{data:a,indicatorName:i,indicatorKind:s.kind,children:E.jsx("span",{onClick:o,className:"cursor-pointer",children:E.jsx(T0,{})})})]})}const La=300,_d=180,$v="#ffeb3b",jv=k.memo(function({data:t,price:n,side:r}){const i=k.useRef(null);return k.useEffect(()=>{const s=i.current;if(!s||t.candles.length===0)return;const a=ji(s,{height:_d,width:La,layout:{background:{type:Id.Solid,color:Cd},textColor:Ad,fontFamily:kd,fontSize:xd},grid:{vertLines:{color:$i},horzLines:{color:$i}},crosshair:{mode:wd.Normal},rightPriceScale:{borderColor:qr,scaleMargins:{top:.05,bottom:.05}},timeScale:{borderColor:qr,timeVisible:!0,secondsVisible:!1},handleScroll:{vertTouchDrag:!1}}),o=a.addSeries(Ao,{upColor:zt,downColor:Gt,borderDownColor:Gt,borderUpColor:zt,wickDownColor:Gt,wickUpColor:zt});o.setData(t.candles);const u=t.candles.length,l=Math.min(50,u),c=u-l,d=u-1;a.timeScale().setVisibleLogicalRange({from:c,to:d});const p=t.candles.slice(c,d+1),f=Math.min(...p.map(I=>I.low)),m=Math.max(...p.map(I=>I.high)),b=m-f||m*.01;if((n>m?n-m:n<f?f-n:0)>0){const I=b*.08,C=Math.min(f,n)-I,v=Math.max(m,n)+I;o.applyOptions({autoscaleInfoProvider:()=>({priceRange:{minValue:C,maxValue:v}})})}const g=r==="support"?Mu:r==="resistance"?Bu:$v;o.createPriceLine({price:n,color:g,lineWidth:2,lineStyle:Fu.Solid,axisLabelVisible:!0,title:""});for(const I of t.levels){if(Math.abs(I.price-n)<1e-4)continue;const C=I.side==="support"?Mu:Bu;o.createPriceLine({price:I.price,color:C+"55",lineWidth:1,lineStyle:Fu.Dashed,axisLabelVisible:!1,title:""})}return()=>{a.remove()}},[t,n,r]),E.jsx("div",{className:"overflow-hidden rounded-[4px] bg-[var(--color-surface-canvas)]",style:{width:La,height:_d},children:E.jsx("div",{ref:i,style:{width:La}})})});function Vv({data:e,price:t,side:n,children:r}){return E.jsxs(f0,{openDelay:300,closeDelay:100,children:[E.jsx(p0,{asChild:!0,children:r}),E.jsx(m0,{children:E.jsx(g0,{side:"top",align:"center",sideOffset:6,className:"z-[9998] overflow-hidden rounded-[2px] border border-[rgba(121,121,121,0.15)] bg-[var(--color-surface-canvas)] shadow-[0_8px_32px_rgba(0,0,0,0.6)]",children:E.jsx(jv,{data:e,price:t,side:n})})})]})}const zv=.005;function Gv(e){if(!e)return null;const t=e.replace(/[,_\s$]/g,""),n=Number.parseFloat(t);return Number.isFinite(n)?n:null}function Wv(e,t){const n=t*zv,r=e.find(s=>s.levels.some(a=>Math.abs(a.price-t)<=n));if(r){const s=r.levels.find(a=>Math.abs(a.price-t)<=n);return{data:r,level:s}}const i=e.find(s=>{if(s.candles.length===0)return!1;const a=s.candles.flatMap(l=>[l.low,l.high]),o=Math.min(...a),u=Math.max(...a);return t>=o*.9&&t<=u*1.1});return i?{data:i}:null}function qv({price:e,children:t}){var u;const n=xo(),r=ko(),i=Gv(e);if(i===null||!n)return E.jsx(E.Fragment,{children:t});const s=Wv(n,i);if(!s)return E.jsx(E.Fragment,{children:t});const a=(u=s.level)==null?void 0:u.side,o=()=>{r&&r.open({symbol:s.data.symbol,interval:s.data.interval,focus:{kind:"level",price:i}})};return E.jsxs("span",{className:"inline-flex items-center gap-1",children:[E.jsx("span",{className:"font-semibold text-[#42a5f5]",children:t}),E.jsx(Vv,{data:s.data,price:i,side:a,children:E.jsx("span",{onClick:o,className:"cursor-pointer",children:E.jsx(T0,{})})})]})}function Yv({symbol:e,interval:t,indicators:n,children:r}){const{data:i,loading:s,error:a}=$0(e,t,n),o=xo(),u=ko();k.useEffect(()=>{i&&o&&o.set(j0(e,t,n),i)},[i,o,e,t,n]);const l=t?`${e.toUpperCase()} · ${t}`:e.toUpperCase(),c=()=>{i&&u&&u.open({symbol:i.symbol,interval:i.interval})},d=!i||s||!!a,p=E.jsxs("button",{type:"button",onClick:c,disabled:d,"aria-label":`Open ${l} chart`,className:"my-1.5 inline-flex items-center gap-1.5 px-2 py-1 rounded-[4px] bg-[var(--color-surface-base)] border border-[var(--color-border-default)] text-footnote transition-colors duration-fast ease-out "+(d?"text-[var(--color-text-secondary)] cursor-default opacity-70":"text-[var(--color-text-primary)] cursor-pointer hover:border-[var(--color-brand-default)] hover:text-[var(--color-brand-default)] focus-visible:border-[var(--color-brand-default)] focus-visible:text-[var(--color-brand-default)]"),children:[E.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[E.jsx("path",{d:"M3 3v18h18"}),E.jsx("path",{d:"M7 14l4-4 4 4 5-5"})]}),E.jsx("span",{children:s?"Loading chart…":a?`${l} (unavailable)`:l}),!d&&E.jsx("span",{"aria-hidden":"true",children:"→"})]});return E.jsxs(E.Fragment,{children:[r,p]})}const Qv={pct:["dir"],price:[],pnl:["dir"],lev:[],side:["dir"],tag:["type"],risk:["level"],verdict:["type"],chart:["symbol","interval","indicators","levels","focus-time","focus-price"],ind:["name"],lvl:["price"],asks:[],question:[],title:[],options:[],option:[]},Kv={pct:({dir:e,children:t})=>E.jsx("span",{className:e==="up"?"trade-pct-up":"trade-pct-down",children:t}),price:({children:e})=>E.jsx("span",{className:"trade-price",children:e}),pnl:({dir:e,children:t})=>E.jsx("span",{className:e==="up"?"trade-pnl-up":"trade-pnl-down",children:t}),lev:({children:e})=>E.jsx("span",{className:"trade-leverage",children:e}),side:({dir:e,children:t})=>E.jsx("span",{className:e==="long"?"trade-long":"trade-short",children:t}),tag:({type:e,children:t})=>E.jsx("span",{className:`trade-tag trade-tag-${e??"entry"}`,children:t}),risk:({level:e,children:t})=>E.jsx("span",{className:`trade-risk trade-risk-${e??"medium"}`,children:t}),verdict:({type:e,children:t})=>E.jsx("span",{className:`trade-verdict trade-verdict-${e??"neutral"}`,children:t}),ind:({name:e,children:t})=>E.jsx(Uv,{name:e,children:t}),lvl:({price:e,children:t})=>E.jsx(qv,{price:e,children:t}),chart:({children:e,...t})=>E.jsx(Yv,{symbol:String(t.symbol??""),interval:t.interval?String(t.interval):void 0,indicators:t.indicators?String(t.indicators):void 0,children:e})},Xv={asks:({children:e})=>E.jsx(E.Fragment,{children:e}),question:({children:e})=>E.jsx(E.Fragment,{children:e}),title:({children:e})=>E.jsx(E.Fragment,{children:e}),options:()=>null,option:()=>null},Zv={table:({children:e})=>E.jsx("div",{className:"overflow-x-auto my-3",children:E.jsx("table",{className:"w-full border-collapse text-body-md border border-white/[0.08] rounded-[4px]",children:e})}),th:({children:e})=>E.jsx("th",{className:"px-3 py-1.5 text-left text-label-sm uppercase tracking-wider text-slate-400 border-b border-white/10 bg-white/5",children:e}),td:({children:e})=>E.jsx("td",{className:"px-3 py-1.5 text-left text-body-md tabular-nums border-b border-white/[0.06]",children:e})},Jv={code:MR},eO={...Kv,...Xv,...Zv},tO={enabled:!0,renderModal:({isOpen:e,onClose:t,onConfirm:n,url:r})=>e?E.jsx(BR,{url:r,onClose:t,onConfirm:n}):null},nO=["ind","lvl"];function rO({content:e,streaming:t}){return E.jsx(FR,{children:E.jsx("div",{className:"chat-md",children:E.jsx(Hp,{mode:t?"streaming":"static",components:eO,allowedTags:Qv,literalTagContent:nO,plugins:Jv,linkSafety:tO,isAnimating:t,caret:"block",children:e})})})}const _O=Object.freeze(Object.defineProperty({__proto__:null,StreamingMarkdown:rO},Symbol.toStringTag,{value:"Module"})),iO=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Up},Symbol.toStringTag,{value:"Module"}));export{Nw as A,mO as L,at as R,_O as S};