@brickkit/cli 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -1
- package/dashboard-dist/{CollapsiblePanel-DM8J3g8m.js → CollapsiblePanel-a54TwMKb.js} +1 -1
- package/dashboard-dist/{PopoverPopup-B6eMOlOC.js → PopoverPopup-BLzjTqsi.js} +1 -1
- package/dashboard-dist/{api-reference-wTdT1AVt.js → api-reference-r893F8zi.js} +2 -2
- package/dashboard-dist/app.css +1 -1
- package/dashboard-dist/app.js +13 -13
- package/dashboard-dist/core-BWAwhSFf.js +1 -0
- package/dashboard-dist/{docs-DflzpIIh.js → docs-CkMy3Y5i.js} +1 -1
- package/dashboard-dist/{preload-helper-CVJ-D494.js → preload-helper-CjQDFR0M.js} +1 -1
- package/dist/app-entry2.js +8 -1
- package/dist/app-entry2.js.map +1 -1
- package/dist/bin.js +6 -2
- package/dist/bin.js.map +1 -1
- package/dist/build.js +18 -5
- package/dist/build.js.map +1 -1
- package/dist/dev-telemetry-store.js +148 -5
- package/dist/dev-telemetry-store.js.map +1 -1
- package/dist/dev-telemetry.js.map +1 -1
- package/dist/dev-worker.js +19 -2
- package/dist/dev-worker.js.map +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/runner.js +69 -3
- package/dist/runner.js.map +1 -1
- package/dist/workflows.d.ts +61 -0
- package/dist/workflows.d.ts.map +1 -0
- package/dist/workflows.js +1 -0
- package/dist/workflows2.js +298 -0
- package/dist/workflows2.js.map +1 -0
- package/inspector-dist/LICENSE.md +201 -0
- package/inspector-dist/NOTICE +20 -0
- package/inspector-dist/client/assets/api.rpc-l0sNRNKZ.js +1 -0
- package/inspector-dist/client/assets/api.stream._streamId-l0sNRNKZ.js +1 -0
- package/inspector-dist/client/assets/app-CY7CQBRo.css +1 -0
- package/inspector-dist/client/assets/entry.client-BJ6G3n5t.js +11697 -0
- package/inspector-dist/client/assets/highlighted-body-B3W2YXNL-C-3wZnxf.js +19 -0
- package/inspector-dist/client/assets/home-CSKAS4P2.js +4979 -0
- package/inspector-dist/client/assets/index-DECCyMR0.js +4482 -0
- package/inspector-dist/client/assets/index-Dot7CgrA.js +9837 -0
- package/inspector-dist/client/assets/index-HqNj_XIX.js +200 -0
- package/inspector-dist/client/assets/manifest-4baa7c6f.js +1 -0
- package/inspector-dist/client/assets/mermaid-3ZIDBTTL-DC0K8uTy.js +58626 -0
- package/inspector-dist/client/assets/mermaid-3ZIDBTTL-F88p7PFX.css +1 -0
- package/inspector-dist/client/assets/root-Bmn5n3jF.js +305 -0
- package/inspector-dist/client/assets/root-CfCr265_.css +1 -0
- package/inspector-dist/client/assets/run-detail-CWoGxu_0.css +1 -0
- package/inspector-dist/client/assets/run-detail-Cc7tSGNq.js +6237 -0
- package/inspector-dist/client/assets/world-config-context-BAD1QCrR.js +26 -0
- package/inspector-dist/client/assets/zstd-B5R2yJjB.wasm +0 -0
- package/inspector-dist/client/assets/zstd-browser-decoder-BQoRpP7L.js +28 -0
- package/inspector-dist/server/assets/app-C-ZVJtic.js +174880 -0
- package/inspector-dist/server/assets/highlighted-body-B3W2YXNL-C8sq8F_D.js +71 -0
- package/inspector-dist/server/assets/index-BfLBLRRi.js +204 -0
- package/inspector-dist/server/assets/index-BzrGWk7J.js +1164 -0
- package/inspector-dist/server/assets/index-CWJr34WJ.js +1296 -0
- package/inspector-dist/server/assets/index-CYlmUaKx.js +191 -0
- package/inspector-dist/server/assets/mermaid-3ZIDBTTL-Dv5rjfMN.js +58 -0
- package/inspector-dist/server/assets/token-DnLp3wBO.js +95 -0
- package/inspector-dist/server/assets/token-util-Bpfp-B0w.js +33 -0
- package/inspector-dist/server/assets/wrapper-D5LIcZ_u.js +67 -0
- package/inspector-dist/server/assets/zstd-browser-decoder-BM8GpVB8.js +77 -0
- package/inspector-dist/server/index.js +58 -0
- package/package.json +11 -4
- package/dashboard-dist/core-CHWYtApw.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{$ as r,$t as i,A as a,At as o,B as s,Bt as c,Ct as l,Dt as u,Et as d,G as f,H as p,Ht as m,I as h,J as g,K as _,L as v,M as y,Mt as b,N as x,Ot as S,P as C,Q as w,Qt as T,R as E,S as D,T as O,Tt as k,U as ee,Ut as A,V as j,Wt as M,Y as N,Zt as P,_ as F,_n as I,a as te,an as ne,at as L,bt as re,c as R,cn as ie,ct as z,d as B,dn as V,en as H,f as ae,fn as U,ft as oe,g as se,gn as ce,h as le,hn as ue,ht as de,i as fe,in as pe,j as me,jt as he,k as ge,kt as _e,l as ve,ln as ye,m as be,mn as xe,mt as Se,nn as Ce,nt as we,o as Te,on as Ee,p as De,pn as Oe,pt as ke,q as Ae,rn as je,rt as Me,sn as Ne,st as Pe,t as Fe,tt as Ie,u as Le,v as Re,vt as ze,w as Be,xt as Ve,y as He,z as Ue,zt as We}from"./preload-helper-CVJ-D494.js";import{C as Ge,D as W,E as Ke,F as qe,I as Je,L as Ye,M as Xe,N as G,O as Ze,P as Qe,S as $e,T as et,_ as tt,b as nt,d as rt,f as it,i as at,k as ot,t as st,u as ct,v as lt,x as ut,y as dt}from"./CollapsiblePanel-DM8J3g8m.js";import{$ as ft,$t as pt,A as mt,B as ht,Ct as gt,D as _t,Dt as vt,E as yt,F as bt,G as xt,H as St,Ht as Ct,I as wt,Jt as Tt,K as Et,Kt as Dt,M as Ot,Mt as kt,N as At,Nt as jt,O as Mt,Ot as Nt,P as Pt,Pt as Ft,Q as It,Qt as Lt,R as Rt,St as zt,Tt as Bt,U as Vt,Ut as Ht,V as Ut,Vt as Wt,W as Gt,Wt as Kt,X as qt,Xt as Jt,Y as Yt,Yt as Xt,Z as Zt,Zt as Qt,_t as $t,a as en,at as tn,bt as nn,c as rn,ct as an,d as on,dt as sn,et as cn,f as ln,ft as un,ht as dn,i as fn,in as pn,it as mn,j as hn,jt as gn,k as _n,kt as vn,l as yn,lt as bn,m as xn,mt as Sn,n as Cn,nn as wn,nt as Tn,o as En,ot as Dn,p as On,pt as kn,q as An,qt as jn,r as Mn,rn as Nn,rt as Pn,s as Fn,st as In,t as Ln,tn as Rn,tt as zn,u as Bn,ut as Vn,vt as Hn,wt as Un,xt as Wn,y as Gn,yt as Kn,z as qn}from"./PopoverPopup-B6eMOlOC.js";var Jn={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};Jn.node;var Yn=xe(Jn),Xn={name:`braces`,size:24,node:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],aliases:[`curly-braces`]};Xn.node;var Zn=xe(Xn),Qn={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};Qn.node;var $n=xe(Qn),er={name:`cookie`,size:24,node:[[`path`,{d:`M11 17h.01`,key:`dukryu`}],[`path`,{d:`M11.496 2c.324-.016.558.292.529.615a4 4 0 004.235 4.368.713.713 0 01.758.757 4 4 0 004.366 4.237c.323-.03.63.204.614.527a10 10 0 01-2.915 6.566A1 1 0 114.93 4.918 10 10 0 0111.496 2`,key:`1x76et`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M16 16h.01`,key:`1f9h7w`}],[`path`,{d:`M16 3h.01`,key:`ll0zb8`}],[`path`,{d:`M21 4h.01`,key:`uw58yv`}],[`path`,{d:`M21 8h.01`,key:`17axm7`}],[`path`,{d:`M7 14h.01`,key:`1qa3f1`}],[`path`,{d:`M9 8h.01`,key:`1jwowd`}]]};er.node;var tr=xe(er),nr={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};nr.node;var rr=xe(nr),ir={name:`funnel-x`,size:24,node:[[`path`,{d:`M12.531 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l.427-.473`,key:`ol2ft2`}],[`path`,{d:`m16.5 3.5 5 5`,key:`15e6fa`}],[`path`,{d:`m21.5 3.5-5 5`,key:`m0lwru`}]],aliases:[`filter-x`]};ir.node;var ar=xe(ir),or={name:`funnel`,size:24,node:[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]],aliases:[`filter`]};or.node;var sr=xe(or),cr={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};cr.node;var lr=xe(cr),ur={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};ur.node;var dr=xe(ur),fr={name:`route`,size:24,node:[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]};fr.node;var pr=xe(fr),mr={name:`rows-3`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]],aliases:[`panels-top-bottom`]};mr.node;var hr=xe(mr),gr={name:`send-horizontal`,size:24,node:[[`path`,{d:`M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z`,key:`117uat`}],[`path`,{d:`M6 12h16`,key:`s4cdu5`}]],aliases:[`send-horizonal`]};gr.node;var _r=xe(gr),vr={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};vr.node;var yr=xe(vr),br={name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]};br.node;var xr=xe(br),Sr={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Sr.node;var Cr=xe(Sr),wr={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};wr.node;var Tr=xe(wr);function Er(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=h(),a=un()!=null,s=Ne(()=>new St({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new xt,floatingId:i,syncOnly:!1,nested:a})).current;return o(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=m(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),s.update(e)},[t,i,r.reference,r.floating,s]),s.context.onOpenChange=n,s.context.nested=a,s}var K=t(I(),1);function Dr(e){return Jt&&e.movementX===0&&e.movementY===0}function Or(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function kr(e,t){return Or(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Ar(e,t,n){return Or(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function jr(e,t,n){return Or(t,n?e===Ct:e===Ht,e===Wt)}function Mr(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Or(t,n?e===Ht:e===Ct,e===Kt)}function Nr(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:c=null,allowEscape:l=!1,loopFocus:d=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:v=`auto`,focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:S=`vertical`,triggerOrientation:C=S,parentOrientation:T,id:D,resetOnPointerLeave:O=!0,externalTree:k,nestedReturnFocusRef:ee,grid:j}=t,M=j!=null,N=e.useState(`open`),P=e.useState(`floatingElement`),F=e.useState(`domReferenceElement`),I=e.context.dataRef,te=vt(P),ne=Nt(F),L=_(te),R=un(),ie=kn(k),z=K.useRef(v),B=K.useRef(c??-1),V=K.useRef(null),H=K.useRef(!0),ae=he(e=>{i(B.current===-1?null:B.current,e)}),U=K.useRef(!!P),oe=K.useRef(N),se=K.useRef(!1),ce=K.useRef(!1),le=K.useRef(null),ue=_(x),de=_(N),fe=_(c),pe=_(O),me=f(),ge=f(),_e=he(()=>{me.cancel();function e(e){g||(le.current=nn(e,{sync:se.current,preventScroll:!0}))}let t=n.current[B.current],r=ce.current;t&&e(t),(se.current?e=>e():e=>me.request(e))(()=>{let i=n.current[B.current]||t;i&&(t||e(i),Ce&&(r||!H.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});o(()=>{I.current.orientation=S},[I,S]),o(()=>{N||(V.current=null),(!N||v!==`auto`)&&(z.current=v)},[N,v]),o(()=>{a&&(N&&P?(B.current=c??-1,z.current&&c!=null&&(ce.current=!0,ae())):U.current&&(B.current=-1,ae()))},[a,N,P,c,ae]),o(()=>{if(a){if(!N)se.current=!1;else if(P){if(r==null){if(se.current=!1,fe.current!=null)return;if(U.current&&(B.current=-1,_e()),(!oe.current||!U.current)&&z.current&&(V.current!=null||z.current===!0&&V.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ge.request(e):queueMicrotask)(t),e+=1):(B.current=V.current==null||Ar(V.current,C,h)||m?Ue(n):E(n),V.current=null,ae())};t()}}else p(n.current,r)||(B.current=r,_e(),ce.current=!1)}}},[a,N,P,r,fe,m,n,C,h,ae,_e,ge]),o(()=>{if(!a||P||!ie||g||!U.current)return;let e=ie.nodesRef.current,t=e.find(e=>e.id===R)?.context?.elements.floating,n=ze(u(F??t??null)),r=e.some(e=>e.context&&re(e.context.elements.floating,n));t&&!r&&H.current&&t.focus({preventScroll:!0})},[a,P,F,ie,R,g]),o(()=>{oe.current=N,U.current=!!P});let ve=r!=null,ye=he(e=>{if(!de.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(B.current!==t||r!==t)&&(B.current=t,ae(e))}),be=he(()=>T??ie?.nodesRef.current.find(e=>e.id===R)?.context?.dataRef?.current.orientation),xe=he(()=>Ue(n,ue.current)),Se=he(t=>{if(H.current=!1,se.current=!0,t.which===229||!de.current&&t.currentTarget===L.current)return;if(m&&Mr(t.key,S,h,M)){kr(t.key,be())||Tt(t),e.setOpen(!1,ke(Me,t.nativeEvent));let n=ee?.current??F;A(n)&&n.focus();return}r!=null&&r!==B.current&&!p(n.current,r)&&(B.current=r);let i=B.current,a=Ue(n,x),o=E(n,x);if(ne||(t.key===`Home`&&(Tt(t),B.current=a,ae(t)),t.key===`End`&&(Tt(t),B.current=o,ae(t))),j!=null){let e=j(t,B.current,n,S,d,h,x,a,o);if(e!=null&&e!==B.current&&(B.current=e,ae(t)),S===`both`)return}if(kr(t.key,S)){Tt(t);let e=ze(t.currentTarget.ownerDocument);if(N&&!g&&re(t.currentTarget,e)&&!n.current.some(t=>t!=null&&re(t,e))){B.current=Ar(t.key,S,h)?a:o,ae(t),r===B.current&&_e();return}let{index:c,wrapped:u}=s(n.current,i,{decrement:!Ar(t.key,S,h),loopFocus:d,allowEscape:l,disabledIndices:x,minIndex:a,maxIndex:o});u&&(se.current=!1),B.current=c,ae(t)}}),Ce=K.useMemo(()=>({onFocus(e){se.current=!0,ye(e)},onClick({currentTarget:e}){g||e.focus({preventScroll:!0})},onMouseMove(e){Dr(e)||(se.current=!0,ce.current=!1,y&&ye(e))},onPointerLeave(e){if(!de.current||!H.current||e.pointerType===`touch`)return;se.current=!0;let t=e.relatedTarget;if(y&&!n.current.includes(t)&&pe.current&&(le.current?.(),le.current=null,B.current=-1,ae(e),!g)){let e=L.current,t=ze(u(e));e&&re(e,t)&&e.focus({preventScroll:!0})}}}),[ye,de,L,y,n,ae,pe,g]),we=K.useMemo(()=>g&&N&&ve&&{"aria-activedescendant":`${D}-${r}`},[g,N,ve,D,r]),Te=K.useMemo(()=>({...ne?{}:we,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&N&&!g){let n=Ve(t.nativeEvent);if(n&&!re(L.current,n))return;Tt(t);let r=ke(w,t.nativeEvent);e.setOpen(!1,r);let i=ee?.current??F;!r.isCanceled&&A(i)&&i.focus()}else Se(t)},onPointerMove(e){Dr(e)||(H.current=!0)}}),[we,Se,L,ne,e,N,g,F,ee]),Ee=K.useMemo(()=>{function t(t){e.setOpen(!0,ke(Me,t.nativeEvent,t.currentTarget))}function n(e){v===`auto`&&Dt(e.nativeEvent)&&(z.current=!g)}function r(e){z.current=v,v===`auto`&&jn(e.nativeEvent)&&(z.current=!0)}return{onKeyDown(n){let r=e.select(`open`);H.current=!1;let i=n.key.startsWith(`Arrow`),a=jr(n.key,be(),h),o=kr(n.key,r?S:C),s=(m?a:o)||n.key===`Enter`||n.key.trim()===``;if(g&&r&&(!m||vn(n.currentTarget)))return Se(n);if(r||b||!i){if(s){let e=kr(n.key,be());V.current=m&&e?null:n.key}m?a&&(Tt(n),r?(B.current=xe(),ae(n),g&&L.current?.focus()):t(n)):o&&(fe.current!=null&&(B.current=fe.current),Tt(n),!r&&b?t(n):Se(n),r&&ae(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!g&&(B.current=-1,ae(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[Se,v,xe,m,ae,e,b,S,C,be,h,fe,g,L]),De=K.useMemo(()=>({...we,...Ee}),[we,Ee]);return K.useMemo(()=>a?{reference:De,floating:Te,item:Ce,trigger:Ee}:{},[a,De,Te,Ee,Ce])}function Pr(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:s,onTyping:c,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,p=he(c),m=e.useState(`open`),h=l(),g=K.useRef(``),_=K.useRef(f??i??-1),v=K.useRef(null),y=he(e=>{function t(e){return r?.current[e]}function o(e){let n=t(e);return n&&!j(n)||n?.matches(`:disabled`)?!1:s==null||!ee(Ce,e,s)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&o(n))return n}return-1}let l=n.current;if(g.current.length>0&&e.key===` `&&(Tt(e),p?.(!0)),g.current.length>0&&g.current[0]!==` `&&c(l,g.current)===-1&&e.key!==` `&&p?.(!1),l==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;m&&e.key!==` `&&(Tt(e),p?.(!0));let u=g.current===``;u&&(_.current=f??i??-1),l.every((e,t)=>e&&o(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&g.current===e.key&&(g.current=``,_.current=v.current),g.current+=e.key,h.start(d,()=>{g.current=``,_.current=v.current,p?.(!1)});let y=((u?f??i??-1:_.current)??0)+1,b=c(l,g.current,y);b===-1?e.key!==` `&&(g.current=``,p?.(!1)):(a?.(b,e),v.current=b)}),b=he(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);re(r,n)||re(i,n)||(h.clear(),g.current=``,_.current=v.current,p?.(!1))});o(()=>{(m||f===null)&&(h.clear(),v.current=null,g.current!==``&&(g.current=``,p?.(!1)))},[m,f,h,p]);let x=K.useMemo(()=>({onKeyDown:y,onBlur:b}),[y,b]);return K.useMemo(()=>u?{reference:x,floating:x}:{},[u,x])}function Fr(e){let[t,n]=K.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function Ir(e){let t=b(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=A(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r;return(zt(n)!==a||zt(r)!==o)&&(n=a,r=o),{width:n,height:r}}var q=t(ce(),1),Lr=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Rr(e){return zr(e)}function zr(e){return Array.isArray(e)?Br(e):e instanceof RegExp?e:typeof e==`object`?Vr(e):e}function Br(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=zr(e[n]);return t}function Vr(e){let t={};for(let n in e)t[n]=zr(e[n]);return t}function Hr(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Ur(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Ur(e.substring(0,e.length-1)):e.substr(~t+1)}var Wr=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Gr=class{static hasCaptures(e){return e!==null&&(Wr.lastIndex=0,Wr.test(e))}static replaceCaptures(e,t,n){return e.replace(Wr,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Kr(e,t){return e<t?-1:+(e>t)}function qr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Kr(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Jr(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Yr(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Xr=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Zr=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(ni(e),t)}static createFromParsedTheme(e,t){return ai(e,t)}_cachedMatchRoot=new Xr(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>$r(e.parent,t.parentScopes));return n?new ti(n.fontStyle,n.foreground,n.background):null}},Qr=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function $r(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!ei(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function ei(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var ti=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function ni(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Jr(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Jr(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new ri(l,u,e,o,s,c)}}return n}var ri=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},ii=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(ii||{});function ai(e,t){e.sort((e,t)=>{let n=Kr(e.scope,t.scope);return n!==0||(n=qr(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new oi(t),o=new ti(n,a.getId(r),a.getId(i)),s=new li(new ci(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Zr(a,o,s)}var oi=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},si=Object.freeze([]),ci=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||si,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},li=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),ci.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null)this._mainRule.acceptOverwrite(e,n,r,i);else{for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(qr(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new ci(e,t,n,r,i))}}},ui=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=fi(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c|0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function di(e){return e}function fi(e){return e}function pi(e,t){let n=[],r=hi(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(mi(i)){let e=[];do e.push(i),i=r.next();while(mi(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function mi(e){return!!e&&!!e.match(/[\w\.:]+/)}function hi(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function gi(e){typeof e.dispose==`function`&&e.dispose()}var _i=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},vi=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},yi=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},bi=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new _i(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new yi;for(let n of e)xi(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof _i){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function xi(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof _i?Ci({baseGrammar:a,selfGrammar:i},r):Si(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new _i(e))}function Si(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];wi([r],t,n)}}function Ci(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&wi(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&wi(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function wi(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Hr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&wi(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Ai(i);switch(a.kind){case 0:Ci({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ci(t,n);break;case 2:Si(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Si(a.ruleName,i,n):Ci(i,n)}else a.kind===4?n.add(new vi(a.scopeName,a.ruleName)):n.add(new _i(a.scopeName))}}}var Ti=class{kind=0},Ei=class{kind=1},Di=class{constructor(e){this.ruleName=e}kind=2},Oi=class{constructor(e){this.scopeName=e}kind=3},ki=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Ai(e){if(e===`$base`)return new Ti;if(e===`$self`)return new Ei;let t=e.indexOf(`#`);return t===-1?new Oi(e):t===0?new Di(e.substring(1)):new ki(e.substring(0,t),e.substring(t+1))}var ji=/\\(\d+)/,Mi=/\\(\d+)/g,Ni=-1,Pi=-2;function Fi(e){return e}function Ii(e){return e}var Li=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Gr.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Gr.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Ur(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Gr.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Gr.replaceCaptures(this._contentName,e,t)}},Ri=class extends Li{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},zi=class extends Li{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Wi(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Gi,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Bi=class extends Li{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Gi,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Vi=class extends Li{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Wi(i,this.id),this.beginCaptures=a,this._end=new Wi(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Gi;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Hi=class extends Li{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Wi(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Wi(o,Pi),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Gi;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Gi,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Ui=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Ri(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new zi(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Hr({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Bi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Hi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Vi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Ai(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Bi||e instanceof Vi||e instanceof Hi)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Wi=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&ji.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Mi.lastIndex=0,this.source.replace(Mi,(e,t)=>Yr(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Gi=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Ki(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Ki(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Ki=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
1
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-XKyaHtl9.js";import{$ as r,$t as i,A as a,At as o,B as s,Bt as c,Ct as l,Dt as u,Et as d,G as f,H as p,Ht as m,I as h,J as g,K as _,L as v,M as y,Mt as b,N as x,Ot as S,P as C,Q as w,Qt as T,R as E,S as D,T as O,Tt as k,U as ee,Ut as A,V as j,Wt as M,Y as N,Zt as P,_ as F,_n as I,a as te,an as ne,at as L,bt as re,c as R,cn as ie,ct as z,d as B,dn as V,en as H,f as ae,fn as U,ft as oe,g as se,gn as ce,h as le,hn as ue,ht as de,i as fe,in as pe,j as me,jt as he,k as ge,kt as _e,l as ve,ln as ye,m as be,mn as xe,mt as Se,nn as Ce,nt as we,o as Te,on as Ee,p as De,pn as Oe,pt as ke,q as Ae,rn as je,rt as Me,sn as Ne,st as Pe,t as Fe,tt as Ie,u as Le,v as Re,vt as ze,w as Be,xt as Ve,y as He,z as Ue,zt as We}from"./preload-helper-CjQDFR0M.js";import{C as Ge,D as W,E as Ke,F as qe,I as Je,L as Ye,M as Xe,N as G,O as Ze,P as Qe,S as $e,T as et,_ as tt,b as nt,d as rt,f as it,i as at,k as ot,t as st,u as ct,v as lt,x as ut,y as dt}from"./CollapsiblePanel-a54TwMKb.js";import{$ as ft,$t as pt,A as mt,B as ht,Ct as gt,D as _t,Dt as vt,E as yt,F as bt,G as xt,H as St,Ht as Ct,I as wt,Jt as Tt,K as Et,Kt as Dt,M as Ot,Mt as kt,N as At,Nt as jt,O as Mt,Ot as Nt,P as Pt,Pt as Ft,Q as It,Qt as Lt,R as Rt,St as zt,Tt as Bt,U as Vt,Ut as Ht,V as Ut,Vt as Wt,W as Gt,Wt as Kt,X as qt,Xt as Jt,Y as Yt,Yt as Xt,Z as Zt,Zt as Qt,_t as $t,a as en,at as tn,bt as nn,c as rn,ct as an,d as on,dt as sn,et as cn,f as ln,ft as un,ht as dn,i as fn,in as pn,it as mn,j as hn,jt as gn,k as _n,kt as vn,l as yn,lt as bn,m as xn,mt as Sn,n as Cn,nn as wn,nt as Tn,o as En,ot as Dn,p as On,pt as kn,q as An,qt as jn,r as Mn,rn as Nn,rt as Pn,s as Fn,st as In,t as Ln,tn as Rn,tt as zn,u as Bn,ut as Vn,vt as Hn,wt as Un,xt as Wn,y as Gn,yt as Kn,z as qn}from"./PopoverPopup-BLzjTqsi.js";var Jn={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};Jn.node;var Yn=xe(Jn),Xn={name:`braces`,size:24,node:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],aliases:[`curly-braces`]};Xn.node;var Zn=xe(Xn),Qn={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};Qn.node;var $n=xe(Qn),er={name:`cookie`,size:24,node:[[`path`,{d:`M11 17h.01`,key:`dukryu`}],[`path`,{d:`M11.496 2c.324-.016.558.292.529.615a4 4 0 004.235 4.368.713.713 0 01.758.757 4 4 0 004.366 4.237c.323-.03.63.204.614.527a10 10 0 01-2.915 6.566A1 1 0 114.93 4.918 10 10 0 0111.496 2`,key:`1x76et`}],[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M16 16h.01`,key:`1f9h7w`}],[`path`,{d:`M16 3h.01`,key:`ll0zb8`}],[`path`,{d:`M21 4h.01`,key:`uw58yv`}],[`path`,{d:`M21 8h.01`,key:`17axm7`}],[`path`,{d:`M7 14h.01`,key:`1qa3f1`}],[`path`,{d:`M9 8h.01`,key:`1jwowd`}]]};er.node;var tr=xe(er),nr={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};nr.node;var rr=xe(nr),ir={name:`funnel-x`,size:24,node:[[`path`,{d:`M12.531 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14v6a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341l.427-.473`,key:`ol2ft2`}],[`path`,{d:`m16.5 3.5 5 5`,key:`15e6fa`}],[`path`,{d:`m21.5 3.5-5 5`,key:`m0lwru`}]],aliases:[`filter-x`]};ir.node;var ar=xe(ir),or={name:`funnel`,size:24,node:[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]],aliases:[`filter`]};or.node;var sr=xe(or),cr={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};cr.node;var lr=xe(cr),ur={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};ur.node;var dr=xe(ur),fr={name:`route`,size:24,node:[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]};fr.node;var pr=xe(fr),mr={name:`rows-3`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]],aliases:[`panels-top-bottom`]};mr.node;var hr=xe(mr),gr={name:`send-horizontal`,size:24,node:[[`path`,{d:`M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z`,key:`117uat`}],[`path`,{d:`M6 12h16`,key:`s4cdu5`}]],aliases:[`send-horizonal`]};gr.node;var _r=xe(gr),vr={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};vr.node;var yr=xe(vr),br={name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]};br.node;var xr=xe(br),Sr={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Sr.node;var Cr=xe(Sr),wr={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};wr.node;var Tr=xe(wr);function Er(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=h(),a=un()!=null,s=Ne(()=>new St({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new xt,floatingId:i,syncOnly:!1,nested:a})).current;return o(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=m(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),s.update(e)},[t,i,r.reference,r.floating,s]),s.context.onOpenChange=n,s.context.nested=a,s}var K=t(I(),1);function Dr(e){return Jt&&e.movementX===0&&e.movementY===0}function Or(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function kr(e,t){return Or(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function Ar(e,t,n){return Or(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function jr(e,t,n){return Or(t,n?e===Ct:e===Ht,e===Wt)}function Mr(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:Or(t,n?e===Ht:e===Ct,e===Kt)}function Nr(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:c=null,allowEscape:l=!1,loopFocus:d=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:v=`auto`,focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:S=`vertical`,triggerOrientation:C=S,parentOrientation:T,id:D,resetOnPointerLeave:O=!0,externalTree:k,nestedReturnFocusRef:ee,grid:j}=t,M=j!=null,N=e.useState(`open`),P=e.useState(`floatingElement`),F=e.useState(`domReferenceElement`),I=e.context.dataRef,te=vt(P),ne=Nt(F),L=_(te),R=un(),ie=kn(k),z=K.useRef(v),B=K.useRef(c??-1),V=K.useRef(null),H=K.useRef(!0),ae=he(e=>{i(B.current===-1?null:B.current,e)}),U=K.useRef(!!P),oe=K.useRef(N),se=K.useRef(!1),ce=K.useRef(!1),le=K.useRef(null),ue=_(x),de=_(N),fe=_(c),pe=_(O),me=f(),ge=f(),_e=he(()=>{me.cancel();function e(e){g||(le.current=nn(e,{sync:se.current,preventScroll:!0}))}let t=n.current[B.current],r=ce.current;t&&e(t),(se.current?e=>e():e=>me.request(e))(()=>{let i=n.current[B.current]||t;i&&(t||e(i),Ce&&(r||!H.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});o(()=>{I.current.orientation=S},[I,S]),o(()=>{N||(V.current=null),(!N||v!==`auto`)&&(z.current=v)},[N,v]),o(()=>{a&&(N&&P?(B.current=c??-1,z.current&&c!=null&&(ce.current=!0,ae())):U.current&&(B.current=-1,ae()))},[a,N,P,c,ae]),o(()=>{if(a){if(!N)se.current=!1;else if(P){if(r==null){if(se.current=!1,fe.current!=null)return;if(U.current&&(B.current=-1,_e()),(!oe.current||!U.current)&&z.current&&(V.current!=null||z.current===!0&&V.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>ge.request(e):queueMicrotask)(t),e+=1):(B.current=V.current==null||Ar(V.current,C,h)||m?Ue(n):E(n),V.current=null,ae())};t()}}else p(n.current,r)||(B.current=r,_e(),ce.current=!1)}}},[a,N,P,r,fe,m,n,C,h,ae,_e,ge]),o(()=>{if(!a||P||!ie||g||!U.current)return;let e=ie.nodesRef.current,t=e.find(e=>e.id===R)?.context?.elements.floating,n=ze(u(F??t??null)),r=e.some(e=>e.context&&re(e.context.elements.floating,n));t&&!r&&H.current&&t.focus({preventScroll:!0})},[a,P,F,ie,R,g]),o(()=>{oe.current=N,U.current=!!P});let ve=r!=null,ye=he(e=>{if(!de.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(B.current!==t||r!==t)&&(B.current=t,ae(e))}),be=he(()=>T??ie?.nodesRef.current.find(e=>e.id===R)?.context?.dataRef?.current.orientation),xe=he(()=>Ue(n,ue.current)),Se=he(t=>{if(H.current=!1,se.current=!0,t.which===229||!de.current&&t.currentTarget===L.current)return;if(m&&Mr(t.key,S,h,M)){kr(t.key,be())||Tt(t),e.setOpen(!1,ke(Me,t.nativeEvent));let n=ee?.current??F;A(n)&&n.focus();return}r!=null&&r!==B.current&&!p(n.current,r)&&(B.current=r);let i=B.current,a=Ue(n,x),o=E(n,x);if(ne||(t.key===`Home`&&(Tt(t),B.current=a,ae(t)),t.key===`End`&&(Tt(t),B.current=o,ae(t))),j!=null){let e=j(t,B.current,n,S,d,h,x,a,o);if(e!=null&&e!==B.current&&(B.current=e,ae(t)),S===`both`)return}if(kr(t.key,S)){Tt(t);let e=ze(t.currentTarget.ownerDocument);if(N&&!g&&re(t.currentTarget,e)&&!n.current.some(t=>t!=null&&re(t,e))){B.current=Ar(t.key,S,h)?a:o,ae(t),r===B.current&&_e();return}let{index:c,wrapped:u}=s(n.current,i,{decrement:!Ar(t.key,S,h),loopFocus:d,allowEscape:l,disabledIndices:x,minIndex:a,maxIndex:o});u&&(se.current=!1),B.current=c,ae(t)}}),Ce=K.useMemo(()=>({onFocus(e){se.current=!0,ye(e)},onClick({currentTarget:e}){g||e.focus({preventScroll:!0})},onMouseMove(e){Dr(e)||(se.current=!0,ce.current=!1,y&&ye(e))},onPointerLeave(e){if(!de.current||!H.current||e.pointerType===`touch`)return;se.current=!0;let t=e.relatedTarget;if(y&&!n.current.includes(t)&&pe.current&&(le.current?.(),le.current=null,B.current=-1,ae(e),!g)){let e=L.current,t=ze(u(e));e&&re(e,t)&&e.focus({preventScroll:!0})}}}),[ye,de,L,y,n,ae,pe,g]),we=K.useMemo(()=>g&&N&&ve&&{"aria-activedescendant":`${D}-${r}`},[g,N,ve,D,r]),Te=K.useMemo(()=>({...ne?{}:we,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&N&&!g){let n=Ve(t.nativeEvent);if(n&&!re(L.current,n))return;Tt(t);let r=ke(w,t.nativeEvent);e.setOpen(!1,r);let i=ee?.current??F;!r.isCanceled&&A(i)&&i.focus()}else Se(t)},onPointerMove(e){Dr(e)||(H.current=!0)}}),[we,Se,L,ne,e,N,g,F,ee]),Ee=K.useMemo(()=>{function t(t){e.setOpen(!0,ke(Me,t.nativeEvent,t.currentTarget))}function n(e){v===`auto`&&Dt(e.nativeEvent)&&(z.current=!g)}function r(e){z.current=v,v===`auto`&&jn(e.nativeEvent)&&(z.current=!0)}return{onKeyDown(n){let r=e.select(`open`);H.current=!1;let i=n.key.startsWith(`Arrow`),a=jr(n.key,be(),h),o=kr(n.key,r?S:C),s=(m?a:o)||n.key===`Enter`||n.key.trim()===``;if(g&&r&&(!m||vn(n.currentTarget)))return Se(n);if(r||b||!i){if(s){let e=kr(n.key,be());V.current=m&&e?null:n.key}m?a&&(Tt(n),r?(B.current=xe(),ae(n),g&&L.current?.focus()):t(n)):o&&(fe.current!=null&&(B.current=fe.current),Tt(n),!r&&b?t(n):Se(n),r&&ae(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!g&&(B.current=-1,ae(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[Se,v,xe,m,ae,e,b,S,C,be,h,fe,g,L]),De=K.useMemo(()=>({...we,...Ee}),[we,Ee]);return K.useMemo(()=>a?{reference:De,floating:Te,item:Ce,trigger:Ee}:{},[a,De,Te,Ee,Ce])}function Pr(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:s,onTyping:c,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,p=he(c),m=e.useState(`open`),h=l(),g=K.useRef(``),_=K.useRef(f??i??-1),v=K.useRef(null),y=he(e=>{function t(e){return r?.current[e]}function o(e){let n=t(e);return n&&!j(n)||n?.matches(`:disabled`)?!1:s==null||!ee(Ce,e,s)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&o(n))return n}return-1}let l=n.current;if(g.current.length>0&&e.key===` `&&(Tt(e),p?.(!0)),g.current.length>0&&g.current[0]!==` `&&c(l,g.current)===-1&&e.key!==` `&&p?.(!1),l==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;m&&e.key!==` `&&(Tt(e),p?.(!0));let u=g.current===``;u&&(_.current=f??i??-1),l.every((e,t)=>e&&o(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&g.current===e.key&&(g.current=``,_.current=v.current),g.current+=e.key,h.start(d,()=>{g.current=``,_.current=v.current,p?.(!1)});let y=((u?f??i??-1:_.current)??0)+1,b=c(l,g.current,y);b===-1?e.key!==` `&&(g.current=``,p?.(!1)):(a?.(b,e),v.current=b)}),b=he(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);re(r,n)||re(i,n)||(h.clear(),g.current=``,_.current=v.current,p?.(!1))});o(()=>{(m||f===null)&&(h.clear(),v.current=null,g.current!==``&&(g.current=``,p?.(!1)))},[m,f,h,p]);let x=K.useMemo(()=>({onKeyDown:y,onBlur:b}),[y,b]);return K.useMemo(()=>u?{reference:x,floating:x}:{},[u,x])}function Fr(e){let[t,n]=K.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function Ir(e){let t=b(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=A(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r;return(zt(n)!==a||zt(r)!==o)&&(n=a,r=o),{width:n,height:r}}var q=t(ce(),1),Lr=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Rr(e){return zr(e)}function zr(e){return Array.isArray(e)?Br(e):e instanceof RegExp?e:typeof e==`object`?Vr(e):e}function Br(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=zr(e[n]);return t}function Vr(e){let t={};for(let n in e)t[n]=zr(e[n]);return t}function Hr(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Ur(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Ur(e.substring(0,e.length-1)):e.substr(~t+1)}var Wr=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Gr=class{static hasCaptures(e){return e!==null&&(Wr.lastIndex=0,Wr.test(e))}static replaceCaptures(e,t,n){return e.replace(Wr,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Kr(e,t){return e<t?-1:+(e>t)}function qr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Kr(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Jr(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Yr(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Xr=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Zr=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(ni(e),t)}static createFromParsedTheme(e,t){return ai(e,t)}_cachedMatchRoot=new Xr(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>$r(e.parent,t.parentScopes));return n?new ti(n.fontStyle,n.foreground,n.background):null}},Qr=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function $r(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!ei(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function ei(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var ti=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function ni(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Jr(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Jr(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new ri(l,u,e,o,s,c)}}return n}var ri=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},ii=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(ii||{});function ai(e,t){e.sort((e,t)=>{let n=Kr(e.scope,t.scope);return n!==0||(n=qr(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new oi(t),o=new ti(n,a.getId(r),a.getId(i)),s=new li(new ci(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Zr(a,o,s)}var oi=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},si=Object.freeze([]),ci=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||si,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},li=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),ci.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null)this._mainRule.acceptOverwrite(e,n,r,i);else{for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(qr(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new ci(e,t,n,r,i))}}},ui=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=fi(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c|0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function di(e){return e}function fi(e){return e}function pi(e,t){let n=[],r=hi(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(mi(i)){let e=[];do e.push(i),i=r.next();while(mi(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function mi(e){return!!e&&!!e.match(/[\w\.:]+/)}function hi(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function gi(e){typeof e.dispose==`function`&&e.dispose()}var _i=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},vi=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},yi=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},bi=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new _i(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new yi;for(let n of e)xi(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof _i){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function xi(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof _i?Ci({baseGrammar:a,selfGrammar:i},r):Si(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new _i(e))}function Si(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];wi([r],t,n)}}function Ci(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&wi(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&wi(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function wi(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Hr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&wi(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Ai(i);switch(a.kind){case 0:Ci({...t,selfGrammar:t.baseGrammar},n);break;case 1:Ci(t,n);break;case 2:Si(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Si(a.ruleName,i,n):Ci(i,n)}else a.kind===4?n.add(new vi(a.scopeName,a.ruleName)):n.add(new _i(a.scopeName))}}}var Ti=class{kind=0},Ei=class{kind=1},Di=class{constructor(e){this.ruleName=e}kind=2},Oi=class{constructor(e){this.scopeName=e}kind=3},ki=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Ai(e){if(e===`$base`)return new Ti;if(e===`$self`)return new Ei;let t=e.indexOf(`#`);return t===-1?new Oi(e):t===0?new Di(e.substring(1)):new ki(e.substring(0,t),e.substring(t+1))}var ji=/\\(\d+)/,Mi=/\\(\d+)/g,Ni=-1,Pi=-2;function Fi(e){return e}function Ii(e){return e}var Li=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Gr.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Gr.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Ur(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Gr.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Gr.replaceCaptures(this._contentName,e,t)}},Ri=class extends Li{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},zi=class extends Li{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Wi(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Gi,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Bi=class extends Li{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Gi,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Vi=class extends Li{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Wi(i,this.id),this.beginCaptures=a,this._end=new Wi(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Gi;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Hi=class extends Li{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Wi(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Wi(o,Pi),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Gi;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Gi,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Ui=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Ri(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new zi(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Hr({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Bi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Hi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Vi(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Ai(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Bi||e instanceof Vi||e instanceof Hi)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Wi=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&ji.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Mi.lastIndex=0,this.source.replace(Mi,(e,t)=>Yr(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Gi=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Ki(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Ki(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Ki=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
2
2
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},qi=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Ji=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new qi(e,8),this._embeddedLanguagesMatcher=new Yi(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new qi(0,0);_getBasicScopeAttributes=new Xr(e=>new qi(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Yi=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Yr(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Xi=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Zi(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Qi(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Xi(i,!0);f()}return new Xi(i,!1);function f(){let o=$i(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Ni){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),ia(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Vi){let r=o;ia(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Hi){let r=o;ia(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(ia(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Qi(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Hi&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=ra(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Pi){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),ia(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function $i(e,t,n,r,i,a){let o=ea(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=ta(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function ea(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=na(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function ta(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=na(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function na(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function ra(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function ia(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Zi(e,p,n&&d.start===0,d.start,f,i,!1,0),gi(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new aa(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var aa=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function oa(e,t,n,r,i,a,o,s){return new ua(e,t,n,r,i,a,o,s)}function sa(e,t,n,r,i){let a=pi(t,ca),o=Ui.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function ca(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(la(t[r],e))return n=r+1,!0;return!1})}function la(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var ua=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new Ji(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=da(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=pi(e,ca);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)sa(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&sa(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(Fi(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Ii(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=da(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Ui.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===pa.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=ui.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?fa.createRootAndLookUpScopeName(a,r,this):fa.createRoot(`unknown`,r),t=new pa(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
3
3
|
`;let a=this.createOnigString(e),o=a.content.length,s=new ha(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Zi(this,a,i,0,t,s,!0,r);return gi(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function da(e,t){return e=Rr(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var fa=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Qr.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Qr(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Qr(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),ui.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},pa=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?fa.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(1)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Ii(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=fa.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Fi(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,fa.fromExtension(r,n.contentNameScopesList))}},ma=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):pi(e,ca).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>pi(e,ca).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},ha=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=ui.set(n,0,di(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=ui.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},ga=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,oa(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},_a=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ga(Zr.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Zr.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new ma(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new bi(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},va=pa.NULL;function ya(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function ba(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function xa(e){return Array.isArray(e)?e:[e]}async function Sa(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Ca(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function wa(e){return e===`ansi`||Ca(e)}function Ta(e){return e===`none`}function Ea(e){return Ta(e)}var Da=/(\r?\n)/g;function Oa(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Da),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var ka={light:`#333333`,dark:`#bbbbbb`},Aa={light:`#fffffe`,dark:`#1e1e1e`},ja=`__shiki_resolved`;function Ma(e){if(e?.[ja])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?ka.light:ka.dark,n||=t.type===`light`?Aa.light:Aa.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,ja,{enumerable:!1,writable:!1,value:!0}),t}async function Na(e){return[...new Set((await Promise.all(e.filter(e=>!wa(e)).map(async e=>await Sa(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Pa(e){return(await Promise.all(e.map(async e=>Ea(e)?null:Ma(await Sa(e))))).filter(e=>!!e)}function Fa(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Lr(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Ia=class extends _a{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Ma(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Zr.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Fa(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._syncRegistry?._grammars?.get(e.scopeName)?.dispose(),this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new Lr(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},La=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).includes(e.scopeName)||this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Ra=0;function za(e){Ra+=1,e.warnings!==!1&&Ra>=10&&Ra%10==0&&console.warn(`[Shiki] ${Ra} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Lr("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Ma),i=new Ia(new La(e.engine,n),r,n,e.langAlias),a;function o(t){return Fa(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Lr(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new Lr(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Na(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Pa(e))}function g(){if(t)throw new Lr(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Ra)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Ba(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Pa(e.themes||[]),Na(e.langs||[]),e.engine]);return za({...e,themes:t,langs:n,engine:r})}var Va=new WeakMap;function Ha(e,t){Va.set(e,t)}function Ua(e){return Va.get(e)}var Wa=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(xa(n).map(e=>[e,va])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Ga(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Ga(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function Ka(e,t){if(!(e instanceof Wa))throw new Lr(`Invalid grammar state`);return e.getInternalStack(t)}var qa=/,/,Ja=/ /;function Ya(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Ca(e.resolveLangAlias(n.lang||`text`))||Ta(r))return Oa(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new Lr(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Lr(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Za(t,o,i,a,n)}function Xa(...e){if(e.length===2)return Ua(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Ca(i)||Ta(a))throw new Lr(`Plain language does not have grammar state`);if(i===`ansi`)throw new Lr(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Wa(Qa(n,c,o,s,r).stateStack,c.name,o.name)}function Za(e,t,n,r,i){let a=Qa(e,t,n,r,i),o=new Wa(a.stateStack,t.name,n.name);return Ha(a.tokens,o),a.tokens}function Qa(e,t,n,r,i){let a=ya(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Oa(e),u=i.grammarState?Ka(i.grammarState,n.name)??va:i.grammarContextCode==null?va:Qa(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=ba(r[ui.getForeground(s)],a),u=ui.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=ui.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(qa).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Ja))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?$a(t.scopes):eo(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function $a(e){return e.map(e=>({scopeName:e}))}function eo(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:ro(e,i,t.slice(0,r))}}return n}function to(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function no(e,t,n){if(!to(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)to(e[r],n[i])&&--r,--i;return r===-1}function ro(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(no(e,t,n)){r.push(a);break}return r}function io(e,t,n,r=Ya){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Ua(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=ao(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new Wa(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Ha(s,c),s}function ao(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var oo=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],so=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};so.prototype.normal={},so.prototype.property={},so.prototype.space=void 0;function co(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new so(n,r,t)}function lo(e){return e.toLowerCase()}var uo=class{constructor(e,t){this.attribute=t,this.property=e}};uo.prototype.attribute=``,uo.prototype.booleanish=!1,uo.prototype.boolean=!1,uo.prototype.commaOrSpaceSeparated=!1,uo.prototype.commaSeparated=!1,uo.prototype.defined=!1,uo.prototype.mustUseProperty=!1,uo.prototype.number=!1,uo.prototype.overloadedBoolean=!1,uo.prototype.property=``,uo.prototype.spaceSeparated=!1,uo.prototype.space=void 0;var fo=e({boolean:()=>J,booleanish:()=>mo,commaOrSpaceSeparated:()=>vo,commaSeparated:()=>_o,number:()=>Y,overloadedBoolean:()=>ho,spaceSeparated:()=>go}),po=0,J=yo(),mo=yo(),ho=yo(),Y=yo(),go=yo(),_o=yo(),vo=yo();function yo(){return 2**++po}var bo=Object.keys(fo),xo=class extends uo{constructor(e,t,n,r){let i=-1;if(super(e,t),So(this,`space`,r),typeof n==`number`)for(;++i<bo.length;){let e=bo[i];So(this,bo[i],(n&fo[e])===fo[e])}}};xo.prototype.defined=!0;function So(e,t,n){n&&(e[t]=n)}function Co(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new xo(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[lo(r)]=r,n[lo(a.attribute)]=r}return new so(t,n,e.space)}var wo=Co({properties:{ariaActiveDescendant:null,ariaAtomic:mo,ariaAutoComplete:null,ariaBusy:mo,ariaChecked:mo,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:go,ariaCurrent:null,ariaDescribedBy:go,ariaDetails:null,ariaDisabled:mo,ariaDropEffect:go,ariaErrorMessage:null,ariaExpanded:mo,ariaFlowTo:go,ariaGrabbed:mo,ariaHasPopup:null,ariaHidden:mo,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:go,ariaLevel:Y,ariaLive:null,ariaModal:mo,ariaMultiLine:mo,ariaMultiSelectable:mo,ariaOrientation:null,ariaOwns:go,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:mo,ariaReadOnly:mo,ariaRelevant:null,ariaRequired:mo,ariaRoleDescription:go,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:mo,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function To(e,t){return t in e?e[t]:t}function Eo(e,t){return To(e,t.toLowerCase())}var Do=Co({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:_o,acceptCharset:go,accessKey:go,action:null,allow:null,allowFullScreen:J,allowPaymentRequest:J,allowUserMedia:J,alpha:J,alt:null,as:null,async:J,autoCapitalize:null,autoComplete:go,autoFocus:J,autoPlay:J,blocking:go,capture:null,charSet:null,checked:J,cite:null,className:go,closedBy:null,colorSpace:null,cols:Y,colSpan:Y,command:null,commandFor:null,content:null,contentEditable:mo,controls:J,controlsList:go,coords:Y|_o,crossOrigin:null,data:null,dateTime:null,decoding:null,default:J,defer:J,dir:null,dirName:null,disabled:J,download:ho,draggable:mo,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:J,formTarget:null,headers:go,height:Y,hidden:ho,high:Y,href:null,hrefLang:null,htmlFor:go,httpEquiv:go,id:null,imageSizes:null,imageSrcSet:null,inert:J,inputMode:null,integrity:null,is:null,isMap:J,itemId:null,itemProp:go,itemRef:go,itemScope:J,itemType:go,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:J,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:J,muted:J,name:null,nonce:null,noModule:J,noValidate:J,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:J,optimum:Y,pattern:null,ping:go,placeholder:null,playsInline:J,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:J,referrerPolicy:null,rel:go,required:J,reversed:J,rows:Y,rowSpan:Y,sandbox:go,scope:null,scoped:J,seamless:J,selected:J,shadowRootClonable:J,shadowRootCustomElementRegistry:J,shadowRootDelegatesFocus:J,shadowRootMode:null,shadowRootSerializable:J,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:mo,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:J,useMap:null,value:mo,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:go,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:J,declare:J,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:J,noHref:J,noShade:J,noWrap:J,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:mo,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:J,disablePictureInPicture:J,disableRemotePlayback:J,exportParts:_o,part:go,prefix:null,property:null,results:Y,security:null,unselectable:null},space:`html`,transform:Eo}),Oo=Co({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:vo,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:go,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:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:J,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,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:_o,g2:_o,glyphName:_o,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:vo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,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:Y,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:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:go,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vo,rev:vo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vo,requiredFeatures:vo,requiredFonts:vo,requiredFormats:vo,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:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:vo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vo,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:To}),ko=Co({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Ao=Co({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Eo}),jo=Co({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Mo={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`},No=/[A-Z]/g,Po=/-[a-z]/g,Fo=/^data[-\w.:]+$/i;function Io(e,t){let n=lo(t),r=t,i=uo;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Fo.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Po,Ro);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Po.test(e)){let n=e.replace(No,Lo);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=xo}return new i(r,t)}function Lo(e){return`-`+e.toLowerCase()}function Ro(e){return e.charAt(1).toUpperCase()}var zo=co([wo,Do,ko,Ao,jo],`html`),Bo=co([wo,Oo,ko,Ao,jo],`svg`),Vo={}.hasOwnProperty;function Ho(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Vo.call(t,e)){let n=String(t[e]);i=Vo.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Uo=/["&'<>`]/g,Wo=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Go=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Ko=/[|\\{}()[\]^$+*?.]/g,qo=new WeakMap;function Jo(e,t){return e=e.replace(t.subset?Yo(t.subset):Uo,r),t.subset||t.escapeOnly?e:e.replace(Wo,n).replace(Go,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Yo(e){let t=qo.get(e);return t||(t=Xo(e),qo.set(e,t)),t}function Xo(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Ko,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Zo=/[\dA-Fa-f]/;function Qo(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Zo.test(String.fromCharCode(t))?r:r+`;`}var $o=/\d/;function es(e,t,n){let r=`&#`+String(e);return n&&t&&!$o.test(String.fromCharCode(t))?r:r+`;`}var ts=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),ns={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},rs=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],is={}.hasOwnProperty,as={},os;for(os in ns)is.call(ns,os)&&(as[ns[os]]=os);var ss=/[^\dA-Za-z]/;function cs(e,t,n,r){let i=String.fromCharCode(e);if(is.call(as,i)){let e=as[i],a=`&`+e;return n&&ts.includes(e)&&!rs.includes(e)&&(!r||t&&t!==61&&ss.test(String.fromCharCode(t)))?a:a+`;`}return``}function ls(e,t,n){let r=Qo(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=cs(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=es(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function us(e,t){return Jo(e,Object.assign({format:ls},t))}var ds=/^>|^->|<!--|-->|--!>|<!-$/g,fs=[`>`],ps=[`<`,`>`];function ms(e,t,n,r){return r.settings.bogusComments?`<?`+us(e.value,Object.assign({},r.settings.characterReferences,{subset:fs}))+`>`:`<!--`+e.value.replace(ds,i)+`-->`;function i(e){return us(e,Object.assign({},r.settings.characterReferences,{subset:ps}))}}function hs(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function gs(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function _s(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function vs(e){return e.join(` `).trim()}var ys=/[ \t\n\f\r]/g;function bs(e){return typeof e==`object`?e.type===`text`&&xs(e.value):xs(e)}function xs(e){return e.replace(ys,``)===``}var Ss=Ts(1),Cs=Ts(-1),ws=[];function Ts(e){return t;function t(t,n,r){let i=t?t.children:ws,a=(n||0)+e,o=i[a];if(!r)for(;o&&bs(o);)a+=e,o=i[a];return o}}var Es={}.hasOwnProperty;function Ds(e){return t;function t(t,n,r){return Es.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Os=Ds({body:js,caption:ks,colgroup:ks,dd:Fs,dt:Ps,head:ks,html:As,li:Ns,optgroup:Ls,option:Rs,p:Ms,rp:Is,rt:Is,tbody:Bs,td:Us,tfoot:Vs,th:Us,thead:zs,tr:Hs});function ks(e,t,n){let r=Ss(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&bs(r.value.charAt(0)))}function As(e,t,n){let r=Ss(n,t);return!r||r.type!==`comment`}function js(e,t,n){let r=Ss(n,t);return!r||r.type!==`comment`}function Ms(e,t,n){let r=Ss(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function Ns(e,t,n){let r=Ss(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Ps(e,t,n){let r=Ss(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function Fs(e,t,n){let r=Ss(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Is(e,t,n){let r=Ss(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Ls(e,t,n){let r=Ss(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Rs(e,t,n){let r=Ss(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function zs(e,t,n){let r=Ss(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function Bs(e,t,n){let r=Ss(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Vs(e,t,n){return!Ss(n,t)}function Hs(e,t,n){let r=Ss(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Us(e,t,n){let r=Ss(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Ws=Ds({body:qs,colgroup:Js,head:Ks,html:Gs,tbody:Ys});function Gs(e){let t=Ss(e,-1);return!t||t.type!==`comment`}function Ks(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function qs(e){let t=Ss(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&bs(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function Js(e,t,n){let r=Cs(n,t),i=Ss(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Os(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Ys(e,t,n){let r=Cs(n,t),i=Ss(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Os(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Xs={name:[[`
|
|
4
4
|
\f\r &/=>`.split(``),`
|
|
@@ -108,7 +108,7 @@ ${Au(r.join(`
|
|
|
108
108
|
`)}function Sv(e){return e==null?``:String(e)}function Cv(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function wv(){return{enter:{table:Tv,tableData:kv,tableHeader:kv,tableRow:Dv},exit:{codeText:Av,table:Ev,tableData:Ov,tableHeader:Ov,tableRow:Ov}}}function Tv(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Ev(e){this.exit(e),this.data.inTable=void 0}function Dv(e){this.enter({type:`tableRow`,children:[]},e)}function Ov(e){this.exit(e)}function kv(e){this.enter({type:`tableCell`,children:[]},e)}function Av(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,jv));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function jv(e,t){return t===`|`?t:e}function Mv(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
109
109
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
110
110
|
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return xv(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=ph.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Nv(){return{exit:{taskListCheckValueChecked:Fv,taskListCheckValueUnchecked:Fv,paragraph:Iv}}}function Pv(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Lv}}}function Fv(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Iv(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Lv(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=ph.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Rv(){return[R_(),cv(),pv(),wv(),Nv()]}function zv(e){return{extensions:[z_(),lv(e),mv(),Mv(e),Pv()]}}var Bv={tokenize:ey,partial:!0},Vv={tokenize:ty,partial:!0},Hv={tokenize:ny,partial:!0},Uv={tokenize:ry,partial:!0},Wv={tokenize:iy,partial:!0},Gv={name:`wwwAutolink`,tokenize:Qv,previous:ay},Kv={name:`protocolAutolink`,tokenize:$v,previous:oy},qv={name:`emailAutolink`,tokenize:Zv,previous:sy},Jv={};function Yv(){return{text:Jv}}for(var Xv=48;Xv<123;)Jv[Xv]=qv,Xv++,Xv===58?Xv=65:Xv===91&&(Xv=97);Jv[43]=qv,Jv[45]=qv,Jv[46]=qv,Jv[95]=qv,Jv[72]=[qv,Kv],Jv[104]=[qv,Kv],Jv[87]=[qv,Gv],Jv[119]=[qv,Gv];function Zv(e,t,n){let r=this,i,a;return o;function o(t){return!cy(t)||!sy.call(r,r.previous)||ly(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return cy(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Wv,u,l)(t):t===45||t===95||md(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&pd(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Qv(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!ay.call(r,r.previous)||ly(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Bv,e.attempt(Vv,e.attempt(Hv,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function $v(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&oy.call(r,r.previous)&&!ly(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(pd(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||gd(t)||bd(t)||Sd(t)||xd(t)?n(t):e.attempt(Vv,e.attempt(Hv,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ey(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function ty(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Uv,c,s)(t):t===null||bd(t)||Sd(t)||t!==45&&xd(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function ny(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Uv,t,a)(o):o===null||bd(o)||Sd(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function ry(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||bd(o)||Sd(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||bd(e)||Sd(e)?t(e):r(e)}function a(e){return pd(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):pd(t)?(e.consume(t),o):n(t)}}function iy(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return md(e)?n(e):t(e)}}function ay(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||bd(e)}function oy(e){return!pd(e)}function sy(e){return!(e===47||cy(e))}function cy(e){return e===43||e===45||e===46||e===95||md(e)}function ly(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var uy={tokenize:vy,partial:!0};function dy(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:hy,continuation:{tokenize:gy},exit:_y}},text:{91:{name:`gfmFootnoteCall`,tokenize:my},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:fy,resolveTo:py}}}}function fy(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=fd(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function py(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function my(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||bd(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(fd(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return bd(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function hy(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||bd(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=fd(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return bd(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Q(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function gy(e,t,n){return e.check(Hd,t,e.attempt(uy,t,n))}function _y(e){e.exit(`gfmFootnoteDefinition`)}function vy(e,t,n){let r=this;return Q(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function yy(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ad(o,o.length,0,Fd(s,e.slice(r+1,n),t)),ad(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ad(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Pd(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Pd(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var by=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){xy(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function xy(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Sy(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Cy(){return{flow:{null:{name:`table`,tokenize:wy,resolveAll:Ty}}}}function wy(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):X(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Z(t)?Q(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||bd(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Z(t)?Q(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Z(t)?Q(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||X(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Z(t)?Q(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||X(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||X(n)?(e.exit(`tableRow`),t(n)):Z(n)?Q(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||bd(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Ty(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new by;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Dy(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Ey(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Ey(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Ey(f,t,o,i,n,d)):(o[0]=o[1],d=Ey(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Dy(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Sy(t.events,n))}return e}function Ey(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Oy(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Oy(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Oy(t.events,n[2]),a=Oy(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Oy(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Dy(e,t,n,r,i){let a=[],o=Oy(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Oy(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var ky={name:`tasklistCheck`,tokenize:jy};function Ay(){return{text:{91:ky}}}function jy(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return bd(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return X(r)?t(r):Z(r)?e.check({tokenize:My},t,n)(r):n(r)}}function My(e,t,n){return Q(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Ny(e){return cd([Yv(),dy(),yy(e),Cy(),Ay()])}var Py={};function Fy(e){let t=this,n=e||Py,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Ny(n)),a.push(Rv()),o.push(zv(n))}var Iy=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ly=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ry={};function zy(e,t){return((t||Ry).jsx?Ly:Iy).test(e)}var By=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
111
|
-
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Vy=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(By());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),Hy=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Uy=t(n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Vy()),i=Hy();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a}))(),1),Wy={}.hasOwnProperty,Gy=new Map,Ky=/[A-Z]/g,qy=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Jy=new Set([`td`,`th`]),Yy=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Xy(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=sb(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=ob(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Bo:zo,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Zy(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Zy(e,t,n){if(t.type===`element`)return Qy(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return $y(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return tb(e,t,n);if(t.type===`mdxjsEsm`)return eb(e,t);if(t.type===`root`)return nb(e,t,n);if(t.type===`text`)return rb(e,t)}function Qy(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Bo,e.schema=i),e.ancestors.push(t);let a=pb(e,t.tagName,!1),o=cb(e,t),s=ub(e,t);return qy.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!bs(e)})),ib(e,o,a,t),ab(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function $y(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}mb(e,t.position)}function eb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);mb(e,t.position)}function tb(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Bo,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:pb(e,t.name,!0),o=lb(e,t),s=ub(e,t);return ib(e,o,a,t),ab(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function nb(e,t,n){let r={};return ab(r,ub(e,t)),e.create(t,e.Fragment,r,n)}function rb(e,t){return t.value}function ib(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ab(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ob(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function sb(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Wg(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function cb(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Wy.call(t.properties,i)){let a=db(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Jy.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function lb(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else mb(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else mb(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function ub(e,t){let n=[],r=-1,i=e.passKeys?new Map:Gy;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Zy(e,a,o);s!==void 0&&n.push(s)}return n}function db(e,t,n){let r=Io(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?_s(n):vs(n)),r.property===`style`){let t=typeof n==`object`?n:fb(e,String(n));return e.stylePropertyNameCase===`css`&&(t=hb(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Mo[r.property]||r.property:r.attribute,n]}}function fb(e,t){try{return(0,Uy.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Hh("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Yy+`#cannot-parse-style-attribute`,r}}function pb(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=zy(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=zy(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Wy.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);mb(e)}function mb(e,t){let n=new Hh("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Yy+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function hb(e){let t={},n;for(n in e)Wy.call(e,n)&&(t[gb(n)]=e[n]);return t}function gb(e){let t=e.replace(Ky,_b);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function _b(e){return`-`+e.toLowerCase()}var vb=Gt(),yb=()=>()=>{},bb=()=>!0,xb=()=>!1;function Sb(){return(0,vb.useSyncExternalStore)(yb,bb,xb)}function Cb(){let[e,t]=K.useState(!1);return K.useEffect(()=>{t(!0)},[]),e}var wb=ne(18)?Sb:Cb;function Tb(){return!wb()}var Eb=K.createContext(void 0),Db={disableStyleElements:!1};function Ob(){return K.useContext(Eb)??Db}function kb(e){let{script:t}=e,{nonce:n}=Ob();return Tb()?(0,q.jsx)(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}function Ab(e,t){let n=(t??c(e).getComputedStyle(e)).transform,r=0,i=0,a=1;if(n&&n!==`none`){let e=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(r=t[4],i=t[5],a=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(r=t[12],i=t[13],a=t[0])}}return{x:r,y:i,scale:a}}var jb=`--active-tab-left`,Mb=`--active-tab-right`,Nb=`--active-tab-top`,Pb=`--active-tab-bottom`,Fb=`--active-tab-width`,Ib=`--active-tab-height`,Lb,Rb={...$e,activeTabPosition:()=>null,activeTabSize:()=>null},zb=2,Bb=K.forwardRef(function(e,t){let{className:n,render:r,renderBeforeHydration:i=!1,style:a,...o}=e,{getTabElementBySelectedValue:s,orientation:c,tabActivationDirection:l,value:u}=Ge(),{tabsListElement:d,registerIndicatorUpdateListener:f}=nt(),p=v();K.useEffect(()=>f(p),[f,p]);let m=0,h=0,g=0,_=0,y=0,b=0,x=!1;if(u!=null&&d!=null){let e=s(u);if(e!=null){x=!0;let{width:t,height:n}=Ir(e),{width:r,height:i}=Ir(d),a=e.getBoundingClientRect(),o=d.getBoundingClientRect(),s=r>0?o.width/r:1,c=i>0?o.height/i:1,l=Vb(e,d);m=l.left,g=l.top;let u=(a.left-o.left)/s+d.scrollLeft-d.clientLeft,f=(a.top-o.top)/c+d.scrollTop-d.clientTop,p=Ub(e);Math.abs(u-p.x-m)<=zb&&Math.abs(f-p.y-g)<=zb&&(m=u,g=f),y=t,b=n,h=d.scrollWidth-m-y,_=d.scrollHeight-g-b}}let S=x?{left:m,right:h,top:g,bottom:_}:null,C=x?{width:y,height:b}:null,w=x?{[jb]:`${m}px`,[Mb]:`${h}px`,[Nb]:`${g}px`,[Pb]:`${_}px`,[Fb]:`${y}px`,[Ib]:`${b}px`}:void 0,T=H(`span`,e,{state:{orientation:c,activeTabPosition:S,activeTabSize:C,tabActivationDirection:l},ref:t,props:[{role:`presentation`,style:w,hidden:!(x&&y>0&&b>0)},o,{suppressHydrationWarning:!0}],stateAttributesMapping:Rb});return u==null?null:(0,q.jsxs)(K.Fragment,{children:[T,i&&(Lb||=(0,q.jsx)(kb,{script:``}))]})});function Vb(e,t){let n=Hb(e),r=Hb(t),i=n.left-r.left-t.clientLeft,a=n.top-r.top-t.clientTop,o=We(e);for(;A(o)&&o!==t&&!M(o);)i-=o.scrollLeft,a-=o.scrollTop,o=We(o);return{left:i,top:a}}function Hb(e){let t=0,n=0,r=e;for(;r!=null;){t+=r.offsetLeft,n+=r.offsetTop;let e=r.offsetParent;e!=null&&(t+=e.clientLeft,n+=e.clientTop),r=e}return{left:t,top:n}}function Ub(e){let t=c(e).getComputedStyle(e),{x:n,y:r}=Ab(e,t),i=n,a=r,{translate:o}=t;if(o&&o!==`none`){let t=o.split(` `);i+=Wb(t[0],e.offsetWidth),a+=Wb(t[1],e.offsetHeight)}return{x:i,y:a}}function Wb(e,t){if(!e)return 0;let n=parseFloat(e);return Number.isFinite(n)?e.endsWith(`%`)?n/100*t:n:0}async function Gb(e,t){let n=e.getBundledThemes(),r=e.getLoadedThemes(),i=t.filter(e=>typeof e==`string`?e in n&&!r.includes(e):e.name===void 0||!r.includes(e.name));i.length>0&&await e.loadTheme(...i)}function Kb(e){return`theme`in e?[e.theme]:Object.values(e.themes).filter(e=>e!==void 0)}function qb(e){let t;return{init(n){let r=e.init(n);return r instanceof Promise&&r.catch(()=>{t===r&&(t=void 0)}),t=r},getOrInit(){return t??this.init()}}}async function Jb(e,t,n){let{fallbackLanguage:r=`text`,...i}=n,{isSpecialLang:a}=await Fe(async()=>{let{isSpecialLang:e}=await import(`./core-CHWYtApw.js`);return{isSpecialLang:e}},[]),o=e.getLoadedLanguages();return!a(i.lang)&&!(i.lang in e.getBundledLanguages())&&!o.includes(i.lang)&&(i.lang=r),await Promise.all([Gb(e,Kb(i)),!a(i.lang)&&!o.includes(i.lang)&&e.loadLanguage(i.lang)]),e.codeToHast(t,i)}function Yb(e,t,n,r){let[i,a]=(0,K.useState)(n.defaultValue),o=(0,K.useRef)(null);return(0,K.useEffect)(()=>{async function r(){return Xy(await Jb(typeof e==`function`?await e():e,t,n),{...q,components:n.components})}let i=r();return o.current=i,i.then(e=>{o.current===i&&a(e)}),()=>{o.current=null}},r),i}var Xb=(0,K.createContext)(void 0);function Zb(e){let t=(0,K.use)(Xb);return(0,q.jsx)(rt,{...e,...t,className:G(`my-0`,e.className,t?.className),children:(0,q.jsx)(it,{children:e.children})})}function Qb({lang:e,code:t,codeblock:n,options:r,wrapInSuspense:i=!0,highlighter:a}){let o=(0,K.useId)(),s={lang:e,defaultColor:!1,...r,components:{pre:Zb,...r?.components}},c=Yb(a,t,s,[o,e,t]);return i&&(c??=(0,q.jsx)($b,{code:t,components:s.components})),(0,q.jsx)(Xb,{value:n,children:c})}function $b({code:e,components:t={}}){let{pre:n=`pre`,code:r=`code`}=t;return(0,q.jsx)(n,{children:(0,q.jsx)(r,{children:e.split(`
|
|
111
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Vy=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(By());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),Hy=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Uy=t(n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Vy()),i=Hy();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a}))(),1),Wy={}.hasOwnProperty,Gy=new Map,Ky=/[A-Z]/g,qy=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Jy=new Set([`td`,`th`]),Yy=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Xy(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=sb(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=ob(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Bo:zo,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Zy(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Zy(e,t,n){if(t.type===`element`)return Qy(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return $y(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return tb(e,t,n);if(t.type===`mdxjsEsm`)return eb(e,t);if(t.type===`root`)return nb(e,t,n);if(t.type===`text`)return rb(e,t)}function Qy(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Bo,e.schema=i),e.ancestors.push(t);let a=pb(e,t.tagName,!1),o=cb(e,t),s=ub(e,t);return qy.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!bs(e)})),ib(e,o,a,t),ab(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function $y(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}mb(e,t.position)}function eb(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);mb(e,t.position)}function tb(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Bo,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:pb(e,t.name,!0),o=lb(e,t),s=ub(e,t);return ib(e,o,a,t),ab(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function nb(e,t,n){let r={};return ab(r,ub(e,t)),e.create(t,e.Fragment,r,n)}function rb(e,t){return t.value}function ib(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ab(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ob(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function sb(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Wg(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function cb(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Wy.call(t.properties,i)){let a=db(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Jy.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function lb(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else mb(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else mb(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function ub(e,t){let n=[],r=-1,i=e.passKeys?new Map:Gy;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Zy(e,a,o);s!==void 0&&n.push(s)}return n}function db(e,t,n){let r=Io(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?_s(n):vs(n)),r.property===`style`){let t=typeof n==`object`?n:fb(e,String(n));return e.stylePropertyNameCase===`css`&&(t=hb(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Mo[r.property]||r.property:r.attribute,n]}}function fb(e,t){try{return(0,Uy.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Hh("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Yy+`#cannot-parse-style-attribute`,r}}function pb(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=zy(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=zy(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Wy.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);mb(e)}function mb(e,t){let n=new Hh("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Yy+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function hb(e){let t={},n;for(n in e)Wy.call(e,n)&&(t[gb(n)]=e[n]);return t}function gb(e){let t=e.replace(Ky,_b);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function _b(e){return`-`+e.toLowerCase()}var vb=Gt(),yb=()=>()=>{},bb=()=>!0,xb=()=>!1;function Sb(){return(0,vb.useSyncExternalStore)(yb,bb,xb)}function Cb(){let[e,t]=K.useState(!1);return K.useEffect(()=>{t(!0)},[]),e}var wb=ne(18)?Sb:Cb;function Tb(){return!wb()}var Eb=K.createContext(void 0),Db={disableStyleElements:!1};function Ob(){return K.useContext(Eb)??Db}function kb(e){let{script:t}=e,{nonce:n}=Ob();return Tb()?(0,q.jsx)(`script`,{nonce:n,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}function Ab(e,t){let n=(t??c(e).getComputedStyle(e)).transform,r=0,i=0,a=1;if(n&&n!==`none`){let e=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(e){let t=e[1].split(`, `).map(parseFloat);t.length===6?(r=t[4],i=t[5],a=Math.sqrt(t[0]*t[0]+t[1]*t[1])):t.length===16&&(r=t[12],i=t[13],a=t[0])}}return{x:r,y:i,scale:a}}var jb=`--active-tab-left`,Mb=`--active-tab-right`,Nb=`--active-tab-top`,Pb=`--active-tab-bottom`,Fb=`--active-tab-width`,Ib=`--active-tab-height`,Lb,Rb={...$e,activeTabPosition:()=>null,activeTabSize:()=>null},zb=2,Bb=K.forwardRef(function(e,t){let{className:n,render:r,renderBeforeHydration:i=!1,style:a,...o}=e,{getTabElementBySelectedValue:s,orientation:c,tabActivationDirection:l,value:u}=Ge(),{tabsListElement:d,registerIndicatorUpdateListener:f}=nt(),p=v();K.useEffect(()=>f(p),[f,p]);let m=0,h=0,g=0,_=0,y=0,b=0,x=!1;if(u!=null&&d!=null){let e=s(u);if(e!=null){x=!0;let{width:t,height:n}=Ir(e),{width:r,height:i}=Ir(d),a=e.getBoundingClientRect(),o=d.getBoundingClientRect(),s=r>0?o.width/r:1,c=i>0?o.height/i:1,l=Vb(e,d);m=l.left,g=l.top;let u=(a.left-o.left)/s+d.scrollLeft-d.clientLeft,f=(a.top-o.top)/c+d.scrollTop-d.clientTop,p=Ub(e);Math.abs(u-p.x-m)<=zb&&Math.abs(f-p.y-g)<=zb&&(m=u,g=f),y=t,b=n,h=d.scrollWidth-m-y,_=d.scrollHeight-g-b}}let S=x?{left:m,right:h,top:g,bottom:_}:null,C=x?{width:y,height:b}:null,w=x?{[jb]:`${m}px`,[Mb]:`${h}px`,[Nb]:`${g}px`,[Pb]:`${_}px`,[Fb]:`${y}px`,[Ib]:`${b}px`}:void 0,T=H(`span`,e,{state:{orientation:c,activeTabPosition:S,activeTabSize:C,tabActivationDirection:l},ref:t,props:[{role:`presentation`,style:w,hidden:!(x&&y>0&&b>0)},o,{suppressHydrationWarning:!0}],stateAttributesMapping:Rb});return u==null?null:(0,q.jsxs)(K.Fragment,{children:[T,i&&(Lb||=(0,q.jsx)(kb,{script:``}))]})});function Vb(e,t){let n=Hb(e),r=Hb(t),i=n.left-r.left-t.clientLeft,a=n.top-r.top-t.clientTop,o=We(e);for(;A(o)&&o!==t&&!M(o);)i-=o.scrollLeft,a-=o.scrollTop,o=We(o);return{left:i,top:a}}function Hb(e){let t=0,n=0,r=e;for(;r!=null;){t+=r.offsetLeft,n+=r.offsetTop;let e=r.offsetParent;e!=null&&(t+=e.clientLeft,n+=e.clientTop),r=e}return{left:t,top:n}}function Ub(e){let t=c(e).getComputedStyle(e),{x:n,y:r}=Ab(e,t),i=n,a=r,{translate:o}=t;if(o&&o!==`none`){let t=o.split(` `);i+=Wb(t[0],e.offsetWidth),a+=Wb(t[1],e.offsetHeight)}return{x:i,y:a}}function Wb(e,t){if(!e)return 0;let n=parseFloat(e);return Number.isFinite(n)?e.endsWith(`%`)?n/100*t:n:0}async function Gb(e,t){let n=e.getBundledThemes(),r=e.getLoadedThemes(),i=t.filter(e=>typeof e==`string`?e in n&&!r.includes(e):e.name===void 0||!r.includes(e.name));i.length>0&&await e.loadTheme(...i)}function Kb(e){return`theme`in e?[e.theme]:Object.values(e.themes).filter(e=>e!==void 0)}function qb(e){let t;return{init(n){let r=e.init(n);return r instanceof Promise&&r.catch(()=>{t===r&&(t=void 0)}),t=r},getOrInit(){return t??this.init()}}}async function Jb(e,t,n){let{fallbackLanguage:r=`text`,...i}=n,{isSpecialLang:a}=await Fe(async()=>{let{isSpecialLang:e}=await import(`./core-BWAwhSFf.js`);return{isSpecialLang:e}},[]),o=e.getLoadedLanguages();return!a(i.lang)&&!(i.lang in e.getBundledLanguages())&&!o.includes(i.lang)&&(i.lang=r),await Promise.all([Gb(e,Kb(i)),!a(i.lang)&&!o.includes(i.lang)&&e.loadLanguage(i.lang)]),e.codeToHast(t,i)}function Yb(e,t,n,r){let[i,a]=(0,K.useState)(n.defaultValue),o=(0,K.useRef)(null);return(0,K.useEffect)(()=>{async function r(){return Xy(await Jb(typeof e==`function`?await e():e,t,n),{...q,components:n.components})}let i=r();return o.current=i,i.then(e=>{o.current===i&&a(e)}),()=>{o.current=null}},r),i}var Xb=(0,K.createContext)(void 0);function Zb(e){let t=(0,K.use)(Xb);return(0,q.jsx)(rt,{...e,...t,className:G(`my-0`,e.className,t?.className),children:(0,q.jsx)(it,{children:e.children})})}function Qb({lang:e,code:t,codeblock:n,options:r,wrapInSuspense:i=!0,highlighter:a}){let o=(0,K.useId)(),s={lang:e,defaultColor:!1,...r,components:{pre:Zb,...r?.components}},c=Yb(a,t,s,[o,e,t]);return i&&(c??=(0,q.jsx)($b,{code:t,components:s.components})),(0,q.jsx)(Xb,{value:n,children:c})}function $b({code:e,components:t={}}){let{pre:n=`pre`,code:r=`code`}=t;return(0,q.jsx)(n,{children:(0,q.jsx)(r,{children:e.split(`
|
|
112
112
|
`).map((e,t)=>(0,q.jsx)(`span`,{className:`line`,children:e},t))})})}var ex={themes:{light:`github-light`,dark:`github-dark`}};function tx({shiki:e,shikiOptions:t=ex,components:n}){let r=n.CodeBlock??(n=>(0,q.jsx)(Qb,{highlighter:()=>e.getOrInit(),options:t,...n})),i;return{CodeBlock:r,Markdown:n.Markdown??(({md:e})=>(0,K.useMemo)(()=>(i??=nx(r),i(e)),[e])),Heading:n.Heading??(({depth:e,...t})=>(0,q.jsx)(et,{as:`h${e}`,...t}))}}function nx(e){function t(t){let n=K.Children.only(t.children).props,r=n.children;if(typeof r!=`string`)return null;let i=n.className?.split(` `).find(e=>e.startsWith(`language-`))?.slice(9)??`text`;return(0,q.jsx)(e,{lang:i,code:r.trimEnd()})}let n={...q,components:{...ct,img:`img`,pre:t}},r=xg().use(Fy).use(A_);return e=>Xy(r.runSync(r.parse(e)),n)}function rx(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null}function ix({storageKey:e,keyOf:t,resolve:n,defaultKey:r}){let[i,a]=(0,K.useState)(()=>r===void 0?null:n(r)),o=(0,K.useRef)(void 0);return(0,K.useEffect)(()=>{if(o.current===e)return;o.current=e;let r=localStorage.getItem(e);if(r)try{let e=JSON.parse(r);if(!rx(e)||!rx(e.variables))return;let i=n(t(e));i&&a({...i,variables:e.variables})}catch{}},[e,t,n]),(0,K.useMemo)(()=>({server:i,setServer(t){let r=n(t);r&&(localStorage.setItem(e,JSON.stringify(r)),a(r))},setServerVariables(t){a(n=>{if(!n)return null;let r={...n,variables:t};return localStorage.setItem(e,JSON.stringify(r)),r})}}),[i,n,e])}function ax(e,t){return t.startsWith(`/`)&&(t=t.slice(1)),e.endsWith(`/`)&&(e=e.slice(0,-1)),t.length>0?e+`/`+t:e}function ox(e,t){for(let[n,r]of Object.entries(t))e=e.replaceAll(`{${n}}`,r);return e}var sx=(0,K.createContext)(null),cx=e=>e.url,lx=()=>()=>{};function ux(){let e=(0,K.use)(sx);if(!e)throw Error(`Component must be used under <OpenAPIProvider />`);return e}function dx({servers:e,storageKeyPrefix:t,children:n}){let r=(0,K.useCallback)(t=>{let n=e?.find(e=>e.url===t);return n?{name:n.name,url:t,variables:fx(n)}:null},[e]),i=ix({storageKey:`${t}server-url`,keyOf:cx,resolve:r,defaultKey:e?.[0]?.url}),{server:a}=i,o=(0,K.useSyncExternalStore)(lx,()=>!0,()=>!1),s=(0,K.useCallback)((e=``)=>{let t=new URL(a?ox(a.url,a.variables):`/`,o?window.location.origin:`https://example.com`).href;return e?ax(t,e):t},[a,o]);return(0,q.jsx)(sx,{value:(0,K.useMemo)(()=>({servers:e,resolveUrl:s,...i}),[e,s,i]),children:n})}function fx(e){let t={};if(!e.variables)return t;for(let[n,r]of Object.entries(e.variables))r.default!==void 0&&(t[n]=String(r.default));return t}function px(e){let[t,n]=(0,K.useState)(!1),[r,i]=(0,K.useState)(),[a,o]=(0,K.useState)(),s=(0,K.useRef)(e);return s.current=e,(0,K.useMemo)(()=>({isLoading:t,data:r,error:a,start(...e){return n(!0),s.current(...e).then(e=>(i(e),o(void 0),e)).catch(e=>{i(void 0),o(e)}).finally(()=>{n(!1)})},reset(){i(void 0),o(void 0),n(!1)}}),[a,r,t])}function mx(e){let t=[];for(let n of e)t.length===0?t.push(n.toLocaleUpperCase()):n===`.`?t=[]:/^[A-Z]$/.test(n)&&t.at(-1)!==` `?t.push(` `,n):n===`-`?t.push(` `):t.push(n);return t.join(``)}function hx(e,t,n=[]){let r={method:e.method,body:e.body,bodyMediaType:e.bodyMediaType,cookie:{},header:{},path:{},query:{}};for(let i of[`cookie`,`query`,`header`,`path`])for(let a in e[i]){let o=e[i][a];if(o==null)continue;let s=n.find(e=>e.name===a&&e.in===i)??{name:a,in:i},c=gx(s,t);if(c)i===`query`?r[i][a]={values:[c(o)]}:r[i][a]={value:c(o)};else switch(i){case`path`:vx(s,o,r.path);break;case`query`:yx(s,o,r.query);break;case`header`:r.header[a]={value:_x(o,s.explode??!1)};break;case`cookie`:bx(s,o,r.cookie)}}return r}function gx(e,t){if(e.content)for(let n in e.content){let e=Mu(n,t);if(e)return t=>String(e.encode({body:t}))}}function _x(e,t){return Array.isArray(e)?e.join(`,`):typeof e==`object`?t?Object.entries(e).map(([e,t])=>`${e}=${t}`).join(`,`):Object.entries(e).flat().join(`,`):String(e)}function vx(e,t,n){let{explode:r=!1,name:i}=e;switch(e.style){case`label`:if(Array.isArray(t)){n[e.name]={value:`.`+t.join(r?`.`:`,`)};break}if(typeof t==`object`){n[e.name]={value:`.`+(r?Object.entries(t).map(([e,t])=>`${e}=${t}`).join(`.`):Object.entries(t).flat().join(`,`))};break}n[e.name]={value:`.${t}`};break;case`matrix`:{let a=`;${i}=`;if(Array.isArray(t)){n[e.name]={value:r?`${a}${t.join(a)}`:`${a}${t.join(`,`)}`};break}if(typeof t==`object`){n[e.name]={value:r?Object.entries(t).map(([e,t])=>`;${e}=${t}`).join(``):a+Object.entries(t).flat().join(`,`)};break}n[e.name]={value:`${a}${t}`};break}default:n[e.name]={value:_x(t,r)}}}function yx(e,t,n){let{style:r,explode:i=!0}=e;if(r===`spaceDelimited`&&!i&&Array.isArray(t))n[e.name]={values:[t.join(` `)]};else if(r===`pipeDelimited`&&!i&&Array.isArray(t))n[e.name]={values:[t.join(`|`)]};else if(r===`deepObject`&&!Array.isArray(t)&&typeof t==`object`)for(let[r,i]of Object.entries(t))n[`${e.name}[${r}]`]={values:Array.isArray(i)?i:[String(i)]};else if(Array.isArray(t))n[e.name]={values:i?t:[t.join(`,`)]};else if(typeof t==`object`&&i)for(let[e,r]of Object.entries(t))n[e]={values:[String(r)]};else typeof t==`object`?n[e.name]={values:[Object.entries(t).flat().join(`,`)]}:n[e.name]={values:[String(t)]}}function bx(e,t,n){let{explode:r=!0}=e;if(Array.isArray(t))n[e.name]={value:r?t.map(t=>`${e.name}=${t}`).join(`&`):t.join(`,`)};else if(typeof t==`object`&&r)for(let[e,r]of Object.entries(t))n[e]={value:String(r)};else typeof t==`object`?n[e.name]={value:Object.entries(t).flat().join(`,`)}:n[e.name]={value:String(t)}}var xx=[`get`,`post`,`patch`,`delete`,`head`,`put`];function Sx(e){return`application/json`in e?`application/json`:Object.keys(e)[0]}function Cx(e){if(e.example!==void 0)return _l(e.example);if(e.content){let t=Sx(e.content),n=t?xl(e.content[t]):void 0;if(t&&n){let r=e.examples?.[t],i=(r===void 0?void 0:wx(xl(r)))??Cx(n);if(i!==void 0)return i}}if(e.examples){let t=Object.values(e.examples);if(t.length>0)return wx(xl(t[0]))}}function wx(e){return _l(e.dataValue??e.value)}function Tx({path:e,method:t,mediaAdapters:n,operation:r,parameters:i}){let a=xl(r.requestBody),o=a?.content?Sx(a.content):null,s=o?xl(a.content[o]):null;if(s?.examples){let r=[];for(let[o,c]of Object.entries(s.examples)){let{summary:s,description:l}=xl(c),u=Ex({path:e,body:a,parameters:i,sampleKey:o,method:t});r.push({id:o,name:s||o,description:l,data:u,encoded:hx(u,n,i)})}if(r.length>0)return r}let c=Ex({path:e,body:a,method:t,parameters:i}),l=xl(s?.schema);return[{id:`_default`,name:`Default`,description:typeof l==`object`?l.description:void 0,data:c,encoded:hx(c,n,i)}]}function Ex({method:e,path:t,parameters:n,sampleKey:r,body:i}){let a={path:{},cookie:{},header:{},query:{},method:e};for(let r of n){let n=Cx(r);if(n===void 0&&r.required){if(r.schema)n=su(r.schema);else if(r.content){let i=Sx(r.content),a=i?xl(r.content[i]):void 0;if(!a||!a.schema)throw Error(`Cannot find "${r.name}" parameter info for media type "${i}" in ${t} ${e}`);n=su(a.schema)}}switch(r.in){case`cookie`:a.cookie[r.name]=n;break;case`header`:a.header[r.name]=n;break;case`query`:a.query[r.name]=n;break;default:a.path[r.name]=n}}if(i?.content){let n=Sx(i.content);if(!n)throw Error(`Cannot find body schema for ${t} ${e}: missing media type`);a.bodyMediaType=n;let o=xl(i.content[n]);a.body=o.examples&&r?wx(xl(o.examples[r])):o.example?_l(o.example):su(o?.schema??{},{skipReadOnly:e!==`get`,skipWriteOnly:e===`get`,skipNonRequired:!0})}return a}var Dx=(0,K.createContext)(null),Ox=[`path`,`query`,`header`,`cookie`];function kx({type:e=`operation`,path:t,method:n,operation:r,pathItem:i,children:a}){let o=YE(),s=(0,K.useMemo)(()=>{let{dereferenced:a,resolve:s}=o.doc,c=s(r.requestBody),l;if(c?.content&&Object.keys(c.content).length>0){let e={};for(let[t,n]of Object.entries(c.content))e[t]=s(n);l={description:c.description,required:c.required,content:e}}let u=[],d=new Set;for(let e of[r.parameters,i.parameters])for(let t of e??[]){let e=s(t),n=`${e.in}:${e.name}`;d.has(n)||(d.add(n),u.push(e))}let f=[];for(let e of Ox){let t=u.filter(t=>t.in===e&&t.name!==void 0);t.length>0&&f.push({in:e,items:t})}let p=[];if(e===`operation`){let e=a.components?.securitySchemes;for(let t of r.security??a.security??[]){let n=Object.entries(t);n.length!==0&&p.push(n.map(([t,n])=>({key:t,scopes:n,scheme:s(e?.[t])})))}}let m=[];for(let[e,t]of Object.entries(r.responses??{})){let n=s(t),r={};for(let[e,t]of Object.entries(n.content??{}))r[e]=s(t);m.push({status:e,response:n,content:r})}let h=[];for(let[e,t]of Object.entries(r.callbacks??{}))for(let[n,r]of Object.entries(s(t))){let t=s(r);for(let r of xx){let i=t[r];i&&h.push({name:e,path:n,method:r,pathItem:t,operation:i})}}let g=zu(o.codeUsages);if(e===`operation`){for(let e of o.generateCodeSamples?.({path:t,operation:r,method:n,pathItem:i})??[])g.addInline(e);for(let e of r[`x-codeSamples`]??[])g.addInline(e)}let _=Tx({path:t,method:n,operation:r,parameters:u,mediaAdapters:o.mediaAdapters});for(let e of _)e.pathname=Ru(t,e.encoded);return{info:{type:e,path:t,method:n,operation:r,pathItem:i,title:r.summary||i.summary||(r.operationId?mx(r.operationId):t),description:r.description??i.description,requestBody:l,parameters:f,security:p,responses:m,callbacks:h,codeUsages:g},parameters:u,examples:_,...Ax(_,r[`x-exclusiveCodeSample`]??r[`x-selectedCodeSample`]??_[0]?.id,t,e=>hx(e,o.mediaAdapters,u))}},[o,e,t,n,r,i]),c=(0,q.jsx)(Dx,{value:s,children:a}),l=r.servers??i.servers;return l?(0,q.jsx)(dx,{servers:l,storageKeyPrefix:o.storageKeyPrefix,children:c}):c}function Ax(e,t,n,r){let i=new Set;function a(e){for(let t of i)t(e)}return{getExample:()=>t,setExample(n){let r=e.find(e=>e.id===n);r&&(t=n,a(r))},update(i,o=r(i)){let s=e.find(e=>e.id===t);s&&(s.data=i,s.encoded=o,s.pathname=Ru(n,o),a(s))},subscribe(e){return i.add(e),()=>{i.delete(e)}}}}function jx(){let e=(0,K.use)(Dx);if(!e)throw Error(`Component must be used under <OperationProvider />`);return e}function Mx(){return jx().info}function Nx(){let{examples:e,getExample:t,setExample:n,update:r,subscribe:i}=jx();return{items:e,selected:(0,K.useSyncExternalStore)(i,t,t),select:n,update:r}}function Px(){let{examples:e,getExample:t,subscribe:n}=jx(),r=()=>e.find(e=>e.id===t())?.encoded,i=(0,K.useSyncExternalStore)(n,r,r);return e.find(e=>e.encoded===i)}function Fx(e){let{mediaAdapters:t}=YE(),{info:n}=jx(),{server:r,resolveUrl:i}=ux(),a=n.codeUsages.get(e),{encoded:o,pathname:s}=Px()??{};return(0,K.useMemo)(()=>{if(o&&s&&a)return a.generate({...o,url:r?i(s):ax(`https://example.com`,s)},{mediaAdapters:t,custom:null})},[o,s,r,i,a,t])}function Ix(){let{responses:e}=Mx(),{resolve:t}=YE().doc,n=W({note:`operation page`});return(0,K.useMemo)(()=>{let r=[];for(let{status:i,response:a,content:o}of e){let e=Sx(o)??null,s=e?o[e]:null,c={code:i,response:a,mediaType:e};if(s?.examples){c.examples=[];for(let[e,r]of Object.entries(s.examples)){let i=t(r),a=wx(i);a!==void 0&&c.examples.push({label:i.summary??n(`Example {key}`,{variables:{key:e}}),sample:a,description:i.description})}}else s?.example===void 0?s?.schema&&(c.examples=[{label:n(`Example`),sample:su(s.schema)}]):c.examples=[{label:n(`Example`),sample:_l(s.example)}];r.push(c)}return r},[e,t,n])}var Lx=gu(((e,t)=>{let n=function(){};n.prototype=Object.create(null);let r=new Uint8Array(65536);for(let e of"!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyz")r[e.charCodeAt(0)]=1;for(let e of`ABCDEFGHIJKLMNOPQRSTUVWXYZ`)r[e.charCodeAt(0)]=9;r[9]|=6,r[32]|=6,r[33]|=6,r[34]|=4;for(let e=35;e<=91;e++)r[e]|=6;r[92]|=4;for(let e=93;e<=126;e++)r[e]|=6;for(let e=128;e<=255;e++)r[e]|=6;function i(e,t,n){let r=``,i=t;for(;i<n;)e.charCodeAt(i)===92&&(r+=e.slice(t,i),t=++i),i++;return r+e.slice(t,n)}let a={type:``,parameters:new n};Object.freeze(a.parameters),Object.freeze(a);let o={type:``,parameters:a.parameters};Object.freeze(o);function s(e){let t=e.length,s=0,c=0,l=0;for(;s<t&&(c=e.charCodeAt(s),c===32||c===9);)s++;let u=s,d=0;for(;s<t&&(c=e.charCodeAt(s),l=r[c],l&1);)d|=l,s++;if(s===u||s===t||c!==47)return a;s++;let f=s;for(;s<t&&(c=e.charCodeAt(s),l=r[c],l&1);)d|=l,s++;if(s===f)return a;let p=s;for(;s<t&&(c=e.charCodeAt(s),c===32||c===9);)s++;if(s!==t&&c!==59)return a;let m=e.slice(u,p),h={type:d&8?m.toLowerCase():m,parameters:new n};if(s===t)return h;let g=h.parameters;for(;s<t;){for(s++;s<t&&(c=e.charCodeAt(s),c===32||c===9);)s++;if(s===t)return h;if(c===59)continue;let n=s;for(d=0;s<t&&(c=e.charCodeAt(s),l=r[c],l&1);)d|=l,s++;if(s===n||s===t||c!==61)return o;let a=e.slice(n,s);s++;let u;if(s<t&&e.charCodeAt(s)===34){s++;let n=s,a=!1;for(;s<t&&(c=e.charCodeAt(s),c!==34);)if(r[c]&2)s++;else{if(c!==92||(s++,s===t||!(r[e.charCodeAt(s)]&4)))return o;a=!0,s++}if(s===t)return o;u=a?i(e,n,s):e.slice(n,s),s++}else{let n=s;for(;s<t&&r[e.charCodeAt(s)]&1;)s++;if(s===n)return o;u=e.slice(n,s)}for(;s<t&&(c=e.charCodeAt(s),c===32||c===9);)s++;if(s!==t&&c!==59)return o;let f=d&8?a.toLowerCase():a;g[f]===void 0&&(g[f]=u)}return h}function c(e){if(typeof e!=`string`)throw TypeError(`argument header is required and must be a string`);let t=s(e);if(t===a)throw TypeError(`invalid media type`);if(t===o)throw TypeError(`invalid parameter format`);return t}function l(e){if(typeof e!=`string`)return a;let t=s(e);return t===o?a:t}t.exports.default={parse:c,safeParse:l},t.exports.parse=c,t.exports.safeParse=l,t.exports.defaultContentType=a}));Lx();var Rx=Lx();function zx(e,t){if(!t)return e;let n=new URL(t,document.baseURI);return n.searchParams.append(`url`,e),n.href}function Bx(e,{proxyUrl:t,proxyForwardCookie:n=!0,requestTimeout:r=10,onRequestInit:i}={}){return{async fetch(a,o){let s=new URL(zx(a,t),document.baseURI),c={method:o.method.toUpperCase(),cache:`no-cache`,signal:typeof r==`number`?AbortSignal.timeout(r*1e3):void 0},l=c.headers=new Headers;for(let e in o.header){let t=o.header[e];l.append(e,t.value)}if(o.bodyMediaType&&o.body){let t=Mu(o.bodyMediaType,e);if(!t)return{type:`client_error`,url:a,message:`[Fumadocs] No media adapter for ${o.bodyMediaType}, pass one to \`mediaAdapters\` of \`createOpenAPIPage()\`.`};o.bodyMediaType!==`multipart/form-data`&&l.append(`Content-Type`,o.bodyMediaType),c.body=t.encode(o)}if(t&&n){let e=Object.entries(o.cookie).map(([e,t])=>`${e}=${encodeURIComponent(t.value)}`).join(`; `);s.searchParams.set(`cookie`,e),c.credentials=`omit`}else for(let e in o.cookie){let n=o.cookie[e],r=[`${e}=${encodeURIComponent(n.value)}`];t&&s.origin!==window.location.origin&&r.push(`domain=${s.host}`),r.push(`path=/`,`max-age=30`),document.cookie=r.join(`; `)}i&&(c=await i(c));let u=performance.now();return fetch(s,c).then(async e=>{let t=await e.arrayBuffer(),{type:n,parameters:r}=(0,Rx.safeParse)(e.headers.get(`Content-Type`)??``);return{type:`response`,url:e.url,status:e.status,headers:e.headers,body:t,duration:performance.now()-u,mediaType:n||void 0,fileName:Vx(e.headers),text(){try{if(r.charset)return new TextDecoder(r.charset).decode(t)}catch{}return new TextDecoder().decode(t)}}}).catch(e=>({type:`client_error`,url:a,message:`Client side error: ${e instanceof Error?`[${e.name}] ${e.message}`:e.toString()}`}))}}}function Vx(e){let t=e.get(`Content-Disposition`);if(!t)return;let n=/(?:^|;)\s*filename\*\s*=\s*[^']*'[^']*'([^\s;"]+)/i.exec(t),r;if(n)try{r=decodeURIComponent(n[1])}catch{}if(!r){let e=/(?:^|;)\s*filename\s*=\s*(?:"((?:\\.|[^"\\])*)"|([^\s;]+))/i.exec(t);r=e?.[1]?.replace(/\\(.)/g,`$1`)??e?.[2]}return r?.replace(/^.*[/\\]/,``)||void 0}function Hx(e,t){let n=e;for(let e of t)if(Jx(n)&&Object.hasOwn(n,e))n=n[e];else if(typeof e==`number`&&Array.isArray(n))n=n[e];else return;return n}function Ux(e,t,n){if(t.length===0)return n;let r=Hx(e,t.slice(0,-1)),i=t[t.length-1];if(Jx(r))Object.defineProperty(r,i,{value:n,writable:!0,enumerable:!0,configurable:!0});else if(typeof i==`number`&&Array.isArray(r))r[i]=n;else throw Error(`missing parent object`);return e}function Wx(e,t){if(e===t)return!0;if(e==null||t==null||typeof e!=`object`||typeof t!=`object`)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>Wx(e,t[n]));if(Array.isArray(e)||Array.isArray(t)||!Jx(e)||!Jx(t))return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>Object.hasOwn(t,n)&&Wx(e[n],t[n]))}function Gx(e){return e.map(e=>typeof e==`string`?`_${e}`:`n${e}`).join(`.`)}function Kx(e,t){return t.length===0||e===t||e.startsWith(t+`.`)}function qx(e,t){if(t.length===0)return!0;if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function Jx(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null}function Yx(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Xx(e){return typeof e==`function`?e():e}var Zx=class{constructor(){this.unindexed=new Set,this.indexed=new Map}add(e){if(!e.field){this.unindexed.add(e);return}let t=Gx(e.field),n=this.indexed.get(t)??new Set;n.add(e),this.indexed.set(t,n)}remove(e){e.field?this.indexed.get(Gx(e.field))?.delete(e):this.unindexed.delete(e)}onUpdate(e,t){for(let n of this.unindexed)n.onUpdate?.(e,t);let n=Gx(e);if(t.swallow){let r=this.indexed.get(n);if(r)for(let n of r)n.onUpdate?.(e,t)}else for(let[r,i]of this.indexed.entries())if(Kx(r,n))for(let n of i)n.onUpdate?.(e,t)}onInit(e,t){for(let n of this.unindexed)n.onInit?.(e,t);let n=this.indexed.get(Gx(e));if(n)for(let r of n)r.onInit?.(e,t)}onDelete(e,t){let n=Gx(e);for(let n of this.unindexed)n.onDelete?.(e,t);for(let[r,i]of this.indexed.entries())if(Kx(r,n))for(let n of i)n.onDelete?.(e,t)}},Qx=class e{constructor(e={}){this.namespaces=new Map,this.listeners=new Zx,this.data=Xx(e)}listen(e){this.listeners.add(e)}unlisten(e){this.listeners.remove(e)}getData(){return this.data}init(e,t,n={}){if(e.length===0)return this.data;let r=[],i={swallow:!0,...n},a=this.data,o=[],s=null;for(let c=0;c<e.length;c++){let l=e[c],u=Object.hasOwn(a,l)?a[l]:void 0;if(c===e.length-1){if(u!==void 0)return u;let c=Xx(t);Yx(a,l,c),o.push(e);for(let e of o)this.listeners.onInit(e,n);return this.listeners.onUpdate(s??r,i),c}if(Jx(u)||Array.isArray(u))a=u,r.push(l);else{let t=e[c+1],n=typeof t==`number`?Array(t+1):{};Yx(a,l,n),a=n,u===void 0?(s??=[...r],r.push(l),o.push([...r])):(r.push(l),this.listeners.onUpdate(r,i),console.warn(`the original value of field ${r.join(`.`)} is overridden, this might be unexpected.`))}}}delete(e,t={}){if(e.length===0)return;let n=e.slice(0,-1),r=e[e.length-1],i=this.get(n);if(typeof r==`number`&&Array.isArray(i)){if(i.length===0)return;let a=r===i.length-1,o=i.splice(r,1);return o.length===0?void 0:(this.listeners.onDelete(e,t),this.listeners.onUpdate(n,{swallow:a,...t}),o[0])}if(Jx(i)&&Object.hasOwn(i,r)){let a=i[r];return delete i[r],this.listeners.onDelete(e,t),this.listeners.onUpdate(n,{swallow:!0,...t}),a}}get(e){return Hx(this.data,e)}update(e,t,n){try{return this.data=Ux(this.data,e,t),this.listeners.onUpdate(e,{swallow:!1,...n}),!0}catch{return!1}}namespace(t,n,r){let i=this.namespaces.get(t);return i?Object.assign(i,r):(i={engine:new e(n),...r},this.namespaces.set(t,i)),i.engine}reset(e){this.update([],e);for(let{engine:e,reset:t}of this.namespaces.values())t?.({engine:e})}},$x=(0,K.createContext)(null);function eS({value:e,children:t}){return(0,q.jsx)($x,{value:e,children:t})}function tS(e){let t=(0,K.useRef)(e);return t.current=e,(0,K.useMemo)(()=>({dataEngine:new Qx(t.current.defaultValues)}),[])}function nS(e){return e instanceof Qx?e:e?e.dataEngine:(0,K.use)($x).dataEngine}function rS(e,t={}){let n=nS(),{defaultValue:r}=t,[i]=aS(e,{defaultValue:r,compute(t){let n=[];if(!Array.isArray(t))return n;for(let r=0;r<t.length;r++)n.push({field:[...e,r],index:r});return n},isChanged(e,t){return e.length!==t.length}});return{items:i,insertItem(t){let r=n.get(e),i=Array.isArray(r)?r.length:0;n.init([...e,i],t)},removeItem(t){n.delete([...e,t])}}}function iS(e,t){let{properties:n,patternProperties:r={},defaultValue:i,fallback:a,lazy:o}=t,s=nS(),[c]=aS(e,{defaultValue:i,compute(e){return Jx(e)?Object.keys(e):[]},isChanged(e,t){return!Wx(e,t)}});return{properties:(0,K.useMemo)(()=>{let t=[],i=new Set(c);for(let[r,a]of Object.entries(n))(!o||i.has(r))&&(i.delete(r),t.push({kind:`fixed`,field:[...e,r],key:r,info:a}));for(let[n,a]of Object.entries(r)){let r=RegExp(n);for(let o of i)o.match(r)&&(i.delete(o),t.push({kind:`pattern`,info:a,key:o,pattern:n,field:[...e,o]}))}if(a)for(let n of i)t.push({kind:`fallback`,field:[...e,n],key:n,info:a});return t},[r,n,a,e,o,c]),_objectKeys:c,onAppend(t,n){t=t.trim(),t.length!==0&&s.init([...e,t],n)},onDelete(t){return s.delete([...e,t])}}}function aS(e,t={}){let{stf:n,compute:r=e=>e,defaultValue:i,isChanged:a=(e,t)=>e!==t}=t,o=nS(n),s=(0,K.useMemo)(()=>e,[Gx(e)]),c=(0,K.useRef)(void 0),l=(0,K.useCallback)(e=>{let t={field:s,onInit:e,onUpdate:e,onDelete:e};return o.listen(t),()=>{o.unlisten(t)}},[o,s]);function u(){let e=c.current;if(e&&e.engine===o&&e.field===s){let t=r(o.get(s));return a(e.value,t)&&(e.value=t),e.value}let t=r(i===void 0?o.get(s):o.init(s,i));return c.current={engine:o,field:s,value:t},t}return[(0,K.useSyncExternalStore)(l,u,u),e=>o.update(s,e)]}function oS(e){let t=nS(e.stf),n=(0,K.useRef)(e);n.current=e,(0,K.useEffect)(()=>{let r={field:e.field,onDelete(...e){return n.current.onDelete?.(...e)},onInit(...e){return n.current.onInit?.(...e)},onUpdate(...e){return n.current.onUpdate?.(...e)}};return t.listen(r),()=>{t.unlisten(r)}},[t,e.field])}function sS(e){let{namespace:t,stf:n,initial:r}=e;return nS(n).namespace(t,r,{reset({engine:e}){e.update([],Xx(r))}})}var cS=`fumadocs-openapi-flow`;function lS(e,t,n){sessionStorage.setItem(cS,JSON.stringify(t)),n&&(document.cookie=`fumadocs-openapi-oauth=${encodeURIComponent(window.location.pathname)}; path=/`),window.location.replace(e)}async function uS(e,t,{schemeId:n,scopes:r,clientId:i=``,clientSecret:a=``,username:o=``,password:s=``,clientAuth:c=`header`,serverUrl:l,redirectUrl:u,proxyUrl:d,origin:f,redirect:p,onUserCode:m,signal:h}){let{flows:g,error:_}=e.type===`openIdConnect`?await gS(e.openIdConnectUrl,l):{flows:e.type===`oauth2`&&e.flows||{}};if(!g)throw _;let v=a||t===`deviceAuthorization`?d:void 0,y=e=>zx(new URL(e,l).href,v),b=r.join(` `),x={client_id:i,client_secret:a,client_auth:c};if(t===`implicit`||t===`authorizationCode`){let e=g[t];if(!e)return;let r={...x,state:crypto.getRandomValues(new Uint32Array(4)).join(``),redirect_uri:new URL(u??window.location.pathname,window.location.origin).href,token_url:`tokenUrl`in e?y(e.tokenUrl):void 0},a=new URL(e.authorizationUrl,l);if(a.searchParams.set(`response_type`,t===`implicit`?`token`:`code`),a.searchParams.set(`client_id`,i),a.searchParams.set(`redirect_uri`,r.redirect_uri),a.searchParams.set(`scope`,b),a.searchParams.set(`state`,r.state),t===`authorizationCode`){r.code_verifier=mS(crypto.getRandomValues(new Uint8Array(32)));let e=await crypto.subtle.digest(`SHA-256`,new TextEncoder().encode(r.code_verifier));a.searchParams.set(`code_challenge`,mS(new Uint8Array(e))),a.searchParams.set(`code_challenge_method`,`S256`)}p?p(a,r):lS(a,{scheme:n,origin:f,data:r,oauth:!0},u);return}let S=g[t];if(!S?.tokenUrl)return;let C=y(S.tokenUrl);if(t===`deviceAuthorization`){let e=await fS(y(g.deviceAuthorization.deviceAuthorizationUrl),new URLSearchParams({scope:b}),x,h);m?.({userCode:e.user_code,verificationUri:e.verification_uri,verificationUriComplete:e.verification_uri_complete});let t=new URLSearchParams({grant_type:`urn:ietf:params:oauth:grant-type:device_code`,device_code:e.device_code}),n=Date.now()+e.expires_in*1e3,r=(e.interval??5)*1e3;for(;Date.now()<n;){await new Promise(e=>{setTimeout(e,r),h?.addEventListener(`abort`,e)});try{return await pS(C,t,x,h)}catch(e){let t=e instanceof Error?e.cause:void 0;if(t===`slow_down`)r+=5e3;else if(t!==`authorization_pending`)throw e}}throw Error(`The device code has expired.`)}let w=new URLSearchParams({scope:b});return t===`password`?(w.set(`grant_type`,`password`),w.set(`username`,o),w.set(`password`,s)):w.set(`grant_type`,`client_credentials`),pS(C,w,x,h)}function dS(e,t){let n=t,r=e.searchParams.get(`code`);if(r&&e.searchParams.get(`state`)===n.state){let e=new URLSearchParams({grant_type:`authorization_code`,code:r,redirect_uri:n.redirect_uri});return n.code_verifier&&e.set(`code_verifier`,n.code_verifier),pS(n.token_url,e,n)}let i=new URLSearchParams(e.hash.slice(1)),a=i.get(`access_token`);if(a&&i.get(`state`)===n.state)return`${i.get(`token_type`)??`Bearer`} ${a}`}async function fS(e,t,{client_id:n,client_secret:r,client_auth:i},a){let o={"Content-Type":`application/x-www-form-urlencoded`};i===`header`&&r?o.Authorization=`Basic ${btoa(`${encodeURIComponent(n)}:${encodeURIComponent(r)}`)}`:(n&&t.set(`client_id`,n),r&&t.set(`client_secret`,r));let s=await fetch(e,{method:`POST`,headers:o,body:t,signal:a}),c=await s.text(),l;try{l=JSON.parse(c)}catch{}if(s.ok&&l&&!l.error)return l;let u=c;throw l?.error&&(u=l.error_description?`${l.error}: ${l.error_description}`:l.error),Error(u,{cause:l?.error})}async function pS(e,t,n,r){let{access_token:i,token_type:a=`Bearer`}=await fS(e,t,n,r);return`${a} ${i}`}function mS(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}var hS=new Map;function gS(e,t){let n=new URL(e,t).href,r=hS.get(n);return r||(r=fetch(n).then(async e=>{if(!e.ok)throw Error(`${e.status} ${e.statusText}`);let t=await e.json(),r=e=>e&&new URL(e,n).href,i=r(t.authorization_endpoint),a=r(t.token_endpoint),o=r(t.device_authorization_endpoint),s=new Set(t.grant_types_supported??[`authorization_code`,`implicit`]),c={};for(let e of t.scopes_supported??[])c[e]=``;let l={};return i&&a&&s.has(`authorization_code`)&&(l.authorizationCode={authorizationUrl:i,tokenUrl:a,scopes:c}),i&&s.has(`implicit`)&&(l.implicit={authorizationUrl:i,scopes:c}),a&&s.has(`password`)&&(l.password={tokenUrl:a,scopes:c}),a&&s.has(`client_credentials`)&&(l.clientCredentials={tokenUrl:a,scopes:c}),o&&a&&s.has(`urn:ietf:params:oauth:grant-type:device_code`)&&(l.deviceAuthorization={deviceAuthorizationUrl:o,tokenUrl:a,scopes:c}),{flows:l}}),r=r.catch(e=>({error:e})),hS.set(n,r),r)}function _S(e){return(0,K.use)(gS(e,ux().resolveUrl()))}function vS(e,t){let{oauthRedirectUrl:n}=YE(),{method:r,path:i}=Mx(),{returned:a}=TS(),o=`${r} ${i}`;return(0,K.useEffect)(()=>{t&&a&&!a.oauth&&a.scheme===e.schemeId&&a.origin===o&&SS(a)&&(window.history.replaceState(null,``,window.location.pathname),t(a.url,a.data))},[a,t,e.schemeId,o]),(t,r)=>lS(t,{scheme:e.schemeId,origin:o,data:r},n)}var yS,bS=()=>()=>{};function xS(){if(yS===void 0){let e=sessionStorage.getItem(cS);sessionStorage.removeItem(cS),yS=e?{...JSON.parse(e),url:new URL(window.location.href)}:null}return yS??void 0}function SS(e){return yS===e&&(yS=null,!0)}var CS=new WeakSet,wS=(0,K.createContext)(null);function TS(){let e=(0,K.use)(wS);if(!e)throw Error(`Component must be used under <OpenAPIProvider />`);return e}function ES({children:e}){let t=tS({defaultValues:{auth:{}}}),n=(0,K.useSyncExternalStore)(bS,xS,()=>void 0),r=px(async e=>{let n=dS(e.url,e.data);n!==void 0&&window.history.replaceState(null,``,window.location.pathname);try{let r=await n;if(r===void 0)return;t.dataEngine.update([`auth`,e.scheme],r);let{client_id:i,client_secret:a,client_auth:o}=e.data,s=typeof n==`string`?{type:`implicit`,client_id:i,token:r}:{type:`authorization_code`,client_id:i,client_secret:a,client_auth:o,token:r};return{[e.scheme]:s}}finally{SS(e)}});return n?.oauth&&!CS.has(n)&&(CS.add(n),r.start(n)),(0,q.jsx)(wS,{value:(0,K.useMemo)(()=>({stf:t,returned:n,origin:n?.origin,isLoading:r.isLoading,error:r.error,store:r.data??{}}),[t,n,r.isLoading,r.error,r.data]),children:e})}var DS=[{on:({scheme:e})=>e.type===`http`&&e.scheme?.toLowerCase()===`basic`,render:({field:e,Value:t})=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(t,{name:`username`,type:`basic`,description:e.scheme.description,path:`username`}),(0,q.jsx)(t,{name:`password`,path:`password`,schema:{type:`string`,format:`password`}})]}),onRequest(e,t){let{username:n,password:r}=t;e.header.Authorization=`Basic ${btoa(`${n}:${r}`)}`}},{on:({scheme:e})=>e.type===`apiKey`,render:({field:{scheme:e},Value:t})=>e.type===`apiKey`&&(0,q.jsx)(t,{name:e.name,type:e.in,description:e.description}),onRequest(e,t,{scheme:n}){n.type===`apiKey`&&(e[n.in][n.name]=t)}},{on:({scheme:e})=>e.type===`mutualTLS`,render:()=>null,onRequest(){}},{render:({field:e,Value:t})=>(0,q.jsx)(t,{name:`Authorization`,type:`header`,description:e.scheme.description}),onRequest(e,t){e.header.Authorization=t}}];function OS(e=[],t){let n=({on:e})=>e===void 0||(typeof e==`string`?e===t.id:e(t)),r=DS.find(n);for(let t=e.length-1;t>=0;t--)n(e[t])&&(r={...r,...e[t]});return r}function kS(e){return e.type===`apiKey`?``:e.type===`mutualTLS`?null:e.type!==`http`||!e.scheme?`Bearer `:e.scheme.toLowerCase()===`basic`?{username:``,password:``}:`${e.scheme[0].toUpperCase()}${e.scheme.slice(1)} `}function AS(e,{operation:t,providers:n,transform:r}={}){let i=TS().stf.dataEngine,{storageKeyPrefix:a,doc:o}=YE(),{dereferenced:s,resolve:c}=o,l=s.components?.securitySchemes,u=(0,K.useMemo)(()=>{let e=[];if(!l)return e;for(let n of t?.security??s.security??[]){let t=[];for(let[e,r]of Object.entries(n)){let n=c(l[e]);n&&t.push({id:e,scopes:r,scheme:n})}t.length>0&&e.push(t)}return e},[s.security,t?.security,c,l]),[d,f]=(0,K.useState)(()=>{if(u.length===0)return-1;let e=u.findIndex(e=>e.every(e=>!e.scheme.deprecated));return e===-1?0:e}),p=d===-1?null:u[d],m=(0,K.useMemo)(()=>{if(!p)return[];let e=p.map(e=>({schemeId:e.id,scheme:e.scheme,scopes:e.scopes,fieldName:[`auth`,e.id],storageKey:`${a}auth-${e.id}`,defaultValue:kS(e.scheme),provider:OS(n,e)}));return r?r(e):e},[p,a,n,r]);return oS({stf:i,onUpdate(e){for(let t of m){if(!qx(e,t.fieldName)&&!qx(t.fieldName,e))continue;let n=i.get(t.fieldName);n!=null&&sessionStorage.setItem(t.storageKey,JSON.stringify(n))}}}),{requirements:u,selected:d,select:f,fields:m,mapValues:(0,K.useCallback)(e=>{let t=structuredClone({...e,auth:i.get([`auth`])}),n=t;for(let e of m)e.provider.onRequest(n,Hx(n,e.fieldName),e);return delete n.auth,t},[i,m]),init:(0,K.useCallback)(()=>{for(let e of m)i.init(e.fieldName,()=>{let t=sessionStorage.getItem(e.storageKey),n=t?JSON.parse(t):void 0;return typeof n==typeof e.defaultValue?n:e.defaultValue});return()=>{}},[i,m])}}var jS=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function MS(e){return jS.test(e)?e:JSON.stringify(e)}function NS(e){if(e===null)return`null`;switch(typeof e){case`string`:return JSON.stringify(e);case`number`:case`boolean`:return String(e);case`object`:{if(Array.isArray(e))return`[${e.map(NS).join(`, `)}]`;let t=Object.entries(e);return t.length===0?`Record<string, never>`:`{ ${t.map(([e,t])=>`${MS(e)}: ${NS(t)}`).join(`; `)} }`}default:return`unknown`}}function PS(e){let t=``;for(let n of e)t=t.length===0?n:`${t} | ${n}`;return t.length===0?`never`:t}function FS(e){let t=0,n;for(let r=0;r<e.length;r++){let i=e[r];if(n!==void 0)i===`\\`?r++:i===n&&(n=void 0);else switch(i){case`"`:case`'`:n=i;break;case`{`:case`[`:case`(`:case`<`:t++;break;case`}`:case`]`:case`)`:case`>`:t--;break;case`|`:case`&`:if(t===0)return!0}}return!1}function IS(e){return FS(e)?`(${e})`:e}function LS(e,t,n){if(typeof e!=`object`||!e)return;let r=[];n&&typeof e.title==`string`&&e.title.length>0&&r.push(e.title),typeof e.description==`string`&&e.description.length>0&&r.push(...e.description.split(`
|
|
113
113
|
`));let i=[];if(e.deprecated===!0&&i.push(`@deprecated`),e.default!==void 0&&i.push(`@default ${JSON.stringify(e.default)}`),Array.isArray(e.examples))for(let t of e.examples)i.push(`@example ${JSON.stringify(t)}`);if(r.length===0&&i.length===0)return;i.length>0&&(r.length>0&&r.push(``),r.push(...i));let a=r.map(e=>e.replaceAll(`*/`,`*\\/`));return a.length===1?`${t}/** ${a[0]} */`:`${t}/**\n${a.map(e=>`${t} *${e.length>0?` ${e}`:``}`).join(`
|
|
114
114
|
`)}\n${t} */`}var RS=class{root;names=new Map;usedNames=new Set;declarations=[];interfaceLike=new WeakMap;INDENT;includeReadOnly;includeWriteOnly;constructor(e,t){this.root=e,this.INDENT=t.tab??` `,this.includeReadOnly=t.readOnly??!1,this.includeWriteOnly=t.writeOnly??!1}emitAll(){let e=[];for(let t=0;t<this.declarations.length;t++)e.push(this.emitDeclaration(this.declarations[t]));return`${e.join(`
|