@nuxt/hints 1.0.0-alpha.1 → 1.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -25
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/{Boah4cwZ.js → 2GP93Pxi.js} +1 -1
- package/dist/client/_nuxt/CGQlbfJh.js +6 -0
- package/dist/client/_nuxt/{Bynn4rkp.js → CJC4nrSc.js} +1 -1
- package/dist/client/_nuxt/{CHoFPrvn.js → Cw07ACep.js} +1 -1
- package/dist/client/_nuxt/{BUGFbzbB.js → DH652Aoo.js} +2 -2
- package/dist/client/_nuxt/{BJtxVCQ_.js → DJJ7OUMB.js} +1 -1
- package/dist/client/_nuxt/{C_d8ykrU.js → DU4nAREn.js} +1 -1
- package/dist/client/_nuxt/{CKUSRNTx.js → Do-INFgi.js} +1 -1
- package/dist/client/_nuxt/{ByztXxam.js → MKoRwnMq.js} +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/13453bb2-1adb-44c7-ac19-ec44784e7219.json +1 -0
- package/dist/client/_nuxt/{entry.BPIf5bpe.css → entry.CqH3PPiL.css} +1 -1
- package/dist/client/_nuxt/error-404.CrTd3IxL.css +1 -0
- package/dist/client/_nuxt/error-500.evxQRSU6.css +1 -0
- package/dist/client/_nuxt/hydration.B5wxUWyr.css +1 -0
- package/dist/client/_nuxt/{D1fewSvT.js → nO2mFgKf.js} +1 -1
- package/dist/client/_nuxt/{Y-IJRkoC.js → qj2RPQZX.js} +1 -1
- package/dist/client/_nuxt/{CxMWoQ9E.js → rlWm2Bc0.js} +1 -1
- package/dist/client/_nuxt/{DUrsayuJ.js → sLvN_949.js} +1 -1
- package/dist/client/_nuxt/umNIi3wV.js +21 -0
- package/dist/client/_nuxt/{BvKcRjC_.js → z9IIGYC-.js} +1 -1
- package/dist/client/hydration/index.html +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/third-party-scripts/index.html +1 -1
- package/dist/client/web-vitals/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +34 -24
- package/dist/runtime/{plugins/third-party-scripts → third-party-scripts}/plugin.client.js +22 -5
- package/package.json +6 -2
- package/dist/client/_nuxt/BahsQGtb.js +0 -19
- package/dist/client/_nuxt/Bgk_gK97.js +0 -5
- package/dist/client/_nuxt/builds/meta/edb115ef-e91c-4b8b-a8bc-7091fc0b356e.json +0 -1
- package/dist/client/_nuxt/error-404.BZAFKftT.css +0 -1
- package/dist/client/_nuxt/error-500.BWF-6BkQ.css +0 -1
- package/dist/runtime/composables/devtoolsData.d.ts +0 -7
- package/dist/runtime/composables/devtoolsData.js +0 -12
- /package/dist/runtime/{components → core/components}/nuxt-island.d.ts +0 -0
- /package/dist/runtime/{components → core/components}/nuxt-island.js +0 -0
- /package/dist/runtime/{plugins → core/plugins}/vue-tracer-state.client.d.ts +0 -0
- /package/dist/runtime/{plugins → core/plugins}/vue-tracer-state.client.js +0 -0
- /package/dist/runtime/{composables/hydration.d.ts → hydration/composables.d.ts} +0 -0
- /package/dist/runtime/{composables/hydration.js → hydration/composables.js} +0 -0
- /package/dist/runtime/{plugins/hydration → hydration}/plugin.client.d.ts +0 -0
- /package/dist/runtime/{plugins/hydration → hydration}/plugin.client.js +0 -0
- /package/dist/runtime/{plugins/third-party-scripts → third-party-scripts}/nitro.plugin.d.ts +0 -0
- /package/dist/runtime/{plugins/third-party-scripts → third-party-scripts}/nitro.plugin.js +0 -0
- /package/dist/runtime/{plugins/third-party-scripts → third-party-scripts}/plugin.client.d.ts +0 -0
- /package/dist/runtime/{plugins/web-vitals → web-vitals}/plugin.client.d.ts +0 -0
- /package/dist/runtime/{plugins/web-vitals → web-vitals}/plugin.client.js +0 -0
- /package/dist/runtime/{plugins/web-vitals → web-vitals}/utils.d.ts +0 -0
- /package/dist/runtime/{plugins/web-vitals → web-vitals}/utils.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/hints",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.2",
|
|
4
4
|
"description": "Nuxt module that shows hints for aspects of your application such as Performance, Security, and more!",
|
|
5
5
|
"repository": "https://github.com/nuxt/hints",
|
|
6
6
|
"homepage": "https://github.com/nuxt/hints",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@nuxt/devtools-kit": "^3.0.0",
|
|
25
25
|
"@nuxt/kit": "^4.1.2",
|
|
26
|
-
"h3": "1.15.4",
|
|
26
|
+
"h3": "^1.15.4",
|
|
27
27
|
"magic-string": "^0.30.19",
|
|
28
28
|
"nitropack": "^2.12.6",
|
|
29
29
|
"shiki": "^3.13.0",
|
|
@@ -40,11 +40,15 @@
|
|
|
40
40
|
"@nuxt/module-builder": "^1.0.0",
|
|
41
41
|
"@nuxt/schema": "^4.1.2",
|
|
42
42
|
"@nuxt/test-utils": "^3.19.2",
|
|
43
|
+
"@shikijs/transformers": "^3.15.0",
|
|
43
44
|
"@types/node": "^24.0.0",
|
|
44
45
|
"changelogen": "^0.6.0",
|
|
46
|
+
"diff": "^8.0.2",
|
|
45
47
|
"eslint": "^9.36.0",
|
|
48
|
+
"happy-dom": "^20.0.10",
|
|
46
49
|
"pkg-pr-new": "0.0.60",
|
|
47
50
|
"rimraf": "^6.0.1",
|
|
51
|
+
"sass-embedded": "^1.93.3",
|
|
48
52
|
"vitest": "^4.0.0"
|
|
49
53
|
},
|
|
50
54
|
"scripts": {
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DxNHbxmM.js","./CnnebwVN.js","./wDzz0qaB.js","./DPfMkruS.js","./Cl0AqbOI.js","./2EtD6e53.js","./DxSwrfjg.js","./Cp-IABpG.js","./BPQ3VLAy.js","./CXtECtnM.js","./COt5Ahok.js","./DNMeEaky.js","./DGP4VlC8.js","./BGJmEYvX.js","./CylS5w8V.js","./BLtJtn59.js","./CxbxFI8M.js","./Bp3cYrEr.js","./CDVJQ6XC.js","./DZxFcAj9.js","./BIGW1oBm.js","./C9oPPf7i.js","./g9-lgVsj.js","./CmIQRyeF.js","./m17aaUwq.js","./Buea-lGh.js","./CufHLc7y.js","./Yzrsuije.js","./CYsAdtH9.js","./fuZLfV_i.js","./CXZktZb0.js","./Br6cN0cg.js","./CgjmDhmW.js","./B6aJPvgy.js","./DiinP2Uv.js","./CMFEf1DS.js","./B1dDrJ26.js","./TsXTqZ29.js","./Cvjx9yec.js","./Xqf5ue2O.js","./BLmx8bSh.js","./DDBovgxi.js","./Cm3UrAx6.js","./D7VJQ_DO.js","./tqtdBwhO.js","./CEG3Q07z.js","./BEDo0Tqx.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as On}from"./CxMWoQ9E.js";import Nn from"./BUGFbzbB.js";import{_ as xn}from"./D1fewSvT.js";import{_ as Dn,a as Mn}from"./BJtxVCQ_.js";import{n as d,g as Ft,j as Y,p as je,q as Bn,k as Wt,o as ie,w as J,a as N,t as pe,m as D,b as H,d as Gn,c as $e,F as Vn,s as jn}from"./Bgk_gK97.js";import{u as $n}from"./C_d8ykrU.js";import"./Bynn4rkp.js";let T=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Un(n){return ct(n)}function ct(n){return Array.isArray(n)?Hn(n):n instanceof RegExp?n:typeof n=="object"?Fn(n):n}function Hn(n){let e=[];for(let t=0,r=n.length;t<r;t++)e[t]=ct(n[t]);return e}function Fn(n){let e={};for(let t in n)e[t]=ct(n[t]);return e}function zt(n,...e){return e.forEach(t=>{for(let r in t)n[r]=t[r]}),n}function qt(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?qt(n.substring(0,n.length-1)):n.substr(~e+1)}var Ue=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,fe=class{static hasCaptures(n){return n===null?!1:(Ue.lastIndex=0,Ue.test(n))}static replaceCaptures(n,e,t){return n.replace(Ue,(r,o,i,s)=>{let l=t[parseInt(o||i,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Kt(n,e){return n<e?-1:n>e?1:0}function Yt(n,e){if(n===null&&e===null)return 0;if(!n)return-1;if(!e)return 1;let t=n.length,r=e.length;if(t===r){for(let o=0;o<t;o++){let i=Kt(n[o],e[o]);if(i!==0)return i}return 0}return t-r}function St(n){return!!(/^#[0-9a-f]{6}$/i.test(n)||/^#[0-9a-f]{8}$/i.test(n)||/^#[0-9a-f]{3}$/i.test(n)||/^#[0-9a-f]{4}$/i.test(n))}function Jt(n){return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Xt=class{constructor(n){this.fn=n}cache=new Map;get(n){if(this.cache.has(n))return this.cache.get(n);const e=this.fn(n);return this.cache.set(n,e),e}},Se=class{constructor(n,e,t){this._colorMap=n,this._defaults=e,this._root=t}static createFromRawTheme(n,e){return this.createFromParsedTheme(qn(n),e)}static createFromParsedTheme(n,e){return Yn(n,e)}_cachedMatchRoot=new Xt(n=>this._root.match(n));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(n){if(n===null)return this._defaults;const e=n.scopeName,r=this._cachedMatchRoot.get(e).find(o=>Wn(n.parent,o.parentScopes));return r?new Qt(r.fontStyle,r.foreground,r.background):null}},He=class be{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const r of t)e=new be(e,r);return e}static from(...e){let t=null;for(let r=0;r<e.length;r++)t=new be(t,e[r]);return t}push(e){return new be(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push(r.scopeName),r=r.parent;return r===e?t.reverse():void 0}};function Wn(n,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let r=e[t],o=!1;if(r===">"){if(t===e.length-1)return!1;r=e[++t],o=!0}for(;n&&!zn(n.scopeName,r);){if(o)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}function zn(n,e){return e===n||n.startsWith(e)&&n[e.length]==="."}var Qt=class{constructor(n,e,t){this.fontStyle=n,this.foregroundId=e,this.backgroundId=t}};function qn(n){if(!n)return[];if(!n.settings||!Array.isArray(n.settings))return[];let e=n.settings,t=[],r=0;for(let o=0,i=e.length;o<i;o++){let s=e[o];if(!s.settings)continue;let l;if(typeof s.scope=="string"){let h=s.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(s.scope)?l=s.scope:l=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let h=s.settings.fontStyle.split(" ");for(let f=0,m=h.length;f<m;f++)switch(h[f]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof s.settings.foreground=="string"&&St(s.settings.foreground)&&(c=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&St(s.settings.background)&&(u=s.settings.background);for(let h=0,f=l.length;h<f;h++){let p=l[h].trim().split(" "),S=p[p.length-1],v=null;p.length>1&&(v=p.slice(0,p.length-1),v.reverse()),t[r++]=new Kn(S,v,o,a,c,u)}}return t}var Kn=class{constructor(n,e,t,r,o,i){this.scope=n,this.parentScopes=e,this.index=t,this.fontStyle=r,this.foreground=o,this.background=i}},M=(n=>(n[n.NotSet=-1]="NotSet",n[n.None=0]="None",n[n.Italic=1]="Italic",n[n.Bold=2]="Bold",n[n.Underline=4]="Underline",n[n.Strikethrough=8]="Strikethrough",n))(M||{});function Yn(n,e){n.sort((a,c)=>{let u=Kt(a.scope,c.scope);return u!==0||(u=Yt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let t=0,r="#000000",o="#ffffff";for(;n.length>=1&&n[0].scope==="";){let a=n.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(o=a.background)}let i=new Jn(e),s=new Qt(t,i.getId(r),i.getId(o)),l=new Qn(new Xe(0,null,-1,0,0),[]);for(let a=0,c=n.length;a<c;a++){let u=n[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new Se(i,s,l)}var Jn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(n){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(n)){this._isFrozen=!0;for(let e=0,t=n.length;e<t;e++)this._color2id[n[e]]=e,this._id2color[e]=n[e]}else this._isFrozen=!1}getId(n){if(n===null)return 0;n=n.toUpperCase();let e=this._color2id[n];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${n}`);return e=++this._lastColorId,this._color2id[n]=e,this._id2color[e]=n,e}getColorMap(){return this._id2color.slice(0)}},Xn=Object.freeze([]),Xe=class Zt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,r,o,i){this.scopeDepth=e,this.parentScopes=t||Xn,this.fontStyle=r,this.foreground=o,this.background=i}clone(){return new Zt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let r=0,o=e.length;r<o;r++)t[r]=e[r].clone();return t}acceptOverwrite(e,t,r,o){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),r!==0&&(this.foreground=r),o!==0&&(this.background=o)}},Qn=class Qe{constructor(e,t=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let r=0,o=0;for(;e.parentScopes[r]===">"&&r++,t.parentScopes[o]===">"&&o++,!(r>=e.parentScopes.length||o>=t.parentScopes.length);){const i=t.parentScopes[o].length-e.parentScopes[r].length;if(i!==0)return i;r++,o++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),o,i;if(r===-1?(o=e,i=""):(o=e.substring(0,r),i=e.substring(r+1)),this._children.hasOwnProperty(o))return this._children[o].match(i)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(Qe._cmpBySpecificity),t}insert(e,t,r,o,i,s){if(t===""){this._doInsertHere(e,r,o,i,s);return}let l=t.indexOf("."),a,c;l===-1?(a=t,c=""):(a=t.substring(0,l),c=t.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Qe(this._mainRule.clone(),Xe.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,o,i,s)}_doInsertHere(e,t,r,o,i){if(t===null){this._mainRule.acceptOverwrite(e,r,o,i);return}for(let s=0,l=this._rulesWithParentScopes.length;s<l;s++){let a=this._rulesWithParentScopes[s];if(Yt(a.parentScopes,t)===0){a.acceptOverwrite(e,r,o,i);return}}r===-1&&(r=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Xe(e,t,r,o,i))}},ee=class V{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=V.getLanguageId(e),r=V.getTokenType(e),o=V.getFontStyle(e),i=V.getForeground(e),s=V.getBackground(e);console.log({languageId:t,tokenType:r,fontStyle:o,foreground:i,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,r,o,i,s,l){let a=V.getLanguageId(e),c=V.getTokenType(e),u=V.containsBalancedBrackets(e)?1:0,h=V.getFontStyle(e),f=V.getForeground(e),m=V.getBackground(e);return t!==0&&(a=t),r!==8&&(c=r),o!==null&&(u=o?1:0),i!==-1&&(h=i),s!==0&&(f=s),l!==0&&(m=l),(a<<0|c<<8|u<<10|h<<11|f<<15|m<<24)>>>0}};function we(n,e){const t=[],r=Zn(n);let o=r.next();for(;o!==null;){let a=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let c=s();if(t.push({matcher:c,priority:a}),o!==",")break;o=r.next()}return t;function i(){if(o==="-"){o=r.next();const a=i();return c=>!!a&&!a(c)}if(o==="("){o=r.next();const a=l();return o===")"&&(o=r.next()),a}if(wt(o)){const a=[];do a.push(o),o=r.next();while(wt(o));return c=>e(a,c)}return null}function s(){const a=[];let c=i();for(;c;)a.push(c),c=i();return u=>a.every(h=>h(u))}function l(){const a=[];let c=s();for(;c&&(a.push(c),o==="|"||o===",");){do o=r.next();while(o==="|"||o===",");c=s()}return u=>a.some(h=>h(u))}}function wt(n){return!!n&&!!n.match(/[\w\.:]+/)}function Zn(n){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(n);return{next:()=>{if(!t)return null;const r=t[0];return t=e.exec(n),r}}}function en(n){typeof n.dispose=="function"&&n.dispose()}var le=class{constructor(n){this.scopeName=n}toKey(){return this.scopeName}},er=class{constructor(n,e){this.scopeName=n,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},tr=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(n){const e=n.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(n))}},nr=class{constructor(n,e){this.repo=n,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new le(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const n=this.Q;this.Q=[];const e=new tr;for(const t of n)rr(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof le){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function rr(n,e,t,r){const o=t.lookup(n.scopeName);if(!o){if(n.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=t.lookup(e);n instanceof le?ve({baseGrammar:i,selfGrammar:o},r):Ze(n.ruleName,{baseGrammar:i,selfGrammar:o,repository:o.repository},r);const s=t.injections(n.scopeName);if(s)for(const l of s)r.add(new le(l))}function Ze(n,e,t){if(e.repository&&e.repository[n]){const r=e.repository[n];Ee([r],e,t)}}function ve(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&Ee(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&Ee(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function Ee(n,e,t){for(const r of n){if(t.visitedRule.has(r))continue;t.visitedRule.add(r);const o=r.repository?zt({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&Ee(r.patterns,{...e,repository:o},t);const i=r.include;if(!i)continue;const s=tn(i);switch(s.kind){case 0:ve({...e,selfGrammar:e.baseGrammar},t);break;case 1:ve(e,t);break;case 2:Ze(s.ruleName,{...e,repository:o},t);break;case 3:case 4:const l=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:o};s.kind===4?Ze(s.ruleName,a,t):ve(a,t)}else s.kind===4?t.add(new er(s.scopeName,s.ruleName)):t.add(new le(s.scopeName));break}}}var or=class{kind=0},ir=class{kind=1},sr=class{constructor(n){this.ruleName=n}kind=2},ar=class{constructor(n){this.scopeName=n}kind=3},lr=class{constructor(n,e){this.scopeName=n,this.ruleName=e}kind=4};function tn(n){if(n==="$base")return new or;if(n==="$self")return new ir;const e=n.indexOf("#");if(e===-1)return new ar(n);if(e===0)return new sr(n.substring(1));{const t=n.substring(0,e),r=n.substring(e+1);return new lr(t,r)}}var cr=/\\(\d+)/,Et=/\\(\d+)/g,ur=-1,nn=-2;var de=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(n,e,t,r){this.$location=n,this.id=e,this._name=t||null,this._nameIsCapturing=fe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=fe.hasCaptures(this._contentName)}get debugName(){const n=this.$location?`${qt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${n}`}getName(n,e){return!this._nameIsCapturing||this._name===null||n===null||e===null?this._name:fe.replaceCaptures(this._name,n,e)}getContentName(n,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:fe.replaceCaptures(this._contentName,n,e)}},hr=class extends de{retokenizeCapturedWithRuleId;constructor(n,e,t,r,o){super(n,e,t,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(n,e){throw new Error("Not supported!")}compile(n,e){throw new Error("Not supported!")}compileAG(n,e,t,r){throw new Error("Not supported!")}},dr=class extends de{_match;captures;_cachedCompiledPatterns;constructor(n,e,t,r,o){super(n,e,t,null),this._match=new ce(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(n,e){e.push(this._match)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ue,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},kt=class extends de{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(n,e,t,r,o){super(n,e,t,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(n,e){for(const t of this.patterns)n.getRule(t).collectPatterns(n,e)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ue,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},et=class extends de{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(n,e,t,r,o,i,s,l,a,c){super(n,e,t,r),this._begin=new ce(o,this.id),this.beginCaptures=i,this._end=new ce(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(n,e){return this._end.resolveBackReferences(n,e)}collectPatterns(n,e){e.push(this._begin)}compile(n,e){return this._getCachedCompiledPatterns(n,e).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n,e).compileAG(n,t,r)}_getCachedCompiledPatterns(n,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ue;for(const t of this.patterns)n.getRule(t).collectPatterns(n,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,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},ke=class extends de{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(n,e,t,r,o,i,s,l,a){super(n,e,t,r),this._begin=new ce(o,this.id),this.beginCaptures=i,this.whileCaptures=l,this._while=new ce(s,nn),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(n,e){return this._while.resolveBackReferences(n,e)}collectPatterns(n,e){e.push(this._begin)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ue;for(const e of this.patterns)n.getRule(e).collectPatterns(n,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(n,e){return this._getCachedCompiledWhilePatterns(n,e).compile(n)}compileWhileAG(n,e,t,r){return this._getCachedCompiledWhilePatterns(n,e).compileAG(n,t,r)}_getCachedCompiledWhilePatterns(n,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ue,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},rn=class x{static createCaptureRule(e,t,r,o,i){return e.registerRule(s=>new hr(t,s,r,o,i))}static getCompiledRuleId(e,t,r){return e.id||t.registerRule(o=>{if(e.id=o,e.match)return new dr(e.$vscodeTextmateLocation,e.id,e.name,e.match,x._compileCaptures(e.captures,t,r));if(typeof e.begin>"u"){e.repository&&(r=zt({},r,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new kt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,x._compilePatterns(i,t,r))}return e.while?new ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,t,r),e.while,x._compileCaptures(e.whileCaptures||e.captures,t,r),x._compilePatterns(e.patterns,t,r)):new et(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,t,r),e.end,x._compileCaptures(e.endCaptures||e.captures,t,r),e.applyEndPatternLast,x._compilePatterns(e.patterns,t,r))}),e.id}static _compileCaptures(e,t,r){let o=[];if(e){let i=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);l>i&&(i=l)}for(let s=0;s<=i;s++)o[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);let a=0;e[s].patterns&&(a=x.getCompiledRuleId(e[s],t,r)),o[l]=x.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return o}static _compilePatterns(e,t,r){let o=[];if(e)for(let i=0,s=e.length;i<s;i++){const l=e[i];let a=-1;if(l.include){const c=tn(l.include);switch(c.kind){case 0:case 1:a=x.getCompiledRuleId(r[l.include],t,r);break;case 2:let u=r[c.ruleName];u&&(a=x.getCompiledRuleId(u,t,r));break;case 3:case 4:const h=c.scopeName,f=c.kind===4?c.ruleName:null,m=t.getExternalGrammar(h,r);if(m)if(f){let p=m.repository[f];p&&(a=x.getCompiledRuleId(p,t,m.repository))}else a=x.getCompiledRuleId(m.repository.$self,t,m.repository);break}}else a=x.getCompiledRuleId(l,t,r);if(a!==-1){const c=t.getRule(a);let u=!1;if((c instanceof kt||c instanceof et||c instanceof ke)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;o.push(a)}}return{patterns:o,hasMissingPatterns:(e?e.length:0)!==o.length}}},ce=class on{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e=="string"){const r=e.length;let o=0,i=[],s=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(i.push(e.substring(o,l)),i.push("$(?!\\n)(?<!\\n)"),o=l+2):(c==="A"||c==="G")&&(s=!0),l++}this.hasAnchor=s,o===0?this.source=e:(i.push(e.substring(o,r)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=cr.test(this.source):this.hasBackReferences=!1}clone(){return new on(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 new Error("This method should only be called if the source is a string");let r=t.map(o=>e.substring(o.start,o.end));return Et.lastIndex=0,this.source.replace(Et,(o,i)=>Jt(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],r=[],o=[],i,s,l,a;for(i=0,s=this.source.length;i<s;i++)l=this.source.charAt(i),e[i]=l,t[i]=l,r[i]=l,o[i]=l,l==="\\"&&i+1<s&&(a=this.source.charAt(i+1),a==="A"?(e[i+1]="",t[i+1]="",r[i+1]="A",o[i+1]="A"):a==="G"?(e[i+1]="",t[i+1]="G",r[i+1]="",o[i+1]="G"):(e[i+1]=a,t[i+1]=a,r[i+1]=a,o[i+1]=a),i++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:r.join(""),A1_G1:o.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}},ue=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(n){this._items.push(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}unshift(n){this._items.unshift(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}length(){return this._items.length}setSource(n,e){this._items[n].source!==e&&(this._disposeCaches(),this._items[n].setSource(e))}compile(n){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new Ct(n,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(n,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G0):this.compile(n)}_resolveAnchors(n,e,t){let r=this._items.map(o=>o.resolveAnchors(e,t));return new Ct(n,r,this._items.map(o=>o.ruleId))}},Ct=class{constructor(n,e,t){this.regExps=e,this.rules=t,this.scanner=n.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const n=[];for(let e=0,t=this.rules.length;e<t;e++)n.push(" - "+this.rules[e]+": "+this.regExps[e]);return n.join(`
|
|
3
|
-
`)}findNextMatchSync(n,e,t){const r=this.scanner.findNextMatchSync(n,e,t);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Fe=class{constructor(n,e){this.languageId=n,this.tokenType=e}},mr=class tt{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Fe(e,8),this._embeddedLanguagesMatcher=new pr(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?tt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Fe(0,0);_getBasicScopeAttributes=new Xt(e=>{const t=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Fe(t,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(tt.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},pr=class{values;scopesRegExp;constructor(n){if(n.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(n);const e=n.map(([t,r])=>Jt(t));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(n){if(!this.scopesRegExp)return;const e=n.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Rt=class{constructor(n,e){this.stack=n,this.stoppedEarly=e}};function sn(n,e,t,r,o,i,s,l){const a=e.content.length;let c=!1,u=-1;if(s){const m=fr(n,e,t,r,o,i);o=m.stack,r=m.linePos,t=m.isFirstLine,u=m.anchorPosition}const h=Date.now();for(;!c;){if(l!==0&&Date.now()-h>l)return new Rt(o,!0);f()}return new Rt(o,!1);function f(){const m=gr(n,e,t,r,o,u);if(!m){i.produce(o,a),c=!0;return}const p=m.captureIndices,S=m.matchedRuleId,v=p&&p.length>0?p[0].end>r:!1;if(S===ur){const y=o.getRule(n);i.produce(o,p[0].start),o=o.withContentNameScopesList(o.nameScopesList),se(n,e,t,o,i,y.endCaptures,p),i.produce(o,p[0].end);const g=o;if(o=o.parent,u=g.getAnchorPos(),!v&&g.getEnterPos()===r){o=g,i.produce(o,a),c=!0;return}}else{const y=n.getRule(S);i.produce(o,p[0].start);const g=o,b=y.getName(e.content,p),E=o.contentNameScopesList.pushAttributed(b,n);if(o=o.push(S,r,u,p[0].end===a,null,E,E),y instanceof et){const k=y;se(n,e,t,o,i,k.beginCaptures,p),i.produce(o,p[0].end),u=p[0].end;const P=k.getContentName(e.content,p),I=E.pushAttributed(P,n);if(o=o.withContentNameScopesList(I),k.endHasBackReferences&&(o=o.withEndRule(k.getEndWithResolvedBackReferences(e.content,p))),!v&&g.hasSameRuleAs(o)){o=o.pop(),i.produce(o,a),c=!0;return}}else if(y instanceof ke){const k=y;se(n,e,t,o,i,k.beginCaptures,p),i.produce(o,p[0].end),u=p[0].end;const P=k.getContentName(e.content,p),I=E.pushAttributed(P,n);if(o=o.withContentNameScopesList(I),k.whileHasBackReferences&&(o=o.withEndRule(k.getWhileWithResolvedBackReferences(e.content,p))),!v&&g.hasSameRuleAs(o)){o=o.pop(),i.produce(o,a),c=!0;return}}else if(se(n,e,t,o,i,y.captures,p),i.produce(o,p[0].end),o=o.pop(),!v){o=o.safePop(),i.produce(o,a),c=!0;return}}p[0].end>r&&(r=p[0].end,t=!1)}}function fr(n,e,t,r,o,i){let s=o.beginRuleCapturedEOL?0:-1;const l=[];for(let a=o;a;a=a.pop()){const c=a.getRule(n);c instanceof ke&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=br(a.rule,n,a.stack.endRule,t,r===s),h=c.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==nn){o=a.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(i.produce(a.stack,h.captureIndices[0].start),se(n,e,t,a.stack,i,a.rule.whileCaptures,h.captureIndices),i.produce(a.stack,h.captureIndices[0].end),s=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,t=!1))}else{o=a.stack.pop();break}}return{stack:o,linePos:r,anchorPosition:s,isFirstLine:t}}function gr(n,e,t,r,o,i){const s=_r(n,e,t,r,o,i),l=n.getInjections();if(l.length===0)return s;const a=yr(l,n,e,t,r,o,i);if(!a)return s;if(!s)return a;const c=s.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:s}function _r(n,e,t,r,o,i){const s=o.getRule(n),{ruleScanner:l,findOptions:a}=an(s,n,o.endRule,t,r===i),c=l.findNextMatchSync(e,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function yr(n,e,t,r,o,i,s){let l=Number.MAX_VALUE,a=null,c,u=0;const h=i.contentNameScopesList.getScopeNames();for(let f=0,m=n.length;f<m;f++){const p=n[f];if(!p.matcher(h))continue;const S=e.getRule(p.ruleId),{ruleScanner:v,findOptions:y}=an(S,e,null,r,o===s),g=v.findNextMatchSync(t,o,y);if(!g)continue;const b=g.captureIndices[0].start;if(!(b>=l)&&(l=b,a=g.captureIndices,c=g.ruleId,u=p.priority,l===o))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function an(n,e,t,r,o){return{ruleScanner:n.compileAG(e,t,r,o),findOptions:0}}function br(n,e,t,r,o){return{ruleScanner:n.compileWhileAG(e,t,r,o),findOptions:0}}function se(n,e,t,r,o,i,s){if(i.length===0)return;const l=e.content,a=Math.min(i.length,s.length),c=[],u=s[0].end;for(let h=0;h<a;h++){const f=i[h];if(f===null)continue;const m=s[h];if(m.length===0)continue;if(m.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=m.start;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?o.produceFromScopes(c[c.length-1].scopes,m.start):o.produce(r,m.start),f.retokenizeCapturedWithRuleId){const S=f.getName(l,s),v=r.contentNameScopesList.pushAttributed(S,n),y=f.getContentName(l,s),g=v.pushAttributed(y,n),b=r.push(f.retokenizeCapturedWithRuleId,m.start,-1,!1,null,v,g),E=n.createOnigString(l.substring(0,m.end));sn(n,E,t&&m.start===0,m.start,b,o,!1,0),en(E);continue}const p=f.getName(l,s);if(p!==null){const v=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(p,n);c.push(new vr(v,m.end))}}for(;c.length>0;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var vr=class{scopes;endPos;constructor(n,e){this.scopes=n,this.endPos=e}};function Sr(n,e,t,r,o,i,s,l){return new Er(n,e,t,r,o,i,s,l)}function Tt(n,e,t,r,o){const i=we(e,Ce),s=rn.getCompiledRuleId(t,r,o.repository);for(const l of i)n.push({debugSelector:e,matcher:l.matcher,ruleId:s,grammar:o,priority:l.priority})}function Ce(n,e){if(e.length<n.length)return!1;let t=0;return n.every(r=>{for(let o=t;o<e.length;o++)if(wr(e[o],r))return t=o+1,!0;return!1})}function wr(n,e){if(!n)return!1;if(n===e)return!0;const t=e.length;return n.length>t&&n.substr(0,t)===e&&n[t]==="."}var Er=class{constructor(n,e,t,r,o,i,s,l){if(this._rootScopeName=n,this.balancedBracketSelectors=i,this._onigLib=l,this._basicScopeAttributesProvider=new mr(t,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=At(e,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const a of Object.keys(o)){const c=we(a,Ce);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:o[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const n of this._ruleId2desc)n&&n.dispose()}createOnigScanner(n){return this._onigLib.createOnigScanner(n)}createOnigString(n){return this._onigLib.createOnigString(n)}getMetadataForScope(n){return this._basicScopeAttributesProvider.getBasicScopeAttributes(n)}_collectInjections(){const n={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},e=[],t=this._rootScopeName,r=n.lookup(t);if(r){const o=r.injections;if(o)for(let s in o)Tt(e,s,o[s],this,r);const i=this._grammarRepository.injections(t);i&&i.forEach(s=>{const l=this.getExternalGrammar(s);if(l){const a=l.injectionSelector;a&&Tt(e,a,l,this,l)}})}return e.sort((o,i)=>o.priority-i.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(n){const e=++this._lastRuleId,t=n(e);return this._ruleId2desc[e]=t,t}getRule(n){return this._ruleId2desc[n]}getExternalGrammar(n,e){if(this._includedGrammars[n])return this._includedGrammars[n];if(this._grammarRepository){const t=this._grammarRepository.lookup(n);if(t)return this._includedGrammars[n]=At(t,e&&e.$base),this._includedGrammars[n]}}tokenizeLine(n,e,t=0){const r=this._tokenize(n,e,!1,t);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(n,e,t=0){const r=this._tokenize(n,e,!0,t);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(n,e,t,r){this._rootId===-1&&(this._rootId=rn.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!e||e===nt.NULL){o=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=ee.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let m;f?m=ae.createRootAndLookUpScopeName(f,h,this):m=ae.createRoot("unknown",h),e=new nt(null,this._rootId,-1,-1,!1,null,m,m)}else o=!1,e.reset();n=n+`
|
|
4
|
-
`;const i=this.createOnigString(n),s=i.content.length,l=new Cr(t,n,this._tokenTypeMatchers,this.balancedBracketSelectors),a=sn(this,i,o,0,e,l,!0,r);return en(i),{lineLength:s,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function At(n,e){return n=Un(n),n.repository=n.repository||{},n.repository.$self={$vscodeTextmateLocation:n.$vscodeTextmateLocation,patterns:n.patterns,name:n.scopeName},n.repository.$base=e||n.repository.$self,n}var ae=class j{constructor(e,t,r){this.parent=e,this.scopePath=t,this.tokenAttributes=r}static fromExtension(e,t){let r=e,o=e?.scopePath??null;for(const i of t)o=He.push(o,i.scopeNames),r=new j(r,o,i.encodedTokenAttributes);return r}static createRoot(e,t){return new j(null,new He(null,e),t)}static createRootAndLookUpScopeName(e,t,r){const o=r.getMetadataForScope(e),i=new He(null,e),s=r.themeProvider.themeMatch(i),l=j.mergeAttributes(t,o,s);return new j(null,i,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return j.equals(this,e)}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,r){let o=-1,i=0,s=0;return r!==null&&(o=r.fontStyle,i=r.foregroundId,s=r.backgroundId),ee.set(e,t.languageId,t.tokenType,null,o,i,s)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return j._pushAttributed(this,e,t);const r=e.split(/ /g);let o=this;for(const i of r)o=j._pushAttributed(o,i,t);return o}static _pushAttributed(e,t,r){const o=r.getMetadataForScope(t),i=e.scopePath.push(t),s=r.themeProvider.themeMatch(i),l=j.mergeAttributes(e.tokenAttributes,o,s);return new j(e,i,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?t.reverse():void 0}},nt=class W{constructor(e,t,r,o,i,s,l,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=s,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new W(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:W._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?ae.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(){W._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,r,o,i,s,l){return new W(this,e,t,r,o,i,s,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const 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(e){return this.endRule===e?this:new W(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,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:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,t){const r=ae.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new W(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,r,ae.fromExtension(r,t.contentNameScopesList))}},kr=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(n,e){this.balancedBracketScopes=n.flatMap(t=>t==="*"?(this.allowAny=!0,[]):we(t,Ce).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>we(t,Ce).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(n){for(const e of this.unbalancedBracketScopes)if(e(n))return!1;for(const e of this.balancedBracketScopes)if(e(n))return!0;return this.allowAny}},Cr=class{constructor(n,e,t,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=n,this._tokenTypeOverrides=t,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(n,e){this.produceFromScopes(n.contentNameScopesList,e)}produceFromScopes(n,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=n?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=n?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(i)&&(r=ee.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(r=ee.set(r,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const t=n?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:t}),this._lastTokenEndIndex=e}getResult(n,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(n,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(n,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(n,e),this._binaryTokens[this._binaryTokens.length-2]=0);const t=new Uint32Array(this._binaryTokens.length);for(let r=0,o=this._binaryTokens.length;r<o;r++)t[r]=this._binaryTokens[r];return t}},Rr=class{constructor(n,e){this._onigLib=e,this._theme=n}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const n of this._grammars.values())n.dispose()}setTheme(n){this._theme=n}getColorMap(){return this._theme.getColorMap()}addGrammar(n,e){this._rawGrammars.set(n.scopeName,n),e&&this._injectionGrammars.set(n.scopeName,e)}lookup(n){return this._rawGrammars.get(n)}injections(n){return this._injectionGrammars.get(n)}getDefaults(){return this._theme.getDefaults()}themeMatch(n){return this._theme.match(n)}grammarForScopeName(n,e,t,r,o){if(!this._grammars.has(n)){let i=this._rawGrammars.get(n);if(!i)return null;this._grammars.set(n,Sr(n,i,e,t,r,o,this,this._onigLib))}return this._grammars.get(n)}},Tr=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Rr(Se.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Se.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,r){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,t,r){return this._loadGrammar(e,t,r.embeddedLanguages,r.tokenTypes,new kr(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,r,o,i){const s=new nr(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(l=>this._loadSingleGrammar(l.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,r,o,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,r)}}addGrammar(e,t=[],r=0,o=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,r,o)}_grammarForScopeName(e,t=0,r=null,o=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,r,o,i)}},rt=nt.NULL;const Ar=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class me{constructor(e,t,r){this.normal=t,this.property=e,r&&(this.space=r)}}me.prototype.normal={};me.prototype.property={};me.prototype.space=void 0;function ln(n,e){const t={},r={};for(const o of n)Object.assign(t,o.property),Object.assign(r,o.normal);return new me(t,r,e)}function ot(n){return n.toLowerCase()}class B{constructor(e,t){this.attribute=t,this.property=e}}B.prototype.attribute="";B.prototype.booleanish=!1;B.prototype.boolean=!1;B.prototype.commaOrSpaceSeparated=!1;B.prototype.commaSeparated=!1;B.prototype.defined=!1;B.prototype.mustUseProperty=!1;B.prototype.number=!1;B.prototype.overloadedBoolean=!1;B.prototype.property="";B.prototype.spaceSeparated=!1;B.prototype.space=void 0;let Lr=0;const w=q(),R=q(),it=q(),_=q(),C=q(),Q=q(),G=q();function q(){return 2**++Lr}const st=Object.freeze(Object.defineProperty({__proto__:null,boolean:w,booleanish:R,commaOrSpaceSeparated:G,commaSeparated:Q,number:_,overloadedBoolean:it,spaceSeparated:C},Symbol.toStringTag,{value:"Module"})),We=Object.keys(st);class ut extends B{constructor(e,t,r,o){let i=-1;if(super(e,t),Lt(this,"space",o),typeof r=="number")for(;++i<We.length;){const s=We[i];Lt(this,We[i],(r&st[s])===st[s])}}}ut.prototype.defined=!0;function Lt(n,e,t){t&&(n[e]=t)}function te(n){const e={},t={};for(const[r,o]of Object.entries(n.properties)){const i=new ut(r,n.transform(n.attributes||{},r),o,n.space);n.mustUseProperty&&n.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),e[r]=i,t[ot(r)]=r,t[ot(i.attribute)]=r}return new me(e,t,n.space)}const cn=te({properties:{ariaActiveDescendant:null,ariaAtomic:R,ariaAutoComplete:null,ariaBusy:R,ariaChecked:R,ariaColCount:_,ariaColIndex:_,ariaColSpan:_,ariaControls:C,ariaCurrent:null,ariaDescribedBy:C,ariaDetails:null,ariaDisabled:R,ariaDropEffect:C,ariaErrorMessage:null,ariaExpanded:R,ariaFlowTo:C,ariaGrabbed:R,ariaHasPopup:null,ariaHidden:R,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:C,ariaLevel:_,ariaLive:null,ariaModal:R,ariaMultiLine:R,ariaMultiSelectable:R,ariaOrientation:null,ariaOwns:C,ariaPlaceholder:null,ariaPosInSet:_,ariaPressed:R,ariaReadOnly:R,ariaRelevant:null,ariaRequired:R,ariaRoleDescription:C,ariaRowCount:_,ariaRowIndex:_,ariaRowSpan:_,ariaSelected:R,ariaSetSize:_,ariaSort:null,ariaValueMax:_,ariaValueMin:_,ariaValueNow:_,ariaValueText:null,role:null},transform(n,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function un(n,e){return e in n?n[e]:e}function hn(n,e){return un(n,e.toLowerCase())}const Pr=te({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Q,acceptCharset:C,accessKey:C,action:null,allow:null,allowFullScreen:w,allowPaymentRequest:w,allowUserMedia:w,alt:null,as:null,async:w,autoCapitalize:null,autoComplete:C,autoFocus:w,autoPlay:w,blocking:C,capture:null,charSet:null,checked:w,cite:null,className:C,cols:_,colSpan:null,content:null,contentEditable:R,controls:w,controlsList:C,coords:_|Q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:w,defer:w,dir:null,dirName:null,disabled:w,download:it,draggable:R,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:w,formTarget:null,headers:C,height:_,hidden:it,high:_,href:null,hrefLang:null,htmlFor:C,httpEquiv:C,id:null,imageSizes:null,imageSrcSet:null,inert:w,inputMode:null,integrity:null,is:null,isMap:w,itemId:null,itemProp:C,itemRef:C,itemScope:w,itemType:C,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:w,low:_,manifest:null,max:null,maxLength:_,media:null,method:null,min:null,minLength:_,multiple:w,muted:w,name:null,nonce:null,noModule:w,noValidate:w,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:w,optimum:_,pattern:null,ping:C,placeholder:null,playsInline:w,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:w,referrerPolicy:null,rel:C,required:w,reversed:w,rows:_,rowSpan:_,sandbox:C,scope:null,scoped:w,seamless:w,selected:w,shadowRootClonable:w,shadowRootDelegatesFocus:w,shadowRootMode:null,shape:null,size:_,sizes:null,slot:null,span:_,spellCheck:R,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_,step:null,style:null,tabIndex:_,target:null,title:null,translate:null,type:null,typeMustMatch:w,useMap:null,value:R,width:_,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:C,axis:null,background:null,bgColor:null,border:_,borderColor:null,bottomMargin:_,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:w,declare:w,event:null,face:null,frame:null,frameBorder:null,hSpace:_,leftMargin:_,link:null,longDesc:null,lowSrc:null,marginHeight:_,marginWidth:_,noResize:w,noHref:w,noShade:w,noWrap:w,object:null,profile:null,prompt:null,rev:null,rightMargin:_,rules:null,scheme:null,scrolling:R,standby:null,summary:null,text:null,topMargin:_,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:w,disableRemotePlayback:w,prefix:null,property:null,results:_,security:null,unselectable:null},space:"html",transform:hn}),Ir=te({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:G,accentHeight:_,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_,amplitude:_,arabicForm:null,ascent:_,attributeName:null,attributeType:null,azimuth:_,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_,by:null,calcMode:null,capHeight:_,className:C,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:_,diffuseConstant:_,direction:null,display:null,dur:null,divisor:_,dominantBaseline:null,download:w,dx:null,dy:null,edgeMode:null,editable:null,elevation:_,enableBackground:null,end:null,event:null,exponent:_,externalResourcesRequired:null,fill:null,fillOpacity:_,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Q,g2:Q,glyphName:Q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_,horizOriginX:_,horizOriginY:_,id:null,ideographic:_,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_,k:_,k1:_,k2:_,k3:_,k4:_,kernelMatrix:G,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:_,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:_,overlineThickness:_,paintOrder:null,panose1:null,path:null,pathLength:_,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:C,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_,pointsAtY:_,pointsAtZ:_,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:G,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:G,rev:G,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:G,requiredFeatures:G,requiredFonts:G,requiredFormats:G,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:_,specularExponent:_,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_,strikethroughThickness:_,string:null,stroke:null,strokeDashArray:G,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_,strokeOpacity:_,strokeWidth:null,style:null,surfaceScale:_,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:G,tabIndex:_,tableValues:null,target:null,targetX:_,targetY:_,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:G,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_,underlineThickness:_,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_,values:null,vAlphabetic:_,vMathematical:_,vectorEffect:null,vHanging:_,vIdeographic:_,version:null,vertAdvY:_,vertOriginX:_,vertOriginY:_,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:un}),dn=te({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,e){return"xlink:"+e.slice(5).toLowerCase()}}),mn=te({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:hn}),pn=te({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,e){return"xml:"+e.slice(3).toLowerCase()}}),Or=/[A-Z]/g,Pt=/-[a-z]/g,Nr=/^data[-\w.:]+$/i;function xr(n,e){const t=ot(e);let r=e,o=B;if(t in n.normal)return n.property[n.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Nr.test(e)){if(e.charAt(4)==="-"){const i=e.slice(5).replace(Pt,Mr);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=e.slice(4);if(!Pt.test(i)){let s=i.replace(Or,Dr);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}o=ut}return new o(r,e)}function Dr(n){return"-"+n.toLowerCase()}function Mr(n){return n.charAt(1).toUpperCase()}const Br=ln([cn,Pr,dn,mn,pn],"html"),fn=ln([cn,Ir,dn,mn,pn],"svg"),It={}.hasOwnProperty;function Gr(n,e){const t=e||{};function r(o,...i){let s=r.invalid;const l=r.handlers;if(o&&It.call(o,n)){const a=String(o[n]);s=It.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,o,...i)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}const Vr=/["&'<>`]/g,jr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,$r=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Ur=/[|\\{}()[\]^$+*?.]/g,Ot=new WeakMap;function Hr(n,e){if(n=n.replace(e.subset?Fr(e.subset):Vr,r),e.subset||e.escapeOnly)return n;return n.replace(jr,t).replace($r,r);function t(o,i,s){return e.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),e)}function r(o,i,s){return e.format(o.charCodeAt(0),s.charCodeAt(i+1),e)}}function Fr(n){let e=Ot.get(n);return e||(e=Wr(n),Ot.set(n,e)),e}function Wr(n){const e=[];let t=-1;for(;++t<n.length;)e.push(n[t].replace(Ur,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const zr=/[\dA-Fa-f]/;function qr(n,e,t){const r="&#x"+n.toString(16).toUpperCase();return t&&e&&!zr.test(String.fromCharCode(e))?r:r+";"}const Kr=/\d/;function Yr(n,e,t){const r="&#"+String(n);return t&&e&&!Kr.test(String.fromCharCode(e))?r:r+";"}const Jr=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],ze={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},Xr=["cent","copy","divide","gt","lt","not","para","times"],gn={}.hasOwnProperty,at={};let ge;for(ge in ze)gn.call(ze,ge)&&(at[ze[ge]]=ge);const Qr=/[^\dA-Za-z]/;function Zr(n,e,t,r){const o=String.fromCharCode(n);if(gn.call(at,o)){const i=at[o],s="&"+i;return t&&Jr.includes(i)&&!Xr.includes(i)&&(!r||e&&e!==61&&Qr.test(String.fromCharCode(e)))?s:s+";"}return""}function eo(n,e,t){let r=qr(n,e,t.omitOptionalSemicolons),o;if((t.useNamedReferences||t.useShortestReferences)&&(o=Zr(n,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!o)&&t.useShortestReferences){const i=Yr(n,e,t.omitOptionalSemicolons);i.length<r.length&&(r=i)}return o&&(!t.useShortestReferences||o.length<r.length)?o:r}function Z(n,e){return Hr(n,Object.assign({format:eo},e))}const to=/^>|^->|<!--|-->|--!>|<!-$/g,no=[">"],ro=["<",">"];function oo(n,e,t,r){return r.settings.bogusComments?"<?"+Z(n.value,Object.assign({},r.settings.characterReferences,{subset:no}))+">":"<!--"+n.value.replace(to,o)+"-->";function o(i){return Z(i,Object.assign({},r.settings.characterReferences,{subset:ro}))}}function io(n,e,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Nt(n,e){const t=String(n);if(typeof e!="string")throw new TypeError("Expected character");let r=0,o=t.indexOf(e);for(;o!==-1;)r++,o=t.indexOf(e,o+e.length);return r}function so(n,e){const t=e||{};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function ao(n){return n.join(" ").trim()}const lo=/[ \t\n\f\r]/g;function ht(n){return typeof n=="object"?n.type==="text"?xt(n.value):!1:xt(n)}function xt(n){return n.replace(lo,"")===""}const L=yn(1),_n=yn(-1),co=[];function yn(n){return e;function e(t,r,o){const i=t?t.children:co;let s=(r||0)+n,l=i[s];if(!o)for(;l&&ht(l);)s+=n,l=i[s];return l}}const uo={}.hasOwnProperty;function bn(n){return e;function e(t,r,o){return uo.call(n,t.tagName)&&n[t.tagName](t,r,o)}}const dt=bn({body:mo,caption:qe,colgroup:qe,dd:_o,dt:go,head:qe,html:ho,li:fo,optgroup:yo,option:bo,p:po,rp:Dt,rt:Dt,tbody:So,td:Mt,tfoot:wo,th:Mt,thead:vo,tr:Eo});function qe(n,e,t){const r=L(t,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&ht(r.value.charAt(0)))}function ho(n,e,t){const r=L(t,e);return!r||r.type!=="comment"}function mo(n,e,t){const r=L(t,e);return!r||r.type!=="comment"}function po(n,e,t){const r=L(t,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function fo(n,e,t){const r=L(t,e);return!r||r.type==="element"&&r.tagName==="li"}function go(n,e,t){const r=L(t,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function _o(n,e,t){const r=L(t,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Dt(n,e,t){const r=L(t,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function yo(n,e,t){const r=L(t,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function bo(n,e,t){const r=L(t,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function vo(n,e,t){const r=L(t,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function So(n,e,t){const r=L(t,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function wo(n,e,t){return!L(t,e)}function Eo(n,e,t){const r=L(t,e);return!r||r.type==="element"&&r.tagName==="tr"}function Mt(n,e,t){const r=L(t,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const ko=bn({body:To,colgroup:Ao,head:Ro,html:Co,tbody:Lo});function Co(n){const e=L(n,-1);return!e||e.type!=="comment"}function Ro(n){const e=new Set;for(const r of n.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const t=n.children[0];return!t||t.type==="element"}function To(n){const e=L(n,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&ht(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Ao(n,e,t){const r=_n(t,e),o=L(n,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&dt(r,t.children.indexOf(r),t)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function Lo(n,e,t){const r=_n(t,e),o=L(n,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&dt(r,t.children.indexOf(r),t)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const _e={name:[[`
|
|
5
|
-
\f\r &/=>`.split(""),`
|
|
6
|
-
\f\r "&'/=>\``.split("")],[`\0
|
|
7
|
-
\f\r "&'/<=>`.split(""),`\0
|
|
8
|
-
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
9
|
-
\f\r &>`.split(""),`\0
|
|
10
|
-
\f\r "&'<=>\``.split("")],[`\0
|
|
11
|
-
\f\r "&'<=>\``.split(""),`\0
|
|
12
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Po(n,e,t,r){const o=r.schema,i=o.space==="svg"?!1:r.settings.omitOptionalTags;let s=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(n.tagName.toLowerCase());const l=[];let a;o.space==="html"&&n.tagName==="svg"&&(r.schema=fn);const c=Io(r,n.properties),u=r.all(o.space==="html"&&n.tagName==="template"?n.content:n);return r.schema=o,u&&(s=!1),(c||!i||!ko(n,e,t))&&(l.push("<",n.tagName,c?" "+c:""),s&&(o.space==="svg"||r.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(u),!s&&(!i||!dt(n,e,t))&&l.push("</"+n.tagName+">"),l.join("")}function Io(n,e){const t=[];let r=-1,o;if(e){for(o in e)if(e[o]!==null&&e[o]!==void 0){const i=Oo(n,o,e[o]);i&&t.push(i)}}for(;++r<t.length;){const i=n.settings.tightAttributes?t[r].charAt(t[r].length-1):void 0;r!==t.length-1&&i!=='"'&&i!=="'"&&(t[r]+=" ")}return t.join("")}function Oo(n,e,t){const r=xr(n.schema,e),o=n.settings.allowParseErrors&&n.schema.space==="html"?0:1,i=n.settings.allowDangerousCharacters?0:1;let s=n.quote,l;if(r.overloadedBoolean&&(t===r.attribute||t==="")?t=!0:(r.boolean||r.overloadedBoolean)&&(typeof t!="string"||t===r.attribute||t==="")&&(t=!!t),t==null||t===!1||typeof t=="number"&&Number.isNaN(t))return"";const a=Z(r.attribute,Object.assign({},n.settings.characterReferences,{subset:_e.name[o][i]}));return t===!0||(t=Array.isArray(t)?(r.commaSeparated?so:ao)(t,{padLeft:!n.settings.tightCommaSeparatedLists}):String(t),n.settings.collapseEmptyAttributes&&!t)?a:(n.settings.preferUnquoted&&(l=Z(t,Object.assign({},n.settings.characterReferences,{attribute:!0,subset:_e.unquoted[o][i]}))),l!==t&&(n.settings.quoteSmart&&Nt(t,s)>Nt(t,n.alternative)&&(s=n.alternative),l=s+Z(t,Object.assign({},n.settings.characterReferences,{subset:(s==="'"?_e.single:_e.double)[o][i],attribute:!0}))+s),a+(l&&"="+l))}const No=["<","&"];function vn(n,e,t,r){return t&&t.type==="element"&&(t.tagName==="script"||t.tagName==="style")?n.value:Z(n.value,Object.assign({},r.settings.characterReferences,{subset:No}))}function xo(n,e,t,r){return r.settings.allowDangerousHtml?n.value:vn(n,e,t,r)}function Do(n,e,t,r){return r.all(n)}const Mo=Gr("type",{invalid:Bo,unknown:Go,handlers:{comment:oo,doctype:io,element:Po,raw:xo,root:Do,text:vn}});function Bo(n){throw new Error("Expected node, not `"+n+"`")}function Go(n){const e=n;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Vo={},jo={},$o=[];function Uo(n,e){const t=e||Vo,r=t.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Ho,all:Fo,settings:{omitOptionalTags:t.omitOptionalTags||!1,allowParseErrors:t.allowParseErrors||!1,allowDangerousCharacters:t.allowDangerousCharacters||!1,quoteSmart:t.quoteSmart||!1,preferUnquoted:t.preferUnquoted||!1,tightAttributes:t.tightAttributes||!1,upperDoctype:t.upperDoctype||!1,tightDoctype:t.tightDoctype||!1,bogusComments:t.bogusComments||!1,tightCommaSeparatedLists:t.tightCommaSeparatedLists||!1,tightSelfClosing:t.tightSelfClosing||!1,collapseEmptyAttributes:t.collapseEmptyAttributes||!1,allowDangerousHtml:t.allowDangerousHtml||!1,voids:t.voids||Ar,characterReferences:t.characterReferences||jo,closeSelfClosing:t.closeSelfClosing||!1,closeEmptyElements:t.closeEmptyElements||!1},schema:t.space==="svg"?fn:Br,quote:r,alternative:o}.one(Array.isArray(n)?{type:"root",children:n}:n,void 0,void 0)}function Ho(n,e,t){return Mo(n,e,t,this)}function Fo(n){const e=[],t=n&&n.children||$o;let r=-1;for(;++r<t.length;)e[r]=this.one(t[r],r,n);return e.join("")}function Re(n,e){const t=typeof n=="string"?{}:{...n.colorReplacements},r=typeof n=="string"?n:n.name;for(const[o,i]of Object.entries(e?.colorReplacements||{}))typeof i=="string"?t[o]=i:o===r&&Object.assign(t,i);return t}function F(n,e){return n&&(e?.[n?.toLowerCase()]||n)}function Wo(n){return Array.isArray(n)?n:[n]}async function Sn(n){return Promise.resolve(typeof n=="function"?n():n).then(e=>e.default||e)}function mt(n){return!n||["plaintext","txt","text","plain"].includes(n)}function wn(n){return n==="ansi"||mt(n)}function pt(n){return n==="none"}function En(n){return pt(n)}function kn(n,e){if(!e)return n;n.properties||={},n.properties.class||=[],typeof n.properties.class=="string"&&(n.properties.class=n.properties.class.split(/\s+/g)),Array.isArray(n.properties.class)||(n.properties.class=[]);const t=Array.isArray(e)?e:e.split(/\s+/g);for(const r of t)r&&!n.properties.class.includes(r)&&n.properties.class.push(r);return n}function Oe(n,e=!1){const t=n.split(/(\r?\n)/g);let r=0;const o=[];for(let i=0;i<t.length;i+=2){const s=e?t[i]+(t[i+1]||""):t[i];o.push([s,r]),r+=t[i].length,r+=t[i+1]?.length||0}return o}function zo(n){const e=Oe(n,!0).map(([o])=>o);function t(o){if(o===n.length)return{line:e.length-1,character:e[e.length-1].length};let i=o,s=0;for(const l of e){if(i<l.length)break;i-=l.length,s++}return{line:s,character:i}}function r(o,i){let s=0;for(let l=0;l<o;l++)s+=e[l].length;return s+=i,s}return{lines:e,indexToPos:t,posToIndex:r}}function qo(n,e,t){const r=new Set;for(const i of n.matchAll(/lang=["']([\w-]+)["']/g))r.add(i[1]);for(const i of n.matchAll(/(?:```|~~~)([\w-]+)/g))r.add(i[1]);for(const i of n.matchAll(/\\begin\{([\w-]+)\}/g))r.add(i[1]);if(!t)return Array.from(r);const o=t.getBundledLanguages();return Array.from(r).filter(i=>i&&o[i])}const ft="light-dark()",Ko=["color","background-color"];function Yo(n,e){let t=0;const r=[];for(const o of e)o>t&&r.push({...n,content:n.content.slice(t,o),offset:n.offset+t}),t=o;return t<n.content.length&&r.push({...n,content:n.content.slice(t),offset:n.offset+t}),r}function Jo(n,e){const t=Array.from(e instanceof Set?e:new Set(e)).sort((r,o)=>r-o);return t.length?n.map(r=>r.flatMap(o=>{const i=t.filter(s=>o.offset<s&&s<o.offset+o.content.length).map(s=>s-o.offset).sort((s,l)=>s-l);return i.length?Yo(o,i):o})):n}function Xo(n,e,t,r,o="css-vars"){const i={content:n.content,explanation:n.explanation,offset:n.offset},s=e.map(u=>Te(n.variants[u])),l=new Set(s.flatMap(u=>Object.keys(u))),a={},c=(u,h)=>{const f=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return t+e[u]+(h==="color"?"":f)};return s.forEach((u,h)=>{for(const f of l){const m=u[f]||"inherit";if(h===0&&r&&Ko.includes(f))if(r===ft&&s.length>1){const p=e.findIndex(g=>g==="light"),S=e.findIndex(g=>g==="dark");if(p===-1||S===-1)throw new T('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const v=s[p][f]||"inherit",y=s[S][f]||"inherit";a[f]=`light-dark(${v}, ${y})`,o==="css-vars"&&(a[c(h,f)]=m)}else a[f]=m;else o==="css-vars"&&(a[c(h,f)]=m)}}),i.htmlStyle=a,i}function Te(n){const e={};if(n.color&&(e.color=n.color),n.bgColor&&(e["background-color"]=n.bgColor),n.fontStyle){n.fontStyle&M.Italic&&(e["font-style"]="italic"),n.fontStyle&M.Bold&&(e["font-weight"]="bold");const t=[];n.fontStyle&M.Underline&&t.push("underline"),n.fontStyle&M.Strikethrough&&t.push("line-through"),t.length&&(e["text-decoration"]=t.join(" "))}return e}function lt(n){return typeof n=="string"?n:Object.entries(n).map(([e,t])=>`${e}:${t}`).join(";")}const Cn=new WeakMap;function Ne(n,e){Cn.set(n,e)}function he(n){return Cn.get(n)}class ne{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new ne(Object.fromEntries(Wo(t).map(r=>[r,rt])),e)}constructor(...e){if(e.length===2){const[t,r]=e;this.lang=r,this._stacks=t}else{const[t,r,o]=e;this.lang=r,this._stacks={[o]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Qo(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Qo(n){const e=[],t=new Set;function r(o){if(t.has(o))return;t.add(o);const i=o?.nameScopesList?.scopeName;i&&e.push(i),o.parent&&r(o.parent)}return r(n),e}function Zo(n,e){if(!(n instanceof ne))throw new T("Invalid grammar state");return n.getInternalStack(e)}function ei(){const n=new WeakMap;function e(t){if(!n.has(t.meta)){let r=function(s){if(typeof s=="number"){if(s<0||s>t.source.length)throw new T(`Invalid decoration offset: ${s}. Code length: ${t.source.length}`);return{...o.indexToPos(s),offset:s}}else{const l=o.lines[s.line];if(l===void 0)throw new T(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${o.lines.length}`);let a=s.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new T(`Invalid decoration position ${JSON.stringify(s)}. Line ${s.line} length: ${l.length}`);return{...s,character:a,offset:o.posToIndex(s.line,a)}}};const o=zo(t.source),i=(t.options.decorations||[]).map(s=>({...s,start:r(s.start),end:r(s.end)}));ti(i),n.set(t.meta,{decorations:i,converter:o,source:t.source})}return n.get(t.meta)}return{name:"shiki:decorations",tokens(t){if(!this.options.decorations?.length)return;const o=e(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]);return Jo(t,o)},code(t){if(!this.options.decorations?.length)return;const r=e(this),o=Array.from(t.children).filter(u=>u.type==="element"&&u.tagName==="span");if(o.length!==r.converter.lines.length)throw new T(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(u,h,f,m){const p=o[u];let S="",v=-1,y=-1;if(h===0&&(v=0),f===0&&(y=0),f===Number.POSITIVE_INFINITY&&(y=p.children.length),v===-1||y===-1)for(let b=0;b<p.children.length;b++)S+=Rn(p.children[b]),v===-1&&S.length===h&&(v=b+1),y===-1&&S.length===f&&(y=b+1);if(v===-1)throw new T(`Failed to find start index for decoration ${JSON.stringify(m.start)}`);if(y===-1)throw new T(`Failed to find end index for decoration ${JSON.stringify(m.end)}`);const g=p.children.slice(v,y);if(!m.alwaysWrap&&g.length===p.children.length)l(p,m,"line");else if(!m.alwaysWrap&&g.length===1&&g[0].type==="element")l(g[0],m,"token");else{const b={type:"element",tagName:"span",properties:{},children:g};l(b,m,"wrapper"),p.children.splice(v,g.length,b)}}function s(u,h){o[u]=l(o[u],h,"line")}function l(u,h,f){const m=h.properties||{},p=h.transform||(S=>S);return u.tagName=h.tagName||"span",u.properties={...u.properties,...m,class:u.properties.class},h.properties?.class&&kn(u,h.properties.class),u=p(u,f)||u,u}const a=[],c=r.decorations.sort((u,h)=>h.start.offset-u.start.offset||u.end.offset-h.end.offset);for(const u of c){const{start:h,end:f}=u;if(h.line===f.line)i(h.line,h.character,f.character,u);else if(h.line<f.line){i(h.line,h.character,Number.POSITIVE_INFINITY,u);for(let m=h.line+1;m<f.line;m++)a.unshift(()=>s(m,u));i(f.line,0,f.character,u)}}a.forEach(u=>u())}}}function ti(n){for(let e=0;e<n.length;e++){const t=n[e];if(t.start.offset>t.end.offset)throw new T(`Invalid decoration range: ${JSON.stringify(t.start)} - ${JSON.stringify(t.end)}`);for(let r=e+1;r<n.length;r++){const o=n[r],i=t.start.offset<=o.start.offset&&o.start.offset<t.end.offset,s=t.start.offset<o.end.offset&&o.end.offset<=t.end.offset,l=o.start.offset<=t.start.offset&&t.start.offset<o.end.offset,a=o.start.offset<t.end.offset&&t.end.offset<=o.end.offset;if(i||s||l||a){if(i&&s||l&&a||l&&t.start.offset===t.end.offset||s&&o.start.offset===o.end.offset)continue;throw new T(`Decorations ${JSON.stringify(t.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function Rn(n){return n.type==="text"?n.value:n.type==="element"?n.children.map(Rn).join(""):""}const ni=[ei()];function Ae(n){const e=ri(n.transformers||[]);return[...e.pre,...e.normal,...e.post,...ni]}function ri(n){const e=[],t=[],r=[];for(const o of n)switch(o.enforce){case"pre":e.push(o);break;case"post":t.push(o);break;default:r.push(o)}return{pre:e,post:t,normal:r}}var z=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ke={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function oi(n,e){const t=n.indexOf("\x1B",e);if(t!==-1&&n[t+1]==="["){const r=n.indexOf("m",t);if(r!==-1)return{sequence:n.substring(t+2,r).split(";"),startPosition:t,position:r+1}}return{position:n.length}}function Bt(n){const e=n.shift();if(e==="2"){const t=n.splice(0,3).map(r=>Number.parseInt(r));return t.length!==3||t.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:t}}else if(e==="5"){const t=n.shift();if(t)return{type:"table",index:Number(t)}}}function ii(n){const e=[];for(;n.length>0;){const t=n.shift();if(!t)continue;const r=Number.parseInt(t);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)Ke[r]&&e.push({type:"setDecoration",value:Ke[r]});else if(r<=29){const o=Ke[r-20];o&&(e.push({type:"resetDecoration",value:o}),o==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:z[r-30]}});else if(r===38){const o=Bt(n);o&&e.push({type:"setForegroundColor",value:o})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:z[r-40]}});else if(r===48){const o=Bt(n);o&&e.push({type:"setBackgroundColor",value:o})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:z[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:z[r-100+8]}})}return e}function si(){let n=null,e=null,t=new Set;return{parse(r){const o=[];let i=0;do{const s=oi(r,i),l=s.sequence?r.substring(i,s.startPosition):r.substring(i);if(l.length>0&&o.push({value:l,foreground:n,background:e,decorations:new Set(t)}),s.sequence){const a=ii(s.sequence);for(const c of a)c.type==="resetAll"?(n=null,e=null,t.clear()):c.type==="resetForegroundColor"?n=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&t.delete(c.value);for(const c of a)c.type==="setForegroundColor"?n=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&t.add(c.value)}i=s.position}while(i<r.length);return o}}}var ai={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 li(n=ai){function e(l){return n[l]}function t(l){return`#${l.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let r;function o(){if(r)return r;r=[];for(let c=0;c<z.length;c++)r.push(e(z[c]));let l=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let h=0;h<6;h++)r.push(t([l[c],l[u],l[h]]));let a=8;for(let c=0;c<24;c++,a+=10)r.push(t([a,a,a]));return r}function i(l){return o()[l]}function s(l){switch(l.type){case"named":return e(l.name);case"rgb":return t(l.rgb);case"table":return i(l.index)}}return{value:s}}const ci={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 ui(n,e,t){const r=Re(n,t),o=Oe(e),i=Object.fromEntries(z.map(a=>{const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=n.colors?.[c];return[a,u||ci[a]]})),s=li(i),l=si();return o.map(a=>l.parse(a[0]).map(c=>{let u,h;c.decorations.has("reverse")?(u=c.background?s.value(c.background):n.bg,h=c.foreground?s.value(c.foreground):n.fg):(u=c.foreground?s.value(c.foreground):n.fg,h=c.background?s.value(c.background):void 0),u=F(u,r),h=F(h,r),c.decorations.has("dim")&&(u=hi(u));let f=M.None;return c.decorations.has("bold")&&(f|=M.Bold),c.decorations.has("italic")&&(f|=M.Italic),c.decorations.has("underline")&&(f|=M.Underline),c.decorations.has("strikethrough")&&(f|=M.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:h,fontStyle:f}}))}function hi(n){const e=n.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/i);if(e)if(e[3]){const r=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${r}`}else return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map(r=>`${r}${r}`).join("")}80`;const t=n.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return t?`var(${t[1]}-dim)`:n}function gt(n,e,t={}){const{lang:r="text",theme:o=n.getLoadedThemes()[0]}=t;if(mt(r)||pt(o))return Oe(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:s}=n.setTheme(o);if(r==="ansi")return ui(i,e,t);const l=n.getLanguage(r);if(t.grammarState){if(t.grammarState.lang!==l.name)throw new T(`Grammar state language "${t.grammarState.lang}" does not match highlight language "${l.name}"`);if(!t.grammarState.themes.includes(i.name))throw new T(`Grammar state themes "${t.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return mi(e,l,i,s,t)}function di(...n){if(n.length===2)return he(n[1]);const[e,t,r={}]=n,{lang:o="text",theme:i=e.getLoadedThemes()[0]}=r;if(mt(o)||pt(i))throw new T("Plain language does not have grammar state");if(o==="ansi")throw new T("ANSI language does not have grammar state");const{theme:s,colorMap:l}=e.setTheme(i),a=e.getLanguage(o);return new ne(Le(t,a,s,l,r).stateStack,a.name,s.name)}function mi(n,e,t,r,o){const i=Le(n,e,t,r,o),s=new ne(Le(n,e,t,r,o).stateStack,e.name,t.name);return Ne(i.tokens,s),i.tokens}function Le(n,e,t,r,o){const i=Re(t,o),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:l=500}=o,a=Oe(n);let c=o.grammarState?Zo(o.grammarState,t.name)??rt:o.grammarContextCode!=null?Le(o.grammarContextCode,e,t,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:rt,u=[];const h=[];for(let f=0,m=a.length;f<m;f++){const[p,S]=a[f];if(p===""){u=[],h.push([]);continue}if(s>0&&p.length>=s){u=[],h.push([{content:p,offset:S,color:"",fontStyle:0}]);continue}let v,y,g;o.includeExplanation&&(v=e.tokenizeLine(p,c,l),y=v.tokens,g=0);const b=e.tokenizeLine2(p,c,l),E=b.tokens.length/2;for(let k=0;k<E;k++){const P=b.tokens[2*k],I=k+1<E?b.tokens[2*k+2]:p.length;if(P===I)continue;const re=b.tokens[2*k+1],Me=F(r[ee.getForeground(re)],i),Be=ee.getFontStyle(re),Ge={content:p.substring(P,I),offset:S+P,color:Me,fontStyle:Be};if(o.includeExplanation){const bt=[];if(o.includeExplanation!=="scopeName")for(const U of t.settings){let K;switch(typeof U.scope){case"string":K=U.scope.split(/,/).map(Ve=>Ve.trim());break;case"object":K=U.scope;break;default:continue}bt.push({settings:U,selectors:K.map(Ve=>Ve.split(/ /))})}Ge.explanation=[];let vt=0;for(;P+vt<I;){const U=y[g],K=p.substring(U.startIndex,U.endIndex);vt+=K.length,Ge.explanation.push({content:K,scopes:o.includeExplanation==="scopeName"?pi(U.scopes):fi(bt,U.scopes)}),g+=1}}u.push(Ge)}h.push(u),u=[],c=b.ruleStack}return{tokens:h,stateStack:c}}function pi(n){return n.map(e=>({scopeName:e}))}function fi(n,e){const t=[];for(let r=0,o=e.length;r<o;r++){const i=e[r];t[r]={scopeName:i,themeMatches:_i(n,i,e.slice(0,r))}}return t}function Gt(n,e){return n===e||e.substring(0,n.length)===n&&e[n.length]==="."}function gi(n,e,t){if(!Gt(n[n.length-1],e))return!1;let r=n.length-2,o=t.length-1;for(;r>=0&&o>=0;)Gt(n[r],t[o])&&(r-=1),o-=1;return r===-1}function _i(n,e,t){const r=[];for(const{selectors:o,settings:i}of n)for(const s of o)if(gi(s,e,t)){r.push(i);break}return r}function Tn(n,e,t){const r=Object.entries(t.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),o=r.map(a=>{const c=gt(n,e,{...t,theme:a.theme}),u=he(c),h=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:h}}),i=yi(...o.map(a=>a.tokens)),s=i[0].map((a,c)=>a.map((u,h)=>{const f={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in t&&t.includeExplanation&&(f.explanation=u.explanation),i.forEach((m,p)=>{const{content:S,explanation:v,offset:y,...g}=m[c][h];f.variants[r[p].color]=g}),f})),l=o[0].state?new ne(Object.fromEntries(o.map(a=>[a.theme,a.state?.getInternalStack(a.theme)])),o[0].state.lang):void 0;return l&&Ne(s,l),s}function yi(...n){const e=n.map(()=>[]),t=n.length;for(let r=0;r<n[0].length;r++){const o=n.map(a=>a[r]),i=e.map(()=>[]);e.forEach((a,c)=>a.push(i[c]));const s=o.map(()=>0),l=o.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<t;c++){const u=l[c];u.content.length===a?(i[c].push(u),s[c]+=1,l[c]=o[c][s[c]]):(i[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return e}function Pe(n,e,t){let r,o,i,s,l,a;if("themes"in t){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=t,f=Object.entries(t.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,g)=>y.color===c?-1:g.color===c?1:0);if(f.length===0)throw new T("`themes` option must not be empty");const m=Tn(n,e,t);if(a=he(m),c&&ft!==c&&!f.find(y=>y.color===c))throw new T(`\`themes\` option must contain the defaultColor key \`${c}\``);const p=f.map(y=>n.getTheme(y.theme)),S=f.map(y=>y.color);i=m.map(y=>y.map(g=>Xo(g,S,u,c,h))),a&&Ne(i,a);const v=f.map(y=>Re(y.theme,t));o=Vt(f,p,v,u,c,"fg",h),r=Vt(f,p,v,u,c,"bg",h),s=`shiki-themes ${p.map(y=>y.name).join(" ")}`,l=c?void 0:[o,r].join(";")}else if("theme"in t){const c=Re(t.theme,t);i=gt(n,e,t);const u=n.getTheme(t.theme);r=F(u.bg,c),o=F(u.fg,c),s=u.name,a=he(i)}else throw new T("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:o,bg:r,themeName:s,rootStyle:l,grammarState:a}}function Vt(n,e,t,r,o,i,s){return n.map((l,a)=>{const c=F(e[a][i],t[a])||"inherit",u=`${r+l.color}${i==="bg"?"-bg":""}:${c}`;if(a===0&&o){if(o===ft&&n.length>1){const h=n.findIndex(S=>S.color==="light"),f=n.findIndex(S=>S.color==="dark");if(h===-1||f===-1)throw new T('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const m=F(e[h][i],t[h])||"inherit",p=F(e[f][i],t[f])||"inherit";return`light-dark(${m}, ${p});${u}`}return c}return s==="css-vars"?u:null}).filter(l=>!!l).join(";")}function Ie(n,e,t,r={meta:{},options:t,codeToHast:(o,i)=>Ie(n,o,i),codeToTokens:(o,i)=>Pe(n,o,i)}){let o=e;for(const p of Ae(t))o=p.preprocess?.call(r,o,t)||o;let{tokens:i,fg:s,bg:l,themeName:a,rootStyle:c,grammarState:u}=Pe(n,o,t);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:f=!1}=t;h===!0?i=vi(i):h==="never"&&(i=Si(i)),f&&(i=wi(i));const m={...r,get source(){return o}};for(const p of Ae(t))i=p.tokens?.call(m,i)||i;return bi(i,{...t,fg:s,bg:l,themeName:a,rootStyle:c},m,u)}function bi(n,e,t,r=he(n)){const o=Ae(e),i=[],s={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=e;let c={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,...a!==!1&&a!=null?{tabindex:a.toString()}:{},...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter(([p])=>!p.startsWith("_")))},children:[]},u={type:"element",tagName:"code",properties:{},children:i};const h=[],f={...t,structure:l,addClassToHast:kn,get source(){return t.source},get tokens(){return n},get options(){return e},get root(){return s},get pre(){return c},get code(){return u},get lines(){return h}};if(n.forEach((p,S)=>{S&&(l==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&i.push({type:"text",value:`
|
|
13
|
-
`}));let v={type:"element",tagName:"span",properties:{class:"line"},children:[]},y=0;for(const g of p){let b={type:"element",tagName:"span",properties:{...g.htmlAttrs},children:[{type:"text",value:g.content}]};const E=lt(g.htmlStyle||Te(g));E&&(b.properties.style=E);for(const k of o)b=k?.span?.call(f,b,S+1,y,v,g)||b;l==="inline"?s.children.push(b):l==="classic"&&v.children.push(b),y+=g.content.length}if(l==="classic"){for(const g of o)v=g?.line?.call(f,v,S+1)||v;h.push(v),i.push(v)}}),l==="classic"){for(const p of o)u=p?.code?.call(f,u)||u;c.children.push(u);for(const p of o)c=p?.pre?.call(f,c)||c;s.children.push(c)}let m=s;for(const p of o)m=p?.root?.call(f,m)||m;return r&&Ne(m,r),m}function vi(n){return n.map(e=>{const t=[];let r="",o=0;return e.forEach((i,s)=>{const a=!(i.fontStyle&&(i.fontStyle&M.Underline||i.fontStyle&M.Strikethrough));a&&i.content.match(/^\s+$/)&&e[s+1]?(o||(o=i.offset),r+=i.content):r?(a?t.push({...i,offset:o,content:r+i.content}):t.push({content:r,offset:o},i),o=0,r=""):t.push(i)}),t})}function Si(n){return n.map(e=>e.flatMap(t=>{if(t.content.match(/^\s+$/))return t;const r=t.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return t;const[,o,i,s]=r;if(!o&&!s)return t;const l=[{...t,offset:t.offset+o.length,content:i}];return o&&l.unshift({content:o,offset:t.offset}),s&&l.push({content:s,offset:t.offset+o.length+i.length}),l}))}function wi(n){return n.map(e=>{const t=[];for(const r of e){if(t.length===0){t.push({...r});continue}const o=t[t.length-1],i=lt(o.htmlStyle||Te(o)),s=lt(r.htmlStyle||Te(r)),l=o.fontStyle&&(o.fontStyle&M.Underline||o.fontStyle&M.Strikethrough),a=r.fontStyle&&(r.fontStyle&M.Underline||r.fontStyle&M.Strikethrough);!l&&!a&&i===s?o.content+=r.content:t.push({...r})}return t})}const Ei=Uo;function ki(n,e,t){const r={meta:{},options:t,codeToHast:(i,s)=>Ie(n,i,s),codeToTokens:(i,s)=>Pe(n,i,s)};let o=Ei(Ie(n,e,t,r));for(const i of Ae(t))o=i.postprocess?.call(r,o,t)||o;return o}const jt={light:"#333333",dark:"#bbbbbb"},$t={light:"#fffffe",dark:"#1e1e1e"},Ut="__shiki_resolved";function _t(n){if(n?.[Ut])return n;const e={...n};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:t,fg:r}=e;if(!t||!r){const l=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;l?.settings?.foreground&&(r=l.settings.foreground),l?.settings?.background&&(t=l.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!t&&e?.colors?.["editor.background"]&&(t=e.colors["editor.background"]),r||(r=e.type==="light"?jt.light:jt.dark),t||(t=e.type==="light"?$t.light:$t.dark),e.fg=r,e.bg=t}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let o=0;const i=new Map;function s(l){if(i.has(l))return i.get(l);o+=1;const a=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?s(l):(i.set(l,a),a)}e.settings=e.settings.map(l=>{const a=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),c=l.settings?.background&&!l.settings.background.startsWith("#");if(!a&&!c)return l;const u={...l,settings:{...l.settings}};if(a){const h=s(l.settings.foreground);e.colorReplacements[h]=l.settings.foreground,u.settings.foreground=h}if(c){const h=s(l.settings.background);e.colorReplacements[h]=l.settings.background,u.settings.background=h}return u});for(const l of Object.keys(e.colors||{}))if((l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi"))&&!e.colors[l]?.startsWith("#")){const a=s(e.colors[l]);e.colorReplacements[a]=e.colors[l],e.colors[l]=a}return Object.defineProperty(e,Ut,{enumerable:!1,writable:!1,value:!0}),e}async function An(n){return Array.from(new Set((await Promise.all(n.filter(e=>!wn(e)).map(async e=>await Sn(e).then(t=>Array.isArray(t)?t:[t])))).flat()))}async function Ln(n){return(await Promise.all(n.map(async t=>En(t)?null:_t(await Sn(t))))).filter(t=>!!t)}let Ci=3;function Ri(n,e=3){e>Ci||console.trace(`[SHIKI DEPRECATE]: ${n}`)}let X=class extends Error{constructor(e){super(e),this.name="ShikiError"}};class Ti extends Tr{constructor(e,t,r,o={}){super(e),this._resolver=e,this._themes=t,this._langs=r,this._alias=o,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=_t(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Se.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){if(this._alias[e]){const t=new Set([e]);for(;this._alias[e];){if(e=this._alias[e],t.has(e))throw new X(`Circular alias \`${Array.from(t).join(" -> ")} -> ${e}\``);t.add(e)}}return this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const o=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(o.name=e.name,this._resolvedGrammars.set(e.name,o),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const o of e)this.resolveEmbeddedLanguages(o);const t=Array.from(this._langGraph.entries()),r=t.filter(([o,i])=>!i);if(r.length){const o=t.filter(([i,s])=>s&&s.embeddedLangs?.some(l=>r.map(([a])=>a).includes(l))).filter(i=>!r.includes(i));throw new X(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${o.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[o,i]of t)this._resolver.addLanguage(i);for(const[o,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){if(this._langMap.set(e.name,e),this._langGraph.set(e.name,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap.get(t))}}class Ai{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},t.forEach(r=>this.addLanguage(r))}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){const t=e.split(".");let r=[];for(let o=1;o<=t.length;o++){const i=t.slice(0,o).join(".");r=[...r,...this._injections.get(i)||[]]}return r}}let oe=0;function Li(n){oe+=1,n.warnings!==!1&&oe>=10&&oe%10===0&&console.warn(`[Shiki] ${oe} 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 e=!1;if(!n.engine)throw new X("`engine` option is required for synchronous mode");const t=(n.langs||[]).flat(1),r=(n.themes||[]).flat(1).map(_t),o=new Ai(n.engine,t),i=new Ti(o,r,t,n.langAlias);let s;function l(g){v();const b=i.getGrammar(typeof g=="string"?g:g.name);if(!b)throw new X(`Language \`${g}\` not found, you may need to load it first`);return b}function a(g){if(g==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};v();const b=i.getTheme(g);if(!b)throw new X(`Theme \`${g}\` not found, you may need to load it first`);return b}function c(g){v();const b=a(g);s!==g&&(i.setTheme(b),s=g);const E=i.getColorMap();return{theme:b,colorMap:E}}function u(){return v(),i.getLoadedThemes()}function h(){return v(),i.getLoadedLanguages()}function f(...g){v(),i.loadLanguages(g.flat(1))}async function m(...g){return f(await An(g))}function p(...g){v();for(const b of g.flat(1))i.loadTheme(b)}async function S(...g){return v(),p(await Ln(g))}function v(){if(e)throw new X("Shiki instance has been disposed")}function y(){e||(e=!0,i.dispose(),oe-=1)}return{setTheme:c,getTheme:a,getLanguage:l,getLoadedThemes:u,getLoadedLanguages:h,loadLanguage:m,loadLanguageSync:f,loadTheme:S,loadThemeSync:p,dispose:y,[Symbol.dispose]:y}}async function Pi(n){n.engine||Ri("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,t,r]=await Promise.all([Ln(n.themes||[]),An(n.langs||[]),n.engine]);return Li({...n,themes:e,langs:t,engine:r})}async function Ii(n){const e=await Pi(n);return{getLastGrammarState:(...t)=>di(e,...t),codeToTokensBase:(t,r)=>gt(e,t,r),codeToTokensWithThemes:(t,r)=>Tn(e,t,r),codeToTokens:(t,r)=>Pe(e,t,r),codeToHast:(t,r)=>Ie(e,t,r),codeToHtml:(t,r)=>ki(e,t,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Oi(n){const e=n.langs,t=n.themes,r=n.engine;async function o(i){function s(h){if(typeof h=="string"){if(wn(h))return[];h=i.langAlias?.[h]||h;const f=e[h];if(!f)throw new T(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return f}return h}function l(h){if(En(h))return"none";if(typeof h=="string"){const f=t[h];if(!f)throw new T(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return f}return h}const a=(i.themes??[]).map(h=>l(h)),c=(i.langs??[]).map(h=>s(h)),u=await Ii({engine:i.engine??r(),...i,themes:a,langs:c});return{...u,loadLanguage(...h){return u.loadLanguage(...h.map(s))},loadTheme(...h){return u.loadTheme(...h.map(l))},getBundledLanguages(){return e},getBundledThemes(){return t}}}return o}function Ni(n){let e;async function t(r={}){if(e){const o=await e;return await Promise.all([o.loadTheme(...r.themes||[]),o.loadLanguage(...r.langs||[])]),o}else{e=n({...r,themes:[],langs:[]});const o=await e;return await Promise.all([o.loadTheme(...r.themes||[]),o.loadLanguage(...r.langs||[])]),o}}return t}function xi(n,e){const t=Ni(n);async function r(o,i){const s=await t({langs:[i.lang],themes:"theme"in i?[i.theme]:Object.values(i.themes)}),l=await e?.guessEmbeddedLanguages?.(o,i.lang,s);return l&&await s.loadLanguage(...l),s}return{getSingletonHighlighter(o){return t(o)},async codeToHtml(o,i){return(await r(o,i)).codeToHtml(o,i)},async codeToHast(o,i){return(await r(o,i)).codeToHast(o,i)},async codeToTokens(o,i){return(await r(o,i)).codeToTokens(o,i)},async codeToTokensBase(o,i){return(await r(o,i)).codeToTokensBase(o,i)},async codeToTokensWithThemes(o,i){return(await r(o,i)).codeToTokensWithThemes(o,i)},async getLastGrammarState(o,i){return(await t({langs:[i.lang],themes:[i.theme]})).getLastGrammarState(o,i)}}}const Di=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>d(()=>import("./C-Jbm3Hp.js"),[],import.meta.url))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>d(()=>import("./D-2ljcwZ.js"),[],import.meta.url))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>d(()=>import("./Cv9koXgw.js"),[],import.meta.url))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>d(()=>import("./DFWUc33u.js"),[],import.meta.url))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>d(()=>import("./C9dUb6Cb.js"),[],import.meta.url))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>d(()=>import("./DQyhUUbL.js"),[],import.meta.url))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>d(()=>import("./D87Tk5Gz.js"),[],import.meta.url))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>d(()=>import("./eOWES_5F.js"),[],import.meta.url))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>d(()=>import("./BzJJZx-M.js"),[],import.meta.url))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>d(()=>import("./BXkSAIEj.js"),[],import.meta.url))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>d(()=>import("./BgDCqdQA.js"),[],import.meta.url))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>d(()=>import("./C8M2exoo.js"),[],import.meta.url))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>d(()=>import("./DHJKELXO.js"),[],import.meta.url))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>d(()=>import("./Cuk6v7N8.js"),[],import.meta.url))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>d(()=>import("./DH5Ifo-i.js"),[],import.meta.url))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>d(()=>import("./E3gJ1_iC.js"),[],import.meta.url))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>d(()=>import("./DAi9KRSo.js"),[],import.meta.url))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>d(()=>import("./D7oLnXFd.js"),[],import.meta.url))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>d(()=>import("./BfjtVDDH.js"),[],import.meta.url))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>d(()=>import("./CFHQjOhq.js"),[],import.meta.url))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>d(()=>import("./GsRaNv29.js"),[],import.meta.url))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>d(()=>import("./CVdnzihN.js"),[],import.meta.url))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>d(()=>import("./CH1njM8p.js"),[],import.meta.url))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>d(()=>import("./DRw_LuNl.js"),[],import.meta.url))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>d(()=>import("./hJgmCMqR.js"),[],import.meta.url))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>d(()=>import("./DnULxvSX.js"),[],import.meta.url))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>d(()=>import("./CkXjmgJE.js"),[],import.meta.url))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>d(()=>import("./CfQXZHmo.js"),[],import.meta.url))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>d(()=>import("./DWedfzmr.js"),[],import.meta.url))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>d(()=>import("./DUszq2jm.js"),[],import.meta.url))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>d(()=>import("./B7mTdjB0.js"),[],import.meta.url))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>d(()=>import("./D5KoaKCx.js"),[],import.meta.url))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>d(()=>import("./BfHTSMKl.js"),[],import.meta.url))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>d(()=>import("./B0m2ddpp.js"),[],import.meta.url))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>d(()=>import("./CyktbL80.js"),[],import.meta.url))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>d(()=>import("./Csfq5Kiy.js"),[],import.meta.url))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>d(()=>import("./CafNBF8u.js"),[],import.meta.url))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>d(()=>import("./CTRr51gU.js"),[],import.meta.url))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>d(()=>import("./D4h5O-jR.js"),[],import.meta.url))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>d(()=>import("./C39BiMTA.js"),[],import.meta.url))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>d(()=>import("./Ddv68eIx.js"),[],import.meta.url))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>d(()=>import("./DVMEJ2y_.js"),[],import.meta.url))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>d(()=>import("./PoHY5YXO.js"),[],import.meta.url))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>d(()=>import("./3e1v2bzS.js"),[],import.meta.url))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>d(()=>import("./CS3Unz2-.js"),[],import.meta.url))},{id:"red",displayName:"Red",type:"dark",import:(()=>d(()=>import("./bN70gL4F.js"),[],import.meta.url))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>d(()=>import("./BHrmToEH.js"),[],import.meta.url))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>d(()=>import("./CnK8MTSM.js"),[],import.meta.url))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>d(()=>import("./NleAzG8P.js"),[],import.meta.url))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>d(()=>import("./BthQWCQV.js"),[],import.meta.url))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>d(()=>import("./DqwNpetd.js"),[],import.meta.url))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>d(()=>import("./Bw305WKR.js"),[],import.meta.url))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>d(()=>import("./DXbdFlpD.js"),[],import.meta.url))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>d(()=>import("./L9t79GZl.js"),[],import.meta.url))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>d(()=>import("./CbfX1IO0.js"),[],import.meta.url))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>d(()=>import("./hegEt444.js"),[],import.meta.url))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>d(()=>import("./DU1UobuO.js"),[],import.meta.url))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>d(()=>import("./Bkuqu6BP.js"),[],import.meta.url))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>d(()=>import("./D0r3Knsf.js"),[],import.meta.url))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>d(()=>import("./CVO1_9PV.js"),[],import.meta.url))}],Mi=Object.fromEntries(Di.map(n=>[n.id,n.import]));class yt extends Error{constructor(e){super(e),this.name="ShikiError"}}function Bi(){return 2147483648}function Gi(){return typeof performance<"u"?performance.now():Date.now()}const Vi=(n,e)=>n+(e-n%e)%e;async function ji(n){let e,t;const r={};function o(m){t=m,r.HEAPU8=new Uint8Array(m),r.HEAPU32=new Uint32Array(m)}function i(m,p,S){r.HEAPU8.copyWithin(m,p,p+S)}function s(m){try{return e.grow(m-t.byteLength+65535>>>16),o(e.buffer),1}catch{}}function l(m){const p=r.HEAPU8.length;m=m>>>0;const S=Bi();if(m>S)return!1;for(let v=1;v<=4;v*=2){let y=p*(1+.2/v);y=Math.min(y,m+100663296);const g=Math.min(S,Vi(Math.max(m,y),65536));if(s(g))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(m,p,S=1024){const v=p+S;let y=p;for(;m[y]&&!(y>=v);)++y;if(y-p>16&&m.buffer&&a)return a.decode(m.subarray(p,y));let g="";for(;p<y;){let b=m[p++];if(!(b&128)){g+=String.fromCharCode(b);continue}const E=m[p++]&63;if((b&224)===192){g+=String.fromCharCode((b&31)<<6|E);continue}const k=m[p++]&63;if((b&240)===224?b=(b&15)<<12|E<<6|k:b=(b&7)<<18|E<<12|k<<6|m[p++]&63,b<65536)g+=String.fromCharCode(b);else{const P=b-65536;g+=String.fromCharCode(55296|P>>10,56320|P&1023)}}return g}function u(m,p){return m?c(r.HEAPU8,m,p):""}const h={emscripten_get_now:Gi,emscripten_memcpy_big:i,emscripten_resize_heap:l,fd_write:()=>0};async function f(){const p=await n({env:h,wasi_snapshot_preview1:h});e=p.memory,o(e.buffer),Object.assign(r,p),r.UTF8ToString=u}return await f(),r}var $i=Object.defineProperty,Ui=(n,e,t)=>e in n?$i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,A=(n,e,t)=>Ui(n,typeof e!="symbol"?e+"":e,t);let O=null;function Hi(n){throw new yt(n.UTF8ToString(n.getLastOnigError()))}class xe{constructor(e){A(this,"utf16Length"),A(this,"utf8Length"),A(this,"utf16Value"),A(this,"utf8Value"),A(this,"utf16OffsetToUtf8"),A(this,"utf8OffsetToUtf16");const t=e.length,r=xe._utf8ByteLength(e),o=r!==t,i=o?new Uint32Array(t+1):null;o&&(i[t]=r);const s=o?new Uint32Array(r+1):null;o&&(s[r]=t);const l=new Uint8Array(r);let a=0;for(let c=0;c<t;c++){const u=e.charCodeAt(c);let h=u,f=!1;if(u>=55296&&u<=56319&&c+1<t){const m=e.charCodeAt(c+1);m>=56320&&m<=57343&&(h=(u-55296<<10)+65536|m-56320,f=!0)}o&&(i[c]=a,f&&(i[c+1]=a),h<=127?s[a+0]=c:h<=2047?(s[a+0]=c,s[a+1]=c):h<=65535?(s[a+0]=c,s[a+1]=c,s[a+2]=c):(s[a+0]=c,s[a+1]=c,s[a+2]=c,s[a+3]=c)),h<=127?l[a++]=h:h<=2047?(l[a++]=192|(h&1984)>>>6,l[a++]=128|(h&63)>>>0):h<=65535?(l[a++]=224|(h&61440)>>>12,l[a++]=128|(h&4032)>>>6,l[a++]=128|(h&63)>>>0):(l[a++]=240|(h&1835008)>>>18,l[a++]=128|(h&258048)>>>12,l[a++]=128|(h&4032)>>>6,l[a++]=128|(h&63)>>>0),f&&c++}this.utf16Length=t,this.utf8Length=r,this.utf16Value=e,this.utf8Value=l,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let t=0;for(let r=0,o=e.length;r<o;r++){const i=e.charCodeAt(r);let s=i,l=!1;if(i>=55296&&i<=56319&&r+1<o){const a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(s=(i-55296<<10)+65536|a-56320,l=!0)}s<=127?t+=1:s<=2047?t+=2:s<=65535?t+=3:t+=4,l&&r++}return t}createString(e){const t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}const De=class ${constructor(e){if(A(this,"id",++$.LAST_ID),A(this,"_onigBinding"),A(this,"content"),A(this,"utf16Length"),A(this,"utf8Length"),A(this,"utf16OffsetToUtf8"),A(this,"utf8OffsetToUtf16"),A(this,"ptr"),!O)throw new yt("Must invoke loadWasm first.");this._onigBinding=O,this.content=e;const t=new xe(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!$._sharedPtrInUse?($._sharedPtr||($._sharedPtr=O.omalloc(1e4)),$._sharedPtrInUse=!0,O.HEAPU8.set(t.utf8Value,$._sharedPtr),this.ptr=$._sharedPtr):this.ptr=t.createString(O)}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===$._sharedPtr?$._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};A(De,"LAST_ID",0);A(De,"_sharedPtr",0);A(De,"_sharedPtrInUse",!1);let Pn=De;class Fi{constructor(e){if(A(this,"_onigBinding"),A(this,"_ptr"),!O)throw new yt("Must invoke loadWasm first.");const t=[],r=[];for(let l=0,a=e.length;l<a;l++){const c=new xe(e[l]);t[l]=c.createString(O),r[l]=c.utf8Length}const o=O.omalloc(4*e.length);O.HEAPU32.set(t,o/4);const i=O.omalloc(4*e.length);O.HEAPU32.set(r,i/4);const s=O.createOnigScanner(o,i,e.length);for(let l=0,a=e.length;l<a;l++)O.ofree(t[l]);O.ofree(i),O.ofree(o),s===0&&Hi(O),this._onigBinding=O,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,r){let o=0;if(typeof r=="number"&&(o=r),typeof e=="string"){e=new Pn(e);const i=this._findNextMatchSync(e,t,!1,o);return e.dispose(),i}return this._findNextMatchSync(e,t,!1,o)}_findNextMatchSync(e,t,r,o){const i=this._onigBinding,s=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),o);if(s===0)return null;const l=i.HEAPU32;let a=s/4;const c=l[a++],u=l[a++],h=[];for(let f=0;f<u;f++){const m=e.convertUtf8OffsetToUtf16(l[a++]),p=e.convertUtf8OffsetToUtf16(l[a++]);h[f]={start:m,end:p,length:p-m}}return{index:c,captureIndices:h}}}function Wi(n){return typeof n.instantiator=="function"}function zi(n){return typeof n.default=="function"}function qi(n){return typeof n.data<"u"}function Ki(n){return typeof Response<"u"&&n instanceof Response}function Yi(n){return typeof ArrayBuffer<"u"&&(n instanceof ArrayBuffer||ArrayBuffer.isView(n))||typeof Buffer<"u"&&Buffer.isBuffer?.(n)||typeof SharedArrayBuffer<"u"&&n instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&n instanceof Uint32Array}let ye;function Ji(n){if(ye)return ye;async function e(){O=await ji(async t=>{let r=n;return r=await r,typeof r=="function"&&(r=await r(t)),typeof r=="function"&&(r=await r(t)),Wi(r)?r=await r.instantiator(t):zi(r)?r=await r.default(t):(qi(r)&&(r=r.data),Ki(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Xi(r)(t):r=await Qi(r)(t):Yi(r)?r=await Ye(r)(t):r instanceof WebAssembly.Module?r=await Ye(r)(t):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Ye(r.default)(t))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return ye=e(),ye}function Ye(n){return e=>WebAssembly.instantiate(n,e)}function Xi(n){return e=>WebAssembly.instantiateStreaming(n,e)}function Qi(n){return async e=>{const t=await n.arrayBuffer();return WebAssembly.instantiate(t,e)}}async function Zi(n){return n&&await Ji(n),{createScanner(e){return new Fi(e.map(t=>typeof t=="string"?t:t.source))},createString(e){return new Pn(e)}}}const In=[{id:"angular-html",name:"Angular HTML",import:(()=>d(()=>import("./DxNHbxmM.js").then(n=>n.f),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>d(()=>import("./Cl0AqbOI.js"),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:"astro",name:"Astro",import:(()=>d(()=>import("./DxSwrfjg.js"),__vite__mapDeps([6,7,2,8,3,9,10]),import.meta.url))},{id:"blade",name:"Blade",import:(()=>d(()=>import("./DNMeEaky.js"),__vite__mapDeps([11,12,1,2,3,13,14,15,7]),import.meta.url))},{id:"c",name:"C",import:(()=>d(()=>import("./BIGW1oBm.js"),[],import.meta.url))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>d(()=>import("./CxbxFI8M.js"),__vite__mapDeps([16,2]),import.meta.url))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>d(()=>import("./Bp3cYrEr.js"),__vite__mapDeps([17,18,19,20,15]),import.meta.url))},{id:"css",name:"CSS",import:(()=>d(()=>import("./DPfMkruS.js"),[],import.meta.url))},{id:"csv",name:"CSV",import:(()=>d(()=>import("./fuZLfV_i.js"),[],import.meta.url))},{id:"glsl",name:"GLSL",import:(()=>d(()=>import("./DZxFcAj9.js"),__vite__mapDeps([19,20]),import.meta.url))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>d(()=>import("./C9oPPf7i.js"),__vite__mapDeps([21,2,8,22,10]),import.meta.url))},{id:"haml",name:"Ruby Haml",import:(()=>d(()=>import("./CmIQRyeF.js"),__vite__mapDeps([23,2,3]),import.meta.url))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>d(()=>import("./m17aaUwq.js"),__vite__mapDeps([24,1,2,3,25]),import.meta.url))},{id:"html",name:"HTML",import:(()=>d(()=>import("./CnnebwVN.js"),__vite__mapDeps([1,2,3]),import.meta.url))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>d(()=>import("./DGP4VlC8.js"),__vite__mapDeps([12,1,2,3]),import.meta.url))},{id:"http",name:"HTTP",import:(()=>d(()=>import("./CufHLc7y.js"),__vite__mapDeps([26,27,7,13,14,21,2,8,22,10]),import.meta.url))},{id:"hurl",name:"Hurl",import:(()=>d(()=>import("./CYsAdtH9.js"),__vite__mapDeps([28,21,2,8,22,10,13,14,29]),import.meta.url))},{id:"imba",name:"Imba",import:(()=>d(()=>import("./DGztddWO.js"),[],import.meta.url))},{id:"java",name:"Java",import:(()=>d(()=>import("./CylS5w8V.js"),[],import.meta.url))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>d(()=>import("./wDzz0qaB.js"),[],import.meta.url))},{id:"jinja",name:"Jinja",import:(()=>d(()=>import("./CXZktZb0.js"),__vite__mapDeps([30,1,2,3]),import.meta.url))},{id:"jison",name:"Jison",import:(()=>d(()=>import("./Br6cN0cg.js"),__vite__mapDeps([31,2]),import.meta.url))},{id:"json",name:"JSON",import:(()=>d(()=>import("./Cp-IABpG.js"),[],import.meta.url))},{id:"json5",name:"JSON5",import:(()=>d(()=>import("./C9tS-k6U.js"),[],import.meta.url))},{id:"jsonc",name:"JSON with Comments",import:(()=>d(()=>import("./Des-eS-w.js"),[],import.meta.url))},{id:"jsonl",name:"JSON Lines",import:(()=>d(()=>import("./DcaNXYhu.js"),[],import.meta.url))},{id:"jsx",name:"JSX",import:(()=>d(()=>import("./g9-lgVsj.js"),[],import.meta.url))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>d(()=>import("./CgjmDhmW.js"),__vite__mapDeps([32,17,18,19,20,15,33,2,34]),import.meta.url))},{id:"less",name:"Less",import:(()=>d(()=>import("./B1dDrJ26.js"),[],import.meta.url))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>d(()=>import("./Cvjx9yec.js"),[],import.meta.url))},{id:"marko",name:"Marko",import:(()=>d(()=>import("./CMFEf1DS.js"),__vite__mapDeps([35,3,36,5,8]),import.meta.url))},{id:"mdc",name:"MDC",import:(()=>d(()=>import("./TsXTqZ29.js"),__vite__mapDeps([37,38,25,12,1,2,3]),import.meta.url))},{id:"mdx",name:"MDX",import:(()=>d(()=>import("./Cmh6b_Ma.js"),[],import.meta.url))},{id:"php",name:"PHP",import:(()=>d(()=>import("./Xqf5ue2O.js"),__vite__mapDeps([39,1,2,3,13,14,15,7]),import.meta.url))},{id:"postcss",name:"PostCSS",import:(()=>d(()=>import("./CXtECtnM.js"),[],import.meta.url))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>d(()=>import("./BLmx8bSh.js"),__vite__mapDeps([40,2,3,1]),import.meta.url))},{id:"python",name:"Python",aliases:["py"],import:(()=>d(()=>import("./B6aJPvgy.js"),[],import.meta.url))},{id:"r",name:"R",import:(()=>d(()=>import("./DiinP2Uv.js"),[],import.meta.url))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>d(()=>import("./CDVJQ6XC.js"),[],import.meta.url))},{id:"sass",name:"Sass",import:(()=>d(()=>import("./Cj5Yp3dK.js"),[],import.meta.url))},{id:"scss",name:"SCSS",import:(()=>d(()=>import("./2EtD6e53.js"),__vite__mapDeps([5,3]),import.meta.url))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>d(()=>import("./Yzrsuije.js"),[],import.meta.url))},{id:"sql",name:"SQL",import:(()=>d(()=>import("./BLtJtn59.js"),[],import.meta.url))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>d(()=>import("./BEDo0Tqx.js"),[],import.meta.url))},{id:"svelte",name:"Svelte",import:(()=>d(()=>import("./DDBovgxi.js"),__vite__mapDeps([41,2,8,3,9]),import.meta.url))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>d(()=>import("./Cm3UrAx6.js"),__vite__mapDeps([42,8,3,2,19,20,1,15,13,14]),import.meta.url))},{id:"tsx",name:"TSX",import:(()=>d(()=>import("./COt5Ahok.js"),[],import.meta.url))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>d(()=>import("./BPQ3VLAy.js"),[],import.meta.url))},{id:"vue",name:"Vue",import:(()=>d(()=>import("./D7VJQ_DO.js"),__vite__mapDeps([43,3,2,8,7,12,1]),import.meta.url))},{id:"vue-html",name:"Vue HTML",import:(()=>d(()=>import("./tqtdBwhO.js"),__vite__mapDeps([44,43,3,2,8,7,12,1]),import.meta.url))},{id:"vue-vine",name:"Vue Vine",import:(()=>d(()=>import("./CEG3Q07z.js"),__vite__mapDeps([45,3,5,36,46,9,43,2,8,7,12,1]),import.meta.url))},{id:"wasm",name:"WebAssembly",import:(()=>d(()=>import("./MzD3tlZU.js"),[],import.meta.url))},{id:"wgsl",name:"WGSL",import:(()=>d(()=>import("./Dx-B1_4e.js"),[],import.meta.url))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>d(()=>import("./5i3qLPDT.js"),[],import.meta.url))},{id:"xml",name:"XML",import:(()=>d(()=>import("./BGJmEYvX.js"),__vite__mapDeps([13,14]),import.meta.url))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>d(()=>import("./Buea-lGh.js"),[],import.meta.url))}],es=Object.fromEntries(In.map(n=>[n.id,n.import])),ts=Object.fromEntries(In.flatMap(n=>n.aliases?.map(e=>[e,n.import])||[])),ns={...es,...ts},rs=Oi({langs:ns,themes:Mi,engine:()=>Zi(d(()=>import("./CG6Dc4jp.js"),[],import.meta.url))}),{codeToHtml:Ht}=xi(rs,{guessEmbeddedLanguages:qo}),os={class:"flex items-start justify-between gap-3"},is={class:"min-w-0"},ss={class:"text-sm font-semibold"},as={class:"text-xs text-neutral-500 truncate"},ls={class:"mt-1 flex flex-wrap gap-2 text-[11px]"},cs={class:"shrink-0 flex items-center gap-2"},us={class:"ml-1"},hs={class:"grid mt-3 gap-2 grid-cols-2"},ds=["innerHTML"],ms=["innerHTML"],Je=3,ps=Ft({__name:"HydrationIssue",props:{issue:{}},setup(n){const e=n,t=Y(()=>e.issue.instance.type.name??e.issue.instance.type.__name??"AnonymousComponent"),r=Y(()=>e.issue.instance.type.__file),o=Y(()=>e.issue.instance.vnode.el?.tagName?.toLowerCase()||"unknown"),i=Y(()=>e.issue.instance.vnode.el),{highlightElement:s,inspectElementInEditor:l,clearHighlight:a}=$n(),c=je(!0);function u(y,g){const b=(y||"").split(`
|
|
14
|
-
`),E=(g||"").split(`
|
|
15
|
-
`);let k=0;for(;k<b.length&&k<E.length&&b[k]===E[k];)k++;let P=b.length-1,I=E.length-1;for(;P>=k&&I>=k&&b[P]===E[I];)P--,I--;if(k>=b.length&&k>=E.length)return{a:b.slice(0,Math.min(10,b.length)).join(`
|
|
16
|
-
`),b:E.slice(0,Math.min(10,E.length)).join(`
|
|
17
|
-
`)};const re=Math.max(0,k-Je),Me=Math.min(b.length,P+1+Je),Be=Math.min(E.length,I+1+Je);return{a:b.slice(re,Me).join(`
|
|
18
|
-
`),b:E.slice(re,Be).join(`
|
|
19
|
-
`)}}const h=je(""),f=je("");async function m(y,g){const b=await Ht(y,{theme:"github-dark",lang:"html"}),E=await Ht(g,{theme:"github-dark",lang:"html"});h.value=b,f.value=E}const p=Y(()=>e.issue.htmlPreHydration??""),S=Y(()=>e.issue.htmlPostHydration??"");Bn(async()=>{const y=p.value,g=S.value;if(c.value){const{a:b,b:E}=u(y,g);await m(b,E)}else await m(y,g)});function v(y){navigator.clipboard?.writeText(y).catch(()=>{})}return(y,g)=>{const b=On,E=Nn,k=xn,P=Dn;return ie(),Wt(P,{"p-4":"",relative:""},{default:J(()=>[N("div",os,[N("div",is,[N("div",ss,pe(D(t)),1),N("div",as,pe(D(r)),1),N("div",ls,[H(b,{size:"small",title:"Root element tag where mismatch was detected."},{default:J(()=>[Gn(" root: "+pe(D(o)),1)]),_:1})])]),N("div",cs,[H(k,{size:"small",quaternary:"",title:"Open in editor",onMouseover:g[0]||(g[0]=I=>D(s)(D(i))),onMouseleave:g[1]||(g[1]=I=>D(a)()),onClick:g[2]||(g[2]=I=>D(l)(D(i)))},{default:J(()=>[H(E,{name:"material-symbols:file-open-outline",class:"text-lg"})]),_:1}),H(k,{size:"small",quaternary:"",onClick:g[3]||(g[3]=I=>c.value=!D(c))},{default:J(()=>[H(E,{name:"material-symbols:compare-arrows",class:"text-lg"}),N("span",us,pe(D(c)?"Show full":"Compact"),1)]),_:1}),H(k,{size:"small",quaternary:"",onClick:g[4]||(g[4]=I=>v(D(p)))},{default:J(()=>[H(E,{name:"material-symbols:content-copy-outline",class:"text-lg"}),g[6]||(g[6]=N("span",{class:"ml-1"},"Copy pre",-1))]),_:1}),H(k,{size:"small",quaternary:"",onClick:g[5]||(g[5]=I=>v(D(S)))},{default:J(()=>[H(E,{name:"material-symbols:content-copy-outline",class:"text-lg"}),g[7]||(g[7]=N("span",{class:"ml-1"},"Copy post",-1))]),_:1})])]),N("div",hs,[N("div",null,[g[8]||(g[8]=N("div",{class:"text-xs text-neutral-500 mb-1"}," Pre Hydration ",-1)),N("div",{class:"w-full overflow-auto",innerHTML:D(h)},null,8,ds)]),N("div",null,[g[9]||(g[9]=N("div",{class:"text-xs text-neutral-500 mb-1"}," Post Hydration ",-1)),N("div",{class:"w-full overflow-auto",innerHTML:D(f)},null,8,ms)])])]),_:1})}}}),fs=Object.assign(ps,{__name:"HydrationIssue"}),gs={grid:"","gap-4":"","p-4":""},_s={key:1,class:"text-neutral-500 dark:text-neutral-400"},As=Ft({__name:"hydration",setup(n){const{hydration:e}=Mn();return(t,r)=>{const o=fs;return ie(),$e("div",gs,[D(e).length?(ie(!0),$e(Vn,{key:0},jn(D(e),i=>(ie(),Wt(o,{issue:i},null,8,["issue"]))),256)):(ie(),$e("div",_s," No hydration issues found "))])}}});export{As as default};
|