@nuxt/hints 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/{DO_IqDaw.js → B4vt_CyB.js} +1 -1
- package/dist/client/_nuxt/{BY2SE5zy.js → B_iTBsIH.js} +1 -1
- package/dist/client/_nuxt/{CXDyekYo.js → Bbw7ce3V.js} +1 -1
- package/dist/client/_nuxt/{DuO5kjlf.js → BcxYQQsc.js} +1 -1
- package/dist/client/_nuxt/{BdyeT68K.js → BkVXKXN0.js} +1 -1
- package/dist/client/_nuxt/{DvAmuSmV.js → CHzNBdQb.js} +1 -1
- package/dist/client/_nuxt/{RxLv4Mw1.js → CWclkbhw.js} +1 -1
- package/dist/client/_nuxt/{C8XNfCrI.js → Cfc-cC1d.js} +1 -1
- package/dist/client/_nuxt/{Bz59FrZb.js → CtQBaKk_.js} +1 -1
- package/dist/client/_nuxt/{BqWnGSMi.js → D2PENJJm.js} +1 -1
- package/dist/client/_nuxt/{CZ1OMT3Z.js → D3XeBuAv.js} +1 -1
- package/dist/client/_nuxt/{BuQSe7zV.js → DPB6RpLN.js} +1 -1
- package/dist/client/_nuxt/{CgrjxMR_.js → DafxgOBV.js} +1 -1
- package/dist/client/_nuxt/{BsJUmJIm.js → Go90c0zs.js} +1 -1
- package/dist/client/_nuxt/{Dq5iEy-J.js → L1t8ZTI6.js} +1 -1
- package/dist/client/_nuxt/{DMLP1f5n.js → RW138bas.js} +1 -1
- package/dist/client/_nuxt/{BAtxTl2q.js → Ru4IiqT8.js} +1 -1
- package/dist/client/_nuxt/{a9uSpr3S.js → RxAeWyOY.js} +1 -1
- package/dist/client/_nuxt/ZEueWK5q.js +4 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/75d001ac-d80a-47e1-9a1b-97a7f66676b9.json +1 -0
- package/dist/client/_nuxt/error-404.DIIzRz9L.css +1 -0
- package/dist/client/_nuxt/error-500.6AUVNm3i.css +1 -0
- package/dist/client/_nuxt/{LCb0JLof.js → vK5BgTYY.js} +1 -1
- package/dist/client/component-lazy-load/index.html +1 -1
- package/dist/client/html-validate/index.html +1 -1
- package/dist/client/hydration/index.html +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/third-party-scripts/index.html +1 -1
- package/dist/client/web-vitals/index.html +1 -1
- package/dist/module.json +1 -1
- package/dist/runtime/third-party-scripts/plugin.client.js +1 -1
- package/package.json +17 -17
- package/dist/client/_nuxt/Cl_HNi2c.js +0 -4
- package/dist/client/_nuxt/builds/meta/cea48aba-646d-4d46-a351-56d2d19b2954.json +0 -1
- package/dist/client/_nuxt/error-404.B6ZMX39t.css +0 -1
- package/dist/client/_nuxt/error-500.dS86tDkg.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as y}from"./Cl_HNi2c.js";let L=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Sn(n){return Ye(n)}function Ye(n){return Array.isArray(n)?vn(n):n instanceof RegExp?n:typeof n=="object"?wn(n):n}function vn(n){let e=[];for(let t=0,r=n.length;t<r;t++)e[t]=Ye(n[t]);return e}function wn(n){let e={};for(let t in n)e[t]=Ye(n[t]);return e}function It(n,...e){return e.forEach(t=>{for(let r in t)n[r]=t[r]}),n}function xt(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?xt(n.substring(0,n.length-1)):n.substr(~e+1)}var Te=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ae=class{static hasCaptures(n){return n===null?!1:(Te.lastIndex=0,Te.test(n))}static replaceCaptures(n,e,t){return n.replace(Te,(r,o,s,i)=>{let l=t[parseInt(o||s,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Ot(n,e){return n<e?-1:n>e?1:0}function Dt(n,e){if(n===null&&e===null)return 0;if(!n)return-1;if(!e)return 1;let t=n.length,r=e.length;if(t===r){for(let o=0;o<t;o++){let s=Ot(n[o],e[o]);if(s!==0)return s}return 0}return t-r}function ct(n){return!!(/^#[0-9a-f]{6}$/i.test(n)||/^#[0-9a-f]{8}$/i.test(n)||/^#[0-9a-f]{3}$/i.test(n)||/^#[0-9a-f]{4}$/i.test(n))}function Mt(n){return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Bt=class{constructor(n){this.fn=n}cache=new Map;get(n){if(this.cache.has(n))return this.cache.get(n);const e=this.fn(n);return this.cache.set(n,e),e}},fe=class{constructor(n,e,t){this._colorMap=n,this._defaults=e,this._root=t}static createFromRawTheme(n,e){return this.createFromParsedTheme(Rn(n),e)}static createFromParsedTheme(n,e){return Ln(n,e)}_cachedMatchRoot=new Bt(n=>this._root.match(n));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(n){if(n===null)return this._defaults;const e=n.scopeName,r=this._cachedMatchRoot.get(e).find(o=>kn(n.parent,o.parentScopes));return r?new Gt(r.fontStyle,r.foreground,r.background):null}},Pe=class he{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const r of t)e=new he(e,r);return e}static from(...e){let t=null;for(let r=0;r<e.length;r++)t=new he(t,e[r]);return t}push(e){return new he(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push(r.scopeName),r=r.parent;return r===e?t.reverse():void 0}};function kn(n,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let r=e[t],o=!1;if(r===">"){if(t===e.length-1)return!1;r=e[++t],o=!0}for(;n&&!Cn(n.scopeName,r);){if(o)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}function Cn(n,e){return e===n||n.startsWith(e)&&n[e.length]==="."}var Gt=class{constructor(n,e,t){this.fontStyle=n,this.foregroundId=e,this.backgroundId=t}};function Rn(n){if(!n)return[];if(!n.settings||!Array.isArray(n.settings))return[];let e=n.settings,t=[],r=0;for(let o=0,s=e.length;o<s;o++){let i=e[o];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let h=i.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let h=i.settings.fontStyle.split(" ");for(let f=0,d=h.length;f<d;f++)switch(h[f]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof i.settings.foreground=="string"&&ct(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&ct(i.settings.background)&&(u=i.settings.background);for(let h=0,f=l.length;h<f;h++){let p=l[h].trim().split(" "),b=p[p.length-1],v=null;p.length>1&&(v=p.slice(0,p.length-1),v.reverse()),t[r++]=new En(b,v,o,a,c,u)}}return t}var En=class{constructor(n,e,t,r,o,s){this.scope=n,this.parentScopes=e,this.index=t,this.fontStyle=r,this.foreground=o,this.background=s}},I=(n=>(n[n.NotSet=-1]="NotSet",n[n.None=0]="None",n[n.Italic=1]="Italic",n[n.Bold=2]="Bold",n[n.Underline=4]="Underline",n[n.Strikethrough=8]="Strikethrough",n))(I||{});function Ln(n,e){n.sort((a,c)=>{let u=Ot(a.scope,c.scope);return u!==0||(u=Dt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let t=0,r="#000000",o="#ffffff";for(;n.length>=1&&n[0].scope==="";){let a=n.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(o=a.background)}let s=new An(e),i=new Gt(t,s.getId(r),s.getId(o)),l=new Pn(new Be(0,null,-1,0,0),[]);for(let a=0,c=n.length;a<c;a++){let u=n[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,s.getId(u.foreground),s.getId(u.background))}return new fe(s,i,l)}var An=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(n){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(n)){this._isFrozen=!0;for(let e=0,t=n.length;e<t;e++)this._color2id[n[e]]=e,this._id2color[e]=n[e]}else this._isFrozen=!1}getId(n){if(n===null)return 0;n=n.toUpperCase();let e=this._color2id[n];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${n}`);return e=++this._lastColorId,this._color2id[n]=e,this._id2color[e]=n,e}getColorMap(){return this._id2color.slice(0)}},Tn=Object.freeze([]),Be=class $t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,r,o,s){this.scopeDepth=e,this.parentScopes=t||Tn,this.fontStyle=r,this.foreground=o,this.background=s}clone(){return new $t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let r=0,o=e.length;r<o;r++)t[r]=e[r].clone();return t}acceptOverwrite(e,t,r,o){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),r!==0&&(this.foreground=r),o!==0&&(this.background=o)}},Pn=class Ge{constructor(e,t=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let r=0,o=0;for(;e.parentScopes[r]===">"&&r++,t.parentScopes[o]===">"&&o++,!(r>=e.parentScopes.length||o>=t.parentScopes.length);){const s=t.parentScopes[o].length-e.parentScopes[r].length;if(s!==0)return s;r++,o++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),o,s;if(r===-1?(o=e,s=""):(o=e.substring(0,r),s=e.substring(r+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(Ge._cmpBySpecificity),t}insert(e,t,r,o,s,i){if(t===""){this._doInsertHere(e,r,o,s,i);return}let l=t.indexOf("."),a,c;l===-1?(a=t,c=""):(a=t.substring(0,l),c=t.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Ge(this._mainRule.clone(),Be.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,o,s,i)}_doInsertHere(e,t,r,o,s){if(t===null){this._mainRule.acceptOverwrite(e,r,o,s);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(Dt(a.parentScopes,t)===0){a.acceptOverwrite(e,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 Be(e,t,r,o,s))}},Y=class M{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=M.getLanguageId(e),r=M.getTokenType(e),o=M.getFontStyle(e),s=M.getForeground(e),i=M.getBackground(e);console.log({languageId:t,tokenType:r,fontStyle:o,foreground:s,background:i})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,r,o,s,i,l){let a=M.getLanguageId(e),c=M.getTokenType(e),u=M.containsBalancedBrackets(e)?1:0,h=M.getFontStyle(e),f=M.getForeground(e),d=M.getBackground(e);return t!==0&&(a=t),r!==8&&(c=r),o!==null&&(u=o?1:0),s!==-1&&(h=s),i!==0&&(f=i),l!==0&&(d=l),(a<<0|c<<8|u<<10|h<<11|f<<15|d<<24)>>>0}};function pe(n,e){const t=[],r=Nn(n);let o=r.next();for(;o!==null;){let a=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let c=i();if(t.push({matcher:c,priority:a}),o!==",")break;o=r.next()}return t;function s(){if(o==="-"){o=r.next();const a=s();return c=>!!a&&!a(c)}if(o==="("){o=r.next();const a=l();return o===")"&&(o=r.next()),a}if(ut(o)){const a=[];do a.push(o),o=r.next();while(ut(o));return c=>e(a,c)}return null}function i(){const a=[];let c=s();for(;c;)a.push(c),c=s();return u=>a.every(h=>h(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),o==="|"||o===",");){do o=r.next();while(o==="|"||o===",");c=i()}return u=>a.some(h=>h(u))}}function ut(n){return!!n&&!!n.match(/[\w\.:]+/)}function Nn(n){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(n);return{next:()=>{if(!t)return null;const r=t[0];return t=e.exec(n),r}}}function Ut(n){typeof n.dispose=="function"&&n.dispose()}var te=class{constructor(n){this.scopeName=n}toKey(){return this.scopeName}},In=class{constructor(n,e){this.scopeName=n,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},xn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(n){const e=n.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(n))}},On=class{constructor(n,e){this.repo=n,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const n=this.Q;this.Q=[];const e=new xn;for(const t of n)Dn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof te){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function Dn(n,e,t,r){const o=t.lookup(n.scopeName);if(!o){if(n.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=t.lookup(e);n instanceof te?de({baseGrammar:s,selfGrammar:o},r):$e(n.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},r);const i=t.injections(n.scopeName);if(i)for(const l of i)r.add(new te(l))}function $e(n,e,t){if(e.repository&&e.repository[n]){const r=e.repository[n];me([r],e,t)}}function de(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&me(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&me(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function me(n,e,t){for(const r of n){if(t.visitedRule.has(r))continue;t.visitedRule.add(r);const o=r.repository?It({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&me(r.patterns,{...e,repository:o},t);const s=r.include;if(!s)continue;const i=jt(s);switch(i.kind){case 0:de({...e,selfGrammar:e.baseGrammar},t);break;case 1:de(e,t);break;case 2:$e(i.ruleName,{...e,repository:o},t);break;case 3:case 4:const l=i.scopeName===e.selfGrammar.scopeName?e.selfGrammar:i.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:o};i.kind===4?$e(i.ruleName,a,t):de(a,t)}else i.kind===4?t.add(new In(i.scopeName,i.ruleName)):t.add(new te(i.scopeName));break}}}var Mn=class{kind=0},Bn=class{kind=1},Gn=class{constructor(n){this.ruleName=n}kind=2},$n=class{constructor(n){this.scopeName=n}kind=3},Un=class{constructor(n,e){this.scopeName=n,this.ruleName=e}kind=4};function jt(n){if(n==="$base")return new Mn;if(n==="$self")return new Bn;const e=n.indexOf("#");if(e===-1)return new $n(n);if(e===0)return new Gn(n.substring(1));{const t=n.substring(0,e),r=n.substring(e+1);return new Un(t,r)}}var jn=/\\(\d+)/,ht=/\\(\d+)/g,Vn=-1,Vt=-2;var se=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(n,e,t,r){this.$location=n,this.id=e,this._name=t||null,this._nameIsCapturing=ae.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=ae.hasCaptures(this._contentName)}get debugName(){const n=this.$location?`${xt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${n}`}getName(n,e){return!this._nameIsCapturing||this._name===null||n===null||e===null?this._name:ae.replaceCaptures(this._name,n,e)}getContentName(n,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ae.replaceCaptures(this._contentName,n,e)}},Fn=class extends se{retokenizeCapturedWithRuleId;constructor(n,e,t,r,o){super(n,e,t,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(n,e){throw new Error("Not supported!")}compile(n,e){throw new Error("Not supported!")}compileAG(n,e,t,r){throw new Error("Not supported!")}},Hn=class extends se{_match;captures;_cachedCompiledPatterns;constructor(n,e,t,r,o){super(n,e,t,null),this._match=new ne(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(n,e){e.push(this._match)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},dt=class extends se{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(n,e,t,r,o){super(n,e,t,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(n,e){for(const t of this.patterns)n.getRule(t).collectPatterns(n,e)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ue=class extends se{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(n,e,t,r,o,s,i,l,a,c){super(n,e,t,r),this._begin=new ne(o,this.id),this.beginCaptures=s,this._end=new ne(i||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(n,e){return this._end.resolveBackReferences(n,e)}collectPatterns(n,e){e.push(this._begin)}compile(n,e){return this._getCachedCompiledPatterns(n,e).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n,e).compileAG(n,t,r)}_getCachedCompiledPatterns(n,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const t of this.patterns)n.getRule(t).collectPatterns(n,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},ge=class extends se{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(n,e,t,r,o,s,i,l,a){super(n,e,t,r),this._begin=new ne(o,this.id),this.beginCaptures=s,this.whileCaptures=l,this._while=new ne(i,Vt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(n,e){return this._while.resolveBackReferences(n,e)}collectPatterns(n,e){e.push(this._begin)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const e of this.patterns)n.getRule(e).collectPatterns(n,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(n,e){return this._getCachedCompiledWhilePatterns(n,e).compile(n)}compileWhileAG(n,e,t,r){return this._getCachedCompiledWhilePatterns(n,e).compileAG(n,t,r)}_getCachedCompiledWhilePatterns(n,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Ft=class N{static createCaptureRule(e,t,r,o,s){return e.registerRule(i=>new Fn(t,i,r,o,s))}static getCompiledRuleId(e,t,r){return e.id||t.registerRule(o=>{if(e.id=o,e.match)return new Hn(e.$vscodeTextmateLocation,e.id,e.name,e.match,N._compileCaptures(e.captures,t,r));if(typeof e.begin>"u"){e.repository&&(r=It({},r,e.repository));let s=e.patterns;return typeof s>"u"&&e.include&&(s=[{include:e.include}]),new dt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,N._compilePatterns(s,t,r))}return e.while?new ge(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,N._compileCaptures(e.beginCaptures||e.captures,t,r),e.while,N._compileCaptures(e.whileCaptures||e.captures,t,r),N._compilePatterns(e.patterns,t,r)):new Ue(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,N._compileCaptures(e.beginCaptures||e.captures,t,r),e.end,N._compileCaptures(e.endCaptures||e.captures,t,r),e.applyEndPatternLast,N._compilePatterns(e.patterns,t,r))}),e.id}static _compileCaptures(e,t,r){let o=[];if(e){let s=0;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>s&&(s=l)}for(let i=0;i<=s;i++)o[i]=null;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;e[i].patterns&&(a=N.getCompiledRuleId(e[i],t,r)),o[l]=N.createCaptureRule(t,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,a)}}return o}static _compilePatterns(e,t,r){let o=[];if(e)for(let s=0,i=e.length;s<i;s++){const l=e[s];let a=-1;if(l.include){const c=jt(l.include);switch(c.kind){case 0:case 1:a=N.getCompiledRuleId(r[l.include],t,r);break;case 2:let u=r[c.ruleName];u&&(a=N.getCompiledRuleId(u,t,r));break;case 3:case 4:const h=c.scopeName,f=c.kind===4?c.ruleName:null,d=t.getExternalGrammar(h,r);if(d)if(f){let p=d.repository[f];p&&(a=N.getCompiledRuleId(p,t,d.repository))}else a=N.getCompiledRuleId(d.repository.$self,t,d.repository);break}}else a=N.getCompiledRuleId(l,t,r);if(a!==-1){const c=t.getRule(a);let u=!1;if((c instanceof dt||c instanceof Ue||c instanceof ge)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;o.push(a)}}return{patterns:o,hasMissingPatterns:(e?e.length:0)!==o.length}}},ne=class Ht{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e=="string"){const r=e.length;let o=0,s=[],i=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(s.push(e.substring(o,l)),s.push("$(?!\\n)(?<!\\n)"),o=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,o===0?this.source=e:(s.push(e.substring(o,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=jn.test(this.source):this.hasBackReferences=!1}clone(){return new Ht(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=t.map(o=>e.substring(o.start,o.end));return ht.lastIndex=0,this.source.replace(ht,(o,s)=>Mt(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 e=[],t=[],r=[],o=[],s,i,l,a;for(s=0,i=this.source.length;s<i;s++)l=this.source.charAt(s),e[s]=l,t[s]=l,r[s]=l,o[s]=l,l==="\\"&&s+1<i&&(a=this.source.charAt(s+1),a==="A"?(e[s+1]="",t[s+1]="",r[s+1]="A",o[s+1]="A"):a==="G"?(e[s+1]="",t[s+1]="G",r[s+1]="",o[s+1]="G"):(e[s+1]=a,t[s+1]=a,r[s+1]=a,o[s+1]=a),s++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:r.join(""),A1_G1:o.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(n){this._items.push(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}unshift(n){this._items.unshift(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}length(){return this._items.length}setSource(n,e){this._items[n].source!==e&&(this._disposeCaches(),this._items[n].setSource(e))}compile(n){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new ft(n,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(n,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G0):this.compile(n)}_resolveAnchors(n,e,t){let r=this._items.map(o=>o.resolveAnchors(e,t));return new ft(n,r,this._items.map(o=>o.ruleId))}},ft=class{constructor(n,e,t){this.regExps=e,this.rules=t,this.scanner=n.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const n=[];for(let e=0,t=this.rules.length;e<t;e++)n.push(" - "+this.rules[e]+": "+this.regExps[e]);return n.join(`
|
|
1
|
+
import{q as y}from"./ZEueWK5q.js";let L=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Sn(n){return Ye(n)}function Ye(n){return Array.isArray(n)?vn(n):n instanceof RegExp?n:typeof n=="object"?wn(n):n}function vn(n){let e=[];for(let t=0,r=n.length;t<r;t++)e[t]=Ye(n[t]);return e}function wn(n){let e={};for(let t in n)e[t]=Ye(n[t]);return e}function It(n,...e){return e.forEach(t=>{for(let r in t)n[r]=t[r]}),n}function xt(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?xt(n.substring(0,n.length-1)):n.substr(~e+1)}var Te=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,ae=class{static hasCaptures(n){return n===null?!1:(Te.lastIndex=0,Te.test(n))}static replaceCaptures(n,e,t){return n.replace(Te,(r,o,s,i)=>{let l=t[parseInt(o||s,10)];if(l){let a=e.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function Ot(n,e){return n<e?-1:n>e?1:0}function Dt(n,e){if(n===null&&e===null)return 0;if(!n)return-1;if(!e)return 1;let t=n.length,r=e.length;if(t===r){for(let o=0;o<t;o++){let s=Ot(n[o],e[o]);if(s!==0)return s}return 0}return t-r}function ct(n){return!!(/^#[0-9a-f]{6}$/i.test(n)||/^#[0-9a-f]{8}$/i.test(n)||/^#[0-9a-f]{3}$/i.test(n)||/^#[0-9a-f]{4}$/i.test(n))}function Mt(n){return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Bt=class{constructor(n){this.fn=n}cache=new Map;get(n){if(this.cache.has(n))return this.cache.get(n);const e=this.fn(n);return this.cache.set(n,e),e}},fe=class{constructor(n,e,t){this._colorMap=n,this._defaults=e,this._root=t}static createFromRawTheme(n,e){return this.createFromParsedTheme(Rn(n),e)}static createFromParsedTheme(n,e){return Ln(n,e)}_cachedMatchRoot=new Bt(n=>this._root.match(n));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(n){if(n===null)return this._defaults;const e=n.scopeName,r=this._cachedMatchRoot.get(e).find(o=>kn(n.parent,o.parentScopes));return r?new Gt(r.fontStyle,r.foreground,r.background):null}},Pe=class he{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const r of t)e=new he(e,r);return e}static from(...e){let t=null;for(let r=0;r<e.length;r++)t=new he(t,e[r]);return t}push(e){return new he(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push(r.scopeName),r=r.parent;return r===e?t.reverse():void 0}};function kn(n,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let r=e[t],o=!1;if(r===">"){if(t===e.length-1)return!1;r=e[++t],o=!0}for(;n&&!Cn(n.scopeName,r);){if(o)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}function Cn(n,e){return e===n||n.startsWith(e)&&n[e.length]==="."}var Gt=class{constructor(n,e,t){this.fontStyle=n,this.foregroundId=e,this.backgroundId=t}};function Rn(n){if(!n)return[];if(!n.settings||!Array.isArray(n.settings))return[];let e=n.settings,t=[],r=0;for(let o=0,s=e.length;o<s;o++){let i=e[o];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let h=i.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),l=h.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let h=i.settings.fontStyle.split(" ");for(let f=0,d=h.length;f<d;f++)switch(h[f]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof i.settings.foreground=="string"&&ct(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&ct(i.settings.background)&&(u=i.settings.background);for(let h=0,f=l.length;h<f;h++){let p=l[h].trim().split(" "),b=p[p.length-1],v=null;p.length>1&&(v=p.slice(0,p.length-1),v.reverse()),t[r++]=new En(b,v,o,a,c,u)}}return t}var En=class{constructor(n,e,t,r,o,s){this.scope=n,this.parentScopes=e,this.index=t,this.fontStyle=r,this.foreground=o,this.background=s}},I=(n=>(n[n.NotSet=-1]="NotSet",n[n.None=0]="None",n[n.Italic=1]="Italic",n[n.Bold=2]="Bold",n[n.Underline=4]="Underline",n[n.Strikethrough=8]="Strikethrough",n))(I||{});function Ln(n,e){n.sort((a,c)=>{let u=Ot(a.scope,c.scope);return u!==0||(u=Dt(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let t=0,r="#000000",o="#ffffff";for(;n.length>=1&&n[0].scope==="";){let a=n.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(o=a.background)}let s=new An(e),i=new Gt(t,s.getId(r),s.getId(o)),l=new Pn(new Be(0,null,-1,0,0),[]);for(let a=0,c=n.length;a<c;a++){let u=n[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,s.getId(u.foreground),s.getId(u.background))}return new fe(s,i,l)}var An=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(n){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(n)){this._isFrozen=!0;for(let e=0,t=n.length;e<t;e++)this._color2id[n[e]]=e,this._id2color[e]=n[e]}else this._isFrozen=!1}getId(n){if(n===null)return 0;n=n.toUpperCase();let e=this._color2id[n];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${n}`);return e=++this._lastColorId,this._color2id[n]=e,this._id2color[e]=n,e}getColorMap(){return this._id2color.slice(0)}},Tn=Object.freeze([]),Be=class $t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,r,o,s){this.scopeDepth=e,this.parentScopes=t||Tn,this.fontStyle=r,this.foreground=o,this.background=s}clone(){return new $t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let r=0,o=e.length;r<o;r++)t[r]=e[r].clone();return t}acceptOverwrite(e,t,r,o){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),r!==0&&(this.foreground=r),o!==0&&(this.background=o)}},Pn=class Ge{constructor(e,t=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let r=0,o=0;for(;e.parentScopes[r]===">"&&r++,t.parentScopes[o]===">"&&o++,!(r>=e.parentScopes.length||o>=t.parentScopes.length);){const s=t.parentScopes[o].length-e.parentScopes[r].length;if(s!==0)return s;r++,o++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),o,s;if(r===-1?(o=e,s=""):(o=e.substring(0,r),s=e.substring(r+1)),this._children.hasOwnProperty(o))return this._children[o].match(s)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(Ge._cmpBySpecificity),t}insert(e,t,r,o,s,i){if(t===""){this._doInsertHere(e,r,o,s,i);return}let l=t.indexOf("."),a,c;l===-1?(a=t,c=""):(a=t.substring(0,l),c=t.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Ge(this._mainRule.clone(),Be.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,c,r,o,s,i)}_doInsertHere(e,t,r,o,s){if(t===null){this._mainRule.acceptOverwrite(e,r,o,s);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(Dt(a.parentScopes,t)===0){a.acceptOverwrite(e,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 Be(e,t,r,o,s))}},Y=class M{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=M.getLanguageId(e),r=M.getTokenType(e),o=M.getFontStyle(e),s=M.getForeground(e),i=M.getBackground(e);console.log({languageId:t,tokenType:r,fontStyle:o,foreground:s,background:i})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,r,o,s,i,l){let a=M.getLanguageId(e),c=M.getTokenType(e),u=M.containsBalancedBrackets(e)?1:0,h=M.getFontStyle(e),f=M.getForeground(e),d=M.getBackground(e);return t!==0&&(a=t),r!==8&&(c=r),o!==null&&(u=o?1:0),s!==-1&&(h=s),i!==0&&(f=i),l!==0&&(d=l),(a<<0|c<<8|u<<10|h<<11|f<<15|d<<24)>>>0}};function pe(n,e){const t=[],r=Nn(n);let o=r.next();for(;o!==null;){let a=0;if(o.length===2&&o.charAt(1)===":"){switch(o.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=r.next()}let c=i();if(t.push({matcher:c,priority:a}),o!==",")break;o=r.next()}return t;function s(){if(o==="-"){o=r.next();const a=s();return c=>!!a&&!a(c)}if(o==="("){o=r.next();const a=l();return o===")"&&(o=r.next()),a}if(ut(o)){const a=[];do a.push(o),o=r.next();while(ut(o));return c=>e(a,c)}return null}function i(){const a=[];let c=s();for(;c;)a.push(c),c=s();return u=>a.every(h=>h(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),o==="|"||o===",");){do o=r.next();while(o==="|"||o===",");c=i()}return u=>a.some(h=>h(u))}}function ut(n){return!!n&&!!n.match(/[\w\.:]+/)}function Nn(n){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(n);return{next:()=>{if(!t)return null;const r=t[0];return t=e.exec(n),r}}}function Ut(n){typeof n.dispose=="function"&&n.dispose()}var te=class{constructor(n){this.scopeName=n}toKey(){return this.scopeName}},In=class{constructor(n,e){this.scopeName=n,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},xn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(n){const e=n.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(n))}},On=class{constructor(n,e){this.repo=n,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new te(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const n=this.Q;this.Q=[];const e=new xn;for(const t of n)Dn(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof te){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function Dn(n,e,t,r){const o=t.lookup(n.scopeName);if(!o){if(n.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=t.lookup(e);n instanceof te?de({baseGrammar:s,selfGrammar:o},r):$e(n.ruleName,{baseGrammar:s,selfGrammar:o,repository:o.repository},r);const i=t.injections(n.scopeName);if(i)for(const l of i)r.add(new te(l))}function $e(n,e,t){if(e.repository&&e.repository[n]){const r=e.repository[n];me([r],e,t)}}function de(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&me(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&me(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function me(n,e,t){for(const r of n){if(t.visitedRule.has(r))continue;t.visitedRule.add(r);const o=r.repository?It({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&me(r.patterns,{...e,repository:o},t);const s=r.include;if(!s)continue;const i=jt(s);switch(i.kind){case 0:de({...e,selfGrammar:e.baseGrammar},t);break;case 1:de(e,t);break;case 2:$e(i.ruleName,{...e,repository:o},t);break;case 3:case 4:const l=i.scopeName===e.selfGrammar.scopeName?e.selfGrammar:i.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const a={baseGrammar:e.baseGrammar,selfGrammar:l,repository:o};i.kind===4?$e(i.ruleName,a,t):de(a,t)}else i.kind===4?t.add(new In(i.scopeName,i.ruleName)):t.add(new te(i.scopeName));break}}}var Mn=class{kind=0},Bn=class{kind=1},Gn=class{constructor(n){this.ruleName=n}kind=2},$n=class{constructor(n){this.scopeName=n}kind=3},Un=class{constructor(n,e){this.scopeName=n,this.ruleName=e}kind=4};function jt(n){if(n==="$base")return new Mn;if(n==="$self")return new Bn;const e=n.indexOf("#");if(e===-1)return new $n(n);if(e===0)return new Gn(n.substring(1));{const t=n.substring(0,e),r=n.substring(e+1);return new Un(t,r)}}var jn=/\\(\d+)/,ht=/\\(\d+)/g,Vn=-1,Vt=-2;var se=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(n,e,t,r){this.$location=n,this.id=e,this._name=t||null,this._nameIsCapturing=ae.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=ae.hasCaptures(this._contentName)}get debugName(){const n=this.$location?`${xt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${n}`}getName(n,e){return!this._nameIsCapturing||this._name===null||n===null||e===null?this._name:ae.replaceCaptures(this._name,n,e)}getContentName(n,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:ae.replaceCaptures(this._contentName,n,e)}},Fn=class extends se{retokenizeCapturedWithRuleId;constructor(n,e,t,r,o){super(n,e,t,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(n,e){throw new Error("Not supported!")}compile(n,e){throw new Error("Not supported!")}compileAG(n,e,t,r){throw new Error("Not supported!")}},Hn=class extends se{_match;captures;_cachedCompiledPatterns;constructor(n,e,t,r,o){super(n,e,t,null),this._match=new ne(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(n,e){e.push(this._match)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},dt=class extends se{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(n,e,t,r,o){super(n,e,t,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(n,e){for(const t of this.patterns)n.getRule(t).collectPatterns(n,e)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new re,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ue=class extends se{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(n,e,t,r,o,s,i,l,a,c){super(n,e,t,r),this._begin=new ne(o,this.id),this.beginCaptures=s,this._end=new ne(i||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=a||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(n,e){return this._end.resolveBackReferences(n,e)}collectPatterns(n,e){e.push(this._begin)}compile(n,e){return this._getCachedCompiledPatterns(n,e).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n,e).compileAG(n,t,r)}_getCachedCompiledPatterns(n,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const t of this.patterns)n.getRule(t).collectPatterns(n,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},ge=class extends se{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(n,e,t,r,o,s,i,l,a){super(n,e,t,r),this._begin=new ne(o,this.id),this.beginCaptures=s,this.whileCaptures=l,this._while=new ne(i,Vt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(n,e){return this._while.resolveBackReferences(n,e)}collectPatterns(n,e){e.push(this._begin)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new re;for(const e of this.patterns)n.getRule(e).collectPatterns(n,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(n,e){return this._getCachedCompiledWhilePatterns(n,e).compile(n)}compileWhileAG(n,e,t,r){return this._getCachedCompiledWhilePatterns(n,e).compileAG(n,t,r)}_getCachedCompiledWhilePatterns(n,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new re,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Ft=class N{static createCaptureRule(e,t,r,o,s){return e.registerRule(i=>new Fn(t,i,r,o,s))}static getCompiledRuleId(e,t,r){return e.id||t.registerRule(o=>{if(e.id=o,e.match)return new Hn(e.$vscodeTextmateLocation,e.id,e.name,e.match,N._compileCaptures(e.captures,t,r));if(typeof e.begin>"u"){e.repository&&(r=It({},r,e.repository));let s=e.patterns;return typeof s>"u"&&e.include&&(s=[{include:e.include}]),new dt(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,N._compilePatterns(s,t,r))}return e.while?new ge(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,N._compileCaptures(e.beginCaptures||e.captures,t,r),e.while,N._compileCaptures(e.whileCaptures||e.captures,t,r),N._compilePatterns(e.patterns,t,r)):new Ue(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,N._compileCaptures(e.beginCaptures||e.captures,t,r),e.end,N._compileCaptures(e.endCaptures||e.captures,t,r),e.applyEndPatternLast,N._compilePatterns(e.patterns,t,r))}),e.id}static _compileCaptures(e,t,r){let o=[];if(e){let s=0;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>s&&(s=l)}for(let i=0;i<=s;i++)o[i]=null;for(const i in e){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;e[i].patterns&&(a=N.getCompiledRuleId(e[i],t,r)),o[l]=N.createCaptureRule(t,e[i].$vscodeTextmateLocation,e[i].name,e[i].contentName,a)}}return o}static _compilePatterns(e,t,r){let o=[];if(e)for(let s=0,i=e.length;s<i;s++){const l=e[s];let a=-1;if(l.include){const c=jt(l.include);switch(c.kind){case 0:case 1:a=N.getCompiledRuleId(r[l.include],t,r);break;case 2:let u=r[c.ruleName];u&&(a=N.getCompiledRuleId(u,t,r));break;case 3:case 4:const h=c.scopeName,f=c.kind===4?c.ruleName:null,d=t.getExternalGrammar(h,r);if(d)if(f){let p=d.repository[f];p&&(a=N.getCompiledRuleId(p,t,d.repository))}else a=N.getCompiledRuleId(d.repository.$self,t,d.repository);break}}else a=N.getCompiledRuleId(l,t,r);if(a!==-1){const c=t.getRule(a);let u=!1;if((c instanceof dt||c instanceof Ue||c instanceof ge)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;o.push(a)}}return{patterns:o,hasMissingPatterns:(e?e.length:0)!==o.length}}},ne=class Ht{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e=="string"){const r=e.length;let o=0,s=[],i=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"&&l+1<r){const c=e.charAt(l+1);c==="z"?(s.push(e.substring(o,l)),s.push("$(?!\\n)(?<!\\n)"),o=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,o===0?this.source=e:(s.push(e.substring(o,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=jn.test(this.source):this.hasBackReferences=!1}clone(){return new Ht(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=t.map(o=>e.substring(o.start,o.end));return ht.lastIndex=0,this.source.replace(ht,(o,s)=>Mt(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 e=[],t=[],r=[],o=[],s,i,l,a;for(s=0,i=this.source.length;s<i;s++)l=this.source.charAt(s),e[s]=l,t[s]=l,r[s]=l,o[s]=l,l==="\\"&&s+1<i&&(a=this.source.charAt(s+1),a==="A"?(e[s+1]="",t[s+1]="",r[s+1]="A",o[s+1]="A"):a==="G"?(e[s+1]="",t[s+1]="G",r[s+1]="",o[s+1]="G"):(e[s+1]=a,t[s+1]=a,r[s+1]=a,o[s+1]=a),s++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:r.join(""),A1_G1:o.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},re=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(n){this._items.push(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}unshift(n){this._items.unshift(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}length(){return this._items.length}setSource(n,e){this._items[n].source!==e&&(this._disposeCaches(),this._items[n].setSource(e))}compile(n){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new ft(n,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(n,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G0):this.compile(n)}_resolveAnchors(n,e,t){let r=this._items.map(o=>o.resolveAnchors(e,t));return new ft(n,r,this._items.map(o=>o.ruleId))}},ft=class{constructor(n,e,t){this.regExps=e,this.rules=t,this.scanner=n.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const n=[];for(let e=0,t=this.rules.length;e<t;e++)n.push(" - "+this.rules[e]+": "+this.regExps[e]);return n.join(`
|
|
2
2
|
`)}findNextMatchSync(n,e,t){const r=this.scanner.findNextMatchSync(n,e,t);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ne=class{constructor(n,e){this.languageId=n,this.tokenType=e}},zn=class je{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Ne(e,8),this._embeddedLanguagesMatcher=new Wn(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?je._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new Ne(0,0);_getBasicScopeAttributes=new Bt(e=>{const t=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new Ne(t,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(je.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Wn=class{values;scopesRegExp;constructor(n){if(n.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(n);const e=n.map(([t,r])=>Mt(t));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(n){if(!this.scopesRegExp)return;const e=n.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},pt=class{constructor(n,e){this.stack=n,this.stoppedEarly=e}};function zt(n,e,t,r,o,s,i,l){const a=e.content.length;let c=!1,u=-1;if(i){const d=qn(n,e,t,r,o,s);o=d.stack,r=d.linePos,t=d.isFirstLine,u=d.anchorPosition}const h=Date.now();for(;!c;){if(l!==0&&Date.now()-h>l)return new pt(o,!0);f()}return new pt(o,!1);function f(){const d=Kn(n,e,t,r,o,u);if(!d){s.produce(o,a),c=!0;return}const p=d.captureIndices,b=d.matchedRuleId,v=p&&p.length>0?p[0].end>r:!1;if(b===Vn){const _=o.getRule(n);s.produce(o,p[0].start),o=o.withContentNameScopesList(o.nameScopesList),Q(n,e,t,o,s,_.endCaptures,p),s.produce(o,p[0].end);const S=o;if(o=o.parent,u=S.getAnchorPos(),!v&&S.getEnterPos()===r){o=S,s.produce(o,a),c=!0;return}}else{const _=n.getRule(b);s.produce(o,p[0].start);const S=o,g=_.getName(e.content,p),k=o.contentNameScopesList.pushAttributed(g,n);if(o=o.push(b,r,u,p[0].end===a,null,k,k),_ instanceof Ue){const R=_;Q(n,e,t,o,s,R.beginCaptures,p),s.produce(o,p[0].end),u=p[0].end;const O=R.getContentName(e.content,p),j=k.pushAttributed(O,n);if(o=o.withContentNameScopesList(j),R.endHasBackReferences&&(o=o.withEndRule(R.getEndWithResolvedBackReferences(e.content,p))),!v&&S.hasSameRuleAs(o)){o=o.pop(),s.produce(o,a),c=!0;return}}else if(_ instanceof ge){const R=_;Q(n,e,t,o,s,R.beginCaptures,p),s.produce(o,p[0].end),u=p[0].end;const O=R.getContentName(e.content,p),j=k.pushAttributed(O,n);if(o=o.withContentNameScopesList(j),R.whileHasBackReferences&&(o=o.withEndRule(R.getWhileWithResolvedBackReferences(e.content,p))),!v&&S.hasSameRuleAs(o)){o=o.pop(),s.produce(o,a),c=!0;return}}else if(Q(n,e,t,o,s,_.captures,p),s.produce(o,p[0].end),o=o.pop(),!v){o=o.safePop(),s.produce(o,a),c=!0;return}}p[0].end>r&&(r=p[0].end,t=!1)}}function qn(n,e,t,r,o,s){let i=o.beginRuleCapturedEOL?0:-1;const l=[];for(let a=o;a;a=a.pop()){const c=a.getRule(n);c instanceof ge&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=Jn(a.rule,n,a.stack.endRule,t,r===i),h=c.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==Vt){o=a.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(s.produce(a.stack,h.captureIndices[0].start),Q(n,e,t,a.stack,s,a.rule.whileCaptures,h.captureIndices),s.produce(a.stack,h.captureIndices[0].end),i=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,t=!1))}else{o=a.stack.pop();break}}return{stack:o,linePos:r,anchorPosition:i,isFirstLine:t}}function Kn(n,e,t,r,o,s){const i=Yn(n,e,t,r,o,s),l=n.getInjections();if(l.length===0)return i;const a=Xn(l,n,e,t,r,o,s);if(!a)return i;if(!i)return a;const c=i.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:i}function Yn(n,e,t,r,o,s){const i=o.getRule(n),{ruleScanner:l,findOptions:a}=Wt(i,n,o.endRule,t,r===s),c=l.findNextMatchSync(e,r,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Xn(n,e,t,r,o,s,i){let l=Number.MAX_VALUE,a=null,c,u=0;const h=s.contentNameScopesList.getScopeNames();for(let f=0,d=n.length;f<d;f++){const p=n[f];if(!p.matcher(h))continue;const b=e.getRule(p.ruleId),{ruleScanner:v,findOptions:_}=Wt(b,e,null,r,o===i),S=v.findNextMatchSync(t,o,_);if(!S)continue;const g=S.captureIndices[0].start;if(!(g>=l)&&(l=g,a=S.captureIndices,c=S.ruleId,u=p.priority,l===o))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function Wt(n,e,t,r,o){return{ruleScanner:n.compileAG(e,t,r,o),findOptions:0}}function Jn(n,e,t,r,o){return{ruleScanner:n.compileWhileAG(e,t,r,o),findOptions:0}}function Q(n,e,t,r,o,s,i){if(s.length===0)return;const l=e.content,a=Math.min(s.length,i.length),c=[],u=i[0].end;for(let h=0;h<a;h++){const f=s[h];if(f===null)continue;const d=i[h];if(d.length===0)continue;if(d.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=d.start;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?o.produceFromScopes(c[c.length-1].scopes,d.start):o.produce(r,d.start),f.retokenizeCapturedWithRuleId){const b=f.getName(l,i),v=r.contentNameScopesList.pushAttributed(b,n),_=f.getContentName(l,i),S=v.pushAttributed(_,n),g=r.push(f.retokenizeCapturedWithRuleId,d.start,-1,!1,null,v,S),k=n.createOnigString(l.substring(0,d.end));zt(n,k,t&&d.start===0,d.start,g,o,!1,0),Ut(k);continue}const p=f.getName(l,i);if(p!==null){const v=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(p,n);c.push(new Zn(v,d.end))}}for(;c.length>0;)o.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var Zn=class{scopes;endPos;constructor(n,e){this.scopes=n,this.endPos=e}};function Qn(n,e,t,r,o,s,i,l){return new tr(n,e,t,r,o,s,i,l)}function mt(n,e,t,r,o){const s=pe(e,_e),i=Ft.getCompiledRuleId(t,r,o.repository);for(const l of s)n.push({debugSelector:e,matcher:l.matcher,ruleId:i,grammar:o,priority:l.priority})}function _e(n,e){if(e.length<n.length)return!1;let t=0;return n.every(r=>{for(let o=t;o<e.length;o++)if(er(e[o],r))return t=o+1,!0;return!1})}function er(n,e){if(!n)return!1;if(n===e)return!0;const t=e.length;return n.length>t&&n.substr(0,t)===e&&n[t]==="."}var tr=class{constructor(n,e,t,r,o,s,i,l){if(this._rootScopeName=n,this.balancedBracketSelectors=s,this._onigLib=l,this._basicScopeAttributesProvider=new zn(t,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=gt(e,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const a of Object.keys(o)){const c=pe(a,_e);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:o[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const n of this._ruleId2desc)n&&n.dispose()}createOnigScanner(n){return this._onigLib.createOnigScanner(n)}createOnigString(n){return this._onigLib.createOnigString(n)}getMetadataForScope(n){return this._basicScopeAttributesProvider.getBasicScopeAttributes(n)}_collectInjections(){const n={lookup:o=>o===this._rootScopeName?this._grammar:this.getExternalGrammar(o),injections:o=>this._grammarRepository.injections(o)},e=[],t=this._rootScopeName,r=n.lookup(t);if(r){const o=r.injections;if(o)for(let i in o)mt(e,i,o[i],this,r);const s=this._grammarRepository.injections(t);s&&s.forEach(i=>{const l=this.getExternalGrammar(i);if(l){const a=l.injectionSelector;a&&mt(e,a,l,this,l)}})}return e.sort((o,s)=>o.priority-s.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(n){const e=++this._lastRuleId,t=n(e);return this._ruleId2desc[e]=t,t}getRule(n){return this._ruleId2desc[n]}getExternalGrammar(n,e){if(this._includedGrammars[n])return this._includedGrammars[n];if(this._grammarRepository){const t=this._grammarRepository.lookup(n);if(t)return this._includedGrammars[n]=gt(t,e&&e.$base),this._includedGrammars[n]}}tokenizeLine(n,e,t=0){const r=this._tokenize(n,e,!1,t);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(n,e,t=0){const r=this._tokenize(n,e,!0,t);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(n,e,t,r){this._rootId===-1&&(this._rootId=Ft.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let o;if(!e||e===Ve.NULL){o=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=Y.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let d;f?d=ee.createRootAndLookUpScopeName(f,h,this):d=ee.createRoot("unknown",h),e=new Ve(null,this._rootId,-1,-1,!1,null,d,d)}else o=!1,e.reset();n=n+`
|
|
3
3
|
`;const s=this.createOnigString(n),i=s.content.length,l=new rr(t,n,this._tokenTypeMatchers,this.balancedBracketSelectors),a=zt(this,s,o,0,e,l,!0,r);return Ut(s),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function gt(n,e){return n=Sn(n),n.repository=n.repository||{},n.repository.$self={$vscodeTextmateLocation:n.$vscodeTextmateLocation,patterns:n.patterns,name:n.scopeName},n.repository.$base=e||n.repository.$self,n}var ee=class B{constructor(e,t,r){this.parent=e,this.scopePath=t,this.tokenAttributes=r}static fromExtension(e,t){let r=e,o=e?.scopePath??null;for(const s of t)o=Pe.push(o,s.scopeNames),r=new B(r,o,s.encodedTokenAttributes);return r}static createRoot(e,t){return new B(null,new Pe(null,e),t)}static createRootAndLookUpScopeName(e,t,r){const o=r.getMetadataForScope(e),s=new Pe(null,e),i=r.themeProvider.themeMatch(s),l=B.mergeAttributes(t,o,i);return new B(null,s,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return B.equals(this,e)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,r){let o=-1,s=0,i=0;return r!==null&&(o=r.fontStyle,s=r.foregroundId,i=r.backgroundId),Y.set(e,t.languageId,t.tokenType,null,o,s,i)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return B._pushAttributed(this,e,t);const r=e.split(/ /g);let o=this;for(const s of r)o=B._pushAttributed(o,s,t);return o}static _pushAttributed(e,t,r){const o=r.getMetadataForScope(t),s=e.scopePath.push(t),i=r.themeProvider.themeMatch(s),l=B.mergeAttributes(e.tokenAttributes,o,i);return new B(e,s,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?t.reverse():void 0}},Ve=class V{constructor(e,t,r,o,s,i,l,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=s,this.endRule=i,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=o}_stackElementBrand=void 0;static NULL=new V(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:V._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?ee.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){V._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,r,o,s,i,l){return new V(this,e,t,r,o,s,i,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new V(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,t){const r=ee.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new V(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,r,ee.fromExtension(r,t.contentNameScopesList))}},nr=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(n,e){this.balancedBracketScopes=n.flatMap(t=>t==="*"?(this.allowAny=!0,[]):pe(t,_e).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>pe(t,_e).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(n){for(const e of this.unbalancedBracketScopes)if(e(n))return!1;for(const e of this.balancedBracketScopes)if(e(n))return!0;return this.allowAny}},rr=class{constructor(n,e,t,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=n,this._tokenTypeOverrides=t,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(n,e){this.produceFromScopes(n.contentNameScopesList,e)}produceFromScopes(n,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=n?.tokenAttributes??0,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=n?.getScopeNames()??[];for(const i of this._tokenTypeOverrides)i.matcher(s)&&(r=Y.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(s))}if(o&&(r=Y.set(r,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const t=n?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:t}),this._lastTokenEndIndex=e}getResult(n,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(n,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(n,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(n,e),this._binaryTokens[this._binaryTokens.length-2]=0);const t=new Uint32Array(this._binaryTokens.length);for(let r=0,o=this._binaryTokens.length;r<o;r++)t[r]=this._binaryTokens[r];return t}},or=class{constructor(n,e){this._onigLib=e,this._theme=n}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const n of this._grammars.values())n.dispose()}setTheme(n){this._theme=n}getColorMap(){return this._theme.getColorMap()}addGrammar(n,e){this._rawGrammars.set(n.scopeName,n),e&&this._injectionGrammars.set(n.scopeName,e)}lookup(n){return this._rawGrammars.get(n)}injections(n){return this._injectionGrammars.get(n)}getDefaults(){return this._theme.getDefaults()}themeMatch(n){return this._theme.match(n)}grammarForScopeName(n,e,t,r,o){if(!this._grammars.has(n)){let s=this._rawGrammars.get(n);if(!s)return null;this._grammars.set(n,Qn(n,s,e,t,r,o,this,this._onigLib))}return this._grammars.get(n)}},sr=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new or(fe.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(fe.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,r){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,t,r){return this._loadGrammar(e,t,r.embeddedLanguages,r.tokenTypes,new nr(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,r,o,s){const i=new On(this._syncRegistry,e);for(;i.Q.length>0;)i.Q.map(l=>this._loadSingleGrammar(l.scopeName)),i.processQueue();return this._grammarForScopeName(e,t,r,o,s)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,r)}}addGrammar(e,t=[],r=0,o=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,r,o)}_grammarForScopeName(e,t=0,r=null,o=null,s=null){return this._syncRegistry.grammarForScopeName(e,t,r,o,s)}},Fe=Ve.NULL;const ir=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class ie{constructor(e,t,r){this.normal=t,this.property=e,r&&(this.space=r)}}ie.prototype.normal={};ie.prototype.property={};ie.prototype.space=void 0;function qt(n,e){const t={},r={};for(const o of n)Object.assign(t,o.property),Object.assign(r,o.normal);return new ie(t,r,e)}function He(n){return n.toLowerCase()}class x{constructor(e,t){this.attribute=t,this.property=e}}x.prototype.attribute="";x.prototype.booleanish=!1;x.prototype.boolean=!1;x.prototype.commaOrSpaceSeparated=!1;x.prototype.commaSeparated=!1;x.prototype.defined=!1;x.prototype.mustUseProperty=!1;x.prototype.number=!1;x.prototype.overloadedBoolean=!1;x.prototype.property="";x.prototype.spaceSeparated=!1;x.prototype.space=void 0;let ar=0;const w=H(),E=H(),ze=H(),m=H(),C=H(),q=H(),D=H();function H(){return 2**++ar}const We=Object.freeze(Object.defineProperty({__proto__:null,boolean:w,booleanish:E,commaOrSpaceSeparated:D,commaSeparated:q,number:m,overloadedBoolean:ze,spaceSeparated:C},Symbol.toStringTag,{value:"Module"})),Ie=Object.keys(We);class Xe extends x{constructor(e,t,r,o){let s=-1;if(super(e,t),_t(this,"space",o),typeof r=="number")for(;++s<Ie.length;){const i=Ie[s];_t(this,Ie[s],(r&We[i])===We[i])}}}Xe.prototype.defined=!0;function _t(n,e,t){t&&(n[e]=t)}function X(n){const e={},t={};for(const[r,o]of Object.entries(n.properties)){const s=new Xe(r,n.transform(n.attributes||{},r),o,n.space);n.mustUseProperty&&n.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,t[He(r)]=r,t[He(s.attribute)]=r}return new ie(e,t,n.space)}const Kt=X({properties:{ariaActiveDescendant:null,ariaAtomic:E,ariaAutoComplete:null,ariaBusy:E,ariaChecked:E,ariaColCount:m,ariaColIndex:m,ariaColSpan:m,ariaControls:C,ariaCurrent:null,ariaDescribedBy:C,ariaDetails:null,ariaDisabled:E,ariaDropEffect:C,ariaErrorMessage:null,ariaExpanded:E,ariaFlowTo:C,ariaGrabbed:E,ariaHasPopup:null,ariaHidden:E,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:C,ariaLevel:m,ariaLive:null,ariaModal:E,ariaMultiLine:E,ariaMultiSelectable:E,ariaOrientation:null,ariaOwns:C,ariaPlaceholder:null,ariaPosInSet:m,ariaPressed:E,ariaReadOnly:E,ariaRelevant:null,ariaRequired:E,ariaRoleDescription:C,ariaRowCount:m,ariaRowIndex:m,ariaRowSpan:m,ariaSelected:E,ariaSetSize:m,ariaSort:null,ariaValueMax:m,ariaValueMin:m,ariaValueNow:m,ariaValueText:null,role:null},transform(n,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Yt(n,e){return e in n?n[e]:e}function Xt(n,e){return Yt(n,e.toLowerCase())}const lr=X({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:q,acceptCharset:C,accessKey:C,action:null,allow:null,allowFullScreen:w,allowPaymentRequest:w,allowUserMedia:w,alt:null,as:null,async:w,autoCapitalize:null,autoComplete:C,autoFocus:w,autoPlay:w,blocking:C,capture:null,charSet:null,checked:w,cite:null,className:C,cols:m,colSpan:null,content:null,contentEditable:E,controls:w,controlsList:C,coords:m|q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:w,defer:w,dir:null,dirName:null,disabled:w,download:ze,draggable:E,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:w,formTarget:null,headers:C,height:m,hidden:ze,high:m,href:null,hrefLang:null,htmlFor:C,httpEquiv:C,id:null,imageSizes:null,imageSrcSet:null,inert:w,inputMode:null,integrity:null,is:null,isMap:w,itemId:null,itemProp:C,itemRef:C,itemScope:w,itemType:C,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:w,low:m,manifest:null,max:null,maxLength:m,media:null,method:null,min:null,minLength:m,multiple:w,muted:w,name:null,nonce:null,noModule:w,noValidate:w,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:w,optimum:m,pattern:null,ping:C,placeholder:null,playsInline:w,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:w,referrerPolicy:null,rel:C,required:w,reversed:w,rows:m,rowSpan:m,sandbox:C,scope:null,scoped:w,seamless:w,selected:w,shadowRootClonable:w,shadowRootDelegatesFocus:w,shadowRootMode:null,shape:null,size:m,sizes:null,slot:null,span:m,spellCheck:E,src:null,srcDoc:null,srcLang:null,srcSet:null,start:m,step:null,style:null,tabIndex:m,target:null,title:null,translate:null,type:null,typeMustMatch:w,useMap:null,value:E,width:m,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:C,axis:null,background:null,bgColor:null,border:m,borderColor:null,bottomMargin:m,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:w,declare:w,event:null,face:null,frame:null,frameBorder:null,hSpace:m,leftMargin:m,link:null,longDesc:null,lowSrc:null,marginHeight:m,marginWidth:m,noResize:w,noHref:w,noShade:w,noWrap:w,object:null,profile:null,prompt:null,rev:null,rightMargin:m,rules:null,scheme:null,scrolling:E,standby:null,summary:null,text:null,topMargin:m,valueType:null,version:null,vAlign:null,vLink:null,vSpace:m,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:w,disableRemotePlayback:w,prefix:null,property:null,results:m,security:null,unselectable:null},space:"html",transform:Xt}),cr=X({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:D,accentHeight:m,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:m,amplitude:m,arabicForm:null,ascent:m,attributeName:null,attributeType:null,azimuth:m,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:m,by:null,calcMode:null,capHeight:m,className:C,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:m,diffuseConstant:m,direction:null,display:null,dur:null,divisor:m,dominantBaseline:null,download:w,dx:null,dy:null,edgeMode:null,editable:null,elevation:m,enableBackground:null,end:null,event:null,exponent:m,externalResourcesRequired:null,fill:null,fillOpacity:m,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:q,g2:q,glyphName:q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:m,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:m,horizOriginX:m,horizOriginY:m,id:null,ideographic:m,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:m,k:m,k1:m,k2:m,k3:m,k4:m,kernelMatrix:D,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:m,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:m,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:m,overlineThickness:m,paintOrder:null,panose1:null,path:null,pathLength:m,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:C,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:m,pointsAtY:m,pointsAtZ:m,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:D,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:D,rev:D,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:D,requiredFeatures:D,requiredFonts:D,requiredFormats:D,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:m,specularExponent:m,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:m,strikethroughThickness:m,string:null,stroke:null,strokeDashArray:D,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:m,strokeOpacity:m,strokeWidth:null,style:null,surfaceScale:m,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:D,tabIndex:m,tableValues:null,target:null,targetX:m,targetY:m,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:D,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:m,underlineThickness:m,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:m,values:null,vAlphabetic:m,vMathematical:m,vectorEffect:null,vHanging:m,vIdeographic:m,version:null,vertAdvY:m,vertOriginX:m,vertOriginY:m,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:m,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Yt}),Jt=X({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,e){return"xlink:"+e.slice(5).toLowerCase()}}),Zt=X({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Xt}),Qt=X({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,e){return"xml:"+e.slice(3).toLowerCase()}}),ur=/[A-Z]/g,yt=/-[a-z]/g,hr=/^data[-\w.:]+$/i;function dr(n,e){const t=He(e);let r=e,o=x;if(t in n.normal)return n.property[n.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&hr.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(yt,pr);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!yt.test(s)){let i=s.replace(ur,fr);i.charAt(0)!=="-"&&(i="-"+i),e="data"+i}}o=Xe}return new o(r,e)}function fr(n){return"-"+n.toLowerCase()}function pr(n){return n.charAt(1).toUpperCase()}const mr=qt([Kt,lr,Jt,Zt,Qt],"html"),en=qt([Kt,cr,Jt,Zt,Qt],"svg"),bt={}.hasOwnProperty;function gr(n,e){const t=e||{};function r(o,...s){let i=r.invalid;const l=r.handlers;if(o&&bt.call(o,n)){const a=String(o[n]);i=bt.call(l,a)?l[a]:r.unknown}if(i)return i.call(this,o,...s)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}const _r=/["&'<>`]/g,yr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,br=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Sr=/[|\\{}()[\]^$+*?.]/g,St=new WeakMap;function vr(n,e){if(n=n.replace(e.subset?wr(e.subset):_r,r),e.subset||e.escapeOnly)return n;return n.replace(yr,t).replace(br,r);function t(o,s,i){return e.format((o.charCodeAt(0)-55296)*1024+o.charCodeAt(1)-56320+65536,i.charCodeAt(s+2),e)}function r(o,s,i){return e.format(o.charCodeAt(0),i.charCodeAt(s+1),e)}}function wr(n){let e=St.get(n);return e||(e=kr(n),St.set(n,e)),e}function kr(n){const e=[];let t=-1;for(;++t<n.length;)e.push(n[t].replace(Sr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Cr=/[\dA-Fa-f]/;function Rr(n,e,t){const r="&#x"+n.toString(16).toUpperCase();return t&&e&&!Cr.test(String.fromCharCode(e))?r:r+";"}const Er=/\d/;function Lr(n,e,t){const r="&#"+String(n);return t&&e&&!Er.test(String.fromCharCode(e))?r:r+";"}const Ar=["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"],xe={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:"€"},Tr=["cent","copy","divide","gt","lt","not","para","times"],tn={}.hasOwnProperty,qe={};let le;for(le in xe)tn.call(xe,le)&&(qe[xe[le]]=le);const Pr=/[^\dA-Za-z]/;function Nr(n,e,t,r){const o=String.fromCharCode(n);if(tn.call(qe,o)){const s=qe[o],i="&"+s;return t&&Ar.includes(s)&&!Tr.includes(s)&&(!r||e&&e!==61&&Pr.test(String.fromCharCode(e)))?i:i+";"}return""}function Ir(n,e,t){let r=Rr(n,e,t.omitOptionalSemicolons),o;if((t.useNamedReferences||t.useShortestReferences)&&(o=Nr(n,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!o)&&t.useShortestReferences){const s=Lr(n,e,t.omitOptionalSemicolons);s.length<r.length&&(r=s)}return o&&(!t.useShortestReferences||o.length<r.length)?o:r}function K(n,e){return vr(n,Object.assign({format:Ir},e))}const xr=/^>|^->|<!--|-->|--!>|<!-$/g,Or=[">"],Dr=["<",">"];function Mr(n,e,t,r){return r.settings.bogusComments?"<?"+K(n.value,Object.assign({},r.settings.characterReferences,{subset:Or}))+">":"<!--"+n.value.replace(xr,o)+"-->";function o(s){return K(s,Object.assign({},r.settings.characterReferences,{subset:Dr}))}}function Br(n,e,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function vt(n,e){const t=String(n);if(typeof e!="string")throw new TypeError("Expected character");let r=0,o=t.indexOf(e);for(;o!==-1;)r++,o=t.indexOf(e,o+e.length);return r}function Gr(n,e){const t=e||{};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}function $r(n){return n.join(" ").trim()}const Ur=/[ \t\n\f\r]/g;function Je(n){return typeof n=="object"?n.type==="text"?wt(n.value):!1:wt(n)}function wt(n){return n.replace(Ur,"")===""}const T=rn(1),nn=rn(-1),jr=[];function rn(n){return e;function e(t,r,o){const s=t?t.children:jr;let i=(r||0)+n,l=s[i];if(!o)for(;l&&Je(l);)i+=n,l=s[i];return l}}const Vr={}.hasOwnProperty;function on(n){return e;function e(t,r,o){return Vr.call(n,t.tagName)&&n[t.tagName](t,r,o)}}const Ze=on({body:Hr,caption:Oe,colgroup:Oe,dd:Kr,dt:qr,head:Oe,html:Fr,li:Wr,optgroup:Yr,option:Xr,p:zr,rp:kt,rt:kt,tbody:Zr,td:Ct,tfoot:Qr,th:Ct,thead:Jr,tr:eo});function Oe(n,e,t){const r=T(t,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Je(r.value.charAt(0)))}function Fr(n,e,t){const r=T(t,e);return!r||r.type!=="comment"}function Hr(n,e,t){const r=T(t,e);return!r||r.type!=="comment"}function zr(n,e,t){const r=T(t,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function Wr(n,e,t){const r=T(t,e);return!r||r.type==="element"&&r.tagName==="li"}function qr(n,e,t){const r=T(t,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Kr(n,e,t){const r=T(t,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function kt(n,e,t){const r=T(t,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Yr(n,e,t){const r=T(t,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Xr(n,e,t){const r=T(t,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Jr(n,e,t){const r=T(t,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Zr(n,e,t){const r=T(t,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Qr(n,e,t){return!T(t,e)}function eo(n,e,t){const r=T(t,e);return!r||r.type==="element"&&r.tagName==="tr"}function Ct(n,e,t){const r=T(t,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const to=on({body:oo,colgroup:so,head:ro,html:no,tbody:io});function no(n){const e=T(n,-1);return!e||e.type!=="comment"}function ro(n){const e=new Set;for(const r of n.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const t=n.children[0];return!t||t.type==="element"}function oo(n){const e=T(n,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Je(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function so(n,e,t){const r=nn(t,e),o=T(n,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&Ze(r,t.children.indexOf(r),t)?!1:!!(o&&o.type==="element"&&o.tagName==="col")}function io(n,e,t){const r=nn(t,e),o=T(n,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Ze(r,t.children.indexOf(r),t)?!1:!!(o&&o.type==="element"&&o.tagName==="tr")}const ce={name:[[`
|
|
4
4
|
\f\r &/=>`.split(""),`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as R}from"./
|
|
1
|
+
import{_ as R}from"./D3XeBuAv.js";import{_ as S}from"./Cfc-cC1d.js";import E from"./DafxgOBV.js";import{_ as H}from"./RxAeWyOY.js";import{g as q,D as A,o as d,c as b,a as t,b as u,w as n,l as m,k as a,m as p,F as I,y as M,t as i,d as c,n as f}from"./ZEueWK5q.js";import"./B_iTBsIH.js";import"./vK5BgTYY.js";const U={class:"p-4 space-y-4"},V={class:"grid gap-3 md:grid-cols-5 grid-cols-2"},$={class:"text-2xl font-bold"},F={class:"text-2xl font-bold"},O={class:"text-xs text-neutral-500"},j={class:"text-2xl font-bold text-yellow-600"},G={class:"text-xs text-neutral-500"},J={class:"text-2xl font-bold text-orange-600"},K={class:"text-2xl font-bold text-red-600"},Q={class:"grid gap-3 md:grid-cols-2"},W={class:"flex items-start justify-between gap-3"},X={class:"min-w-0"},Y={class:"text-xs text-neutral-500"},Z=["href"],ee={class:"flex items-center gap-2 shrink-0"},te={class:"mt-2 flex flex-wrap gap-2 text-[11px]"},se={class:"mt-3 grid grid-cols-2 gap-2"},oe={class:"n-border-base border rounded p-2"},re={class:"font-mono"},ne={class:"n-border-base border rounded p-2"},ie={class:"font-mono"},le={class:"n-border-base border rounded p-2"},de={class:"font-mono"},ae={class:"n-border-base border rounded p-2"},ce={class:"font-mono"},ue={class:"mt-3 flex items-center gap-2"},ve=q({__name:"third-party-scripts",setup(me){const{scripts:w,isUsingNuxtScripts:T}=A(),g={network:300,parse:200},x=f(()=>(w.value||[]).map(e=>{const s=e.element,l=s.src,_=new URL(l,location.href),o=!!(s.ownerDocument&&s.ownerDocument.head&&s.ownerDocument.head.contains(s))&&!s.async&&!s.defer&&s.type!=="module";return{element:s,url:l,domain:_.host,https:_.protocol==="https:",loaded:e.loaded,renderBlocking:o,requestTime:s.requestTime,downloadTime:s.downloadTime,totalNetworkTime:s.totalNetworkTime,parseExecuteTime:s.parseExecuteTime,crossorigin:s.getAttribute("crossorigin"),integrity:s.getAttribute("integrity"),referrerPolicy:s.getAttribute("referrerpolicy"),async:s.async,defer:s.defer,isModule:s.type==="module"}})),h=f(()=>x.value.slice().sort((r,e)=>{const s=(r.totalNetworkTime||0)+(r.parseExecuteTime||0);return(e.totalNetworkTime||0)+(e.parseExecuteTime||0)-s})),v=f(()=>x.value.length),C=f(()=>x.value.filter(r=>r.loaded).length),N=f(()=>x.value.filter(r=>(r.totalNetworkTime||0)>g.network).length),z=f(()=>x.value.filter(r=>(r.parseExecuteTime||0)>g.parse).length),P=f(()=>x.value.filter(r=>r.renderBlocking).length);function y(r){return typeof r=="number"?`${r.toFixed(0)}ms`:"N/A"}function B(r){console.log("[@nuxt/hints]: Third-party script element",r)}async function D(r){try{await navigator.clipboard.writeText(r)}catch{}}return(r,e)=>{const s=R,l=S,_=E,k=H;return d(),b("div",U,[t("div",V,[u(s,{"p-3":""},{default:n(()=>[e[0]||(e[0]=t("div",{class:"text-xs text-neutral-500"}," 3rd-party scripts ",-1)),t("div",$,i(m(v)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[e[1]||(e[1]=t("div",{class:"text-xs text-neutral-500"}," Loaded ",-1)),t("div",F,i(m(C)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[t("div",O," Slow network (>"+i(g.network)+"ms) ",1),t("div",j,i(m(N)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[t("div",G," Long parse (>"+i(g.parse)+"ms) ",1),t("div",J,i(m(z)),1)]),_:1}),u(s,{"p-3":""},{default:n(()=>[e[2]||(e[2]=t("div",{class:"text-xs text-neutral-500"}," Render-blocking ",-1)),t("div",K,i(m(P)),1)]),_:1})]),m(v)>0&&!m(T)?(d(),a(l,{key:0,n:"yellow6"},{default:n(()=>[...e[3]||(e[3]=[c(" Third-party scripts detected. Consider using @nuxt/scripts for best-practice loading and management. ",-1)])]),_:1})):p("",!0),t("div",Q,[(d(!0),b(I,null,M(m(h),o=>(d(),a(s,{key:o.url,"p-3":""},{default:n(()=>[t("div",W,[t("div",X,[t("div",Y,i(o.domain),1),t("a",{href:o.url,target:"_blank",rel:"noopener",class:"block truncate text-sm text-blue-600"},i(o.url),9,Z)]),t("div",ee,[u(l,{type:o.loaded?"success":"warning",size:"small"},{default:n(()=>[c(i(o.loaded?"Loaded":"Pending"),1)]),_:2},1032,["type"])])]),t("div",te,[o.renderBlocking?(d(),a(l,{key:0,type:"error",size:"small",title:"In document head and not async/defer/module; blocks HTML parsing and delays first paint. Prefer defer or type=module."},{default:n(()=>[...e[4]||(e[4]=[c(" render-blocking ",-1)])]),_:1})):p("",!0),o.isModule?(d(),a(l,{key:1,size:"small",title:"Module scripts are deferred by default and don't block parsing; execution order differs from classic scripts."},{default:n(()=>[...e[5]||(e[5]=[c(" module ",-1)])]),_:1})):p("",!0),o.async?(d(),a(l,{key:2,size:"small",title:"Doesn't block parsing; executes as soon as it's downloaded. Order is not guaranteed."},{default:n(()=>[...e[6]||(e[6]=[c(" async ",-1)])]),_:1})):p("",!0),o.defer?(d(),a(l,{key:3,size:"small",title:"Doesn't block parsing; executes after document parsing, preserving script order."},{default:n(()=>[...e[7]||(e[7]=[c(" defer ",-1)])]),_:1})):p("",!0),o.crossorigin?(d(),a(l,{key:4,size:"small",title:"CORS mode for this script. Use 'anonymous' for cross-origin with SRI and better error reporting."},{default:n(()=>[c(" crossorigin="+i(o.crossorigin),1)]),_:2},1024)):(d(),a(l,{key:5,type:"warning",size:"small",title:"Cross-origin script without crossorigin. Add crossorigin='anonymous' for SRI and better error reporting."},{default:n(()=>[...e[8]||(e[8]=[c(" missing crossorigin ",-1)])]),_:1})),o.integrity?(d(),a(l,{key:6,size:"small",title:"Subresource Integrity: protects against CDN/script tampering."},{default:n(()=>[...e[9]||(e[9]=[c(" sri ",-1)])]),_:1})):p("",!0),o.referrerPolicy?(d(),a(l,{key:7,size:"small",title:"Referrer policy controls the Referer header for this request."},{default:n(()=>[c(" referrer="+i(o.referrerPolicy),1)]),_:2},1024)):p("",!0),o.https===!1?(d(),a(l,{key:8,type:"error",size:"small",title:"Loaded over HTTP; use HTTPS to avoid mixed content and security risks."},{default:n(()=>[...e[10]||(e[10]=[c(" insecure http ",-1)])]),_:1})):p("",!0)]),t("div",se,[t("div",oe,[e[11]||(e[11]=t("div",{class:"text-xs text-neutral-500"}," Total network ",-1)),t("div",re,i(y(o.totalNetworkTime)),1)]),t("div",ne,[e[12]||(e[12]=t("div",{class:"text-xs text-neutral-500"}," Parse + execute ",-1)),t("div",ie,i(y(o.parseExecuteTime)),1)]),t("div",le,[e[13]||(e[13]=t("div",{class:"text-xs text-neutral-500"}," Request ",-1)),t("div",de,i(y(o.requestTime)),1)]),t("div",ae,[e[14]||(e[14]=t("div",{class:"text-xs text-neutral-500"}," Download ",-1)),t("div",ce,i(y(o.downloadTime)),1)])]),t("div",ue,[u(k,{onClick:L=>B(o.element)},{default:n(()=>[u(_,{name:"material-symbols:terminal",class:"text-lg"}),e[15]||(e[15]=t("span",{class:"ml-1"},"Log element",-1))]),_:1},8,["onClick"]),u(k,{onClick:L=>D(o.url)},{default:n(()=>[u(_,{name:"material-symbols:content-copy-outline",class:"text-lg"}),e[16]||(e[16]=t("span",{class:"ml-1"},"Copy URL",-1))]),_:1},8,["onClick"])])]),_:2},1024))),128))])])}}});export{ve as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i}from"./
|
|
1
|
+
import{_ as i}from"./B_iTBsIH.js";import{_ as u}from"./vK5BgTYY.js";import{g as d,E as e,r as o}from"./ZEueWK5q.js";const l=d({name:"NButton",props:{to:String,icon:String,border:{type:Boolean,default:!0},disabled:Boolean,type:{type:String,default:"button"}},setup(t,{attrs:a,slots:n}){return()=>e(t.to?u:"button",{to:t.to,...a,...!t.to&&{type:t.type},...t.disabled?{disabled:!0}:{tabindex:0},class:[t.border?"n-button-base active:n-button-active focus-visible:n-focus-base hover:n-button-hover":"",n.default?"":"n-icon-button","n-button n-transition n-disabled:n-disabled"].join(" ")},{default:()=>[o(n,"icon",{},()=>t.icon?[e(i,{icon:t.icon,class:n.default?"n-button-icon":""})]:[]),o(n,"default")]})}});export{l as _};
|