hatchlight 0.0.0-stage → 0.4.1

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 (124) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +34 -2
  3. package/bin/hatchlight.js +434 -0
  4. package/package.json +32 -5
  5. package/resources/drizzle/0000_init.sql +57 -0
  6. package/resources/drizzle/0001_job_error_codes.sql +2 -0
  7. package/resources/drizzle/0002_assistant_messages.sql +10 -0
  8. package/resources/drizzle/0003_accounts.sql +56 -0
  9. package/resources/drizzle/0004_spending.sql +14 -0
  10. package/resources/drizzle/0005_account_hardening.sql +12 -0
  11. package/resources/drizzle/0006_lora_uploads.sql +8 -0
  12. package/resources/drizzle/0007_reset_notices.sql +1 -0
  13. package/resources/drizzle/0008_spending_key_source.sql +1 -0
  14. package/resources/drizzle/0009_asset_usage.sql +8 -0
  15. package/resources/drizzle/0010_agent_tokens.sql +8 -0
  16. package/resources/drizzle/0011_pending_spending.sql +1 -0
  17. package/resources/drizzle/meta/0000_snapshot.json +374 -0
  18. package/resources/drizzle/meta/0001_snapshot.json +388 -0
  19. package/resources/drizzle/meta/0002_snapshot.json +449 -0
  20. package/resources/drizzle/meta/0003_snapshot.json +814 -0
  21. package/resources/drizzle/meta/0004_snapshot.json +872 -0
  22. package/resources/drizzle/meta/0005_snapshot.json +950 -0
  23. package/resources/drizzle/meta/0006_snapshot.json +994 -0
  24. package/resources/drizzle/meta/0007_snapshot.json +1001 -0
  25. package/resources/drizzle/meta/0008_snapshot.json +1009 -0
  26. package/resources/drizzle/meta/0009_snapshot.json +1033 -0
  27. package/resources/drizzle/meta/0010_snapshot.json +1064 -0
  28. package/resources/drizzle/meta/0011_snapshot.json +1072 -0
  29. package/resources/drizzle/meta/_journal.json +90 -0
  30. package/resources/web/assets/Assistant-Dcr31LAV.js +44 -0
  31. package/resources/web/assets/Gallery-CMRGE3qD.js +11 -0
  32. package/resources/web/assets/Models-D468Wmoj.js +1 -0
  33. package/resources/web/assets/Settings-DSXHt9Y3.js +2 -0
  34. package/resources/web/assets/bricolage-grotesque-latin-500-normal-CV-uA8Lw.woff +0 -0
  35. package/resources/web/assets/bricolage-grotesque-latin-500-normal-DEDBoLFO.woff2 +0 -0
  36. package/resources/web/assets/bricolage-grotesque-latin-700-normal-DvJDmrLu.woff +0 -0
  37. package/resources/web/assets/bricolage-grotesque-latin-700-normal-gtcctNPv.woff2 +0 -0
  38. package/resources/web/assets/bricolage-grotesque-latin-800-normal-Br4b-5gk.woff +0 -0
  39. package/resources/web/assets/bricolage-grotesque-latin-800-normal-J50vIsBe.woff2 +0 -0
  40. package/resources/web/assets/bricolage-grotesque-latin-ext-500-normal-B0ZDNVGf.woff +0 -0
  41. package/resources/web/assets/bricolage-grotesque-latin-ext-500-normal-DIhLz7G7.woff2 +0 -0
  42. package/resources/web/assets/bricolage-grotesque-latin-ext-700-normal-BXpPFNFj.woff +0 -0
  43. package/resources/web/assets/bricolage-grotesque-latin-ext-700-normal-fBkt-7fi.woff2 +0 -0
  44. package/resources/web/assets/bricolage-grotesque-latin-ext-800-normal-BimIDUhy.woff2 +0 -0
  45. package/resources/web/assets/bricolage-grotesque-latin-ext-800-normal-CkoBqIJM.woff +0 -0
  46. package/resources/web/assets/bricolage-grotesque-vietnamese-500-normal-CAK5R6Iy.woff +0 -0
  47. package/resources/web/assets/bricolage-grotesque-vietnamese-500-normal-FzY9NZwK.woff2 +0 -0
  48. package/resources/web/assets/bricolage-grotesque-vietnamese-700-normal-BLYPkJbo.woff2 +0 -0
  49. package/resources/web/assets/bricolage-grotesque-vietnamese-700-normal-CHrFuVHU.woff +0 -0
  50. package/resources/web/assets/bricolage-grotesque-vietnamese-800-normal-DJ4hCX8l.woff +0 -0
  51. package/resources/web/assets/bricolage-grotesque-vietnamese-800-normal-RJtJa6zl.woff2 +0 -0
  52. package/resources/web/assets/ibm-plex-mono-cyrillic-400-normal-CJUKFyLa.woff +0 -0
  53. package/resources/web/assets/ibm-plex-mono-cyrillic-400-normal-DvQQgHTq.woff2 +0 -0
  54. package/resources/web/assets/ibm-plex-mono-cyrillic-500-normal-BtGHVI3Q.woff2 +0 -0
  55. package/resources/web/assets/ibm-plex-mono-cyrillic-500-normal-N1TV9ACq.woff +0 -0
  56. package/resources/web/assets/ibm-plex-mono-cyrillic-ext-400-normal-B3hZxag_.woff2 +0 -0
  57. package/resources/web/assets/ibm-plex-mono-cyrillic-ext-400-normal-ZyMXPjaT.woff +0 -0
  58. package/resources/web/assets/ibm-plex-mono-cyrillic-ext-500-normal-CmcxpzmF.woff2 +0 -0
  59. package/resources/web/assets/ibm-plex-mono-cyrillic-ext-500-normal-yqk7_qG0.woff +0 -0
  60. package/resources/web/assets/ibm-plex-mono-latin-400-normal-Dm_PoFIZ.woff2 +0 -0
  61. package/resources/web/assets/ibm-plex-mono-latin-400-normal-O6-GRVqx.woff +0 -0
  62. package/resources/web/assets/ibm-plex-mono-latin-500-normal-C_OblDzq.woff2 +0 -0
  63. package/resources/web/assets/ibm-plex-mono-latin-500-normal-zoSM89R3.woff +0 -0
  64. package/resources/web/assets/ibm-plex-mono-latin-ext-400-normal-DxDDqVQb.woff2 +0 -0
  65. package/resources/web/assets/ibm-plex-mono-latin-ext-400-normal-uwM7KshN.woff +0 -0
  66. package/resources/web/assets/ibm-plex-mono-latin-ext-500-normal-BhDX_RLI.woff +0 -0
  67. package/resources/web/assets/ibm-plex-mono-latin-ext-500-normal-Dn-cqWhb.woff2 +0 -0
  68. package/resources/web/assets/ibm-plex-mono-vietnamese-400-normal-BFiUPp6R.woff2 +0 -0
  69. package/resources/web/assets/ibm-plex-mono-vietnamese-400-normal-DLynVohM.woff +0 -0
  70. package/resources/web/assets/ibm-plex-mono-vietnamese-500-normal-CevHOlzG.woff2 +0 -0
  71. package/resources/web/assets/ibm-plex-mono-vietnamese-500-normal-QhwQXayn.woff +0 -0
  72. package/resources/web/assets/index-DrgBjkJQ.js +322 -0
  73. package/resources/web/assets/index-gLwjTNlu.css +1 -0
  74. package/resources/web/assets/index-ydGCWKys.js +1 -0
  75. package/resources/web/assets/inter-tight-cyrillic-400-normal-Cu6X1knp.woff +0 -0
  76. package/resources/web/assets/inter-tight-cyrillic-400-normal-DLglYK2S.woff2 +0 -0
  77. package/resources/web/assets/inter-tight-cyrillic-500-normal-BS_Q301l.woff +0 -0
  78. package/resources/web/assets/inter-tight-cyrillic-500-normal-GsQC2I9I.woff2 +0 -0
  79. package/resources/web/assets/inter-tight-cyrillic-600-normal-CA1nZd4A.woff +0 -0
  80. package/resources/web/assets/inter-tight-cyrillic-600-normal-zvV8lvuq.woff2 +0 -0
  81. package/resources/web/assets/inter-tight-cyrillic-ext-400-normal-CPa21WFm.woff +0 -0
  82. package/resources/web/assets/inter-tight-cyrillic-ext-400-normal-wRoSiYJX.woff2 +0 -0
  83. package/resources/web/assets/inter-tight-cyrillic-ext-500-normal-DDZdcw0e.woff2 +0 -0
  84. package/resources/web/assets/inter-tight-cyrillic-ext-500-normal-SbyCo7Dv.woff +0 -0
  85. package/resources/web/assets/inter-tight-cyrillic-ext-600-normal-BwQoccyI.woff2 +0 -0
  86. package/resources/web/assets/inter-tight-cyrillic-ext-600-normal-D1EOoMTg.woff +0 -0
  87. package/resources/web/assets/inter-tight-greek-400-normal-8GU0b4sT.woff2 +0 -0
  88. package/resources/web/assets/inter-tight-greek-400-normal-BeMKI6ne.woff +0 -0
  89. package/resources/web/assets/inter-tight-greek-500-normal-BGOdJ4jK.woff +0 -0
  90. package/resources/web/assets/inter-tight-greek-500-normal-DfwCMcvd.woff2 +0 -0
  91. package/resources/web/assets/inter-tight-greek-600-normal-BIWCW30H.woff2 +0 -0
  92. package/resources/web/assets/inter-tight-greek-600-normal-CMARuIv4.woff +0 -0
  93. package/resources/web/assets/inter-tight-greek-ext-400-normal-B035aUhC.woff2 +0 -0
  94. package/resources/web/assets/inter-tight-greek-ext-400-normal-tWLvaB1R.woff +0 -0
  95. package/resources/web/assets/inter-tight-greek-ext-500-normal-BtZsBjxU.woff +0 -0
  96. package/resources/web/assets/inter-tight-greek-ext-500-normal-DitH-qUF.woff2 +0 -0
  97. package/resources/web/assets/inter-tight-greek-ext-600-normal-4wRrF3Lp.woff2 +0 -0
  98. package/resources/web/assets/inter-tight-greek-ext-600-normal-DTLxDvi0.woff +0 -0
  99. package/resources/web/assets/inter-tight-latin-400-normal-BW_APOAv.woff +0 -0
  100. package/resources/web/assets/inter-tight-latin-400-normal-CjmW70MP.woff2 +0 -0
  101. package/resources/web/assets/inter-tight-latin-500-normal-DHfo6WYp.woff2 +0 -0
  102. package/resources/web/assets/inter-tight-latin-500-normal-DSK3iurg.woff +0 -0
  103. package/resources/web/assets/inter-tight-latin-600-normal-BhR4EMHT.woff2 +0 -0
  104. package/resources/web/assets/inter-tight-latin-600-normal-RFJ2ueZL.woff +0 -0
  105. package/resources/web/assets/inter-tight-latin-ext-400-normal-BdDiaPns.woff +0 -0
  106. package/resources/web/assets/inter-tight-latin-ext-400-normal-Gi8wMfrP.woff2 +0 -0
  107. package/resources/web/assets/inter-tight-latin-ext-500-normal-BdRfio7v.woff +0 -0
  108. package/resources/web/assets/inter-tight-latin-ext-500-normal-CSMKT5kA.woff2 +0 -0
  109. package/resources/web/assets/inter-tight-latin-ext-600-normal-BiZjrIRq.woff +0 -0
  110. package/resources/web/assets/inter-tight-latin-ext-600-normal-Yxv5k3jL.woff2 +0 -0
  111. package/resources/web/assets/inter-tight-vietnamese-400-normal-CWFku8rW.woff2 +0 -0
  112. package/resources/web/assets/inter-tight-vietnamese-400-normal-s0S0Ysqp.woff +0 -0
  113. package/resources/web/assets/inter-tight-vietnamese-500-normal-B9o3jXvc.woff2 +0 -0
  114. package/resources/web/assets/inter-tight-vietnamese-500-normal-D9AKxpnU.woff +0 -0
  115. package/resources/web/assets/inter-tight-vietnamese-600-normal-B6ESNxpD.woff +0 -0
  116. package/resources/web/assets/inter-tight-vietnamese-600-normal-BZpsSm6S.woff2 +0 -0
  117. package/resources/web/assets/splash-CLEpm4fL.js +1 -0
  118. package/resources/web/favicon.svg +15 -0
  119. package/resources/web/index.html +17 -0
  120. package/resources/web/samples/flux-schnell.webp +0 -0
  121. package/resources/web/samples/sdxl-turbo.webp +0 -0
  122. package/resources/web/samples/sdxl.webp +0 -0
  123. package/resources/web/samples/z-image-turbo.webp +0 -0
  124. package/resources/web/splash.html +26 -0
@@ -0,0 +1,44 @@
1
+ import{c as il,r as V,j as I,a as ye,g as ll,B as Xe,C as ol,u as ft,b as al,d as tn,e as In,M as _r,h as Bt,P as sl,f as ul,i as cl,S as fl,k as Qn,L as hl,l as Ee,J as pl,n as ml}from"./index-DrgBjkJQ.js";import"./index-ydGCWKys.js";/**
2
+ * @license lucide-react v1.78.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const Rr={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};Rr.node;const dl=il(Rr);/*!---------------------------------------------------------------------------------------------
7
+ * Copyright (c) StackBlitz. All rights reserved.
8
+ * Licensed under the MIT License. See License.txt in the project root for license information.
9
+ *--------------------------------------------------------------------------------------------*/const gl={damping:.7,stiffness:.05,mass:1.25},xl=70,yl=1e3/60,kl=350;let gn=!1;var Lr;(Lr=globalThis.document)==null||Lr.addEventListener("mousedown",()=>{gn=!0});var Dr;(Dr=globalThis.document)==null||Dr.addEventListener("mouseup",()=>{gn=!1});var Fr;(Fr=globalThis.document)==null||Fr.addEventListener("click",()=>{gn=!1});const bl=(e={})=>{const[n,t]=V.useState(!1),[r,i]=V.useState(e.initial!==!1),[o,l]=V.useState(!1),a=V.useRef(null);a.current=e;const c=V.useCallback(()=>{var T;if(!gn)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(S.current)||((T=S.current)==null?void 0:T.contains(k.commonAncestorContainer))},[]),s=V.useCallback(b=>{u.isAtBottom=b,i(b)},[]),f=V.useCallback(b=>{u.escapedFromLock=b,t(b)},[]),u=V.useMemo(()=>{let b;return{escapedFromLock:n,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){var k;return((k=S.current)==null?void 0:k.scrollTop)??0},set scrollTop(k){if(S.current){const{scrollBehavior:T}=getComputedStyle(S.current);T!=="auto"&&(S.current.style.scrollBehavior="auto"),S.current.scrollTop=k,u.ignoreScrollToTop=S.current.scrollTop,T!=="auto"&&(S.current.style.scrollBehavior=T)}},get targetScrollTop(){return!S.current||!y.current?0:S.current.scrollHeight-1-S.current.clientHeight},get calculatedTargetScrollTop(){if(!S.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!e.targetScrollTop)return k;if((b==null?void 0:b.targetScrollTop)===k)return b.calculatedScrollTop;const T=Math.max(Math.min(e.targetScrollTop(k,{scrollElement:S.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:T},requestAnimationFrame(()=>{b=void 0}),T},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=xl}}},[]),p=V.useCallback((b={})=>{var H;typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||s(!0);const k=Date.now()+(Number(b.wait)||0),T=Pn(a.current,b.animation),{ignoreEscapes:P=!1}=b;let C,L=u.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{C=Date.now()}):C=k+(b.duration??0);const _=async()=>{const w=new Promise(requestAnimationFrame).then(()=>{var $;if(!u.isAtBottom)return u.animation=void 0,!1;const{scrollTop:z}=u,D=performance.now(),q=(D-(u.lastTick??D))/yl;if(u.animation||(u.animation={behavior:T,promise:w,ignoreEscapes:P}),u.animation.behavior===T&&(u.lastTick=D),c()||k>Date.now())return _();if(z<Math.min(L,u.calculatedTargetScrollTop)){if((($=u.animation)==null?void 0:$.behavior)===T){if(T==="instant")return u.scrollTop=u.calculatedTargetScrollTop,_();u.velocity=(T.damping*u.velocity+T.stiffness*u.scrollDifference)/T.mass,u.accumulated+=u.velocity*q,u.scrollTop+=u.accumulated,u.scrollTop!==z&&(u.accumulated=0)}return _()}return C>Date.now()?(L=u.calculatedTargetScrollTop,_()):(u.animation=void 0,u.scrollTop<u.calculatedTargetScrollTop?p({animation:Pn(a.current,a.current.resize),ignoreEscapes:P,duration:Math.max(0,C-Date.now())||void 0}):u.isAtBottom)});return w.then(z=>(requestAnimationFrame(()=>{u.animation||(u.lastTick=void 0,u.velocity=0)}),z))};return b.wait!==!0&&(u.animation=void 0),((H=u.animation)==null?void 0:H.behavior)===T?u.animation.promise:_()},[s,c,u]),h=V.useCallback(()=>{f(!0),s(!1)},[f,s]),m=V.useCallback(({target:b})=>{if(b!==S.current)return;const{scrollTop:k,ignoreScrollToTop:T}=u;let{lastScrollTop:P=k}=u;u.lastScrollTop=k,u.ignoreScrollToTop=void 0,T&&T>k&&(P=T),l(u.isNearBottom),setTimeout(()=>{var _;if(u.resizeDifference||k===T)return;if(c()){f(!0),s(!1);return}const C=k>P,L=k<P;if((_=u.animation)!=null&&_.ignoreEscapes){u.scrollTop=P;return}L&&(f(!0),s(!1)),C&&f(!1),!u.escapedFromLock&&u.isNearBottom&&s(!0)},1)},[f,s,c,u]),x=V.useCallback(({target:b,deltaY:k})=>{var P;let T=b;for(;!["scroll","auto"].includes(getComputedStyle(T).overflow);){if(!T.parentElement)return;T=T.parentElement}T===S.current&&k<0&&S.current.scrollHeight>S.current.clientHeight&&!((P=u.animation)!=null&&P.ignoreEscapes)&&(f(!0),s(!1))},[f,s,u]),S=jt(b=>{var k,T;(k=S.current)==null||k.removeEventListener("scroll",m),(T=S.current)==null||T.removeEventListener("wheel",x),b==null||b.addEventListener("scroll",m,{passive:!0}),b==null||b.addEventListener("wheel",x,{passive:!0})},[]),y=jt(b=>{var T,P;if((T=u.resizeObserver)==null||T.disconnect(),u.resizeObserver=void 0,!b)return;let k;u.resizeObserver=new ResizeObserver(([C])=>{const{height:L}=C.contentRect,_=L-(k??L);if(u.resizeDifference=_,u.scrollTop>u.targetScrollTop&&(u.scrollTop=u.targetScrollTop),l(u.isNearBottom),_>=0){const H=Pn(a.current,k?a.current.resize:a.current.initial);p({animation:H,wait:!0,preserveScrollPosition:!0,duration:H==="instant"?void 0:kl})}else u.isNearBottom&&(f(!1),s(!0));k=L,requestAnimationFrame(()=>{setTimeout(()=>{u.resizeDifference===_&&(u.resizeDifference=0)},1)})}),(P=u.resizeObserver)==null||P.observe(b)},[]);return{contentRef:y,scrollRef:S,scrollToBottom:p,stopScroll:h,isAtBottom:r||o,isNearBottom:o,escapedFromLock:n,state:u}};function jt(e,n){const t=V.useCallback(r=>(t.current=r,e(r)),n);return t}const zn=new Map;function Pn(...e){const n={...gl};let t=!1;for(const i of e){if(i==="instant"){t=!0;continue}typeof i=="object"&&(t=!1,n.damping=i.damping??n.damping,n.stiffness=i.stiffness??n.stiffness,n.mass=i.mass??n.mass)}const r=JSON.stringify(n);return zn.has(r)||zn.set(r,Object.freeze(n)),t?"instant":zn.get(r)}/*!---------------------------------------------------------------------------------------------
10
+ * Copyright (c) StackBlitz. All rights reserved.
11
+ * Licensed under the MIT License. See License.txt in the project root for license information.
12
+ *--------------------------------------------------------------------------------------------*/const Mr=V.createContext(null),wl=typeof window<"u"?V.useLayoutEffect:V.useEffect;function cn({instance:e,children:n,resize:t,initial:r,mass:i,damping:o,stiffness:l,targetScrollTop:a,contextRef:c,...s}){const f=V.useRef(null),u=V.useCallback((P,C)=>{const L=(T==null?void 0:T.targetScrollTop)??a;return(L==null?void 0:L(P,C))??P},[a]),p=bl({mass:i,damping:o,stiffness:l,resize:t,initial:r,targetScrollTop:u}),{scrollRef:h,contentRef:m,scrollToBottom:x,stopScroll:S,isAtBottom:y,escapedFromLock:b,state:k}=e??p,T=V.useMemo(()=>({scrollToBottom:x,stopScroll:S,scrollRef:h,isAtBottom:y,escapedFromLock:b,contentRef:m,state:k,get targetScrollTop(){return f.current},set targetScrollTop(P){f.current=P}}),[x,y,m,h,S,b,k]);return V.useImperativeHandle(c,()=>T,[T]),wl(()=>{h.current&&getComputedStyle(h.current).overflow==="visible"&&(h.current.style.overflow="auto")},[]),V.createElement(Mr.Provider,{value:T},V.createElement("div",{...s},typeof n=="function"?n(T):n))}(function(e){function n({children:t,scrollClassName:r,...i}){const o=Nr();return V.createElement("div",{ref:o.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:r},V.createElement("div",{...i,ref:o.contentRef},typeof t=="function"?t(o):t))}e.Content=n})(cn||(cn={}));function Nr(){const e=V.useContext(Mr);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}function Sl({children:e,className:n,...t}){return I.jsx(cn,{className:ye("flex overflow-y-auto",n),resize:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"instant":"smooth",initial:"instant",...t,children:e})}function Cl({children:e,className:n,...t}){return I.jsx(cn.Content,{className:ye("flex w-full flex-col",n),...t,children:e})}function El(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Tl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Al=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vl={};function qt(e,n){return(vl.jsx?Al:Tl).test(e)}const Il=/[ \t\n\f\r]/g;function zl(e){return typeof e=="object"?e.type==="text"?Ut(e.value):!1:Ut(e)}function Ut(e){return e.replace(Il,"")===""}class Je{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Je.prototype.normal={};Je.prototype.property={};Je.prototype.space=void 0;function Or(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Je(t,r,n)}function Kn(e){return e.toLowerCase()}class ie{constructor(n,t){this.attribute=t,this.property=n}}ie.prototype.attribute="";ie.prototype.booleanish=!1;ie.prototype.boolean=!1;ie.prototype.commaOrSpaceSeparated=!1;ie.prototype.commaSeparated=!1;ie.prototype.defined=!1;ie.prototype.mustUseProperty=!1;ie.prototype.number=!1;ie.prototype.overloadedBoolean=!1;ie.prototype.property="";ie.prototype.spaceSeparated=!1;ie.prototype.space=void 0;let Pl=0;const M=Pe(),Y=Pe(),Yn=Pe(),A=Pe(),W=Pe(),Ie=Pe(),oe=Pe();function Pe(){return 2**++Pl}const Xn=Object.freeze(Object.defineProperty({__proto__:null,boolean:M,booleanish:Y,commaOrSpaceSeparated:oe,commaSeparated:Ie,number:A,overloadedBoolean:Yn,spaceSeparated:W},Symbol.toStringTag,{value:"Module"})),Ln=Object.keys(Xn);class ht extends ie{constructor(n,t,r,i){let o=-1;if(super(n,t),Ht(this,"space",i),typeof r=="number")for(;++o<Ln.length;){const l=Ln[o];Ht(this,Ln[o],(r&Xn[l])===Xn[l])}}}ht.prototype.defined=!0;function Ht(e,n,t){t&&(e[n]=t)}function Ne(e){const n={},t={};for(const[r,i]of Object.entries(e.properties)){const o=new ht(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),n[r]=o,t[Kn(r)]=r,t[Kn(o.attribute)]=r}return new Je(n,t,e.space)}const Br=Ne({properties:{ariaActiveDescendant:null,ariaAtomic:Y,ariaAutoComplete:null,ariaBusy:Y,ariaChecked:Y,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:W,ariaCurrent:null,ariaDescribedBy:W,ariaDetails:null,ariaDisabled:Y,ariaDropEffect:W,ariaErrorMessage:null,ariaExpanded:Y,ariaFlowTo:W,ariaGrabbed:Y,ariaHasPopup:null,ariaHidden:Y,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:W,ariaLevel:A,ariaLive:null,ariaModal:Y,ariaMultiLine:Y,ariaMultiSelectable:Y,ariaOrientation:null,ariaOwns:W,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:Y,ariaReadOnly:Y,ariaRelevant:null,ariaRequired:Y,ariaRoleDescription:W,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:Y,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function jr(e,n){return n in e?e[n]:n}function qr(e,n){return jr(e,n.toLowerCase())}const Ll=Ne({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ie,acceptCharset:W,accessKey:W,action:null,allow:null,allowFullScreen:M,allowPaymentRequest:M,allowUserMedia:M,alpha:M,alt:null,as:null,async:M,autoCapitalize:null,autoComplete:W,autoFocus:M,autoPlay:M,blocking:W,capture:null,charSet:null,checked:M,cite:null,className:W,closedBy:null,colorSpace:null,cols:A,colSpan:A,command:null,commandFor:null,content:null,contentEditable:Y,controls:M,controlsList:W,coords:A|Ie,crossOrigin:null,data:null,dateTime:null,decoding:null,default:M,defer:M,dir:null,dirName:null,disabled:M,download:Yn,draggable:Y,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:M,formTarget:null,headers:W,height:A,hidden:Yn,high:A,href:null,hrefLang:null,htmlFor:W,httpEquiv:W,id:null,imageSizes:null,imageSrcSet:null,inert:M,inputMode:null,integrity:null,is:null,isMap:M,itemId:null,itemProp:W,itemRef:W,itemScope:M,itemType:W,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:M,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:M,muted:M,name:null,nonce:null,noModule:M,noValidate:M,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:M,optimum:A,pattern:null,ping:W,placeholder:null,playsInline:M,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:M,referrerPolicy:null,rel:W,required:M,reversed:M,rows:A,rowSpan:A,sandbox:W,scope:null,scoped:M,seamless:M,selected:M,shadowRootClonable:M,shadowRootCustomElementRegistry:M,shadowRootDelegatesFocus:M,shadowRootMode:null,shadowRootSerializable:M,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:Y,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:M,useMap:null,value:Y,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:W,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:M,declare:M,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:M,noHref:M,noShade:M,noWrap:M,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:Y,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:M,disablePictureInPicture:M,disableRemotePlayback:M,exportParts:Ie,part:W,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:qr}),Dl=Ne({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",maskType:"mask-type",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:oe,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:W,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:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:M,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,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:Ie,g2:Ie,glyphName:Ie,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:oe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,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:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:W,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oe,rev:oe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oe,requiredFeatures:oe,requiredFonts:oe,requiredFormats:oe,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:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:oe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oe,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:jr}),Ur=Ne({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),Hr=Ne({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:qr}),$r=Ne({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Fl={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"},_l=/[A-Z]/g,$t=/-[a-z]/g,Rl=/^data[-\w.:]+$/i;function Ml(e,n){const t=Kn(n);let r=n,i=ie;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Rl.test(n)){if(n.charAt(4)==="-"){const o=n.slice(5).replace($t,Ol);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=n.slice(4);if(!$t.test(o)){let l=o.replace(_l,Nl);l.charAt(0)!=="-"&&(l="-"+l),n="data"+l}}i=ht}return new i(r,n)}function Nl(e){return"-"+e.toLowerCase()}function Ol(e){return e.charAt(1).toUpperCase()}const Bl=Or([Br,Ll,Ur,Hr,$r],"html"),pt=Or([Br,Dl,Ur,Hr,$r],"svg");function jl(e){return e.join(" ").trim()}var Vt=/\/\*(?:[^*]|\*(?!\/))*\*\//g,ql=/\n/g,Ul=/^\s*/,Hl=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$l=/^:\s*/,Vl=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,Wl=/^[;\s]*/,Ql=`
13
+ `,Wt="/",Qt="*",He="",Kl="comment",Yl="declaration";function Xl(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var t=1,r=1;function i(m){var x=m.match(ql);x&&(t+=x.length);var S=m.lastIndexOf(Ql);r=~S?m.length-S:r+m.length}function o(){var m={line:t,column:r};return function(x){return x.position=new l(m),s(),x}}function l(m){this.start=m,this.end={line:t,column:r},this.source=n.source}l.prototype.content=e;function a(m){var x=new Error(n.source+":"+t+":"+r+": "+m);if(x.reason=m,x.filename=n.source,x.line=t,x.column=r,x.source=e,!n.silent)throw x}function c(m){var x=m.exec(e);if(x){var S=x[0];return i(S),e=e.slice(S.length),x}}function s(){c(Ul)}function f(m){for(var x;x=u();)m.push(x);return m}function u(){var m=o();if(!(Wt!=e.charAt(0)||Qt!=e.charAt(1))){for(var x=2;He!=e.charAt(x)&&(Qt!=e.charAt(x)||Wt!=e.charAt(x+1));)++x;if(x+=2,He===e.charAt(x-1))return a("End of comment missing");var S=e.slice(2,x-2);return r+=2,i(S),e=e.slice(x),r+=2,m({type:Kl,comment:S})}}function p(){var m=o(),x=c(Hl);if(x){if(u(),!c($l))return a("property missing ':'");var S=c(Vl),y=m({type:Yl,property:x[0].replace(Vt,He).trim(),value:S?S[0].replace(Vt,He).trim():He});return c(Wl),y}}function h(){var m=[];f(m);for(var x;x=p();)m.push(x),f(m);return m}return s(),h()}function Gl(e,n){let t=null;if(!e||typeof e!="string")return t;const r=Xl(e),i=typeof n=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:a}=o;i?n(l,a,o):a&&(t=t??{},t[l]=a)}),t}const Vr=Wr("end"),mt=Wr("start");function Wr(e){return n;function n(t){const r=t&&t.position&&t.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 Jl(e){const n=mt(e),t=Vr(e);if(n&&t)return{start:n,end:t}}function We(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Kt(e.position):"start"in e||"end"in e?Kt(e):"line"in e||"column"in e?Gn(e):""}function Gn(e){return Yt(e&&e.line)+":"+Yt(e&&e.column)}function Kt(e){return Gn(e&&e.start)+"-"+Gn(e&&e.end)}function Yt(e){return e&&typeof e=="number"?e:1}class xn extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",o={},l=!1;if(t&&("line"in t&&"column"in t?o={place:t}:"start"in t&&"end"in t?o={place:t}:"type"in t?o={ancestors:[t],place:t.position}:o={...t}),typeof n=="string"?i=n:!o.cause&&n&&(l=!0,i=n.message,o.cause=n),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=We(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Object.defineProperties(xn.prototype,{file:{configurable:!0,enumerable:!0,value:"",writable:!0},name:{configurable:!0,enumerable:!0,value:"",writable:!0},reason:{configurable:!0,enumerable:!0,value:"",writable:!0},message:{configurable:!0,enumerable:!0,value:"",writable:!0},stack:{configurable:!0,enumerable:!0,value:"",writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});const dt={}.hasOwnProperty,Zl=new Map,eo=/[A-Z]/g,no=/-([a-z])/g,to=new Set(["table","tbody","thead","tfoot","tr"]),ro=new Set(["td","th"]),Qr="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function io(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ho(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=fo(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?pt:Bl,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=Kr(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Kr(e,n,t){if(n.type==="element")return lo(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return oo(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return so(e,n,t);if(n.type==="mdxjsEsm")return ao(e,n);if(n.type==="root")return uo(e,n,t);if(n.type==="text")return co(e,n)}function lo(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=pt,e.schema=i),e.ancestors.push(n);const o=Xr(e,n.tagName,!1),l=po(e,n);let a=xt(e,n);return to.has(n.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!zl(c):!0})),Yr(e,l,o,n),gt(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function oo(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ge(e,n.position)}function ao(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ge(e,n.position)}function so(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=pt,e.schema=i),e.ancestors.push(n);const o=n.name===null?e.Fragment:Xr(e,n.name,!0),l=mo(e,n),a=xt(e,n);return Yr(e,l,o,n),gt(l,a),e.ancestors.pop(),e.schema=r,e.create(n,o,l,t)}function uo(e,n,t){const r={};return gt(r,xt(e,n)),e.create(n,e.Fragment,r,t)}function co(e,n){return n.value}function Yr(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function gt(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function fo(e,n,t){return r;function r(i,o,l,a){const s=Array.isArray(l.children)?t:n;return a?s(o,l,a):s(o,l)}}function ho(e,n){return t;function t(r,i,o,l){const a=Array.isArray(o.children),c=mt(r);return n(i,o,l,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function po(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&dt.call(n.properties,i)){const o=go(e,i,n.properties[i]);if(o){const[l,a]=o;e.tableCellAlignToStyle&&l==="align"&&typeof a=="string"&&ro.has(n.tagName)?r=a:t[l]=a}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function mo(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const a=l.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Ge(e,n.position);else{const{name:i}=r;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else Ge(e,n.position);else o=r.value===null?!0:r.value;t[i]=o}return t}function xt(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:Zl;for(;++r<n.children.length;){const o=n.children[r];let l;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const s=i.get(c)||0;l=c+"-"+s,i.set(c,s+1)}}const a=Kr(e,o,l);a!==void 0&&t.push(a)}return t}function go(e,n,t){if(t==null||typeof t=="number"&&Number.isNaN(t))return;const r=Ml(e.schema,n);return Array.isArray(t)&&(t=r.commaSeparated?El(t):jl(t)),r.property==="style"?["style",typeof t=="object"?e.stylePropertyNameCase==="dom"?t:yo(t):xo(e,String(t))]:[e.elementAttributeNameCase==="react"&&r.space?Fl[r.property]||r.property:r.attribute,t]}function xo(e,n){const t={};try{Gl(n,function(r,i){if(r&&i){let o=r;o.slice(0,2)!=="--"&&(o=o.toLowerCase(),e.stylePropertyNameCase==="dom"&&(o.slice(0,4)==="-ms-"&&(o=o.slice(1)),o=o.replace(no,wo))),t[o]=i}})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,o=new xn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Qr+"#cannot-parse-style-attribute",o}return t}function Xr(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const i=n.split(".");let o=-1,l;for(;++o<i.length;){const a=qt(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=l}else r=qt(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const i=r.value;return dt.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ge(e)}function Ge(e,n){const t=new xn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=Qr+"#cannot-handle-mdx-estrees-without-createevaluater",t}function yo(e){const n={};let t;for(t in e)dt.call(e,t)&&(n[ko(t)]=e[t]);return n}function ko(e){if(e.slice(0,2)==="--")return e;let n=e.replace(eo,bo);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function bo(e){return"-"+e.toLowerCase()}function wo(e,n){return n.toUpperCase()}const Dn={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"]},So={};function yn(e,n){const t=So,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Gr(e,r,i)}function Gr(e,n,t){if(Co(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Xt(e.children,n,t)}return Array.isArray(e)?Xt(e,n,t):""}function Xt(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Gr(e[i],n,t);return r.join("")}function Co(e){return!!(e&&typeof e=="object")}const Gt=document.createElement("i");function yt(e){const n="&"+e+";";Gt.innerHTML=n;const t=Gt.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}function fe(e,n,t,r){const i=e.length;let o=0,l;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)l=Array.from(r),l.unshift(n,t),e.splice(...l);else for(t&&e.splice(n,t);o<r.length;)l=r.slice(o,o+1e4),l.unshift(n,0),e.splice(...l),o+=1e4,n+=1e4}function ae(e,n){return e.length>0?(fe(e,e.length,0,n),e):n}const Jt={}.hasOwnProperty;function Jr(e){const n={};let t=-1;for(;++t<e.length;)Eo(n,e[t]);return n}function Eo(e,n){let t;for(t in n){const i=(Jt.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let l;if(o)for(l in o){Jt.call(i,l)||(i[l]=[]);const a=o[l];To(i[l],Array.isArray(a)?a:a?[a]:[])}}}function To(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);fe(e,0,0,r)}function Zr(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function he(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const J=Ce(/[A-Za-z]/),Z=Ce(/[\dA-Za-z]/),Ao=Ce(/[#-'*+\--9=?A-Z^-~]/);function fn(e){return e!==null&&(e<32||e===127)}const Jn=Ce(/\d/),vo=Ce(/[\dA-Fa-f]/),ei=Ce(/[!-/:-@[-`{-~]/);function F(e){return e!==null&&e<-2}function Q(e){return e!==null&&(e<0||e===32)}function B(e){return e===-2||e===-1||e===32}const Ze=Ce(new RegExp("\\p{P}|\\p{S}","u")),ze=Ce(/\s/);function Ce(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Oe(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const o=e.charCodeAt(t);let l="";if(o===37&&Z(e.charCodeAt(t+1))&&Z(e.charCodeAt(t+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(t+1);o<56320&&a>56319&&a<57344?(l=String.fromCharCode(o,a),i=1):l="�"}else l=String.fromCharCode(o);l&&(n.push(e.slice(r,t),encodeURIComponent(l)),r=t+i+1,l=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function U(e,n,t,r){const i=r?r-1:1/0;let o=0;return l;function l(c){return B(c)?(e.enter(t),a(c)):n(c)}function a(c){return B(c)&&o++<i?(e.consume(c),a):(e.exit(t),n(c))}}function ni(e,n,t,r,i,o){let l=0;return a;function a(f){return B(f)?(e.enter(r),c(f)):s(f)}function c(f){return B(f)&&l<o?(e.consume(f),l++,c):(e.exit(r),s(f))}function s(f){return l>=i?n(f):t(f)}}const Io={tokenize:zo};function zo(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),U(e,n,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,l(a)}function l(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return F(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),l)}}let hn=class{constructor(){this.index=new Map,this.map=[]}add(n,t,r){Zt(this,n,t,r,!1)}addBefore(n,t,r){Zt(this,n,t,r,!0)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const o of i)n.push(o);i=r.pop()}this.map.length=0,this.index.clear()}};function Zt(e,n,t,r,i){if(t===0&&r.length===0)return;const o=e.index.get(n);if(o){o[1]+=t,i?(r.push(...o[2]),o[2]=r):o[2].push(...r);return}const l=[n,t,r];e.map.push(l),e.index.set(n,l)}const Po={tokenize:Lo},er={tokenize:Do};function Lo(e){const n=this,t=[];let r=0,i,o,l;return a;function a(k){if(r<t.length){const T=t[r];return n.containerState=T[1],e.attempt(T[0].continuation,c,s)(k)}return s(k)}function c(k){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&b();const T=n.events.length;let P=T,C;for(;P--;)if(n.events[P][0]==="exit"&&n.events[P][1].type==="chunkFlow"){C=n.events[P][1].end;break}y(r);let L=T;for(;L<n.events.length;)n.events[L][1].end={...C},L++;const _=new hn;return _.add(P+1,0,n.events.slice(T)),_.add(T,L-T,[]),_.consume(n.events),s(k)}return a(k)}function s(k){if(r===t.length){if(!i)return p(k);if(i.currentConstruct&&i.currentConstruct.concrete)return m(k);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(er,f,u)(k)}function f(k){return i&&b(),y(r),p(k)}function u(k){return n.parser.lazy[n.now().line]=r!==t.length,l=n.now().offset,m(k)}function p(k){return n.containerState={},e.attempt(er,h,m)(k)}function h(k){return r++,t.push([n.currentConstruct,n.containerState]),p(k)}function m(k){if(k===null){i&&b(),y(0),e.consume(k);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(k)}function x(k){if(k===null){S(e.exit("chunkFlow"),!0),y(0),e.consume(k);return}return F(k)?(e.consume(k),S(e.exit("chunkFlow")),r=0,n.interrupt=void 0,a):(e.consume(k),x)}function S(k,T){const P=n.sliceStream(k);if(T&&P.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(P),n.parser.lazy[k.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<l&&(!i.events[C][1].end||i.events[C][1].end.offset>l))return;const L=n.events.length;let _=L,H,w;for(;_--;)if(n.events[_][0]==="exit"&&n.events[_][1].type==="chunkFlow"){if(H){w=n.events[_][1].end;break}H=!0}for(y(r),C=L;C<n.events.length;)n.events[C][1].end={...w},C++;const z=new hn;z.add(_+1,0,n.events.slice(L)),z.add(L,C-L,[]),z.consume(n.events)}}function y(k){let T=t.length;for(;T-- >k;){const P=t[T];n.containerState=P[1],P[0].exit.call(n,e)}t.length=k}function b(){i.write([null]),o=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Do(e,n,t){return U(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Se(e){if(e===null||Q(e)||ze(e))return 1;if(Ze(e))return 2}function kn(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const Zn={name:"attention",resolveAll:Fo,tokenize:_o};function Fo(e,n){let t=-1,r;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){let i=t;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[i][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;const o=e[i][1].end.offset-e[i][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1,l={...e[i][1].end},a={...e[t][1].start};nr(l,-o),nr(a,o);const c={type:o>1?"strongSequence":"emphasisSequence",start:l,end:{...e[i][1].end}},s={type:o>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:a},f={type:o>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[t][1].start}},u={type:o>1?"strong":"emphasis",start:{...c.start},end:{...s.end}};e[i][1].end={...c.start},e[t][1].start={...s.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=ae(r,[["enter",e[i][1],n],["exit",e[i][1],n]])),r=ae(r,[["enter",u,n],["enter",c,n],["exit",c,n],["enter",f,n]]),r=ae(r,kn(n.parser.constructs.insideSpan.null,e.slice(i+1,t),n)),r=ae(r,[["exit",f,n],["enter",s,n],["exit",s,n],["exit",u,n]]);let p=0;e[t][1].end.offset-e[t][1].start.offset&&(p=2,r=ae(r,[["enter",e[t][1],n],["exit",e[t][1],n]])),fe(e,i-1,t-i+3,r),t=i+r.length-p-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function _o(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Se(r);let o;return l;function l(c){return o=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===o)return e.consume(c),a;const s=e.exit("attentionSequence"),f=Se(c),u=!f||f===2&&i||t.includes(c)&&c!==42&&c!==95,p=!i||i===2&&f||t.includes(r)&&r!==42&&r!==95;return s._open=!!(o===42?u:u&&(i||!p)),s._close=!!(o===42?p:p&&(f||!u)),n(c)}}function nr(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Ro={name:"autolink",tokenize:Mo};function Mo(e,n,t){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return J(h)?(e.consume(h),l):h===64?t(h):s(h)}function l(h){return h===43||h===45||h===46||Z(h)?(r=1,a(h)):s(h)}function a(h){return h===58?(e.consume(h),r=0,c):(h===43||h===45||h===46||Z(h))&&r++<32?(e.consume(h),a):(r=0,s(h))}function c(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):h===null||h===32||h===60||fn(h)?t(h):(e.consume(h),c)}function s(h){return h===64?(e.consume(h),f):Ao(h)?(e.consume(h),s):t(h)}function f(h){return Z(h)?u(h):t(h)}function u(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),n):p(h)}function p(h){if((h===45||Z(h))&&r++<63){const m=h===45?p:u;return e.consume(h),m}return t(h)}}const en={partial:!0,tokenize:No};function No(e,n,t){return r;function r(o){return B(o)?U(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||F(o)?n(o):t(o)}}const ti={continuation:{tokenize:Bo},exit:jo,name:"blockQuote",tokenize:Oo};function Oo(e,n,t){const r=this;return i;function i(l){if(l===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return t(l)}function o(l){return B(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(l))}}function Bo(e,n,t){const r=this;return i;function i(l){return B(l)?U(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(ti,n,t)(l)}}function jo(e){e.exit("blockQuote")}const ri={name:"characterEscape",tokenize:qo};function qo(e,n,t){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return ei(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(o)}}const ii={name:"characterReference",tokenize:Uo};function Uo(e,n,t){const r=this;let i=0,o,l;return a;function a(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),c}function c(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),s):(e.enter("characterReferenceValue"),o=31,l=Z,f(u))}function s(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=vo,f):(e.enter("characterReferenceValue"),o=7,l=Jn,f(u))}function f(u){if(u===59&&i){const p=e.exit("characterReferenceValue");return l===Z&&!yt(r.sliceSerialize(p))?t(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return l(u)&&i++<o?(e.consume(u),f):t(u)}}const et={partial:!0,tokenize:Ho};function Ho(e,n,t){const r=this;return i;function i(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?t(l):n(l)}}const tr={concrete:!0,name:"codeFenced",tokenize:$o};function $o(e,n,t){const r=this,i={partial:!0,tokenize:P};let o=0,l=0,a;return c;function c(C){return s(C)}function s(C){const L=r.events[r.events.length-1];return o=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===a?(l++,e.consume(C),f):l<3?t(C):(e.exit("codeFencedFenceSequence"),B(C)?U(e,u,"whitespace")(C):u(C))}function u(C){return C===null||F(C)?(e.exit("codeFencedFence"),r.interrupt?n(C):e.check(et,x,T)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||F(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(C)):B(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),U(e,h,"whitespace")(C)):C===96&&C===a?t(C):(e.consume(C),p)}function h(C){return C===null||F(C)?u(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||F(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(C)):C===96&&C===a?t(C):(e.consume(C),m)}function x(C){return e.attempt(i,T,S)(C)}function S(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),y}function y(C){return o>0&&B(C)?U(e,b,"linePrefix",o+1)(C):b(C)}function b(C){return C===null||F(C)?e.check(et,x,T)(C):(e.enter("codeFlowValue"),k(C))}function k(C){return C===null||F(C)?(e.exit("codeFlowValue"),b(C)):(e.consume(C),k)}function T(C){return e.exit("codeFenced"),n(C)}function P(C,L,_){let H=0;return w;function w(j){return C.enter("lineEnding"),C.consume(j),C.exit("lineEnding"),z}function z(j){return C.enter("codeFencedFence"),B(j)?U(C,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):D(j)}function D(j){return j===a?(C.enter("codeFencedFenceSequence"),q(j)):_(j)}function q(j){return j===a?(H++,C.consume(j),q):H>=l?(C.exit("codeFencedFenceSequence"),B(j)?U(C,$,"whitespace")(j):$(j)):_(j)}function $(j){return j===null||F(j)?(C.exit("codeFencedFence"),L(j)):_(j)}}}const Fn={name:"codeIndented",tokenize:Wo},Vo={partial:!0,tokenize:Qo};function Wo(e,n,t){return r;function r(a){return e.enter("codeIndented"),ni(e,i,t,"linePrefix",4,4)(a)}function i(a){return a===null?l(a):F(a)?e.attempt(Vo,i,l)(a):(e.enter("codeFlowValue"),o(a))}function o(a){return a===null||F(a)?(e.exit("codeFlowValue"),i(a)):(e.consume(a),o)}function l(a){return e.exit("codeIndented"),n(a)}}function Qo(e,n,t){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?t(l):F(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):ni(e,n,o,"linePrefix",4,4)(l)}function o(l){return F(l)?i(l):t(l)}}const Ko={name:"codeText",previous:Xo,resolve:Yo,tokenize:Go};function Yo(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||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),n-=r-i-2,r=i+2),i=void 0);return e}function Xo(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Go(e,n,t){let r=0,i,o;return l;function l(u){return e.enter("codeText"),e.enter("codeTextSequence"),a(u)}function a(u){return u===96?(e.consume(u),r++,a):(e.exit("codeTextSequence"),c(u))}function c(u){return u===null?t(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),c):u===96?(o=e.enter("codeTextSequence"),i=0,f(u)):F(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("codeTextData"),s(u))}function s(u){return u===null||u===32||u===96||F(u)?(e.exit("codeTextData"),c(u)):(e.consume(u),s)}function f(u){return u===96?(e.consume(u),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(u)):(o.type="codeTextData",s(u))}}class Jo{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&$e(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),$e(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),$e(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);$e(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);$e(this.left,t.reverse())}}}function $e(e,n){let t=0;if(n.length<1e4)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+1e4)),t+=1e4}function li(e){const n={};let t=-1,r,i,o,l,a,c,s;const f=new Jo(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,Zo(f,t)),t=n[t],s=!0);else if(r[1]._container){for(o=t,i=void 0;o--;)if(l=f.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,t),a.unshift(r),f.splice(i,t-i+1,a))}}return fe(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!s}function Zo(e,n){const t=e.get(n)[1],r=e.get(n)[2];let i=n-1;const o=[];let l=t._tokenizer;l||(l=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const a=l.events,c=[],s={};let f,u,p=-1,h=t,m=0,x=0;const S=[x];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),u&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(f),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),u=h,h=h.next}for(h=t;++p<a.length;)a[p][0]==="exit"&&a[p-1][0]==="enter"&&a[p][1].type===a[p-1][1].type&&a[p][1].start.line!==a[p][1].end.line&&(x=p+1,S.push(x),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):S.pop(),p=S.length;p--;){const y=a.slice(S[p],S[p+1]),b=o.pop();c.push([b,b+y.length-1]),e.splice(b,2,y)}for(c.reverse(),p=-1;++p<c.length;)s[m+c[p][0]]=m+c[p][1],m+=c[p][1]-c[p][0]-1;return s}const ea={resolve:ta,tokenize:ra},na={partial:!0,tokenize:ia};function ta(e){return li(e),e}function ra(e,n){let t;return r;function r(a){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):F(a)?e.check(na,l,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),n(a)}function l(a){return e.consume(a),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function ia(e,n,t){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),U(e,o,"linePrefix")}function o(l){if(l===null||F(l))return t(l);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(l):e.interrupt(r.parser.constructs.flow,t,n)(l)}}function oi(e,n,t,r,i,o,l,a,c){const s=c||Number.POSITIVE_INFINITY;let f=0;return u;function u(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),p):y===null||y===32||y===41||fn(y)?t(y):(e.enter(r),e.enter(l),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(y))}function p(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===62?(e.exit("chunkString"),e.exit(a),p(y)):y===null||y===60||F(y)?t(y):(e.consume(y),y===92?m:h)}function m(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function x(y){return!f&&(y===null||y===41||Q(y))?(e.exit("chunkString"),e.exit(a),e.exit(l),e.exit(r),n(y)):f<s&&y===40?(e.consume(y),f++,x):y===41?(e.consume(y),f--,x):y===null||y===32||y===40||fn(y)?t(y):(e.consume(y),y===92?S:x)}function S(y){return y===40||y===41||y===92?(e.consume(y),x):x(y)}}function ai(e,n,t,r,i,o){const l=this;let a=0,c;return s;function s(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!c||h===94&&!a&&"_hiddenFootnoteSupport"in l.parser.constructs?t(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),n):F(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===null||h===91||h===93||F(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),c||(c=!B(h)),h===92?p:u)}function p(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}}function si(e,n,t,r,i,o){let l;return a;function a(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),l=p===40?41:p,c):t(p)}function c(p){return p===l?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):(e.enter(o),s(p))}function s(p){return p===l?(e.exit(o),c(l)):p===null?t(p):F(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),U(e,s,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===l||p===null||F(p)?(e.exit("chunkString"),s(p)):(e.consume(p),p===92?u:f)}function u(p){return p===l||p===92?(e.consume(p),f):f(p)}}function Qe(e,n){let t;return r;function r(i){return F(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):B(i)?U(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const la={name:"definition",tokenize:aa},oa={partial:!0,tokenize:sa};function aa(e,n,t){const r=this;let i;return o;function o(h){return e.enter("definition"),l(h)}function l(h){return ai.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=he(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),c):t(h)}function c(h){return Q(h)?Qe(e,s)(h):s(h)}function s(h){return oi(e,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(oa,u,u)(h)}function u(h){return B(h)?U(e,p,"whitespace")(h):p(h)}function p(h){return h===null||F(h)?(e.exit("definition"),r.parser.defined.push(i),n(h)):t(h)}}function sa(e,n,t){return r;function r(a){return Q(a)?Qe(e,i)(a):t(a)}function i(a){return si(e,o,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return B(a)?U(e,l,"whitespace")(a):l(a)}function l(a){return a===null||F(a)?n(a):t(a)}}const ua={name:"hardBreakEscape",tokenize:ca};function ca(e,n,t){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return F(o)?(e.exit("hardBreakEscape"),n(o)):t(o)}}const fa={name:"headingAtx",resolve:ha,tokenize:pa};function ha(e,n){let t=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},o={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"};fe(e,r,t-r+1,[["enter",i,n],["enter",o,n],["exit",o,n],["exit",i,n]])}return e}function pa(e,n,t){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),l(f)}function l(f){return f===35&&r++<6?(e.consume(f),l):f===null||Q(f)?(e.exit("atxHeadingSequence"),a(f)):t(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||F(f)?(e.exit("atxHeading"),n(f)):B(f)?U(e,a,"whitespace")(f):(e.enter("atxHeadingText"),s(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),a(f))}function s(f){return f===null||f===35||Q(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),s)}}const ui=["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"],nt=["pre","script","style","textarea"],ma={concrete:!0,name:"htmlFlow",resolveTo:ga,tokenize:xa},da={partial:!0,tokenize:ya};function ga(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function xa(e,n,t){const r=this;let i,o,l,a,c;return s;function s(g){return f(g)}function f(g){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(g),u}function u(g){return g===33?(e.consume(g),p):g===47?(e.consume(g),o=!0,x):g===63?(e.consume(g),i=3,r.interrupt?n:d):J(g)?(e.consume(g),l=String.fromCharCode(g),S):t(g)}function p(g){return g===45?(e.consume(g),i=2,h):g===91?(e.consume(g),i=5,a=0,m):J(g)?(e.consume(g),i=4,r.interrupt?n:d):t(g)}function h(g){return g===45?(e.consume(g),r.interrupt?n:d):t(g)}function m(g){const ce="CDATA[";return g===ce.charCodeAt(a++)?(e.consume(g),a===ce.length?r.interrupt?n:D:m):t(g)}function x(g){return J(g)?(e.consume(g),l=String.fromCharCode(g),S):t(g)}function S(g){if(g===null||g===47||g===62||Q(g)){const ce=g===47,Le=l.toLowerCase();return!ce&&!o&&nt.includes(Le)?(i=1,r.interrupt?n(g):D(g)):ui.includes(l.toLowerCase())?(i=6,ce?(e.consume(g),y):r.interrupt?n(g):D(g)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(g):o?b(g):k(g))}return g===45||Z(g)?(e.consume(g),l+=String.fromCharCode(g),S):t(g)}function y(g){return g===62?(e.consume(g),r.interrupt?n:D):t(g)}function b(g){return B(g)?(e.consume(g),b):w(g)}function k(g){return g===47?(e.consume(g),w):g===58||g===95||J(g)?(e.consume(g),T):B(g)?(e.consume(g),k):w(g)}function T(g){return g===45||g===46||g===58||g===95||Z(g)?(e.consume(g),T):P(g)}function P(g){return g===61?(e.consume(g),C):B(g)?(e.consume(g),P):k(g)}function C(g){return g===null||g===60||g===61||g===62||g===96?t(g):g===34||g===39?(e.consume(g),c=g,L):B(g)?(e.consume(g),C):_(g)}function L(g){return g===c?(e.consume(g),c=null,H):g===null||F(g)?t(g):(e.consume(g),L)}function _(g){return g===null||g===34||g===39||g===47||g===60||g===61||g===62||g===96||Q(g)?P(g):(e.consume(g),_)}function H(g){return g===47||g===62||B(g)?k(g):t(g)}function w(g){return g===62?(e.consume(g),z):t(g)}function z(g){return g===null||F(g)?D(g):B(g)?(e.consume(g),z):t(g)}function D(g){return g===45&&i===2?(e.consume(g),X):g===60&&i===1?(e.consume(g),R):g===62&&i===4?(e.consume(g),ue):g===63&&i===3?(e.consume(g),d):g===93&&i===5?(e.consume(g),se):F(g)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(da,ge,q)(g)):g===null||F(g)?(e.exit("htmlFlowData"),q(g)):(e.consume(g),D)}function q(g){return e.check(et,$,ge)(g)}function $(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),j}function j(g){return g===null||F(g)?q(g):(e.enter("htmlFlowData"),D(g))}function X(g){return g===45?(e.consume(g),d):D(g)}function R(g){return g===47?(e.consume(g),l="",ee):D(g)}function ee(g){if(g===62){const ce=l.toLowerCase();return nt.includes(ce)?(e.consume(g),ue):D(g)}return J(g)&&l.length<8?(e.consume(g),l+=String.fromCharCode(g),ee):D(g)}function se(g){return g===93?(e.consume(g),d):D(g)}function d(g){return g===62?(e.consume(g),ue):g===45&&i===2?(e.consume(g),d):D(g)}function ue(g){return g===null||F(g)?(e.exit("htmlFlowData"),ge(g)):(e.consume(g),ue)}function ge(g){return e.exit("htmlFlow"),n(g)}}function ya(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(en,n,t)}}const ka={name:"htmlText",tokenize:ba};function ba(e,n,t){const r=this;let i,o,l;return a;function a(d){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(d),c}function c(d){return d===33?(e.consume(d),s):d===47?(e.consume(d),P):d===63?(e.consume(d),k):J(d)?(e.consume(d),_):t(d)}function s(d){return d===45?(e.consume(d),f):d===91?(e.consume(d),o=0,m):J(d)?(e.consume(d),b):t(d)}function f(d){return d===45?(e.consume(d),h):t(d)}function u(d){return d===null?t(d):d===45?(e.consume(d),p):F(d)?(l=u,R(d)):(e.consume(d),u)}function p(d){return d===45?(e.consume(d),h):u(d)}function h(d){return d===62?X(d):d===45?p(d):u(d)}function m(d){const ue="CDATA[";return d===ue.charCodeAt(o++)?(e.consume(d),o===ue.length?x:m):t(d)}function x(d){return d===null?t(d):d===93?(e.consume(d),S):F(d)?(l=x,R(d)):(e.consume(d),x)}function S(d){return d===93?(e.consume(d),y):x(d)}function y(d){return d===62?X(d):d===93?(e.consume(d),y):x(d)}function b(d){return d===null||d===62?X(d):F(d)?(l=b,R(d)):(e.consume(d),b)}function k(d){return d===null?t(d):d===63?(e.consume(d),T):F(d)?(l=k,R(d)):(e.consume(d),k)}function T(d){return d===62?X(d):k(d)}function P(d){return J(d)?(e.consume(d),C):t(d)}function C(d){return d===45||Z(d)?(e.consume(d),C):L(d)}function L(d){return F(d)?(l=L,R(d)):B(d)?(e.consume(d),L):X(d)}function _(d){return d===45||Z(d)?(e.consume(d),_):d===47||d===62||Q(d)?H(d):t(d)}function H(d){return d===47?(e.consume(d),X):d===58||d===95||J(d)?(e.consume(d),w):F(d)?(l=H,R(d)):B(d)?(e.consume(d),H):X(d)}function w(d){return d===45||d===46||d===58||d===95||Z(d)?(e.consume(d),w):z(d)}function z(d){return d===61?(e.consume(d),D):F(d)?(l=z,R(d)):B(d)?(e.consume(d),z):H(d)}function D(d){return d===null||d===60||d===61||d===62||d===96?t(d):d===34||d===39?(e.consume(d),i=d,q):F(d)?(l=D,R(d)):B(d)?(e.consume(d),D):(e.consume(d),$)}function q(d){return d===i?(e.consume(d),i=void 0,j):d===null?t(d):F(d)?(l=q,R(d)):(e.consume(d),q)}function $(d){return d===null||d===34||d===39||d===60||d===61||d===96?t(d):d===47||d===62||Q(d)?H(d):(e.consume(d),$)}function j(d){return d===47||d===62||Q(d)?H(d):t(d)}function X(d){return d===62?(e.consume(d),e.exit("htmlTextData"),e.exit("htmlText"),n):t(d)}function R(d){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ee}function ee(d){return B(d)?U(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):se(d)}function se(d){return e.enter("htmlTextData"),l(d)}}const kt={name:"labelEnd",resolveAll:Ea,resolveTo:Ta,tokenize:Aa},wa={tokenize:va},Sa={tokenize:Ia},Ca={tokenize:za};function Ea(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",n+=i}}return e.length!==t.length&&fe(e,0,e.length,t),e}function Ta(e,n){let t=e.length,r=0,i,o,l;for(;t--;){const f=e[t][1];if(i){if(f.type==="link"||f.type==="labelLink"&&f._inactive)break;e[t][0]==="enter"&&f.type==="labelLink"&&(f._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(f.type==="labelImage"||f.type==="labelLink")&&!f._balanced&&(i=t,f.type!=="labelLink")){r=2;break}}else f.type==="labelEnd"&&(o=t)}const a={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},s={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",a,n],["enter",c,n]],l=ae(l,e.slice(i+1,i+r+3)),l=ae(l,[["enter",s,n]]),l=ae(l,kn(n.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),n)),l=ae(l,[["exit",s,n],e[o-2],e[o-1],["exit",c,n]]),l=ae(l,e.slice(o+1)),l=ae(l,[["exit",a,n]]),fe(e,i,e.length,l),e}function Aa(e,n,t){const r=this,i=r._labelStarts;let o,l;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();o=i[i.length-1]}return a;function a(p){return o?o._inactive?u(p):(l=r.parser.defined.includes(he(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):t(p)}function c(p){return p===40?e.attempt(wa,f,l?f:u)(p):p===91?e.attempt(Sa,f,l?s:u)(p):l?f(p):u(p)}function s(p){return e.attempt(Ca,f,u)(p)}function f(p){return i.pop(),n(p)}function u(p){return o._balanced=!0,t(p)}}function va(e,n,t){return r;function r(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),i}function i(u){return Q(u)?Qe(e,o)(u):o(u)}function o(u){return u===41?f(u):oi(e,l,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function l(u){return Q(u)?Qe(e,c)(u):f(u)}function a(u){return t(u)}function c(u){return u===34||u===39||u===40?si(e,s,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):f(u)}function s(u){return Q(u)?Qe(e,f)(u):f(u)}function f(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),n):t(u)}}function Ia(e,n,t){const r=this;return i;function i(a){return ai.call(r,e,o,l,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(he(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(a):t(a)}function l(a){return t(a)}}function za(e,n,t){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),n):t(o)}}const Pa={name:"labelStartImage",resolveAll:kt.resolveAll,tokenize:La};function La(e,n,t){const r=this;let i;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),i=e.exit("labelImage"),a):t(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(c):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),n(c))}}const Da={name:"labelStartLink",resolveAll:kt.resolveAll,tokenize:Fa};function Fa(e,n,t){const r=this;let i;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),i=e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),n(a))}}const _n={name:"lineEnding",tokenize:_a};function _a(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),U(e,n,"linePrefix")}}const un={name:"thematicBreak",tokenize:Ra};function Ra(e,n,t){let r=0,i;return o;function o(s){return e.enter("thematicBreak"),l(s)}function l(s){return i=s,a(s)}function a(s){return s===i?(e.enter("thematicBreakSequence"),c(s)):r>=3&&(s===null||F(s))?(e.exit("thematicBreak"),n(s)):t(s)}function c(s){return s===i?(e.consume(s),r++,c):(e.exit("thematicBreakSequence"),B(s)?U(e,a,"whitespace")(s):a(s))}}const re={continuation:{tokenize:Ba},exit:qa,name:"list",tokenize:Oa},Ma={partial:!0,tokenize:Ua},Na={partial:!0,tokenize:ja};function Oa(e,n,t){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return a;function a(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Jn(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(un,t,s)(h):s(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(h)}return t(h)}function c(h){return Jn(h)&&++l<10?(e.consume(h),c):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),s(h)):t(h)}function s(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(en,r.interrupt?t:f,e.attempt(Ma,p,u))}function f(h){return r.containerState.initialBlankLine=!0,o++,p(h)}function u(h){return B(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),p):t(h)}function p(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(h)}}function Ba(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(en,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,n,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!B(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Na,n,l)(a))}function l(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(re,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ja(e,n,t){const r=this;return U(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?n(o):t(o)}}function qa(e){e.exit(this.containerState.type)}function Ua(e,n,t){const r=this;return U(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!B(o)&&l&&l[1].type==="listItemPrefixWhitespace"?n(o):t(o)}}const rr={name:"setextUnderline",resolveTo:Ha,tokenize:$a};function Ha(e,n){const t=new hn;let r=e.length,i,o,l;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&t.add(r,1,[]),!l&&e[r][1].type==="definition"&&(l=r);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",l?(t.add(o,0,[["enter",a,n]]),t.add(l+1,0,[["exit",e[i][1],n]]),e[i][1].end={...e[l][1].end}):e[i][1]=a,t.add(e.length,0,[["exit",a,n]]),t.consume(e),e}function $a(e,n,t){const r=this;let i;return o;function o(s){let f=r.events.length,u;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){u=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(e.enter("setextHeadingLine"),i=s,l(s)):t(s)}function l(s){return e.enter("setextHeadingLineSequence"),a(s)}function a(s){return s===i?(e.consume(s),a):(e.exit("setextHeadingLineSequence"),B(s)?U(e,c,"lineSuffix")(s):c(s))}function c(s){return s===null||F(s)?(e.exit("setextHeadingLine"),n(s)):t(s)}}const Va={tokenize:Wa};function Wa(e){const n=this,t=e.attempt(en,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ea,i)),"linePrefix")));return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Qa={resolveAll:fi()},Ka=ci("string"),Ya=ci("text");function ci(e){return{resolveAll:fi(e==="text"?Xa:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],o=t.attempt(i,l,a);return l;function l(f){return s(f)?o(f):a(f)}function a(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),c}function c(f){return s(f)?(t.exit("data"),o(f)):(t.consume(f),c)}function s(f){if(f===null)return!0;const u=i[f];let p=-1;if(u)for(;++p<u.length;){const h=u[p];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function fi(e){return n;function n(t,r){let i=-1,o;for(;++i<=t.length;)o===void 0?t[i]&&t[i][1].type==="data"&&(o=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==o+2&&(t[o][1].end=t[i-1][1].end,t.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(t,r):t}}function Xa(e,n){const t=new hn;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],o=n.sliceStream(i);let l=o.length,a=-1,c=0,s;for(;l--;){const f=o[l];if(typeof f=="string"){for(a=f.length;f.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(f===-2)s=!0,c++;else if(f!==-1){l++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(c=0),c){const f={type:r===e.length||s||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:i.start._bufferIndex+a,_index:i.start._index+l,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...f.start},i.start.offset===i.end.offset?Object.assign(i,f):t.add(r,0,[["enter",f,n],["exit",f,n]])}r++}return t.consume(e),e}const Ga={42:re,43:re,45:re,48:re,49:re,50:re,51:re,52:re,53:re,54:re,55:re,56:re,57:re,62:ti},Ja={91:la},Za={[-2]:Fn,[-1]:Fn,32:Fn},es={35:fa,42:un,45:[rr,un],60:ma,61:rr,95:un,96:tr,126:tr},ns={38:ii,92:ri},ts={[-5]:_n,[-4]:_n,[-3]:_n,33:Pa,38:ii,42:Zn,60:[Ro,ka],91:Da,92:[ua,ri],93:kt,95:Zn,96:Ko},rs={null:[Zn,Qa]},is={null:[42,95]},ls={null:[]},os=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:is,contentInitial:Ja,disable:ls,document:Ga,flow:es,flowInitial:Za,insideSpan:rs,string:ns,text:ts},Symbol.toStringTag,{value:"Module"}));function as(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},o=[];let l=[],a=[];const c={attempt:L(P),check:L(C),consume:b,enter:k,exit:T,interrupt:L(C,{interrupt:!0})},s={code:null,containerState:{},defineSkip:x,events:[],now:m,parser:e,previous:null,sliceSerialize:p,sliceStream:h,write:u};let f=n.tokenize.call(s,c);return n.resolveAll&&o.push(n),s;function u(z){return l=ae(l,z),S(),l[l.length-1]!==null?[]:(_(n,0),s.events=kn(o,s.events,s),s.events)}function p(z,D){return us(h(z),D)}function h(z){return ss(l,z)}function m(){const{_bufferIndex:z,_index:D,line:q,column:$,offset:j}=r;return{_bufferIndex:z,_index:D,line:q,column:$,offset:j}}function x(z){i[z.line]=z.column,w()}function S(){for(;r._index<l.length;){const z=l[r._index];if(typeof z=="string"){const D=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<z.length;)y(z.charCodeAt(r._bufferIndex))}else y(z)}}function y(z){f=f(z)}function b(z){F(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,w()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),s.previous=z}function k(z,D){const q=D||{};return q.type=z,q.start=m(),s.events.push(["enter",q,s]),a.push(q),q}function T(z){const D=a.pop();return D.end=m(),s.events.push(["exit",D,s]),D}function P(z,D){_(z,D.from)}function C(z,D){D.restore()}function L(z,D){return q;function q($,j,X){let R,ee,se,d;return Array.isArray($)?ge($):"tokenize"in $?ge([$]):ue($);function ue(G){return Be;function Be(be){const De=be!==null&&G[be],Fe=be!==null&&G.null,An=[...Array.isArray(De)?De:De?[De]:[],...Array.isArray(Fe)?Fe:Fe?[Fe]:[]];return ge(An)(be)}}function ge(G){return R=G,ee=0,G.length===0?X:g(G[ee])}function g(G){return Be;function Be(be){return d=H(),se=G,G.partial||(s.currentConstruct=G),G.name&&s.parser.constructs.disable.null.includes(G.name)?Le():G.tokenize.call(D?Object.assign(Object.create(s),D):s,c,ce,Le)(be)}}function ce(G){return z(se,d),j}function Le(G){return d.restore(),++ee<R.length?g(R[ee]):X}}}function _(z,D){z.resolveAll&&!o.includes(z)&&o.push(z),z.resolve&&fe(s.events,D,s.events.length-D,z.resolve(s.events.slice(D),s)),z.resolveTo&&(s.events=z.resolveTo(s.events,s))}function H(){const z=m(),D=s.previous,q=s.currentConstruct,$=s.events.length,j=Array.from(a);return{from:$,restore:X};function X(){r=z,s.previous=D,s.currentConstruct=q,s.events.length=$,a=j,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ss(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,o=n.end._bufferIndex;let l;if(t===i)l=[e[t].slice(r,o)];else{if(l=e.slice(t,i),r>-1){const a=l[0];typeof a=="string"?l[0]=a.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function us(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const o=e[t];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
14
+ `;break}case-3:{l=`\r
15
+ `;break}case-2:{l=n?" ":" ";break}case-1:{if(!n&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function cs(e){const r={constructs:Jr([os,...(e||{}).extensions||[]]),content:i(Io),defined:[],document:i(Po),flow:i(Va),lazy:{},string:i(Ka),text:i(Ya)};return r;function i(o){return l;function l(a){return as(r,o,a)}}}function fs(e){for(;!li(e););return e}const ir=/[\0\t\n\r]/g;function hs(){let e=1,n="",t=!0,r;return i;function i(o,l,a){o=n+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o));const c=[];let s=0;for(n="",t&&(o.charCodeAt(0)===65279&&s++,t=void 0);s<o.length;){ir.lastIndex=s;const f=ir.exec(o),u=f&&f.index!==void 0?f.index:o.length,p=o.charCodeAt(u);if(!f){n=o.slice(s);break}if(p===10&&s===u&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),s<u&&(c.push(o.slice(s,u)),e+=u-s),p){case 0:{c.push(65533),e++;break}case 9:{const h=Math.ceil(e/4)*4;for(c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}s=u+1}return a&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}const ps=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ms(e){return e.replace(ps,ds)}function ds(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),o=i===120||i===88;return Zr(t.slice(o?2:1),o?16:10)}return yt(t)||e}const hi={}.hasOwnProperty;function gs(e,n,t){return n&&typeof n=="object"&&(t=n,n=void 0),xs(t)(fs(cs(t).document().write(hs()(e,n,!0))))}function xs(e){const n={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Mt),autolinkProtocol:w,autolinkEmail:w,atxHeading:l(Ft),blockQuote:l(An),characterEscape:w,characterReference:w,codeFenced:l(Dt),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(Dt,a),codeText:l(Yi,a),codeTextData:w,data:w,codeFlowValue:w,definition:l(Xi),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(Gi),hardBreakEscape:l(_t),hardBreakTrailing:l(_t),htmlFlow:l(Rt,a),htmlFlowData:w,htmlText:l(Rt,a),htmlTextData:w,image:l(Ji),label:a,link:l(Mt),listItem:l(Zi),listItemValue:h,listOrdered:l(Nt,p),listUnordered:l(Nt),paragraph:l(el),reference:ce,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(Ft),strong:l(nl),thematicBreak:l(rl)},exit:{atxHeading:s(),atxHeadingSequence:C,autolink:s(),autolinkEmail:Fe,autolinkProtocol:De,blockQuote:s(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:G,characterReferenceMarkerNumeric:G,characterReferenceValue:Be,characterReference:be,codeFenced:s(y),codeFencedFence:S,codeFencedFenceInfo:m,codeFencedFenceMeta:x,codeFlowValue:z,codeIndented:s(b),codeText:s(X),codeTextData:z,data:z,definition:s(),definitionDestinationString:P,definitionLabelString:k,definitionTitleString:T,emphasis:s(),hardBreakEscape:s(q),hardBreakTrailing:s(q),htmlFlow:s($),htmlFlowData:z,htmlText:s(j),htmlTextData:z,image:s(ee),label:d,labelText:se,lineEnding:D,link:s(R),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:Le,resourceDestinationString:ue,resourceTitleString:ge,resource:g,setextHeading:s(H),setextHeadingLineSequence:_,setextHeadingText:L,strong:s(),thematicBreak:s()}};pi(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(E){let v={type:"root",children:[],position:void 0};const N={stack:[v],tokenStack:[],config:n,enter:c,exit:f,buffer:a,resume:u,data:t},O=[],ne=[];let K=-1;for(;++K<E.length;)if(ne.push(E[K]),E[K][1].type==="listOrdered"||E[K][1].type==="listUnordered")if(E[K][0]==="enter")O.push(ne.length-1);else{const te=O.pop();o(ne,te)}for(E=ne,K=-1;++K<E.length;){const te=n[E[K][0]];E[K][0]==="enter"&&n.beforeEnter.length>0&&i(n.beforeEnter,{...N,sliceSerialize:E[K][2].sliceSerialize},E[K][1]),hi.call(te,E[K][1].type)&&te[E[K][1].type].call({...N,sliceSerialize:E[K][2].sliceSerialize},E[K][1]),E[K][0]==="exit"&&n.afterExit.length>0&&i(n.afterExit,{...N,sliceSerialize:E[K][2].sliceSerialize},E[K][1])}if(N.tokenStack.length>0){const te=N.tokenStack[N.tokenStack.length-1];(te[1]||lr).call(N,void 0,te[0])}for(v.position={start:we(E.length>0?E[0][1].start:{line:1,column:1,offset:0}),end:we(E.length>0?E[E.length-2][1].end:{line:1,column:1,offset:0})},K=-1;++K<n.transforms.length;)v=n.transforms[K](v)||v;return v}function i(E,v,N){let O=-1;for(;++O<E.length;)E[O].call(v,N)}function o(E,v){const N=E.length-1;let O=v-1,ne=-1,K=!1,te,pe,je,qe;const Ue=[];for(;++O<=N;){const le=E[O];switch(le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{le[0]==="enter"?ne++:ne--,qe=void 0;break}case"lineEndingBlank":{le[0]==="enter"&&(te&&!qe&&!ne&&!je&&(je=O),qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qe=void 0}if(!ne&&le[0]==="enter"&&le[1].type==="listItemPrefix"||ne===-1&&le[0]==="exit"&&(le[1].type==="listUnordered"||le[1].type==="listOrdered")){if(te){let _e=O;for(pe=void 0;_e--;){const xe=E[_e];if(xe[1].type==="lineEnding"||xe[1].type==="lineEndingBlank"){if(xe[0]==="exit")continue;pe&&(E[pe][1].type="lineEndingBlank",K=!0),xe[1].type="lineEnding",pe=_e}else if(!(xe[1].type==="linePrefix"||xe[1].type==="blockQuotePrefix"||xe[1].type==="blockQuotePrefixWhitespace"||xe[1].type==="blockQuoteMarker"||xe[1].type==="listItemIndent"))break}je&&(!pe||je<pe)&&(te._spread=!0),te.end=Object.assign({},pe?E[pe][1].start:le[1].end),Ue.push({at:pe||O,event:["exit",te,le[2]]})}if(le[1].type==="listItemPrefix"){const _e={type:"listItem",_spread:!1,start:Object.assign({},le[1].start),end:void 0};te=_e,Ue.push({at:O,event:["enter",_e,le[2]]}),je=void 0,qe=!0}}}const Ot=E.splice(v);let vn=0;for(O=-1;++O<Ot.length;){for(;vn<Ue.length&&Ue[vn].at===v+O;)E.push(Ue[vn++].event);E.push(Ot[O])}E[v][1]._spread=K}function l(E,v){return N;function N(O){c.call(this,E(O),O),v&&v.call(this,O)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(E,v,N){this.stack[this.stack.length-1].children.push(E),this.stack.push(E),this.tokenStack.push([v,N||void 0]),E.position={start:we(v.start),end:void 0}}function s(E){return v;function v(N){E&&E.call(this,N),f.call(this,N)}}function f(E,v){const N=this.stack.pop(),O=this.tokenStack.pop();if(!O)throw new Error("Cannot close `"+E.type+"` ("+We({start:E.start,end:E.end})+"): it’s not open");O[0].type!==E.type&&(v?v.call(this,E,O[0]):(O[1]||lr).call(this,E,O[0])),N.position.end=we(E.end)}function u(){return yn(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function h(E){if(this.data.expectingFirstListItemValue){const v=this.stack[this.stack.length-2];v.start=Number.parseInt(this.sliceSerialize(E),10),this.data.expectingFirstListItemValue=void 0}}function m(){const E=this.resume(),v=this.stack[this.stack.length-1];v.lang=E}function x(){const E=this.resume(),v=this.stack[this.stack.length-1];v.meta=E}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const E=this.resume(),v=this.stack[this.stack.length-1];v.value=E.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const E=this.resume(),v=this.stack[this.stack.length-1];v.value=E.replace(/(\r?\n|\r)$/g,"")}function k(E){const v=this.resume(),N=this.stack[this.stack.length-1];N.label=v,N.identifier=he(this.sliceSerialize(E)).toLowerCase()}function T(){const E=this.resume(),v=this.stack[this.stack.length-1];v.title=E}function P(){const E=this.resume(),v=this.stack[this.stack.length-1];v.url=E}function C(E){const v=this.stack[this.stack.length-1];if(!v.depth){const N=this.sliceSerialize(E).length;v.depth=N}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function _(E){const v=this.stack[this.stack.length-1];v.depth=this.sliceSerialize(E).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function w(E){const N=this.stack[this.stack.length-1].children;let O=N[N.length-1];(!O||O.type!=="text")&&(O=tl(),O.position={start:we(E.start),end:void 0},N.push(O)),this.stack.push(O)}function z(E){const v=this.stack.pop();v.value+=this.sliceSerialize(E),v.position.end=we(E.end)}function D(E){const v=this.stack[this.stack.length-1];if(this.data.atHardBreak){const N=v.children[v.children.length-1];N.position.end=we(E.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(v.type)&&(w.call(this,E),z.call(this,E))}function q(){this.data.atHardBreak=!0}function $(){const E=this.resume(),v=this.stack[this.stack.length-1];v.value=E}function j(){const E=this.resume(),v=this.stack[this.stack.length-1];v.value=E}function X(){const E=this.resume(),v=this.stack[this.stack.length-1];v.value=E}function R(){const E=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";E.type+="Reference",E.referenceType=v,delete E.url,delete E.title}else delete E.identifier,delete E.label;this.data.referenceType=void 0}function ee(){const E=this.stack[this.stack.length-1];if(this.data.inReference){const v=this.data.referenceType||"shortcut";E.type+="Reference",E.referenceType=v,delete E.url,delete E.title}else delete E.identifier,delete E.label;this.data.referenceType=void 0}function se(E){const v=this.sliceSerialize(E),N=this.stack[this.stack.length-2];N.label=ms(v),N.identifier=he(v).toLowerCase()}function d(){const E=this.stack[this.stack.length-1],v=this.resume(),N=this.stack[this.stack.length-1];if(this.data.inReference=!0,N.type==="link"){const O=E.children;N.children=O}else N.alt=v}function ue(){const E=this.resume(),v=this.stack[this.stack.length-1];v.url=E}function ge(){const E=this.resume(),v=this.stack[this.stack.length-1];v.title=E}function g(){this.data.inReference=void 0}function ce(){this.data.referenceType="collapsed"}function Le(E){const v=this.resume(),N=this.stack[this.stack.length-1];N.label=v,N.identifier=he(this.sliceSerialize(E)).toLowerCase(),this.data.referenceType="full"}function G(E){this.data.characterReferenceType=E.type}function Be(E){const v=this.sliceSerialize(E),N=this.data.characterReferenceType;let O;N?(O=Zr(v,N==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):O=yt(v);const ne=this.stack[this.stack.length-1];ne.value+=O}function be(E){const v=this.stack.pop();v.position.end=we(E.end)}function De(E){z.call(this,E);const v=this.stack[this.stack.length-1];v.url=this.sliceSerialize(E)}function Fe(E){z.call(this,E);const v=this.stack[this.stack.length-1];v.url="mailto:"+this.sliceSerialize(E)}function An(){return{type:"blockquote",children:[],position:void 0}}function Dt(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Yi(){return{type:"inlineCode",value:"",position:void 0}}function Xi(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Gi(){return{type:"emphasis",children:[],position:void 0}}function Ft(){return{type:"heading",depth:0,children:[],position:void 0}}function _t(){return{type:"break",position:void 0}}function Rt(){return{type:"html",value:"",position:void 0}}function Ji(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function Mt(){return{type:"link",title:null,url:"",children:[],position:void 0}}function Nt(E){return{type:"list",ordered:E.type==="listOrdered",start:null,spread:E._spread,children:[],position:void 0}}function Zi(E){return{type:"listItem",spread:E._spread,checked:null,children:[],position:void 0}}function el(){return{type:"paragraph",children:[],position:void 0}}function nl(){return{type:"strong",children:[],position:void 0}}function tl(){return{type:"text",value:"",position:void 0}}function rl(){return{type:"thematicBreak",position:void 0}}}function we(e){return{line:e.line,column:e.column,offset:e.offset}}function pi(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?pi(e,r):ys(e,r)}}function ys(e,n){let t;for(t in n)if(hi.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"afterExit":case"beforeEnter":{const r=n[t];r&&e[t].push(r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function lr(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+We({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+We({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+We({start:n.start,end:n.end})+") is still open")}function ks(e){const n=this;n.parser=t;function t(r){return gs(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function bs(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function ws(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
16
+ `}]}function Ss(e,n){const t=n.value?n.value+`
17
+ `:"",r={},i=n.lang?n.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function Cs(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Es(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ts(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),i=Oe(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,a+=1,e.footnoteCounts.set(r,a);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,c);const s={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,s),e.applyData(n,s)}function As(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function vs(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function mi(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const i=e.all(n),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function Is(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return mi(e,n);const i={src:Oe(r.url||"")};n.alt!==null&&n.alt!==void 0&&(i.alt=n.alt),r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(n,o),e.applyData(n,o)}function zs(e,n){const t={src:Oe(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function Ps(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function Ls(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return mi(e,n);const i={href:Oe(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function Ds(e,n){const t={href:Oe(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Fs(e,n,t){const r=e.all(n),i=t?_s(t):di(n),o={},l=[];if(typeof n.checked=="boolean"){const f=r[0];let u;f&&f.type==="element"&&f.tagName==="p"?u=f:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
18
+ `}),f.type==="element"&&f.tagName==="p"&&!i?l.push(...f.children):l.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
19
+ `});const s={type:"element",tagName:"li",properties:o,children:l};return e.patch(n,s),e.applyData(n,s)}function _s(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const{children:t}=e;let r=-1;for(;!n&&++r<t.length;)n=di(t[r])}return n}function di(e){const{spread:n}=e;return n??e.children.length>1}function Rs(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function Ms(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ns(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Os(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Bs(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],l),i.push(l)}if(t.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},a=mt(n.children[1]),c=Vr(n.children[n.children.length-1]);a&&c&&(l.position={start:a,end:c}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,o),e.applyData(n,o)}function js(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",l=t&&t.type==="table"?t.align:void 0,a=l?l.length:n.children.length;let c=-1;const s=[];for(;++c<a;){const u=n.children[c],p={},h=l?l[c]:void 0;h&&(p.align=h);let m={type:"element",tagName:o,properties:p,children:[]};u&&(m.children=e.all(u),e.patch(u,m),m=e.applyData(u,m)),s.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(s,!0)};return e.patch(n,f),e.applyData(n,f)}function qs(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const or=9,ar=32;function Us(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const o=[];for(;r;)o.push(sr(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return o.push(sr(n.slice(i),i>0,!1)),o.join("")}function sr(e,n,t){let r=0,i=e.length;if(n){let o=e.codePointAt(r);for(;o===or||o===ar;)r++,o=e.codePointAt(r)}if(t){let o=e.codePointAt(i-1);for(;o===or||o===ar;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Hs(e,n){const t={type:"text",value:Us(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function $s(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const Vs={blockquote:bs,break:ws,code:Ss,delete:Cs,emphasis:Es,footnoteReference:Ts,heading:As,html:vs,imageReference:Is,image:zs,inlineCode:Ps,linkReference:Ls,link:Ds,listItem:Fs,list:Rs,paragraph:Ms,root:Ns,strong:Os,table:Bs,tableCell:qs,tableRow:js,text:Hs,thematicBreak:$s,toml:rn,yaml:rn,definition:rn,footnoteDefinition:rn};function rn(){}const gi=-1,bn=0,Ke=1,pn=2,bt=3,wt=4,St=5,Ct=6,xi=7,yi=8,{defineProperty:Ws}=Object,ki=typeof self=="object"?self:globalThis,ur=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ki[e](n)},Qs=(e,n)=>{const t=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=n[i];switch(o){case bn:case gi:return t(l,i);case Ke:{const a=t([],i);for(const c of l)a.push(r(c));return a}case pn:{const a=t({},i);for(const[c,s]of l){const f=r(c),u=r(s);f==="__proto__"?Ws(a,f,{value:u,configurable:!0,enumerable:!0,writable:!0}):a[f]=u}return a}case bt:return t(new Date(l),i);case wt:{const{source:a,flags:c}=l;return t(new RegExp(a,c),i)}case St:{const a=t(new Map,i);for(const[c,s]of l)a.set(r(c),r(s));return a}case Ct:{const a=t(new Set,i);for(const c of l)a.add(r(c));return a}case xi:{const{name:a,message:c}=l;return t(typeof ki[a]=="function"?ur(a,c):new Error(c),i)}case yi:return t(BigInt(l),i);case"BigInt":return t(Object(BigInt(l)),i);case"ArrayBuffer":return t(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:a}=new Uint8Array(l);return t(new DataView(a),l)}case"-0":return-0}return t(ur(o,l),i)};return r},cr=e=>Qs(new Map,e)(0),Ae="",{toString:Ks}={},{keys:Ys,is:Xs}=Object,Ve=e=>{const n=typeof e;if(n!=="object"||!e)return[bn,n];const t=Ks.call(e).slice(8,-1);switch(t){case"Array":return[Ke,Ae];case"Object":return[pn,Ae];case"Date":return[bt,Ae];case"RegExp":return[wt,Ae];case"Map":return[St,Ae];case"Set":return[Ct,Ae];case"DataView":return[Ke,t]}return t.includes("Array")?[Ke,t]:e instanceof Error?[xi,e.name||"Error"]:[pn,t]},ln=([e,n])=>e===bn&&(n==="function"||n==="symbol"),Gs=(e,n,t,r)=>{const i=(l,a)=>{const c=r.push(l)-1;return t.set(a,c),c},o=l=>{if(t.has(l))return t.get(l);let[a,c]=Ve(l);switch(a){case bn:{let f=l;switch(c){case"bigint":a=yi,f=l.toString();break;case"number":if(!l&&Xs(l,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([gi],l)}return i([a,f],l)}case Ke:{if(c){let p=l;return c==="DataView"?p=new Uint8Array(l.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(l)),i([c,[...p]],l)}const f=[],u=i([a,f],l);for(const p of l)f.push(o(p));return u}case pn:{if(c)switch(c){case"BigInt":return i([c,l.toString()],l);case"Boolean":case"Number":case"String":return i([c,l.valueOf()],l)}if(n&&"toJSON"in l)return o(l.toJSON());const f=[],u=i([a,f],l);for(const p of Ys(l))(e||!ln(Ve(l[p])))&&f.push([o(p),o(l[p])]);return u}case bt:return i([a,isNaN(l.getTime())?Ae:l.toISOString()],l);case wt:{const{source:f,flags:u}=l;return i([a,{source:f,flags:u}],l)}case St:{const f=[],u=i([a,f],l);for(const[p,h]of l)(e||!(ln(Ve(p))||ln(Ve(h))))&&f.push([o(p),o(h)]);return u}case Ct:{const f=[],u=i([a,f],l);for(const p of l)(e||!ln(Ve(p)))&&f.push(o(p));return u}}const{message:s}=l;return i([a,{name:c,message:s}],l)};return o},fr=(e,{json:n,lossy:t}={})=>{const r=[];return Gs(!(n||t),!!n,new Map,r)(e),r},mn=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?cr(fr(e,n)):structuredClone(e):(e,n)=>cr(fr(e,n));function Js(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Zs(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function eu(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Js,r=e.options.footnoteBackLabel||Zs,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[],c=[];let s=-1;for(;++s<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[s]);f&&(a[s]=e.all(f))}for(s=-1;++s<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[s]);if(!f)continue;const u=a[s],p=String(f.identifier).toUpperCase(),h=Oe(p.toLowerCase());let m=0;const x=[],S=e.footnoteCounts.get(p);for(;S!==void 0&&++m<=S;){x.length>0&&x.push({type:"text",value:" "});let k=typeof t=="string"?t:t(s,m);typeof k=="string"&&(k={type:"text",value:k}),x.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+h+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,m),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const y=u[u.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const k=y.children[y.children.length-1];k&&k.type==="text"?k.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...x)}else u.push(...x);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+h},children:e.wrap(u,!0)};e.patch(f,b),c.push(b)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...mn(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
20
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
21
+ `}]}}const wn=(function(e){if(e==null)return iu;if(typeof e=="function")return Sn(e);if(typeof e=="object")return Array.isArray(e)?nu(e):tu(e);if(typeof e=="string")return ru(e);throw new Error("Expected function, string, or object as test")});function nu(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=wn(e[t]);return Sn(r);function r(...i){let o=-1;for(;++o<n.length;)if(n[o].apply(this,i))return!0;return!1}}function tu(e){const n=e;return Sn(t);function t(r){const i=r;let o;for(o in e)if(i[o]!==n[o])return!1;return!0}}function ru(e){return Sn(n);function n(t){return t&&t.type===e}}function Sn(e){return n;function n(t,r,i){return!!(lu(t)&&e.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function iu(){return!0}function lu(e){return e!==null&&typeof e=="object"&&"type"in e}const bi=[],ou=!0,Ye=!1,tt="skip";function rt(e,n,t,r){if(!e||typeof e!="object")throw new Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,o,l,a,c;if(typeof t=="function"||t&&typeof t=="object"?(o=n,l=t,r&&(i=!1)):(l=n,t&&(i=!1)),typeof l=="function")a=l;else if(l&&typeof l=="object"){if(!(l.enter===null||l.enter===void 0))if(typeof l.enter=="function")a=l.enter;else throw new Error("Unexpected value `"+l.enter+"` for `visitors.enter`, expected optional visitor");if(typeof l.exit=="function")c=l.exit;else throw new Error("Unexpected value `"+l.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw new Error("Unexpected value `"+l+"` for `enter` or `visitors`, expected visitor or object with visitors");const s=wn(o),f=i?1:-1;u(e,void 0,[])();function u(p,h,m){const x=p&&typeof p=="object"?p:{};if(typeof x.type=="string"){const y=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(p.type+(y?"<"+y+">":""))+")"})}return S;function S(){const y=!o||s(p,h,m[m.length-1]||void 0);let b=bi;if(a&&y&&(b=hr(a(p,m,h)),b[0]===Ye))return b;if("children"in p&&p.children){const k=p;if(k.children&&b[0]!==tt){let T=(i?-1:k.children.length)+f;const P=[...m,k];for(;T>-1&&T<k.children.length;){const C=k.children[T],L=u(C,T,P)();if(L[0]===Ye)return L;T=typeof L[1]=="number"?L[1]:T+f}}}if(c&&y){const k=hr(c(p,m,h));if(k[0]===tt)throw new Error("Unexpected value `"+k[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(k[0]===Ye||typeof k[1]=="number")return k}return b}}}function hr(e){return Array.isArray(e)?e:typeof e=="number"?[ou,e]:e==null?bi:[e]}function Cn(e,n,t,r){let i,o,l;o=n,l=t,typeof o=="function"?rt(e,i,it(o),l):rt(e,i,au(o),l)}function au(e){return!e||typeof e!="object"?e:{enter:typeof e.enter=="function"?it(e.enter):e.enter,exit:typeof e.exit=="function"?it(e.exit):e.exit}}function it(e){return n;function n(t,r,i){return e(t,i,r[r.length-1])}}const lt={}.hasOwnProperty,su={};function uu(e,n){const t=n||su,r=new Map,i=new Map,o=new Map,l={...Vs,...t.handlers},a={all:s,applyData:fu,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:c,options:t,patch:cu,wrap:pu};return Cn(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const u=String(f.identifier).toUpperCase();f.type==="definition"?r.has(u)||r.set(u,f):i.has(u)||i.set(u,f)}}),a;function c(f,u){const{type:p}=f,h=a.handlers[p];if(lt.call(a.handlers,p)&&h)return h(a,f,u);if(a.options.passThrough&&a.options.passThrough.includes(p)){if("children"in f){const{children:x,...S}=f;return{...mn(S),children:a.all(f)}}return mn(f)}return(a.options.unknownHandler||hu)(a,f,u)}function s(f){const u=[];if("children"in f){const p=f.children;let h=-1;for(;++h<p.length;){const m=a.one(p[h],f);if(m){if(h&&p[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=pr(m.value)),!Array.isArray(m)&&m.type==="element")){const x=m.children[0];x&&x.type==="text"&&(x.value=pr(x.value))}Array.isArray(m)?u.push(...m):u.push(m)}}}return u}}function cu(e,n){e.position&&(n.position=Jl(e))}function fu(e,n){let t=n;if(e&&e.data){const{hChildren:r,hName:i,hProperties:o}=e.data;if(typeof i=="string")if(t.type==="element")t.tagName=i;else{const l="children"in t?t.children:[t];t={type:"element",tagName:i,properties:{},children:l}}t.type==="element"&&o&&Object.assign(t.properties,mn(o)),"children"in t&&t.children&&r!==null&&r!==void 0&&(t.children=r)}return t}function hu(e,n){const t=n.data||{},r="value"in n&&!(lt.call(t,"hProperties")||lt.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function pu(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
22
+ `});++r<e.length;)r&&t.push({type:"text",value:`
23
+ `}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
24
+ `}),t}function pr(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function mr(e,n){const t=uu(e,n),r=t.one(e,void 0),i=eu(t),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
25
+ `},i),o}function mu(e,n){return e&&"run"in e?async function(t,r){const i=mr(t,{file:r,...n});await e.run(i,r)}:function(t,r){return mr(t,{file:r,...e||n})}}function dr(e){if(e)throw e}var Rn,gr;function du(){if(gr)return Rn;gr=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(s){return typeof Array.isArray=="function"?Array.isArray(s):n.call(s)==="[object Array]"},o=function(s){if(!s||n.call(s)!=="[object Object]")return!1;var f=e.call(s,"constructor"),u=s.constructor&&s.constructor.prototype&&e.call(s.constructor.prototype,"isPrototypeOf");if(s.constructor&&!f&&!u)return!1;var p;for(p in s);return typeof p>"u"||e.call(s,p)},l=function(s,f){t&&f.name==="__proto__"?t(s,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):s[f.name]=f.newValue},a=function(s,f){if(f==="__proto__")if(e.call(s,f)){if(r)return r(s,f).value}else return;return s[f]};return Rn=function c(){var s,f,u,p,h,m,x=arguments[0],S=1,y=arguments.length,b=!1;for(typeof x=="boolean"&&(b=x,x=arguments[1]||{},S=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});S<y;++S)if(s=arguments[S],s!=null)for(f in s)u=a(x,f),p=a(s,f),x!==p&&(b&&p&&(o(p)||(h=i(p)))?(h?(h=!1,m=u&&i(u)?u:[]):m=u&&o(u)?u:{},l(x,{name:f,newValue:c(b,m,p)})):typeof p<"u"&&l(x,{name:f,newValue:p}));return x},Rn}var gu=du();const Mn=ll(gu);function ot(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xu(){const e=[],n={run:t,use:r};return n;function t(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);a(null,...i);function a(c,...s){const f=e[++o];let u=-1;if(c){l(c);return}for(;++u<i.length;)(s[u]===null||s[u]===void 0)&&(s[u]=i[u]);i=s,f?yu(f,a)(...s):l(null,...s)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function yu(e,n){let t;return r;function r(...l){const a=e.length>l.length;let c;a&&l.push(i);try{c=e.apply(this,l)}catch(s){const f=s;if(a&&t)throw f;return i(f)}a||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(l,...a){t||(t=!0,n(l,...a))}function o(l){i(null,l)}}const me={basename:ku,dirname:bu,extname:wu,join:Su,sep:"/"};function ku(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');nn(e);let t=0,r=-1,i=e.length,o;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let l=-1,a=n.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){t=i+1;break}}else l<0&&(o=!0,l=i+1),a>-1&&(e.codePointAt(i)===n.codePointAt(a--)?a<0&&(r=i):(a=-1,r=l));return t===r?r=l:r<0&&(r=e.length),e.slice(t,r)}function bu(e){if(nn(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.codePointAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function wu(e){nn(e);let n=e.length,t=-1,r=0,i=-1,o=0,l;for(;n--;){const a=e.codePointAt(n);if(a===47){if(l){r=n+1;break}continue}t<0&&(l=!0,t=n+1),a===46?i<0?i=n:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||t<0||o===0||o===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Su(...e){let n=-1,t;for(;++n<e.length;)nn(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Cu(t)}function Cu(e){nn(e);const n=e.codePointAt(0)===47;let t=Eu(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Eu(e,n){let t="",r=0,i=-1,o=0,l=-1,a,c;for(;++l<=e.length;){if(l<e.length)a=e.codePointAt(l);else{if(a===47)break;a=47}if(a===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=l,o=0;continue}}else if(t.length>0){t="",r=0,i=l,o=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,l):t=e.slice(i+1,l),r=l-i-1;i=l,o=0}else a===46&&o>-1?o++:o=-1}return t}function nn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Tu={cwd:Au};function Au(){return"/"}function at(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function vu(e){if(typeof e=="string")e=new URL(e);else if(!at(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Iu(e)}function Iu(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 n=e.pathname;let t=-1;for(;++t<n.length;)if(n.codePointAt(t)===37&&n.codePointAt(t+1)===50){const r=n.codePointAt(t+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(n)}const Nn=["history","path","basename","stem","extname","dirname"];class wi{constructor(n){let t;n?at(n)?t={path:n}:typeof n=="string"||zu(n)?t={value:n}:t=n:t={},this.cwd="cwd"in t?"":Tu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Nn.length;){const o=Nn[r];o in t&&t[o]!==void 0&&t[o]!==null&&(this[o]=o==="history"?[...t[o]]:t[o])}let i;for(i in t)Nn.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?me.basename(this.path):void 0}set basename(n){Bn(n,"basename"),On(n,"basename"),this.path=me.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?me.dirname(this.path):void 0}set dirname(n){xr(this.basename,"dirname"),this.path=me.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?me.extname(this.path):void 0}set extname(n){if(On(n,"extname"),xr(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=me.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){at(n)&&(n=vu(n)),Bn(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?me.basename(this.path,this.extname):void 0}set stem(n){Bn(n,"stem"),On(n,"stem"),this.path=me.join(this.dirname||"",n+(this.extname||""))}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=void 0,i}message(n,t,r){const i=new xn(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function On(e,n){if(e&&e.includes(me.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+me.sep+"`")}function Bn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function xr(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function zu(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Pu=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Lu={}.hasOwnProperty;class Et extends Pu{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=xu()}copy(){const n=new Et;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(Mn(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(Un("data",this.frozen),this.namespace[n]=t,this):Lu.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Un("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(n,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=on(n),r=this.parser||this.Parser;return jn("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),jn("process",this.parser||this.Parser),qn("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(o,l){const a=on(n),c=r.parse(a);r.run(c,a,function(f,u,p){if(f||!u||!p)return s(f);const h=u,m=r.stringify(h,p);_u(m)?p.value=m:p.result=m,s(f,p)});function s(f,u){f||!u?l(f):o?o(u):t(void 0,u)}}}processSync(n){let t=!1,r;return this.freeze(),jn("processSync",this.parser||this.Parser),qn("processSync",this.compiler||this.Compiler),this.process(n,i),kr("processSync","process",t),r;function i(o,l){t=!0,dr(o),r=l}}run(n,t,r){yr(n),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(l,a){const c=on(t);i.run(n,c,s);function s(f,u,p){const h=u||n;f?a(f):l?l(h):r(void 0,h,p)}}}runSync(n,t){let r=!1,i;return this.run(n,t,o),kr("runSync","run",r),i;function o(l,a){dr(l),i=a,r=!0}}stringify(n,t){this.freeze();const r=on(t),i=this.compiler||this.Compiler;return qn("stringify",i),yr(n),i(n,r)}use(n,...t){const r=this.attachers,i=this.namespace;if(Un("use",this.frozen),n!=null)if(typeof n=="function")c(n,t);else if(typeof n=="object")Array.isArray(n)?a(n):l(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(s){if(typeof s=="function")c(s,[]);else if(typeof s=="object")if(Array.isArray(s)){const[f,...u]=s;c(f,u)}else l(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function l(s){if(!("plugins"in s)&&!("settings"in s))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");a(s.plugins),s.settings&&(i.settings=Mn(!0,i.settings,s.settings))}function a(s){let f=-1;if(s!=null)if(Array.isArray(s))for(;++f<s.length;){const u=s[f];o(u)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function c(s,f){let u=-1,p=-1;for(;++u<r.length;)if(r[u][0]===s){p=u;break}if(p===-1)r.push([s,...f]);else if(f.length>0){let[h,...m]=f;const x=r[p][1];ot(x)&&ot(h)&&(h=Mn(!0,x,h)),r[p]=[s,h,...m]}}}}const Du=new Et().freeze();function jn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Un(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function yr(e){if(!ot(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function kr(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function on(e){return Fu(e)?e:new wi(e)}function Fu(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function _u(e){return typeof e=="string"||Ru(e)}function Ru(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Mu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",br=[],wr={allowDangerousHtml:!0},Nu=/^(https?|ircs?|mailto|xmpp)$/i,Ou=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Bu(e){const n=ju(e),t=qu(e);return Uu(n.runSync(n.parse(t),t),e)}function ju(e){const n=e.rehypePlugins||br,t=e.remarkPlugins||br,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...wr}:wr;return Du().use(ks).use(t).use(mu,r).use(n)}function qu(e){const n=e.children||"",t=new wi;return typeof n=="string"&&(t.value=n),t}function Uu(e,n){const t=n.allowedElements,r=n.allowElement,i=n.components,o=n.disallowedElements,l=n.skipHtml,a=n.unwrapDisallowed,c=n.urlTransform||Hu;for(const f of Ou)Object.hasOwn(n,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Mu+f.id,void 0);return Cn(e,s),io(e,{Fragment:I.Fragment,components:i,ignoreInvalidStyle:!0,jsx:I.jsx,jsxs:I.jsxs,passKeys:!0,passNode:!0});function s(f,u,p){if(f.type==="raw"&&p&&typeof u=="number")return l?p.children.splice(u,1):p.children[u]={type:"text",value:f.value},u;if(f.type==="element"){let h;for(h in Dn)if(Object.hasOwn(Dn,h)&&Object.hasOwn(f.properties,h)){const m=f.properties[h],x=Dn[h];(x===null||x.includes(f.tagName))&&(f.properties[h]=c(String(m||""),h,f))}}if(f.type==="element"){let h=t?!t.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof u=="number"&&(h=!r(f,u,p)),h&&p&&typeof u=="number")return a&&f.children?p.children.splice(u,1,...f.children):p.children.splice(u,1),u}}}function Hu(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return n===-1||i!==-1&&n>i||t!==-1&&n>t||r!==-1&&n>r||Nu.test(e.slice(0,n))?e:""}function $u(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Si(e,n,t){const i=wn((t||{}).ignore||[]),o=Vu(n);let l=-1;for(;++l<o.length;)rt(e,a);function a(s,f,u){if(s.type==="text"&&typeof u=="number")return c(s,f,u);if(i(s,u,f[f.length-1]))return tt}function c(s,f,u){const p=f[f.length-1],h=o[l][0],m=o[l][1];let x=0,S=!1,y=[];h.lastIndex=0;let b=h.exec(s.value);for(;b;){const T=b.index,P={index:b.index,input:b.input,stack:[...f,s]};let C=m(...b,P);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C!==!1){if(x!==T&&k({type:"text",value:s.value.slice(x,T)}),Array.isArray(C))for(const L of C)k(L);else C&&k(C);x=T+b[0].length,S=!0}if(C===!1||b[0].length===0){const L=s.value.codePointAt(T)||0;h.lastIndex=T+(/[uv]/.test(h.flags)&&L>65535?2:1)}if(!h.global)break;b=h.exec(s.value)}return S?(x<s.value.length&&k({type:"text",value:s.value.slice(x)}),p.children.splice(u,1,...y)):y=[s],u+y.length;function k(T){const P=y[y.length-1];P&&P.type==="text"&&T.type==="text"?P.value+=T.value:y.push(T)}}}function Vu(e){if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=[],t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const i=t[r];n.push([Wu(i[0]),Qu(i[1])])}return n}function Wu(e){return typeof e=="string"?new RegExp($u(e),"g"):e}function Qu(e){return typeof e=="function"?e:function(){return e}}function Ku(e){Si(e,[/\r?\n|\r/g,Yu])}function Yu(){return{type:"break"}}function Xu(){return function(e){Ku(e)}}function Sr(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+n.length);return r}const Hn="phrasing",$n=["autolink","link","image","label"];function Gu(){return{transforms:[ic],enter:{literalAutolink:Zu,literalAutolinkEmail:Vn,literalAutolinkHttp:Vn,literalAutolinkWww:Vn},exit:{literalAutolink:rc,literalAutolinkEmail:tc,literalAutolinkHttp:ec,literalAutolinkWww:nc}}}function Ju(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Hn,notInConstruct:$n},{character:".",before:"[Ww]{3}",inConstruct:Hn,notInConstruct:$n},{character:":",before:"[PSps]",after:"\\/",inConstruct:Hn,notInConstruct:$n}]}}function Zu(e){this.enter({type:"link",title:null,url:"",children:[],position:void 0},e)}function Vn(e){this.config.enter.autolinkProtocol.call(this,e)}function ec(e){this.config.exit.autolinkProtocol.call(this,e)}function nc(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function tc(e){this.config.exit.autolinkEmail.call(this,e)}function rc(e){this.exit(e)}function ic(e){Si(e,[[new RegExp("(?<![\\da-z])(https?:\\/\\/|www(?=\\.))([\\w-]*\\.[\\w\\-.]*)([^\\t\\n\\r ]*)","gi"),lc],[new RegExp("(?<![\\w+\\-.@])xmpp:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)(\\/(?:[\\w\\-/]|\\.(?=[\\dA-Za-z]))*)?","g"),sc],[new RegExp("(?<![\\w+\\-.@])mailto:([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),ac],[new RegExp("(?<![\\w+\\-.]|(?:^|[^\\d@A-Za-z])(?:mailto|xmpp):)([\\w+\\-.]+)@([\\w-]+(?:\\.[\\w-]+)+)","g"),oc]],{ignore:["link","linkReference"]})}function lc(e,n,t,r,i){if(!fc(i))return!1;let o="";if(/^w/i.test(n)&&(t=n+t,n="",o="http://"),Ze(t.charCodeAt(0))||!uc(t))return!1;const l=cc(t+r),a={type:"link",title:null,url:o+n+l[0],children:[{type:"text",value:n+l[0],position:void 0}],position:void 0};return l[1]?[a,{type:"text",value:l[1],position:void 0}]:a}function oc(e,n,t){return/[\d\-_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t,position:void 0}],position:void 0}}function ac(e,n,t){if(/[\d\-_]$/.test(t))return!1;const r="mailto:"+n+"@"+t;return{type:"link",title:null,url:r,children:[{type:"text",value:r,position:void 0}],position:void 0}}function sc(e,n,t,r,i){if(/[\d\-_]$/.test(t)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)==="@"))return!1;const o="xmpp:"+n+"@"+t+(r||"");return{type:"link",title:null,url:o,children:[{type:"text",value:o,position:void 0}],position:void 0}}function uc(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[\dA-Za-z]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[\dA-Za-z]/.test(n[n.length-2])))}function cc(e){let n=e.length;for(;n>0;){const l=e.charCodeAt(n-1);if(l===33||l===34||l===38||l===39||l===41||l===44||l===46||l===58||l===59||l===60||l===62||l===63||l===93||l===125)n--;else break}if(n===e.length)return[e,void 0];let t=e.slice(n);e=e.slice(0,n);let r=t.indexOf(")");const i=Sr(e,"(");let o=Sr(e,")");for(;r!==-1&&i>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function fc(e){const n=e.input.charCodeAt(e.index-1);return e.index===0||ze(n)||Ze(n)}Ci.peek=bc;function hc(){this.buffer()}function pc(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function mc(){this.buffer()}function dc(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function gc(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=he(this.sliceSerialize(e)).toLowerCase(),t.label=n}function xc(e){this.exit(e)}function yc(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=he(this.sliceSerialize(e)).toLowerCase(),t.label=n}function kc(e){this.exit(e)}function bc(){return"["}function Ci(e,n,t,r){const i=t.createTracker(r);let o=i.move("[^");const l=t.enter("footnoteReference"),a=t.enter("reference");return o+=i.move(t.safe(t.associationId(e),{after:"]",before:o})),a(),l(),o+=i.move("]"),o}function wc(){return{enter:{gfmFootnoteCallString:hc,gfmFootnoteCall:pc,gfmFootnoteDefinitionLabelString:mc,gfmFootnoteDefinition:dc},exit:{gfmFootnoteCallString:gc,gfmFootnoteCall:xc,gfmFootnoteDefinitionLabelString:yc,gfmFootnoteDefinition:kc}}}function Sc(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:Ci},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,i,o,l){const a=o.createTracker(l);let c=a.move("[^");const s=o.enter("footnoteDefinition"),f=o.enter("label");return c+=a.move(o.safe(o.associationId(r),{before:c,after:"]"})),f(),c+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),c+=a.move((n?`
26
+ `:" ")+o.indentLines(o.containerFlow(r,a.current()),n?Ei:Cc))),s(),c}}function Cc(e,n,t){return n===0?e:Ei(e,n,t)}function Ei(e,n,t){return(t?"":" ")+e}const Ec=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Tt.attention=zc;Tt.peek=Pc;function Tc(){return{canContainEols:["delete"],enter:{strikethrough:vc},exit:{strikethrough:Ic}}}function Ac(){return{handlers:{delete:Tt},unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Ec}]}}function vc(e){this.enter({type:"delete",children:[],position:void 0},e)}function Ic(e){this.exit(e)}function Tt(e,n,t,r){const i=t.createTracker(r),o=t.stack.includes("strikethrough")?"~":"~~",l=t.enter("strikethrough");let a=i.move(o);return a+=t.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move(o),l(),a}function zc(){return{construct:"strikethrough",markers:["~"],sizes:[2,1]}}function Pc(){return"~"}function Lc(e){return e.length}function Dc(e,n){const t=n||{},r=(t.align||[]).concat(),i=t.stringLength||Lc,o=[],l=[],a=[],c=[];let s=0,f=-1;for(;++f<e.length;){const x=[],S=[];let y=-1;for(e[f].length>s&&(s=e[f].length);++y<e[f].length;){const b=Fc(e[f][y]);if(t.alignDelimiters!==!1){const k=i(b);S[y]=k,(c[y]===void 0||k>c[y])&&(c[y]=k)}x.push(b)}l[f]=x,a[f]=S}let u=-1;if(typeof r=="object"&&"length"in r)for(;++u<s;)o[u]=Cr(r[u]);else{const x=Cr(r);for(;++u<s;)o[u]=x}u=-1;const p=[],h=[];for(;++u<s;){const x=o[u];let S="",y="";x===99?(S=":",y=":"):x===108?S=":":x===114&&(y=":");let b=t.alignDelimiters===!1?1:Math.max(1,c[u]-S.length-y.length);const k=S+"-".repeat(b)+y;t.alignDelimiters!==!1&&(b=S.length+b+y.length,b>c[u]&&(c[u]=b),h[u]=b),p[u]=k}l.splice(1,0,p),a.splice(1,0,h),f=-1;const m=[];for(;++f<l.length;){const x=l[f],S=a[f],y=t.fillRows===!1?Math.max(1,l[f===1?0:f].length):s;u=-1;const b=[];for(;++u<y;){const k=x[u]||"";let T="",P="";if(t.alignDelimiters!==!1){const C=c[u]-(S[u]||0),L=o[u];if(L===114)T=" ".repeat(C);else if(L===99){const _=C/2;C%2?(T=" ".repeat(_+.5),P=" ".repeat(_-.5)):(T=" ".repeat(_),P=T)}else P=" ".repeat(C)}t.delimiterStart!==!1&&!u&&b.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&k==="")&&(t.delimiterStart!==!1||u)&&b.push(" "),t.alignDelimiters!==!1&&b.push(T),b.push(k),t.alignDelimiters!==!1&&b.push(P),t.padding!==!1&&b.push(" "),(t.delimiterEnd!==!1||u!==y-1)&&b.push("|")}m.push(t.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return m.join(`
27
+ `)}function Fc(e){return e==null?"":String(e)}function Cr(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}const _c=wn(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Rc(e,n,t,r){const i=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);const l=t.indentLines(t.containerFlow(e,o.current()),Mc);return i(),l}function Mc(e,n,t){return">"+(t?"":" ")+e}function Nc(e,n){return Er(e,n.inConstruct,!0)&&!Er(e,n.notInConstruct,!1)}function Er(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function Tr(e,n,t,r){let i=-1;for(;++i<t.unsafe.length;){const o=t.unsafe[i];if(o.character===`
28
+ `&&!o.before&&!o.after&&Nc(t.stack,o))return/[\t ]/.test(r.before)?"":" "}return`\\
29
+ `}function Oc(e,n){const t=String(e);let r=t.indexOf(n),i=r,o=0,l=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+n.length,r=t.indexOf(n,i);return l}function Bc(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^\n\r ]/.test(e.value)&&!/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function jc(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function qc(e,n,t,r){const i=jc(t),o=e.value||"";if(Bc(e,t)){const u=t.enter("codeIndented"),p=t.indentLines(o,Uc);return u(),p}const l=t.createTracker(r),a=i.repeat(Math.max(Oc(o,i)+1,3)),c=t.enter("codeFenced"),s=i==="`"?"GraveAccent":"Tilde";let f=l.move(a);if(e.lang){const u=t.enter(`codeFencedLang${s}`);f+=l.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...l.current()})),u()}if(e.lang&&e.meta){const u=t.enter(`codeFencedMeta${s}`);f+=l.move(" "),f+=l.move(t.safe(e.meta,{before:f,after:`
30
+ `,encode:["`"],...l.current()})),u()}return f+=l.move(`
31
+ `),o&&(f+=l.move(o+`
32
+ `)),f+=l.move(a),c(),f}function Uc(e,n,t){return(t?"":" ")+e}function At(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function Hc(e,n,t,r){const i=At(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("definition");let a=t.enter("label");const c=t.createTracker(r);let s=c.move("[");return s+=c.move(t.safe(t.associationId(e),{before:s,after:"]",...c.current()})),s+=c.move("]: "),a(),!e.url||/^<|[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),s+=c.move("<"),s+=c.move(t.safe(e.url,{before:s,after:">",...c.current()})),s+=c.move(">")):(a=t.enter("destinationRaw"),s+=c.move(t.safe(e.url,{before:s,after:e.title?" ":`
33
+ `,...c.current()}))),a(),e.title&&(a=t.enter(`title${o}`),s+=c.move(" "+i),s+=c.move(t.safe(e.title,{before:s,after:i,...c.current()})),s+=c.move(i),a()),l(),s}function $c(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function dn(e){const n=e.codePointAt(0);return n===void 0?"":String.fromCodePoint(n)}function Me(e){const n=e.codePointAt(e.length-2);return n!==void 0&&n>65535?e.slice(-2):e.slice(-1)}function Ti(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ar(e,n,t){const r=Se(e),i=Se(n);return r===void 0?i===void 0?t==="_"?{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}}function Vc(e){if(e.charCodeAt(0)!==60)return;const n=e.charCodeAt(1);if(n===33){const a=e.charCodeAt(2);return a===45?2:a===91?5:J(a)?4:void 0}if(n===63)return 3;const t=n===47,r=t?2:1;let i=r,o=e.charCodeAt(i);if(!J(o))return;for(;o===45||Z(o);)o=e.charCodeAt(++i);const l=e.slice(r,i).toLowerCase();return!t&&o!==47&&nt.includes(l)?1:ui.includes(l)?6:7}const Ai=new Map([["*",!1],["_",!0]]);function Wc(e,n,t){const r=new Set;for(const o of e){const l=t.get(o);if(l&&o.attention&&n.some(a=>a.attention===o.attention))for(const a of l.tokens)r.add(a.attention)}const i=[];for(const o of e)o.attention&&r.delete(o.attention)&&i.push(o.attention);return i.reverse(),i}function vi(e,n,t){const r=[],i=new Map,o=new Map;let l=0;for(;l<e.length;){if(!e[l].attention){l++;continue}const a=e[l].value.charAt(0),c=Ai.get(a);let s=l+1;for(;s<e.length&&e[s].attention&&e[s].value.charAt(0)===a;)s++;const f=l?e[l-1].value:n,u=Se(f.charCodeAt(f.length-1)),p=Se((s<e.length?e[s].value:t).charCodeAt(0)),h=!p||p===2&&!!u,m=!u||u===2&&!!p,x={tokens:e.slice(l,s),markers:[],start:0,end:0,open:c?h&&(!!u||!m):h,close:c?m&&(!!p||!h):m,split:c!==void 0};for(const S of x.tokens){i.set(S,[...x.tokens]),o.set(S,x);let y=S.value.length;for(;y--;)x.markers.push(S)}x.end=x.markers.length,r.push(x),l=s}for(Kc(r,i),l=-1;++l<e.length;){const a=i.get(e[l]);if(a)return{attention:Wc(e,a,o),index:l}}}function an(e,n){const t=e[n?0:e.length-1];if(!t||t.attention)return;const r=n?dn(t.value):Me(t.value),i=Ti(r.codePointAt(0));if(n)t.value=i+t.value.slice(r.length);else{let o=t.value.slice(0,t.value.length-r.length),l=0;for(;o.charCodeAt(o.length-1-l)===92;)l++;l%2&&(o+="\\"),t.value=o+i}}function Qc(e,n,t,r,i){for(const o of t.attention){const l=n.get(o)||o.sequences[0];for(const a of o.sequences){if(a===l)continue;const c=new Map(n);c.set(o,a);const s=En(e,c,r,i),f=vi(s,r,i);if(!f||f.index>t.index)return{chosen:c,mistake:f,tokens:s}}}}function Kc(e,n){const t=new Map;for(const r of e){const i=r.tokens[0].value.charAt(0);let o=t.get(i);o||(o=[],t.set(i,o));let l=r.close?o.length:0;for(;l--&&r.start<r.end;){const a=o[l],c=a.end-a.start,s=r.end-r.start;if(r.split?(a.close||r.open)&&s%3&&!((c+s)%3):c!==a.markers.length||c!==s)continue;const f=r.split?c>1&&s>1?2:1:s,u=a.markers.slice(a.end-f,a.end),p=r.markers.slice(r.start,r.start+f),h=u[0],m=p[0];if(h===u[f-1]&&h.value.length===f&&m===p[f-1]&&m.value.length===f&&h.attention===m.attention)n.delete(h),n.delete(m);else{const x=[...new Set([...u,...p])];for(const S of x){const y=n.get(S);y&&y.push(...x)}}a.end-=f,r.start+=f,a.start===a.end&&o.splice(l,1),l=o.length}r.open&&r.start<r.end&&o.push(r)}}function Yc(e,n,t){if(n.length===0)throw new Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(t.length===0)throw new Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(const i of t)if(!Number.isSafeInteger(i)||i<1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as size, expected positive integer");const r=[];for(const i of n){if(i.length!==1)throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!ei(i.charCodeAt(0)))throw new Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(const o of t)r.push(i.repeat(o))}return r}function Xc(e,n,t){const r=n.indexStack,i=e.children||[],o=[];let l=-1,a=t.before;r.push(-1);let c=n.createTracker(t);for(;++l<i.length;){const s=i[l];let f;if(r[r.length-1]=l,l+1<i.length){let h=n.handle.handlers[i[l+1].type];h&&h.peek&&(h=h.peek),f=h?dn(h(i[l+1],e,n,{before:"",after:"",...c.current()})):""}else f=t.after;const u=o[o.length-1];typeof u=="string"&&(a==="\r"||a===`
34
+ `)&&s.type==="html"&&Vc(s.value)!==7&&(o[o.length-1]=u.replace(/(\r?\n|\r)$/," "),a=" ",c=n.createTracker(t),c.move(Tn(o,t.before,t.after)));const p=n.handle.handlers[s.type];if(p&&p.attention){const h=vt(s,p.attention,n,c);if(!h)continue;o.push(h),a=Me(h.sequences[0])}else{const h=n.handle(s,e,n,{...c.current(),after:f,before:a});if(!h)continue;c.move(h),o.push(h),a=Me(h)}}return r.pop(),o}function vt(e,n,t,r){const{construct:i,markers:o,sizes:l}=n(e,t),a=Yc(e.type,o,l),c=a[0],s=t.enter(i),f=t.createTracker(r.current());f.move(c);const u=Xc(e,t,{...f.current(),before:c,after:c});if(s(),u.length!==0)return r.move(c),r.move(Tn(u,c,c)),r.move(c),{children:u,sequences:a}}function vr(e,n,t,r){let i=En(e,n,t,r),o=vi(i,t,r);for(;o;){const l=Qc(e,n,o,t,r);if(!l)return;n=l.chosen,i=l.tokens,o=l.mistake}return i}function Ii(e,n,t,r){let i=t,o=-1;for(;++o<e.length;){const l=e[o];if(typeof l=="string"){i="";continue}const a=o===e.length-1?r:"",c=l.sequences.find(function(s){const f=s.charAt(0);return f!==i.charAt(0)&&f!==a.charAt(0)||e.length===1&&Ai.has(f)&&s.length>t.length})||l.sequences[0];c!==l.sequences[0]&&n.set(l,c),Ii(l.children,n,c,c),i=c}}function En(e,n,t,r){const i=[];let o,l=Me(t),a=-1;for(;++a<e.length;){const c=e[a];if(typeof c=="string"){const k={value:c,attention:void 0};o&&o===dn(c)&&an([k],!0),o=void 0,i.push(k),k.value&&(l=Me(k.value));continue}const s=n.get(c)||c.sequences[0],f=s.charAt(0),u=e[a+1],p=l,h=dn(u===void 0?r:typeof u=="string"?u:n.get(u)||u.sequences[0]),m=En(c.children,n,s,s),x=m[0].value,S=Ar(p.charCodeAt(p.length-1),x.charCodeAt(0),f);S.inside&&an(m,!0);const y=Me(m[m.length-1].value),b=Ar(h.charCodeAt(0),y.charCodeAt(y.length-1),f);b.inside&&an(m,!1),S.outside&&p!==`
35
+ `&&p!=="\r"&&an(i,!1),b.outside&&(o=h),i.push({value:s,attention:c},...m,{value:s,attention:c}),l=s.charAt(s.length-1)}return i}function Tn(e,n,t){const r=new Map;Ii(e,r,n,t);const i=(r.size>0?vr(e,r,n,t):void 0)||vr(e,new Map,n,t)||En(e,new Map,n,t);let o="";for(const l of i)o+=l.value;return o}It.attention=zi;It.peek=Gc;function It(e,n,t,r){const i=t.enter("phrasing"),o=vt(e,zi,t,t.createTracker(r)),l=o?Tn([o],r.before,r.after):"";return i(),l}function zi(e,n){return{construct:"emphasis",markers:$c(n)==="*"?["*","_"]:["_","*"],sizes:[1]}}function Gc(e,n,t){return t.options.emphasis||"*"}function Jc(e,n){let t=!1;return Cn(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Ye}),!!((!e.depth||e.depth<3)&&yn(e)&&(n.options.setext||t))}function Zc(e,n,t,r){const i=Math.max(Math.min(6,e.depth||1),1),o=t.createTracker(r);if(Jc(e,t)){const u=t.enter("headingSetext"),p=t.enter("phrasing"),h=t.containerPhrasing(e,{...o.current(),before:`
36
+ `,after:`
37
+ `});return p(),u(),h+`
38
+ `+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
39
+ `))+1))}const l="#".repeat(i),a=t.enter("headingAtx"),c=t.enter("phrasing");o.move(l+" ");let s=t.containerPhrasing(e,{before:"# ",after:`
40
+ `,...o.current()});const f=s.charCodeAt(0);return(f===9||f===32)&&(s=Ti(f)+s.slice(1)),s=s?l+" "+s:l,t.options.closeAtx&&(s+=" "+l),c(),a(),s}Pi.peek=ef;function Pi(e){return e.value||""}function ef(){return"<"}Li.peek=nf;function Li(e,n,t,r){const i=At(t),o=i==='"'?"Quote":"Apostrophe",l=t.enter("image");let a=t.enter("label");const c=t.createTracker(r);let s=c.move("![");return s+=c.move(t.safe(e.alt,{before:s,after:"]",...c.current()})),s+=c.move("]("),a(),!e.url&&e.title||/^<|[\0- \u007F]/.test(e.url)?(a=t.enter("destinationLiteral"),s+=c.move("<"),s+=c.move(t.safe(e.url,{before:s,after:">",...c.current()})),s+=c.move(">")):(a=t.enter("destinationRaw"),s+=c.move(t.safe(e.url,{before:s,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=t.enter(`title${o}`),s+=c.move(" "+i),s+=c.move(t.safe(e.title,{before:s,after:i,...c.current()})),s+=c.move(i),a()),s+=c.move(")"),l(),s}function nf(){return"!"}Di.peek=tf;function Di(e,n,t,r){const i=e.referenceType,o=t.enter("imageReference");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("![");const s=t.safe(e.alt,{before:c,after:"]",...a.current()});c+=a.move(s+"]["),l();const f=t.stack;t.stack=f.filter(function(p){return p!=="phrasing"}),l=t.enter("reference");const u=t.safe(t.associationId(e),{before:c,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!s||s!==u?c+=a.move(u+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function tf(){return"!"}Fi.peek=rf;function Fi(e,n,t){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){const l=t.unsafe[o],a=t.compilePattern(l);if(!l.atBreak)continue;let c;for(;c=a.exec(r);){let s=c.index;r.charCodeAt(s)===10&&r.charCodeAt(s-1)===13&&s--,r=r.slice(0,s)+" "+r.slice(c.index+1)}}return i+r+i}function rf(){return"`"}function _i(e,n){const t=yn(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][+\-.a-z]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Ri.peek=lf;function Ri(e,n,t,r){const i=At(t),o=i==='"'?"Quote":"Apostrophe",l=t.createTracker(r);if(_i(e,t)){const m=t.stack;t.stack=m.filter(function(y){return y!=="phrasing"});const x=t.enter("autolink");let S=l.move("<");return S+=l.move(t.containerPhrasing(e,{before:S,after:">",...l.current()})),S+=l.move(">"),x(),t.stack=m,S}const a=t.enter("link");let c=t.enter("label"),s=l.move("[");const f=t.containerPhrasing(e,{before:s,after:"](",...l.current()});s+=l.move(f),c(),s+=l.move("](");const u=/^<|[\0- \u007F]/.test(e.url),p=r.before.charAt(r.before.length-1);let h=e.title||void 0;if(!h&&!u&&(p===`
41
+ `||p==="\r")){let m=0;for(;m<f.length&&f.charCodeAt(m)!==93;)m+=f.charCodeAt(m)===92?2:1;f.charCodeAt(m+1)===58&&(h="")}return!e.url&&typeof h=="string"||u?(c=t.enter("destinationLiteral"),s+=l.move("<"),s+=l.move(t.safe(e.url,{before:s,after:">",...l.current()})),s+=l.move(">")):(c=t.enter("destinationRaw"),s+=l.move(t.safe(e.url,{before:s,after:typeof h=="string"?" ":")",...l.current()}))),c(),typeof h=="string"&&(c=t.enter(`title${o}`),s+=l.move(" "+i),s+=l.move(t.safe(h,{before:s,after:i,...l.current()})),s+=l.move(i),c()),s+=l.move(")"),a(),s}function lf(e,n,t){return _i(e,t)?"<":"["}Mi.peek=of;function Mi(e,n,t,r){const i=e.referenceType,o=t.enter("linkReference");let l=t.enter("label");const a=t.createTracker(r);let c=a.move("[");const s=t.containerPhrasing(e,{before:c,after:"]",...a.current()});c+=a.move(s+"]["),l();const f=t.stack;t.stack=f.filter(function(p){return p!=="phrasing"}),l=t.enter("reference");const u=t.safe(t.associationId(e),{before:c,after:"]",...a.current()});return l(),t.stack=f,o(),i==="full"||!s||s!==u?c+=a.move(u+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function of(){return"["}function zt(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function af(e){const n=zt(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function sf(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Ni(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function uf(e,n,t,r){const i=t.enter("list"),o=t.bulletCurrent;let l=e.ordered?sf(t):zt(t);const a=e.ordered?l==="."?")":".":af(t);let c=n&&t.bulletLastUsed?l===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(c=!0),Ni(t)===l&&f){let u=-1;for(;++u<e.children.length;){const p=e.children[u];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(l=a),t.bulletCurrent=l;const s=t.containerFlow(e,r);return t.bulletLastUsed=l,t.bulletCurrent=o,i(),s}function cf(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function ff(e,n,t,r){const i=cf(t);let o=t.bulletCurrent||zt(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(l=Math.ceil(l/4)*4);const a=t.createTracker(r);a.move(o+" ".repeat(l-o.length)),a.shift(l);const c=t.enter("listItem"),s=t.indentLines(t.containerFlow(e,a.current()),f);return c(),s;function f(u,p,h){return p?(h?"":" ".repeat(l))+u:(h?o:o+" ".repeat(l-o.length))+u}}function hf(e,n,t,r){const i=t.enter("paragraph"),o=t.enter("phrasing"),l=t.containerPhrasing(e,r);return o(),i(),l}function pf(e,n,t,r){if(!e.children.some(function(a){return _c(a)}))return t.containerFlow(e,r);const o=t.enter("phrasing"),l=t.containerPhrasing(e,r);return o(),l}function mf(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}Pt.attention=Oi;Pt.peek=df;function Pt(e,n,t,r){const i=t.enter("phrasing"),o=vt(e,Oi,t,t.createTracker(r)),l=o?Tn([o],r.before,r.after):"";return i(),l}function Oi(e,n){return{construct:"strong",markers:mf(n)==="*"?["*","_"]:["_","*"],sizes:[2]}}function df(e,n,t){return t.options.strong||"*"}function gf(e,n,t,r){const i=n?n.children:[],o=t.indexStack[t.indexStack.length-1];return t.safe(e.value,{...r,afterNode:i[o+1],beforeNode:i[o-1]})}function xf(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function yf(e,n,t){const r=(Ni(t)+(t.options.ruleSpaces?" ":"")).repeat(xf(t));return t.options.ruleSpaces?r.slice(0,-1):r}const st={blockquote:Rc,break:Tr,code:qc,definition:Hc,emphasis:It,hardBreak:Tr,heading:Zc,html:Pi,image:Li,imageReference:Di,inlineCode:Fi,link:Ri,linkReference:Mi,list:uf,listItem:ff,paragraph:hf,root:pf,strong:Pt,text:gf,thematicBreak:yf};function kf(){return{enter:{table:bf,tableData:Ir,tableHeader:Ir,tableRow:Sf},exit:{codeText:Cf,table:wf,tableData:Wn,tableHeader:Wn,tableRow:Wn}}}function bf(e){const n=e._align;this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[],position:void 0},e),this.data.inTable=!0}function wf(e){this.exit(e),this.data.inTable=void 0}function Sf(e){this.enter({type:"tableRow",children:[],position:void 0},e)}function Wn(e){this.exit(e)}function Ir(e){this.enter({type:"tableCell",children:[],position:void 0},e)}function Cf(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Ef));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Ef(e,n){return n==="|"?n:e}function Tf(e){const n=e||{},{tableCellPadding:t,tablePipeAlign:r,stringLength:i}=n,o=t?" ":"|";return{handlers:{inlineCode:p,table:l,tableCell:c,tableRow:a},join:[Af],unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
42
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}]};function l(h,m,x,S){const y=f(h,x,S),b=y[0];if(b){let k=h.align?h.align.length:0,T=-1;if(!k)for(;++T<y.length;)y[T].length>k&&(k=y[T].length);for(;b.length<k;)b.push("")}return s(y,h.align)}function a(h,m,x,S){const y=u(h,x,S),b=s([y]);return b.slice(0,b.indexOf(`
43
+ `))}function c(h,m,x,S){const y=x.enter("tableCell"),b=x.enter("phrasing"),k=x.containerPhrasing(h,{...S,before:o,after:o});return b(),y(),k}function s(h,m){return Dc(h,{align:m,alignDelimiters:r,fillRows:!1,padding:t,stringLength:i})}function f(h,m,x){const{children:S}=h;let y=-1;const b=[],k=m.enter("table");for(;++y<S.length;)b[y]=u(S[y],m,x);return k(),b}function u(h,m,x){const{children:S}=h;let y=-1;const b=[],k=m.enter("tableRow");for(;++y<S.length;)b[y]=c(S[y],h,m,x);return k(),b}function p(h,m,x){const S=st.inlineCode(h,m,x);if(!x.stack.includes("tableCell"))return S;const y=[];let b=0,k=S.indexOf("|");for(;k!==-1;){let T=k;for(;T>b&&S.charCodeAt(T-1)===92;)T--;y.push(S.slice(b,k)),(k-T)%2===0&&y.push("\\"),b=k,k=S.indexOf("|",k+1)}return y.push(S.slice(b)),y.join("")}}function Af(e,n,t,r){if(e.type==="table"&&t.type==="listItem"&&t.spread===!1&&(n.type==="definition"||n.type==="heading"&&vf(n,r)||n.type==="paragraph"||n.type==="table"))return 1}function vf(e,n){let t=!1;return Cn(e,function(r){if(r.type==="break"||"value"in r&&/\r?\n|\r/.test(r.value))return t=!0,Ye}),!!((!e.depth||e.depth<3)&&yn(e)&&(n.options.setext||t))}function If(){return{exit:{taskListCheckValueChecked:zr,taskListCheckValueUnchecked:zr,paragraph:Pf}}}function zf(){return{handlers:{paragraph:Lf},join:[Df]}}function zr(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Pf(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];t.type;const r=t.children[0];if(r&&r.type==="text"){const i=n.children;let o=-1,l;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){l=a;break}}l===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start={...r.position.start}))}}this.exit(e)}function Lf(e,n,t,r){if(!n||n.type!=="listItem"||Bi(n)!==e)return st.paragraph(e,n,t,r);const i="["+(n.checked?"x":" ")+"] ",o=t.createTracker(r);o.move(i);const l=st.paragraph(e.children.length>0?e:{type:"paragraph",children:[{type:"text",value:" "}]},n,t,{...r,...o.current()});return i+l}function Df(e,n,t){if(!(e.type==="definition"&&t.type==="listItem"))return;const r=Bi(t);if(r&&t.children.indexOf(e)<t.children.indexOf(r))return 0}function Bi(e){if(typeof e.checked=="boolean")for(const n of e.children){if(n.type==="paragraph")return n;if(n.type!=="definition")return}}function Ff(){return[Gu(),wc(),Tc(),kf(),If()]}function _f(e){return{extensions:[Ju(),Sc(e),Ac(),Tf(e),zf()]}}const Rf={tokenize:qf,partial:!0},ji={tokenize:Uf,partial:!0},qi={tokenize:Hf,partial:!0},Ui={tokenize:$f,partial:!0},Mf={tokenize:Vf,partial:!0},Hi={name:"wwwAutolink",tokenize:Bf,previous:Vi},$i={name:"protocolAutolink",tokenize:jf,previous:Wi},ke={name:"emailAutolink",tokenize:Of,previous:Qi},de={};function Nf(){return{text:de}}let Te=48;for(;Te<123;)de[Te]=ke,Te++,Te===58?Te=65:Te===91&&(Te=97);de[43]=ke;de[45]=ke;de[46]=ke;de[95]=ke;de[72]=[ke,$i];de[104]=[ke,$i];de[87]=[ke,Hi];de[119]=[ke,Hi];function Of(e,n,t){const r=this;let i,o;return l;function l(u){return!ut(u)||!Qi.call(r,r.previous)||Lt(r.events)?t(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(u))}function a(u){return ut(u)?(e.consume(u),a):u===64?(e.consume(u),c):t(u)}function c(u){return u===46?e.check(Mf,f,s)(u):u===45||u===95||Z(u)?(o=!0,e.consume(u),c):f(u)}function s(u){return e.consume(u),i=!0,c}function f(u){return o&&i&&J(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(u)):t(u)}}function Bf(e,n,t){const r=this;return i;function i(l){return l!==87&&l!==119||!Vi.call(r,r.previous)||Lt(r.events)?t(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Rf,e.attempt(ji,e.attempt(qi,o),t),t)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(l)}}function jf(e,n,t){const r=this;let i="",o=!1;return l;function l(u){return(u===72||u===104)&&Wi.call(r,r.previous)&&!Lt(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(u),e.consume(u),a):t(u)}function a(u){if(J(u)&&i.length<5)return i+=String.fromCodePoint(u),e.consume(u),a;if(u===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(u),c}return t(u)}function c(u){return u===47?(e.consume(u),o?s:(o=!0,c)):t(u)}function s(u){return u===null||fn(u)||Q(u)||ze(u)||Ze(u)?t(u):e.attempt(ji,e.attempt(qi,f),t)(u)}function f(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(u)}}function qf(e,n,t){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):t(l)}function o(l){return l===null?t(l):n(l)}}function Uf(e,n,t){let r,i,o;return l;function l(s){return s===46||s===95?e.check(Ui,c,a)(s):s===null||Q(s)||ze(s)||s!==45&&Ze(s)?c(s):(o=!0,e.consume(s),l)}function a(s){return s===95?r=!0:(i=r,r=void 0),e.consume(s),l}function c(s){return i||r||!o?t(s):n(s)}}function Hf(e,n){let t=0,r=0;return i;function i(l){return l===40?(t++,e.consume(l),i):l===41&&r<t?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Ui,n,o)(l):l===null||Q(l)||ze(l)?n(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function $f(e,n,t){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||Q(a)||ze(a)?n(a):t(a)}function i(a){return a===null||a===40||a===91||Q(a)||ze(a)?n(a):r(a)}function o(a){return J(a)?l(a):t(a)}function l(a){return a===59?(e.consume(a),r):J(a)?(e.consume(a),l):t(a)}}function Vf(e,n,t){return r;function r(o){return e.consume(o),i}function i(o){return Z(o)?t(o):n(o)}}function Vi(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Q(e)}function Wi(e){return!J(e)}function Qi(e){return!(e===47||ut(e))}function ut(e){return e===43||e===45||e===46||e===95||Z(e)}function Lt(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Wf={tokenize:eh,partial:!0};function Qf(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gf,continuation:{tokenize:Jf},exit:Zf}},text:{91:{name:"gfmFootnoteCall",tokenize:Xf},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Kf,resolveTo:Yf}}}}function Kf(e,n,t){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){l=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return a;function a(c){if(!l||!l._balanced)return t(c);const s=he(r.sliceSerialize({start:l.end,end:r.now()}));return s.codePointAt(0)!==94||!o.includes(s.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function Yf(e,n){let t=e.length;for(;t--;)if(e[t][1].type==="labelImage"&&e[t][0]==="enter"){e[t][1];break}e[t+1][1].type="data",e[t+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",i,n],["exit",i,n],["enter",o,n],["enter",l,n],["exit",l,n],["exit",o,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...a),e}function Xf(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return a;function a(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?t(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",s)}function s(u){if(o>999||u===93&&!l||u===null||u===91||Q(u))return t(u);if(u===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(he(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(u)}return Q(u)||(l=!0),o++,e.consume(u),u===92?f:s}function f(u){return u===91||u===92||u===93?(e.consume(u),o++,s):s(u)}}function Gf(e,n,t){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,a;return c;function c(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),s}function s(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(m)}function f(m){if(l>999||m===93&&!a||m===null||m===91||Q(m))return t(m);if(m===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return o=he(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Q(m)||(a=!0),l++,e.consume(m),m===92?u:f}function u(m){return m===91||m===92||m===93?(e.consume(m),l++,f):f(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),U(e,h,"gfmFootnoteDefinitionWhitespace")):t(m)}function h(m){return n(m)}}function Jf(e,n,t){return e.check(en,n,e.attempt(Wf,n,t))}function Zf(e){e.exit("gfmFootnoteDefinition")}function eh(e,n,t){const r=this;return U(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?n(o):t(o)}}function nh(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,a){let c=-1;for(;++c<l.length;)if(l[c][0]==="enter"&&l[c][1].type==="strikethroughSequenceTemporary"&&l[c][1]._close){let s=c;for(;s--;)if(l[s][0]==="exit"&&l[s][1].type==="strikethroughSequenceTemporary"&&l[s][1]._open&&l[c][1].end.offset-l[c][1].start.offset===l[s][1].end.offset-l[s][1].start.offset){l[c][1].type="strikethroughSequence",l[s][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},l[s][1].start),end:Object.assign({},l[c][1].end)},u={type:"strikethroughText",start:Object.assign({},l[s][1].end),end:Object.assign({},l[c][1].start)},p=[["enter",f,a],["enter",l[s][1],a],["exit",l[s][1],a],["enter",u,a]],h=a.parser.constructs.insideSpan.null;h&&fe(p,p.length,0,kn(h,l.slice(s+1,c),a)),fe(p,p.length,0,[["exit",u,a],["enter",l[c][1],a],["exit",l[c][1],a],["exit",f,a]]),fe(l,s-1,c-s+3,p),c=s+p.length-2;break}}for(c=-1;++c<l.length;)l[c][1].type==="strikethroughSequenceTemporary"&&(l[c][1].type="data");return l}function o(l,a,c){const s=this.previous,f=this.events;let u=0;return p;function p(m){return s===126&&f[f.length-1][1].type!=="characterEscape"?c(m):(l.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const x=Se(s);if(m===126)return u>1?c(m):(l.consume(m),u++,h);if(u<2&&!t)return c(m);const S=l.exit("strikethroughSequenceTemporary"),y=Se(m);return S._open=!y||y===2&&!!x,S._close=!x||x===2&&!!y,a(m)}}}class th{constructor(){this.map=[],this.index=new Map}add(n,t,r){rh(this,n,t,r)}consume(n){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let i=r.pop();for(;i;){for(const o of i)n.push(o);i=r.pop()}this.map.length=0,this.index.clear()}}function rh(e,n,t,r){if(t===0&&r.length===0)return;const i=e.index.get(n);if(i){i[1]+=t,i[2].push(...r);return}const o=[n,t,r];e.map.push(o),e.index.set(n,o)}function ih(e,n){let t=!1;const r=[];for(;n<e.length;){const i=e[n];if(t){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function lh(){return{flow:{null:{name:"table",tokenize:oh,resolveAll:ah}}}}function oh(e,n,t){const r=this;let i=0,o=0,l;return a;function a(w){let z=r.events.length-1;for(;z>-1;){const{type:$}=r.events[z][1];if($==="lineEnding"||$==="linePrefix")z--;else break}const D=z>-1?r.events[z][1].type:null,q=D==="tableHead"||D==="tableRow"?C:c;return q===C&&r.parser.lazy[r.now().line]?t(w):q(w)}function c(w){return e.enter("tableHead"),e.enter("tableRow"),s(w)}function s(w){return w===124||(l=!0,o+=1),f(w)}function f(w){return w===null?t(w):F(w)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),h):t(w):B(w)?U(e,f,"whitespace")(w):(o+=1,l&&(l=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),l=!0,f):(e.enter("data"),u(w)))}function u(w){return w===null||w===124||Q(w)?(e.exit("data"),f(w)):(e.consume(w),w===92?p:u)}function p(w){return w===92||w===124?(e.consume(w),u):u(w)}function h(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(w):(e.enter("tableDelimiterRow"),l=!1,B(w)?U(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):m(w))}function m(w){return w===45||w===58?S(w):w===124?(l=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),x):P(w)}function x(w){return B(w)?U(e,S,"whitespace")(w):S(w)}function S(w){return w===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),y):w===45?(o+=1,y(w)):w===null||F(w)?T(w):P(w)}function y(w){return w===45?(e.enter("tableDelimiterFiller"),b(w)):P(w)}function b(w){return w===45?(e.consume(w),b):w===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(w))}function k(w){return B(w)?U(e,T,"whitespace")(w):T(w)}function T(w){return w===124?m(w):w===null||F(w)?!l||i!==o?P(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(w)):P(w)}function P(w){return t(w)}function C(w){return e.enter("tableRow"),L(w)}function L(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),L):w===null||F(w)?(e.exit("tableRow"),n(w)):B(w)?U(e,L,"whitespace")(w):(e.enter("data"),_(w))}function _(w){return w===null||w===124||Q(w)?(e.exit("data"),L(w)):(e.consume(w),w===92?H:_)}function H(w){return w===92||w===124?(e.consume(w),_):_(w)}}function ah(e,n){let t=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],a=!1,c=0,s,f,u;const p=new th;for(;++t<e.length;){const h=e[t],m=h[1];h[0]==="enter"?m.type==="tableHead"?(a=!1,c!==0&&(Pr(p,n,c,s,f),f=void 0,c=0),s={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(t,0,[["enter",s,n]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,u=void 0,o=[0,0,0,0],l=[0,t+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(t,0,[["enter",f,n]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],u=sn(p,n,o,i,void 0,u),o=[0,0,0,0]),l[2]=t)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],u=sn(p,n,o,i,void 0,u)),o=l,l=[o[1],t,0,0])):m.type==="tableHead"?(a=!0,c=t):m.type==="tableRow"||m.type==="tableDelimiterRow"?(c=t,o[1]!==0?(l[0]=l[1],u=sn(p,n,o,i,t,u)):l[1]!==0&&(u=sn(p,n,l,i,t,u)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(l[3]=t)}for(c!==0&&Pr(p,n,c,s,f),p.consume(n.events),t=-1;++t<n.events.length;){const h=n.events[t];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=ih(n.events,t))}return e}function sn(e,n,t,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";t[0]!==0&&(o.end=Object.assign({},Re(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const c=Re(n.events,t[1]);if(o={type:l,start:Object.assign({},c),end:Object.assign({},c)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const s=Re(n.events,t[2]),f=Re(n.events,t[3]),u={type:a,start:Object.assign({},s),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",u,n]]),r!==2){const p=n.events[t[2]],h=n.events[t[3]];if(p[1].end=Object.assign({},h[1].end),p[1].type="chunkText",p[1].contentType="text",t[3]>t[2]+1){const m=t[2]+1,x=t[3]-t[2]-1;e.add(m,x,[])}}e.add(t[3]+1,0,[["exit",u,n]])}return i!==void 0&&(o.end=Object.assign({},Re(n.events,i)),e.add(i,0,[["exit",o,n]]),o=void 0),o}function Pr(e,n,t,r,i){const o=[],l=Re(n.events,t);i&&(i.end=Object.assign({},l),o.push(["exit",i,n])),r.end=Object.assign({},l),o.push(["exit",r,n]),e.add(t+1,0,o)}function Re(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const sh={name:"tasklistCheck",tokenize:ch};function uh(){return{text:{91:sh}}}function ch(e,n,t){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?t(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return Q(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),l):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),l):t(c)}function l(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):t(c)}function a(c){return F(c)?n(c):B(c)?e.check({tokenize:fh},n,t)(c):t(c)}}function fh(e,n,t){return U(e,r,"whitespace");function r(i){return i===null?t(i):n(i)}}function hh(e){return Jr([Nf(),Qf(),nh(e),lh(),uh()])}const ph={};function mh(e){const n=this,t=e||ph,r=n.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(hh(t)),o.push(Ff()),l.push(_f(t))}const dh={img:({alt:e})=>e?I.jsx("span",{children:e}):null,a:({node:e,...n})=>I.jsx("a",{...n,target:"_blank",rel:"noreferrer noopener",className:"text-gold underline decoration-gold/40 underline-offset-2 hover:decoration-gold"}),code:({node:e,className:n,...t})=>I.jsx("code",{...t,className:ye("rounded-md bg-panel-2 px-1.5 py-0.5 font-mono text-[0.85em]",n)}),pre:({node:e,...n})=>I.jsx("pre",{...n,className:"overflow-x-auto rounded-xl border border-line bg-panel p-4 font-mono text-sm [&_code]:bg-transparent [&_code]:p-0"})};function gh({children:e,className:n}){return I.jsx("div",{className:ye("space-y-3 [&_li]:my-1 [&_ol]:list-decimal [&_ol]:pl-5 [&_strong]:font-semibold [&_strong]:text-ink [&_ul]:list-disc [&_ul]:pl-5",n),children:I.jsx(Bu,{remarkPlugins:[mh,Xu],components:dh,children:e})})}const xh=V.memo(gh);function Ki({className:e,...n}){return I.jsx("div",{className:ye("flex gap-3",e),...n})}function yh({children:e,className:n}){return I.jsx(xh,{className:ye("min-w-0 break-words text-[15px] leading-relaxed text-ink/90",n),children:e})}function kh({className:e,variant:n="outline",size:t="sm",...r}){const{isAtBottom:i,scrollToBottom:o}=Nr();return I.jsx(Xe,{variant:n,size:t,className:ye("h-10 w-10 rounded-full transition-all duration-150 ease-out",i?"pointer-events-none translate-y-4 scale-95 opacity-0":"translate-y-0 scale-100 opacity-100",e),onClick:()=>o(),tabIndex:i?-1:void 0,"aria-hidden":i||void 0,...r,children:I.jsx(ol,{className:"h-5 w-5"})})}function bh(e,n){if(n==="local")return e.t("assistant.brainLocal");const t={openai:"OpenAI",google:"Google Gemini",openrouter:"OpenRouter"};return n?e.t("assistant.brainCloud",{service:t[n]}):""}function ve(e){return I.jsxs(Ki,{className:"rise-in gap-3.5",children:[I.jsx("div",{"aria-hidden":"true",className:ye("grid size-8 shrink-0 place-items-center rounded-[10px] max-md:hidden",e.mark&&"border border-line bg-panel"),children:e.mark&&I.jsx(_r,{crack:"var(--panel)",className:"h-[18px]"})}),I.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-3.5",children:e.children})]})}function ct(e){const{turn:n}=e;return I.jsx("div",{className:ye("grid gap-3.5",n.jobs.length>1?"grid-cols-2":"max-w-xl"),children:n.jobs.map((t,r)=>I.jsx(pl,{index:r,job:t,prompt:n.prompt,model:e.models.get(t.modelId),onOpen:e.onOpen,onUseAsReference:e.onUseAsReference},t.id))})}function wh(e){const n=ft(),{t}=n,r=e.entry.confirm;if(!r)return null;const i=Qn(n,r.usd),o=r.modelNames.join(", ");return r.state==="declined"?I.jsx("p",{className:"text-sm text-dim",children:t("assistant.declined",{models:o})}):r.state==="approved"?I.jsx("p",{className:"text-sm text-dim",children:t("assistant.approved",{models:o,cost:i})}):I.jsxs("div",{className:"flex max-w-xl flex-col gap-3 rounded-[18px] border border-line-strong bg-panel p-4",children:[I.jsx("p",{className:"leading-relaxed",children:t("assistant.confirm",{models:o,cost:i})}),I.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[I.jsx(Xe,{variant:"aurora",disabled:e.busy,onClick:()=>e.onAnswer(!0),className:"h-11",children:t("assistant.pay",{cost:i})}),I.jsx(Xe,{variant:"outline",disabled:e.busy,onClick:()=>e.onAnswer(!1),className:"h-11",children:t("assistant.freeOnly")})]})]})}function Sh(e){const n=ft(),{t}=n,{entry:r}=e,{message:i}=r;if(r.error)return I.jsx(ve,{children:I.jsx("p",{className:"text-sm leading-relaxed text-danger",children:n.explain(r.error)})});if(r.note)return I.jsx(ve,{children:I.jsx("p",{className:"font-mono text-xs text-dim",children:r.note==="stopped"?t("assistant.stopped"):t("assistant.tooManySteps")})});if(i.role==="user"){const l=i.content.map(a=>a.type==="text"?a.text:"").join(`
44
+ `);return I.jsx(Ki,{className:"rise-in justify-end",children:I.jsx("p",{className:"max-w-[82%] whitespace-pre-wrap break-words rounded-[18px] rounded-br-md border border-line bg-panel-2 px-4 py-2.5 leading-relaxed md:max-w-[70%] md:rounded-[20px] md:rounded-br-md md:px-[18px] md:py-3",children:l})})}if(i.role==="assistant")return i.text?I.jsx(ve,{mark:!0,children:I.jsx(yh,{className:"pt-1 text-[#e4e4e7]",children:i.text})}):null;const o=r.turnId?e.turns.get(r.turnId):void 0;return r.confirm?I.jsxs(ve,{children:[I.jsx(wh,{entry:r,busy:e.answering,onAnswer:l=>e.onAnswer(r,l)}),o&&I.jsx(ct,{turn:o,models:e.models,onOpen:e.onOpen,onUseAsReference:e.onUseAsReference})]}):o?I.jsx(ve,{children:I.jsx(ct,{turn:o,models:e.models,onOpen:e.onOpen,onUseAsReference:e.onUseAsReference})}):null}function Ah({sessionId:e,addReference:n}){var z,D,q,$,j,X;const t=ft(),{t:r}=t,i=al(),o=V.useId(),[l,a]=V.useState(""),[c,s]=V.useState(null),f=tn({queryKey:["assistant-brain"],queryFn:Ee.assistant}),u=tn({queryKey:["models"],queryFn:Ee.models}),p=tn({queryKey:["assistant",e],queryFn:()=>Ee.assistantView(e),enabled:e!=null}),h=tn({queryKey:["session",e],queryFn:()=>Ee.session(e),enabled:e!=null}),m=In({mutationFn:R=>Ee.sendToAssistant({sessionId:e,text:R,language:t.language}),onSuccess:({sessionId:R})=>{a(""),i.invalidateQueries({queryKey:["assistant",R]}),i.invalidateQueries({queryKey:["sessions"]}),e||ml(Bt.talk(R))}}),x=In({mutationFn:()=>Ee.stopAssistant(e)}),S=In({mutationFn:R=>Ee.answerAssistant(e,{...R,language:t.language}),onSettled:()=>i.invalidateQueries({queryKey:["assistant",e]})}),y=((z=p.data)==null?void 0:z.entries)??[],b=((D=p.data)==null?void 0:D.busy)??!1,k=new Map((q=u.data)==null?void 0:q.map(R=>[R.id,R])),T=new Map(($=h.data)==null?void 0:$.turns.map(R=>[R.id,R])),P=(j=p.data)!=null&&j.turnId&&!y.some(R=>{var ee;return R.turnId===((ee=p.data)==null?void 0:ee.turnId)})?T.get(p.data.turnId):void 0,C=b&&!P,L=f.data&&f.data.brain==null,_=bh(t,((X=f.data)==null?void 0:X.brain)??null),H=()=>{const R=l.trim();!R||b||m.isPending||m.mutate(R)},w=p.error??h.error;return I.jsxs("div",{className:"flex min-h-0 flex-1 flex-col bg-[radial-gradient(60%_40%_at_70%_-10%,rgb(255_61_139/0.10),transparent_70%)]",children:[I.jsxs(Sl,{className:"relative min-h-0 flex-1 overflow-hidden",children:[I.jsxs(Cl,{className:"mx-auto max-w-[780px] gap-[18px] px-4 py-5 md:gap-7 md:px-10 md:py-9",children:[!e&&I.jsxs("div",{className:"rise-in flex flex-col items-start gap-4 py-10 md:py-16",children:[I.jsx(_r,{className:"h-12"}),I.jsx("p",{className:"font-mono text-[11px] tracking-[0.18em] text-dim uppercase",children:r("assistant.eyebrow")}),I.jsx("h1",{className:"font-display text-[44px] leading-[0.95] font-extrabold tracking-[-0.03em] text-balance md:text-6xl",children:r("assistant.heading")}),I.jsx("p",{className:"max-w-xl text-[17px] leading-relaxed text-soft",children:r("assistant.intro")})]}),w&&I.jsx("p",{className:"text-sm text-danger",children:t.explain(w)}),y.map(R=>I.jsx(Sh,{entry:R,turns:T,models:k,answering:S.isPending||b||p.isFetching,onAnswer:(ee,se)=>S.mutate({entryId:ee.id,approve:se}),onOpen:s,onUseAsReference:n},R.id)),P&&I.jsx(ve,{children:I.jsx(ct,{turn:P,models:k,onOpen:s,onUseAsReference:n})}),C&&I.jsx(ve,{children:I.jsxs("p",{className:"flex items-center gap-2.5 pt-1.5 text-sm text-dim","aria-live":"polite",children:[I.jsx("i",{"aria-hidden":"true",className:"breathe size-2 rounded-full bg-orange shadow-[0_0_12px_var(--orange)]"}),r("assistant.thinking")]})}),S.error&&I.jsx("p",{className:"text-sm text-danger",children:t.explain(S.error)})]}),I.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-3 flex justify-center",children:I.jsx(kh,{"aria-label":r("assistant.latest"),className:"pointer-events-auto border-line-strong bg-panel-2 shadow-lg dark:bg-panel-2"})})]}),I.jsx("div",{className:"shrink-0 px-3 pt-2 pb-2.5 md:px-10 md:pt-4 md:pb-6",children:I.jsxs("div",{className:"mx-auto flex max-w-[780px] flex-col gap-2.5",children:[L?I.jsxs("p",{className:"rounded-[18px] border border-line bg-panel p-4 text-sm leading-relaxed text-soft",children:[r("assistant.noBrain")," ",I.jsx("a",{href:Bt.settings,className:"rounded-sm text-gold underline decoration-gold/40 underline-offset-2 outline-none hover:decoration-gold focus-visible:ring-3 focus-visible:ring-ring/50",children:r("nav.settings")})]}):I.jsx("form",{onSubmit:R=>{R.preventDefault(),H()},children:I.jsxs(sl,{value:l,onValueChange:a,onSubmit:H,isLoading:b,className:"flex flex-col gap-2.5 pl-4 shadow-[0_20px_60px_rgb(0_0_0/0.5)] md:pl-[18px]",children:[I.jsx("label",{htmlFor:o,className:"sr-only",children:r("assistant.message")}),I.jsx(ul,{id:o,maxLength:4e3,placeholder:r("assistant.placeholder")}),I.jsxs(cl,{className:"justify-between gap-3",children:[_?I.jsxs("span",{className:"inline-flex min-h-[30px] min-w-0 items-center gap-2 rounded-2xl bg-panel-2 px-3 py-1 font-mono text-xs leading-snug text-[#a1a1aa]",children:[I.jsx("i",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-good"}),I.jsx("span",{children:_})]}):I.jsx("span",{}),b?I.jsxs(Xe,{type:"button",variant:"outline",onClick:R=>{R.stopPropagation(),x.mutate()},disabled:x.isPending,className:"h-10 gap-2",children:[I.jsx(fl,{className:"size-3.5 fill-current"}),r("assistant.stop")]}):I.jsx(Xe,{type:"submit",variant:"aurora",size:"icon","aria-label":r("assistant.send"),disabled:!l.trim()||m.isPending,onClick:R=>R.stopPropagation(),children:I.jsx(dl,{className:"size-[18px]",strokeWidth:2.4})})]})]})}),m.error&&I.jsx("p",{className:"text-sm text-danger",children:t.explain(m.error)}),p.data&&I.jsx("p",{className:"text-center font-mono text-xs text-dim",children:r("assistant.spent",{spent:Qn(t,p.data.spentUsd),limit:Qn(t,p.data.limitUsd)})})]})}),c&&I.jsx(hl,{item:c,onClose:()=>s(null),onUseAsReference:R=>{n(R),s(null)}})]})}export{Ah as Assistant};
@@ -0,0 +1,11 @@
1
+ import{c as N,u as F,r as n,d as M,m as L,j as a,I as S,M as _,o as f,B as A,L as C,l as j,G}from"./index-DrgBjkJQ.js";import"./index-ydGCWKys.js";/**
2
+ * @license lucide-react v1.78.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const v={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};v.node;const R=N(v);/**
7
+ * @license lucide-react v1.78.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const b={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};b.node;const B=N(b);function U({addReference:P}){var y;const{t,explain:w}=F(),[o,I]=n.useState(""),[i,k]=n.useState(""),[d,c]=n.useState(null),q=M({queryKey:["models"],queryFn:j.models}),m=n.useRef(null);n.useEffect(()=>{const e=setTimeout(()=>k(o.trim()),250);return()=>clearTimeout(e)},[o]);const l=L({queryKey:["gallery",i],queryFn:({pageParam:e})=>j.gallery(i,e),initialPageParam:void 0,getNextPageParam:e=>e.length<G?void 0:e.at(-1)}),x=((y=l.data)==null?void 0:y.pages.flat())??[],E=e=>{var r,s;return e?((s=(r=q.data)==null?void 0:r.find(z=>z.id===e))==null?void 0:s.name)??e:null},{hasNextPage:p,isFetchingNextPage:u,isFetchNextPageError:g,fetchNextPage:h}=l;return n.useEffect(()=>{const e=m.current;if(!e||!p||u||g)return;const r=new IntersectionObserver(([s])=>{s!=null&&s.isIntersecting&&h()},{rootMargin:"600px 0px"});return r.observe(e),()=>r.disconnect()},[p,u,g,h]),a.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 py-6 sm:px-8 sm:py-10",children:[a.jsxs("div",{className:"mx-auto max-w-[96rem]",children:[a.jsxs("header",{className:"flex flex-wrap items-end justify-between gap-4",children:[a.jsx("h1",{className:"font-display text-4xl leading-none font-extrabold tracking-tight sm:text-5xl",children:t("gallery.title")}),a.jsxs("div",{className:"relative w-full sm:w-80",children:[a.jsx(B,{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-dim"}),a.jsx(S,{type:"search",value:o,onChange:e=>I(e.target.value),placeholder:t("gallery.search"),"aria-label":t("gallery.search"),className:"h-11 rounded-xl bg-panel pl-9"})]})]}),l.error&&a.jsx("p",{className:"mt-6 text-sm text-danger",role:"alert",children:w(l.error)}),l.isSuccess&&x.length===0&&(i?a.jsx("p",{className:"mt-20 text-center text-dim",children:t("gallery.noMatches",{query:i})}):a.jsxs("div",{className:"scene-in mx-auto mt-20 flex max-w-md flex-col items-center gap-4 text-center",children:[a.jsx(_,{className:"h-20"}),a.jsx("h2",{className:"font-display text-3xl font-bold tracking-tight",children:t("gallery.emptyTitle")}),a.jsx("p",{className:"text-dim",children:t("gallery.empty")})]})),a.jsx("ul",{className:"mt-8 grid grid-cols-2 gap-3 sm:grid-cols-3 sm:gap-4 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6",children:x.map(e=>{const r=e.mime.startsWith("video/"),s=E(e.modelId);return a.jsx("li",{children:a.jsxs("button",{type:"button",title:e.prompt??void 0,onClick:()=>c({assetId:e.id,mime:e.mime,prompt:e.prompt,modelName:s,params:e.params,costUsd:null}),className:"group flex w-full flex-col gap-2 rounded-xl text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[r?a.jsx("video",{src:f(e.id),"aria-label":e.prompt??t("gallery.generatedVideo"),muted:!0,playsInline:!0,preload:"metadata",className:"aspect-square w-full rounded-xl bg-panel object-cover transition-opacity group-hover:opacity-85"}):a.jsx("img",{src:f(e.id),alt:e.prompt??t("common.generatedImage"),loading:"lazy",className:"aspect-square w-full rounded-xl bg-panel object-cover transition-opacity group-hover:opacity-85"}),(s||r)&&a.jsxs("span",{className:"flex items-center justify-between gap-2 px-0.5 font-mono text-xs text-dim",children:[a.jsx("span",{className:"truncate",children:s}),r&&a.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 uppercase",children:[a.jsx(R,{"aria-hidden":"true",className:"size-3"}),t("gallery.videoBadge")]})]})]})},e.id)})}),a.jsx("div",{ref:m}),l.hasNextPage&&a.jsx("div",{className:"mt-8 text-center",children:a.jsx(A,{variant:"outline",onClick:()=>l.fetchNextPage(),disabled:l.isFetchingNextPage,children:l.isFetchingNextPage?t("gallery.loading"):t("gallery.loadMore")})})]}),d&&a.jsx(C,{item:d,onClose:()=>c(null),onUseAsReference:e=>{P(e),c(null)}})]})}export{U as Gallery};