db-studio 1.2.25 → 1.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/core-dist/assets/{_baseUniq-CO5fFgqV.js → _baseUniq-Dz8rR54g.js} +1 -1
- package/dist/core-dist/assets/_pathlessLayout-byu8LhC4.js +2 -0
- package/dist/core-dist/assets/_queryId-tsebZ8Os.js +1 -0
- package/dist/core-dist/assets/_table-B9YoPE4g.js +8 -0
- package/dist/core-dist/assets/{arc-B_zMY48V.js → arc-DHQDyHbC.js} +1 -1
- package/dist/core-dist/assets/{architectureDiagram-VXUJARFQ-C9lykiZH.js → architectureDiagram-VXUJARFQ-Dye73hr2.js} +1 -1
- package/dist/core-dist/assets/{blockDiagram-VD42YOAC-DhqK2eyG.js → blockDiagram-VD42YOAC-fyPw9ErW.js} +1 -1
- package/dist/core-dist/assets/{c4Diagram-YG6GDRKO-CQrcwS8f.js → c4Diagram-YG6GDRKO-WorBPjZj.js} +1 -1
- package/dist/core-dist/assets/{cdoe-editor-C6mx2_AO.js → cdoe-editor-DWalt1Bs.js} +1 -1
- package/dist/core-dist/assets/channel-DmNVQLGj.js +1 -0
- package/dist/core-dist/assets/{chunk-4BX2VUAB-CdIpYPgB.js → chunk-4BX2VUAB-BWLeAEPx.js} +1 -1
- package/dist/core-dist/assets/{chunk-55IACEB6-BDNKe4fa.js → chunk-55IACEB6-Sz82sR_e.js} +1 -1
- package/dist/core-dist/assets/{chunk-B4BG7PRW-ZA-ck0YQ.js → chunk-B4BG7PRW-BRJVTFXO.js} +1 -1
- package/dist/core-dist/assets/{chunk-DI55MBZ5-CnVVpZE-.js → chunk-DI55MBZ5-DrMehRNo.js} +1 -1
- package/dist/core-dist/assets/{chunk-FMBD7UC4-CwwWK8-e.js → chunk-FMBD7UC4-DjrshjUM.js} +1 -1
- package/dist/core-dist/assets/{chunk-QN33PNHL-bn39U0qP.js → chunk-QN33PNHL-e_SdNueW.js} +1 -1
- package/dist/core-dist/assets/{chunk-QZHKN3VN-D0fSZNMo.js → chunk-QZHKN3VN-BcgeawM9.js} +1 -1
- package/dist/core-dist/assets/{chunk-TZMSLE5B-BTA4ulM4.js → chunk-TZMSLE5B-WV20vlP_.js} +1 -1
- package/dist/core-dist/assets/classDiagram-2ON5EDUG-BlV3AaHC.js +1 -0
- package/dist/core-dist/assets/classDiagram-v2-WZHVMYZB-BlV3AaHC.js +1 -0
- package/dist/core-dist/assets/clone-BJueq7g1.js +1 -0
- package/dist/core-dist/assets/{code-block-IT6T5CEO-BZv7MYo8.js → code-block-IT6T5CEO-CRNu6zPZ.js} +1 -1
- package/dist/core-dist/assets/{cose-bilkent-S5V4N54A-DQ5fWUqZ.js → cose-bilkent-S5V4N54A-C6XOe5oC.js} +1 -1
- package/dist/core-dist/assets/{dagre-6UL2VRFP-C-VDHjJ-.js → dagre-6UL2VRFP-BnmgBPjC.js} +1 -1
- package/dist/core-dist/assets/{diagram-PSM6KHXK-CdPWaSoG.js → diagram-PSM6KHXK-D6r3FA0m.js} +1 -1
- package/dist/core-dist/assets/{diagram-QEK2KX5R-CI3rBq3-.js → diagram-QEK2KX5R-CXpMzjrs.js} +1 -1
- package/dist/core-dist/assets/{diagram-S2PKOQOG-DrV1l_bS.js → diagram-S2PKOQOG-BolCoLvj.js} +1 -1
- package/dist/core-dist/assets/{erDiagram-Q2GNP2WA-DtHpaqwP.js → erDiagram-Q2GNP2WA-CTifgqt1.js} +1 -1
- package/dist/core-dist/assets/{flowDiagram-NV44I4VS-CWhbqAOb.js → flowDiagram-NV44I4VS-pbbYcDQW.js} +1 -1
- package/dist/core-dist/assets/{ganttDiagram-JELNMOA3-8U2ncuQI.js → ganttDiagram-JELNMOA3-zqJ48H3I.js} +1 -1
- package/dist/core-dist/assets/{gitGraphDiagram-NY62KEGX-rJlyYpVT.js → gitGraphDiagram-NY62KEGX-DxNJIXLP.js} +1 -1
- package/dist/core-dist/assets/{graph-BhgtEUho.js → graph-CjSaMg-K.js} +1 -1
- package/dist/core-dist/assets/icons-D6TH-xEh.js +1 -0
- package/dist/core-dist/assets/index-B11inYe0.js +58 -0
- package/dist/core-dist/assets/index-B3gSG1Yj.js +1 -0
- package/dist/core-dist/assets/index-BVXRwlCM.js +1 -0
- package/dist/core-dist/assets/index-BXRBzRx2.css +1 -0
- package/dist/core-dist/assets/{index-ejQaUr38.js → index-C4O5Rsq1.js} +1 -1
- package/dist/core-dist/assets/index-DelL3Eku.js +1 -0
- package/dist/core-dist/assets/{indexes-D8Eqj5x7.js → indexes-DYSIpFSd.js} +1 -1
- package/dist/core-dist/assets/infoDiagram-WHAUD3N6-CSNF_W-p.js +2 -0
- package/dist/core-dist/assets/{journeyDiagram-XKPGCS4Q-BNSrMmr7.js → journeyDiagram-XKPGCS4Q-BtpTxM-Y.js} +1 -1
- package/dist/core-dist/assets/{kanban-definition-3W4ZIXB7-V9L96KTF.js → kanban-definition-3W4ZIXB7-oYV0rhzZ.js} +1 -1
- package/dist/core-dist/assets/{layout-DNW_OiWL.js → layout-9jAkTDVb.js} +1 -1
- package/dist/core-dist/assets/{linear-DqoQUU19.js → linear-DbUIfB88.js} +1 -1
- package/dist/core-dist/assets/logs-CmJ0Xt6u.js +1 -0
- package/dist/core-dist/assets/{mermaid-VLURNSYL-F8q0N6Y-.js → mermaid-VLURNSYL-D5uFRwCp.js} +4 -4
- package/dist/core-dist/assets/{mermaid.core-Bl5zWzZD.js → mermaid.core-CLOnqD9L.js} +5 -5
- package/dist/core-dist/assets/{min-DDiiHzkP.js → min-CCTBSAVO.js} +1 -1
- package/dist/core-dist/assets/{mindmap-definition-VGOIOE7T-_ZelwEtb.js → mindmap-definition-VGOIOE7T-CCYjDuu4.js} +1 -1
- package/dist/core-dist/assets/{pieDiagram-ADFJNKIX-DlnlOcS9.js → pieDiagram-ADFJNKIX-C7byhore.js} +1 -1
- package/dist/core-dist/assets/{quadrantDiagram-AYHSOK5B-CyVFDRyR.js → quadrantDiagram-AYHSOK5B-CuHjSh6D.js} +1 -1
- package/dist/core-dist/assets/{queries.store-KdEzteJi.js → queries.store-CNqfnc5k.js} +1 -1
- package/dist/core-dist/assets/radix-ui-Cc0cu4Uu.js +51 -0
- package/dist/core-dist/assets/{react-dom-BWKcCUTe.js → react-dom-B7--tMaV.js} +1 -1
- package/dist/core-dist/assets/{requirementDiagram-UZGBJVZJ-jRbu5Vec.js → requirementDiagram-UZGBJVZJ-DLEPg0BV.js} +1 -1
- package/dist/core-dist/assets/{runner-tab-DG4JMrIS.js → runner-tab-BZPeQIxv.js} +3 -3
- package/dist/core-dist/assets/{sankeyDiagram-TZEHDZUN-gKjFH72S.js → sankeyDiagram-TZEHDZUN-DKdNm1Qv.js} +1 -1
- package/dist/core-dist/assets/{schema-Dig80dgQ.js → schema-C6AUjLib.js} +1 -1
- package/dist/core-dist/assets/{scroll-area-BZeWiQjX.js → scroll-area-DdKnqqlw.js} +1 -1
- package/dist/core-dist/assets/{sequenceDiagram-WL72ISMW-CAvLlHWG.js → sequenceDiagram-WL72ISMW-Bbo7kvpu.js} +1 -1
- package/dist/core-dist/assets/{stateDiagram-FKZM4ZOC-pYmj6Lkv.js → stateDiagram-FKZM4ZOC-Cz5Z-x6B.js} +1 -1
- package/dist/core-dist/assets/stateDiagram-v2-4FDKWEC3-CdjqUuw7.js +1 -0
- package/dist/core-dist/assets/{tanstack-I4NcPTsd.js → tanstack-BVOBleBY.js} +2 -2
- package/dist/core-dist/assets/{timeline-definition-IT6M3QCI-D9DODJhX.js → timeline-definition-IT6M3QCI-ByEvAs-P.js} +1 -1
- package/dist/core-dist/assets/{treemap-KMMF4GRG-ClhjKA5M.js → treemap-KMMF4GRG-C1GKyhAV.js} +1 -1
- package/dist/core-dist/assets/{visualizer-CVdpIuSS.js → visualizer-CKiw4rgK.js} +1 -1
- package/dist/core-dist/assets/{xychartDiagram-PRI3JC2R-OT9Z40XT.js → xychartDiagram-PRI3JC2R-CS-C2fw-.js} +1 -1
- package/dist/core-dist/index.html +6 -6
- package/dist/index.js +96 -26
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/core-dist/assets/_pathlessLayout-C3BlW5Hc.js +0 -2
- package/dist/core-dist/assets/_queryId-iSqlGQ2Y.js +0 -1
- package/dist/core-dist/assets/_table-SO2FYYAw.js +0 -8
- package/dist/core-dist/assets/channel-4io835lz.js +0 -1
- package/dist/core-dist/assets/classDiagram-2ON5EDUG-DpPeI05m.js +0 -1
- package/dist/core-dist/assets/classDiagram-v2-WZHVMYZB-DpPeI05m.js +0 -1
- package/dist/core-dist/assets/clone-Cu5G1cWz.js +0 -1
- package/dist/core-dist/assets/icons-cLYU3CQS.js +0 -1
- package/dist/core-dist/assets/index-5l-GokF9.js +0 -1
- package/dist/core-dist/assets/index-B-czu-uB.js +0 -1
- package/dist/core-dist/assets/index-DM_G5wVs.js +0 -58
- package/dist/core-dist/assets/index-Llx5wPe1.css +0 -1
- package/dist/core-dist/assets/index-iREZCpeS.js +0 -1
- package/dist/core-dist/assets/infoDiagram-WHAUD3N6-RphuT4VC.js +0 -2
- package/dist/core-dist/assets/logs-CjN_gOvl.js +0 -1
- package/dist/core-dist/assets/radix-ui-BypjIQUF.js +0 -51
- package/dist/core-dist/assets/stateDiagram-v2-4FDKWEC3-BxqBo7RT.js +0 -1
package/dist/core-dist/assets/{code-block-IT6T5CEO-BZv7MYo8.js → code-block-IT6T5CEO-CRNu6zPZ.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/latex-B4uzh10-.js","assets/tex-CvyZ59Mk.js","assets/liquid-DYVedYrR.js","assets/marko-DZsq8hO1.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-C1TweQQi.js","assets/csharp-K5feNrxe.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-zxCyuUbr.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{w as Vt,s as Gr,f as Hn,a as zn,b as qn,c as er,z as Xn,h as Qn,d as Kn,C as Jn,D as Zn,u as Mt}from"./mermaid-VLURNSYL-F8q0N6Y-.js";import{r as ue}from"./icons-cLYU3CQS.js";import{j as V}from"./radix-ui-BypjIQUF.js";import{_ as u}from"./monaco-editor-BMj4E99D.js";import"./tanstack-I4NcPTsd.js";import"./react-dom-BWKcCUTe.js";import"./index-DM_G5wVs.js";import"./scroll-area-BZeWiQjX.js";import"./index-ejQaUr38.js";import"./_pathlessLayout-C3BlW5Hc.js";import"./queries.store-KdEzteJi.js";let I=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Yn(t){return Gt(t)}function Gt(t){return Array.isArray(t)?ei(t):t instanceof RegExp?t:typeof t=="object"?ti(t):t}function ei(t){let e=[];for(let r=0,n=t.length;r<n;r++)e[r]=Gt(t[r]);return e}function ti(t){let e={};for(let r in t)e[r]=Gt(t[r]);return e}function Br(t,...e){return e.forEach(r=>{for(let n in r)t[n]=r[n]}),t}function Fr(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Fr(t.substring(0,t.length-1)):t.substr(~e+1)}var ot=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Te=class{static hasCaptures(t){return t===null?!1:(ot.lastIndex=0,ot.test(t))}static replaceCaptures(t,e,r){return t.replace(ot,(n,i,s,o)=>{let c=r[parseInt(i||s,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(o){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return n})}};function jr(t,e){return t<e?-1:t>e?1:0}function Ur(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let r=t.length,n=e.length;if(r===n){for(let i=0;i<r;i++){let s=jr(t[i],e[i]);if(s!==0)return s}return 0}return r-n}function tr(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Wr(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Hr=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},Be=class{constructor(t,e,r){this._colorMap=t,this._defaults=e,this._root=r}static createFromRawTheme(t,e){return this.createFromParsedTheme(ii(t),e)}static createFromParsedTheme(t,e){return oi(t,e)}_cachedMatchRoot=new Hr(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find(i=>ri(t.parent,i.parentScopes));return n?new zr(n.fontStyle,n.foreground,n.background):null}},at=class Ve{constructor(e,r){this.parent=e,this.scopeName=r}static push(e,r){for(const n of r)e=new Ve(e,n);return e}static from(...e){let r=null;for(let n=0;n<e.length;n++)r=new Ve(r,e[n]);return r}push(e){return new Ve(this,e)}getSegments(){let e=this;const r=[];for(;e;)r.push(e.scopeName),e=e.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const r=[];let n=this;for(;n&&n!==e;)r.push(n.scopeName),n=n.parent;return n===e?r.reverse():void 0}};function ri(t,e){if(e.length===0)return!0;for(let r=0;r<e.length;r++){let n=e[r],i=!1;if(n===">"){if(r===e.length-1)return!1;n=e[++r],i=!0}for(;t&&!ni(t.scopeName,n);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function ni(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var zr=class{constructor(t,e,r){this.fontStyle=t,this.foregroundId=e,this.backgroundId=r}};function ii(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,r=[],n=0;for(let i=0,s=e.length;i<s;i++){let o=e[i];if(!o.settings)continue;let c;if(typeof o.scope=="string"){let p=o.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),c=p.split(",")}else Array.isArray(o.scope)?c=o.scope:c=[""];let a=-1;if(typeof o.settings.fontStyle=="string"){a=0;let p=o.settings.fontStyle.split(" ");for(let h=0,f=p.length;h<f;h++)switch(p[h]){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 l=null;typeof o.settings.foreground=="string"&&tr(o.settings.foreground)&&(l=o.settings.foreground);let d=null;typeof o.settings.background=="string"&&tr(o.settings.background)&&(d=o.settings.background);for(let p=0,h=c.length;p<h;p++){let m=c[p].trim().split(" "),y=m[m.length-1],E=null;m.length>1&&(E=m.slice(0,m.length-1),E.reverse()),r[n++]=new si(y,E,i,a,l,d)}}return r}var si=class{constructor(t,e,r,n,i,s){this.scope=t,this.parentScopes=e,this.index=r,this.fontStyle=n,this.foreground=i,this.background=s}},O=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(O||{});function oi(t,e){t.sort((a,l)=>{let d=jr(a.scope,l.scope);return d!==0||(d=Ur(a.parentScopes,l.parentScopes),d!==0)?d:a.index-l.index});let r=0,n="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(r=a.fontStyle),a.foreground!==null&&(n=a.foreground),a.background!==null&&(i=a.background)}let s=new ai(e),o=new zr(r,s.getId(n),s.getId(i)),c=new li(new Ct(0,null,-1,0,0),[]);for(let a=0,l=t.length;a<l;a++){let d=t[a];c.insert(0,d.scope,d.parentScopes,d.fontStyle,s.getId(d.foreground),s.getId(d.background))}return new Be(s,o,c)}var ai=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,r=t.length;e<r;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},ci=Object.freeze([]),Ct=class qr{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,r,n,i,s){this.scopeDepth=e,this.parentScopes=r||ci,this.fontStyle=n,this.foreground=i,this.background=s}clone(){return new qr(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let r=[];for(let n=0,i=e.length;n<i;n++)r[n]=e[n].clone();return r}acceptOverwrite(e,r,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},li=class At{constructor(e,r=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(e,r){if(e.scopeDepth!==r.scopeDepth)return r.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,r.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=r.parentScopes.length);){const s=r.parentScopes[i].length-e.parentScopes[n].length;if(s!==0)return s;n++,i++}return r.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,s;if(n===-1?(i=e,s=""):(i=e.substring(0,n),s=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(At._cmpBySpecificity),r}insert(e,r,n,i,s,o){if(r===""){this._doInsertHere(e,n,i,s,o);return}let c=r.indexOf("."),a,l;c===-1?(a=r,l=""):(a=r.substring(0,c),l=r.substring(c+1));let d;this._children.hasOwnProperty(a)?d=this._children[a]:(d=new At(this._mainRule.clone(),Ct.cloneArr(this._rulesWithParentScopes)),this._children[a]=d),d.insert(e+1,l,n,i,s,o)}_doInsertHere(e,r,n,i,s){if(r===null){this._mainRule.acceptOverwrite(e,n,i,s);return}for(let o=0,c=this._rulesWithParentScopes.length;o<c;o++){let a=this._rulesWithParentScopes[o];if(Ur(a.parentScopes,r)===0){a.acceptOverwrite(e,n,i,s);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Ct(e,r,n,i,s))}},he=class D{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const r=D.getLanguageId(e),n=D.getTokenType(e),i=D.getFontStyle(e),s=D.getForeground(e),o=D.getBackground(e);console.log({languageId:r,tokenType:n,fontStyle:i,foreground:s,background:o})}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,r,n,i,s,o,c){let a=D.getLanguageId(e),l=D.getTokenType(e),d=D.containsBalancedBrackets(e)?1:0,p=D.getFontStyle(e),h=D.getForeground(e),f=D.getBackground(e);return r!==0&&(a=r),n!==8&&(l=n),i!==null&&(d=i?1:0),s!==-1&&(p=s),o!==0&&(h=o),c!==0&&(f=c),(a<<0|l<<8|d<<10|p<<11|h<<15|f<<24)>>>0}};function Fe(t,e){const r=[],n=ui(t);let i=n.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let l=o();if(r.push({matcher:l,priority:a}),i!==",")break;i=n.next()}return r;function s(){if(i==="-"){i=n.next();const a=s();return l=>!!a&&!a(l)}if(i==="("){i=n.next();const a=c();return i===")"&&(i=n.next()),a}if(rr(i)){const a=[];do a.push(i),i=n.next();while(rr(i));return l=>e(a,l)}return null}function o(){const a=[];let l=s();for(;l;)a.push(l),l=s();return d=>a.every(p=>p(d))}function c(){const a=[];let l=o();for(;l&&(a.push(l),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");l=o()}return d=>a.some(p=>p(d))}}function rr(t){return!!t&&!!t.match(/[\w\.:]+/)}function ui(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=e.exec(t);return{next:()=>{if(!r)return null;const n=r[0];return r=e.exec(t),n}}}function Xr(t){typeof t.dispose=="function"&&t.dispose()}var Ce=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},di=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},pi=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},hi=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ce(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new pi;for(const r of t)fi(r,this.initialScopeName,this.repo,e);for(const r of e.references)if(r instanceof Ce){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function fi(t,e,r,n){const i=r.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=r.lookup(e);t instanceof Ce?Me({baseGrammar:s,selfGrammar:i},n):vt(t.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},n);const o=r.injections(t.scopeName);if(o)for(const c of o)n.add(new Ce(c))}function vt(t,e,r){if(e.repository&&e.repository[t]){const n=e.repository[t];je([n],e,r)}}function Me(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&je(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&je(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function je(t,e,r){for(const n of t){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const i=n.repository?Br({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&je(n.patterns,{...e,repository:i},r);const s=n.include;if(!s)continue;const o=Qr(s);switch(o.kind){case 0:Me({...e,selfGrammar:e.baseGrammar},r);break;case 1:Me(e,r);break;case 2:vt(o.ruleName,{...e,repository:i},r);break;case 3:case 4:const c=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:i};o.kind===4?vt(o.ruleName,a,r):Me(a,r)}else o.kind===4?r.add(new di(o.scopeName,o.ruleName)):r.add(new Ce(o.scopeName));break}}}var mi=class{kind=0},gi=class{kind=1},_i=class{constructor(t){this.ruleName=t}kind=2},yi=class{constructor(t){this.scopeName=t}kind=3},Ei=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function Qr(t){if(t==="$base")return new mi;if(t==="$self")return new gi;const e=t.indexOf("#");if(e===-1)return new yi(t);if(e===0)return new _i(t.substring(1));{const r=t.substring(0,e),n=t.substring(e+1);return new Ei(r,n)}}var bi=/\\(\d+)/,nr=/\\(\d+)/g,wi=-1,Kr=-2;var Se=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,r,n){this.$location=t,this.id=e,this._name=r||null,this._nameIsCapturing=Te.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=Te.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Fr(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:Te.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Te.replaceCaptures(this._contentName,t,e)}},Ci=class extends Se{retokenizeCapturedWithRuleId;constructor(t,e,r,n,i){super(t,e,r,n),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,r,n){throw new Error("Not supported!")}},Ai=class extends Se{_match;captures;_cachedCompiledPatterns;constructor(t,e,r,n,i){super(t,e,r,null),this._match=new Ae(n,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ve,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ir=class extends Se{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,r,n,i){super(t,e,r,n),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const r of this.patterns)t.getRule(r).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ve,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},It=class extends Se{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,r,n,i,s,o,c,a,l){super(t,e,r,n),this._begin=new Ae(i,this.id),this.beginCaptures=s,this._end=new Ae(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=a||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.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(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t,e).compileAG(t,r,n)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ve;for(const r of this.patterns)t.getRule(r).collectPatterns(t,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}},Ue=class extends Se{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,r,n,i,s,o,c,a){super(t,e,r,n),this._begin=new Ae(i,this.id),this.beginCaptures=s,this.whileCaptures=c,this._while=new Ae(o,Kr),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(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ve;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,r,n){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,r,n)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ve,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Jr=class x{static createCaptureRule(e,r,n,i,s){return e.registerRule(o=>new Ci(r,o,n,i,s))}static getCompiledRuleId(e,r,n){return e.id||r.registerRule(i=>{if(e.id=i,e.match)return new Ai(e.$vscodeTextmateLocation,e.id,e.name,e.match,x._compileCaptures(e.captures,r,n));if(typeof e.begin>"u"){e.repository&&(n=Br({},n,e.repository));let s=e.patterns;return typeof s>"u"&&e.include&&(s=[{include:e.include}]),new ir(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,x._compilePatterns(s,r,n))}return e.while?new Ue(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,r,n),e.while,x._compileCaptures(e.whileCaptures||e.captures,r,n),x._compilePatterns(e.patterns,r,n)):new It(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,r,n),e.end,x._compileCaptures(e.endCaptures||e.captures,r,n),e.applyEndPatternLast,x._compilePatterns(e.patterns,r,n))}),e.id}static _compileCaptures(e,r,n){let i=[];if(e){let s=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const c=parseInt(o,10);c>s&&(s=c)}for(let o=0;o<=s;o++)i[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const c=parseInt(o,10);let a=0;e[o].patterns&&(a=x.getCompiledRuleId(e[o],r,n)),i[c]=x.createCaptureRule(r,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,a)}}return i}static _compilePatterns(e,r,n){let i=[];if(e)for(let s=0,o=e.length;s<o;s++){const c=e[s];let a=-1;if(c.include){const l=Qr(c.include);switch(l.kind){case 0:case 1:a=x.getCompiledRuleId(n[c.include],r,n);break;case 2:let d=n[l.ruleName];d&&(a=x.getCompiledRuleId(d,r,n));break;case 3:case 4:const p=l.scopeName,h=l.kind===4?l.ruleName:null,f=r.getExternalGrammar(p,n);if(f)if(h){let m=f.repository[h];m&&(a=x.getCompiledRuleId(m,r,f.repository))}else a=x.getCompiledRuleId(f.repository.$self,r,f.repository);break}}else a=x.getCompiledRuleId(c,r,n);if(a!==-1){const l=r.getRule(a);let d=!1;if((l instanceof ir||l instanceof It||l instanceof Ue)&&l.hasMissingPatterns&&l.patterns.length===0&&(d=!0),d)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},Ae=class Zr{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,r){if(e&&typeof e=="string"){const n=e.length;let i=0,s=[],o=!1;for(let c=0;c<n;c++)if(e.charAt(c)==="\\"&&c+1<n){const l=e.charAt(c+1);l==="z"?(s.push(e.substring(i,c)),s.push("$(?!\\n)(?<!\\n)"),i=c+2):(l==="A"||l==="G")&&(o=!0),c++}this.hasAnchor=o,i===0?this.source=e:(s.push(e.substring(i,n)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=bi.test(this.source):this.hasBackReferences=!1}clone(){return new Zr(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(i=>e.substring(i.start,i.end));return nr.lastIndex=0,this.source.replace(nr,(i,s)=>Wr(n[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=[],r=[],n=[],i=[],s,o,c,a;for(s=0,o=this.source.length;s<o;s++)c=this.source.charAt(s),e[s]=c,r[s]=c,n[s]=c,i[s]=c,c==="\\"&&s+1<o&&(a=this.source.charAt(s+1),a==="A"?(e[s+1]="",r[s+1]="",n[s+1]="A",i[s+1]="A"):a==="G"?(e[s+1]="",r[s+1]="G",n[s+1]="",i[s+1]="G"):(e[s+1]=a,r[s+1]=a,n[s+1]=a,i[s+1]=a),s++);return{A0_G0:e.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ve=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(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(r=>r.source);this._cached=new sr(t,e,this._items.map(r=>r.ruleId))}return this._cached}compileAG(t,e,r){return this._hasAnchors?e?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,r){let n=this._items.map(i=>i.resolveAnchors(e,r));return new sr(t,n,this._items.map(i=>i.ruleId))}},sr=class{constructor(t,e,r){this.regExps=e,this.rules=r,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,r=this.rules.length;e<r;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
2
|
+
import{w as Vt,s as Gr,f as Hn,a as zn,b as qn,c as er,z as Xn,h as Qn,d as Kn,C as Jn,D as Zn,u as Mt}from"./mermaid-VLURNSYL-D5uFRwCp.js";import{r as ue}from"./icons-D6TH-xEh.js";import{j as V}from"./radix-ui-Cc0cu4Uu.js";import{_ as u}from"./monaco-editor-BMj4E99D.js";import"./tanstack-BVOBleBY.js";import"./react-dom-B7--tMaV.js";import"./index-B11inYe0.js";import"./scroll-area-DdKnqqlw.js";import"./index-C4O5Rsq1.js";import"./_pathlessLayout-byu8LhC4.js";import"./queries.store-CNqfnc5k.js";let I=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Yn(t){return Gt(t)}function Gt(t){return Array.isArray(t)?ei(t):t instanceof RegExp?t:typeof t=="object"?ti(t):t}function ei(t){let e=[];for(let r=0,n=t.length;r<n;r++)e[r]=Gt(t[r]);return e}function ti(t){let e={};for(let r in t)e[r]=Gt(t[r]);return e}function Br(t,...e){return e.forEach(r=>{for(let n in r)t[n]=r[n]}),t}function Fr(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Fr(t.substring(0,t.length-1)):t.substr(~e+1)}var ot=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Te=class{static hasCaptures(t){return t===null?!1:(ot.lastIndex=0,ot.test(t))}static replaceCaptures(t,e,r){return t.replace(ot,(n,i,s,o)=>{let c=r[parseInt(i||s,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(o){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return n})}};function jr(t,e){return t<e?-1:t>e?1:0}function Ur(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let r=t.length,n=e.length;if(r===n){for(let i=0;i<r;i++){let s=jr(t[i],e[i]);if(s!==0)return s}return 0}return r-n}function tr(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Wr(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Hr=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},Be=class{constructor(t,e,r){this._colorMap=t,this._defaults=e,this._root=r}static createFromRawTheme(t,e){return this.createFromParsedTheme(ii(t),e)}static createFromParsedTheme(t,e){return oi(t,e)}_cachedMatchRoot=new Hr(t=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,n=this._cachedMatchRoot.get(e).find(i=>ri(t.parent,i.parentScopes));return n?new zr(n.fontStyle,n.foreground,n.background):null}},at=class Ve{constructor(e,r){this.parent=e,this.scopeName=r}static push(e,r){for(const n of r)e=new Ve(e,n);return e}static from(...e){let r=null;for(let n=0;n<e.length;n++)r=new Ve(r,e[n]);return r}push(e){return new Ve(this,e)}getSegments(){let e=this;const r=[];for(;e;)r.push(e.scopeName),e=e.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const r=[];let n=this;for(;n&&n!==e;)r.push(n.scopeName),n=n.parent;return n===e?r.reverse():void 0}};function ri(t,e){if(e.length===0)return!0;for(let r=0;r<e.length;r++){let n=e[r],i=!1;if(n===">"){if(r===e.length-1)return!1;n=e[++r],i=!0}for(;t&&!ni(t.scopeName,n);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function ni(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var zr=class{constructor(t,e,r){this.fontStyle=t,this.foregroundId=e,this.backgroundId=r}};function ii(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,r=[],n=0;for(let i=0,s=e.length;i<s;i++){let o=e[i];if(!o.settings)continue;let c;if(typeof o.scope=="string"){let p=o.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),c=p.split(",")}else Array.isArray(o.scope)?c=o.scope:c=[""];let a=-1;if(typeof o.settings.fontStyle=="string"){a=0;let p=o.settings.fontStyle.split(" ");for(let h=0,f=p.length;h<f;h++)switch(p[h]){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 l=null;typeof o.settings.foreground=="string"&&tr(o.settings.foreground)&&(l=o.settings.foreground);let d=null;typeof o.settings.background=="string"&&tr(o.settings.background)&&(d=o.settings.background);for(let p=0,h=c.length;p<h;p++){let m=c[p].trim().split(" "),y=m[m.length-1],E=null;m.length>1&&(E=m.slice(0,m.length-1),E.reverse()),r[n++]=new si(y,E,i,a,l,d)}}return r}var si=class{constructor(t,e,r,n,i,s){this.scope=t,this.parentScopes=e,this.index=r,this.fontStyle=n,this.foreground=i,this.background=s}},O=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(O||{});function oi(t,e){t.sort((a,l)=>{let d=jr(a.scope,l.scope);return d!==0||(d=Ur(a.parentScopes,l.parentScopes),d!==0)?d:a.index-l.index});let r=0,n="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let a=t.shift();a.fontStyle!==-1&&(r=a.fontStyle),a.foreground!==null&&(n=a.foreground),a.background!==null&&(i=a.background)}let s=new ai(e),o=new zr(r,s.getId(n),s.getId(i)),c=new li(new Ct(0,null,-1,0,0),[]);for(let a=0,l=t.length;a<l;a++){let d=t[a];c.insert(0,d.scope,d.parentScopes,d.fontStyle,s.getId(d.foreground),s.getId(d.background))}return new Be(s,o,c)}var ai=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,r=t.length;e<r;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},ci=Object.freeze([]),Ct=class qr{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,r,n,i,s){this.scopeDepth=e,this.parentScopes=r||ci,this.fontStyle=n,this.foreground=i,this.background=s}clone(){return new qr(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let r=[];for(let n=0,i=e.length;n<i;n++)r[n]=e[n].clone();return r}acceptOverwrite(e,r,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},li=class At{constructor(e,r=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=r}_rulesWithParentScopes;static _cmpBySpecificity(e,r){if(e.scopeDepth!==r.scopeDepth)return r.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,r.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=r.parentScopes.length);){const s=r.parentScopes[i].length-e.parentScopes[n].length;if(s!==0)return s;n++,i++}return r.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,s;if(n===-1?(i=e,s=""):(i=e.substring(0,n),s=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(At._cmpBySpecificity),r}insert(e,r,n,i,s,o){if(r===""){this._doInsertHere(e,n,i,s,o);return}let c=r.indexOf("."),a,l;c===-1?(a=r,l=""):(a=r.substring(0,c),l=r.substring(c+1));let d;this._children.hasOwnProperty(a)?d=this._children[a]:(d=new At(this._mainRule.clone(),Ct.cloneArr(this._rulesWithParentScopes)),this._children[a]=d),d.insert(e+1,l,n,i,s,o)}_doInsertHere(e,r,n,i,s){if(r===null){this._mainRule.acceptOverwrite(e,n,i,s);return}for(let o=0,c=this._rulesWithParentScopes.length;o<c;o++){let a=this._rulesWithParentScopes[o];if(Ur(a.parentScopes,r)===0){a.acceptOverwrite(e,n,i,s);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Ct(e,r,n,i,s))}},he=class D{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const r=D.getLanguageId(e),n=D.getTokenType(e),i=D.getFontStyle(e),s=D.getForeground(e),o=D.getBackground(e);console.log({languageId:r,tokenType:n,fontStyle:i,foreground:s,background:o})}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,r,n,i,s,o,c){let a=D.getLanguageId(e),l=D.getTokenType(e),d=D.containsBalancedBrackets(e)?1:0,p=D.getFontStyle(e),h=D.getForeground(e),f=D.getBackground(e);return r!==0&&(a=r),n!==8&&(l=n),i!==null&&(d=i?1:0),s!==-1&&(p=s),o!==0&&(h=o),c!==0&&(f=c),(a<<0|l<<8|d<<10|p<<11|h<<15|f<<24)>>>0}};function Fe(t,e){const r=[],n=ui(t);let i=n.next();for(;i!==null;){let a=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let l=o();if(r.push({matcher:l,priority:a}),i!==",")break;i=n.next()}return r;function s(){if(i==="-"){i=n.next();const a=s();return l=>!!a&&!a(l)}if(i==="("){i=n.next();const a=c();return i===")"&&(i=n.next()),a}if(rr(i)){const a=[];do a.push(i),i=n.next();while(rr(i));return l=>e(a,l)}return null}function o(){const a=[];let l=s();for(;l;)a.push(l),l=s();return d=>a.every(p=>p(d))}function c(){const a=[];let l=o();for(;l&&(a.push(l),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");l=o()}return d=>a.some(p=>p(d))}}function rr(t){return!!t&&!!t.match(/[\w\.:]+/)}function ui(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=e.exec(t);return{next:()=>{if(!r)return null;const n=r[0];return r=e.exec(t),n}}}function Xr(t){typeof t.dispose=="function"&&t.dispose()}var Ce=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},di=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},pi=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},hi=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Ce(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const t=this.Q;this.Q=[];const e=new pi;for(const r of t)fi(r,this.initialScopeName,this.repo,e);for(const r of e.references)if(r instanceof Ce){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function fi(t,e,r,n){const i=r.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=r.lookup(e);t instanceof Ce?Me({baseGrammar:s,selfGrammar:i},n):vt(t.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},n);const o=r.injections(t.scopeName);if(o)for(const c of o)n.add(new Ce(c))}function vt(t,e,r){if(e.repository&&e.repository[t]){const n=e.repository[t];je([n],e,r)}}function Me(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&je(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&je(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function je(t,e,r){for(const n of t){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const i=n.repository?Br({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&je(n.patterns,{...e,repository:i},r);const s=n.include;if(!s)continue;const o=Qr(s);switch(o.kind){case 0:Me({...e,selfGrammar:e.baseGrammar},r);break;case 1:Me(e,r);break;case 2:vt(o.ruleName,{...e,repository:i},r);break;case 3:case 4:const c=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:i};o.kind===4?vt(o.ruleName,a,r):Me(a,r)}else o.kind===4?r.add(new di(o.scopeName,o.ruleName)):r.add(new Ce(o.scopeName));break}}}var mi=class{kind=0},gi=class{kind=1},_i=class{constructor(t){this.ruleName=t}kind=2},yi=class{constructor(t){this.scopeName=t}kind=3},Ei=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function Qr(t){if(t==="$base")return new mi;if(t==="$self")return new gi;const e=t.indexOf("#");if(e===-1)return new yi(t);if(e===0)return new _i(t.substring(1));{const r=t.substring(0,e),n=t.substring(e+1);return new Ei(r,n)}}var bi=/\\(\d+)/,nr=/\\(\d+)/g,wi=-1,Kr=-2;var Se=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,r,n){this.$location=t,this.id=e,this._name=r||null,this._nameIsCapturing=Te.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=Te.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Fr(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:Te.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Te.replaceCaptures(this._contentName,t,e)}},Ci=class extends Se{retokenizeCapturedWithRuleId;constructor(t,e,r,n,i){super(t,e,r,n),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(t,e){throw new Error("Not supported!")}compile(t,e){throw new Error("Not supported!")}compileAG(t,e,r,n){throw new Error("Not supported!")}},Ai=class extends Se{_match;captures;_cachedCompiledPatterns;constructor(t,e,r,n,i){super(t,e,r,null),this._match=new Ae(n,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ve,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ir=class extends Se{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,r,n,i){super(t,e,r,n),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,e){for(const r of this.patterns)t.getRule(r).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ve,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},It=class extends Se{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,r,n,i,s,o,c,a,l){super(t,e,r,n),this._begin=new Ae(i,this.id),this.beginCaptures=s,this._end=new Ae(o||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=a||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.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(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t,e).compileAG(t,r,n)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ve;for(const r of this.patterns)t.getRule(r).collectPatterns(t,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}},Ue=class extends Se{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,r,n,i,s,o,c,a){super(t,e,r,n),this._begin=new Ae(i,this.id),this.beginCaptures=s,this.whileCaptures=c,this._while=new Ae(o,Kr),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(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,r,n){return this._getCachedCompiledPatterns(t).compileAG(t,r,n)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ve;for(const e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,r,n){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,r,n)}_getCachedCompiledWhilePatterns(t,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ve,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||""),this._cachedCompiledWhilePatterns}},Jr=class x{static createCaptureRule(e,r,n,i,s){return e.registerRule(o=>new Ci(r,o,n,i,s))}static getCompiledRuleId(e,r,n){return e.id||r.registerRule(i=>{if(e.id=i,e.match)return new Ai(e.$vscodeTextmateLocation,e.id,e.name,e.match,x._compileCaptures(e.captures,r,n));if(typeof e.begin>"u"){e.repository&&(n=Br({},n,e.repository));let s=e.patterns;return typeof s>"u"&&e.include&&(s=[{include:e.include}]),new ir(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,x._compilePatterns(s,r,n))}return e.while?new Ue(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,r,n),e.while,x._compileCaptures(e.whileCaptures||e.captures,r,n),x._compilePatterns(e.patterns,r,n)):new It(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,x._compileCaptures(e.beginCaptures||e.captures,r,n),e.end,x._compileCaptures(e.endCaptures||e.captures,r,n),e.applyEndPatternLast,x._compilePatterns(e.patterns,r,n))}),e.id}static _compileCaptures(e,r,n){let i=[];if(e){let s=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const c=parseInt(o,10);c>s&&(s=c)}for(let o=0;o<=s;o++)i[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const c=parseInt(o,10);let a=0;e[o].patterns&&(a=x.getCompiledRuleId(e[o],r,n)),i[c]=x.createCaptureRule(r,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,a)}}return i}static _compilePatterns(e,r,n){let i=[];if(e)for(let s=0,o=e.length;s<o;s++){const c=e[s];let a=-1;if(c.include){const l=Qr(c.include);switch(l.kind){case 0:case 1:a=x.getCompiledRuleId(n[c.include],r,n);break;case 2:let d=n[l.ruleName];d&&(a=x.getCompiledRuleId(d,r,n));break;case 3:case 4:const p=l.scopeName,h=l.kind===4?l.ruleName:null,f=r.getExternalGrammar(p,n);if(f)if(h){let m=f.repository[h];m&&(a=x.getCompiledRuleId(m,r,f.repository))}else a=x.getCompiledRuleId(f.repository.$self,r,f.repository);break}}else a=x.getCompiledRuleId(c,r,n);if(a!==-1){const l=r.getRule(a);let d=!1;if((l instanceof ir||l instanceof It||l instanceof Ue)&&l.hasMissingPatterns&&l.patterns.length===0&&(d=!0),d)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},Ae=class Zr{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,r){if(e&&typeof e=="string"){const n=e.length;let i=0,s=[],o=!1;for(let c=0;c<n;c++)if(e.charAt(c)==="\\"&&c+1<n){const l=e.charAt(c+1);l==="z"?(s.push(e.substring(i,c)),s.push("$(?!\\n)(?<!\\n)"),i=c+2):(l==="A"||l==="G")&&(o=!0),c++}this.hasAnchor=o,i===0?this.source=e:(s.push(e.substring(i,n)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=bi.test(this.source):this.hasBackReferences=!1}clone(){return new Zr(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(i=>e.substring(i.start,i.end));return nr.lastIndex=0,this.source.replace(nr,(i,s)=>Wr(n[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=[],r=[],n=[],i=[],s,o,c,a;for(s=0,o=this.source.length;s<o;s++)c=this.source.charAt(s),e[s]=c,r[s]=c,n[s]=c,i[s]=c,c==="\\"&&s+1<o&&(a=this.source.charAt(s+1),a==="A"?(e[s+1]="",r[s+1]="",n[s+1]="A",i[s+1]="A"):a==="G"?(e[s+1]="",r[s+1]="G",n[s+1]="",i[s+1]="G"):(e[s+1]=a,r[s+1]=a,n[s+1]=a,i[s+1]=a),s++);return{A0_G0:e.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ve=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(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(r=>r.source);this._cached=new sr(t,e,this._items.map(r=>r.ruleId))}return this._cached}compileAG(t,e,r){return this._hasAnchors?e?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,r){let n=this._items.map(i=>i.resolveAnchors(e,r));return new sr(t,n,this._items.map(i=>i.ruleId))}},sr=class{constructor(t,e,r){this.regExps=e,this.rules=r,this.scanner=t.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,r=this.rules.length;e<r;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
3
3
|
`)}findNextMatchSync(t,e,r){const n=this.scanner.findNextMatchSync(t,e,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},ct=class{constructor(t,e){this.languageId=t,this.tokenType=e}},vi=class Rt{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,r){this._defaultAttributes=new ct(e,8),this._embeddedLanguagesMatcher=new Ii(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Rt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new ct(0,0);_getBasicScopeAttributes=new Hr(e=>{const r=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new ct(r,n)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const r=e.match(Rt.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ii=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([r,n])=>Wr(r));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},or=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Yr(t,e,r,n,i,s,o,c){const a=e.content.length;let l=!1,d=-1;if(o){const f=Ri(t,e,r,n,i,s);i=f.stack,n=f.linePos,r=f.isFirstLine,d=f.anchorPosition}const p=Date.now();for(;!l;){if(c!==0&&Date.now()-p>c)return new or(i,!0);h()}return new or(i,!1);function h(){const f=Si(t,e,r,n,i,d);if(!f){s.produce(i,a),l=!0;return}const m=f.captureIndices,y=f.matchedRuleId,E=m&&m.length>0?m[0].end>n:!1;if(y===wi){const g=i.getRule(t);s.produce(i,m[0].start),i=i.withContentNameScopesList(i.nameScopesList),Ee(t,e,r,i,s,g.endCaptures,m),s.produce(i,m[0].end);const b=i;if(i=i.parent,d=b.getAnchorPos(),!E&&b.getEnterPos()===n){i=b,s.produce(i,a),l=!0;return}}else{const g=t.getRule(y);s.produce(i,m[0].start);const b=i,_=g.getName(e.content,m),w=i.contentNameScopesList.pushAttributed(_,t);if(i=i.push(y,n,d,m[0].end===a,null,w,w),g instanceof It){const A=g;Ee(t,e,r,i,s,A.beginCaptures,m),s.produce(i,m[0].end),d=m[0].end;const k=A.getContentName(e.content,m),N=w.pushAttributed(k,t);if(i=i.withContentNameScopesList(N),A.endHasBackReferences&&(i=i.withEndRule(A.getEndWithResolvedBackReferences(e.content,m))),!E&&b.hasSameRuleAs(i)){i=i.pop(),s.produce(i,a),l=!0;return}}else if(g instanceof Ue){const A=g;Ee(t,e,r,i,s,A.beginCaptures,m),s.produce(i,m[0].end),d=m[0].end;const k=A.getContentName(e.content,m),N=w.pushAttributed(k,t);if(i=i.withContentNameScopesList(N),A.whileHasBackReferences&&(i=i.withEndRule(A.getWhileWithResolvedBackReferences(e.content,m))),!E&&b.hasSameRuleAs(i)){i=i.pop(),s.produce(i,a),l=!0;return}}else if(Ee(t,e,r,i,s,g.captures,m),s.produce(i,m[0].end),i=i.pop(),!E){i=i.safePop(),s.produce(i,a),l=!0;return}}m[0].end>n&&(n=m[0].end,r=!1)}}function Ri(t,e,r,n,i,s){let o=i.beginRuleCapturedEOL?0:-1;const c=[];for(let a=i;a;a=a.pop()){const l=a.getRule(t);l instanceof Ue&&c.push({rule:l,stack:a})}for(let a=c.pop();a;a=c.pop()){const{ruleScanner:l,findOptions:d}=Ti(a.rule,t,a.stack.endRule,r,n===o),p=l.findNextMatchSync(e,n,d);if(p){if(p.ruleId!==Kr){i=a.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(s.produce(a.stack,p.captureIndices[0].start),Ee(t,e,r,a.stack,s,a.rule.whileCaptures,p.captureIndices),s.produce(a.stack,p.captureIndices[0].end),o=p.captureIndices[0].end,p.captureIndices[0].end>n&&(n=p.captureIndices[0].end,r=!1))}else{i=a.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:o,isFirstLine:r}}function Si(t,e,r,n,i,s){const o=Li(t,e,r,n,i,s),c=t.getInjections();if(c.length===0)return o;const a=ki(c,t,e,r,n,i,s);if(!a)return o;if(!o)return a;const l=o.captureIndices[0].start,d=a.captureIndices[0].start;return d<l||a.priorityMatch&&d===l?a:o}function Li(t,e,r,n,i,s){const o=i.getRule(t),{ruleScanner:c,findOptions:a}=en(o,t,i.endRule,r,n===s),l=c.findNextMatchSync(e,n,a);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function ki(t,e,r,n,i,s,o){let c=Number.MAX_VALUE,a=null,l,d=0;const p=s.contentNameScopesList.getScopeNames();for(let h=0,f=t.length;h<f;h++){const m=t[h];if(!m.matcher(p))continue;const y=e.getRule(m.ruleId),{ruleScanner:E,findOptions:g}=en(y,e,null,n,i===o),b=E.findNextMatchSync(r,i,g);if(!b)continue;const _=b.captureIndices[0].start;if(!(_>=c)&&(c=_,a=b.captureIndices,l=b.ruleId,d=m.priority,c===i))break}return a?{priorityMatch:d===-1,captureIndices:a,matchedRuleId:l}:null}function en(t,e,r,n,i){return{ruleScanner:t.compileAG(e,r,n,i),findOptions:0}}function Ti(t,e,r,n,i){return{ruleScanner:t.compileWhileAG(e,r,n,i),findOptions:0}}function Ee(t,e,r,n,i,s,o){if(s.length===0)return;const c=e.content,a=Math.min(s.length,o.length),l=[],d=o[0].end;for(let p=0;p<a;p++){const h=s[p];if(h===null)continue;const f=o[p];if(f.length===0)continue;if(f.start>d)break;for(;l.length>0&&l[l.length-1].endPos<=f.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,f.start):i.produce(n,f.start),h.retokenizeCapturedWithRuleId){const y=h.getName(c,o),E=n.contentNameScopesList.pushAttributed(y,t),g=h.getContentName(c,o),b=E.pushAttributed(g,t),_=n.push(h.retokenizeCapturedWithRuleId,f.start,-1,!1,null,E,b),w=t.createOnigString(c.substring(0,f.end));Yr(t,w,r&&f.start===0,f.start,_,i,!1,0),Xr(w);continue}const m=h.getName(c,o);if(m!==null){const E=(l.length>0?l[l.length-1].scopes:n.contentNameScopesList).pushAttributed(m,t);l.push(new Pi(E,f.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Pi=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function xi(t,e,r,n,i,s,o,c){return new Ni(t,e,r,n,i,s,o,c)}function ar(t,e,r,n,i){const s=Fe(e,We),o=Jr.getCompiledRuleId(r,n,i.repository);for(const c of s)t.push({debugSelector:e,matcher:c.matcher,ruleId:o,grammar:i,priority:c.priority})}function We(t,e){if(e.length<t.length)return!1;let r=0;return t.every(n=>{for(let i=r;i<e.length;i++)if(Oi(e[i],n))return r=i+1,!0;return!1})}function Oi(t,e){if(!t)return!1;if(t===e)return!0;const r=e.length;return t.length>r&&t.substr(0,r)===e&&t[r]==="."}var Ni=class{constructor(t,e,r,n,i,s,o,c){if(this._rootScopeName=t,this.balancedBracketSelectors=s,this._onigLib=c,this._basicScopeAttributesProvider=new vi(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=cr(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const a of Object.keys(i)){const l=Fe(a,We);for(const d of l)this._tokenTypeMatchers.push({matcher:d.matcher,type:i[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],r=this._rootScopeName,n=t.lookup(r);if(n){const i=n.injections;if(i)for(let o in i)ar(e,o,i[o],this,n);const s=this._grammarRepository.injections(r);s&&s.forEach(o=>{const c=this.getExternalGrammar(o);if(c){const a=c.injectionSelector;a&&ar(e,a,c,this,c)}})}return e.sort((i,s)=>i.priority-s.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,r=t(e);return this._ruleId2desc[e]=r,r}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const r=this._grammarRepository.lookup(t);if(r)return this._includedGrammars[t]=cr(r,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,r=0){const n=this._tokenize(t,e,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(t,e,r=0){const n=this._tokenize(t,e,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(t,e,r,n){this._rootId===-1&&(this._rootId=Jr.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===St.NULL){i=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),p=he.set(0,l.languageId,l.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),h=this.getRule(this._rootId).getName(null,null);let f;h?f=be.createRootAndLookUpScopeName(h,p,this):f=be.createRoot("unknown",p),e=new St(null,this._rootId,-1,-1,!1,null,f,f)}else i=!1,e.reset();t=t+`
|
|
4
4
|
`;const s=this.createOnigString(t),o=s.content.length,c=new $i(r,t,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Yr(this,s,i,0,e,c,!0,n);return Xr(s),{lineLength:o,lineTokens:c,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function cr(t,e){return t=Yn(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var be=class B{constructor(e,r,n){this.parent=e,this.scopePath=r,this.tokenAttributes=n}static fromExtension(e,r){let n=e,i=e?.scopePath??null;for(const s of r)i=at.push(i,s.scopeNames),n=new B(n,i,s.encodedTokenAttributes);return n}static createRoot(e,r){return new B(null,new at(null,e),r)}static createRootAndLookUpScopeName(e,r,n){const i=n.getMetadataForScope(e),s=new at(null,e),o=n.themeProvider.themeMatch(s),c=B.mergeAttributes(r,i,o);return new B(null,s,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return B.equals(this,e)}static equals(e,r){do{if(e===r||!e&&!r)return!0;if(!e||!r||e.scopeName!==r.scopeName||e.tokenAttributes!==r.tokenAttributes)return!1;e=e.parent,r=r.parent}while(!0)}static mergeAttributes(e,r,n){let i=-1,s=0,o=0;return n!==null&&(i=n.fontStyle,s=n.foregroundId,o=n.backgroundId),he.set(e,r.languageId,r.tokenType,null,i,s,o)}pushAttributed(e,r){if(e===null)return this;if(e.indexOf(" ")===-1)return B._pushAttributed(this,e,r);const n=e.split(/ /g);let i=this;for(const s of n)i=B._pushAttributed(i,s,r);return i}static _pushAttributed(e,r,n){const i=n.getMetadataForScope(r),s=e.scopePath.push(r),o=n.themeProvider.themeMatch(s),c=B.mergeAttributes(e.tokenAttributes,i,o);return new B(e,s,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const r=[];let n=this;for(;n&&n!==e;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?r.reverse():void 0}},St=class Y{constructor(e,r,n,i,s,o,c,a){this.parent=e,this.ruleId=r,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=c,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new Y(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:Y._equals(this,e)}static _equals(e,r){return e===r?!0:this._structuralEquals(e,r)?be.equals(e.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(e,r){do{if(e===r||!e&&!r)return!0;if(!e||!r||e.depth!==r.depth||e.ruleId!==r.ruleId||e.endRule!==r.endRule)return!1;e=e.parent,r=r.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){Y._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,r,n,i,s,o,c){return new Y(this,e,r,n,i,s,o,c)}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,r){return this.parent&&(r=this.parent._writeString(e,r)),e[r++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,r}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 Y(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let r=this;for(;r&&r._enterPos===e._enterPos;){if(r.ruleId===e.ruleId)return!0;r=r.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,r){const n=be.fromExtension(e?.nameScopesList??null,r.nameScopesList);return new Y(e,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,be.fromExtension(n,r.contentNameScopesList))}},Di=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap(r=>r==="*"?(this.allowAny=!0,[]):Fe(r,We).map(n=>n.matcher)),this.unbalancedBracketScopes=e.flatMap(r=>Fe(r,We).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},$i=class{constructor(t,e,r,n){this.balancedBracketSelectors=n,this._emitBinaryTokens=t,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let n=t?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=t?.getScopeNames()??[];for(const o of this._tokenTypeOverrides)o.matcher(s)&&(n=he.set(n,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(s))}if(i&&(n=he.set(n,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=e;return}const r=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:r}),this._lastTokenEndIndex=e}getResult(t,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(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,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(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)r[n]=this._binaryTokens[n];return r}},Vi=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,r,n,i){if(!this._grammars.has(t)){let s=this._rawGrammars.get(t);if(!s)return null;this._grammars.set(t,xi(t,s,e,r,n,i,this,this._onigLib))}return this._grammars.get(t)}},Mi=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Vi(Be.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,r){this._syncRegistry.setTheme(Be.createFromRawTheme(e,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,r,n){return this.loadGrammarWithConfiguration(e,r,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,r,n){return this._loadGrammar(e,r,n.embeddedLanguages,n.tokenTypes,new Di(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,r,n,i,s){const o=new hi(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(c=>this._loadSingleGrammar(c.scopeName)),o.processQueue();return this._grammarForScopeName(e,r,n,i,s)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const r=this._options.loadGrammar(e);if(r){const n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(r,n)}}addGrammar(e,r=[],n=0,i=null){return this._syncRegistry.addGrammar(e,r),this._grammarForScopeName(e.scopeName,n,i)}_grammarForScopeName(e,r=0,n=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(e,r,n,i,s)}},Lt=St.NULL;const Gi=/["&'<>`]/g,Bi=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Fi=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,ji=/[|\\{}()[\]^$+*?.]/g,lr=new WeakMap;function Ui(t,e){if(t=t.replace(e.subset?Wi(e.subset):Gi,n),e.subset||e.escapeOnly)return t;return t.replace(Bi,r).replace(Fi,n);function r(i,s,o){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function n(i,s,o){return e.format(i.charCodeAt(0),o.charCodeAt(s+1),e)}}function Wi(t){let e=lr.get(t);return e||(e=Hi(t),lr.set(t,e)),e}function Hi(t){const e=[];let r=-1;for(;++r<t.length;)e.push(t[r].replace(ji,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const zi=/[\dA-Fa-f]/;function qi(t,e,r){const n="&#x"+t.toString(16).toUpperCase();return r&&e&&!zi.test(String.fromCharCode(e))?n:n+";"}const Xi=/\d/;function Qi(t,e,r){const n="&#"+String(t);return r&&e&&!Xi.test(String.fromCharCode(e))?n:n+";"}const Ki=["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"],lt={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:"€"},Ji=["cent","copy","divide","gt","lt","not","para","times"],tn={}.hasOwnProperty,kt={};let Pe;for(Pe in lt)tn.call(lt,Pe)&&(kt[lt[Pe]]=Pe);const Zi=/[^\dA-Za-z]/;function Yi(t,e,r,n){const i=String.fromCharCode(t);if(tn.call(kt,i)){const s=kt[i],o="&"+s;return r&&Ki.includes(s)&&!Ji.includes(s)&&(!n||e&&e!==61&&Zi.test(String.fromCharCode(e)))?o:o+";"}return""}function es(t,e,r){let n=qi(t,e,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=Yi(t,e,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){const s=Qi(t,e,r.omitOptionalSemicolons);s.length<n.length&&(n=s)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}function pe(t,e){return Ui(t,Object.assign({format:es},e))}const ts=/^>|^->|<!--|-->|--!>|<!-$/g,rs=[">"],ns=["<",">"];function is(t,e,r,n){return n.settings.bogusComments?"<?"+pe(t.value,Object.assign({},n.settings.characterReferences,{subset:rs}))+">":"<!--"+t.value.replace(ts,i)+"-->";function i(s){return pe(s,Object.assign({},n.settings.characterReferences,{subset:ns}))}}function ss(t,e,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}const L=nn(1),rn=nn(-1),os=[];function nn(t){return e;function e(r,n,i){const s=r?r.children:os;let o=(n||0)+t,c=s[o];if(!i)for(;c&&Vt(c);)o+=t,c=s[o];return c}}const as={}.hasOwnProperty;function sn(t){return e;function e(r,n,i){return as.call(t,r.tagName)&&t[r.tagName](r,n,i)}}const Bt=sn({body:ls,caption:ut,colgroup:ut,dd:hs,dt:ps,head:ut,html:cs,li:ds,optgroup:fs,option:ms,p:us,rp:ur,rt:ur,tbody:_s,td:dr,tfoot:ys,th:dr,thead:gs,tr:Es});function ut(t,e,r){const n=L(r,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&Vt(n.value.charAt(0)))}function cs(t,e,r){const n=L(r,e);return!n||n.type!=="comment"}function ls(t,e,r){const n=L(r,e);return!n||n.type!=="comment"}function us(t,e,r){const n=L(r,e);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function ds(t,e,r){const n=L(r,e);return!n||n.type==="element"&&n.tagName==="li"}function ps(t,e,r){const n=L(r,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function hs(t,e,r){const n=L(r,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function ur(t,e,r){const n=L(r,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function fs(t,e,r){const n=L(r,e);return!n||n.type==="element"&&n.tagName==="optgroup"}function ms(t,e,r){const n=L(r,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function gs(t,e,r){const n=L(r,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function _s(t,e,r){const n=L(r,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function ys(t,e,r){return!L(r,e)}function Es(t,e,r){const n=L(r,e);return!n||n.type==="element"&&n.tagName==="tr"}function dr(t,e,r){const n=L(r,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const bs=sn({body:As,colgroup:vs,head:Cs,html:ws,tbody:Is});function ws(t){const e=L(t,-1);return!e||e.type!=="comment"}function Cs(t){const e=new Set;for(const n of t.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(e.has(n.tagName))return!1;e.add(n.tagName)}const r=t.children[0];return!r||r.type==="element"}function As(t){const e=L(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Vt(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function vs(t,e,r){const n=rn(r,e),i=L(t,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&Bt(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function Is(t,e,r){const n=rn(r,e),i=L(t,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&Bt(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const xe={name:[[`
|
|
5
5
|
\f\r &/=>`.split(""),`
|