@nuxt/hints 1.0.0-alpha.6 → 1.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +13 -0
  2. package/dist/client/200.html +1 -1
  3. package/dist/client/404.html +1 -1
  4. package/dist/client/_nuxt/8JEyW-wR.js +1 -0
  5. package/dist/client/_nuxt/B6uQK5FY.js +1 -0
  6. package/dist/client/_nuxt/{B5aFfd-r.js → BC7GvhRc.js} +1 -1
  7. package/dist/client/_nuxt/BDzmeJ6w.js +1 -0
  8. package/dist/client/_nuxt/{CmBIQlQV.js → BFYIK0lc.js} +10 -10
  9. package/dist/client/_nuxt/BUw7H-hv.js +1 -0
  10. package/dist/client/_nuxt/BgS17fQP.js +1 -0
  11. package/dist/client/_nuxt/{CPJ7wMZ4.js → BpvkYYYf.js} +1 -1
  12. package/dist/client/_nuxt/C-EnH0Lt.js +1 -0
  13. package/dist/client/_nuxt/C3Wv6jpd.js +1 -0
  14. package/dist/client/_nuxt/C47S-Tmv.js +1 -0
  15. package/dist/client/_nuxt/{C-Jbm3Hp.js → C4gqWexZ.js} +1 -1
  16. package/dist/client/_nuxt/{DSNF90uQ.js → CFvV-NJL.js} +1 -1
  17. package/dist/client/_nuxt/{BOswn9ZA.js → CHixySwz.js} +1 -1
  18. package/dist/client/_nuxt/{DxoRA_Jg.js → CKsR24bi.js} +1 -1
  19. package/dist/client/_nuxt/CMTm3GFP.js +1 -0
  20. package/dist/client/_nuxt/CMjwMIkn.js +1 -0
  21. package/dist/client/_nuxt/CjoLj4QM.js +1 -0
  22. package/dist/client/_nuxt/{C7PG24o2.js → CsWGzJ2d.js} +1 -1
  23. package/dist/client/_nuxt/CxJIMPBb.js +6 -0
  24. package/dist/client/_nuxt/{DJRd5JwX.js → D0lHLEVW.js} +1 -1
  25. package/dist/client/_nuxt/DJjDtW9f.js +1 -0
  26. package/dist/client/_nuxt/{B4xF9mB8.js → DJusdO6H.js} +1 -1
  27. package/dist/client/_nuxt/Dw-rzC63.js +4 -0
  28. package/dist/client/_nuxt/{DCjNVr8X.js → Dzw9Ycsi.js} +1 -1
  29. package/dist/client/_nuxt/builds/latest.json +1 -1
  30. package/dist/client/_nuxt/builds/meta/c9d33be6-f2ad-4bd9-8dd1-70c2dc337718.json +1 -0
  31. package/dist/client/_nuxt/{entry.I8MQ9pCy.css → entry.bXb283Sw.css} +1 -1
  32. package/dist/client/_nuxt/error-404.CCf1PrmA.css +1 -0
  33. package/dist/client/_nuxt/error-500.CZ0xe9I8.css +1 -0
  34. package/dist/client/component-lazy-load/index.html +1 -0
  35. package/dist/client/hydration/index.html +1 -1
  36. package/dist/client/index.html +1 -1
  37. package/dist/client/third-party-scripts/index.html +1 -1
  38. package/dist/client/web-vitals/index.html +1 -1
  39. package/dist/module.json +1 -1
  40. package/dist/module.mjs +194 -15
  41. package/dist/runtime/core/server/sse.js +16 -0
  42. package/dist/runtime/core/server/types.d.ts +12 -0
  43. package/dist/runtime/core/server/types.js +2 -0
  44. package/dist/runtime/hydration/composables.js +19 -13
  45. package/dist/runtime/hydration/nitro.plugin.d.ts +2 -0
  46. package/dist/runtime/hydration/nitro.plugin.js +65 -0
  47. package/dist/runtime/hydration/utils.d.ts +2 -2
  48. package/dist/runtime/hydration/utils.js +3 -2
  49. package/dist/runtime/lazy-load/composables.d.ts +11 -0
  50. package/dist/runtime/lazy-load/composables.js +49 -0
  51. package/dist/runtime/lazy-load/nitro.plugin.d.ts +2 -0
  52. package/dist/runtime/lazy-load/nitro.plugin.js +59 -0
  53. package/dist/runtime/lazy-load/plugin.client.d.ts +2 -0
  54. package/dist/runtime/lazy-load/plugin.client.js +73 -0
  55. package/dist/runtime/lazy-load/schema.d.ts +28 -0
  56. package/dist/runtime/lazy-load/schema.js +16 -0
  57. package/dist/runtime/lazy-load/utils.d.ts +1 -0
  58. package/dist/runtime/lazy-load/utils.js +2 -0
  59. package/dist/runtime/types.d.ts +14 -0
  60. package/package.json +30 -27
  61. package/dist/client/_nuxt/CGh86NWx.js +0 -4
  62. package/dist/client/_nuxt/COqnpOrt.js +0 -1
  63. package/dist/client/_nuxt/CgPyyo4O.js +0 -1
  64. package/dist/client/_nuxt/CmMr59Fi.js +0 -1
  65. package/dist/client/_nuxt/CmeNmt1M.js +0 -1
  66. package/dist/client/_nuxt/DIAcCAND.js +0 -6
  67. package/dist/client/_nuxt/PoHY5YXO.js +0 -1
  68. package/dist/client/_nuxt/Xqf5ue2O.js +0 -1
  69. package/dist/client/_nuxt/biRC-D3g.js +0 -1
  70. package/dist/client/_nuxt/builds/meta/320be0c4-177a-4724-8735-6b1a31ee8c22.json +0 -1
  71. package/dist/client/_nuxt/error-404.CTzDoZ55.css +0 -1
  72. package/dist/client/_nuxt/error-500.AUw9fuc1.css +0 -1
  73. package/dist/runtime/hydration/handler.nitro.d.ts +0 -5
  74. package/dist/runtime/hydration/handler.nitro.js +0 -52
  75. package/dist/runtime/hydration/sse.nitro.js +0 -22
  76. /package/dist/runtime/{hydration/sse.nitro.d.ts → core/server/sse.d.ts} +0 -0
@@ -1,7 +1,7 @@
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","./5X7smno1.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","./W9tJ9s81.js","./B6aJPvgy.js","./Dspwwk_N.js","./83L43bj1.js","./B1dDrJ26.js","./TsXTqZ29.js","./Cvjx9yec.js","./Xqf5ue2O.js","./BLmx8bSh.js","./DYoxhk2S.js","./Cm3UrAx6.js","./DEthMvLe.js","./DqQDbK_p.js","./CW8IKDeL.js","./BEDo0Tqx.js"])))=>i.map(i=>d[i]);
2
- import Nn from"./DIAcCAND.js";import{_ as On}from"./DJRd5JwX.js";import{_ as Dn}from"./B5aFfd-r.js";import{p as f,g as Ht,q as Mn,s as Bn,o as J,l as ze,w as re,a as U,t as yt,k as M,b as F,m as $n,n as oe,v as Gn,H as Vn,_ as jn,e as Un,c as Me,F as Hn,x as Fn}from"./CGh86NWx.js";import{u as Wn}from"./CPJ7wMZ4.js";import"./DCjNVr8X.js";import"./CmeNmt1M.js";let T=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function zn(n){return it(n)}function it(n){return Array.isArray(n)?qn(n):n instanceof RegExp?n:typeof n=="object"?Kn(n):n}function qn(n){let e=[];for(let t=0,r=n.length;t<r;t++)e[t]=it(n[t]);return e}function Kn(n){let e={};for(let t in n)e[t]=it(n[t]);return e}function Ft(n,...e){return e.forEach(t=>{for(let r in t)n[r]=t[r]}),n}function Wt(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?Wt(n.substring(0,n.length-1)):n.substr(~e+1)}var Be=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(n){return n===null?!1:(Be.lastIndex=0,Be.test(n))}static replaceCaptures(n,e,t){return n.replace(Be,(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 zt(n,e){return n<e?-1:n>e?1:0}function qt(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=zt(n[o],e[o]);if(i!==0)return i}return 0}return t-r}function vt(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 Kt(n){return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Jt=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}},be=class{constructor(n,e,t){this._colorMap=n,this._defaults=e,this._root=t}static createFromRawTheme(n,e){return this.createFromParsedTheme(Xn(n),e)}static createFromParsedTheme(n,e){return Zn(n,e)}_cachedMatchRoot=new Jt(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=>Jn(n.parent,o.parentScopes));return r?new Yt(r.fontStyle,r.foreground,r.background):null}},$e=class ye{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const r of t)e=new ye(e,r);return e}static from(...e){let t=null;for(let r=0;r<e.length;r++)t=new ye(t,e[r]);return t}push(e){return new ye(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 Jn(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&&!Yn(n.scopeName,r);){if(o)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}function Yn(n,e){return e===n||n.startsWith(e)&&n[e.length]==="."}var Yt=class{constructor(n,e,t){this.fontStyle=n,this.foregroundId=e,this.backgroundId=t}};function Xn(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 m=0,d=h.length;m<d;m++)switch(h[m]){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"&&vt(s.settings.foreground)&&(c=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&vt(s.settings.background)&&(u=s.settings.background);for(let h=0,m=l.length;h<m;h++){let p=l[h].trim().split(" "),b=p[p.length-1],S=null;p.length>1&&(S=p.slice(0,p.length-1),S.reverse()),t[r++]=new Qn(b,S,o,a,c,u)}}return t}var Qn=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}},N=(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))(N||{});function Zn(n,e){n.sort((a,c)=>{let u=zt(a.scope,c.scope);return u!==0||(u=qt(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 er(e),s=new Yt(t,i.getId(r),i.getId(o)),l=new nr(new qe(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 be(i,s,l)}var er=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)}},tr=Object.freeze([]),qe=class Xt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,r,o,i){this.scopeDepth=e,this.parentScopes=t||tr,this.fontStyle=r,this.foreground=o,this.background=i}clone(){return new Xt(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)}},nr=class Ke{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(Ke._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 Ke(this._mainRule.clone(),qe.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(qt(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 qe(e,t,r,o,i))}},Z=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=B.getLanguageId(e),r=B.getTokenType(e),o=B.getFontStyle(e),i=B.getForeground(e),s=B.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=B.getLanguageId(e),c=B.getTokenType(e),u=B.containsBalancedBrackets(e)?1:0,h=B.getFontStyle(e),m=B.getForeground(e),d=B.getBackground(e);return t!==0&&(a=t),r!==8&&(c=r),o!==null&&(u=o?1:0),i!==-1&&(h=i),s!==0&&(m=s),l!==0&&(d=l),(a<<0|c<<8|u<<10|h<<11|m<<15|d<<24)>>>0}};function Se(n,e){const t=[],r=rr(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(bt(o)){const a=[];do a.push(o),o=r.next();while(bt(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 bt(n){return!!n&&!!n.match(/[\w\.:]+/)}function rr(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 Qt(n){typeof n.dispose=="function"&&n.dispose()}var le=class{constructor(n){this.scopeName=n}toKey(){return this.scopeName}},or=class{constructor(n,e){this.scopeName=n,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},ir=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))}},sr=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 ir;for(const t of n)ar(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 ar(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):Je(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 Je(n,e,t){if(e.repository&&e.repository[n]){const r=e.repository[n];Ce([r],e,t)}}function ve(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&Ce(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&Ce(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function Ce(n,e,t){for(const r of n){if(t.visitedRule.has(r))continue;t.visitedRule.add(r);const o=r.repository?Ft({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&Ce(r.patterns,{...e,repository:o},t);const i=r.include;if(!i)continue;const s=Zt(i);switch(s.kind){case 0:ve({...e,selfGrammar:e.baseGrammar},t);break;case 1:ve(e,t);break;case 2:Je(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?Je(s.ruleName,a,t):ve(a,t)}else s.kind===4?t.add(new or(s.scopeName,s.ruleName)):t.add(new le(s.scopeName));break}}}var lr=class{kind=0},cr=class{kind=1},ur=class{constructor(n){this.ruleName=n}kind=2},hr=class{constructor(n){this.scopeName=n}kind=3},dr=class{constructor(n,e){this.scopeName=n,this.ruleName=e}kind=4};function Zt(n){if(n==="$base")return new lr;if(n==="$self")return new cr;const e=n.indexOf("#");if(e===-1)return new hr(n);if(e===0)return new ur(n.substring(1));{const t=n.substring(0,e),r=n.substring(e+1);return new dr(t,r)}}var mr=/\\(\d+)/,St=/\\(\d+)/g,pr=-1,en=-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=pe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const n=this.$location?`${Wt(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:pe.replaceCaptures(this._name,n,e)}getContentName(n,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,n,e)}},fr=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!")}},gr=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}},Ct=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}},Ye=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}},Ee=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,en),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}},tn=class x{static createCaptureRule(e,t,r,o,i){return e.registerRule(s=>new fr(t,s,r,o,i))}static getCompiledRuleId(e,t,r){return e.id||t.registerRule(o=>{if(e.id=o,e.match)return new gr(e.$vscodeTextmateLocation,e.id,e.name,e.match,x._compileCaptures(e.captures,t,r));if(typeof e.begin>"u"){e.repository&&(r=Ft({},r,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new Ct(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,x._compilePatterns(i,t,r))}return e.while?new Ee(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 Ye(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=Zt(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,m=c.kind===4?c.ruleName:null,d=t.getExternalGrammar(h,r);if(d)if(m){let p=d.repository[m];p&&(a=x.getCompiledRuleId(p,t,d.repository))}else a=x.getCompiledRuleId(d.repository.$self,t,d.repository);break}}else a=x.getCompiledRuleId(l,t,r);if(a!==-1){const c=t.getRule(a);let u=!1;if((c instanceof Ct||c instanceof Ye||c instanceof Ee)&&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 nn{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=mr.test(this.source):this.hasBackReferences=!1}clone(){return new nn(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 St.lastIndex=0,this.source.replace(St,(o,i)=>Kt(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 Et(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 Et(n,r,this._items.map(o=>o.ruleId))}},Et=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}},Ge=class{constructor(n,e){this.languageId=n,this.tokenType=e}},_r=class Xe{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Ge(e,8),this._embeddedLanguagesMatcher=new yr(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Xe._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Ge(0,0);_getBasicScopeAttributes=new Jt(e=>{const t=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Ge(t,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(Xe.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/},yr=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])=>Kt(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])}},wt=class{constructor(n,e){this.stack=n,this.stoppedEarly=e}};function rn(n,e,t,r,o,i,s,l){const a=e.content.length;let c=!1,u=-1;if(s){const d=vr(n,e,t,r,o,i);o=d.stack,r=d.linePos,t=d.isFirstLine,u=d.anchorPosition}const h=Date.now();for(;!c;){if(l!==0&&Date.now()-h>l)return new wt(o,!0);m()}return new wt(o,!1);function m(){const d=br(n,e,t,r,o,u);if(!d){i.produce(o,a),c=!0;return}const p=d.captureIndices,b=d.matchedRuleId,S=p&&p.length>0?p[0].end>r:!1;if(b===pr){const g=o.getRule(n);i.produce(o,p[0].start),o=o.withContentNameScopesList(o.nameScopesList),se(n,e,t,o,i,g.endCaptures,p),i.produce(o,p[0].end);const v=o;if(o=o.parent,u=v.getAnchorPos(),!S&&v.getEnterPos()===r){o=v,i.produce(o,a),c=!0;return}}else{const g=n.getRule(b);i.produce(o,p[0].start);const v=o,_=g.getName(e.content,p),C=o.contentNameScopesList.pushAttributed(_,n);if(o=o.push(b,r,u,p[0].end===a,null,C,C),g instanceof Ye){const w=g;se(n,e,t,o,i,w.beginCaptures,p),i.produce(o,p[0].end),u=p[0].end;const I=w.getContentName(e.content,p),$=C.pushAttributed(I,n);if(o=o.withContentNameScopesList($),w.endHasBackReferences&&(o=o.withEndRule(w.getEndWithResolvedBackReferences(e.content,p))),!S&&v.hasSameRuleAs(o)){o=o.pop(),i.produce(o,a),c=!0;return}}else if(g instanceof Ee){const w=g;se(n,e,t,o,i,w.beginCaptures,p),i.produce(o,p[0].end),u=p[0].end;const I=w.getContentName(e.content,p),$=C.pushAttributed(I,n);if(o=o.withContentNameScopesList($),w.whileHasBackReferences&&(o=o.withEndRule(w.getWhileWithResolvedBackReferences(e.content,p))),!S&&v.hasSameRuleAs(o)){o=o.pop(),i.produce(o,a),c=!0;return}}else if(se(n,e,t,o,i,g.captures,p),i.produce(o,p[0].end),o=o.pop(),!S){o=o.safePop(),i.produce(o,a),c=!0;return}}p[0].end>r&&(r=p[0].end,t=!1)}}function vr(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 Ee&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=Er(a.rule,n,a.stack.endRule,t,r===s),h=c.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==en){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 br(n,e,t,r,o,i){const s=Sr(n,e,t,r,o,i),l=n.getInjections();if(l.length===0)return s;const a=Cr(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 Sr(n,e,t,r,o,i){const s=o.getRule(n),{ruleScanner:l,findOptions:a}=on(s,n,o.endRule,t,r===i),c=l.findNextMatchSync(e,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Cr(n,e,t,r,o,i,s){let l=Number.MAX_VALUE,a=null,c,u=0;const h=i.contentNameScopesList.getScopeNames();for(let m=0,d=n.length;m<d;m++){const p=n[m];if(!p.matcher(h))continue;const b=e.getRule(p.ruleId),{ruleScanner:S,findOptions:g}=on(b,e,null,r,o===s),v=S.findNextMatchSync(t,o,g);if(!v)continue;const _=v.captureIndices[0].start;if(!(_>=l)&&(l=_,a=v.captureIndices,c=v.ruleId,u=p.priority,l===o))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function on(n,e,t,r,o){return{ruleScanner:n.compileAG(e,t,r,o),findOptions:0}}function Er(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 m=i[h];if(m===null)continue;const d=s[h];if(d.length===0)continue;if(d.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=d.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,d.start):o.produce(r,d.start),m.retokenizeCapturedWithRuleId){const b=m.getName(l,s),S=r.contentNameScopesList.pushAttributed(b,n),g=m.getContentName(l,s),v=S.pushAttributed(g,n),_=r.push(m.retokenizeCapturedWithRuleId,d.start,-1,!1,null,S,v),C=n.createOnigString(l.substring(0,d.end));rn(n,C,t&&d.start===0,d.start,_,o,!1,0),Qt(C);continue}const p=m.getName(l,s);if(p!==null){const S=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(p,n);c.push(new wr(S,d.end))}}for(;c.length>0;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var wr=class{scopes;endPos;constructor(n,e){this.scopes=n,this.endPos=e}};function kr(n,e,t,r,o,i,s,l){return new Tr(n,e,t,r,o,i,s,l)}function kt(n,e,t,r,o){const i=Se(e,we),s=tn.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 we(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(Lr(e[o],r))return t=o+1,!0;return!1})}function Lr(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 Tr=class{constructor(n,e,t,r,o,i,s,l){if(this._rootScopeName=n,this.balancedBracketSelectors=i,this._onigLib=l,this._basicScopeAttributesProvider=new _r(t,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Lt(e,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const a of Object.keys(o)){const c=Se(a,we);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)kt(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&&kt(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]=Lt(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=tn.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!e||e===Qe.NULL){o=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=Z.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),m=this.getRule(this._rootId).getName(null,null);let d;m?d=ae.createRootAndLookUpScopeName(m,h,this):d=ae.createRoot("unknown",h),e=new Qe(null,this._rootId,-1,-1,!1,null,d,d)}else o=!1,e.reset();n=n+`
4
- `;const i=this.createOnigString(n),s=i.content.length,l=new Ar(t,n,this._tokenTypeMatchers,this.balancedBracketSelectors),a=rn(this,i,o,0,e,l,!0,r);return Qt(i),{lineLength:s,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Lt(n,e){return n=zn(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 G{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=$e.push(o,i.scopeNames),r=new G(r,o,i.encodedTokenAttributes);return r}static createRoot(e,t){return new G(null,new $e(null,e),t)}static createRootAndLookUpScopeName(e,t,r){const o=r.getMetadataForScope(e),i=new $e(null,e),s=r.themeProvider.themeMatch(i),l=G.mergeAttributes(t,o,s);return new G(null,i,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return G.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),Z.set(e,t.languageId,t.tokenType,null,o,i,s)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return G._pushAttributed(this,e,t);const r=e.split(/ /g);let o=this;for(const i of r)o=G._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=G.mergeAttributes(e.tokenAttributes,o,s);return new G(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}},Qe=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))}},Rr=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(n,e){this.balancedBracketScopes=n.flatMap(t=>t==="*"?(this.allowAny=!0,[]):Se(t,we).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>Se(t,we).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}},Ar=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=Z.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(r=Z.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}},Pr=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,kr(n,i,e,t,r,o,this,this._onigLib))}return this._grammars.get(n)}},Ir=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Pr(be.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(be.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 Rr(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,r,o,i){const s=new sr(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)}},Ze=Qe.NULL;const xr=["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 sn(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 et(n){return n.toLowerCase()}class O{constructor(e,t){this.attribute=t,this.property=e}}O.prototype.attribute="";O.prototype.booleanish=!1;O.prototype.boolean=!1;O.prototype.commaOrSpaceSeparated=!1;O.prototype.commaSeparated=!1;O.prototype.defined=!1;O.prototype.mustUseProperty=!1;O.prototype.number=!1;O.prototype.overloadedBoolean=!1;O.prototype.property="";O.prototype.spaceSeparated=!1;O.prototype.space=void 0;let Nr=0;const E=q(),L=q(),tt=q(),y=q(),k=q(),X=q(),D=q();function q(){return 2**++Nr}const nt=Object.freeze(Object.defineProperty({__proto__:null,boolean:E,booleanish:L,commaOrSpaceSeparated:D,commaSeparated:X,number:y,overloadedBoolean:tt,spaceSeparated:k},Symbol.toStringTag,{value:"Module"})),Ve=Object.keys(nt);class st extends O{constructor(e,t,r,o){let i=-1;if(super(e,t),Tt(this,"space",o),typeof r=="number")for(;++i<Ve.length;){const s=Ve[i];Tt(this,Ve[i],(r&nt[s])===nt[s])}}}st.prototype.defined=!0;function Tt(n,e,t){t&&(n[e]=t)}function ee(n){const e={},t={};for(const[r,o]of Object.entries(n.properties)){const i=new st(r,n.transform(n.attributes||{},r),o,n.space);n.mustUseProperty&&n.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),e[r]=i,t[et(r)]=r,t[et(i.attribute)]=r}return new me(e,t,n.space)}const an=ee({properties:{ariaActiveDescendant:null,ariaAtomic:L,ariaAutoComplete:null,ariaBusy:L,ariaChecked:L,ariaColCount:y,ariaColIndex:y,ariaColSpan:y,ariaControls:k,ariaCurrent:null,ariaDescribedBy:k,ariaDetails:null,ariaDisabled:L,ariaDropEffect:k,ariaErrorMessage:null,ariaExpanded:L,ariaFlowTo:k,ariaGrabbed:L,ariaHasPopup:null,ariaHidden:L,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:k,ariaLevel:y,ariaLive:null,ariaModal:L,ariaMultiLine:L,ariaMultiSelectable:L,ariaOrientation:null,ariaOwns:k,ariaPlaceholder:null,ariaPosInSet:y,ariaPressed:L,ariaReadOnly:L,ariaRelevant:null,ariaRequired:L,ariaRoleDescription:k,ariaRowCount:y,ariaRowIndex:y,ariaRowSpan:y,ariaSelected:L,ariaSetSize:y,ariaSort:null,ariaValueMax:y,ariaValueMin:y,ariaValueNow:y,ariaValueText:null,role:null},transform(n,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function ln(n,e){return e in n?n[e]:e}function cn(n,e){return ln(n,e.toLowerCase())}const Or=ee({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:X,acceptCharset:k,accessKey:k,action:null,allow:null,allowFullScreen:E,allowPaymentRequest:E,allowUserMedia:E,alt:null,as:null,async:E,autoCapitalize:null,autoComplete:k,autoFocus:E,autoPlay:E,blocking:k,capture:null,charSet:null,checked:E,cite:null,className:k,cols:y,colSpan:null,content:null,contentEditable:L,controls:E,controlsList:k,coords:y|X,crossOrigin:null,data:null,dateTime:null,decoding:null,default:E,defer:E,dir:null,dirName:null,disabled:E,download:tt,draggable:L,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:E,formTarget:null,headers:k,height:y,hidden:tt,high:y,href:null,hrefLang:null,htmlFor:k,httpEquiv:k,id:null,imageSizes:null,imageSrcSet:null,inert:E,inputMode:null,integrity:null,is:null,isMap:E,itemId:null,itemProp:k,itemRef:k,itemScope:E,itemType:k,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:E,low:y,manifest:null,max:null,maxLength:y,media:null,method:null,min:null,minLength:y,multiple:E,muted:E,name:null,nonce:null,noModule:E,noValidate:E,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:E,optimum:y,pattern:null,ping:k,placeholder:null,playsInline:E,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:E,referrerPolicy:null,rel:k,required:E,reversed:E,rows:y,rowSpan:y,sandbox:k,scope:null,scoped:E,seamless:E,selected:E,shadowRootClonable:E,shadowRootDelegatesFocus:E,shadowRootMode:null,shape:null,size:y,sizes:null,slot:null,span:y,spellCheck:L,src:null,srcDoc:null,srcLang:null,srcSet:null,start:y,step:null,style:null,tabIndex:y,target:null,title:null,translate:null,type:null,typeMustMatch:E,useMap:null,value:L,width:y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:k,axis:null,background:null,bgColor:null,border:y,borderColor:null,bottomMargin:y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:E,declare:E,event:null,face:null,frame:null,frameBorder:null,hSpace:y,leftMargin:y,link:null,longDesc:null,lowSrc:null,marginHeight:y,marginWidth:y,noResize:E,noHref:E,noShade:E,noWrap:E,object:null,profile:null,prompt:null,rev:null,rightMargin:y,rules:null,scheme:null,scrolling:L,standby:null,summary:null,text:null,topMargin:y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:E,disableRemotePlayback:E,prefix:null,property:null,results:y,security:null,unselectable:null},space:"html",transform:cn}),Dr=ee({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:D,accentHeight:y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:y,amplitude:y,arabicForm:null,ascent:y,attributeName:null,attributeType:null,azimuth:y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:y,by:null,calcMode:null,capHeight:y,className:k,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:y,diffuseConstant:y,direction:null,display:null,dur:null,divisor:y,dominantBaseline:null,download:E,dx:null,dy:null,edgeMode:null,editable:null,elevation:y,enableBackground:null,end:null,event:null,exponent:y,externalResourcesRequired:null,fill:null,fillOpacity:y,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:X,g2:X,glyphName:X,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:y,horizOriginX:y,horizOriginY:y,id:null,ideographic:y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:y,k:y,k1:y,k2:y,k3:y,k4:y,kernelMatrix:D,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:y,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:y,overlineThickness:y,paintOrder:null,panose1:null,path:null,pathLength:y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:k,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:y,pointsAtY:y,pointsAtZ:y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:D,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:D,rev:D,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:D,requiredFeatures:D,requiredFonts:D,requiredFormats:D,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:y,specularExponent:y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:y,strikethroughThickness:y,string:null,stroke:null,strokeDashArray:D,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:y,strokeOpacity:y,strokeWidth:null,style:null,surfaceScale:y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:D,tabIndex:y,tableValues:null,target:null,targetX:y,targetY:y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:D,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:y,underlineThickness:y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:y,values:null,vAlphabetic:y,vMathematical:y,vectorEffect:null,vHanging:y,vIdeographic:y,version:null,vertAdvY:y,vertOriginX:y,vertOriginY:y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ln}),un=ee({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()}}),hn=ee({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cn}),dn=ee({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,e){return"xml:"+e.slice(3).toLowerCase()}}),Mr=/[A-Z]/g,Rt=/-[a-z]/g,Br=/^data[-\w.:]+$/i;function $r(n,e){const t=et(e);let r=e,o=O;if(t in n.normal)return n.property[n.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Br.test(e)){if(e.charAt(4)==="-"){const i=e.slice(5).replace(Rt,Vr);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=e.slice(4);if(!Rt.test(i)){let s=i.replace(Mr,Gr);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}o=st}return new o(r,e)}function Gr(n){return"-"+n.toLowerCase()}function Vr(n){return n.charAt(1).toUpperCase()}const jr=sn([an,Or,un,hn,dn],"html"),mn=sn([an,Dr,un,hn,dn],"svg"),At={}.hasOwnProperty;function Ur(n,e){const t=e||{};function r(o,...i){let s=r.invalid;const l=r.handlers;if(o&&At.call(o,n)){const a=String(o[n]);s=At.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 Hr=/["&'<>`]/g,Fr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Wr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,zr=/[|\\{}()[\]^$+*?.]/g,Pt=new WeakMap;function qr(n,e){if(n=n.replace(e.subset?Kr(e.subset):Hr,r),e.subset||e.escapeOnly)return n;return n.replace(Fr,t).replace(Wr,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 Kr(n){let e=Pt.get(n);return e||(e=Jr(n),Pt.set(n,e)),e}function Jr(n){const e=[];let t=-1;for(;++t<n.length;)e.push(n[t].replace(zr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Yr=/[\dA-Fa-f]/;function Xr(n,e,t){const r="&#x"+n.toString(16).toUpperCase();return t&&e&&!Yr.test(String.fromCharCode(e))?r:r+";"}const Qr=/\d/;function Zr(n,e,t){const r="&#"+String(n);return t&&e&&!Qr.test(String.fromCharCode(e))?r:r+";"}const eo=["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"],je={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:"€"},to=["cent","copy","divide","gt","lt","not","para","times"],pn={}.hasOwnProperty,rt={};let fe;for(fe in je)pn.call(je,fe)&&(rt[je[fe]]=fe);const no=/[^\dA-Za-z]/;function ro(n,e,t,r){const o=String.fromCharCode(n);if(pn.call(rt,o)){const i=rt[o],s="&"+i;return t&&eo.includes(i)&&!to.includes(i)&&(!r||e&&e!==61&&no.test(String.fromCharCode(e)))?s:s+";"}return""}function oo(n,e,t){let r=Xr(n,e,t.omitOptionalSemicolons),o;if((t.useNamedReferences||t.useShortestReferences)&&(o=ro(n,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!o)&&t.useShortestReferences){const i=Zr(n,e,t.omitOptionalSemicolons);i.length<r.length&&(r=i)}return o&&(!t.useShortestReferences||o.length<r.length)?o:r}function Q(n,e){return qr(n,Object.assign({format:oo},e))}const io=/^>|^->|<!--|-->|--!>|<!-$/g,so=[">"],ao=["<",">"];function lo(n,e,t,r){return r.settings.bogusComments?"<?"+Q(n.value,Object.assign({},r.settings.characterReferences,{subset:so}))+">":"<!--"+n.value.replace(io,o)+"-->";function o(i){return Q(i,Object.assign({},r.settings.characterReferences,{subset:ao}))}}function co(n,e,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function It(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 uo(n,e){const t=e||{};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function ho(n){return n.join(" ").trim()}const mo=/[ \t\n\f\r]/g;function at(n){return typeof n=="object"?n.type==="text"?xt(n.value):!1:xt(n)}function xt(n){return n.replace(mo,"")===""}const A=gn(1),fn=gn(-1),po=[];function gn(n){return e;function e(t,r,o){const i=t?t.children:po;let s=(r||0)+n,l=i[s];if(!o)for(;l&&at(l);)s+=n,l=i[s];return l}}const fo={}.hasOwnProperty;function _n(n){return e;function e(t,r,o){return fo.call(n,t.tagName)&&n[t.tagName](t,r,o)}}const lt=_n({body:_o,caption:Ue,colgroup:Ue,dd:So,dt:bo,head:Ue,html:go,li:vo,optgroup:Co,option:Eo,p:yo,rp:Nt,rt:Nt,tbody:ko,td:Ot,tfoot:Lo,th:Ot,thead:wo,tr:To});function Ue(n,e,t){const r=A(t,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&at(r.value.charAt(0)))}function go(n,e,t){const r=A(t,e);return!r||r.type!=="comment"}function _o(n,e,t){const r=A(t,e);return!r||r.type!=="comment"}function yo(n,e,t){const r=A(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 vo(n,e,t){const r=A(t,e);return!r||r.type==="element"&&r.tagName==="li"}function bo(n,e,t){const r=A(t,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function So(n,e,t){const r=A(t,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Nt(n,e,t){const r=A(t,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Co(n,e,t){const r=A(t,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Eo(n,e,t){const r=A(t,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function wo(n,e,t){const r=A(t,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function ko(n,e,t){const r=A(t,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Lo(n,e,t){return!A(t,e)}function To(n,e,t){const r=A(t,e);return!r||r.type==="element"&&r.tagName==="tr"}function Ot(n,e,t){const r=A(t,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Ro=_n({body:Io,colgroup:xo,head:Po,html:Ao,tbody:No});function Ao(n){const e=A(n,-1);return!e||e.type!=="comment"}function Po(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 Io(n){const e=A(n,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&at(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function xo(n,e,t){const r=fn(t,e),o=A(n,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&lt(r,t.children.indexOf(r),t)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function No(n,e,t){const r=fn(t,e),o=A(n,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&lt(r,t.children.indexOf(r),t)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const ge={name:[[`
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","./5X7smno1.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","./W9tJ9s81.js","./B6aJPvgy.js","./Dspwwk_N.js","./83L43bj1.js","./B1dDrJ26.js","./TsXTqZ29.js","./Cvjx9yec.js","./DJjDtW9f.js","./BLmx8bSh.js","./DYoxhk2S.js","./Cm3UrAx6.js","./DEthMvLe.js","./DqQDbK_p.js","./CW8IKDeL.js","./BEDo0Tqx.js"])))=>i.map(i=>d[i]);
2
+ import Nn from"./CxJIMPBb.js";import{_ as On}from"./D0lHLEVW.js";import{_ as Dn}from"./BC7GvhRc.js";import{p as f,g as Ht,q as Mn,s as Bn,o as J,l as ze,w as re,a as U,t as yt,k as M,b as F,m as $n,n as ie,v as Gn,H as Vn,_ as jn,e as Un,c as Me,F as Hn,x as Fn}from"./Dw-rzC63.js";import{u as Wn}from"./BpvkYYYf.js";import"./Dzw9Ycsi.js";import"./B6uQK5FY.js";let T=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function zn(n){return ot(n)}function ot(n){return Array.isArray(n)?qn(n):n instanceof RegExp?n:typeof n=="object"?Kn(n):n}function qn(n){let e=[];for(let t=0,r=n.length;t<r;t++)e[t]=ot(n[t]);return e}function Kn(n){let e={};for(let t in n)e[t]=ot(n[t]);return e}function Ft(n,...e){return e.forEach(t=>{for(let r in t)n[r]=t[r]}),n}function Wt(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?Wt(n.substring(0,n.length-1)):n.substr(~e+1)}var Be=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,pe=class{static hasCaptures(n){return n===null?!1:(Be.lastIndex=0,Be.test(n))}static replaceCaptures(n,e,t){return n.replace(Be,(r,i,o,s)=>{let l=t[parseInt(i||o,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 zt(n,e){return n<e?-1:n>e?1:0}function qt(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 i=0;i<t;i++){let o=zt(n[i],e[i]);if(o!==0)return o}return 0}return t-r}function vt(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 Kt(n){return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Jt=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}},be=class{constructor(n,e,t){this._colorMap=n,this._defaults=e,this._root=t}static createFromRawTheme(n,e){return this.createFromParsedTheme(Xn(n),e)}static createFromParsedTheme(n,e){return Zn(n,e)}_cachedMatchRoot=new Jt(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(i=>Jn(n.parent,i.parentScopes));return r?new Yt(r.fontStyle,r.foreground,r.background):null}},$e=class ye{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const r of t)e=new ye(e,r);return e}static from(...e){let t=null;for(let r=0;r<e.length;r++)t=new ye(t,e[r]);return t}push(e){return new ye(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 Jn(n,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let r=e[t],i=!1;if(r===">"){if(t===e.length-1)return!1;r=e[++t],i=!0}for(;n&&!Yn(n.scopeName,r);){if(i)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}function Yn(n,e){return e===n||n.startsWith(e)&&n[e.length]==="."}var Yt=class{constructor(n,e,t){this.fontStyle=n,this.foregroundId=e,this.backgroundId=t}};function Xn(n){if(!n)return[];if(!n.settings||!Array.isArray(n.settings))return[];let e=n.settings,t=[],r=0;for(let i=0,o=e.length;i<o;i++){let s=e[i];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 m=0,d=h.length;m<d;m++)switch(h[m]){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"&&vt(s.settings.foreground)&&(c=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&vt(s.settings.background)&&(u=s.settings.background);for(let h=0,m=l.length;h<m;h++){let p=l[h].trim().split(" "),b=p[p.length-1],S=null;p.length>1&&(S=p.slice(0,p.length-1),S.reverse()),t[r++]=new Qn(b,S,i,a,c,u)}}return t}var Qn=class{constructor(n,e,t,r,i,o){this.scope=n,this.parentScopes=e,this.index=t,this.fontStyle=r,this.foreground=i,this.background=o}},N=(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))(N||{});function Zn(n,e){n.sort((a,c)=>{let u=zt(a.scope,c.scope);return u!==0||(u=qt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let t=0,r="#000000",i="#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&&(i=a.background)}let o=new er(e),s=new Yt(t,o.getId(r),o.getId(i)),l=new nr(new qe(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,o.getId(u.foreground),o.getId(u.background))}return new be(o,s,l)}var er=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)}},tr=Object.freeze([]),qe=class Xt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,r,i,o){this.scopeDepth=e,this.parentScopes=t||tr,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new Xt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let r=0,i=e.length;r<i;r++)t[r]=e[r].clone();return t}acceptOverwrite(e,t,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},nr=class Ke{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,i=0;for(;e.parentScopes[r]===">"&&r++,t.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=t.parentScopes.length);){const o=t.parentScopes[i].length-e.parentScopes[r].length;if(o!==0)return o;r++,i++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,o;if(r===-1?(i=e,o=""):(i=e.substring(0,r),o=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(Ke._cmpBySpecificity),t}insert(e,t,r,i,o,s){if(t===""){this._doInsertHere(e,r,i,o,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 Ke(this._mainRule.clone(),qe.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,i,o,s)}_doInsertHere(e,t,r,i,o){if(t===null){this._mainRule.acceptOverwrite(e,r,i,o);return}for(let s=0,l=this._rulesWithParentScopes.length;s<l;s++){let a=this._rulesWithParentScopes[s];if(qt(a.parentScopes,t)===0){a.acceptOverwrite(e,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new qe(e,t,r,i,o))}},Z=class B{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=B.getLanguageId(e),r=B.getTokenType(e),i=B.getFontStyle(e),o=B.getForeground(e),s=B.getBackground(e);console.log({languageId:t,tokenType:r,fontStyle:i,foreground:o,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,i,o,s,l){let a=B.getLanguageId(e),c=B.getTokenType(e),u=B.containsBalancedBrackets(e)?1:0,h=B.getFontStyle(e),m=B.getForeground(e),d=B.getBackground(e);return t!==0&&(a=t),r!==8&&(c=r),i!==null&&(u=i?1:0),o!==-1&&(h=o),s!==0&&(m=s),l!==0&&(d=l),(a<<0|c<<8|u<<10|h<<11|m<<15|d<<24)>>>0}};function Se(n,e){const t=[],r=rr(n);let i=r.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let c=s();if(t.push({matcher:c,priority:a}),i!==",")break;i=r.next()}return t;function o(){if(i==="-"){i=r.next();const a=o();return c=>!!a&&!a(c)}if(i==="("){i=r.next();const a=l();return i===")"&&(i=r.next()),a}if(bt(i)){const a=[];do a.push(i),i=r.next();while(bt(i));return c=>e(a,c)}return null}function s(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(h=>h(u))}function l(){const a=[];let c=s();for(;c&&(a.push(c),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");c=s()}return u=>a.some(h=>h(u))}}function bt(n){return!!n&&!!n.match(/[\w\.:]+/)}function rr(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 Qt(n){typeof n.dispose=="function"&&n.dispose()}var le=class{constructor(n){this.scopeName=n}toKey(){return this.scopeName}},ir=class{constructor(n,e){this.scopeName=n,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},or=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))}},sr=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 or;for(const t of n)ar(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 ar(n,e,t,r){const i=t.lookup(n.scopeName);if(!i){if(n.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const o=t.lookup(e);n instanceof le?ve({baseGrammar:o,selfGrammar:i},r):Je(n.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const s=t.injections(n.scopeName);if(s)for(const l of s)r.add(new le(l))}function Je(n,e,t){if(e.repository&&e.repository[n]){const r=e.repository[n];Ce([r],e,t)}}function ve(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&Ce(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&Ce(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function Ce(n,e,t){for(const r of n){if(t.visitedRule.has(r))continue;t.visitedRule.add(r);const i=r.repository?Ft({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&Ce(r.patterns,{...e,repository:i},t);const o=r.include;if(!o)continue;const s=Zt(o);switch(s.kind){case 0:ve({...e,selfGrammar:e.baseGrammar},t);break;case 1:ve(e,t);break;case 2:Je(s.ruleName,{...e,repository:i},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:i};s.kind===4?Je(s.ruleName,a,t):ve(a,t)}else s.kind===4?t.add(new ir(s.scopeName,s.ruleName)):t.add(new le(s.scopeName));break}}}var lr=class{kind=0},cr=class{kind=1},ur=class{constructor(n){this.ruleName=n}kind=2},hr=class{constructor(n){this.scopeName=n}kind=3},dr=class{constructor(n,e){this.scopeName=n,this.ruleName=e}kind=4};function Zt(n){if(n==="$base")return new lr;if(n==="$self")return new cr;const e=n.indexOf("#");if(e===-1)return new hr(n);if(e===0)return new ur(n.substring(1));{const t=n.substring(0,e),r=n.substring(e+1);return new dr(t,r)}}var mr=/\\(\d+)/,St=/\\(\d+)/g,pr=-1,en=-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=pe.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=pe.hasCaptures(this._contentName)}get debugName(){const n=this.$location?`${Wt(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:pe.replaceCaptures(this._name,n,e)}getContentName(n,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:pe.replaceCaptures(this._contentName,n,e)}},fr=class extends de{retokenizeCapturedWithRuleId;constructor(n,e,t,r,i){super(n,e,t,r),this.retokenizeCapturedWithRuleId=i}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!")}},gr=class extends de{_match;captures;_cachedCompiledPatterns;constructor(n,e,t,r,i){super(n,e,t,null),this._match=new ce(r,this.id),this.captures=i,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}},Ct=class extends de{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(n,e,t,r,i){super(n,e,t,r),this.patterns=i.patterns,this.hasMissingPatterns=i.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}},Ye=class extends de{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(n,e,t,r,i,o,s,l,a,c){super(n,e,t,r),this._begin=new ce(i,this.id),this.beginCaptures=o,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}},Ee=class extends de{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(n,e,t,r,i,o,s,l,a){super(n,e,t,r),this._begin=new ce(i,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new ce(s,en),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}},tn=class x{static createCaptureRule(e,t,r,i,o){return e.registerRule(s=>new fr(t,s,r,i,o))}static getCompiledRuleId(e,t,r){return e.id||t.registerRule(i=>{if(e.id=i,e.match)return new gr(e.$vscodeTextmateLocation,e.id,e.name,e.match,x._compileCaptures(e.captures,t,r));if(typeof e.begin>"u"){e.repository&&(r=Ft({},r,e.repository));let o=e.patterns;return typeof o>"u"&&e.include&&(o=[{include:e.include}]),new Ct(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,x._compilePatterns(o,t,r))}return e.while?new Ee(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 Ye(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 i=[];if(e){let o=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);l>o&&(o=l)}for(let s=0;s<=o;s++)i[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)),i[l]=x.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return i}static _compilePatterns(e,t,r){let i=[];if(e)for(let o=0,s=e.length;o<s;o++){const l=e[o];let a=-1;if(l.include){const c=Zt(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,m=c.kind===4?c.ruleName:null,d=t.getExternalGrammar(h,r);if(d)if(m){let p=d.repository[m];p&&(a=x.getCompiledRuleId(p,t,d.repository))}else a=x.getCompiledRuleId(d.repository.$self,t,d.repository);break}}else a=x.getCompiledRuleId(l,t,r);if(a!==-1){const c=t.getRule(a);let u=!1;if((c instanceof Ct||c instanceof Ye||c instanceof Ee)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},ce=class nn{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e=="string"){const r=e.length;let i=0,o=[],s=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(o.push(e.substring(i,l)),o.push("$(?!\\n)(?<!\\n)"),i=l+2):(c==="A"||c==="G")&&(s=!0),l++}this.hasAnchor=s,i===0?this.source=e:(o.push(e.substring(i,r)),this.source=o.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=mr.test(this.source):this.hasBackReferences=!1}clone(){return new nn(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(i=>e.substring(i.start,i.end));return St.lastIndex=0,this.source.replace(St,(i,o)=>Kt(r[parseInt(o,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=[],i=[],o,s,l,a;for(o=0,s=this.source.length;o<s;o++)l=this.source.charAt(o),e[o]=l,t[o]=l,r[o]=l,i[o]=l,l==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(e[o+1]="￿",t[o+1]="￿",r[o+1]="A",i[o+1]="A"):a==="G"?(e[o+1]="￿",t[o+1]="G",r[o+1]="￿",i[o+1]="G"):(e[o+1]=a,t[o+1]=a,r[o+1]=a,i[o+1]=a),o++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:r.join(""),A1_G1:i.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 Et(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(i=>i.resolveAnchors(e,t));return new Et(n,r,this._items.map(i=>i.ruleId))}},Et=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}},Ge=class{constructor(n,e){this.languageId=n,this.tokenType=e}},_r=class Xe{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Ge(e,8),this._embeddedLanguagesMatcher=new yr(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Xe._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Ge(0,0);_getBasicScopeAttributes=new Jt(e=>{const t=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Ge(t,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(Xe.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/},yr=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])=>Kt(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])}},wt=class{constructor(n,e){this.stack=n,this.stoppedEarly=e}};function rn(n,e,t,r,i,o,s,l){const a=e.content.length;let c=!1,u=-1;if(s){const d=vr(n,e,t,r,i,o);i=d.stack,r=d.linePos,t=d.isFirstLine,u=d.anchorPosition}const h=Date.now();for(;!c;){if(l!==0&&Date.now()-h>l)return new wt(i,!0);m()}return new wt(i,!1);function m(){const d=br(n,e,t,r,i,u);if(!d){o.produce(i,a),c=!0;return}const p=d.captureIndices,b=d.matchedRuleId,S=p&&p.length>0?p[0].end>r:!1;if(b===pr){const g=i.getRule(n);o.produce(i,p[0].start),i=i.withContentNameScopesList(i.nameScopesList),se(n,e,t,i,o,g.endCaptures,p),o.produce(i,p[0].end);const v=i;if(i=i.parent,u=v.getAnchorPos(),!S&&v.getEnterPos()===r){i=v,o.produce(i,a),c=!0;return}}else{const g=n.getRule(b);o.produce(i,p[0].start);const v=i,_=g.getName(e.content,p),C=i.contentNameScopesList.pushAttributed(_,n);if(i=i.push(b,r,u,p[0].end===a,null,C,C),g instanceof Ye){const w=g;se(n,e,t,i,o,w.beginCaptures,p),o.produce(i,p[0].end),u=p[0].end;const I=w.getContentName(e.content,p),$=C.pushAttributed(I,n);if(i=i.withContentNameScopesList($),w.endHasBackReferences&&(i=i.withEndRule(w.getEndWithResolvedBackReferences(e.content,p))),!S&&v.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),c=!0;return}}else if(g instanceof Ee){const w=g;se(n,e,t,i,o,w.beginCaptures,p),o.produce(i,p[0].end),u=p[0].end;const I=w.getContentName(e.content,p),$=C.pushAttributed(I,n);if(i=i.withContentNameScopesList($),w.whileHasBackReferences&&(i=i.withEndRule(w.getWhileWithResolvedBackReferences(e.content,p))),!S&&v.hasSameRuleAs(i)){i=i.pop(),o.produce(i,a),c=!0;return}}else if(se(n,e,t,i,o,g.captures,p),o.produce(i,p[0].end),i=i.pop(),!S){i=i.safePop(),o.produce(i,a),c=!0;return}}p[0].end>r&&(r=p[0].end,t=!1)}}function vr(n,e,t,r,i,o){let s=i.beginRuleCapturedEOL?0:-1;const l=[];for(let a=i;a;a=a.pop()){const c=a.getRule(n);c instanceof Ee&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=Er(a.rule,n,a.stack.endRule,t,r===s),h=c.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==en){i=a.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(o.produce(a.stack,h.captureIndices[0].start),se(n,e,t,a.stack,o,a.rule.whileCaptures,h.captureIndices),o.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{i=a.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:s,isFirstLine:t}}function br(n,e,t,r,i,o){const s=Sr(n,e,t,r,i,o),l=n.getInjections();if(l.length===0)return s;const a=Cr(l,n,e,t,r,i,o);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 Sr(n,e,t,r,i,o){const s=i.getRule(n),{ruleScanner:l,findOptions:a}=on(s,n,i.endRule,t,r===o),c=l.findNextMatchSync(e,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Cr(n,e,t,r,i,o,s){let l=Number.MAX_VALUE,a=null,c,u=0;const h=o.contentNameScopesList.getScopeNames();for(let m=0,d=n.length;m<d;m++){const p=n[m];if(!p.matcher(h))continue;const b=e.getRule(p.ruleId),{ruleScanner:S,findOptions:g}=on(b,e,null,r,i===s),v=S.findNextMatchSync(t,i,g);if(!v)continue;const _=v.captureIndices[0].start;if(!(_>=l)&&(l=_,a=v.captureIndices,c=v.ruleId,u=p.priority,l===i))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function on(n,e,t,r,i){return{ruleScanner:n.compileAG(e,t,r,i),findOptions:0}}function Er(n,e,t,r,i){return{ruleScanner:n.compileWhileAG(e,t,r,i),findOptions:0}}function se(n,e,t,r,i,o,s){if(o.length===0)return;const l=e.content,a=Math.min(o.length,s.length),c=[],u=s[0].end;for(let h=0;h<a;h++){const m=o[h];if(m===null)continue;const d=s[h];if(d.length===0)continue;if(d.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=d.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,d.start):i.produce(r,d.start),m.retokenizeCapturedWithRuleId){const b=m.getName(l,s),S=r.contentNameScopesList.pushAttributed(b,n),g=m.getContentName(l,s),v=S.pushAttributed(g,n),_=r.push(m.retokenizeCapturedWithRuleId,d.start,-1,!1,null,S,v),C=n.createOnigString(l.substring(0,d.end));rn(n,C,t&&d.start===0,d.start,_,i,!1,0),Qt(C);continue}const p=m.getName(l,s);if(p!==null){const S=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(p,n);c.push(new wr(S,d.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var wr=class{scopes;endPos;constructor(n,e){this.scopes=n,this.endPos=e}};function kr(n,e,t,r,i,o,s,l){return new Tr(n,e,t,r,i,o,s,l)}function kt(n,e,t,r,i){const o=Se(e,we),s=tn.getCompiledRuleId(t,r,i.repository);for(const l of o)n.push({debugSelector:e,matcher:l.matcher,ruleId:s,grammar:i,priority:l.priority})}function we(n,e){if(e.length<n.length)return!1;let t=0;return n.every(r=>{for(let i=t;i<e.length;i++)if(Lr(e[i],r))return t=i+1,!0;return!1})}function Lr(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 Tr=class{constructor(n,e,t,r,i,o,s,l){if(this._rootScopeName=n,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new _r(t,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Lt(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const a of Object.keys(i)){const c=Se(a,we);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:i[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:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],t=this._rootScopeName,r=n.lookup(t);if(r){const i=r.injections;if(i)for(let s in i)kt(e,s,i[s],this,r);const o=this._grammarRepository.injections(t);o&&o.forEach(s=>{const l=this.getExternalGrammar(s);if(l){const a=l.injectionSelector;a&&kt(e,a,l,this,l)}})}return e.sort((i,o)=>i.priority-o.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]=Lt(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=tn.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===Qe.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=Z.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),m=this.getRule(this._rootId).getName(null,null);let d;m?d=ae.createRootAndLookUpScopeName(m,h,this):d=ae.createRoot("unknown",h),e=new Qe(null,this._rootId,-1,-1,!1,null,d,d)}else i=!1,e.reset();n=n+`
4
+ `;const o=this.createOnigString(n),s=o.content.length,l=new Ar(t,n,this._tokenTypeMatchers,this.balancedBracketSelectors),a=rn(this,o,i,0,e,l,!0,r);return Qt(o),{lineLength:s,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Lt(n,e){return n=zn(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 G{constructor(e,t,r){this.parent=e,this.scopePath=t,this.tokenAttributes=r}static fromExtension(e,t){let r=e,i=e?.scopePath??null;for(const o of t)i=$e.push(i,o.scopeNames),r=new G(r,i,o.encodedTokenAttributes);return r}static createRoot(e,t){return new G(null,new $e(null,e),t)}static createRootAndLookUpScopeName(e,t,r){const i=r.getMetadataForScope(e),o=new $e(null,e),s=r.themeProvider.themeMatch(o),l=G.mergeAttributes(t,i,s);return new G(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return G.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 i=-1,o=0,s=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,s=r.backgroundId),Z.set(e,t.languageId,t.tokenType,null,i,o,s)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return G._pushAttributed(this,e,t);const r=e.split(/ /g);let i=this;for(const o of r)i=G._pushAttributed(i,o,t);return i}static _pushAttributed(e,t,r){const i=r.getMetadataForScope(t),o=e.scopePath.push(t),s=r.themeProvider.themeMatch(o),l=G.mergeAttributes(e.tokenAttributes,i,s);return new G(e,o,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}},Qe=class W{constructor(e,t,r,i,o,s,l,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_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,i,o,s,l){return new W(this,e,t,r,i,o,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))}},Rr=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(n,e){this.balancedBracketScopes=n.flatMap(t=>t==="*"?(this.allowAny=!0,[]):Se(t,we).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>Se(t,we).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}},Ar=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,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=n?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(o)&&(r=Z.set(r,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=Z.set(r,0,8,i,-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,i=this._binaryTokens.length;r<i;r++)t[r]=this._binaryTokens[r];return t}},Pr=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,i){if(!this._grammars.has(n)){let o=this._rawGrammars.get(n);if(!o)return null;this._grammars.set(n,kr(n,o,e,t,r,i,this,this._onigLib))}return this._grammars.get(n)}},Ir=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Pr(be.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(be.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 Rr(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,r,i,o){const s=new sr(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(l=>this._loadSingleGrammar(l.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,r,i,o)}_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,i=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,r,i)}_grammarForScopeName(e,t=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,r,i,o)}},Ze=Qe.NULL;const xr=["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 sn(n,e){const t={},r={};for(const i of n)Object.assign(t,i.property),Object.assign(r,i.normal);return new me(t,r,e)}function et(n){return n.toLowerCase()}class O{constructor(e,t){this.attribute=t,this.property=e}}O.prototype.attribute="";O.prototype.booleanish=!1;O.prototype.boolean=!1;O.prototype.commaOrSpaceSeparated=!1;O.prototype.commaSeparated=!1;O.prototype.defined=!1;O.prototype.mustUseProperty=!1;O.prototype.number=!1;O.prototype.overloadedBoolean=!1;O.prototype.property="";O.prototype.spaceSeparated=!1;O.prototype.space=void 0;let Nr=0;const E=q(),L=q(),tt=q(),y=q(),k=q(),X=q(),D=q();function q(){return 2**++Nr}const nt=Object.freeze(Object.defineProperty({__proto__:null,boolean:E,booleanish:L,commaOrSpaceSeparated:D,commaSeparated:X,number:y,overloadedBoolean:tt,spaceSeparated:k},Symbol.toStringTag,{value:"Module"})),Ve=Object.keys(nt);class st extends O{constructor(e,t,r,i){let o=-1;if(super(e,t),Tt(this,"space",i),typeof r=="number")for(;++o<Ve.length;){const s=Ve[o];Tt(this,Ve[o],(r&nt[s])===nt[s])}}}st.prototype.defined=!0;function Tt(n,e,t){t&&(n[e]=t)}function ee(n){const e={},t={};for(const[r,i]of Object.entries(n.properties)){const o=new st(r,n.transform(n.attributes||{},r),i,n.space);n.mustUseProperty&&n.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),e[r]=o,t[et(r)]=r,t[et(o.attribute)]=r}return new me(e,t,n.space)}const an=ee({properties:{ariaActiveDescendant:null,ariaAtomic:L,ariaAutoComplete:null,ariaBusy:L,ariaChecked:L,ariaColCount:y,ariaColIndex:y,ariaColSpan:y,ariaControls:k,ariaCurrent:null,ariaDescribedBy:k,ariaDetails:null,ariaDisabled:L,ariaDropEffect:k,ariaErrorMessage:null,ariaExpanded:L,ariaFlowTo:k,ariaGrabbed:L,ariaHasPopup:null,ariaHidden:L,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:k,ariaLevel:y,ariaLive:null,ariaModal:L,ariaMultiLine:L,ariaMultiSelectable:L,ariaOrientation:null,ariaOwns:k,ariaPlaceholder:null,ariaPosInSet:y,ariaPressed:L,ariaReadOnly:L,ariaRelevant:null,ariaRequired:L,ariaRoleDescription:k,ariaRowCount:y,ariaRowIndex:y,ariaRowSpan:y,ariaSelected:L,ariaSetSize:y,ariaSort:null,ariaValueMax:y,ariaValueMin:y,ariaValueNow:y,ariaValueText:null,role:null},transform(n,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function ln(n,e){return e in n?n[e]:e}function cn(n,e){return ln(n,e.toLowerCase())}const Or=ee({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:X,acceptCharset:k,accessKey:k,action:null,allow:null,allowFullScreen:E,allowPaymentRequest:E,allowUserMedia:E,alt:null,as:null,async:E,autoCapitalize:null,autoComplete:k,autoFocus:E,autoPlay:E,blocking:k,capture:null,charSet:null,checked:E,cite:null,className:k,cols:y,colSpan:null,content:null,contentEditable:L,controls:E,controlsList:k,coords:y|X,crossOrigin:null,data:null,dateTime:null,decoding:null,default:E,defer:E,dir:null,dirName:null,disabled:E,download:tt,draggable:L,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:E,formTarget:null,headers:k,height:y,hidden:tt,high:y,href:null,hrefLang:null,htmlFor:k,httpEquiv:k,id:null,imageSizes:null,imageSrcSet:null,inert:E,inputMode:null,integrity:null,is:null,isMap:E,itemId:null,itemProp:k,itemRef:k,itemScope:E,itemType:k,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:E,low:y,manifest:null,max:null,maxLength:y,media:null,method:null,min:null,minLength:y,multiple:E,muted:E,name:null,nonce:null,noModule:E,noValidate:E,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:E,optimum:y,pattern:null,ping:k,placeholder:null,playsInline:E,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:E,referrerPolicy:null,rel:k,required:E,reversed:E,rows:y,rowSpan:y,sandbox:k,scope:null,scoped:E,seamless:E,selected:E,shadowRootClonable:E,shadowRootDelegatesFocus:E,shadowRootMode:null,shape:null,size:y,sizes:null,slot:null,span:y,spellCheck:L,src:null,srcDoc:null,srcLang:null,srcSet:null,start:y,step:null,style:null,tabIndex:y,target:null,title:null,translate:null,type:null,typeMustMatch:E,useMap:null,value:L,width:y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:k,axis:null,background:null,bgColor:null,border:y,borderColor:null,bottomMargin:y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:E,declare:E,event:null,face:null,frame:null,frameBorder:null,hSpace:y,leftMargin:y,link:null,longDesc:null,lowSrc:null,marginHeight:y,marginWidth:y,noResize:E,noHref:E,noShade:E,noWrap:E,object:null,profile:null,prompt:null,rev:null,rightMargin:y,rules:null,scheme:null,scrolling:L,standby:null,summary:null,text:null,topMargin:y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:E,disableRemotePlayback:E,prefix:null,property:null,results:y,security:null,unselectable:null},space:"html",transform:cn}),Dr=ee({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:D,accentHeight:y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:y,amplitude:y,arabicForm:null,ascent:y,attributeName:null,attributeType:null,azimuth:y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:y,by:null,calcMode:null,capHeight:y,className:k,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:y,diffuseConstant:y,direction:null,display:null,dur:null,divisor:y,dominantBaseline:null,download:E,dx:null,dy:null,edgeMode:null,editable:null,elevation:y,enableBackground:null,end:null,event:null,exponent:y,externalResourcesRequired:null,fill:null,fillOpacity:y,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:X,g2:X,glyphName:X,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:y,horizOriginX:y,horizOriginY:y,id:null,ideographic:y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:y,k:y,k1:y,k2:y,k3:y,k4:y,kernelMatrix:D,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:y,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:y,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:y,overlineThickness:y,paintOrder:null,panose1:null,path:null,pathLength:y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:k,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:y,pointsAtY:y,pointsAtZ:y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:D,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:D,rev:D,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:D,requiredFeatures:D,requiredFonts:D,requiredFormats:D,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:y,specularExponent:y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:y,strikethroughThickness:y,string:null,stroke:null,strokeDashArray:D,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:y,strokeOpacity:y,strokeWidth:null,style:null,surfaceScale:y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:D,tabIndex:y,tableValues:null,target:null,targetX:y,targetY:y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:D,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:y,underlineThickness:y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:y,values:null,vAlphabetic:y,vMathematical:y,vectorEffect:null,vHanging:y,vIdeographic:y,version:null,vertAdvY:y,vertOriginX:y,vertOriginY:y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ln}),un=ee({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()}}),hn=ee({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:cn}),dn=ee({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,e){return"xml:"+e.slice(3).toLowerCase()}}),Mr=/[A-Z]/g,Rt=/-[a-z]/g,Br=/^data[-\w.:]+$/i;function $r(n,e){const t=et(e);let r=e,i=O;if(t in n.normal)return n.property[n.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Br.test(e)){if(e.charAt(4)==="-"){const o=e.slice(5).replace(Rt,Vr);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=e.slice(4);if(!Rt.test(o)){let s=o.replace(Mr,Gr);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=st}return new i(r,e)}function Gr(n){return"-"+n.toLowerCase()}function Vr(n){return n.charAt(1).toUpperCase()}const jr=sn([an,Or,un,hn,dn],"html"),mn=sn([an,Dr,un,hn,dn],"svg"),At={}.hasOwnProperty;function Ur(n,e){const t=e||{};function r(i,...o){let s=r.invalid;const l=r.handlers;if(i&&At.call(i,n)){const a=String(i[n]);s=At.call(l,a)?l[a]:r.unknown}if(s)return s.call(this,i,...o)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}const Hr=/["&'<>`]/g,Fr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Wr=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,zr=/[|\\{}()[\]^$+*?.]/g,Pt=new WeakMap;function qr(n,e){if(n=n.replace(e.subset?Kr(e.subset):Hr,r),e.subset||e.escapeOnly)return n;return n.replace(Fr,t).replace(Wr,r);function t(i,o,s){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),e)}function r(i,o,s){return e.format(i.charCodeAt(0),s.charCodeAt(o+1),e)}}function Kr(n){let e=Pt.get(n);return e||(e=Jr(n),Pt.set(n,e)),e}function Jr(n){const e=[];let t=-1;for(;++t<n.length;)e.push(n[t].replace(zr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Yr=/[\dA-Fa-f]/;function Xr(n,e,t){const r="&#x"+n.toString(16).toUpperCase();return t&&e&&!Yr.test(String.fromCharCode(e))?r:r+";"}const Qr=/\d/;function Zr(n,e,t){const r="&#"+String(n);return t&&e&&!Qr.test(String.fromCharCode(e))?r:r+";"}const ei=["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"],je={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:"€"},ti=["cent","copy","divide","gt","lt","not","para","times"],pn={}.hasOwnProperty,rt={};let fe;for(fe in je)pn.call(je,fe)&&(rt[je[fe]]=fe);const ni=/[^\dA-Za-z]/;function ri(n,e,t,r){const i=String.fromCharCode(n);if(pn.call(rt,i)){const o=rt[i],s="&"+o;return t&&ei.includes(o)&&!ti.includes(o)&&(!r||e&&e!==61&&ni.test(String.fromCharCode(e)))?s:s+";"}return""}function ii(n,e,t){let r=Xr(n,e,t.omitOptionalSemicolons),i;if((t.useNamedReferences||t.useShortestReferences)&&(i=ri(n,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!i)&&t.useShortestReferences){const o=Zr(n,e,t.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!t.useShortestReferences||i.length<r.length)?i:r}function Q(n,e){return qr(n,Object.assign({format:ii},e))}const oi=/^>|^->|<!--|-->|--!>|<!-$/g,si=[">"],ai=["<",">"];function li(n,e,t,r){return r.settings.bogusComments?"<?"+Q(n.value,Object.assign({},r.settings.characterReferences,{subset:si}))+">":"<!--"+n.value.replace(oi,i)+"-->";function i(o){return Q(o,Object.assign({},r.settings.characterReferences,{subset:ai}))}}function ci(n,e,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function It(n,e){const t=String(n);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=t.indexOf(e);for(;i!==-1;)r++,i=t.indexOf(e,i+e.length);return r}function ui(n,e){const t=e||{};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function hi(n){return n.join(" ").trim()}const di=/[ \t\n\f\r]/g;function at(n){return typeof n=="object"?n.type==="text"?xt(n.value):!1:xt(n)}function xt(n){return n.replace(di,"")===""}const A=gn(1),fn=gn(-1),mi=[];function gn(n){return e;function e(t,r,i){const o=t?t.children:mi;let s=(r||0)+n,l=o[s];if(!i)for(;l&&at(l);)s+=n,l=o[s];return l}}const pi={}.hasOwnProperty;function _n(n){return e;function e(t,r,i){return pi.call(n,t.tagName)&&n[t.tagName](t,r,i)}}const lt=_n({body:gi,caption:Ue,colgroup:Ue,dd:bi,dt:vi,head:Ue,html:fi,li:yi,optgroup:Si,option:Ci,p:_i,rp:Nt,rt:Nt,tbody:wi,td:Ot,tfoot:ki,th:Ot,thead:Ei,tr:Li});function Ue(n,e,t){const r=A(t,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&at(r.value.charAt(0)))}function fi(n,e,t){const r=A(t,e);return!r||r.type!=="comment"}function gi(n,e,t){const r=A(t,e);return!r||r.type!=="comment"}function _i(n,e,t){const r=A(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 yi(n,e,t){const r=A(t,e);return!r||r.type==="element"&&r.tagName==="li"}function vi(n,e,t){const r=A(t,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function bi(n,e,t){const r=A(t,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Nt(n,e,t){const r=A(t,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Si(n,e,t){const r=A(t,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Ci(n,e,t){const r=A(t,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Ei(n,e,t){const r=A(t,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function wi(n,e,t){const r=A(t,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function ki(n,e,t){return!A(t,e)}function Li(n,e,t){const r=A(t,e);return!r||r.type==="element"&&r.tagName==="tr"}function Ot(n,e,t){const r=A(t,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const Ti=_n({body:Pi,colgroup:Ii,head:Ai,html:Ri,tbody:xi});function Ri(n){const e=A(n,-1);return!e||e.type!=="comment"}function Ai(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 Pi(n){const e=A(n,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&at(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function Ii(n,e,t){const r=fn(t,e),i=A(n,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&lt(r,t.children.indexOf(r),t)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function xi(n,e,t){const r=fn(t,e),i=A(n,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&lt(r,t.children.indexOf(r),t)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const ge={name:[[`
5
5
  \f\r &/=>`.split(""),`
6
6
  \f\r "&'/=>\``.split("")],[`\0
7
7
  \f\r "&'/<=>`.split(""),`\0
@@ -9,14 +9,14 @@ import Nn from"./DIAcCAND.js";import{_ as On}from"./DJRd5JwX.js";import{_ as Dn}
9
9
  \f\r &>`.split(""),`\0
10
10
  \f\r "&'<=>\``.split("")],[`\0
11
11
  \f\r "&'<=>\``.split(""),`\0
12
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Oo(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=mn);const c=Do(r,n.properties),u=r.all(o.space==="html"&&n.tagName==="template"?n.content:n);return r.schema=o,u&&(s=!1),(c||!i||!Ro(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||!lt(n,e,t))&&l.push("</"+n.tagName+">"),l.join("")}function Do(n,e){const t=[];let r=-1,o;if(e){for(o in e)if(e[o]!==null&&e[o]!==void 0){const i=Mo(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 Mo(n,e,t){const r=$r(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=Q(r.attribute,Object.assign({},n.settings.characterReferences,{subset:ge.name[o][i]}));return t===!0||(t=Array.isArray(t)?(r.commaSeparated?uo:ho)(t,{padLeft:!n.settings.tightCommaSeparatedLists}):String(t),n.settings.collapseEmptyAttributes&&!t)?a:(n.settings.preferUnquoted&&(l=Q(t,Object.assign({},n.settings.characterReferences,{attribute:!0,subset:ge.unquoted[o][i]}))),l!==t&&(n.settings.quoteSmart&&It(t,s)>It(t,n.alternative)&&(s=n.alternative),l=s+Q(t,Object.assign({},n.settings.characterReferences,{subset:(s==="'"?ge.single:ge.double)[o][i],attribute:!0}))+s),a+(l&&"="+l))}const Bo=["<","&"];function yn(n,e,t,r){return t&&t.type==="element"&&(t.tagName==="script"||t.tagName==="style")?n.value:Q(n.value,Object.assign({},r.settings.characterReferences,{subset:Bo}))}function $o(n,e,t,r){return r.settings.allowDangerousHtml?n.value:yn(n,e,t,r)}function Go(n,e,t,r){return r.all(n)}const Vo=Ur("type",{invalid:jo,unknown:Uo,handlers:{comment:lo,doctype:co,element:Oo,raw:$o,root:Go,text:yn}});function jo(n){throw new Error("Expected node, not `"+n+"`")}function Uo(n){const e=n;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Ho={},Fo={},Wo=[];function zo(n,e){const t=e||Ho,r=t.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:qo,all:Ko,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||xr,characterReferences:t.characterReferences||Fo,closeSelfClosing:t.closeSelfClosing||!1,closeEmptyElements:t.closeEmptyElements||!1},schema:t.space==="svg"?mn:jr,quote:r,alternative:o}.one(Array.isArray(n)?{type:"root",children:n}:n,void 0,void 0)}function qo(n,e,t){return Vo(n,e,t,this)}function Ko(n){const e=[],t=n&&n.children||Wo;let r=-1;for(;++r<t.length;)e[r]=this.one(t[r],r,n);return e.join("")}function ke(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 H(n,e){return n&&(e?.[n?.toLowerCase()]||n)}function Jo(n){return Array.isArray(n)?n:[n]}async function vn(n){return Promise.resolve(typeof n=="function"?n():n).then(e=>e.default||e)}function ct(n){return!n||["plaintext","txt","text","plain"].includes(n)}function bn(n){return n==="ansi"||ct(n)}function ut(n){return n==="none"}function Sn(n){return ut(n)}function Cn(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 Pe(n,e=!1){if(n.length===0)return[["",0]];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 Yo(n){const e=Pe(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 Xo(n,e,t){const r=new Set;for(const i of n.matchAll(/:?lang=["']([^"']+)["']/g)){const s=i[1].toLowerCase().trim();s&&r.add(s)}for(const i of n.matchAll(/(?:```|~~~)([\w-]+)/g)){const s=i[1].toLowerCase().trim();s&&r.add(s)}for(const i of n.matchAll(/\\begin\{([\w-]+)\}/g)){const s=i[1].toLowerCase().trim();s&&r.add(s)}for(const i of n.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const s=i[1].toLowerCase().trim(),l=s.includes("/")?s.split("/").pop():s;l&&r.add(l)}if(!t)return Array.from(r);const o=t.getBundledLanguages();return Array.from(r).filter(i=>i&&o[i])}const ht="light-dark()",Qo=["color","background-color"];function Zo(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 ei(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?Zo(o,i):o})):n}function ti(n,e,t,r,o="css-vars"){const i={content:n.content,explanation:n.explanation,offset:n.offset},s=e.map(u=>Le(n.variants[u])),l=new Set(s.flatMap(u=>Object.keys(u))),a={},c=(u,h)=>{const m=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return t+e[u]+(h==="color"?"":m)};return s.forEach((u,h)=>{for(const m of l){const d=u[m]||"inherit";if(h===0&&r&&Qo.includes(m))if(r===ht&&s.length>1){const p=e.findIndex(v=>v==="light"),b=e.findIndex(v=>v==="dark");if(p===-1||b===-1)throw new T('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const S=s[p][m]||"inherit",g=s[b][m]||"inherit";a[m]=`light-dark(${S}, ${g})`,o==="css-vars"&&(a[c(h,m)]=d)}else a[m]=d;else o==="css-vars"&&(a[c(h,m)]=d)}}),i.htmlStyle=a,i}function Le(n){const e={};if(n.color&&(e.color=n.color),n.bgColor&&(e["background-color"]=n.bgColor),n.fontStyle){n.fontStyle&N.Italic&&(e["font-style"]="italic"),n.fontStyle&N.Bold&&(e["font-weight"]="bold");const t=[];n.fontStyle&N.Underline&&t.push("underline"),n.fontStyle&N.Strikethrough&&t.push("line-through"),t.length&&(e["text-decoration"]=t.join(" "))}return e}function ot(n){return typeof n=="string"?n:Object.entries(n).map(([e,t])=>`${e}:${t}`).join(";")}const En=new WeakMap;function Ie(n,e){En.set(n,e)}function he(n){return En.get(n)}class te{_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 te(Object.fromEntries(Jo(t).map(r=>[r,Ze])),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 ni(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function ni(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 ri(n,e){if(!(n instanceof te))throw new T("Invalid grammar state");return n.getInternalStack(e)}function oi(){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=Yo(t.source),i=(t.options.decorations||[]).map(s=>({...s,start:r(s.start),end:r(s.end)}));ii(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 ei(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,m,d){const p=o[u];let b="",S=-1,g=-1;if(h===0&&(S=0),m===0&&(g=0),m===Number.POSITIVE_INFINITY&&(g=p.children.length),S===-1||g===-1)for(let _=0;_<p.children.length;_++)b+=wn(p.children[_]),S===-1&&b.length===h&&(S=_+1),g===-1&&b.length===m&&(g=_+1);if(S===-1)throw new T(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);if(g===-1)throw new T(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);const v=p.children.slice(S,g);if(!d.alwaysWrap&&v.length===p.children.length)l(p,d,"line");else if(!d.alwaysWrap&&v.length===1&&v[0].type==="element")l(v[0],d,"token");else{const _={type:"element",tagName:"span",properties:{},children:v};l(_,d,"wrapper"),p.children.splice(S,v.length,_)}}function s(u,h){o[u]=l(o[u],h,"line")}function l(u,h,m){const d=h.properties||{},p=h.transform||(b=>b);return u.tagName=h.tagName||"span",u.properties={...u.properties,...d,class:u.properties.class},h.properties?.class&&Cn(u,h.properties.class),u=p(u,m)||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:m}=u;if(h.line===m.line)i(h.line,h.character,m.character,u);else if(h.line<m.line){i(h.line,h.character,Number.POSITIVE_INFINITY,u);for(let d=h.line+1;d<m.line;d++)a.unshift(()=>s(d,u));i(m.line,0,m.character,u)}}a.forEach(u=>u())}}}function ii(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 wn(n){return n.type==="text"?n.value:n.type==="element"?n.children.map(wn).join(""):""}const si=[oi()];function Te(n){const e=ai(n.transformers||[]);return[...e.pre,...e.normal,...e.post,...si]}function ai(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"],He={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function li(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 Dt(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 ci(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)He[r]&&e.push({type:"setDecoration",value:He[r]});else if(r<=29){const o=He[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=Dt(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=Dt(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 ui(){let n=null,e=null,t=new Set;return{parse(r){const o=[];let i=0;do{const s=li(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=ci(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 hi={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 di(n=hi){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 mi={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 pi(n,e,t){const r=ke(n,t),o=Pe(e),i=Object.fromEntries(z.map(a=>{const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=n.colors?.[c];return[a,u||mi[a]]})),s=di(i),l=ui();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=H(u,r),h=H(h,r),c.decorations.has("dim")&&(u=fi(u));let m=N.None;return c.decorations.has("bold")&&(m|=N.Bold),c.decorations.has("italic")&&(m|=N.Italic),c.decorations.has("underline")&&(m|=N.Underline),c.decorations.has("strikethrough")&&(m|=N.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:h,fontStyle:m}}))}function fi(n){const e=n.match(/#([0-9a-f]{3,8})/i);if(e){const r=e[1];if(r.length===8){const o=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${o}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const o=r[0],i=r[1],s=r[2],l=r[3],a=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${o}${o}${i}${i}${s}${s}${a}`}else if(r.length===3){const o=r[0],i=r[1],s=r[2];return`#${o}${o}${i}${i}${s}${s}80`}}}const t=n.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return t?`var(${t[1]}-dim)`:n}function dt(n,e,t={}){const{theme:r=n.getLoadedThemes()[0]}=t,o=n.resolveLangAlias(t.lang||"text");if(ct(o)||ut(r))return Pe(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:s}=n.setTheme(r);if(o==="ansi")return pi(i,e,t);const l=n.getLanguage(t.lang||"text");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 _i(e,l,i,s,t)}function gi(...n){if(n.length===2)return he(n[1]);const[e,t,r={}]=n,{lang:o="text",theme:i=e.getLoadedThemes()[0]}=r;if(ct(o)||ut(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 te(mt(t,a,s,l,r).stateStack,a.name,s.name)}function _i(n,e,t,r,o){const i=mt(n,e,t,r,o),s=new te(i.stateStack,e.name,t.name);return Ie(i.tokens,s),i.tokens}function mt(n,e,t,r,o){const i=ke(t,o),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:l=500}=o,a=Pe(n);let c=o.grammarState?ri(o.grammarState,t.name)??Ze:o.grammarContextCode!=null?mt(o.grammarContextCode,e,t,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ze,u=[];const h=[];for(let m=0,d=a.length;m<d;m++){const[p,b]=a[m];if(p===""){u=[],h.push([]);continue}if(s>0&&p.length>=s){u=[],h.push([{content:p,offset:b,color:"",fontStyle:0}]);continue}let S,g,v;o.includeExplanation&&(S=e.tokenizeLine(p,c,l),g=S.tokens,v=0);const _=e.tokenizeLine2(p,c,l),C=_.tokens.length/2;for(let w=0;w<C;w++){const I=_.tokens[2*w],$=w+1<C?_.tokens[2*w+2]:p.length;if(I===$)continue;const ne=_.tokens[2*w+1],In=H(r[Z.getForeground(ne)],i),xn=Z.getFontStyle(ne),Oe={content:p.substring(I,$),offset:b+I,color:In,fontStyle:xn};if(o.includeExplanation){const gt=[];if(o.includeExplanation!=="scopeName")for(const j of t.settings){let K;switch(typeof j.scope){case"string":K=j.scope.split(/,/).map(De=>De.trim());break;case"object":K=j.scope;break;default:continue}gt.push({settings:j,selectors:K.map(De=>De.split(/ /))})}Oe.explanation=[];let _t=0;for(;I+_t<$;){const j=g[v],K=p.substring(j.startIndex,j.endIndex);_t+=K.length,Oe.explanation.push({content:K,scopes:o.includeExplanation==="scopeName"?yi(j.scopes):vi(gt,j.scopes)}),v+=1}}u.push(Oe)}h.push(u),u=[],c=_.ruleStack}return{tokens:h,stateStack:c}}function yi(n){return n.map(e=>({scopeName:e}))}function vi(n,e){const t=[];for(let r=0,o=e.length;r<o;r++){const i=e[r];t[r]={scopeName:i,themeMatches:Si(n,i,e.slice(0,r))}}return t}function Mt(n,e){return n===e||e.substring(0,n.length)===n&&e[n.length]==="."}function bi(n,e,t){if(!Mt(n[n.length-1],e))return!1;let r=n.length-2,o=t.length-1;for(;r>=0&&o>=0;)Mt(n[r],t[o])&&(r-=1),o-=1;return r===-1}function Si(n,e,t){const r=[];for(const{selectors:o,settings:i}of n)for(const s of o)if(bi(s,e,t)){r.push(i);break}return r}function kn(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=dt(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=Ci(...o.map(a=>a.tokens)),s=i[0].map((a,c)=>a.map((u,h)=>{const m={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in t&&t.includeExplanation&&(m.explanation=u.explanation),i.forEach((d,p)=>{const{content:b,explanation:S,offset:g,...v}=d[c][h];m.variants[r[p].color]=v}),m})),l=o[0].state?new te(Object.fromEntries(o.map(a=>[a.theme,a.state?.getInternalStack(a.theme)])),o[0].state.lang):void 0;return l&&Ie(s,l),s}function Ci(...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 Re(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,m=Object.entries(t.themes).filter(g=>g[1]).map(g=>({color:g[0],theme:g[1]})).sort((g,v)=>g.color===c?-1:v.color===c?1:0);if(m.length===0)throw new T("`themes` option must not be empty");const d=kn(n,e,t);if(a=he(d),c&&ht!==c&&!m.find(g=>g.color===c))throw new T(`\`themes\` option must contain the defaultColor key \`${c}\``);const p=m.map(g=>n.getTheme(g.theme)),b=m.map(g=>g.color);i=d.map(g=>g.map(v=>ti(v,b,u,c,h))),a&&Ie(i,a);const S=m.map(g=>ke(g.theme,t));o=Bt(m,p,S,u,c,"fg",h),r=Bt(m,p,S,u,c,"bg",h),s=`shiki-themes ${p.map(g=>g.name).join(" ")}`,l=c?void 0:[o,r].join(";")}else if("theme"in t){const c=ke(t.theme,t);i=dt(n,e,t);const u=n.getTheme(t.theme);r=H(u.bg,c),o=H(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 Bt(n,e,t,r,o,i,s){return n.map((l,a)=>{const c=H(e[a][i],t[a])||"inherit",u=`${r+l.color}${i==="bg"?"-bg":""}:${c}`;if(a===0&&o){if(o===ht&&n.length>1){const h=n.findIndex(b=>b.color==="light"),m=n.findIndex(b=>b.color==="dark");if(h===-1||m===-1)throw new T('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const d=H(e[h][i],t[h])||"inherit",p=H(e[m][i],t[m])||"inherit";return`light-dark(${d}, ${p});${u}`}return c}return s==="css-vars"?u:null}).filter(l=>!!l).join(";")}function Ae(n,e,t,r={meta:{},options:t,codeToHast:(o,i)=>Ae(n,o,i),codeToTokens:(o,i)=>Re(n,o,i)}){let o=e;for(const p of Te(t))o=p.preprocess?.call(r,o,t)||o;let{tokens:i,fg:s,bg:l,themeName:a,rootStyle:c,grammarState:u}=Re(n,o,t);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:m=!1}=t;h===!0?i=wi(i):h==="never"&&(i=ki(i)),m&&(i=Li(i));const d={...r,get source(){return o}};for(const p of Te(t))i=p.tokens?.call(d,i)||i;return Ei(i,{...t,fg:s,bg:l,themeName:a,rootStyle:t.rootStyle===!1?!1:t.rootStyle??c},d,u)}function Ei(n,e,t,r=he(n)){const o=Te(e),i=[],s={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[b,S]of Object.entries(e.meta||{}))b.startsWith("_")||(c[b]=S);let u={type:"element",tagName:"pre",properties:c,children:[],data:e.data},h={type:"element",tagName:"code",properties:{},children:i};const m=[],d={...t,structure:l,addClassToHast:Cn,get source(){return t.source},get tokens(){return n},get options(){return e},get root(){return s},get pre(){return u},get code(){return h},get lines(){return m}};if(n.forEach((b,S)=>{S&&(l==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&i.push({type:"text",value:`
13
- `}));let g={type:"element",tagName:"span",properties:{class:"line"},children:[]},v=0;for(const _ of b){let C={type:"element",tagName:"span",properties:{..._.htmlAttrs},children:[{type:"text",value:_.content}]};const w=ot(_.htmlStyle||Le(_));w&&(C.properties.style=w);for(const I of o)C=I?.span?.call(d,C,S+1,v,g,_)||C;l==="inline"?s.children.push(C):l==="classic"&&g.children.push(C),v+=_.content.length}if(l==="classic"){for(const _ of o)g=_?.line?.call(d,g,S+1)||g;m.push(g),i.push(g)}else l==="inline"&&m.push(g)}),l==="classic"){for(const b of o)h=b?.code?.call(d,h)||h;u.children.push(h);for(const b of o)u=b?.pre?.call(d,u)||u;s.children.push(u)}else if(l==="inline"){const b=[];let S={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const _ of s.children)_.type==="element"&&_.tagName==="br"?(b.push(S),S={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(_.type==="element"||_.type==="text")&&S.children.push(_);b.push(S);let v={type:"element",tagName:"code",properties:{},children:b};for(const _ of o)v=_?.code?.call(d,v)||v;s.children=[];for(let _=0;_<v.children.length;_++){_>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});const C=v.children[_];C.type==="element"&&s.children.push(...C.children)}}let p=s;for(const b of o)p=b?.root?.call(d,p)||p;return r&&Ie(p,r),p}function wi(n){return n.map(e=>{const t=[];let r="",o;return e.forEach((i,s)=>{const a=!(i.fontStyle&&(i.fontStyle&N.Underline||i.fontStyle&N.Strikethrough));a&&i.content.match(/^\s+$/)&&e[s+1]?(o===void 0&&(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=void 0,r=""):t.push(i)}),t})}function ki(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 Li(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=ot(o.htmlStyle||Le(o)),s=ot(r.htmlStyle||Le(r)),l=o.fontStyle&&(o.fontStyle&N.Underline||o.fontStyle&N.Strikethrough),a=r.fontStyle&&(r.fontStyle&N.Underline||r.fontStyle&N.Strikethrough);!l&&!a&&i===s?o.content+=r.content:t.push({...r})}return t})}const Ti=zo;function Ri(n,e,t){const r={meta:{},options:t,codeToHast:(i,s)=>Ae(n,i,s),codeToTokens:(i,s)=>Re(n,i,s)};let o=Ti(Ae(n,e,t,r));for(const i of Te(t))o=i.postprocess?.call(r,o,t)||o;return o}const $t={light:"#333333",dark:"#bbbbbb"},Gt={light:"#fffffe",dark:"#1e1e1e"},Vt="__shiki_resolved";function pt(n){if(n?.[Vt])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"?$t.light:$t.dark),t||(t=e.type==="light"?Gt.light:Gt.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,Vt,{enumerable:!1,writable:!1,value:!0}),e}async function Ln(n){return Array.from(new Set((await Promise.all(n.filter(e=>!bn(e)).map(async e=>await vn(e).then(t=>Array.isArray(t)?t:[t])))).flat()))}async function Tn(n){return(await Promise.all(n.map(async t=>Sn(t)?null:pt(await vn(t))))).filter(t=>!!t)}let Ai=3;function Pi(n,e=3){e>Ai||console.trace(`[SHIKI DEPRECATE]: ${n}`)}let Y=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Rn(n,e){if(!e)return n;if(e[n]){const t=new Set([n]);for(;e[n];){if(n=e[n],t.has(n))throw new Y(`Circular alias \`${Array.from(t).join(" -> ")} -> ${n}\``);t.add(n)}}return n}class Ii extends Ir{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=pt(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=be.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Rn(e,this._alias),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.embeddedLanguages||s.embeddedLangs)?.some(a=>r.map(([c])=>c).includes(a)):!1).filter(i=>!r.includes(i));throw new Y(`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){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const r of t)this._langGraph.set(r,this._langMap.get(r))}}class xi{_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 ie=0;function Ni(n){ie+=1,n.warnings!==!1&&ie>=10&&ie%10===0&&console.warn(`[Shiki] ${ie} 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 Y("`engine` option is required for synchronous mode");const t=(n.langs||[]).flat(1),r=(n.themes||[]).flat(1).map(pt),o=new xi(n.engine,t),i=new Ii(o,r,t,n.langAlias);let s;function l(_){return Rn(_,n.langAlias)}function a(_){g();const C=i.getGrammar(typeof _=="string"?_:_.name);if(!C)throw new Y(`Language \`${_}\` not found, you may need to load it first`);return C}function c(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};g();const C=i.getTheme(_);if(!C)throw new Y(`Theme \`${_}\` not found, you may need to load it first`);return C}function u(_){g();const C=c(_);s!==_&&(i.setTheme(C),s=_);const w=i.getColorMap();return{theme:C,colorMap:w}}function h(){return g(),i.getLoadedThemes()}function m(){return g(),i.getLoadedLanguages()}function d(..._){g(),i.loadLanguages(_.flat(1))}async function p(..._){return d(await Ln(_))}function b(..._){g();for(const C of _.flat(1))i.loadTheme(C)}async function S(..._){return g(),b(await Tn(_))}function g(){if(e)throw new Y("Shiki instance has been disposed")}function v(){e||(e=!0,i.dispose(),ie-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:h,getLoadedLanguages:m,resolveLangAlias:l,loadLanguage:p,loadLanguageSync:d,loadTheme:S,loadThemeSync:b,dispose:v,[Symbol.dispose]:v}}async function Oi(n){n.engine||Pi("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,t,r]=await Promise.all([Tn(n.themes||[]),Ln(n.langs||[]),n.engine]);return Ni({...n,themes:e,langs:t,engine:r})}async function Di(n){const e=await Oi(n);return{getLastGrammarState:(...t)=>gi(e,...t),codeToTokensBase:(t,r)=>dt(e,t,r),codeToTokensWithThemes:(t,r)=>kn(e,t,r),codeToTokens:(t,r)=>Re(e,t,r),codeToHast:(t,r)=>Ae(e,t,r),codeToHtml:(t,r)=>Ri(e,t,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Mi(n){const e=n.langs,t=n.themes,r=n.engine;async function o(i){function s(h){if(typeof h=="string"){if(h=i.langAlias?.[h]||h,bn(h))return[];const m=e[h];if(!m)throw new T(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return m}return h}function l(h){if(Sn(h))return"none";if(typeof h=="string"){const m=t[h];if(!m)throw new T(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return m}return h}const a=(i.themes??[]).map(h=>l(h)),c=(i.langs??[]).map(h=>s(h)),u=await Di({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 Bi(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 $i(n,e){const t=Bi(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 Gi=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>f(()=>import("./C-Jbm3Hp.js"),[],import.meta.url))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>f(()=>import("./D-2ljcwZ.js"),[],import.meta.url))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>f(()=>import("./CmMr59Fi.js"),[],import.meta.url))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>f(()=>import("./DFWUc33u.js"),[],import.meta.url))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>f(()=>import("./C9dUb6Cb.js"),[],import.meta.url))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>f(()=>import("./DQyhUUbL.js"),[],import.meta.url))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>f(()=>import("./D87Tk5Gz.js"),[],import.meta.url))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>f(()=>import("./C3mMm8J8.js"),[],import.meta.url))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>f(()=>import("./BzJJZx-M.js"),[],import.meta.url))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>f(()=>import("./BXkSAIEj.js"),[],import.meta.url))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>f(()=>import("./BgDCqdQA.js"),[],import.meta.url))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>f(()=>import("./C8M2exoo.js"),[],import.meta.url))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>f(()=>import("./DHJKELXO.js"),[],import.meta.url))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>f(()=>import("./Cuk6v7N8.js"),[],import.meta.url))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>f(()=>import("./DH5Ifo-i.js"),[],import.meta.url))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>f(()=>import("./E3gJ1_iC.js"),[],import.meta.url))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>f(()=>import("./DAi9KRSo.js"),[],import.meta.url))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>f(()=>import("./D7oLnXFd.js"),[],import.meta.url))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>f(()=>import("./BfjtVDDH.js"),[],import.meta.url))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>f(()=>import("./CFHQjOhq.js"),[],import.meta.url))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>f(()=>import("./GsRaNv29.js"),[],import.meta.url))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>f(()=>import("./CVdnzihN.js"),[],import.meta.url))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>f(()=>import("./CH1njM8p.js"),[],import.meta.url))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>f(()=>import("./DRw_LuNl.js"),[],import.meta.url))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>f(()=>import("./hJgmCMqR.js"),[],import.meta.url))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>f(()=>import("./DnULxvSX.js"),[],import.meta.url))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>f(()=>import("./CkXjmgJE.js"),[],import.meta.url))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>f(()=>import("./CfQXZHmo.js"),[],import.meta.url))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>f(()=>import("./DWedfzmr.js"),[],import.meta.url))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>f(()=>import("./DUszq2jm.js"),[],import.meta.url))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>f(()=>import("./B7mTdjB0.js"),[],import.meta.url))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>f(()=>import("./D5KoaKCx.js"),[],import.meta.url))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>f(()=>import("./BfHTSMKl.js"),[],import.meta.url))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>f(()=>import("./B0m2ddpp.js"),[],import.meta.url))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>f(()=>import("./CyktbL80.js"),[],import.meta.url))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>f(()=>import("./Csfq5Kiy.js"),[],import.meta.url))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>f(()=>import("./CafNBF8u.js"),[],import.meta.url))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>f(()=>import("./CTRr51gU.js"),[],import.meta.url))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>f(()=>import("./D4h5O-jR.js"),[],import.meta.url))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>f(()=>import("./C39BiMTA.js"),[],import.meta.url))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>f(()=>import("./Ddv68eIx.js"),[],import.meta.url))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>f(()=>import("./DVMEJ2y_.js"),[],import.meta.url))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>f(()=>import("./PoHY5YXO.js"),[],import.meta.url))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>f(()=>import("./3e1v2bzS.js"),[],import.meta.url))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>f(()=>import("./CS3Unz2-.js"),[],import.meta.url))},{id:"red",displayName:"Red",type:"dark",import:(()=>f(()=>import("./bN70gL4F.js"),[],import.meta.url))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>f(()=>import("./qdsjHGoJ.js"),[],import.meta.url))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>f(()=>import("./DHQR4-dF.js"),[],import.meta.url))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>f(()=>import("./D4_iv3hh.js"),[],import.meta.url))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>f(()=>import("./BthQWCQV.js"),[],import.meta.url))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>f(()=>import("./DqwNpetd.js"),[],import.meta.url))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>f(()=>import("./Bw305WKR.js"),[],import.meta.url))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>f(()=>import("./DXbdFlpD.js"),[],import.meta.url))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>f(()=>import("./L9t79GZl.js"),[],import.meta.url))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>f(()=>import("./CbfX1IO0.js"),[],import.meta.url))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>f(()=>import("./hegEt444.js"),[],import.meta.url))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>f(()=>import("./DU1UobuO.js"),[],import.meta.url))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>f(()=>import("./Bkuqu6BP.js"),[],import.meta.url))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>f(()=>import("./D0r3Knsf.js"),[],import.meta.url))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>f(()=>import("./CVO1_9PV.js"),[],import.meta.url))}],Vi=Object.fromEntries(Gi.map(n=>[n.id,n.import]));class ft extends Error{constructor(e){super(e),this.name="ShikiError"}}function ji(){return 2147483648}function Ui(){return typeof performance<"u"?performance.now():Date.now()}const Hi=(n,e)=>n+(e-n%e)%e;async function Fi(n){let e,t;const r={};function o(d){t=d,r.HEAPU8=new Uint8Array(d),r.HEAPU32=new Uint32Array(d)}function i(d,p,b){r.HEAPU8.copyWithin(d,p,p+b)}function s(d){try{return e.grow(d-t.byteLength+65535>>>16),o(e.buffer),1}catch{}}function l(d){const p=r.HEAPU8.length;d=d>>>0;const b=ji();if(d>b)return!1;for(let S=1;S<=4;S*=2){let g=p*(1+.2/S);g=Math.min(g,d+100663296);const v=Math.min(b,Hi(Math.max(d,g),65536));if(s(v))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(d,p,b=1024){const S=p+b;let g=p;for(;d[g]&&!(g>=S);)++g;if(g-p>16&&d.buffer&&a)return a.decode(d.subarray(p,g));let v="";for(;p<g;){let _=d[p++];if(!(_&128)){v+=String.fromCharCode(_);continue}const C=d[p++]&63;if((_&224)===192){v+=String.fromCharCode((_&31)<<6|C);continue}const w=d[p++]&63;if((_&240)===224?_=(_&15)<<12|C<<6|w:_=(_&7)<<18|C<<12|w<<6|d[p++]&63,_<65536)v+=String.fromCharCode(_);else{const I=_-65536;v+=String.fromCharCode(55296|I>>10,56320|I&1023)}}return v}function u(d,p){return d?c(r.HEAPU8,d,p):""}const h={emscripten_get_now:Ui,emscripten_memcpy_big:i,emscripten_resize_heap:l,fd_write:()=>0};async function m(){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 m(),r}var Wi=Object.defineProperty,zi=(n,e,t)=>e in n?Wi(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,R=(n,e,t)=>zi(n,typeof e!="symbol"?e+"":e,t);let P=null;function qi(n){throw new ft(n.UTF8ToString(n.getLastOnigError()))}class xe{constructor(e){R(this,"utf16Length"),R(this,"utf8Length"),R(this,"utf16Value"),R(this,"utf8Value"),R(this,"utf16OffsetToUtf8"),R(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,m=!1;if(u>=55296&&u<=56319&&c+1<t){const d=e.charCodeAt(c+1);d>=56320&&d<=57343&&(h=(u-55296<<10)+65536|d-56320,m=!0)}o&&(i[c]=a,m&&(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),m&&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 Ne=class V{constructor(e){if(R(this,"id",++V.LAST_ID),R(this,"_onigBinding"),R(this,"content"),R(this,"utf16Length"),R(this,"utf8Length"),R(this,"utf16OffsetToUtf8"),R(this,"utf8OffsetToUtf16"),R(this,"ptr"),!P)throw new ft("Must invoke loadWasm first.");this._onigBinding=P,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&&!V._sharedPtrInUse?(V._sharedPtr||(V._sharedPtr=P.omalloc(1e4)),V._sharedPtrInUse=!0,P.HEAPU8.set(t.utf8Value,V._sharedPtr),this.ptr=V._sharedPtr):this.ptr=t.createString(P)}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===V._sharedPtr?V._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};R(Ne,"LAST_ID",0);R(Ne,"_sharedPtr",0);R(Ne,"_sharedPtrInUse",!1);let An=Ne;class Ki{constructor(e){if(R(this,"_onigBinding"),R(this,"_ptr"),!P)throw new ft("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(P),r[l]=c.utf8Length}const o=P.omalloc(4*e.length);P.HEAPU32.set(t,o/4);const i=P.omalloc(4*e.length);P.HEAPU32.set(r,i/4);const s=P.createOnigScanner(o,i,e.length);for(let l=0,a=e.length;l<a;l++)P.ofree(t[l]);P.ofree(i),P.ofree(o),s===0&&qi(P),this._onigBinding=P,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 An(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 m=0;m<u;m++){const d=e.convertUtf8OffsetToUtf16(l[a++]),p=e.convertUtf8OffsetToUtf16(l[a++]);h[m]={start:d,end:p,length:p-d}}return{index:c,captureIndices:h}}}function Ji(n){return typeof n.instantiator=="function"}function Yi(n){return typeof n.default=="function"}function Xi(n){return typeof n.data<"u"}function Qi(n){return typeof Response<"u"&&n instanceof Response}function Zi(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 _e;function es(n){if(_e)return _e;async function e(){P=await Fi(async t=>{let r=n;return r=await r,typeof r=="function"&&(r=await r(t)),typeof r=="function"&&(r=await r(t)),Ji(r)?r=await r.instantiator(t):Yi(r)?r=await r.default(t):(Xi(r)&&(r=r.data),Qi(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await ts(r)(t):r=await ns(r)(t):Zi(r)?r=await Fe(r)(t):r instanceof WebAssembly.Module?r=await Fe(r)(t):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Fe(r.default)(t))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return _e=e(),_e}function Fe(n){return e=>WebAssembly.instantiate(n,e)}function ts(n){return e=>WebAssembly.instantiateStreaming(n,e)}function ns(n){return async e=>{const t=await n.arrayBuffer();return WebAssembly.instantiate(t,e)}}async function rs(n){return n&&await es(n),{createScanner(e){return new Ki(e.map(t=>typeof t=="string"?t:t.source))},createString(e){return new An(e)}}}const Pn=[{id:"angular-html",name:"Angular HTML",import:(()=>f(()=>import("./DxNHbxmM.js").then(n=>n.f),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>f(()=>import("./Cl0AqbOI.js"),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:"astro",name:"Astro",import:(()=>f(()=>import("./DxSwrfjg.js"),__vite__mapDeps([6,7,2,8,3,9,10]),import.meta.url))},{id:"blade",name:"Blade",import:(()=>f(()=>import("./5X7smno1.js"),__vite__mapDeps([11,12,1,2,3,13,14,15,7]),import.meta.url))},{id:"c",name:"C",import:(()=>f(()=>import("./BIGW1oBm.js"),[],import.meta.url))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>f(()=>import("./CxbxFI8M.js"),__vite__mapDeps([16,2]),import.meta.url))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>f(()=>import("./Bp3cYrEr.js"),__vite__mapDeps([17,18,19,20,15]),import.meta.url))},{id:"css",name:"CSS",import:(()=>f(()=>import("./DPfMkruS.js"),[],import.meta.url))},{id:"csv",name:"CSV",import:(()=>f(()=>import("./fuZLfV_i.js"),[],import.meta.url))},{id:"glsl",name:"GLSL",import:(()=>f(()=>import("./DZxFcAj9.js"),__vite__mapDeps([19,20]),import.meta.url))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>f(()=>import("./C9oPPf7i.js"),__vite__mapDeps([21,2,8,22,10]),import.meta.url))},{id:"haml",name:"Ruby Haml",import:(()=>f(()=>import("./CmIQRyeF.js"),__vite__mapDeps([23,2,3]),import.meta.url))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>f(()=>import("./m17aaUwq.js"),__vite__mapDeps([24,1,2,3,25]),import.meta.url))},{id:"html",name:"HTML",import:(()=>f(()=>import("./CnnebwVN.js"),__vite__mapDeps([1,2,3]),import.meta.url))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>f(()=>import("./DGP4VlC8.js"),__vite__mapDeps([12,1,2,3]),import.meta.url))},{id:"http",name:"HTTP",import:(()=>f(()=>import("./CufHLc7y.js"),__vite__mapDeps([26,27,7,13,14,21,2,8,22,10]),import.meta.url))},{id:"hurl",name:"Hurl",import:(()=>f(()=>import("./CYsAdtH9.js"),__vite__mapDeps([28,21,2,8,22,10,13,14,29]),import.meta.url))},{id:"imba",name:"Imba",import:(()=>f(()=>import("./DGztddWO.js"),[],import.meta.url))},{id:"java",name:"Java",import:(()=>f(()=>import("./CylS5w8V.js"),[],import.meta.url))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>f(()=>import("./wDzz0qaB.js"),[],import.meta.url))},{id:"jinja",name:"Jinja",import:(()=>f(()=>import("./CXZktZb0.js"),__vite__mapDeps([30,1,2,3]),import.meta.url))},{id:"jison",name:"Jison",import:(()=>f(()=>import("./Br6cN0cg.js"),__vite__mapDeps([31,2]),import.meta.url))},{id:"json",name:"JSON",import:(()=>f(()=>import("./Cp-IABpG.js"),[],import.meta.url))},{id:"json5",name:"JSON5",import:(()=>f(()=>import("./C9tS-k6U.js"),[],import.meta.url))},{id:"jsonc",name:"JSON with Comments",import:(()=>f(()=>import("./Des-eS-w.js"),[],import.meta.url))},{id:"jsonl",name:"JSON Lines",import:(()=>f(()=>import("./DcaNXYhu.js"),[],import.meta.url))},{id:"jsx",name:"JSX",import:(()=>f(()=>import("./g9-lgVsj.js"),[],import.meta.url))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>f(()=>import("./W9tJ9s81.js"),__vite__mapDeps([32,17,18,19,20,15,33,2,34]),import.meta.url))},{id:"less",name:"Less",import:(()=>f(()=>import("./B1dDrJ26.js"),[],import.meta.url))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>f(()=>import("./Cvjx9yec.js"),[],import.meta.url))},{id:"marko",name:"Marko",import:(()=>f(()=>import("./83L43bj1.js"),__vite__mapDeps([35,3,36,5,8]),import.meta.url))},{id:"mdc",name:"MDC",import:(()=>f(()=>import("./TsXTqZ29.js"),__vite__mapDeps([37,38,25,12,1,2,3]),import.meta.url))},{id:"mdx",name:"MDX",import:(()=>f(()=>import("./Cmh6b_Ma.js"),[],import.meta.url))},{id:"php",name:"PHP",import:(()=>f(()=>import("./Xqf5ue2O.js"),__vite__mapDeps([39,1,2,3,13,14,15,7]),import.meta.url))},{id:"postcss",name:"PostCSS",import:(()=>f(()=>import("./CXtECtnM.js"),[],import.meta.url))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>f(()=>import("./BLmx8bSh.js"),__vite__mapDeps([40,2,3,1]),import.meta.url))},{id:"python",name:"Python",aliases:["py"],import:(()=>f(()=>import("./B6aJPvgy.js"),[],import.meta.url))},{id:"r",name:"R",import:(()=>f(()=>import("./Dspwwk_N.js"),[],import.meta.url))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>f(()=>import("./CDVJQ6XC.js"),[],import.meta.url))},{id:"sass",name:"Sass",import:(()=>f(()=>import("./Cj5Yp3dK.js"),[],import.meta.url))},{id:"scss",name:"SCSS",import:(()=>f(()=>import("./2EtD6e53.js"),__vite__mapDeps([5,3]),import.meta.url))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>f(()=>import("./Yzrsuije.js"),[],import.meta.url))},{id:"sql",name:"SQL",import:(()=>f(()=>import("./BLtJtn59.js"),[],import.meta.url))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>f(()=>import("./BEDo0Tqx.js"),[],import.meta.url))},{id:"svelte",name:"Svelte",import:(()=>f(()=>import("./DYoxhk2S.js"),__vite__mapDeps([41,2,8,3,9]),import.meta.url))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>f(()=>import("./Cm3UrAx6.js"),__vite__mapDeps([42,8,3,2,19,20,1,15,13,14]),import.meta.url))},{id:"tsx",name:"TSX",import:(()=>f(()=>import("./COt5Ahok.js"),[],import.meta.url))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>f(()=>import("./BPQ3VLAy.js"),[],import.meta.url))},{id:"vue",name:"Vue",import:(()=>f(()=>import("./DEthMvLe.js"),__vite__mapDeps([43,3,2,8,7,1,12]),import.meta.url))},{id:"vue-html",name:"Vue HTML",import:(()=>f(()=>import("./DqQDbK_p.js"),__vite__mapDeps([44,2]),import.meta.url))},{id:"vue-vine",name:"Vue Vine",import:(()=>f(()=>import("./CW8IKDeL.js"),__vite__mapDeps([45,3,5,36,46,9,2]),import.meta.url))},{id:"wasm",name:"WebAssembly",import:(()=>f(()=>import("./MzD3tlZU.js"),[],import.meta.url))},{id:"wgsl",name:"WGSL",import:(()=>f(()=>import("./Dx-B1_4e.js"),[],import.meta.url))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>f(()=>import("./5i3qLPDT.js"),[],import.meta.url))},{id:"xml",name:"XML",import:(()=>f(()=>import("./BGJmEYvX.js"),__vite__mapDeps([13,14]),import.meta.url))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>f(()=>import("./Buea-lGh.js"),[],import.meta.url))}],os=Object.fromEntries(Pn.map(n=>[n.id,n.import])),is=Object.fromEntries(Pn.flatMap(n=>n.aliases?.map(e=>[e,n.import])||[])),ss={...os,...is},as=Mi({langs:ss,themes:Vi,engine:()=>rs(f(()=>import("./CG6Dc4jp.js"),[],import.meta.url))}),{codeToHtml:ls}=$i(as,{guessEmbeddedLanguages:Xo});class cs{diff(e,t,r={}){let o;typeof r=="function"?(o=r,r={}):"callback"in r&&(o=r.callback);const i=this.castInput(e,r),s=this.castInput(t,r),l=this.removeEmpty(this.tokenize(i,r)),a=this.removeEmpty(this.tokenize(s,r));return this.diffWithOptionsObj(l,a,r,o)}diffWithOptionsObj(e,t,r,o){var i;const s=v=>{if(v=this.postProcess(v,r),o){setTimeout(function(){o(v)},0);return}else return v},l=t.length,a=e.length;let c=1,u=l+a;r.maxEditLength!=null&&(u=Math.min(u,r.maxEditLength));const h=(i=r.timeout)!==null&&i!==void 0?i:1/0,m=Date.now()+h,d=[{oldPos:-1,lastComponent:void 0}];let p=this.extractCommon(d[0],t,e,0,r);if(d[0].oldPos+1>=a&&p+1>=l)return s(this.buildValues(d[0].lastComponent,t,e));let b=-1/0,S=1/0;const g=()=>{for(let v=Math.max(b,-c);v<=Math.min(S,c);v+=2){let _;const C=d[v-1],w=d[v+1];C&&(d[v-1]=void 0);let I=!1;if(w){const ne=w.oldPos-v;I=w&&0<=ne&&ne<l}const $=C&&C.oldPos+1<a;if(!I&&!$){d[v]=void 0;continue}if(!$||I&&C.oldPos<w.oldPos?_=this.addToPath(w,!0,!1,0,r):_=this.addToPath(C,!1,!0,1,r),p=this.extractCommon(_,t,e,v,r),_.oldPos+1>=a&&p+1>=l)return s(this.buildValues(_.lastComponent,t,e))||!0;d[v]=_,_.oldPos+1>=a&&(S=Math.min(S,v-1)),p+1>=l&&(b=Math.max(b,v+1))}c++};if(o)(function v(){setTimeout(function(){if(c>u||Date.now()>m)return o(void 0);g()||v()},0)})();else for(;c<=u&&Date.now()<=m;){const v=g();if(v)return v}}addToPath(e,t,r,o,i){const s=e.lastComponent;return s&&!i.oneChangePerToken&&s.added===t&&s.removed===r?{oldPos:e.oldPos+o,lastComponent:{count:s.count+1,added:t,removed:r,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+o,lastComponent:{count:1,added:t,removed:r,previousComponent:s}}}extractCommon(e,t,r,o,i){const s=t.length,l=r.length;let a=e.oldPos,c=a-o,u=0;for(;c+1<s&&a+1<l&&this.equals(r[a+1],t[c+1],i);)c++,a++,u++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return u&&!i.oneChangePerToken&&(e.lastComponent={count:u,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=a,c}equals(e,t,r){return r.comparator?r.comparator(e,t):e===t||!!r.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,r){const o=[];let i;for(;e;)o.push(e),i=e.previousComponent,delete e.previousComponent,e=i;o.reverse();const s=o.length;let l=0,a=0,c=0;for(;l<s;l++){const u=o[l];if(u.removed)u.value=this.join(r.slice(c,c+u.count)),c+=u.count;else{if(!u.added&&this.useLongestToken){let h=t.slice(a,a+u.count);h=h.map(function(m,d){const p=r[c+d];return p.length>m.length?p:m}),u.value=this.join(h)}else u.value=this.join(t.slice(a,a+u.count));a+=u.count,u.added||(c+=u.count)}}return o}}class us extends cs{constructor(){super(...arguments),this.tokenize=ms}equals(e,t,r){return r.ignoreWhitespace?((!r.newlineIsToken||!e.includes(`
12
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Ni(n,e,t,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let s=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(n.tagName.toLowerCase());const l=[];let a;i.space==="html"&&n.tagName==="svg"&&(r.schema=mn);const c=Oi(r,n.properties),u=r.all(i.space==="html"&&n.tagName==="template"?n.content:n);return r.schema=i,u&&(s=!1),(c||!o||!Ti(n,e,t))&&(l.push("<",n.tagName,c?" "+c:""),s&&(i.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&&(!o||!lt(n,e,t))&&l.push("</"+n.tagName+">"),l.join("")}function Oi(n,e){const t=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const o=Di(n,i,e[i]);o&&t.push(o)}}for(;++r<t.length;){const o=n.settings.tightAttributes?t[r].charAt(t[r].length-1):void 0;r!==t.length-1&&o!=='"'&&o!=="'"&&(t[r]+=" ")}return t.join("")}function Di(n,e,t){const r=$r(n.schema,e),i=n.settings.allowParseErrors&&n.schema.space==="html"?0:1,o=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=Q(r.attribute,Object.assign({},n.settings.characterReferences,{subset:ge.name[i][o]}));return t===!0||(t=Array.isArray(t)?(r.commaSeparated?ui:hi)(t,{padLeft:!n.settings.tightCommaSeparatedLists}):String(t),n.settings.collapseEmptyAttributes&&!t)?a:(n.settings.preferUnquoted&&(l=Q(t,Object.assign({},n.settings.characterReferences,{attribute:!0,subset:ge.unquoted[i][o]}))),l!==t&&(n.settings.quoteSmart&&It(t,s)>It(t,n.alternative)&&(s=n.alternative),l=s+Q(t,Object.assign({},n.settings.characterReferences,{subset:(s==="'"?ge.single:ge.double)[i][o],attribute:!0}))+s),a+(l&&"="+l))}const Mi=["<","&"];function yn(n,e,t,r){return t&&t.type==="element"&&(t.tagName==="script"||t.tagName==="style")?n.value:Q(n.value,Object.assign({},r.settings.characterReferences,{subset:Mi}))}function Bi(n,e,t,r){return r.settings.allowDangerousHtml?n.value:yn(n,e,t,r)}function $i(n,e,t,r){return r.all(n)}const Gi=Ur("type",{invalid:Vi,unknown:ji,handlers:{comment:li,doctype:ci,element:Ni,raw:Bi,root:$i,text:yn}});function Vi(n){throw new Error("Expected node, not `"+n+"`")}function ji(n){const e=n;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Ui={},Hi={},Fi=[];function Wi(n,e){const t=e||Ui,r=t.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:zi,all:qi,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||xr,characterReferences:t.characterReferences||Hi,closeSelfClosing:t.closeSelfClosing||!1,closeEmptyElements:t.closeEmptyElements||!1},schema:t.space==="svg"?mn:jr,quote:r,alternative:i}.one(Array.isArray(n)?{type:"root",children:n}:n,void 0,void 0)}function zi(n,e,t){return Gi(n,e,t,this)}function qi(n){const e=[],t=n&&n.children||Fi;let r=-1;for(;++r<t.length;)e[r]=this.one(t[r],r,n);return e.join("")}function ke(n,e){const t=typeof n=="string"?{}:{...n.colorReplacements},r=typeof n=="string"?n:n.name;for(const[i,o]of Object.entries(e?.colorReplacements||{}))typeof o=="string"?t[i]=o:i===r&&Object.assign(t,o);return t}function H(n,e){return n&&(e?.[n?.toLowerCase()]||n)}function Ki(n){return Array.isArray(n)?n:[n]}async function vn(n){return Promise.resolve(typeof n=="function"?n():n).then(e=>e.default||e)}function ct(n){return!n||["plaintext","txt","text","plain"].includes(n)}function bn(n){return n==="ansi"||ct(n)}function ut(n){return n==="none"}function Sn(n){return ut(n)}function Cn(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 Pe(n,e=!1){if(n.length===0)return[["",0]];const t=n.split(/(\r?\n)/g);let r=0;const i=[];for(let o=0;o<t.length;o+=2){const s=e?t[o]+(t[o+1]||""):t[o];i.push([s,r]),r+=t[o].length,r+=t[o+1]?.length||0}return i}function Ji(n){const e=Pe(n,!0).map(([i])=>i);function t(i){if(i===n.length)return{line:e.length-1,character:e[e.length-1].length};let o=i,s=0;for(const l of e){if(o<l.length)break;o-=l.length,s++}return{line:s,character:o}}function r(i,o){let s=0;for(let l=0;l<i;l++)s+=e[l].length;return s+=o,s}return{lines:e,indexToPos:t,posToIndex:r}}function Yi(n,e,t){const r=new Set;for(const o of n.matchAll(/:?lang=["']([^"']+)["']/g)){const s=o[1].toLowerCase().trim();s&&r.add(s)}for(const o of n.matchAll(/(?:```|~~~)([\w-]+)/g)){const s=o[1].toLowerCase().trim();s&&r.add(s)}for(const o of n.matchAll(/\\begin\{([\w-]+)\}/g)){const s=o[1].toLowerCase().trim();s&&r.add(s)}for(const o of n.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const s=o[1].toLowerCase().trim(),l=s.includes("/")?s.split("/").pop():s;l&&r.add(l)}if(!t)return Array.from(r);const i=t.getBundledLanguages();return Array.from(r).filter(o=>o&&i[o])}const ht="light-dark()",Xi=["color","background-color"];function Qi(n,e){let t=0;const r=[];for(const i of e)i>t&&r.push({...n,content:n.content.slice(t,i),offset:n.offset+t}),t=i;return t<n.content.length&&r.push({...n,content:n.content.slice(t),offset:n.offset+t}),r}function Zi(n,e){const t=Array.from(e instanceof Set?e:new Set(e)).sort((r,i)=>r-i);return t.length?n.map(r=>r.flatMap(i=>{const o=t.filter(s=>i.offset<s&&s<i.offset+i.content.length).map(s=>s-i.offset).sort((s,l)=>s-l);return o.length?Qi(i,o):i})):n}function eo(n,e,t,r,i="css-vars"){const o={content:n.content,explanation:n.explanation,offset:n.offset},s=e.map(u=>Le(n.variants[u])),l=new Set(s.flatMap(u=>Object.keys(u))),a={},c=(u,h)=>{const m=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return t+e[u]+(h==="color"?"":m)};return s.forEach((u,h)=>{for(const m of l){const d=u[m]||"inherit";if(h===0&&r&&Xi.includes(m))if(r===ht&&s.length>1){const p=e.findIndex(v=>v==="light"),b=e.findIndex(v=>v==="dark");if(p===-1||b===-1)throw new T('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const S=s[p][m]||"inherit",g=s[b][m]||"inherit";a[m]=`light-dark(${S}, ${g})`,i==="css-vars"&&(a[c(h,m)]=d)}else a[m]=d;else i==="css-vars"&&(a[c(h,m)]=d)}}),o.htmlStyle=a,o}function Le(n){const e={};if(n.color&&(e.color=n.color),n.bgColor&&(e["background-color"]=n.bgColor),n.fontStyle){n.fontStyle&N.Italic&&(e["font-style"]="italic"),n.fontStyle&N.Bold&&(e["font-weight"]="bold");const t=[];n.fontStyle&N.Underline&&t.push("underline"),n.fontStyle&N.Strikethrough&&t.push("line-through"),t.length&&(e["text-decoration"]=t.join(" "))}return e}function it(n){return typeof n=="string"?n:Object.entries(n).map(([e,t])=>`${e}:${t}`).join(";")}const En=new WeakMap;function Ie(n,e){En.set(n,e)}function he(n){return En.get(n)}class te{_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 te(Object.fromEntries(Ki(t).map(r=>[r,Ze])),e)}constructor(...e){if(e.length===2){const[t,r]=e;this.lang=r,this._stacks=t}else{const[t,r,i]=e;this.lang=r,this._stacks={[i]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return to(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function to(n){const e=[],t=new Set;function r(i){if(t.has(i))return;t.add(i);const o=i?.nameScopesList?.scopeName;o&&e.push(o),i.parent&&r(i.parent)}return r(n),e}function no(n,e){if(!(n instanceof te))throw new T("Invalid grammar state");return n.getInternalStack(e)}function ro(){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{...i.indexToPos(s),offset:s}}else{const l=i.lines[s.line];if(l===void 0)throw new T(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${i.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:i.posToIndex(s.line,a)}}};const i=Ji(t.source),o=(t.options.decorations||[]).map(s=>({...s,start:r(s.start),end:r(s.end)}));io(o),n.set(t.meta,{decorations:o,converter:i,source:t.source})}return n.get(t.meta)}return{name:"shiki:decorations",tokens(t){if(!this.options.decorations?.length)return;const i=e(this).decorations.flatMap(s=>[s.start.offset,s.end.offset]);return Zi(t,i)},code(t){if(!this.options.decorations?.length)return;const r=e(this),i=Array.from(t.children).filter(u=>u.type==="element"&&u.tagName==="span");if(i.length!==r.converter.lines.length)throw new T(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(u,h,m,d){const p=i[u];let b="",S=-1,g=-1;if(h===0&&(S=0),m===0&&(g=0),m===Number.POSITIVE_INFINITY&&(g=p.children.length),S===-1||g===-1)for(let _=0;_<p.children.length;_++)b+=wn(p.children[_]),S===-1&&b.length===h&&(S=_+1),g===-1&&b.length===m&&(g=_+1);if(S===-1)throw new T(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);if(g===-1)throw new T(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);const v=p.children.slice(S,g);if(!d.alwaysWrap&&v.length===p.children.length)l(p,d,"line");else if(!d.alwaysWrap&&v.length===1&&v[0].type==="element")l(v[0],d,"token");else{const _={type:"element",tagName:"span",properties:{},children:v};l(_,d,"wrapper"),p.children.splice(S,v.length,_)}}function s(u,h){i[u]=l(i[u],h,"line")}function l(u,h,m){const d=h.properties||{},p=h.transform||(b=>b);return u.tagName=h.tagName||"span",u.properties={...u.properties,...d,class:u.properties.class},h.properties?.class&&Cn(u,h.properties.class),u=p(u,m)||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:m}=u;if(h.line===m.line)o(h.line,h.character,m.character,u);else if(h.line<m.line){o(h.line,h.character,Number.POSITIVE_INFINITY,u);for(let d=h.line+1;d<m.line;d++)a.unshift(()=>s(d,u));o(m.line,0,m.character,u)}}a.forEach(u=>u())}}}function io(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 i=n[r],o=t.start.offset<=i.start.offset&&i.start.offset<t.end.offset,s=t.start.offset<i.end.offset&&i.end.offset<=t.end.offset,l=i.start.offset<=t.start.offset&&t.start.offset<i.end.offset,a=i.start.offset<t.end.offset&&t.end.offset<=i.end.offset;if(o||s||l||a){if(o&&s||l&&a||l&&t.start.offset===t.end.offset||s&&i.start.offset===i.end.offset)continue;throw new T(`Decorations ${JSON.stringify(t.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function wn(n){return n.type==="text"?n.value:n.type==="element"?n.children.map(wn).join(""):""}const oo=[ro()];function Te(n){const e=so(n.transformers||[]);return[...e.pre,...e.normal,...e.post,...oo]}function so(n){const e=[],t=[],r=[];for(const i of n)switch(i.enforce){case"pre":e.push(i);break;case"post":t.push(i);break;default:r.push(i)}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"],He={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function ao(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 Dt(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 lo(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)He[r]&&e.push({type:"setDecoration",value:He[r]});else if(r<=29){const i=He[r-20];i&&(e.push({type:"resetDecoration",value:i}),i==="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 i=Dt(n);i&&e.push({type:"setForegroundColor",value:i})}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 i=Dt(n);i&&e.push({type:"setBackgroundColor",value:i})}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 co(){let n=null,e=null,t=new Set;return{parse(r){const i=[];let o=0;do{const s=ao(r,o),l=s.sequence?r.substring(o,s.startPosition):r.substring(o);if(l.length>0&&i.push({value:l,foreground:n,background:e,decorations:new Set(t)}),s.sequence){const a=lo(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)}o=s.position}while(o<r.length);return i}}}var uo={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 ho(n=uo){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 i(){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 o(l){return i()[l]}function s(l){switch(l.type){case"named":return e(l.name);case"rgb":return t(l.rgb);case"table":return o(l.index)}}return{value:s}}const mo={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 po(n,e,t){const r=ke(n,t),i=Pe(e),o=Object.fromEntries(z.map(a=>{const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=n.colors?.[c];return[a,u||mo[a]]})),s=ho(o),l=co();return i.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=H(u,r),h=H(h,r),c.decorations.has("dim")&&(u=fo(u));let m=N.None;return c.decorations.has("bold")&&(m|=N.Bold),c.decorations.has("italic")&&(m|=N.Italic),c.decorations.has("underline")&&(m|=N.Underline),c.decorations.has("strikethrough")&&(m|=N.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:h,fontStyle:m}}))}function fo(n){const e=n.match(/#([0-9a-f]{3,8})/i);if(e){const r=e[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],o=r[1],s=r[2],l=r[3],a=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${o}${o}${s}${s}${a}`}else if(r.length===3){const i=r[0],o=r[1],s=r[2];return`#${i}${i}${o}${o}${s}${s}80`}}}const t=n.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return t?`var(${t[1]}-dim)`:n}function dt(n,e,t={}){const{theme:r=n.getLoadedThemes()[0]}=t,i=n.resolveLangAlias(t.lang||"text");if(ct(i)||ut(r))return Pe(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:s}=n.setTheme(r);if(i==="ansi")return po(o,e,t);const l=n.getLanguage(t.lang||"text");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(o.name))throw new T(`Grammar state themes "${t.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return _o(e,l,o,s,t)}function go(...n){if(n.length===2)return he(n[1]);const[e,t,r={}]=n,{lang:i="text",theme:o=e.getLoadedThemes()[0]}=r;if(ct(i)||ut(o))throw new T("Plain language does not have grammar state");if(i==="ansi")throw new T("ANSI language does not have grammar state");const{theme:s,colorMap:l}=e.setTheme(o),a=e.getLanguage(i);return new te(mt(t,a,s,l,r).stateStack,a.name,s.name)}function _o(n,e,t,r,i){const o=mt(n,e,t,r,i),s=new te(o.stateStack,e.name,t.name);return Ie(o.tokens,s),o.tokens}function mt(n,e,t,r,i){const o=ke(t,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:l=500}=i,a=Pe(n);let c=i.grammarState?no(i.grammarState,t.name)??Ze:i.grammarContextCode!=null?mt(i.grammarContextCode,e,t,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ze,u=[];const h=[];for(let m=0,d=a.length;m<d;m++){const[p,b]=a[m];if(p===""){u=[],h.push([]);continue}if(s>0&&p.length>=s){u=[],h.push([{content:p,offset:b,color:"",fontStyle:0}]);continue}let S,g,v;i.includeExplanation&&(S=e.tokenizeLine(p,c,l),g=S.tokens,v=0);const _=e.tokenizeLine2(p,c,l),C=_.tokens.length/2;for(let w=0;w<C;w++){const I=_.tokens[2*w],$=w+1<C?_.tokens[2*w+2]:p.length;if(I===$)continue;const ne=_.tokens[2*w+1],In=H(r[Z.getForeground(ne)],o),xn=Z.getFontStyle(ne),Oe={content:p.substring(I,$),offset:b+I,color:In,fontStyle:xn};if(i.includeExplanation){const gt=[];if(i.includeExplanation!=="scopeName")for(const j of t.settings){let K;switch(typeof j.scope){case"string":K=j.scope.split(/,/).map(De=>De.trim());break;case"object":K=j.scope;break;default:continue}gt.push({settings:j,selectors:K.map(De=>De.split(/ /))})}Oe.explanation=[];let _t=0;for(;I+_t<$;){const j=g[v],K=p.substring(j.startIndex,j.endIndex);_t+=K.length,Oe.explanation.push({content:K,scopes:i.includeExplanation==="scopeName"?yo(j.scopes):vo(gt,j.scopes)}),v+=1}}u.push(Oe)}h.push(u),u=[],c=_.ruleStack}return{tokens:h,stateStack:c}}function yo(n){return n.map(e=>({scopeName:e}))}function vo(n,e){const t=[];for(let r=0,i=e.length;r<i;r++){const o=e[r];t[r]={scopeName:o,themeMatches:So(n,o,e.slice(0,r))}}return t}function Mt(n,e){return n===e||e.substring(0,n.length)===n&&e[n.length]==="."}function bo(n,e,t){if(!Mt(n[n.length-1],e))return!1;let r=n.length-2,i=t.length-1;for(;r>=0&&i>=0;)Mt(n[r],t[i])&&(r-=1),i-=1;return r===-1}function So(n,e,t){const r=[];for(const{selectors:i,settings:o}of n)for(const s of i)if(bo(s,e,t)){r.push(o);break}return r}function kn(n,e,t){const r=Object.entries(t.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),i=r.map(a=>{const c=dt(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}}),o=Co(...i.map(a=>a.tokens)),s=o[0].map((a,c)=>a.map((u,h)=>{const m={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in t&&t.includeExplanation&&(m.explanation=u.explanation),o.forEach((d,p)=>{const{content:b,explanation:S,offset:g,...v}=d[c][h];m.variants[r[p].color]=v}),m})),l=i[0].state?new te(Object.fromEntries(i.map(a=>[a.theme,a.state?.getInternalStack(a.theme)])),i[0].state.lang):void 0;return l&&Ie(s,l),s}function Co(...n){const e=n.map(()=>[]),t=n.length;for(let r=0;r<n[0].length;r++){const i=n.map(a=>a[r]),o=e.map(()=>[]);e.forEach((a,c)=>a.push(o[c]));const s=i.map(()=>0),l=i.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?(o[c].push(u),s[c]+=1,l[c]=i[c][s[c]]):(o[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return e}function Re(n,e,t){let r,i,o,s,l,a;if("themes"in t){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=t,m=Object.entries(t.themes).filter(g=>g[1]).map(g=>({color:g[0],theme:g[1]})).sort((g,v)=>g.color===c?-1:v.color===c?1:0);if(m.length===0)throw new T("`themes` option must not be empty");const d=kn(n,e,t);if(a=he(d),c&&ht!==c&&!m.find(g=>g.color===c))throw new T(`\`themes\` option must contain the defaultColor key \`${c}\``);const p=m.map(g=>n.getTheme(g.theme)),b=m.map(g=>g.color);o=d.map(g=>g.map(v=>eo(v,b,u,c,h))),a&&Ie(o,a);const S=m.map(g=>ke(g.theme,t));i=Bt(m,p,S,u,c,"fg",h),r=Bt(m,p,S,u,c,"bg",h),s=`shiki-themes ${p.map(g=>g.name).join(" ")}`,l=c?void 0:[i,r].join(";")}else if("theme"in t){const c=ke(t.theme,t);o=dt(n,e,t);const u=n.getTheme(t.theme);r=H(u.bg,c),i=H(u.fg,c),s=u.name,a=he(o)}else throw new T("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:s,rootStyle:l,grammarState:a}}function Bt(n,e,t,r,i,o,s){return n.map((l,a)=>{const c=H(e[a][o],t[a])||"inherit",u=`${r+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&i){if(i===ht&&n.length>1){const h=n.findIndex(b=>b.color==="light"),m=n.findIndex(b=>b.color==="dark");if(h===-1||m===-1)throw new T('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const d=H(e[h][o],t[h])||"inherit",p=H(e[m][o],t[m])||"inherit";return`light-dark(${d}, ${p});${u}`}return c}return s==="css-vars"?u:null}).filter(l=>!!l).join(";")}function Ae(n,e,t,r={meta:{},options:t,codeToHast:(i,o)=>Ae(n,i,o),codeToTokens:(i,o)=>Re(n,i,o)}){let i=e;for(const p of Te(t))i=p.preprocess?.call(r,i,t)||i;let{tokens:o,fg:s,bg:l,themeName:a,rootStyle:c,grammarState:u}=Re(n,i,t);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:m=!1}=t;h===!0?o=wo(o):h==="never"&&(o=ko(o)),m&&(o=Lo(o));const d={...r,get source(){return i}};for(const p of Te(t))o=p.tokens?.call(d,o)||o;return Eo(o,{...t,fg:s,bg:l,themeName:a,rootStyle:t.rootStyle===!1?!1:t.rootStyle??c},d,u)}function Eo(n,e,t,r=he(n)){const i=Te(e),o=[],s={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[b,S]of Object.entries(e.meta||{}))b.startsWith("_")||(c[b]=S);let u={type:"element",tagName:"pre",properties:c,children:[],data:e.data},h={type:"element",tagName:"code",properties:{},children:o};const m=[],d={...t,structure:l,addClassToHast:Cn,get source(){return t.source},get tokens(){return n},get options(){return e},get root(){return s},get pre(){return u},get code(){return h},get lines(){return m}};if(n.forEach((b,S)=>{S&&(l==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
13
+ `}));let g={type:"element",tagName:"span",properties:{class:"line"},children:[]},v=0;for(const _ of b){let C={type:"element",tagName:"span",properties:{..._.htmlAttrs},children:[{type:"text",value:_.content}]};const w=it(_.htmlStyle||Le(_));w&&(C.properties.style=w);for(const I of i)C=I?.span?.call(d,C,S+1,v,g,_)||C;l==="inline"?s.children.push(C):l==="classic"&&g.children.push(C),v+=_.content.length}if(l==="classic"){for(const _ of i)g=_?.line?.call(d,g,S+1)||g;m.push(g),o.push(g)}else l==="inline"&&m.push(g)}),l==="classic"){for(const b of i)h=b?.code?.call(d,h)||h;u.children.push(h);for(const b of i)u=b?.pre?.call(d,u)||u;s.children.push(u)}else if(l==="inline"){const b=[];let S={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const _ of s.children)_.type==="element"&&_.tagName==="br"?(b.push(S),S={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(_.type==="element"||_.type==="text")&&S.children.push(_);b.push(S);let v={type:"element",tagName:"code",properties:{},children:b};for(const _ of i)v=_?.code?.call(d,v)||v;s.children=[];for(let _=0;_<v.children.length;_++){_>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});const C=v.children[_];C.type==="element"&&s.children.push(...C.children)}}let p=s;for(const b of i)p=b?.root?.call(d,p)||p;return r&&Ie(p,r),p}function wo(n){return n.map(e=>{const t=[];let r="",i;return e.forEach((o,s)=>{const a=!(o.fontStyle&&(o.fontStyle&N.Underline||o.fontStyle&N.Strikethrough));a&&o.content.match(/^\s+$/)&&e[s+1]?(i===void 0&&(i=o.offset),r+=o.content):r?(a?t.push({...o,offset:i,content:r+o.content}):t.push({content:r,offset:i},o),i=void 0,r=""):t.push(o)}),t})}function ko(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[,i,o,s]=r;if(!i&&!s)return t;const l=[{...t,offset:t.offset+i.length,content:o}];return i&&l.unshift({content:i,offset:t.offset}),s&&l.push({content:s,offset:t.offset+i.length+o.length}),l}))}function Lo(n){return n.map(e=>{const t=[];for(const r of e){if(t.length===0){t.push({...r});continue}const i=t[t.length-1],o=it(i.htmlStyle||Le(i)),s=it(r.htmlStyle||Le(r)),l=i.fontStyle&&(i.fontStyle&N.Underline||i.fontStyle&N.Strikethrough),a=r.fontStyle&&(r.fontStyle&N.Underline||r.fontStyle&N.Strikethrough);!l&&!a&&o===s?i.content+=r.content:t.push({...r})}return t})}const To=Wi;function Ro(n,e,t){const r={meta:{},options:t,codeToHast:(o,s)=>Ae(n,o,s),codeToTokens:(o,s)=>Re(n,o,s)};let i=To(Ae(n,e,t,r));for(const o of Te(t))i=o.postprocess?.call(r,i,t)||i;return i}const $t={light:"#333333",dark:"#bbbbbb"},Gt={light:"#fffffe",dark:"#1e1e1e"},Vt="__shiki_resolved";function pt(n){if(n?.[Vt])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"?$t.light:$t.dark),t||(t=e.type==="light"?Gt.light:Gt.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 i=0;const o=new Map;function s(l){if(o.has(l))return o.get(l);i+=1;const a=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?s(l):(o.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,Vt,{enumerable:!1,writable:!1,value:!0}),e}async function Ln(n){return Array.from(new Set((await Promise.all(n.filter(e=>!bn(e)).map(async e=>await vn(e).then(t=>Array.isArray(t)?t:[t])))).flat()))}async function Tn(n){return(await Promise.all(n.map(async t=>Sn(t)?null:pt(await vn(t))))).filter(t=>!!t)}let Ao=3;function Po(n,e=3){e>Ao||console.trace(`[SHIKI DEPRECATE]: ${n}`)}let Y=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Rn(n,e){if(!e)return n;if(e[n]){const t=new Set([n]);for(;e[n];){if(n=e[n],t.has(n))throw new Y(`Circular alias \`${Array.from(t).join(" -> ")} -> ${n}\``);t.add(n)}}return n}class Io extends Ir{constructor(e,t,r,i={}){super(e),this._resolver=e,this._themes=t,this._langs=r,this._alias=i,this._themes.map(o=>this.loadTheme(o)),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=pt(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=be.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Rn(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(o=>o.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const i=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(i.name=e.name,this._resolvedGrammars.set(e.name,i),e.aliases&&e.aliases.forEach(o=>{this._alias[o]=e.name}),this._loadedLanguagesCache=null,t.size)for(const o of t)this._resolvedGrammars.delete(o.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(o.scopeName),this._syncRegistry?._grammars?.delete(o.scopeName),this.loadLanguage(this._langMap.get(o.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const i of e)this.resolveEmbeddedLanguages(i);const t=Array.from(this._langGraph.entries()),r=t.filter(([i,o])=>!o);if(r.length){const i=t.filter(([o,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(a=>r.map(([c])=>c).includes(a)):!1).filter(o=>!r.includes(o));throw new Y(`Missing languages ${r.map(([o])=>`\`${o}\``).join(", ")}, required by ${i.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[i,o]of t)this._resolver.addLanguage(o);for(const[i,o]of t)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const r of t)this._langGraph.set(r,this._langMap.get(r))}}class xo{_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 i=1;i<=t.length;i++){const o=t.slice(0,i).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let oe=0;function No(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 Y("`engine` option is required for synchronous mode");const t=(n.langs||[]).flat(1),r=(n.themes||[]).flat(1).map(pt),i=new xo(n.engine,t),o=new Io(i,r,t,n.langAlias);let s;function l(_){return Rn(_,n.langAlias)}function a(_){g();const C=o.getGrammar(typeof _=="string"?_:_.name);if(!C)throw new Y(`Language \`${_}\` not found, you may need to load it first`);return C}function c(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};g();const C=o.getTheme(_);if(!C)throw new Y(`Theme \`${_}\` not found, you may need to load it first`);return C}function u(_){g();const C=c(_);s!==_&&(o.setTheme(C),s=_);const w=o.getColorMap();return{theme:C,colorMap:w}}function h(){return g(),o.getLoadedThemes()}function m(){return g(),o.getLoadedLanguages()}function d(..._){g(),o.loadLanguages(_.flat(1))}async function p(..._){return d(await Ln(_))}function b(..._){g();for(const C of _.flat(1))o.loadTheme(C)}async function S(..._){return g(),b(await Tn(_))}function g(){if(e)throw new Y("Shiki instance has been disposed")}function v(){e||(e=!0,o.dispose(),oe-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:h,getLoadedLanguages:m,resolveLangAlias:l,loadLanguage:p,loadLanguageSync:d,loadTheme:S,loadThemeSync:b,dispose:v,[Symbol.dispose]:v}}async function Oo(n){n.engine||Po("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,t,r]=await Promise.all([Tn(n.themes||[]),Ln(n.langs||[]),n.engine]);return No({...n,themes:e,langs:t,engine:r})}async function Do(n){const e=await Oo(n);return{getLastGrammarState:(...t)=>go(e,...t),codeToTokensBase:(t,r)=>dt(e,t,r),codeToTokensWithThemes:(t,r)=>kn(e,t,r),codeToTokens:(t,r)=>Re(e,t,r),codeToHast:(t,r)=>Ae(e,t,r),codeToHtml:(t,r)=>Ro(e,t,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Mo(n){const e=n.langs,t=n.themes,r=n.engine;async function i(o){function s(h){if(typeof h=="string"){if(h=o.langAlias?.[h]||h,bn(h))return[];const m=e[h];if(!m)throw new T(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return m}return h}function l(h){if(Sn(h))return"none";if(typeof h=="string"){const m=t[h];if(!m)throw new T(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return m}return h}const a=(o.themes??[]).map(h=>l(h)),c=(o.langs??[]).map(h=>s(h)),u=await Do({engine:o.engine??r(),...o,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 i}function Bo(n){let e;async function t(r={}){if(e){const i=await e;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else{e=n({...r,themes:[],langs:[]});const i=await e;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}}return t}function $o(n,e){const t=Bo(n);async function r(i,o){const s=await t({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),l=await e?.guessEmbeddedLanguages?.(i,o.lang,s);return l&&await s.loadLanguage(...l),s}return{getSingletonHighlighter(i){return t(i)},async codeToHtml(i,o){return(await r(i,o)).codeToHtml(i,o)},async codeToHast(i,o){return(await r(i,o)).codeToHast(i,o)},async codeToTokens(i,o){return(await r(i,o)).codeToTokens(i,o)},async codeToTokensBase(i,o){return(await r(i,o)).codeToTokensBase(i,o)},async codeToTokensWithThemes(i,o){return(await r(i,o)).codeToTokensWithThemes(i,o)},async getLastGrammarState(i,o){return(await t({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(i,o)}}}const Go=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>f(()=>import("./C4gqWexZ.js"),[],import.meta.url))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>f(()=>import("./D-2ljcwZ.js"),[],import.meta.url))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>f(()=>import("./CMjwMIkn.js"),[],import.meta.url))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>f(()=>import("./C47S-Tmv.js"),[],import.meta.url))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>f(()=>import("./CjoLj4QM.js"),[],import.meta.url))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>f(()=>import("./DFWUc33u.js"),[],import.meta.url))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>f(()=>import("./C9dUb6Cb.js"),[],import.meta.url))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>f(()=>import("./DQyhUUbL.js"),[],import.meta.url))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>f(()=>import("./D87Tk5Gz.js"),[],import.meta.url))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>f(()=>import("./C3mMm8J8.js"),[],import.meta.url))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>f(()=>import("./BzJJZx-M.js"),[],import.meta.url))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>f(()=>import("./BXkSAIEj.js"),[],import.meta.url))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>f(()=>import("./BgDCqdQA.js"),[],import.meta.url))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>f(()=>import("./C8M2exoo.js"),[],import.meta.url))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>f(()=>import("./DHJKELXO.js"),[],import.meta.url))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>f(()=>import("./Cuk6v7N8.js"),[],import.meta.url))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>f(()=>import("./DH5Ifo-i.js"),[],import.meta.url))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>f(()=>import("./E3gJ1_iC.js"),[],import.meta.url))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>f(()=>import("./DAi9KRSo.js"),[],import.meta.url))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>f(()=>import("./D7oLnXFd.js"),[],import.meta.url))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>f(()=>import("./BfjtVDDH.js"),[],import.meta.url))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>f(()=>import("./CFHQjOhq.js"),[],import.meta.url))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>f(()=>import("./GsRaNv29.js"),[],import.meta.url))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>f(()=>import("./CVdnzihN.js"),[],import.meta.url))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>f(()=>import("./CH1njM8p.js"),[],import.meta.url))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>f(()=>import("./DRw_LuNl.js"),[],import.meta.url))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>f(()=>import("./hJgmCMqR.js"),[],import.meta.url))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>f(()=>import("./BUw7H-hv.js"),[],import.meta.url))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>f(()=>import("./DnULxvSX.js"),[],import.meta.url))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>f(()=>import("./CkXjmgJE.js"),[],import.meta.url))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>f(()=>import("./CfQXZHmo.js"),[],import.meta.url))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>f(()=>import("./DWedfzmr.js"),[],import.meta.url))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>f(()=>import("./DUszq2jm.js"),[],import.meta.url))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>f(()=>import("./B7mTdjB0.js"),[],import.meta.url))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>f(()=>import("./D5KoaKCx.js"),[],import.meta.url))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>f(()=>import("./BfHTSMKl.js"),[],import.meta.url))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>f(()=>import("./B0m2ddpp.js"),[],import.meta.url))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>f(()=>import("./CyktbL80.js"),[],import.meta.url))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>f(()=>import("./Csfq5Kiy.js"),[],import.meta.url))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>f(()=>import("./CafNBF8u.js"),[],import.meta.url))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>f(()=>import("./CTRr51gU.js"),[],import.meta.url))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>f(()=>import("./D4h5O-jR.js"),[],import.meta.url))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>f(()=>import("./C39BiMTA.js"),[],import.meta.url))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>f(()=>import("./CMTm3GFP.js"),[],import.meta.url))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>f(()=>import("./Ddv68eIx.js"),[],import.meta.url))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>f(()=>import("./DVMEJ2y_.js"),[],import.meta.url))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>f(()=>import("./C3Wv6jpd.js"),[],import.meta.url))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>f(()=>import("./3e1v2bzS.js"),[],import.meta.url))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>f(()=>import("./CS3Unz2-.js"),[],import.meta.url))},{id:"red",displayName:"Red",type:"dark",import:(()=>f(()=>import("./bN70gL4F.js"),[],import.meta.url))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>f(()=>import("./qdsjHGoJ.js"),[],import.meta.url))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>f(()=>import("./DHQR4-dF.js"),[],import.meta.url))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>f(()=>import("./D4_iv3hh.js"),[],import.meta.url))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>f(()=>import("./BthQWCQV.js"),[],import.meta.url))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>f(()=>import("./DqwNpetd.js"),[],import.meta.url))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>f(()=>import("./Bw305WKR.js"),[],import.meta.url))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>f(()=>import("./DXbdFlpD.js"),[],import.meta.url))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>f(()=>import("./L9t79GZl.js"),[],import.meta.url))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>f(()=>import("./CbfX1IO0.js"),[],import.meta.url))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>f(()=>import("./hegEt444.js"),[],import.meta.url))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>f(()=>import("./DU1UobuO.js"),[],import.meta.url))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>f(()=>import("./Bkuqu6BP.js"),[],import.meta.url))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>f(()=>import("./D0r3Knsf.js"),[],import.meta.url))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>f(()=>import("./CVO1_9PV.js"),[],import.meta.url))}],Vo=Object.fromEntries(Go.map(n=>[n.id,n.import]));class ft extends Error{constructor(e){super(e),this.name="ShikiError"}}function jo(){return 2147483648}function Uo(){return typeof performance<"u"?performance.now():Date.now()}const Ho=(n,e)=>n+(e-n%e)%e;async function Fo(n){let e,t;const r={};function i(d){t=d,r.HEAPU8=new Uint8Array(d),r.HEAPU32=new Uint32Array(d)}function o(d,p,b){r.HEAPU8.copyWithin(d,p,p+b)}function s(d){try{return e.grow(d-t.byteLength+65535>>>16),i(e.buffer),1}catch{}}function l(d){const p=r.HEAPU8.length;d=d>>>0;const b=jo();if(d>b)return!1;for(let S=1;S<=4;S*=2){let g=p*(1+.2/S);g=Math.min(g,d+100663296);const v=Math.min(b,Ho(Math.max(d,g),65536));if(s(v))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(d,p,b=1024){const S=p+b;let g=p;for(;d[g]&&!(g>=S);)++g;if(g-p>16&&d.buffer&&a)return a.decode(d.subarray(p,g));let v="";for(;p<g;){let _=d[p++];if(!(_&128)){v+=String.fromCharCode(_);continue}const C=d[p++]&63;if((_&224)===192){v+=String.fromCharCode((_&31)<<6|C);continue}const w=d[p++]&63;if((_&240)===224?_=(_&15)<<12|C<<6|w:_=(_&7)<<18|C<<12|w<<6|d[p++]&63,_<65536)v+=String.fromCharCode(_);else{const I=_-65536;v+=String.fromCharCode(55296|I>>10,56320|I&1023)}}return v}function u(d,p){return d?c(r.HEAPU8,d,p):""}const h={emscripten_get_now:Uo,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function m(){const p=await n({env:h,wasi_snapshot_preview1:h});e=p.memory,i(e.buffer),Object.assign(r,p),r.UTF8ToString=u}return await m(),r}var Wo=Object.defineProperty,zo=(n,e,t)=>e in n?Wo(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,R=(n,e,t)=>zo(n,typeof e!="symbol"?e+"":e,t);let P=null;function qo(n){throw new ft(n.UTF8ToString(n.getLastOnigError()))}class xe{constructor(e){R(this,"utf16Length"),R(this,"utf8Length"),R(this,"utf16Value"),R(this,"utf8Value"),R(this,"utf16OffsetToUtf8"),R(this,"utf8OffsetToUtf16");const t=e.length,r=xe._utf8ByteLength(e),i=r!==t,o=i?new Uint32Array(t+1):null;i&&(o[t]=r);const s=i?new Uint32Array(r+1):null;i&&(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,m=!1;if(u>=55296&&u<=56319&&c+1<t){const d=e.charCodeAt(c+1);d>=56320&&d<=57343&&(h=(u-55296<<10)+65536|d-56320,m=!0)}i&&(o[c]=a,m&&(o[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),m&&c++}this.utf16Length=t,this.utf8Length=r,this.utf16Value=e,this.utf8Value=l,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let t=0;for(let r=0,i=e.length;r<i;r++){const o=e.charCodeAt(r);let s=o,l=!1;if(o>=55296&&o<=56319&&r+1<i){const a=e.charCodeAt(r+1);a>=56320&&a<=57343&&(s=(o-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 Ne=class V{constructor(e){if(R(this,"id",++V.LAST_ID),R(this,"_onigBinding"),R(this,"content"),R(this,"utf16Length"),R(this,"utf8Length"),R(this,"utf16OffsetToUtf8"),R(this,"utf8OffsetToUtf16"),R(this,"ptr"),!P)throw new ft("Must invoke loadWasm first.");this._onigBinding=P,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&&!V._sharedPtrInUse?(V._sharedPtr||(V._sharedPtr=P.omalloc(1e4)),V._sharedPtrInUse=!0,P.HEAPU8.set(t.utf8Value,V._sharedPtr),this.ptr=V._sharedPtr):this.ptr=t.createString(P)}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===V._sharedPtr?V._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};R(Ne,"LAST_ID",0);R(Ne,"_sharedPtr",0);R(Ne,"_sharedPtrInUse",!1);let An=Ne;class Ko{constructor(e){if(R(this,"_onigBinding"),R(this,"_ptr"),!P)throw new ft("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(P),r[l]=c.utf8Length}const i=P.omalloc(4*e.length);P.HEAPU32.set(t,i/4);const o=P.omalloc(4*e.length);P.HEAPU32.set(r,o/4);const s=P.createOnigScanner(i,o,e.length);for(let l=0,a=e.length;l<a;l++)P.ofree(t[l]);P.ofree(o),P.ofree(i),s===0&&qo(P),this._onigBinding=P,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,r){let i=0;if(typeof r=="number"&&(i=r),typeof e=="string"){e=new An(e);const o=this._findNextMatchSync(e,t,!1,i);return e.dispose(),o}return this._findNextMatchSync(e,t,!1,i)}_findNextMatchSync(e,t,r,i){const o=this._onigBinding,s=o.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),i);if(s===0)return null;const l=o.HEAPU32;let a=s/4;const c=l[a++],u=l[a++],h=[];for(let m=0;m<u;m++){const d=e.convertUtf8OffsetToUtf16(l[a++]),p=e.convertUtf8OffsetToUtf16(l[a++]);h[m]={start:d,end:p,length:p-d}}return{index:c,captureIndices:h}}}function Jo(n){return typeof n.instantiator=="function"}function Yo(n){return typeof n.default=="function"}function Xo(n){return typeof n.data<"u"}function Qo(n){return typeof Response<"u"&&n instanceof Response}function Zo(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 _e;function es(n){if(_e)return _e;async function e(){P=await Fo(async t=>{let r=n;return r=await r,typeof r=="function"&&(r=await r(t)),typeof r=="function"&&(r=await r(t)),Jo(r)?r=await r.instantiator(t):Yo(r)?r=await r.default(t):(Xo(r)&&(r=r.data),Qo(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await ts(r)(t):r=await ns(r)(t):Zo(r)?r=await Fe(r)(t):r instanceof WebAssembly.Module?r=await Fe(r)(t):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Fe(r.default)(t))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return _e=e(),_e}function Fe(n){return e=>WebAssembly.instantiate(n,e)}function ts(n){return e=>WebAssembly.instantiateStreaming(n,e)}function ns(n){return async e=>{const t=await n.arrayBuffer();return WebAssembly.instantiate(t,e)}}async function rs(n){return n&&await es(n),{createScanner(e){return new Ko(e.map(t=>typeof t=="string"?t:t.source))},createString(e){return new An(e)}}}const Pn=[{id:"angular-html",name:"Angular HTML",import:(()=>f(()=>import("./DxNHbxmM.js").then(n=>n.f),__vite__mapDeps([0,1,2,3]),import.meta.url))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>f(()=>import("./Cl0AqbOI.js"),__vite__mapDeps([4,0,1,2,3,5]),import.meta.url))},{id:"astro",name:"Astro",import:(()=>f(()=>import("./DxSwrfjg.js"),__vite__mapDeps([6,7,2,8,3,9,10]),import.meta.url))},{id:"blade",name:"Blade",import:(()=>f(()=>import("./5X7smno1.js"),__vite__mapDeps([11,12,1,2,3,13,14,15,7]),import.meta.url))},{id:"c",name:"C",import:(()=>f(()=>import("./BIGW1oBm.js"),[],import.meta.url))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>f(()=>import("./CxbxFI8M.js"),__vite__mapDeps([16,2]),import.meta.url))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>f(()=>import("./Bp3cYrEr.js"),__vite__mapDeps([17,18,19,20,15]),import.meta.url))},{id:"css",name:"CSS",import:(()=>f(()=>import("./DPfMkruS.js"),[],import.meta.url))},{id:"csv",name:"CSV",import:(()=>f(()=>import("./fuZLfV_i.js"),[],import.meta.url))},{id:"glsl",name:"GLSL",import:(()=>f(()=>import("./DZxFcAj9.js"),__vite__mapDeps([19,20]),import.meta.url))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>f(()=>import("./C9oPPf7i.js"),__vite__mapDeps([21,2,8,22,10]),import.meta.url))},{id:"haml",name:"Ruby Haml",import:(()=>f(()=>import("./CmIQRyeF.js"),__vite__mapDeps([23,2,3]),import.meta.url))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>f(()=>import("./m17aaUwq.js"),__vite__mapDeps([24,1,2,3,25]),import.meta.url))},{id:"html",name:"HTML",import:(()=>f(()=>import("./CnnebwVN.js"),__vite__mapDeps([1,2,3]),import.meta.url))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>f(()=>import("./DGP4VlC8.js"),__vite__mapDeps([12,1,2,3]),import.meta.url))},{id:"http",name:"HTTP",import:(()=>f(()=>import("./CufHLc7y.js"),__vite__mapDeps([26,27,7,13,14,21,2,8,22,10]),import.meta.url))},{id:"hurl",name:"Hurl",import:(()=>f(()=>import("./CYsAdtH9.js"),__vite__mapDeps([28,21,2,8,22,10,13,14,29]),import.meta.url))},{id:"imba",name:"Imba",import:(()=>f(()=>import("./DGztddWO.js"),[],import.meta.url))},{id:"java",name:"Java",import:(()=>f(()=>import("./CylS5w8V.js"),[],import.meta.url))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>f(()=>import("./wDzz0qaB.js"),[],import.meta.url))},{id:"jinja",name:"Jinja",import:(()=>f(()=>import("./CXZktZb0.js"),__vite__mapDeps([30,1,2,3]),import.meta.url))},{id:"jison",name:"Jison",import:(()=>f(()=>import("./Br6cN0cg.js"),__vite__mapDeps([31,2]),import.meta.url))},{id:"json",name:"JSON",import:(()=>f(()=>import("./Cp-IABpG.js"),[],import.meta.url))},{id:"json5",name:"JSON5",import:(()=>f(()=>import("./C9tS-k6U.js"),[],import.meta.url))},{id:"jsonc",name:"JSON with Comments",import:(()=>f(()=>import("./Des-eS-w.js"),[],import.meta.url))},{id:"jsonl",name:"JSON Lines",import:(()=>f(()=>import("./DcaNXYhu.js"),[],import.meta.url))},{id:"jsx",name:"JSX",import:(()=>f(()=>import("./g9-lgVsj.js"),[],import.meta.url))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>f(()=>import("./W9tJ9s81.js"),__vite__mapDeps([32,17,18,19,20,15,33,2,34]),import.meta.url))},{id:"less",name:"Less",import:(()=>f(()=>import("./B1dDrJ26.js"),[],import.meta.url))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>f(()=>import("./Cvjx9yec.js"),[],import.meta.url))},{id:"marko",name:"Marko",import:(()=>f(()=>import("./83L43bj1.js"),__vite__mapDeps([35,3,36,5,8]),import.meta.url))},{id:"mdc",name:"MDC",import:(()=>f(()=>import("./TsXTqZ29.js"),__vite__mapDeps([37,38,25,12,1,2,3]),import.meta.url))},{id:"mdx",name:"MDX",import:(()=>f(()=>import("./Cmh6b_Ma.js"),[],import.meta.url))},{id:"php",name:"PHP",import:(()=>f(()=>import("./DJjDtW9f.js"),__vite__mapDeps([39,1,2,3,13,14,15,7]),import.meta.url))},{id:"postcss",name:"PostCSS",import:(()=>f(()=>import("./CXtECtnM.js"),[],import.meta.url))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>f(()=>import("./BLmx8bSh.js"),__vite__mapDeps([40,2,3,1]),import.meta.url))},{id:"python",name:"Python",aliases:["py"],import:(()=>f(()=>import("./B6aJPvgy.js"),[],import.meta.url))},{id:"r",name:"R",import:(()=>f(()=>import("./Dspwwk_N.js"),[],import.meta.url))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>f(()=>import("./CDVJQ6XC.js"),[],import.meta.url))},{id:"sass",name:"Sass",import:(()=>f(()=>import("./Cj5Yp3dK.js"),[],import.meta.url))},{id:"scss",name:"SCSS",import:(()=>f(()=>import("./2EtD6e53.js"),__vite__mapDeps([5,3]),import.meta.url))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>f(()=>import("./Yzrsuije.js"),[],import.meta.url))},{id:"sql",name:"SQL",import:(()=>f(()=>import("./BLtJtn59.js"),[],import.meta.url))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>f(()=>import("./BEDo0Tqx.js"),[],import.meta.url))},{id:"svelte",name:"Svelte",import:(()=>f(()=>import("./DYoxhk2S.js"),__vite__mapDeps([41,2,8,3,9]),import.meta.url))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>f(()=>import("./Cm3UrAx6.js"),__vite__mapDeps([42,8,3,2,19,20,1,15,13,14]),import.meta.url))},{id:"tsx",name:"TSX",import:(()=>f(()=>import("./COt5Ahok.js"),[],import.meta.url))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>f(()=>import("./BPQ3VLAy.js"),[],import.meta.url))},{id:"vue",name:"Vue",import:(()=>f(()=>import("./DEthMvLe.js"),__vite__mapDeps([43,3,2,8,7,1,12]),import.meta.url))},{id:"vue-html",name:"Vue HTML",import:(()=>f(()=>import("./DqQDbK_p.js"),__vite__mapDeps([44,2]),import.meta.url))},{id:"vue-vine",name:"Vue Vine",import:(()=>f(()=>import("./CW8IKDeL.js"),__vite__mapDeps([45,3,5,36,46,9,2]),import.meta.url))},{id:"wasm",name:"WebAssembly",import:(()=>f(()=>import("./MzD3tlZU.js"),[],import.meta.url))},{id:"wgsl",name:"WGSL",import:(()=>f(()=>import("./Dx-B1_4e.js"),[],import.meta.url))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>f(()=>import("./5i3qLPDT.js"),[],import.meta.url))},{id:"xml",name:"XML",import:(()=>f(()=>import("./BGJmEYvX.js"),__vite__mapDeps([13,14]),import.meta.url))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>f(()=>import("./Buea-lGh.js"),[],import.meta.url))}],is=Object.fromEntries(Pn.map(n=>[n.id,n.import])),os=Object.fromEntries(Pn.flatMap(n=>n.aliases?.map(e=>[e,n.import])||[])),ss={...is,...os},as=Mo({langs:ss,themes:Vo,engine:()=>rs(f(()=>import("./CG6Dc4jp.js"),[],import.meta.url))}),{codeToHtml:ls}=$o(as,{guessEmbeddedLanguages:Yi});class cs{diff(e,t,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const o=this.castInput(e,r),s=this.castInput(t,r),l=this.removeEmpty(this.tokenize(o,r)),a=this.removeEmpty(this.tokenize(s,r));return this.diffWithOptionsObj(l,a,r,i)}diffWithOptionsObj(e,t,r,i){var o;const s=v=>{if(v=this.postProcess(v,r),i){setTimeout(function(){i(v)},0);return}else return v},l=t.length,a=e.length;let c=1,u=l+a;r.maxEditLength!=null&&(u=Math.min(u,r.maxEditLength));const h=(o=r.timeout)!==null&&o!==void 0?o:1/0,m=Date.now()+h,d=[{oldPos:-1,lastComponent:void 0}];let p=this.extractCommon(d[0],t,e,0,r);if(d[0].oldPos+1>=a&&p+1>=l)return s(this.buildValues(d[0].lastComponent,t,e));let b=-1/0,S=1/0;const g=()=>{for(let v=Math.max(b,-c);v<=Math.min(S,c);v+=2){let _;const C=d[v-1],w=d[v+1];C&&(d[v-1]=void 0);let I=!1;if(w){const ne=w.oldPos-v;I=w&&0<=ne&&ne<l}const $=C&&C.oldPos+1<a;if(!I&&!$){d[v]=void 0;continue}if(!$||I&&C.oldPos<w.oldPos?_=this.addToPath(w,!0,!1,0,r):_=this.addToPath(C,!1,!0,1,r),p=this.extractCommon(_,t,e,v,r),_.oldPos+1>=a&&p+1>=l)return s(this.buildValues(_.lastComponent,t,e))||!0;d[v]=_,_.oldPos+1>=a&&(S=Math.min(S,v-1)),p+1>=l&&(b=Math.max(b,v+1))}c++};if(i)(function v(){setTimeout(function(){if(c>u||Date.now()>m)return i(void 0);g()||v()},0)})();else for(;c<=u&&Date.now()<=m;){const v=g();if(v)return v}}addToPath(e,t,r,i,o){const s=e.lastComponent;return s&&!o.oneChangePerToken&&s.added===t&&s.removed===r?{oldPos:e.oldPos+i,lastComponent:{count:s.count+1,added:t,removed:r,previousComponent:s.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:t,removed:r,previousComponent:s}}}extractCommon(e,t,r,i,o){const s=t.length,l=r.length;let a=e.oldPos,c=a-i,u=0;for(;c+1<s&&a+1<l&&this.equals(r[a+1],t[c+1],o);)c++,a++,u++,o.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return u&&!o.oneChangePerToken&&(e.lastComponent={count:u,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=a,c}equals(e,t,r){return r.comparator?r.comparator(e,t):e===t||!!r.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){const t=[];for(let r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,r){const i=[];let o;for(;e;)i.push(e),o=e.previousComponent,delete e.previousComponent,e=o;i.reverse();const s=i.length;let l=0,a=0,c=0;for(;l<s;l++){const u=i[l];if(u.removed)u.value=this.join(r.slice(c,c+u.count)),c+=u.count;else{if(!u.added&&this.useLongestToken){let h=t.slice(a,a+u.count);h=h.map(function(m,d){const p=r[c+d];return p.length>m.length?p:m}),u.value=this.join(h)}else u.value=this.join(t.slice(a,a+u.count));a+=u.count,u.added||(c+=u.count)}}return i}}class us extends cs{constructor(){super(...arguments),this.tokenize=ms}equals(e,t,r){return r.ignoreWhitespace?((!r.newlineIsToken||!e.includes(`
14
14
  `))&&(e=e.trim()),(!r.newlineIsToken||!t.includes(`
15
15
  `))&&(t=t.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(e.endsWith(`
16
16
  `)&&(e=e.slice(0,-1)),t.endsWith(`
17
17
  `)&&(t=t.slice(0,-1))),super.equals(e,t,r)}}const hs=new us;function ds(n,e,t){return hs.diff(n,e,t)}function ms(n,e){e.stripTrailingCr&&(n=n.replace(/\r\n/g,`
18
- `));const t=[],r=n.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let o=0;o<r.length;o++){const i=r[o];o%2&&!e.newlineIsToken?t[t.length-1]+=i:t.push(i)}return t}const ps=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function fs(n,e,t){const r=[];for(const o of n){if(t==="v3"){const l=o.children.flatMap((a,c)=>{if(a.type!=="element")return a;const u=a.children[0];if(u.type!=="text")return a;const h=c===o.children.length-1;if(!We(u.value,h))return a;const d=u.value.split(/(\s+\/\/)/);if(d.length<=1)return a;let p=[d[0]];for(let b=1;b<d.length;b+=2)p.push(d[b]+(d[b+1]||""));return p=p.filter(Boolean),p.length<=1?a:p.map(b=>({...a,children:[{type:"text",value:b}]}))});l.length!==o.children.length&&(o.children=l)}const i=o.children;let s=i.length-1;t==="v1"?s=0:e&&(s=i.length-2);for(let l=Math.max(s,0);l<i.length;l++){const a=i[l];if(a.type!=="element")continue;const c=a.children.at(0);if(c?.type!=="text")continue;const u=l===i.length-1;let h=We(c.value,u),m;if(!h&&l>0&&c.value.trim().startsWith("[!code")){const d=i[l-1];if(d?.type==="element"){const p=d.children.at(0);if(p?.type==="text"&&p.value.includes("//")){const b=p.value+c.value,S=We(b,u);if(S){h=S,r.push({info:S,line:o,token:d,isLineCommentOnly:i.length===2&&d.children.length===1&&a.children.length===1,isJsxStyle:!1,additionalTokens:[a]});continue}}}}if(h)if(e&&!u&&l!==0){const d=jt(i[l-1],"{")&&jt(i[l+1],"}");r.push({info:h,line:o,token:a,isLineCommentOnly:i.length===3&&a.children.length===1,isJsxStyle:d,additionalTokens:m})}else r.push({info:h,line:o,token:a,isLineCommentOnly:i.length===1&&a.children.length===1,isJsxStyle:!1,additionalTokens:m})}}return r}function jt(n,e){if(n.type!=="element")return!1;const t=n.children[0];return t.type!=="text"?!1:t.value.trim()===e}function We(n,e){let t=n.trimStart();const r=n.length-t.length;t=t.trimEnd();const o=n.length-t.length-r;for(const[i,s]of ps){if(s&&!e)continue;const l=i.exec(t);if(l)return[" ".repeat(r)+l[1],l[2],l[3]?l[3]+" ".repeat(o):void 0]}}function gs(n){const e=n.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return e&&e[1].trim().length===0?n.slice(0,e.index):n}function _s(n,e,t,r){return r==null&&(r="v3"),{name:n,code(o){const i=o.children.filter(c=>c.type==="element"),s=[];o.data??={};const l=o.data;l._shiki_notation??=fs(i,["jsx","tsx"].includes(this.options.lang),r);const a=l._shiki_notation;for(const c of a){if(c.info[1].length===0)continue;let u=i.indexOf(c.line);c.isLineCommentOnly&&r!=="v1"&&u++;let h=!1;if(c.info[1]=c.info[1].replace(e,(...d)=>t.call(this,d,c.line,c.token,i,u)?(h=!0,""):d[0]),!h)continue;r==="v1"&&(c.info[1]=gs(c.info[1]));const m=c.info[1].trim().length===0;if(m&&(c.info[1]=""),m&&c.isLineCommentOnly)s.push(c.line);else if(m&&c.isJsxStyle)c.line.children.splice(c.line.children.indexOf(c.token)-1,3);else if(m){if(c.additionalTokens)for(let d=c.additionalTokens.length-1;d>=0;d--){const p=c.additionalTokens[d],b=c.line.children.indexOf(p);b!==-1&&c.line.children.splice(b,1)}c.line.children.splice(c.line.children.indexOf(c.token),1)}else{const d=c.token.children[0];if(d.type==="text"&&(d.value=c.info.join(""),c.additionalTokens))for(const p of c.additionalTokens){const b=p.children[0];b?.type==="text"&&(b.value="")}}}for(const c of s){const u=o.children.indexOf(c),h=o.children[u+1];let m=1;h?.type==="text"&&h?.value===`
19
- `&&(m=2),o.children.splice(u,m)}}}}function ys(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vs(n={},e="@shikijs/transformers:notation-map"){const{classMap:t={},classActivePre:r=void 0,classActiveCode:o=void 0}=n;return _s(e,new RegExp(`#?\\s*\\[!code (${Object.keys(t).map(ys).join("|")})(:\\d+)?\\]`,"gi"),function([i,s,l=":1"],a,c,u,h){const m=Number.parseInt(l.slice(1),10);for(let d=h;d<Math.min(h+m,u.length);d++)this.addClassToHast(u[d],t[s]);return r&&this.addClassToHast(this.pre,r),o&&this.addClassToHast(this.code,o),!0},n.matchAlgorithm)}function bs(n={}){const{classLineAdd:e="diff add",classLineRemove:t="diff remove",classActivePre:r="has-diff",classActiveCode:o}=n;return vs({classMap:{"++":e,"--":t},classActivePre:r,classActiveCode:o,matchAlgorithm:n.matchAlgorithm},"@shikijs/transformers:notation-diff")}const Ss=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr","path","circle","rect","line","polyline","polygon","ellipse"]),Cs=new RegExp("<([a-zA-Z][a-zA-Z0-9\\-_:.]*)[^>]*(?<!\\/)>","g"),Es=/<\/([a-zA-Z][a-zA-Z0-9\-_:.]*)\s*>/g,ws=/<([a-zA-Z][a-zA-Z0-9\-_:.]*)[^>]*\/>/g;function ks(n={}){const{classPrefix:e="shiki-fold",foldLevel:t=0}=n;return{name:"shiki-transformer-html-fold",tokens(r){const o=Ls(r),i=new Map(o.map(l=>[l.startLine,l])),s=new Map;if(t>0){for(const l of o)if(l.level===t){s.set(l.startLine,{hiddenCount:l.endLine-l.startLine});for(let a=l.startLine+1;a<=l.endLine;a++)s.set(a,{hiddenCount:-1})}}return this.meta.transformerHtmlFold={foldRegions:o,foldStartLines:i,foldedRanges:s,__lineIdCounter:0,foldLevel:t},r},pre(r){r.children.unshift({type:"element",tagName:"style",properties:{},children:[{type:"text",value:Ts(e)}]})},line(r,o){const{transformerHtmlFold:i}=this.meta,s=`${e}-${i.__lineIdCounter++}`;r.properties["data-fold-line"]=s;const l=i.foldedRanges.get(o);l&&l.hiddenCount===-1&&(r.properties.class=`${r.properties.class||""} ${e}-hidden`.trim());const a=i.foldStartLines.get(o);if(a){const c=`${e}-${a.endLine-1}`,u=i.foldLevel>0&&a.level===i.foldLevel;if(r.properties["data-fold-end-id"]=c,r.properties["data-fold-level"]=String(a.level),r.properties["data-folded"]=u?"true":"false",r.properties.class=`${r.properties.class||""} ${e}-foldable`.trim(),u&&l&&l.hiddenCount>0){const h=l.hiddenCount;r.children.push({type:"element",tagName:"span",properties:{class:`${e}-summary`},children:[{type:"text",value:`... ${h} line${h>1?"s":""} hidden`}]})}}return r}}}function Ls(n){const e=[],t=[];for(const[r,o]of n.entries()){const i=o.map(a=>a.content).join(""),s=r+1,l=new Set;for(const a of i.matchAll(ws))l.add(a.index);for(const a of i.matchAll(Cs)){const[c,u]=a;if(!u||l.has(a.index))continue;const h=u.toLowerCase();if(!Ss.has(h)){const m=t.length+1;t.push({tagName:h,line:s,level:m})}}for(const a of i.matchAll(Es)){const[c,u]=a;if(!u)continue;const h=u.toLowerCase();for(let m=t.length-1;m>=0;m--)if(t[m]?.tagName===h){const d=t[m].line,p=t[m].level;s>d&&e.push({startLine:d,endLine:s,level:p}),t.splice(m,1);break}}}return e}function Ts(n){return`
18
+ `));const t=[],r=n.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i<r.length;i++){const o=r[i];i%2&&!e.newlineIsToken?t[t.length-1]+=o:t.push(o)}return t}const ps=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function fs(n,e,t){const r=[];for(const i of n){if(t==="v3"){const l=i.children.flatMap((a,c)=>{if(a.type!=="element")return a;const u=a.children[0];if(u.type!=="text")return a;const h=c===i.children.length-1;if(!We(u.value,h))return a;const d=u.value.split(/(\s+\/\/)/);if(d.length<=1)return a;let p=[d[0]];for(let b=1;b<d.length;b+=2)p.push(d[b]+(d[b+1]||""));return p=p.filter(Boolean),p.length<=1?a:p.map(b=>({...a,children:[{type:"text",value:b}]}))});l.length!==i.children.length&&(i.children=l)}const o=i.children;let s=o.length-1;t==="v1"?s=0:e&&(s=o.length-2);for(let l=Math.max(s,0);l<o.length;l++){const a=o[l];if(a.type!=="element")continue;const c=a.children.at(0);if(c?.type!=="text")continue;const u=l===o.length-1;let h=We(c.value,u),m;if(!h&&l>0&&c.value.trim().startsWith("[!code")){const d=o[l-1];if(d?.type==="element"){const p=d.children.at(0);if(p?.type==="text"&&p.value.includes("//")){const b=p.value+c.value,S=We(b,u);if(S){h=S,r.push({info:S,line:i,token:d,isLineCommentOnly:o.length===2&&d.children.length===1&&a.children.length===1,isJsxStyle:!1,additionalTokens:[a]});continue}}}}if(h)if(e&&!u&&l!==0){const d=jt(o[l-1],"{")&&jt(o[l+1],"}");r.push({info:h,line:i,token:a,isLineCommentOnly:o.length===3&&a.children.length===1,isJsxStyle:d,additionalTokens:m})}else r.push({info:h,line:i,token:a,isLineCommentOnly:o.length===1&&a.children.length===1,isJsxStyle:!1,additionalTokens:m})}}return r}function jt(n,e){if(n.type!=="element")return!1;const t=n.children[0];return t.type!=="text"?!1:t.value.trim()===e}function We(n,e){let t=n.trimStart();const r=n.length-t.length;t=t.trimEnd();const i=n.length-t.length-r;for(const[o,s]of ps){if(s&&!e)continue;const l=o.exec(t);if(l)return[" ".repeat(r)+l[1],l[2],l[3]?l[3]+" ".repeat(i):void 0]}}function gs(n){const e=n.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return e&&e[1].trim().length===0?n.slice(0,e.index):n}function _s(n,e,t,r){return r==null&&(r="v3"),{name:n,code(i){const o=i.children.filter(c=>c.type==="element"),s=[];i.data??={};const l=i.data;l._shiki_notation??=fs(o,["jsx","tsx"].includes(this.options.lang),r);const a=l._shiki_notation;for(const c of a){if(c.info[1].length===0)continue;let u=o.indexOf(c.line);c.isLineCommentOnly&&r!=="v1"&&u++;let h=!1;if(c.info[1]=c.info[1].replace(e,(...d)=>t.call(this,d,c.line,c.token,o,u)?(h=!0,""):d[0]),!h)continue;r==="v1"&&(c.info[1]=gs(c.info[1]));const m=c.info[1].trim().length===0;if(m&&(c.info[1]=""),m&&c.isLineCommentOnly)s.push(c.line);else if(m&&c.isJsxStyle)c.line.children.splice(c.line.children.indexOf(c.token)-1,3);else if(m){if(c.additionalTokens)for(let d=c.additionalTokens.length-1;d>=0;d--){const p=c.additionalTokens[d],b=c.line.children.indexOf(p);b!==-1&&c.line.children.splice(b,1)}c.line.children.splice(c.line.children.indexOf(c.token),1)}else{const d=c.token.children[0];if(d.type==="text"&&(d.value=c.info.join(""),c.additionalTokens))for(const p of c.additionalTokens){const b=p.children[0];b?.type==="text"&&(b.value="")}}}for(const c of s){const u=i.children.indexOf(c),h=i.children[u+1];let m=1;h?.type==="text"&&h?.value===`
19
+ `&&(m=2),i.children.splice(u,m)}}}}function ys(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vs(n={},e="@shikijs/transformers:notation-map"){const{classMap:t={},classActivePre:r=void 0,classActiveCode:i=void 0}=n;return _s(e,new RegExp(`#?\\s*\\[!code (${Object.keys(t).map(ys).join("|")})(:\\d+)?\\]`,"gi"),function([o,s,l=":1"],a,c,u,h){const m=Number.parseInt(l.slice(1),10);for(let d=h;d<Math.min(h+m,u.length);d++)this.addClassToHast(u[d],t[s]);return r&&this.addClassToHast(this.pre,r),i&&this.addClassToHast(this.code,i),!0},n.matchAlgorithm)}function bs(n={}){const{classLineAdd:e="diff add",classLineRemove:t="diff remove",classActivePre:r="has-diff",classActiveCode:i}=n;return vs({classMap:{"++":e,"--":t},classActivePre:r,classActiveCode:i,matchAlgorithm:n.matchAlgorithm},"@shikijs/transformers:notation-diff")}const Ss=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr","path","circle","rect","line","polyline","polygon","ellipse"]),Cs=new RegExp("<([a-zA-Z][a-zA-Z0-9\\-_:.]*)[^>]*(?<!\\/)>","g"),Es=/<\/([a-zA-Z][a-zA-Z0-9\-_:.]*)\s*>/g,ws=/<([a-zA-Z][a-zA-Z0-9\-_:.]*)[^>]*\/>/g;function ks(n={}){const{classPrefix:e="shiki-fold",foldLevel:t=0}=n;return{name:"shiki-transformer-html-fold",tokens(r){const i=Ls(r),o=new Map(i.map(l=>[l.startLine,l])),s=new Map;if(t>0){for(const l of i)if(l.level===t){s.set(l.startLine,{hiddenCount:l.endLine-l.startLine});for(let a=l.startLine+1;a<=l.endLine;a++)s.set(a,{hiddenCount:-1})}}return this.meta.transformerHtmlFold={foldRegions:i,foldStartLines:o,foldedRanges:s,__lineIdCounter:0,foldLevel:t},r},pre(r){r.children.unshift({type:"element",tagName:"style",properties:{},children:[{type:"text",value:Ts(e)}]})},line(r,i){const{transformerHtmlFold:o}=this.meta,s=`${e}-${o.__lineIdCounter++}`;r.properties["data-fold-line"]=s;const l=o.foldedRanges.get(i);l&&l.hiddenCount===-1&&(r.properties.class=`${r.properties.class||""} ${e}-hidden`.trim());const a=o.foldStartLines.get(i);if(a){const c=`${e}-${a.endLine-1}`,u=o.foldLevel>0&&a.level===o.foldLevel;if(r.properties["data-fold-end-id"]=c,r.properties["data-fold-level"]=String(a.level),r.properties["data-folded"]=u?"true":"false",r.properties.class=`${r.properties.class||""} ${e}-foldable`.trim(),u&&l&&l.hiddenCount>0){const h=l.hiddenCount;r.children.push({type:"element",tagName:"span",properties:{class:`${e}-summary`},children:[{type:"text",value:`... ${h} line${h>1?"s":""} hidden`}]})}}return r}}}function Ls(n){const e=[],t=[];for(const[r,i]of n.entries()){const o=i.map(a=>a.content).join(""),s=r+1,l=new Set;for(const a of o.matchAll(ws))l.add(a.index);for(const a of o.matchAll(Cs)){const[c,u]=a;if(!u||l.has(a.index))continue;const h=u.toLowerCase();if(!Ss.has(h)){const m=t.length+1;t.push({tagName:h,line:s,level:m})}}for(const a of o.matchAll(Es)){const[c,u]=a;if(!u)continue;const h=u.toLowerCase();for(let m=t.length-1;m>=0;m--)if(t[m]?.tagName===h){const d=t[m].line,p=t[m].level;s>d&&e.push({startLine:d,endLine:s,level:p}),t.splice(m,1);break}}}return e}function Ts(n){return`
20
20
  .shiki code { display: grid; }
21
21
  .${n}-foldable { cursor: pointer; }
22
22
  .${n}-foldable:hover { background: rgba(255, 255, 255, 0.05); }
@@ -28,9 +28,9 @@ import Nn from"./DIAcCAND.js";import{_ as On}from"./DJRd5JwX.js";import{_ as Dn}
28
28
  margin-left: 0.5em;
29
29
  user-select: none;
30
30
  pointer-events: none;
31
- }`.trim()}let Ut=!1;function Rs(n="shiki-fold"){if(typeof document>"u"||Ut)return;Ut=!0;const e=`${n}-hidden`,t=`${n}-summary`;document.addEventListener("click",r=>{const o=r.target.closest(`.${n}-foldable`);if(!o)return;const i=o.dataset.foldEndId;if(!i)return;const s=o.dataset.folded==="true";o.dataset.folded=String(!s);const l=[];let a=o.nextElementSibling;for(;a;){const u=a.dataset.foldLine;if(l.push(a),u===i)break;a=a.nextElementSibling}const c=o.querySelector(`.${t}`);if(s)c?.remove();else{const u=l.length,h=document.createElement("span");h.className=t,h.textContent=`... ${u} line${u>1?"s":""} hidden`,o.append(h)}for(const u of l)u.classList.toggle(e,!s)})}const As={class:"flex items-start justify-between gap-3"},Ps={class:"min-w-0"},Is={class:"text-sm font-semibold"},xs={class:"text-xs text-neutral-500 truncate"},Ns={class:"flex gap-2"},Os=["innerHTML"],Ds=Ht({__name:"HydrationIssue",props:{issue:{}},setup(n){const e=n,t=S=>"instance"in S&&"vnode"in S,r=oe(()=>e.issue.componentName??"Unknown component"),o=oe(()=>t(e.issue)?e.issue.instance.type.__file:e.issue.fileLocation),i=oe(()=>t(e.issue)?e.issue.instance.vnode.el:void 0),{highlightElement:s,inspectElementInEditor:l,clearHighlight:a}=Wn(),c=Gn("");async function u(S,g){const v=ds(S,g,{stripTrailingCr:!0,ignoreNewlineAtEof:!0,newlineIsToken:!0,ignoreWhitespace:!0});c.value=await ls(h(v),{theme:"github-dark",lang:"html",transformers:[ks({foldLevel:v.length>20?2:0}),bs()]})}function h(S){return S.map(g=>g.value===`
31
+ }`.trim()}let Ut=!1;function Rs(n="shiki-fold"){if(typeof document>"u"||Ut)return;Ut=!0;const e=`${n}-hidden`,t=`${n}-summary`;document.addEventListener("click",r=>{const i=r.target.closest(`.${n}-foldable`);if(!i)return;const o=i.dataset.foldEndId;if(!o)return;const s=i.dataset.folded==="true";i.dataset.folded=String(!s);const l=[];let a=i.nextElementSibling;for(;a;){const u=a.dataset.foldLine;if(l.push(a),u===o)break;a=a.nextElementSibling}const c=i.querySelector(`.${t}`);if(s)c?.remove();else{const u=l.length,h=document.createElement("span");h.className=t,h.textContent=`... ${u} line${u>1?"s":""} hidden`,i.append(h)}for(const u of l)u.classList.toggle(e,!s)})}const As={class:"flex items-start justify-between gap-3"},Ps={class:"min-w-0"},Is={class:"text-sm font-semibold"},xs={class:"text-xs text-neutral-500 truncate"},Ns={class:"flex gap-2"},Os=["innerHTML"],Ds=Ht({__name:"HydrationIssue",props:{issue:{}},setup(n){const e=n,t=S=>"instance"in S&&"vnode"in S,r=ie(()=>e.issue.componentName??"Unknown component"),i=ie(()=>t(e.issue)?e.issue.instance.type.__file:e.issue.fileLocation),o=ie(()=>t(e.issue)?e.issue.instance.vnode.el:void 0),{highlightElement:s,inspectElementInEditor:l,clearHighlight:a}=Wn(),c=Gn("");async function u(S,g){const v=ds(S,g,{stripTrailingCr:!0,ignoreNewlineAtEof:!0,newlineIsToken:!0,ignoreWhitespace:!0});c.value=await ls(h(v),{theme:"github-dark",lang:"html",transformers:[ks({foldLevel:v.length>20?2:0}),bs()]})}function h(S){return S.map(g=>g.value===`
32
32
  `?"":g.added?`
33
33
  // [!code ++]
34
34
  ${g.value}`:g.removed?`
35
35
  // [!code --]
36
- ${g.value} `:g.value).join("").trim()}const m=oe(()=>e.issue.htmlPreHydration??""),d=oe(()=>e.issue.htmlPostHydration??"");Mn([m,d],([S,g])=>{u(S,g)},{immediate:!0});function p(S){navigator.clipboard?.writeText(S).catch(()=>{})}function b(){fetch(Vn,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:[e.issue.id]})})}return Bn(()=>{Rs()}),(S,g)=>{const v=Nn,_=On,C=Dn;return J(),ze(C,{"p-4":"",relative:"","w-full":"","overflow-auto":""},{default:re(()=>[U("div",As,[U("div",Ps,[U("div",Is,yt(M(r)),1),U("div",xs,yt(M(o)),1)]),U("div",Ns,[M(i)?(J(),ze(_,{key:0,size:"small",quaternary:"",title:"Open in editor",onMouseover:g[0]||(g[0]=w=>M(s)(M(i))),onMouseleave:g[1]||(g[1]=w=>M(a)()),onClick:g[2]||(g[2]=w=>M(l)(M(i)))},{default:re(()=>[F(v,{name:"material-symbols:file-open-outline",class:"text-lg"})]),_:1})):$n("",!0),F(_,{size:"small",quaternary:"",onClick:g[3]||(g[3]=w=>p(M(m)))},{default:re(()=>[F(v,{name:"material-symbols:content-copy-outline",class:"text-lg"}),g[5]||(g[5]=U("span",{class:"ml-1"},"Copy pre",-1))]),_:1}),F(_,{size:"small",quaternary:"",onClick:g[4]||(g[4]=w=>p(M(d)))},{default:re(()=>[F(v,{name:"material-symbols:content-copy-outline",class:"text-lg"}),g[6]||(g[6]=U("span",{class:"ml-1"},"Copy post",-1))]),_:1}),F(_,{title:"Remove",size:"small",quaternary:"",onClick:b},{default:re(()=>[F(v,{name:"material-symbols:delete-outline",class:"text-lg"})]),_:1})])]),U("div",{class:"w-full mt-3 overflow-auto rounded-lg",innerHTML:M(c)},null,8,Os)]),_:1})}}}),Ms=Object.assign(jn(Ds,[["__scopeId","data-v-17196ac2"]]),{__name:"HydrationIssue"}),Bs={grid:"","gap-4":"","p-4":""},$s={key:1,class:"text-neutral-500 dark:text-neutral-400"},Js=Ht({__name:"hydration",setup(n){const e=Un().$hydrationMismatches;return(t,r)=>{const o=Ms;return J(),Me("div",Bs,[M(e).length?(J(!0),Me(Hn,{key:0},Fn(M(e),i=>(J(),ze(o,{issue:i},null,8,["issue"]))),256)):(J(),Me("div",$s," No hydration issues found "))])}}});export{Js as default};
36
+ ${g.value} `:g.value).join("").trim()}const m=ie(()=>e.issue.htmlPreHydration??""),d=ie(()=>e.issue.htmlPostHydration??"");Mn([m,d],([S,g])=>{u(S,g)},{immediate:!0});function p(S){navigator.clipboard?.writeText(S).catch(()=>{})}function b(){fetch(Vn,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:[e.issue.id]})})}return Bn(()=>{Rs()}),(S,g)=>{const v=Nn,_=On,C=Dn;return J(),ze(C,{"p-4":"",relative:"","w-full":"","overflow-auto":""},{default:re(()=>[U("div",As,[U("div",Ps,[U("div",Is,yt(M(r)),1),U("div",xs,yt(M(i)),1)]),U("div",Ns,[M(o)?(J(),ze(_,{key:0,size:"small",quaternary:"",title:"Open in editor",onMouseover:g[0]||(g[0]=w=>M(s)(M(o))),onMouseleave:g[1]||(g[1]=w=>M(a)()),onClick:g[2]||(g[2]=w=>M(l)(M(o)))},{default:re(()=>[F(v,{name:"material-symbols:file-open-outline",class:"text-lg"})]),_:1})):$n("",!0),F(_,{size:"small",quaternary:"",onClick:g[3]||(g[3]=w=>p(M(m)))},{default:re(()=>[F(v,{name:"material-symbols:content-copy-outline",class:"text-lg"}),g[5]||(g[5]=U("span",{class:"ml-1"},"Copy pre",-1))]),_:1}),F(_,{size:"small",quaternary:"",onClick:g[4]||(g[4]=w=>p(M(d)))},{default:re(()=>[F(v,{name:"material-symbols:content-copy-outline",class:"text-lg"}),g[6]||(g[6]=U("span",{class:"ml-1"},"Copy post",-1))]),_:1}),F(_,{title:"Remove",size:"small",quaternary:"",onClick:b},{default:re(()=>[F(v,{name:"material-symbols:delete-outline",class:"text-lg"})]),_:1})])]),U("div",{class:"w-full mt-3 overflow-auto rounded-lg",innerHTML:M(c)},null,8,Os)]),_:1})}}}),Ms=Object.assign(jn(Ds,[["__scopeId","data-v-17196ac2"]]),{__name:"HydrationIssue"}),Bs={grid:"","gap-4":"","p-4":""},$s={key:1,class:"text-neutral-500 dark:text-neutral-400"},Js=Ht({__name:"hydration",setup(n){const e=Un().$hydrationMismatches;return(t,r)=>{const i=Ms;return J(),Me("div",Bs,[M(e).length?(J(!0),Me(Hn,{key:0},Fn(M(e),o=>(J(),ze(i,{issue:o},null,8,["issue"]))),256)):(J(),Me("div",$s," No hydration issues found "))])}}});export{Js as default};