@dogsbay/render 0.0.0-stage → 0.2.0-beta.116

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 +123 -2
  2. package/dist/bin.mjs +2 -0
  3. package/dist/chunks/bash-AXAJJ7K6.mjs +1 -0
  4. package/dist/chunks/bat-7CTKDPA4.mjs +1 -0
  5. package/dist/chunks/c-2ALCOF6B.mjs +1 -0
  6. package/dist/chunks/chunk-2V77MTNA.mjs +1 -0
  7. package/dist/chunks/chunk-3T25FO5N.mjs +1 -0
  8. package/dist/chunks/chunk-5C2LWUV4.mjs +1 -0
  9. package/dist/chunks/chunk-7YSHM6MG.mjs +292 -0
  10. package/dist/chunks/chunk-AMPZKS45.mjs +1 -0
  11. package/dist/chunks/chunk-D5QQMPWZ.mjs +1 -0
  12. package/dist/chunks/chunk-DBZCYXBR.mjs +1 -0
  13. package/dist/chunks/chunk-DNR4KJZ7.mjs +1 -0
  14. package/dist/chunks/chunk-EMU37BKV.mjs +1 -0
  15. package/dist/chunks/chunk-FTE2QTX3.mjs +1 -0
  16. package/dist/chunks/chunk-GYXQUFKI.mjs +1 -0
  17. package/dist/chunks/chunk-H2IGYTRE.mjs +24 -0
  18. package/dist/chunks/chunk-JH6FQVMJ.mjs +1 -0
  19. package/dist/chunks/chunk-JJYGK4XN.mjs +1 -0
  20. package/dist/chunks/chunk-JU5ZB3NL.mjs +1 -0
  21. package/dist/chunks/chunk-KS3ZRC2G.mjs +1 -0
  22. package/dist/chunks/chunk-MRVVZS77.mjs +1 -0
  23. package/dist/chunks/chunk-OATTKKBP.mjs +2841 -0
  24. package/dist/chunks/chunk-PWWOV7EH.mjs +1 -0
  25. package/dist/chunks/chunk-S4P3ZA47.mjs +1 -0
  26. package/dist/chunks/chunk-ZINTF3TI.mjs +1 -0
  27. package/dist/chunks/cpp-ELFCDB6P.mjs +1 -0
  28. package/dist/chunks/csharp-UJBNPXBE.mjs +1 -0
  29. package/dist/chunks/css-TX5O34LD.mjs +1 -0
  30. package/dist/chunks/diff-ITLGU3RJ.mjs +1 -0
  31. package/dist/chunks/docker-W46D43PZ.mjs +1 -0
  32. package/dist/chunks/go-UCPHIMPJ.mjs +1 -0
  33. package/dist/chunks/graphql-GWC2SWRW.mjs +1 -0
  34. package/dist/chunks/groovy-RX766UL6.mjs +1 -0
  35. package/dist/chunks/hcl-BQZ3TWA5.mjs +1 -0
  36. package/dist/chunks/highlight-TEBJABA3.mjs +154 -0
  37. package/dist/chunks/html-M7IQMCZW.mjs +1 -0
  38. package/dist/chunks/http-YDAJYC64.mjs +1 -0
  39. package/dist/chunks/ini-4KFO7XTF.mjs +1 -0
  40. package/dist/chunks/java-4TDTVHME.mjs +1 -0
  41. package/dist/chunks/javascript-FK6BYXR7.mjs +1 -0
  42. package/dist/chunks/json-KOMOQDAQ.mjs +1 -0
  43. package/dist/chunks/jsonc-ZEH5OBPD.mjs +1 -0
  44. package/dist/chunks/jsx-53PXQ2NL.mjs +1 -0
  45. package/dist/chunks/katex-7RASWIHN.mjs +257 -0
  46. package/dist/chunks/kotlin-7LYXSLAF.mjs +1 -0
  47. package/dist/chunks/makefile-PSNUPH2Q.mjs +1 -0
  48. package/dist/chunks/markdown-AXYPIRPT.mjs +1 -0
  49. package/dist/chunks/nginx-G3STFXGR.mjs +1 -0
  50. package/dist/chunks/powershell-CF3YYGE3.mjs +1 -0
  51. package/dist/chunks/properties-2HBJIUMB.mjs +1 -0
  52. package/dist/chunks/python-4EUPCMJH.mjs +1 -0
  53. package/dist/chunks/ruby-6JITY6TM.mjs +1 -0
  54. package/dist/chunks/rust-YKPB2B2E.mjs +1 -0
  55. package/dist/chunks/scss-UA7SFP3B.mjs +1 -0
  56. package/dist/chunks/shellsession-REQ4XMXL.mjs +1 -0
  57. package/dist/chunks/sql-WST4KER7.mjs +1 -0
  58. package/dist/chunks/toml-HFJFO2T2.mjs +1 -0
  59. package/dist/chunks/tsx-IMEWP7MM.mjs +1 -0
  60. package/dist/chunks/typescript-423LFGQL.mjs +1 -0
  61. package/dist/chunks/xml-J4Q6YQIU.mjs +1 -0
  62. package/dist/chunks/xsl-QZERU56Y.mjs +1 -0
  63. package/dist/chunks/yaml-HBNW4TN5.mjs +1 -0
  64. package/dist/cli.mjs +1 -0
  65. package/dist/index.mjs +1 -0
  66. package/dist/types/bin.d.ts +2 -0
  67. package/dist/types/cli.d.ts +14 -0
  68. package/dist/types/css.d.ts +8 -0
  69. package/dist/types/document.d.ts +31 -0
  70. package/dist/types/generated/assets.d.ts +3 -0
  71. package/dist/types/index.d.ts +11 -0
  72. package/dist/types/lower.d.ts +9 -0
  73. package/dist/types/report.d.ts +28 -0
  74. package/dist/types/strings.d.ts +2 -0
  75. package/package.json +52 -3
  76. package/skills/dogsbay-documents/SKILL.md +222 -0
@@ -0,0 +1,154 @@
1
+ import{b as qn,f as Dt,g as Vn,h as Ls,i as jt}from"./chunk-7YSHM6MG.mjs";import{b as Ts}from"./chunk-2V77MTNA.mjs";var I=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Ps(e){return Jt(e)}function Jt(e){return Array.isArray(e)?Ms(e):e instanceof RegExp?e:typeof e=="object"?$s(e):e}function Ms(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Jt(e[n]);return t}function $s(e){let t={};for(let n in e)t[n]=Jt(e[n]);return t}function nr(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function rr(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?rr(e.substring(0,e.length-1)):e.substr(~t+1)}var Ht=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ze=class{static hasCaptures(e){return e===null?!1:(Ht.lastIndex=0,Ht.test(e))}static replaceCaptures(e,t,n){return e.replace(Ht,(r,o,s,i)=>{let a=n[parseInt(o||s,10)];if(a){let l=t.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(i){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function or(e,t){return e<t?-1:e>t?1:0}function sr(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let o=0;o<n;o++){let s=or(e[o],t[o]);if(s!==0)return s}return 0}return n-r}function Xn(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function ir(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ar=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},he=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Gs(e),t)}static createFromParsedTheme(e,t){return js(e,t)}_cachedMatchRoot=new ar(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,r=this._cachedMatchRoot.get(t).find(o=>Fs(e.parent,o.parentScopes));return r?new lr(r.fontStyle,r.foreground,r.background):null}},Ut=class et{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(let r of n)t=new et(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new et(n,t[r]);return n}push(t){return new et(this,t)}getSegments(){let t=this,n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){let n=[],r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function Fs(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],o=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],o=!0}for(;e&&!Os(e.scopeName,r);){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Os(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var lr=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Gs(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let o=0,s=t.length;o<s;o++){let i=t[o];if(!i.settings)continue;let a;if(typeof i.scope=="string"){let d=i.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),a=d.split(",")}else Array.isArray(i.scope)?a=i.scope:a=[""];let l=-1;if(typeof i.settings.fontStyle=="string"){l=0;let d=i.settings.fontStyle.split(" ");for(let h=0,f=d.length;h<f;h++)switch(d[h]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof i.settings.foreground=="string"&&Xn(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&Xn(i.settings.background)&&(u=i.settings.background);for(let d=0,h=a.length;d<h;d++){let g=a[d].trim().split(" "),m=g[g.length-1],y=null;g.length>1&&(y=g.slice(0,g.length-1),y.reverse()),n[r++]=new Ds(m,y,o,l,c,u)}}return n}var Ds=class{constructor(e,t,n,r,o,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=s}},O=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(O||{});function js(e,t){e.sort((l,c)=>{let u=or(l.scope,c.scope);return u!==0||(u=sr(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let n=0,r="#000000",o="#ffffff";for(;e.length>=1&&e[0].scope==="";){let l=e.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(o=l.background)}let s=new Hs(t),i=new lr(n,s.getId(r),s.getId(o)),a=new Ws(new zt(0,null,-1,0,0),[]);for(let l=0,c=e.length;l<c;l++){let u=e[l];a.insert(0,u.scope,u.parentScopes,u.fontStyle,s.getId(u.foreground),s.getId(u.background))}return new he(s,i,a)}var Hs=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Us=Object.freeze([]),zt=class cr{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,o,s){this.scopeDepth=t,this.parentScopes=n||Us,this.fontStyle=r,this.foreground=o,this.background=s}clone(){return new cr(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,o=t.length;r<o;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,o){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),o!==0&&(this.background=o)}},Ws=class qt{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,o=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[o]===">"&&o++,!(r>=t.parentScopes.length||o>=n.parentScopes.length);){let s=n.parentScopes[o].length-t.parentScopes[r].length;if(s!==0)return s;r++,o++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),o,s;if(r===-1?(o=t,s=""):(o=t.substring(0,r),s=t.substring(r+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(qt._cmpBySpecificity),n}insert(t,n,r,o,s,i){if(n===""){this._doInsertHere(t,r,o,s,i);return}let a=n.indexOf("."),l,c;a===-1?(l=n,c=""):(l=n.substring(0,a),c=n.substring(a+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new qt(this._mainRule.clone(),zt.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(t+1,c,r,o,s,i)}_doInsertHere(t,n,r,o,s){if(n===null){this._mainRule.acceptOverwrite(t,r,o,s);return}for(let i=0,a=this._rulesWithParentScopes.length;i<a;i++){let l=this._rulesWithParentScopes[i];if(sr(l.parentScopes,n)===0){l.acceptOverwrite(t,r,o,s);return}}r===-1&&(r=this._mainRule.fontStyle),o===0&&(o=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new zt(t,n,r,o,s))}},ie=class q{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){let n=q.getLanguageId(t),r=q.getTokenType(t),o=q.getFontStyle(t),s=q.getForeground(t),i=q.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:o,foreground:s,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,o,s,i,a){let l=q.getLanguageId(t),c=q.getTokenType(t),u=q.containsBalancedBrackets(t)?1:0,d=q.getFontStyle(t),h=q.getForeground(t),f=q.getBackground(t);return n!==0&&(l=n),r!==8&&(c=r),o!==null&&(u=o?1:0),s!==-1&&(d=s),i!==0&&(h=i),a!==0&&(f=a),(l<<0|c<<8|u<<10|d<<11|h<<15|f<<24)>>>0}};function nt(e,t){let n=[],r=zs(e),o=r.next();for(;o!==null;){let l=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let c=i();if(n.push({matcher:c,priority:l}),o!==",")break;o=r.next()}return n;function s(){if(o==="-"){o=r.next();let l=s();return c=>!!l&&!l(c)}if(o==="("){o=r.next();let l=a();return o===")"&&(o=r.next()),l}if(Yn(o)){let l=[];do l.push(o),o=r.next();while(Yn(o));return c=>t(l,c)}return null}function i(){let l=[],c=s();for(;c;)l.push(c),c=s();return u=>l.every(d=>d(u))}function a(){let l=[],c=i();for(;c&&(l.push(c),o==="|"||o===",");){do o=r.next();while(o==="|"||o===",");c=i()}return u=>l.some(d=>d(u))}}function Yn(e){return!!e&&!!e.match(/[\w\.:]+/)}function zs(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function ur(e){typeof e.dispose=="function"&&e.dispose()}var $e=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},qs=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Vs=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Xs=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new $e(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Vs;for(let n of e)Ys(n,this.initialScopeName,this.repo,t);for(let n of t.references)if(n instanceof $e){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Ys(e,t,n,r){let o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}let s=n.lookup(t);e instanceof $e?tt({baseGrammar:s,selfGrammar:o},r):Vt(e.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},r);let i=n.injections(e.scopeName);if(i)for(let a of i)r.add(new $e(a))}function Vt(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];rt([r],t,n)}}function tt(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&rt(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&rt(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function rt(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let o=r.repository?nr({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&rt(r.patterns,{...t,repository:o},n);let s=r.include;if(!s)continue;let i=dr(s);switch(i.kind){case 0:tt({...t,selfGrammar:t.baseGrammar},n);break;case 1:tt(t,n);break;case 2:Vt(i.ruleName,{...t,repository:o},n);break;case 3:case 4:let a=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){let l={baseGrammar:t.baseGrammar,selfGrammar:a,repository:o};i.kind===4?Vt(i.ruleName,l,n):tt(l,n)}else i.kind===4?n.add(new qs(i.scopeName,i.ruleName)):n.add(new $e(i.scopeName));break}}}var Ks=class{kind=0},Js=class{kind=1},Qs=class{constructor(e){this.ruleName=e}kind=2},Zs=class{constructor(e){this.scopeName=e}kind=3},ei=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function dr(e){if(e==="$base")return new Ks;if(e==="$self")return new Js;let t=e.indexOf("#");if(t===-1)return new Zs(e);if(t===0)return new Qs(e.substring(1));{let n=e.substring(0,t),r=e.substring(t+1);return new ei(n,r)}}var ti=/\\(\d+)/,Kn=/\\(\d+)/g,Xc=Symbol("RuleId"),ni=-1,fr=-2;var Ge=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Ze.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Ze.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${rr(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Ze.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ze.replaceCaptures(this._contentName,e,t)}},ri=class extends Ge{retokenizeCapturedWithRuleId;constructor(e,t,n,r,o){super(e,t,n,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},oi=class extends Ge{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,null),this._match=new Fe(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(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Oe,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Jn=class extends Ge{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o){super(e,t,n,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Oe,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Xt=class extends Ge{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,o,s,i,a,l,c){super(e,t,n,r),this._begin=new Fe(o,this.id),this.beginCaptures=s,this._end=new Fe(i||"\uFFFF",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!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(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Oe;for(let n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ot=class extends Ge{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,o,s,i,a,l){super(e,t,n,r),this._begin=new Fe(o,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new Fe(i,fr),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Oe;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Oe,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"\uFFFF"),this._cachedCompiledWhilePatterns}},hr=class G{static createCaptureRule(t,n,r,o,s){return t.registerRule(i=>new ri(n,i,r,o,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new oi(t.$vscodeTextmateLocation,t.id,t.name,t.match,G._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=nr({},r,t.repository));let s=t.patterns;return typeof s>"u"&&t.include&&(s=[{include:t.include}]),new Jn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,G._compilePatterns(s,n,r))}return t.while?new ot(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,G._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,G._compileCaptures(t.whileCaptures||t.captures,n,r),G._compilePatterns(t.patterns,n,r)):new Xt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,G._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,G._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,G._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let o=[];if(t){let s=0;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let a=parseInt(i,10);a>s&&(s=a)}for(let i=0;i<=s;i++)o[i]=null;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let a=parseInt(i,10),l=0;t[i].patterns&&(l=G.getCompiledRuleId(t[i],n,r)),o[a]=G.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,l)}}return o}static _compilePatterns(t,n,r){let o=[];if(t)for(let s=0,i=t.length;s<i;s++){let a=t[s],l=-1;if(a.include){let c=dr(a.include);switch(c.kind){case 0:case 1:l=G.getCompiledRuleId(r[a.include],n,r);break;case 2:let u=r[c.ruleName];u&&(l=G.getCompiledRuleId(u,n,r));break;case 3:case 4:let d=c.scopeName,h=c.kind===4?c.ruleName:null,f=n.getExternalGrammar(d,r);if(f)if(h){let g=f.repository[h];g&&(l=G.getCompiledRuleId(g,n,f.repository))}else l=G.getCompiledRuleId(f.repository.$self,n,f.repository);break}}else l=G.getCompiledRuleId(a,n,r);if(l!==-1){let c=n.getRule(l),u=!1;if((c instanceof Jn||c instanceof Xt||c instanceof ot)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;o.push(l)}}return{patterns:o,hasMissingPatterns:(t?t.length:0)!==o.length}}},Fe=class gr{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){let r=t.length,o=0,s=[],i=!1;for(let a=0;a<r;a++)if(t.charAt(a)==="\\"&&a+1<r){let c=t.charAt(a+1);c==="z"?(s.push(t.substring(o,a)),s.push("$(?!\\n)(?<!\\n)"),o=a+2):(c==="A"||c==="G")&&(i=!0),a++}this.hasAnchor=i,o===0?this.source=t:(s.push(t.substring(o,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=ti.test(this.source):this.hasBackReferences=!1}clone(){return new gr(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(o=>t.substring(o.start,o.end));return Kn.lastIndex=0,this.source.replace(Kn,(o,s)=>ir(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],o=[],s,i,a,l;for(s=0,i=this.source.length;s<i;s++)a=this.source.charAt(s),t[s]=a,n[s]=a,r[s]=a,o[s]=a,a==="\\"&&s+1<i&&(l=this.source.charAt(s+1),l==="A"?(t[s+1]="\uFFFF",n[s+1]="\uFFFF",r[s+1]="A",o[s+1]="A"):l==="G"?(t[s+1]="\uFFFF",n[s+1]="G",r[s+1]="\uFFFF",o[s+1]="G"):(t[s+1]=l,n[s+1]=l,r[s+1]=l,o[s+1]=l),s++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:o.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Oe=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Qn(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(o=>o.resolveAnchors(t,n));return new Qn(e,r,this._items.map(o=>o.ruleId))}},Qn=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
2
+ `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Wt=class{constructor(e,t){this.languageId=e,this.tokenType=t}},si=class Yt{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Wt(t,8),this._embeddedLanguagesMatcher=new ii(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Yt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Wt(0,0);_getBasicScopeAttributes=new ar(t=>{let n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Wt(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){let n=t.match(Yt.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ii=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([n,r])=>ir(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Yc={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},pr=!1,Zn=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function mr(e,t,n,r,o,s,i,a){let l=t.content.length,c=!1,u=-1;if(i){let f=ai(e,t,n,r,o,s);o=f.stack,r=f.linePos,n=f.isFirstLine,u=f.anchorPosition}let d=Date.now();for(;!c;){if(a!==0&&Date.now()-d>a)return new Zn(o,!0);h()}return new Zn(o,!1);function h(){let f=li(e,t,n,r,o,u);if(!f){s.produce(o,l),c=!0;return}let g=f.captureIndices,m=f.matchedRuleId,y=g&&g.length>0?g[0].end>r:!1;if(m===ni){let b=o.getRule(e);s.produce(o,g[0].start),o=o.withContentNameScopesList(o.nameScopesList),Pe(e,t,n,o,s,b.endCaptures,g),s.produce(o,g[0].end);let p=o;if(o=o.parent,u=p.getAnchorPos(),!y&&p.getEnterPos()===r){o=p,s.produce(o,l),c=!0;return}}else{let b=e.getRule(m);s.produce(o,g[0].start);let p=o,w=b.getName(t.content,g),C=o.contentNameScopesList.pushAttributed(w,e);if(o=o.push(m,r,u,g[0].end===l,null,C,C),b instanceof Xt){let S=b;Pe(e,t,n,o,s,S.beginCaptures,g),s.produce(o,g[0].end),u=g[0].end;let E=S.getContentName(t.content,g),R=C.pushAttributed(E,e);if(o=o.withContentNameScopesList(R),S.endHasBackReferences&&(o=o.withEndRule(S.getEndWithResolvedBackReferences(t.content,g))),!y&&p.hasSameRuleAs(o)){o=o.pop(),s.produce(o,l),c=!0;return}}else if(b instanceof ot){let S=b;Pe(e,t,n,o,s,S.beginCaptures,g),s.produce(o,g[0].end),u=g[0].end;let E=S.getContentName(t.content,g),R=C.pushAttributed(E,e);if(o=o.withContentNameScopesList(R),S.whileHasBackReferences&&(o=o.withEndRule(S.getWhileWithResolvedBackReferences(t.content,g))),!y&&p.hasSameRuleAs(o)){o=o.pop(),s.produce(o,l),c=!0;return}}else if(Pe(e,t,n,o,s,b.captures,g),s.produce(o,g[0].end),o=o.pop(),!y){o=o.safePop(),s.produce(o,l),c=!0;return}}g[0].end>r&&(r=g[0].end,n=!1)}}function ai(e,t,n,r,o,s){let i=o.beginRuleCapturedEOL?0:-1,a=[];for(let l=o;l;l=l.pop()){let c=l.getRule(e);c instanceof ot&&a.push({rule:c,stack:l})}for(let l=a.pop();l;l=a.pop()){let{ruleScanner:c,findOptions:u}=di(l.rule,e,l.stack.endRule,n,r===i),d=c.findNextMatchSync(t,r,u);if(d){if(d.ruleId!==fr){o=l.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(s.produce(l.stack,d.captureIndices[0].start),Pe(e,t,n,l.stack,s,l.rule.whileCaptures,d.captureIndices),s.produce(l.stack,d.captureIndices[0].end),i=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{o=l.stack.pop();break}}return{stack:o,linePos:r,anchorPosition:i,isFirstLine:n}}function li(e,t,n,r,o,s){let i=ci(e,t,n,r,o,s),a=e.getInjections();if(a.length===0)return i;let l=ui(a,e,t,n,r,o,s);if(!l)return i;if(!i)return l;let c=i.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:i}function ci(e,t,n,r,o,s){let i=o.getRule(e),{ruleScanner:a,findOptions:l}=br(i,e,o.endRule,n,r===s),c=a.findNextMatchSync(t,r,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function ui(e,t,n,r,o,s,i){let a=Number.MAX_VALUE,l=null,c,u=0,d=s.contentNameScopesList.getScopeNames();for(let h=0,f=e.length;h<f;h++){let g=e[h];if(!g.matcher(d))continue;let m=t.getRule(g.ruleId),{ruleScanner:y,findOptions:b}=br(m,t,null,r,o===i),p=y.findNextMatchSync(n,o,b);if(!p)continue;let w=p.captureIndices[0].start;if(!(w>=a)&&(a=w,l=p.captureIndices,c=p.ruleId,u=g.priority,a===o))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function br(e,t,n,r,o){if(pr){let i=e.compile(t,n),a=yr(r,o);return{ruleScanner:i,findOptions:a}}return{ruleScanner:e.compileAG(t,n,r,o),findOptions:0}}function di(e,t,n,r,o){if(pr){let i=e.compileWhile(t,n),a=yr(r,o);return{ruleScanner:i,findOptions:a}}return{ruleScanner:e.compileWhileAG(t,n,r,o),findOptions:0}}function yr(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function Pe(e,t,n,r,o,s,i){if(s.length===0)return;let a=t.content,l=Math.min(s.length,i.length),c=[],u=i[0].end;for(let d=0;d<l;d++){let h=s[d];if(h===null)continue;let f=i[d];if(f.length===0)continue;if(f.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=f.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,f.start):o.produce(r,f.start),h.retokenizeCapturedWithRuleId){let m=h.getName(a,i),y=r.contentNameScopesList.pushAttributed(m,e),b=h.getContentName(a,i),p=y.pushAttributed(b,e),w=r.push(h.retokenizeCapturedWithRuleId,f.start,-1,!1,null,y,p),C=e.createOnigString(a.substring(0,f.end));mr(e,C,n&&f.start===0,f.start,w,o,!1,0),ur(C);continue}let g=h.getName(a,i);if(g!==null){let y=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(g,e);c.push(new fi(y,f.end))}}for(;c.length>0;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var fi=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function hi(e,t,n,r,o,s,i,a){return new pi(e,t,n,r,o,s,i,a)}function er(e,t,n,r,o){let s=nt(t,st),i=hr.getCompiledRuleId(n,r,o.repository);for(let a of s)e.push({debugSelector:t,matcher:a.matcher,ruleId:i,grammar:o,priority:a.priority})}function st(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let o=n;o<t.length;o++)if(gi(t[o],r))return n=o+1,!0;return!1})}function gi(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var pi=class{constructor(e,t,n,r,o,s,i,a){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new si(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=tr(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(let l of Object.keys(o)){let c=nt(l,st);for(let u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:o[l]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let o=r.injections;if(o)for(let i in o)er(t,i,o[i],this,r);let s=this._grammarRepository.injections(n);s&&s.forEach(i=>{let a=this.getExternalGrammar(i);if(a){let l=a.injectionSelector;l&&er(t,l,a,this,a)}})}return t.sort((o,s)=>o.priority-s.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=tr(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=hr.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!t||t===Kt.NULL){o=!0;let c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),d=ie.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),h=this.getRule(this._rootId).getName(null,null),f;h?f=Me.createRootAndLookUpScopeName(h,d,this):f=Me.createRoot("unknown",d),t=new Kt(null,this._rootId,-1,-1,!1,null,f,f)}else o=!1,t.reset();e=e+`
3
+ `;let s=this.createOnigString(e),i=s.content.length,a=new bi(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=mr(this,s,o,0,t,a,!0,r);return ur(s),{lineLength:i,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function tr(e,t){return e=Ps(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Me=class J{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,o=t?.scopePath??null;for(let s of n)o=Ut.push(o,s.scopeNames),r=new J(r,o,s.encodedTokenAttributes);return r}static createRoot(t,n){return new J(null,new Ut(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let o=r.getMetadataForScope(t),s=new Ut(null,t),i=r.themeProvider.themeMatch(s),a=J.mergeAttributes(n,o,i);return new J(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return J.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let o=-1,s=0,i=0;return r!==null&&(o=r.fontStyle,s=r.foregroundId,i=r.backgroundId),ie.set(t,n.languageId,n.tokenType,null,o,s,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return J._pushAttributed(this,t,n);let r=t.split(/ /g),o=this;for(let s of r)o=J._pushAttributed(o,s,n);return o}static _pushAttributed(t,n,r){let o=r.getMetadataForScope(n),s=t.scopePath.push(n),i=r.themeProvider.themeMatch(s),a=J.mergeAttributes(t.tokenAttributes,o,i);return new J(t,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){let n=[],r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Kt=class fe{constructor(t,n,r,o,s,i,a,l){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=i,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new fe(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:fe._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Me.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){fe._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,o,s,i,a){return new fe(this,t,n,r,o,s,i,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){let t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new fe(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Me.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new fe(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Me.fromExtension(r,n.contentNameScopesList))}},mi=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):nt(n,st).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>nt(n,st).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},bi=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let s=e?.getScopeNames()??[];for(let i of this._tokenTypeOverrides)i.matcher(s)&&(r=ie.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(r=ie.set(r,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let r=0,o=this._binaryTokens.length;r<o;r++)n[r]=this._binaryTokens[r];return n}},yi=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,o){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,hi(e,s,t,n,r,o,this,this._onigLib))}return this._grammars.get(e)}},kr=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new yi(he.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(he.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new mi(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,o){let s=new Xs(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(i=>this._loadSingleGrammar(i.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,n,r,o)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,o)}},xe=Kt.NULL;function ge(e,t){let n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(let[o,s]of Object.entries(t?.colorReplacements||{}))typeof s=="string"?n[o]=s:o===r&&Object.assign(n,s);return n}function U(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function _r(e){return Array.isArray(e)?e:[e]}async function Qt(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function je(e){return!e||["plaintext","txt","text","plain"].includes(e)}function xr(e){return e==="ansi"||je(e)}function He(e){return e==="none"}function Er(e){return He(e)}var ki=/(\r?\n)/g;function ae(e,t=!1){if(e.length===0)return[["",0]];let n=e.split(ki),r=0,o=[];for(let s=0;s<n.length;s+=2){let i=t?n[s]+(n[s+1]||""):n[s];o.push([i,r]),r+=n[s].length,r+=n[s+1]?.length||0}return o}var wr={light:"#333333",dark:"#bbbbbb"},Cr={light:"#fffffe",dark:"#1e1e1e"},Sr="__shiki_resolved";function it(e){if(e?.[Sr])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let a=t.settings?t.settings.find(l=>!l.name&&!l.scope):void 0;a?.settings?.foreground&&(r=a.settings.foreground),a?.settings?.background&&(n=a.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?wr.light:wr.dark),n||(n=t.type==="light"?Cr.light:Cr.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let o=0,s=new Map;function i(a){if(s.has(a))return s.get(a);o+=1;let l=`#${o.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${l}`]?i(a):(s.set(a,l),l)}t.settings=t.settings.map(a=>{let l=a.settings?.foreground&&!a.settings.foreground.startsWith("#"),c=a.settings?.background&&!a.settings.background.startsWith("#");if(!l&&!c)return a;let u={...a,settings:{...a.settings}};if(l){let d=i(a.settings.foreground);t.colorReplacements[d]=a.settings.foreground,u.settings.foreground=d}if(c){let d=i(a.settings.background);t.colorReplacements[d]=a.settings.background,u.settings.background=d}return u});for(let a of Object.keys(t.colors||{}))if((a==="editor.foreground"||a==="editor.background"||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){let l=i(t.colors[a]);t.colorReplacements[l]=t.colors[a],t.colors[a]=l}return Object.defineProperty(t,Sr,{enumerable:!1,writable:!1,value:!0}),t}async function Ir(e){return[...new Set((await Promise.all(e.filter(t=>!xr(t)).map(async t=>await Qt(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function Ar(e){return(await Promise.all(e.map(async t=>Er(t)?null:it(await Qt(t))))).filter(t=>!!t)}function Rr(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new I(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var wi=class extends kr{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=it(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=he.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Rr(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(o=>o.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(o=>{this._alias[o]=e.name}),this._loadedLanguagesCache=null,t.size)for(let 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(let r of e)this.resolveEmbeddedLanguages(r);let t=[...this._langGraph.entries()],n=t.filter(([r,o])=>!o);if(n.length){let r=t.filter(([o,s])=>s?(s.embeddedLanguages||s.embeddedLangs)?.some(i=>n.map(([a])=>a).includes(i)):!1).filter(o=>!n.includes(o));throw new I(`Missing languages ${n.map(([o])=>`\`${o}\``).join(", ")}, required by ${r.map(([o])=>`\`${o}\``).join(", ")}`)}for(let[r,o]of t)this._resolver.addLanguage(o);for(let[r,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);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let n of t)this._langGraph.set(n,this._langMap.get(n))}},Ci=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let r=1;r<=t.length;r++){let o=t.slice(0,r).join(".");n=[...n,...this._injections.get(o)||[]]}return n}},De=0;function Zt(e){De+=1,e.warnings!==!1&&De>=10&&De%10===0&&console.warn(`[Shiki] ${De} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new I("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(it),o=new wi(new Ci(e.engine,n),r,n,e.langAlias),s;function i(p){return Rr(p,e.langAlias)}function a(p){y();let w=o.getGrammar(typeof p=="string"?p:p.name);if(!w)throw new I(`Language \`${p}\` not found, you may need to load it first`);return w}function l(p){if(p==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();let w=o.getTheme(p);if(!w)throw new I(`Theme \`${p}\` not found, you may need to load it first`);return w}function c(p){y();let w=l(p);return s!==p&&(o.setTheme(w),s=p),{theme:w,colorMap:o.getColorMap()}}function u(){return y(),o.getLoadedThemes()}function d(){return y(),o.getLoadedLanguages()}function h(...p){y(),o.loadLanguages(p.flat(1))}async function f(...p){return h(await Ir(p))}function g(...p){y();for(let w of p.flat(1))o.loadTheme(w)}async function m(...p){return y(),g(await Ar(p))}function y(){if(t)throw new I("Shiki instance has been disposed")}function b(){t||(t=!0,o.dispose(),De-=1)}return{setTheme:c,getTheme:l,getLanguage:a,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:i,loadLanguage:f,loadLanguageSync:h,loadTheme:m,loadThemeSync:g,dispose:b,[Symbol.dispose]:b}}async function en(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Ar(e.themes||[]),Ir(e.langs||[]),e.engine]);return Zt({...e,themes:t,langs:n,engine:r})}var Nr=new WeakMap;function Ue(e,t){Nr.set(e,t)}function Ee(e){return Nr.get(e)}var at=class Br{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new Br(Object.fromEntries(_r(n).map(r=>[r,xe])),t)}constructor(...t){if(t.length===2){let[n,r]=t;this.lang=r,this._stacks=n}else{let[n,r,o]=t;this.lang=r,this._stacks={[o]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Si(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Si(e){let t=[],n=new Set;function r(o){if(n.has(o))return;n.add(o);let s=o?.nameScopesList?.scopeName;s&&t.push(s),o.parent&&r(o.parent)}return r(e),t}function vi(e,t){if(!(e instanceof at))throw new I("Invalid grammar state");return e.getInternalStack(t)}var _i=/,/,xi=/ /;function tn(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(je(e.resolveLangAlias(n.lang||"text"))||He(r))return ae(t).map(a=>[{content:a[0],offset:a[1]}]);let{theme:o,colorMap:s}=e.setTheme(r),i=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new I(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(o.name))throw new I(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return Lr(t,i,o,s,n)}function Tr(...e){if(e.length===2)return Ee(e[1]);let[t,n,r={}]=e,{lang:o="text",theme:s=t.getLoadedThemes()[0]}=r;if(je(o)||He(s))throw new I("Plain language does not have grammar state");if(o==="ansi")throw new I("ANSI language does not have grammar state");let{theme:i,colorMap:a}=t.setTheme(s),l=t.getLanguage(o);return new at(nn(n,l,i,a,r).stateStack,l.name,i.name)}function Lr(e,t,n,r,o){let s=nn(e,t,n,r,o),i=new at(s.stateStack,t.name,n.name);return Ue(s.tokens,i),s.tokens}function nn(e,t,n,r,o){let s=ge(n,o),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:a=500,includeExplanation:l=!1}=o,c=ae(e),u=o.grammarState?vi(o.grammarState,n.name)??xe:o.grammarContextCode!=null?nn(o.grammarContextCode,t,n,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:xe,d=[],h=[];for(let f=0,g=c.length;f<g;f++){let[m,y]=c[f];if(m===""){d=[],h.push([]);continue}if(i>0&&m.length>=i){d=[],h.push([{content:m,offset:y,color:"",fontStyle:0}]);continue}let b,p,w;l&&l!=="tokenType"&&(b=t.tokenizeLine(m,u,a),p=b.tokens,w=0);let C=t.tokenizeLine2(m,u,a),S=C.tokens.length/2;for(let E=0;E<S;E++){let R=C.tokens[2*E],F=E+1<S?C.tokens[2*E+2]:m.length;if(R===F)continue;let N=C.tokens[2*E+1],K=U(r[ie.getForeground(N)],s),D=ie.getFontStyle(N),A={content:m.substring(R,F),offset:y+R,color:K,fontStyle:D};if(l==="tokenType")A.type=ie.getTokenType(N);else if(l){let ve=[];if(l!=="scopeName")for(let z of n.settings){let _e;switch(typeof z.scope){case"string":_e=z.scope.split(_i).map(Gt=>Gt.trim());break;case"object":_e=z.scope;break;default:continue}ve.push({settings:z,selectors:_e.map(Gt=>Gt.split(xi))})}A.explanation=[];let Le=0;for(;R+Le<F;){let z=p[w],_e=m.substring(z.startIndex,z.endIndex);Le+=_e.length,A.explanation.push({content:_e,scopes:l==="scopeName"?Ei(z.scopes):Ii(ve,z.scopes)}),w+=1}}d.push(A)}h.push(d),d=[],u=C.ruleStack}return{tokens:h,stateStack:u}}function Ei(e){return e.map(t=>({scopeName:t}))}function Ii(e,t){let n=[];for(let r=0,o=t.length;r<o;r++){let s=t[r];n[r]={scopeName:s,themeMatches:Ri(e,s,t.slice(0,r))}}return n}function vr(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Ai(e,t,n){if(!vr(e.at(-1),t))return!1;let r=e.length-2,o=n.length-1;for(;r>=0&&o>=0;)vr(e[r],n[o])&&(r-=1),o-=1;return r===-1}function Ri(e,t,n){let r=[];for(let{selectors:o,settings:s}of e)for(let i of o)if(Ai(i,t,n)){r.push(s);break}return r}function lt(e,t,n,r=tn){let o=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),s=o.map(c=>{let u=r(e,t,{...n,theme:c.theme});return{tokens:u,state:Ee(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),i=Ni(...s.map(c=>c.tokens)),a=i[0].map((c,u)=>c.map((d,h)=>{let f={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=d.explanation),i.forEach((g,m)=>{let{content:y,explanation:b,offset:p,...w}=g[u][h];f.variants[o[m].color]=w}),f})),l=s[0].state?new at(Object.fromEntries(s.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),s[0].state.lang):void 0;return l&&Ue(a,l),a}function Ni(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let o=e.map(l=>l[r]),s=t.map(()=>[]);t.forEach((l,c)=>l.push(s[c]));let i=o.map(()=>0),a=o.map(l=>l[0]);for(;a.every(l=>l);){let l=Math.min(...a.map(c=>c.content.length));for(let c=0;c<n;c++){let u=a[c];u.content.length===l?(s[c].push(u),i[c]+=1,a[c]=o[c][i[c]]):(s[c].push({...u,content:u.content.slice(0,l)}),a[c]={...u,content:u.content.slice(l),offset:u.offset+l})}}}return t}var Pr=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Q=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Q.prototype.normal={};Q.prototype.property={};Q.prototype.space=void 0;function rn(e,t){let n={},r={};for(let o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Q(n,r,t)}function We(e){return e.toLowerCase()}var $=class{constructor(t,n){this.attribute=n,this.property=t}};$.prototype.attribute="";$.prototype.booleanish=!1;$.prototype.boolean=!1;$.prototype.commaOrSpaceSeparated=!1;$.prototype.commaSeparated=!1;$.prototype.defined=!1;$.prototype.mustUseProperty=!1;$.prototype.number=!1;$.prototype.overloadedBoolean=!1;$.prototype.property="";$.prototype.spaceSeparated=!1;$.prototype.space=void 0;var ze={};Ts(ze,{boolean:()=>v,booleanish:()=>B,commaOrSpaceSeparated:()=>j,commaSeparated:()=>Z,number:()=>k,overloadedBoolean:()=>ct,spaceSeparated:()=>x});var Bi=0,v=pe(),B=pe(),ct=pe(),k=pe(),x=pe(),Z=pe(),j=pe();function pe(){return 2**++Bi}var on=Object.keys(ze),me=class extends ${constructor(t,n,r,o){let s=-1;if(super(t,n),Mr(this,"space",o),typeof r=="number")for(;++s<on.length;){let i=on[s];Mr(this,on[s],(r&ze[i])===ze[i])}}};me.prototype.defined=!0;function Mr(e,t,n){n&&(e[t]=n)}function V(e){let t={},n={};for(let[r,o]of Object.entries(e.properties)){let s=new me(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[We(r)]=r,n[We(s.attribute)]=r}return new Q(t,n,e.space)}var sn=V({properties:{ariaActiveDescendant:null,ariaAtomic:B,ariaAutoComplete:null,ariaBusy:B,ariaChecked:B,ariaColCount:k,ariaColIndex:k,ariaColSpan:k,ariaControls:x,ariaCurrent:null,ariaDescribedBy:x,ariaDetails:null,ariaDisabled:B,ariaDropEffect:x,ariaErrorMessage:null,ariaExpanded:B,ariaFlowTo:x,ariaGrabbed:B,ariaHasPopup:null,ariaHidden:B,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:x,ariaLevel:k,ariaLive:null,ariaModal:B,ariaMultiLine:B,ariaMultiSelectable:B,ariaOrientation:null,ariaOwns:x,ariaPlaceholder:null,ariaPosInSet:k,ariaPressed:B,ariaReadOnly:B,ariaRelevant:null,ariaRequired:B,ariaRoleDescription:x,ariaRowCount:k,ariaRowIndex:k,ariaRowSpan:k,ariaSelected:B,ariaSetSize:k,ariaSort:null,ariaValueMax:k,ariaValueMin:k,ariaValueNow:k,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ut(e,t){return t in e?e[t]:t}function dt(e,t){return ut(e,t.toLowerCase())}var $r=V({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Z,acceptCharset:x,accessKey:x,action:null,allow:null,allowFullScreen:v,allowPaymentRequest:v,allowUserMedia:v,alpha:v,alt:null,as:null,async:v,autoCapitalize:null,autoComplete:x,autoFocus:v,autoPlay:v,blocking:x,capture:null,charSet:null,checked:v,cite:null,className:x,closedBy:null,colorSpace:null,cols:k,colSpan:k,command:null,commandFor:null,content:null,contentEditable:B,controls:v,controlsList:x,coords:k|Z,crossOrigin:null,data:null,dateTime:null,decoding:null,default:v,defer:v,dir:null,dirName:null,disabled:v,download:ct,draggable:B,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:v,formTarget:null,headers:x,height:k,hidden:ct,high:k,href:null,hrefLang:null,htmlFor:x,httpEquiv:x,id:null,imageSizes:null,imageSrcSet:null,inert:v,inputMode:null,integrity:null,is:null,isMap:v,itemId:null,itemProp:x,itemRef:x,itemScope:v,itemType:x,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:v,low:k,manifest:null,max:null,maxLength:k,media:null,method:null,min:null,minLength:k,multiple:v,muted:v,name:null,nonce:null,noModule:v,noValidate:v,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:v,optimum:k,pattern:null,ping:x,placeholder:null,playsInline:v,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:v,referrerPolicy:null,rel:x,required:v,reversed:v,rows:k,rowSpan:k,sandbox:x,scope:null,scoped:v,seamless:v,selected:v,shadowRootClonable:v,shadowRootCustomElementRegistry:v,shadowRootDelegatesFocus:v,shadowRootMode:null,shadowRootSerializable:v,shape:null,size:k,sizes:null,slot:null,span:k,spellCheck:B,src:null,srcDoc:null,srcLang:null,srcSet:null,start:k,step:null,style:null,tabIndex:k,target:null,title:null,translate:null,type:null,typeMustMatch:v,useMap:null,value:B,width:k,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:x,axis:null,background:null,bgColor:null,border:k,borderColor:null,bottomMargin:k,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:v,declare:v,event:null,face:null,frame:null,frameBorder:null,hSpace:k,leftMargin:k,link:null,longDesc:null,lowSrc:null,marginHeight:k,marginWidth:k,noResize:v,noHref:v,noShade:v,noWrap:v,object:null,profile:null,prompt:null,rev:null,rightMargin:k,rules:null,scheme:null,scrolling:B,standby:null,summary:null,text:null,topMargin:k,valueType:null,version:null,vAlign:null,vLink:null,vSpace:k,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:v,disablePictureInPicture:v,disableRemotePlayback:v,exportParts:Z,part:x,prefix:null,property:null,results:k,security:null,unselectable:null},space:"html",transform:dt});var Fr=V({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:j,accentHeight:k,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:k,amplitude:k,arabicForm:null,ascent:k,attributeName:null,attributeType:null,azimuth:k,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:k,by:null,calcMode:null,capHeight:k,className:x,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:k,diffuseConstant:k,direction:null,display:null,dur:null,divisor:k,dominantBaseline:null,download:v,dx:null,dy:null,edgeMode:null,editable:null,elevation:k,enableBackground:null,end:null,event:null,exponent:k,externalResourcesRequired:null,fill:null,fillOpacity:k,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:Z,g2:Z,glyphName:Z,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:k,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:k,horizOriginX:k,horizOriginY:k,id:null,ideographic:k,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:k,k,k1:k,k2:k,k3:k,k4:k,kernelMatrix:j,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:k,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:k,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:k,overlineThickness:k,paintOrder:null,panose1:null,path:null,pathLength:k,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:x,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:k,pointsAtY:k,pointsAtZ:k,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:j,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:j,rev:j,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:j,requiredFeatures:j,requiredFonts:j,requiredFormats:j,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:k,specularExponent:k,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:k,strikethroughThickness:k,string:null,stroke:null,strokeDashArray:j,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:k,strokeOpacity:k,strokeWidth:null,style:null,surfaceScale:k,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:j,tabIndex:k,tableValues:null,target:null,targetX:k,targetY:k,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:j,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:k,underlineThickness:k,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:k,values:null,vAlphabetic:k,vMathematical:k,vectorEffect:null,vHanging:k,vIdeographic:k,version:null,vertAdvY:k,vertOriginX:k,vertOriginY:k,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:k,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ut});var an=V({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}});var ln=V({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:dt});var cn=V({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}});var Ti=/[A-Z]/g,Or=/-[a-z]/g,Li=/^data[-\w.:]+$/i;function un(e,t){let n=We(t),r=t,o=$;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Li.test(t)){if(t.charAt(4)==="-"){let s=t.slice(5).replace(Or,Mi);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{let s=t.slice(4);if(!Or.test(s)){let i=s.replace(Ti,Pi);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}o=me}return new o(r,t)}function Pi(e){return"-"+e.toLowerCase()}function Mi(e){return e.charAt(1).toUpperCase()}var Gr=rn([sn,$r,an,ln,cn],"html"),ft=rn([sn,Fr,an,ln,cn],"svg");var Dr={}.hasOwnProperty;function jr(e,t){let n=t||{};function r(o,...s){let i=r.invalid,a=r.handlers;if(o&&Dr.call(o,e)){let l=String(o[e]);i=Dr.call(a,l)?a[l]:r.unknown}if(i)return i.call(this,o,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var $i=/["&'<>`]/g,Fi=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Oi=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Gi=/[|\\{}()[\]^$+*?.]/g,Hr=new WeakMap;function Ur(e,t){if(e=e.replace(t.subset?Di(t.subset):$i,r),t.subset||t.escapeOnly)return e;return e.replace(Fi,n).replace(Oi,r);function n(o,s,i){return t.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,i.charCodeAt(s+2),t)}function r(o,s,i){return t.format(o.charCodeAt(0),i.charCodeAt(s+1),t)}}function Di(e){let t=Hr.get(e);return t||(t=ji(e),Hr.set(e,t)),t}function ji(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Gi,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}var Hi=/[\dA-Fa-f]/;function Wr(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Hi.test(String.fromCharCode(t))?r:r+";"}var Ui=/\d/;function zr(e,t,n){let r="&#"+String(e);return n&&t&&!Ui.test(String.fromCharCode(t))?r:r+";"}var qr=["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"];var ht={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var Vr=["cent","copy","divide","gt","lt","not","para","times"];var Xr={}.hasOwnProperty,dn={},gt;for(gt in ht)Xr.call(ht,gt)&&(dn[ht[gt]]=gt);var Wi=/[^\dA-Za-z]/;function Yr(e,t,n,r){let o=String.fromCharCode(e);if(Xr.call(dn,o)){let s=dn[o],i="&"+s;return n&&qr.includes(s)&&!Vr.includes(s)&&(!r||t&&t!==61&&Wi.test(String.fromCharCode(t)))?i:i+";"}return""}function Kr(e,t,n){let r=Wr(e,t,n.omitOptionalSemicolons),o;if((n.useNamedReferences||n.useShortestReferences)&&(o=Yr(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let s=zr(e,t,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return o&&(!n.useShortestReferences||o.length<r.length)?o:r}function ee(e,t){return Ur(e,Object.assign({format:Kr},t))}var zi=/^>|^->|<!--|-->|--!>|<!-$/g,qi=[">"],Vi=["<",">"];function Jr(e,t,n,r){return r.settings.bogusComments?"<?"+ee(e.value,Object.assign({},r.settings.characterReferences,{subset:qi}))+">":"<!--"+e.value.replace(zi,o)+"-->";function o(s){return ee(s,Object.assign({},r.settings.characterReferences,{subset:Vi}))}}function Qr(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function fn(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function Zr(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function eo(e){return e.join(" ").trim()}var Xi=/[ \t\n\f\r]/g;function be(e){return typeof e=="object"?e.type==="text"?to(e.value):!1:to(e)}function to(e){return e.replace(Xi,"")===""}var T=no(1),hn=no(-1),Yi=[];function no(e){return t;function t(n,r,o){let s=n?n.children:Yi,i=(r||0)+e,a=s[i];if(!o)for(;a&&be(a);)i+=e,a=s[i];return a}}var Ki={}.hasOwnProperty;function pt(e){return t;function t(n,r,o){return Ki.call(e,n.tagName)&&e[n.tagName](n,r,o)}}var qe=pt({body:Qi,caption:gn,colgroup:gn,dd:na,dt:ta,head:gn,html:Ji,li:ea,optgroup:ra,option:oa,p:Zi,rp:ro,rt:ro,tbody:ia,td:oo,tfoot:aa,th:oo,thead:sa,tr:la});function gn(e,t,n){let r=T(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&be(r.value.charAt(0)))}function Ji(e,t,n){let r=T(n,t);return!r||r.type!=="comment"}function Qi(e,t,n){let r=T(n,t);return!r||r.type!=="comment"}function Zi(e,t,n){let r=T(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function ea(e,t,n){let r=T(n,t);return!r||r.type==="element"&&r.tagName==="li"}function ta(e,t,n){let r=T(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function na(e,t,n){let r=T(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function ro(e,t,n){let r=T(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function ra(e,t,n){let r=T(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function oa(e,t,n){let r=T(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function sa(e,t,n){let r=T(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function ia(e,t,n){let r=T(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function aa(e,t,n){return!T(n,t)}function la(e,t,n){let r=T(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function oo(e,t,n){let r=T(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var so=pt({body:da,colgroup:fa,head:ua,html:ca,tbody:ha});function ca(e){let t=T(e,-1);return!t||t.type!=="comment"}function ua(e){let t=new Set;for(let r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}let n=e.children[0];return!n||n.type==="element"}function da(e){let t=T(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&be(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function fa(e,t,n){let r=hn(n,t),o=T(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&qe(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function ha(e,t,n){let r=hn(n,t),o=T(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&qe(r,n.children.indexOf(r),n)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}var mt={name:[[`
4
+ \f\r &/=>`.split(""),`
5
+ \f\r "&'/=>\``.split("")],[`\0
6
+ \f\r "&'/<=>`.split(""),`\0
7
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
8
+ \f\r &>`.split(""),`\0
9
+ \f\r "&'<=>\``.split("")],[`\0
10
+ \f\r "&'<=>\``.split(""),`\0
11
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function io(e,t,n,r){let o=r.schema,s=o.space==="svg"?!1:r.settings.omitOptionalTags,i=o.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),a=[],l;o.space==="html"&&e.tagName==="svg"&&(r.schema=ft);let c=ga(r,e.properties),u=r.all(o.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=o,u&&(i=!1),(c||!s||!so(e,t,n))&&(a.push("<",e.tagName,c?" "+c:""),i&&(o.space==="svg"||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(u),!i&&(!s||!qe(e,t,n))&&a.push("</"+e.tagName+">"),a.join("")}function ga(e,t){let n=[],r=-1,o;if(t){for(o in t)if(t[o]!==null&&t[o]!==void 0){let s=pa(e,o,t[o]);s&&n.push(s)}}for(;++r<n.length;){let s=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function pa(e,t,n){let r=un(e.schema,t),o=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,s=e.settings.allowDangerousCharacters?0:1,i=e.quote,a;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";let l=ee(r.attribute,Object.assign({},e.settings.characterReferences,{subset:mt.name[o][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Zr:eo)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(a=ee(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:mt.unquoted[o][s]}))),a!==n&&(e.settings.quoteSmart&&fn(n,i)>fn(n,e.alternative)&&(i=e.alternative),a=i+ee(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?mt.single:mt.double)[o][s],attribute:!0}))+i),l+(a&&"="+a))}var ma=["<","&"];function bt(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:ee(e.value,Object.assign({},r.settings.characterReferences,{subset:ma}))}function ao(e,t,n,r){return r.settings.allowDangerousHtml?e.value:bt(e,t,n,r)}function lo(e,t,n,r){return r.all(e)}var co=jr("type",{invalid:ba,unknown:ya,handlers:{comment:Jr,doctype:Qr,element:io,raw:ao,root:lo,text:bt}});function ba(e){throw new Error("Expected node, not `"+e+"`")}function ya(e){let t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}var ka={},wa={},Ca=[];function pn(e,t){let n=t||ka,r=n.quote||'"',o=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Sa,all:va,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Pr,characterReferences:n.characterReferences||wa,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?ft:Gr,quote:r,alternative:o}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Sa(e,t,n){return co(e,t,n,this)}function va(e){let t=[],n=e&&e.children||Ca,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}var uo=/\s+/g;function go(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(uo)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(uo);for(let r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function _a(e){let t=ae(e,!0).map(([o])=>o);function n(o){if(o===e.length)return{line:t.length-1,character:t.at(-1).length};let s=o,i=0;for(let a of t){if(s<a.length)break;s-=a.length,i++}return{line:i,character:s}}function r(o,s){let i=0;for(let a=0;a<o;a++)i+=t[a].length;return i+=s,i}return{lines:t,indexToPos:n,posToIndex:r}}var xa=["color","background-color"];function Ea(e,t){let n=0,r=[];for(let o of t)o>n&&r.push({...e,content:e.content.slice(n,o),offset:e.offset+n}),n=o;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function Ia(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((r,o)=>r-o);return n.length?e.map(r=>r.flatMap(o=>{let s=n.filter(i=>o.offset<i&&i<o.offset+o.content.length).map(i=>i-o.offset).sort((i,a)=>i-a);return s.length?Ea(o,s):o})):e}function St(e,t,n,r,o="css-vars"){let s={content:e.content,explanation:e.explanation,offset:e.offset},i=t.map(u=>yt(e.variants[u])),a=new Set(i.flatMap(u=>Object.keys(u))),l={},c=(u,d)=>{let h=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[u]+(d==="color"?"":h)};return i.forEach((u,d)=>{for(let h of a){let f=u[h]||"inherit";if(d===0&&r&&xa.includes(h))if(r==="light-dark()"&&i.length>1){let g=t.findIndex(y=>y==="light"),m=t.findIndex(y=>y==="dark");if(g===-1||m===-1)throw new I('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');l[h]=`light-dark(${i[g][h]||"inherit"}, ${i[m][h]||"inherit"})`,o==="css-vars"&&(l[c(d,h)]=f)}else l[h]=f;else o==="css-vars"&&(l[c(d,h)]=f)}}),s.htmlStyle=l,s}function yt(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&O.Italic&&(t["font-style"]="italic"),e.fontStyle&O.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&O.Underline&&n.push("underline"),e.fontStyle&O.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function bn(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function Aa(){let e=new WeakMap;function t(n){if(!e.has(n.meta)){let o=function(i){if(typeof i=="number"){if(i<0||i>n.source.length)throw new I(`Invalid decoration offset: ${i}. Code length: ${n.source.length}`);return{...r.indexToPos(i),offset:i}}else{let a=r.lines[i.line];if(a===void 0)throw new I(`Invalid decoration position ${JSON.stringify(i)}. Lines length: ${r.lines.length}`);let l=i.character;if(l<0&&(l=a.length+l),l<0||l>a.length)throw new I(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${a.length}`);return{...i,character:l,offset:r.posToIndex(i.line,l)}}},r=_a(n.source),s=(n.options.decorations||[]).map(i=>({...i,start:o(i.start),end:o(i.end)}));Ra(s),e.set(n.meta,{decorations:s,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return Ia(n,t(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;let r=t(this),o=[...n.children].filter(u=>u.type==="element"&&u.tagName==="span");if(o.length!==r.converter.lines.length)throw new I(`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 s(u,d,h,f){let g=o[u],m="",y=-1,b=-1;if(d===0&&(y=0),h===0&&(b=0),h===Number.POSITIVE_INFINITY&&(b=g.children.length),y===-1||b===-1)for(let w=0;w<g.children.length;w++)m+=po(g.children[w]),y===-1&&m.length===d&&(y=w+1),b===-1&&m.length===h&&(b=w+1);if(y===-1)throw new I(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);if(b===-1)throw new I(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);let p=g.children.slice(y,b);if(!f.alwaysWrap&&p.length===g.children.length)a(g,f,"line");else if(!f.alwaysWrap&&p.length===1&&p[0].type==="element")a(p[0],f,"token");else{let w={type:"element",tagName:"span",properties:{},children:p};a(w,f,"wrapper"),g.children.splice(y,p.length,w)}}function i(u,d){o[u]=a(o[u],d,"line")}function a(u,d,h){let f=d.properties||{},g=d.transform||(m=>m);return u.tagName=d.tagName||"span",u.properties={...u.properties,...f,class:u.properties.class},d.properties?.class&&go(u,d.properties.class),u=g(u,h)||u,u}let l=[],c=r.decorations.sort((u,d)=>d.start.offset-u.start.offset||u.end.offset-d.end.offset);for(let u of c){let{start:d,end:h}=u;if(d.line===h.line)s(d.line,d.character,h.character,u);else if(d.line<h.line){s(d.line,d.character,Number.POSITIVE_INFINITY,u);for(let f=d.line+1;f<h.line;f++)l.unshift(()=>i(f,u));s(h.line,0,h.character,u)}}l.forEach(u=>u())}}}function Ra(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new I(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let o=e[r],s=n.start.offset<=o.start.offset&&o.start.offset<n.end.offset,i=n.start.offset<o.end.offset&&o.end.offset<=n.end.offset,a=o.start.offset<=n.start.offset&&n.start.offset<o.end.offset,l=o.start.offset<n.end.offset&&n.end.offset<=o.end.offset;if(s||i||a||l){if(s&&i||a&&l||a&&n.start.offset===n.end.offset||i&&o.start.offset===o.end.offset)continue;throw new I(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`)}}}}function po(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(po).join(""):""}var Na=[Aa()];function kt(e){let t=Ba(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Na]}function Ba(e){let t=[],n=[],r=[];for(let o of e)switch(o.enforce){case"pre":t.push(o);break;case"post":n.push(o);break;default:r.push(o)}return{pre:t,post:n,normal:r}}var ye=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],mn={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Ta(e,t){let n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){let r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function fo(e){let t=e.shift();if(t==="2"){let n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){let n=e.shift();if(n)return{type:"table",index:Number(n)}}}function La(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)mn[r]&&t.push({type:"setDecoration",value:mn[r]});else if(r<=29){let o=mn[r-20];o&&(t.push({type:"resetDecoration",value:o}),o==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:ye[r-30]}});else if(r===38){let o=fo(e);o&&t.push({type:"setForegroundColor",value:o})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:ye[r-40]}});else if(r===48){let o=fo(e);o&&t.push({type:"setBackgroundColor",value:o})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:ye[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:ye[r-100+8]}})}return t}function Pa(){let e=null,t=null,n=new Set;return{parse(r){let o=[],s=0;do{let i=Ta(r,s),a=i.sequence?r.substring(s,i.startPosition):r.substring(s);if(a.length>0&&o.push({value:a,foreground:e,background:t,decorations:new Set(n)}),i.sequence){let l=La(i.sequence);for(let c of l)c.type==="resetAll"?(e=null,t=null,n.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&n.delete(c.value);for(let c of l)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&n.add(c.value)}s=i.position}while(s<r.length);return o}}}var Ma={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 $a(e=Ma){function t(a){return e[a]}function n(a){return`#${a.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function o(){if(r)return r;r=[];for(let c=0;c<ye.length;c++)r.push(t(ye[c]));let a=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let d=0;d<6;d++)r.push(n([a[c],a[u],a[d]]));let l=8;for(let c=0;c<24;c++,l+=10)r.push(n([l,l,l]));return r}function s(a){return o()[a]}function i(a){switch(a.type){case"named":return t(a.name);case"rgb":return n(a.rgb);case"table":return s(a.index)}}return{value:i}}var Fa=/#([0-9a-f]{3,8})/i,Oa=/var\((--[\w-]+-ansi-[\w-]+)\)/,Ga={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 Da(e,t,n){let r=ge(e,n),o=ae(t),s=$a(Object.fromEntries(ye.map(a=>{let l=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`;return[a,e.colors?.[l]||Ga[a]]}))),i=Pa();return o.map(a=>i.parse(a[0]).map(l=>{let c,u;l.decorations.has("reverse")?(c=l.background?s.value(l.background):e.bg,u=l.foreground?s.value(l.foreground):e.fg):(c=l.foreground?s.value(l.foreground):e.fg,u=l.background?s.value(l.background):void 0),c=U(c,r),u=U(u,r),l.decorations.has("dim")&&(c=ja(c));let d=O.None;return l.decorations.has("bold")&&(d|=O.Bold),l.decorations.has("italic")&&(d|=O.Italic),l.decorations.has("underline")&&(d|=O.Underline),l.decorations.has("strikethrough")&&(d|=O.Strikethrough),{content:l.value,offset:a[1],color:c,bgColor:u,fontStyle:d}}))}function ja(e){let t=e.match(Fa);if(t){let r=t[1];if(r.length===8){let 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){let o=r[0],s=r[1],i=r[2],a=r[3];return`#${o}${o}${s}${s}${i}${i}${Math.round(Number.parseInt(`${a}${a}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){let o=r[0],s=r[1],i=r[2];return`#${o}${o}${s}${s}${i}${i}80`}}}let n=e.match(Oa);return n?`var(${n[1]}-dim)`:e}function yn(e,t,n={}){let r=e.resolveLangAlias(n.lang||"text"),{theme:o=e.getLoadedThemes()[0]}=n;if(!je(r)&&!He(o)&&r==="ansi"){let{theme:s}=e.setTheme(o);return Da(s,t,n)}return tn(e,t,n)}function wt(e,t,n){let r,o,s,i,a,l;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=n,h=Object.entries(n.themes).filter(b=>b[1]).map(b=>({color:b[0],theme:b[1]})).sort((b,p)=>b.color===c?-1:p.color===c?1:0);if(h.length===0)throw new I("`themes` option must not be empty");let f=lt(e,t,n,yn);if(l=Ee(f),c&&c!=="light-dark()"&&!h.some(b=>b.color===c))throw new I(`\`themes\` option must contain the defaultColor key \`${c}\``);let g=h.map(b=>e.getTheme(b.theme)),m=h.map(b=>b.color);s=f.map(b=>b.map(p=>St(p,m,u,c,d))),l&&Ue(s,l);let y=h.map(b=>ge(b.theme,n));o=ho(h,g,y,u,c,"fg",d),r=ho(h,g,y,u,c,"bg",d),i=`shiki-themes ${g.map(b=>b.name).join(" ")}`,a=c?void 0:[o,r].join(";")}else if("theme"in n){let c=ge(n.theme,n);s=yn(e,t,n);let u=e.getTheme(n.theme);r=U(u.bg,c),o=U(u.fg,c),i=u.name,l=Ee(s)}else throw new I("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:o,bg:r,themeName:i,rootStyle:a,grammarState:l}}function ho(e,t,n,r,o,s,i){return e.map((a,l)=>{let c=U(t[l][s],n[l])||"inherit",u=`${r+a.color}${s==="bg"?"-bg":""}:${c}`;if(l===0&&o){if(o==="light-dark()"&&e.length>1){let d=e.findIndex(f=>f.color==="light"),h=e.findIndex(f=>f.color==="dark");if(d===-1||h===-1)throw new I('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${U(t[d][s],n[d])||"inherit"}, ${U(t[h][s],n[h])||"inherit"});${u}`}return c}return i==="css-vars"?u:null}).filter(a=>!!a).join(";")}var mo=/^\s+$/,Ha=/^(\s*)(.*?)(\s*)$/;function Ct(e,t,n,r={meta:{},options:n,codeToHast:(o,s)=>Ct(e,o,s),codeToTokens:(o,s)=>wt(e,o,s)}){let o=t;for(let g of kt(n))o=g.preprocess?.call(r,o,n)||o;let{tokens:s,fg:i,bg:a,themeName:l,rootStyle:c,grammarState:u}=wt(e,o,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:h=!1}=n;d===!0?s=Ua(s):d==="never"&&(s=Wa(s)),h&&(s=za(s));let f={...r,get source(){return o}};for(let g of kt(n))s=g.tokens?.call(f,s)||s;return kn(s,{...n,fg:i,bg:a,themeName:l,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},f,u)}function kn(e,t,n,r=Ee(e)){let o=kt(t),s=[],i={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=t,c={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(let[m,y]of Object.entries(t.meta||{}))m.startsWith("_")||(c[m]=y);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:s},h=[],f={...n,structure:a,addClassToHast:go,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return i},get pre(){return u},get code(){return d},get lines(){return h}};if(e.forEach((m,y)=>{y&&(a==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&s.push({type:"text",value:`
12
+ `}));let b={type:"element",tagName:"span",properties:{class:"line"},children:[]},p=0;for(let w of m){let C={type:"element",tagName:"span",properties:{...w.htmlAttrs},children:[{type:"text",value:w.content}]},S=bn(w.htmlStyle||yt(w));S&&(C.properties.style=S);for(let E of o)C=E?.span?.call(f,C,y+1,p,b,w)||C;a==="inline"?i.children.push(C):a==="classic"&&b.children.push(C),p+=w.content.length}if(a==="classic"){for(let w of o)b=w?.line?.call(f,b,y+1)||b;h.push(b),s.push(b)}else a==="inline"&&h.push(b)}),a==="classic"){for(let m of o)d=m?.code?.call(f,d)||d;u.children.push(d);for(let m of o)u=m?.pre?.call(f,u)||u;i.children.push(u)}else if(a==="inline"){let m=[],y={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let p of i.children)p.type==="element"&&p.tagName==="br"?(m.push(y),y={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(p.type==="element"||p.type==="text")&&y.children.push(p);m.push(y);let b={type:"element",tagName:"code",properties:{},children:m};for(let p of o)b=p?.code?.call(f,b)||b;i.children=[];for(let p=0;p<b.children.length;p++){p>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});let w=b.children[p];w.type==="element"&&i.children.push(...w.children)}}let g=i;for(let m of o)g=m?.root?.call(f,g)||g;return r&&Ue(g,r),g}function Ua(e){return e.map(t=>{let n=[],r="",o;return t.forEach((s,i)=>{let a=!(s.fontStyle&&(s.fontStyle&O.Underline||s.fontStyle&O.Strikethrough));a&&mo.test(s.content)&&t[i+1]?(o===void 0&&(o=s.offset),r+=s.content):r?(a?n.push({...s,offset:o,content:r+s.content}):n.push({content:r,offset:o},s),o=void 0,r=""):n.push(s)}),n})}function Wa(e){return e.map(t=>t.flatMap(n=>{if(mo.test(n.content))return n;let r=n.content.match(Ha);if(!r)return n;let[,o,s,i]=r;if(!o&&!i)return n;let a=[{...n,offset:n.offset+o.length,content:s}];return o&&a.unshift({content:o,offset:n.offset}),i&&a.push({content:i,offset:n.offset+o.length+s.length}),a}))}function za(e){return e.map(t=>{let n=[];for(let r of t){if(n.length===0){n.push({...r});continue}let o=n.at(-1),s=bn(o.htmlStyle||yt(o)),i=bn(r.htmlStyle||yt(r)),a=o.fontStyle&&(o.fontStyle&O.Underline||o.fontStyle&O.Strikethrough),l=r.fontStyle&&(r.fontStyle&O.Underline||r.fontStyle&O.Strikethrough);!a&&!l&&s===i?o.content+=r.content:n.push({...r})}return n})}var wn=pn;function qa(e,t,n){let r={meta:{},options:n,codeToHast:(s,i)=>Ct(e,s,i),codeToTokens:(s,i)=>wt(e,s,i)},o=wn(Ct(e,t,n,r));for(let s of kt(n))o=s.postprocess?.call(r,o,n)||o;return o}async function bo(e){let t=await en(e);return{getLastGrammarState:(...n)=>Tr(t,...n),codeToTokensBase:(n,r)=>yn(t,n,r),codeToTokensWithThemes:(n,r)=>lt(t,n,r),codeToTokens:(n,r)=>wt(t,n,r),codeToHast:(n,r)=>Ct(t,n,r),codeToHtml:(n,r)=>qa(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}var yo=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:o}=t;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(s=>{if(typeof s!="string")return s;let i=r?.get(s);if(i){if(i instanceof RegExp)return i;if(n)return null;throw i}try{let a=o(s);return r?.set(s,a),a}catch(a){if(r?.set(s,a),n)return null;throw a}})}findNextMatchSync(e,t,n){let r=typeof e=="string"?e:e.content,o=[];function s(i,a,l=0){return{index:i,captureIndices:a.indices.map(c=>c==null?{start:4294967295,end:4294967295,length:0}:{start:c[0]+l,end:c[1]+l,length:c[1]-c[0]})}}for(let i=0;i<this.regexps.length;i++){let a=this.regexps[i];if(a)try{a.lastIndex=t;let l=a.exec(r);if(!l)continue;if(l.index===t)return s(i,l,0);o.push([i,l,0])}catch(l){if(this.options.forgiving)continue;throw l}}if(o.length){let i=Math.min(...o.map(a=>a[1].index));for(let[a,l,c]of o)if(l.index===i)return s(a,l,c)}return null}};function le(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function ko(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var Ve=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),P=String.raw;function te(e,t){if(e==null)throw new Error(t??"Value expected");return e}var xo=P`\[\^?`,Eo=`c.? | C(?:-.?)?|${P`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${P`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${P`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${P`o\{[^\}]*\}?`}|${P`\d{1,3}`}`,Sn=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,vt=new RegExp(P`
13
+ \\ (?:
14
+ ${Eo}
15
+ | [gk]<[^>]*>?
16
+ | [gk]'[^']*'?
17
+ | .
18
+ )
19
+ | \( (?:
20
+ \? (?:
21
+ [:=!>({]
22
+ | <[=!]
23
+ | <[^>]*>
24
+ | '[^']*'
25
+ | ~\|?
26
+ | #(?:[^)\\]|\\.?)*
27
+ | [^:)]*[:)]
28
+ )?
29
+ | \*[^\)]*\)?
30
+ )?
31
+ | (?:${Sn.source})+
32
+ | ${xo}
33
+ | .
34
+ `.replace(/\s+/g,""),"gsu"),Cn=new RegExp(P`
35
+ \\ (?:
36
+ ${Eo}
37
+ | .
38
+ )
39
+ | \[:(?:\^?\p{Alpha}+|\^):\]
40
+ | ${xo}
41
+ | &&
42
+ | .
43
+ `.replace(/\s+/g,""),"gsu");function Io(e,t={}){let n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");let r=dl(n.flags),o=[r.extended],s={captureGroup:n.rules.captureGroup,getCurrentModX(){return o.at(-1)},numOpenGroups:0,popModX(){o.pop()},pushModX(d){o.push(d)},replaceCurrentModX(d){o[o.length-1]=d},singleline:n.rules.singleline},i=[],a;for(vt.lastIndex=0;a=vt.exec(e);){let d=Va(s,e,a[0],vt.lastIndex);d.tokens?i.push(...d.tokens):d.token&&i.push(d.token),d.lastIndex!==void 0&&(vt.lastIndex=d.lastIndex)}let l=[],c=0;i.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++c:d.raw==="("&&l.push(d)}),c||l.forEach((d,h)=>{d.kind="capturing",d.number=h+1});let u=c||l.length;return{tokens:i.map(d=>d.type==="EscapedNumber"?hl(d,u):d).flat(),flags:r}}function Va(e,t,n,r){let[o,s]=n;if(n==="["||n==="[^"){let i=Xa(t,n,r);return{tokens:i.tokens,lastIndex:i.lastIndex}}if(o==="\\"){if("AbBGyYzZ".includes(s))return{token:wo(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:ol(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Ro(n)}}if(s==="K")return{token:No("keep",n)};if(s==="N"||s==="R")return{token:ke("newline",n,{negate:s==="N"})};if(s==="O")return{token:ke("any",n)};if(s==="X")return{token:ke("text_segment",n)};let i=Ao(n,{inCharClass:!1});return Array.isArray(i)?{tokens:i}:{token:i}}if(o==="("){if(s==="*")return{token:ll(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:al(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Ie("group",n)};if(n==="(?>")return{token:Ie("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Ie(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Ie("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Ie("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:tl(n)}}if(e.getCurrentModX()){if(n==="#"){let i=t.indexOf(`
44
+ `,r);return{lastIndex:i===-1?t.length:i}}if(/^\s$/.test(n)){let i=/\s+/y;return i.lastIndex=r,{lastIndex:i.exec(t)?i.lastIndex:r}}}if(n===".")return{token:ke("dot",n)};if(n==="^"||n==="$"){let i=e.singleline?{"^":P`\A`,$:P`\Z`}[n]:n;return{token:wo(i,n)}}return n==="|"?{token:Ka(n)}:Sn.test(n)?{tokens:gl(n)}:{token:ne(le(n),n)}}function Xa(e,t,n){let r=[Co(t[1]==="^",t)],o=1,s;for(Cn.lastIndex=n;s=Cn.exec(e);){let i=s[0];if(i[0]==="["&&i[1]!==":")o++,r.push(Co(i[1]==="^",i));else if(i==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(ne(93,i));else if(o--,r.push(Ja(i)),!o)break}else{let a=Ya(i);Array.isArray(a)?r.push(...a):r.push(a)}}return{tokens:r,lastIndex:Cn.lastIndex||e.length}}function Ya(e){if(e[0]==="\\")return Ao(e,{inCharClass:!0});if(e[0]==="["){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Ve.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return ke("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?Qa(e):e==="&&"?Za(e):ne(le(e),e)}function Ao(e,{inCharClass:t}){let n=e[1];if(n==="c"||n==="C")return il(e);if("dDhHsSwW".includes(n))return cl(e);if(e.startsWith(P`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return ul(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{let r=e.split(/\\x/).slice(1).map(i=>parseInt(i,16)),o=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),s=new TextEncoder;return[...o].map(i=>{let a=[...s.encode(i)].map(l=>`\\x${l.toString(16)}`).join("");return ne(le(i),a)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return ne(fl(e),e);if(So.has(n))return ne(So.get(n),e);if(/\d/.test(n))return el(t,e);if(e==="\\")throw new Error(P`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return ne(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Ka(e){return{type:"Alternator",raw:e}}function wo(e,t){return{type:"Assertion",kind:e,raw:t}}function Ro(e){return{type:"Backreference",raw:e}}function ne(e,t){return{type:"Character",value:e,raw:t}}function Ja(e){return{type:"CharacterClassClose",raw:e}}function Qa(e){return{type:"CharacterClassHyphen",raw:e}}function Za(e){return{type:"CharacterClassIntersector",raw:e}}function Co(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function ke(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function No(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:te(n.flags),raw:t}}function el(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function tl(e){return{type:"GroupClose",raw:e}}function Ie(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function nl(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function rl(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function ol(e){return{type:"Subroutine",raw:e}}var sl=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),So=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function il(e){let t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return ne(le(t.toUpperCase())-64,e)}function al(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";let o=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),s=_o(n),i=_o(r),a={};if(s&&(a.enable=s),i&&(a.disable=i),e.endsWith(")"))return t.replaceCurrentModX(o),No("flags",e,{flags:a});if(e.endsWith(":"))return t.pushModX(o),t.numOpenGroups++,Ie("group",e,{...(s||i)&&{flags:a}});throw new Error(`Unexpected flag modifier "${e}"`)}function ll(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:o}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);let s=o?o.split(",").filter(u=>u!=="").map(u=>/^[+-]?\d+$/.test(u)?+u:u):[],[i,a,l]=s,c=sl.has(n)?n.toLowerCase():"custom";switch(c){case"fail":case"mismatch":case"skip":if(s.length>0)throw new Error(`Named callout arguments not allowed "${s}"`);break;case"error":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(typeof i=="string")throw new Error(`Named callout argument must be a number "${i}"`);break;case"max":if(!s.length||s.length>2)throw new Error(`Named callout must have one or two arguments "${s}"`);if(typeof i=="string"&&!/^[A-Za-z_]\w*$/.test(i))throw new Error(`Named callout argument one must be a tag or number "${i}"`);if(s.length===2&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${a}"`);break;case"count":case"total_count":if(s.length>1)throw new Error(`Named callout allows only one argument "${s}"`);if(s.length===1&&(typeof i=="number"||!/^[<>X]$/.test(i)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${i}"`);break;case"cmp":if(s.length!==3)throw new Error(`Named callout must have three arguments "${s}"`);if(typeof i=="string"&&!/^[A-Za-z_]\w*$/.test(i))throw new Error(`Named callout argument one must be a tag or number "${i}"`);if(typeof a=="number"||!/^(?:[<>!=]=|[<>])$/.test(a))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${a}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${c}"`)}return nl(c,r??null,o?.split(",")??null,e)}function vo(e){let t=null,n,r;if(e[0]==="{"){let{minStr:o,maxStr:s}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,i=1e5;if(+o>i||s&&+s>i)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+o,r=s===void 0?+o:s===""?1/0:+s,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return rl(t,n,r,e)}function cl(e){let t=e[1].toLowerCase();return ke({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function ul(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return ke("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function _o(e){let t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function dl(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function fl(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);let t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function hl(e,t){let{raw:n,inCharClass:r}=e,o=n.slice(1);if(!r&&(o!=="0"&&o.length===1||o[0]!=="0"&&+o<=t))return[Ro(n)];let s=[],i=o.match(/^[0-7]+|\d/g);for(let a=0;a<i.length;a++){let l=i[a],c;if(a===0&&l!=="8"&&l!=="9"){if(c=parseInt(l,8),c>127)throw new Error(P`Octal encoded byte above 177 unsupported "${n}"`)}else c=le(l);s.push(ne(c,(a===0?"\\":"")+l))}return s}function gl(e){let t=[],n=new RegExp(Sn,"gy"),r;for(;r=n.exec(e);){let o=r[0];if(o[0]==="{"){let s=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(o);if(s){let{min:i,max:a}=s.groups;if(+i>+a&&o.endsWith("?")){n.lastIndex--,t.push(vo(o.slice(0,-1)));continue}}}t.push(vo(o))}return t}function _t(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function Bo(e){return pl.has(e.type)}var pl=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Et(e,t={}){let n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=Io(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),o=(h,f)=>{let g=r.tokens[s.nextIndex];switch(s.parent=h,s.nextIndex++,g.type){case"Alternator":return re();case"Assertion":return ml(g);case"Backreference":return bl(g,s);case"Character":return Ae(g.value,{useLastValid:!!f.isCheckingRangeEnd});case"CharacterClassHyphen":return yl(g,s,f);case"CharacterClassOpen":return kl(g,s,f);case"CharacterSet":return wl(g,s);case"Directive":return El(g.kind,{flags:g.flags});case"GroupOpen":return Cl(g,s,f);case"NamedCallout":return Al(g.kind,g.tag,g.arguments);case"Quantifier":return Sl(g,s);case"Subroutine":return vl(g,s);default:throw new Error(`Unexpected token type "${g.type}"`)}},s={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:o},i=Nl(Il(r.flags)),a=i.body[0];for(;s.nextIndex<r.tokens.length;){let h=o(a,{});h.type==="Alternative"?(i.body.push(h),a=h):a.body.push(h)}let{capturingGroups:l,hasNumberedRef:c,namedGroupsByName:u,subroutines:d}=s;if(c&&u.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:h}of d)if(typeof h=="number"){if(h>l.length)throw new Error("Subroutine uses a group number that's not defined");h&&(l[h-1].isSubroutined=!0)}else if(u.has(h)){if(u.get(h).length>1)throw new Error(P`Subroutine uses a duplicate group name "\g<${h}>"`);u.get(h)[0].isSubroutined=!0}else throw new Error(P`Subroutine uses a group name that's not defined "\g<${h}>"`);return i}function ml({kind:e}){return It(te({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===P`\B`||e===P`\Y`})}function bl({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),o=(s,i=!1)=>{let a=t.capturingGroups.length,l=!1;if(s>a)if(t.skipBackrefValidation)l=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,xt(i?a+1-s:s,{orphan:l})};if(n){let s=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(s)return o(+s.groups.num,!!s.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return xt(r)}return o(+r)}function yl(e,t,n){let{tokens:r,walk:o}=t,s=t.parent,i=s.body.at(-1),a=r[t.nextIndex];if(!n.isCheckingRangeEnd&&i&&i.type!=="CharacterClass"&&i.type!=="CharacterClassRange"&&a&&a.type!=="CharacterClassOpen"&&a.type!=="CharacterClassClose"&&a.type!=="CharacterClassIntersector"){let l=o(s,{...n,isCheckingRangeEnd:!0});if(i.type==="Character"&&l.type==="Character")return s.body.pop(),xl(i,l);throw new Error("Invalid character class range")}return Ae(le("-"))}function kl({negate:e},t,n){let{tokens:r,walk:o}=t,s=[Xe()],i=r[t.nextIndex],a=Po(i);for(;a.type!=="CharacterClassClose";){if(a.type==="CharacterClassIntersector")s.push(Xe()),t.nextIndex++;else{let c=s.at(-1);c.body.push(o(c,n))}a=Po(r[t.nextIndex],i)}let l=Xe({negate:e});return s.length===1?l.body=s[0].body:(l.kind="intersection",l.body=s.map(c=>c.body.length===1?c.body[0]:c)),t.nextIndex++,l}function wl({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:i}=r;if(e==="property"){let a=Re(n);if(Ve.has(a)&&!i?.has(a))e="posix",n=a;else return we(n,{negate:t,normalizeUnknownPropertyNames:o,skipPropertyNameValidation:s,unicodePropertyMap:i})}return e==="posix"?Rl(n,{negate:t}):At(e,{negate:t})}function Cl(e,t,n){let{tokens:r,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:i,walk:a}=t,l=Bl(e),c=l.type==="AbsenceFunction",u=Lo(l),d=u&&l.negate;if(l.type==="CapturingGroup"&&(o.push(l),l.name&&ko(s,l.name,[]).push(l)),c&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let h=Mo(r[t.nextIndex]);for(;h.type!=="GroupClose";){if(h.type==="Alternator")l.body.push(re()),t.nextIndex++;else{let f=l.body.at(-1),g=a(f,{...n,isInAbsenceFunction:n.isInAbsenceFunction||c,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(f.body.push(g),(u||n.isInLookbehind)&&!i){let m="Lookbehind includes a pattern not allowed by Oniguruma";if(d||n.isInNegLookbehind){if(To(g)||g.type==="CapturingGroup")throw new Error(m)}else if(To(g)||Lo(g)&&g.negate)throw new Error(m)}}h=Mo(r[t.nextIndex])}return t.nextIndex++,l}function Sl({kind:e,min:t,max:n},r){let o=r.parent,s=o.body.at(-1);if(!s||!Bo(s))throw new Error("Quantifier requires a repeatable token");let i=_n(e,t,n,s);return o.body.pop(),i}function vl({raw:e},t){let{capturingGroups:n,subroutines:r}=t,o=e.slice(3,-1),s=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(o);if(s){let a=+s.groups.num,l=n.length;if(t.hasNumberedRef=!0,o={"":a,"+":l+a,"-":l+1-a}[s.groups.sign],o<1)throw new Error("Invalid subroutine number")}else o==="0"&&(o=0);let i=xn(o);return r.push(i),i}function _l(e,t){if(e!=="repeater")throw new Error(`Unexpected absence function kind "${e}"`);return{type:"AbsenceFunction",kind:e,body:Ye(t?.body)}}function re(e){return{type:"Alternative",body:$o(e?.body)}}function It(e,t){let n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function xt(e,t){let n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function vn(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Tl(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Ye(t?.body)}}function Ae(e,t){let n={useLastValid:!1,...t};if(e>1114111){let r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function Xe(e){let t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:$o(e?.body)}}function xl(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function At(e,t){let n=!!t?.negate,r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function El(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:te(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function Il(e){return{type:"Flags",...e}}function W(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Ye(e?.body)}}function ce(e){let t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Ye(e?.body)}}function Al(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function Rl(e,t){let n=!!t?.negate;if(!Ve.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function _n(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function Nl(e,t){return{type:"Regex",body:Ye(t?.body),flags:e}}function xn(e){return{type:"Subroutine",ref:e}}function we(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(Re(e));if(!r){if(n.normalizeUnknownPropertyNames)r=Ll(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(P`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function Bl({flags:e,kind:t,name:n,negate:r,number:o}){switch(t){case"absence_repeater":return _l("repeater");case"atomic":return W({atomic:!0});case"capturing":return vn(o,{name:n});case"group":return W({flags:e});case"lookahead":case"lookbehind":return ce({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function Ye(e){if(e===void 0)e=[re()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function $o(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function To(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function Lo(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function Tl(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Ll(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Re(e){return e.replace(/[- _]+/g,"").toLowerCase()}function Po(e,t){let n=t;return te(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function Mo(e){return te(e,"Unclosed group")}function Ce(e,t,n=null){function r(s,i){for(let a=0;a<s.length;a++){let l=o(s[a],i,a,s);a=Math.max(-1,a+l)}}function o(s,i=null,a=null,l=null){let c=0,u=!1,d={node:s,parent:i,key:a,container:l,root:e,remove(){Rt(l).splice(Math.max(0,Ne(a)+c),1),c--,u=!0},removeAllNextSiblings(){return Rt(l).splice(Ne(a)+1)},removeAllPrevSiblings(){let b=Ne(a)+c;return c-=b,Rt(l).splice(0,Math.max(0,b))},replaceWith(b,p={}){let w=!!p.traverse;l?l[Math.max(0,Ne(a)+c)]=b:te(i,"Can't replace root node")[a]=b,w&&o(b,i,a,l),u=!0},replaceWithMultiple(b,p={}){let w=!!p.traverse;if(Rt(l).splice(Math.max(0,Ne(a)+c),1,...b),c+=b.length-1,w){let C=0;for(let S=0;S<b.length;S++)C+=o(b[S],i,Ne(a)+S+C,l)}u=!0},skip(){u=!0}},{type:h}=s,f=t["*"],g=t[h],m=typeof f=="function"?f:f?.enter,y=typeof g=="function"?g:g?.enter;if(m?.(d,n),y?.(d,n),!u)switch(h){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(s.body,s);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":o(s.min,s,"min"),o(s.max,s,"max");break;case"Quantifier":o(s.body,s,"body");break;case"Regex":r(s.body,s),o(s.flags,s,"flags");break;default:throw new Error(`Unexpected node type "${h}"`)}return g?.exit?.(d,n),f?.exit?.(d,n),c}return o(e),e}function Rt(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Ne(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}var Fo=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Oo(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Go(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var H=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function Ke(e,t,n,r){let o=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),s=[!1],i=0,a="";for(let l of e.matchAll(o)){let{0:c,groups:{$skip:u}}=l;if(!u&&(!r||r===H.DEFAULT==!i)){n instanceof Function?a+=n(l,{context:i?H.CHAR_CLASS:H.DEFAULT,negated:s[s.length-1]}):a+=n;continue}c[0]==="["?(i++,s.push(c[1]==="^")):c==="]"&&i&&(i--,s.pop()),a+=c}return a}function En(e,t,n,r){Ke(e,t,n,r)}function Pl(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;let o=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");o.lastIndex=n;let s=0,i;for(;i=o.exec(e);){let{0:a,groups:{$skip:l}}=i;if(!l&&(!r||r===H.DEFAULT==!s))return i;a==="["?s++:a==="]"&&s&&s--,o.lastIndex==i.index&&o.lastIndex++}return null}function Je(e,t,n){return!!Pl(e,t,0,n)}function Do(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,o=0,s=1,i;for(;i=n.exec(e);){let[a]=i;if(a==="[")o++;else if(o)a==="]"&&o--;else if(a==="(")s++;else if(a===")"&&(s--,!s)){r=i.index;break}}return e.slice(t,r)}var jo=new RegExp(String.raw`(?<noncapturingStart>${Fo})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function An(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let o="(?>",s="(?:(?=(",i=[0],a=[],l=0,c=0,u=NaN,d;do{d=!1;let h=0,f=0,g=!1,m;for(jo.lastIndex=Number.isNaN(u)?0:u+s.length;m=jo.exec(e);){let{0:y,index:b,groups:{capturingStart:p,noncapturingStart:w}}=m;if(y==="[")h++;else if(h)y==="]"&&h--;else if(y===o&&!g)u=b,g=!0;else if(g&&w)f++;else if(p)g?f++:(l++,i.push(l+c));else if(y===")"&&g){if(!f){c++;let C=l+c;if(e=`${e.slice(0,u)}${s}${e.slice(u+o.length,b)}))<$$${C}>)${e.slice(b+1)}`,d=!0,a.push(C),Oo(n,C),r.size){let S=new Map;r.forEach((E,R)=>{S.set(R>=C?R+1:R,E.map(F=>F>=C?F+1:F))}),r=S}break}f--}}}while(d);return n.push(...a),e=Ke(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:h,groups:{backrefNum:f,wrappedBackrefNum:g}})=>{if(f){let m=+f;if(m>i.length-1)throw new Error(`Backref "${h}" greater than number of captures`);return`\\${i[m]}`}return`\\${g}`},H.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var Ho=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,In=new RegExp(String.raw`
45
+ \\(?: \d+
46
+ | c[A-Za-z]
47
+ | [gk]<[^>]+>
48
+ | [pPu]\{[^\}]+\}
49
+ | u[A-Fa-f\d]{4}
50
+ | x[A-Fa-f\d]{2}
51
+ )
52
+ | \((?: \? (?: [:=!>]
53
+ | <(?:[=!]|[^>]+>)
54
+ | [A-Za-z\-]+:
55
+ | \(DEFINE\)
56
+ ))?
57
+ | (?<qBase>${Ho})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
58
+ | \\?.
59
+ `.replace(/\s+/g,""),"gsu");function Rn(e){if(!new RegExp(`${Ho}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,o="",s=0,i;for(In.lastIndex=0;i=In.exec(e);){let{0:a,index:l,groups:{qBase:c,qMod:u,invalidQ:d}}=i;if(a==="[")s||(r=l),s++;else if(a==="]")s?s--:r=null;else if(!s)if(u==="+"&&o&&!o.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${a}"`);let h=-1;if(/^\{\d+\}$/.test(c))e=Go(e,l+c.length,u,"");else{if(o===")"||o==="]"){let f=o===")"?n:r;if(f===null)throw new Error(`Invalid unmatched "${o}"`);e=`${e.slice(0,f)}(?>${e.slice(f,l)}${c})${e.slice(l+a.length)}`}else e=`${e.slice(0,l-o.length)}(?>${o}${c})${e.slice(l+a.length)}`;h+=4}In.lastIndex+=h}else a[0]==="("?t.push(l):a===")"&&(n=t.length?t.pop():null);o=a}return{pattern:e}}var X=String.raw,Ml=X`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Bn=X`\(\?R=(?<rDepth>[^\)]+)\)|${Ml}`,Nt=X`\(\?<(?![=!])(?<captureName>[^>]+)>`,Vo=X`${Nt}|(?<unnamed>\()(?!\?)`,Se=new RegExp(X`${Nt}|${Bn}|\(\?|\\?.`,"gsu"),Nn="Cannot use multiple overlapping recursions";function Xo(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t},o=t?.captureTransfers??new Map;if(!new RegExp(Bn,"su").test(e))return{pattern:e,captureTransfers:o,hiddenCaptures:n};if(r==="plugin"&&Je(e,X`\(\?\(DEFINE\)`,H.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");let s=[],i=Je(e,X`\\[1-9]`,H.DEFAULT),a=new Map,l=[],c=!1,u=0,d=0,h;for(Se.lastIndex=0;h=Se.exec(e);){let{0:f,groups:{captureName:g,rDepth:m,gRNameOrNum:y,gRDepth:b}}=h;if(f==="[")u++;else if(u)f==="]"&&u--;else if(m){if(Uo(m),c)throw new Error(Nn);if(i)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let p=e.slice(0,h.index),w=e.slice(Se.lastIndex);if(Je(w,Bn,H.DEFAULT))throw new Error(Nn);let C=+m-1;e=Wo(p,w,C,!1,n,s,d),o=qo(o,p,C,s.length,0,d);break}else if(y){Uo(b);let p=!1;for(let A of l)if(A.name===y||A.num===+y){if(p=!0,A.hasRecursedWithin)throw new Error(Nn);break}if(!p)throw new Error(X`Recursive \g cannot be used outside the referenced group "${r==="external"?y:X`\g<${y}&R=${b}>`}"`);let w=a.get(y),C=Do(e,w);if(i&&Je(C,X`${Nt}|\((?!\?)`,H.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let S=e.slice(w,h.index),E=C.slice(S.length+f.length),R=s.length,F=+b-1,N=Wo(S,E,F,!0,n,s,d);o=qo(o,S,F,s.length-R,R,d);let K=e.slice(0,w),D=e.slice(w+C.length);e=`${K}${N}${D}`,Se.lastIndex+=N.length-f.length-S.length-E.length,l.forEach(A=>A.hasRecursedWithin=!0),c=!0}else if(g)d++,a.set(String(d),Se.lastIndex),a.set(g,Se.lastIndex),l.push({num:d,name:g});else if(f[0]==="("){let p=f==="(";p&&(d++,a.set(String(d),Se.lastIndex)),l.push(p?{num:d}:{})}else f===")"&&l.pop()}return n.push(...s),{pattern:e,captureTransfers:o,hiddenCaptures:n}}function Uo(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function Wo(e,t,n,r,o,s,i){let a=new Set;r&&En(e+t,Nt,({groups:{captureName:c}})=>{a.add(c)},H.DEFAULT);let l=[n,r?a:null,o,s,i];return`${e}${zo(`(?:${e}`,"forward",...l)}(?:)${zo(`${t})`,"backward",...l)}${t}`}function zo(e,t,n,r,o,s,i){let l=u=>t==="forward"?u+2:n-u+2-1,c="";for(let u=0;u<n;u++){let d=l(u);c+=Ke(e,X`${Vo}|\\k<(?<backref>[^>]+)>`,({0:h,groups:{captureName:f,unnamed:g,backref:m}})=>{if(m&&r&&!r.has(m))return h;let y=`_$${d}`;if(g||f){let b=i+s.length+1;return s.push(b),$l(o,b),g?h:`(?<${f}${y}>`}return X`\k<${m}${y}>`},H.DEFAULT)}return c}function $l(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function qo(e,t,n,r,o,s){if(e.size&&r){let i=0;En(t,Vo,()=>i++,H.DEFAULT);let a=s-i+o,l=new Map;return e.forEach((c,u)=>{let d=(r-i*n)/n,h=i*n,f=u>a+i?u+r:u,g=[];for(let m of c)if(m<=a)g.push(m);else if(m>a+i+d)g.push(m+r);else if(m<=a+i)for(let y=0;y<=n;y++)g.push(m+i*y);else for(let y=0;y<=n;y++)g.push(m+h+d*y);l.set(f,g)}),l}return e}var M=String.fromCodePoint,_=String.raw,Y={},Tt=globalThis.RegExp;Y.flagGroups=(()=>{try{new Tt("(?i:)")}catch{return!1}return!0})();Y.unicodeSets=(()=>{try{new Tt("[[]]","v")}catch{return!1}return!0})();Y.bugFlagVLiteralHyphenIsRange=Y.unicodeSets?(()=>{try{new Tt(_`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Y.bugNestedClassIgnoresNegation=Y.unicodeSets&&new Tt("[[^a]]","v").test("a");function Bt(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Qe(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function $n(e,t){return Yo[e]>=Yo[t]}function Fl(e,t){if(e==null)throw new Error(t??"Value expected");return e}var Yo={ES2025:2025,ES2024:2024,ES2018:2018},Ol={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function es(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!Ol[e.target])throw new Error(`Unexpected target "${e.target}"`);let t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Y.flagGroups?"ES2025":Y.unicodeSets?"ES2024":"ES2018"),t}var Gl="[ -\r ]",Dl=new Set([M(304),M(305)]),oe=_`[\p{L}\p{M}\p{N}\p{Pc}]`;function ts(e){if(Dl.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),o=Ul.get(n),s=jl.get(n),i=Hl.get(n);return[...r].length===1&&t.add(r),i&&t.add(i),o&&t.add(o),t.add(n),s&&t.add(s),[...t]}var On=new Map(`C Other
60
+ Cc Control cntrl
61
+ Cf Format
62
+ Cn Unassigned
63
+ Co Private_Use
64
+ Cs Surrogate
65
+ L Letter
66
+ LC Cased_Letter
67
+ Ll Lowercase_Letter
68
+ Lm Modifier_Letter
69
+ Lo Other_Letter
70
+ Lt Titlecase_Letter
71
+ Lu Uppercase_Letter
72
+ M Mark Combining_Mark
73
+ Mc Spacing_Mark
74
+ Me Enclosing_Mark
75
+ Mn Nonspacing_Mark
76
+ N Number
77
+ Nd Decimal_Number digit
78
+ Nl Letter_Number
79
+ No Other_Number
80
+ P Punctuation punct
81
+ Pc Connector_Punctuation
82
+ Pd Dash_Punctuation
83
+ Pe Close_Punctuation
84
+ Pf Final_Punctuation
85
+ Pi Initial_Punctuation
86
+ Po Other_Punctuation
87
+ Ps Open_Punctuation
88
+ S Symbol
89
+ Sc Currency_Symbol
90
+ Sk Modifier_Symbol
91
+ Sm Math_Symbol
92
+ So Other_Symbol
93
+ Z Separator
94
+ Zl Line_Separator
95
+ Zp Paragraph_Separator
96
+ Zs Space_Separator
97
+ ASCII
98
+ ASCII_Hex_Digit AHex
99
+ Alphabetic Alpha
100
+ Any
101
+ Assigned
102
+ Bidi_Control Bidi_C
103
+ Bidi_Mirrored Bidi_M
104
+ Case_Ignorable CI
105
+ Cased
106
+ Changes_When_Casefolded CWCF
107
+ Changes_When_Casemapped CWCM
108
+ Changes_When_Lowercased CWL
109
+ Changes_When_NFKC_Casefolded CWKCF
110
+ Changes_When_Titlecased CWT
111
+ Changes_When_Uppercased CWU
112
+ Dash
113
+ Default_Ignorable_Code_Point DI
114
+ Deprecated Dep
115
+ Diacritic Dia
116
+ Emoji
117
+ Emoji_Component EComp
118
+ Emoji_Modifier EMod
119
+ Emoji_Modifier_Base EBase
120
+ Emoji_Presentation EPres
121
+ Extended_Pictographic ExtPict
122
+ Extender Ext
123
+ Grapheme_Base Gr_Base
124
+ Grapheme_Extend Gr_Ext
125
+ Hex_Digit Hex
126
+ IDS_Binary_Operator IDSB
127
+ IDS_Trinary_Operator IDST
128
+ ID_Continue IDC
129
+ ID_Start IDS
130
+ Ideographic Ideo
131
+ Join_Control Join_C
132
+ Logical_Order_Exception LOE
133
+ Lowercase Lower
134
+ Math
135
+ Noncharacter_Code_Point NChar
136
+ Pattern_Syntax Pat_Syn
137
+ Pattern_White_Space Pat_WS
138
+ Quotation_Mark QMark
139
+ Radical
140
+ Regional_Indicator RI
141
+ Sentence_Terminal STerm
142
+ Soft_Dotted SD
143
+ Terminal_Punctuation Term
144
+ Unified_Ideograph UIdeo
145
+ Uppercase Upper
146
+ Variation_Selector VS
147
+ White_Space space
148
+ XID_Continue XIDC
149
+ XID_Start XIDS`.split(/\s/).map(e=>[Re(e),e])),jl=new Map([["s",M(383)],[M(383),"s"]]),Hl=new Map([[M(223),M(7838)],[M(107),M(8490)],[M(229),M(8491)],[M(969),M(8486)]]),Ul=new Map([ue(453),ue(456),ue(459),ue(498),...Tn(8072,8079),...Tn(8088,8095),...Tn(8104,8111),ue(8124),ue(8140),ue(8188)]),Wl=new Map([["alnum",_`[\p{Alpha}\p{Nd}]`],["alpha",_`\p{Alpha}`],["ascii",_`\p{ASCII}`],["blank",_`[\p{Zs}\t]`],["cntrl",_`\p{Cc}`],["digit",_`\p{Nd}`],["graph",_`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",_`\p{Lower}`],["print",_`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",_`[\p{P}\p{S}]`],["space",_`\p{space}`],["upper",_`\p{Upper}`],["word",_`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",_`\p{AHex}`]]);function zl(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function ue(e){let t=M(e);return[t.toLowerCase(),t]}function Tn(e,t){return zl(e,t).map(n=>ue(n))}var ns=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function ql(e,t){let n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};rs(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:$n(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Ce(e,Vl,r);let o={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},s={currentFlags:o,prevFlags:null,globalFlags:o,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Ce(e,Xl,s);let i={groupsByName:s.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:s.reffedNodesByReferencer};return Ce(e,Yl,i),e._originMap=s.groupOriginByCopy,e._strategy=r.strategy,e}var Vl={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:o}=e;if(o==="repeater"){let s=W();s.body[0].body.push(ce({negate:!0,body:r}),we("Any"));let i=W();i.body[0].body.push(_n("greedy",0,1/0,s)),n(L(i,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let o=e.body.filter(s=>s.kind==="flags");for(let s=n+1;s<t.body.length;s++){let i=t.body[s];Qe(r,i,[]).push(...o)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=ss(t.get(e));if(n){let r=W({flags:n});r.body[0].body=e.body,e.body=[L(r,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:o,remove:s,replaceWith:i},a){let{kind:l,negate:c}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:h,wordIsAscii:f}=a;if(l==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${c?"Y":"y"}"`);if(l==="line_end")i(L(ce({body:[re({body:[It("string_end")]}),re({body:[Ae(10)]})]}),t));else if(l==="line_start")i(L(se(_`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(l==="search_start")if(h.has(e))o.flags.sticky=!0,s();else{let g=r[n-1];if(g&&tc(g))i(L(ce({negate:!0}),t));else{if(d)throw new Error(_`Uses "\G" in a way that requires a subclass`);i(de(It("string_start"),t)),a.strategy="clip_search"}}else if(!(l==="string_end"||l==="string_start"))if(l==="string_end_newline")i(L(se(_`(?=\n?\z)`),t));else if(l==="word_boundary"){if(!f&&!u){let g=`(?:(?<=${oe})(?!${oe})|(?<!${oe})(?=${oe}))`,m=`(?:(?<=${oe})(?=${oe})|(?<!${oe})(?!${oe}))`;i(L(se(c?m:g),t))}}else throw new Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Pn(n)&&(n=Ln(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Pn(r)&&(r=Ln(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){let r=Xe({body:[e]});n(L(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:o,digitIsAscii:s,spaceIsAscii:i,wordIsAscii:a}){let{kind:l,negate:c,value:u}=e;if(s&&(l==="digit"||u==="digit")){n(de(At("digit",{negate:c}),t));return}if(i&&(l==="space"||u==="space")){n(L(Mn(se(Gl),c),t));return}if(a&&(l==="word"||u==="word")){n(de(At("word",{negate:c}),t));return}if(l==="any")n(de(we("Any"),t));else if(l==="digit")n(de(we("Nd",{negate:c}),t));else if(l!=="dot")if(l==="text_segment"){if(r==="strict")throw new Error(_`Use of "\X" requires non-strict accuracy`);let d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",h=_`\p{RI}{2}|${d}(?:\u200D${d})*`;n(L(se(_`(?>\r\n|${o?_`\p{RGI_Emoji}`:h}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(l==="hex")n(de(we("AHex",{negate:c}),t));else if(l==="newline")n(L(se(c?`[^
150
+ ]`:`(?>\r
151
+ ?|[
152
+ \v\f\x85\u2028\u2029])`),t));else if(l==="posix")if(!o&&(u==="graph"||u==="print")){if(r==="strict")throw new Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[u];c&&(d=`\0-${M(d.codePointAt(0)-1)}${M(d.codePointAt(2)+1)}-\u{10FFFF}`),n(L(se(`[${d}]`),t))}else n(L(Mn(se(Wl.get(u)),c),t));else if(l==="property")On.has(Re(u))||(e.key="sc");else if(l==="space")n(de(we("space",{negate:c}),t));else if(l==="word")n(L(Mn(se(oe),c),t));else throw new Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:o,removeAllPrevSiblings:s,removeAllNextSiblings:i}){let{kind:a,flags:l}=e;if(a==="flags")if(!l.enable&&!l.disable)r();else{let c=W({flags:l});c.body[0].body=i(),o(L(c,t),{traverse:!0})}else if(a==="keep"){let c=n.body[0],d=n.body.length===1&&_t(c,{type:"Group"})&&c.body[0].body.length===1?c.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(_`Uses "\K" in a way that's unsupported`);let h=ce({behind:!0});h.body[0].body=s(),o(L(h,t))}else throw new Error(`Unexpected directive kind "${a}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r==="fail")n(L(ce({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){let t=W();t.body[0].body.push(e.body),e.body=L(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,o=!1;for(let s of e.body)if(s.body.length===1&&s.body[0].kind==="search_start")s.body.pop();else{let i=as(s.body);i?(r=!0,Array.isArray(i)?n.push(...i):n.push(i)):o=!0}r&&!o&&n.forEach(s=>t.add(s))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(_`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Pn(n)&&(n=Ln(n,t),e.ref=n)}},Xl={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:o}=e;r||n.set(e,[...t.get(o).map(({node:s})=>s)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:o,groupsByName:s,multiplexCapturesToLeftByRef:i,openRefs:a,reffedNodesByReferencer:l}){let c=o.get(e);if(c&&a.has(e.number)){let d=de(Ko(e.number),t);l.set(d,a.get(e.number)),n(d);return}a.set(e.number,e),i.set(e.number,[]),e.name&&Qe(i,e.name,[]);let u=i.get(e.name??e.number);for(let d=0;d<u.length;d++){let h=u[d];if(c===h.node||c&&c===h.origin||e===h.origin){u.splice(d,1);break}}if(i.get(e.number).push({node:e,origin:c}),e.name&&i.get(e.name).push({node:e,origin:c}),e.name){let d=Qe(s,e.name,new Map),h=!1;if(c)h=!0;else for(let f of d.values())if(!f.hasDuplicateNameToRemove){h=!0;break}s.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:h})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Bt(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:o,ref:s}=e;if(o){let u=t;for(;(u=u.parent)&&!(u.type==="CapturingGroup"&&(u.name===s||u.number===s)););r.reffedNodesByReferencer.set(e,u);return}let i=r.subroutineRefMap.get(s),a=s===0,l=a?Ko(0):os(i,r.groupOriginByCopy,null),c=l;if(!a){let u=ss(Ql(i,h=>h.type==="Group"&&!!h.flags)),d=u?Bt(r.globalFlags,u):r.globalFlags;Kl(d,r.currentFlags)||(c=W({flags:Zl(d)}),c.body[0].body.push(l))}n(L(c,t),{traverse:!a})}},Yl={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let s=r.reffedNodesByReferencer.get(e).filter(i=>Jl(i,e));if(!s.length)n(L(ce({negate:!0}),t));else if(s.length>1){let i=W({atomic:!0,body:s.reverse().map(a=>re({body:[xt(a.number)]}))});n(L(i,t))}else e.ref=s[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){let o=vn();e.body.at(-1).body.push(o)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function rs(e){Ce(e,{"*"({node:t,parent:n}){t.parent=n}})}function Kl(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Jl(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;let r=is(n.parent);for(let o of r){if(o===n)break;if(o===e||ls(o,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function os(e,t,n,r){let o=Array.isArray(e)?[]:{};for(let[s,i]of Object.entries(e))s==="parent"?o.parent=Array.isArray(n)?r:n:i&&typeof i=="object"?o[s]=os(i,t,o,n):(s==="type"&&i==="CapturingGroup"&&t.set(o,t.get(e)??e),o[s]=i);return o}function Ko(e){let t=xn(e);return t.isRecursive=!0,t}function Ql(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Ln(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function ss(e){let t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(o=>{r.enable?.[o]&&(delete n.disable[o],n.enable[o]=!0),r.disable?.[o]&&(n.disable[o]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Zl({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function is(e){if(!e)throw new Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function as(e){let t=e.find(n=>n.kind==="search_start"||nc(n,{negate:!1})||!ec(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){let n=[];for(let r of t.body){let o=as(r.body);if(!o)return null;Array.isArray(o)?n.push(...o):n.push(o)}return n}return null}function ls(e,t){let n=is(e)??[];for(let r of n)if(r===t||ls(r,t))return!0;return!1}function ec({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function tc(e){let t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function nc(e,t){let n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&_t(e.body[0],{type:"Assertion",kind:"search_start"})}function Pn(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function se(e,t){let r=Et(e,{...t,unicodePropertyMap:On}).body;return r.length>1||r[0].body.length>1?W({body:r}):r[0].body[0]}function Mn(e,t){return e.negate=t,e}function de(e,t){return e.parent=t,e}function L(e,t){return rs(e),e.parent=t,e}function rc(e,t){let n=es(t),r=$n(n.target,"ES2024"),o=$n(n.target,"ES2025"),s=n.rules.recursionLimit;if(!Number.isInteger(s)||s<2||s>20)throw new Error("Invalid recursionLimit; use 2-20");let i=null,a=null;if(!o){let f=[e.flags.ignoreCase];Ce(e,oc,{getCurrentModI:()=>f.at(-1),popModI(){f.pop()},pushModI(g){f.push(g)},setHasCasedChar(){f.at(-1)?i=!0:a=!0}})}let l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||i)&&!a)},c=e,u={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:c,originMap:e._originMap,recursionLimit:s,useAppliedIgnoreCase:!!(!o&&i&&a),useFlagMods:o,useFlagV:r,verbose:n.verbose};function d(f){return u.lastNode=c,c=f,Fl(sc[f.type],`Unexpected node type "${f.type}"`)(f,u,d)}let h={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete h.options.force.v,h.options.disable.v=!0,h.options.unicodeSetsPlugin=null),h._captureTransfers=new Map,h._hiddenCaptures=[],u.captureMap.forEach((f,g)=>{f.hidden&&h._hiddenCaptures.push(g),f.transferTo&&Qe(h._captureTransfers,f.transferTo,[]).push(g)}),h}var oc={"*":{enter({node:e},t){if(Qo(e)){let n=t.getCurrentModI();t.pushModI(e.flags?Bt({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){Qo(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Gn(M(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),cs(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&ns.has(e.value)&&t.setHasCasedChar()}},sc={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?_`\B`:_`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){let{body:r,name:o,number:s}=e,i={ignoreCase:t.currentFlags.ignoreCase},a=t.originMap.get(e);return a&&(i.hidden=!0,s>a.number&&(i.transferTo=a.number)),t.captureMap.set(s,i),`(${o?`?<${o}>`:""}${r.map(n).join("|")})`},Character({value:e},t){let n=M(e),r=Be(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Gn(n)){let o=ts(n);return t.inCharClass?o.join(""):o.length>1?`[${o.join("")}]`:o[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:o,parent:s}=e,{body:i}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Y.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&i.some(Zo)&&(i=[Ae(45),...i.filter(c=>!Zo(c))]);let a=()=>`[${o?"^":""}${i.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Y.bugNestedClassIgnoresNegation)&&!o){let u=i.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(u.length){let d=W(),h=d.body[0];return d.parent=s,h.parent=d,i=i.filter(f=>!u.includes(f)),e.body=i,i.length?(e.parent=h,h.body.push(e)):d.body.pop(),u.forEach(f=>{let g=re({body:[f]});f.parent=g,g.parent=d,d.body.push(g)}),n(d)}}t.inCharClass=!0;let c=a();return t.inCharClass=!1,c}let l=i[0];if(r==="union"&&!o&&l&&((!t.useFlagV||!t.verbose)&&s.kind==="union"&&!(Y.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&s.kind==="intersection"&&i.length===1&&l.type!=="CharacterClassRange"))return i.map(n).join("");if(!t.useFlagV&&s.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return a()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,o={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},s=Be(n,o),i=Be(r,o),a=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){let l=cs(e);uc(l).forEach(u=>{a.add(Array.isArray(u)?`${Be(u[0],o)}-${Be(u[1],o)}`:Be(u,o))})}return`${s}-${i}${[...a].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},o){if(e==="dot")return o.currentFlags.dotAll?o.appliedGlobalFlags.dotAll||o.useFlagMods?".":"[^]":_`[^\n]`;if(e==="digit")return t?_`\D`:_`\d`;if(e==="property"){if(o.useAppliedIgnoreCase&&o.currentFlags.ignoreCase&&ns.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?_`\P`:_`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?_`\W`:_`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},o,s){let i=o.currentFlags;n&&(o.currentFlags=Bt(i,n));let a=t.map(s).join("|"),l=!o.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!o.useFlagMods||!n)?a:`(?${dc(e,n,o.useFlagMods)}${a})`;return o.currentFlags=i,l},LookaroundAssertion({body:e,kind:t,negate:n},r,o){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(o).join("|")})`},Quantifier(e,t,n){return n(e.body)+fc(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");let r=n.recursionLimit;return t===0?`(?R=${r})`:_`\g<${t}&R=${r}>`}},ic=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),ac=new Set(["-","\\","]","^","["]),lc=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),Jo=new Map([[9,_`\t`],[10,_`\n`],[11,_`\v`],[12,_`\f`],[13,_`\r`],[8232,_`\u2028`],[8233,_`\u2029`],[65279,_`\uFEFF`]]),cc=new RegExp("^\\p{Cased}$","u");function Gn(e){return cc.test(e)}function cs(e,t){let n=!!t?.firstOnly,r=e.min.value,o=e.max.value,s=[];if(r<65&&(o===65535||o>=131071)||r===65536&&o>=131071)return s;for(let i=r;i<=o;i++){let a=M(i);if(!Gn(a))continue;let l=ts(a).filter(c=>{let u=c.codePointAt(0);return u<r||u>o});if(l.length&&(s.push(...l),n))break}return s}function Be(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(Jo.has(e))return Jo.get(e);if(e<32||e>126&&e<160||e>262143||t&&hc(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let o=n?r?lc:ac:ic,s=M(e);return(o.has(s)?"\\":"")+s}function uc(e){let t=e.map(o=>o.codePointAt(0)).sort((o,s)=>o-s),n=[],r=null;for(let o=0;o<t.length;o++)t[o+1]===t[o]+1?r??=t[o]:r===null?n.push(t[o]):(n.push([r,t[o]]),r=null);return n}function dc(e,t,n){if(e)return">";let r="";if(t&&n){let{enable:o,disable:s}=t;r=(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")+(s?"-":"")+(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")}return`${r}:`}function fc({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function Qo({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function hc(e){return e>47&&e<58}function Zo({type:e,value:t}){return e==="Character"&&t===45}var gc=class Fn extends RegExp{#t=new Map;#e=null;#r;#n=null;#o=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,n,r){let o=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");let s=t;super(s,n),this.#r=s.source,s instanceof Fn&&(this.#t=s.#t,this.#n=s.#n,this.#o=s.#o,this.rawOptions=s.rawOptions)}else{let s={hiddenCaptures:[],strategy:null,transfers:[],...r};super(o?"":t,n),this.#r=t,this.#t=mc(s.hiddenCaptures,s.transfers),this.#o=s.strategy,this.rawOptions=r??{}}o||(this.#e=this)}exec(t){if(!this.#e){let{lazyCompile:o,...s}=this.rawOptions;this.#e=new Fn(this.#r,this.flags,s)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#o==="clip_search"&&n&&r){this.lastIndex=0;let o=this.#s(t.slice(r));return o&&(pc(o,r,t,this.hasIndices),this.lastIndex+=r),o}return this.#s(t)}#s(t){this.#e.lastIndex=this.lastIndex;let n=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;let r=[...n];n.length=1;let o;this.hasIndices&&(o=[...n.indices],n.indices.length=1);let s=[0];for(let i=1;i<r.length;i++){let{hidden:a,transferTo:l}=this.#t.get(i)??{};if(a?s.push(null):(s.push(n.length),n.push(r[i]),this.hasIndices&&n.indices.push(o[i])),l&&r[i]!==void 0){let c=s[l];if(!c)throw new Error(`Invalid capture transfer to "${c}"`);if(n[c]=r[i],this.hasIndices&&(n.indices[c]=o[i]),n.groups){this.#n||(this.#n=bc(this.source));let u=this.#n.get(l);u&&(n.groups[u]=r[i],this.hasIndices&&(n.indices.groups[u]=o[i]))}}}return n}};function pc(e,t,n,r){if(e.index+=t,e.input=n,r){let o=e.indices;for(let i=0;i<o.length;i++){let a=o[i];a&&(o[i]=[a[0]+t,a[1]+t])}let s=o.groups;s&&Object.keys(s).forEach(i=>{let a=s[i];a&&(s[i]=[a[0]+t,a[1]+t])})}}function mc(e,t){let n=new Map;for(let r of e)n.set(r,{hidden:!0});for(let[r,o]of t)for(let s of o)Qe(n,s,{}).transferTo=r;return n}function bc(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,o=0,s;for(;s=t.exec(e);){let{0:i,groups:{capture:a,name:l}}=s;i==="["?r++:r?i==="]"&&r--:a&&(o++,l&&n.set(o,l))}return n}function us(e,t){let n=yc(e,t);return n.options?new gc(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function yc(e,t){let n=es(t),r=Et(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:On}),o=ql(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),s=rc(o,n),i=Xo(s.pattern,{captureTransfers:s._captureTransfers,hiddenCaptures:s._hiddenCaptures,mode:"external"}),a=Rn(i.pattern),l=An(a.pattern,{captureTransfers:i.captureTransfers,hiddenCaptures:i.hiddenCaptures}),c={pattern:l.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${s.flags}${s.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{let u=l.hiddenCaptures.sort((g,m)=>g-m),d=Array.from(l.captureTransfers),h=o._strategy,f=c.pattern.length>=n.lazyCompileLength;(u.length||d.length||h||f)&&(c.options={...u.length&&{hiddenCaptures:u},...d.length&&{transfers:d},...h&&{strategy:h},...f&&{lazyCompile:f}})}return c}function Lt(e,t){return us(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function Dn(e={}){let t={target:"auto",cache:new Map,...e};return t.regexConstructor||=n=>Lt(n,{target:t.target}),{createScanner(n){return new yo(n,t)},createString(n){return{content:n}}}}var Pt={NotSet:-1,Underline:4,Strikethrough:8};function ds(e,t){let n=e.getTheme(t),r=he.createFromRawTheme(n),o=ge(n,{});return{name:n.name,fg:U(n.fg,o)??"",bg:U(n.bg,o)??"",theme:r,colorMap:r.getColorMap(),replacements:o,defaults:r.getDefaults()}}var kc=5e4,wc=100,Mt=class extends Error{};function hs(e,t){let n=[ds(e,t.light),ds(e,t.dark)],r=["light","dark"],o=`--shiki-light:${n[0].fg||"inherit"};--shiki-dark:${n[1].fg||"inherit"}`,s=`--shiki-light-bg:${n[0].bg||"inherit"};--shiki-dark-bg:${n[1].bg||"inherit"}`,i=`shiki-themes ${n[0].name} ${n[1].name}`,a=()=>({path:null,fontStyle:[n[0].defaults.fontStyle,n[1].defaults.fontStyle],fg:[n[0].defaults.foregroundId,n[1].defaults.foregroundId],children:new Map}),l=a(),c=0,u=(f,g)=>{let m=f.children.get(g);if(m)return m;let y={parent:f.path,scopeName:g};m={path:y,fontStyle:[...f.fontStyle],fg:[...f.fg],children:new Map};for(let b of[0,1]){let p=n[b].theme.match(y);p&&(p.fontStyle!==Pt.NotSet&&(m.fontStyle[b]=p.fontStyle),p.foregroundId!==0&&(m.fg[b]=p.foregroundId))}return f.children.set(g,m),c++,m},d=f=>f.style??=[0,1].map(g=>({color:U(n[g].colorMap[f.fg[g]],n[g].replacements)??"",fontStyle:f.fontStyle[g]===Pt.NotSet?0:f.fontStyle[g]})),h=f=>{if(f.length>wc)throw new Mt;let g=l;for(let m of f)g=u(g,m);return g};return function(g,m){c>kc&&(l=a(),c=0);let y=e.getLanguage(m.lang),b=xe,p=[];try{for(let[S,E]of ae(g)){if(S===""){p.push([]);continue}if(m.tokenizeMaxLineLength>0&&S.length>=m.tokenizeMaxLineLength){p.push([St({content:S,offset:E,variants:{light:{color:"",fontStyle:0},dark:{color:"",fontStyle:0}}},r,"--shiki-",!1)]);continue}let R=y.tokenizeLine(S,b,m.tokenizeTimeLimit),F=[],N,K=()=>{N&&F.push(St({content:S.slice(N.start,N.end),offset:E+N.start,variants:{light:N.l,dark:N.d}},r,"--shiki-",!1))};for(let D=0;D<R.tokens.length;D++){let A=R.tokens[D],ve=D+1<R.tokens.length?R.tokens[D+1].startIndex:S.length;if(ve<=A.startIndex)continue;let[Le,z]=d(h(A.scopes));N&&N.end===A.startIndex&&fs(N.l,Le)&&fs(N.d,z)?N.end=ve:(K(),N={l:Le,d:z,start:A.startIndex,end:ve})}K(),p.push(F),b=R.ruleStack}}catch(S){if(S instanceof Mt)return;throw S}let w={meta:{},options:{lang:m.lang,themes:t,defaultColor:!1,transformers:m.transformers},codeToHast:()=>{throw new Error("codeToHast is not available in the one-pass renderer")},codeToTokens:()=>{throw new Error("codeToTokens is not available in the one-pass renderer")},get source(){return g}},C=kn(Cc(p),{...w.options,fg:o,bg:s,themeName:i,rootStyle:`${o};${s}`},w);return wn(C)}}var fs=(e,t)=>e.color===t.color&&e.fontStyle===t.fontStyle;function Cc(e){let t=/^\s+$/;return e.map(n=>{let r=[],o="",s;return n.forEach((i,a)=>{let l=!(i.fontStyle&&(i.fontStyle&Pt.Underline||i.fontStyle&Pt.Strikethrough));l&&t.test(i.content)&&n[a+1]?(s===void 0&&(s=i.offset),o+=i.content):o?(l?r.push({...i,offset:s,content:o+i.content}):r.push({content:o,offset:s},i),s=void 0,o=""):r.push(i)}),r})}var gs=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#fd8c73","activityBar.background":"#ffffff","activityBar.border":"#d0d7de","activityBar.foreground":"#1f2328","activityBar.inactiveForeground":"#656d76","activityBarBadge.background":"#0969da","activityBarBadge.foreground":"#ffffff","badge.background":"#0969da","badge.foreground":"#ffffff","breadcrumb.activeSelectionForeground":"#656d76","breadcrumb.focusForeground":"#1f2328","breadcrumb.foreground":"#656d76","breadcrumbPicker.background":"#ffffff","button.background":"#1f883d","button.foreground":"#ffffff","button.hoverBackground":"#1a7f37","button.secondaryBackground":"#ebecf0","button.secondaryForeground":"#24292f","button.secondaryHoverBackground":"#f3f4f6","checkbox.background":"#f6f8fa","checkbox.border":"#d0d7de","debugConsole.errorForeground":"#cf222e","debugConsole.infoForeground":"#57606a","debugConsole.sourceForeground":"#9a6700","debugConsole.warningForeground":"#7d4e00","debugConsoleInputIcon.foreground":"#6639ba","debugIcon.breakpointForeground":"#cf222e","debugTokenExpression.boolean":"#116329","debugTokenExpression.error":"#a40e26","debugTokenExpression.name":"#0550ae","debugTokenExpression.number":"#116329","debugTokenExpression.string":"#0a3069","debugTokenExpression.value":"#0a3069","debugToolBar.background":"#ffffff","descriptionForeground":"#656d76","diffEditor.insertedLineBackground":"#aceebb4d","diffEditor.insertedTextBackground":"#6fdd8b80","diffEditor.removedLineBackground":"#ffcecb4d","diffEditor.removedTextBackground":"#ff818266","dropdown.background":"#ffffff","dropdown.border":"#d0d7de","dropdown.foreground":"#1f2328","dropdown.listBackground":"#ffffff","editor.background":"#ffffff","editor.findMatchBackground":"#bf8700","editor.findMatchHighlightBackground":"#fae17d80","editor.focusedStackFrameHighlightBackground":"#4ac26b66","editor.foldBackground":"#6e77811a","editor.foreground":"#1f2328","editor.lineHighlightBackground":"#eaeef280","editor.linkedEditingBackground":"#0969da12","editor.selectionHighlightBackground":"#4ac26b40","editor.stackFrameHighlightBackground":"#d4a72c66","editor.wordHighlightBackground":"#eaeef280","editor.wordHighlightBorder":"#afb8c199","editor.wordHighlightStrongBackground":"#afb8c14d","editor.wordHighlightStrongBorder":"#afb8c199","editorBracketHighlight.foreground1":"#0969da","editorBracketHighlight.foreground2":"#1a7f37","editorBracketHighlight.foreground3":"#9a6700","editorBracketHighlight.foreground4":"#cf222e","editorBracketHighlight.foreground5":"#bf3989","editorBracketHighlight.foreground6":"#8250df","editorBracketHighlight.unexpectedBracket.foreground":"#656d76","editorBracketMatch.background":"#4ac26b40","editorBracketMatch.border":"#4ac26b99","editorCursor.foreground":"#0969da","editorGroup.border":"#d0d7de","editorGroupHeader.tabsBackground":"#f6f8fa","editorGroupHeader.tabsBorder":"#d0d7de","editorGutter.addedBackground":"#4ac26b66","editorGutter.deletedBackground":"#ff818266","editorGutter.modifiedBackground":"#d4a72c66","editorIndentGuide.activeBackground":"#1f23283d","editorIndentGuide.background":"#1f23281f","editorInlayHint.background":"#afb8c133","editorInlayHint.foreground":"#656d76","editorInlayHint.paramBackground":"#afb8c133","editorInlayHint.paramForeground":"#656d76","editorInlayHint.typeBackground":"#afb8c133","editorInlayHint.typeForeground":"#656d76","editorLineNumber.activeForeground":"#1f2328","editorLineNumber.foreground":"#8c959f","editorOverviewRuler.border":"#ffffff","editorWhitespace.foreground":"#afb8c1","editorWidget.background":"#ffffff","errorForeground":"#cf222e","focusBorder":"#0969da","foreground":"#1f2328","gitDecoration.addedResourceForeground":"#1a7f37","gitDecoration.conflictingResourceForeground":"#bc4c00","gitDecoration.deletedResourceForeground":"#cf222e","gitDecoration.ignoredResourceForeground":"#6e7781","gitDecoration.modifiedResourceForeground":"#9a6700","gitDecoration.submoduleResourceForeground":"#656d76","gitDecoration.untrackedResourceForeground":"#1a7f37","icon.foreground":"#656d76","input.background":"#ffffff","input.border":"#d0d7de","input.foreground":"#1f2328","input.placeholderForeground":"#6e7781","keybindingLabel.foreground":"#1f2328","list.activeSelectionBackground":"#afb8c133","list.activeSelectionForeground":"#1f2328","list.focusBackground":"#ddf4ff","list.focusForeground":"#1f2328","list.highlightForeground":"#0969da","list.hoverBackground":"#eaeef280","list.hoverForeground":"#1f2328","list.inactiveFocusBackground":"#ddf4ff","list.inactiveSelectionBackground":"#afb8c133","list.inactiveSelectionForeground":"#1f2328","minimapSlider.activeBackground":"#8c959f47","minimapSlider.background":"#8c959f33","minimapSlider.hoverBackground":"#8c959f3d","notificationCenterHeader.background":"#f6f8fa","notificationCenterHeader.foreground":"#656d76","notifications.background":"#ffffff","notifications.border":"#d0d7de","notifications.foreground":"#1f2328","notificationsErrorIcon.foreground":"#cf222e","notificationsInfoIcon.foreground":"#0969da","notificationsWarningIcon.foreground":"#9a6700","panel.background":"#f6f8fa","panel.border":"#d0d7de","panelInput.border":"#d0d7de","panelTitle.activeBorder":"#fd8c73","panelTitle.activeForeground":"#1f2328","panelTitle.inactiveForeground":"#656d76","pickerGroup.border":"#d0d7de","pickerGroup.foreground":"#656d76","progressBar.background":"#0969da","quickInput.background":"#ffffff","quickInput.foreground":"#1f2328","scrollbar.shadow":"#6e778133","scrollbarSlider.activeBackground":"#8c959f47","scrollbarSlider.background":"#8c959f33","scrollbarSlider.hoverBackground":"#8c959f3d","settings.headerForeground":"#1f2328","settings.modifiedItemIndicator":"#d4a72c66","sideBar.background":"#f6f8fa","sideBar.border":"#d0d7de","sideBar.foreground":"#1f2328","sideBarSectionHeader.background":"#f6f8fa","sideBarSectionHeader.border":"#d0d7de","sideBarSectionHeader.foreground":"#1f2328","sideBarTitle.foreground":"#1f2328","statusBar.background":"#ffffff","statusBar.border":"#d0d7de","statusBar.debuggingBackground":"#cf222e","statusBar.debuggingForeground":"#ffffff","statusBar.focusBorder":"#0969da80","statusBar.foreground":"#656d76","statusBar.noFolderBackground":"#ffffff","statusBarItem.activeBackground":"#1f23281f","statusBarItem.focusBorder":"#0969da","statusBarItem.hoverBackground":"#1f232814","statusBarItem.prominentBackground":"#afb8c133","statusBarItem.remoteBackground":"#eaeef2","statusBarItem.remoteForeground":"#1f2328","symbolIcon.arrayForeground":"#953800","symbolIcon.booleanForeground":"#0550ae","symbolIcon.classForeground":"#953800","symbolIcon.colorForeground":"#0a3069","symbolIcon.constantForeground":"#116329","symbolIcon.constructorForeground":"#3e1f79","symbolIcon.enumeratorForeground":"#953800","symbolIcon.enumeratorMemberForeground":"#0550ae","symbolIcon.eventForeground":"#57606a","symbolIcon.fieldForeground":"#953800","symbolIcon.fileForeground":"#7d4e00","symbolIcon.folderForeground":"#7d4e00","symbolIcon.functionForeground":"#6639ba","symbolIcon.interfaceForeground":"#953800","symbolIcon.keyForeground":"#0550ae","symbolIcon.keywordForeground":"#a40e26","symbolIcon.methodForeground":"#6639ba","symbolIcon.moduleForeground":"#a40e26","symbolIcon.namespaceForeground":"#a40e26","symbolIcon.nullForeground":"#0550ae","symbolIcon.numberForeground":"#116329","symbolIcon.objectForeground":"#953800","symbolIcon.operatorForeground":"#0a3069","symbolIcon.packageForeground":"#953800","symbolIcon.propertyForeground":"#953800","symbolIcon.referenceForeground":"#0550ae","symbolIcon.snippetForeground":"#0550ae","symbolIcon.stringForeground":"#0a3069","symbolIcon.structForeground":"#953800","symbolIcon.textForeground":"#0a3069","symbolIcon.typeParameterForeground":"#0a3069","symbolIcon.unitForeground":"#0550ae","symbolIcon.variableForeground":"#953800","tab.activeBackground":"#ffffff","tab.activeBorder":"#ffffff","tab.activeBorderTop":"#fd8c73","tab.activeForeground":"#1f2328","tab.border":"#d0d7de","tab.hoverBackground":"#ffffff","tab.inactiveBackground":"#f6f8fa","tab.inactiveForeground":"#656d76","tab.unfocusedActiveBorder":"#ffffff","tab.unfocusedActiveBorderTop":"#d0d7de","tab.unfocusedHoverBackground":"#eaeef280","terminal.ansiBlack":"#24292f","terminal.ansiBlue":"#0969da","terminal.ansiBrightBlack":"#57606a","terminal.ansiBrightBlue":"#218bff","terminal.ansiBrightCyan":"#3192aa","terminal.ansiBrightGreen":"#1a7f37","terminal.ansiBrightMagenta":"#a475f9","terminal.ansiBrightRed":"#a40e26","terminal.ansiBrightWhite":"#8c959f","terminal.ansiBrightYellow":"#633c01","terminal.ansiCyan":"#1b7c83","terminal.ansiGreen":"#116329","terminal.ansiMagenta":"#8250df","terminal.ansiRed":"#cf222e","terminal.ansiWhite":"#6e7781","terminal.ansiYellow":"#4d2d00","terminal.foreground":"#1f2328","textBlockQuote.background":"#f6f8fa","textBlockQuote.border":"#d0d7de","textCodeBlock.background":"#afb8c133","textLink.activeForeground":"#0969da","textLink.foreground":"#0969da","textPreformat.background":"#afb8c133","textPreformat.foreground":"#656d76","textSeparator.foreground":"#d8dee4","titleBar.activeBackground":"#ffffff","titleBar.activeForeground":"#656d76","titleBar.border":"#d0d7de","titleBar.inactiveBackground":"#f6f8fa","titleBar.inactiveForeground":"#656d76","tree.indentGuidesStroke":"#d8dee4","welcomePage.buttonBackground":"#f6f8fa","welcomePage.buttonHoverBackground":"#f3f4f6"},"displayName":"GitHub Light Default","name":"github-light-default","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#6e7781"}},{"scope":["constant.other.placeholder","constant.character"],"settings":{"foreground":"#cf222e"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language","entity"],"settings":{"foreground":"#0550ae"}},{"scope":["entity.name","meta.export.default","meta.definition.variable"],"settings":{"foreground":"#953800"}},{"scope":["variable.parameter.function","meta.jsx.children","meta.block","meta.tag.attributes","entity.name.constant","meta.object.member","meta.embedded.expression"],"settings":{"foreground":"#1f2328"}},{"scope":"entity.name.function","settings":{"foreground":"#8250df"}},{"scope":["entity.name.tag","support.class.component"],"settings":{"foreground":"#116329"}},{"scope":"keyword","settings":{"foreground":"#cf222e"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#cf222e"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#1f2328"}},{"scope":["string","string punctuation.section.embedded source"],"settings":{"foreground":"#0a3069"}},{"scope":"support","settings":{"foreground":"#0550ae"}},{"scope":"meta.property-name","settings":{"foreground":"#0550ae"}},{"scope":"variable","settings":{"foreground":"#953800"}},{"scope":"variable.other","settings":{"foreground":"#1f2328"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#82071e"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#82071e"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#82071e"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#82071e"}},{"scope":"carriage-return","settings":{"background":"#cf222e","content":"^M","fontStyle":"italic underline","foreground":"#f6f8fa"}},{"scope":"message.error","settings":{"foreground":"#82071e"}},{"scope":"string variable","settings":{"foreground":"#0550ae"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#0a3069"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#0a3069"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#116329"}},{"scope":"support.constant","settings":{"foreground":"#0550ae"}},{"scope":"support.variable","settings":{"foreground":"#0550ae"}},{"scope":"support.type.property-name.json","settings":{"foreground":"#116329"}},{"scope":"meta.module-reference","settings":{"foreground":"#0550ae"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#953800"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#0550ae"}},{"scope":"markup.quote","settings":{"foreground":"#116329"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#1f2328"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#1f2328"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#0550ae"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#ffebe9","foreground":"#82071e"}},{"scope":["punctuation.section.embedded"],"settings":{"foreground":"#cf222e"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#dafbe1","foreground":"#116329"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#ffd8b5","foreground":"#953800"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#0550ae","foreground":"#eaeef2"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#8250df"}},{"scope":"meta.diff.header","settings":{"foreground":"#0550ae"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#0550ae"}},{"scope":"meta.output","settings":{"foreground":"#0550ae"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#57606a"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#82071e"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"foreground":"#0a3069"}}],"type":"light"}'));var ps=Object.freeze(JSON.parse('{"colors":{"activityBar.activeBorder":"#f78166","activityBar.background":"#0d1117","activityBar.border":"#30363d","activityBar.foreground":"#e6edf3","activityBar.inactiveForeground":"#7d8590","activityBarBadge.background":"#1f6feb","activityBarBadge.foreground":"#ffffff","badge.background":"#1f6feb","badge.foreground":"#ffffff","breadcrumb.activeSelectionForeground":"#7d8590","breadcrumb.focusForeground":"#e6edf3","breadcrumb.foreground":"#7d8590","breadcrumbPicker.background":"#161b22","button.background":"#238636","button.foreground":"#ffffff","button.hoverBackground":"#2ea043","button.secondaryBackground":"#282e33","button.secondaryForeground":"#c9d1d9","button.secondaryHoverBackground":"#30363d","checkbox.background":"#161b22","checkbox.border":"#30363d","debugConsole.errorForeground":"#ffa198","debugConsole.infoForeground":"#8b949e","debugConsole.sourceForeground":"#e3b341","debugConsole.warningForeground":"#d29922","debugConsoleInputIcon.foreground":"#bc8cff","debugIcon.breakpointForeground":"#f85149","debugTokenExpression.boolean":"#56d364","debugTokenExpression.error":"#ffa198","debugTokenExpression.name":"#79c0ff","debugTokenExpression.number":"#56d364","debugTokenExpression.string":"#a5d6ff","debugTokenExpression.value":"#a5d6ff","debugToolBar.background":"#161b22","descriptionForeground":"#7d8590","diffEditor.insertedLineBackground":"#23863626","diffEditor.insertedTextBackground":"#3fb9504d","diffEditor.removedLineBackground":"#da363326","diffEditor.removedTextBackground":"#ff7b724d","dropdown.background":"#161b22","dropdown.border":"#30363d","dropdown.foreground":"#e6edf3","dropdown.listBackground":"#161b22","editor.background":"#0d1117","editor.findMatchBackground":"#9e6a03","editor.findMatchHighlightBackground":"#f2cc6080","editor.focusedStackFrameHighlightBackground":"#2ea04366","editor.foldBackground":"#6e76811a","editor.foreground":"#e6edf3","editor.lineHighlightBackground":"#6e76811a","editor.linkedEditingBackground":"#2f81f712","editor.selectionHighlightBackground":"#3fb95040","editor.stackFrameHighlightBackground":"#bb800966","editor.wordHighlightBackground":"#6e768180","editor.wordHighlightBorder":"#6e768199","editor.wordHighlightStrongBackground":"#6e76814d","editor.wordHighlightStrongBorder":"#6e768199","editorBracketHighlight.foreground1":"#79c0ff","editorBracketHighlight.foreground2":"#56d364","editorBracketHighlight.foreground3":"#e3b341","editorBracketHighlight.foreground4":"#ffa198","editorBracketHighlight.foreground5":"#ff9bce","editorBracketHighlight.foreground6":"#d2a8ff","editorBracketHighlight.unexpectedBracket.foreground":"#7d8590","editorBracketMatch.background":"#3fb95040","editorBracketMatch.border":"#3fb95099","editorCursor.foreground":"#2f81f7","editorGroup.border":"#30363d","editorGroupHeader.tabsBackground":"#010409","editorGroupHeader.tabsBorder":"#30363d","editorGutter.addedBackground":"#2ea04366","editorGutter.deletedBackground":"#f8514966","editorGutter.modifiedBackground":"#bb800966","editorIndentGuide.activeBackground":"#e6edf33d","editorIndentGuide.background":"#e6edf31f","editorInlayHint.background":"#8b949e33","editorInlayHint.foreground":"#7d8590","editorInlayHint.paramBackground":"#8b949e33","editorInlayHint.paramForeground":"#7d8590","editorInlayHint.typeBackground":"#8b949e33","editorInlayHint.typeForeground":"#7d8590","editorLineNumber.activeForeground":"#e6edf3","editorLineNumber.foreground":"#6e7681","editorOverviewRuler.border":"#010409","editorWhitespace.foreground":"#484f58","editorWidget.background":"#161b22","errorForeground":"#f85149","focusBorder":"#1f6feb","foreground":"#e6edf3","gitDecoration.addedResourceForeground":"#3fb950","gitDecoration.conflictingResourceForeground":"#db6d28","gitDecoration.deletedResourceForeground":"#f85149","gitDecoration.ignoredResourceForeground":"#6e7681","gitDecoration.modifiedResourceForeground":"#d29922","gitDecoration.submoduleResourceForeground":"#7d8590","gitDecoration.untrackedResourceForeground":"#3fb950","icon.foreground":"#7d8590","input.background":"#0d1117","input.border":"#30363d","input.foreground":"#e6edf3","input.placeholderForeground":"#6e7681","keybindingLabel.foreground":"#e6edf3","list.activeSelectionBackground":"#6e768166","list.activeSelectionForeground":"#e6edf3","list.focusBackground":"#388bfd26","list.focusForeground":"#e6edf3","list.highlightForeground":"#2f81f7","list.hoverBackground":"#6e76811a","list.hoverForeground":"#e6edf3","list.inactiveFocusBackground":"#388bfd26","list.inactiveSelectionBackground":"#6e768166","list.inactiveSelectionForeground":"#e6edf3","minimapSlider.activeBackground":"#8b949e47","minimapSlider.background":"#8b949e33","minimapSlider.hoverBackground":"#8b949e3d","notificationCenterHeader.background":"#161b22","notificationCenterHeader.foreground":"#7d8590","notifications.background":"#161b22","notifications.border":"#30363d","notifications.foreground":"#e6edf3","notificationsErrorIcon.foreground":"#f85149","notificationsInfoIcon.foreground":"#2f81f7","notificationsWarningIcon.foreground":"#d29922","panel.background":"#010409","panel.border":"#30363d","panelInput.border":"#30363d","panelTitle.activeBorder":"#f78166","panelTitle.activeForeground":"#e6edf3","panelTitle.inactiveForeground":"#7d8590","peekViewEditor.background":"#6e76811a","peekViewEditor.matchHighlightBackground":"#bb800966","peekViewResult.background":"#0d1117","peekViewResult.matchHighlightBackground":"#bb800966","pickerGroup.border":"#30363d","pickerGroup.foreground":"#7d8590","progressBar.background":"#1f6feb","quickInput.background":"#161b22","quickInput.foreground":"#e6edf3","scrollbar.shadow":"#484f5833","scrollbarSlider.activeBackground":"#8b949e47","scrollbarSlider.background":"#8b949e33","scrollbarSlider.hoverBackground":"#8b949e3d","settings.headerForeground":"#e6edf3","settings.modifiedItemIndicator":"#bb800966","sideBar.background":"#010409","sideBar.border":"#30363d","sideBar.foreground":"#e6edf3","sideBarSectionHeader.background":"#010409","sideBarSectionHeader.border":"#30363d","sideBarSectionHeader.foreground":"#e6edf3","sideBarTitle.foreground":"#e6edf3","statusBar.background":"#0d1117","statusBar.border":"#30363d","statusBar.debuggingBackground":"#da3633","statusBar.debuggingForeground":"#ffffff","statusBar.focusBorder":"#1f6feb80","statusBar.foreground":"#7d8590","statusBar.noFolderBackground":"#0d1117","statusBarItem.activeBackground":"#e6edf31f","statusBarItem.focusBorder":"#1f6feb","statusBarItem.hoverBackground":"#e6edf314","statusBarItem.prominentBackground":"#6e768166","statusBarItem.remoteBackground":"#30363d","statusBarItem.remoteForeground":"#e6edf3","symbolIcon.arrayForeground":"#f0883e","symbolIcon.booleanForeground":"#58a6ff","symbolIcon.classForeground":"#f0883e","symbolIcon.colorForeground":"#79c0ff","symbolIcon.constantForeground":["#aff5b4","#7ee787","#56d364","#3fb950","#2ea043","#238636","#196c2e","#0f5323","#033a16","#04260f"],"symbolIcon.constructorForeground":"#d2a8ff","symbolIcon.enumeratorForeground":"#f0883e","symbolIcon.enumeratorMemberForeground":"#58a6ff","symbolIcon.eventForeground":"#6e7681","symbolIcon.fieldForeground":"#f0883e","symbolIcon.fileForeground":"#d29922","symbolIcon.folderForeground":"#d29922","symbolIcon.functionForeground":"#bc8cff","symbolIcon.interfaceForeground":"#f0883e","symbolIcon.keyForeground":"#58a6ff","symbolIcon.keywordForeground":"#ff7b72","symbolIcon.methodForeground":"#bc8cff","symbolIcon.moduleForeground":"#ff7b72","symbolIcon.namespaceForeground":"#ff7b72","symbolIcon.nullForeground":"#58a6ff","symbolIcon.numberForeground":"#3fb950","symbolIcon.objectForeground":"#f0883e","symbolIcon.operatorForeground":"#79c0ff","symbolIcon.packageForeground":"#f0883e","symbolIcon.propertyForeground":"#f0883e","symbolIcon.referenceForeground":"#58a6ff","symbolIcon.snippetForeground":"#58a6ff","symbolIcon.stringForeground":"#79c0ff","symbolIcon.structForeground":"#f0883e","symbolIcon.textForeground":"#79c0ff","symbolIcon.typeParameterForeground":"#79c0ff","symbolIcon.unitForeground":"#58a6ff","symbolIcon.variableForeground":"#f0883e","tab.activeBackground":"#0d1117","tab.activeBorder":"#0d1117","tab.activeBorderTop":"#f78166","tab.activeForeground":"#e6edf3","tab.border":"#30363d","tab.hoverBackground":"#0d1117","tab.inactiveBackground":"#010409","tab.inactiveForeground":"#7d8590","tab.unfocusedActiveBorder":"#0d1117","tab.unfocusedActiveBorderTop":"#30363d","tab.unfocusedHoverBackground":"#6e76811a","terminal.ansiBlack":"#484f58","terminal.ansiBlue":"#58a6ff","terminal.ansiBrightBlack":"#6e7681","terminal.ansiBrightBlue":"#79c0ff","terminal.ansiBrightCyan":"#56d4dd","terminal.ansiBrightGreen":"#56d364","terminal.ansiBrightMagenta":"#d2a8ff","terminal.ansiBrightRed":"#ffa198","terminal.ansiBrightWhite":"#ffffff","terminal.ansiBrightYellow":"#e3b341","terminal.ansiCyan":"#39c5cf","terminal.ansiGreen":"#3fb950","terminal.ansiMagenta":"#bc8cff","terminal.ansiRed":"#ff7b72","terminal.ansiWhite":"#b1bac4","terminal.ansiYellow":"#d29922","terminal.foreground":"#e6edf3","textBlockQuote.background":"#010409","textBlockQuote.border":"#30363d","textCodeBlock.background":"#6e768166","textLink.activeForeground":"#2f81f7","textLink.foreground":"#2f81f7","textPreformat.background":"#6e768166","textPreformat.foreground":"#7d8590","textSeparator.foreground":"#21262d","titleBar.activeBackground":"#0d1117","titleBar.activeForeground":"#7d8590","titleBar.border":"#30363d","titleBar.inactiveBackground":"#010409","titleBar.inactiveForeground":"#7d8590","tree.indentGuidesStroke":"#21262d","welcomePage.buttonBackground":"#21262d","welcomePage.buttonHoverBackground":"#30363d"},"displayName":"GitHub Dark Default","name":"github-dark-default","semanticHighlighting":true,"tokenColors":[{"scope":["comment","punctuation.definition.comment","string.comment"],"settings":{"foreground":"#8b949e"}},{"scope":["constant.other.placeholder","constant.character"],"settings":{"foreground":"#ff7b72"}},{"scope":["constant","entity.name.constant","variable.other.constant","variable.other.enummember","variable.language","entity"],"settings":{"foreground":"#79c0ff"}},{"scope":["entity.name","meta.export.default","meta.definition.variable"],"settings":{"foreground":"#ffa657"}},{"scope":["variable.parameter.function","meta.jsx.children","meta.block","meta.tag.attributes","entity.name.constant","meta.object.member","meta.embedded.expression"],"settings":{"foreground":"#e6edf3"}},{"scope":"entity.name.function","settings":{"foreground":"#d2a8ff"}},{"scope":["entity.name.tag","support.class.component"],"settings":{"foreground":"#7ee787"}},{"scope":"keyword","settings":{"foreground":"#ff7b72"}},{"scope":["storage","storage.type"],"settings":{"foreground":"#ff7b72"}},{"scope":["storage.modifier.package","storage.modifier.import","storage.type.java"],"settings":{"foreground":"#e6edf3"}},{"scope":["string","string punctuation.section.embedded source"],"settings":{"foreground":"#a5d6ff"}},{"scope":"support","settings":{"foreground":"#79c0ff"}},{"scope":"meta.property-name","settings":{"foreground":"#79c0ff"}},{"scope":"variable","settings":{"foreground":"#ffa657"}},{"scope":"variable.other","settings":{"foreground":"#e6edf3"}},{"scope":"invalid.broken","settings":{"fontStyle":"italic","foreground":"#ffa198"}},{"scope":"invalid.deprecated","settings":{"fontStyle":"italic","foreground":"#ffa198"}},{"scope":"invalid.illegal","settings":{"fontStyle":"italic","foreground":"#ffa198"}},{"scope":"invalid.unimplemented","settings":{"fontStyle":"italic","foreground":"#ffa198"}},{"scope":"carriage-return","settings":{"background":"#ff7b72","content":"^M","fontStyle":"italic underline","foreground":"#f0f6fc"}},{"scope":"message.error","settings":{"foreground":"#ffa198"}},{"scope":"string variable","settings":{"foreground":"#79c0ff"}},{"scope":["source.regexp","string.regexp"],"settings":{"foreground":"#a5d6ff"}},{"scope":["string.regexp.character-class","string.regexp constant.character.escape","string.regexp source.ruby.embedded","string.regexp string.regexp.arbitrary-repitition"],"settings":{"foreground":"#a5d6ff"}},{"scope":"string.regexp constant.character.escape","settings":{"fontStyle":"bold","foreground":"#7ee787"}},{"scope":"support.constant","settings":{"foreground":"#79c0ff"}},{"scope":"support.variable","settings":{"foreground":"#79c0ff"}},{"scope":"support.type.property-name.json","settings":{"foreground":"#7ee787"}},{"scope":"meta.module-reference","settings":{"foreground":"#79c0ff"}},{"scope":"punctuation.definition.list.begin.markdown","settings":{"foreground":"#ffa657"}},{"scope":["markup.heading","markup.heading entity.name"],"settings":{"fontStyle":"bold","foreground":"#79c0ff"}},{"scope":"markup.quote","settings":{"foreground":"#7ee787"}},{"scope":"markup.italic","settings":{"fontStyle":"italic","foreground":"#e6edf3"}},{"scope":"markup.bold","settings":{"fontStyle":"bold","foreground":"#e6edf3"}},{"scope":["markup.underline"],"settings":{"fontStyle":"underline"}},{"scope":["markup.strikethrough"],"settings":{"fontStyle":"strikethrough"}},{"scope":"markup.inline.raw","settings":{"foreground":"#79c0ff"}},{"scope":["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],"settings":{"background":"#490202","foreground":"#ffa198"}},{"scope":["punctuation.section.embedded"],"settings":{"foreground":"#ff7b72"}},{"scope":["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],"settings":{"background":"#04260f","foreground":"#7ee787"}},{"scope":["markup.changed","punctuation.definition.changed"],"settings":{"background":"#5a1e02","foreground":"#ffa657"}},{"scope":["markup.ignored","markup.untracked"],"settings":{"background":"#79c0ff","foreground":"#161b22"}},{"scope":"meta.diff.range","settings":{"fontStyle":"bold","foreground":"#d2a8ff"}},{"scope":"meta.diff.header","settings":{"foreground":"#79c0ff"}},{"scope":"meta.separator","settings":{"fontStyle":"bold","foreground":"#79c0ff"}},{"scope":"meta.output","settings":{"foreground":"#79c0ff"}},{"scope":["brackethighlighter.tag","brackethighlighter.curly","brackethighlighter.round","brackethighlighter.square","brackethighlighter.angle","brackethighlighter.quote"],"settings":{"foreground":"#8b949e"}},{"scope":"brackethighlighter.unmatched","settings":{"foreground":"#ffa198"}},{"scope":["constant.other.reference.link","string.other.link"],"settings":{"foreground":"#a5d6ff"}}],"type":"dark"}'));var ms={bash:()=>import("./bash-AXAJJ7K6.mjs"),shellsession:()=>import("./shellsession-REQ4XMXL.mjs"),powershell:()=>import("./powershell-CF3YYGE3.mjs"),bat:()=>import("./bat-7CTKDPA4.mjs"),javascript:()=>import("./javascript-FK6BYXR7.mjs"),typescript:()=>import("./typescript-423LFGQL.mjs"),jsx:()=>import("./jsx-53PXQ2NL.mjs"),tsx:()=>import("./tsx-IMEWP7MM.mjs"),json:()=>import("./json-KOMOQDAQ.mjs"),jsonc:()=>import("./jsonc-ZEH5OBPD.mjs"),yaml:()=>import("./yaml-HBNW4TN5.mjs"),toml:()=>import("./toml-HFJFO2T2.mjs"),ini:()=>import("./ini-4KFO7XTF.mjs"),properties:()=>import("./properties-2HBJIUMB.mjs"),xml:()=>import("./xml-J4Q6YQIU.mjs"),xsl:()=>import("./xsl-QZERU56Y.mjs"),html:()=>import("./html-M7IQMCZW.mjs"),css:()=>import("./css-TX5O34LD.mjs"),scss:()=>import("./scss-UA7SFP3B.mjs"),markdown:()=>import("./markdown-AXYPIRPT.mjs"),java:()=>import("./java-4TDTVHME.mjs"),python:()=>import("./python-4EUPCMJH.mjs"),go:()=>import("./go-UCPHIMPJ.mjs"),rust:()=>import("./rust-YKPB2B2E.mjs"),c:()=>import("./c-2ALCOF6B.mjs"),cpp:()=>import("./cpp-ELFCDB6P.mjs"),csharp:()=>import("./csharp-UJBNPXBE.mjs"),sql:()=>import("./sql-WST4KER7.mjs"),diff:()=>import("./diff-ITLGU3RJ.mjs"),docker:()=>import("./docker-W46D43PZ.mjs"),makefile:()=>import("./makefile-PSNUPH2Q.mjs"),groovy:()=>import("./groovy-RX766UL6.mjs"),kotlin:()=>import("./kotlin-7LYXSLAF.mjs"),ruby:()=>import("./ruby-6JITY6TM.mjs"),graphql:()=>import("./graphql-GWC2SWRW.mjs"),nginx:()=>import("./nginx-G3STFXGR.mjs"),hcl:()=>import("./hcl-BQZ3TWA5.mjs"),http:()=>import("./http-YDAJYC64.mjs")},$t={bash:"bash",bat:"bat",batch:"bat",c:"c","c#":"csharp","c++":"cpp",cjs:"javascript",console:"shellsession",cpp:"cpp","cpp-macro":"cpp",cs:"csharp",csharp:"csharp",css:"css",cts:"typescript",diff:"diff",docker:"docker",dockerfile:"docker",glsl:"cpp",go:"go",gql:"graphql",graphql:"graphql",groovy:"groovy",haml:"ruby",hcl:"hcl",html:"html",http:"http",ini:"ini",java:"java",javascript:"javascript",js:"javascript",json:"json",jsonc:"jsonc",jsx:"jsx",kotlin:"kotlin",kt:"kotlin",kts:"kotlin",lua:"ruby",make:"makefile",makefile:"makefile",markdown:"markdown",md:"markdown",mjs:"javascript",mts:"typescript",nginx:"nginx",powershell:"powershell",properties:"ini",ps:"powershell",ps1:"powershell",py:"python",python:"python",rb:"ruby",regex:"cpp",regexp:"cpp",rs:"rust",ruby:"ruby",rust:"rust",scss:"scss",sh:"bash",shell:"bash",shellscript:"bash",shellsession:"shellsession",sql:"sql",toml:"toml",ts:"typescript",tsx:"tsx",typescript:"typescript",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yaml",zsh:"bash"},bs={markdown:{bat:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(bat(?:|ch))((\\s+|[,:?{])[^`]*)?$)"],c:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:([ch])((\\s+|[,:?{])[^`]*)?$)"],cpp:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(c(?:pp|\\+\\+|xx))((\\s+|[,:?{])[^`]*)?$)"],csharp:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(c(?:s|sharp|#))((\\s+|[,:?{])[^`]*)?$)"],css:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(css(?:|.erb))((\\s+|[,:?{])[^`]*)?$)"],diff:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(patch|diff|rej)((\\s+|[,:?{])[^`]*)?$)"],docker:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:([Dd]ockerfile)((\\s+|[,:?{])[^`]*)?$)"],go:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(go(?:|lang))((\\s+|[,:?{])[^`]*)?$)"],groovy:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(g(?:roovy|vy))((\\s+|[,:?{])[^`]*)?$)"],html:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(html?|shtml|xhtml|inc|tmpl|tpl)((\\s+|[,:?{])[^`]*)?$)","(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(php3??|php4|php5|phpt|phtml|aw|ctp)((\\s+|[,:?{])[^`]*)?$)"],ini:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(ini|conf)((\\s+|[,:?{])[^`]*)?$)"],java:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(java|bsh)((\\s+|[,:?{])[^`]*)?$)"],javascript:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsx??|javascript|es6|mjs|cjs|dataviewjs|\\{\\.js.+?})((\\s+|[,:?{])[^`]*)?$)"],json:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(json5??|sublime-settings|sublime-menu|sublime-keymap|sublime-mousemap|sublime-theme|sublime-build|sublime-project|sublime-completions)((\\s+|[,:?{])[^`]*)?$)"],jsonc:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsonc)((\\s+|[,:?{])[^`]*)?$)"],lua:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(lua)((\\s+|[,:?{])[^`]*)?$)"],make:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:((?:[Mm]|GNUm|OCamlM)akefile)((\\s+|[,:?{])[^`]*)?$)"],powershell:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(p(?:owershell|s1|sm1|sd1|wsh))((\\s+|[,:?{])[^`]*)?$)"],python:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(python|py3??|rpy|pyw|cpy|SConstruct|Sconstruct|sconstruct|SConscript|gypi??|\\{\\.python.+?})((\\s+|[,:?{])[^`]*)?$)"],regexp:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(re)((\\s+|[,:?{])[^`]*)?$)"],ruby:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(ruby|rbx??|rjs|Rakefile|rake|cgi|fcgi|gemspec|irbrc|Capfile|ru|prawn|Cheffile|Gemfile|Guardfile|Hobofile|Vagrantfile|Appraisals|Rantfile|Berksfile|Berksfile.lock|Thorfile|Puppetfile)((\\s+|[,:?{])[^`]*)?$)"],rust:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(rust|rs|\\{\\.rust.+?})((\\s+|[,:?{])[^`]*)?$)"],scss:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(scss)((\\s+|[,:?{])[^`]*)?$)"],shellscript:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(shell|sh|bash|zsh|bashrc|bash_profile|bash_login|profile|bash_logout|.textmate_init|\\{\\.bash.+?})((\\s+|[,:?{])[^`]*)?$)"],sql:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(sql|ddl|dml)((\\s+|[,:?{])[^`]*)?$)"],tsx:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(tsx)((\\s+|[,:?{])[^`]*)?$)"],typescript:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(t(?:ypescript|s))((\\s+|[,:?{])[^`]*)?$)"],xml:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(xml|xsd|tld|jsp|pt|cpt|dtml|rss|opml)((\\s+|[,:?{])[^`]*)?$)"],xsl:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(xslt??)((\\s+|[,:?{])[^`]*)?$)"],yaml:["(|)(\\s*)(`{3,}|~{3,})\\s*(?i:(ya?ml)((\\s+|[,:?{])[^`]*)?$)","(?=(-{3,}))"]},haml:{css:["(\\s*)(:(css|styles?))$"],javascript:["(\\s*):javascript","(\\s*)%script"],markdown:["(\\s*)(:markdown)"],ruby:["(\\s*):ruby","(\\s*):ruby$","\\s*(?:((%)([-:\\w]+))|(?=[#.]))","(\\s*):(ruby|opal)$","(\\s*)(:ruby)","#\\{","!?==","\\{","(&amp|!)?([-=~])"]}},jn={haml:["haml"],markdown:["markdown"],ruby:["haml"]};var Sc=/(\s+\/\/)/,vc=/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/,_c=/(?:\/\/|#|;{1,2}|%{1,2}|--)(\s*)$/,xc=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function Ec(e,t,n){let r=[];for(let o of e){if(n==="v3"){let a=o.children.flatMap((l,c)=>{if(l.type!=="element")return l;let u=l.children[0];if(u.type!=="text")return l;let d=c===o.children.length-1;if(!Hn(u.value,d))return l;let h=u.value.split(Sc);if(h.length<=1)return l;let f=[h[0]];for(let g=1;g<h.length;g+=2)f.push(h[g]+(h[g+1]||""));return f=f.filter(Boolean),f.length<=1?l:f.map(g=>({...l,children:[{type:"text",value:g}]}))});a.length!==o.children.length&&(o.children=a)}let s=o.children,i=s.length-1;n==="v1"?i=0:t&&(i=s.length-2);for(let a=Math.max(i,0);a<s.length;a++){let l=s[a];if(l.type!=="element")continue;let c=l.children.at(0);if(c?.type!=="text")continue;let u=a===s.length-1,d=Hn(c.value,u),h;if(!d&&a>0&&c.value.trim().startsWith("[!code")){let f=s[a-1];if(f?.type==="element"){let g=f.children.at(0);if(g?.type==="text"&&g.value.includes("//")){let m=Hn(g.value+c.value,u);if(m){d=m,r.push({info:m,line:o,token:f,isLineCommentOnly:s.length===2&&f.children.length===1&&l.children.length===1,isJsxStyle:!1,additionalTokens:[l]});continue}}}}if(d)if(t&&!u&&a!==0){let f=ys(s[a-1],"{")&&ys(s[a+1],"}");r.push({info:d,line:o,token:l,isLineCommentOnly:s.length===3&&l.children.length===1,isJsxStyle:f,additionalTokens:h})}else r.push({info:d,line:o,token:l,isLineCommentOnly:s.length===1&&l.children.length===1,isJsxStyle:!1,additionalTokens:h})}}return r}function ys(e,t){if(e.type!=="element")return!1;let n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function Hn(e,t){let n=e.trimStart(),r=e.length-n.length;n=n.trimEnd();let o=e.length-n.length-r;for(let[s,i]of xc){if(i&&!t)continue;let a=s.exec(n);if(a)return[" ".repeat(r)+a[1],a[2],a[3]?a[3]+" ".repeat(o):void 0]}}function Ic(e){let t=e.match(vc);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function Ac(e){let t=e.match(_c);return t&&t[1].trim().length===0?e.slice(0,t.index).trimEnd():e}function ks(e,t,n,r){return r??="v3",{name:e,code(o){let s=o.children.filter(c=>c.type==="element"),i=[];o.data??={};let a=o.data;a._shiki_notation??=Ec(s,["jsx","tsx"].includes(this.options.lang),r);let l=a._shiki_notation;for(let c of l){if(c.info[1].length===0)continue;let u=s.indexOf(c.line);c.isLineCommentOnly&&r!=="v1"&&u++;let d=!1;if(c.info[1]=c.info[1].replace(t,(...f)=>n.call(this,f,c.line,c.token,s,u)?(d=!0,""):f[0]),!d)continue;r==="v1"?c.info[1]=Ic(c.info[1]):r==="v3"&&(c.info[1]=Ac(c.info[1]));let h=c.info[1].trim().length===0;if(h&&(c.info[1]=""),h&&c.isLineCommentOnly)i.push(c.line);else if(h&&c.isJsxStyle)c.line.children.splice(c.line.children.indexOf(c.token)-1,3);else if(h){if(c.additionalTokens)for(let f=c.additionalTokens.length-1;f>=0;f--){let g=c.additionalTokens[f],m=c.line.children.indexOf(g);m!==-1&&c.line.children.splice(m,1)}c.line.children.splice(c.line.children.indexOf(c.token),1)}else{let f=c.token.children[0];if(f.type==="text"&&(f.value=c.info.join(""),c.additionalTokens))for(let g of c.additionalTokens){let m=g.children[0];m?.type==="text"&&(m.value="")}}}for(let c of i){let u=o.children.indexOf(c),d=o.children[u+1],h=1;d?.type==="text"&&d?.value===`
153
+ `&&(h=2),o.children.splice(u,h)}}}}var Gh=Symbol("highlighted-lines");var Rc=/[.*+?^${}()|[\]\\]/g;function Nc(e){return e.replace(Rc,"\\$&")}function Ft(e={},t="@shikijs/transformers:notation-map"){let{classMap:n={},classActivePre:r=void 0,classActiveCode:o=void 0}=e;return ks(t,new RegExp(`#?\\s*\\[!code (${Object.keys(n).map(Nc).join("|")})(:\\d+)?\\]`,"gi"),function([s,i,a=":1"],l,c,u,d){let h=Number.parseInt(a.slice(1),10);for(let f=d;f<Math.min(d+h,u.length);f++)this.addClassToHast(u[f],n[i]);return r&&this.addClassToHast(this.pre,r),o&&this.addClassToHast(this.code,o),!0},e.matchAlgorithm)}function ws(e={}){let{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff",classActiveCode:o}=e;return Ft({classMap:{"++":t,"--":n},classActivePre:r,classActiveCode:o,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function Cs(e={}){let{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"],info:["highlighted","info"]},classActivePre:n="has-highlighted",classActiveCode:r}=e;return Ft({classMap:t,classActivePre:n,classActiveCode:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-error-level")}function Ss(e={}){let{classActiveLine:t="focused",classActivePre:n="has-focused",classActiveCode:r}=e;return Ft({classMap:{focus:t},classActivePre:n,classActiveCode:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-focus")}function vs(e={}){let{classActiveLine:t="highlighted",classActivePre:n="has-highlighted",classActiveCode:r}=e;return Ft({classMap:{highlight:t,hl:t},classActivePre:n,classActiveCode:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}function Bc(e,t,n,r){let o=_s(e),s=o.indexOf(n);for(;s!==-1;)Tc.call(this,e.children,t,s,n.length,r),s=o.indexOf(n,s+1)}function _s(e){return e.type==="text"?e.value:e.type==="element"&&e.tagName==="span"?e.children.map(_s).join(""):""}function Tc(e,t,n,r,o){let s=0;for(let i=0;i<e.length;i++){let a=e[i];if(a.type!=="element"||a.tagName!=="span"||a===t)continue;let l=a.children[0];if(l.type==="text"){if(Lc([s,s+l.value.length-1],[n,n+r])){let c=Math.max(0,n-s),u=r-Math.max(0,s-n);if(u===0)continue;let d=Pc(a,l,c,u);this.addClassToHast(d[1],o);let h=d.filter(Boolean);e.splice(i,1,...h),i+=h.length-1}s+=l.value.length}}}function Lc(e,t){return e[0]<=t[1]&&e[1]>=t[0]}function Pc(e,t,n,r){let o=t.value,s=i=>Mc(e,{children:[{type:"text",value:i}]});return[n>0?s(o.slice(0,n)):void 0,s(o.slice(n,n+r)),n+r<o.length?s(o.slice(n+r)):void 0]}function Mc(e,t){return{...e,properties:{...e.properties},...t}}var $c=/\s*\[!code word:((?:\\.|[^:\]])+)(:\d+)?\]/,Fc=/\\(.)/g;function xs(e={}){let{classActiveWord:t="highlighted-word",classActivePre:n=void 0}=e;return ks("@shikijs/transformers:notation-highlight-word",$c,function([r,o,s],i,a,l,c){let u=s?Number.parseInt(s.slice(1),10):l.length;o=o.replace(Fc,"$1");for(let d=c;d<Math.min(c+u,l.length);d++)Bc.call(this,l[d],a,o,t);return n&&this.addClassToHast(this.pre,n),!0},e.matchAlgorithm)}var Oc={terminal:"bash",console:"shellsession","shell-session":"shellsession",cmd:"bat",dos:"bat",batch:"bat",dita:"xml",ditamap:"xml",ditaval:"xml",xhtml:"html",svg:"xml",xslt:"xsl",yml:"yaml",conf:"ini",cfg:"ini",env:"properties",dockerfile:"docker",containerfile:"docker","c++":"cpp","c#":"csharp",cs:"csharp",gradle:"groovy",kt:"kotlin",py:"python",rb:"ruby",md:"markdown",terraform:"hcl",tf:"hcl"},zn=1e3,Es=5e3,Is;function Gc(){return Is??=bo({themes:[gs,ps],langs:[],engine:Dn({forgiving:!0})}),Is}var Un=new Map,Te=new Set;function Dc(e,t){let n=Un.get(t);return n||(n=ms[t]().then(async r=>{await e.loadLanguage(...r.default);for(let o of e.getLoadedLanguages())Te.add(o)}).catch(r=>{throw Un.delete(t),r}),Un.set(t,n)),n}var Wn=new Map;function jc(e){if(!Wn.has(e)){let t=null;try{t=Lt(e)}catch{t=null}Wn.set(e,t)}return Wn.get(e)}function Ot(e,t,n=new Set,r=Hc(t)){if(e==="text"||n.has(e))return n;n.add(e);for(let o of jn[e]??[])for(let[s,i]of Object.entries(bs[o])){if(n.has(s))continue;(!r||i.some(l=>{if(l==="")return!0;let c=jc(l);return!c||r.some(u=>(c.lastIndex=0,c.test(u)))}))&&Ot(s,t,n,r)}return n}function Hc(e){if(e!==void 0)return Dt(e.replace(/\n$/,""),!1).split(/\r?\n/).filter(t=>t.length<zn).map(t=>t+`
154
+ `)}var As=new Map;function Bs(e){let t=As.get(e);return t||As.set(e,t=[...Ot(e,void 0)]),t}function Uc(e,t){if(!Te.has(e))return!1;if(!jn[e]||Bs(e).every(n=>Te.has(n)))return!0;for(let n of Ot(e,t))if(!Te.has(n))return!1;return!0}function Rs(e){let t=(e??"").toLowerCase().trim();if(Vn.has(t))return"text";let n=Oc[t]??t;return Object.hasOwn($t,n)?n:"text"}var Wc=8e6;async function Kh(e={}){let t=await Gc(),n={light:"github-light-default",dark:"github-dark-default"},r=e.onePass===!1?void 0:hs(t,n),o=Rs,s=0,i=!0,a=async y=>{let b=new Set;for(let p of y){let w=typeof p=="object"?p:{lang:p,code:void 0},C=Rs(w.lang);if(C==="text")continue;let S=Bs(C);if(!S.every(E=>Te.has(E)))for(let E of w.code===void 0||S.length===1?S:Ot(C,w.code))Te.has(E)||b.add($t[E])}b.size&&await Promise.all([...b].map(p=>Dc(t,p)))};e.langs==="all"?await a(Object.keys($t)):e.langs&&await a(e.langs);let l=new Map,c=0,u=0,d=0,h=Number.isFinite(e.cacheChars)&&e.cacheChars>=0?e.cacheChars:Wc,f=(y,b,p)=>`${b??""}\0${p.lineNumbers?1:0}\0${(p.highlights??[]).join(",")}\0${(p.diffAdd??[]).join(",")}\0${(p.diffRemove??[]).join(",")}\0${y}`,g=(y,b)=>{let p=y.length+b.length;if(p>h/4)return;for(let[C,S]of l){if(c+p<=h)break;l.delete(C),c-=S.key.length+S.html.length}let w={key:Ns(y),html:Ns(b)};l.set(w.key,w),c+=p},m=(y,b,p={})=>{let w=o(b),C=Dt(y.replace(/\n$/,""),w==="text"),S=new Set(p.highlights??[]),E=new Set(p.diffAdd??[]),R=new Set(p.diffRemove??[]),F=p.lineNumbers?" line-numbers":"";if(i=!0,w==="text")return jt(C,p);if(!Uc(w,y))return i=!1,s++,jt(C,p);let N=C.includes("[!code"),K=[...N?[ws(),vs(),Ss(),Cs(),xs()]:[],{name:"dogsbay:lines",line(D,A){S.has(A)&&this.addClassToHast(D,"highlighted"),E.has(A)?this.addClassToHast(D,["diff","add"]):R.has(A)&&this.addClassToHast(D,["diff","remove"])}}];(p.lineNumbers||E.size||R.size||N)&&K.push(zc(!!p.lineNumbers));try{let D=()=>t.codeToHtml(C,{lang:w,themes:n,defaultColor:!1,tokenizeMaxLineLength:zn,tokenizeTimeLimit:Es,transformers:K}),A;if(r&&!N)try{A=r(C,{lang:w,tokenizeMaxLineLength:zn,tokenizeTimeLimit:Es,transformers:K})}catch{A=void 0}return A??=D(),F?A.replace('<pre class="shiki',`<pre class="shiki${F}`):A}catch{return`<pre class="shiki shiki-plain${F}" tabindex="0"><code>${qn(C)}</code></pre>`}};return{resolve:o,render:m,load:a,cacheStats:()=>({entries:l.size,chars:c,hits:u,misses:d,unloaded:s}),has:(y,b,p={})=>l.has(f(y,b,p)),prime(y,b,p,w){let C=f(y,b,p);l.has(C)||g(C,w)},code(y,b,p={}){let w=f(y,b,p),C=l.get(w);if(C!==void 0)return u++,l.delete(w),l.set(C.key,C),C.html;d++;let S=m(y,b,p);return i&&g(w,S),S}}}var Ns=e=>JSON.parse(JSON.stringify(e));function zc(e){return{name:"dogsbay:gutter",code(t){let n=i=>{let a=i.properties?.class;return Array.isArray(a)?a.join(" "):String(a??"")},r=t.children.filter(i=>i.type==="element"&&i.tagName==="span"),o=r.some(i=>/\bdiff\b/.test(n(i)));if(!e&&!o)return;let s=1;for(let i of r){let a=n(i);if(!/\bline\b/.test(a))continue;let l=/\badd\b/.test(a)?"add":/\bremove\b/.test(a)?"remove":"",c=[];e&&c.push(String(s).padStart(3)),o&&c.push(l==="add"?"+":l==="remove"?"\u2212":" "),i.children.unshift({type:"element",tagName:"span",properties:{class:`gutter${l?` ${l}`:""}`,"data-pagefind-ignore":""},children:[{type:"text",value:c.join(" ")}]}),s++}}}}export{Wc as DEFAULT_HIGHLIGHT_CACHE_CHARS,Kh as createHighlighter,Ls as parseLineRanges};