hasancode-api-docs 1.0.15 → 1.0.17

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.
@@ -0,0 +1,16 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
+ function $a(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(n,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ja(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $r={exports:{}},z={};var Jn;function Ba(){if(Jn)return z;Jn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),m=Symbol.iterator;function h(_){return _===null||typeof _!="object"?null:(_=m&&_[m]||_["@@iterator"],typeof _=="function"?_:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,b={};function w(_,T,N){this.props=_,this.context=T,this.refs=b,this.updater=N||g}w.prototype.isReactComponent={},w.prototype.setState=function(_,T){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,T,"setState")},w.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function P(){}P.prototype=w.prototype;function S(_,T,N){this.props=_,this.context=T,this.refs=b,this.updater=N||g}var D=S.prototype=new P;D.constructor=S,L(D,w.prototype),D.isPureReactComponent=!0;var k=Array.isArray;function H(){}var $={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function Z(_,T,N){var M=N.ref;return{$$typeof:e,type:_,key:T,ref:M!==void 0?M:null,props:N}}function re(_,T){return Z(_.type,T,_.props)}function le(_){return typeof _=="object"&&_!==null&&_.$$typeof===e}function X(_){var T={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(N){return T[N]})}var fe=/\/+/g;function K(_,T){return typeof _=="object"&&_!==null&&_.key!=null?X(""+_.key):T.toString(36)}function G(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(H,H):(_.status="pending",_.then(function(T){_.status==="pending"&&(_.status="fulfilled",_.value=T)},function(T){_.status==="pending"&&(_.status="rejected",_.reason=T)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function ne(_,T,N,M,q){var Y=typeof _;(Y==="undefined"||Y==="boolean")&&(_=null);var ee=!1;if(_===null)ee=!0;else switch(Y){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(_.$$typeof){case e:case t:ee=!0;break;case c:return ee=_._init,ne(ee(_._payload),T,N,M,q)}}if(ee)return q=q(_),ee=M===""?"."+K(_,0):M,k(q)?(N="",ee!=null&&(N=ee.replace(fe,"$&/")+"/"),ne(q,T,N,"",function(kr){return kr})):q!=null&&(le(q)&&(q=re(q,N+(q.key==null||_&&_.key===q.key?"":(""+q.key).replace(fe,"$&/")+"/")+ee)),T.push(q)),1;ee=0;var Ae=M===""?".":M+":";if(k(_))for(var me=0;me<_.length;me++)M=_[me],Y=Ae+K(M,me),ee+=ne(M,T,N,Y,q);else if(me=h(_),typeof me=="function")for(_=me.call(_),me=0;!(M=_.next()).done;)M=M.value,Y=Ae+K(M,me++),ee+=ne(M,T,N,Y,q);else if(Y==="object"){if(typeof _.then=="function")return ne(G(_),T,N,M,q);throw T=String(_),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return ee}function he(_,T,N){if(_==null)return _;var M=[],q=0;return ne(_,M,"","",function(Y){return T.call(N,Y,q++)}),M}function Re(_){if(_._status===-1){var T=_._result;T=T(),T.then(function(N){(_._status===0||_._status===-1)&&(_._status=1,_._result=N)},function(N){(_._status===0||_._status===-1)&&(_._status=2,_._result=N)}),_._status===-1&&(_._status=0,_._result=T)}if(_._status===1)return _._result.default;throw _._result}var Q=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},Ce={map:he,forEach:function(_,T,N){he(_,function(){T.apply(this,arguments)},N)},count:function(_){var T=0;return he(_,function(){T++}),T},toArray:function(_){return he(_,function(T){return T})||[]},only:function(_){if(!le(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return z.Activity=d,z.Children=Ce,z.Component=w,z.Fragment=r,z.Profiler=o,z.PureComponent=S,z.StrictMode=n,z.Suspense=s,z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,z.__COMPILER_RUNTIME={__proto__:null,c:function(_){return $.H.useMemoCache(_)}},z.cache=function(_){return function(){return _.apply(null,arguments)}},z.cacheSignal=function(){return null},z.cloneElement=function(_,T,N){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var M=L({},_.props),q=_.key;if(T!=null)for(Y in T.key!==void 0&&(q=""+T.key),T)!v.call(T,Y)||Y==="key"||Y==="__self"||Y==="__source"||Y==="ref"&&T.ref===void 0||(M[Y]=T[Y]);var Y=arguments.length-2;if(Y===1)M.children=N;else if(1<Y){for(var ee=Array(Y),Ae=0;Ae<Y;Ae++)ee[Ae]=arguments[Ae+2];M.children=ee}return Z(_.type,q,M)},z.createContext=function(_){return _={$$typeof:a,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:i,_context:_},_},z.createElement=function(_,T,N){var M,q={},Y=null;if(T!=null)for(M in T.key!==void 0&&(Y=""+T.key),T)v.call(T,M)&&M!=="key"&&M!=="__self"&&M!=="__source"&&(q[M]=T[M]);var ee=arguments.length-2;if(ee===1)q.children=N;else if(1<ee){for(var Ae=Array(ee),me=0;me<ee;me++)Ae[me]=arguments[me+2];q.children=Ae}if(_&&_.defaultProps)for(M in ee=_.defaultProps,ee)q[M]===void 0&&(q[M]=ee[M]);return Z(_,Y,q)},z.createRef=function(){return{current:null}},z.forwardRef=function(_){return{$$typeof:l,render:_}},z.isValidElement=le,z.lazy=function(_){return{$$typeof:c,_payload:{_status:-1,_result:_},_init:Re}},z.memo=function(_,T){return{$$typeof:u,type:_,compare:T===void 0?null:T}},z.startTransition=function(_){var T=$.T,N={};$.T=N;try{var M=_(),q=$.S;q!==null&&q(N,M),typeof M=="object"&&M!==null&&typeof M.then=="function"&&M.then(H,Q)}catch(Y){Q(Y)}finally{T!==null&&N.types!==null&&(T.types=N.types),$.T=T}},z.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},z.use=function(_){return $.H.use(_)},z.useActionState=function(_,T,N){return $.H.useActionState(_,T,N)},z.useCallback=function(_,T){return $.H.useCallback(_,T)},z.useContext=function(_){return $.H.useContext(_)},z.useDebugValue=function(){},z.useDeferredValue=function(_,T){return $.H.useDeferredValue(_,T)},z.useEffect=function(_,T){return $.H.useEffect(_,T)},z.useEffectEvent=function(_){return $.H.useEffectEvent(_)},z.useId=function(){return $.H.useId()},z.useImperativeHandle=function(_,T,N){return $.H.useImperativeHandle(_,T,N)},z.useInsertionEffect=function(_,T){return $.H.useInsertionEffect(_,T)},z.useLayoutEffect=function(_,T){return $.H.useLayoutEffect(_,T)},z.useMemo=function(_,T){return $.H.useMemo(_,T)},z.useOptimistic=function(_,T){return $.H.useOptimistic(_,T)},z.useReducer=function(_,T,N){return $.H.useReducer(_,T,N)},z.useRef=function(_){return $.H.useRef(_)},z.useState=function(_){return $.H.useState(_)},z.useSyncExternalStore=function(_,T,N){return $.H.useSyncExternalStore(_,T,N)},z.useTransition=function(){return $.H.useTransition()},z.version="19.2.4",z}var Xn;function ei(){return Xn||(Xn=1,$r.exports=Ba()),$r.exports}var E=ei();const Ua=ja(E),Fa=$a({__proto__:null,default:Ua},[E]);var jr={exports:{}},Se={};var Qn;function Ha(){if(Qn)return Se;Qn=1;var e=ei();function t(s){var u="https://react.dev/errors/"+s;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)u+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+s+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function i(s,u,c){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:d==null?null:""+d,children:s,containerInfo:u,implementation:c}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(s,u){if(s==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return Se.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,Se.createPortal=function(s,u){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(t(299));return i(s,u,null,c)},Se.flushSync=function(s){var u=a.T,c=n.p;try{if(a.T=null,n.p=2,s)return s()}finally{a.T=u,n.p=c,n.d.f()}},Se.preconnect=function(s,u){typeof s=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,n.d.C(s,u))},Se.prefetchDNS=function(s){typeof s=="string"&&n.d.D(s)},Se.preinit=function(s,u){if(typeof s=="string"&&u&&typeof u.as=="string"){var c=u.as,d=l(c,u.crossOrigin),m=typeof u.integrity=="string"?u.integrity:void 0,h=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;c==="style"?n.d.S(s,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:d,integrity:m,fetchPriority:h}):c==="script"&&n.d.X(s,{crossOrigin:d,integrity:m,fetchPriority:h,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},Se.preinitModule=function(s,u){if(typeof s=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var c=l(u.as,u.crossOrigin);n.d.M(s,{crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&n.d.M(s)},Se.preload=function(s,u){if(typeof s=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var c=u.as,d=l(c,u.crossOrigin);n.d.L(s,c,{crossOrigin:d,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},Se.preloadModule=function(s,u){if(typeof s=="string")if(u){var c=l(u.as,u.crossOrigin);n.d.m(s,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else n.d.m(s)},Se.requestFormReset=function(s){n.d.r(s)},Se.unstable_batchedUpdates=function(s,u){return s(u)},Se.useFormState=function(s,u,c){return a.H.useFormState(s,u,c)},Se.useFormStatus=function(){return a.H.useHostTransitionStatus()},Se.version="19.2.4",Se}var Zn;function za(){if(Zn)return jr.exports;Zn=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),jr.exports=Ha(),jr.exports}const ti=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();const Ga=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Wa=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase());const eo=e=>{const t=Wa(e);return t.charAt(0).toUpperCase()+t.slice(1)};var qa={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ka=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const Ya=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:a,...l},s)=>E.createElement("svg",{ref:s,...qa,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:ti("lucide",o),...!i&&!Ka(l)&&{"aria-hidden":"true"},...l},[...a.map(([u,c])=>E.createElement(u,c)),...Array.isArray(i)?i:[i]]));const Rt=(e,t)=>{const r=E.forwardRef(({className:n,...o},i)=>E.createElement(Ya,{ref:i,iconNode:t,className:ti(`lucide-${Ga(eo(e))}`,`lucide-${e}`,n),...o}));return r.displayName=eo(e),r};const Ja=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$f=Rt("check",Ja);const Xa=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],jf=Rt("chevron-right",Xa);const Qa=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Bf=Rt("copy",Qa);const Za=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Uf=Rt("panel-left-close",Za);const es=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 14v1",key:"askpd8"}],["path",{d:"M9 19v2",key:"16tejx"}],["path",{d:"M9 3v2",key:"1noubl"}],["path",{d:"M9 9v1",key:"19ebxg"}]],Ff=Rt("panel-left-dashed",es);const ts=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Hf=Rt("refresh-cw",ts);var ri=e=>{throw TypeError(e)},rs=(e,t,r)=>t.has(e)||ri("Cannot "+r),Br=(e,t,r)=>(rs(e,t,"read from private field"),r?r.call(e):t.get(e)),ns=(e,t,r)=>t.has(e)?ri("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),to="popstate";function ro(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function os(e={}){function t(n,o){let i=o.state?.masked,{pathname:a,search:l,hash:s}=i||n.location;return Vt("",{pathname:a,search:l,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default",i?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}function r(n,o){return typeof o=="string"?o:ze(o)}return as(t,r,null,e)}function J(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function de(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function is(){return Math.random().toString(36).substring(2,10)}function no(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Vt(e,t,r=null,n,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ye(t):t,state:r,key:t&&t.key||n||is(),unstable_mask:o}}function ze({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ye(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function as(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:i=!1}=n,a=o.history,l="POP",s=null,u=c();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function c(){return(a.state||{idx:null}).idx}function d(){l="POP";let b=c(),w=b==null?null:b-u;u=b,s&&s({action:l,location:L.location,delta:w})}function m(b,w){l="PUSH";let P=ro(b)?b:Vt(L.location,b,w);u=c()+1;let S=no(P,u),D=L.createHref(P.unstable_mask||P);try{a.pushState(S,"",D)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;o.location.assign(D)}i&&s&&s({action:l,location:L.location,delta:1})}function h(b,w){l="REPLACE";let P=ro(b)?b:Vt(L.location,b,w);u=c();let S=no(P,u),D=L.createHref(P.unstable_mask||P);a.replaceState(S,"",D),i&&s&&s({action:l,location:L.location,delta:0})}function g(b){return ni(b)}let L={get action(){return l},get location(){return e(o,a)},listen(b){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(to,d),s=b,()=>{o.removeEventListener(to,d),s=null}},createHref(b){return t(o,b)},createURL:g,encodeLocation(b){let w=g(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:m,replace:h,go(b){return a.go(b)}};return L}function ni(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),J(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:ze(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}var It,oo=class{constructor(e){if(ns(this,It,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Br(this,It).has(e))return Br(this,It).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Br(this,It).set(e,t)}};It=new WeakMap;var ss=new Set(["lazy","caseSensitive","path","id","index","children"]);function ls(e){return ss.has(e)}var us=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function cs(e){return us.has(e)}function ds(e){return e.index===!0}function $t(e,t,r=[],n={},o=!1){return e.map((i,a)=>{let l=[...r,String(a)],s=typeof i.id=="string"?i.id:l.join("-");if(J(i.index!==!0||!i.children,"Cannot specify children on an index route"),J(o||!n[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),ds(i)){let u={...i,id:s};return n[s]=io(u,t(u)),u}else{let u={...i,id:s,children:void 0};return n[s]=io(u,t(u)),i.children&&(u.children=$t(i.children,t,l,n,o)),u}})}function io(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Qe(e,t,r="/"){return kt(e,t,r,!1)}function kt(e,t,r,n){let o=typeof t=="string"?Ye(t):t,i=$e(o.pathname||"/",r);if(i==null)return null;let a=oi(e);hs(a);let l=null;for(let s=0;l==null&&s<a.length;++s){let u=Ss(i);l=bs(a[s],u,n)}return l}function fs(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function oi(e,t=[],r=[],n="",o=!1){let i=(a,l,s=o,u)=>{let c={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:l,route:a};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(n)&&s)return;J(c.relativePath.startsWith(n),`Absolute route path "${c.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(n.length)}let d=je([n,c.relativePath]),m=r.concat(c);a.children&&a.children.length>0&&(J(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),oi(a.children,t,m,d,s)),!(a.path==null&&!a.index)&&t.push({path:d,score:Es(d,a.index),routesMeta:m})};return e.forEach((a,l)=>{if(a.path===""||!a.path?.includes("?"))i(a,l);else for(let s of ii(a.path))i(a,l,!0,s)}),t}function ii(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return o?[i,""]:[i];let a=ii(n.join("/")),l=[];return l.push(...a.map(s=>s===""?i:[i,s].join("/"))),o&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function hs(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Rs(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var ms=/^:[\w-]+$/,ps=3,gs=2,_s=1,ys=10,vs=-2,ao=e=>e==="*";function Es(e,t){let r=e.split("/"),n=r.length;return r.some(ao)&&(n+=vs),t&&(n+=gs),r.filter(o=>!ao(o)).reduce((o,i)=>o+(ms.test(i)?ps:i===""?_s:ys),n)}function Rs(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function bs(e,t,r=!1){let{routesMeta:n}=e,o={},i="/",a=[];for(let l=0;l<n.length;++l){let s=n[l],u=l===n.length-1,c=i==="/"?t:t.slice(i.length)||"/",d=pr({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},c),m=s.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=pr({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!d)return null;Object.assign(o,d.params),a.push({params:o,pathname:je([i,d.pathname]),pathnameBase:Ts(je([i,d.pathnameBase])),route:m}),d.pathnameBase!=="/"&&(i=je([i,d.pathnameBase]))}return a}function pr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ws(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce((u,{paramName:c,isOptional:d},m)=>{if(c==="*"){let g=l[m]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const h=l[m];return d&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function ws(e,t=!1,r=!0){de(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,s,u,c)=>{if(n.push({paramName:l,isOptional:s!=null}),s){let d=c.charAt(u+a.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function Ss(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return de(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function $e(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Ls({basename:e,pathname:t}){return t==="/"?e:je([e,t])}var ai=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=e=>ai.test(e);function Ps(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?Ye(e):e,i;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?i=so(r.substring(1),"/"):i=so(r,t)):i=t,{pathname:i,search:Cs(n),hash:As(o)}}function so(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function Ur(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function si(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Pr(e){let t=si(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function zt(e,t,r,n=!1){let o;typeof e=="string"?o=Ye(e):(o={...e},J(!o.pathname||!o.pathname.includes("?"),Ur("?","pathname","search",o)),J(!o.pathname||!o.pathname.includes("#"),Ur("#","pathname","hash",o)),J(!o.search||!o.search.includes("#"),Ur("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,l;if(a==null)l=r;else{let d=t.length-1;if(!n&&a.startsWith("..")){let m=a.split("/");for(;m[0]==="..";)m.shift(),d-=1;o.pathname=m.join("/")}l=d>=0?t[d]:"/"}let s=Ps(o,l),u=a&&a!=="/"&&a.endsWith("/"),c=(i||a===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}var je=e=>e.join("/").replace(/\/\/+/g,"/"),Ts=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Cs=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,As=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Gt=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function jt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Wt(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var li=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ui(e,t){let r=e;if(typeof r!="string"||!ai.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,o=!1;if(li)try{let i=new URL(window.location.href),a=r.startsWith("//")?new URL(i.protocol+r):new URL(r),l=$e(a.pathname,t);a.origin===i.origin&&l!=null?r=l+a.search+a.hash:o=!0}catch{de(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:o,to:r}}var et=Symbol("Uninstrumented");function Os(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:t.id,index:t.index,path:t.path,instrument(i){let a=Object.keys(r);for(let l of a)i[l]&&r[l].push(i[l])}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let o=pt(r.lazy,t.lazy,()=>{});o&&(n.lazy=o)}if(typeof t.lazy=="object"){let o=t.lazy;["middleware","loader","action"].forEach(i=>{let a=o[i],l=r[`lazy.${i}`];if(typeof a=="function"&&l.length>0){let s=pt(l,a,()=>{});s&&(n.lazy=Object.assign(n.lazy||{},{[i]:s}))}})}return["loader","action"].forEach(o=>{let i=t[o];if(typeof i=="function"&&r[o].length>0){let a=i[et]??i,l=pt(r[o],a,(...s)=>lo(s[0]));l&&(o==="loader"&&a.hydrate===!0&&(l.hydrate=!0),l[et]=a,n[o]=l)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(o=>{let i=o[et]??o,a=pt(r.middleware,i,(...l)=>lo(l[0]));return a?(a[et]=i,a):o})),n}function Ds(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(o){let i=Object.keys(o);for(let a of i)o[a]&&r[a].push(o[a])}})),r.navigate.length>0){let n=e.navigate[et]??e.navigate,o=pt(r.navigate,n,(...i)=>{let[a,l]=i;return{to:typeof a=="number"||typeof a=="string"?a:a?ze(a):".",...uo(e,l??{})}});o&&(o[et]=n,e.navigate=o)}if(r.fetch.length>0){let n=e.fetch[et]??e.fetch,o=pt(r.fetch,n,(...i)=>{let[a,,l,s]=i;return{href:l??".",fetcherKey:a,...uo(e,s??{})}});o&&(o[et]=n,e.fetch=o)}return e}function pt(e,t,r){return e.length===0?null:async(...n)=>{let o=await ci(e,r(...n),()=>t(...n),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function ci(e,t,r,n){let o=e[n],i;if(o){let a,l=async()=>(a?console.error("You cannot call instrumented handlers more than once"):a=ci(e,t,r,n-1),i=await a,J(i,"Expected a result"),i.type==="error"&&i.value instanceof Error?{status:"error",error:i.value}:{status:"success",error:void 0});try{await o(l,t)}catch(s){console.error("An instrumentation function threw an error:",s)}a||await l(),await a}else try{i={type:"success",value:await r()}}catch(a){i={type:"error",value:a}}return i||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function lo(e){let{request:t,context:r,params:n,unstable_pattern:o}=e;return{request:Is(t),params:{...n},unstable_pattern:o,context:ks(r)}}function uo(e,t){return{currentUrl:ze(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function Is(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function ks(e){if(Ns(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var xs=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ns(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===xs}var di=["POST","PUT","PATCH","DELETE"],Ms=new Set(di),Vs=["GET",...di],$s=new Set(Vs),fi=new Set([301,302,303,307,308]),js=new Set([307,308]),Fr={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Bs={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ct={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Us=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),hi="remix-router-transitions",mi=Symbol("ResetLoaderData");function Fs(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";J(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],o=e.mapRouteProperties||Us,i=o;if(e.unstable_instrumentations){let p=e.unstable_instrumentations;i=y=>({...o(y),...Os(p.map(R=>R.route).filter(Boolean),y)})}let a={},l=$t(e.routes,i,void 0,a),s,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let c=e.dataStrategy||qs,d={...e.future},m=null,h=new Set,g=null,L=null,b=null,w=e.hydrationData!=null,P=Qe(l,e.history.location,u),S=!1,D=null,k,H;if(P==null&&!e.patchRoutesOnNavigation){let p=Ve(404,{pathname:e.history.location.pathname}),{matches:y,route:R}=nr(l);k=!0,H=!k,P=y,D={[R.id]:p}}else if(P&&!e.hydrationData&&Qt(P,l,e.history.location.pathname).active&&(P=null),P)if(P.some(p=>p.route.lazy))k=!1,H=!k;else if(!P.some(p=>_n(p.route)))k=!0,H=!k;else{let p=e.hydrationData?e.hydrationData.loaderData:null,y=e.hydrationData?e.hydrationData.errors:null,R=P;if(y){let C=P.findIndex(O=>y[O.route.id]!==void 0);R=R.slice(0,C+1)}H=!1,k=R.every(C=>{let O=pi(C.route,p,y);return H=H||O.renderFallback,!O.shouldLoad})}else{k=!1,H=!k,P=[];let p=Qt(null,l,e.history.location.pathname);p.active&&p.matches&&(S=!0,P=p.matches)}let $,v={historyAction:e.history.action,location:e.history.location,matches:P,initialized:k,renderFallback:H,navigation:Fr,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||D,fetchers:new Map,blockers:new Map},Z="POP",re=null,le=!1,X,fe=!1,K=new Map,G=null,ne=!1,he=!1,Re=new Set,Q=new Map,Ce=0,_=-1,T=new Map,N=new Set,M=new Map,q=new Map,Y=new Set,ee=new Map,Ae,me=null;function kr(){if(m=e.history.listen(({action:p,location:y,delta:R})=>{if(Ae){Ae(),Ae=void 0;return}de(ee.size===0||R!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let C=Gn({currentLocation:v.location,nextLocation:y,historyAction:p});if(C&&R!=null){let O=new Promise(V=>{Ae=V});e.history.go(R*-1),Xt(C,{state:"blocked",location:y,proceed(){Xt(C,{state:"proceeding",proceed:void 0,reset:void 0,location:y}),O.then(()=>e.history.go(R))},reset(){let V=new Map(v.blockers);V.set(C,Ct),be({blockers:V})}}),re?.resolve(),re=null;return}return rt(p,y)}),r){dl(t,K);let p=()=>fl(t,K);t.addEventListener("pagehide",p),G=()=>t.removeEventListener("pagehide",p)}return v.initialized||rt("POP",v.location,{initialHydration:!0}),$}function Ra(){m&&m(),G&&G(),h.clear(),X&&X.abort(),v.fetchers.forEach((p,y)=>Nr(y)),v.blockers.forEach((p,y)=>zn(y))}function ba(p){return h.add(p),()=>h.delete(p)}function be(p,y={}){p.matches&&(p.matches=p.matches.map(O=>{let V=a[O.route.id],I=O.route;return I.element!==V.element||I.errorElement!==V.errorElement||I.hydrateFallbackElement!==V.hydrateFallbackElement?{...O,route:V}:O})),v={...v,...p};let R=[],C=[];v.fetchers.forEach((O,V)=>{O.state==="idle"&&(Y.has(V)?R.push(V):C.push(V))}),Y.forEach(O=>{!v.fetchers.has(O)&&!Q.has(O)&&R.push(O)}),[...h].forEach(O=>O(v,{deletedFetchers:R,newErrors:p.errors??null,viewTransitionOpts:y.viewTransitionOpts,flushSync:y.flushSync===!0})),R.forEach(O=>Nr(O)),C.forEach(O=>v.fetchers.delete(O))}function ft(p,y,{flushSync:R}={}){let C=v.actionData!=null&&v.navigation.formMethod!=null&&Pe(v.navigation.formMethod)&&v.navigation.state==="loading"&&p.state?._isRedirect!==!0,O;y.actionData?Object.keys(y.actionData).length>0?O=y.actionData:O=null:C?O=v.actionData:O=null;let V=y.loaderData?Eo(v.loaderData,y.loaderData,y.matches||[],y.errors):v.loaderData,I=v.blockers;I.size>0&&(I=new Map(I),I.forEach((F,j)=>I.set(j,Ct)));let B=ne?!1:qn(p,y.matches||v.matches),x=le===!0||v.navigation.formMethod!=null&&Pe(v.navigation.formMethod)&&p.state?._isRedirect!==!0;s&&(l=s,s=void 0),ne||Z==="POP"||(Z==="PUSH"?e.history.push(p,p.state):Z==="REPLACE"&&e.history.replace(p,p.state));let U;if(Z==="POP"){let F=K.get(v.location.pathname);F&&F.has(p.pathname)?U={currentLocation:v.location,nextLocation:p}:K.has(p.pathname)&&(U={currentLocation:p,nextLocation:v.location})}else if(fe){let F=K.get(v.location.pathname);F?F.add(p.pathname):(F=new Set([p.pathname]),K.set(v.location.pathname,F)),U={currentLocation:v.location,nextLocation:p}}be({...y,actionData:O,loaderData:V,historyAction:Z,location:p,initialized:!0,renderFallback:!1,navigation:Fr,revalidation:"idle",restoreScrollPosition:B,preventScrollReset:x,blockers:I},{viewTransitionOpts:U,flushSync:R===!0}),Z="POP",le=!1,fe=!1,ne=!1,he=!1,re?.resolve(),re=null,me?.resolve(),me=null}async function Vn(p,y){if(re?.resolve(),re=null,typeof p=="number"){re||(re=So());let ue=re.promise;return e.history.go(p),ue}let R=en(v.location,v.matches,u,p,y?.fromRouteId,y?.relative),{path:C,submission:O,error:V}=co(!1,R,y),I;y?.unstable_mask&&(I={pathname:"",search:"",hash:"",...typeof y.unstable_mask=="string"?Ye(y.unstable_mask):{...v.location.unstable_mask,...y.unstable_mask}});let B=v.location,x=Vt(B,C,y&&y.state,void 0,I);x={...x,...e.history.encodeLocation(x)};let U=y&&y.replace!=null?y.replace:void 0,F="PUSH";U===!0?F="REPLACE":U===!1||O!=null&&Pe(O.formMethod)&&O.formAction===v.location.pathname+v.location.search&&(F="REPLACE");let j=y&&"preventScrollReset"in y?y.preventScrollReset===!0:void 0,ie=(y&&y.flushSync)===!0,oe=Gn({currentLocation:B,nextLocation:x,historyAction:F});if(oe){Xt(oe,{state:"blocked",location:x,proceed(){Xt(oe,{state:"proceeding",proceed:void 0,reset:void 0,location:x}),Vn(p,y)},reset(){let ue=new Map(v.blockers);ue.set(oe,Ct),be({blockers:ue})}});return}await rt(F,x,{submission:O,pendingError:V,preventScrollReset:j,replace:y&&y.replace,enableViewTransition:y&&y.viewTransition,flushSync:ie,callSiteDefaultShouldRevalidate:y&&y.unstable_defaultShouldRevalidate})}function wa(){me||(me=So()),xr(),be({revalidation:"loading"});let p=me.promise;return v.navigation.state==="submitting"?p:v.navigation.state==="idle"?(rt(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),p):(rt(Z||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:fe===!0}),p)}async function rt(p,y,R){X&&X.abort(),X=null,Z=p,ne=(R&&R.startUninterruptedRevalidation)===!0,xa(v.location,v.matches),le=(R&&R.preventScrollReset)===!0,fe=(R&&R.enableViewTransition)===!0;let C=s||l,O=R&&R.overrideNavigation,V=R?.initialHydration&&v.matches&&v.matches.length>0&&!S?v.matches:Qe(C,y,u),I=(R&&R.flushSync)===!0;if(V&&v.initialized&&!he&&tl(v.location,y)&&!(R&&R.submission&&Pe(R.submission.formMethod))){ft(y,{matches:V},{flushSync:I});return}let B=Qt(V,C,y.pathname);if(B.active&&B.matches&&(V=B.matches),!V){let{error:ve,notFoundMatches:Oe,route:ae}=Mr(y.pathname);ft(y,{matches:Oe,loaderData:{},errors:{[ae.id]:ve}},{flushSync:I});return}X=new AbortController;let x=mt(e.history,y,X.signal,R&&R.submission),U=e.getContext?await e.getContext():new oo,F;if(R&&R.pendingError)F=[Ze(V).route.id,{type:"error",error:R.pendingError}];else if(R&&R.submission&&Pe(R.submission.formMethod)){let ve=await Sa(x,y,R.submission,V,U,B.active,R&&R.initialHydration===!0,{replace:R.replace,flushSync:I});if(ve.shortCircuited)return;if(ve.pendingActionResult){let[Oe,ae]=ve.pendingActionResult;if(ke(ae)&&jt(ae.error)&&ae.error.status===404){X=null,ft(y,{matches:ve.matches,loaderData:{},errors:{[Oe]:ae.error}});return}}V=ve.matches||V,F=ve.pendingActionResult,O=Hr(y,R.submission),I=!1,B.active=!1,x=mt(e.history,x.url,x.signal)}let{shortCircuited:j,matches:ie,loaderData:oe,errors:ue}=await La(x,y,V,U,B.active,O,R&&R.submission,R&&R.fetcherSubmission,R&&R.replace,R&&R.initialHydration===!0,I,F,R&&R.callSiteDefaultShouldRevalidate);j||(X=null,ft(y,{matches:ie||V,...Ro(F),loaderData:oe,errors:ue}))}async function Sa(p,y,R,C,O,V,I,B={}){xr();let x=ul(y,R);if(be({navigation:x},{flushSync:B.flushSync===!0}),V){let j=await Zt(C,y.pathname,p.signal);if(j.type==="aborted")return{shortCircuited:!0};if(j.type==="error"){if(j.partialMatches.length===0){let{matches:oe,route:ue}=nr(l);return{matches:oe,pendingActionResult:[ue.id,{type:"error",error:j.error}]}}let ie=Ze(j.partialMatches).route.id;return{matches:j.partialMatches,pendingActionResult:[ie,{type:"error",error:j.error}]}}else if(j.matches)C=j.matches;else{let{notFoundMatches:ie,error:oe,route:ue}=Mr(y.pathname);return{matches:ie,pendingActionResult:[ue.id,{type:"error",error:oe}]}}}let U,F=cr(C,y);if(!F.route.action&&!F.route.lazy)U={type:"error",error:Ve(405,{method:p.method,pathname:y.pathname,routeId:F.route.id})};else{let j=_t(i,a,p,C,F,I?[]:n,O),ie=await Lt(p,j,O,null);if(U=ie[F.route.id],!U){for(let oe of C)if(ie[oe.route.id]){U=ie[oe.route.id];break}}if(p.signal.aborted)return{shortCircuited:!0}}if(lt(U)){let j;return B&&B.replace!=null?j=B.replace:j=_o(U.response.headers.get("Location"),new URL(p.url),u,e.history)===v.location.pathname+v.location.search,await nt(p,U,!0,{submission:R,replace:j}),{shortCircuited:!0}}if(ke(U)){let j=Ze(C,F.route.id);return(B&&B.replace)!==!0&&(Z="PUSH"),{matches:C,pendingActionResult:[j.route.id,U,F.route.id]}}return{matches:C,pendingActionResult:[F.route.id,U]}}async function La(p,y,R,C,O,V,I,B,x,U,F,j,ie){let oe=V||Hr(y,I),ue=I||B||wo(oe),ve=!ne&&!U;if(O){if(ve){let we=$n(j);be({navigation:oe,...we!==void 0?{actionData:we}:{}},{flushSync:F})}let te=await Zt(R,y.pathname,p.signal);if(te.type==="aborted")return{shortCircuited:!0};if(te.type==="error"){if(te.partialMatches.length===0){let{matches:ht,route:at}=nr(l);return{matches:ht,loaderData:{},errors:{[at.id]:te.error}}}let we=Ze(te.partialMatches).route.id;return{matches:te.partialMatches,loaderData:{},errors:{[we]:te.error}}}else if(te.matches)R=te.matches;else{let{error:we,notFoundMatches:ht,route:at}=Mr(y.pathname);return{matches:ht,loaderData:{},errors:{[at.id]:we}}}}let Oe=s||l,{dsMatches:ae,revalidatingFetchers:Ne}=fo(p,C,i,a,e.history,v,R,ue,y,U?[]:n,U===!0,he,Re,Y,M,N,Oe,u,e.patchRoutesOnNavigation!=null,j,ie);if(_=++Ce,!e.dataStrategy&&!ae.some(te=>te.shouldLoad)&&!ae.some(te=>te.route.middleware&&te.route.middleware.length>0)&&Ne.length===0){let te=Fn();return ft(y,{matches:R,loaderData:{},errors:j&&ke(j[1])?{[j[0]]:j[1].error}:null,...Ro(j),...te?{fetchers:new Map(v.fetchers)}:{}},{flushSync:F}),{shortCircuited:!0}}if(ve){let te={};if(!O){te.navigation=oe;let we=$n(j);we!==void 0&&(te.actionData=we)}Ne.length>0&&(te.fetchers=Pa(Ne)),be(te,{flushSync:F})}Ne.forEach(te=>{qe(te.key),te.controller&&Q.set(te.key,te.controller)});let ot=()=>Ne.forEach(te=>qe(te.key));X&&X.signal.addEventListener("abort",ot);let{loaderResults:Pt,fetcherResults:Xe}=await jn(ae,Ne,p,C);if(p.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",ot),Ne.forEach(te=>Q.delete(te.key));let Ue=or(Pt);if(Ue)return await nt(p,Ue.result,!0,{replace:x}),{shortCircuited:!0};if(Ue=or(Xe),Ue)return N.add(Ue.key),await nt(p,Ue.result,!0,{replace:x}),{shortCircuited:!0};let{loaderData:Vr,errors:Tt}=vo(v,R,Pt,j,Ne,Xe);U&&v.errors&&(Tt={...v.errors,...Tt});let it=Fn(),er=Hn(_),tr=it||er||Ne.length>0;return{matches:R,loaderData:Vr,errors:Tt,...tr?{fetchers:new Map(v.fetchers)}:{}}}function $n(p){if(p&&!ke(p[1]))return{[p[0]]:p[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function Pa(p){return p.forEach(y=>{let R=v.fetchers.get(y.key),C=At(void 0,R?R.data:void 0);v.fetchers.set(y.key,C)}),new Map(v.fetchers)}async function Ta(p,y,R,C){qe(p);let O=(C&&C.flushSync)===!0,V=s||l,I=en(v.location,v.matches,u,R,y,C?.relative),B=Qe(V,I,u),x=Qt(B,V,I);if(x.active&&x.matches&&(B=x.matches),!B){We(p,y,Ve(404,{pathname:I}),{flushSync:O});return}let{path:U,submission:F,error:j}=co(!0,I,C);if(j){We(p,y,j,{flushSync:O});return}let ie=e.getContext?await e.getContext():new oo,oe=(C&&C.preventScrollReset)===!0;if(F&&Pe(F.formMethod)){await Ca(p,y,U,B,ie,x.active,O,oe,F,C&&C.unstable_defaultShouldRevalidate);return}M.set(p,{routeId:y,path:U}),await Aa(p,y,U,B,ie,x.active,O,oe,F)}async function Ca(p,y,R,C,O,V,I,B,x,U){xr(),M.delete(p);let F=v.fetchers.get(p);Ge(p,cl(x,F),{flushSync:I});let j=new AbortController,ie=mt(e.history,R,j.signal,x);if(V){let ce=await Zt(C,new URL(ie.url).pathname,ie.signal,p);if(ce.type==="aborted")return;if(ce.type==="error"){We(p,y,ce.error,{flushSync:I});return}else if(ce.matches)C=ce.matches;else{We(p,y,Ve(404,{pathname:R}),{flushSync:I});return}}let oe=cr(C,R);if(!oe.route.action&&!oe.route.lazy){let ce=Ve(405,{method:x.formMethod,pathname:R,routeId:y});We(p,y,ce,{flushSync:I});return}Q.set(p,j);let ue=Ce,ve=_t(i,a,ie,C,oe,n,O),Oe=await Lt(ie,ve,O,p),ae=Oe[oe.route.id];if(!ae){for(let ce of ve)if(Oe[ce.route.id]){ae=Oe[ce.route.id];break}}if(ie.signal.aborted){Q.get(p)===j&&Q.delete(p);return}if(Y.has(p)){if(lt(ae)||ke(ae)){Ge(p,Ke(void 0));return}}else{if(lt(ae))if(Q.delete(p),_>ue){Ge(p,Ke(void 0));return}else return N.add(p),Ge(p,At(x)),nt(ie,ae,!1,{fetcherSubmission:x,preventScrollReset:B});if(ke(ae)){We(p,y,ae.error);return}}let Ne=v.navigation.location||v.location,ot=mt(e.history,Ne,j.signal),Pt=s||l,Xe=v.navigation.state!=="idle"?Qe(Pt,v.navigation.location,u):v.matches;J(Xe,"Didn't find any matches after fetcher action");let Ue=++Ce;T.set(p,Ue);let Vr=At(x,ae.data);v.fetchers.set(p,Vr);let{dsMatches:Tt,revalidatingFetchers:it}=fo(ot,O,i,a,e.history,v,Xe,x,Ne,n,!1,he,Re,Y,M,N,Pt,u,e.patchRoutesOnNavigation!=null,[oe.route.id,ae],U);it.filter(ce=>ce.key!==p).forEach(ce=>{let rr=ce.key,Yn=v.fetchers.get(rr),Va=At(void 0,Yn?Yn.data:void 0);v.fetchers.set(rr,Va),qe(rr),ce.controller&&Q.set(rr,ce.controller)}),be({fetchers:new Map(v.fetchers)});let er=()=>it.forEach(ce=>qe(ce.key));j.signal.addEventListener("abort",er);let{loaderResults:tr,fetcherResults:te}=await jn(Tt,it,ot,O);if(j.signal.aborted)return;if(j.signal.removeEventListener("abort",er),T.delete(p),Q.delete(p),it.forEach(ce=>Q.delete(ce.key)),v.fetchers.has(p)){let ce=Ke(ae.data);v.fetchers.set(p,ce)}let we=or(tr);if(we)return nt(ot,we.result,!1,{preventScrollReset:B});if(we=or(te),we)return N.add(we.key),nt(ot,we.result,!1,{preventScrollReset:B});let{loaderData:ht,errors:at}=vo(v,Xe,tr,void 0,it,te);Hn(Ue),v.navigation.state==="loading"&&Ue>_?(J(Z,"Expected pending action"),X&&X.abort(),ft(v.navigation.location,{matches:Xe,loaderData:ht,errors:at,fetchers:new Map(v.fetchers)})):(be({errors:at,loaderData:Eo(v.loaderData,ht,Xe,at),fetchers:new Map(v.fetchers)}),he=!1)}async function Aa(p,y,R,C,O,V,I,B,x){let U=v.fetchers.get(p);Ge(p,At(x,U?U.data:void 0),{flushSync:I});let F=new AbortController,j=mt(e.history,R,F.signal);if(V){let ae=await Zt(C,new URL(j.url).pathname,j.signal,p);if(ae.type==="aborted")return;if(ae.type==="error"){We(p,y,ae.error,{flushSync:I});return}else if(ae.matches)C=ae.matches;else{We(p,y,Ve(404,{pathname:R}),{flushSync:I});return}}let ie=cr(C,R);Q.set(p,F);let oe=Ce,ue=_t(i,a,j,C,ie,n,O),Oe=(await Lt(j,ue,O,p))[ie.route.id];if(Q.get(p)===F&&Q.delete(p),!j.signal.aborted){if(Y.has(p)){Ge(p,Ke(void 0));return}if(lt(Oe))if(_>oe){Ge(p,Ke(void 0));return}else{N.add(p),await nt(j,Oe,!1,{preventScrollReset:B});return}if(ke(Oe)){We(p,y,Oe.error);return}Ge(p,Ke(Oe.data))}}async function nt(p,y,R,{submission:C,fetcherSubmission:O,preventScrollReset:V,replace:I}={}){R||(re?.resolve(),re=null),y.response.headers.has("X-Remix-Revalidate")&&(he=!0);let B=y.response.headers.get("Location");J(B,"Expected a Location header on the redirect Response"),B=_o(B,new URL(p.url),u,e.history);let x=Vt(v.location,B,{_isRedirect:!0});if(r){let ue=!1;if(y.response.headers.has("X-Remix-Reload-Document"))ue=!0;else if(gn(B)){const ve=ni(B,!0);ue=ve.origin!==t.location.origin||$e(ve.pathname,u)==null}if(ue){I?t.location.replace(B):t.location.assign(B);return}}X=null;let U=I===!0||y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:F,formAction:j,formEncType:ie}=v.navigation;!C&&!O&&F&&j&&ie&&(C=wo(v.navigation));let oe=C||O;if(js.has(y.response.status)&&oe&&Pe(oe.formMethod))await rt(U,x,{submission:{...oe,formAction:B},preventScrollReset:V||le,enableViewTransition:R?fe:void 0});else{let ue=Hr(x,C);await rt(U,x,{overrideNavigation:ue,fetcherSubmission:O,preventScrollReset:V||le,enableViewTransition:R?fe:void 0})}}async function Lt(p,y,R,C){let O,V={};try{O=await Ys(c,p,y,C,R,!1)}catch(I){return y.filter(B=>B.shouldLoad).forEach(B=>{V[B.route.id]={type:"error",error:I}}),V}if(p.signal.aborted)return V;if(!Pe(p.method))for(let I of y){if(O[I.route.id]?.type==="error")break;!O.hasOwnProperty(I.route.id)&&!v.loaderData.hasOwnProperty(I.route.id)&&(!v.errors||!v.errors.hasOwnProperty(I.route.id))&&I.shouldCallHandler()&&(O[I.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${I.route.id}`)})}for(let[I,B]of Object.entries(O))if(il(B)){let x=B.result;V[I]={type:"redirect",response:Zs(x,p,I,y,u)}}else V[I]=await Qs(B);return V}async function jn(p,y,R,C){let O=Lt(R,p,C,null),V=Promise.all(y.map(async x=>{if(x.matches&&x.match&&x.request&&x.controller){let F=(await Lt(x.request,x.matches,C,x.key))[x.match.route.id];return{[x.key]:F}}else return Promise.resolve({[x.key]:{type:"error",error:Ve(404,{pathname:x.path})}})})),I=await O,B=(await V).reduce((x,U)=>Object.assign(x,U),{});return{loaderResults:I,fetcherResults:B}}function xr(){he=!0,M.forEach((p,y)=>{Q.has(y)&&Re.add(y),qe(y)})}function Ge(p,y,R={}){v.fetchers.set(p,y),be({fetchers:new Map(v.fetchers)},{flushSync:(R&&R.flushSync)===!0})}function We(p,y,R,C={}){let O=Ze(v.matches,y);Nr(p),be({errors:{[O.route.id]:R},fetchers:new Map(v.fetchers)},{flushSync:(C&&C.flushSync)===!0})}function Bn(p){return q.set(p,(q.get(p)||0)+1),Y.has(p)&&Y.delete(p),v.fetchers.get(p)||Bs}function Oa(p,y){qe(p,y?.reason),Ge(p,Ke(null))}function Nr(p){let y=v.fetchers.get(p);Q.has(p)&&!(y&&y.state==="loading"&&T.has(p))&&qe(p),M.delete(p),T.delete(p),N.delete(p),Y.delete(p),Re.delete(p),v.fetchers.delete(p)}function Da(p){let y=(q.get(p)||0)-1;y<=0?(q.delete(p),Y.add(p)):q.set(p,y),be({fetchers:new Map(v.fetchers)})}function qe(p,y){let R=Q.get(p);R&&(R.abort(y),Q.delete(p))}function Un(p){for(let y of p){let R=Bn(y),C=Ke(R.data);v.fetchers.set(y,C)}}function Fn(){let p=[],y=!1;for(let R of N){let C=v.fetchers.get(R);J(C,`Expected fetcher: ${R}`),C.state==="loading"&&(N.delete(R),p.push(R),y=!0)}return Un(p),y}function Hn(p){let y=[];for(let[R,C]of T)if(C<p){let O=v.fetchers.get(R);J(O,`Expected fetcher: ${R}`),O.state==="loading"&&(qe(R),T.delete(R),y.push(R))}return Un(y),y.length>0}function Ia(p,y){let R=v.blockers.get(p)||Ct;return ee.get(p)!==y&&ee.set(p,y),R}function zn(p){v.blockers.delete(p),ee.delete(p)}function Xt(p,y){let R=v.blockers.get(p)||Ct;J(R.state==="unblocked"&&y.state==="blocked"||R.state==="blocked"&&y.state==="blocked"||R.state==="blocked"&&y.state==="proceeding"||R.state==="blocked"&&y.state==="unblocked"||R.state==="proceeding"&&y.state==="unblocked",`Invalid blocker state transition: ${R.state} -> ${y.state}`);let C=new Map(v.blockers);C.set(p,y),be({blockers:C})}function Gn({currentLocation:p,nextLocation:y,historyAction:R}){if(ee.size===0)return;ee.size>1&&de(!1,"A router only supports one blocker at a time");let C=Array.from(ee.entries()),[O,V]=C[C.length-1],I=v.blockers.get(O);if(!(I&&I.state==="proceeding")&&V({currentLocation:p,nextLocation:y,historyAction:R}))return O}function Mr(p){let y=Ve(404,{pathname:p}),R=s||l,{matches:C,route:O}=nr(R);return{notFoundMatches:C,route:O,error:y}}function ka(p,y,R){if(g=p,b=y,L=R||null,!w&&v.navigation===Fr){w=!0;let C=qn(v.location,v.matches);C!=null&&be({restoreScrollPosition:C})}return()=>{g=null,b=null,L=null}}function Wn(p,y){return L&&L(p,y.map(C=>fs(C,v.loaderData)))||p.key}function xa(p,y){if(g&&b){let R=Wn(p,y);g[R]=b()}}function qn(p,y){if(g){let R=Wn(p,y),C=g[R];if(typeof C=="number")return C}return null}function Qt(p,y,R){if(e.patchRoutesOnNavigation)if(p){if(Object.keys(p[0].params).length>0)return{active:!0,matches:kt(y,R,u,!0)}}else return{active:!0,matches:kt(y,R,u,!0)||[]};return{active:!1,matches:null}}async function Zt(p,y,R,C){if(!e.patchRoutesOnNavigation)return{type:"success",matches:p};let O=p;for(;;){let V=s==null,I=s||l,B=a;try{await e.patchRoutesOnNavigation({signal:R,path:y,matches:O,fetcherKey:C,patch:(F,j)=>{R.aborted||ho(F,j,I,B,i,!1)}})}catch(F){return{type:"error",error:F,partialMatches:O}}finally{V&&!R.aborted&&(l=[...l])}if(R.aborted)return{type:"aborted"};let x=Qe(I,y,u),U=null;if(x){if(Object.keys(x[0].params).length===0)return{type:"success",matches:x};if(U=kt(I,y,u,!0),!(U&&O.length<U.length&&Kn(O,U.slice(0,O.length))))return{type:"success",matches:x}}if(U||(U=kt(I,y,u,!0)),!U||Kn(O,U))return{type:"success",matches:null};O=U}}function Kn(p,y){return p.length===y.length&&p.every((R,C)=>R.route.id===y[C].route.id)}function Na(p){a={},s=$t(p,i,void 0,a)}function Ma(p,y,R=!1){let C=s==null;ho(p,y,s||l,a,i,R),C&&(l=[...l],be({}))}return $={get basename(){return u},get future(){return d},get state(){return v},get routes(){return l},get window(){return t},initialize:kr,subscribe:ba,enableScrollRestoration:ka,navigate:Vn,fetch:Ta,revalidate:wa,createHref:p=>e.history.createHref(p),encodeLocation:p=>e.history.encodeLocation(p),getFetcher:Bn,resetFetcher:Oa,deleteFetcher:Da,dispose:Ra,getBlocker:Ia,deleteBlocker:zn,patchRoutes:Ma,_internalFetchControllers:Q,_internalSetRoutes:Na,_internalSetStateDoNotUseOrYouWillBreakYourApp(p){be(p)}},e.unstable_instrumentations&&($=Ds($,e.unstable_instrumentations.map(p=>p.router).filter(Boolean))),$}function Hs(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function en(e,t,r,n,o,i){let a,l;if(o){a=[];for(let u of t)if(a.push(u),u.route.id===o){l=u;break}}else a=t,l=t[t.length-1];let s=zt(n||".",Pr(a),$e(e.pathname,r)||e.pathname,i==="path");if(n==null&&(s.search=e.search,s.hash=e.hash),(n==null||n===""||n===".")&&l){let u=vn(s.search);if(l.route.index&&!u)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&u){let c=new URLSearchParams(s.search),d=c.getAll("index");c.delete("index"),d.filter(h=>h).forEach(h=>c.append("index",h));let m=c.toString();s.search=m?`?${m}`:""}}return r!=="/"&&(s.pathname=Ls({basename:r,pathname:s.pathname})),ze(s)}function co(e,t,r){if(!r||!Hs(r))return{path:t};if(r.formMethod&&!ll(r.formMethod))return{path:t,error:Ve(405,{method:r.formMethod})};let n=()=>({path:t,error:Ve(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),a=Ri(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Pe(i))return n();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,[h,g])=>`${m}${h}=${g}
3
+ `,""):String(r.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!Pe(i))return n();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return n()}}}J(typeof FormData=="function","FormData is not available in this environment");let l,s;if(r.formData)l=rn(r.formData),s=r.formData;else if(r.body instanceof FormData)l=rn(r.body),s=r.body;else if(r.body instanceof URLSearchParams)l=r.body,s=yo(l);else if(r.body==null)l=new URLSearchParams,s=new FormData;else try{l=new URLSearchParams(r.body),s=yo(l)}catch{return n()}let u={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(Pe(u.formMethod))return{path:t,submission:u};let c=Ye(t);return e&&c.search&&vn(c.search)&&l.append("index",""),c.search=`?${l}`,{path:ze(c),submission:u}}function fo(e,t,r,n,o,i,a,l,s,u,c,d,m,h,g,L,b,w,P,S,D){let k=S?ke(S[1])?S[1].error:S[1].data:void 0,H=o.createURL(i.location),$=o.createURL(s),v;if(c&&i.errors){let G=Object.keys(i.errors)[0];v=a.findIndex(ne=>ne.route.id===G)}else if(S&&ke(S[1])){let G=S[0];v=a.findIndex(ne=>ne.route.id===G)-1}let Z=S?S[1].statusCode:void 0,re=Z&&Z>=400,le={currentUrl:H,currentParams:i.matches[0]?.params||{},nextUrl:$,nextParams:a[0].params,...l,actionResult:k,actionStatus:Z},X=Wt(a),fe=a.map((G,ne)=>{let{route:he}=G,Re=null;if(v!=null&&ne>v)Re=!1;else if(he.lazy)Re=!0;else if(!_n(he))Re=!1;else if(c){let{shouldLoad:T}=pi(he,i.loaderData,i.errors);Re=T}else zs(i.loaderData,i.matches[ne],G)&&(Re=!0);if(Re!==null)return tn(r,n,e,X,G,u,t,Re);let Q=!1;typeof D=="boolean"?Q=D:re?Q=!1:(d||H.pathname+H.search===$.pathname+$.search||H.search!==$.search||Gs(i.matches[ne],G))&&(Q=!0);let Ce={...le,defaultShouldRevalidate:Q},_=Nt(G,Ce);return tn(r,n,e,X,G,u,t,_,Ce,D)}),K=[];return g.forEach((G,ne)=>{if(c||!a.some(M=>M.route.id===G.routeId)||h.has(ne))return;let he=i.fetchers.get(ne),Re=he&&he.state!=="idle"&&he.data===void 0,Q=Qe(b,G.path,w);if(!Q){if(P&&Re)return;K.push({key:ne,routeId:G.routeId,path:G.path,matches:null,match:null,request:null,controller:null});return}if(L.has(ne))return;let Ce=cr(Q,G.path),_=new AbortController,T=mt(o,G.path,_.signal),N=null;if(m.has(ne))m.delete(ne),N=_t(r,n,T,Q,Ce,u,t);else if(Re)d&&(N=_t(r,n,T,Q,Ce,u,t));else{let M;typeof D=="boolean"?M=D:re?M=!1:M=d;let q={...le,defaultShouldRevalidate:M};Nt(Ce,q)&&(N=_t(r,n,T,Q,Ce,u,t,q))}N&&K.push({key:ne,routeId:G.routeId,path:G.path,matches:N,match:Ce,request:T,controller:_})}),{dsMatches:fe,revalidatingFetchers:K}}function _n(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function pi(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!_n(e))return{shouldLoad:!1,renderFallback:!1};let n=t!=null&&e.id in t,o=r!=null&&r[e.id]!==void 0;if(!n&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!n};let i=!n&&!o;return{shouldLoad:i,renderFallback:i}}function zs(e,t,r){let n=!t||r.route.id!==t.route.id,o=!e.hasOwnProperty(r.route.id);return n||o}function Gs(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Nt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function ho(e,t,r,n,o,i){let a;if(e){let u=n[e];J(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),a=u.children}else a=r;let l=[],s=[];if(t.forEach(u=>{let c=a.find(d=>gi(u,d));c?s.push({existingRoute:c,newRoute:u}):l.push(u)}),l.length>0){let u=$t(l,o,[e||"_","patch",String(a?.length||"0")],n);a.push(...u)}if(i&&s.length>0)for(let u=0;u<s.length;u++){let{existingRoute:c,newRoute:d}=s[u],m=c,[h]=$t([d],o,[],{},!0);Object.assign(m,{element:h.element?h.element:m.element,errorElement:h.errorElement?h.errorElement:m.errorElement,hydrateFallbackElement:h.hydrateFallbackElement?h.hydrateFallbackElement:m.hydrateFallbackElement})}}function gi(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((r,n)=>t.children?.some(o=>gi(r,o)))??!1:!1}var mo=new WeakMap,_i=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let o=r[t.id];if(J(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let i=o.lazy[e];if(!i)return;let a=mo.get(o);a||(a={},mo.set(o,a));let l=a[e];if(l)return l;let s=(async()=>{let u=ls(e),d=o[e]!==void 0&&e!=="hasErrorBoundary";if(u)de(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),a[e]=Promise.resolve();else if(d)de(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let m=await i();m!=null&&(Object.assign(o,{[e]:m}),Object.assign(o,n(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(m=>m===void 0)&&(o.lazy=void 0))})();return a[e]=s,s},po=new WeakMap;function Ws(e,t,r,n,o){let i=r[e.id];if(J(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let c=po.get(i);if(c)return{lazyRoutePromise:c,lazyHandlerPromise:c};let d=(async()=>{J(typeof e.lazy=="function","No lazy route function found");let m=await e.lazy(),h={};for(let g in m){let L=m[g];if(L===void 0)continue;let b=cs(g),P=i[g]!==void 0&&g!=="hasErrorBoundary";b?de(!b,"Route property "+g+" is not a supported property to be returned from a lazy route function. This property will be ignored."):P?de(!P,`Route "${i.id}" has a static property "${g}" defined but its lazy function is also returning a value for this property. The lazy route property "${g}" will be ignored.`):h[g]=L}Object.assign(i,h),Object.assign(i,{...n(i),lazy:void 0})})();return po.set(i,d),d.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:d}}let a=Object.keys(e.lazy),l=[],s;for(let c of a){if(o&&o.includes(c))continue;let d=_i({key:c,route:e,manifest:r,mapRouteProperties:n});d&&(l.push(d),c===t&&(s=d))}let u=l.length>0?Promise.all(l).then(()=>{}):void 0;return u?.catch(()=>{}),s?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:s}}async function go(e){let t=e.matches.filter(o=>o.shouldLoad),r={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,i)=>{r[t[i].route.id]=o}),r}async function qs(e){return e.matches.some(t=>t.route.middleware)?yi(e,()=>go(e)):go(e)}function yi(e,t){return Ks(e,t,n=>{if(sl(n))throw n;return n},nl,r);function r(n,o,i){if(i)return Promise.resolve(Object.assign(i.value,{[o]:{type:"error",result:n}}));{let{matches:a}=e,l=Math.min(Math.max(a.findIndex(u=>u.route.id===o),0),Math.max(a.findIndex(u=>u.shouldCallHandler()),0)),s=Ze(a,a[l].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:n}})}}}async function Ks(e,t,r,n,o){let{matches:i,request:a,params:l,context:s,unstable_pattern:u}=e,c=i.flatMap(m=>m.route.middleware?m.route.middleware.map(h=>[m.route.id,h]):[]);return await vi({request:a,params:l,context:s,unstable_pattern:u},c,t,r,n,o)}async function vi(e,t,r,n,o,i,a=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let s=t[a];if(!s)return await r();let[u,c]=s,d,m=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");try{return d={value:await vi(e,t,r,n,o,i,a+1)},d.value}catch(h){return d={value:await i(h,u,d)},d.value}};try{let h=await c(e,m),g=h!=null?n(h):void 0;return o(g)?g:d?g??d.value:(d={value:await m()},d.value)}catch(h){return await i(h,u,d)}}function Ei(e,t,r,n,o){let i=_i({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),a=Ws(n.route,Pe(r.method)?"action":"loader",t,e,o);return{middleware:i,route:a.lazyRoutePromise,handler:a.lazyHandlerPromise}}function tn(e,t,r,n,o,i,a,l,s=null,u){let c=!1,d=Ei(e,t,r,o,i);return{...o,_lazyPromises:d,shouldLoad:l,shouldRevalidateArgs:s,shouldCallHandler(m){return c=!0,s?typeof u=="boolean"?Nt(o,{...s,defaultShouldRevalidate:u}):typeof m=="boolean"?Nt(o,{...s,defaultShouldRevalidate:m}):Nt(o,s):l},resolve(m){let{lazy:h,loader:g,middleware:L}=o.route,b=c||l||m&&!Pe(r.method)&&(h||g),w=L&&L.length>0&&!g&&!h;return b&&(Pe(r.method)||!w)?Js({request:r,unstable_pattern:n,match:o,lazyHandlerPromise:d?.handler,lazyRoutePromise:d?.route,handlerOverride:m,scopedContext:a}):Promise.resolve({type:"data",result:void 0})}}}function _t(e,t,r,n,o,i,a,l=null){return n.map(s=>s.route.id!==o.route.id?{...s,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:Ei(e,t,r,s,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:tn(e,t,r,Wt(n),s,i,a,!0,l))}async function Ys(e,t,r,n,o,i){r.some(u=>u._lazyPromises?.middleware)&&await Promise.all(r.map(u=>u._lazyPromises?.middleware));let a={request:t,unstable_pattern:Wt(r),params:r[0].params,context:o,matches:r},s=await e({...a,fetcherKey:n,runClientMiddleware:u=>{let c=a;return yi(c,()=>u({...c,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(u=>[u._lazyPromises?.handler,u._lazyPromises?.route]))}catch{}return s}async function Js({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:n,lazyRoutePromise:o,handlerOverride:i,scopedContext:a}){let l,s,u=Pe(e.method),c=u?"action":"loader",d=m=>{let h,g=new Promise((w,P)=>h=P);s=()=>h(),e.signal.addEventListener("abort",s);let L=w=>typeof m!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${c}" [routeId: ${r.route.id}]`)):m({request:e,unstable_pattern:t,params:r.params,context:a},...w!==void 0?[w]:[]),b=(async()=>{try{return{type:"data",result:await(i?i(P=>L(P)):L())}}catch(w){return{type:"error",result:w}}})();return Promise.race([b,g])};try{let m=u?r.route.action:r.route.loader;if(n||o)if(m){let h,[g]=await Promise.all([d(m).catch(L=>{h=L}),n,o]);if(h!==void 0)throw h;l=g}else{await n;let h=u?r.route.action:r.route.loader;if(h)[l]=await Promise.all([d(h),o]);else if(c==="action"){let g=new URL(e.url),L=g.pathname+g.search;throw Ve(405,{method:e.method,pathname:L,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(m)l=await d(m);else{let h=new URL(e.url),g=h.pathname+h.search;throw Ve(404,{pathname:g})}}catch(m){return{type:"error",result:m}}finally{s&&e.signal.removeEventListener("abort",s)}return l}async function Xs(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Qs(e){let{result:t,type:r}=e;if(yn(t)){let n;try{n=await Xs(t)}catch(o){return{type:"error",error:o}}return r==="error"?{type:"error",error:new Gt(t.status,t.statusText,n),statusCode:t.status,headers:t.headers}:{type:"data",data:n,statusCode:t.status,headers:t.headers}}return r==="error"?bo(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:rl(t),statusCode:jt(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:jt(t)?t.status:void 0}:bo(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Zs(e,t,r,n,o){let i=e.headers.get("Location");if(J(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!gn(i)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);i=en(new URL(t.url),a,o,i),e.headers.set("Location",i)}return e}function _o(e,t,r,n){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(gn(e)){let i=e,a=i.startsWith("//")?new URL(t.protocol+i):new URL(i);if(o.includes(a.protocol))throw new Error("Invalid redirect location");let l=$e(a.pathname,r)!=null;if(a.origin===t.origin&&l)return a.pathname+a.search+a.hash}try{let i=n.createURL(e);if(o.includes(i.protocol))throw new Error("Invalid redirect location")}catch{}return e}function mt(e,t,r,n){let o=e.createURL(Ri(t)).toString(),i={signal:r};if(n&&Pe(n.formMethod)){let{formMethod:a,formEncType:l}=n;i.method=a.toUpperCase(),l==="application/json"?(i.headers=new Headers({"Content-Type":l}),i.body=JSON.stringify(n.json)):l==="text/plain"?i.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?i.body=rn(n.formData):i.body=n.formData}return new Request(o,i)}function rn(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function yo(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function el(e,t,r,n=!1,o=!1){let i={},a=null,l,s=!1,u={},c=r&&ke(r[1])?r[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let m=d.route.id,h=t[m];if(J(!lt(h),"Cannot handle redirect results in processLoaderData"),ke(h)){let g=h.error;if(c!==void 0&&(g=c,c=void 0),a=a||{},o)a[m]=g;else{let L=Ze(e,m);a[L.route.id]==null&&(a[L.route.id]=g)}n||(i[m]=mi),s||(s=!0,l=jt(h.error)?h.error.status:500),h.headers&&(u[m]=h.headers)}else i[m]=h.data,h.statusCode&&h.statusCode!==200&&!s&&(l=h.statusCode),h.headers&&(u[m]=h.headers)}),c!==void 0&&r&&(a={[r[0]]:c},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:a,statusCode:l||200,loaderHeaders:u}}function vo(e,t,r,n,o,i){let{loaderData:a,errors:l}=el(t,r,n);return o.filter(s=>!s.matches||s.matches.some(u=>u.shouldLoad)).forEach(s=>{let{key:u,match:c,controller:d}=s;if(d&&d.signal.aborted)return;let m=i[u];if(J(m,"Did not find corresponding fetcher result"),ke(m)){let h=Ze(e.matches,c?.route.id);l&&l[h.route.id]||(l={...l,[h.route.id]:m.error}),e.fetchers.delete(u)}else if(lt(m))J(!1,"Unhandled fetcher revalidation redirect");else{let h=Ke(m.data);e.fetchers.set(u,h)}}),{loaderData:a,errors:l}}function Eo(e,t,r,n){let o=Object.entries(t).filter(([,i])=>i!==mi).reduce((i,[a,l])=>(i[a]=l,i),{});for(let i of r){let a=i.route.id;if(!t.hasOwnProperty(a)&&e.hasOwnProperty(a)&&i.route.loader&&(o[a]=e[a]),n&&n.hasOwnProperty(a))break}return o}function Ro(e){return e?ke(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ze(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function nr(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ve(e,{pathname:t,routeId:r,method:n,type:o,message:i}={}){let a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",n&&t&&r?l=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l=`Route "${r}" does not match URL "${t}"`):e===404?(a="Not Found",l=`No route matches URL "${t}"`):e===405&&(a="Method Not Allowed",n&&t&&r?l=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(l=`Invalid request method "${n.toUpperCase()}"`)),new Gt(e||500,a,new Error(l),!0)}function or(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,o]=t[r];if(lt(o))return{key:n,result:o}}}function Ri(e){let t=typeof e=="string"?Ye(e):e;return ze({...t,hash:""})}function tl(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function rl(e){return new Gt(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function nl(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&ol(r))}function ol(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function il(e){return yn(e.result)&&fi.has(e.result.status)}function ke(e){return e.type==="error"}function lt(e){return(e&&e.type)==="redirect"}function bo(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function yn(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function al(e){return fi.has(e)}function sl(e){return yn(e)&&al(e.status)&&e.headers.has("Location")}function ll(e){return $s.has(e.toUpperCase())}function Pe(e){return Ms.has(e.toUpperCase())}function vn(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function cr(e,t){let r=typeof t=="string"?Ye(t).search:t.search;if(e[e.length-1].route.index&&vn(r||""))return e[e.length-1];let n=si(e);return n[n.length-1]}function wo(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:i,json:a}=e;if(!(!t||!r||!n)){if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function Hr(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function ul(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function At(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function cl(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ke(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function dl(e,t){try{let r=e.sessionStorage.getItem(hi);if(r){let n=JSON.parse(r);for(let[o,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function fl(e,t){if(t.size>0){let r={};for(let[n,o]of t)r[n]=[...o];try{e.sessionStorage.setItem(hi,JSON.stringify(r))}catch(n){de(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function So(){let e,t,r=new Promise((n,o)=>{e=async i=>{n(i);try{await r}catch{}},t=async i=>{o(i);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var ct=E.createContext(null);ct.displayName="DataRouter";var qt=E.createContext(null);qt.displayName="DataRouterState";var bi=E.createContext(!1);function hl(){return E.useContext(bi)}var En=E.createContext({isTransitioning:!1});En.displayName="ViewTransition";var wi=E.createContext(new Map);wi.displayName="Fetchers";var ml=E.createContext(null);ml.displayName="Await";var xe=E.createContext(null);xe.displayName="Navigation";var Tr=E.createContext(null);Tr.displayName="Location";var Be=E.createContext({outlet:null,matches:[],isDataRoute:!1});Be.displayName="Route";var Rn=E.createContext(null);Rn.displayName="RouteError";var Si="REACT_ROUTER_ERROR",pl="REDIRECT",gl="ROUTE_ERROR_RESPONSE";function _l(e){if(e.startsWith(`${Si}:${pl}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function yl(e){if(e.startsWith(`${Si}:${gl}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Gt(t.status,t.statusText,t.data)}catch{}}function vl(e,{relative:t}={}){J(bt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=E.useContext(xe),{hash:o,pathname:i,search:a}=Kt(e,{relative:t}),l=i;return r!=="/"&&(l=i==="/"?r:je([r,i])),n.createHref({pathname:l,search:a,hash:o})}function bt(){return E.useContext(Tr)!=null}function Je(){return J(bt(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Tr).location}var Li="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Pi(e){E.useContext(xe).static||E.useLayoutEffect(e)}function Ti(){let{isDataRoute:e}=E.useContext(Be);return e?Il():El()}function El(){J(bt(),"useNavigate() may be used only in the context of a <Router> component.");let e=E.useContext(ct),{basename:t,navigator:r}=E.useContext(xe),{matches:n}=E.useContext(Be),{pathname:o}=Je(),i=JSON.stringify(Pr(n)),a=E.useRef(!1);return Pi(()=>{a.current=!0}),E.useCallback((s,u={})=>{if(de(a.current,Li),!a.current)return;if(typeof s=="number"){r.go(s);return}let c=zt(s,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:je([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,o,e])}E.createContext(null);function zf(){let{matches:e}=E.useContext(Be),t=e[e.length-1];return t?t.params:{}}function Kt(e,{relative:t}={}){let{matches:r}=E.useContext(Be),{pathname:n}=Je(),o=JSON.stringify(Pr(r));return E.useMemo(()=>zt(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function Rl(e,t,r){J(bt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=E.useContext(xe),{matches:o}=E.useContext(Be),i=o[o.length-1],a=i?i.params:{},l=i?i.pathname:"/",s=i?i.pathnameBase:"/",u=i&&i.route;{let b=u&&u.path||"";Ai(l,!u||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
4
+
5
+ Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let c=Je(),d;d=c;let m=d.pathname||"/",h=m;if(s!=="/"){let b=s.replace(/^\//,"").split("/");h="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=Qe(e,{pathname:h});return de(u||g!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),de(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Pl(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:je([s,n.encodeLocation?n.encodeLocation(b.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?s:je([s,n.encodeLocation?n.encodeLocation(b.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),o,r)}function bl(){let e=Dl(),t=jt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:i},"ErrorBoundary")," or"," ",E.createElement("code",{style:i},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),r?E.createElement("pre",{style:o},r):null,a)}var wl=E.createElement(bl,null),Ci=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=yl(e.digest);r&&(e=r)}let t=e!==void 0?E.createElement(Be.Provider,{value:this.props.routeContext},E.createElement(Rn.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?E.createElement(Sl,{error:e},t):t}};Ci.contextType=bi;var zr=new WeakMap;function Sl({children:e,error:t}){let{basename:r}=E.useContext(xe);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=_l(t.digest);if(n){let o=zr.get(t);if(o)throw o;let i=ui(n.location,r);if(li&&!zr.get(t))if(i.isExternal||n.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const a=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw zr.set(t,a),a}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function Ll({routeContext:e,match:t,children:r}){let n=E.useContext(ct);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),E.createElement(Be.Provider,{value:e},r)}function Pl(e,t=[],r){let n=r?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,i=n?.errors;if(i!=null){let c=o.findIndex(d=>d.route.id&&i?.[d.route.id]!==void 0);J(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,c+1))}let a=!1,l=-1;if(r&&n){a=n.renderFallback;for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=c),d.route.id){let{loaderData:m,errors:h}=n,g=d.route.loader&&!m.hasOwnProperty(d.route.id)&&(!h||h[d.route.id]===void 0);if(d.route.lazy||g){r.isStatic&&(a=!0),l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}}let s=r?.onError,u=n&&s?(c,d)=>{s(c,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Wt(n.matches),errorInfo:d})}:void 0;return o.reduceRight((c,d,m)=>{let h,g=!1,L=null,b=null;n&&(h=i&&d.route.id?i[d.route.id]:void 0,L=d.route.errorElement||wl,a&&(l<0&&m===0?(Ai("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,b=null):l===m&&(g=!0,b=d.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,m+1)),P=()=>{let S;return h?S=L:g?S=b:d.route.Component?S=E.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=c,E.createElement(Ll,{match:d,routeContext:{outlet:c,matches:w,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?E.createElement(Ci,{location:n.location,revalidation:n.revalidation,component:L,error:h,children:P(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:u}):P()},null)}function bn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tl(e){let t=E.useContext(ct);return J(t,bn(e)),t}function Cl(e){let t=E.useContext(qt);return J(t,bn(e)),t}function Al(e){let t=E.useContext(Be);return J(t,bn(e)),t}function wn(e){let t=Al(e),r=t.matches[t.matches.length-1];return J(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ol(){return wn("useRouteId")}function Dl(){let e=E.useContext(Rn),t=Cl("useRouteError"),r=wn("useRouteError");return e!==void 0?e:t.errors?.[r]}function Il(){let{router:e}=Tl("useNavigate"),t=wn("useNavigate"),r=E.useRef(!1);return Pi(()=>{r.current=!0}),E.useCallback(async(o,i={})=>{de(r.current,Li),r.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...i}))},[e,t])}var Lo={};function Ai(e,t,r){!t&&!Lo[e]&&(Lo[e]=!0,de(!1,r))}var Po={};function To(e,t){!e&&!Po[t]&&(Po[t]=!0,console.warn(t))}var kl="useOptimistic",Co=Fa[kl],xl=()=>{};function Nl(e){return Co?Co(e):[e,xl]}function Ml(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&de(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:E.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&de(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:E.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&de(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:E.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Vl=["HydrateFallback","hydrateFallbackElement"],$l=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function jl({router:e,flushSync:t,onError:r,unstable_useTransitions:n}){n=hl()||n;let[i,a]=E.useState(e.state),[l,s]=Nl(i),[u,c]=E.useState(),[d,m]=E.useState({isTransitioning:!1}),[h,g]=E.useState(),[L,b]=E.useState(),[w,P]=E.useState(),S=E.useRef(new Map),D=E.useCallback((v,{deletedFetchers:Z,newErrors:re,flushSync:le,viewTransitionOpts:X})=>{re&&r&&Object.values(re).forEach(K=>r(K,{location:v.location,params:v.matches[0]?.params??{},unstable_pattern:Wt(v.matches)})),v.fetchers.forEach((K,G)=>{K.data!==void 0&&S.current.set(G,K.data)}),Z.forEach(K=>S.current.delete(K)),To(le===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let fe=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(To(X==null||fe,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!X||!fe){t&&le?t(()=>a(v)):n===!1?a(v):E.startTransition(()=>{n===!0&&s(K=>Ao(K,v)),a(v)});return}if(t&&le){t(()=>{L&&(h?.resolve(),L.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let K=e.window.document.startViewTransition(()=>{t(()=>a(v))});K.finished.finally(()=>{t(()=>{g(void 0),b(void 0),c(void 0),m({isTransitioning:!1})})}),t(()=>b(K));return}L?(h?.resolve(),L.skipTransition(),P({state:v,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(c(v),m({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[e.window,t,L,h,n,s,r]);E.useLayoutEffect(()=>e.subscribe(D),[e,D]),E.useEffect(()=>{d.isTransitioning&&!d.flushSync&&g(new $l)},[d]),E.useEffect(()=>{if(h&&u&&e.window){let v=u,Z=h.promise,re=e.window.document.startViewTransition(async()=>{n===!1?a(v):E.startTransition(()=>{n===!0&&s(le=>Ao(le,v)),a(v)}),await Z});re.finished.finally(()=>{g(void 0),b(void 0),c(void 0),m({isTransitioning:!1})}),b(re)}},[u,h,e.window,n,s]),E.useEffect(()=>{h&&u&&l.location.key===u.location.key&&h.resolve()},[h,L,l.location,u]),E.useEffect(()=>{!d.isTransitioning&&w&&(c(w.state),m({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),P(void 0))},[d.isTransitioning,w]);let k=E.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:v=>e.navigate(v),push:(v,Z,re)=>e.navigate(v,{state:Z,preventScrollReset:re?.preventScrollReset}),replace:(v,Z,re)=>e.navigate(v,{replace:!0,state:Z,preventScrollReset:re?.preventScrollReset})}),[e]),H=e.basename||"/",$=E.useMemo(()=>({router:e,navigator:k,static:!1,basename:H,onError:r}),[e,k,H,r]);return E.createElement(E.Fragment,null,E.createElement(ct.Provider,{value:$},E.createElement(qt.Provider,{value:l},E.createElement(wi.Provider,{value:S.current},E.createElement(En.Provider,{value:d},E.createElement(Fl,{basename:H,location:l.location,navigationType:l.historyAction,navigator:k,unstable_useTransitions:n},E.createElement(Bl,{routes:e.routes,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function Ao(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var Bl=E.memo(Ul);function Ul({routes:e,future:t,state:r,isStatic:n,onError:o}){return Rl(e,void 0,{state:r,isStatic:n,onError:o})}function Gf({to:e,replace:t,state:r,relative:n}){J(bt(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=E.useContext(xe);de(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=E.useContext(Be),{pathname:a}=Je(),l=Ti(),s=zt(e,Pr(i),a,n==="path"),u=JSON.stringify(s);return E.useEffect(()=>{l(JSON.parse(u),{replace:t,state:r,relative:n})},[l,u,n,t,r]),null}function Fl({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:i=!1,unstable_useTransitions:a}){J(!bt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=E.useMemo(()=>({basename:l,navigator:o,static:i,unstable_useTransitions:a,future:{}}),[l,o,i,a]);typeof r=="string"&&(r=Ye(r));let{pathname:u="/",search:c="",hash:d="",state:m=null,key:h="default",unstable_mask:g}=r,L=E.useMemo(()=>{let b=$e(u,l);return b==null?null:{location:{pathname:b,search:c,hash:d,state:m,key:h,unstable_mask:g},navigationType:n}},[l,u,c,d,m,h,n,g]);return de(L!=null,`<Router basename="${l}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),L==null?null:E.createElement(xe.Provider,{value:s},E.createElement(Tr.Provider,{children:t,value:L}))}var dr="get",fr="application/x-www-form-urlencoded";function Cr(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Hl(e){return Cr(e)&&e.tagName.toLowerCase()==="button"}function zl(e){return Cr(e)&&e.tagName.toLowerCase()==="form"}function Gl(e){return Cr(e)&&e.tagName.toLowerCase()==="input"}function Wl(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ql(e,t){return e.button===0&&(!t||t==="_self")&&!Wl(e)}var ir=null;function Kl(){if(ir===null)try{new FormData(document.createElement("form"),0),ir=!1}catch{ir=!0}return ir}var Yl=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gr(e){return e!=null&&!Yl.has(e)?(de(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${fr}"`),null):e}function Jl(e,t){let r,n,o,i,a;if(zl(e)){let l=e.getAttribute("action");n=l?$e(l,t):null,r=e.getAttribute("method")||dr,o=Gr(e.getAttribute("enctype"))||fr,i=new FormData(e)}else if(Hl(e)||Gl(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(n=s?$e(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||dr,o=Gr(e.getAttribute("formenctype"))||Gr(l.getAttribute("enctype"))||fr,i=new FormData(l,e),!Kl()){let{name:u,type:c,value:d}=e;if(c==="image"){let m=u?`${u}.`:"";i.append(`${m}x`,"0"),i.append(`${m}y`,"0")}else u&&i.append(u,d)}}else{if(Cr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=dr,n=null,o=fr,a=e}return i&&o==="text/plain"&&(a=i,i=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:i,body:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Sn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Xl(e,t,r,n){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${n}`:o.pathname=`${o.pathname}.${n}`:o.pathname==="/"?o.pathname=`_root.${n}`:t&&$e(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${n}`,o}async function Ql(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Zl(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function eu(e,t,r){let n=await Promise.all(e.map(async o=>{let i=t.routes[o.route.id];if(i){let a=await Ql(i,r);return a.links?a.links():[]}return[]}));return ou(n.flat(1).filter(Zl).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Oo(e,t,r,n,o,i){let a=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return i==="assets"?t.filter((s,u)=>a(s,u)||l(s,u)):i==="data"?t.filter((s,u)=>{let c=n.routes[s.route.id];if(!c||!c.hasLoader)return!1;if(a(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function tu(e,t,{includeHydrateFallback:r}={}){return ru(e.map(n=>{let o=t.routes[n.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}function ru(e){return[...new Set(e)]}function nu(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function ou(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let i=JSON.stringify(nu(o));return r.has(i)||(r.add(i),n.push({key:i,link:o})),n},[])}function Oi(){let e=E.useContext(ct);return Sn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function iu(){let e=E.useContext(qt);return Sn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ln=E.createContext(void 0);Ln.displayName="FrameworkContext";function Di(){let e=E.useContext(Ln);return Sn(e,"You must render this element inside a <HydratedRouter> element"),e}function au(e,t){let r=E.useContext(Ln),[n,o]=E.useState(!1),[i,a]=E.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,m=E.useRef(null);E.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let L=w=>{w.forEach(P=>{a(P.isIntersecting)})},b=new IntersectionObserver(L,{threshold:.5});return m.current&&b.observe(m.current),()=>{b.disconnect()}}},[e]),E.useEffect(()=>{if(n){let L=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(L)}}},[n]);let h=()=>{o(!0)},g=()=>{o(!1),a(!1)};return r?e!=="intent"?[i,m,{}]:[i,m,{onFocus:Ot(l,h),onBlur:Ot(s,g),onMouseEnter:Ot(u,h),onMouseLeave:Ot(c,g),onTouchStart:Ot(d,h)}]:[!1,m,{}]}function Ot(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function su({page:e,...t}){let{router:r}=Oi(),n=E.useMemo(()=>Qe(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?E.createElement(uu,{page:e,matches:n,...t}):null}function lu(e){let{manifest:t,routeModules:r}=Di(),[n,o]=E.useState([]);return E.useEffect(()=>{let i=!1;return eu(e,t,r).then(a=>{i||o(a)}),()=>{i=!0}},[e,t,r]),n}function uu({page:e,matches:t,...r}){let n=Je(),{future:o,manifest:i,routeModules:a}=Di(),{basename:l}=Oi(),{loaderData:s,matches:u}=iu(),c=E.useMemo(()=>Oo(e,t,u,i,n,"data"),[e,t,u,i,n]),d=E.useMemo(()=>Oo(e,t,u,i,n,"assets"),[e,t,u,i,n]),m=E.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let L=new Set,b=!1;if(t.forEach(P=>{let S=i.routes[P.route.id];!S||!S.hasLoader||(!c.some(D=>D.route.id===P.route.id)&&P.route.id in s&&a[P.route.id]?.shouldRevalidate||S.hasClientLoader?b=!0:L.add(P.route.id))}),L.size===0)return[];let w=Xl(e,l,o.unstable_trailingSlashAwareDataRequests,"data");return b&&L.size>0&&w.searchParams.set("_routes",t.filter(P=>L.has(P.route.id)).map(P=>P.route.id).join(",")),[w.pathname+w.search]},[l,o.unstable_trailingSlashAwareDataRequests,s,n,i,c,t,e,a]),h=E.useMemo(()=>tu(d,i),[d,i]),g=lu(d);return E.createElement(E.Fragment,null,m.map(L=>E.createElement("link",{key:L,rel:"prefetch",as:"fetch",href:L,...r})),h.map(L=>E.createElement("link",{key:L,rel:"modulepreload",href:L,...r})),g.map(({key:L,link:b})=>E.createElement("link",{key:L,nonce:r.nonce,...b,crossOrigin:b.crossOrigin??r.crossOrigin})))}function cu(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var du=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{du&&(window.__reactRouterVersion="7.13.1")}catch{}function Wf(e,t){return Fs({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:os({window:t?.window}),hydrationData:fu(),routes:e,mapRouteProperties:Ml,hydrationRouteProperties:Vl,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function fu(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:hu(e.errors)}),e}function hu(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,o]of t)if(o&&o.__type==="RouteErrorResponse")r[n]=new Gt(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let a=new i(o.message);a.stack="",r[n]=a}catch{}}if(r[n]==null){let i=new Error(o.message);i.stack="",r[n]=i}}else r[n]=o;return r}var Ii=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ki=E.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:i,replace:a,unstable_mask:l,state:s,target:u,to:c,preventScrollReset:d,viewTransition:m,unstable_defaultShouldRevalidate:h,...g},L){let{basename:b,navigator:w,unstable_useTransitions:P}=E.useContext(xe),S=typeof c=="string"&&Ii.test(c),D=ui(c,b);c=D.to;let k=vl(c,{relative:o}),H=Je(),$=null;if(l){let G=zt(l,[],H.unstable_mask?H.unstable_mask.pathname:"/",!0);b!=="/"&&(G.pathname=G.pathname==="/"?b:je([b,G.pathname])),$=w.createHref(G)}let[v,Z,re]=au(n,g),le=_u(c,{replace:a,unstable_mask:l,state:s,target:u,preventScrollReset:d,relative:o,viewTransition:m,unstable_defaultShouldRevalidate:h,unstable_useTransitions:P});function X(G){t&&t(G),G.defaultPrevented||le(G)}let fe=!(D.isExternal||i),K=E.createElement("a",{...g,...re,href:(fe?$:void 0)||D.absoluteURL||k,onClick:fe?X:t,ref:cu(L,Z),target:u,"data-discover":!S&&r==="render"?"true":void 0});return v&&!S?E.createElement(E.Fragment,null,K,E.createElement(su,{page:k})):K});ki.displayName="Link";var mu=E.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:i,to:a,viewTransition:l,children:s,...u},c){let d=Kt(a,{relative:u.relative}),m=Je(),h=E.useContext(qt),{navigator:g,basename:L}=E.useContext(xe),b=h!=null&&bu(d)&&l===!0,w=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,P=m.pathname,S=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;r||(P=P.toLowerCase(),S=S?S.toLowerCase():null,w=w.toLowerCase()),S&&L&&(S=$e(S,L)||S);const D=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=P===w||!o&&P.startsWith(w)&&P.charAt(D)==="/",H=S!=null&&(S===w||!o&&S.startsWith(w)&&S.charAt(w.length)==="/"),$={isActive:k,isPending:H,isTransitioning:b},v=k?t:void 0,Z;typeof n=="function"?Z=n($):Z=[n,k?"active":null,H?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let re=typeof i=="function"?i($):i;return E.createElement(ki,{...u,"aria-current":v,className:Z,ref:c,style:re,to:a,viewTransition:l},typeof s=="function"?s($):s)});mu.displayName="NavLink";var pu=E.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:i,method:a=dr,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:m,...h},g)=>{let{unstable_useTransitions:L}=E.useContext(xe),b=Eu(),w=Ru(l,{relative:u}),P=a.toLowerCase()==="get"?"get":"post",S=typeof l=="string"&&Ii.test(l),D=k=>{if(s&&s(k),k.defaultPrevented)return;k.preventDefault();let H=k.nativeEvent.submitter,$=H?.getAttribute("formmethod")||a,v=()=>b(H||k.currentTarget,{fetcherKey:t,method:$,navigate:r,replace:o,state:i,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:m});L&&r!==!1?E.startTransition(()=>v()):v()};return E.createElement("form",{ref:g,method:P,action:w,onSubmit:n?s:D,...h,"data-discover":!S&&e==="render"?"true":void 0})});pu.displayName="Form";function gu(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xi(e){let t=E.useContext(ct);return J(t,gu(e)),t}function _u(e,{target:t,replace:r,unstable_mask:n,state:o,preventScrollReset:i,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:s,unstable_useTransitions:u}={}){let c=Ti(),d=Je(),m=Kt(e,{relative:a});return E.useCallback(h=>{if(ql(h,t)){h.preventDefault();let g=r!==void 0?r:ze(d)===ze(m),L=()=>c(e,{replace:g,unstable_mask:n,state:o,preventScrollReset:i,relative:a,viewTransition:l,unstable_defaultShouldRevalidate:s});u?E.startTransition(()=>L()):L()}},[d,c,m,r,n,o,t,e,i,a,l,s,u])}var yu=0,vu=()=>`__${String(++yu)}__`;function Eu(){let{router:e}=xi("useSubmit"),{basename:t}=E.useContext(xe),r=Ol(),n=e.fetch,o=e.navigate;return E.useCallback(async(i,a={})=>{let{action:l,method:s,encType:u,formData:c,body:d}=Jl(i,t);if(a.navigate===!1){let m=a.fetcherKey||vu();await n(m,r,a.action||l,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:c,body:d,formMethod:a.method||s,formEncType:a.encType||u,flushSync:a.flushSync})}else await o(a.action||l,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:c,body:d,formMethod:a.method||s,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,o,t,r])}function Ru(e,{relative:t}={}){let{basename:r}=E.useContext(xe),n=E.useContext(Be);J(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),i={...Kt(e||".",{relative:t})},a=Je();if(e==null){i.search=a.search;let l=new URLSearchParams(i.search),s=l.getAll("index");if(s.some(c=>c==="")){l.delete("index"),s.filter(d=>d).forEach(d=>l.append("index",d));let c=l.toString();i.search=c?`?${c}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:je([r,i.pathname])),ze(i)}function bu(e,{relative:t}={}){let r=E.useContext(En);J(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=xi("useViewTransitionState"),o=Kt(e,{relative:t});if(!r.isTransitioning)return!1;let i=$e(r.currentLocation.pathname,n)||r.currentLocation.pathname,a=$e(r.nextLocation.pathname,n)||r.nextLocation.pathname;return pr(o.pathname,a)!=null||pr(o.pathname,i)!=null}var wu=za();function qf(e){return E.createElement(jl,{flushSync:wu.flushSync,...e})}const Su="modulepreload",Lu=function(e){return"/api-docs/"+e},Do={},f=function(t,r,n){let o=Promise.resolve();if(r&&r.length>0){let s=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");o=s(r.map(u=>{if(u=Lu(u),u in Do)return;Do[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const m=document.createElement("link");if(m.rel=c?"stylesheet":Su,c||(m.as="script"),m.crossOrigin="",m.href=u,l&&m.setAttribute("nonce",l),document.head.appendChild(m),c)return new Promise((h,g)=>{m.addEventListener("load",h),m.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return o.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};let ge=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Pu(e){return Pn(e)}function Pn(e){return Array.isArray(e)?Tu(e):e instanceof RegExp?e:typeof e=="object"?Cu(e):e}function Tu(e){let t=[];for(let r=0,n=e.length;r<n;r++)t[r]=Pn(e[r]);return t}function Cu(e){let t={};for(let r in e)t[r]=Pn(e[r]);return t}function Ni(e,...t){return t.forEach(r=>{for(let n in r)e[n]=r[n]}),e}function Mi(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Mi(e.substring(0,e.length-1)):e.substr(~t+1)}var Wr=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ar=class{static hasCaptures(e){return e===null?!1:(Wr.lastIndex=0,Wr.test(e))}static replaceCaptures(e,t,r){return e.replace(Wr,(n,o,i,a)=>{let l=r[parseInt(o||i,10)];if(l){let s=t.substring(l.start,l.end);for(;s[0]===".";)s=s.substring(1);switch(a){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return n})}};function Vi(e,t){return e<t?-1:e>t?1:0}function $i(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let r=e.length,n=t.length;if(r===n){for(let o=0;o<r;o++){let i=Vi(e[o],t[o]);if(i!==0)return i}return 0}return r-n}function Io(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 ji(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Bi=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},gr=class{constructor(e,t,r){this._colorMap=e,this._defaults=t,this._root=r}static createFromRawTheme(e,t){return this.createFromParsedTheme(Du(e),t)}static createFromParsedTheme(e,t){return ku(e,t)}_cachedMatchRoot=new Bi(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(o=>Au(e.parent,o.parentScopes));return n?new Ui(n.fontStyle,n.foreground,n.background):null}},qr=class hr{constructor(t,r){this.parent=t,this.scopeName=r}static push(t,r){for(const n of r)t=new hr(t,n);return t}static from(...t){let r=null;for(let n=0;n<t.length;n++)r=new hr(r,t[n]);return r}push(t){return new hr(this,t)}getSegments(){let t=this;const r=[];for(;t;)r.push(t.scopeName),t=t.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push(n.scopeName),n=n.parent;return n===t?r.reverse():void 0}};function Au(e,t){if(t.length===0)return!0;for(let r=0;r<t.length;r++){let n=t[r],o=!1;if(n===">"){if(r===t.length-1)return!1;n=t[++r],o=!0}for(;e&&!Ou(e.scopeName,n);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ou(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Ui=class{constructor(e,t,r){this.fontStyle=e,this.foregroundId=t,this.backgroundId=r}};function Du(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,r=[],n=0;for(let o=0,i=t.length;o<i;o++){let a=t[o];if(!a.settings)continue;let l;if(typeof a.scope=="string"){let d=a.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),l=d.split(",")}else Array.isArray(a.scope)?l=a.scope:l=[""];let s=-1;if(typeof a.settings.fontStyle=="string"){s=0;let d=a.settings.fontStyle.split(" ");for(let m=0,h=d.length;m<h;m++)switch(d[m]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let u=null;typeof a.settings.foreground=="string"&&Io(a.settings.foreground)&&(u=a.settings.foreground);let c=null;typeof a.settings.background=="string"&&Io(a.settings.background)&&(c=a.settings.background);for(let d=0,m=l.length;d<m;d++){let g=l[d].trim().split(" "),L=g[g.length-1],b=null;g.length>1&&(b=g.slice(0,g.length-1),b.reverse()),r[n++]=new Iu(L,b,o,s,u,c)}}return r}var Iu=class{constructor(e,t,r,n,o,i){this.scope=e,this.parentScopes=t,this.index=r,this.fontStyle=n,this.foreground=o,this.background=i}},Te=(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))(Te||{});function ku(e,t){e.sort((s,u)=>{let c=Vi(s.scope,u.scope);return c!==0||(c=$i(s.parentScopes,u.parentScopes),c!==0)?c:s.index-u.index});let r=0,n="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let s=e.shift();s.fontStyle!==-1&&(r=s.fontStyle),s.foreground!==null&&(n=s.foreground),s.background!==null&&(o=s.background)}let i=new xu(t),a=new Ui(r,i.getId(n),i.getId(o)),l=new Mu(new nn(0,null,-1,0,0),[]);for(let s=0,u=e.length;s<u;s++){let c=e[s];l.insert(0,c.scope,c.parentScopes,c.fontStyle,i.getId(c.foreground),i.getId(c.background))}return new gr(i,a,l)}var xu=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,r=e.length;t<r;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Nu=Object.freeze([]),nn=class Fi{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,r,n,o,i){this.scopeDepth=t,this.parentScopes=r||Nu,this.fontStyle=n,this.foreground=o,this.background=i}clone(){return new Fi(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let r=[];for(let n=0,o=t.length;n<o;n++)r[n]=t[n].clone();return r}acceptOverwrite(t,r,n,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),o!==0&&(this.background=o)}},Mu=class on{constructor(t,r=[],n={}){this._mainRule=t,this._children=n,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(t,r){if(t.scopeDepth!==r.scopeDepth)return r.scopeDepth-t.scopeDepth;let n=0,o=0;for(;t.parentScopes[n]===">"&&n++,r.parentScopes[o]===">"&&o++,!(n>=t.parentScopes.length||o>=r.parentScopes.length);){const i=r.parentScopes[o].length-t.parentScopes[n].length;if(i!==0)return i;n++,o++}return r.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let n=t.indexOf("."),o,i;if(n===-1?(o=t,i=""):(o=t.substring(0,n),i=t.substring(n+1)),this._children.hasOwnProperty(o))return this._children[o].match(i)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(on._cmpBySpecificity),r}insert(t,r,n,o,i,a){if(r===""){this._doInsertHere(t,n,o,i,a);return}let l=r.indexOf("."),s,u;l===-1?(s=r,u=""):(s=r.substring(0,l),u=r.substring(l+1));let c;this._children.hasOwnProperty(s)?c=this._children[s]:(c=new on(this._mainRule.clone(),nn.cloneArr(this._rulesWithParentScopes)),this._children[s]=c),c.insert(t+1,u,n,o,i,a)}_doInsertHere(t,r,n,o,i){if(r===null){this._mainRule.acceptOverwrite(t,n,o,i);return}for(let a=0,l=this._rulesWithParentScopes.length;a<l;a++){let s=this._rulesWithParentScopes[a];if($i(s.parentScopes,r)===0){s.acceptOverwrite(t,n,o,i);return}}n===-1&&(n=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new nn(t,r,n,o,i))}},Et=class Me{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const r=Me.getLanguageId(t),n=Me.getTokenType(t),o=Me.getFontStyle(t),i=Me.getForeground(t),a=Me.getBackground(t);console.log({languageId:r,tokenType:n,fontStyle:o,foreground:i,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,r,n,o,i,a,l){let s=Me.getLanguageId(t),u=Me.getTokenType(t),c=Me.containsBalancedBrackets(t)?1:0,d=Me.getFontStyle(t),m=Me.getForeground(t),h=Me.getBackground(t);return r!==0&&(s=r),n!==8&&(u=n),o!==null&&(c=o?1:0),i!==-1&&(d=i),a!==0&&(m=a),l!==0&&(h=l),(s<<0|u<<8|c<<10|d<<11|m<<15|h<<24)>>>0}};function _r(e,t){const r=[],n=Vu(e);let o=n.next();for(;o!==null;){let s=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=n.next()}let u=a();if(r.push({matcher:u,priority:s}),o!==",")break;o=n.next()}return r;function i(){if(o==="-"){o=n.next();const s=i();return u=>!!s&&!s(u)}if(o==="("){o=n.next();const s=l();return o===")"&&(o=n.next()),s}if(ko(o)){const s=[];do s.push(o),o=n.next();while(ko(o));return u=>t(s,u)}return null}function a(){const s=[];let u=i();for(;u;)s.push(u),u=i();return c=>s.every(d=>d(c))}function l(){const s=[];let u=a();for(;u&&(s.push(u),o==="|"||o===",");){do o=n.next();while(o==="|"||o===",");u=a()}return c=>s.some(d=>d(c))}}function ko(e){return!!e&&!!e.match(/[\w\.:]+/)}function Vu(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=t.exec(e);return{next:()=>{if(!r)return null;const n=r[0];return r=t.exec(e),n}}}function Hi(e){typeof e.dispose=="function"&&e.dispose()}var Bt=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},$u=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ju=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Bu=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Bt(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new ju;for(const r of e)Uu(r,this.initialScopeName,this.repo,t);for(const r of t.references)if(r instanceof Bt){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function Uu(e,t,r,n){const o=r.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=r.lookup(t);e instanceof Bt?mr({baseGrammar:i,selfGrammar:o},n):an(e.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},n);const a=r.injections(e.scopeName);if(a)for(const l of a)n.add(new Bt(l))}function an(e,t,r){if(t.repository&&t.repository[e]){const n=t.repository[e];yr([n],t,r)}}function mr(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&yr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&yr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function yr(e,t,r){for(const n of e){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const o=n.repository?Ni({},t.repository,n.repository):t.repository;Array.isArray(n.patterns)&&yr(n.patterns,{...t,repository:o},r);const i=n.include;if(!i)continue;const a=zi(i);switch(a.kind){case 0:mr({...t,selfGrammar:t.baseGrammar},r);break;case 1:mr(t,r);break;case 2:an(a.ruleName,{...t,repository:o},r);break;case 3:case 4:const l=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(l){const s={baseGrammar:t.baseGrammar,selfGrammar:l,repository:o};a.kind===4?an(a.ruleName,s,r):mr(s,r)}else a.kind===4?r.add(new $u(a.scopeName,a.ruleName)):r.add(new Bt(a.scopeName));break}}}var Fu=class{kind=0},Hu=class{kind=1},zu=class{constructor(e){this.ruleName=e}kind=2},Gu=class{constructor(e){this.scopeName=e}kind=3},Wu=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function zi(e){if(e==="$base")return new Fu;if(e==="$self")return new Hu;const t=e.indexOf("#");if(t===-1)return new Gu(e);if(t===0)return new zu(e.substring(1));{const r=e.substring(0,t),n=e.substring(t+1);return new Wu(r,n)}}var qu=/\\(\d+)/,xo=/\\(\d+)/g,Ku=-1,Gi=-2;var Yt=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,r,n){this.$location=e,this.id=t,this._name=r||null,this._nameIsCapturing=ar.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=ar.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Mi(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:ar.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ar.replaceCaptures(this._contentName,e,t)}},Yu=class extends Yt{retokenizeCapturedWithRuleId;constructor(e,t,r,n,o){super(e,t,r,n),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,r,n){throw new Error("Not supported!")}},Ju=class extends Yt{_match;captures;_cachedCompiledPatterns;constructor(e,t,r,n,o){super(e,t,r,null),this._match=new Ut(n,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=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,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ft,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},No=class extends Yt{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,o){super(e,t,r,n),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const r of this.patterns)e.getRule(r).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ft,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},sn=class extends Yt{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,r,n,o,i,a,l,s,u){super(e,t,r,n),this._begin=new Ut(o,this.id),this.beginCaptures=i,this._end=new Ut(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=s||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(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,r,n){return this._getCachedCompiledPatterns(e,t).compileAG(e,r,n)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ft;for(const r of this.patterns)e.getRule(r).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}},vr=class extends Yt{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,r,n,o,i,a,l,s){super(e,t,r,n),this._begin=new Ut(o,this.id),this.beginCaptures=i,this.whileCaptures=l,this._while=new Ut(a,Gi),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(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,r,n){return this._getCachedCompiledPatterns(e).compileAG(e,r,n)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ft;for(const 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,r,n){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,r,n)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ft,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Wi=class Le{static createCaptureRule(t,r,n,o,i){return t.registerRule(a=>new Yu(r,a,n,o,i))}static getCompiledRuleId(t,r,n){return t.id||r.registerRule(o=>{if(t.id=o,t.match)return new Ju(t.$vscodeTextmateLocation,t.id,t.name,t.match,Le._compileCaptures(t.captures,r,n));if(typeof t.begin>"u"){t.repository&&(n=Ni({},n,t.repository));let i=t.patterns;return typeof i>"u"&&t.include&&(i=[{include:t.include}]),new No(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Le._compilePatterns(i,r,n))}return t.while?new vr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Le._compileCaptures(t.beginCaptures||t.captures,r,n),t.while,Le._compileCaptures(t.whileCaptures||t.captures,r,n),Le._compilePatterns(t.patterns,r,n)):new sn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Le._compileCaptures(t.beginCaptures||t.captures,r,n),t.end,Le._compileCaptures(t.endCaptures||t.captures,r,n),t.applyEndPatternLast,Le._compilePatterns(t.patterns,r,n))}),t.id}static _compileCaptures(t,r,n){let o=[];if(t){let i=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const l=parseInt(a,10);l>i&&(i=l)}for(let a=0;a<=i;a++)o[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const l=parseInt(a,10);let s=0;t[a].patterns&&(s=Le.getCompiledRuleId(t[a],r,n)),o[l]=Le.createCaptureRule(r,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return o}static _compilePatterns(t,r,n){let o=[];if(t)for(let i=0,a=t.length;i<a;i++){const l=t[i];let s=-1;if(l.include){const u=zi(l.include);switch(u.kind){case 0:case 1:s=Le.getCompiledRuleId(n[l.include],r,n);break;case 2:let c=n[u.ruleName];c&&(s=Le.getCompiledRuleId(c,r,n));break;case 3:case 4:const d=u.scopeName,m=u.kind===4?u.ruleName:null,h=r.getExternalGrammar(d,n);if(h)if(m){let g=h.repository[m];g&&(s=Le.getCompiledRuleId(g,r,h.repository))}else s=Le.getCompiledRuleId(h.repository.$self,r,h.repository);break}}else s=Le.getCompiledRuleId(l,r,n);if(s!==-1){const u=r.getRule(s);let c=!1;if((u instanceof No||u instanceof sn||u instanceof vr)&&u.hasMissingPatterns&&u.patterns.length===0&&(c=!0),c)continue;o.push(s)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Ut=class qi{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,r){if(t&&typeof t=="string"){const n=t.length;let o=0,i=[],a=!1;for(let l=0;l<n;l++)if(t.charAt(l)==="\\"&&l+1<n){const u=t.charAt(l+1);u==="z"?(i.push(t.substring(o,l)),i.push("$(?!\\n)(?<!\\n)"),o=l+2):(u==="A"||u==="G")&&(a=!0),l++}this.hasAnchor=a,o===0?this.source=t:(i.push(t.substring(o,n)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=qu.test(this.source):this.hasBackReferences=!1}clone(){return new qi(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(o=>t.substring(o.start,o.end));return xo.lastIndex=0,this.source.replace(xo,(o,i)=>ji(n[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],r=[],n=[],o=[],i,a,l,s;for(i=0,a=this.source.length;i<a;i++)l=this.source.charAt(i),t[i]=l,r[i]=l,n[i]=l,o[i]=l,l==="\\"&&i+1<a&&(s=this.source.charAt(i+1),s==="A"?(t[i+1]="￿",r[i+1]="￿",n[i+1]="A",o[i+1]="A"):s==="G"?(t[i+1]="￿",r[i+1]="G",n[i+1]="￿",o[i+1]="G"):(t[i+1]=s,r[i+1]=s,n[i+1]=s,o[i+1]=s),i++);return{A0_G0:t.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:o.join("")}}resolveAnchors(t,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ft=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(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(r=>r.source);this._cached=new Mo(e,t,this._items.map(r=>r.ruleId))}return this._cached}compileAG(e,t,r){return this._hasAnchors?t?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,r)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,r){let n=this._items.map(o=>o.resolveAnchors(t,r));return new Mo(e,n,this._items.map(o=>o.ruleId))}},Mo=class{constructor(e,t,r){this.regExps=t,this.rules=r,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,r=this.rules.length;t<r;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
6
+ `)}findNextMatchSync(e,t,r){const n=this.scanner.findNextMatchSync(e,t,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},Kr=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Xu=class ln{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,r){this._defaultAttributes=new Kr(t,8),this._embeddedLanguagesMatcher=new Qu(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?ln._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Kr(0,0);_getBasicScopeAttributes=new Bi(t=>{const r=this._scopeToLanguage(t),n=this._toStandardTokenType(t);return new Kr(r,n)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const r=t.match(ln.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Qu=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([r,n])=>ji(r));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Vo=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Ki(e,t,r,n,o,i,a,l){const s=t.content.length;let u=!1,c=-1;if(a){const h=Zu(e,t,r,n,o,i);o=h.stack,n=h.linePos,r=h.isFirstLine,c=h.anchorPosition}const d=Date.now();for(;!u;){if(l!==0&&Date.now()-d>l)return new Vo(o,!0);m()}return new Vo(o,!1);function m(){const h=ec(e,t,r,n,o,c);if(!h){i.produce(o,s),u=!0;return}const g=h.captureIndices,L=h.matchedRuleId,b=g&&g.length>0?g[0].end>n:!1;if(L===Ku){const w=o.getRule(e);i.produce(o,g[0].start),o=o.withContentNameScopesList(o.nameScopesList),xt(e,t,r,o,i,w.endCaptures,g),i.produce(o,g[0].end);const P=o;if(o=o.parent,c=P.getAnchorPos(),!b&&P.getEnterPos()===n){o=P,i.produce(o,s),u=!0;return}}else{const w=e.getRule(L);i.produce(o,g[0].start);const P=o,S=w.getName(t.content,g),D=o.contentNameScopesList.pushAttributed(S,e);if(o=o.push(L,n,c,g[0].end===s,null,D,D),w instanceof sn){const k=w;xt(e,t,r,o,i,k.beginCaptures,g),i.produce(o,g[0].end),c=g[0].end;const H=k.getContentName(t.content,g),$=D.pushAttributed(H,e);if(o=o.withContentNameScopesList($),k.endHasBackReferences&&(o=o.withEndRule(k.getEndWithResolvedBackReferences(t.content,g))),!b&&P.hasSameRuleAs(o)){o=o.pop(),i.produce(o,s),u=!0;return}}else if(w instanceof vr){const k=w;xt(e,t,r,o,i,k.beginCaptures,g),i.produce(o,g[0].end),c=g[0].end;const H=k.getContentName(t.content,g),$=D.pushAttributed(H,e);if(o=o.withContentNameScopesList($),k.whileHasBackReferences&&(o=o.withEndRule(k.getWhileWithResolvedBackReferences(t.content,g))),!b&&P.hasSameRuleAs(o)){o=o.pop(),i.produce(o,s),u=!0;return}}else if(xt(e,t,r,o,i,w.captures,g),i.produce(o,g[0].end),o=o.pop(),!b){o=o.safePop(),i.produce(o,s),u=!0;return}}g[0].end>n&&(n=g[0].end,r=!1)}}function Zu(e,t,r,n,o,i){let a=o.beginRuleCapturedEOL?0:-1;const l=[];for(let s=o;s;s=s.pop()){const u=s.getRule(e);u instanceof vr&&l.push({rule:u,stack:s})}for(let s=l.pop();s;s=l.pop()){const{ruleScanner:u,findOptions:c}=nc(s.rule,e,s.stack.endRule,r,n===a),d=u.findNextMatchSync(t,n,c);if(d){if(d.ruleId!==Gi){o=s.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(i.produce(s.stack,d.captureIndices[0].start),xt(e,t,r,s.stack,i,s.rule.whileCaptures,d.captureIndices),i.produce(s.stack,d.captureIndices[0].end),a=d.captureIndices[0].end,d.captureIndices[0].end>n&&(n=d.captureIndices[0].end,r=!1))}else{o=s.stack.pop();break}}return{stack:o,linePos:n,anchorPosition:a,isFirstLine:r}}function ec(e,t,r,n,o,i){const a=tc(e,t,r,n,o,i),l=e.getInjections();if(l.length===0)return a;const s=rc(l,e,t,r,n,o,i);if(!s)return a;if(!a)return s;const u=a.captureIndices[0].start,c=s.captureIndices[0].start;return c<u||s.priorityMatch&&c===u?s:a}function tc(e,t,r,n,o,i){const a=o.getRule(e),{ruleScanner:l,findOptions:s}=Yi(a,e,o.endRule,r,n===i),u=l.findNextMatchSync(t,n,s);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function rc(e,t,r,n,o,i,a){let l=Number.MAX_VALUE,s=null,u,c=0;const d=i.contentNameScopesList.getScopeNames();for(let m=0,h=e.length;m<h;m++){const g=e[m];if(!g.matcher(d))continue;const L=t.getRule(g.ruleId),{ruleScanner:b,findOptions:w}=Yi(L,t,null,n,o===a),P=b.findNextMatchSync(r,o,w);if(!P)continue;const S=P.captureIndices[0].start;if(!(S>=l)&&(l=S,s=P.captureIndices,u=P.ruleId,c=g.priority,l===o))break}return s?{priorityMatch:c===-1,captureIndices:s,matchedRuleId:u}:null}function Yi(e,t,r,n,o){return{ruleScanner:e.compileAG(t,r,n,o),findOptions:0}}function nc(e,t,r,n,o){return{ruleScanner:e.compileWhileAG(t,r,n,o),findOptions:0}}function xt(e,t,r,n,o,i,a){if(i.length===0)return;const l=t.content,s=Math.min(i.length,a.length),u=[],c=a[0].end;for(let d=0;d<s;d++){const m=i[d];if(m===null)continue;const h=a[d];if(h.length===0)continue;if(h.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?o.produceFromScopes(u[u.length-1].scopes,h.start):o.produce(n,h.start),m.retokenizeCapturedWithRuleId){const L=m.getName(l,a),b=n.contentNameScopesList.pushAttributed(L,e),w=m.getContentName(l,a),P=b.pushAttributed(w,e),S=n.push(m.retokenizeCapturedWithRuleId,h.start,-1,!1,null,b,P),D=e.createOnigString(l.substring(0,h.end));Ki(e,D,r&&h.start===0,h.start,S,o,!1,0),Hi(D);continue}const g=m.getName(l,a);if(g!==null){const b=(u.length>0?u[u.length-1].scopes:n.contentNameScopesList).pushAttributed(g,e);u.push(new oc(b,h.end))}}for(;u.length>0;)o.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var oc=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ic(e,t,r,n,o,i,a,l){return new sc(e,t,r,n,o,i,a,l)}function $o(e,t,r,n,o){const i=_r(t,Er),a=Wi.getCompiledRuleId(r,n,o.repository);for(const l of i)e.push({debugSelector:t,matcher:l.matcher,ruleId:a,grammar:o,priority:l.priority})}function Er(e,t){if(t.length<e.length)return!1;let r=0;return e.every(n=>{for(let o=r;o<t.length;o++)if(ac(t[o],n))return r=o+1,!0;return!1})}function ac(e,t){if(!e)return!1;if(e===t)return!0;const r=t.length;return e.length>r&&e.substr(0,r)===t&&e[r]==="."}var sc=class{constructor(e,t,r,n,o,i,a,l){if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=l,this._basicScopeAttributesProvider=new Xu(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=jo(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const s of Object.keys(o)){const u=_r(s,Er);for(const c of u)this._tokenTypeMatchers.push({matcher:c.matcher,type:o[s]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],r=this._rootScopeName,n=e.lookup(r);if(n){const o=n.injections;if(o)for(let a in o)$o(t,a,o[a],this,n);const i=this._grammarRepository.injections(r);i&&i.forEach(a=>{const l=this.getExternalGrammar(a);if(l){const s=l.injectionSelector;s&&$o(t,s,l,this,l)}})}return t.sort((o,i)=>o.priority-i.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,r=e(t);return this._ruleId2desc[t]=r,r}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const r=this._grammarRepository.lookup(e);if(r)return this._includedGrammars[e]=jo(r,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,r=0){const n=this._tokenize(e,t,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(e,t,r=0){const n=this._tokenize(e,t,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(e,t,r,n){this._rootId===-1&&(this._rootId=Wi.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===un.NULL){o=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),c=this.themeProvider.getDefaults(),d=Et.set(0,u.languageId,u.tokenType,null,c.fontStyle,c.foregroundId,c.backgroundId),m=this.getRule(this._rootId).getName(null,null);let h;m?h=Mt.createRootAndLookUpScopeName(m,d,this):h=Mt.createRoot("unknown",d),t=new un(null,this._rootId,-1,-1,!1,null,h,h)}else o=!1,t.reset();e=e+`
7
+ `;const i=this.createOnigString(e),a=i.content.length,l=new uc(r,e,this._tokenTypeMatchers,this.balancedBracketSelectors),s=Ki(this,i,o,0,t,l,!0,n);return Hi(i),{lineLength:a,lineTokens:l,ruleStack:s.stack,stoppedEarly:s.stoppedEarly}}};function jo(e,t){return e=Pu(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 Mt=class Fe{constructor(t,r,n){this.parent=t,this.scopePath=r,this.tokenAttributes=n}static fromExtension(t,r){let n=t,o=t?.scopePath??null;for(const i of r)o=qr.push(o,i.scopeNames),n=new Fe(n,o,i.encodedTokenAttributes);return n}static createRoot(t,r){return new Fe(null,new qr(null,t),r)}static createRootAndLookUpScopeName(t,r,n){const o=n.getMetadataForScope(t),i=new qr(null,t),a=n.themeProvider.themeMatch(i),l=Fe.mergeAttributes(r,o,a);return new Fe(null,i,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Fe.equals(this,t)}static equals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.scopeName!==r.scopeName||t.tokenAttributes!==r.tokenAttributes)return!1;t=t.parent,r=r.parent}while(!0)}static mergeAttributes(t,r,n){let o=-1,i=0,a=0;return n!==null&&(o=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Et.set(t,r.languageId,r.tokenType,null,o,i,a)}pushAttributed(t,r){if(t===null)return this;if(t.indexOf(" ")===-1)return Fe._pushAttributed(this,t,r);const n=t.split(/ /g);let o=this;for(const i of n)o=Fe._pushAttributed(o,i,r);return o}static _pushAttributed(t,r,n){const o=n.getMetadataForScope(r),i=t.scopePath.push(r),a=n.themeProvider.themeMatch(i),l=Fe.mergeAttributes(t.tokenAttributes,o,a);return new Fe(t,i,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const r=[];let n=this;for(;n&&n!==t;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===t?r.reverse():void 0}},un=class st{constructor(t,r,n,o,i,a,l,s){this.parent=t,this.ruleId=r,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=l,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new st(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:st._equals(this,t)}static _equals(t,r){return t===r?!0:this._structuralEquals(t,r)?Mt.equals(t.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(t,r){do{if(t===r||!t&&!r)return!0;if(!t||!r||t.depth!==r.depth||t.ruleId!==r.ruleId||t.endRule!==r.endRule)return!1;t=t.parent,r=r.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){st._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,r,n,o,i,a,l){return new st(this,t,r,n,o,i,a,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,r){return this.parent&&(r=this.parent._writeString(t,r)),t[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new st(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let r=this;for(;r&&r._enterPos===t._enterPos;){if(r.ruleId===t.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){return{ruleId: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,r){const n=Mt.fromExtension(t?.nameScopesList??null,r.nameScopesList);return new st(t,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,Mt.fromExtension(n,r.contentNameScopesList))}},lc=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(r=>r==="*"?(this.allowAny=!0,[]):_r(r,Er).map(n=>n.matcher)),this.unbalancedBracketScopes=t.flatMap(r=>_r(r,Er).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},uc=class{constructor(e,t,r,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=e,this._tokenTypeOverrides=r,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,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(i)&&(n=Et.set(n,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(n=Et.set(n,0,8,o,-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}const r=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:r}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,o=this._binaryTokens.length;n<o;n++)r[n]=this._binaryTokens[n];return r}},cc=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,r,n,o){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,ic(e,i,t,r,n,o,this,this._onigLib))}return this._grammars.get(e)}},dc=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new cc(gr.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,r){this._syncRegistry.setTheme(gr.createFromRawTheme(t,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,r,n){return this.loadGrammarWithConfiguration(t,r,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,r,n){return this._loadGrammar(t,r,n.embeddedLanguages,n.tokenTypes,new lc(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,r,n,o,i){const a=new Bu(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(l=>this._loadSingleGrammar(l.scopeName)),a.processQueue();return this._grammarForScopeName(t,r,n,o,i)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const r=this._options.loadGrammar(t);if(r){const n=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(r,n)}}addGrammar(t,r=[],n=0,o=null){return this._syncRegistry.addGrammar(t,r),this._grammarForScopeName(t.scopeName,n,o)}_grammarForScopeName(t,r=0,n=null,o=null,i=null){return this._syncRegistry.grammarForScopeName(t,r,n,o,i)}},cn=un.NULL;const fc=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Jt{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}Jt.prototype.normal={};Jt.prototype.property={};Jt.prototype.space=void 0;function Ji(e,t){const r={},n={};for(const o of e)Object.assign(r,o.property),Object.assign(n,o.normal);return new Jt(r,n,t)}function dn(e){return e.toLowerCase()}class De{constructor(t,r){this.attribute=r,this.property=t}}De.prototype.attribute="";De.prototype.booleanish=!1;De.prototype.boolean=!1;De.prototype.commaOrSpaceSeparated=!1;De.prototype.commaSeparated=!1;De.prototype.defined=!1;De.prototype.mustUseProperty=!1;De.prototype.number=!1;De.prototype.overloadedBoolean=!1;De.prototype.property="";De.prototype.spaceSeparated=!1;De.prototype.space=void 0;let hc=0;const W=dt(),pe=dt(),fn=dt(),A=dt(),se=dt(),yt=dt(),Ie=dt();function dt(){return 2**++hc}const hn=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:pe,commaOrSpaceSeparated:Ie,commaSeparated:yt,number:A,overloadedBoolean:fn,spaceSeparated:se},Symbol.toStringTag,{value:"Module"})),Yr=Object.keys(hn);class Tn extends De{constructor(t,r,n,o){let i=-1;if(super(t,r),Bo(this,"space",o),typeof n=="number")for(;++i<Yr.length;){const a=Yr[i];Bo(this,Yr[i],(n&hn[a])===hn[a])}}}Tn.prototype.defined=!0;function Bo(e,t,r){r&&(e[t]=r)}function wt(e){const t={},r={};for(const[n,o]of Object.entries(e.properties)){const i=new Tn(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[dn(n)]=n,r[dn(i.attribute)]=n}return new Jt(t,r,e.space)}const Xi=wt({properties:{ariaActiveDescendant:null,ariaAtomic:pe,ariaAutoComplete:null,ariaBusy:pe,ariaChecked:pe,ariaColCount:A,ariaColIndex:A,ariaColSpan:A,ariaControls:se,ariaCurrent:null,ariaDescribedBy:se,ariaDetails:null,ariaDisabled:pe,ariaDropEffect:se,ariaErrorMessage:null,ariaExpanded:pe,ariaFlowTo:se,ariaGrabbed:pe,ariaHasPopup:null,ariaHidden:pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:se,ariaLevel:A,ariaLive:null,ariaModal:pe,ariaMultiLine:pe,ariaMultiSelectable:pe,ariaOrientation:null,ariaOwns:se,ariaPlaceholder:null,ariaPosInSet:A,ariaPressed:pe,ariaReadOnly:pe,ariaRelevant:null,ariaRequired:pe,ariaRoleDescription:se,ariaRowCount:A,ariaRowIndex:A,ariaRowSpan:A,ariaSelected:pe,ariaSetSize:A,ariaSort:null,ariaValueMax:A,ariaValueMin:A,ariaValueNow:A,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Qi(e,t){return t in e?e[t]:t}function Zi(e,t){return Qi(e,t.toLowerCase())}const mc=wt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:yt,acceptCharset:se,accessKey:se,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:se,autoFocus:W,autoPlay:W,blocking:se,capture:null,charSet:null,checked:W,cite:null,className:se,cols:A,colSpan:null,content:null,contentEditable:pe,controls:W,controlsList:se,coords:A|yt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:fn,draggable:pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:se,height:A,hidden:fn,high:A,href:null,hrefLang:null,htmlFor:se,httpEquiv:se,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:se,itemRef:se,itemScope:W,itemType:se,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:A,manifest:null,max:null,maxLength:A,media:null,method:null,min:null,minLength:A,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,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:W,optimum:A,pattern:null,ping:se,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:se,required:W,reversed:W,rows:A,rowSpan:A,sandbox:se,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:A,sizes:null,slot:null,span:A,spellCheck:pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:A,step:null,style:null,tabIndex:A,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:pe,width:A,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:se,axis:null,background:null,bgColor:null,border:A,borderColor:null,bottomMargin:A,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:A,leftMargin:A,link:null,longDesc:null,lowSrc:null,marginHeight:A,marginWidth:A,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:A,rules:null,scheme:null,scrolling:pe,standby:null,summary:null,text:null,topMargin:A,valueType:null,version:null,vAlign:null,vLink:null,vSpace:A,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:A,security:null,unselectable:null},space:"html",transform:Zi}),pc=wt({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Ie,accentHeight:A,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:A,amplitude:A,arabicForm:null,ascent:A,attributeName:null,attributeType:null,azimuth:A,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:A,by:null,calcMode:null,capHeight:A,className:se,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:A,diffuseConstant:A,direction:null,display:null,dur:null,divisor:A,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:A,enableBackground:null,end:null,event:null,exponent:A,externalResourcesRequired:null,fill:null,fillOpacity:A,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:yt,g2:yt,glyphName:yt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:A,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:A,horizOriginX:A,horizOriginY:A,id:null,ideographic:A,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:A,k:A,k1:A,k2:A,k3:A,k4:A,kernelMatrix:Ie,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:A,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:A,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:A,overlineThickness:A,paintOrder:null,panose1:null,path:null,pathLength:A,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:se,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:A,pointsAtY:A,pointsAtZ:A,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ie,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ie,rev:Ie,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ie,requiredFeatures:Ie,requiredFonts:Ie,requiredFormats:Ie,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:A,specularExponent:A,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:A,strikethroughThickness:A,string:null,stroke:null,strokeDashArray:Ie,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:A,strokeOpacity:A,strokeWidth:null,style:null,surfaceScale:A,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ie,tabIndex:A,tableValues:null,target:null,targetX:A,targetY:A,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ie,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:A,underlineThickness:A,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:A,values:null,vAlphabetic:A,vMathematical:A,vectorEffect:null,vHanging:A,vIdeographic:A,version:null,vertAdvY:A,vertOriginX:A,vertOriginY:A,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:A,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Qi}),ea=wt({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()}}),ta=wt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zi}),ra=wt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gc=/[A-Z]/g,Uo=/-[a-z]/g,_c=/^data[-\w.:]+$/i;function yc(e,t){const r=dn(t);let n=t,o=De;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&_c.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Uo,Ec);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Uo.test(i)){let a=i.replace(gc,vc);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Tn}return new o(n,t)}function vc(e){return"-"+e.toLowerCase()}function Ec(e){return e.charAt(1).toUpperCase()}const Rc=Ji([Xi,mc,ea,ta,ra],"html"),na=Ji([Xi,pc,ea,ta,ra],"svg"),Fo={}.hasOwnProperty;function bc(e,t){const r=t||{};function n(o,...i){let a=n.invalid;const l=n.handlers;if(o&&Fo.call(o,e)){const s=String(o[e]);a=Fo.call(l,s)?l[s]:n.unknown}if(a)return a.call(this,o,...i)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const wc=/["&'<>`]/g,Sc=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Lc=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Pc=/[|\\{}()[\]^$+*?.]/g,Ho=new WeakMap;function Tc(e,t){if(e=e.replace(t.subset?Cc(t.subset):wc,n),t.subset||t.escapeOnly)return e;return e.replace(Sc,r).replace(Lc,n);function r(o,i,a){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,a.charCodeAt(i+2),t)}function n(o,i,a){return t.format(o.charCodeAt(0),a.charCodeAt(i+1),t)}}function Cc(e){let t=Ho.get(e);return t||(t=Ac(e),Ho.set(e,t)),t}function Ac(e){const t=[];let r=-1;for(;++r<e.length;)t.push(e[r].replace(Pc,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Oc=/[\dA-Fa-f]/;function Dc(e,t,r){const n="&#x"+e.toString(16).toUpperCase();return r&&t&&!Oc.test(String.fromCharCode(t))?n:n+";"}const Ic=/\d/;function kc(e,t,r){const n="&#"+String(e);return r&&t&&!Ic.test(String.fromCharCode(t))?n:n+";"}const xc=["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"],Jr={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Nc=["cent","copy","divide","gt","lt","not","para","times"],oa={}.hasOwnProperty,mn={};let sr;for(sr in Jr)oa.call(Jr,sr)&&(mn[Jr[sr]]=sr);const Mc=/[^\dA-Za-z]/;function Vc(e,t,r,n){const o=String.fromCharCode(e);if(oa.call(mn,o)){const i=mn[o],a="&"+i;return r&&xc.includes(i)&&!Nc.includes(i)&&(!n||t&&t!==61&&Mc.test(String.fromCharCode(t)))?a:a+";"}return""}function $c(e,t,r){let n=Dc(e,t,r.omitOptionalSemicolons),o;if((r.useNamedReferences||r.useShortestReferences)&&(o=Vc(e,t,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!o)&&r.useShortestReferences){const i=kc(e,t,r.omitOptionalSemicolons);i.length<n.length&&(n=i)}return o&&(!r.useShortestReferences||o.length<n.length)?o:n}function vt(e,t){return Tc(e,Object.assign({format:$c},t))}const jc=/^>|^->|<!--|-->|--!>|<!-$/g,Bc=[">"],Uc=["<",">"];function Fc(e,t,r,n){return n.settings.bogusComments?"<?"+vt(e.value,Object.assign({},n.settings.characterReferences,{subset:Bc}))+">":"<!--"+e.value.replace(jc,o)+"-->";function o(i){return vt(i,Object.assign({},n.settings.characterReferences,{subset:Uc}))}}function Hc(e,t,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}function zo(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,o=r.indexOf(t);for(;o!==-1;)n++,o=r.indexOf(t,o+t.length);return n}function zc(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}function Gc(e){return e.join(" ").trim()}const Wc=/[ \t\n\f\r]/g;function Cn(e){return typeof e=="object"?e.type==="text"?Go(e.value):!1:Go(e)}function Go(e){return e.replace(Wc,"")===""}const ye=aa(1),ia=aa(-1),qc=[];function aa(e){return t;function t(r,n,o){const i=r?r.children:qc;let a=(n||0)+e,l=i[a];if(!o)for(;l&&Cn(l);)a+=e,l=i[a];return l}}const Kc={}.hasOwnProperty;function sa(e){return t;function t(r,n,o){return Kc.call(e,r.tagName)&&e[r.tagName](r,n,o)}}const An=sa({body:Jc,caption:Xr,colgroup:Xr,dd:ed,dt:Zc,head:Xr,html:Yc,li:Qc,optgroup:td,option:rd,p:Xc,rp:Wo,rt:Wo,tbody:od,td:qo,tfoot:id,th:qo,thead:nd,tr:ad});function Xr(e,t,r){const n=ye(r,t,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&Cn(n.value.charAt(0)))}function Yc(e,t,r){const n=ye(r,t);return!n||n.type!=="comment"}function Jc(e,t,r){const n=ye(r,t);return!n||n.type!=="comment"}function Xc(e,t,r){const n=ye(r,t);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function Qc(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&n.tagName==="li"}function Zc(e,t,r){const n=ye(r,t);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function ed(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function Wo(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function td(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&n.tagName==="optgroup"}function rd(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function nd(e,t,r){const n=ye(r,t);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function od(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function id(e,t,r){return!ye(r,t)}function ad(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&n.tagName==="tr"}function qo(e,t,r){const n=ye(r,t);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const sd=sa({body:cd,colgroup:dd,head:ud,html:ld,tbody:fd});function ld(e){const t=ye(e,-1);return!t||t.type!=="comment"}function ud(e){const t=new Set;for(const 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)}const r=e.children[0];return!r||r.type==="element"}function cd(e){const t=ye(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Cn(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function dd(e,t,r){const n=ia(r,t),o=ye(e,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&An(n,r.children.indexOf(n),r)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function fd(e,t,r){const n=ia(r,t),o=ye(e,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&An(n,r.children.indexOf(n),r)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const lr={name:[[`
8
+ \f\r &/=>`.split(""),`
9
+ \f\r "&'/=>\``.split("")],[`\0
10
+ \f\r "&'/<=>`.split(""),`\0
11
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
12
+ \f\r &>`.split(""),`\0
13
+ \f\r "&'<=>\``.split("")],[`\0
14
+ \f\r "&'<=>\``.split(""),`\0
15
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function hd(e,t,r,n){const o=n.schema,i=o.space==="svg"?!1:n.settings.omitOptionalTags;let a=o.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(e.tagName.toLowerCase());const l=[];let s;o.space==="html"&&e.tagName==="svg"&&(n.schema=na);const u=md(n,e.properties),c=n.all(o.space==="html"&&e.tagName==="template"?e.content:e);return n.schema=o,c&&(a=!1),(u||!i||!sd(e,t,r))&&(l.push("<",e.tagName,u?" "+u:""),a&&(o.space==="svg"||n.settings.closeSelfClosing)&&(s=u.charAt(u.length-1),(!n.settings.tightSelfClosing||s==="/"||s&&s!=='"'&&s!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(c),!a&&(!i||!An(e,t,r))&&l.push("</"+e.tagName+">"),l.join("")}function md(e,t){const r=[];let n=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){const i=pd(e,o,t[o]);i&&r.push(i)}}for(;++n<r.length;){const i=e.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&i!=='"'&&i!=="'"&&(r[n]+=" ")}return r.join("")}function pd(e,t,r){const n=yc(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,i=e.settings.allowDangerousCharacters?0:1;let a=e.quote,l;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const s=vt(n.attribute,Object.assign({},e.settings.characterReferences,{subset:lr.name[o][i]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?zc:Gc)(r,{padLeft:!e.settings.tightCommaSeparatedLists}):String(r),e.settings.collapseEmptyAttributes&&!r)?s:(e.settings.preferUnquoted&&(l=vt(r,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:lr.unquoted[o][i]}))),l!==r&&(e.settings.quoteSmart&&zo(r,a)>zo(r,e.alternative)&&(a=e.alternative),l=a+vt(r,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?lr.single:lr.double)[o][i],attribute:!0}))+a),s+(l&&"="+l))}const gd=["<","&"];function la(e,t,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?e.value:vt(e.value,Object.assign({},n.settings.characterReferences,{subset:gd}))}function _d(e,t,r,n){return n.settings.allowDangerousHtml?e.value:la(e,t,r,n)}function yd(e,t,r,n){return n.all(e)}const vd=bc("type",{invalid:Ed,unknown:Rd,handlers:{comment:Fc,doctype:Hc,element:hd,raw:_d,root:yd,text:la}});function Ed(e){throw new Error("Expected node, not `"+e+"`")}function Rd(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const bd={},wd={},Sd=[];function Ld(e,t){const r=t||bd,n=r.quote||'"',o=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:Pd,all:Td,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||fc,characterReferences:r.characterReferences||wd,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?na:Rc,quote:n,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Pd(e,t,r){return vd(e,t,r,this)}function Td(e){const t=[],r=e&&e.children||Sd;let n=-1;for(;++n<r.length;)t[n]=this.one(r[n],n,e);return t.join("")}function Rr(e,t){const r=typeof e=="string"?{}:{...e.colorReplacements},n=typeof e=="string"?e:e.name;for(const[o,i]of Object.entries(t?.colorReplacements||{}))typeof i=="string"?r[o]=i:o===n&&Object.assign(r,i);return r}function tt(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Cd(e){return Array.isArray(e)?e:[e]}async function ua(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function On(e){return!e||["plaintext","txt","text","plain"].includes(e)}function ca(e){return e==="ansi"||On(e)}function Dn(e){return e==="none"}function da(e){return Dn(e)}function fa(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const r=Array.isArray(t)?t:t.split(/\s+/g);for(const n of r)n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function Ar(e,t=!1){if(e.length===0)return[["",0]];const r=e.split(/(\r?\n)/g);let n=0;const o=[];for(let i=0;i<r.length;i+=2){const a=t?r[i]+(r[i+1]||""):r[i];o.push([a,n]),n+=r[i].length,n+=r[i+1]?.length||0}return o}function Ad(e){const t=Ar(e,!0).map(([o])=>o);function r(o){if(o===e.length)return{line:t.length-1,character:t[t.length-1].length};let i=o,a=0;for(const l of t){if(i<l.length)break;i-=l.length,a++}return{line:a,character:i}}function n(o,i){let a=0;for(let l=0;l<o;l++)a+=t[l].length;return a+=i,a}return{lines:t,indexToPos:r,posToIndex:n}}const In="light-dark()",Od=["color","background-color"];function Dd(e,t){let r=0;const n=[];for(const o of t)o>r&&n.push({...e,content:e.content.slice(r,o),offset:e.offset+r}),r=o;return r<e.content.length&&n.push({...e,content:e.content.slice(r),offset:e.offset+r}),n}function Id(e,t){const r=Array.from(t instanceof Set?t:new Set(t)).sort((n,o)=>n-o);return r.length?e.map(n=>n.flatMap(o=>{const i=r.filter(a=>o.offset<a&&a<o.offset+o.content.length).map(a=>a-o.offset).sort((a,l)=>a-l);return i.length?Dd(o,i):o})):e}function kd(e,t,r,n,o="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(c=>br(e.variants[c])),l=new Set(a.flatMap(c=>Object.keys(c))),s={},u=(c,d)=>{const m=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return r+t[c]+(d==="color"?"":m)};return a.forEach((c,d)=>{for(const m of l){const h=c[m]||"inherit";if(d===0&&n&&Od.includes(m))if(n===In&&a.length>1){const g=t.findIndex(P=>P==="light"),L=t.findIndex(P=>P==="dark");if(g===-1||L===-1)throw new ge('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=a[g][m]||"inherit",w=a[L][m]||"inherit";s[m]=`light-dark(${b}, ${w})`,o==="css-vars"&&(s[u(d,m)]=h)}else s[m]=h;else o==="css-vars"&&(s[u(d,m)]=h)}}),i.htmlStyle=s,i}function br(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Te.Italic&&(t["font-style"]="italic"),e.fontStyle&Te.Bold&&(t["font-weight"]="bold");const r=[];e.fontStyle&Te.Underline&&r.push("underline"),e.fontStyle&Te.Strikethrough&&r.push("line-through"),r.length&&(t["text-decoration"]=r.join(" "))}return t}function pn(e){return typeof e=="string"?e:Object.entries(e).map(([t,r])=>`${t}:${r}`).join(";")}const ha=new WeakMap;function Or(e,t){ha.set(e,t)}function Ht(e){return ha.get(e)}class St{_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,r){return new St(Object.fromEntries(Cd(r).map(n=>[n,cn])),t)}constructor(...t){if(t.length===2){const[r,n]=t;this.lang=n,this._stacks=r}else{const[r,n,o]=t;this.lang=n,this._stacks={[o]:r}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return xd(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function xd(e){const t=[],r=new Set;function n(o){if(r.has(o))return;r.add(o);const i=o?.nameScopesList?.scopeName;i&&t.push(i),o.parent&&n(o.parent)}return n(e),t}function Nd(e,t){if(!(e instanceof St))throw new ge("Invalid grammar state");return e.getInternalStack(t)}function Md(){const e=new WeakMap;function t(r){if(!e.has(r.meta)){let n=function(a){if(typeof a=="number"){if(a<0||a>r.source.length)throw new ge(`Invalid decoration offset: ${a}. Code length: ${r.source.length}`);return{...o.indexToPos(a),offset:a}}else{const l=o.lines[a.line];if(l===void 0)throw new ge(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${o.lines.length}`);let s=a.character;if(s<0&&(s=l.length+s),s<0||s>l.length)throw new ge(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${l.length}`);return{...a,character:s,offset:o.posToIndex(a.line,s)}}};const o=Ad(r.source),i=(r.options.decorations||[]).map(a=>({...a,start:n(a.start),end:n(a.end)}));Vd(i),e.set(r.meta,{decorations:i,converter:o,source:r.source})}return e.get(r.meta)}return{name:"shiki:decorations",tokens(r){if(!this.options.decorations?.length)return;const o=t(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return Id(r,o)},code(r){if(!this.options.decorations?.length)return;const n=t(this),o=Array.from(r.children).filter(c=>c.type==="element"&&c.tagName==="span");if(o.length!==n.converter.lines.length)throw new ge(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(c,d,m,h){const g=o[c];let L="",b=-1,w=-1;if(d===0&&(b=0),m===0&&(w=0),m===Number.POSITIVE_INFINITY&&(w=g.children.length),b===-1||w===-1)for(let S=0;S<g.children.length;S++)L+=ma(g.children[S]),b===-1&&L.length===d&&(b=S+1),w===-1&&L.length===m&&(w=S+1);if(b===-1)throw new ge(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(w===-1)throw new ge(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);const P=g.children.slice(b,w);if(!h.alwaysWrap&&P.length===g.children.length)l(g,h,"line");else if(!h.alwaysWrap&&P.length===1&&P[0].type==="element")l(P[0],h,"token");else{const S={type:"element",tagName:"span",properties:{},children:P};l(S,h,"wrapper"),g.children.splice(b,P.length,S)}}function a(c,d){o[c]=l(o[c],d,"line")}function l(c,d,m){const h=d.properties||{},g=d.transform||(L=>L);return c.tagName=d.tagName||"span",c.properties={...c.properties,...h,class:c.properties.class},d.properties?.class&&fa(c,d.properties.class),c=g(c,m)||c,c}const s=[],u=n.decorations.sort((c,d)=>d.start.offset-c.start.offset||c.end.offset-d.end.offset);for(const c of u){const{start:d,end:m}=c;if(d.line===m.line)i(d.line,d.character,m.character,c);else if(d.line<m.line){i(d.line,d.character,Number.POSITIVE_INFINITY,c);for(let h=d.line+1;h<m.line;h++)s.unshift(()=>a(h,c));i(m.line,0,m.character,c)}}s.forEach(c=>c())}}}function Vd(e){for(let t=0;t<e.length;t++){const r=e[t];if(r.start.offset>r.end.offset)throw new ge(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=t+1;n<e.length;n++){const o=e[n],i=r.start.offset<=o.start.offset&&o.start.offset<r.end.offset,a=r.start.offset<o.end.offset&&o.end.offset<=r.end.offset,l=o.start.offset<=r.start.offset&&r.start.offset<o.end.offset,s=o.start.offset<r.end.offset&&r.end.offset<=o.end.offset;if(i||a||l||s){if(i&&a||l&&s||l&&r.start.offset===r.end.offset||a&&o.start.offset===o.end.offset)continue;throw new ge(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function ma(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(ma).join(""):""}const $d=[Md()];function wr(e){const t=jd(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...$d]}function jd(e){const t=[],r=[],n=[];for(const o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":r.push(o);break;default:n.push(o)}return{pre:t,post:r,normal:n}}var ut=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Qr={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Bd(e,t){const r=e.indexOf("\x1B",t);if(r!==-1&&e[r+1]==="["){const n=e.indexOf("m",r);if(n!==-1)return{sequence:e.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:e.length}}function Ko(e){const t=e.shift();if(t==="2"){const r=e.splice(0,3).map(n=>Number.parseInt(n));return r.length!==3||r.some(n=>Number.isNaN(n))?void 0:{type:"rgb",rgb:r}}else if(t==="5"){const r=e.shift();if(r)return{type:"table",index:Number(r)}}}function Ud(e){const t=[];for(;e.length>0;){const r=e.shift();if(!r)continue;const n=Number.parseInt(r);if(!Number.isNaN(n))if(n===0)t.push({type:"resetAll"});else if(n<=9)Qr[n]&&t.push({type:"setDecoration",value:Qr[n]});else if(n<=29){const o=Qr[n-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)t.push({type:"setForegroundColor",value:{type:"named",name:ut[n-30]}});else if(n===38){const o=Ko(e);o&&t.push({type:"setForegroundColor",value:o})}else if(n===39)t.push({type:"resetForegroundColor"});else if(n<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:ut[n-40]}});else if(n===48){const o=Ko(e);o&&t.push({type:"setBackgroundColor",value:o})}else n===49?t.push({type:"resetBackgroundColor"}):n===53?t.push({type:"setDecoration",value:"overline"}):n===55?t.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?t.push({type:"setForegroundColor",value:{type:"named",name:ut[n-90+8]}}):n>=100&&n<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:ut[n-100+8]}})}return t}function Fd(){let e=null,t=null,r=new Set;return{parse(n){const o=[];let i=0;do{const a=Bd(n,i),l=a.sequence?n.substring(i,a.startPosition):n.substring(i);if(l.length>0&&o.push({value:l,foreground:e,background:t,decorations:new Set(r)}),a.sequence){const s=Ud(a.sequence);for(const u of s)u.type==="resetAll"?(e=null,t=null,r.clear()):u.type==="resetForegroundColor"?e=null:u.type==="resetBackgroundColor"?t=null:u.type==="resetDecoration"&&r.delete(u.value);for(const u of s)u.type==="setForegroundColor"?e=u.value:u.type==="setBackgroundColor"?t=u.value:u.type==="setDecoration"&&r.add(u.value)}i=a.position}while(i<n.length);return o}}}var Hd={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function zd(e=Hd){function t(l){return e[l]}function r(l){return`#${l.map(s=>Math.max(0,Math.min(s,255)).toString(16).padStart(2,"0")).join("")}`}let n;function o(){if(n)return n;n=[];for(let u=0;u<ut.length;u++)n.push(t(ut[u]));let l=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let c=0;c<6;c++)for(let d=0;d<6;d++)n.push(r([l[u],l[c],l[d]]));let s=8;for(let u=0;u<24;u++,s+=10)n.push(r([s,s,s]));return n}function i(l){return o()[l]}function a(l){switch(l.type){case"named":return t(l.name);case"rgb":return r(l.rgb);case"table":return i(l.index)}}return{value:a}}const Gd={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Wd(e,t,r){const n=Rr(e,r),o=Ar(t),i=Object.fromEntries(ut.map(s=>{const u=`terminal.ansi${s[0].toUpperCase()}${s.substring(1)}`,c=e.colors?.[u];return[s,c||Gd[s]]})),a=zd(i),l=Fd();return o.map(s=>l.parse(s[0]).map(u=>{let c,d;u.decorations.has("reverse")?(c=u.background?a.value(u.background):e.bg,d=u.foreground?a.value(u.foreground):e.fg):(c=u.foreground?a.value(u.foreground):e.fg,d=u.background?a.value(u.background):void 0),c=tt(c,n),d=tt(d,n),u.decorations.has("dim")&&(c=qd(c));let m=Te.None;return u.decorations.has("bold")&&(m|=Te.Bold),u.decorations.has("italic")&&(m|=Te.Italic),u.decorations.has("underline")&&(m|=Te.Underline),u.decorations.has("strikethrough")&&(m|=Te.Strikethrough),{content:u.value,offset:s[1],color:c,bgColor:d,fontStyle:m}}))}function qd(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const n=t[1];if(n.length===8){const o=Math.round(Number.parseInt(n.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${n.slice(0,6)}${o}`}else{if(n.length===6)return`#${n}80`;if(n.length===4){const o=n[0],i=n[1],a=n[2],l=n[3],s=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${i}${i}${a}${a}${s}`}else if(n.length===3){const o=n[0],i=n[1],a=n[2];return`#${o}${o}${i}${i}${a}${a}80`}}}const r=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:e}function kn(e,t,r={}){const{theme:n=e.getLoadedThemes()[0]}=r,o=e.resolveLangAlias(r.lang||"text");if(On(o)||Dn(n))return Ar(t).map(s=>[{content:s[0],offset:s[1]}]);const{theme:i,colorMap:a}=e.setTheme(n);if(o==="ansi")return Wd(i,t,r);const l=e.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==l.name)throw new ge(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${l.name}"`);if(!r.grammarState.themes.includes(i.name))throw new ge(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Yd(t,l,i,a,r)}function Kd(...e){if(e.length===2)return Ht(e[1]);const[t,r,n={}]=e,{lang:o="text",theme:i=t.getLoadedThemes()[0]}=n;if(On(o)||Dn(i))throw new ge("Plain language does not have grammar state");if(o==="ansi")throw new ge("ANSI language does not have grammar state");const{theme:a,colorMap:l}=t.setTheme(i),s=t.getLanguage(o);return new St(xn(r,s,a,l,n).stateStack,s.name,a.name)}function Yd(e,t,r,n,o){const i=xn(e,t,r,n,o),a=new St(i.stateStack,t.name,r.name);return Or(i.tokens,a),i.tokens}function xn(e,t,r,n,o){const i=Rr(r,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:l=500}=o,s=Ar(e);let u=o.grammarState?Nd(o.grammarState,r.name)??cn:o.grammarContextCode!=null?xn(o.grammarContextCode,t,r,n,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:cn,c=[];const d=[];for(let m=0,h=s.length;m<h;m++){const[g,L]=s[m];if(g===""){c=[],d.push([]);continue}if(a>0&&g.length>=a){c=[],d.push([{content:g,offset:L,color:"",fontStyle:0}]);continue}let b,w,P;o.includeExplanation&&(b=t.tokenizeLine(g,u,l),w=b.tokens,P=0);const S=t.tokenizeLine2(g,u,l),D=S.tokens.length/2;for(let k=0;k<D;k++){const H=S.tokens[2*k],$=k+1<D?S.tokens[2*k+2]:g.length;if(H===$)continue;const v=S.tokens[2*k+1],Z=tt(n[Et.getForeground(v)],i),re=Et.getFontStyle(v),le={content:g.substring(H,$),offset:L+H,color:Z,fontStyle:re};if(o.includeExplanation){const X=[];if(o.includeExplanation!=="scopeName")for(const K of r.settings){let G;switch(typeof K.scope){case"string":G=K.scope.split(/,/).map(ne=>ne.trim());break;case"object":G=K.scope;break;default:continue}X.push({settings:K,selectors:G.map(ne=>ne.split(/ /))})}le.explanation=[];let fe=0;for(;H+fe<$;){const K=w[P],G=g.substring(K.startIndex,K.endIndex);fe+=G.length,le.explanation.push({content:G,scopes:o.includeExplanation==="scopeName"?Jd(K.scopes):Xd(X,K.scopes)}),P+=1}}c.push(le)}d.push(c),c=[],u=S.ruleStack}return{tokens:d,stateStack:u}}function Jd(e){return e.map(t=>({scopeName:t}))}function Xd(e,t){const r=[];for(let n=0,o=t.length;n<o;n++){const i=t[n];r[n]={scopeName:i,themeMatches:Zd(e,i,t.slice(0,n))}}return r}function Yo(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Qd(e,t,r){if(!Yo(e[e.length-1],t))return!1;let n=e.length-2,o=r.length-1;for(;n>=0&&o>=0;)Yo(e[n],r[o])&&(n-=1),o-=1;return n===-1}function Zd(e,t,r){const n=[];for(const{selectors:o,settings:i}of e)for(const a of o)if(Qd(a,t,r)){n.push(i);break}return n}function pa(e,t,r){const n=Object.entries(r.themes).filter(s=>s[1]).map(s=>({color:s[0],theme:s[1]})),o=n.map(s=>{const u=kn(e,t,{...r,theme:s.theme}),c=Ht(u),d=typeof s.theme=="string"?s.theme:s.theme.name;return{tokens:u,state:c,theme:d}}),i=ef(...o.map(s=>s.tokens)),a=i[0].map((s,u)=>s.map((c,d)=>{const m={content:c.content,variants:{},offset:c.offset};return"includeExplanation"in r&&r.includeExplanation&&(m.explanation=c.explanation),i.forEach((h,g)=>{const{content:L,explanation:b,offset:w,...P}=h[u][d];m.variants[n[g].color]=P}),m})),l=o[0].state?new St(Object.fromEntries(o.map(s=>[s.theme,s.state?.getInternalStack(s.theme)])),o[0].state.lang):void 0;return l&&Or(a,l),a}function ef(...e){const t=e.map(()=>[]),r=e.length;for(let n=0;n<e[0].length;n++){const o=e.map(s=>s[n]),i=t.map(()=>[]);t.forEach((s,u)=>s.push(i[u]));const a=o.map(()=>0),l=o.map(s=>s[0]);for(;l.every(s=>s);){const s=Math.min(...l.map(u=>u.content.length));for(let u=0;u<r;u++){const c=l[u];c.content.length===s?(i[u].push(c),a[u]+=1,l[u]=o[u][a[u]]):(i[u].push({...c,content:c.content.slice(0,s)}),l[u]={...c,content:c.content.slice(s),offset:c.offset+s})}}}return t}function Sr(e,t,r){let n,o,i,a,l,s;if("themes"in r){const{defaultColor:u="light",cssVariablePrefix:c="--shiki-",colorsRendering:d="css-vars"}=r,m=Object.entries(r.themes).filter(w=>w[1]).map(w=>({color:w[0],theme:w[1]})).sort((w,P)=>w.color===u?-1:P.color===u?1:0);if(m.length===0)throw new ge("`themes` option must not be empty");const h=pa(e,t,r);if(s=Ht(h),u&&In!==u&&!m.find(w=>w.color===u))throw new ge(`\`themes\` option must contain the defaultColor key \`${u}\``);const g=m.map(w=>e.getTheme(w.theme)),L=m.map(w=>w.color);i=h.map(w=>w.map(P=>kd(P,L,c,u,d))),s&&Or(i,s);const b=m.map(w=>Rr(w.theme,r));o=Jo(m,g,b,c,u,"fg",d),n=Jo(m,g,b,c,u,"bg",d),a=`shiki-themes ${g.map(w=>w.name).join(" ")}`,l=u?void 0:[o,n].join(";")}else if("theme"in r){const u=Rr(r.theme,r);i=kn(e,t,r);const c=e.getTheme(r.theme);n=tt(c.bg,u),o=tt(c.fg,u),a=c.name,s=Ht(i)}else throw new ge("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:o,bg:n,themeName:a,rootStyle:l,grammarState:s}}function Jo(e,t,r,n,o,i,a){return e.map((l,s)=>{const u=tt(t[s][i],r[s])||"inherit",c=`${n+l.color}${i==="bg"?"-bg":""}:${u}`;if(s===0&&o){if(o===In&&e.length>1){const d=e.findIndex(L=>L.color==="light"),m=e.findIndex(L=>L.color==="dark");if(d===-1||m===-1)throw new ge('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const h=tt(t[d][i],r[d])||"inherit",g=tt(t[m][i],r[m])||"inherit";return`light-dark(${h}, ${g});${c}`}return u}return a==="css-vars"?c:null}).filter(l=>!!l).join(";")}function Lr(e,t,r,n={meta:{},options:r,codeToHast:(o,i)=>Lr(e,o,i),codeToTokens:(o,i)=>Sr(e,o,i)}){let o=t;for(const g of wr(r))o=g.preprocess?.call(n,o,r)||o;let{tokens:i,fg:a,bg:l,themeName:s,rootStyle:u,grammarState:c}=Sr(e,o,r);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:m=!1}=r;d===!0?i=rf(i):d==="never"&&(i=nf(i)),m&&(i=of(i));const h={...n,get source(){return o}};for(const g of wr(r))i=g.tokens?.call(h,i)||i;return tf(i,{...r,fg:a,bg:l,themeName:s,rootStyle:r.rootStyle===!1?!1:r.rootStyle??u},h,c)}function tf(e,t,r,n=Ht(e)){const o=wr(t),i=[],a={type:"root",children:[]},{structure:l="classic",tabindex:s="0"}=t,u={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),s!==!1&&s!=null&&(u.tabindex=s.toString());for(const[L,b]of Object.entries(t.meta||{}))L.startsWith("_")||(u[L]=b);let c={type:"element",tagName:"pre",properties:u,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:i};const m=[],h={...r,structure:l,addClassToHast:fa,get source(){return r.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return c},get code(){return d},get lines(){return m}};if(e.forEach((L,b)=>{b&&(l==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&i.push({type:"text",value:`
16
+ `}));let w={type:"element",tagName:"span",properties:{class:"line"},children:[]},P=0;for(const S of L){let D={type:"element",tagName:"span",properties:{...S.htmlAttrs},children:[{type:"text",value:S.content}]};const k=pn(S.htmlStyle||br(S));k&&(D.properties.style=k);for(const H of o)D=H?.span?.call(h,D,b+1,P,w,S)||D;l==="inline"?a.children.push(D):l==="classic"&&w.children.push(D),P+=S.content.length}if(l==="classic"){for(const S of o)w=S?.line?.call(h,w,b+1)||w;m.push(w),i.push(w)}else l==="inline"&&m.push(w)}),l==="classic"){for(const L of o)d=L?.code?.call(h,d)||d;c.children.push(d);for(const L of o)c=L?.pre?.call(h,c)||c;a.children.push(c)}else if(l==="inline"){const L=[];let b={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const S of a.children)S.type==="element"&&S.tagName==="br"?(L.push(b),b={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(S.type==="element"||S.type==="text")&&b.children.push(S);L.push(b);let P={type:"element",tagName:"code",properties:{},children:L};for(const S of o)P=S?.code?.call(h,P)||P;a.children=[];for(let S=0;S<P.children.length;S++){S>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const D=P.children[S];D.type==="element"&&a.children.push(...D.children)}}let g=a;for(const L of o)g=L?.root?.call(h,g)||g;return n&&Or(g,n),g}function rf(e){return e.map(t=>{const r=[];let n="",o;return t.forEach((i,a)=>{const s=!(i.fontStyle&&(i.fontStyle&Te.Underline||i.fontStyle&Te.Strikethrough));s&&i.content.match(/^\s+$/)&&t[a+1]?(o===void 0&&(o=i.offset),n+=i.content):n?(s?r.push({...i,offset:o,content:n+i.content}):r.push({content:n,offset:o},i),o=void 0,n=""):r.push(i)}),r})}function nf(e){return e.map(t=>t.flatMap(r=>{if(r.content.match(/^\s+$/))return r;const n=r.content.match(/^(\s*)(.*?)(\s*)$/);if(!n)return r;const[,o,i,a]=n;if(!o&&!a)return r;const l=[{...r,offset:r.offset+o.length,content:i}];return o&&l.unshift({content:o,offset:r.offset}),a&&l.push({content:a,offset:r.offset+o.length+i.length}),l}))}function of(e){return e.map(t=>{const r=[];for(const n of t){if(r.length===0){r.push({...n});continue}const o=r[r.length-1],i=pn(o.htmlStyle||br(o)),a=pn(n.htmlStyle||br(n)),l=o.fontStyle&&(o.fontStyle&Te.Underline||o.fontStyle&Te.Strikethrough),s=n.fontStyle&&(n.fontStyle&Te.Underline||n.fontStyle&Te.Strikethrough);!l&&!s&&i===a?o.content+=n.content:r.push({...n})}return r})}const af=Ld;function sf(e,t,r){const n={meta:{},options:r,codeToHast:(i,a)=>Lr(e,i,a),codeToTokens:(i,a)=>Sr(e,i,a)};let o=af(Lr(e,t,r,n));for(const i of wr(r))o=i.postprocess?.call(n,o,r)||o;return o}const Xo={light:"#333333",dark:"#bbbbbb"},Qo={light:"#fffffe",dark:"#1e1e1e"},Zo="__shiki_resolved";function Nn(e){if(e?.[Zo])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:r,fg:n}=t;if(!r||!n){const l=t.settings?t.settings.find(s=>!s.name&&!s.scope):void 0;l?.settings?.foreground&&(n=l.settings.foreground),l?.settings?.background&&(r=l.settings.background),!n&&t?.colors?.["editor.foreground"]&&(n=t.colors["editor.foreground"]),!r&&t?.colors?.["editor.background"]&&(r=t.colors["editor.background"]),n||(n=t.type==="light"?Xo.light:Xo.dark),r||(r=t.type==="light"?Qo.light:Qo.dark),t.fg=n,t.bg=r}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0;const i=new Map;function a(l){if(i.has(l))return i.get(l);o+=1;const s=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${s}`]?a(l):(i.set(l,s),s)}t.settings=t.settings.map(l=>{const s=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),u=l.settings?.background&&!l.settings.background.startsWith("#");if(!s&&!u)return l;const c={...l,settings:{...l.settings}};if(s){const d=a(l.settings.foreground);t.colorReplacements[d]=l.settings.foreground,c.settings.foreground=d}if(u){const d=a(l.settings.background);t.colorReplacements[d]=l.settings.background,c.settings.background=d}return c});for(const l of Object.keys(t.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!t.colors[l]?.startsWith("#")){const s=a(t.colors[l]);t.colorReplacements[s]=t.colors[l],t.colors[l]=s}return Object.defineProperty(t,Zo,{enumerable:!1,writable:!1,value:!0}),t}async function ga(e){return Array.from(new Set((await Promise.all(e.filter(t=>!ca(t)).map(async t=>await ua(t).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function _a(e){return(await Promise.all(e.map(async r=>da(r)?null:Nn(await ua(r))))).filter(r=>!!r)}let lf=3;function uf(e,t=3){t>lf||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let gt=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function ya(e,t){if(!t)return e;if(t[e]){const r=new Set([e]);for(;t[e];){if(e=t[e],r.has(e))throw new gt(`Circular alias \`${Array.from(r).join(" -> ")} -> ${e}\``);r.add(e)}}return e}class cf extends dc{constructor(t,r,n,o={}){super(t),this._resolver=t,this._themes=r,this._langs=n,this._alias=o,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const r=Nn(t);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let r=this._textmateThemeCache.get(t);r||(r=gr.createFromRawTheme(t),this._textmateThemeCache.set(t,r)),this._syncRegistry.setTheme(r)}getGrammar(t){return t=ya(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const r=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const o=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(o.name=t.name,this._resolvedGrammars.set(t.name,o),t.aliases&&t.aliases.forEach(i=>{this._alias[i]=t.name}),this._loadedLanguagesCache=null,r.size)for(const i of r)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const o of t)this.resolveEmbeddedLanguages(o);const r=Array.from(this._langGraph.entries()),n=r.filter(([o,i])=>!i);if(n.length){const o=r.filter(([i,a])=>a?(a.embeddedLanguages||a.embeddedLangs)?.some(s=>n.map(([u])=>u).includes(s)):!1).filter(i=>!n.includes(i));throw new gt(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${o.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[o,i]of r)this._resolver.addLanguage(i);for(const[o,i]of r)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const r=t.embeddedLanguages??t.embeddedLangs;if(r)for(const n of r)this._langGraph.set(n,this._langMap.get(n))}}class df{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,r){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},r.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(r=>{this._langs.set(r,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(r=>{this._injections.get(r)||this._injections.set(r,[]),this._injections.get(r).push(t.scopeName)})}getInjections(t){const r=t.split(".");let n=[];for(let o=1;o<=r.length;o++){const i=r.slice(0,o).join(".");n=[...n,...this._injections.get(i)||[]]}return n}}let Dt=0;function ff(e){Dt+=1,e.warnings!==!1&&Dt>=10&&Dt%10===0&&console.warn(`[Shiki] ${Dt} 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 gt("`engine` option is required for synchronous mode");const r=(e.langs||[]).flat(1),n=(e.themes||[]).flat(1).map(Nn),o=new df(e.engine,r),i=new cf(o,n,r,e.langAlias);let a;function l(S){return ya(S,e.langAlias)}function s(S){w();const D=i.getGrammar(typeof S=="string"?S:S.name);if(!D)throw new gt(`Language \`${S}\` not found, you may need to load it first`);return D}function u(S){if(S==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};w();const D=i.getTheme(S);if(!D)throw new gt(`Theme \`${S}\` not found, you may need to load it first`);return D}function c(S){w();const D=u(S);a!==S&&(i.setTheme(D),a=S);const k=i.getColorMap();return{theme:D,colorMap:k}}function d(){return w(),i.getLoadedThemes()}function m(){return w(),i.getLoadedLanguages()}function h(...S){w(),i.loadLanguages(S.flat(1))}async function g(...S){return h(await ga(S))}function L(...S){w();for(const D of S.flat(1))i.loadTheme(D)}async function b(...S){return w(),L(await _a(S))}function w(){if(t)throw new gt("Shiki instance has been disposed")}function P(){t||(t=!0,i.dispose(),Dt-=1)}return{setTheme:c,getTheme:u,getLanguage:s,getLoadedThemes:d,getLoadedLanguages:m,resolveLangAlias:l,loadLanguage:g,loadLanguageSync:h,loadTheme:b,loadThemeSync:L,dispose:P,[Symbol.dispose]:P}}async function hf(e){e.engine||uf("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,r,n]=await Promise.all([_a(e.themes||[]),ga(e.langs||[]),e.engine]);return ff({...e,themes:t,langs:r,engine:n})}async function mf(e){const t=await hf(e);return{getLastGrammarState:(...r)=>Kd(t,...r),codeToTokensBase:(r,n)=>kn(t,r,n),codeToTokensWithThemes:(r,n)=>pa(t,r,n),codeToTokens:(r,n)=>Sr(t,r,n),codeToHast:(r,n)=>Lr(t,r,n),codeToHtml:(r,n)=>sf(t,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function pf(e){const t=e.langs,r=e.themes,n=e.engine;async function o(i){function a(d){if(typeof d=="string"){if(d=i.langAlias?.[d]||d,ca(d))return[];const m=t[d];if(!m)throw new ge(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return m}return d}function l(d){if(da(d))return"none";if(typeof d=="string"){const m=r[d];if(!m)throw new ge(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return m}return d}const s=(i.themes??[]).map(d=>l(d)),u=(i.langs??[]).map(d=>a(d)),c=await mf({engine:i.engine??n(),...i,themes:s,langs:u});return{...c,loadLanguage(...d){return c.loadLanguage(...d.map(a))},loadTheme(...d){return c.loadTheme(...d.map(l))},getBundledLanguages(){return t},getBundledThemes(){return r}}}return o}const va=[{id:"abap",name:"ABAP",import:(()=>f(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>f(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>f(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>f(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>f(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>f(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>f(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>f(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>f(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>f(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>f(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>f(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>f(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>f(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>f(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>f(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>f(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>f(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>f(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>f(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>f(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>f(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>f(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>f(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>f(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>f(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>f(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>f(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>f(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>f(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>f(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>f(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>f(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>f(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>f(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>f(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>f(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>f(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>f(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>f(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>f(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>f(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>f(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>f(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>f(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>f(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>f(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>f(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>f(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>f(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>f(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>f(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>f(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>f(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>f(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>f(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>f(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>f(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>f(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>f(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>f(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>f(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>f(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>f(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>f(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>f(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>f(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>f(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>f(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>f(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>f(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>f(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>f(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>f(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>f(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>f(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>f(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>f(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>f(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>f(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>f(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>f(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>f(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>f(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>f(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>f(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>f(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>f(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>f(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>f(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>f(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>f(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>f(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>f(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>f(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>f(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>f(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>f(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>f(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>f(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>f(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>f(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>f(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>f(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>f(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>f(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>f(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>f(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>f(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>f(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>f(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>f(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>f(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>f(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>f(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>f(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>f(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>f(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>f(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>f(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>f(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>f(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>f(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>f(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>f(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>f(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>f(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>f(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>f(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>f(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>f(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>f(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>f(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>f(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>f(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>f(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>f(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>f(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>f(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>f(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>f(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>f(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>f(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>f(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>f(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>f(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>f(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>f(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>f(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>f(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>f(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>f(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>f(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>f(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>f(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>f(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>f(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>f(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>f(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>f(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>f(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>f(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>f(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>f(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>f(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>f(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>f(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>f(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>f(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>f(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>f(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>f(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>f(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>f(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>f(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>f(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>f(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>f(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>f(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>f(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>f(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>f(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>f(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>f(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>f(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>f(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>f(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>f(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>f(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>f(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>f(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>f(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>f(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>f(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>f(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>f(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>f(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>f(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>f(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>f(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>f(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>f(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>f(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>f(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>f(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>f(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>f(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>f(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>f(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>f(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>f(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>f(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>f(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>f(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>f(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>f(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>f(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>f(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>f(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>f(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>f(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>f(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>f(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>f(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>f(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>f(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>f(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>f(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>f(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>f(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>f(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>f(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>f(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>f(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>f(()=>import("./zig-VOosw3JB.js"),[]))}],gf=Object.fromEntries(va.map(e=>[e.id,e.import])),_f=Object.fromEntries(va.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),yf={...gf,..._f},vf=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>f(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>f(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>f(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>f(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>f(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>f(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>f(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>f(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>f(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>f(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>f(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>f(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>f(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>f(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>f(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>f(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>f(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>f(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>f(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>f(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>f(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>f(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>f(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>f(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>f(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>f(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>f(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>f(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>f(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>f(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>f(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>f(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>f(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>f(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>f(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>f(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>f(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>f(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>f(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>f(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>f(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>f(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>f(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>f(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>f(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>f(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>f(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>f(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>f(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>f(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>f(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>f(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>f(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>f(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>f(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>f(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>f(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>f(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>f(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>f(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>f(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>f(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>f(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>f(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>f(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],Ef=Object.fromEntries(vf.map(e=>[e.id,e.import]));class Mn extends Error{constructor(t){super(t),this.name="ShikiError"}}function Rf(){return 2147483648}function bf(){return typeof performance<"u"?performance.now():Date.now()}const wf=(e,t)=>e+(t-e%t)%t;async function Sf(e){let t,r;const n={};function o(h){r=h,n.HEAPU8=new Uint8Array(h),n.HEAPU32=new Uint32Array(h)}function i(h,g,L){n.HEAPU8.copyWithin(h,g,g+L)}function a(h){try{return t.grow(h-r.byteLength+65535>>>16),o(t.buffer),1}catch{}}function l(h){const g=n.HEAPU8.length;h=h>>>0;const L=Rf();if(h>L)return!1;for(let b=1;b<=4;b*=2){let w=g*(1+.2/b);w=Math.min(w,h+100663296);const P=Math.min(L,wf(Math.max(h,w),65536));if(a(P))return!0}return!1}const s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,g,L=1024){const b=g+L;let w=g;for(;h[w]&&!(w>=b);)++w;if(w-g>16&&h.buffer&&s)return s.decode(h.subarray(g,w));let P="";for(;g<w;){let S=h[g++];if(!(S&128)){P+=String.fromCharCode(S);continue}const D=h[g++]&63;if((S&224)===192){P+=String.fromCharCode((S&31)<<6|D);continue}const k=h[g++]&63;if((S&240)===224?S=(S&15)<<12|D<<6|k:S=(S&7)<<18|D<<12|k<<6|h[g++]&63,S<65536)P+=String.fromCharCode(S);else{const H=S-65536;P+=String.fromCharCode(55296|H>>10,56320|H&1023)}}return P}function c(h,g){return h?u(n.HEAPU8,h,g):""}const d={emscripten_get_now:bf,emscripten_memcpy_big:i,emscripten_resize_heap:l,fd_write:()=>0};async function m(){const g=await e({env:d,wasi_snapshot_preview1:d});t=g.memory,o(t.buffer),Object.assign(n,g),n.UTF8ToString=c}return await m(),n}var Lf=Object.defineProperty,Pf=(e,t,r)=>t in e?Lf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_e=(e,t,r)=>Pf(e,typeof t!="symbol"?t+"":t,r);let Ee=null;function Tf(e){throw new Mn(e.UTF8ToString(e.getLastOnigError()))}class Dr{constructor(t){_e(this,"utf16Length"),_e(this,"utf8Length"),_e(this,"utf16Value"),_e(this,"utf8Value"),_e(this,"utf16OffsetToUtf8"),_e(this,"utf8OffsetToUtf16");const r=t.length,n=Dr._utf8ByteLength(t),o=n!==r,i=o?new Uint32Array(r+1):null;o&&(i[r]=n);const a=o?new Uint32Array(n+1):null;o&&(a[n]=r);const l=new Uint8Array(n);let s=0;for(let u=0;u<r;u++){const c=t.charCodeAt(u);let d=c,m=!1;if(c>=55296&&c<=56319&&u+1<r){const h=t.charCodeAt(u+1);h>=56320&&h<=57343&&(d=(c-55296<<10)+65536|h-56320,m=!0)}o&&(i[u]=s,m&&(i[u+1]=s),d<=127?a[s+0]=u:d<=2047?(a[s+0]=u,a[s+1]=u):d<=65535?(a[s+0]=u,a[s+1]=u,a[s+2]=u):(a[s+0]=u,a[s+1]=u,a[s+2]=u,a[s+3]=u)),d<=127?l[s++]=d:d<=2047?(l[s++]=192|(d&1984)>>>6,l[s++]=128|(d&63)>>>0):d<=65535?(l[s++]=224|(d&61440)>>>12,l[s++]=128|(d&4032)>>>6,l[s++]=128|(d&63)>>>0):(l[s++]=240|(d&1835008)>>>18,l[s++]=128|(d&258048)>>>12,l[s++]=128|(d&4032)>>>6,l[s++]=128|(d&63)>>>0),m&&u++}this.utf16Length=r,this.utf8Length=n,this.utf16Value=t,this.utf8Value=l,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let r=0;for(let n=0,o=t.length;n<o;n++){const i=t.charCodeAt(n);let a=i,l=!1;if(i>=55296&&i<=56319&&n+1<o){const s=t.charCodeAt(n+1);s>=56320&&s<=57343&&(a=(i-55296<<10)+65536|s-56320,l=!0)}a<=127?r+=1:a<=2047?r+=2:a<=65535?r+=3:r+=4,l&&n++}return r}createString(t){const r=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,r),r}}const Ir=class He{constructor(t){if(_e(this,"id",++He.LAST_ID),_e(this,"_onigBinding"),_e(this,"content"),_e(this,"utf16Length"),_e(this,"utf8Length"),_e(this,"utf16OffsetToUtf8"),_e(this,"utf8OffsetToUtf16"),_e(this,"ptr"),!Ee)throw new Mn("Must invoke loadWasm first.");this._onigBinding=Ee,this.content=t;const r=new Dr(t);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!He._sharedPtrInUse?(He._sharedPtr||(He._sharedPtr=Ee.omalloc(1e4)),He._sharedPtrInUse=!0,Ee.HEAPU8.set(r.utf8Value,He._sharedPtr),this.ptr=He._sharedPtr):this.ptr=r.createString(Ee)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===He._sharedPtr?He._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};_e(Ir,"LAST_ID",0);_e(Ir,"_sharedPtr",0);_e(Ir,"_sharedPtrInUse",!1);let Ea=Ir;class Cf{constructor(t){if(_e(this,"_onigBinding"),_e(this,"_ptr"),!Ee)throw new Mn("Must invoke loadWasm first.");const r=[],n=[];for(let l=0,s=t.length;l<s;l++){const u=new Dr(t[l]);r[l]=u.createString(Ee),n[l]=u.utf8Length}const o=Ee.omalloc(4*t.length);Ee.HEAPU32.set(r,o/4);const i=Ee.omalloc(4*t.length);Ee.HEAPU32.set(n,i/4);const a=Ee.createOnigScanner(o,i,t.length);for(let l=0,s=t.length;l<s;l++)Ee.ofree(r[l]);Ee.ofree(i),Ee.ofree(o),a===0&&Tf(Ee),this._onigBinding=Ee,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,r,n){let o=0;if(typeof n=="number"&&(o=n),typeof t=="string"){t=new Ea(t);const i=this._findNextMatchSync(t,r,!1,o);return t.dispose(),i}return this._findNextMatchSync(t,r,!1,o)}_findNextMatchSync(t,r,n,o){const i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(r),o);if(a===0)return null;const l=i.HEAPU32;let s=a/4;const u=l[s++],c=l[s++],d=[];for(let m=0;m<c;m++){const h=t.convertUtf8OffsetToUtf16(l[s++]),g=t.convertUtf8OffsetToUtf16(l[s++]);d[m]={start:h,end:g,length:g-h}}return{index:u,captureIndices:d}}}function Af(e){return typeof e.instantiator=="function"}function Of(e){return typeof e.default=="function"}function Df(e){return typeof e.data<"u"}function If(e){return typeof Response<"u"&&e instanceof Response}function kf(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let ur;function xf(e){if(ur)return ur;async function t(){Ee=await Sf(async r=>{let n=e;return n=await n,typeof n=="function"&&(n=await n(r)),typeof n=="function"&&(n=await n(r)),Af(n)?n=await n.instantiator(r):Of(n)?n=await n.default(r):(Df(n)&&(n=n.data),If(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await Nf(n)(r):n=await Mf(n)(r):kf(n)?n=await Zr(n)(r):n instanceof WebAssembly.Module?n=await Zr(n)(r):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await Zr(n.default)(r))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return ur=t(),ur}function Zr(e){return t=>WebAssembly.instantiate(e,t)}function Nf(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Mf(e){return async t=>{const r=await e.arrayBuffer();return WebAssembly.instantiate(r,t)}}async function Vf(e){return e&&await xf(e),{createScanner(t){return new Cf(t.map(r=>typeof r=="string"?r:r.source))},createString(t){return new Ea(t)}}}const Xf=pf({langs:yf,themes:Ef,engine:()=>Vf(f(()=>import("./wasm-CG6Dc4jp.js"),[]))});export{jf as C,mu as N,Ff as P,Ua as R,za as a,E as b,Uf as c,Xf as d,yf as e,Ef as f,$f as g,Bf as h,zf as i,Gf as j,Hf as k,Wf as l,qf as m,ei as r,Je as u};