@macintacos/caret 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/cli.js +1 -1
- package/package.json +1 -1
- package/ui/dist/assets/{angular-html-Dpskr4gp.js → angular-html-yY3ygMZZ.js} +1 -1
- package/ui/dist/assets/{angular-ts-ARX7ETPl.js → angular-ts-CfoJFBTQ.js} +1 -1
- package/ui/dist/assets/{apl-jPp27sHK.js → apl-DT7k7bw4.js} +1 -1
- package/ui/dist/assets/{astro-CjqjWi5R.js → astro-CJZXIXFd.js} +1 -1
- package/ui/dist/assets/{blade-CU7nL4Lc.js → blade-D9JiJjrS.js} +1 -1
- package/ui/dist/assets/{c-CK1Vx2o3.js → c-D0Y9hqRQ.js} +1 -1
- package/ui/dist/assets/{chapel-BixVryYd.js → chapel-D7yn7jxF.js} +1 -1
- package/ui/dist/assets/{cobol-BBS8zZYJ.js → cobol-ON3ke5xj.js} +1 -1
- package/ui/dist/assets/{coffee-BkpQ5qJl.js → coffee-BYtoZsQ6.js} +1 -1
- package/ui/dist/assets/{cpp-P_7SyfCT.js → cpp-ksKJapDi.js} +1 -1
- package/ui/dist/assets/{crystal-Pa0I8tFv.js → crystal-2UizyKGm.js} +1 -1
- package/ui/dist/assets/{css-C2r9H2Cm.js → css-BiY6DdoY.js} +1 -1
- package/ui/dist/assets/{dist-DEek50ly.js → dist-BWCMQAHO.js} +1 -1
- package/ui/dist/assets/{dist-Dt7T4fXX.js → dist-BdX-zXTt.js} +1 -1
- package/ui/dist/assets/{dist-GZSAtcw9.js → dist-C3j3DCXP.js} +1 -1
- package/ui/dist/assets/{dist-DPaKrZAg.js → dist-CJI9XKY6.js} +1 -1
- package/ui/dist/assets/{dist-ZCpVZHxJ.js → dist-CUrPqCJM.js} +1 -1
- package/ui/dist/assets/{dist-B3Gw99wx.js → dist-DOXluTcG.js} +1 -1
- package/ui/dist/assets/{dist--BHbWUnT.js → dist-DyhOeNTK.js} +1 -1
- package/ui/dist/assets/{dist-DVUt_SGH.js → dist-R5oGZF-x.js} +1 -1
- package/ui/dist/assets/{dist-aiRbTm_k.js → dist-ryZq9scv.js} +1 -1
- package/ui/dist/assets/{dist-6WscILbU.js → dist-szzEpuzi.js} +1 -1
- package/ui/dist/assets/{edge-DhkMTpj6.js → edge-CQXgfN6f.js} +1 -1
- package/ui/dist/assets/{elixir-3s-_iOeW.js → elixir-Bq5Vdfdz.js} +1 -1
- package/ui/dist/assets/{elm-DgwIfbUS.js → elm-Drj2uRJz.js} +1 -1
- package/ui/dist/assets/{erb-B8CSqvER.js → erb-DR5atT5u.js} +1 -1
- package/ui/dist/assets/{git-rebase-CYXN4j3p.js → git-rebase-qqDOUY4y.js} +1 -1
- package/ui/dist/assets/{glimmer-js-B1KY4FVt.js → glimmer-js-swrKPqN7.js} +1 -1
- package/ui/dist/assets/{glimmer-ts-BGvAt0br.js → glimmer-ts-B2b_vXqT.js} +1 -1
- package/ui/dist/assets/{glsl-C5hf4-E0.js → glsl-CuJlzsa0.js} +1 -1
- package/ui/dist/assets/{graphql-BaXOG8De.js → graphql-N5XL4Igl.js} +1 -1
- package/ui/dist/assets/{hack-CA_eD4_j.js → hack-DAjYMpAQ.js} +1 -1
- package/ui/dist/assets/{haml-Cem1S36k.js → haml-bCL8XrBO.js} +1 -1
- package/ui/dist/assets/{handlebars-BL78OyE4.js → handlebars-DHKgZM6S.js} +1 -1
- package/ui/dist/assets/{html-oVT1Os71.js → html-C_jnzgd_.js} +1 -1
- package/ui/dist/assets/{html-derivative-Ckkaotti.js → html-derivative-BpHLgdTe.js} +1 -1
- package/ui/dist/assets/{http-BWzIotxC.js → http-C9gOztuo.js} +1 -1
- package/ui/dist/assets/{hurl-BnG0Lkyj.js → hurl-BXoVnMal.js} +1 -1
- package/ui/dist/assets/index-FmL6-rOV.css +1 -0
- package/ui/dist/assets/{index-DUJq-Izi.js → index-jwD-lIWV.js} +3 -3
- package/ui/dist/assets/{java-DBPt3Tkt.js → java-ChvIR-vI.js} +1 -1
- package/ui/dist/assets/{javascript-BJtjZzoN.js → javascript-BtM5a1-k.js} +1 -1
- package/ui/dist/assets/{jinja-O_4nKTrT.js → jinja-pvNd4qzh.js} +1 -1
- package/ui/dist/assets/{jison-DAFNy79p.js → jison-sfvdVpT7.js} +1 -1
- package/ui/dist/assets/{json-D2HbOIPd.js → json-CNZpiPKJ.js} +1 -1
- package/ui/dist/assets/{jsx-YTcqpjVV.js → jsx-DZDMTAk_.js} +1 -1
- package/ui/dist/assets/{julia-CK3Ru6XD.js → julia-BL7qk1iT.js} +1 -1
- package/ui/dist/assets/{just-CHzPr58U.js → just-uod8WSY3.js} +1 -1
- package/ui/dist/assets/{latex-DZCSDFgp.js → latex-dpi8HpbG.js} +1 -1
- package/ui/dist/assets/{liquid-CaUAA9ym.js → liquid-BawoDryy.js} +1 -1
- package/ui/dist/assets/{lua-nQClDlz4.js → lua-DWiK1E2i.js} +1 -1
- package/ui/dist/assets/{marko-BauDEZ6y.js → marko-BXkudM8D.js} +1 -1
- package/ui/dist/assets/{mdc-0x4b_vMv.js → mdc-Bmg-n7wg.js} +1 -1
- package/ui/dist/assets/{nginx-DsLgRdKI.js → nginx-6CyLwTv5.js} +1 -1
- package/ui/dist/assets/{nim-Dp4GPDgP.js → nim-qQvA9F3H.js} +1 -1
- package/ui/dist/assets/{org-Ds7eZhO5.js → org-CZPJg31I.js} +1 -1
- package/ui/dist/assets/{perl-ByEU8_AC.js → perl-BHwT64Dn.js} +1 -1
- package/ui/dist/assets/{php-XXxp91lc.js → php-D8NTgrbg.js} +1 -1
- package/ui/dist/assets/{pug-BAvlbdHh.js → pug-BVUwFWbq.js} +1 -1
- package/ui/dist/assets/{qml-Cb371878.js → qml-CLSmNp_i.js} +1 -1
- package/ui/dist/assets/{r-CLLB1AQb.js → r-EIHOgDPx.js} +1 -1
- package/ui/dist/assets/{razor-CtfpbSg7.js → razor-BPii5bUu.js} +1 -1
- package/ui/dist/assets/{regexp-Bw-ytoJQ.js → regexp-CWI8pQZM.js} +1 -1
- package/ui/dist/assets/{rst-tIU3xPyQ.js → rst-IDb7GnpL.js} +1 -1
- package/ui/dist/assets/{ruby-DpyEHNhW.js → ruby-JHA-t8UR.js} +1 -1
- package/ui/dist/assets/{sas-I9Tpj7gJ.js → sas-Dlys6wEq.js} +1 -1
- package/ui/dist/assets/{scss-DROgm5ds.js → scss-DQ3TetHN.js} +1 -1
- package/ui/dist/assets/{shellscript-Xhfw3ww3.js → shellscript-DZ2dKShG.js} +1 -1
- package/ui/dist/assets/{shellsession-Dg-SFZle.js → shellsession-CCP03ZF7.js} +1 -1
- package/ui/dist/assets/{soy-DGc_aMeL.js → soy-e3nnrv7u.js} +1 -1
- package/ui/dist/assets/{sql-4a54dIqY.js → sql-CkwaWr-O.js} +1 -1
- package/ui/dist/assets/{stata-DZ0cystC.js → stata-COrW6kNx.js} +1 -1
- package/ui/dist/assets/{surrealql-Dlgr5ZdW.js → surrealql-CYe8f-Bp.js} +1 -1
- package/ui/dist/assets/{svelte-B8tgvRm3.js → svelte-CuoMH8V_.js} +1 -1
- package/ui/dist/assets/{templ-BAt1dBJv.js → templ-BaMURml8.js} +1 -1
- package/ui/dist/assets/{tex-CnA1kZ68.js → tex-Clsc8t8H.js} +1 -1
- package/ui/dist/assets/{ts-tags-CksBCcqD.js → ts-tags-BAg5C1ub.js} +1 -1
- package/ui/dist/assets/{tsx-SkJiAILm.js → tsx-rMIupNhm.js} +1 -1
- package/ui/dist/assets/{twig-CLziBLMD.js → twig-DqwvPhpg.js} +1 -1
- package/ui/dist/assets/{typescript-16WJW8J9.js → typescript-3GSK8yFX.js} +1 -1
- package/ui/dist/assets/{typst-MyccmZVL.js → typst-CGKkM3pT.js} +1 -1
- package/ui/dist/assets/{vue-BHRec-Op.js → vue-DcXRtF34.js} +1 -1
- package/ui/dist/assets/{vue-html-CBDhBnkD.js → vue-html-BIR8K8bh.js} +1 -1
- package/ui/dist/assets/{vue-vine-Xpg29mV9.js → vue-vine-IEgILria.js} +1 -1
- package/ui/dist/assets/{xml-DBXnEspb.js → xml-CIHnIn95.js} +1 -1
- package/ui/dist/assets/{xsl-DDUn7e6M.js → xsl-CaZZ2eEQ.js} +1 -1
- package/ui/dist/assets/{yaml-DtCZHCtv.js → yaml-Dj6iHQsO.js} +1 -1
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-IH-Uupk2.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-yY3ygMZZ.js","assets/html-C_jnzgd_.js","assets/javascript-BtM5a1-k.js","assets/css-BiY6DdoY.js","assets/angular-ts-CfoJFBTQ.js","assets/scss-DQ3TetHN.js","assets/apl-DT7k7bw4.js","assets/xml-CIHnIn95.js","assets/java-ChvIR-vI.js","assets/json-CNZpiPKJ.js","assets/astro-CJZXIXFd.js","assets/typescript-3GSK8yFX.js","assets/postcss-BXeXVLqQ.js","assets/tsx-rMIupNhm.js","assets/blade-D9JiJjrS.js","assets/html-derivative-BpHLgdTe.js","assets/sql-CkwaWr-O.js","assets/bsl-_VjlB9mv.js","assets/sdbl-bTVj8UrX.js","assets/cairo-DLTphjLi.js","assets/python-gzcpVVnB.js","assets/chapel-D7yn7jxF.js","assets/c-D0Y9hqRQ.js","assets/cobol-ON3ke5xj.js","assets/coffee-BYtoZsQ6.js","assets/cpp-ksKJapDi.js","assets/regexp-CWI8pQZM.js","assets/glsl-CuJlzsa0.js","assets/crystal-2UizyKGm.js","assets/shellscript-DZ2dKShG.js","assets/edge-CQXgfN6f.js","assets/elixir-Bq5Vdfdz.js","assets/elm-Drj2uRJz.js","assets/erb-DR5atT5u.js","assets/ruby-JHA-t8UR.js","assets/haml-bCL8XrBO.js","assets/graphql-N5XL4Igl.js","assets/jsx-DZDMTAk_.js","assets/lua-DWiK1E2i.js","assets/yaml-Dj6iHQsO.js","assets/erlang-Cphh6RMH.js","assets/markdown-BYOwaDjH.js","assets/fortran-fixed-form-DEKoE2YW.js","assets/fortran-free-form-CYNrtFtB.js","assets/fsharp-D13ZGOAj.js","assets/gdresource-xMC7jr7x.js","assets/gdshader-CBce3t8t.js","assets/gdscript-DYvRD3hg.js","assets/git-commit-BSykSTBG.js","assets/diff-woXpYk--.js","assets/git-rebase-qqDOUY4y.js","assets/glimmer-js-swrKPqN7.js","assets/glimmer-ts-B2b_vXqT.js","assets/hack-DAjYMpAQ.js","assets/handlebars-DHKgZM6S.js","assets/http-C9gOztuo.js","assets/hurl-BXoVnMal.js","assets/csv-Dx-8-gkx.js","assets/hxml-Dcm88srW.js","assets/haxe-C8oCnwJJ.js","assets/jinja-pvNd4qzh.js","assets/jison-sfvdVpT7.js","assets/julia-BL7qk1iT.js","assets/r-EIHOgDPx.js","assets/just-uod8WSY3.js","assets/perl-BHwT64Dn.js","assets/latex-dpi8HpbG.js","assets/tex-Clsc8t8H.js","assets/liquid-BawoDryy.js","assets/marko-BXkudM8D.js","assets/less-DVTAwKKz.js","assets/mdc-Bmg-n7wg.js","assets/nextflow-BJtWHP5T.js","assets/nextflow-groovy-DJMQeKeT.js","assets/nginx-6CyLwTv5.js","assets/nim-qQvA9F3H.js","assets/org-CZPJg31I.js","assets/clojure-DqKBuwfJ.js","assets/csharp-oqKa8noW.js","assets/dart-CnvKMtbv.js","assets/docker-IyjqRm3v.js","assets/go-rLFTqkRN.js","assets/groovy-CacY0gHj.js","assets/ini-B5eOa1yu.js","assets/make-Dixweg8N.js","assets/objective-c-D1A_Heim.js","assets/ocaml-O90oeIOV.js","assets/php-D8NTgrbg.js","assets/vb-DOwzaHZ0.js","assets/raku-B3gFvitq.js","assets/rust-Cfkwpbl8.js","assets/scala-BiFt_7mu.js","assets/zig-CMLA9XwU.js","assets/xsl-CaZZ2eEQ.js","assets/pug-BVUwFWbq.js","assets/qml-CLSmNp_i.js","assets/razor-BPii5bUu.js","assets/rst-IDb7GnpL.js","assets/cmake-Bj61d0ZC.js","assets/sas-Dlys6wEq.js","assets/shaderlab-TOUzSsQk.js","assets/hlsl-Cvrh5tZx.js","assets/shellsession-CCP03ZF7.js","assets/soy-e3nnrv7u.js","assets/sparql-D_iOobhT.js","assets/turtle-ByJddavk.js","assets/stata-COrW6kNx.js","assets/surrealql-CYe8f-Bp.js","assets/svelte-CuoMH8V_.js","assets/templ-BaMURml8.js","assets/ts-tags-BAg5C1ub.js","assets/twig-DqwvPhpg.js","assets/typst-CGKkM3pT.js","assets/bat-qdxAdBWQ.js","assets/bibtex-Ci_nEsc7.js","assets/jsonc-CYpm1nAK.js","assets/log-BNLmms1o.js","assets/powershell-CCSX75yM.js","assets/swift-CyEgAFGc.js","assets/system-verilog-Dh5ihWbf.js","assets/verilog-B2gwz-sJ.js","assets/vue-DcXRtF34.js","assets/vue-html-BIR8K8bh.js","assets/vue-vine-IEgILria.js","assets/stylus-B6D30XZt.js","assets/dist-CJI9XKY6.js","assets/dist-DOswrDst.js","assets/dist-TxQM6vOw.js","assets/dist-DOXluTcG.js","assets/dist-DXn_f-MA.js","assets/dist-BWCMQAHO.js","assets/dist-BubrR0xG.js","assets/dist-R5oGZF-x.js","assets/dist-ryZq9scv.js","assets/dist-szzEpuzi.js","assets/dist-BdX-zXTt.js","assets/dist-CfuU_6ln.js","assets/dist-C3j3DCXP.js","assets/dist-Lc2Es7Pl.js","assets/dist-CjIRqXSt.js","assets/dist-D0Ats_4w.js","assets/dockerfile-DJkHQgkl.js","assets/simple-mode-DXiLM1-G.js","assets/factor-LKH5gN8L.js","assets/nsis-CfSuhXs5.js","assets/pug-Gsm0M45u.js","assets/javascript-DoL9Wb-Q.js","assets/dist-CUrPqCJM.js","assets/dist-DyhOeNTK.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,T as b,U as x,V as S,W as C,X as w,Y as ee,Z as te,_ as ne,_t as re,a as ie,at as ae,b as oe,c as se,ct as ce,d as le,dt as ue,et as T,f as de,ft as fe,g as pe,gt as me,h as he,ht as ge,i as _e,it as ve,j as ye,k as be,l as E,lt as xe,m as Se,mt as Ce,n as we,nt as Te,o as Ee,ot as De,p as Oe,pt as ke,q as Ae,r as je,rt as Me,s as Ne,st as Pe,t as Fe,tt as Ie,u as Le,ut as Re,v as ze,w as Be,x as Ve,y as He,z as Ue}from"./dist-DOswrDst.js";var We=Object.defineProperty,Ge=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Ke=(e,t)=>{let n={};for(var r in e)We(n,r,{get:e[r],enumerable:!0});return t||We(n,Symbol.toStringTag,{value:`Module`}),n};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var qe=Array.isArray,Je=Array.prototype.indexOf,Ye=Array.prototype.includes,Xe=Array.from,Ze=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,$e=Object.getOwnPropertyDescriptors,et=Object.prototype,tt=Array.prototype,nt=Object.getPrototypeOf,rt=Object.isExtensible;function it(e){return typeof e==`function`}var D=()=>{};function at(e){return e()}function ot(e){for(var t=0;t<e.length;t++)e[t]()}function st(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var ct=1<<24,lt=1024,ut=2048,dt=4096,ft=8192,pt=16384,mt=32768,ht=1<<25,gt=65536,_t=1<<19,vt=1<<20,yt=1<<25,bt=65536,xt=1<<21,St=1<<22,Ct=1<<23,wt=Symbol(`$state`),Tt=Symbol(`component`),Et=Symbol(`legacy props`),Dt=Symbol(``),Ot=Symbol(`attributes`),kt=Symbol(`class`),At=Symbol(`style`),jt=Symbol(`text`),Mt=Symbol(`form reset`),Nt=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Pt=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),Ft={},It=Symbol(`uninitialized`),Lt=`http://www.w3.org/1999/xhtml`,Rt=`http://www.w3.org/2000/svg`,zt=`http://www.w3.org/1998/Math/MathML`,Bt=`@attach`;function Vt(){console.warn(`https://svelte.dev/e/derived_inert`)}function Ht(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Ut(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Wt(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var Gt=!1;function Kt(e){Gt=e}var qt;function Jt(e){if(e===null)throw Ht(),Ft;return qt=e}function Yt(){return Jt(Br(qt))}function O(e){if(Gt){if(Br(qt)!==null)throw Ht(),Ft;qt=e}}function k(e=1){if(Gt){for(var t=e,n=qt;t--;)n=Br(n);qt=n}}function Xt(e=!0){for(var t=0,n=qt;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Br(n);e&&n.remove(),n=i}}function Zt(e){if(!e||e.nodeType!==8)throw Ht(),Ft;return e.data}function Qt(e){return e===this.v}function $t(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function en(e){return!$t(e,this.v)}function tn(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function nn(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function rn(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function an(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function on(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function sn(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function cn(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function ln(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function un(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function dn(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function fn(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function pn(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var mn=!1;function hn(){mn=!0}var gn=[];function _n(e,t=!1,n=!1){return vn(e,new Map,``,gn,null,n)}function vn(e,t,n,r,i=null,a=!1){if(typeof e==`object`&&e){var o=t.get(e);if(o!==void 0)return o;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(qe(e)){var s=Array(e.length);t.set(e,s),i!==null&&t.set(i,s);for(var c=0;c<e.length;c+=1){var l=e[c];c in e&&(s[c]=vn(l,t,n,r,null,a))}return s}if(nt(e)===et){s={},t.set(e,s),i!==null&&t.set(i,s);for(var u of Object.keys(e))s[u]=vn(e[u],t,n,r,null,a);return s}if(e instanceof Date)return e.getTime(),structuredClone(e);if(typeof e.toJSON==`function`&&!a)return vn(e.toJSON(),t,n,r,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}function yn(e){let t=e.p;for(;t!==null&&t.c===null;)t=t.p;return t?.c??null}function bn(e,t){return e===null&&tn(t),e.c??=new Map(yn(e)||void 0)}var xn=null;function Sn(e){xn=e}function Cn(e){return bn(xn,`getContext`).get(e)}function wn(e,t){return bn(xn,`setContext`).set(e,t),t}function Tn(e){return bn(xn,`hasContext`).has(e)}function En(){return bn(xn,`getAllContexts`)}function A(e,t=!1,n){xn={p:xn,i:!1,c:null,e:null,s:e,x:null,r:Ci,l:mn&&!t?{s:null,u:null,$:[]}:null}}function j(e){var t=xn,n=t.e;if(n!==null){t.e=null;for(var r of n)Qr(r)}return e!==void 0&&(t.x=e),t.i=!0,xn=t.p,Dn(e)}function Dn(e={}){return Ze(e,Tt,{value:!0}),e}function On(){return!mn||xn!==null&&xn.l===null}var kn=[];function An(){var e=kn;kn=[],ot(e)}function jn(e){if(kn.length===0&&!lr){var t=kn;queueMicrotask(()=>{t===kn&&An()})}kn.push(e)}function Mn(){for(;kn.length>0;)An()}var Nn=~(ut|dt|lt);function Pn(e,t){e.f=e.f&Nn|t}function Fn(e){e.f&512||e.deps===null?Pn(e,lt):Pn(e,dt)}function In(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=bt,In(t.deps))}function Ln(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),In(e.deps),Pn(e,lt)}var Rn=!1;function zn(e){var t=Rn;try{return Rn=!1,[e(),Rn]}finally{Rn=t}}function Bn(e,t){if(t){let t=document.body;e.autofocus=!0,jn(()=>{document.activeElement===t&&e.focus()})}}var Vn=!1;function Hn(){Vn||(Vn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[Mt]?.()})},{capture:!0}))}function Un(e){var t=bi,n=Ci;Si(null),wi(null);try{return e()}finally{Si(t),wi(n)}}function Wn(e,t,n,r=n){e.addEventListener(t,()=>Un(n));let i=e[Mt];e[Mt]=i?()=>{i(),r(!0)}:()=>r(!0),Hn()}function Gn(e,t,n,r){let i=On()?Yn:Qn;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=Ci,c=Kn(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){qr(e,s)}qn()}}var d=Jn();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>Zn(e))).then(u).catch(e=>qr(e,s)).finally(d)}l?l.then(()=>{c(),f(),qn()}):f()}function Kn(){var e=Ci,t=bi,n=xn,r=ar;return function(i=!0){wi(e),Si(t),Sn(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function qn(e=!0){wi(null),Si(null),Sn(null),e&&ar?.deactivate()}function Jn(){var e=Ci,t=e.b,n=ar,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Yn(e){var t=2|ut;return Ci!==null&&(Ci.f|=_t),{ctx:xn,deps:null,effects:null,equals:Qt,f:t,fn:e,reactions:null,rv:0,v:It,wv:0,parent:Ci,ac:null}}var Xn=Symbol(`obsolete`);function Zn(e,t,n){let r=Ci;r===null&&nn();var i=void 0,a=Tr(It),o=!bi,s=new Set;return ni(()=>{var t=Ci,n=st();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==Nt&&n.reject(e)}).finally(qn)}catch(e){n.reject(e),qn()}var c=ar;if(o){if(t.f&32768)var l=Jn();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(Xn);else for(let e of s.values())e.reject(Xn);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==Xn&&(c.activate(),t?(a.f|=Ct,Dr(a,t)):(a.f&8388608&&(a.f^=Ct),Dr(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Zr(()=>{for(let e of s)e.reject(Xn)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function M(e){let t=Yn(e);return Ei(t),t}function Qn(e){let t=Yn(e);return t.equals=en,t}function $n(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)li(t[n])}}function er(e){var t,n=Ci,r=e.parent;if(!vi&&r!==null&&e.v!==It&&r.f&24576)return Vt(),e.v;wi(r);try{e.f&=~bt,$n(e),t=Li(e)}finally{wi(n)}return t}function tr(e){var t=er(e);if(!e.equals(t)&&(e.wv=Pi(),(!ar?.is_fork||e.deps===null)&&(ar===null?e.v=t:(ar.capture(e,t,!0),or?.capture(e,t,!0)),e.deps===null))){Pn(e,lt);return}vi||(sr===null?Fn(e):(Xr()||ar?.is_fork)&&sr.set(e,t))}function nr(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Un(()=>{t.ac.abort(Nt),t.ac=null}),t.fn!==null&&(t.teardown=D),Bi(t,0),ci(t))}function rr(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Vi(t)}var ir=null,ar=null,or=null,sr=null,cr=null,lr=!1,ur=!1,dr=null,fr=null,pr=0,eee=1,mr=class e{id=eee++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){ir===null?ir=this:(ir.#n=this,this.#t=ir),ir=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)Pn(r,ut),t(r);for(r of n.m)Pn(r,dt),t(r)}this.#p.add(e)}#g(){this.#e=!0,pr++>1e3&&(this.#x(),gr());for(let e of this.#u)this.#d.delete(e),Pn(e,ut),this.schedule(e);for(let e of this.#d)Pn(e,dt),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=dr=[],r=[],i=fr=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw xr(e),this.#h()||this.discard(),t}if(ar=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(dr=null,fr=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)br(e,t);i.length>0&&ar.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),or=this,vr(r),vr(n),or=null,this.#s?.resolve();var s=ar;if(this.#a===0&&(this.#c.length===0||s!==null)&&this.#x(),this.#c.length>0){if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this}s!==null&&(Cr.clear(),s.#g())}#_(e,t,n){e.f^=lt;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=lt:i&4?t.push(r):Fi(r)&&(i&16&&this.#d.add(r),Vi(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),Pn(i,ut),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#x(),ar=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)Ln(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==It&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),sr?.set(e,t)),this.is_fork||(e.v=t)}activate(){ar=this}deactivate(){ar=null,sr=null}flush(){try{ur=!0,ar=this,this.#g()}finally{pr=0,cr=null,dr=null,fr=null,ur=!1,ar=null,sr=null,Cr.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(Xn);this.#x(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,jn(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=st()).promise}static ensure(){if(ar===null){let t=ar=new e;!ur&&!lr&&jn(()=>{t.#e||t.flush()})}return ar}apply(){sr=null}schedule(e){if(cr=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(dr!==null&&t===Ci&&(bi===null||!(bi.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=lt}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?ir=e:t.#t=e,this.linked=!1}}};function hr(e){var t=lr;lr=!0;try{var n;for(e&&(ar!==null&&!ar.is_fork&&ar.flush(),n=e());;){if(Mn(),ar===null)return n;ar.flush()}}finally{lr=t}}function gr(){try{cn()}catch(e){qr(e,cr)}}var _r=null;function vr(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Fi(r)&&(_r=new Set,Vi(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&di(r),_r?.size>0)){Cr.clear();for(let e of _r){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)_r.has(n)&&(_r.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Vi(n)}}_r.clear()}}_r=null}}function yr(e){ar.schedule(e)}function br(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),Pn(e,lt);for(var n=e.first;n!==null;)br(n,t),n=n.next}}function xr(e){Pn(e,lt);for(var t=e.first;t!==null;)xr(t),t=t.next}var Sr=new Set,Cr=new Map,wr=!1;function Tr(e,t){return{f:0,v:e,reactions:null,equals:Qt,rv:0,wv:0}}function N(e,t){let n=Tr(e,t);return Ei(n),n}function Er(e,t=!1,n=!0){let r=Tr(e);return t||(r.equals=en),mn&&n&&xn!==null&&xn.l!==null&&(xn.l.s??=[]).push(r),r}function P(e,t,n=!1){return bi!==null&&(!xi||bi.f&131072)&&On()&&bi.f&4325394&&(Ti===null||!Ti.has(e))&&fn(),Dr(e,n?jr(t):t,fr)}function Dr(e,t,n=null){if(!e.equals(t)){vi?Cr.set(e,t):Cr.has(e)||Cr.set(e,e.v);var r=mr.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&er(t),sr===null&&Fn(t)}e.wv=Pi(),Ar(e,ut,n),On()&&Ci!==null&&Ci.f&1024&&!(Ci.f&96)&&(ki===null?see([e]):ki.push(e)),!r.is_fork&&Sr.size>0&&!wr&&tee()}return t}function tee(){wr=!1;for(let e of Sr){e.f&1024&&Pn(e,dt);let t;try{t=Fi(e)}catch{t=!0}t&&Vi(e)}Sr.clear()}function Or(e,t=1){var n=B(e),r=t===1?n++:n--;return P(e,n),r}function kr(e){P(e,e.v+1)}function Ar(e,t,n){var r=e.reactions;if(r!==null)for(var i=On(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===Ci)){var l=(c&ut)===0;if(l&&Pn(s,t),c&131072)Sr.add(s);else if(c&2){var u=s;sr?.delete(u),c&65536||(c&512&&(Ci===null||!(Ci.f&2097152))&&(s.f|=bt),Ar(u,dt,n))}else if(l){var d=s;c&16&&_r!==null&&_r.add(d),n===null?yr(d):n.push(d)}}}}function jr(e){if(typeof e!=`object`||!e||wt in e||Tt in e)return e;let t=nt(e);if(t!==et&&t!==tt)return e;var n=new Map,r=qe(e),i=N(0),a=null,o=Mi,s=e=>{if(Mi===o)return e();var t=bi,n=Mi;Si(null),Ni(o);var r=e();return Si(t),Ni(n),r};return r&&n.set(`length`,N(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&un();var i=n.get(t);return i===void 0?s(()=>{var e=N(r.value,a);return n.set(t,e),e}):P(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>N(It,a));n.set(t,e),kr(i)}}else P(r,It),kr(i);return!0},get(t,r,i){if(r===wt)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||Qe(t,r)?.writable)&&(o=s(()=>N(jr(c?t[r]:It),a)),n.set(r,o)),o!==void 0){var l=B(o);return l===It?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=B(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==It)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===wt)return!0;var r=n.get(t),i=r!==void 0&&r.v!==It||Reflect.has(e,t);return(r!==void 0||Ci!==null&&(!i||Qe(e,t)?.writable))&&(r===void 0&&(r=s(()=>N(i?jr(e[t]):It,a)),n.set(t,r)),B(r)===It)?!1:i},set(e,t,o,c){var l=n.get(t),u=t in e;if(r&&t===`length`)for(var d=o;d<l.v;d+=1){var f=n.get(d+``);f===void 0?d in e&&(f=s(()=>N(It,a)),n.set(d+``,f)):P(f,It)}if(l===void 0)(!u||Qe(e,t)?.writable)&&(l=s(()=>N(void 0,a)),P(l,jr(o)),n.set(t,l));else{u=l.v!==It;var p=s(()=>jr(o));P(l,p)}var m=Reflect.getOwnPropertyDescriptor(e,t);if(m?.set&&m.set.call(c,o),!u){if(r&&typeof t==`string`){var h=n.get(`length`),g=Number(t);Number.isInteger(g)&&g>=h.v&&P(h,g+1)}kr(i)}return!0},ownKeys(e){B(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==It});for(var[r,a]of n)a.v!==It&&!(r in e)&&t.push(r);return t},setPrototypeOf(){dn()}})}function Mr(e){try{if(typeof e==`object`&&e&&wt in e)return e[wt]}catch{}return e}function Nr(e,t){return Object.is(Mr(e),Mr(t))}var Pr,Fr,Ir,Lr;function nee(){if(Pr===void 0){Pr=window,Fr=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ir=Qe(t,`firstChild`).get,Lr=Qe(t,`nextSibling`).get,rt(e)&&(e[kt]=void 0,e[Ot]=null,e[At]=void 0,e.__e=void 0),rt(n)&&(n[jt]=void 0)}}function Rr(e=``){return document.createTextNode(e)}function zr(e){return Ir.call(e)}function Br(e){return Lr.call(e)}function F(e,t){if(!Gt)return zr(e);var n=zr(qt);if(n===null)n=qt.appendChild(Rr());else if(t&&n.nodeType!==3){var r=Rr();return n?.before(r),Jt(r),r}return t&&Gr(n),Jt(n),n}function I(e,t=!1){if(!Gt){var n=zr(e);return n instanceof Comment&&n.data===``?Br(n):n}if(t){if(qt?.nodeType!==3){var r=Rr();return qt?.before(r),Jt(r),r}Gr(qt)}return qt}function Vr(e,t=!1){if(!Gt)return zr(e);var n=F(e,t);return O(e),n}function L(e,t=1,n=!1){let r=Gt?qt:e;for(var i;t--;)i=r,r=Br(r);if(!Gt)return r;if(n){if(r?.nodeType!==3){var a=Rr();return r===null?i?.after(a):r.before(a),Jt(a),a}Gr(r)}return Jt(r),r}function Hr(e){e.textContent=``}function Ur(){return!1}function Wr(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Gr(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Kr(e){var t=Ci;if(t===null)return bi.f|=Ct,e;if(!(t.f&32768)&&!(t.f&4))throw e;qr(e,t)}function qr(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function Jr(e){Ci===null&&(bi===null&&sn(e),on()),vi&&an(e)}function ree(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Yr(e,t){var n=Ci;n!==null&&n.f&8192&&(e|=ft);var r={ctx:xn,deps:null,nodes:null,f:e|ut|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};ar?.register_created_effect(r);var i=r;if(e&4)dr===null?mr.ensure().schedule(r):dr.push(r);else if(t!==null){try{Vi(r)}catch(e){throw li(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=gt))}if(i!==null&&(i.parent=n,n!==null&&ree(i,n),bi!==null&&bi.f&2&&!(e&64))){var a=bi;(a.effects??=[]).push(i)}return r}function Xr(){return bi!==null&&!xi}function Zr(e){let t=Yr(8,null);return Pn(t,lt),t.teardown=e,t}function R(e){Jr(`$effect`);var t=Ci.f;if(!bi&&t&32&&xn!==null&&!xn.i){var n=xn;(n.e??=[]).push(e)}else return Qr(e)}function Qr(e){return Yr(4|vt,e)}function $r(e){return Jr(`$effect.pre`),Yr(8|vt,e)}function ei(e){mr.ensure();let t=Yr(64|_t,e);return()=>{li(t)}}function iee(e){mr.ensure();let t=Yr(64|_t,e);return(e={})=>new Promise(n=>{e.outro?fi(t,()=>{li(t),n(void 0)}):(li(t),n(void 0))})}function ti(e){return Yr(4,e)}function ni(e){return Yr(St|_t,e)}function ri(e,t=0){return Yr(8|t,e)}function z(e,t=[],n=[],r=[]){Gn(r,t,n,t=>{Yr(8,()=>{e(...t.map(B))})})}function ii(e,t=0){return Yr(16|t,e)}function ai(e,t=0){return Yr(ct|t,e)}function oi(e){return Yr(32|_t,e)}function si(e){var t=e.teardown;if(t!==null){let n=vi,r=bi;yi(!0),Si(null);try{t.call(null)}catch(t){qr(t,e.parent)}finally{yi(n),Si(r)}}}function ci(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Un(()=>{e.abort(Nt)});var r=n.next;n.f&64?n.parent=null:li(n,t),n=r}}function aee(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||li(t),t=n}}function li(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(ui(e.nodes.start,e.nodes.end),n=!0),e.f|=ht,ci(e,t&&!n),Bi(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();si(e),e.f^=ht,e.f|=pt;var i=e.parent;i!==null&&i.first!==null&&di(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function ui(e,t){for(;e!==null;){var n=e===t?null:Br(e);e.remove(),e=n}}function di(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function fi(e,t,n=!0){var r=[];e.f|=256,pi(e,r,!0);var i=()=>{n&&li(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function pi(e,t,n){if(!(e.f&8192)){e.f^=ft;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);pi(i,t,o?n:!1)}i=a}}}function mi(e){e.f&=-257,hi(e,!0)}function hi(e,t){if(!(e.f&256)&&e.f&8192){e.f^=ft,e.f&1024||(Pn(e,ut),mr.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);hi(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function gi(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Br(n);t.append(n),n=i}}var oee=null,_i=!1,vi=!1;function yi(e){vi=e}var bi=null,xi=!1;function Si(e){bi=e}var Ci=null;function wi(e){Ci=e}var Ti=null;function Ei(e){bi!==null&&(Ti??=new Set).add(e)}var Di=null,Oi=0,ki=null;function see(e){ki=e}var Ai=1,ji=0,Mi=ji;function Ni(e){Mi=e}function Pi(){return++Ai}function Fi(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~bt),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Fi(a)&&tr(a),a.wv>e.wv)return!0}t&512&&sr===null&&Pn(e,lt)}return!1}function Ii(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Ti!==null&&Ti.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Ii(a,t,!1):t===a&&(n?Pn(a,ut):a.f&1024&&Pn(a,dt),yr(a))}}function Li(e){var t=Di,n=Oi,r=ki,i=bi,a=Ti,o=xn,s=xi,c=Mi,l=e.f;Di=null,Oi=0,ki=null,bi=l&96?null:e,Ti=null,Sn(e.ctx),xi=!1,Mi=++ji,e.ac!==null&&(Un(()=>{e.ac.abort(Nt)}),e.ac=null);try{e.f|=xt;var u=e.fn,d=u();e.f|=mt;var f=Ri(e);if(On()&&ki!==null&&!xi&&f!==null&&!(e.f&6146))for(var p=0;p<ki.length;p++)Ii(ki[p],e);if(i!==null&&i!==e){if(ji++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=ji;if(t!==null)for(let e of t)e.rv=ji;ki!==null&&(r===null?r=ki:r.push(...ki))}return e.f&8388608&&(e.f^=Ct),d}catch(t){return Ri(e),Kr(t)}finally{e.f^=xt,Di=t,Oi=n,ki=r,bi=i,Ti=a,Sn(o),xi=s,Mi=c}}function Ri(e){var t=e.deps,n=ar?.is_fork;if(Di!==null){var r;if(n||Bi(e,Oi),t!==null&&Oi>0)for(t.length=Oi+Di.length,r=0;r<Di.length;r++)t[Oi+r]=Di[r];else e.deps=t=Di;if(Xr()&&e.f&512)for(r=Oi;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Oi<t.length&&(Bi(e,Oi),t.length=Oi);return t}function zi(e,t){let n=t.reactions;if(n!==null){var r=Je.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(Di===null||!Ye.call(Di,t))){var a=t;a.f&512&&(a.f^=512,a.f&=~bt),a.v!==It&&Fn(a),a.ac!==null&&Un(()=>{a.ac.abort(Nt),a.ac=null,Pn(a,ut)}),nr(a),Bi(a,0)}}function Bi(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)zi(e,n[r])}function Vi(e){var t=e.f;if(!(t&16384)){Pn(e,lt);var n=Ci,r=_i;Ci=e,_i=!(t&96);try{t&16777232?aee(e):ci(e),si(e);var i=Li(e);e.teardown=typeof i==`function`?i:null,e.wv=Ai}finally{_i=r,Ci=n}}}async function Hi(){await Promise.resolve(),hr()}function B(e){var t=!!(e.f&2);if(oee?.add(e),bi!==null&&!xi&&!(Ci!==null&&Ci.f&16384)&&(Ti===null||!Ti.has(e))){var n=bi.deps;if(bi.f&2097152)e.rv<ji&&(e.rv=ji,Di===null&&n!==null&&n[Oi]===e?Oi++:Di===null?Di=[e]:Di.push(e));else{bi.deps??=[],Ye.call(bi.deps,e)||bi.deps.push(e);var r=e.reactions;r===null?e.reactions=[bi]:Ye.call(r,bi)||r.push(bi)}}if(vi&&Cr.has(e))return Cr.get(e);if(t){var i=e;if(vi){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||Wi(i))&&(a=er(i)),Cr.set(i,a),a}var o=!(i.f&512)&&!xi&&bi!==null&&(_i||!!(bi.f&512)),s=(i.f&mt)===0;Fi(i)&&(o&&(i.f|=512),tr(i)),o&&!s&&(rr(i),Ui(i))}if(sr?.has(e))return sr.get(e);if(e.f&8388608)throw e.v;return e.v}function Ui(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(rr(t),Ui(t))}function Wi(e){if(e.v===It)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Cr.has(t)||t.f&2&&Wi(t))return!0;return!1}function Gi(e){var t=xi;try{return xi=!0,e()}finally{xi=t}}function Ki(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(wt in e)qi(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&wt in n&&qi(n)}}}function qi(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{qi(e[n],t)}catch{}let n=nt(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=$e(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}function Ji(){return Symbol(Bt)}function Yi(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var Xi=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Zi(e){return Xi.includes(e)}var Qi=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),$i={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function ea(e){return e=e.toLowerCase(),$i[e]??e}[...Qi];var ta=[`touchstart`,`touchmove`];function na(e){return ta.includes(e)}var ra=[`textarea`,`script`,`style`,`title`];function ia(e){return ra.includes(e)}var aa=Symbol(`events`),oa=new Set,sa=new Set;function ca(e,t,n,r={}){function i(e){if(r.capture||ha.call(t,e),!e.cancelBubble)return Un(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?jn(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function la(e,t,n,r={}){var i=ca(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function ua(e,t,n,r,i){var a={capture:r,passive:i},o=ca(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Zr(()=>{t.removeEventListener(e,o,a)})}function da(e,t,n){(t[aa]??={})[e]=n}function fa(e){for(var t=0;t<e.length;t++)oa.add(e[t]);for(var n of sa)n(e)}var pa=null,ma=!1;function ha(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;pa=e,ma||(ma=!0,setTimeout(()=>{ma=!1,pa=null}));var o=0,s=pa===e&&e[aa];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[aa]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){Ze(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=bi,d=Ci;Si(null),wi(null);try{for(var f,p=[];a!==null&&a!==t;){try{var m=a[aa]?.[r];m!=null&&(!a.disabled||e.target===a)&&m.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[aa]=t,delete e.currentTarget,Si(u),wi(d)}}}var cee=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function lee(e){return cee?.createHTML(e)??e}function ga(e){var t=Wr(`template`);return t.innerHTML=lee(e.replaceAll(`<!>`,`<!---->`)),t.content}function _a(e,t){var n=Ci;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function V(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(Gt)return _a(qt,null),qt;i===void 0&&(i=ga(a?e:`<!>`+e),n||(i=zr(i)));var t=r||Fr?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=zr(t),s=t.lastChild;_a(o,s)}else _a(t,t);return t}}function uee(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(Gt)return _a(qt,null),qt;if(!o){var e=zr(ga(a));if(i)for(o=document.createDocumentFragment();zr(e);)o.appendChild(zr(e));else o=zr(e)}var t=o.cloneNode(!0);if(i){var n=zr(t),r=t.lastChild;_a(n,r)}else _a(t,t);return t}}function dee(e,t){return uee(e,t,`svg`)}function va(e=``){if(!Gt){var t=Rr(e+``);return _a(t,t),t}var n=qt;return n.nodeType===3?Gr(n):(n.before(n=Rr()),Jt(n)),_a(n,n),n}function H(){if(Gt)return _a(qt,null),qt;var e=document.createDocumentFragment(),t=document.createComment(``),n=Rr();return e.append(t,n),_a(t,n),e}function U(e,t){if(Gt){var n=Ci;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=qt),Yt();return}e!==null&&e.before(t)}function ya(){if(Gt&&qt&&qt.nodeType===8&&qt.textContent?.startsWith(`$`)){let e=qt.textContent.substring(1);return Yt(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function ba(e){let t=0,n=Tr(0),r;return()=>{Xr()&&(B(n),ri(()=>(t===0&&(r=Gi(()=>e(()=>kr(n)))),t+=1,()=>{jn(()=>{--t,t===0&&(r?.(),r=void 0,kr(n))})})))}}var fee=gt|_t;function pee(e,t,n,r){new mee(e,t,n,r)}var mee=class{parent;is_pending=!1;transform_error;#e;#t=Gt?qt:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=ba(()=>(this.#m=Tr(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=Ci;t.b=this,t.f|=128,n(e)},this.parent=Ci.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=ii(()=>{if(Gt){let e=this.#t;Yt();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#y():this.#g()}else this.#b()},fee),Gt&&(this.#e=qt)}#g(){try{this.#a=oi(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);jn(r),t&&(this.#s=oi(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){Wt();return}t=!0,n&&pn(),this.#s!==null&&fi(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})};return{reset:r,invoke_onerror:()=>{try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){qr(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=oi(()=>e(this.#e)),jn(()=>{var e=this.#c=document.createDocumentFragment(),t=Rr(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return oi(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){qr(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(ar);return}this.#u===0&&(this.#e.before(e),this.#c=null,fi(this.#o,()=>{this.#o=null}),this.#x(ar))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=oi(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();gi(this.#a,e);let t=this.#n.pending;this.#o=oi(()=>t(this.#e))}else this.#x(ar)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){Ln(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=Ci,n=bi,r=xn;wi(this.#i),Si(this.#i),Sn(this.#i.ctx);try{return mr.ensure(),e()}finally{wi(t),Si(n),Sn(r)}}#C(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#C(e,t);return}this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&fi(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,jn(()=>{this.#d=!1,this.#m&&Dr(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),B(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;ar?.is_fork?(this.#a&&ar.skip_effect(this.#a),this.#o&&ar.skip_effect(this.#o),this.#s&&ar.skip_effect(this.#s),ar.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(li(this.#a),null),this.#o&&=(li(this.#o),null),this.#s&&=(li(this.#s),null),Gt&&(Jt(this.#t),k(),Jt(Xt()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return oi(()=>{var r=Ci;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return qr(e,this.#i.parent),null}}))};jn(()=>{var t;try{t=this.transform_error(e)}catch(e){qr(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>qr(e,this.#i&&this.#i.parent)):n(t)})}},xa=!0;function Sa(e){xa=e}function W(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[jt]??=e.nodeValue)&&(e[jt]=n,e.nodeValue=`${n}`)}function Ca(e,t){return Ta(e,t)}var wa=new Map;function Ta(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){nee();var c=void 0,l=iee(()=>{var l=n??t.appendChild(Rr());pee(l,{pending:()=>{}},t=>{A({});var n=xn;if(a&&(n.c=a),i&&(r.$$events=i),Gt&&_a(t,null),xa=o,c=e(t,r)||Dn(),xa=!0,Gt&&(Ci.nodes.end=qt,qt===null||qt.nodeType!==8||qt.data!==`]`))throw Ht(),Ft;j()},s);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=na(r);for(let e of[t,document]){var a=wa.get(e);a===void 0&&(a=new Map,wa.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,ha,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(Xe(oa)),sa.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=wa.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,ha),r.delete(e),r.size===0&&wa.delete(n)):r.set(e,i)}sa.delete(d),l!==n&&l.parentNode?.removeChild(l)}});return Ea.set(c,l),c}var Ea=new WeakMap;function Da(e,t){let n=Ea.get(e);return n?(Ea.delete(e),n(t)):Promise.resolve()}var Oa=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)mi(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(mi(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(li(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();gi(r,t),t.append(Rr()),this.#n.set(e,{effect:r,fragment:t})}else li(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),fi(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(li(n.effect),this.#n.delete(e))};ensure(e,t){var n=ar,r=Ur();if(t&&!this.#t.has(e)&&!this.#n.has(e)){if(r){var i=document.createDocumentFragment(),a=Rr();i.append(a),this.#n.set(e,{effect:oi(()=>t(a)),fragment:i})}else this.#t.set(e,oi(()=>t(this.anchor)))}if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else Gt&&(this.anchor=qt),this.#a(n)}};function G(e,t,n=!1){var r;Gt&&(r=qt,Yt());var i=new Oa(e),a=n?gt:0;function o(e,t){if(Gt){var n=Zt(r);if(e!==parseInt(n.substring(1))){var a=Xt();Jt(a),i.anchor=a,Kt(!1),i.ensure(e,t),Kt(!0);return}}i.ensure(e,t)}ii(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var ka=Symbol(`NaN`);function Aa(e,t,n){Gt&&Yt();var r=new Oa(e),i=!On();ii(()=>{var e=t();e!==e&&(e=ka),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function ja(e,t){return t}function Ma(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];fi(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Na(e,Xe(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else--o},!1)}if(o===0){var c=r.length===0&&n!==null&&e.pending.size===0;if(c){var l=n,u=l.parentNode;Hr(u),u.append(l),e.items.clear()}Na(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Na(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=yt,gi(a,document.createDocumentFragment())):li(t[i],n)}}var Pa;function Fa(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var c=e;o=Gt?Jt(zr(c)):c.appendChild(Rr())}Gt&&Yt();var l=null,u=Qn(()=>{var e=n();return qe(e)?e:e==null?[]:Xe(e)}),d,f=new Map,p=!0;function m(e){g.effect.f&16384||(g.pending.delete(e),g.fallback=l,hee(g,d,o,t,r),l!==null&&(d.length===0?l.f&33554432?(l.f^=yt,La(l,null,o)):mi(l):fi(l,()=>{l=null})))}function h(e){g.pending.delete(e)}var g={effect:ii(()=>{d=B(u);var e=d.length;let c=!1;Gt&&Zt(o)===`[!`!=(e===0)&&(o=Xt(),Jt(o),Kt(!1),c=!0);for(var g=new Set,_=ar,v=Ur(),y=0;y<e;y+=1){Gt&&qt.nodeType===8&&qt.data===`]`&&(o=qt,c=!0,Kt(!1));var b=d[y],x=r(b,y),S=p?null:s.get(x);S?(S.v&&Dr(S.v,b),S.i&&Dr(S.i,y),v&&_.unskip_effect(S.e)):(S=gee(s,p?o:Pa??=Rr(),b,x,y,i,t,n),p||(S.e.f|=yt),s.set(x,S)),g.add(x)}if(e===0&&a&&!l&&(p?l=oi(()=>a(o)):(l=oi(()=>a(Pa??=Rr())),l.f|=yt)),e>g.size&&rn(``,``,``),Gt&&e>0&&Jt(Xt()),!p){if(f.set(_,g),v){for(let[e,t]of s)g.has(e)||_.skip_effect(t.e);_.oncommit(m),_.ondiscard(h)}else m(_)}c&&Kt(!0),B(u)}),flags:t,items:s,pending:f,outrogroups:null,fallback:l};p=!1,Gt&&(o=qt)}function Ia(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function hee(e,t,n,r,i){var a=!!(r&8),o=t.length,s=e.items,c=Ia(e.effect.first),l,u=null,d,f=[],p=[],m,h,g,_;if(a)for(_=0;_<o;_+=1)m=t[_],h=i(m,_),g=s.get(h).e,g.f&33554432||(g.nodes?.a?.measure(),(d??=new Set).add(g));for(_=0;_<o;_+=1){if(m=t[_],h=i(m,_),g=s.get(h).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(g),t.done.delete(g);if(g.f&8192&&(mi(g),a&&(g.nodes?.a?.unfix(),(d??=new Set).delete(g))),g.f&33554432){if(g.f^=yt,g===c)La(g,null,n);else{var v=u?u.next:c;g===e.effect.last&&(e.effect.last=g.prev),g.prev&&(g.prev.next=g.next),g.next&&(g.next.prev=g.prev),Ra(e,u,g),Ra(e,g,v),La(g,v,n),u=g,f=[],p=[],c=Ia(u.next);continue}}if(g!==c){if(l!==void 0&&l.has(g)){if(f.length<p.length){var y=p[0],b;u=y.prev;var x=f[0],S=f[f.length-1];for(b=0;b<f.length;b+=1)La(f[b],y,n);for(b=0;b<p.length;b+=1)l.delete(p[b]);Ra(e,x.prev,S.next),Ra(e,u,x),Ra(e,S,y),c=y,u=S,--_,f=[],p=[]}else l.delete(g),La(g,c,n),Ra(e,g.prev,g.next),Ra(e,g,u===null?e.effect.first:u.next),Ra(e,u,g),u=g;continue}for(f=[],p=[];c!==null&&c!==g;)(l??=new Set).add(c),p.push(c),c=Ia(c.next);if(c===null)continue}g.f&33554432||f.push(g),u=g,c=Ia(g.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Na(e,Xe(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var C=[];if(l!==void 0)for(g of l)g.f&8192||C.push(g);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&C.push(c),c=Ia(c.next);var w=C.length;if(w>0){var ee=r&4&&o===0?n:null;if(a){for(_=0;_<w;_+=1)C[_].nodes?.a?.measure();for(_=0;_<w;_+=1)C[_].nodes?.a?.fix()}Ma(e,C,ee)}}a&&jn(()=>{if(d!==void 0)for(g of d)g.nodes?.a?.apply()})}function gee(e,t,n,r,i,a,o,s){var c=o&1?o&16?Tr(n):Er(n,!1,!1):null,l=o&2?Tr(i):null;return{v:c,i:l,e:oi(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function La(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Br(r);if(a.before(r),r===i)return;r=o}}function Ra(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function za(e,t,n=!1,r=!1,i=!1,a=!1){var o=e,s=``;if(n){var c=e;Gt&&(o=Jt(zr(c)))}z(()=>{var e=Ci;if(s===(s=t()??``)){Gt&&Yt();return}if(n&&!Gt){e.nodes=null,c.innerHTML=s,s!==``&&_a(zr(c),c.lastChild);return}if(e.nodes!==null&&(ui(e.nodes.start,e.nodes.end),e.nodes=null),s!==``){if(Gt){for(var a=qt.data,l=Yt(),u=l;l!==null&&(l.nodeType!==8||l.data!==``);)u=l,l=Br(l);if(l===null)throw Ht(),Ft;_a(qt,u),o=Jt(l);return}var d=Wr(r?`svg`:i?`math`:`template`,r?Rt:i?zt:void 0);d.innerHTML=s;var f=r||i?d:d.content;if(_a(zr(f),f.lastChild),r||i)for(;zr(f);)o.before(zr(f));else o.before(f)}})}function K(e,t,...n){var r=new Oa(e);ii(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},gt)}function q(e,t,n){var r;Gt&&(r=qt,Yt());var i=new Oa(e);ii(()=>{var e=t()??null;if(Gt&&Zt(r)===`[`!=(e!==null)){var a=Xt();Jt(a),i.anchor=a,Kt(!1),i.ensure(e,e&&(t=>n(t,e))),Kt(!0);return}i.ensure(e,e&&(t=>n(t,e)))},gt)}var Ba=()=>performance.now(),Va={tick:e=>requestAnimationFrame(e),now:()=>Ba(),tasks:new Set};function Ha(){let e=Va.now();Va.tasks.forEach(t=>{t.c(e)||(Va.tasks.delete(t),t.f())}),Va.tasks.size!==0&&Va.tick(Ha)}function Ua(e){let t;return Va.tasks.size===0&&Va.tick(Ha),{promise:new Promise(n=>{Va.tasks.add(t={c:e,f:n})}),abort(){Va.tasks.delete(t)}}}function Wa(e,t){Un(()=>{e.dispatchEvent(new CustomEvent(t))})}function Ga(e){if(e===`float`)return`cssFloat`;if(e===`offset`)return`cssOffset`;if(e.startsWith(`--`))return e;let t=e.split(`-`);return t.length===1?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join(``)}function Ka(e){let t={},n=e.split(`;`);for(let e of n){let[n,r]=e.split(`:`);if(!n||r===void 0)break;let i=Ga(n.trim());t[i]=r.trim()}return t}var qa=e=>e;function Ja(e,t,n,r){var i=!!(e&1),a=!!(e&2),o=i&&a,s=!!(e&4),c=o?`both`:i?`in`:`out`,l,u=t.inert,d=t.style.overflow,f,p;function m(){return Un(()=>l??=n()(t,r?.()??{},{direction:c}))}var h={is_global:s,in(){if(t.inert=u,!i){p?.abort(),p?.reset?.();return}a||f?.abort(),f=Ya(t,m(),p,1,()=>{Wa(t,`introstart`)},()=>{Wa(t,`introend`),f?.abort(),f=l=void 0,t.style.overflow=d})},out(e){if(!a){e?.(),l=void 0;return}t.inert=!0,p=Ya(t,m(),f,0,()=>{Wa(t,`outrostart`)},()=>{Wa(t,`outroend`),e?.()})},stop:()=>{f?.abort(),p?.abort()}},g=Ci;if((g.nodes.t??=[]).push(h),i&&xa){var _=s;if(!_){for(var v=g.parent;v&&v.f&65536;)for(;(v=v.parent)&&!(v.f&16););_=!v||!!(v.f&32768)}_&&ti(()=>{Gi(()=>h.in())})}}function Ya(e,t,n,r,i,a){var o=r===1,s=!1;if(it(t)){var c;return jn(()=>{s||(c=Ya(e,t({direction:o?`in`:`out`}),n,r,i,a))}),{abort:()=>{s=!0,c?.abort()},deactivate:()=>c.deactivate(),reset:()=>c.reset(),t:()=>c.t()}}if(n?.deactivate(),!t?.duration&&!t?.delay)return i(),a(),{abort:D,deactivate:D,reset:D,t:()=>r};let{delay:l=0,css:u,tick:d,easing:f=qa}=t;var p,m=()=>1-r;return jn(()=>{if(!s){var c=[];if(o&&n===void 0&&(d&&d(0,1),u)){var h=Ka(u(0,1));c.push(h,h)}p=e.animate(c,{duration:l,fill:`forwards`}),p.onfinish=()=>{p.cancel(),i();var o=n?.t()??1-r;n?.abort();var s=r-o,c=t.duration*Math.abs(s),l=[];if(c>0){var h=!1;if(u)for(var g=Math.ceil(c/(1e3/60)),_=0;_<=g;_+=1){var v=o+s*f(_/g),y=Ka(u(v,1-v));l.push(y),h||=y.overflow===`hidden`}h&&(e.style.overflow=`hidden`),m=()=>{var e=p.currentTime;return o+s*f(e/c)},d&&Ua(()=>{if(p.playState!==`running`)return!1;var e=m();return d(e,1-e),!0})}p=e.animate(l,{duration:c,fill:`forwards`}),p.onfinish=()=>{m=()=>r,d?.(r,1-r),a()}}}}),{abort:()=>{s=!0,p&&(p.cancel(),p.effect=null,p.onfinish=D)},deactivate:()=>{a=D},reset:()=>{r===0&&d?.(1,0)},t:()=>m()}}function Xa(e,t,n,r,i,a){let o=Gt;Gt&&Yt();var s=null;Gt&&qt.nodeType===1&&(s=qt,Yt());var c=Gt?qt:e,l=new Oa(c,!1);ii(()=>{let e=t()||null;var a=i?i():n||e===`svg`?Rt:void 0;if(e===null){l.ensure(null,null),Sa(!0);return}return l.ensure(e,t=>{if(e){if(s=Gt?s:Wr(e,a),_a(s,s),r){var n=null;Gt&&ia(e)&&s.append(n=document.createComment(``));var i=Gt?zr(s):s.appendChild(Rr());Gt&&(i===null?Kt(!1):Jt(i)),r(s,i),n?.remove()}Ci.nodes.end=s,t.before(s)}Gt&&Jt(t)}),Sa(!0),()=>{e&&Sa(!1)}},gt),Zr(()=>{Sa(!0)}),o&&(Kt(!0),Jt(c))}function Za(e,t,n){ti(()=>{var r=Gi(()=>t(e,n?.())||{});if(n&&r?.update){var i=!1,a={};ri(()=>{var e=n();Ki(e),i&&$t(a,e)&&(a=e,r.update(e))}),i=!0}if(r?.destroy)return()=>r.destroy()})}function Qa(e,t){var n=void 0,r;ai(()=>{n!==(n=t())&&(r&&=(li(r),null),n&&(r=oi(()=>{ti(()=>n(e))})))})}function $a(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=$a(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function eo(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=$a(e))&&(r&&(r+=` `),r+=t);return r}function to(e){return typeof e==`object`?eo(e):e??``}var no=[...`
|
|
3
3
|
\r\f\xA0\v`];function ro(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||no.includes(r[o-1]))&&(s===r.length||no.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function io(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function ao(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function oo(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(ao)),i&&c.push(...Object.keys(i).map(ao));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=ao(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=io(r)),i&&(n+=io(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function so(e,t,n,r,i,a){var o=e[kt];if(Gt||o!==n||o===void 0){var s=ro(n,r,a);(!Gt||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[kt]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function co(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function lo(e,t,n,r){var i=e[At];if(Gt||i!==t){var a=oo(t,r);(!Gt||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[At]=t}else r&&(Array.isArray(r)?(co(e,n?.[0],r[0]),co(e,n?.[1],r[1],`important`)):co(e,n,r));return r}function uo(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function fo(e,t){var n=!(`__defaultValue`in e);!n&&e.__defaultValue===t||(e.__defaultValue=t,po(e,!n||`__value`in e))}function po(e,t){var n=e.__defaultValue,r=e.multiple,i=r?n??[]:null;if(!(r&&!qe(i))){var a=e.selectedIndex,o=t&&r?new Set(e.selectedOptions):null;for(var s of e.options){var c=ho(s);uo(s,r?i.includes(c):Nr(c,n))}if(t){if(o!==null)for(s of e.options){var l=o.has(s);s.selected!==l&&(s.selected=l)}else e.selectedIndex!==a&&(e.selectedIndex=a)}}}function mo(e,t,n=!1){if(e.multiple){if(t==null)return;if(!qe(t))return Ut();for(var r of e.options)r.selected=t.includes(ho(r));return}for(r of e.options)if(Nr(ho(r),t)){r.selected=!0;return}(!n||t!==void 0)&&(e.selectedIndex=-1)}function _ee(e){var t=new MutationObserver(t=>{t.every(vee)||(`__defaultValue`in e&&po(e,!1),`__value`in e&&mo(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Zr(()=>{t.disconnect()})}function ho(e){return`__value`in e?e.__value:e.value}function vee(e){if(e.target.closest(`selectedcontent`)!==null)return!0;if(e.type===`childList`){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(e=>e.nodeName===`SELECTEDCONTENT`)}return!1}var go=Symbol(`class`),_o=Symbol(`style`),vo=Symbol(`is custom element`),yo=Symbol(`is html`),yee=Pt?`link`:`LINK`,bo=Pt?`input`:`INPUT`,bee=Pt?`option`:`OPTION`,xo=Pt?`select`:`SELECT`;function So(e){if(Gt){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Co(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Co(e,`checked`,null),e.checked=r}}};e[Mt]=n,jn(n),Hn()}}function Co(e,t,n,r){var i=wo(e);Gt&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===yee)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[Dt]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Eo(e).has(t)?e[t]=n:e.setAttribute(t,n))}function xee(e,t,n,r,i=!1,a=!1){Gt&&i&&e.nodeName===bo&&(`defaultValue`in n||`defaultChecked`in n||So(e));var o=wo(e),s=o[vo],c=!o[yo];let l=Gt&&s;l&&Kt(!1);var u=t||{},d=e.nodeName===bee,f=e.nodeName===xo;for(var p in t)!(p in n)&&p[0]+p[1]!==`$$`&&(n[p]=null);n.class?n.class=to(n.class):(r||n[go])&&(n.class=null),n[_o]&&(n.style??=null);var m=Eo(e);if(e.nodeName===bo&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==u.type||h===void 0&&e.hasAttribute(`type`))&&(u.type=h,Co(e,`type`,h,a))}for(let i in n){let l=n[i];if(d&&i===`value`&&l==null){e.value=e.__value=``,u[i]=l;continue}if(i===`class`){so(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,l,r,t?.[go],n[go]),u[i]=l,u[go]=n[go];continue}if(i===`style`){lo(e,l,t?.[_o],n[_o]),u[i]=l,u[_o]=n[_o];continue}var g=u[i];if(!(l===g&&!(l===void 0&&e.hasAttribute(i)))){u[i]=l;var _=i[0]+i[1];if(_!==`$$`){if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Zi(r);if(Yi(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(l!=null)continue;e.removeEventListener(r,u[n],t),u[n]=null}if(v)da(r,e,l),fa([r]);else if(l!=null){function a(e){u[i].call(this,e)}u[n]=ca(r,e,a,t)}}else if(i===`style`)Co(e,i,l);else if(i===`autofocus`)Bn(e,!!l);else if(!s&&(i===`__value`||i===`value`&&l!=null))e.value=e.__value=l;else if(i===`selected`&&d)uo(e,l);else{var y=i;c||(y=ea(y));var b=y===`defaultValue`||y===`defaultChecked`;if(f&&y===`defaultValue`)continue;if(l==null&&!s&&!b){if(o[i]=null,y===`value`||y===`checked`){let n=e,r=t===void 0;if(y===`value`){let e=n.defaultValue;n.removeAttribute(y),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(y),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i)}else b||(s||typeof l!=`string`)&&m.has(y)?(e[y]=l,y in o&&(o[y]=It)):typeof l!=`function`&&Co(e,y,l,a)}}}}return l&&Kt(!0),u}function J(e,t,n=[],r=[],i=[],a,o=!1,s=!1){Gn(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===xo,l=!1;if(ai(()=>{var u=t(...n.map(B)),d=xee(e,r,u,a,o,s);if(l&&c){var f=e;`defaultValue`in u&&fo(f,u.defaultValue),`value`in u&&mo(f,u.value)}for(let e of Object.getOwnPropertySymbols(i))u[e]||li(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var p=u[t];t.description===`@attach`&&(!r||p!==r[t])&&(i[t]&&li(i[t]),i[t]=oi(()=>Qa(e,()=>p))),d[t]=p}r=d}),c){var u=e;ti(()=>{var e=r;`defaultValue`in e&&fo(u,e.defaultValue),mo(u,e.value,!0),_ee(u)})}l=!0})}function wo(e){return e[Ot]??={[vo]:e.nodeName.includes(`-`),[yo]:e.namespaceURI===Lt}}var To=new Map;function Eo(e){var t=e.getAttribute(`is`)||e.nodeName,n=To.get(t);if(n)return n;To.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=$e(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.add(o);i=nt(i)}return n}function Do(e,t,n=t){var r=new WeakSet;Wn(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=Oo(e)?ko(a):a,n(a),ar!==null&&r.add(ar),await Hi(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(Gt&&e.defaultValue!==e.value||Gi(t)==null&&e.value)&&(n(Oo(e)?ko(e.value):e.value),ar!==null&&r.add(ar)),ri(()=>{var n=t();if(e===document.activeElement){var i=ar;if(r.has(i))return}Oo(e)&&n===ko(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function Oo(e){var t=e.type;return t===`number`||t===`range`}function ko(e){return e===``?null:+e}function Ao(e,t,n=t){Wn(e,`change`,()=>{n(e.files)}),Gt&&e.files&&n(e.files),ri(()=>{e.files=t()})}var jo=new class e{#e=new WeakMap;#t;#n;static entries=new WeakMap;constructor(e){this.#n=e}observe(e,t){var n=this.#e.get(e)||new Set;return n.add(t),this.#e.set(e,n),this.#r().observe(e,this.#n),()=>{var n=this.#e.get(e);n.delete(t),n.size===0&&(this.#e.delete(e),this.#t.unobserve(e))}}#r(){return this.#t??=new ResizeObserver(t=>{for(var n of t){e.entries.set(n.target,n);for(var r of this.#e.get(n.target)||[])r(n)}})}}({box:`border-box`});function Mo(e,t,n){var r=jo.observe(e,()=>n(e[t]));ti(()=>(Gi(()=>n(e[t])),r))}function No(e,t){return e===t||e?.[wt]===t}function Po(e=Dn(),t,n,r){var i=xn.r,a=Ci;return ti(()=>{var o,s;return ri(()=>{o=s,s=r?.()||[],Gi(()=>{No(n(...s),e)||(t(e,...s),o&&No(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&No(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function Fo(e=!1){let t=xn,n=t.l.u;if(!n)return;let r=()=>Ki(t.s);if(e){let e=0,n={},i=Yn(()=>{let r=!1,i=t.s;for(let e in i)i[e]!==n[e]&&(n[e]=i[e],r=!0);return r&&e++,e});r=()=>B(i)}n.b.length&&$r(()=>{Io(t,r),ot(n.b)}),R(()=>{let e=Gi(()=>n.m.map(at));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&R(()=>{Io(t,r),ot(n.a)})}function Io(e,t){if(e.l.s)for(let t of e.l.s)B(t);t()}var Lo={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Y(e,t,n){return new Proxy({props:e,exclude:t},Lo)}var Ro={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(it(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];it(i)&&(i=i());let a=Qe(i,t);if(a&&a.set)return a.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(it(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=Qe(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===wt||t===Et)return!1;for(let n of e.props)if(it(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(it(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function zo(...e){return new Proxy({props:e},Ro)}function X(e,t,n,r){var i=!mn||!!(n&2),a=!!(n&8),o=!!(n&16),s=r,c=!0,l=void 0,u=()=>o&&i?(l??=Yn(r),B(l)):(c&&(c=!1,s=o?Gi(r):r),s);let d;if(a){var f=wt in e||Et in e;d=Qe(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,m=!1;a?[p,m]=zn(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&ln(t),d(p)));var h=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return h;if(d){var g=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||g||m)&&d(t?h():e),e):h()})}var _=!1,v=(n&1?Yn:Qn)(()=>(_=!1,h()));a&&B(v);var y=Ci;return(function(e,t){if(arguments.length>0){let n=t?B(v):i&&a?jr(e):e;return P(v,n),_=!0,s!==void 0&&(s=n),e}return vi&&_||y.f&16384?v.v:B(v)})}function Bo(e){xn===null&&tn(`onMount`),mn&&xn.l!==null?Ho(xn).m.push(e):R(()=>{let t=Gi(e);if(typeof t==`function`)return t})}function Vo(e){xn===null&&tn(`onDestroy`),Bo(()=>()=>Gi(e))}function Ho(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);function Uo(e){return e instanceof Error?e.message:String(e)}function Wo(e){return`startLine`in e}function Go(e){return`blockId`in e}var Ko=`<redacted>`,qo=new Set([`plan`,`prompt`,`feedback`,`hostnames`]);function Jo(e,t){return Yo(e,t,0,new WeakSet)}function Yo(e,t,n,r){if(typeof e==`string`)return t?t(e):e;if(typeof e!=`object`||!e)return e;if(r.has(e))return`<cyclic>`;if(n>=6)return`<depth-capped>`;r.add(e);let i;if(Array.isArray(e))i=e.map(e=>Yo(e,t,n+1,r));else{let a={};for(let[i,o]of Object.entries(e))a[i]=qo.has(i)?Ko:Yo(o,t,n+1,r);i=a}return r.delete(e),i}function Xo(e){return e.slice(0,8)}var Zo=/^[a-z][a-z0-9-]{0,31}$/,Qo=100,$o=20,es=5e3;function ts(e){try{e()}catch{}}function ns(e){return Jo(e)}var rs=[];function is(e){rs.push(e),rs.length>Qo&&rs.shift(),rs.length>=$o&&as()}function as(e){ts(()=>{if(rs.length===0)return;let t=rs;rs=[],fetch(`/api/logs`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({events:t}),keepalive:e?.keepalive??!1}).catch(()=>{})})}function os(e,t,n,r){ts(()=>{let i=Zo.test(t)?t:`ui`,a=n.slice(0,256),o=Array.isArray(r)?{value:r}:r,s=o===void 0?void 0:ns(o);is({level:e,step:i,msg:a,...s===void 0?{}:{extra:s}})})}var ss={debug:(e,t,n)=>os(`debug`,e,t,n),info:(e,t,n)=>os(`info`,e,t,n),warn:(e,t,n)=>os(`warn`,e,t,n),error(e,t,n){os(`error`,e,Uo(t),n)}};function cs(){let e=setInterval(()=>as(),es),t=()=>as({keepalive:!0});return window.addEventListener(`pagehide`,t),()=>{clearInterval(e),window.removeEventListener(`pagehide`,t)}}var ls=class extends Error{status;constructor(e){super(`HTTP ${e}`),this.status=e,this.name=`HttpError`}};async function us(e){if(!e.ok)throw new ls(e.status);return await e.json()}async function ds(){try{return await us(await fetch(`/api/health`))}catch(e){throw ss.warn(`request`,`health probe failed`,{reason:String(e)}),e}}async function fs(){try{return await us(await fetch(`/api/diagnostics`))}catch(e){throw ss.warn(`request`,`diagnostics probe failed`,{reason:String(e)}),e}}async function ps(){try{return await us(await fetch(`/api/update`))}catch(e){throw e instanceof ls&&e.status===404?ss.debug(`request`,`update route unwired`):ss.warn(`request`,`update report read failed`,{reason:String(e)}),e}}async function ms(){try{return await us(await fetch(`/api/themes`))}catch(e){return ss.warn(`request`,`themes read failed`,{reason:String(e)}),null}}async function hs(){try{return await us(await fetch(`/api/update/changes`))}catch(e){throw ss.warn(`request`,`update changes read failed`,{reason:String(e)}),e}}async function gs(e){try{await us(await fetch(`/api/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}))}catch(e){throw ss.warn(`settings`,`config save failed`,{reason:String(e)}),Error(_s(e),{cause:e})}}function _s(e){return e instanceof ls?e.status===409?`caret couldn't edit config.toml safely — set the [updates] check line there by hand.`:`The daemon couldn't save the change (HTTP ${e.status}).`:`The caret daemon isn't reachable, so the change wasn't saved.`}async function vs(e){let t;try{t=await fetch(`/api/themes`,{method:`POST`,headers:{"Content-Type":`application/json`},body:e})}catch(e){return ss.warn(`request`,`theme upload failed`,{reason:String(e)}),{ok:!1,errors:[`The caret daemon isn't reachable, so the theme wasn't saved.`]}}let n=await t.json().catch(()=>void 0);return t.ok&&n!==void 0?{ok:!0,...n}:!t.ok&&ys(n)?{ok:!1,errors:n.errors}:(ss.warn(`request`,`theme upload failed`,{status:t.status}),{ok:!1,errors:[`The daemon couldn't save the theme (HTTP ${t.status}).`]})}function ys(e){let t=e?.errors;return Array.isArray(t)&&t.every(e=>typeof e==`string`)}async function bs(){return us(await fetch(`/api/reviews`))}async function xs(e,t){if(t.length===0)return{};try{let{resolved:n}=await us(await fetch(`/api/reviews/${encodeURIComponent(e)}/file-refs`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({paths:t})}));return n??{}}catch(n){return ss.warn(`request`,`file refs resolve failed: ${Xo(e)}`,{reviewId:e,candidateCount:t.length,reason:String(n)}),{}}}async function Ss(e,t){try{let n=await us(await fetch(`/api/reviews/${encodeURIComponent(e)}/file-search`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({query:t})}));return{paths:n.paths??[],stoppedAt:n.stoppedAt===`results`||n.stoppedAt===`scan`?n.stoppedAt:null}}catch(n){return ss.debug(`request`,`file search failed: ${Xo(e)}`,{reviewId:e,queryChars:t.length,reason:String(n)}),{paths:[],stoppedAt:null}}}async function Cs(e,t,n,r){let i=new URLSearchParams({path:t});return n!==void 0&&i.set(`line`,String(n)),r!==void 0&&(i.set(`start`,String(r.start)),i.set(`end`,String(r.end))),us(await fetch(`/api/reviews/${encodeURIComponent(e)}/file?${i}`))}async function ws(e,t,n){let r=new URLSearchParams({root:t,path:n});return us(await fetch(`/api/reviews/${encodeURIComponent(e)}/dir?${r}`))}async function Ts(e){try{return await us(await fetch(`/api/reviews/${encodeURIComponent(e)}/skills`))}catch(t){return t instanceof ls&&t.status===404?(ss.debug(`request`,`skills route unwired: ${Xo(e)}`,{reviewId:e}),[]):(ss.warn(`request`,`skills fetch failed: ${Xo(e)}`,{reviewId:e,reason:String(t)}),null)}}async function Es(e,t){let n=new URLSearchParams({name:t.name,origin:t.origin});try{return(await us(await fetch(`/api/reviews/${encodeURIComponent(e)}/skill-description?${n}`))).description??null}catch(t){return ss.debug(`request`,`skill description read failed: ${Xo(e)}`,{reviewId:e,reason:String(t)}),null}}async function Ds(e,t){try{await us(await fetch(`/api/reviews/${encodeURIComponent(e)}/draft`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}))}catch(n){throw ss.warn(`draft`,`draft save failed: ${Xo(e)}`,{reviewId:e,annotationCount:t.annotations.length,reason:String(n)}),n}}async function Os(e){try{let t=await fetch(`/api/reviews/${encodeURIComponent(e)}/seen`,{method:`POST`});if(!t.ok)throw new ls(t.status);ss.debug(`ui`,`review seen: ${Xo(e)}`,{reviewId:e})}catch(t){ss.debug(`ui`,`review seen mark failed: ${Xo(e)}`,{reviewId:e,reason:String(t)})}}async function ks(e,t){ss.info(`resolve`,`resolve submitted: ${Xo(e)}: ${t.behavior}`,{reviewId:e,...t.acceptMode===void 0?{}:{acceptMode:t.acceptMode},...t.feedback===void 0?{}:{feedbackChars:t.feedback.length}});try{await us(await fetch(`/api/reviews/${encodeURIComponent(e)}/resolve`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}))}catch(t){throw t instanceof ls?ss.warn(`resolve`,`resolve failed: ${Xo(e)}: http ${t.status}`,{reviewId:e,status:t.status}):ss.error(`resolve`,t,{reviewId:e}),t}}var See=[{id:`default`,label:`Approve`,description:`Approve edits manually`},{id:`acceptEdits`,label:`Approve & accept edits`,description:`Auto-accept file edits this session`},{id:`auto`,label:`Approve & auto mode`,description:`Full auto mode this session`}];function Cee(e){return e&&e.length>0?e:See}function As(e,t){return t.find(t=>t.id===e)?.label??t[0]?.label??`Approve`}function wee(e,t){return e!==null&&t.some(t=>t.id===e)?e:t[0]?.id??`default`}function Tee(e,t,n){let r=typeof t==`function`?t:()=>t,i=e=>typeof e==`string`&&r().includes(e);return{read(){try{let t=localStorage.getItem(e);return i(t)?t:n}catch{return n}},write(t){try{localStorage.setItem(e,t)}catch{}}}}var js=new Set;function Ms(e){js.add(e)}function Eee(){return[...js]}function Ns(e,t,n){Ms(e);let r=Tee(e,t,n);return{KEY:e,read:r.read,write:r.write}}function Ps(e,{onError:t=!1}={}){return Ms(e),{KEY:e,read(){try{return localStorage.getItem(e)===`1`}catch{return t}},write(t){try{t?localStorage.setItem(e,`1`):localStorage.removeItem(e)}catch{}}}}var Fs=`caret.approveMode`;Ms(Fs);function Dee(){try{return localStorage.getItem(Fs)}catch{return null}}function Oee(e){try{localStorage.setItem(Fs,e)}catch{}}var kee=`/api/ui/gone`,Is=()=>document.visibilityState!==`visible`||!document.hasFocus();function Aee(e){let t=e.sendBeacon??(e=>navigator.sendBeacon(e)),n=e=>{e.persisted||t(kee)};return e.target.addEventListener(`pagehide`,n),()=>e.target.removeEventListener(`pagehide`,n)}var jee=`🥕 New Plan Ready`;function Ls(e,t){if(typeof Notification>`u`)return null;try{return new Notification(e,{body:t})}catch(e){return ss.warn(`ui`,`notification construct failed`,{reason:String(e)}),null}}function Mee(){return typeof Notification>`u`?`default`:Notification.permission}function Rs(e){let t=globalThis.navigator?.permissions;if(typeof Notification>`u`||!t?.query)return()=>{};let n,r=!1,i=()=>e(Notification.permission);return t.query({name:`notifications`}).then(e=>{r||(n=e,e.addEventListener(`change`,i))}).catch(()=>{}),()=>{r=!0,n?.removeEventListener(`change`,i)}}var Nee=5e3;function Pee(e){let t=globalThis.navigator?.locks;return!t||new Promise(n=>{t.request(`caret-notify-${e}`,{ifAvailable:!0},e=>{if(e===null){n(!1);return}return n(!0),new Promise(e=>setTimeout(e,Nee))}).catch(t=>{ss.warn(`ui`,`plan notification claim failed: ${Xo(e)}`,{reviewId:e,reason:String(t)}),n(!0)})})}function Fee(e){let t=e.notify??Ls,n=e.isAway??Is,r=e.permission??Mee,i=e.focus??(()=>window.focus()),a=e.claim??Pee,o=new Map,s=e=>{o.get(e)?.close(),o.delete(e)},c=n=>{let r=t(jee,`${n.title} — ${n.cwd}`);if(!r){ss.warn(`ui`,`plan notification unavailable: ${Xo(n.id)}`,{reviewId:n.id});return}o.set(n.id,r),ss.info(`ui`,`plan notification fired: ${Xo(n.id)}`,{reviewId:n.id}),r.onshow=()=>ss.debug(`ui`,`plan notification shown: ${Xo(n.id)}`,{reviewId:n.id}),r.onerror=()=>ss.warn(`ui`,`plan notification failed: ${Xo(n.id)}`,{reviewId:n.id}),r.onclick=()=>{ss.debug(`ui`,`plan notification clicked: ${Xo(n.id)}`,{reviewId:n.id}),i(),e.onSelect(n.id),s(n.id)}},l=e=>ss.debug(`ui`,`plan notification skipped (duplicate): ${Xo(e.id)}`,{reviewId:e.id}),u=null;return{observe(e){let t=u;if(u=new Set(e.map(e=>e.id)),t===null)return;let i=e.filter(e=>!t.has(e.id));if(i.length===0)return;let o=n()?r()===`granted`?null:`permission`:`active`;if(o){let e=o===`permission`&&r()==="default"?`info`:`debug`;for(let t of i)ss[e](`ui`,`plan notification skipped (${o}): ${Xo(t.id)}`,{reviewId:t.id});return}for(let e of i){let t=a(e.id);t===!0?c(e):t===!1?l(e):t.then(t=>t?c(e):l(e))}},dismissAllIfPresent(){if(!n()){for(let e of o.values())e.close();o.clear()}}}}function zs(){let e=Ls(`🥕 Test notification`,`Notifications reach your desktop`);return e?(e.onshow=()=>ss.debug(`ui`,`test notification shown`),e.onerror=()=>ss.warn(`ui`,`test notification failed`),ss.info(`ui`,`test notification fired`),!0):(ss.warn(`ui`,`test notification unavailable`),!1)}function Bs(e){switch(e){case`granted`:return{icon:`bell`,tone:`muted`,dot:`ok`,title:`Desktop notifications on — click to send a test notification`,canRequest:!1,canTest:!0};case`denied`:return{icon:`bell-off`,tone:`muted`,dot:`danger`,title:`Notifications blocked — re-enable them in your browser's site settings`,canRequest:!1,canTest:!1};default:return{icon:`bell`,overlay:`circle-question-mark`,tone:`attention`,title:`Enable desktop notifications for new plans`,canRequest:!0,canTest:!1}}}function Iee(){return typeof document<`u`&&typeof document.startViewTransition==`function`}function Vs(){let e=typeof document<`u`?document:void 0,t=e?.startViewTransition;return{startViewTransition:typeof t==`function`?t.bind(e):void 0,prefersReducedMotion:()=>typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion: reduce)`).matches}}var Lee=`plan-handoff`;function Ree(){return{...Vs(),tag:e=>document.documentElement.classList.toggle(Lee,e)}}function Hs(e,t=Ree()){if(!t.startViewTransition||t.prefersReducedMotion()){e();return}t.tag(!0);let n=t.startViewTransition(e),r=()=>t.tag(!1);Promise.resolve(n?.finished).then(r,r)}var Us=class extends Map{#e=new Map;#t=N(0);#n=N(0);#r=Mi||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return Mi===this.#r?N(e):Tr(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else return B(this.#t),!1}return B(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else{B(this.#t);return}}return B(n),super.get(e)}getOrInsert(e,t){return super.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return super.has(e)||this.set(e,t(e)),this.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),P(this.#n,super.size),kr(o);else if(i!==t){kr(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&kr(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(this.#n,super.size),kr(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;P(this.#n,0);for(var t of e.values())P(t,-1);kr(this.#t),e.clear()}}#a(){B(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)B(n)}keys(){return B(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return B(this.#n),super.size}},zee={operator:`punctuation`,bracket:`punctuation`,parameter:`variable`,languageVariable:`keyword`,tag:`keyword`,tagPunctuation:`keyword`,builtinFunction:`function`,builtinType:`type`,interpolation:`escape`};function Bee(e){let t={...e};for(let[n,r]of Object.entries(zee))t[n]??=e[r];return t}var Ws=[1,2,3,4,5,6];function Vee(e){let{heading:t}=e;return t===void 0?e:{...Object.fromEntries(Ws.map(e=>[`heading${e}`,t])),...e}}var Gs={comment:[`comment`,`punctuation.definition.comment`,`string.comment`],punctuation:[`punctuation`,`punctuation.separator`,`punctuation.terminator`,`punctuation.accessor`],operator:[`keyword.operator`],bracket:[`meta.brace`],variable:[`variable.other.readwrite`,`variable`,`variable.other`,`variable.other.constant`,`meta.definition.variable`,`support.variable`],parameter:[`variable.parameter`],property:[`variable.other.property`,`variable.other.object.property`,`meta.object-literal.key`,`support.type.property-name`],attribute:[`entity.other.attribute-name`,`meta.attribute`],keyword:[`keyword`,`keyword.control`,`keyword.operator.new`,`keyword.operator.expression`,`storage`,`storage.type`,`storage.modifier`],languageVariable:[`variable.language`],tag:[`entity.name.tag`],tagPunctuation:[`punctuation.definition.tag`],function:[`entity.name.function`,`support.function`,`meta.function-call`,`variable.function`],builtinFunction:[`support.function.builtin`],type:[`entity.name.type`,`entity.name.class`,`entity.other.inherited-class`,`entity.name.namespace`,`support.type`,`support.class`],builtinType:[`support.type.primitive`,`support.type.builtin`],string:[`string`,`string.quoted`,`string.template`,`punctuation.definition.string`,`constant.other.symbol`],escape:[`constant.character.escape`,`string.regexp`],interpolation:[`punctuation.definition.template-expression`],number:[`constant.numeric`,`constant.language`,`support.constant`]};function Hee(e){let{palette:t,syntax:n,markdown:r={}}=e;return{name:e.id,type:e.scheme,colors:{"editor.background":t.sunk,"editor.foreground":t.ink},settings:[...Object.entries(Gs).map(([e,t])=>{let{color:r,fontStyle:i}=n[e];return{scope:[...t],settings:i?{foreground:r,fontStyle:i.join(` `)}:{foreground:r}}}),...Wee(n),{scope:[`markup.heading`,`markup.heading entity.name`,`punctuation.definition.heading`],settings:r.heading?{foreground:r.heading.color,fontStyle:Ks(r.heading)??``}:{foreground:t.accent,fontStyle:`bold`}},...Uee(r),{scope:[`markup.bold`],settings:{fontStyle:`bold`,...qs(r.bold)}},{scope:[`markup.italic`],settings:{fontStyle:`italic`,...qs(r.italic)}},{scope:[`markup.inline.raw`,`markup.fenced_code`],settings:{foreground:r.code?.color??t.accentBright}},...r.code?.fontStyle?[{scope:[`markup.inline.raw`],settings:{fontStyle:Ks(r.code)}}]:[],...Js([`string.other.link.title.markdown`],r.link),...Js([`punctuation.definition.list.begin.markdown`],r.listMarker),...Js([`markup.quote`],r.quote),{scope:[`markup.inserted`,`meta.diff.header.to-file`,`punctuation.definition.inserted`],settings:{foreground:t.ok}},{scope:[`markup.deleted`,`meta.diff.header.from-file`,`punctuation.definition.deleted`],settings:{foreground:t.danger}},{scope:[`meta.diff.range`,`punctuation.definition.range.diff`,`meta.diff.header`],settings:{foreground:n.comment.color,fontStyle:`italic`}},{scope:[`invalid`,`invalid.illegal`],settings:{foreground:t.danger}}]}}function Uee(e){return Ws.flatMap(t=>{let n=e[`heading${t}`];if(n===void 0)return[];let r=`heading.${t}.markdown`;return[{scope:[r,`${r} entity.name`,`${r} punctuation.definition.heading`,...t<=2?[`markup.heading.setext.${t}.markdown`]:[]],settings:{foreground:n.color,fontStyle:Ks(n)??``}}]})}function Ks(e){return e?.fontStyle?.join(` `)}function qs(e){return e?{foreground:e.color}:{}}function Js(e,t){if(t===void 0)return[];let n=Ks(t);return[{scope:e,settings:{...qs(t),...n&&{fontStyle:n}}}]}function Wee(e){let t=Object.entries(Gs),n=t.flatMap(([t,n])=>t!==`comment`&&e[t].fontStyle?.length?n:[]);if(n.length===0)return[];let r=t.flatMap(([t,n])=>e[t].fontStyle?[]:n).filter(e=>n.some(t=>e.startsWith(`${t}.`)));return[...r.length>0?[{scope:r,settings:{fontStyle:``}}]:[],...t.map(([t,r])=>({scope:n.flatMap(e=>r.map(t=>`${e} ${t}`)),settings:{foreground:e[t].color,fontStyle:e[t].fontStyle?.join(` `)??``}}))]}var Gee={dark:`0 1px 2px #00000066, 0 10px 30px #00000080`,light:`0 1px 2px #0000000f, 0 8px 24px #00000014`},Kee={dark:{wash:`29`,mark:`2e`,markActive:`57`,chip:`24`},light:{wash:`1f`,mark:`24`,markActive:`47`,chip:`1c`}};function qee(e){let t=Kee[e.scheme],n=e.ruleHue??e.ink,r=e.washHue??e.accent,i=e.markHue??r;return{"--paper":e.paper,"--paper-raised":e.raised,"--paper-sunk":e.sunk,"--ink":e.ink,"--ink-soft":e.inkSoft,"--ink-faint":e.inkFaint,"--rule":`${n}1a`,"--rule-strong":`${n}29`,"--accent":e.accent,"--accent-bright":e.accentBright,"--accent-wash":`${r}${t.wash}`,"--accent-ink":e.accentInk,"--mark":`${i}${t.mark}`,"--mark-active":`${i}${t.markActive}`,"--mark-orphan":`${e.neutral}29`,"--chip-bold":`${e.chipBoldHue??e.ink}${t.chip}`,"--chip-italic":`${e.chipItalicHue??e.inkSoft}${t.chip}`,"--chip-code":`${e.chipCodeHue??e.neutral}${t.chip}`,"--chip-link":`${e.chipLinkHue??e.accentBright}${t.chip}`,"--chip-ref":`${e.chipRefHue??e.ok}${t.chip}`,"--chip-skill":`${e.chipSkillHue??e.attention}${t.chip}`,"--ok":e.ok,"--danger":e.danger,"--attention":e.attention,"--shadow-card":Gee[e.scheme]}}function Ys(e){let t=Vee(e.markdown??{});return{id:e.id,label:e.label,scheme:e.scheme,tokens:qee({scheme:e.scheme,...e.palette}),markdown:t,shikiTheme:Hee({...e,markdown:t})}}var Xs={"caret-dark":Zs(`caret-dark`,{id:`caret-dark`,label:`caret dark`,scheme:`dark`,palette:{paper:`#0a0806`,raised:`#15110d`,sunk:`#100d0a`,ink:`#f7f2ea`,inkSoft:`#bcb0a1`,inkFaint:`#918576`,accent:`#ff8f3d`,accentBright:`#ffb277`,accentInk:`#0a0806`,neutral:`#9a8c7e`,ok:`#4ed056`,danger:`#f65a6f`,attention:`#3fbda9`,ruleHue:`#f2e7d5`,washHue:`#f2842f`,markHue:`#ffa64d`,chipLinkHue:`#f56f8e`,chipSkillHue:`#6ec4e4`},syntax:{comment:{color:`#7f7466`,fontStyle:[`italic`]},punctuation:{color:`#b0a094`},variable:{color:`#ece2d4`},property:{color:`#a3d4ec`},attribute:{color:`#f5834f`},keyword:{color:`#dd7a6c`},function:{color:`#ecc25c`},type:{color:`#6ec4e4`},string:{color:`#92d474`},escape:{color:`#f56f8e`},number:{color:`#4cbbc8`}},markdown:{heading:{color:`#ecc25c`,fontStyle:[`bold`]},heading1:{color:`#ecc25c`,fontStyle:[`bold`,`italic`]},heading2:{color:`#92d474`,fontStyle:[`bold`]},heading3:{color:`#3fbda9`,fontStyle:[`bold`]},heading4:{color:`#6ec4e4`,fontStyle:[`bold`]},heading5:{color:`#ecc25c`},heading6:{color:`#bcb0a1`,fontStyle:[`italic`]},code:{color:`#a3d4ec`},link:{color:`#f56f8e`},bold:{color:`#dd7a6c`},italic:{color:`#3fbda9`},listMarker:{color:`#ecc25c`},quote:{color:`#92d474`,fontStyle:[`italic`]}}}),"caret-light":Zs(`caret-light`,{id:`caret-light`,label:`caret light`,scheme:`light`,palette:{paper:`#fefcf8`,raised:`#fffefc`,sunk:`#faf6ec`,ink:`#191310`,inkSoft:`#544b43`,inkFaint:`#847a70`,accent:`#c2490d`,accentBright:`#e06a24`,accentInk:`#fff6ec`,neutral:`#7a6f63`,ok:`#1d802a`,danger:`#c11f30`,attention:`#0a5f57`,ruleHue:`#2a2018`,washHue:`#e07a2e`,markHue:`#e8882e`,chipLinkHue:`#ab1f43`,chipSkillHue:`#145d8f`},syntax:{comment:{color:`#8a7d6d`,fontStyle:[`italic`]},punctuation:{color:`#665b52`},variable:{color:`#2a221c`},property:{color:`#35617e`},attribute:{color:`#963c07`},keyword:{color:`#9a2f22`},function:{color:`#7d5a05`},type:{color:`#145d8f`},string:{color:`#2c7331`},escape:{color:`#ab1f43`},number:{color:`#14717b`}},markdown:{heading:{color:`#7d5a05`,fontStyle:[`bold`]},heading1:{color:`#7d5a05`,fontStyle:[`bold`,`italic`]},heading2:{color:`#2c7331`,fontStyle:[`bold`]},heading3:{color:`#0a5f57`,fontStyle:[`bold`]},heading4:{color:`#145d8f`,fontStyle:[`bold`]},heading5:{color:`#7d5a05`},heading6:{color:`#544b43`,fontStyle:[`italic`]},code:{color:`#35617e`},link:{color:`#ab1f43`},bold:{color:`#191310`},italic:{color:`#0a5f57`},listMarker:{color:`#7d5a05`},quote:{color:`#2c7331`,fontStyle:[`italic`]}}}),"catppuccin-latte":Zs(`catppuccin-latte`,{id:`catppuccin-latte`,label:`Catppuccin Latte`,scheme:`light`,palette:{paper:`#e6e9ef`,raised:`#eff1f5`,sunk:`#dce0e8`,ink:`#4c4f69`,inkSoft:`#5c5f77`,inkFaint:`#7c7f93`,accent:`#8839ef`,accentBright:`#7287fd`,accentInk:`#eff1f5`,neutral:`#9ca0b0`,ok:`#40a02b`,danger:`#d20f39`,attention:`#1e66f5`,chipLinkHue:`#ea76cb`},syntax:{comment:{color:`#7c7f93`,fontStyle:[`italic`]},punctuation:{color:`#7c7f93`},operator:{color:`#179299`},bracket:{color:`#4c4f69`},variable:{color:`#4c4f69`},parameter:{color:`#e64553`,fontStyle:[`italic`]},property:{color:`#4c4f69`},attribute:{color:`#df8e1d`},keyword:{color:`#8839ef`},languageVariable:{color:`#4c4f69`},tag:{color:`#1e66f5`},tagPunctuation:{color:`#179299`},function:{color:`#1e66f5`,fontStyle:[`italic`]},builtinFunction:{color:`#d20f39`,fontStyle:[`italic`]},type:{color:`#df8e1d`,fontStyle:[`italic`]},builtinType:{color:`#8839ef`},string:{color:`#40a02b`},escape:{color:`#ea76cb`},interpolation:{color:`#7c7f93`},number:{color:`#fe640b`}},markdown:{heading:{color:`#4c4f69`,fontStyle:[`bold`]},heading1:{color:`#4c4f69`,fontStyle:[`bold`,`italic`]},heading2:{color:`#4c4f69`,fontStyle:[`bold`]},heading3:{color:`#4c4f69`,fontStyle:[`italic`]},heading4:{color:`#5c5f77`,fontStyle:[`bold`,`italic`]},heading5:{color:`#5c5f77`,fontStyle:[`bold`]},heading6:{color:`#5c5f77`,fontStyle:[`italic`]},code:{color:`#4c4f69`},link:{color:`#4c4f69`},bold:{color:`#4c4f69`},italic:{color:`#4c4f69`},listMarker:{color:`#1e66f5`},quote:{color:`#5c5f77`,fontStyle:[`italic`]}}}),"catppuccin-frappe":Zs(`catppuccin-frappe`,{id:`catppuccin-frappe`,label:`Catppuccin Frappé`,scheme:`dark`,palette:{paper:`#292c3c`,raised:`#414559`,sunk:`#303446`,ink:`#c6d0f5`,inkSoft:`#b5bfe2`,inkFaint:`#949cbb`,accent:`#ca9ee6`,accentBright:`#babbf1`,accentInk:`#232634`,neutral:`#737994`,ok:`#a6d189`,danger:`#e78284`,attention:`#8caaee`,chipLinkHue:`#f4b8e4`},syntax:{comment:{color:`#949cbb`,fontStyle:[`italic`]},punctuation:{color:`#949cbb`},operator:{color:`#81c8be`},bracket:{color:`#c6d0f5`},variable:{color:`#c6d0f5`},parameter:{color:`#ea999c`,fontStyle:[`italic`]},property:{color:`#c6d0f5`},attribute:{color:`#e5c890`},keyword:{color:`#ca9ee6`},languageVariable:{color:`#c6d0f5`},tag:{color:`#8caaee`},tagPunctuation:{color:`#81c8be`},function:{color:`#8caaee`,fontStyle:[`italic`]},builtinFunction:{color:`#e78284`,fontStyle:[`italic`]},type:{color:`#e5c890`,fontStyle:[`italic`]},builtinType:{color:`#ca9ee6`},string:{color:`#a6d189`},escape:{color:`#f4b8e4`},interpolation:{color:`#949cbb`},number:{color:`#ef9f76`}},markdown:{heading:{color:`#ef9f76`,fontStyle:[`bold`]},heading1:{color:`#f4b8e4`,fontStyle:[`bold`,`italic`]},heading2:{color:`#ef9f76`,fontStyle:[`bold`]},heading3:{color:`#e5c890`,fontStyle:[`bold`]},heading4:{color:`#a6d189`,fontStyle:[`bold`]},heading5:{color:`#85c1dc`},heading6:{color:`#babbf1`,fontStyle:[`italic`]},code:{color:`#81c8be`},link:{color:`#f4b8e4`,fontStyle:[`underline`]},bold:{color:`#babbf1`},italic:{color:`#e5c890`},listMarker:{color:`#a6d189`},quote:{color:`#ea999c`,fontStyle:[`italic`]}}}),"catppuccin-macchiato":Zs(`catppuccin-macchiato`,{id:`catppuccin-macchiato`,label:`Catppuccin Macchiato`,scheme:`dark`,palette:{paper:`#1e2030`,raised:`#363a4f`,sunk:`#24273a`,ink:`#cad3f5`,inkSoft:`#b8c0e0`,inkFaint:`#939ab7`,accent:`#c6a0f6`,accentBright:`#b7bdf8`,accentInk:`#181926`,neutral:`#6e738d`,ok:`#a6da95`,danger:`#ed8796`,attention:`#8aadf4`,chipLinkHue:`#f5bde6`},syntax:{comment:{color:`#939ab7`,fontStyle:[`italic`]},punctuation:{color:`#939ab7`},operator:{color:`#8bd5ca`},bracket:{color:`#cad3f5`},variable:{color:`#cad3f5`},parameter:{color:`#ee99a0`,fontStyle:[`italic`]},property:{color:`#cad3f5`},attribute:{color:`#eed49f`},keyword:{color:`#c6a0f6`},languageVariable:{color:`#cad3f5`},tag:{color:`#8aadf4`},tagPunctuation:{color:`#8bd5ca`},function:{color:`#8aadf4`,fontStyle:[`italic`]},builtinFunction:{color:`#ed8796`,fontStyle:[`italic`]},type:{color:`#eed49f`,fontStyle:[`italic`]},builtinType:{color:`#c6a0f6`},string:{color:`#a6da95`},escape:{color:`#f5bde6`},interpolation:{color:`#939ab7`},number:{color:`#f5a97f`}},markdown:{heading:{color:`#f5a97f`,fontStyle:[`bold`]},heading1:{color:`#f5bde6`,fontStyle:[`bold`,`italic`]},heading2:{color:`#f5a97f`,fontStyle:[`bold`]},heading3:{color:`#eed49f`,fontStyle:[`bold`]},heading4:{color:`#a6da95`,fontStyle:[`bold`]},heading5:{color:`#7dc4e4`},heading6:{color:`#b7bdf8`,fontStyle:[`italic`]},code:{color:`#8bd5ca`},link:{color:`#f5bde6`,fontStyle:[`underline`]},bold:{color:`#b7bdf8`},italic:{color:`#eed49f`},listMarker:{color:`#a6da95`},quote:{color:`#ee99a0`,fontStyle:[`italic`]}}}),"catppuccin-mocha":Zs(`catppuccin-mocha`,{id:`catppuccin-mocha`,label:`Catppuccin Mocha`,scheme:`dark`,palette:{paper:`#181825`,raised:`#313244`,sunk:`#1e1e2e`,ink:`#cdd6f4`,inkSoft:`#bac2de`,inkFaint:`#9399b2`,accent:`#cba6f7`,accentBright:`#b4befe`,accentInk:`#11111b`,neutral:`#6c7086`,ok:`#a6e3a1`,danger:`#f38ba8`,attention:`#89b4fa`,chipLinkHue:`#f5c2e7`},syntax:{comment:{color:`#9399b2`,fontStyle:[`italic`]},punctuation:{color:`#9399b2`},operator:{color:`#94e2d5`},bracket:{color:`#cdd6f4`},variable:{color:`#cdd6f4`},parameter:{color:`#eba0ac`,fontStyle:[`italic`]},property:{color:`#cdd6f4`},attribute:{color:`#f9e2af`},keyword:{color:`#cba6f7`},languageVariable:{color:`#cdd6f4`},tag:{color:`#89b4fa`},tagPunctuation:{color:`#94e2d5`},function:{color:`#89b4fa`,fontStyle:[`italic`]},builtinFunction:{color:`#f38ba8`,fontStyle:[`italic`]},type:{color:`#f9e2af`,fontStyle:[`italic`]},builtinType:{color:`#cba6f7`},string:{color:`#a6e3a1`},escape:{color:`#f5c2e7`},interpolation:{color:`#9399b2`},number:{color:`#fab387`}},markdown:{heading:{color:`#fab387`,fontStyle:[`bold`]},heading1:{color:`#f5c2e7`,fontStyle:[`bold`,`italic`]},heading2:{color:`#fab387`,fontStyle:[`bold`]},heading3:{color:`#f9e2af`,fontStyle:[`bold`]},heading4:{color:`#a6e3a1`,fontStyle:[`bold`]},heading5:{color:`#74c7ec`},heading6:{color:`#b4befe`,fontStyle:[`italic`]},code:{color:`#94e2d5`},link:{color:`#f5c2e7`,fontStyle:[`underline`]},bold:{color:`#b4befe`},italic:{color:`#f9e2af`},listMarker:{color:`#a6e3a1`},quote:{color:`#eba0ac`,fontStyle:[`italic`]}}}),dracula:Zs(`dracula`,{id:`dracula`,label:`Dracula`,scheme:`dark`,palette:{paper:`#21222c`,raised:`#343746`,sunk:`#282a36`,ink:`#f8f8f2`,inkSoft:`#b5bccf`,inkFaint:`#808db4`,accent:`#bd93f9`,accentBright:`#d6acff`,accentInk:`#21222c`,neutral:`#6272a4`,ok:`#50fa7b`,danger:`#ff5555`,attention:`#ffb86c`,chipLinkHue:`#ff79c6`,chipRefHue:`#8be9fd`},syntax:{comment:{color:`#6272a4`},punctuation:{color:`#f8f8f2`},operator:{color:`#ff79c6`},bracket:{color:`#f8f8f2`},variable:{color:`#f8f8f2`},parameter:{color:`#ffb86c`,fontStyle:[`italic`]},property:{color:`#f8f8f2`},attribute:{color:`#50fa7b`,fontStyle:[`italic`]},keyword:{color:`#ff79c6`},languageVariable:{color:`#bd93f9`,fontStyle:[`italic`]},tag:{color:`#ff79c6`},tagPunctuation:{color:`#f8f8f2`},function:{color:`#50fa7b`},builtinFunction:{color:`#8be9fd`},type:{color:`#8be9fd`,fontStyle:[`italic`]},builtinType:{color:`#8be9fd`,fontStyle:[`italic`]},string:{color:`#f1fa8c`},escape:{color:`#ff79c6`},interpolation:{color:`#f8f8f2`},number:{color:`#bd93f9`}},markdown:{heading:{color:`#8be9fd`,fontStyle:[`bold`]},heading1:{color:`#ff79c6`,fontStyle:[`bold`,`italic`]},heading2:{color:`#f1fa8c`,fontStyle:[`bold`]},heading3:{color:`#50fa7b`,fontStyle:[`bold`]},heading4:{color:`#8be9fd`,fontStyle:[`bold`]},heading5:{color:`#ffb86c`},heading6:{color:`#b5bccf`,fontStyle:[`italic`]},code:{color:`#50fa7b`},link:{color:`#ff79c6`,fontStyle:[`underline`]},bold:{color:`#ffb86c`},italic:{color:`#f1fa8c`},listMarker:{color:`#8be9fd`},quote:{color:`#b5bccf`,fontStyle:[`italic`]}}}),"github-light":Zs(`github-light`,{id:`github-light`,label:`GitHub Light`,scheme:`light`,palette:{paper:`#f6f8fa`,raised:`#ffffff`,sunk:`#eff2f5`,ink:`#1f2328`,inkSoft:`#59636e`,inkFaint:`#818b98`,accent:`#0969da`,accentBright:`#0550ae`,accentInk:`#ffffff`,neutral:`#818b98`,ok:`#1a7f37`,danger:`#d1242f`,attention:`#9a6700`,chipLinkHue:`#8250df`},syntax:{comment:{color:`#6e7781`},punctuation:{color:`#1f2328`},operator:{color:`#cf222e`},bracket:{color:`#1f2328`},variable:{color:`#1f2328`},parameter:{color:`#953800`},property:{color:`#1f2328`},attribute:{color:`#0550ae`},keyword:{color:`#cf222e`},languageVariable:{color:`#0550ae`},tag:{color:`#116329`},tagPunctuation:{color:`#1f2328`},function:{color:`#8250df`},builtinFunction:{color:`#0550ae`},type:{color:`#953800`},builtinType:{color:`#0550ae`},string:{color:`#0a3069`},escape:{color:`#cf222e`},interpolation:{color:`#1f2328`},number:{color:`#0550ae`}},markdown:{heading:{color:`#953800`,fontStyle:[`bold`]},heading1:{color:`#953800`,fontStyle:[`bold`,`italic`]},heading2:{color:`#6639ba`,fontStyle:[`bold`]},heading3:{color:`#116329`,fontStyle:[`bold`]},heading4:{color:`#7d4e00`,fontStyle:[`bold`]},heading5:{color:`#6639ba`},heading6:{color:`#59636e`},code:{color:`#1f2328`},link:{color:`#1f2328`},bold:{color:`#1f2328`},italic:{color:`#59636e`},listMarker:{color:`#953800`},quote:{color:`#116329`,fontStyle:[`italic`]}}}),"github-dark":Zs(`github-dark`,{id:`github-dark`,label:`GitHub Dark`,scheme:`dark`,palette:{paper:`#0d1117`,raised:`#151b23`,sunk:`#010409`,ink:`#f0f6fc`,inkSoft:`#9198a1`,inkFaint:`#656c76`,accent:`#4493f8`,accentBright:`#79c0ff`,accentInk:`#010409`,neutral:`#656c76`,ok:`#3fb950`,danger:`#f85149`,attention:`#d29922`,chipLinkHue:`#d2a8ff`},syntax:{comment:{color:`#8b949e`},punctuation:{color:`#e6edf3`},operator:{color:`#ff7b72`},bracket:{color:`#e6edf3`},variable:{color:`#e6edf3`},parameter:{color:`#ffa657`},property:{color:`#e6edf3`},attribute:{color:`#79c0ff`},keyword:{color:`#ff7b72`},languageVariable:{color:`#79c0ff`},tag:{color:`#7ee787`},tagPunctuation:{color:`#e6edf3`},function:{color:`#d2a8ff`},builtinFunction:{color:`#79c0ff`},type:{color:`#ffa657`},builtinType:{color:`#79c0ff`},string:{color:`#a5d6ff`},escape:{color:`#ff7b72`},interpolation:{color:`#e6edf3`},number:{color:`#79c0ff`}},markdown:{heading:{color:`#ffa657`,fontStyle:[`bold`]},heading1:{color:`#ffa657`,fontStyle:[`bold`,`italic`]},heading2:{color:`#d2a8ff`,fontStyle:[`bold`]},heading3:{color:`#7ee787`,fontStyle:[`bold`]},heading4:{color:`#d29922`,fontStyle:[`bold`]},heading5:{color:`#d2a8ff`},heading6:{color:`#9198a1`},code:{color:`#ff7b72`},link:{color:`#d2a8ff`,fontStyle:[`underline`]},bold:{color:`#f0f6fc`},italic:{color:`#d29922`},listMarker:{color:`#ffa657`},quote:{color:`#7ee787`,fontStyle:[`italic`]}}}),dawnfox:Zs(`dawnfox`,{id:`dawnfox`,label:`Dawnfox`,scheme:`light`,palette:{paper:`#ebe5df`,raised:`#faf4ed`,sunk:`#ebe0df`,ink:`#4c4769`,inkSoft:`#625c87`,inkFaint:`#837e9a`,accent:`#286983`,accentBright:`#2d81a3`,accentInk:`#faf4ed`,neutral:`#9893a5`,ok:`#618774`,danger:`#b4637a`,attention:`#ea9d34`,chipLinkHue:`#907aa9`,chipRefHue:`#d685af`},syntax:{comment:{color:`#bdbfc9`,fontStyle:[`italic`]},punctuation:{color:`#4c4769`},operator:{color:`#56949f`},bracket:{color:`#4c4769`},variable:{color:`#4c4769`},parameter:{color:`#c9709e`,fontStyle:[`italic`]},property:{color:`#4c4769`},attribute:{color:`#ea9d34`},keyword:{color:`#907aa9`},languageVariable:{color:`#4c4769`},tag:{color:`#295e73`},tagPunctuation:{color:`#56949f`},function:{color:`#295e73`,fontStyle:[`italic`]},builtinFunction:{color:`#b4637a`,fontStyle:[`italic`]},type:{color:`#ea9d34`,fontStyle:[`italic`]},builtinType:{color:`#907aa9`},string:{color:`#618774`},escape:{color:`#625c87`},interpolation:{color:`#4c4769`},number:{color:`#ea9d34`}},markdown:{heading:{color:`#4c4769`,fontStyle:[`bold`]},heading1:{color:`#4c4769`,fontStyle:[`bold`,`italic`]},heading2:{color:`#4c4769`,fontStyle:[`bold`]},heading3:{color:`#4c4769`,fontStyle:[`italic`]},heading4:{color:`#625c87`,fontStyle:[`bold`,`italic`]},heading5:{color:`#625c87`,fontStyle:[`bold`]},heading6:{color:`#625c87`,fontStyle:[`italic`]},code:{color:`#4c4769`},link:{color:`#4c4769`},bold:{color:`#4c4769`},italic:{color:`#4c4769`},listMarker:{color:`#625c87`},quote:{color:`#625c87`,fontStyle:[`italic`]}}}),duskfox:Zs(`duskfox`,{id:`duskfox`,label:`Duskfox`,scheme:`dark`,palette:{paper:`#191726`,raised:`#2d2a45`,sunk:`#232136`,ink:`#e0def4`,inkSoft:`#cdcbe0`,inkFaint:`#817c9c`,accent:`#c4a7e7`,accentBright:`#ccb1ed`,accentInk:`#191726`,neutral:`#817c9c`,ok:`#a3be8c`,danger:`#eb6f92`,attention:`#f6c177`,chipLinkHue:`#d871a6`,chipRefHue:`#9ccfd8`},syntax:{comment:{color:`#4b4673`,fontStyle:[`italic`]},punctuation:{color:`#eae8ff`},operator:{color:`#9ccfd8`},bracket:{color:`#eae8ff`},variable:{color:`#eae8ff`},parameter:{color:`#d871a6`,fontStyle:[`italic`]},property:{color:`#eae8ff`},attribute:{color:`#f6c177`},keyword:{color:`#c4a7e7`},languageVariable:{color:`#eae8ff`},tag:{color:`#4a869c`},tagPunctuation:{color:`#9ccfd8`},function:{color:`#4a869c`,fontStyle:[`italic`]},builtinFunction:{color:`#eb6f92`,fontStyle:[`italic`]},type:{color:`#f6c177`,fontStyle:[`italic`]},builtinType:{color:`#c4a7e7`},string:{color:`#a3be8c`},escape:{color:`#cdcbe0`},interpolation:{color:`#eae8ff`},number:{color:`#f6c177`}},markdown:{heading:{color:`#f6c177`,fontStyle:[`bold`]},heading1:{color:`#ea9a97`,fontStyle:[`bold`,`italic`]},heading2:{color:`#f6c177`,fontStyle:[`bold`]},heading3:{color:`#9ccfd8`,fontStyle:[`bold`]},heading4:{color:`#a3be8c`,fontStyle:[`italic`]},heading5:{color:`#ea9a97`},heading6:{color:`#cdcbe0`,fontStyle:[`italic`]},code:{color:`#ea9a97`},link:{color:`#e0def4`,fontStyle:[`underline`]},bold:{color:`#a3be8c`},italic:{color:`#eb98c3`},listMarker:{color:`#4a869c`},quote:{color:`#9ccfd8`,fontStyle:[`italic`]}}})};function Zs(e,t){let n=Bee(t.syntax),r=t.scheme,i=t.markdown;return{...Ys({...t,scheme:r,syntax:n,markdown:i}),id:e}}var Qs=Object.keys(Xs),$s=new Us;function ec(e){return Object.hasOwn(Xs,e)}function tc(e){return $s.has(e)}function Jee(e){let t=e.id;if(ec(t)||$s.has(t))throw Error(`theme id "${t}" is already taken`);return $s.set(t,{...e,id:t,revision:0}),t}function Yee(e){let t=tc(e.id)?$s.get(e.id):void 0;if(t===void 0)throw Error(`theme id "${e.id}" is not registered`);let{id:n,revision:r}=t;return $s.set(n,{...e,id:n,revision:r+1}),n}function nc(e){let t=ec(e)?Xs[e]:$s.get(e);if(t===void 0)throw Error(`no theme registered as "${e}"`);return t}function rc(e){return[...Qs.map(e=>Xs[e]),...$s.values()].filter(t=>t.scheme===e)}function ic(e,t=document.documentElement){let n=nc(e);return ac(n,t),n}function ac(e,t=document.documentElement){for(let e of Array.from(t.style))e.startsWith(`--markdown-`)&&t.style.removeProperty(e);let n=Xee(e.markdown??{});for(let[r,i]of Object.entries({...e.tokens,...n}))t.style.setProperty(r,i);t.style.setProperty(`color-scheme`,e.scheme),t.dataset.theme=e.scheme}function Xee(e){let t={};for(let[n,r]of Object.entries(e)){let e=`--markdown-${n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}`,i=new Set(r.fontStyle);t[`${e}-color`]=r.color,(i.has(`bold`)||n.startsWith(`heading`))&&(t[`${e}-font-weight`]=i.has(`bold`)?`bold`:`normal`),i.has(`italic`)&&(t[`${e}-font-style`]=`italic`);let a=[...i.has(`underline`)||n===`link`?[`underline`]:[],...i.has(`strikethrough`)?[`line-through`]:[]];a.length>0&&(t[`${e}-text-decoration`]=a.join(` `))}return e.quote&&(t[`--markdown-quote-opacity`]=`1`),t}var oc=[`light`,`dark`,`system`],Zee=`system`,sc={light:`caret-light`,dark:`caret-dark`},Qee=`caret.theme.mode`,cc=`caret.theme.light`,lc=`caret.theme.dark`,uc=`caret.theme.cache.light`,dc=`caret.theme.cache.dark`;Ms(uc),Ms(dc);var fc=`caret.theme`;Ms(fc);var pc=Ns(Qee,oc,Zee),mc={light:Ns(cc,()=>rc(`light`).map(e=>e.id),sc.light),dark:Ns(lc,()=>rc(`dark`).map(e=>e.id),sc.dark)};function hc(e,t){return e===`system`?t?`dark`:`light`:e}function $ee(e,t,n){return t[hc(e,n)]}function ete(e,t,n){return e===`system`?`Following your system, which is ${t} right now — so ${n} is showing.`:`Always ${t} — ${n} is showing.`}function tte(e,t){let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>e[n]===t[n])}function gc(e,t,n){return e!==void 0&&e.id===t&&n!==e.id}var _c=pc.read,vc=pc.write;function yc(e){return mc[e].read()}function bc(e,t){mc[e].write(t)}var xc={light:uc,dark:dc},Sc=Object.keys(Xs[`caret-dark`].tokens).sort().join();function nte(e){try{let t=localStorage.getItem(xc[e]);if(t===null)return;let n=JSON.parse(t);if(typeof n!=`object`||!n)return;let{id:r,scheme:i,tokens:a}=n;return typeof r!=`string`||i!==e||typeof a!=`object`||!a||Object.keys(a).sort().join()!==Sc||!Object.values(a).every(e=>typeof e==`string`)?void 0:{id:r,scheme:e,tokens:a}}catch{return}}function rte(e){try{let{id:t,scheme:n,tokens:r}=e;localStorage.setItem(xc[n],JSON.stringify({id:t,scheme:n,tokens:r}))}catch{}}function ite(e){try{localStorage.removeItem(xc[e])}catch{}}function ate(e){try{return localStorage.getItem(mc[e].KEY)??void 0}catch{return}}function Cc(){if(typeof matchMedia==`function`)return matchMedia(`(prefers-color-scheme: dark)`)}function ote(){return Cc()?.matches??!1}function ste(e,t=Cc()){if(!t)return()=>{};let n=t=>e(t.matches);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)}function cte(){try{if(localStorage.getItem(`caret.theme.mode`)!==null)return;let e=localStorage.getItem(fc);if(e===null)return;localStorage.removeItem(fc);let t=[...rc(`light`),...rc(`dark`)].find(t=>t.id===e);if(!t)return;vc(t.scheme),bc(t.scheme,t.id)}catch{}}function wc(e,t=Vs()){if(!t.startViewTransition||t.prefersReducedMotion()){e();return}t.startViewTransition(e)}var Tc=[`light`,`dark`];function Ec(e={}){let t=e.prefersDark??ote,n=()=>({light:yc(`light`),dark:yc(`dark`)}),r=jr({mode:_c(),slots:n(),prefersDark:t()}),i=()=>$ee(r.mode,r.slots,r.prefersDark),a=()=>hc(r.mode,r.prefersDark),o,s=()=>{o!==void 0&&(o=void 0,wc(()=>ic(i()),e.wipe))},c=e=>{let t=r.slots[e];ec(t)?ite(e):rte({id:t,scheme:e,tokens:nc(t).tokens})},l=t=>{let n=i();t();let r=i();if(r===n)return;let a=o;if(o=void 0,a?.id===r&&tte(a.tokens,nc(r).tokens)){ic(r);return}wc(()=>{ic(r)},e.wipe)};return{get mode(){return r.mode},get slots(){return r.slots},get themeId(){return i()},get scheme(){return a()},get summary(){return ete(r.mode,a(),nc(i()).label)},setMode(e){l(()=>{vc(e),r.mode=e})},setSlot(e,t){l(()=>{bc(e,t),r.slots[e]=t}),o?.scheme===e&&s(),c(e)},boot(){r.mode=_c(),r.slots=n(),r.prefersDark=t();let e=a(),s=nte(e);o=gc(s,ate(e),r.slots[e])?s:void 0,o?ac(o):ic(i())},refresh(){l(()=>{for(let e of Tc)r.slots[e]===sc[e]&&(r.slots[e]=yc(e))})},themesUnavailable:s,themesLoaded(){for(let e of Tc)c(e);s()},reapply(t){let n=Tc.filter(e=>r.slots[e]===t||r.slots[e]===sc[e]&&yc(e)===t);if(n.length===0)return;let{scheme:a}=nc(t),o=i()===t;l(()=>{for(let e of n)r.slots[e]=a===e?t:sc[e]}),o&&i()===t&&wc(()=>ic(t),e.wipe);for(let e of Tc)c(e)},watch(e){return ste(e=>{l(()=>{r.prefersDark=e})},e)}}}var Dc=Ec(),Oc=`diffs-container`,kc=/(?=^diff --git)/gm,Ac=/(?<=\n)/,jc=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Mc=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Nc=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Pc=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Fc=`header-prefix`,Ic=`header-filename-suffix`,Lc=`header-metadata`,Rc=`header-custom`,zc={dark:`pierre-dark`,light:`pierre-light`},Bc=`data-theme-css`,Vc=`data-unsafe-css`,Hc=`data-diffs-scrollbar-measure`,Uc=`--diffs-scrollbar-gutter-measured`,Wc=1e5,Gc=Object.freeze({fromStart:0,fromEnd:0}),Kc={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},qc={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Jc=new Set,Yc=null;function Xc(e){Jc.add(e),Yc??=requestAnimationFrame(Qc)}function Zc(e){Jc.delete(e)&&Jc.size===0&&Yc!=null&&(cancelAnimationFrame(Yc),Yc=null)}function Qc(e){let t=new Set(Jc);Jc.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}Yc=Jc.size>0?requestAnimationFrame(Qc):null}function $c(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function el(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function tl(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}var lte=new TextEncoder,ute=new TextDecoder(`utf-8`,{ignoreBOM:!0}),dte=/[\uD800-\uDFFF]/,nl=1024,rl=new Uint8Array(nl);function fte(){rl.length!==nl&&(rl=new Uint8Array(nl))}function il(e){if(e.length===0)return e;if(dte.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;rl.length<t&&(rl=new Uint8Array(t));let{written:n}=lte.encodeInto(e,rl);return ute.decode(rl.subarray(0,n))}function al(e,t){return e-(t===0?0:1)}function ol(e,t){return al(e,t)+t}var pte=4096,mte=.5;function hte(e){for(let t of e.hunks){for(let n=0;n<t.hunkContent.length;n++){let r=t.hunkContent[n];if(r.type!==`change`)continue;let i=_te(e,r);i!=null&&(t.hunkContent.splice(n,1,...i),n+=i.length-1)}gte(t,e)}}function gte(e,t){let{hunkContent:n}=e;for(let e=1;e<n.length;e++){let r=n[e],i=n[e-1];if(r.type!==`change`||r.additions>0&&r.deletions>0||i.type!==`context`)continue;let a=r.additions>0,o=a?t.additionLines:t.deletionLines,s=a?r.additionLineIndex:r.deletionLineIndex,c=a?r.additions:r.deletions,l=o[s]??``;if(l.trim()!==``)continue;let u=!0;for(let e=1;e<c;e++)if(o[s+e]!==l){u=!1;break}if(!u)continue;let d=0;for(;d<i.lines&&t.additionLines[i.additionLineIndex+i.lines-1-d]===l;)d++;if(d===0||e===1&&d===i.lines)continue;r.additionLineIndex-=d,r.deletionLineIndex-=d;let f=r.additionLineIndex+r.additions,p=r.deletionLineIndex+r.deletions,m=n[e+1];m?.type===`context`?(m.lines+=d,m.additionLineIndex=f,m.deletionLineIndex=p):n.splice(e+1,0,{type:`context`,lines:d,additionLineIndex:f,deletionLineIndex:p}),i.lines-=d,i.lines===0&&(n.splice(e-1,1),e--)}}function _te(e,t){let{deletions:n,additions:r,deletionLineIndex:i,additionLineIndex:a}=t,o=Math.min(n,r),s=Math.abs(r-n);if(o===0||s===0||o*(s+1)>pte)return null;let c=[];for(let t=0;t<n;t++)c.push(sl(e.deletionLines[i+t]??``));let l=[];for(let t=0;t<r;t++)l.push(sl(e.additionLines[a+t]??``));let u=r>n,d=0,f=-1;for(let e=0;e<=s;e++){let t=0;for(let n=0;n<o;n++)t+=yte(c[n+(u?0:e)],l[n+(u?e:0)]);e===0?f=t+o*mte:t>f&&(f=t,d=e)}if(d===0)return null;let p=[],m=(e,t,n,r)=>{(e>0||t>0)&&p.push({type:`change`,deletions:e,additions:t,deletionLineIndex:n,additionLineIndex:r})};return u?(m(0,d,i,a),m(o,o,i,a+d),m(0,r-o-d,i+o,a+d+o)):(m(d,0,i,a),m(o,o,i+d,a),m(n-o-d,0,i+d+o,a+o)),p}var vte=/\s+/g;function sl(e){return e.replace(vte,``)}function yte(e,t){if(e===t)return 1;let n=Math.max(e.length,t.length),r=Math.min(e.length,t.length);if(r===0)return 0;let i=0;for(;i<r&&e[i]===t[i];)i++;let a=0;for(;a<r-i&&e[e.length-1-a]===t[t.length-1-a];)a++;return(i+a)/n}function bte(e,t){try{return xte(e,t)}finally{fte()}}function xte(e,{cacheKey:t,isGitDiff:n=kc.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=hl(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=ll(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=fl(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?cl(i.contents):[],deletionLines:!l&&r!=null&&i!=null?cl(r.contents):[],cacheKey:_l(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Nc),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=il(r.trim()),n!==r&&(c.prevName=il(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?Mc:jc):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=il(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=il(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=il(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=il(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=il(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=il(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Pc)??[];t!=null&&(c.prevObjectId=il(t)),n!=null&&(c.newObjectId=il(n)),r!=null&&(c.mode=il(r))}e.startsWith(`rename from `)&&(c.prevName=il(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=il(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
|
|
4
4
|
`||s[s.length-1]===`\r`||s[s.length-1]===`\r
|
|
@@ -27,7 +27,7 @@ import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J a
|
|
|
27
27
|
\f\r &>`.split(``),`\0
|
|
28
28
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
29
29
|
\f\r "&'<=>\``.split(``),`\0
|
|
30
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function pd(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=zu);let l=md(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!od(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!ed(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function md(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=hd(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function hd(e,t,n){let r=Ete(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Ku(r.attribute,Object.assign({},e.settings.characterReferences,{subset:fd.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Qte:$te)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Ku(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:fd.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&qu(n,o)>qu(n,e.alternative)&&(o=e.alternative),s=o+Ku(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?fd.single:fd.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var gd=[`<`,`&`];function _d(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Ku(e.value,Object.assign({},r.settings.characterReferences,{subset:gd}))}function vd(e,t,n,r){return r.settings.allowDangerousHtml?e.value:_d(e,t,n,r)}function yd(e,t,n,r){return r.all(e)}var bd=Ate(`type`,{invalid:xd,unknown:Sd,handlers:{comment:Xte,doctype:Zte,element:pd,raw:vd,root:yd,text:_d}});function xd(e){throw Error("Expected node, not `"+e+"`")}function Sd(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Cd={},wd={},Td=[];function Ed(e,t){let n=t||Cd,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Dd,all:Od,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||pu,characterReferences:n.characterReferences||wd,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?zu:kte,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Dd(e,t,n){return bd(e,t,n,this)}function Od(e){let t=[],n=e&&e.children||Td,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var kd=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),Zc(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||el(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!r&&!i||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;(t!=null||n!=null||r!=null||a!=null||i!=null)&&(this.options.onGutterUtilityClick!=null&&fu(e.composedPath())||(Jd(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e})))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(Jd(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(Jd(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){Jd(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();Jd(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);Jd(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=Pd(i)&&this.hoveredLine?.lineElement===i.lineElement;Nd(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),Nd(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Pd(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(Id(i)&&p!=null){p(i);break}if(Fd(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!Pd(i))break;Nd(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,Jd(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),Jd(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),Jd(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();fu(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(du(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=Ed(uu());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);Md(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(zd(t));if(Md(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(Md(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(Md(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&fu(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=zd(e);if(t&&fu(n))return;let r=Bd(e);return r==null?this.pathFromAnnotationSlot(e):zd(r)}pathFromAnnotationSlot(e){let t=Hd(Vd(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:zd(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=Ud(t)?t:Ud(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}el(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,Xc(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{Zc(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!Gd(this.renderedSelectedLinesState,n),i=!Gd(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);Ld(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=qd(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=qd(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:Rd(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:Rd(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Kd(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Kd(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Ad({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:jd({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function jd({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function Md(e){return e!=null&&`kind`in e&&e.kind===`line`}function Nd(e){return e!=null&&`kind`in e&&e.kind===`token`}function Pd(e){return Md(e)||Nd(e)}function Fd(e){return`type`in e&&e.type===`line-info`}function Id(e){return`kind`in e&&e.kind===`merge-conflict-action`}function Ld(e){return e===`current`||e===`incoming`||e===`both`}function Rd(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function zd(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function Bd(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function Vd(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function Hd(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function Ud(e){return e!=null&&typeof e.elementFromPoint==`function`}function Wd(e,t){return e===t||el(e??void 0,t??void 0)}function Gd(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&Wd(e?.range??null,t.range)}function Kd(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function qd(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function Jd(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}console.log(...n)}var Yd=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),Qd(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?tf(t):nf(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:Xd(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:Zd(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&$d(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function Xd(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function Zd(e){return Math.max(Math.ceil(e),0)}function Qd(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?$d(e,{codeWidthChanged:!0,numberWidthChanged:!0}):ef(e))}function $d(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function ef(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function tf(e){e.codeElement.isConnected&&ef(e)}function nf(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}var rf=new Map,af=new Map,of=new Map,sf=new Set;function cf(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!sf.has(t))return!1;return!0}function lf(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(sf.has(n.name))continue;let e=rf.get(n.name);e??(e=n,rf.set(n.name,e)),sf.add(e.name),t.loadLanguageSync(e.data)}}function uf(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var df=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ff(){return 2147483648}function pf(){return typeof performance<`u`?performance.now():Date.now()}var mf=(e,t)=>e+(t-e%t)%t;async function hf(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=ff();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,mf(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:pf,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var gf=Object.defineProperty,_f=(e,t,n)=>t in e?gf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vf=(e,t,n)=>_f(e,typeof t==`symbol`?t:t+``,n),yf=null;function bf(e){throw new df(e.UTF8ToString(e.getLastOnigError()))}var xf=class e{constructor(t){vf(this,`utf16Length`),vf(this,`utf8Length`),vf(this,`utf16Value`),vf(this,`utf8Value`),vf(this,`utf16OffsetToUtf8`),vf(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Sf=class e{constructor(t){if(vf(this,`id`,++e.LAST_ID),vf(this,`_onigBinding`),vf(this,`content`),vf(this,`utf16Length`),vf(this,`utf8Length`),vf(this,`utf16OffsetToUtf8`),vf(this,`utf8OffsetToUtf16`),vf(this,`ptr`),!yf)throw new df(`Must invoke loadWasm first.`);this._onigBinding=yf,this.content=t;let n=new xf(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=yf.omalloc(1e4),e._sharedPtrInUse=!0,yf.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(yf)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};vf(Sf,`LAST_ID`,0),vf(Sf,`_sharedPtr`,0),vf(Sf,`_sharedPtrInUse`,!1);var Cf=Sf,wf=class{constructor(e){if(vf(this,`_onigBinding`),vf(this,`_ptr`),!yf)throw new df(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new xf(e[r]);t[r]=i.createString(yf),n[r]=i.utf8Length}let r=yf.omalloc(4*e.length);yf.HEAPU32.set(t,r/4);let i=yf.omalloc(4*e.length);yf.HEAPU32.set(n,i/4);let a=yf.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)yf.ofree(t[n]);yf.ofree(i),yf.ofree(r),a===0&&bf(yf),this._onigBinding=yf,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Cf(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Tf(e){return typeof e.instantiator==`function`}function Ef(e){return typeof e.default==`function`}function Df(e){return e.data!==void 0}function Of(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}var Af;function jf(e){if(Af)return Af;async function t(){yf=await hf(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Tf(n)?n=await n.instantiator(t):Ef(n)?n=await n.default(t):(Df(n)&&(n=n.data),Of(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Nf(n)(t):await Pf(n)(t):kf(n)||n instanceof WebAssembly.Module?n=await Mf(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Mf(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Af=t(),Af}function Mf(e){return t=>WebAssembly.instantiate(e,t)}function Nf(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Pf(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function Ff(e){return e&&await jf(e),{createScanner(e){return new wf(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Cf(e)}}}var If=`modulepreload`,Lf=function(e){return`/`+e},Rf={},Z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Lf(t,n),t=s(t),t in Rf)return;Rf[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:If,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},zf=[{id:`abap`,name:`ABAP`,import:(()=>Z(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>Z(()=>import(`./actionscript-3-Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>Z(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>Z(()=>import(`./ahk-CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>Z(()=>import(`./ahk2-_6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>Z(()=>import(`./angular-html-Dpskr4gp.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>Z(()=>import(`./angular-ts-ARX7ETPl.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>Z(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>Z(()=>import(`./apex-KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>Z(()=>import(`./apl-jPp27sHK.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>Z(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>Z(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>Z(()=>import(`./asciidoc-SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>Z(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>Z(()=>import(`./astro-CjqjWi5R.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>Z(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>Z(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>Z(()=>import(`./bat-qdxAdBWQ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>Z(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>Z(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>Z(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>Z(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>Z(()=>import(`./bird2-CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>Z(()=>import(`./blade-CU7nL4Lc.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>Z(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>Z(()=>import(`./c-CK1Vx2o3.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>Z(()=>import(`./c3-D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>Z(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>Z(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>Z(()=>import(`./chapel-BixVryYd.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>Z(()=>import(`./clarity-CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>Z(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>Z(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>Z(()=>import(`./cobol-BBS8zZYJ.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>Z(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>Z(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>Z(()=>import(`./coffee-BkpQ5qJl.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>Z(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>Z(()=>import(`./coq-DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>Z(()=>import(`./cpp-P_7SyfCT.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>Z(()=>import(`./crystal-Pa0I8tFv.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>Z(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>Z(()=>import(`./css-C2r9H2Cm.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>Z(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>Z(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>Z(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>Z(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>Z(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>Z(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>Z(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>Z(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>Z(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>Z(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>Z(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>Z(()=>import(`./edge-DhkMTpj6.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>Z(()=>import(`./elixir-3s-_iOeW.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>Z(()=>import(`./elm-DgwIfbUS.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>Z(()=>import(`./emacs-lisp-c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>Z(()=>import(`./erb-B8CSqvER.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>Z(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>Z(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>Z(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>Z(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>Z(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>Z(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>Z(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>Z(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>Z(()=>import(`./gdscript-DYvRD3hg.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>Z(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>Z(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>Z(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>Z(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>Z(()=>import(`./git-rebase-CYXN4j3p.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>Z(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>Z(()=>import(`./glimmer-js-B1KY4FVt.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>Z(()=>import(`./glimmer-ts-BGvAt0br.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>Z(()=>import(`./glsl-C5hf4-E0.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>Z(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>Z(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>Z(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>Z(()=>import(`./graphql-BaXOG8De.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>Z(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>Z(()=>import(`./hack-CA_eD4_j.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>Z(()=>import(`./haml-Cem1S36k.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>Z(()=>import(`./handlebars-BL78OyE4.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>Z(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>Z(()=>import(`./haxe-C8oCnwJJ.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>Z(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>Z(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>Z(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>Z(()=>import(`./html-oVT1Os71.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>Z(()=>import(`./html-derivative-Ckkaotti.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>Z(()=>import(`./http-BWzIotxC.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>Z(()=>import(`./hurl-BnG0Lkyj.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>Z(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>Z(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>Z(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>Z(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>Z(()=>import(`./java-DBPt3Tkt.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>Z(()=>import(`./javascript-BJtjZzoN.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>Z(()=>import(`./jinja-O_4nKTrT.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>Z(()=>import(`./jison-DAFNy79p.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>Z(()=>import(`./json-D2HbOIPd.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>Z(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>Z(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>Z(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>Z(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>Z(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>Z(()=>import(`./jsx-YTcqpjVV.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>Z(()=>import(`./julia-CK3Ru6XD.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>Z(()=>import(`./just-CHzPr58U.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65])))},{id:`kdl`,name:`KDL`,import:(()=>Z(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>Z(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>Z(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>Z(()=>import(`./latex-DZCSDFgp.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>Z(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>Z(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>Z(()=>import(`./liquid-CaUAA9ym.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>Z(()=>import(`./llvm-DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>Z(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>Z(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>Z(()=>import(`./lua-nQClDlz4.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>Z(()=>import(`./luau-C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>Z(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>Z(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>Z(()=>import(`./marko-BauDEZ6y.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>Z(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>Z(()=>import(`./mdc-0x4b_vMv.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>Z(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>Z(()=>import(`./mermaid-BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>Z(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>Z(()=>import(`./mojo-fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>Z(()=>import(`./moonbit-DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>Z(()=>import(`./move-BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>Z(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>Z(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>Z(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>Z(()=>import(`./nginx-DsLgRdKI.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>Z(()=>import(`./nim-Dp4GPDgP.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>Z(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>Z(()=>import(`./nsis-CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>Z(()=>import(`./nushell-DHYfO66s.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>Z(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>Z(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>Z(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>Z(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>Z(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>Z(()=>import(`./org-Ds7eZhO5.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93])))},{id:`pascal`,name:`Pascal`,import:(()=>Z(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>Z(()=>import(`./perl-ByEU8_AC.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>Z(()=>import(`./php-XXxp91lc.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>Z(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>Z(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>Z(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>Z(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>Z(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>Z(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>Z(()=>import(`./powershell-CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>Z(()=>import(`./prisma-DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>Z(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>Z(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>Z(()=>import(`./pug-BAvlbdHh.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>Z(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>Z(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>Z(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>Z(()=>import(`./qml-Cb371878.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>Z(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>Z(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>Z(()=>import(`./r-CLLB1AQb.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>Z(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>Z(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>Z(()=>import(`./razor-CtfpbSg7.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>Z(()=>import(`./rbs-C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>Z(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>Z(()=>import(`./regexp-Bw-ytoJQ.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>Z(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>Z(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>Z(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>Z(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>Z(()=>import(`./rst-tIU3xPyQ.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>Z(()=>import(`./ruby-DpyEHNhW.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>Z(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>Z(()=>import(`./sas-I9Tpj7gJ.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>Z(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>Z(()=>import(`./scala-BiFt_7mu.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>Z(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>Z(()=>import(`./scss-DROgm5ds.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>Z(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>Z(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>Z(()=>import(`./shellscript-Xhfw3ww3.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>Z(()=>import(`./shellsession-Dg-SFZle.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>Z(()=>import(`./smalltalk-BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>Z(()=>import(`./smithy-Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>Z(()=>import(`./solidity-Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>Z(()=>import(`./soy-DGc_aMeL.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>Z(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>Z(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>Z(()=>import(`./sql-4a54dIqY.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>Z(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>Z(()=>import(`./stata-DZ0cystC.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>Z(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>Z(()=>import(`./surrealql-Dlgr5ZdW.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>Z(()=>import(`./svelte-B8tgvRm3.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>Z(()=>import(`./swift-CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>Z(()=>import(`./system-verilog-Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>Z(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>Z(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>Z(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>Z(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>Z(()=>import(`./templ-BAt1dBJv.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>Z(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>Z(()=>import(`./tex-CnA1kZ68.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>Z(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>Z(()=>import(`./ts-tags-CksBCcqD.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>Z(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>Z(()=>import(`./tsx-SkJiAILm.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>Z(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>Z(()=>import(`./twig-CLziBLMD.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>Z(()=>import(`./typescript-16WJW8J9.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>Z(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>Z(()=>import(`./typst-MyccmZVL.js`),__vite__mapDeps([112,2,3,1,5,8,7,9,11,13,113,114,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,44,48,50,81,82,54,83,115,63,62,65,66,67,70,116,84,85,87,88,89,90,91,93,117,94,118,119,111,120])))},{id:`v`,name:`V`,import:(()=>Z(()=>import(`./v-DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>Z(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>Z(()=>import(`./vb-DOwzaHZ0.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>Z(()=>import(`./verilog-B2gwz-sJ.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>Z(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>Z(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>Z(()=>import(`./vue-BHRec-Op.js`),__vite__mapDeps([121,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>Z(()=>import(`./vue-html-CBDhBnkD.js`),__vite__mapDeps([122,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>Z(()=>import(`./vue-vine-Xpg29mV9.js`),__vite__mapDeps([123,2,3,5,12,70,124])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>Z(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>Z(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>Z(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>Z(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>Z(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>Z(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>Z(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>Z(()=>import(`./xml-DBXnEspb.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>Z(()=>import(`./xsl-DDUn7e6M.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>Z(()=>import(`./yaml-DtCZHCtv.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>Z(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>Z(()=>import(`./zig-CMLA9XwU.js`),[]))}],Bf=Object.fromEntries(zf.map(e=>[e.id,e.import])),Vf=Object.fromEntries(zf.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Hf={...Bf,...Vf},Uf=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Wf(e){return Gf(e)}function Gf(e){return Array.isArray(e)?Kf(e):e instanceof RegExp?e:typeof e==`object`?qf(e):e}function Kf(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Gf(e[n]);return t}function qf(e){let t={};for(let n in e)t[n]=Gf(e[n]);return t}function Jf(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Yf(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Yf(e.substring(0,e.length-1)):e.substr(~t+1)}var Xf=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Zf=class{static hasCaptures(e){return e!==null&&(Xf.lastIndex=0,Xf.test(e))}static replaceCaptures(e,t,n){return e.replace(Xf,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Qf(e,t){return e<t?-1:+(e>t)}function $f(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Qf(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function ep(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 tp(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var np=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},rp=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(cp(e),t)}static createFromParsedTheme(e,t){return dp(e,t)}_cachedMatchRoot=new np(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>ap(e.parent,t.parentScopes));return n?new sp(n.fontStyle,n.foreground,n.background):null}},ip=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function ap(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!op(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function op(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var sp=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function cp(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&ep(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&ep(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new lp(l,u,e,o,s,c)}}return n}var lp=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},up=(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))(up||{});function dp(e,t){e.sort((e,t)=>{let n=Qf(e.scope,t.scope);return n!==0||(n=$f(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new fp(t),o=new sp(n,a.getId(r),a.getId(i)),s=new hp(new mp(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new rp(a,o,s)}var fp=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},pp=Object.freeze([]),mp=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||pp,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},hp=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),mp.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if($f(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new mp(e,t,n,r,i))}},gp=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=vp(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function _p(e){return e}function vp(e){return e}function yp(e,t){let n=[],r=xp(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(bp(i)){let e=[];do e.push(i),i=r.next();while(bp(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function bp(e){return!!e&&!!e.match(/[\w\.:]+/)}function xp(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Sp(e){typeof e.dispose==`function`&&e.dispose()}var Cp=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},wp=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Tp=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Ep=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Cp(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Tp;for(let n of e)Dp(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Cp){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Dp(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Cp?kp({baseGrammar:a,selfGrammar:i},r):Op(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Cp(e))}function Op(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Ap([r],t,n)}}function kp(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ap(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ap(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ap(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Jf({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ap(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Ip(i);switch(a.kind){case 0:kp({...t,selfGrammar:t.baseGrammar},n);break;case 1:kp(t,n);break;case 2:Op(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Op(a.ruleName,i,n):kp(i,n)}else a.kind===4?n.add(new wp(a.scopeName,a.ruleName)):n.add(new Cp(a.scopeName))}}}var jp=class{kind=0},Mp=class{kind=1},Np=class{constructor(e){this.ruleName=e}kind=2},Pp=class{constructor(e){this.scopeName=e}kind=3},Fp=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Ip(e){if(e===`$base`)return new jp;if(e===`$self`)return new Mp;let t=e.indexOf(`#`);return t===-1?new Pp(e):t===0?new Np(e.substring(1)):new Fp(e.substring(0,t),e.substring(t+1))}var Lp=/\\(\d+)/,Rp=/\\(\d+)/g,zp=-1,Bp=-2;function Vp(e){return e}function Hp(e){return e}var Up=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Zf.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Zf.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Yf(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:Zf.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Zf.replaceCaptures(this._contentName,e,t)}},Wp=class extends Up{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Gp=class extends Up{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Xp(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Zp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Kp=class extends Up{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Zp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qp=class extends Up{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Xp(i,this.id),this.beginCaptures=a,this._end=new Xp(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Zp;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Jp=class extends Up{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Xp(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Xp(o,Bp),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Zp;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Zp,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Yp=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Wp(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Gp(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Jf({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Kp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Jp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new qp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Ip(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Kp||e instanceof qp||e instanceof Jp)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Xp=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Lp.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Rp.lastIndex=0,this.source.replace(Rp,(e,t)=>tp(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Zp=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Qp(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Qp(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Qp=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
30
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function pd(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=zu);let l=md(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!od(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!ed(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function md(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=hd(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function hd(e,t,n){let r=Ete(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Ku(r.attribute,Object.assign({},e.settings.characterReferences,{subset:fd.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Qte:$te)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Ku(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:fd.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&qu(n,o)>qu(n,e.alternative)&&(o=e.alternative),s=o+Ku(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?fd.single:fd.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var gd=[`<`,`&`];function _d(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Ku(e.value,Object.assign({},r.settings.characterReferences,{subset:gd}))}function vd(e,t,n,r){return r.settings.allowDangerousHtml?e.value:_d(e,t,n,r)}function yd(e,t,n,r){return r.all(e)}var bd=Ate(`type`,{invalid:xd,unknown:Sd,handlers:{comment:Xte,doctype:Zte,element:pd,raw:vd,root:yd,text:_d}});function xd(e){throw Error("Expected node, not `"+e+"`")}function Sd(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Cd={},wd={},Td=[];function Ed(e,t){let n=t||Cd,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Dd,all:Od,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||pu,characterReferences:n.characterReferences||wd,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?zu:kte,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Dd(e,t,n){return bd(e,t,n,this)}function Od(e){let t=[],n=e&&e.children||Td,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var kd=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),Zc(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||el(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!r&&!i||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;(t!=null||n!=null||r!=null||a!=null||i!=null)&&(this.options.onGutterUtilityClick!=null&&fu(e.composedPath())||(Jd(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e})))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;t===`disabled`&&!o&&n==null&&r==null&&i==null&&a==null||(Jd(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(Jd(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){Jd(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();Jd(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);Jd(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=Pd(i)&&this.hoveredLine?.lineElement===i.lineElement;Nd(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),Nd(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Pd(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(Id(i)&&p!=null){p(i);break}if(Fd(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!Pd(i))break;Nd(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,Jd(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),Jd(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),Jd(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();fu(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(du(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=Ed(uu());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);Md(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(zd(t));if(Md(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(Md(n)&&!(t&&!n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(Md(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&fu(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=zd(e);if(t&&fu(n))return;let r=Bd(e);return r==null?this.pathFromAnnotationSlot(e):zd(r)}pathFromAnnotationSlot(e){let t=Hd(Vd(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:zd(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=Ud(t)?t:Ud(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}el(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,Xc(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{Zc(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!Gd(this.renderedSelectedLinesState,n),i=!Gd(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);Ld(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=qd(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=qd(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:Rd(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:Rd(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Kd(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Kd(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function Ad({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:jd({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function jd({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function Md(e){return e!=null&&`kind`in e&&e.kind===`line`}function Nd(e){return e!=null&&`kind`in e&&e.kind===`token`}function Pd(e){return Md(e)||Nd(e)}function Fd(e){return`type`in e&&e.type===`line-info`}function Id(e){return`kind`in e&&e.kind===`merge-conflict-action`}function Ld(e){return e===`current`||e===`incoming`||e===`both`}function Rd(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function zd(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function Bd(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function Vd(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function Hd(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(!(!Number.isFinite(n)||n<=0))return{lineNumber:n,side:t[1]}}function Ud(e){return e!=null&&typeof e.elementFromPoint==`function`}function Wd(e,t){return e===t||el(e??void 0,t??void 0)}function Gd(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&Wd(e?.range??null,t.range)}function Kd(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function qd(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function Jd(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}console.log(...n)}var Yd=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),Qd(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^-?\d+,-?\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?tf(t):nf(t);o.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:Xd(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:Zd(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&$d(t,{codeWidthChanged:i,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function Xd(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function Zd(e){return Math.max(Math.ceil(e),0)}function Qd(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?$d(e,{codeWidthChanged:!0,numberWidthChanged:!0}):ef(e))}function $d(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function ef(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function tf(e){e.codeElement.isConnected&&ef(e)}function nf(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}var rf=new Map,af=new Map,of=new Map,sf=new Set;function cf(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!sf.has(t))return!1;return!0}function lf(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(sf.has(n.name))continue;let e=rf.get(n.name);e??(e=n,rf.set(n.name,e)),sf.add(e.name),t.loadLanguageSync(e.data)}}function uf(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var df=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ff(){return 2147483648}function pf(){return typeof performance<`u`?performance.now():Date.now()}var mf=(e,t)=>e+(t-e%t)%t;async function hf(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=ff();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,mf(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:pf,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var gf=Object.defineProperty,_f=(e,t,n)=>t in e?gf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vf=(e,t,n)=>_f(e,typeof t==`symbol`?t:t+``,n),yf=null;function bf(e){throw new df(e.UTF8ToString(e.getLastOnigError()))}var xf=class e{constructor(t){vf(this,`utf16Length`),vf(this,`utf8Length`),vf(this,`utf16Value`),vf(this,`utf8Value`),vf(this,`utf16OffsetToUtf8`),vf(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},Sf=class e{constructor(t){if(vf(this,`id`,++e.LAST_ID),vf(this,`_onigBinding`),vf(this,`content`),vf(this,`utf16Length`),vf(this,`utf8Length`),vf(this,`utf16OffsetToUtf8`),vf(this,`utf8OffsetToUtf16`),vf(this,`ptr`),!yf)throw new df(`Must invoke loadWasm first.`);this._onigBinding=yf,this.content=t;let n=new xf(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=yf.omalloc(1e4),e._sharedPtrInUse=!0,yf.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(yf)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};vf(Sf,`LAST_ID`,0),vf(Sf,`_sharedPtr`,0),vf(Sf,`_sharedPtrInUse`,!1);var Cf=Sf,wf=class{constructor(e){if(vf(this,`_onigBinding`),vf(this,`_ptr`),!yf)throw new df(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new xf(e[r]);t[r]=i.createString(yf),n[r]=i.utf8Length}let r=yf.omalloc(4*e.length);yf.HEAPU32.set(t,r/4);let i=yf.omalloc(4*e.length);yf.HEAPU32.set(n,i/4);let a=yf.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)yf.ofree(t[n]);yf.ofree(i),yf.ofree(r),a===0&&bf(yf),this._onigBinding=yf,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new Cf(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function Tf(e){return typeof e.instantiator==`function`}function Ef(e){return typeof e.default==`function`}function Df(e){return e.data!==void 0}function Of(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}var Af;function jf(e){if(Af)return Af;async function t(){yf=await hf(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Tf(n)?n=await n.instantiator(t):Ef(n)?n=await n.default(t):(Df(n)&&(n=n.data),Of(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Nf(n)(t):await Pf(n)(t):kf(n)||n instanceof WebAssembly.Module?n=await Mf(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Mf(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Af=t(),Af}function Mf(e){return t=>WebAssembly.instantiate(e,t)}function Nf(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Pf(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function Ff(e){return e&&await jf(e),{createScanner(e){return new wf(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Cf(e)}}}var If=`modulepreload`,Lf=function(e){return`/`+e},Rf={},Z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Lf(t,n),t=s(t),t in Rf)return;Rf[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:If,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},zf=[{id:`abap`,name:`ABAP`,import:(()=>Z(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>Z(()=>import(`./actionscript-3-Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>Z(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>Z(()=>import(`./ahk-CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>Z(()=>import(`./ahk2-_6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>Z(()=>import(`./angular-html-yY3ygMZZ.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>Z(()=>import(`./angular-ts-CfoJFBTQ.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>Z(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>Z(()=>import(`./apex-KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>Z(()=>import(`./apl-DT7k7bw4.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>Z(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>Z(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>Z(()=>import(`./asciidoc-SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>Z(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>Z(()=>import(`./astro-CJZXIXFd.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>Z(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>Z(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>Z(()=>import(`./bat-qdxAdBWQ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>Z(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>Z(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>Z(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>Z(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>Z(()=>import(`./bird2-CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>Z(()=>import(`./blade-D9JiJjrS.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>Z(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>Z(()=>import(`./c-D0Y9hqRQ.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>Z(()=>import(`./c3-D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>Z(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>Z(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>Z(()=>import(`./chapel-D7yn7jxF.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>Z(()=>import(`./clarity-CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>Z(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>Z(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>Z(()=>import(`./cobol-ON3ke5xj.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>Z(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>Z(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>Z(()=>import(`./coffee-BYtoZsQ6.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>Z(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>Z(()=>import(`./coq-DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>Z(()=>import(`./cpp-ksKJapDi.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>Z(()=>import(`./crystal-2UizyKGm.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>Z(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>Z(()=>import(`./css-BiY6DdoY.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>Z(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>Z(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>Z(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>Z(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>Z(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>Z(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>Z(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>Z(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>Z(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>Z(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>Z(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>Z(()=>import(`./edge-CQXgfN6f.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>Z(()=>import(`./elixir-Bq5Vdfdz.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>Z(()=>import(`./elm-Drj2uRJz.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>Z(()=>import(`./emacs-lisp-c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>Z(()=>import(`./erb-DR5atT5u.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>Z(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>Z(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>Z(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>Z(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>Z(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>Z(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>Z(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>Z(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>Z(()=>import(`./gdscript-DYvRD3hg.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>Z(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>Z(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>Z(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>Z(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>Z(()=>import(`./git-rebase-qqDOUY4y.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>Z(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>Z(()=>import(`./glimmer-js-swrKPqN7.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>Z(()=>import(`./glimmer-ts-B2b_vXqT.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>Z(()=>import(`./glsl-CuJlzsa0.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>Z(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>Z(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>Z(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>Z(()=>import(`./graphql-N5XL4Igl.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>Z(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>Z(()=>import(`./hack-DAjYMpAQ.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>Z(()=>import(`./haml-bCL8XrBO.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>Z(()=>import(`./handlebars-DHKgZM6S.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>Z(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>Z(()=>import(`./haxe-C8oCnwJJ.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>Z(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>Z(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>Z(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>Z(()=>import(`./html-C_jnzgd_.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>Z(()=>import(`./html-derivative-BpHLgdTe.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>Z(()=>import(`./http-C9gOztuo.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>Z(()=>import(`./hurl-BXoVnMal.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>Z(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>Z(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>Z(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>Z(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>Z(()=>import(`./java-ChvIR-vI.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>Z(()=>import(`./javascript-BtM5a1-k.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>Z(()=>import(`./jinja-pvNd4qzh.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>Z(()=>import(`./jison-sfvdVpT7.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>Z(()=>import(`./json-CNZpiPKJ.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>Z(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>Z(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>Z(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>Z(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>Z(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>Z(()=>import(`./jsx-DZDMTAk_.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>Z(()=>import(`./julia-BL7qk1iT.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>Z(()=>import(`./just-uod8WSY3.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65])))},{id:`kdl`,name:`KDL`,import:(()=>Z(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>Z(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>Z(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>Z(()=>import(`./latex-dpi8HpbG.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>Z(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>Z(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>Z(()=>import(`./liquid-BawoDryy.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>Z(()=>import(`./llvm-DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>Z(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>Z(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>Z(()=>import(`./lua-DWiK1E2i.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>Z(()=>import(`./luau-C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>Z(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>Z(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>Z(()=>import(`./marko-BXkudM8D.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>Z(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>Z(()=>import(`./mdc-Bmg-n7wg.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>Z(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>Z(()=>import(`./mermaid-BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>Z(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>Z(()=>import(`./mojo-fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>Z(()=>import(`./moonbit-DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>Z(()=>import(`./move-BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>Z(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>Z(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>Z(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>Z(()=>import(`./nginx-6CyLwTv5.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>Z(()=>import(`./nim-qQvA9F3H.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>Z(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>Z(()=>import(`./nsis-CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>Z(()=>import(`./nushell-DHYfO66s.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>Z(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>Z(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>Z(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>Z(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>Z(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>Z(()=>import(`./org-CZPJg31I.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93])))},{id:`pascal`,name:`Pascal`,import:(()=>Z(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>Z(()=>import(`./perl-BHwT64Dn.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>Z(()=>import(`./php-D8NTgrbg.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>Z(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>Z(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>Z(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>Z(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>Z(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>Z(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>Z(()=>import(`./powershell-CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>Z(()=>import(`./prisma-DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>Z(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>Z(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>Z(()=>import(`./pug-BVUwFWbq.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>Z(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>Z(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>Z(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>Z(()=>import(`./qml-CLSmNp_i.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>Z(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>Z(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>Z(()=>import(`./r-EIHOgDPx.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>Z(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>Z(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>Z(()=>import(`./razor-BPii5bUu.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>Z(()=>import(`./rbs-C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>Z(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>Z(()=>import(`./regexp-CWI8pQZM.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>Z(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>Z(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>Z(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>Z(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>Z(()=>import(`./rst-IDb7GnpL.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>Z(()=>import(`./ruby-JHA-t8UR.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>Z(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>Z(()=>import(`./sas-Dlys6wEq.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>Z(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>Z(()=>import(`./scala-BiFt_7mu.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>Z(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>Z(()=>import(`./scss-DQ3TetHN.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>Z(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>Z(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>Z(()=>import(`./shellscript-DZ2dKShG.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>Z(()=>import(`./shellsession-CCP03ZF7.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>Z(()=>import(`./smalltalk-BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>Z(()=>import(`./smithy-Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>Z(()=>import(`./solidity-Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>Z(()=>import(`./soy-e3nnrv7u.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>Z(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>Z(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>Z(()=>import(`./sql-CkwaWr-O.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>Z(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>Z(()=>import(`./stata-COrW6kNx.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>Z(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>Z(()=>import(`./surrealql-CYe8f-Bp.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>Z(()=>import(`./svelte-CuoMH8V_.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>Z(()=>import(`./swift-CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>Z(()=>import(`./system-verilog-Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>Z(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>Z(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>Z(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>Z(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>Z(()=>import(`./templ-BaMURml8.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>Z(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>Z(()=>import(`./tex-Clsc8t8H.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>Z(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>Z(()=>import(`./ts-tags-BAg5C1ub.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>Z(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>Z(()=>import(`./tsx-rMIupNhm.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>Z(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>Z(()=>import(`./twig-DqwvPhpg.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>Z(()=>import(`./typescript-3GSK8yFX.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>Z(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>Z(()=>import(`./typst-CGKkM3pT.js`),__vite__mapDeps([112,2,3,1,5,8,7,9,11,13,113,114,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,44,48,50,81,82,54,83,115,63,62,65,66,67,70,116,84,85,87,88,89,90,91,93,117,94,118,119,111,120])))},{id:`v`,name:`V`,import:(()=>Z(()=>import(`./v-DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>Z(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>Z(()=>import(`./vb-DOwzaHZ0.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>Z(()=>import(`./verilog-B2gwz-sJ.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>Z(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>Z(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>Z(()=>import(`./vue-DcXRtF34.js`),__vite__mapDeps([121,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>Z(()=>import(`./vue-html-BIR8K8bh.js`),__vite__mapDeps([122,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>Z(()=>import(`./vue-vine-IEgILria.js`),__vite__mapDeps([123,2,3,5,12,70,124])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>Z(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>Z(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>Z(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>Z(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>Z(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>Z(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>Z(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>Z(()=>import(`./xml-CIHnIn95.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>Z(()=>import(`./xsl-CaZZ2eEQ.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>Z(()=>import(`./yaml-Dj6iHQsO.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>Z(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>Z(()=>import(`./zig-CMLA9XwU.js`),[]))}],Bf=Object.fromEntries(zf.map(e=>[e.id,e.import])),Vf=Object.fromEntries(zf.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Hf={...Bf,...Vf},Uf=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Wf(e){return Gf(e)}function Gf(e){return Array.isArray(e)?Kf(e):e instanceof RegExp?e:typeof e==`object`?qf(e):e}function Kf(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Gf(e[n]);return t}function qf(e){let t={};for(let n in e)t[n]=Gf(e[n]);return t}function Jf(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Yf(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Yf(e.substring(0,e.length-1)):e.substr(~t+1)}var Xf=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Zf=class{static hasCaptures(e){return e!==null&&(Xf.lastIndex=0,Xf.test(e))}static replaceCaptures(e,t,n){return e.replace(Xf,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Qf(e,t){return e<t?-1:+(e>t)}function $f(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Qf(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function ep(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 tp(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var np=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},rp=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(cp(e),t)}static createFromParsedTheme(e,t){return dp(e,t)}_cachedMatchRoot=new np(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>ap(e.parent,t.parentScopes));return n?new sp(n.fontStyle,n.foreground,n.background):null}},ip=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function ap(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!op(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function op(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var sp=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function cp(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&ep(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&ep(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new lp(l,u,e,o,s,c)}}return n}var lp=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},up=(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))(up||{});function dp(e,t){e.sort((e,t)=>{let n=Qf(e.scope,t.scope);return n!==0||(n=$f(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new fp(t),o=new sp(n,a.getId(r),a.getId(i)),s=new hp(new mp(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new rp(a,o,s)}var fp=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},pp=Object.freeze([]),mp=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||pp,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},hp=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),mp.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if($f(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new mp(e,t,n,r,i))}},gp=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=vp(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function _p(e){return e}function vp(e){return e}function yp(e,t){let n=[],r=xp(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(bp(i)){let e=[];do e.push(i),i=r.next();while(bp(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function bp(e){return!!e&&!!e.match(/[\w\.:]+/)}function xp(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Sp(e){typeof e.dispose==`function`&&e.dispose()}var Cp=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},wp=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Tp=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Ep=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Cp(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Tp;for(let n of e)Dp(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Cp){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function Dp(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Cp?kp({baseGrammar:a,selfGrammar:i},r):Op(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new Cp(e))}function Op(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Ap([r],t,n)}}function kp(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ap(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ap(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ap(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Jf({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ap(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=Ip(i);switch(a.kind){case 0:kp({...t,selfGrammar:t.baseGrammar},n);break;case 1:kp(t,n);break;case 2:Op(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Op(a.ruleName,i,n):kp(i,n)}else a.kind===4?n.add(new wp(a.scopeName,a.ruleName)):n.add(new Cp(a.scopeName))}}}var jp=class{kind=0},Mp=class{kind=1},Np=class{constructor(e){this.ruleName=e}kind=2},Pp=class{constructor(e){this.scopeName=e}kind=3},Fp=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function Ip(e){if(e===`$base`)return new jp;if(e===`$self`)return new Mp;let t=e.indexOf(`#`);return t===-1?new Pp(e):t===0?new Np(e.substring(1)):new Fp(e.substring(0,t),e.substring(t+1))}var Lp=/\\(\d+)/,Rp=/\\(\d+)/g,zp=-1,Bp=-2;function Vp(e){return e}function Hp(e){return e}var Up=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Zf.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Zf.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Yf(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:Zf.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Zf.replaceCaptures(this._contentName,e,t)}},Wp=class extends Up{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Gp=class extends Up{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Xp(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Zp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Kp=class extends Up{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Zp,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},qp=class extends Up{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Xp(i,this.id),this.beginCaptures=a,this._end=new Xp(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Zp;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Jp=class extends Up{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Xp(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Xp(o,Bp),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Zp;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Zp,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},Yp=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Wp(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Gp(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Jf({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Kp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Jp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new qp(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=Ip(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Kp||e instanceof qp||e instanceof Jp)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Xp=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&Lp.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return Rp.lastIndex=0,this.source.replace(Rp,(e,t)=>tp(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Zp=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Qp(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Qp(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Qp=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
31
31
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},$p=class{constructor(e,t){this.languageId=e,this.tokenType=t}},em=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new $p(e,8),this._embeddedLanguagesMatcher=new tm(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new $p(0,0);_getBasicScopeAttributes=new np(e=>new $p(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},tm=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>tp(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var nm=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function rm(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=im(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new nm(i,!0);f()}return new nm(i,!1);function f(){let o=am(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===zp){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),um(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof qp){let r=o;um(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Jp){let r=o;um(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(um(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function im(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Jp&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=lm(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Bp){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),um(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function am(e,t,n,r,i,a){let o=om(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=sm(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function om(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=cm(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function sm(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=cm(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function cm(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function lm(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function um(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));rm(e,p,n&&d.start===0,d.start,f,i,!1,0),Sp(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new dm(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var dm=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function fm(e,t,n,r,i,a,o,s){return new gm(e,t,n,r,i,a,o,s)}function pm(e,t,n,r,i){let a=yp(t,mm),o=Yp.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function mm(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(hm(t[r],e))return n=r+1,!0;return!1})}function hm(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var gm=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new em(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=_m(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=yp(e,mm);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)pm(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&pm(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(Vp(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Hp(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=_m(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Yp.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===ym.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=gp.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?vm.createRootAndLookUpScopeName(a,r,this):vm.createRoot(`unknown`,r),t=new ym(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
32
32
|
`;let a=this.createOnigString(e),o=a.content.length,s=new xm(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=rm(this,a,i,0,t,s,!0,r);return Sp(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function _m(e,t){return e=Wf(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 vm=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=ip.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new ip(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new ip(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),gp.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},ym=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?vm.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Hp(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=vm.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Vp(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,vm.fromExtension(r,n.contentNameScopesList))}},bm=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):yp(e,mm).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>yp(e,mm).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},xm=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=gp.set(n,0,_p(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=gp.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},Sm=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,fm(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Cm=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Sm(rp.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(rp.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new bm(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Ep(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},wm=ym.NULL;function Tm(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function Em(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Dm(e){return Array.isArray(e)?e:[e]}async function Om(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function km(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Am(e){return e===`ansi`||km(e)}function jm(e){return e===`none`}function Mm(e){return jm(e)}var Nm=/(\r?\n)/g;function Pm(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Nm),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Fm={light:`#333333`,dark:`#bbbbbb`},Im={light:`#fffffe`,dark:`#1e1e1e`},Lm=`__shiki_resolved`;function Rm(e){if(e?.[Lm])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?Fm.light:Fm.dark,n||=t.type===`light`?Im.light:Im.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Lm,{enumerable:!1,writable:!1,value:!0}),t}async function zm(e){return[...new Set((await Promise.all(e.filter(e=>!Am(e)).map(async e=>await Om(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Bm(e){return(await Promise.all(e.map(async e=>Mm(e)?null:Rm(await Om(e))))).filter(e=>!!e)}function Vm(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Uf(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Hm=class extends Cm{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Rm(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=rp.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Vm(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new Uf(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Um=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Wm=0;function Gm(e){Wm+=1,e.warnings!==!1&&Wm>=10&&Wm%10==0&&console.warn(`[Shiki] ${Wm} 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 Uf("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Rm),i=new Hm(new Um(e.engine,n),r,n,e.langAlias),a;function o(t){return Vm(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Uf(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new Uf(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await zm(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Bm(e))}function g(){if(t)throw new Uf(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Wm)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Km(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Bm(e.themes||[]),zm(e.langs||[]),e.engine]);return Gm({...e,themes:t,langs:n,engine:r})}var qm=new WeakMap;function Jm(e,t){qm.set(e,t)}function Ym(e){return qm.get(e)}var Xm=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Dm(n).map(e=>[e,wm])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Zm(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Zm(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function Qm(e,t){if(!(e instanceof Xm))throw new Uf(`Invalid grammar state`);return e.getInternalStack(t)}var $m=/,/,eh=/ /;function th(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(km(e.resolveLangAlias(n.lang||`text`))||jm(r))return Pm(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new Uf(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Uf(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return rh(t,o,i,a,n)}function nh(...e){if(e.length===2)return Ym(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(km(i)||jm(a))throw new Uf(`Plain language does not have grammar state`);if(i===`ansi`)throw new Uf(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Xm(ih(n,c,o,s,r).stateStack,c.name,o.name)}function rh(e,t,n,r,i){let a=ih(e,t,n,r,i),o=new Xm(a.stateStack,t.name,n.name);return Jm(a.tokens,o),a.tokens}function ih(e,t,n,r,i){let a=Tm(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Pm(e),u=i.grammarState?Qm(i.grammarState,n.name)??wm:i.grammarContextCode==null?wm:ih(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=Em(r[gp.getForeground(s)],a),u=gp.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=gp.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split($m).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(eh))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?ah(t.scopes):oh(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function ah(e){return e.map(e=>({scopeName:e}))}function oh(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:lh(e,i,t.slice(0,r))}}return n}function sh(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function ch(e,t,n){if(!sh(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)sh(e[r],n[i])&&--r,--i;return r===-1}function lh(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(ch(e,t,n)){r.push(a);break}return r}function uh(e,t,n,r=th){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Ym(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=dh(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new Xm(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Jm(s,c),s}function dh(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var fh=/\s+/g;function ph(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(fh)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(fh);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function mh(e){let t=Pm(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}var hh=[`color`,`background-color`];function gh(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function _h(e,t){let n=0,r=e.length;for(;n<r;){let i=n+(r-n>>1);e[i]<=t?n=i+1:r=i}return n}function vh(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=e.offset+e.content.length,r=_h(n,e.offset),i=r;for(;i<n.length&&n[i]<t;)i++;if(r===i)return e;let a=n.slice(r,i);for(let t=0;t<a.length;t++)a[t]-=e.offset;return gh(e,a)})):e}function yh(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>bh(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&hh.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new Uf('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function bh(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&up.Italic&&(t[`font-style`]=`italic`),e.fontStyle&up.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&up.Underline&&n.push(`underline`),e.fontStyle&up.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function xh(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function Sh(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=mh(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new Uf(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new Uf(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new Uf(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));Ch(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return vh(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new Uf(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=wh(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new Uf(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new Uf(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&ph(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function Ch(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new Uf(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new Uf(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function wh(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(wh).join(``):``}var Th=[Sh()];function Eh(e){let t=Dh(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Th]}function Dh(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Oh=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],kh={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Ah(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function jh(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Mh(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)kh[r]&&t.push({type:`setDecoration`,value:kh[r]});else if(r<=29){let e=kh[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:Oh[r-30]}});else if(r===38){let n=jh(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:Oh[r-40]}});else if(r===48){let n=jh(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:Oh[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Oh[r-100+8]}})}}return t}function Nh(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Ah(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Mh(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Ph={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 Fh(e=Ph){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<Oh.length;e++)r.push(t(Oh[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Ih=/#([0-9a-f]{3,8})/i,Lh=/var\((--[\w-]+-ansi-[\w-]+)\)/,Rh={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 zh(e,t,n){let r=Tm(e,n),i=Pm(t),a=Fh(Object.fromEntries(Oh.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Rh[t]]}))),o=Nh();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=Em(i,r),o=Em(o,r),n.decorations.has(`dim`)&&(i=Bh(i));let s=up.None;return n.decorations.has(`bold`)&&(s|=up.Bold),n.decorations.has(`italic`)&&(s|=up.Italic),n.decorations.has(`underline`)&&(s|=up.Underline),n.decorations.has(`strikethrough`)&&(s|=up.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Bh(e){let t=e.match(Ih);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(Lh);return n?`var(${n[1]}-dim)`:e}function Vh(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!km(r)&&!jm(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return zh(r,t,n)}return th(e,t,n)}function Hh(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new Uf("`themes` option must not be empty");let p=uh(e,t,n,Vh);if(c=Ym(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new Uf(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>yh(e,h,u,l,d))),c&&Jm(a,c);let g=f.map(e=>Tm(e.theme,n));i=Uh(f,m,g,u,l,`fg`,d),r=Uh(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Tm(n.theme,n);a=Vh(e,t,n);let l=e.getTheme(n.theme);r=Em(l.bg,s),i=Em(l.fg,s),o=l.name,c=Ym(a)}else throw new Uf("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Uh(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=Em(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new Uf('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Em(t[r][a],n[r])||`inherit`}, ${Em(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var Wh=/^\s+$/,pne=/^(\s*)(.*?)(\s*)$/;function Gh(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Gh(e,t,n),codeToTokens:(t,n)=>Hh(e,t,n)}){let i=t;for(let e of Eh(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Hh(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=hne(a):d===`never`&&(a=gne(a)),f&&(a=_ne(a));let p={...r,get source(){return i}};for(let e of Eh(n))a=e.tokens?.call(p,a)||a;return mne(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function mne(e,t,n,r=Ym(e)){let i=Eh(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:ph,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
33
33
|
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=xh(a.htmlStyle||bh(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&Jm(m,r),m}function hne(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&up.Underline||i.fontStyle&up.Strikethrough));o&&Wh.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function gne(e){return e.map(e=>e.flatMap(e=>{if(Wh.test(e.content))return e;let t=e.content.match(pne);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function _ne(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=xh(e.htmlStyle||bh(e)),i=xh(n.htmlStyle||bh(n)),a=e.fontStyle&&(e.fontStyle&up.Underline||e.fontStyle&up.Strikethrough),o=n.fontStyle&&(n.fontStyle&up.Underline||n.fontStyle&up.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Kh=Ed;function vne(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Gh(e,t,n),codeToTokens:(t,n)=>Hh(e,t,n)},i=Kh(Gh(e,t,n,r));for(let e of Eh(n))i=e.postprocess?.call(r,i,n)||i;return i}async function yne(e){let t=await Km(e);return{getLastGrammarState:(...e)=>nh(t,...e),codeToTokensBase:(e,n)=>Vh(t,e,n),codeToTokensWithThemes:(e,n)=>uh(t,e,n),codeToTokens:(e,n)=>Hh(t,e,n),codeToHast:(e,n)=>Gh(t,e,n),codeToHtml:(e,n)=>vne(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function bne(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,Am(n))return[];let r=t[n];if(!r)throw new Uf(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(Mm(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new Uf(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await yne({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}var qh=4294967295,xne=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:qh,end:qh,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function Jh(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Sne(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var Yh=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),Xh=String.raw;function Zh(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Qh=Xh`\[\^?`,$h=`c.? | C(?:-.?)?|${Xh`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Xh`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Xh`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Xh`o\{[^\}]*\}?`}|${Xh`\d{1,3}`}`,eg=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,tg=new RegExp(Xh`
|
|
@@ -2129,7 +2129,7 @@ XID_Start XIDS`.split(/\s/).map(e=>[Mg(e),e])),Tre=new Map([[`s`,t_(383)],[t_(38
|
|
|
2129
2129
|
\${}
|
|
2130
2130
|
}`,{label:`interface`,detail:`definition`,type:`keyword`}),uk("type ${name} = ${type}",{label:`type`,detail:`definition`,type:`keyword`}),uk(`enum \${name} {
|
|
2131
2131
|
\${}
|
|
2132
|
-
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),jP=new v,MP=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function NP(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var PP=[`FunctionDeclaration`],FP={FunctionDeclaration:NP(`function`),ClassDeclaration:NP(`class`),ClassExpression:()=>!0,EnumDeclaration:NP(`constant`),TypeAliasDeclaration:NP(`type`),NamespaceDeclaration:NP(`namespace`),VariableDefinition(e,t){e.matchContext(PP)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function IP(e,t){let n=jP.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(g.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=FP[t.name];if(e&&e(t,a)||MP.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of IP(e,t.node))r.push(n);return!1}}),jP.set(t,r),r}var LP=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,RP=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function zP(e){let n=t(e.state).resolveInner(e.pos,-1);if(RP.indexOf(n.name)>-1)return null;let r=n.name==`VariableName`||n.to-n.from<20&&LP.test(e.state.sliceDoc(n.from,n.to));if(!r&&!e.explicit)return null;let i=[];for(let t=n;t;t=t.parent)MP.has(t.name)&&(i=i.concat(IP(e.state.doc,t)));return{options:i,from:r?n.from:e.pos,validFor:LP}}var BP=Ne.define({name:`javascript`,parser:DP.configure({props:[r.add({IfStatement:Se({except:/^\s*({|else\b)/}),TryStatement:Se({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:ne,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:pe({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":Se({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),He.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":ze,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),VP={test:e=>/^JSX/.test(e.name),facet:he({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},HP=BP.configure({dialect:`ts`},`typescript`),UP=BP.configure({dialect:`jsx`,props:[h.add(e=>e.isTop?[VP]:void 0)]}),WP=BP.configure({dialect:`jsx ts`,props:[h.add(e=>e.isTop?[VP]:void 0)]},`typescript`),GP=e=>({label:e,type:`keyword`}),KP=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(GP),qP=KP.concat([`declare`,`implements`,`private`,`protected`,`public`].map(GP));function JP(e={}){let t=e.jsx?e.typescript?WP:UP:e.typescript?HP:BP,n=e.typescript?AP.concat(qP):kP.concat(KP);return new Le(t,[BP.data.of({autocomplete:NO(RP,MO(n))}),BP.data.of({autocomplete:zP}),e.jsx?QP:[]])}function YP(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function XP(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var ZP=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),QP=C.inputHandler.of((e,n,r,i,a)=>{if((ZP?e.composing:e.compositionStarted)||e.state.readOnly||n!=r||i!=`>`&&i!=`/`||!BP.isActiveAt(e.state,n,-1))return!1;let o=a(),{state:s}=o,c=s.changeByRange(e=>{let{head:n}=e,r=t(s).resolveInner(n-1,-1),a;if(r.name==`JSXStartTag`&&(r=r.parent),!(s.doc.sliceString(n-1,n)!=i||r.name==`JSXAttributeValue`&&r.to>n)){if(i==`>`&&r.name==`JSXFragmentTag`)return{range:e,changes:{from:n,insert:`</>`}};if(i==`/`&&r.name==`JSXStartCloseTag`){let e=r.parent,t=e.parent;if(t&&e.from==n-2&&((a=XP(s.doc,t.firstChild,n))||t.firstChild?.name==`JSXFragmentTag`)){let e=`${a}>`;return{range:Te.cursor(n+e.length,-1),changes:{from:n,insert:e}}}}else if(i==`>`){let t=YP(r);if(t&&t.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(s.doc.sliceString(n,n+2))&&(a=XP(s.doc,t,n)))return{range:e,changes:{from:n,insert:`</${a}>`}}}}return{range:e}});return!c.changes.empty&&(e.dispatch([o,s.update(c,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),$P=Ke({autoCloseTags:()=>jF,html:()=>OF,htmlCompletionSource:()=>xF,htmlCompletionSourceWith:()=>SF,htmlLanguage:()=>DF}),eF=[`_blank`,`_self`,`_top`,`_parent`],tF=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],nF=[`get`,`post`,`put`,`delete`],rF=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],iF=[`true`,`false`],aF={},oF={a:{attrs:{href:null,ping:null,type:null,media:null,target:eF,hreflang:null}},abbr:aF,address:aF,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:aF,aside:aF,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:aF,base:{attrs:{href:null,target:eF}},bdi:aF,bdo:aF,blockquote:{attrs:{cite:null}},body:aF,br:aF,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:rF,formmethod:nF,formnovalidate:[`novalidate`],formtarget:eF,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:aF,center:aF,cite:aF,code:aF,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:aF,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:aF,div:aF,dl:aF,dt:aF,em:aF,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:aF,figure:aF,footer:aF,form:{attrs:{action:null,name:null,"accept-charset":tF,autocomplete:[`on`,`off`],enctype:rF,method:nF,novalidate:[`novalidate`],target:eF}},h1:aF,h2:aF,h3:aF,h4:aF,h5:aF,h6:aF,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:aF,hgroup:aF,hr:aF,html:{attrs:{manifest:null}},i:aF,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:rF,formmethod:nF,formnovalidate:[`novalidate`],formtarget:eF,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:aF,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:aF,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:aF,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:tF,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:aF,noscript:aF,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:aF,param:{attrs:{name:null,value:null}},pre:aF,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:aF,rt:aF,ruby:aF,samp:aF,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:tF}},section:aF,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:aF,source:{attrs:{src:null,type:null,media:null}},span:aF,strong:aF,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:aF,summary:aF,sup:aF,table:aF,tbody:aF,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:aF,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:aF,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:aF,time:{attrs:{datetime:null}},title:aF,tr:aF,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:aF,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:aF},sF={accesskey:null,class:null,contenteditable:iF,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:iF,autocorrect:iF,autocapitalize:iF,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":iF,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":iF,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":iF,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":iF,"aria-hidden":iF,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":iF,"aria-multiselectable":iF,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":iF,"aria-relevant":null,"aria-required":iF,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},cF=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of cF)sF[e]=null;var lF=class{constructor(e,t){this.tags={...oF,...e},this.globalAttrs={...sF,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};lF.default=new lF;function uF(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function dF(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`){if(t)t=!1;else return e}return null}function fF(e,t,n){return n.tags[uF(e,dF(t))]?.children||n.allTags}function pF(e,t){let n=[];for(let r=dF(t);r&&!r.type.isTop;r=dF(r.parent)){let i=uF(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var mF=/^[:\-\.\w\u00b7-\uffff]*$/;function hF(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=dF(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:fF(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(pF(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function gF(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:pF(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:mF}}function _F(e,t,n,r){let i=[],a=0;for(let r of fF(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of pF(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function vF(e,t,n,r,i){let a=dF(n),o=a?t.tags[uF(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:mF}}function yF(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=dF(n),i=r?t.tags[uF(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function bF(e,n){let{state:r,pos:i}=n,a=t(r).resolveInner(i,-1),o=a.resolve(i);for(let e=i,t;o==a&&(t=a.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;o=a=t,e=n.from}return a.name==`TagName`?a.parent&&/CloseTag$/.test(a.parent.name)?gF(r,a,a.from,i):hF(r,e,a,a.from,i):a.name==`StartTag`||a.name==`IncompleteTag`?hF(r,e,a,i,i):a.name==`StartCloseTag`||a.name==`IncompleteCloseTag`?gF(r,a,i,i):a.name==`OpenTag`||a.name==`SelfClosingTag`||a.name==`AttributeName`?vF(r,e,a,a.name==`AttributeName`?a.from:i,i):a.name==`Is`||a.name==`AttributeValue`||a.name==`UnquotedAttributeValue`?yF(r,e,a,a.name==`Is`?i:a.from,i):n.explicit&&(o.name==`Element`||o.name==`Text`||o.name==`Document`)?_F(r,e,a,i):null}function xF(e){return bF(lF.default,e)}function SF(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new lF(t,n):lF.default;return e=>bF(r,e)}var CF=BP.parser.configure({top:`SingleExpression`}),wF=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:HP.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:UP.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:WP.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:CF},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:BP.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:WN.parser}],TF=[{name:`style`,parser:WN.parser.configure({top:`Styles`})}].concat(cF.map(e=>({name:e,parser:BP.parser}))),EF=Ne.define({name:`html`,parser:VM.configure({props:[r.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),He.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),Oe.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),DF=EF.configure({wrap:GM(wF,TF)});function OF(e={}){let t=``,n;e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=GM((e.nestedLanguages||[]).concat(wF),(e.nestedAttributes||[]).concat(TF)));let r=n?EF.configure({wrap:n,dialect:t}):t?DF.configure({dialect:t}):DF;return new Le(r,[DF.data.of({autocomplete:SF(e)}),e.autoCloseTags===!1?[]:jF,JP().support,GN().support])}var kF=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `));function AF(e,t,n){for(;;){if(t.lastChild?.name!=`CloseTag`)return!1;let r=t.parent;if(!r||uF(e,r)!=n)return!0;t=r}}var jF=C.inputHandler.of((e,n,r,i,a)=>{if(e.composing||e.state.readOnly||n!=r||i!=`>`&&i!=`/`||!DF.isActiveAt(e.state,n,-1))return!1;let o=a(),{state:s}=o,c=s.changeByRange(e=>{let n=s.doc.sliceString(e.from-1,e.to)==i,{head:r}=e,a=t(s).resolveInner(r,-1),o;if(n&&i==`>`&&a.name==`EndTag`){let t=a.parent;if((o=uF(s.doc,t.parent,r))&&!kF.has(o)&&!AF(s.doc,t.parent,o))return{range:e,changes:{from:r,to:r+ +(s.doc.sliceString(r,r+1)===`>`),insert:`</${o}>`}}}else if(n&&i==`/`&&a.name==`IncompleteCloseTag`){let e=a.parent;if(a.from==r-2&&e.lastChild?.name!=`CloseTag`&&(o=uF(s.doc,e,r))&&!kF.has(o)){let e=r+ +(s.doc.sliceString(r,r+1)===`>`),t=`${o}>`;return{range:Te.cursor(r+t.length,-1),changes:{from:r,to:e,insert:t}}}}return{range:e}});return!c.changes.empty&&(e.dispatch([o,s.update(c,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),MF=Ke({commonmarkLanguage:()=>VF,deleteMarkupBackward:()=>tI,insertNewlineContinueMarkup:()=>XF,insertNewlineContinueMarkupCommand:()=>YF,markdown:()=>iI,markdownKeymap:()=>nI,markdownLanguage:()=>HF,pasteURLAsLink:()=>lI}),NF=he({commentTokens:{block:{open:`<!--`,close:`-->`}}}),PF=new o,FF=Lle.configure({props:[He.add(e=>!e.is(`Block`)||e.is(`Document`)||IF(e)!=null||LF(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),PF.add(IF),r.add({Document:()=>null}),a.add({Document:NF})]});function IF(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function LF(e){return e.name==`OrderedList`||e.name==`BulletList`}function RF(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=IF(e.type))!=null&&r<=t)break;n=e}return n.to}var zF=oe.of((e,n,r)=>{for(let i=t(e).resolveInner(r,-1);i&&!(i.from<n);i=i.parent){let e=i.type.prop(PF);if(e==null)continue;let t=RF(i,e);if(t>r)return{from:r,to:t}}return null});function BF(e){return new se(NF,e,[],`markdown`)}var VF=BF(FF),HF=BF(FF.configure([jj,Pj,Nj,Fj,{props:[He.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function UF(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):E.matchLanguageName(e,n,!0),t instanceof E)return t.support?t.support.language.parser:le.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var WF=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}marker(e,t){let n=this.node.name==`OrderedList`?String(+KF(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function GF(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new WF(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new WF(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new WF(i.parent,s,s+t,a[1],e,n,i))}}return r}function KF(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function qF(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=KF(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function JF(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(b)!=` `)return e;let r=ge(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var YF=(e={})=>({state:n,dispatch:r})=>{let i=t(n),{doc:a}=n,o=null,s=n.changeByRange(t=>{if(!t.empty||!HF.isActiveAt(n,t.from,-1)&&!HF.isActiveAt(n,t.from,1))return o={range:t};let r=t.from,s=a.lineAt(r),c=GF(i.resolveInner(r,-1),a);for(;c.length&&c[c.length-1].from>r-s.from;)c.pop();if(!c.length)return o={range:t};let l=c[c.length-1];if(l.to-l.spaceAfter.length>r-s.from)return o={range:t};let u=r>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){if(l.item.from<s.from&&!/^[\s>]*$/.test(s.text.slice(0,l.to)))return o={range:t};let i=l.node.firstChild,u=l.node.getChild(`ListItem`,`ListItem`);if(i.to>=r||u&&u.to<r||s.from>0&&!/[^\s>]/.test(a.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(a,1)):t=s.from+(e?e.to:0);let i=[{from:t,to:r,insert:n}];return l.node.name==`OrderedList`&&qF(l.item,a,i,-2),e&&e.node.name==`OrderedList`&&qF(e.item,a,i),{range:Te.cursor(t+n.length),changes:i}}{let e=$F(c,n,s);return{range:Te.cursor(r+e.length+1),changes:{from:s.from,insert:e+n.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=a.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=n.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:t.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&qF(l.item,a,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(a,1):c[e].blank(e<t?ge(s.text,4,c[e+1].from)-p.length:null);let m=r;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=JF(p,n),QF(l.node,n.doc)&&(p=$F(c,n,s)+n.lineBreak+p),d.push({from:m,to:r,insert:n.lineBreak+p}),{range:Te.cursor(m+p.length+1),changes:d}});return!o&&(r(n.update(s,{scrollIntoView:!0,userEvent:`input`})),!0)},XF=YF();function ZF(e){return e.name==`QuoteMark`||e.name==`ListMark`}function QF(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function $F(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?ge(n.text,4,e[t+1].from)-r.length:null,t<i);return JF(r,t)}function eI(e,t){let n=e.resolveInner(t,-1),r=t;ZF(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(ZF(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var tI=({state:e,dispatch:n})=>{let r=t(e),i=null,a=e.changeByRange(t=>{let n=t.from,{doc:a}=e;if(t.empty&&HF.isActiveAt(e,t.from)){let t=a.lineAt(n),i=GF(eI(r,n),a);if(i.length){let r=i[i.length-1],a=r.to-r.spaceAfter.length+ +!!r.spaceAfter;if(n-t.from>a&&!/\S/.test(t.text.slice(a,n-t.from)))return{range:Te.cursor(t.from+a),changes:{from:t.from+a,to:n}};if(n-t.from==a&&(r.item&&t.from<=r.item.from||/^[\s>]*$/.test(t.text.slice(0,r.to)))){let i=t.from+r.from;if(r.item&&r.node.from<r.item.from&&/\S/.test(t.text.slice(r.from,r.to))){let n=r.blank(ge(t.text,4,r.to)-ge(t.text,4,r.from));return i==t.from&&(n=JF(n,e)),{range:Te.cursor(i+n.length),changes:{from:i,to:t.from+r.to,insert:n}}}if(i<n)return{range:Te.cursor(i),changes:{from:i,to:n}}}}}return i={range:t}});return!i&&(n(e.update(a,{scrollIntoView:!0,userEvent:`delete`})),!0)},nI=[{key:`Enter`,run:XF},{key:`Backspace`,run:tI}],rI=OF({matchClosingTags:!1});function iI(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=VF,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=rI}=e;if(!(i instanceof XA))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,zF],d;o&&l.push(lI),n instanceof Le?(l.push(n.support),d=n.language):n&&(d=n);let f=t||d?UF(t,d):void 0;c.push(zle({codeParser:f,htmlParser:s.language.parser})),r&&l.push(De.high(u.of(nI)));let p=BF(i.configure(c));return a&&l.push(p.data.of({autocomplete:aI})),new Le(p,l)}function aI(e){let{state:n,pos:r}=e,i=/<[:\-\.\w\u00b7-\uffff]*$/.exec(n.sliceDoc(r-25,r));if(!i)return null;let a=t(n).resolveInner(r,-1);for(;a&&!a.type.isTop;){if(a.name==`CodeBlock`||a.name==`FencedCode`||a.name==`ProcessingInstructionBlock`||a.name==`CommentBlock`||a.name==`Link`||a.name==`Image`)return null;a=a.parent}return{from:r-i[0].length,to:r,options:sI(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var oI=null;function sI(){if(oI)return oI;let e=xF(new AO(Me.create({extensions:rI}),0,!0));return oI=e?e.options:[]}var cI=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,lI=C.domEventHandlers({paste:(e,n)=>{let{main:r}=n.state.selection;if(r.empty)return!1;let i=e.clipboardData?.getData(`text/plain`);if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i=`https://`+i),!HF.isActiveAt(n.state,r.from,1)))return!1;let a=t(n.state),o=!1;return a.iterate({from:r.from,to:r.to,enter:e=>{(e.from>r.from||cI.test(e.name))&&(o=!0)},leave:e=>{e.to<r.to&&(o=!0)}}),!o&&(n.dispatch({changes:[{from:r.from,insert:`[`},{from:r.to,insert:`](${i})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function Q(e){return new Le(de.define(e))}function uI(e){return Z(()=>import(`./dist-DPaKrZAg.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([125,126]))}var dI=[E.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return Z(()=>import(`./dist-TxQM6vOw.js`).then(e=>e.cpp()),__vite__mapDeps([127,126]))}}),E.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return Z(()=>import(`./dist-TxQM6vOw.js`).then(e=>e.cpp()),__vite__mapDeps([127,126]))}}),E.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return uI(`Cassandra`)}}),E.of({name:`CSS`,extensions:[`css`],load(){return Z(()=>Promise.resolve().then(()=>ON).then(e=>e.css()),void 0)}}),E.of({name:`Go`,extensions:[`go`],load(){return Z(()=>import(`./dist-B3Gw99wx.js`).then(e=>e.go()),__vite__mapDeps([128,126]))}}),E.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return Z(()=>Promise.resolve().then(()=>$P).then(e=>e.html()),void 0)}}),E.of({name:`Java`,extensions:[`java`],load(){return Z(()=>import(`./dist-DXn_f-MA.js`).then(e=>e.java()),__vite__mapDeps([129,126]))}}),E.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return Z(()=>Promise.resolve().then(()=>OP).then(e=>e.javascript()),void 0)}}),E.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return Z(()=>import(`./dist-DEek50ly.js`).then(e=>e.jinja()),__vite__mapDeps([130,126]))}}),E.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return Z(()=>import(`./dist-BubrR0xG.js`).then(e=>e.json()),__vite__mapDeps([131,126]))}}),E.of({name:`JSX`,extensions:[`jsx`],load(){return Z(()=>Promise.resolve().then(()=>OP).then(e=>e.javascript({jsx:!0})),void 0)}}),E.of({name:`LESS`,extensions:[`less`],load(){return Z(()=>import(`./dist-DVUt_SGH.js`).then(e=>e.less()),__vite__mapDeps([132,126]))}}),E.of({name:`Liquid`,extensions:[`liquid`],load(){return Z(()=>import(`./dist-aiRbTm_k.js`).then(e=>e.liquid()),__vite__mapDeps([133,126]))}}),E.of({name:`MariaDB SQL`,load(){return uI(`MariaSQL`)}}),E.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return Z(()=>Promise.resolve().then(()=>MF).then(e=>e.markdown()),void 0)}}),E.of({name:`MS SQL`,load(){return uI(`MSSQL`)}}),E.of({name:`MySQL`,load(){return uI(`MySQL`)}}),E.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return Z(()=>import(`./dist-6WscILbU.js`).then(e=>e.php()),__vite__mapDeps([134,126]))}}),E.of({name:`PLSQL`,extensions:[`pls`],load(){return uI(`PLSQL`)}}),E.of({name:`PostgreSQL`,load(){return uI(`PostgreSQL`)}}),E.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return Z(()=>import(`./dist-Dt7T4fXX.js`).then(e=>e.python()),__vite__mapDeps([135,126]))}}),E.of({name:`Rust`,extensions:[`rs`],load(){return Z(()=>import(`./dist-CfuU_6ln.js`).then(e=>e.rust()),__vite__mapDeps([136,126]))}}),E.of({name:`Sass`,extensions:[`sass`],load(){return Z(()=>import(`./dist-GZSAtcw9.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([137,126]))}}),E.of({name:`SCSS`,extensions:[`scss`],load(){return Z(()=>import(`./dist-GZSAtcw9.js`).then(e=>e.sass()),__vite__mapDeps([137,126]))}}),E.of({name:`SQL`,extensions:[`sql`],load(){return uI(`StandardSQL`)}}),E.of({name:`SQLite`,load(){return uI(`SQLite`)}}),E.of({name:`TSX`,extensions:[`tsx`],load(){return Z(()=>Promise.resolve().then(()=>OP).then(e=>e.javascript({jsx:!0,typescript:!0})),void 0)}}),E.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return Z(()=>Promise.resolve().then(()=>OP).then(e=>e.javascript({typescript:!0})),void 0)}}),E.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return Z(()=>import(`./dist-Lc2Es7Pl.js`).then(e=>e.wast()),__vite__mapDeps([138,126]))}}),E.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return Z(()=>import(`./dist-CjIRqXSt.js`).then(e=>e.xml()),__vite__mapDeps([139,126]))}}),E.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return Z(()=>import(`./dist-D0Ats_4w.js`).then(e=>e.yaml()),__vite__mapDeps([140,126]))}}),E.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return Z(()=>import(`./apl-gfMMiTNf.js`).then(e=>Q(e.apl)),[])}}),E.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return Z(()=>import(`./asciiarmor-C_eisQCp.js`).then(e=>Q(e.asciiArmor)),[])}}),E.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return Z(()=>import(`./asn1-DCl_8MCW.js`).then(e=>Q(e.asn1({}))),[])}}),E.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return Z(()=>import(`./asterisk-BEn0Cwpx.js`).then(e=>Q(e.asterisk)),[])}}),E.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return Z(()=>import(`./brainfuck-D5EjA2JK.js`).then(e=>Q(e.brainfuck)),[])}}),E.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return Z(()=>import(`./cobol-DHLQUbN7.js`).then(e=>Q(e.cobol)),[])}}),E.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.csharp)),[])}}),E.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return Z(()=>import(`./clojure-BflJGmDX.js`).then(e=>Q(e.clojure)),[])}}),E.of({name:`ClojureScript`,extensions:[`cljs`],load(){return Z(()=>import(`./clojure-BflJGmDX.js`).then(e=>Q(e.clojure)),[])}}),E.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return Z(()=>import(`./css-CnaYoQib.js`).then(e=>Q(e.gss)),[])}}),E.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return Z(()=>import(`./cmake-84nbDH0I.js`).then(e=>Q(e.cmake)),[])}}),E.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return Z(()=>import(`./coffeescript-De_zI4J0.js`).then(e=>Q(e.coffeeScript)),[])}}),E.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return Z(()=>import(`./commonlisp-DgAKBe0r.js`).then(e=>Q(e.commonLisp)),[])}}),E.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return Z(()=>import(`./cypher-p9eYesGn.js`).then(e=>Q(e.cypher)),[])}}),E.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return Z(()=>import(`./python-B_1Jd8HM.js`).then(e=>Q(e.cython)),[])}}),E.of({name:`Crystal`,extensions:[`cr`],load(){return Z(()=>import(`./crystal-Bsdphhtm.js`).then(e=>Q(e.crystal)),[])}}),E.of({name:`D`,extensions:[`d`],load(){return Z(()=>import(`./d-DWkQyNnU.js`).then(e=>Q(e.d)),[])}}),E.of({name:`Dart`,extensions:[`dart`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.dart)),[])}}),E.of({name:`diff`,extensions:[`diff`,`patch`],load(){return Z(()=>import(`./diff-ChtP43wD.js`).then(e=>Q(e.diff)),[])}}),E.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return Z(()=>import(`./dockerfile-DJkHQgkl.js`).then(e=>Q(e.dockerFile)),__vite__mapDeps([141,142]))}}),E.of({name:`DTD`,extensions:[`dtd`],load(){return Z(()=>import(`./dtd-DTF72YNO.js`).then(e=>Q(e.dtd)),[])}}),E.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return Z(()=>import(`./dylan-BCDoL_-p.js`).then(e=>Q(e.dylan)),[])}}),E.of({name:`EBNF`,load(){return Z(()=>import(`./ebnf-D4c0_ac3.js`).then(e=>Q(e.ebnf)),[])}}),E.of({name:`ECL`,extensions:[`ecl`],load(){return Z(()=>import(`./ecl-BVIeWmwY.js`).then(e=>Q(e.ecl)),[])}}),E.of({name:`edn`,extensions:[`edn`],load(){return Z(()=>import(`./clojure-BflJGmDX.js`).then(e=>Q(e.clojure)),[])}}),E.of({name:`Eiffel`,extensions:[`e`],load(){return Z(()=>import(`./eiffel-BEjRio4Q.js`).then(e=>Q(e.eiffel)),[])}}),E.of({name:`Elm`,extensions:[`elm`],load(){return Z(()=>import(`./elm-Cshzl8qu.js`).then(e=>Q(e.elm)),[])}}),E.of({name:`Erlang`,extensions:[`erl`],load(){return Z(()=>import(`./erlang-BV0c4Hdn.js`).then(e=>Q(e.erlang)),[])}}),E.of({name:`Esper`,load(){return Z(()=>import(`./sql-DuQMFDvy.js`).then(e=>Q(e.esper)),[])}}),E.of({name:`Factor`,extensions:[`factor`],load(){return Z(()=>import(`./factor-LKH5gN8L.js`).then(e=>Q(e.factor)),__vite__mapDeps([143,142]))}}),E.of({name:`FCL`,load(){return Z(()=>import(`./fcl-ClOhbFR7.js`).then(e=>Q(e.fcl)),[])}}),E.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return Z(()=>import(`./forth-Cezjo90N.js`).then(e=>Q(e.forth)),[])}}),E.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return Z(()=>import(`./fortran-Bt6PBEDR.js`).then(e=>Q(e.fortran)),[])}}),E.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return Z(()=>import(`./mllike-B45xgp2S.js`).then(e=>Q(e.fSharp)),[])}}),E.of({name:`Gas`,extensions:[`s`],load(){return Z(()=>import(`./gas-BHEdbvp9.js`).then(e=>Q(e.gas)),[])}}),E.of({name:`Gherkin`,extensions:[`feature`],load(){return Z(()=>import(`./gherkin-oBAE_ms0.js`).then(e=>Q(e.gherkin)),[])}}),E.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return Z(()=>import(`./groovy-CUpZ7dEl.js`).then(e=>Q(e.groovy)),[])}}),E.of({name:`Haskell`,extensions:[`hs`],load(){return Z(()=>import(`./haskell-BRsoo5mP.js`).then(e=>Q(e.haskell)),[])}}),E.of({name:`Haxe`,extensions:[`hx`],load(){return Z(()=>import(`./haxe-DjVOVvNP.js`).then(e=>Q(e.haxe)),[])}}),E.of({name:`HXML`,extensions:[`hxml`],load(){return Z(()=>import(`./haxe-DjVOVvNP.js`).then(e=>Q(e.hxml)),[])}}),E.of({name:`HTTP`,load(){return Z(()=>import(`./http-CLVgA2GD.js`).then(e=>Q(e.http)),[])}}),E.of({name:`IDL`,extensions:[`pro`],load(){return Z(()=>import(`./idl-BUZw3wgd.js`).then(e=>Q(e.idl)),[])}}),E.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return Z(()=>import(`./javascript-DoL9Wb-Q.js`).then(e=>Q(e.jsonld)),[])}}),E.of({name:`Julia`,extensions:[`jl`],load(){return Z(()=>import(`./julia-CQfgDRfP.js`).then(e=>Q(e.julia)),[])}}),E.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.kotlin)),[])}}),E.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return Z(()=>import(`./livescript-BXxG0Yva.js`).then(e=>Q(e.liveScript)),[])}}),E.of({name:`Lua`,extensions:[`lua`],load(){return Z(()=>import(`./lua-CiA1ziua.js`).then(e=>Q(e.lua)),[])}}),E.of({name:`mIRC`,extensions:[`mrc`],load(){return Z(()=>import(`./mirc-C9zpzAZU.js`).then(e=>Q(e.mirc)),[])}}),E.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return Z(()=>import(`./mathematica-u8YMmbU0.js`).then(e=>Q(e.mathematica)),[])}}),E.of({name:`Modelica`,extensions:[`mo`],load(){return Z(()=>import(`./modelica-CqHI_q-D.js`).then(e=>Q(e.modelica)),[])}}),E.of({name:`MUMPS`,extensions:[`mps`],load(){return Z(()=>import(`./mumps-BSzj6Xyz.js`).then(e=>Q(e.mumps)),[])}}),E.of({name:`Mbox`,extensions:[`mbox`],load(){return Z(()=>import(`./mbox-BEMVcqjs.js`).then(e=>Q(e.mbox)),[])}}),E.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return Z(()=>import(`./nginx-BMaDbqW3.js`).then(e=>Q(e.nginx)),[])}}),E.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return Z(()=>import(`./nsis-CfSuhXs5.js`).then(e=>Q(e.nsis)),__vite__mapDeps([144,142]))}}),E.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return Z(()=>import(`./ntriples-B9h1VB_g.js`).then(e=>Q(e.ntriples)),[])}}),E.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.objectiveC)),[])}}),E.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.objectiveCpp)),[])}}),E.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return Z(()=>import(`./mllike-B45xgp2S.js`).then(e=>Q(e.oCaml)),[])}}),E.of({name:`Octave`,extensions:[`m`],load(){return Z(()=>import(`./octave-D2Q8cUp1.js`).then(e=>Q(e.octave)),[])}}),E.of({name:`Oz`,extensions:[`oz`],load(){return Z(()=>import(`./oz-BwTct_5T.js`).then(e=>Q(e.oz)),[])}}),E.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return Z(()=>import(`./pascal-Dp_KdFgX.js`).then(e=>Q(e.pascal)),[])}}),E.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return Z(()=>import(`./perl-BkSkiI9m.js`).then(e=>Q(e.perl)),[])}}),E.of({name:`Pig`,extensions:[`pig`],load(){return Z(()=>import(`./pig-AF4Hwhju.js`).then(e=>Q(e.pig)),[])}}),E.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return Z(()=>import(`./powershell-BcIto6Sf.js`).then(e=>Q(e.powerShell)),[])}}),E.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return Z(()=>import(`./properties-C357ku5U.js`).then(e=>Q(e.properties)),[])}}),E.of({name:`ProtoBuf`,extensions:[`proto`],load(){return Z(()=>import(`./protobuf-D1ij_kNL.js`).then(e=>Q(e.protobuf)),[])}}),E.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return Z(()=>import(`./pug-Gsm0M45u.js`).then(e=>Q(e.pug)),__vite__mapDeps([145,146]))}}),E.of({name:`Puppet`,extensions:[`pp`],load(){return Z(()=>import(`./puppet-BZyAS7I4.js`).then(e=>Q(e.puppet)),[])}}),E.of({name:`Q`,extensions:[`q`],load(){return Z(()=>import(`./q-B9NhS7L_.js`).then(e=>Q(e.q)),[])}}),E.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return Z(()=>import(`./r-CxDmU1I4.js`).then(e=>Q(e.r)),[])}}),E.of({name:`RPM Changes`,load(){return Z(()=>import(`./rpm-gpDK5sbt.js`).then(e=>Q(e.rpmChanges)),[])}}),E.of({name:`RPM Spec`,extensions:[`spec`],load(){return Z(()=>import(`./rpm-gpDK5sbt.js`).then(e=>Q(e.rpmSpec)),[])}}),E.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return Z(()=>import(`./ruby-BjXV7-Qa.js`).then(e=>Q(e.ruby)),[])}}),E.of({name:`SAS`,extensions:[`sas`],load(){return Z(()=>import(`./sas-C2OyD2Y6.js`).then(e=>Q(e.sas)),[])}}),E.of({name:`Scala`,extensions:[`scala`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.scala)),[])}}),E.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return Z(()=>import(`./scheme-D9qYN0V5.js`).then(e=>Q(e.scheme)),[])}}),E.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return Z(()=>import(`./shell-DwuoZtxw.js`).then(e=>Q(e.shell)),[])}}),E.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return Z(()=>import(`./sieve-BAxa3IjF.js`).then(e=>Q(e.sieve)),[])}}),E.of({name:`Smalltalk`,extensions:[`st`],load(){return Z(()=>import(`./smalltalk-BLp5-jwC.js`).then(e=>Q(e.smalltalk)),[])}}),E.of({name:`Solr`,load(){return Z(()=>import(`./solr-BBopId9w.js`).then(e=>Q(e.solr)),[])}}),E.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return Z(()=>import(`./mllike-B45xgp2S.js`).then(e=>Q(e.sml)),[])}}),E.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return Z(()=>import(`./sparql-Dz-mlCAC.js`).then(e=>Q(e.sparql)),[])}}),E.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return Z(()=>import(`./spreadsheet-CTIncYxj.js`).then(e=>Q(e.spreadsheet)),[])}}),E.of({name:`Squirrel`,extensions:[`nut`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.squirrel)),[])}}),E.of({name:`Stylus`,extensions:[`styl`],load(){return Z(()=>import(`./stylus-BOVgKnng.js`).then(e=>Q(e.stylus)),[])}}),E.of({name:`Swift`,extensions:[`swift`],load(){return Z(()=>import(`./swift-DKB6_1j6.js`).then(e=>Q(e.swift)),[])}}),E.of({name:`sTeX`,load(){return Z(()=>import(`./stex-DNzd62Q_.js`).then(e=>Q(e.stex)),[])}}),E.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return Z(()=>import(`./stex-DNzd62Q_.js`).then(e=>Q(e.stex)),[])}}),E.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return Z(()=>import(`./verilog-7LoJAqYT.js`).then(e=>Q(e.verilog)),[])}}),E.of({name:`Tcl`,extensions:[`tcl`],load(){return Z(()=>import(`./tcl-BGfruO1u.js`).then(e=>Q(e.tcl)),[])}}),E.of({name:`Textile`,extensions:[`textile`],load(){return Z(()=>import(`./textile-C4jVoHG1.js`).then(e=>Q(e.textile)),[])}}),E.of({name:`TiddlyWiki`,load(){return Z(()=>import(`./tiddlywiki-VlUiK86J.js`).then(e=>Q(e.tiddlyWiki)),[])}}),E.of({name:`Tiki wiki`,load(){return Z(()=>import(`./tiki-AK6FwT8q.js`).then(e=>Q(e.tiki)),[])}}),E.of({name:`TOML`,extensions:[`toml`],load(){return Z(()=>import(`./toml-BPTmHmyx.js`).then(e=>Q(e.toml)),[])}}),E.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return Z(()=>import(`./troff-C2dAgh7P.js`).then(e=>Q(e.troff)),[])}}),E.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return Z(()=>import(`./ttcn-PPSTk1ow.js`).then(e=>Q(e.ttcn)),[])}}),E.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return Z(()=>import(`./ttcn-cfg-2b4Gb5sE.js`).then(e=>Q(e.ttcnCfg)),[])}}),E.of({name:`Turtle`,extensions:[`ttl`],load(){return Z(()=>import(`./turtle-Cx3rYX2g.js`).then(e=>Q(e.turtle)),[])}}),E.of({name:`Web IDL`,extensions:[`webidl`],load(){return Z(()=>import(`./webidl-D5jiJvOU.js`).then(e=>Q(e.webIDL)),[])}}),E.of({name:`VB.NET`,extensions:[`vb`],load(){return Z(()=>import(`./vb-BthdM_4N.js`).then(e=>Q(e.vb)),[])}}),E.of({name:`VBScript`,extensions:[`vbs`],load(){return Z(()=>import(`./vbscript-D9f6rSsU.js`).then(e=>Q(e.vbScript)),[])}}),E.of({name:`Velocity`,extensions:[`vtl`],load(){return Z(()=>import(`./velocity-CqftRsjg.js`).then(e=>Q(e.velocity)),[])}}),E.of({name:`Verilog`,extensions:[`v`],load(){return Z(()=>import(`./verilog-7LoJAqYT.js`).then(e=>Q(e.verilog)),[])}}),E.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return Z(()=>import(`./vhdl-kS471soi.js`).then(e=>Q(e.vhdl)),[])}}),E.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return Z(()=>import(`./xquery-BKJx4mf9.js`).then(e=>Q(e.xQuery)),[])}}),E.of({name:`Yacas`,extensions:[`ys`],load(){return Z(()=>import(`./yacas-CXXgtw0p.js`).then(e=>Q(e.yacas)),[])}}),E.of({name:`Z80`,extensions:[`z80`],load(){return Z(()=>import(`./z80-Co3PbHdE.js`).then(e=>Q(e.z80)),[])}}),E.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return Z(()=>import(`./mscgen-qgSLujhx.js`).then(e=>Q(e.mscgen)),[])}}),E.of({name:`Xù`,extensions:[`xu`],load(){return Z(()=>import(`./mscgen-qgSLujhx.js`).then(e=>Q(e.xu)),[])}}),E.of({name:`MsGenny`,extensions:[`msgenny`],load(){return Z(()=>import(`./mscgen-qgSLujhx.js`).then(e=>Q(e.msgenny)),[])}}),E.of({name:`Vue`,extensions:[`vue`],load(){return Z(()=>import(`./dist-ZCpVZHxJ.js`).then(e=>e.vue()),__vite__mapDeps([147,126]))}}),E.of({name:`Angular Template`,load(){return Z(()=>import(`./dist--BHbWUnT.js`).then(e=>e.angular()),__vite__mapDeps([148,126]))}})],fI=Ns(`caret.completionPreview`,[`on`,`off`],`off`),pI=()=>fI.read()===`on`,mI=e=>fI.write(e?`on`:`off`);function hI(e=()=>!1,t=()=>{}){let n=e();return{on:()=>n,toggle(){n=!n,t(n)}}}var gI=hI(pI,mI),_I=8,vI=96,yI=6e3,bI=`No information found.`,xI=10;function SI(e,t,n){let r=Math.min(Math.max(_I,e.top),Math.max(_I,n.height-_I-vI));return{left:Math.max(_I,t),top:r,maxHeight:n.height-r-_I}}function CI(e,t,n,r=!1){let i=e.right+_I;if(i+t<=n.width-_I)return SI(e,i,n);let a=e.left-_I-t;if(a>=_I)return SI(e,a,n);let o=Math.max(_I,Math.min(e.left,n.width-_I-t));return r?{left:o,bottom:n.height-(e.top-_I),maxHeight:e.top-16}:{left:o,top:e.bottom+_I,maxHeight:n.height-e.bottom-16}}function wI(e,t){let n=t?112:0;return{top:n,left:0,right:e.width,bottom:e.height-n}}function TI(){let e=document.createElement(`div`);e.className=`caret-preview`,e.setAttribute(`role`,`note`);let t=document.createElement(`div`);t.className=`caret-preview-title`;let n=document.createElement(`div`);return n.className=`caret-preview-body`,e.append(t,n),{dom:e,title:t,body:n}}function EI(){let e=document.createElement(`div`);e.className=`caret-preview-loading`,e.setAttribute(`aria-hidden`,`true`);for(let t=0;t<3;t++)e.append(document.createElement(`span`));return e}function DI(){let e=document.createElement(`div`);return e.className=`caret-preview-note`,e.textContent=bI,e}function OI(e,t,n){if(n!==void 0&&n>t.totalLines){let n=document.createElement(`div`);n.className=`caret-preview-note`,n.textContent=`This file ends at line ${t.totalLines}.`,e.append(n)}t.lines.forEach((r,i)=>{let a=t.startLine+i,o=document.createElement(`div`);o.className=a===n?`caret-preview-line caret-preview-marked`:`caret-preview-line`;let s=document.createElement(`span`);s.className=`caret-preview-lineno`,s.textContent=String(a);let c=document.createElement(`span`);c.className=`caret-preview-code`,c.textContent=r,o.append(s,c),e.append(o)})}function kI(e){return e?`to close the preview`:`to preview`}function AI(e){let t=document.createElement(`div`);t.className=`caret-completion-hint`;for(let e of Wae(`editor.previewCompletion`))for(let n of e){let e=document.createElement(`kbd`);e.setAttribute(`data-slot`,`kbd`),e.className=`kbd-sm`,e.textContent=n,t.append(e)}let n=document.createElement(`span`);return n.textContent=kI(e),t.append(n),t}var jI=`caret-completion-preview`;function MI(e,t,n=yI){let r=s.define(r=>new NI(r,e,t,n));return[r,_({tooltipSpace:e=>{let t=e.dom.ownerDocument.documentElement;return wI({width:t.clientWidth,height:t.clientHeight},e.plugin(r)?.isOpen()===!0)}})]}var NI=class{view;toggle;showHints;timeoutMs;dom=null;titleEl=null;bodyEl=null;hint=null;cancel=null;key=null;frame=0;lastPlacedAt=``;still=0;onViewportChange=()=>this.measure();constructor(e,t,n,r){this.view=e,this.toggle=t,this.showHints=n,this.timeoutMs=r,window.addEventListener(`scroll`,this.onViewportChange,!0),window.addEventListener(`resize`,this.onViewportChange),this.update()}isOpen(){return this.dom!==null}update(){let e=fce(this.view.state);e!==null&&(this.toggle.on()&&e.preview!==void 0?this.show(e.preview):this.close()),this.measure()}destroy(){window.removeEventListener(`scroll`,this.onViewportChange,!0),window.removeEventListener(`resize`,this.onViewportChange),this.frame!==0&&cancelAnimationFrame(this.frame),this.frame=0,this.close(),this.hint?.remove(),this.hint=null}measure(){this.view.requestMeasure({key:this,read:()=>{let e=this.view.dom.querySelector(`.cm-tooltip-autocomplete`);return e===null?null:{list:e,listRect:e.getBoundingClientRect(),listAbove:e.classList.contains(`cm-tooltip-above`),width:this.dom?.offsetWidth??0,natural:this.naturalHeight()}},write:e=>{if(e===null){this.close(),this.hint?.remove(),this.hint=null;return}if(this.drawHint(e.list),this.describeSelected(e.list),e.listRect.bottom<0){this.placeNextFrame();return}this.place(e.listRect,e.listAbove,e.width,e.natural);let t=`${e.listRect.top}:${e.listRect.left}:${e.listRect.width}:${e.listRect.height}:${e.listAbove}`;if(t!==this.lastPlacedAt)this.lastPlacedAt=t,this.still=0;else if(this.still>=xI)return;else this.still++;this.measureNextFrame()}})}placeNextFrame(){this.dom!==null&&(this.dom.style.visibility=`hidden`),this.measureNextFrame()}measureNextFrame(){this.frame===0&&(this.frame=requestAnimationFrame(()=>{this.frame=0,this.measure()}))}naturalHeight(){if(this.dom===null||this.titleEl===null||this.bodyEl===null)return 0;let e=this.titleEl.offsetHeight+this.bodyEl.scrollHeight;return e===0?0:e+2}show(e){if(this.dom===null){let e=TI();e.dom.id=jI,document.body.appendChild(e.dom),this.dom=e.dom,this.titleEl=e.title,this.bodyEl=e.body}this.key!==e.key&&this.titleEl!==null&&this.bodyEl!==null&&(this.key=e.key,this.cancel?.(),this.titleEl.textContent=e.title,this.bodyEl.replaceChildren(EI()),this.cancel=this.fetchAnswer(e))}fetchAnswer(e){let t=new AbortController,n=document.createElement(`div`),r=!1,i=e=>{r||t.signal.aborted||this.bodyEl===null||(r=!0,clearTimeout(a),this.bodyEl.replaceChildren(e),this.measure())},a=setTimeout(()=>i(DI()),this.timeoutMs);return e.fill(n,t.signal).then(()=>i(n.hasChildNodes()?n:DI()),()=>i(DI())),()=>{t.abort(),clearTimeout(a)}}close(){this.cancel?.(),this.cancel=null,this.key=null,this.lastPlacedAt=``,this.still=0,this.dom?.remove(),this.dom=null,this.titleEl=null,this.bodyEl=null}place(e,t,n,r){if(this.dom===null)return;let i=document.documentElement,a=CI(e,n,{width:i.clientWidth,height:i.clientHeight},t);this.dom.style.left=`${Math.round(a.left)}px`,this.dom.style.top=a.top===void 0?``:`${Math.round(a.top)}px`,this.dom.style.bottom=a.bottom===void 0?``:`${Math.round(a.bottom)}px`,this.dom.style.maxHeight=`${Math.round(a.maxHeight)}px`,this.dom.style.height=r===0?``:`${Math.round(Math.min(r,a.maxHeight))}px`,this.dom.style.visibility=``}describeSelected(e){let t=e.querySelector(`[aria-selected]`);t!==null&&(this.dom===null?t.removeAttribute(`aria-describedby`):t.setAttribute(`aria-describedby`,jI))}drawHint(e){if(!this.showHints()){this.hint?.remove(),this.hint=null;return}if(this.hint===null)this.hint=AI(this.toggle.on());else{let e=this.hint.lastElementChild;e!==null&&(e.textContent=kI(this.toggle.on()))}e.firstChild!==this.hint&&e.insertBefore(this.hint,e.firstChild)}},PI=/^\s*(`{3,}|~{3,})/,FI=/(`+)(.*?)\1/g,II=/\(([^()\s]+)\)/g,LI=/\bhttps?:\/\/\S+/gi,RI=/[A-Za-z0-9._/~-]+(?:(?::L?|:?#L)\d+(?:[-–,]L?\d+|:\d+)?)?/g,zI=/^(.+?)(?::L?|:?#L)(\d+)(?:[-–,]L?(\d+)|:\d+)?$/;function BI(e){let t=e,n,r,i=zI.exec(e);i&&(t=i[1],n=Number(i[2]),i[3]!==void 0&&(r=Number(i[3]),r<n&&([n,r]=[r,n])));let a=t.replace(/\/+$/,``).split(`/`).pop()??``;return/[A-Za-z]/.test(a)?{path:t,line:n,endLine:r}:null}function VI(e,t,n){return e.some(e=>t<e.end&&n>e.start)}function HI(e){let t=[...e.matchAll(LI)].map(e=>({start:e.index,end:e.index+e[0].length})),n=[];for(let r of e.matchAll(RI)){let e=r[0],i=r.index,a=i+e.length;if(VI(t,i,a))continue;let o=BI(e);o!==null&&n.push({start:i,end:a,path:o.path,line:o.line,endLine:o.endLine})}return n}function UI(e){return e.includes(`/`)||e.includes(`.`)}function WI(e){return e.sort((e,t)=>e.startCol-t.startCol)}function GI(e,t){return{startCol:e+t.start,endCol:e+t.end,path:t.path,line:t.line,endLine:t.endLine}}function KI(e){let t=[],n=[];for(let r of e.matchAll(FI)){n.push({start:r.index,end:r.index+r[0].length});let e=r[2]??``;if(/\s/.test(e.trim()))continue;let i=r.index+(r[1]?.length??0);for(let n of HI(e))t.push(GI(i,n))}for(let r of e.matchAll(II)){if(e[r.index-1]===`]`)continue;let i=r.index;if(VI(n,i,i+r[0].length))continue;let a=i+1;for(let e of HI(r[1]??``))UI(e.path)&&t.push(GI(a,e))}return WI(t)}function qI(e){let t=e.split(`
|
|
2132
|
+
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),jP=new v,MP=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function NP(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var PP=[`FunctionDeclaration`],FP={FunctionDeclaration:NP(`function`),ClassDeclaration:NP(`class`),ClassExpression:()=>!0,EnumDeclaration:NP(`constant`),TypeAliasDeclaration:NP(`type`),NamespaceDeclaration:NP(`namespace`),VariableDefinition(e,t){e.matchContext(PP)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function IP(e,t){let n=jP.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(g.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=FP[t.name];if(e&&e(t,a)||MP.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of IP(e,t.node))r.push(n);return!1}}),jP.set(t,r),r}var LP=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,RP=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function zP(e){let n=t(e.state).resolveInner(e.pos,-1);if(RP.indexOf(n.name)>-1)return null;let r=n.name==`VariableName`||n.to-n.from<20&&LP.test(e.state.sliceDoc(n.from,n.to));if(!r&&!e.explicit)return null;let i=[];for(let t=n;t;t=t.parent)MP.has(t.name)&&(i=i.concat(IP(e.state.doc,t)));return{options:i,from:r?n.from:e.pos,validFor:LP}}var BP=Ne.define({name:`javascript`,parser:DP.configure({props:[r.add({IfStatement:Se({except:/^\s*({|else\b)/}),TryStatement:Se({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:ne,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:pe({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":Se({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),He.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":ze,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),VP={test:e=>/^JSX/.test(e.name),facet:he({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},HP=BP.configure({dialect:`ts`},`typescript`),UP=BP.configure({dialect:`jsx`,props:[h.add(e=>e.isTop?[VP]:void 0)]}),WP=BP.configure({dialect:`jsx ts`,props:[h.add(e=>e.isTop?[VP]:void 0)]},`typescript`),GP=e=>({label:e,type:`keyword`}),KP=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(GP),qP=KP.concat([`declare`,`implements`,`private`,`protected`,`public`].map(GP));function JP(e={}){let t=e.jsx?e.typescript?WP:UP:e.typescript?HP:BP,n=e.typescript?AP.concat(qP):kP.concat(KP);return new Le(t,[BP.data.of({autocomplete:NO(RP,MO(n))}),BP.data.of({autocomplete:zP}),e.jsx?QP:[]])}function YP(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function XP(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var ZP=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),QP=C.inputHandler.of((e,n,r,i,a)=>{if((ZP?e.composing:e.compositionStarted)||e.state.readOnly||n!=r||i!=`>`&&i!=`/`||!BP.isActiveAt(e.state,n,-1))return!1;let o=a(),{state:s}=o,c=s.changeByRange(e=>{let{head:n}=e,r=t(s).resolveInner(n-1,-1),a;if(r.name==`JSXStartTag`&&(r=r.parent),!(s.doc.sliceString(n-1,n)!=i||r.name==`JSXAttributeValue`&&r.to>n)){if(i==`>`&&r.name==`JSXFragmentTag`)return{range:e,changes:{from:n,insert:`</>`}};if(i==`/`&&r.name==`JSXStartCloseTag`){let e=r.parent,t=e.parent;if(t&&e.from==n-2&&((a=XP(s.doc,t.firstChild,n))||t.firstChild?.name==`JSXFragmentTag`)){let e=`${a}>`;return{range:Te.cursor(n+e.length,-1),changes:{from:n,insert:e}}}}else if(i==`>`){let t=YP(r);if(t&&t.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(s.doc.sliceString(n,n+2))&&(a=XP(s.doc,t,n)))return{range:e,changes:{from:n,insert:`</${a}>`}}}}return{range:e}});return!c.changes.empty&&(e.dispatch([o,s.update(c,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),$P=Ke({autoCloseTags:()=>jF,html:()=>OF,htmlCompletionSource:()=>xF,htmlCompletionSourceWith:()=>SF,htmlLanguage:()=>DF}),eF=[`_blank`,`_self`,`_top`,`_parent`],tF=[`ascii`,`utf-8`,`utf-16`,`latin1`,`latin1`],nF=[`get`,`post`,`put`,`delete`],rF=[`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`],iF=[`true`,`false`],aF={},oF={a:{attrs:{href:null,ping:null,type:null,media:null,target:eF,hreflang:null}},abbr:aF,address:aF,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:[`default`,`rect`,`circle`,`poly`]}},article:aF,aside:aF,audio:{attrs:{src:null,mediagroup:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`none`,`metadata`,`auto`],autoplay:[`autoplay`],loop:[`loop`],controls:[`controls`]}},b:aF,base:{attrs:{href:null,target:eF}},bdi:aF,bdo:aF,blockquote:{attrs:{cite:null}},body:aF,br:aF,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:[`autofocus`],disabled:[`autofocus`],formenctype:rF,formmethod:nF,formnovalidate:[`novalidate`],formtarget:eF,type:[`submit`,`reset`,`button`]}},canvas:{attrs:{width:null,height:null}},caption:aF,center:aF,cite:aF,code:aF,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:[`command`,`checkbox`,`radio`],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:[`disabled`],checked:[`checked`]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:[`disabled`],multiple:[`multiple`]}},datalist:{attrs:{data:null}},dd:aF,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:[`open`]}},dfn:aF,div:aF,dl:aF,dt:aF,em:aF,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:[`disabled`],form:null,name:null}},figcaption:aF,figure:aF,footer:aF,form:{attrs:{action:null,name:null,"accept-charset":tF,autocomplete:[`on`,`off`],enctype:rF,method:nF,novalidate:[`novalidate`],target:eF}},h1:aF,h2:aF,h3:aF,h4:aF,h5:aF,h6:aF,head:{children:[`title`,`base`,`link`,`style`,`meta`,`script`,`noscript`,`command`]},header:aF,hgroup:aF,hr:aF,html:{attrs:{manifest:null}},i:aF,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:[`allow-top-navigation`,`allow-same-origin`,`allow-forms`,`allow-scripts`],seamless:[`seamless`]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:[`audio/*`,`video/*`,`image/*`],autocomplete:[`on`,`off`],autofocus:[`autofocus`],checked:[`checked`],disabled:[`disabled`],formenctype:rF,formmethod:nF,formnovalidate:[`novalidate`],formtarget:eF,multiple:[`multiple`],readonly:[`readonly`],required:[`required`],type:[`hidden`,`text`,`search`,`tel`,`url`,`email`,`password`,`datetime`,`date`,`month`,`week`,`time`,`datetime-local`,`number`,`range`,`color`,`checkbox`,`radio`,`file`,`submit`,`image`,`reset`,`button`]}},ins:{attrs:{cite:null,datetime:null}},kbd:aF,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:[`autofocus`],disabled:[`disabled`],keytype:[`RSA`]}},label:{attrs:{for:null,form:null}},legend:aF,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:[`all`,`16x16`,`16x16 32x32`,`16x16 32x32 64x64`]}},map:{attrs:{name:null}},mark:aF,menu:{attrs:{label:null,type:[`list`,`context`,`toolbar`]}},meta:{attrs:{content:null,charset:tF,name:[`viewport`,`application-name`,`author`,`description`,`generator`,`keywords`],"http-equiv":[`content-language`,`content-type`,`default-style`,`refresh`]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:aF,noscript:aF,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:[`typemustmatch`]}},ol:{attrs:{reversed:[`reversed`],start:null,type:[`1`,`a`,`A`,`i`,`I`]},children:[`li`,`script`,`template`,`ul`,`ol`]},optgroup:{attrs:{disabled:[`disabled`],label:null}},option:{attrs:{disabled:[`disabled`],label:null,selected:[`selected`],value:null}},output:{attrs:{for:null,form:null,name:null}},p:aF,param:{attrs:{name:null,value:null}},pre:aF,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:aF,rt:aF,ruby:aF,samp:aF,script:{attrs:{type:[`text/javascript`],src:null,async:[`async`],defer:[`defer`],charset:tF}},section:aF,select:{attrs:{form:null,name:null,size:null,autofocus:[`autofocus`],disabled:[`disabled`],multiple:[`multiple`]}},slot:{attrs:{name:null}},small:aF,source:{attrs:{src:null,type:null,media:null}},span:aF,strong:aF,style:{attrs:{type:[`text/css`],media:null,scoped:null}},sub:aF,summary:aF,sup:aF,table:aF,tbody:aF,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:aF,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:[`autofocus`],disabled:[`disabled`],readonly:[`readonly`],required:[`required`],wrap:[`soft`,`hard`]}},tfoot:aF,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:[`row`,`col`,`rowgroup`,`colgroup`]}},thead:aF,time:{attrs:{datetime:null}},title:aF,tr:aF,track:{attrs:{src:null,label:null,default:null,kind:[`subtitles`,`captions`,`descriptions`,`chapters`,`metadata`],srclang:null}},ul:{children:[`li`,`script`,`template`,`ul`,`ol`]},var:aF,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:[`anonymous`,`use-credentials`],preload:[`auto`,`metadata`,`none`],autoplay:[`autoplay`],mediagroup:[`movie`],muted:[`muted`],controls:[`controls`]}},wbr:aF},sF={accesskey:null,class:null,contenteditable:iF,contextmenu:null,dir:[`ltr`,`rtl`,`auto`],draggable:[`true`,`false`,`auto`],dropzone:[`copy`,`move`,`link`,`string:`,`file:`],hidden:[`hidden`],id:null,inert:[`inert`],itemid:null,itemprop:null,itemref:null,itemscope:[`itemscope`],itemtype:null,lang:[`ar`,`bn`,`de`,`en-GB`,`en-US`,`es`,`fr`,`hi`,`id`,`ja`,`pa`,`pt`,`ru`,`tr`,`zh`],spellcheck:iF,autocorrect:iF,autocapitalize:iF,style:null,tabindex:null,title:null,translate:[`yes`,`no`],rel:[`stylesheet`,`alternate`,`author`,`bookmark`,`help`,`license`,`next`,`nofollow`,`noreferrer`,`prefetch`,`prev`,`search`,`tag`],role:`alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer`.split(` `),"aria-activedescendant":null,"aria-atomic":iF,"aria-autocomplete":[`inline`,`list`,`both`,`none`],"aria-busy":iF,"aria-checked":[`true`,`false`,`mixed`,`undefined`],"aria-controls":null,"aria-describedby":null,"aria-disabled":iF,"aria-dropeffect":null,"aria-expanded":[`true`,`false`,`undefined`],"aria-flowto":null,"aria-grabbed":[`true`,`false`,`undefined`],"aria-haspopup":iF,"aria-hidden":iF,"aria-invalid":[`true`,`false`,`grammar`,`spelling`],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":[`off`,`polite`,`assertive`],"aria-multiline":iF,"aria-multiselectable":iF,"aria-owns":null,"aria-posinset":null,"aria-pressed":[`true`,`false`,`mixed`,`undefined`],"aria-readonly":iF,"aria-relevant":null,"aria-required":iF,"aria-selected":[`true`,`false`,`undefined`],"aria-setsize":null,"aria-sort":[`ascending`,`descending`,`none`,`other`],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},cF=`beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload`.split(` `).map(e=>`on`+e);for(let e of cF)sF[e]=null;var lF=class{constructor(e,t){this.tags={...oF,...e},this.globalAttrs={...sF,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};lF.default=new lF;function uF(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}function dF(e,t=!1){for(;e;e=e.parent)if(e.name==`Element`){if(t)t=!1;else return e}return null}function fF(e,t,n){return n.tags[uF(e,dF(t))]?.children||n.allTags}function pF(e,t){let n=[];for(let r=dF(t);r&&!r.type.isTop;r=dF(r.parent)){let i=uF(e,r);if(i&&r.lastChild.name==`CloseTag`)break;i&&n.indexOf(i)<0&&(t.name==`EndTag`||t.from>=r.firstChild.to)&&n.push(i)}return n}var mF=/^[:\-\.\w\u00b7-\uffff]*$/;function hF(e,t,n,r,i){let a=/\s*>/.test(e.sliceDoc(i,i+5))?``:`>`,o=dF(n,n.name==`StartTag`||n.name==`TagName`);return{from:r,to:i,options:fF(e.doc,o,t).map(e=>({label:e,type:`type`})).concat(pF(e.doc,n).map((e,t)=>({label:`/`+e,apply:`/`+e+a,type:`type`,boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function gF(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?``:`>`;return{from:n,to:r,options:pF(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:`type`,boost:99-t})),validFor:mF}}function _F(e,t,n,r){let i=[],a=0;for(let r of fF(e.doc,n,t))i.push({label:`<`+r,type:`type`});for(let t of pF(e.doc,n))i.push({label:`</`+t+`>`,type:`type`,boost:99-a++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function vF(e,t,n,r,i){let a=dF(n),o=a?t.tags[uF(e.doc,a)]:null,s=o&&o.attrs?Object.keys(o.attrs):[];return{from:r,to:i,options:(o&&o.globalAttrs===!1?s:s.length?s.concat(t.globalAttrNames):t.globalAttrNames).map(e=>({label:e,type:`property`})),validFor:mF}}function yF(e,t,n,r,i){let a=n.parent?.getChild(`AttributeName`),o=[],s;if(a){let c=e.sliceDoc(a.from,a.to),l=t.globalAttrs[c];if(!l){let r=dF(n),i=r?t.tags[uF(e.doc,r)]:null;l=i?.attrs&&i.attrs[c]}if(l){let t=e.sliceDoc(r,i).toLowerCase(),n=`"`,a=`"`;/^['"]/.test(t)?(s=t[0]==`"`?/^[^"]*$/:/^[^']*$/,n=``,a=e.sliceDoc(i,i+1)==t[0]?``:t[0],t=t.slice(1),r++):s=/^[^\s<>='"]*$/;for(let e of l)o.push({label:e,apply:n+e+a,type:`constant`})}}return{from:r,to:i,options:o,validFor:s}}function bF(e,n){let{state:r,pos:i}=n,a=t(r).resolveInner(i,-1),o=a.resolve(i);for(let e=i,t;o==a&&(t=a.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from<n.to)break;o=a=t,e=n.from}return a.name==`TagName`?a.parent&&/CloseTag$/.test(a.parent.name)?gF(r,a,a.from,i):hF(r,e,a,a.from,i):a.name==`StartTag`||a.name==`IncompleteTag`?hF(r,e,a,i,i):a.name==`StartCloseTag`||a.name==`IncompleteCloseTag`?gF(r,a,i,i):a.name==`OpenTag`||a.name==`SelfClosingTag`||a.name==`AttributeName`?vF(r,e,a,a.name==`AttributeName`?a.from:i,i):a.name==`Is`||a.name==`AttributeValue`||a.name==`UnquotedAttributeValue`?yF(r,e,a,a.name==`Is`?i:a.from,i):n.explicit&&(o.name==`Element`||o.name==`Text`||o.name==`Document`)?_F(r,e,a,i):null}function xF(e){return bF(lF.default,e)}function SF(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new lF(t,n):lF.default;return e=>bF(r,e)}var CF=BP.parser.configure({top:`SingleExpression`}),wF=[{tag:`script`,attrs:e=>e.type==`text/typescript`||e.lang==`ts`,parser:HP.parser},{tag:`script`,attrs:e=>e.type==`text/babel`||e.type==`text/jsx`,parser:UP.parser},{tag:`script`,attrs:e=>e.type==`text/typescript-jsx`,parser:WP.parser},{tag:`script`,attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:CF},{tag:`script`,attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:BP.parser},{tag:`style`,attrs(e){return(!e.lang||e.lang==`css`)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:WN.parser}],TF=[{name:`style`,parser:WN.parser.configure({top:`Styles`})}].concat(cF.map(e=>({name:e,parser:BP.parser}))),EF=Ne.define({name:`html`,parser:VM.configure({props:[r.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let n=e.node;;){let e=n.lastChild;if(!e||e.name!=`Element`||e.to!=n.to)break;t=n=e}return t&&!((n=t.lastChild)&&(n.name==`CloseTag`||n.name==`SelfClosingTag`))?e.lineIndent(t.from)+e.unit:null}}),He.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),Oe.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:`-_`}}),DF=EF.configure({wrap:GM(wF,TF)});function OF(e={}){let t=``,n;e.matchClosingTags===!1&&(t=`noMatch`),e.selfClosingTags===!0&&(t=(t?t+` `:``)+`selfClosing`),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(n=GM((e.nestedLanguages||[]).concat(wF),(e.nestedAttributes||[]).concat(TF)));let r=n?EF.configure({wrap:n,dialect:t}):t?DF.configure({dialect:t}):DF;return new Le(r,[DF.data.of({autocomplete:SF(e)}),e.autoCloseTags===!1?[]:jF,JP().support,GN().support])}var kF=new Set(`area base br col command embed frame hr img input keygen link meta param source track wbr menuitem`.split(` `));function AF(e,t,n){for(;;){if(t.lastChild?.name!=`CloseTag`)return!1;let r=t.parent;if(!r||uF(e,r)!=n)return!0;t=r}}var jF=C.inputHandler.of((e,n,r,i,a)=>{if(e.composing||e.state.readOnly||n!=r||i!=`>`&&i!=`/`||!DF.isActiveAt(e.state,n,-1))return!1;let o=a(),{state:s}=o,c=s.changeByRange(e=>{let n=s.doc.sliceString(e.from-1,e.to)==i,{head:r}=e,a=t(s).resolveInner(r,-1),o;if(n&&i==`>`&&a.name==`EndTag`){let t=a.parent;if((o=uF(s.doc,t.parent,r))&&!kF.has(o)&&!AF(s.doc,t.parent,o))return{range:e,changes:{from:r,to:r+ +(s.doc.sliceString(r,r+1)===`>`),insert:`</${o}>`}}}else if(n&&i==`/`&&a.name==`IncompleteCloseTag`){let e=a.parent;if(a.from==r-2&&e.lastChild?.name!=`CloseTag`&&(o=uF(s.doc,e,r))&&!kF.has(o)){let e=r+ +(s.doc.sliceString(r,r+1)===`>`),t=`${o}>`;return{range:Te.cursor(r+t.length,-1),changes:{from:r,to:e,insert:t}}}}return{range:e}});return!c.changes.empty&&(e.dispatch([o,s.update(c,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),MF=Ke({commonmarkLanguage:()=>VF,deleteMarkupBackward:()=>tI,insertNewlineContinueMarkup:()=>XF,insertNewlineContinueMarkupCommand:()=>YF,markdown:()=>iI,markdownKeymap:()=>nI,markdownLanguage:()=>HF,pasteURLAsLink:()=>lI}),NF=he({commentTokens:{block:{open:`<!--`,close:`-->`}}}),PF=new o,FF=Lle.configure({props:[He.add(e=>!e.is(`Block`)||e.is(`Document`)||IF(e)!=null||LF(e)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),PF.add(IF),r.add({Document:()=>null}),a.add({Document:NF})]});function IF(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function LF(e){return e.name==`OrderedList`||e.name==`BulletList`}function RF(e,t){let n=e;for(;;){let e=n.nextSibling,r;if(!e||(r=IF(e.type))!=null&&r<=t)break;n=e}return n.to}var zF=oe.of((e,n,r)=>{for(let i=t(e).resolveInner(r,-1);i&&!(i.from<n);i=i.parent){let e=i.type.prop(PF);if(e==null)continue;let t=RF(i,e);if(t>r)return{from:r,to:t}}return null});function BF(e){return new se(NF,e,[],`markdown`)}var VF=BF(FF),HF=BF(FF.configure([jj,Pj,Nj,Fj,{props:[He.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]));function UF(e,t){return n=>{if(n&&e){let t=null;if(n=/\S*/.exec(n)[0],t=typeof e==`function`?e(n):E.matchLanguageName(e,n,!0),t instanceof E)return t.support?t.support.language.parser:le.getSkippingParser(t.load());if(t)return t.parser}return t?t.parser:null}}var WF=class{constructor(e,t,n,r,i,a,o){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=i,this.type=a,this.item=o}blank(e,t=!0){let n=this.spaceBefore+(this.node.name==`Blockquote`?`>`:``);if(e!=null){for(;n.length<e;)n+=` `;return n}for(let e=this.to-this.from-n.length-this.spaceAfter.length;e>0;e--)n+=` `;return n+(t?this.spaceAfter:``)}marker(e,t){let n=this.node.name==`OrderedList`?String(+KF(this.item,e)[2]+t):``;return this.spaceBefore+n+this.type+this.spaceAfter}};function GF(e,t){let n=[],r=[];for(let t=e;t;t=t.parent){if(t.name==`FencedCode`)return r;(t.name==`ListItem`||t.name==`Blockquote`)&&n.push(t)}for(let e=n.length-1;e>=0;e--){let i=n[e],a,o=t.lineAt(i.from),s=i.from-o.from;if(i.name==`Blockquote`&&(a=/^ *>( ?)/.exec(o.text.slice(s))))r.push(new WF(i,s,s+a[0].length,``,a[1],`>`,null));else if(i.name==`ListItem`&&i.parent.name==`OrderedList`&&(a=/^( *)\d+([.)])( *)/.exec(o.text.slice(s)))){let e=a[3],t=a[0].length;e.length>=4&&(e=e.slice(0,e.length-4),t-=4),r.push(new WF(i.parent,s,s+t,a[1],e,a[2],i))}else if(i.name==`ListItem`&&i.parent.name==`BulletList`&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(s)))){let e=a[4],t=a[0].length;e.length>4&&(e=e.slice(0,e.length-4),t-=4);let n=a[2];a[3]&&(n+=a[3].replace(/[xX]/,` `)),r.push(new WF(i.parent,s,s+t,a[1],e,n,i))}}return r}function KF(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function qF(e,t,n,r=0){for(let i=-1,a=e;;){if(a.name==`ListItem`){let e=KF(a,t),o=+e[2];if(i>=0){if(o!=i+1)return;n.push({from:a.from+e[1].length,to:a.from+e[0].length,insert:String(i+2+r)})}i=o}let e=a.nextSibling;if(!e)break;a=e}}function JF(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(b)!=` `)return e;let r=ge(e,4,n),i=``;for(let e=r;e>0;)e>=4?(i+=` `,e-=4):(i+=` `,e--);return i+e.slice(n)}var YF=(e={})=>({state:n,dispatch:r})=>{let i=t(n),{doc:a}=n,o=null,s=n.changeByRange(t=>{if(!t.empty||!HF.isActiveAt(n,t.from,-1)&&!HF.isActiveAt(n,t.from,1))return o={range:t};let r=t.from,s=a.lineAt(r),c=GF(i.resolveInner(r,-1),a);for(;c.length&&c[c.length-1].from>r-s.from;)c.pop();if(!c.length)return o={range:t};let l=c[c.length-1];if(l.to-l.spaceAfter.length>r-s.from)return o={range:t};let u=r>=l.to-l.spaceAfter.length&&!/\S/.test(s.text.slice(l.to));if(l.item&&u){if(l.item.from<s.from&&!/^[\s>]*$/.test(s.text.slice(0,l.to)))return o={range:t};let i=l.node.firstChild,u=l.node.getChild(`ListItem`,`ListItem`);if(i.to>=r||u&&u.to<r||s.from>0&&!/[^\s>]/.test(a.lineAt(s.from-1).text)||e.nonTightLists===!1){let e=c.length>1?c[c.length-2]:null,t,n=``;e&&e.item?(t=s.from+e.from,n=e.marker(a,1)):t=s.from+(e?e.to:0);let i=[{from:t,to:r,insert:n}];return l.node.name==`OrderedList`&&qF(l.item,a,i,-2),e&&e.node.name==`OrderedList`&&qF(e.item,a,i),{range:Te.cursor(t+n.length),changes:i}}{let e=$F(c,n,s);return{range:Te.cursor(r+e.length+1),changes:{from:s.from,insert:e+n.lineBreak}}}}if(l.node.name==`Blockquote`&&u&&s.from){let e=a.lineAt(s.from-1),r=/>\s*$/.exec(e.text);if(r&&r.index==l.from){let i=n.changes([{from:e.from+r.index,to:e.to},{from:s.from+l.from,to:s.to}]);return{range:t.map(i),changes:i}}}let d=[];l.node.name==`OrderedList`&&qF(l.item,a,d);let f=l.item&&l.item.from<s.from,p=``;if(!f||/^[\s\d.)\-+*>]*/.exec(s.text)[0].length>=l.to)for(let e=0,t=c.length-1;e<=t;e++)p+=e==t&&!f?c[e].marker(a,1):c[e].blank(e<t?ge(s.text,4,c[e+1].from)-p.length:null);let m=r;for(;m>s.from&&/\s/.test(s.text.charAt(m-s.from-1));)m--;return p=JF(p,n),QF(l.node,n.doc)&&(p=$F(c,n,s)+n.lineBreak+p),d.push({from:m,to:r,insert:n.lineBreak+p}),{range:Te.cursor(m+p.length+1),changes:d}});return!o&&(r(n.update(s,{scrollIntoView:!0,userEvent:`input`})),!0)},XF=YF();function ZF(e){return e.name==`QuoteMark`||e.name==`ListMark`}function QF(e,t){if(e.name!=`OrderedList`&&e.name!=`BulletList`)return!1;let n=e.firstChild,r=e.getChild(`ListItem`,`ListItem`);if(!r)return!1;let i=t.lineAt(n.to),a=t.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+ +!o<a.number}function $F(e,t,n){let r=``;for(let t=0,i=e.length-2;t<=i;t++)r+=e[t].blank(t<i?ge(n.text,4,e[t+1].from)-r.length:null,t<i);return JF(r,t)}function eI(e,t){let n=e.resolveInner(t,-1),r=t;ZF(n)&&(r=n.from,n=n.parent);for(let e;e=n.childBefore(r);)if(ZF(e))r=e.from;else if(e.name==`OrderedList`||e.name==`BulletList`)n=e.lastChild,r=n.to;else break;return n}var tI=({state:e,dispatch:n})=>{let r=t(e),i=null,a=e.changeByRange(t=>{let n=t.from,{doc:a}=e;if(t.empty&&HF.isActiveAt(e,t.from)){let t=a.lineAt(n),i=GF(eI(r,n),a);if(i.length){let r=i[i.length-1],a=r.to-r.spaceAfter.length+ +!!r.spaceAfter;if(n-t.from>a&&!/\S/.test(t.text.slice(a,n-t.from)))return{range:Te.cursor(t.from+a),changes:{from:t.from+a,to:n}};if(n-t.from==a&&(r.item&&t.from<=r.item.from||/^[\s>]*$/.test(t.text.slice(0,r.to)))){let i=t.from+r.from;if(r.item&&r.node.from<r.item.from&&/\S/.test(t.text.slice(r.from,r.to))){let n=r.blank(ge(t.text,4,r.to)-ge(t.text,4,r.from));return i==t.from&&(n=JF(n,e)),{range:Te.cursor(i+n.length),changes:{from:i,to:t.from+r.to,insert:n}}}if(i<n)return{range:Te.cursor(i),changes:{from:i,to:n}}}}}return i={range:t}});return!i&&(n(e.update(a,{scrollIntoView:!0,userEvent:`delete`})),!0)},nI=[{key:`Enter`,run:XF},{key:`Backspace`,run:tI}],rI=OF({matchClosingTags:!1});function iI(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:i}=VF,completeHTMLTags:a=!0,pasteURLAsLink:o=!0,htmlTagLanguage:s=rI}=e;if(!(i instanceof XA))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=e.extensions?[e.extensions]:[],l=[s.support,zF],d;o&&l.push(lI),n instanceof Le?(l.push(n.support),d=n.language):n&&(d=n);let f=t||d?UF(t,d):void 0;c.push(zle({codeParser:f,htmlParser:s.language.parser})),r&&l.push(De.high(u.of(nI)));let p=BF(i.configure(c));return a&&l.push(p.data.of({autocomplete:aI})),new Le(p,l)}function aI(e){let{state:n,pos:r}=e,i=/<[:\-\.\w\u00b7-\uffff]*$/.exec(n.sliceDoc(r-25,r));if(!i)return null;let a=t(n).resolveInner(r,-1);for(;a&&!a.type.isTop;){if(a.name==`CodeBlock`||a.name==`FencedCode`||a.name==`ProcessingInstructionBlock`||a.name==`CommentBlock`||a.name==`Link`||a.name==`Image`)return null;a=a.parent}return{from:r-i[0].length,to:r,options:sI(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var oI=null;function sI(){if(oI)return oI;let e=xF(new AO(Me.create({extensions:rI}),0,!0));return oI=e?e.options:[]}var cI=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,lI=C.domEventHandlers({paste:(e,n)=>{let{main:r}=n.state.selection;if(r.empty)return!1;let i=e.clipboardData?.getData(`text/plain`);if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i=`https://`+i),!HF.isActiveAt(n.state,r.from,1)))return!1;let a=t(n.state),o=!1;return a.iterate({from:r.from,to:r.to,enter:e=>{(e.from>r.from||cI.test(e.name))&&(o=!0)},leave:e=>{e.to<r.to&&(o=!0)}}),!o&&(n.dispatch({changes:[{from:r.from,insert:`[`},{from:r.to,insert:`](${i})`}],userEvent:`input.paste`,scrollIntoView:!0}),!0)}});function Q(e){return new Le(de.define(e))}function uI(e){return Z(()=>import(`./dist-CJI9XKY6.js`).then(t=>t.sql({dialect:t[e]})),__vite__mapDeps([125,126]))}var dI=[E.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return Z(()=>import(`./dist-TxQM6vOw.js`).then(e=>e.cpp()),__vite__mapDeps([127,126]))}}),E.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return Z(()=>import(`./dist-TxQM6vOw.js`).then(e=>e.cpp()),__vite__mapDeps([127,126]))}}),E.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return uI(`Cassandra`)}}),E.of({name:`CSS`,extensions:[`css`],load(){return Z(()=>Promise.resolve().then(()=>ON).then(e=>e.css()),void 0)}}),E.of({name:`Go`,extensions:[`go`],load(){return Z(()=>import(`./dist-DOXluTcG.js`).then(e=>e.go()),__vite__mapDeps([128,126]))}}),E.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return Z(()=>Promise.resolve().then(()=>$P).then(e=>e.html()),void 0)}}),E.of({name:`Java`,extensions:[`java`],load(){return Z(()=>import(`./dist-DXn_f-MA.js`).then(e=>e.java()),__vite__mapDeps([129,126]))}}),E.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return Z(()=>Promise.resolve().then(()=>OP).then(e=>e.javascript()),void 0)}}),E.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return Z(()=>import(`./dist-BWCMQAHO.js`).then(e=>e.jinja()),__vite__mapDeps([130,126]))}}),E.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return Z(()=>import(`./dist-BubrR0xG.js`).then(e=>e.json()),__vite__mapDeps([131,126]))}}),E.of({name:`JSX`,extensions:[`jsx`],load(){return Z(()=>Promise.resolve().then(()=>OP).then(e=>e.javascript({jsx:!0})),void 0)}}),E.of({name:`LESS`,extensions:[`less`],load(){return Z(()=>import(`./dist-R5oGZF-x.js`).then(e=>e.less()),__vite__mapDeps([132,126]))}}),E.of({name:`Liquid`,extensions:[`liquid`],load(){return Z(()=>import(`./dist-ryZq9scv.js`).then(e=>e.liquid()),__vite__mapDeps([133,126]))}}),E.of({name:`MariaDB SQL`,load(){return uI(`MariaSQL`)}}),E.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return Z(()=>Promise.resolve().then(()=>MF).then(e=>e.markdown()),void 0)}}),E.of({name:`MS SQL`,load(){return uI(`MSSQL`)}}),E.of({name:`MySQL`,load(){return uI(`MySQL`)}}),E.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return Z(()=>import(`./dist-szzEpuzi.js`).then(e=>e.php()),__vite__mapDeps([134,126]))}}),E.of({name:`PLSQL`,extensions:[`pls`],load(){return uI(`PLSQL`)}}),E.of({name:`PostgreSQL`,load(){return uI(`PostgreSQL`)}}),E.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return Z(()=>import(`./dist-BdX-zXTt.js`).then(e=>e.python()),__vite__mapDeps([135,126]))}}),E.of({name:`Rust`,extensions:[`rs`],load(){return Z(()=>import(`./dist-CfuU_6ln.js`).then(e=>e.rust()),__vite__mapDeps([136,126]))}}),E.of({name:`Sass`,extensions:[`sass`],load(){return Z(()=>import(`./dist-C3j3DCXP.js`).then(e=>e.sass({indented:!0})),__vite__mapDeps([137,126]))}}),E.of({name:`SCSS`,extensions:[`scss`],load(){return Z(()=>import(`./dist-C3j3DCXP.js`).then(e=>e.sass()),__vite__mapDeps([137,126]))}}),E.of({name:`SQL`,extensions:[`sql`],load(){return uI(`StandardSQL`)}}),E.of({name:`SQLite`,load(){return uI(`SQLite`)}}),E.of({name:`TSX`,extensions:[`tsx`],load(){return Z(()=>Promise.resolve().then(()=>OP).then(e=>e.javascript({jsx:!0,typescript:!0})),void 0)}}),E.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return Z(()=>Promise.resolve().then(()=>OP).then(e=>e.javascript({typescript:!0})),void 0)}}),E.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return Z(()=>import(`./dist-Lc2Es7Pl.js`).then(e=>e.wast()),__vite__mapDeps([138,126]))}}),E.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return Z(()=>import(`./dist-CjIRqXSt.js`).then(e=>e.xml()),__vite__mapDeps([139,126]))}}),E.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return Z(()=>import(`./dist-D0Ats_4w.js`).then(e=>e.yaml()),__vite__mapDeps([140,126]))}}),E.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return Z(()=>import(`./apl-gfMMiTNf.js`).then(e=>Q(e.apl)),[])}}),E.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return Z(()=>import(`./asciiarmor-C_eisQCp.js`).then(e=>Q(e.asciiArmor)),[])}}),E.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return Z(()=>import(`./asn1-DCl_8MCW.js`).then(e=>Q(e.asn1({}))),[])}}),E.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return Z(()=>import(`./asterisk-BEn0Cwpx.js`).then(e=>Q(e.asterisk)),[])}}),E.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return Z(()=>import(`./brainfuck-D5EjA2JK.js`).then(e=>Q(e.brainfuck)),[])}}),E.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return Z(()=>import(`./cobol-DHLQUbN7.js`).then(e=>Q(e.cobol)),[])}}),E.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.csharp)),[])}}),E.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return Z(()=>import(`./clojure-BflJGmDX.js`).then(e=>Q(e.clojure)),[])}}),E.of({name:`ClojureScript`,extensions:[`cljs`],load(){return Z(()=>import(`./clojure-BflJGmDX.js`).then(e=>Q(e.clojure)),[])}}),E.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return Z(()=>import(`./css-CnaYoQib.js`).then(e=>Q(e.gss)),[])}}),E.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return Z(()=>import(`./cmake-84nbDH0I.js`).then(e=>Q(e.cmake)),[])}}),E.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return Z(()=>import(`./coffeescript-De_zI4J0.js`).then(e=>Q(e.coffeeScript)),[])}}),E.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return Z(()=>import(`./commonlisp-DgAKBe0r.js`).then(e=>Q(e.commonLisp)),[])}}),E.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return Z(()=>import(`./cypher-p9eYesGn.js`).then(e=>Q(e.cypher)),[])}}),E.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return Z(()=>import(`./python-B_1Jd8HM.js`).then(e=>Q(e.cython)),[])}}),E.of({name:`Crystal`,extensions:[`cr`],load(){return Z(()=>import(`./crystal-Bsdphhtm.js`).then(e=>Q(e.crystal)),[])}}),E.of({name:`D`,extensions:[`d`],load(){return Z(()=>import(`./d-DWkQyNnU.js`).then(e=>Q(e.d)),[])}}),E.of({name:`Dart`,extensions:[`dart`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.dart)),[])}}),E.of({name:`diff`,extensions:[`diff`,`patch`],load(){return Z(()=>import(`./diff-ChtP43wD.js`).then(e=>Q(e.diff)),[])}}),E.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return Z(()=>import(`./dockerfile-DJkHQgkl.js`).then(e=>Q(e.dockerFile)),__vite__mapDeps([141,142]))}}),E.of({name:`DTD`,extensions:[`dtd`],load(){return Z(()=>import(`./dtd-DTF72YNO.js`).then(e=>Q(e.dtd)),[])}}),E.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return Z(()=>import(`./dylan-BCDoL_-p.js`).then(e=>Q(e.dylan)),[])}}),E.of({name:`EBNF`,load(){return Z(()=>import(`./ebnf-D4c0_ac3.js`).then(e=>Q(e.ebnf)),[])}}),E.of({name:`ECL`,extensions:[`ecl`],load(){return Z(()=>import(`./ecl-BVIeWmwY.js`).then(e=>Q(e.ecl)),[])}}),E.of({name:`edn`,extensions:[`edn`],load(){return Z(()=>import(`./clojure-BflJGmDX.js`).then(e=>Q(e.clojure)),[])}}),E.of({name:`Eiffel`,extensions:[`e`],load(){return Z(()=>import(`./eiffel-BEjRio4Q.js`).then(e=>Q(e.eiffel)),[])}}),E.of({name:`Elm`,extensions:[`elm`],load(){return Z(()=>import(`./elm-Cshzl8qu.js`).then(e=>Q(e.elm)),[])}}),E.of({name:`Erlang`,extensions:[`erl`],load(){return Z(()=>import(`./erlang-BV0c4Hdn.js`).then(e=>Q(e.erlang)),[])}}),E.of({name:`Esper`,load(){return Z(()=>import(`./sql-DuQMFDvy.js`).then(e=>Q(e.esper)),[])}}),E.of({name:`Factor`,extensions:[`factor`],load(){return Z(()=>import(`./factor-LKH5gN8L.js`).then(e=>Q(e.factor)),__vite__mapDeps([143,142]))}}),E.of({name:`FCL`,load(){return Z(()=>import(`./fcl-ClOhbFR7.js`).then(e=>Q(e.fcl)),[])}}),E.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return Z(()=>import(`./forth-Cezjo90N.js`).then(e=>Q(e.forth)),[])}}),E.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return Z(()=>import(`./fortran-Bt6PBEDR.js`).then(e=>Q(e.fortran)),[])}}),E.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return Z(()=>import(`./mllike-B45xgp2S.js`).then(e=>Q(e.fSharp)),[])}}),E.of({name:`Gas`,extensions:[`s`],load(){return Z(()=>import(`./gas-BHEdbvp9.js`).then(e=>Q(e.gas)),[])}}),E.of({name:`Gherkin`,extensions:[`feature`],load(){return Z(()=>import(`./gherkin-oBAE_ms0.js`).then(e=>Q(e.gherkin)),[])}}),E.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return Z(()=>import(`./groovy-CUpZ7dEl.js`).then(e=>Q(e.groovy)),[])}}),E.of({name:`Haskell`,extensions:[`hs`],load(){return Z(()=>import(`./haskell-BRsoo5mP.js`).then(e=>Q(e.haskell)),[])}}),E.of({name:`Haxe`,extensions:[`hx`],load(){return Z(()=>import(`./haxe-DjVOVvNP.js`).then(e=>Q(e.haxe)),[])}}),E.of({name:`HXML`,extensions:[`hxml`],load(){return Z(()=>import(`./haxe-DjVOVvNP.js`).then(e=>Q(e.hxml)),[])}}),E.of({name:`HTTP`,load(){return Z(()=>import(`./http-CLVgA2GD.js`).then(e=>Q(e.http)),[])}}),E.of({name:`IDL`,extensions:[`pro`],load(){return Z(()=>import(`./idl-BUZw3wgd.js`).then(e=>Q(e.idl)),[])}}),E.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return Z(()=>import(`./javascript-DoL9Wb-Q.js`).then(e=>Q(e.jsonld)),[])}}),E.of({name:`Julia`,extensions:[`jl`],load(){return Z(()=>import(`./julia-CQfgDRfP.js`).then(e=>Q(e.julia)),[])}}),E.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.kotlin)),[])}}),E.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return Z(()=>import(`./livescript-BXxG0Yva.js`).then(e=>Q(e.liveScript)),[])}}),E.of({name:`Lua`,extensions:[`lua`],load(){return Z(()=>import(`./lua-CiA1ziua.js`).then(e=>Q(e.lua)),[])}}),E.of({name:`mIRC`,extensions:[`mrc`],load(){return Z(()=>import(`./mirc-C9zpzAZU.js`).then(e=>Q(e.mirc)),[])}}),E.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return Z(()=>import(`./mathematica-u8YMmbU0.js`).then(e=>Q(e.mathematica)),[])}}),E.of({name:`Modelica`,extensions:[`mo`],load(){return Z(()=>import(`./modelica-CqHI_q-D.js`).then(e=>Q(e.modelica)),[])}}),E.of({name:`MUMPS`,extensions:[`mps`],load(){return Z(()=>import(`./mumps-BSzj6Xyz.js`).then(e=>Q(e.mumps)),[])}}),E.of({name:`Mbox`,extensions:[`mbox`],load(){return Z(()=>import(`./mbox-BEMVcqjs.js`).then(e=>Q(e.mbox)),[])}}),E.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return Z(()=>import(`./nginx-BMaDbqW3.js`).then(e=>Q(e.nginx)),[])}}),E.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return Z(()=>import(`./nsis-CfSuhXs5.js`).then(e=>Q(e.nsis)),__vite__mapDeps([144,142]))}}),E.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return Z(()=>import(`./ntriples-B9h1VB_g.js`).then(e=>Q(e.ntriples)),[])}}),E.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.objectiveC)),[])}}),E.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.objectiveCpp)),[])}}),E.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return Z(()=>import(`./mllike-B45xgp2S.js`).then(e=>Q(e.oCaml)),[])}}),E.of({name:`Octave`,extensions:[`m`],load(){return Z(()=>import(`./octave-D2Q8cUp1.js`).then(e=>Q(e.octave)),[])}}),E.of({name:`Oz`,extensions:[`oz`],load(){return Z(()=>import(`./oz-BwTct_5T.js`).then(e=>Q(e.oz)),[])}}),E.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return Z(()=>import(`./pascal-Dp_KdFgX.js`).then(e=>Q(e.pascal)),[])}}),E.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return Z(()=>import(`./perl-BkSkiI9m.js`).then(e=>Q(e.perl)),[])}}),E.of({name:`Pig`,extensions:[`pig`],load(){return Z(()=>import(`./pig-AF4Hwhju.js`).then(e=>Q(e.pig)),[])}}),E.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return Z(()=>import(`./powershell-BcIto6Sf.js`).then(e=>Q(e.powerShell)),[])}}),E.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return Z(()=>import(`./properties-C357ku5U.js`).then(e=>Q(e.properties)),[])}}),E.of({name:`ProtoBuf`,extensions:[`proto`],load(){return Z(()=>import(`./protobuf-D1ij_kNL.js`).then(e=>Q(e.protobuf)),[])}}),E.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return Z(()=>import(`./pug-Gsm0M45u.js`).then(e=>Q(e.pug)),__vite__mapDeps([145,146]))}}),E.of({name:`Puppet`,extensions:[`pp`],load(){return Z(()=>import(`./puppet-BZyAS7I4.js`).then(e=>Q(e.puppet)),[])}}),E.of({name:`Q`,extensions:[`q`],load(){return Z(()=>import(`./q-B9NhS7L_.js`).then(e=>Q(e.q)),[])}}),E.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return Z(()=>import(`./r-CxDmU1I4.js`).then(e=>Q(e.r)),[])}}),E.of({name:`RPM Changes`,load(){return Z(()=>import(`./rpm-gpDK5sbt.js`).then(e=>Q(e.rpmChanges)),[])}}),E.of({name:`RPM Spec`,extensions:[`spec`],load(){return Z(()=>import(`./rpm-gpDK5sbt.js`).then(e=>Q(e.rpmSpec)),[])}}),E.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return Z(()=>import(`./ruby-BjXV7-Qa.js`).then(e=>Q(e.ruby)),[])}}),E.of({name:`SAS`,extensions:[`sas`],load(){return Z(()=>import(`./sas-C2OyD2Y6.js`).then(e=>Q(e.sas)),[])}}),E.of({name:`Scala`,extensions:[`scala`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.scala)),[])}}),E.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return Z(()=>import(`./scheme-D9qYN0V5.js`).then(e=>Q(e.scheme)),[])}}),E.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return Z(()=>import(`./shell-DwuoZtxw.js`).then(e=>Q(e.shell)),[])}}),E.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return Z(()=>import(`./sieve-BAxa3IjF.js`).then(e=>Q(e.sieve)),[])}}),E.of({name:`Smalltalk`,extensions:[`st`],load(){return Z(()=>import(`./smalltalk-BLp5-jwC.js`).then(e=>Q(e.smalltalk)),[])}}),E.of({name:`Solr`,load(){return Z(()=>import(`./solr-BBopId9w.js`).then(e=>Q(e.solr)),[])}}),E.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return Z(()=>import(`./mllike-B45xgp2S.js`).then(e=>Q(e.sml)),[])}}),E.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return Z(()=>import(`./sparql-Dz-mlCAC.js`).then(e=>Q(e.sparql)),[])}}),E.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return Z(()=>import(`./spreadsheet-CTIncYxj.js`).then(e=>Q(e.spreadsheet)),[])}}),E.of({name:`Squirrel`,extensions:[`nut`],load(){return Z(()=>import(`./clike-D_6L3tnO.js`).then(e=>Q(e.squirrel)),[])}}),E.of({name:`Stylus`,extensions:[`styl`],load(){return Z(()=>import(`./stylus-BOVgKnng.js`).then(e=>Q(e.stylus)),[])}}),E.of({name:`Swift`,extensions:[`swift`],load(){return Z(()=>import(`./swift-DKB6_1j6.js`).then(e=>Q(e.swift)),[])}}),E.of({name:`sTeX`,load(){return Z(()=>import(`./stex-DNzd62Q_.js`).then(e=>Q(e.stex)),[])}}),E.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return Z(()=>import(`./stex-DNzd62Q_.js`).then(e=>Q(e.stex)),[])}}),E.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return Z(()=>import(`./verilog-7LoJAqYT.js`).then(e=>Q(e.verilog)),[])}}),E.of({name:`Tcl`,extensions:[`tcl`],load(){return Z(()=>import(`./tcl-BGfruO1u.js`).then(e=>Q(e.tcl)),[])}}),E.of({name:`Textile`,extensions:[`textile`],load(){return Z(()=>import(`./textile-C4jVoHG1.js`).then(e=>Q(e.textile)),[])}}),E.of({name:`TiddlyWiki`,load(){return Z(()=>import(`./tiddlywiki-VlUiK86J.js`).then(e=>Q(e.tiddlyWiki)),[])}}),E.of({name:`Tiki wiki`,load(){return Z(()=>import(`./tiki-AK6FwT8q.js`).then(e=>Q(e.tiki)),[])}}),E.of({name:`TOML`,extensions:[`toml`],load(){return Z(()=>import(`./toml-BPTmHmyx.js`).then(e=>Q(e.toml)),[])}}),E.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return Z(()=>import(`./troff-C2dAgh7P.js`).then(e=>Q(e.troff)),[])}}),E.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return Z(()=>import(`./ttcn-PPSTk1ow.js`).then(e=>Q(e.ttcn)),[])}}),E.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return Z(()=>import(`./ttcn-cfg-2b4Gb5sE.js`).then(e=>Q(e.ttcnCfg)),[])}}),E.of({name:`Turtle`,extensions:[`ttl`],load(){return Z(()=>import(`./turtle-Cx3rYX2g.js`).then(e=>Q(e.turtle)),[])}}),E.of({name:`Web IDL`,extensions:[`webidl`],load(){return Z(()=>import(`./webidl-D5jiJvOU.js`).then(e=>Q(e.webIDL)),[])}}),E.of({name:`VB.NET`,extensions:[`vb`],load(){return Z(()=>import(`./vb-BthdM_4N.js`).then(e=>Q(e.vb)),[])}}),E.of({name:`VBScript`,extensions:[`vbs`],load(){return Z(()=>import(`./vbscript-D9f6rSsU.js`).then(e=>Q(e.vbScript)),[])}}),E.of({name:`Velocity`,extensions:[`vtl`],load(){return Z(()=>import(`./velocity-CqftRsjg.js`).then(e=>Q(e.velocity)),[])}}),E.of({name:`Verilog`,extensions:[`v`],load(){return Z(()=>import(`./verilog-7LoJAqYT.js`).then(e=>Q(e.verilog)),[])}}),E.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return Z(()=>import(`./vhdl-kS471soi.js`).then(e=>Q(e.vhdl)),[])}}),E.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return Z(()=>import(`./xquery-BKJx4mf9.js`).then(e=>Q(e.xQuery)),[])}}),E.of({name:`Yacas`,extensions:[`ys`],load(){return Z(()=>import(`./yacas-CXXgtw0p.js`).then(e=>Q(e.yacas)),[])}}),E.of({name:`Z80`,extensions:[`z80`],load(){return Z(()=>import(`./z80-Co3PbHdE.js`).then(e=>Q(e.z80)),[])}}),E.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return Z(()=>import(`./mscgen-qgSLujhx.js`).then(e=>Q(e.mscgen)),[])}}),E.of({name:`Xù`,extensions:[`xu`],load(){return Z(()=>import(`./mscgen-qgSLujhx.js`).then(e=>Q(e.xu)),[])}}),E.of({name:`MsGenny`,extensions:[`msgenny`],load(){return Z(()=>import(`./mscgen-qgSLujhx.js`).then(e=>Q(e.msgenny)),[])}}),E.of({name:`Vue`,extensions:[`vue`],load(){return Z(()=>import(`./dist-CUrPqCJM.js`).then(e=>e.vue()),__vite__mapDeps([147,126]))}}),E.of({name:`Angular Template`,load(){return Z(()=>import(`./dist-DyhOeNTK.js`).then(e=>e.angular()),__vite__mapDeps([148,126]))}})],fI=Ns(`caret.completionPreview`,[`on`,`off`],`off`),pI=()=>fI.read()===`on`,mI=e=>fI.write(e?`on`:`off`);function hI(e=()=>!1,t=()=>{}){let n=e();return{on:()=>n,toggle(){n=!n,t(n)}}}var gI=hI(pI,mI),_I=8,vI=96,yI=6e3,bI=`No information found.`,xI=10;function SI(e,t,n){let r=Math.min(Math.max(_I,e.top),Math.max(_I,n.height-_I-vI));return{left:Math.max(_I,t),top:r,maxHeight:n.height-r-_I}}function CI(e,t,n,r=!1){let i=e.right+_I;if(i+t<=n.width-_I)return SI(e,i,n);let a=e.left-_I-t;if(a>=_I)return SI(e,a,n);let o=Math.max(_I,Math.min(e.left,n.width-_I-t));return r?{left:o,bottom:n.height-(e.top-_I),maxHeight:e.top-16}:{left:o,top:e.bottom+_I,maxHeight:n.height-e.bottom-16}}function wI(e,t){let n=t?112:0;return{top:n,left:0,right:e.width,bottom:e.height-n}}function TI(){let e=document.createElement(`div`);e.className=`caret-preview`,e.setAttribute(`role`,`note`);let t=document.createElement(`div`);t.className=`caret-preview-title`;let n=document.createElement(`div`);return n.className=`caret-preview-body`,e.append(t,n),{dom:e,title:t,body:n}}function EI(){let e=document.createElement(`div`);e.className=`caret-preview-loading`,e.setAttribute(`aria-hidden`,`true`);for(let t=0;t<3;t++)e.append(document.createElement(`span`));return e}function DI(){let e=document.createElement(`div`);return e.className=`caret-preview-note`,e.textContent=bI,e}function OI(e,t,n){if(n!==void 0&&n>t.totalLines){let n=document.createElement(`div`);n.className=`caret-preview-note`,n.textContent=`This file ends at line ${t.totalLines}.`,e.append(n)}t.lines.forEach((r,i)=>{let a=t.startLine+i,o=document.createElement(`div`);o.className=a===n?`caret-preview-line caret-preview-marked`:`caret-preview-line`;let s=document.createElement(`span`);s.className=`caret-preview-lineno`,s.textContent=String(a);let c=document.createElement(`span`);c.className=`caret-preview-code`,c.textContent=r,o.append(s,c),e.append(o)})}function kI(e){return e?`to close the preview`:`to preview`}function AI(e){let t=document.createElement(`div`);t.className=`caret-completion-hint`;for(let e of Wae(`editor.previewCompletion`))for(let n of e){let e=document.createElement(`kbd`);e.setAttribute(`data-slot`,`kbd`),e.className=`kbd-sm`,e.textContent=n,t.append(e)}let n=document.createElement(`span`);return n.textContent=kI(e),t.append(n),t}var jI=`caret-completion-preview`;function MI(e,t,n=yI){let r=s.define(r=>new NI(r,e,t,n));return[r,_({tooltipSpace:e=>{let t=e.dom.ownerDocument.documentElement;return wI({width:t.clientWidth,height:t.clientHeight},e.plugin(r)?.isOpen()===!0)}})]}var NI=class{view;toggle;showHints;timeoutMs;dom=null;titleEl=null;bodyEl=null;hint=null;cancel=null;key=null;frame=0;lastPlacedAt=``;still=0;onViewportChange=()=>this.measure();constructor(e,t,n,r){this.view=e,this.toggle=t,this.showHints=n,this.timeoutMs=r,window.addEventListener(`scroll`,this.onViewportChange,!0),window.addEventListener(`resize`,this.onViewportChange),this.update()}isOpen(){return this.dom!==null}update(){let e=fce(this.view.state);e!==null&&(this.toggle.on()&&e.preview!==void 0?this.show(e.preview):this.close()),this.measure()}destroy(){window.removeEventListener(`scroll`,this.onViewportChange,!0),window.removeEventListener(`resize`,this.onViewportChange),this.frame!==0&&cancelAnimationFrame(this.frame),this.frame=0,this.close(),this.hint?.remove(),this.hint=null}measure(){this.view.requestMeasure({key:this,read:()=>{let e=this.view.dom.querySelector(`.cm-tooltip-autocomplete`);return e===null?null:{list:e,listRect:e.getBoundingClientRect(),listAbove:e.classList.contains(`cm-tooltip-above`),width:this.dom?.offsetWidth??0,natural:this.naturalHeight()}},write:e=>{if(e===null){this.close(),this.hint?.remove(),this.hint=null;return}if(this.drawHint(e.list),this.describeSelected(e.list),e.listRect.bottom<0){this.placeNextFrame();return}this.place(e.listRect,e.listAbove,e.width,e.natural);let t=`${e.listRect.top}:${e.listRect.left}:${e.listRect.width}:${e.listRect.height}:${e.listAbove}`;if(t!==this.lastPlacedAt)this.lastPlacedAt=t,this.still=0;else if(this.still>=xI)return;else this.still++;this.measureNextFrame()}})}placeNextFrame(){this.dom!==null&&(this.dom.style.visibility=`hidden`),this.measureNextFrame()}measureNextFrame(){this.frame===0&&(this.frame=requestAnimationFrame(()=>{this.frame=0,this.measure()}))}naturalHeight(){if(this.dom===null||this.titleEl===null||this.bodyEl===null)return 0;let e=this.titleEl.offsetHeight+this.bodyEl.scrollHeight;return e===0?0:e+2}show(e){if(this.dom===null){let e=TI();e.dom.id=jI,document.body.appendChild(e.dom),this.dom=e.dom,this.titleEl=e.title,this.bodyEl=e.body}this.key!==e.key&&this.titleEl!==null&&this.bodyEl!==null&&(this.key=e.key,this.cancel?.(),this.titleEl.textContent=e.title,this.bodyEl.replaceChildren(EI()),this.cancel=this.fetchAnswer(e))}fetchAnswer(e){let t=new AbortController,n=document.createElement(`div`),r=!1,i=e=>{r||t.signal.aborted||this.bodyEl===null||(r=!0,clearTimeout(a),this.bodyEl.replaceChildren(e),this.measure())},a=setTimeout(()=>i(DI()),this.timeoutMs);return e.fill(n,t.signal).then(()=>i(n.hasChildNodes()?n:DI()),()=>i(DI())),()=>{t.abort(),clearTimeout(a)}}close(){this.cancel?.(),this.cancel=null,this.key=null,this.lastPlacedAt=``,this.still=0,this.dom?.remove(),this.dom=null,this.titleEl=null,this.bodyEl=null}place(e,t,n,r){if(this.dom===null)return;let i=document.documentElement,a=CI(e,n,{width:i.clientWidth,height:i.clientHeight},t);this.dom.style.left=`${Math.round(a.left)}px`,this.dom.style.top=a.top===void 0?``:`${Math.round(a.top)}px`,this.dom.style.bottom=a.bottom===void 0?``:`${Math.round(a.bottom)}px`,this.dom.style.maxHeight=`${Math.round(a.maxHeight)}px`,this.dom.style.height=r===0?``:`${Math.round(Math.min(r,a.maxHeight))}px`,this.dom.style.visibility=``}describeSelected(e){let t=e.querySelector(`[aria-selected]`);t!==null&&(this.dom===null?t.removeAttribute(`aria-describedby`):t.setAttribute(`aria-describedby`,jI))}drawHint(e){if(!this.showHints()){this.hint?.remove(),this.hint=null;return}if(this.hint===null)this.hint=AI(this.toggle.on());else{let e=this.hint.lastElementChild;e!==null&&(e.textContent=kI(this.toggle.on()))}e.firstChild!==this.hint&&e.insertBefore(this.hint,e.firstChild)}},PI=/^\s*(`{3,}|~{3,})/,FI=/(`+)(.*?)\1/g,II=/\(([^()\s]+)\)/g,LI=/\bhttps?:\/\/\S+/gi,RI=/[A-Za-z0-9._/~-]+(?:(?::L?|:?#L)\d+(?:[-–,]L?\d+|:\d+)?)?/g,zI=/^(.+?)(?::L?|:?#L)(\d+)(?:[-–,]L?(\d+)|:\d+)?$/;function BI(e){let t=e,n,r,i=zI.exec(e);i&&(t=i[1],n=Number(i[2]),i[3]!==void 0&&(r=Number(i[3]),r<n&&([n,r]=[r,n])));let a=t.replace(/\/+$/,``).split(`/`).pop()??``;return/[A-Za-z]/.test(a)?{path:t,line:n,endLine:r}:null}function VI(e,t,n){return e.some(e=>t<e.end&&n>e.start)}function HI(e){let t=[...e.matchAll(LI)].map(e=>({start:e.index,end:e.index+e[0].length})),n=[];for(let r of e.matchAll(RI)){let e=r[0],i=r.index,a=i+e.length;if(VI(t,i,a))continue;let o=BI(e);o!==null&&n.push({start:i,end:a,path:o.path,line:o.line,endLine:o.endLine})}return n}function UI(e){return e.includes(`/`)||e.includes(`.`)}function WI(e){return e.sort((e,t)=>e.startCol-t.startCol)}function GI(e,t){return{startCol:e+t.start,endCol:e+t.end,path:t.path,line:t.line,endLine:t.endLine}}function KI(e){let t=[],n=[];for(let r of e.matchAll(FI)){n.push({start:r.index,end:r.index+r[0].length});let e=r[2]??``;if(/\s/.test(e.trim()))continue;let i=r.index+(r[1]?.length??0);for(let n of HI(e))t.push(GI(i,n))}for(let r of e.matchAll(II)){if(e[r.index-1]===`]`)continue;let i=r.index;if(VI(n,i,i+r[0].length))continue;let a=i+1;for(let e of HI(r[1]??``))UI(e.path)&&t.push(GI(a,e))}return WI(t)}function qI(e){let t=e.split(`
|
|
2133
2133
|
`),n=new Map,r=!1;for(let e=0;e<t.length;e++){let i=t[e]??``,a=PI.test(i);if(r||a){a&&(r=!r);continue}let o=KI(i);o.length>0&&n.set(e+1,o)}return n}function JI(e,t){let n=new Map;for(let[t,r]of e)n.set(t,WI([...r]));for(let[e,r]of t){let t=n.get(e)??[];for(let e of r){let n=t=>e.startCol<t.endCol&&e.endCol>t.startCol,r=t.find(n);if(r===void 0)t.push(e);else{t=t.filter(e=>!n(e));let i=e.line!==void 0||e.path!==r.path?e:r;t.push({startCol:r.startCol,endCol:r.endCol,path:e.path,line:i.line,endLine:i.endLine,target:e.target})}}n.set(e,t)}for(let e of n.values())WI(e);return n}var YI,XI=new Set,ZI=new Set;function QI(){return YI===void 0&&(YI=B_({langs:[],themes:Ax})),YI}async function $I(e,t){if(t===``||t===`text`)return`text`;if(XI.has(t))return t;try{return await e.loadLanguage(t),XI.add(t),t}catch{return`text`}}async function eL(e,t){if(ec(t))return t;let n=Dx(nc(t));return ZI.has(n)?n:(await e.loadTheme(kx(t)),ZI.add(n),n)}var tL=1024;function nL(e){return e.split(`
|
|
2134
2134
|
`).some(e=>e.length>tL)}function rL(e,t=[]){if(e.type===`element`&&e.properties.class===`line`)t.push(Kh({type:`root`,children:e.children}));else if(`children`in e)for(let n of e.children)rL(n,t);return t}async function iL(e,t,n,r){if(nL(e))return{rows:[]};try{let i=await QI(),a=await eL(i,n),o=await $I(i,t),s=i.codeToHast(e,{lang:o,theme:a,grammarState:r?.themes.includes(a)?r:void 0,...z_});return{rows:rL(s),state:i.getLastGrammarState(s)}}catch{return{rows:[]}}}async function aL(e,t,n){if(nL(e))return null;try{let r=await QI(),i=await eL(r,n),a=await $I(r,t);return a===`text`?null:r.codeToTokensBase(e,{lang:a,theme:i,...z_})}catch{return null}}var oL=/@[^\s@]*/;function sL(e){return e===``||/\s/.test(e)}function cL(e,t){return t===`results`?`First ${e} matches — keep typing to narrow`:`First ${e} matches — this tree is larger than the search reaches`}var lL=/(?::?#L?|:L?)\d*(?:[-–,]L?\d*)?$/;function uL(e){let t=BI(e);if(t===null||t.line===void 0)return{query:e.replace(lL,``),suffix:``};let n=t.endLine===void 0?``:`-${t.endLine}`;return{query:t.path,line:t.line,suffix:`:${t.line}${n}`}}function dL(e,t){let n=t.toLowerCase(),r=[],i=0,a=-1;for(let t=0;t<e.length&&i<n.length;t++)e.charAt(t).toLowerCase()===n.charAt(i)&&(a===t?r[r.length-1]=t+1:r.push(t,t+1),a=t+1,i++);return i===n.length?r:[]}function fL(e){return e===void 0?{start:1,end:20}:{start:Math.max(1,e-9),end:e+10}}function pL(e){return e instanceof ls&&e.status===413?`This file is too large to preview.`:`This file could not be read.`}async function mL(e,t,n){let{rows:r}=await iL(t.lines.join(`
|
|
2135
2135
|
`),t.language,Dc.themeId);if(n.aborted||r.length!==t.lines.length)return;let i=e.querySelectorAll(`.caret-preview-code`);i.length===r.length&&i.forEach((e,t)=>{e.innerHTML=r[t]})}function hL(e,t,n,r){return{title:n,key:`${n}:${r??``}`,fill:async(i,a)=>{let o;try{o=await e(t,n,void 0,fL(r))}catch(e){a.aborted||(i.textContent=pL(e));return}a.aborted||(OI(i,o,r),mL(i,o,a))}}}function gL(e,t=Cs){return n=>async r=>{let i=r.matchBefore(oL);if(i===null||!sL(r.state.sliceDoc(Math.max(0,i.from-1),i.from))||n.cwd===``)return null;let{query:a,line:o,suffix:s}=uL(i.text.slice(1)),{paths:c,stoppedAt:l}=await e(n.reviewId,a);if(c.length===0)return null;let u=l===null?void 0:cL(c.length,l),d=c.map(e=>({label:e,section:u,preview:hL(t,n.reviewId,e,o),apply:`@${e}${s}`}));return{from:i.from,filter:!1,getMatch:e=>dL(e.label,a),options:d}}}var _L=gL(Ss),vL=/\/[\w:.\-/]*/;function yL(e,t){return t===0||/\s/.test(e.state.sliceDoc(t-1,t))}function bL(e,t){return{label:`/${e.name}`,detail:e.origin,preview:t}}var xL=`No description.`;function SL(e,t,n){return{title:`/${n.name}`,key:`${n.origin}:${n.name}`,fill:async(r,i)=>{let a=await e(t,n);i.aborted||(r.textContent=a??xL)}}}function CL(e=Ts){let t=new Map;return function(n){let r=t.get(n);if(r)return r;let i=e(n).then(e=>e===null?(t.delete(n),[]):e).catch(()=>(t.delete(n),[]));return t.set(n,i),i}}var wL=CL();function TL(e,t=Es){let n=e===void 0?wL:CL(e);return e=>async r=>{let i=r.matchBefore(vL);if(!i||!yL(r,i.from))return null;let a=await n(e.reviewId);if(a.length===0)return null;let o=a.map(n=>bL(n,SL(t,e.reviewId,n)));return{from:i.from,options:o,validFor:vL}}}var EL=[_L,TL()];function DL(e){return e.dom.querySelector(`.cm-tooltip-autocomplete`)!==null}function OL(e){let t=e=>t=>DL(t)&&e(t);return De.highest(u.of([{key:`Ctrl-Space`,run:t(t=>(e.toggle(),t.dispatch({}),!0))},{key:`Tab`,run:t($O(!0))},{key:`Shift-Tab`,run:t($O(!1))},{key:`Enter`,run:t(e=>ek(e)?(e.dispatch(e.state.replaceSelection(` `)),!0):!1)}]))}function kL(e,t=EL,n={}){if(e===void 0||t.length===0)return[];let{toggle:r=gI,showHints:i=XS}=n;return[OL(r),cce({icons:!1,override:t.map(t=>t(e))}),MI(r,i)]}function AL(e){return`${e.kind}:${e.key}`}var jL=250,ML=new Set,NL=ce.define(),PL=xe.define({create:()=>ML,update(e,t){for(let e of t.effects)if(e.is(NL))return e.value;return e}});function FL(e){let n=[],r=[];return t(e).iterate({enter:e=>{if(e.name===`InlineCode`)n.push({from:e.from,to:e.to});else if(e.name===`FencedCode`||e.name===`CodeBlock`)r.push({from:e.from,to:e.to});else return;return!1}}),{inline:n,blocks:r}}function IL(e){let t=(/^(`+)([\s\S]*?)\1$/.exec(e)?.[2]??e).trim();return t===``||/\s/.test(t)?null:t}var LL=`\0`;function RL(e,t){let n=e;for(let e of t)n=n.slice(0,e.from)+LL.repeat(e.to-e.from)+n.slice(e.to);return n}var zL=new RegExp(vL.source,`g`),BL=/[.:]+$/;function VL(e,t,n){let r=e.slice(t,n).replace(BL,``);return{run:r,to:t+r.length}}function HL(e,t){return t===0||e[t-1]!==`@`?t:t===1||/\s/.test(e[t-2])?t-1:t}function UL(e){let t=e.doc.toString(),{inline:n,blocks:r}=FL(e),i=[];for(let e of n){let n=IL(t.slice(e.from,e.to));if(n===null)continue;let r=BI(n);r!==null&&i.push({from:e.from,to:e.to,key:r.path,kind:`path`})}let a=RL(t,[...n,...r]),o=[];for(let e of a.matchAll(zL)){let t=e.index;if(t!==0&&!/\s/.test(a[t-1]))continue;o.push({from:t,to:t+e[0].length});let{run:n,to:r}=VL(a,t,t+e[0].length);n.length>1&&i.push({from:t,to:r,key:n,kind:`skill`})}for(let e of HI(RL(a,o))){let{run:t,to:n}=VL(a,e.start,e.end),r=BI(t);r===null||!UI(r.path)||i.push({from:HL(a,e.start),to:n,key:r.path,kind:`path`})}return i.sort((e,t)=>e.from-t.from)}async function WL(e,t,n,r){let i=[...new Set(t.filter(e=>e.kind===`path`).map(e=>e.key))],a=t.some(e=>e.kind===`skill`),[o,s]=await Promise.all([i.length>0&&e.cwd!==``?n(e.reviewId,i):Promise.resolve({}),a?r(e.reviewId):Promise.resolve([])]),c=new Set(s.map(e=>`/${e.name}`)),l=new Set;for(let e of t)(e.kind===`path`?Object.hasOwn(o,e.key):c.has(e.key))&&l.add(AL(e));return l}function GL(e,t){return e.size===t.size&&[...e].every(e=>t.has(e))}function KL(e,t={}){if(e===void 0)return[];let{resolvePaths:n=xs,lookupSkills:r=wL,delayMs:i=jL}=t,a=t.setTimer??((e,t)=>setTimeout(e,t)),o=t.clearTimer??(e=>clearTimeout(e));return[PL,s.fromClass(class{view;handle;generation=0;constructor(e){this.view=e,this.arm(0)}update(e){e.docChanged&&this.arm(i)}destroy(){this.handle!==void 0&&o(this.handle),this.generation++}arm(e){this.handle!==void 0&&o(this.handle),this.handle=a(()=>void this.run(),e)}async run(){let t=++this.generation,i=await WL(e,UL(this.view.state),n,r);t===this.generation&&(GL(i,this.view.state.field(PL))||this.view.dispatch({effects:NL.of(i)}))}})]}var qL=ye.define(m.processingInstruction),JL=ye.define(m.monospace),YL=ie.define([{tag:m.heading,color:`var(--markdown-heading-color, var(--ink))`,fontWeight:`var(--markdown-heading-font-weight, 700)`},...Ws.map(e=>({tag:m[`heading${e}`],color:`var(--markdown-heading${e}-color, var(--ink))`,fontWeight:`var(--markdown-heading${e}-font-weight, 700)`})),{tag:m.strikethrough,textDecoration:`line-through`},{tag:[m.link,m.url],color:`var(--markdown-link-color, var(--accent))`,textDecoration:`var(--markdown-link-text-decoration, underline)`},{tag:m.quote,color:`var(--markdown-quote-color, var(--ink-soft))`},{tag:m.strong,fontWeight:`700`},{tag:m.emphasis,fontStyle:`italic`},{tag:m.meta,color:`var(--ink-faint)`},{tag:qL,color:`var(--markdown-list-marker-color, var(--ink-faint))`},{tag:[m.keyword,m.modifier,m.controlKeyword,m.operatorKeyword,m.definitionKeyword,m.moduleKeyword],color:`var(--accent)`},{tag:[m.string,m.special(m.string),m.regexp],color:`var(--ok)`},{tag:[m.comment,m.lineComment,m.blockComment,m.docComment],color:`var(--ink-faint)`,fontStyle:`italic`},{tag:[m.function(m.variableName),m.function(m.propertyName),m.labelName],color:`var(--accent-bright)`},{tag:[m.typeName,m.className,m.namespace,m.tagName],color:`var(--accent-bright)`},{tag:[m.number,m.bool,m.atom],color:`var(--accent-bright)`},{tag:[m.operator,m.punctuation,m.separator,m.bracket,m.angleBracket,m.squareBracket,m.paren,m.brace],color:`var(--ink-soft)`},{tag:[m.propertyName,m.attributeName],color:`var(--ink)`},{tag:[m.variableName,m.attributeValue],color:`var(--ink)`},{tag:m.escape,color:`var(--accent-bright)`}]),XL=ie.define([{tag:m.heading,fontStyle:`var(--markdown-heading-font-style)`,textDecoration:`var(--markdown-heading-text-decoration)`},...Ws.map(e=>({tag:m[`heading${e}`],fontStyle:`var(--markdown-heading${e}-font-style)`,textDecoration:`var(--markdown-heading${e}-text-decoration)`})),{tag:m.monospace,color:`var(--markdown-code-color)`},{tag:JL,color:`var(--markdown-code-color)`,fontWeight:`var(--markdown-code-font-weight)`,fontStyle:`var(--markdown-code-font-style)`,textDecoration:`var(--markdown-code-text-decoration)`},{tag:[m.link,m.url],fontWeight:`var(--markdown-link-font-weight)`,fontStyle:`var(--markdown-link-font-style)`},{tag:m.strong,color:`var(--markdown-bold-color)`,fontStyle:`var(--markdown-bold-font-style)`,textDecoration:`var(--markdown-bold-text-decoration)`},{tag:m.emphasis,color:`var(--markdown-italic-color)`,fontWeight:`var(--markdown-italic-font-weight)`,textDecoration:`var(--markdown-italic-text-decoration)`},{tag:qL,fontWeight:`var(--markdown-list-marker-font-weight)`,fontStyle:`var(--markdown-list-marker-font-style)`,textDecoration:`var(--markdown-list-marker-text-decoration)`},{tag:m.quote,fontWeight:`var(--markdown-quote-font-weight)`,fontStyle:`var(--markdown-quote-font-style)`,textDecoration:`var(--markdown-quote-text-decoration)`}]),ZL=c.mark({class:`cm-md-code`}),QL=c.line({class:`cm-md-codeblock`}),$L=c.line({class:`cm-md-codeblock cm-md-codeblock-open`}),eR=c.line({class:`cm-md-codeblock cm-md-codeblock-close`}),tR=c.mark({class:`cm-md-ref cm-md-ref-path`}),nR=c.mark({class:`cm-md-ref cm-md-ref-skill`});function rR(e){let n=[],r=e.state.field(PL,!1),i=r===void 0||r.size===0?[]:UL(e.state).filter(e=>r.has(AL(e))),a=new Map(i.map(e=>[`${e.from}:${e.to}`,e.kind]));for(let{from:r,to:i}of e.visibleRanges)t(e.state).iterate({from:r,to:i,enter:t=>{if(t.name===`InlineCode`)return a.has(`${t.from}:${t.to}`)||n.push(ZL.range(t.from,t.to)),!1;if(t.name===`FencedCode`){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;for(let t=r;t<=i;t++){let a=t===r?$L:t===i?eR:QL;n.push(a.range(e.state.doc.line(t).from))}return!1}}});for(let[e,t]of a){let[r,i]=e.split(`:`).map(Number);n.push((t===`skill`?nR:tR).range(r,i))}return c.set(n,!0)}var iR=s.fromClass(class{decorations=c.none;constructor(e){this.decorations=rR(e)}update(e){let t=e.state.field(PL,!1)!==e.startState.field(PL,!1);(e.docChanged||e.viewportChanged||t)&&(this.decorations=rR(e.view))}},{decorations:e=>e.decorations}),aR=C.theme({"&":{backgroundColor:`transparent`,color:`var(--ink)`},".cm-scroller":{fontFamily:`var(--font-sans)`,fontSize:`var(--text-md)`,lineHeight:`var(--leading-snug)`,maxHeight:`22rem`,overflowY:`auto`},".cm-content":{padding:`0.45rem 0.55rem`,minHeight:`calc(var(--text-md) * var(--leading-snug) * 3)`,caretColor:`var(--accent)`},"&.cm-focused":{outline:`none`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--ink)`},".cm-selectionBackground, &.cm-focused .cm-selectionBackground, .cm-content ::selection":{backgroundColor:`color-mix(in lab, var(--accent) 22%, transparent)`},".cm-placeholder":{color:`var(--ink-faint)`},".cm-md-code":{fontFamily:`var(--font-mono)`,fontSize:`0.92em`,backgroundColor:`var(--paper-sunk)`,borderRadius:`3px`,padding:`0.05em 0.15em`},".cm-md-codeblock":{fontFamily:`var(--font-mono)`,backgroundColor:`var(--paper-sunk)`},".cm-md-codeblock-open":{borderTopLeftRadius:`var(--radius)`,borderTopRightRadius:`var(--radius)`,paddingTop:`0.2em`},".cm-md-codeblock-close":{borderBottomLeftRadius:`var(--radius)`,borderBottomRightRadius:`var(--radius)`,paddingBottom:`0.2em`},".cm-md-ref":{fontFamily:`var(--font-mono)`,fontSize:`0.92em`,color:`var(--ink)`,borderRadius:`4px`,padding:`0.12em 0.32em`},".cm-md-ref-path":{backgroundColor:`var(--chip-ref)`},".cm-md-ref-skill":{backgroundColor:`var(--chip-skill)`},".cm-tooltip.cm-tooltip-autocomplete":{backgroundColor:`var(--paper-raised)`,color:`var(--ink)`,border:`1px solid var(--rule)`,borderRadius:`var(--radius)`,boxShadow:`var(--shadow-chip)`,overflow:`hidden`},".cm-tooltip.cm-tooltip-autocomplete > ul":{fontFamily:`var(--font-mono)`,fontSize:`var(--text-sm)`,maxHeight:`14rem`},".cm-tooltip.cm-tooltip-autocomplete > ul > li":{display:`flex`,alignItems:`baseline`,padding:`0.15rem 0.5rem`},".cm-completionLabel":{minWidth:0,overflow:`hidden`,textOverflow:`ellipsis`},".cm-tooltip.cm-tooltip-autocomplete > ul > li[aria-selected]":{backgroundColor:`var(--accent-wash)`,color:`var(--ink)`},".cm-completionMatchedText":{textDecoration:`none`,fontWeight:`600`,backgroundColor:`var(--mark)`},".cm-completionDetail":{color:`var(--ink-faint)`,fontStyle:`normal`,flex:`none`,marginLeft:`0.75rem`},".cm-tooltip.cm-tooltip-autocomplete-disabled > ul > li[aria-selected]":{backgroundColor:`var(--chip)`,color:`var(--ink-soft)`},".cm-tooltip.cm-tooltip-autocomplete > ul > completion-section":{fontFamily:`var(--font-sans)`,fontSize:`var(--text-xs)`,color:`var(--ink-faint)`,borderBottom:`1px solid var(--rule)`,padding:`0.3rem 0.5rem`,opacity:1},".cm-tooltip.cm-tooltip-autocomplete .caret-completion-hint":{display:`flex`,alignItems:`center`,gap:`0.25rem`,fontFamily:`var(--font-sans)`,fontSize:`var(--text-xs)`,color:`var(--ink-faint)`,borderBottom:`1px solid var(--rule)`,padding:`0.3rem 0.5rem`}}),oR=C.updateListener.of(e=>{!e.docChanged||dce(e.state)!==null||e.transactions.some(e=>e.isUserEvent(`delete`))&&queueMicrotask(()=>tk(e.view))}),sR=` `,cR=/^\s*(?:[-*+]|\d+[.)])\s/;function lR(e){return e.selection.ranges.some(t=>cR.test(e.doc.lineAt(t.head).text))}function uR(e,t){return kO(e)?`submit`:Ese(e)?t?`closeCompletion`:`cancel`:null}var dR=u.of([{key:`Tab`,run:e=>{let{state:t}=e;return t.selection.ranges.some(e=>!e.empty)||lR(t)?SA(e):(e.dispatch(t.replaceSelection(sR)),!0)},shift:CA}]);function fR(e){let t=kL(e.reviewContext,e.completionSources),n=t.length===0?[]:[...t,oR];return[Sce(),iI({codeLanguages:dI,extensions:{props:[p({ListMark:qL,InlineCode:JL})]}}),be(YL),De.low(be(XL)),iR,KL(e.reviewContext,e.refDeps),C.lineWrapping,b.of(sR),w(e.placeholder),C.contentAttributes.of({...e.ariaLabel?{"aria-label":e.ariaLabel}:{},...e.ariaRequired===void 0?{}:{"aria-required":String(e.ariaRequired)}}),De.highest(C.domEventHandlers({keydown:(t,n)=>{let r=uR(t,DL(n));return r!==null&&(t.preventDefault(),r===`submit`?e.onSubmitChord?.():r===`cancel`?e.onCancelChord?.():(t.stopPropagation(),nk(n)),!0)}})),...n,dR,u.of([...wle,...jce]),aR,C.updateListener.of(t=>{t.docChanged&&e.onInput?.(t.state.doc.toString())})]}var pR=V(`<div class="md-editor svelte-1qjb7tg"></div>`);function mR(e,t){A(t,!0);let n=X(t,`value`,3,``),r=X(t,`placeholder`,3,``),i=X(t,`autofocus`,3,!1),a=X(t,`ariaLabel`,3,``),o=N(void 0);R(()=>{if(!B(o))return;let e=Gi(()=>n()),s=new C({parent:B(o),root:document,state:Me.create({doc:e,extensions:fR({placeholder:Gi(()=>r()),ariaLabel:Gi(()=>a()),ariaRequired:Gi(()=>t.ariaRequired),onInput:e=>t.onInput?.(e),onSubmitChord:()=>t.onSubmitChord?.(),onCancelChord:()=>t.onCancelChord?.(),reviewContext:Gi(()=>t.reviewContext)})})});return t.onInput?.(e),Gi(()=>i())&&s.contentDOM.focus({preventScroll:!0}),()=>s.destroy()});var s=pR();Po(s,e=>P(o,e),()=>B(o)),U(e,s),j()}function hR(e){return typeof e==`function`}function gR(e){return typeof e==`object`&&!!e}var _R=[`string`,`number`,`bigint`,`boolean`];function vR(e){return e==null||_R.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>vR(e)):typeof e==`object`&&Object.getPrototypeOf(e)===Object.prototype}var yR=Symbol(`box`),bR=Symbol(`is-writable`);function $(e,t){let n=M(e);return t?{[yR]:!0,[bR]:!0,get current(){return B(n)},set current(e){t(e)}}:{[yR]:!0,get current(){return e()}}}function xR(e){return gR(e)&&yR in e}function SR(e){return xR(e)&&bR in e}function CR(e){return xR(e)?e:hR(e)?$(e):ER(e)}function wR(e){return Object.entries(e).reduce((e,[t,n])=>xR(n)?(SR(n)?Object.defineProperty(e,t,{get(){return n.current},set(e){n.current=e}}):Object.defineProperty(e,t,{get(){return n.current}}),e):Object.assign(e,{[t]:n}),{})}function TR(e){return SR(e)?{[yR]:!0,get current(){return e.current}}:e}function ER(e){let t=N(jr(e));return{[yR]:!0,[bR]:!0,get current(){return B(t)},set current(e){P(t,e,!0)}}}function DR(e){let t=N(jr(e));return{[yR]:!0,[bR]:!0,get current(){return B(t)},set current(e){P(t,e,!0)}}}DR.from=CR,DR.with=$,DR.flatten=wR,DR.readonly=TR,DR.isBox=xR,DR.isWritableBox=SR;function OR(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var kR=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,AR=/\n/g,jR=/^\s*/,MR=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,NR=/^:\s*/,PR=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,FR=/^[;\s]*/,IR=/^\s+|\s+$/g,LR=`
|