@mastra/deployer-cloud 1.79.0-alpha.7 → 1.79.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-DA-rfuFy.js","./html-pp8916En.js","./javascript-wDzz0qaB.js","./css-CLj8gQPS.js","./angular-ts-BrjP3tb8.js","./scss-D5BDwBP9.js","./apl-CORt7UWP.js","./xml-sdJ4AIDG.js","./java-CylS5w8V.js","./json-Cp-IABpG.js","./astro-HNnZUWAn.js","./typescript-BPQ3VLAy.js","./postcss-CXtECtnM.js","./tsx-COt5Ahok.js","./blade-2xfisSek.js","./html-derivative-DlHx6ybY.js","./sql-CRqJ_cUM.js","./bsl-DlhNcFeZ.js","./sdbl-DVxCFoDh.js","./cairo-KRGpt6FW.js","./python-B6aJPvgy.js","./chapel-DTp_pixX.js","./c-BIGW1oBm.js","./cobol-nBiQ_Alo.js","./coffee-Ch7k5sss.js","./cpp-BMRokrvK.js","./regexp-CDVJQ6XC.js","./glsl-DplSGwfg.js","./crystal-DGywbUpC.js","./shellscript-Yzrsuije.js","./edge-FbVlp4U3.js","./elixir-CkH2-t6x.js","./elm-DbKCFpqz.js","./erb-DXfck5VN.js","./ruby-C0TQ7zu5.js","./haml-D5jkg6IW.js","./graphql-ChdNCCLP.js","./jsx-g9-lgVsj.js","./lua-BaeVxFsk.js","./yaml-Buea-lGh.js","./erlang-DsQrWhSR.js","./markdown-Cvjx9yec.js","./fortran-fixed-form-CkoXwp7k.js","./fortran-free-form-BxgE0vQu.js","./fsharp-CXgrBDvD.js","./gdresource-TyuKm33G.js","./gdshader-DkwncUOv.js","./gdscript-DqcFQ5yU.js","./git-commit-F4YmCXRG.js","./diff-D97Zzqfu.js","./git-rebase-r7XF79zn.js","./glimmer-js-ByusRIyA.js","./glimmer-ts-BfAWNZQY.js","./hack-BWmVpMyf.js","./handlebars-BpdQsYii.js","./http-jrhK8wxY.js","./hurl-irOxFIW8.js","./csv-fuZLfV_i.js","./hxml-2-FPmUDs.js","./haxe-CfZj7gIn.js","./jinja-f2NsQr07.js","./jison-wvAkD_A8.js","./julia-5Bft2YPA.js","./r-Cf5RLm7j.js","./just-Cwhn7H3k.js","./perl-B9cMNwum.js","./latex-D5pSuvFb.js","./tex-D96PA37w.js","./liquid-C0sCDyMI.js","./marko-DjSrsDqO.js","./less-B1dDrJ26.js","./mdc-D1_yUvq7.js","./nextflow-C-mBbutL.js","./nextflow-groovy-vE_lwT2v.js","./nginx-BpAMiNFr.js","./nim-BIad80T-.js","./org-DM6o9KBp.js","./ini-BEwlwnbL.js","./make-CHLpvVh8.js","./php-Csjmro_R.js","./vb-Cu-pLBUe.js","./clojure-P80f7IUj.js","./objective-c-DXmwc3jG.js","./docker-BcOcwvcX.js","./go-C27-OAKa.js","./groovy-gcz8RCvz.js","./raku-DXvB9xmW.js","./rust-B1yitclQ.js","./scala-CqE71os6.js","./csharp-DSvCPggb.js","./dart-bE4Kk8sk.js","./ocaml-C0hk2d4L.js","./zig-VOosw3JB.js","./xsl-CtQFsRM5.js","./pug-DKIMFp6K.js","./qml-3beO22l8.js","./razor-BjBPvh-w.js","./rst-bs7f0vWN.js","./cmake-D1j8_8rp.js","./sas-DEy46yEz.js","./shaderlab-Dg9Lc6iA.js","./hlsl-D3lLCCz7.js","./shellsession-BADoaaVG.js","./soy-8wufbnw4.js","./sparql-rVzFXLq3.js","./turtle-BsS91CYL.js","./stata-DI20mbqo.js","./surrealql-Cjom0U5J.js","./svelte-Cy7k_4gC.js","./templ-DhtptRzy.js","./ts-tags-D351s5mN.js","./twig-27uCiNez.js","./typst-BUadGCkm.js","./bat-CickPsom.js","./bibtex-CHM0blh-.js","./jsonc-Des-eS-w.js","./log-2UxHyX5q.js","./powershell-BmBUJMz7.js","./swift-C2oV4EkX.js","./verilog-nZwndyjY.js","./system-verilog-0hqHdDBg.js","./vue-BqiEGhQt.js","./vue-html-AaS7Mt5G.js","./vue-vine-BoDAl6tE.js","./stylus-BEDo0Tqx.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{w as ur,s as as,f as cl,a as hl,b as fl,c as xr,z as pl,h as ml,r as q,j as U,u as gl,d as _l}from"./main-GmTtMbns.js";import{_ as p}from"./preload-helper-PPVm8Dsz.js";function vl(e){return cr(e)}function cr(e){return Array.isArray(e)?bl(e):e instanceof RegExp?e:typeof e=="object"?yl(e):e}function bl(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=cr(e[n]);return t}function yl(e){let t={};for(let n in e)t[n]=cr(e[n]);return t}function ls(e,...t){return t.forEach(n=>{for(let i in n)e[i]=n[i]}),e}function ds(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?ds(e.substring(0,e.length-1)):e.substr(~t+1)}var Qn=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,jt=class{static hasCaptures(e){return e===null?!1:(Qn.lastIndex=0,Qn.test(e))}static replaceCaptures(e,t,n){return e.replace(Qn,(i,r,o,s)=>{let l=n[parseInt(r||o,10)];if(l){let a=t.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return i})}};function us(e,t){return e<t?-1:e>t?1:0}function cs(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,i=t.length;if(n===i){for(let r=0;r<n;r++){let o=us(e[r],t[r]);if(o!==0)return o}return 0}return n-i}function Ar(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 hs(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var fs=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},bn=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Cl(e),t)}static createFromParsedTheme(e,t){return wl(e,t)}_cachedMatchRoot=new fs(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,i=this._cachedMatchRoot.get(t).find(r=>El(e.parent,r.parentScopes));return i?new ps(i.fontStyle,i.foreground,i.background):null}},Jn=class fn{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const i of n)t=new fn(t,i);return t}static from(...t){let n=null;for(let i=0;i<t.length;i++)n=new fn(n,t[i]);return n}push(t){return new fn(this,t)}getSegments(){let t=this;const 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){const n=[];let i=this;for(;i&&i!==t;)n.push(i.scopeName),i=i.parent;return i===t?n.reverse():void 0}};function El(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let i=t[n],r=!1;if(i===">"){if(n===t.length-1)return!1;i=t[++n],r=!0}for(;e&&!Sl(e.scopeName,i);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Sl(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var ps=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Cl(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],i=0;for(let r=0,o=t.length;r<o;r++){let s=t[r];if(!s.settings)continue;let l;if(typeof s.scope=="string"){let c=s.scope;c=c.replace(/^[,]+/,""),c=c.replace(/[,]+$/,""),l=c.split(",")}else Array.isArray(s.scope)?l=s.scope:l=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let c=s.settings.fontStyle.split(" ");for(let f=0,h=c.length;f<h;f++)switch(c[f]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let d=null;typeof s.settings.foreground=="string"&&Ar(s.settings.foreground)&&(d=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&Ar(s.settings.background)&&(u=s.settings.background);for(let c=0,f=l.length;c<f;c++){let m=l[c].trim().split(" "),g=m[m.length-1],b=null;m.length>1&&(b=m.slice(0,m.length-1),b.reverse()),n[i++]=new Ll(g,b,r,a,d,u)}}return n}var Ll=class{constructor(e,t,n,i,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=i,this.foreground=r,this.background=o}},ne=(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))(ne||{});function wl(e,t){e.sort((a,d)=>{let u=us(a.scope,d.scope);return u!==0||(u=cs(a.parentScopes,d.parentScopes),u!==0)?u:a.index-d.index});let n=0,i="#000000",r="#ffffff";for(;e.length>=1&&e[0].scope==="";){let a=e.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(i=a.foreground),a.background!==null&&(r=a.background)}let o=new kl(t),s=new ps(n,o.getId(i),o.getId(r)),l=new Al(new xi(0,null,-1,0,0),[]);for(let a=0,d=e.length;a<d;a++){let u=e[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new bn(o,s,l)}var kl=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)}},xl=Object.freeze([]),xi=class ms{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,i,r,o){this.scopeDepth=t,this.parentScopes=n||xl,this.fontStyle=i,this.foreground=r,this.background=o}clone(){return new ms(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let i=0,r=t.length;i<r;i++)n[i]=t[i].clone();return n}acceptOverwrite(t,n,i,r){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),i!==0&&(this.foreground=i),r!==0&&(this.background=r)}},Al=class Ai{constructor(t,n=[],i={}){this._mainRule=t,this._children=i,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let i=0,r=0;for(;t.parentScopes[i]===">"&&i++,n.parentScopes[r]===">"&&r++,!(i>=t.parentScopes.length||r>=n.parentScopes.length);){const o=n.parentScopes[r].length-t.parentScopes[i].length;if(o!==0)return o;i++,r++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let i=t.indexOf("."),r,o;if(i===-1?(r=t,o=""):(r=t.substring(0,i),o=t.substring(i+1)),this._children.hasOwnProperty(r))return this._children[r].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Ai._cmpBySpecificity),n}insert(t,n,i,r,o,s){if(n===""){this._doInsertHere(t,i,r,o,s);return}let l=n.indexOf("."),a,d;l===-1?(a=n,d=""):(a=n.substring(0,l),d=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Ai(this._mainRule.clone(),xi.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(t+1,d,i,r,o,s)}_doInsertHere(t,n,i,r,o){if(n===null){this._mainRule.acceptOverwrite(t,i,r,o);return}for(let s=0,l=this._rulesWithParentScopes.length;s<l;s++){let a=this._rulesWithParentScopes[s];if(cs(a.parentScopes,n)===0){a.acceptOverwrite(t,i,r,o);return}}i===-1&&(i=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new xi(t,n,i,r,o))}},rt=class le{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=le.getLanguageId(t),i=le.getTokenType(t),r=le.getFontStyle(t),o=le.getForeground(t),s=le.getBackground(t);console.log({languageId:n,tokenType:i,fontStyle:r,foreground:o,background:s})}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,i,r,o,s,l){let a=le.getLanguageId(t),d=le.getTokenType(t),u=le.containsBalancedBrackets(t)?1:0,c=le.getFontStyle(t),f=le.getForeground(t),h=le.getBackground(t);return n!==0&&(a=n),i!==8&&(d=i),r!==null&&(u=r?1:0),o!==-1&&(c=o),s!==0&&(f=s),l!==0&&(h=l),(a<<0|d<<8|u<<10|c<<11|f<<15|h<<24)>>>0}};function yn(e,t){const n=[],i=Rl(e);let r=i.next();for(;r!==null;){let a=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=i.next()}let d=s();if(n.push({matcher:d,priority:a}),r!==",")break;r=i.next()}return n;function o(){if(r==="-"){r=i.next();const a=o();return d=>!!a&&!a(d)}if(r==="("){r=i.next();const a=l();return r===")"&&(r=i.next()),a}if(Rr(r)){const a=[];do a.push(r),r=i.next();while(Rr(r));return d=>t(a,d)}return null}function s(){const a=[];let d=o();for(;d;)a.push(d),d=o();return u=>a.every(c=>c(u))}function l(){const a=[];let d=s();for(;d&&(a.push(d),r==="|"||r===",");){do r=i.next();while(r==="|"||r===",");d=s()}return u=>a.some(c=>c(u))}}function Rr(e){return!!e&&!!e.match(/[\w\.:]+/)}function Rl(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const i=n[0];return n=t.exec(e),i}}}function gs(e){typeof e.dispose=="function"&&e.dispose()}var Ot=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Tl=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Il=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Pl=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ot(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Il;for(const n of e)Dl(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Ot){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 Dl(e,t,n,i){const r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Ot?pn({baseGrammar:o,selfGrammar:r},i):Ri(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},i);const s=n.injections(e.scopeName);if(s)for(const l of s)i.add(new Ot(l))}function Ri(e,t,n){if(t.repository&&t.repository[e]){const i=t.repository[e];En([i],t,n)}}function pn(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&En(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&En(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function En(e,t,n){for(const i of e){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const r=i.repository?ls({},t.repository,i.repository):t.repository;Array.isArray(i.patterns)&&En(i.patterns,{...t,repository:r},n);const o=i.include;if(!o)continue;const s=_s(o);switch(s.kind){case 0:pn({...t,selfGrammar:t.baseGrammar},n);break;case 1:pn(t,n);break;case 2:Ri(s.ruleName,{...t,repository:r},n);break;case 3:case 4:const l=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(l){const a={baseGrammar:t.baseGrammar,selfGrammar:l,repository:r};s.kind===4?Ri(s.ruleName,a,n):pn(a,n)}else s.kind===4?n.add(new Tl(s.scopeName,s.ruleName)):n.add(new Ot(s.scopeName));break}}}var Ol=class{kind=0},Nl=class{kind=1},Ml=class{constructor(e){this.ruleName=e}kind=2},Hl=class{constructor(e){this.scopeName=e}kind=3},Fl=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function _s(e){if(e==="$base")return new Ol;if(e==="$self")return new Nl;const t=e.indexOf("#");if(t===-1)return new Hl(e);if(t===0)return new Ml(e.substring(1));{const n=e.substring(0,t),i=e.substring(t+1);return new Fl(n,i)}}var Vl=/\\(\d+)/,Tr=/\\(\d+)/g,$l=-1,vs=-2;var Bt=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,i){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=jt.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=jt.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${ds(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:jt.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:jt.replaceCaptures(this._contentName,e,t)}},Ul=class extends Bt{retokenizeCapturedWithRuleId;constructor(e,t,n,i,r){super(e,t,n,i),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Bl=class extends Bt{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,i,r){super(e,t,n,null),this._match=new Nt(i,this.id),this.captures=r,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,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Mt,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ir=class extends Bt{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,r){super(e,t,n,i),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Mt,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ti=class extends Bt{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,r,o,s,l,a,d){super(e,t,n,i),this._begin=new Nt(r,this.id),this.beginCaptures=o,this._end=new Nt(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=d.patterns,this.hasMissingPatterns=d.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,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Mt;for(const 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}},Sn=class extends Bt{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,i,r,o,s,l,a){super(e,t,n,i),this._begin=new Nt(r,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new Nt(s,vs),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(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,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Mt;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Mt,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},bs=class te{static createCaptureRule(t,n,i,r,o){return t.registerRule(s=>new Ul(n,s,i,r,o))}static getCompiledRuleId(t,n,i){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new Bl(t.$vscodeTextmateLocation,t.id,t.name,t.match,te._compileCaptures(t.captures,n,i));if(typeof t.begin>"u"){t.repository&&(i=ls({},i,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Ir(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,te._compilePatterns(o,n,i))}return t.while?new Sn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,te._compileCaptures(t.beginCaptures||t.captures,n,i),t.while,te._compileCaptures(t.whileCaptures||t.captures,n,i),te._compilePatterns(t.patterns,n,i)):new Ti(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,te._compileCaptures(t.beginCaptures||t.captures,n,i),t.end,te._compileCaptures(t.endCaptures||t.captures,n,i),t.applyEndPatternLast,te._compilePatterns(t.patterns,n,i))}),t.id}static _compileCaptures(t,n,i){let r=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);l>o&&(o=l)}for(let s=0;s<=o;s++)r[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);let a=0;t[s].patterns&&(a=te.getCompiledRuleId(t[s],n,i)),r[l]=te.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,a)}}return r}static _compilePatterns(t,n,i){let r=[];if(t)for(let o=0,s=t.length;o<s;o++){const l=t[o];let a=-1;if(l.include){const d=_s(l.include);switch(d.kind){case 0:case 1:a=te.getCompiledRuleId(i[l.include],n,i);break;case 2:let u=i[d.ruleName];u&&(a=te.getCompiledRuleId(u,n,i));break;case 3:case 4:const c=d.scopeName,f=d.kind===4?d.ruleName:null,h=n.getExternalGrammar(c,i);if(h)if(f){let m=h.repository[f];m&&(a=te.getCompiledRuleId(m,n,h.repository))}else a=te.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else a=te.getCompiledRuleId(l,n,i);if(a!==-1){const d=n.getRule(a);let u=!1;if((d instanceof Ir||d instanceof Ti||d instanceof Sn)&&d.hasMissingPatterns&&d.patterns.length===0&&(u=!0),u)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},Nt=class ys{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const i=t.length;let r=0,o=[],s=!1;for(let l=0;l<i;l++)if(t.charAt(l)==="\\"&&l+1<i){const d=t.charAt(l+1);d==="z"?(o.push(t.substring(r,l)),o.push("$(?!\\n)(?<!\\n)"),r=l+2):(d==="A"||d==="G")&&(s=!0),l++}this.hasAnchor=s,r===0?this.source=t:(o.push(t.substring(r,i)),this.source=o.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=Vl.test(this.source):this.hasBackReferences=!1}clone(){return new ys(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 i=n.map(r=>t.substring(r.start,r.end));return Tr.lastIndex=0,this.source.replace(Tr,(r,o)=>hs(i[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],i=[],r=[],o,s,l,a;for(o=0,s=this.source.length;o<s;o++)l=this.source.charAt(o),t[o]=l,n[o]=l,i[o]=l,r[o]=l,l==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(t[o+1]="",n[o+1]="",i[o+1]="A",r[o+1]="A"):a==="G"?(t[o+1]="",n[o+1]="G",i[o+1]="",r[o+1]="G"):(t[o+1]=a,n[o+1]=a,i[o+1]=a,r[o+1]=a),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:i.join(""),A1_G1:r.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}},Mt=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 Pr(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 i=this._items.map(r=>r.resolveAnchors(t,n));return new Pr(e,i,this._items.map(r=>r.ruleId))}},Pr=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(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
2
|
+
import{w as ur,s as as,f as cl,a as hl,b as fl,c as xr,z as pl,h as ml,r as q,j as U,u as gl,d as _l}from"./main-D6HxdGiJ.js";import{_ as p}from"./preload-helper-PPVm8Dsz.js";function vl(e){return cr(e)}function cr(e){return Array.isArray(e)?bl(e):e instanceof RegExp?e:typeof e=="object"?yl(e):e}function bl(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=cr(e[n]);return t}function yl(e){let t={};for(let n in e)t[n]=cr(e[n]);return t}function ls(e,...t){return t.forEach(n=>{for(let i in n)e[i]=n[i]}),e}function ds(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?ds(e.substring(0,e.length-1)):e.substr(~t+1)}var Qn=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,jt=class{static hasCaptures(e){return e===null?!1:(Qn.lastIndex=0,Qn.test(e))}static replaceCaptures(e,t,n){return e.replace(Qn,(i,r,o,s)=>{let l=n[parseInt(r||o,10)];if(l){let a=t.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(s){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return i})}};function us(e,t){return e<t?-1:e>t?1:0}function cs(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,i=t.length;if(n===i){for(let r=0;r<n;r++){let o=us(e[r],t[r]);if(o!==0)return o}return 0}return n-i}function Ar(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 hs(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var fs=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},bn=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Cl(e),t)}static createFromParsedTheme(e,t){return wl(e,t)}_cachedMatchRoot=new fs(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,i=this._cachedMatchRoot.get(t).find(r=>El(e.parent,r.parentScopes));return i?new ps(i.fontStyle,i.foreground,i.background):null}},Jn=class fn{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const i of n)t=new fn(t,i);return t}static from(...t){let n=null;for(let i=0;i<t.length;i++)n=new fn(n,t[i]);return n}push(t){return new fn(this,t)}getSegments(){let t=this;const 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){const n=[];let i=this;for(;i&&i!==t;)n.push(i.scopeName),i=i.parent;return i===t?n.reverse():void 0}};function El(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let i=t[n],r=!1;if(i===">"){if(n===t.length-1)return!1;i=t[++n],r=!0}for(;e&&!Sl(e.scopeName,i);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Sl(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var ps=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Cl(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],i=0;for(let r=0,o=t.length;r<o;r++){let s=t[r];if(!s.settings)continue;let l;if(typeof s.scope=="string"){let c=s.scope;c=c.replace(/^[,]+/,""),c=c.replace(/[,]+$/,""),l=c.split(",")}else Array.isArray(s.scope)?l=s.scope:l=[""];let a=-1;if(typeof s.settings.fontStyle=="string"){a=0;let c=s.settings.fontStyle.split(" ");for(let f=0,h=c.length;f<h;f++)switch(c[f]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let d=null;typeof s.settings.foreground=="string"&&Ar(s.settings.foreground)&&(d=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&Ar(s.settings.background)&&(u=s.settings.background);for(let c=0,f=l.length;c<f;c++){let m=l[c].trim().split(" "),g=m[m.length-1],b=null;m.length>1&&(b=m.slice(0,m.length-1),b.reverse()),n[i++]=new Ll(g,b,r,a,d,u)}}return n}var Ll=class{constructor(e,t,n,i,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=i,this.foreground=r,this.background=o}},ne=(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))(ne||{});function wl(e,t){e.sort((a,d)=>{let u=us(a.scope,d.scope);return u!==0||(u=cs(a.parentScopes,d.parentScopes),u!==0)?u:a.index-d.index});let n=0,i="#000000",r="#ffffff";for(;e.length>=1&&e[0].scope==="";){let a=e.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(i=a.foreground),a.background!==null&&(r=a.background)}let o=new kl(t),s=new ps(n,o.getId(i),o.getId(r)),l=new Al(new xi(0,null,-1,0,0),[]);for(let a=0,d=e.length;a<d;a++){let u=e[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new bn(o,s,l)}var kl=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)}},xl=Object.freeze([]),xi=class ms{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,i,r,o){this.scopeDepth=t,this.parentScopes=n||xl,this.fontStyle=i,this.foreground=r,this.background=o}clone(){return new ms(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let i=0,r=t.length;i<r;i++)n[i]=t[i].clone();return n}acceptOverwrite(t,n,i,r){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),i!==0&&(this.foreground=i),r!==0&&(this.background=r)}},Al=class Ai{constructor(t,n=[],i={}){this._mainRule=t,this._children=i,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let i=0,r=0;for(;t.parentScopes[i]===">"&&i++,n.parentScopes[r]===">"&&r++,!(i>=t.parentScopes.length||r>=n.parentScopes.length);){const o=n.parentScopes[r].length-t.parentScopes[i].length;if(o!==0)return o;i++,r++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let i=t.indexOf("."),r,o;if(i===-1?(r=t,o=""):(r=t.substring(0,i),o=t.substring(i+1)),this._children.hasOwnProperty(r))return this._children[r].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Ai._cmpBySpecificity),n}insert(t,n,i,r,o,s){if(n===""){this._doInsertHere(t,i,r,o,s);return}let l=n.indexOf("."),a,d;l===-1?(a=n,d=""):(a=n.substring(0,l),d=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Ai(this._mainRule.clone(),xi.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(t+1,d,i,r,o,s)}_doInsertHere(t,n,i,r,o){if(n===null){this._mainRule.acceptOverwrite(t,i,r,o);return}for(let s=0,l=this._rulesWithParentScopes.length;s<l;s++){let a=this._rulesWithParentScopes[s];if(cs(a.parentScopes,n)===0){a.acceptOverwrite(t,i,r,o);return}}i===-1&&(i=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new xi(t,n,i,r,o))}},rt=class le{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=le.getLanguageId(t),i=le.getTokenType(t),r=le.getFontStyle(t),o=le.getForeground(t),s=le.getBackground(t);console.log({languageId:n,tokenType:i,fontStyle:r,foreground:o,background:s})}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,i,r,o,s,l){let a=le.getLanguageId(t),d=le.getTokenType(t),u=le.containsBalancedBrackets(t)?1:0,c=le.getFontStyle(t),f=le.getForeground(t),h=le.getBackground(t);return n!==0&&(a=n),i!==8&&(d=i),r!==null&&(u=r?1:0),o!==-1&&(c=o),s!==0&&(f=s),l!==0&&(h=l),(a<<0|d<<8|u<<10|c<<11|f<<15|h<<24)>>>0}};function yn(e,t){const n=[],i=Rl(e);let r=i.next();for(;r!==null;){let a=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=i.next()}let d=s();if(n.push({matcher:d,priority:a}),r!==",")break;r=i.next()}return n;function o(){if(r==="-"){r=i.next();const a=o();return d=>!!a&&!a(d)}if(r==="("){r=i.next();const a=l();return r===")"&&(r=i.next()),a}if(Rr(r)){const a=[];do a.push(r),r=i.next();while(Rr(r));return d=>t(a,d)}return null}function s(){const a=[];let d=o();for(;d;)a.push(d),d=o();return u=>a.every(c=>c(u))}function l(){const a=[];let d=s();for(;d&&(a.push(d),r==="|"||r===",");){do r=i.next();while(r==="|"||r===",");d=s()}return u=>a.some(c=>c(u))}}function Rr(e){return!!e&&!!e.match(/[\w\.:]+/)}function Rl(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const i=n[0];return n=t.exec(e),i}}}function gs(e){typeof e.dispose=="function"&&e.dispose()}var Ot=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Tl=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Il=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Pl=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ot(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Il;for(const n of e)Dl(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Ot){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 Dl(e,t,n,i){const r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Ot?pn({baseGrammar:o,selfGrammar:r},i):Ri(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},i);const s=n.injections(e.scopeName);if(s)for(const l of s)i.add(new Ot(l))}function Ri(e,t,n){if(t.repository&&t.repository[e]){const i=t.repository[e];En([i],t,n)}}function pn(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&En(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&En(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function En(e,t,n){for(const i of e){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const r=i.repository?ls({},t.repository,i.repository):t.repository;Array.isArray(i.patterns)&&En(i.patterns,{...t,repository:r},n);const o=i.include;if(!o)continue;const s=_s(o);switch(s.kind){case 0:pn({...t,selfGrammar:t.baseGrammar},n);break;case 1:pn(t,n);break;case 2:Ri(s.ruleName,{...t,repository:r},n);break;case 3:case 4:const l=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(l){const a={baseGrammar:t.baseGrammar,selfGrammar:l,repository:r};s.kind===4?Ri(s.ruleName,a,n):pn(a,n)}else s.kind===4?n.add(new Tl(s.scopeName,s.ruleName)):n.add(new Ot(s.scopeName));break}}}var Ol=class{kind=0},Nl=class{kind=1},Ml=class{constructor(e){this.ruleName=e}kind=2},Hl=class{constructor(e){this.scopeName=e}kind=3},Fl=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function _s(e){if(e==="$base")return new Ol;if(e==="$self")return new Nl;const t=e.indexOf("#");if(t===-1)return new Hl(e);if(t===0)return new Ml(e.substring(1));{const n=e.substring(0,t),i=e.substring(t+1);return new Fl(n,i)}}var Vl=/\\(\d+)/,Tr=/\\(\d+)/g,$l=-1,vs=-2;var Bt=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,i){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=jt.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=jt.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${ds(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:jt.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:jt.replaceCaptures(this._contentName,e,t)}},Ul=class extends Bt{retokenizeCapturedWithRuleId;constructor(e,t,n,i,r){super(e,t,n,i),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,i){throw new Error("Not supported!")}},Bl=class extends Bt{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,i,r){super(e,t,n,null),this._match=new Nt(i,this.id),this.captures=r,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,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Mt,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ir=class extends Bt{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,r){super(e,t,n,i),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Mt,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ti=class extends Bt{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,r,o,s,l,a,d){super(e,t,n,i),this._begin=new Nt(r,this.id),this.beginCaptures=o,this._end=new Nt(s||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=d.patterns,this.hasMissingPatterns=d.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,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Mt;for(const 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}},Sn=class extends Bt{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,i,r,o,s,l,a){super(e,t,n,i),this._begin=new Nt(r,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new Nt(s,vs),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(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,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Mt;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Mt,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},bs=class te{static createCaptureRule(t,n,i,r,o){return t.registerRule(s=>new Ul(n,s,i,r,o))}static getCompiledRuleId(t,n,i){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new Bl(t.$vscodeTextmateLocation,t.id,t.name,t.match,te._compileCaptures(t.captures,n,i));if(typeof t.begin>"u"){t.repository&&(i=ls({},i,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Ir(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,te._compilePatterns(o,n,i))}return t.while?new Sn(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,te._compileCaptures(t.beginCaptures||t.captures,n,i),t.while,te._compileCaptures(t.whileCaptures||t.captures,n,i),te._compilePatterns(t.patterns,n,i)):new Ti(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,te._compileCaptures(t.beginCaptures||t.captures,n,i),t.end,te._compileCaptures(t.endCaptures||t.captures,n,i),t.applyEndPatternLast,te._compilePatterns(t.patterns,n,i))}),t.id}static _compileCaptures(t,n,i){let r=[];if(t){let o=0;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);l>o&&(o=l)}for(let s=0;s<=o;s++)r[s]=null;for(const s in t){if(s==="$vscodeTextmateLocation")continue;const l=parseInt(s,10);let a=0;t[s].patterns&&(a=te.getCompiledRuleId(t[s],n,i)),r[l]=te.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,a)}}return r}static _compilePatterns(t,n,i){let r=[];if(t)for(let o=0,s=t.length;o<s;o++){const l=t[o];let a=-1;if(l.include){const d=_s(l.include);switch(d.kind){case 0:case 1:a=te.getCompiledRuleId(i[l.include],n,i);break;case 2:let u=i[d.ruleName];u&&(a=te.getCompiledRuleId(u,n,i));break;case 3:case 4:const c=d.scopeName,f=d.kind===4?d.ruleName:null,h=n.getExternalGrammar(c,i);if(h)if(f){let m=h.repository[f];m&&(a=te.getCompiledRuleId(m,n,h.repository))}else a=te.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else a=te.getCompiledRuleId(l,n,i);if(a!==-1){const d=n.getRule(a);let u=!1;if((d instanceof Ir||d instanceof Ti||d instanceof Sn)&&d.hasMissingPatterns&&d.patterns.length===0&&(u=!0),u)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},Nt=class ys{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const i=t.length;let r=0,o=[],s=!1;for(let l=0;l<i;l++)if(t.charAt(l)==="\\"&&l+1<i){const d=t.charAt(l+1);d==="z"?(o.push(t.substring(r,l)),o.push("$(?!\\n)(?<!\\n)"),r=l+2):(d==="A"||d==="G")&&(s=!0),l++}this.hasAnchor=s,r===0?this.source=t:(o.push(t.substring(r,i)),this.source=o.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=Vl.test(this.source):this.hasBackReferences=!1}clone(){return new ys(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 i=n.map(r=>t.substring(r.start,r.end));return Tr.lastIndex=0,this.source.replace(Tr,(r,o)=>hs(i[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],i=[],r=[],o,s,l,a;for(o=0,s=this.source.length;o<s;o++)l=this.source.charAt(o),t[o]=l,n[o]=l,i[o]=l,r[o]=l,l==="\\"&&o+1<s&&(a=this.source.charAt(o+1),a==="A"?(t[o+1]="",n[o+1]="",i[o+1]="A",r[o+1]="A"):a==="G"?(t[o+1]="",n[o+1]="G",i[o+1]="",r[o+1]="G"):(t[o+1]=a,n[o+1]=a,i[o+1]=a,r[o+1]=a),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:i.join(""),A1_G1:r.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}},Mt=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 Pr(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 i=this._items.map(r=>r.resolveAnchors(t,n));return new Pr(e,i,this._items.map(r=>r.ruleId))}},Pr=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(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
3
3
|
`)}findNextMatchSync(e,t,n){const i=this.scanner.findNextMatchSync(e,t,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},Yn=class{constructor(e,t){this.languageId=e,this.tokenType=t}},zl=class Ii{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Yn(t,8),this._embeddedLanguagesMatcher=new Gl(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Ii._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Yn(0,0);_getBasicScopeAttributes=new fs(t=>{const n=this._scopeToLanguage(t),i=this._toStandardTokenType(t);return new Yn(n,i)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Ii.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/},Gl=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,i])=>hs(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Dr=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Es(e,t,n,i,r,o,s,l){const a=t.content.length;let d=!1,u=-1;if(s){const h=jl(e,t,n,i,r,o);r=h.stack,i=h.linePos,n=h.isFirstLine,u=h.anchorPosition}const c=Date.now();for(;!d;){if(l!==0&&Date.now()-c>l)return new Dr(r,!0);f()}return new Dr(r,!1);function f(){const h=Wl(e,t,n,i,r,u);if(!h){o.produce(r,a),d=!0;return}const m=h.captureIndices,g=h.matchedRuleId,b=m&&m.length>0?m[0].end>i:!1;if(g===$l){const _=r.getRule(e);o.produce(r,m[0].start),r=r.withContentNameScopesList(r.nameScopesList),At(e,t,n,r,o,_.endCaptures,m),o.produce(r,m[0].end);const v=r;if(r=r.parent,u=v.getAnchorPos(),!b&&v.getEnterPos()===i){r=v,o.produce(r,a),d=!0;return}}else{const _=e.getRule(g);o.produce(r,m[0].start);const v=r,y=_.getName(t.content,m),S=r.contentNameScopesList.pushAttributed(y,e);if(r=r.push(g,i,u,m[0].end===a,null,S,S),_ instanceof Ti){const E=_;At(e,t,n,r,o,E.beginCaptures,m),o.produce(r,m[0].end),u=m[0].end;const C=E.getContentName(t.content,m),L=S.pushAttributed(C,e);if(r=r.withContentNameScopesList(L),E.endHasBackReferences&&(r=r.withEndRule(E.getEndWithResolvedBackReferences(t.content,m))),!b&&v.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),d=!0;return}}else if(_ instanceof Sn){const E=_;At(e,t,n,r,o,E.beginCaptures,m),o.produce(r,m[0].end),u=m[0].end;const C=E.getContentName(t.content,m),L=S.pushAttributed(C,e);if(r=r.withContentNameScopesList(L),E.whileHasBackReferences&&(r=r.withEndRule(E.getWhileWithResolvedBackReferences(t.content,m))),!b&&v.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),d=!0;return}}else if(At(e,t,n,r,o,_.captures,m),o.produce(r,m[0].end),r=r.pop(),!b){r=r.safePop(),o.produce(r,a),d=!0;return}}m[0].end>i&&(i=m[0].end,n=!1)}}function jl(e,t,n,i,r,o){let s=r.beginRuleCapturedEOL?0:-1;const l=[];for(let a=r;a;a=a.pop()){const d=a.getRule(e);d instanceof Sn&&l.push({rule:d,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:d,findOptions:u}=Xl(a.rule,e,a.stack.endRule,n,i===s),c=d.findNextMatchSync(t,i,u);if(c){if(c.ruleId!==vs){r=a.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(o.produce(a.stack,c.captureIndices[0].start),At(e,t,n,a.stack,o,a.rule.whileCaptures,c.captureIndices),o.produce(a.stack,c.captureIndices[0].end),s=c.captureIndices[0].end,c.captureIndices[0].end>i&&(i=c.captureIndices[0].end,n=!1))}else{r=a.stack.pop();break}}return{stack:r,linePos:i,anchorPosition:s,isFirstLine:n}}function Wl(e,t,n,i,r,o){const s=ql(e,t,n,i,r,o),l=e.getInjections();if(l.length===0)return s;const a=Kl(l,e,t,n,i,r,o);if(!a)return s;if(!s)return a;const d=s.captureIndices[0].start,u=a.captureIndices[0].start;return u<d||a.priorityMatch&&u===d?a:s}function ql(e,t,n,i,r,o){const s=r.getRule(e),{ruleScanner:l,findOptions:a}=Ss(s,e,r.endRule,n,i===o),d=l.findNextMatchSync(t,i,a);return d?{captureIndices:d.captureIndices,matchedRuleId:d.ruleId}:null}function Kl(e,t,n,i,r,o,s){let l=Number.MAX_VALUE,a=null,d,u=0;const c=o.contentNameScopesList.getScopeNames();for(let f=0,h=e.length;f<h;f++){const m=e[f];if(!m.matcher(c))continue;const g=t.getRule(m.ruleId),{ruleScanner:b,findOptions:_}=Ss(g,t,null,i,r===s),v=b.findNextMatchSync(n,r,_);if(!v)continue;const y=v.captureIndices[0].start;if(!(y>=l)&&(l=y,a=v.captureIndices,d=v.ruleId,u=m.priority,l===r))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:d}:null}function Ss(e,t,n,i,r){return{ruleScanner:e.compileAG(t,n,i,r),findOptions:0}}function Xl(e,t,n,i,r){return{ruleScanner:e.compileWhileAG(t,n,i,r),findOptions:0}}function At(e,t,n,i,r,o,s){if(o.length===0)return;const l=t.content,a=Math.min(o.length,s.length),d=[],u=s[0].end;for(let c=0;c<a;c++){const f=o[c];if(f===null)continue;const h=s[c];if(h.length===0)continue;if(h.start>u)break;for(;d.length>0&&d[d.length-1].endPos<=h.start;)r.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop();if(d.length>0?r.produceFromScopes(d[d.length-1].scopes,h.start):r.produce(i,h.start),f.retokenizeCapturedWithRuleId){const g=f.getName(l,s),b=i.contentNameScopesList.pushAttributed(g,e),_=f.getContentName(l,s),v=b.pushAttributed(_,e),y=i.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,b,v),S=e.createOnigString(l.substring(0,h.end));Es(e,S,n&&h.start===0,h.start,y,r,!1,0),gs(S);continue}const m=f.getName(l,s);if(m!==null){const b=(d.length>0?d[d.length-1].scopes:i.contentNameScopesList).pushAttributed(m,e);d.push(new Ql(b,h.end))}}for(;d.length>0;)r.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop()}var Ql=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Jl(e,t,n,i,r,o,s,l){return new Zl(e,t,n,i,r,o,s,l)}function Or(e,t,n,i,r){const o=yn(t,Cn),s=bs.getCompiledRuleId(n,i,r.repository);for(const l of o)e.push({debugSelector:t,matcher:l.matcher,ruleId:s,grammar:r,priority:l.priority})}function Cn(e,t){if(t.length<e.length)return!1;let n=0;return e.every(i=>{for(let r=n;r<t.length;r++)if(Yl(t[r],i))return n=r+1,!0;return!1})}function Yl(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var Zl=class{constructor(e,t,n,i,r,o,s,l){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new zl(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Nr(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const a of Object.keys(r)){const d=yn(a,Cn);for(const u of d)this._tokenTypeMatchers.push({matcher:u.matcher,type:r[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},t=[],n=this._rootScopeName,i=e.lookup(n);if(i){const r=i.injections;if(r)for(let s in r)Or(t,s,r[s],this,i);const o=this._grammarRepository.injections(n);o&&o.forEach(s=>{const l=this.getExternalGrammar(s);if(l){const a=l.injectionSelector;a&&Or(t,a,l,this,l)}})}return t.sort((r,o)=>r.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const 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){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Nr(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const i=this._tokenize(e,t,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(e,t,n=0){const i=this._tokenize(e,t,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(e,t,n,i){this._rootId===-1&&(this._rootId=bs.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!t||t===Pi.NULL){r=!0;const d=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),c=rt.set(0,d.languageId,d.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let h;f?h=Pt.createRootAndLookUpScopeName(f,c,this):h=Pt.createRoot("unknown",c),t=new Pi(null,this._rootId,-1,-1,!1,null,h,h)}else r=!1,t.reset();e=e+`
|
|
4
4
|
`;const o=this.createOnigString(e),s=o.content.length,l=new td(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Es(this,o,r,0,t,l,!0,i);return gs(o),{lineLength:s,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Nr(e,t){return e=vl(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 Pt=class ye{constructor(t,n,i){this.parent=t,this.scopePath=n,this.tokenAttributes=i}static fromExtension(t,n){let i=t,r=t?.scopePath??null;for(const o of n)r=Jn.push(r,o.scopeNames),i=new ye(i,r,o.encodedTokenAttributes);return i}static createRoot(t,n){return new ye(null,new Jn(null,t),n)}static createRootAndLookUpScopeName(t,n,i){const r=i.getMetadataForScope(t),o=new Jn(null,t),s=i.themeProvider.themeMatch(o),l=ye.mergeAttributes(n,r,s);return new ye(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return ye.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,i){let r=-1,o=0,s=0;return i!==null&&(r=i.fontStyle,o=i.foregroundId,s=i.backgroundId),rt.set(t,n.languageId,n.tokenType,null,r,o,s)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return ye._pushAttributed(this,t,n);const i=t.split(/ /g);let r=this;for(const o of i)r=ye._pushAttributed(r,o,n);return r}static _pushAttributed(t,n,i){const r=i.getMetadataForScope(n),o=t.scopePath.push(n),s=i.themeProvider.themeMatch(o),l=ye.mergeAttributes(t.tokenAttributes,r,s);return new ye(t,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let i=this;for(;i&&i!==t;)n.push({encodedTokenAttributes:i.tokenAttributes,scopeNames:i.scopePath.getExtensionIfDefined(i.parent?.scopePath??null)}),i=i.parent;return i===t?n.reverse():void 0}},Pi=class Ye{constructor(t,n,i,r,o,s,l,a){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=s,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=i,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new Ye(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Ye._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Pt.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(){Ye._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,i,r,o,s,l){return new Ye(this,t,n,i,r,o,s,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,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 Ye(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){const i=Pt.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Ye(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,Pt.fromExtension(i,n.contentNameScopesList))}},ed=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):yn(n,Cn).map(i=>i.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>yn(n,Cn).map(i=>i.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},td=class{constructor(e,t,n,i){this.balancedBracketSelectors=i,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 i=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const s of this._tokenTypeOverrides)s.matcher(o)&&(i=rt.set(i,0,s.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(o))}if(r&&(i=rt.set(i,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const 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);const n=new Uint32Array(this._binaryTokens.length);for(let i=0,r=this._binaryTokens.length;i<r;i++)n[i]=this._binaryTokens[i];return n}},nd=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,i,r){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,Jl(e,o,t,n,i,r,this,this._onigLib))}return this._grammars.get(e)}},id=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new nd(bn.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(bn.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,i){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:i})}loadGrammarWithConfiguration(t,n,i){return this._loadGrammar(t,n,i.embeddedLanguages,i.tokenTypes,new ed(i.balancedBracketSelectors||[],i.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,i,r,o){const s=new Pl(this._syncRegistry,t);for(;s.Q.length>0;)s.Q.map(l=>this._loadSingleGrammar(l.scopeName)),s.processQueue();return this._grammarForScopeName(t,n,i,r,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const i=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,i)}}addGrammar(t,n=[],i=0,r=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,i,r)}_grammarForScopeName(t,n=0,i=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,i,r,o)}},Di=Pi.NULL;const rd=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],od=/["&'<>`]/g,sd=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ad=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ld=/[|\\{}()[\]^$+*?.]/g,Mr=new WeakMap;function dd(e,t){if(e=e.replace(t.subset?ud(t.subset):od,i),t.subset||t.escapeOnly)return e;return e.replace(sd,n).replace(ad,i);function n(r,o,s){return t.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,s.charCodeAt(o+2),t)}function i(r,o,s){return t.format(r.charCodeAt(0),s.charCodeAt(o+1),t)}}function ud(e){let t=Mr.get(e);return t||(t=cd(e),Mr.set(e,t)),t}function cd(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(ld,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const hd=/[\dA-Fa-f]/;function fd(e,t,n){const i="&#x"+e.toString(16).toUpperCase();return n&&t&&!hd.test(String.fromCharCode(t))?i:i+";"}const pd=/\d/;function md(e,t,n){const i="&#"+String(e);return n&&t&&!pd.test(String.fromCharCode(t))?i:i+";"}const gd=["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"],Zn={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},_d=["cent","copy","divide","gt","lt","not","para","times"],Cs={}.hasOwnProperty,Oi={};let Wt;for(Wt in Zn)Cs.call(Zn,Wt)&&(Oi[Zn[Wt]]=Wt);const vd=/[^\dA-Za-z]/;function bd(e,t,n,i){const r=String.fromCharCode(e);if(Cs.call(Oi,r)){const o=Oi[r],s="&"+o;return n&&gd.includes(o)&&!_d.includes(o)&&(!i||t&&t!==61&&vd.test(String.fromCharCode(t)))?s:s+";"}return""}function yd(e,t,n){let i=fd(e,t,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=bd(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const o=md(e,t,n.omitOptionalSemicolons);o.length<i.length&&(i=o)}return r&&(!n.useShortestReferences||r.length<i.length)?r:i}function _t(e,t){return dd(e,Object.assign({format:yd},t))}const Ed=/^>|^->|<!--|-->|--!>|<!-$/g,Sd=[">"],Cd=["<",">"];function Ld(e,t,n,i){return i.settings.bogusComments?"<?"+_t(e.value,Object.assign({},i.settings.characterReferences,{subset:Sd}))+">":"<!--"+e.value.replace(Ed,r)+"-->";function r(o){return _t(o,Object.assign({},i.settings.characterReferences,{subset:Cd}))}}function wd(e,t,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"}const J=ws(1),Ls=ws(-1),kd=[];function ws(e){return t;function t(n,i,r){const o=n?n.children:kd;let s=(i||0)+e,l=o[s];if(!r)for(;l&&ur(l);)s+=e,l=o[s];return l}}const xd={}.hasOwnProperty;function ks(e){return t;function t(n,i,r){return xd.call(e,n.tagName)&&e[n.tagName](n,i,r)}}const hr=ks({body:Rd,caption:ei,colgroup:ei,dd:Dd,dt:Pd,head:ei,html:Ad,li:Id,optgroup:Od,option:Nd,p:Td,rp:Hr,rt:Hr,tbody:Hd,td:Fr,tfoot:Fd,th:Fr,thead:Md,tr:Vd});function ei(e,t,n){const i=J(n,t,!0);return!i||i.type!=="comment"&&!(i.type==="text"&&ur(i.value.charAt(0)))}function Ad(e,t,n){const i=J(n,t);return!i||i.type!=="comment"}function Rd(e,t,n){const i=J(n,t);return!i||i.type!=="comment"}function Td(e,t,n){const i=J(n,t);return i?i.type==="element"&&(i.tagName==="address"||i.tagName==="article"||i.tagName==="aside"||i.tagName==="blockquote"||i.tagName==="details"||i.tagName==="div"||i.tagName==="dl"||i.tagName==="fieldset"||i.tagName==="figcaption"||i.tagName==="figure"||i.tagName==="footer"||i.tagName==="form"||i.tagName==="h1"||i.tagName==="h2"||i.tagName==="h3"||i.tagName==="h4"||i.tagName==="h5"||i.tagName==="h6"||i.tagName==="header"||i.tagName==="hgroup"||i.tagName==="hr"||i.tagName==="main"||i.tagName==="menu"||i.tagName==="nav"||i.tagName==="ol"||i.tagName==="p"||i.tagName==="pre"||i.tagName==="section"||i.tagName==="table"||i.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 Id(e,t,n){const i=J(n,t);return!i||i.type==="element"&&i.tagName==="li"}function Pd(e,t,n){const i=J(n,t);return!!(i&&i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd"))}function Dd(e,t,n){const i=J(n,t);return!i||i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd")}function Hr(e,t,n){const i=J(n,t);return!i||i.type==="element"&&(i.tagName==="rp"||i.tagName==="rt")}function Od(e,t,n){const i=J(n,t);return!i||i.type==="element"&&i.tagName==="optgroup"}function Nd(e,t,n){const i=J(n,t);return!i||i.type==="element"&&(i.tagName==="option"||i.tagName==="optgroup")}function Md(e,t,n){const i=J(n,t);return!!(i&&i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot"))}function Hd(e,t,n){const i=J(n,t);return!i||i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot")}function Fd(e,t,n){return!J(n,t)}function Vd(e,t,n){const i=J(n,t);return!i||i.type==="element"&&i.tagName==="tr"}function Fr(e,t,n){const i=J(n,t);return!i||i.type==="element"&&(i.tagName==="td"||i.tagName==="th")}const $d=ks({body:zd,colgroup:Gd,head:Bd,html:Ud,tbody:jd});function Ud(e){const t=J(e,-1);return!t||t.type!=="comment"}function Bd(e){const t=new Set;for(const i of e.children)if(i.type==="element"&&(i.tagName==="base"||i.tagName==="title")){if(t.has(i.tagName))return!1;t.add(i.tagName)}const n=e.children[0];return!n||n.type==="element"}function zd(e){const t=J(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&ur(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function Gd(e,t,n){const i=Ls(n,t),r=J(e,-1,!0);return n&&i&&i.type==="element"&&i.tagName==="colgroup"&&hr(i,n.children.indexOf(i),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function jd(e,t,n){const i=Ls(n,t),r=J(e,-1);return n&&i&&i.type==="element"&&(i.tagName==="thead"||i.tagName==="tbody")&&hr(i,n.children.indexOf(i),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const qt={name:[[`
|
|
5
5
|
\f\r &/=>`.split(""),`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./main-
|
|
2
|
-
import{_ as a}from"./preload-helper-PPVm8Dsz.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))n(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const s of t.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function i(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function n(e){if(e.ep)return;e.ep=!0;const t=i(e);fetch(e.href,t)}})();const c=!1;function d(r){return r instanceof Error?r.stack||r.message:String(r)}function l(r,{showDetails:o=c}={}){const i=document.getElementById("root");if(!i||i.childElementCount>0)return;const n=document.createElement("main");n.setAttribute("role","alert"),n.style.cssText='min-height:100vh;background:#0b0d10;color:#f4f4f5;font-family:"Mona Sans",ui-sans-serif,system-ui,sans-serif;font-feature-settings:"ss06" on;padding:32px;box-sizing:border-box;';const e=document.createElement("h1");e.textContent="Mastra Studio failed to start",e.style.cssText="font-size:20px;line-height:1.4;margin:0 0 8px;";const t=document.createElement("p");if(t.textContent=o?"The startup module failed before React could render. Check the Vite terminal and browser console for the original request details.":"The startup module failed before React could render. Run Studio in development mode to view detailed diagnostics.",t.style.cssText="color:#a1a1aa;max-width:760px;margin:0 0 20px;line-height:1.6;",n.append(e,t),o){const s=document.createElement("pre");s.textContent=d(r),s.style.cssText="white-space:pre-wrap;overflow:auto;background:#18181b;border:1px solid #3f3f46;border-radius:8px;padding:16px;max-width:100%;line-height:1.5;",n.append(s)}i.replaceChildren(n)}try{const{startStudio:r}=await a(async()=>{const{startStudio:o}=await import("./main-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./main-D6HxdGiJ.js","./preload-helper-PPVm8Dsz.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as a}from"./preload-helper-PPVm8Dsz.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))n(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const s of t.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function i(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function n(e){if(e.ep)return;e.ep=!0;const t=i(e);fetch(e.href,t)}})();const c=!1;function d(r){return r instanceof Error?r.stack||r.message:String(r)}function l(r,{showDetails:o=c}={}){const i=document.getElementById("root");if(!i||i.childElementCount>0)return;const n=document.createElement("main");n.setAttribute("role","alert"),n.style.cssText='min-height:100vh;background:#0b0d10;color:#f4f4f5;font-family:"Mona Sans",ui-sans-serif,system-ui,sans-serif;font-feature-settings:"ss06" on;padding:32px;box-sizing:border-box;';const e=document.createElement("h1");e.textContent="Mastra Studio failed to start",e.style.cssText="font-size:20px;line-height:1.4;margin:0 0 8px;";const t=document.createElement("p");if(t.textContent=o?"The startup module failed before React could render. Check the Vite terminal and browser console for the original request details.":"The startup module failed before React could render. Run Studio in development mode to view detailed diagnostics.",t.style.cssText="color:#a1a1aa;max-width:760px;margin:0 0 20px;line-height:1.6;",n.append(e,t),o){const s=document.createElement("pre");s.textContent=d(r),s.style.cssText="white-space:pre-wrap;overflow:auto;background:#18181b;border:1px solid #3f3f46;border-radius:8px;padding:16px;max-width:100%;line-height:1.5;",n.append(s)}i.replaceChildren(n)}try{const{startStudio:r}=await a(async()=>{const{startStudio:o}=await import("./main-D6HxdGiJ.js").then(i=>i.m);return{startStudio:o}},__vite__mapDeps([0,1]),import.meta.url);r()}catch(r){console.error("Mastra Studio failed to start",r),l(r)}
|