nuxt-studio 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +1 -0
  2. package/dist/app/bash-B8OHlvmy.js +1 -0
  3. package/dist/app/css-qVUxccX0.js +1 -0
  4. package/dist/app/en-CZaXIbpT.js +1 -0
  5. package/dist/app/engine-compile-1A_TmkOK.js +47 -0
  6. package/dist/app/fr-TmrooVTw.js +1 -0
  7. package/dist/app/html-derivative-DL2d6cy-.js +1 -0
  8. package/dist/app/hu-d1rgPQJS.js +1 -0
  9. package/dist/app/{index-BzjOWvSV.js → index-BizPcbmC.js} +1 -1
  10. package/dist/app/index-D52QVfmA.js +2 -0
  11. package/dist/app/index-DmPVZd3w.js +1 -0
  12. package/dist/app/{index-DN_Tmc8V.js → index-JQKg5d2g.js} +1 -1
  13. package/dist/app/main-DVjyyjbg.js +42 -0
  14. package/dist/app/main-KMOUKf4W.js +43 -0
  15. package/dist/app/main.d.ts +51 -29
  16. package/dist/app/main.js +1 -1
  17. package/dist/app/mdc-DHVjNz-H.js +1 -0
  18. package/dist/app/{rehype-B0pzK8Ph.js → rehype-BqN365ZH.js} +1 -1
  19. package/dist/app/rehype-CnrSkHB2.js +1 -0
  20. package/dist/app/rst-Fqy0Smiz.js +1 -0
  21. package/dist/app/service-worker.d.ts +37 -28
  22. package/dist/app/service-worker.js +1 -1
  23. package/dist/app/shared.d.ts +37 -28
  24. package/dist/app/{shiki-DIDkQbrM.js → shiki-Boq42Ne5.js} +1 -1
  25. package/dist/app/shiki-CVI8BlHQ.js +1 -0
  26. package/dist/app/sk-BvhYsbV3.js +1 -0
  27. package/dist/app/svelte-CLa4vPyC.js +1 -0
  28. package/dist/app/vue-CitcOps-.js +1 -0
  29. package/dist/module/module.d.mts +37 -0
  30. package/dist/module/module.json +1 -1
  31. package/dist/module/module.mjs +21 -6
  32. package/dist/module/runtime/composables/useMeta.d.ts +11 -1
  33. package/dist/module/runtime/composables/useMeta.js +18 -4
  34. package/dist/module/runtime/host.js +15 -1
  35. package/dist/module/runtime/plugins/studio.client.dev.js +2 -1
  36. package/dist/module/runtime/plugins/studio.client.js +2 -1
  37. package/dist/module/runtime/server/routes/ipx/[...path].d.ts +6 -0
  38. package/dist/module/runtime/server/routes/ipx/[...path].js +40 -0
  39. package/dist/module/runtime/server/routes/meta.d.ts +10 -3
  40. package/dist/module/runtime/server/routes/meta.js +12 -2
  41. package/dist/module/runtime/server/utils/media/ipx.d.ts +14 -0
  42. package/dist/module/runtime/server/utils/media/ipx.js +111 -0
  43. package/dist/module/runtime/utils/componentGroups.d.ts +20 -0
  44. package/dist/module/runtime/utils/componentGroups.js +30 -0
  45. package/dist/module/runtime/utils/document/generate.js +6 -3
  46. package/package.json +2 -1
  47. package/dist/app/main-BaiiAKHN.js +0 -42
@@ -0,0 +1 @@
1
+ import t from"./javascript-DFyEbC5y.js";import{c as e}from"./css-qVUxccX0.js";const n=[...t,...e,Object.freeze(JSON.parse('{"displayName":"HTML","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"html","patterns":[{"include":"#xml-processing"},{"include":"#comment"},{"include":"#doctype"},{"include":"#cdata"},{"include":"#tags-valid"},{"include":"#tags-invalid"},{"include":"#entities"}],"repository":{"attribute":{"patterns":[{"begin":"(s(hape|cope|t(ep|art)|ize(s)?|p(ellcheck|an)|elected|lot|andbox|rc(set|doc|lang)?)|h(ttp-equiv|i(dden|gh)|e(ight|aders)|ref(lang)?)|n(o(nce|validate|module)|ame)|c(h(ecked|arset)|ite|o(nt(ent(editable)?|rols)|ords|l(s(pan)?|or))|lass|rossorigin)|t(ype(mustmatch)?|itle|a(rget|bindex)|ranslate)|i(s(map)?|n(tegrity|putmode)|tem(scope|type|id|prop|ref)|d)|op(timum|en)|d(i(sabled|r(name)?)|ownload|e(coding|f(er|ault))|at(etime|a)|raggable)|usemap|p(ing|oster|la(ysinline|ceholder)|attern|reload)|enctype|value|kind|for(m(novalidate|target|enctype|action|method)?)?|w(idth|rap)|l(ist|o(op|w)|a(ng|bel))|a(s(ync)?|c(ce(sskey|pt(-charset)?)|tion)|uto(c(omplete|apitalize)|play|focus)|l(t|low(usermedia|paymentrequest|fullscreen))|bbr)|r(ows(pan)?|e(versed|quired|ferrerpolicy|l|adonly))|m(in(length)?|u(ted|ltiple)|e(thod|dia)|a(nifest|x(length)?)))(?![-:\\\\w])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.$1.html","patterns":[{"include":"#attribute-interior"}]},{"begin":"style(?![-:\\\\w])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.style.html","patterns":[{"begin":"=","beginCaptures":{"0":{"name":"punctuation.separator.key-value.html"}},"end":"(?<=[^=\\\\s])(?!\\\\s*=)|(?=/?>)","patterns":[{"begin":"(?=[^/<=>`\\\\s]|/(?!>))","end":"(?!\\\\G)","name":"meta.embedded.line.css","patterns":[{"captures":{"0":{"name":"source.css"}},"match":"([^\\"\'/<=>`\\\\s]|/(?!>))+","name":"string.unquoted.html"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"source.css","end":"(\\")","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"},"1":{"name":"source.css"}},"name":"string.quoted.double.html","patterns":[{"include":"#entities"}]},{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"source.css","end":"(\')","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"},"1":{"name":"source.css"}},"name":"string.quoted.single.html","patterns":[{"include":"#entities"}]}]},{"match":"=","name":"invalid.illegal.unexpected-equals-sign.html"}]}]},{"begin":"on(s(croll|t(orage|alled)|u(spend|bmit)|e(curitypolicyviolation|ek(ing|ed)|lect))|hashchange|c(hange|o(ntextmenu|py)|u(t|echange)|l(ick|ose)|an(cel|play(through)?))|t(imeupdate|oggle)|in(put|valid)|o((?:n|ff)line)|d(urationchange|r(op|ag(start|over|e(n(ter|d)|xit)|leave)?)|blclick)|un(handledrejection|load)|p(opstate|lay(ing)?|a(ste|use|ge(show|hide))|rogress)|e(nded|rror|mptied)|volumechange|key(down|up|press)|focus|w(heel|aiting)|l(oad(start|e(nd|d((?:|meta)data)))?|anguagechange)|a(uxclick|fterprint|bort)|r(e(s(ize|et)|jectionhandled)|atechange)|m(ouse(o(ut|ver)|down|up|enter|leave|move)|essage(error)?)|b(efore(unload|print)|lur))(?![-:\\\\w])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.event-handler.$1.html","patterns":[{"begin":"=","beginCaptures":{"0":{"name":"punctuation.separator.key-value.html"}},"end":"(?<=[^=\\\\s])(?!\\\\s*=)|(?=/?>)","patterns":[{"begin":"(?=[^/<=>`\\\\s]|/(?!>))","end":"(?!\\\\G)","name":"meta.embedded.line.js","patterns":[{"captures":{"0":{"name":"source.js"},"1":{"patterns":[{"include":"source.js"}]}},"match":"(([^\\"\'/<=>`\\\\s]|/(?!>))+)","name":"string.unquoted.html"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"source.js","end":"(\\")","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"},"1":{"name":"source.js"}},"name":"string.quoted.double.html","patterns":[{"captures":{"0":{"patterns":[{"include":"source.js"}]}},"match":"([^\\\\n\\"/]|/(?![*/]))+"},{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.js"}},"end":"(?=\\")|\\\\n","name":"comment.line.double-slash.js"},{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.js"}},"end":"(?=\\")|\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.js"}},"name":"comment.block.js"}]},{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"source.js","end":"(\')","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"},"1":{"name":"source.js"}},"name":"string.quoted.single.html","patterns":[{"captures":{"0":{"patterns":[{"include":"source.js"}]}},"match":"([^\\\\n\'/]|/(?![*/]))+"},{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.js"}},"end":"(?=\')|\\\\n","name":"comment.line.double-slash.js"},{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.js"}},"end":"(?=\')|\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.js"}},"name":"comment.block.js"}]}]},{"match":"=","name":"invalid.illegal.unexpected-equals-sign.html"}]}]},{"begin":"(data-[-a-z]+)(?![-:\\\\w])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.data-x.$1.html","patterns":[{"include":"#attribute-interior"}]},{"begin":"(align|bgcolor|border)(?![-:\\\\w])","beginCaptures":{"0":{"name":"invalid.deprecated.entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.$1.html","patterns":[{"include":"#attribute-interior"}]},{"begin":"([^\\\\x00- \\"\'/<=>\\\\x7F-\\\\x{9F}﷐-﷯￾￿🿾🿿𯿾𯿿𿿾𿿿\\\\x{4FFFE}\\\\x{4FFFF}\\\\x{5FFFE}\\\\x{5FFFF}\\\\x{6FFFE}\\\\x{6FFFF}\\\\x{7FFFE}\\\\x{7FFFF}\\\\x{8FFFE}\\\\x{8FFFF}\\\\x{9FFFE}\\\\x{9FFFF}\\\\x{AFFFE}\\\\x{AFFFF}\\\\x{BFFFE}\\\\x{BFFFF}\\\\x{CFFFE}\\\\x{CFFFF}\\\\x{DFFFE}\\\\x{DFFFF}\\\\x{EFFFE}\\\\x{EFFFF}\\\\x{FFFFE}\\\\x{FFFFF}\\\\x{10FFFE}\\\\x{10FFFF}]+)","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.unrecognized.$1.html","patterns":[{"include":"#attribute-interior"}]},{"match":"[^>\\\\s]+","name":"invalid.illegal.character-not-allowed-here.html"}]},"attribute-interior":{"patterns":[{"begin":"=","beginCaptures":{"0":{"name":"punctuation.separator.key-value.html"}},"end":"(?<=[^=\\\\s])(?!\\\\s*=)|(?=/?>)","patterns":[{"match":"([^\\"\'/<=>`\\\\s]|/(?!>))+","name":"string.unquoted.html"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.double.html","patterns":[{"include":"#entities"}]},{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"\'","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.single.html","patterns":[{"include":"#entities"}]},{"match":"=","name":"invalid.illegal.unexpected-equals-sign.html"}]}]},"cdata":{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.tag.begin.html"}},"contentName":"string.other.inline-data.html","end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.cdata.html"},"comment":{"begin":"\x3c!--","captures":{"0":{"name":"punctuation.definition.comment.html"}},"end":"--\x3e","name":"comment.block.html","patterns":[{"match":"\\\\G-?>","name":"invalid.illegal.characters-not-allowed-here.html"},{"match":"<!-(?:-(?!>)|(?=--\x3e))","name":"invalid.illegal.characters-not-allowed-here.html"},{"match":"--!>","name":"invalid.illegal.characters-not-allowed-here.html"}]},"core-minus-invalid":{"patterns":[{"include":"#xml-processing"},{"include":"#comment"},{"include":"#doctype"},{"include":"#cdata"},{"include":"#tags-valid"},{"include":"#entities"}]},"doctype":{"begin":"<!(?=(?i:DOCTYPE\\\\s))","beginCaptures":{"0":{"name":"punctuation.definition.tag.begin.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.doctype.html","patterns":[{"match":"\\\\G(?i:DOCTYPE)","name":"entity.name.tag.html"},{"begin":"\\"","end":"\\"","name":"string.quoted.double.html"},{"match":"[^>\\\\s]+","name":"entity.other.attribute-name.html"}]},"entities":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.entity.html"},"912":{"name":"punctuation.definition.entity.html"}},"match":"(&)(?=[A-Za-z])((a(s(ymp(eq)?|cr|t)|n(d(slope|[dv]|and)?|g(s(t|ph)|zarr|e|le|rt(vb(d)?)?|msd(a([a-h]))?)?)|c(y|irc|d|ute|E)?|tilde|o(pf|gon)|uml|p(id|os|prox(eq)?|[Ee]|acir)?|elig|f(r)?|w((?:con|)int)|l(pha|e(ph|fsym))|acute|ring|grave|m(p|a(cr|lg))|breve)|A(s(sign|cr)|nd|MP|c(y|irc)|tilde|o(pf|gon)|uml|pplyFunction|fr|Elig|lpha|acute|ring|grave|macr|breve))|(B(scr|cy|opf|umpeq|e(cause|ta|rnoullis)|fr|a(ckslash|r(v|wed))|reve)|b(s(cr|im(e)?|ol(hsub|b)?|emi)|n(ot|e(quiv)?)|c(y|ong)|ig(s(tar|qcup)|c(irc|up|ap)|triangle(down|up)|o(times|dot|plus)|uplus|vee|wedge)|o(t(tom)?|pf|wtie|x(h([DUdu])?|times|H([DUdu])?|d([LRlr])|u([LRlr])|plus|D([LRlr])|v([HLRhlr])?|U([LRlr])|V([HLRhlr])?|minus|box))|Not|dquo|u(ll(et)?|mp(e(q)?|E)?)|prime|e(caus(e)?|t(h|ween|a)|psi|rnou|mptyv)|karow|fr|l(ock|k(1([24])|34)|a(nk|ck(square|triangle(down|left|right)?|lozenge)))|a(ck(sim(eq)?|cong|prime|epsilon)|r(vee|wed(ge)?))|r(eve|vbar)|brk(tbrk)?))|(c(s(cr|u(p(e)?|b(e)?))|h(cy|i|eck(mark)?)|ylcty|c(irc|ups(sm)?|edil|a(ps|ron))|tdot|ir(scir|c(eq|le(d(R|circ|S|dash|ast)|arrow(left|right)))?|e|fnint|E|mid)?|o(n(int|g(dot)?)|p(y(sr)?|f|rod)|lon(e(q)?)?|m(p(fn|le(xes|ment))?|ma(t)?))|dot|u(darr([lr])|p(s|c([au]p)|or|dot|brcap)?|e(sc|pr)|vee|wed|larr(p)?|r(vearrow(left|right)|ly(eq(succ|prec)|vee|wedge)|arr(m)?|ren))|e(nt(erdot)?|dil|mptyv)|fr|w((?:con|)int)|lubs(uit)?|a(cute|p(s|c([au]p)|dot|and|brcup)?|r(on|et))|r(oss|arr))|C(scr|hi|c(irc|onint|edil|aron)|ircle(Minus|Times|Dot|Plus)|Hcy|o(n(tourIntegral|int|gruent)|unterClockwiseContourIntegral|p(f|roduct)|lon(e)?)|dot|up(Cap)?|OPY|e(nterDot|dilla)|fr|lo(seCurly((?:Double|)Quote)|ckwiseContourIntegral)|a(yleys|cute|p(italDifferentialD)?)|ross))|(d(s(c([ry])|trok|ol)|har([lr])|c(y|aron)|t(dot|ri(f)?)|i(sin|e|v(ide(ontimes)?|onx)?|am(s|ond(suit)?)?|gamma)|Har|z(cy|igrarr)|o(t(square|plus|eq(dot)?|minus)?|ublebarwedge|pf|wn(harpoon(left|right)|downarrows|arrow)|llar)|d(otseq|a(rr|gger))?|u(har|arr)|jcy|e(lta|g|mptyv)|f(isht|r)|wangle|lc(orn|rop)|a(sh(v)?|leth|rr|gger)|r(c(orn|rop)|bkarow)|b(karow|lac)|Arr)|D(s(cr|trok)|c(y|aron)|Scy|i(fferentialD|a(critical(Grave|Tilde|Do(t|ubleAcute)|Acute)|mond))|o(t(Dot|Equal)?|uble(Right(Tee|Arrow)|ContourIntegral|Do(t|wnArrow)|Up((?:Down|)Arrow)|VerticalBar|L(ong(RightArrow|Left((?:Right|)Arrow))|eft(RightArrow|Tee|Arrow)))|pf|wn(Right(TeeVector|Vector(Bar)?)|Breve|Tee(Arrow)?|arrow|Left(RightVector|TeeVector|Vector(Bar)?)|Arrow(Bar|UpArrow)?))|Zcy|el(ta)?|D(otrahd)?|Jcy|fr|a(shv|rr|gger)))|(e(s(cr|im|dot)|n(sp|g)|c(y|ir(c)?|olon|aron)|t([ah])|o(pf|gon)|dot|u(ro|ml)|p(si(v|lon)?|lus|ar(sl)?)|e|D(D??ot)|q(s(im|lant(less|gtr))|c(irc|olon)|u(iv(DD)?|est|als)|vparsl)|f(Dot|r)|l(s(dot)?|inters|l)?|a(ster|cute)|r(Dot|arr)|g(s(dot)?|rave)?|x(cl|ist|p(onentiale|ectation))|m(sp(1([34]))?|pty(set|v)?|acr))|E(s(cr|im)|c(y|irc|aron)|ta|o(pf|gon)|NG|dot|uml|TH|psilon|qu(ilibrium|al(Tilde)?)|fr|lement|acute|grave|x(ists|ponentialE)|m(pty((?:|Very)SmallSquare)|acr)))|(f(scr|nof|cy|ilig|o(pf|r(k(v)?|all))|jlig|partint|emale|f(ilig|l(l??ig)|r)|l(tns|lig|at)|allingdotseq|r(own|a(sl|c(1([2-68])|78|2([35])|3([458])|45|5([68])))))|F(scr|cy|illed((?:|Very)SmallSquare)|o(uriertrf|pf|rAll)|fr))|(G(scr|c(y|irc|edil)|t|opf|dot|T|Jcy|fr|amma(d)?|reater(Greater|SlantEqual|Tilde|Equal(Less)?|FullEqual|Less)|g|breve)|g(s(cr|im([el])?)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|irc)|t(c(c|ir)|dot|quest|lPar|r(sim|dot|eq(q?less)|less|a(pprox|rr)))?|imel|opf|dot|jcy|e(s(cc|dot(o(l)?)?|l(es)?)?|q(slant|q)?|l)?|v(nE|ertneqq)|fr|E(l)?|l([Eaj])?|a(cute|p|mma(d)?)|rave|g(g)?|breve))|(h(s(cr|trok|lash)|y(phen|bull)|circ|o(ok((?:lef|righ)tarrow)|pf|arr|rbar|mtht)|e(llip|arts(uit)?|rcon)|ks([ew]arow)|fr|a(irsp|lf|r(dcy|r(cir|w)?)|milt)|bar|Arr)|H(s(cr|trok)|circ|ilbertSpace|o(pf|rizontalLine)|ump(DownHump|Equal)|fr|a(cek|t)|ARDcy))|(i(s(cr|in(s(v)?|dot|[Ev])?)|n(care|t(cal|prod|e(rcal|gers)|larhk)?|odot|fin(tie)?)?|c(y|irc)?|t(ilde)?|i(nfin|i(i??nt)|ota)?|o(cy|ta|pf|gon)|u(kcy|ml)|jlig|prod|e(cy|xcl)|quest|f([fr])|acute|grave|m(of|ped|a(cr|th|g(part|e|line))))|I(scr|n(t(e(rsection|gral))?|visible(Comma|Times))|c(y|irc)|tilde|o(ta|pf|gon)|dot|u(kcy|ml)|Ocy|Jlig|fr|Ecy|acute|grave|m(plies|a(cr|ginaryI))?))|(j(s(cr|ercy)|c(y|irc)|opf|ukcy|fr|math)|J(s(cr|ercy)|c(y|irc)|opf|ukcy|fr))|(k(scr|hcy|c(y|edil)|opf|jcy|fr|appa(v)?|green)|K(scr|c(y|edil)|Hcy|opf|Jcy|fr|appa))|(l(s(h|cr|trok|im([eg])?|q(uo(r)?|b)|aquo)|h(ar(d|u(l)?)|blk)|n(sim|e(q(q)?)?|E|ap(prox)?)|c(y|ub|e(d??il)|aron)|Barr|t(hree|c(c|ir)|imes|dot|quest|larr|r(i([ef])?|Par))?|Har|o(ng(left((?:|right)arrow)|rightarrow|mapsto)|times|z(enge|f)?|oparrow(left|right)|p(f|lus|ar)|w(ast|bar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|r((?:d|us)har))|ur((?:ds|u)har)|jcy|par(lt)?|e(s(s(sim|dot|eq(q?gtr)|approx|gtr)|cc|dot(o(r)?)?|g(es)?)?|q(slant|q)?|ft(harpoon(down|up)|threetimes|leftarrows|arrow(tail)?|right(squigarrow|harpoons|arrow(s)?))|g)?|v(nE|ertneqq)|f(isht|loor|r)|E(g)?|l(hard|corner|tri|arr)?|a(ng(d|le)?|cute|t(e(s)?|ail)?|p|emptyv|quo|rr(sim|hk|tl|pl|fs|lp|b(fs)?)?|gran|mbda)|r(har(d)?|corner|tri|arr|m)|g(E)?|m(idot|oust(ache)?)|b(arr|r(k(sl([du])|e)|ac([ek]))|brk)|A(tail|arr|rr))|L(s(h|cr|trok)|c(y|edil|aron)|t|o(ng(RightArrow|left((?:|right)arrow)|rightarrow|Left((?:Right|)Arrow))|pf|wer((?:Righ|Lef)tArrow))|T|e(ss(Greater|SlantEqual|Tilde|EqualGreater|FullEqual|Less)|ft(Right(Vector|Arrow)|Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|rightarrow|Floor|A(ngleBracket|rrow(RightArrow|Bar)?)))|Jcy|fr|l(eftarrow)?|a(ng|cute|placetrf|rr|mbda)|midot))|(M(scr|cy|inusPlus|opf|u|e(diumSpace|llintrf)|fr|ap)|m(s(cr|tpos)|ho|nplus|c(y|omma)|i(nus(d(u)?|b)?|cro|d(cir|dot|ast)?)|o(dels|pf)|dash|u((?:lti|)map)?|p|easuredangle|DDot|fr|l(cp|dr)|a(cr|p(sto(down|up|left)?)?|l(t(ese)?|e)|rker)))|(n(s(hort(parallel|mid)|c(cue|[er])?|im(e(q)?)?|u(cc(eq)?|p(set(eq(q)?)?|[Ee])?|b(set(eq(q)?)?|[Ee])?)|par|qsu([bp]e)|mid)|Rightarrow|h(par|arr|Arr)|G(t(v)?|g)|c(y|ong(dot)?|up|edil|a(p|ron))|t(ilde|lg|riangle(left(eq)?|right(eq)?)|gl)|i(s(d)?|v)?|o(t(ni(v([abc]))?|in(dot|v([abc])|E)?)?|pf)|dash|u(m(sp|ero)?)?|jcy|p(olint|ar(sl|t|allel)?|r(cue|e(c(eq)?)?)?)|e(s(im|ear)|dot|quiv|ar(hk|r(ow)?)|xist(s)?|Arr)?|v(sim|infin|Harr|dash|Dash|l(t(rie)?|e|Arr)|ap|r(trie|Arr)|g([et]))|fr|w(near|ar(hk|r(ow)?)|Arr)|V([Dd]ash)|l(sim|t(ri(e)?)?|dr|e(s(s)?|q(slant|q)?|ft((?:|right)arrow))?|E|arr|Arr)|a(ng|cute|tur(al(s)?)?|p(id|os|prox|E)?|bla)|r(tri(e)?|ightarrow|arr([cw])?|Arr)|g(sim|t(r)?|e(s|q(slant|q)?)?|E)|mid|L(t(v)?|eft((?:|right)arrow)|l)|b(sp|ump(e)?))|N(scr|c(y|edil|aron)|tilde|o(nBreakingSpace|Break|t(R(ightTriangle(Bar|Equal)?|everseElement)|Greater(Greater|SlantEqual|Tilde|Equal|FullEqual|Less)?|S(u(cceeds(SlantEqual|Tilde|Equal)?|perset(Equal)?|bset(Equal)?)|quareSu(perset(Equal)?|bset(Equal)?))|Hump(DownHump|Equal)|Nested(GreaterGreater|LessLess)|C(ongruent|upCap)|Tilde(Tilde|Equal|FullEqual)?|DoubleVerticalBar|Precedes((?:Slant|)Equal)?|E(qual(Tilde)?|lement|xists)|VerticalBar|Le(ss(Greater|SlantEqual|Tilde|Equal|Less)?|ftTriangle(Bar|Equal)?))?|pf)|u|e(sted(GreaterGreater|LessLess)|wLine|gative(MediumSpace|Thi((?:n|ck)Space)|VeryThinSpace))|Jcy|fr|acute))|(o(s(cr|ol|lash)|h(m|bar)|c(y|ir(c)?)|ti(lde|mes(as)?)|S|int|opf|d(sold|iv|ot|ash|blac)|uml|p(erp|lus|ar)|elig|vbar|f(cir|r)|l(c(ir|ross)|t|ine|arr)|a(st|cute)|r(slope|igof|or|d(er(of)?|[fm])?|v|arr)?|g(t|on|rave)|m(i(nus|cron|d)|ega|acr))|O(s(cr|lash)|c(y|irc)|ti(lde|mes)|opf|dblac|uml|penCurly((?:Double|)Quote)|ver(B(ar|rac(e|ket))|Parenthesis)|fr|Elig|acute|r|grave|m(icron|ega|acr)))|(p(s(cr|i)|h(i(v)?|one|mmat)|cy|i(tchfork|v)?|o(intint|und|pf)|uncsp|er(cnt|tenk|iod|p|mil)|fr|l(us(sim|cir|two|d([ou])|e|acir|mn|b)?|an(ck(h)?|kv))|ar(s(im|l)|t|a(llel)?)?|r(sim|n(sim|E|ap)|cue|ime(s)?|o(d|p(to)?|f(surf|line|alar))|urel|e(c(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?)?|E|ap)?|m)|P(s(cr|i)|hi|cy|i|o(incareplane|pf)|fr|lusMinus|artialD|r(ime|o(duct|portion(al)?)|ecedes(SlantEqual|Tilde|Equal)?)?))|(q(scr|int|opf|u(ot|est(eq)?|at(int|ernions))|prime|fr)|Q(scr|opf|UOT|fr))|(R(s(h|cr)|ho|c(y|edil|aron)|Barr|ight(Ceiling|T(ee(Vector|Arrow)?|riangle(Bar|Equal)?)|Do(ubleBracket|wn(TeeVector|Vector(Bar)?))|Up(TeeVector|DownVector|Vector(Bar)?)|Vector(Bar)?|arrow|Floor|A(ngleBracket|rrow(Bar|LeftArrow)?))|o(undImplies|pf)|uleDelayed|e(verse(UpEquilibrium|E(quilibrium|lement)))?|fr|EG|a(ng|cute|rr(tl)?)|rightarrow)|r(s(h|cr|q(uo(r)?|b)|aquo)|h(o(v)?|ar(d|u(l)?))|nmid|c(y|ub|e(d??il)|aron)|Barr|t(hree|imes|ri([ef]|ltri)?)|i(singdotseq|ng|ght(squigarrow|harpoon(down|up)|threetimes|left(harpoons|arrows)|arrow(tail)?|rightarrows))|Har|o(times|p(f|lus|ar)|a(ng|rr)|brk)|d(sh|ca|quo(r)?|ldhar)|uluhar|p(polint|ar(gt)?)|e(ct|al(s|ine|part)?|g)|f(isht|loor|r)|l(har|arr|m)|a(ng([de]|le)?|c(ute|e)|t(io(nals)?|ail)|dic|emptyv|quo|rr(sim|hk|c|tl|pl|fs|w|lp|ap|b(fs)?)?)|rarr|x|moust(ache)?|b(arr|r(k(sl([du])|e)|ac([ek]))|brk)|A(tail|arr|rr)))|(s(s(cr|tarf|etmn|mile)|h(y|c(hcy|y)|ort(parallel|mid)|arp)|c(sim|y|n(sim|E|ap)|cue|irc|polint|e(dil)?|E|a(p|ron))?|t(ar(f)?|r(ns|aight(phi|epsilon)))|i(gma([fv])?|m(ne|dot|plus|e(q)?|l(E)?|rarr|g(E)?)?)|zlig|o(pf|ftcy|l(b(ar)?)?)|dot([be])?|u(ng|cc(sim|n(sim|eqq|approx)|curlyeq|eq|approx)?|p(s(im|u([bp])|et(neq(q)?|eq(q)?)?)|hs(ol|ub)|1|n([Ee])|2|d(sub|ot)|3|plus|e(dot)?|E|larr|mult)?|m|b(s(im|u([bp])|et(neq(q)?|eq(q)?)?)|n([Ee])|dot|plus|e(dot)?|E|rarr|mult)?)|pa(des(uit)?|r)|e(swar|ct|tm(n|inus)|ar(hk|r(ow)?)|xt|mi|Arr)|q(su(p(set(eq)?|e)?|b(set(eq)?|e)?)|c(up(s)?|ap(s)?)|u(f|ar([ef]))?)|fr(own)?|w(nwar|ar(hk|r(ow)?)|Arr)|larr|acute|rarr|m(t(e(s)?)?|i(d|le)|eparsl|a(shp|llsetminus))|bquo)|S(scr|hort((?:Right|Down|Up|Left)Arrow)|c(y|irc|edil|aron)?|tar|igma|H(cy|CHcy)|opf|u(c(hThat|ceeds(SlantEqual|Tilde|Equal)?)|p(set|erset(Equal)?)?|m|b(set(Equal)?)?)|OFTcy|q(uare(Su(perset(Equal)?|bset(Equal)?)|Intersection|Union)?|rt)|fr|acute|mallCircle))|(t(s(hcy|c([ry])|trok)|h(i(nsp|ck(sim|approx))|orn|e(ta(sym|v)?|re(4|fore))|k(sim|ap))|c(y|edil|aron)|i(nt|lde|mes(d|b(ar)?)?)|o(sa|p(cir|f(ork)?|bot)?|ea)|dot|prime|elrec|fr|w(ixt|ohead((?:lef|righ)tarrow))|a(u|rget)|r(i(sb|time|dot|plus|e|angle(down|q|left(eq)?|right(eq)?)?|minus)|pezium|ade)|brk)|T(s(cr|trok)|RADE|h(i((?:n|ck)Space)|e(ta|refore))|c(y|edil|aron)|S(H??cy)|ilde(Tilde|Equal|FullEqual)?|HORN|opf|fr|a([bu])|ripleDot))|(u(scr|h(ar([lr])|blk)|c(y|irc)|t(ilde|dot|ri(f)?)|Har|o(pf|gon)|d(har|arr|blac)|u(arr|ml)|p(si(h|lon)?|harpoon(left|right)|downarrow|uparrows|lus|arrow)|f(isht|r)|wangle|l(c(orn(er)?|rop)|tri)|a(cute|rr)|r(c(orn(er)?|rop)|tri|ing)|grave|m(l|acr)|br(cy|eve)|Arr)|U(scr|n(ion(Plus)?|der(B(ar|rac(e|ket))|Parenthesis))|c(y|irc)|tilde|o(pf|gon)|dblac|uml|p(si(lon)?|downarrow|Tee(Arrow)?|per((?:Righ|Lef)tArrow)|DownArrow|Equilibrium|arrow|Arrow(Bar|DownArrow)?)|fr|a(cute|rr(ocir)?)|ring|grave|macr|br(cy|eve)))|(v(s(cr|u(pn([Ee])|bn([Ee])))|nsu([bp])|cy|Bar(v)?|zigzag|opf|dash|prop|e(e(eq|bar)?|llip|r(t|bar))|Dash|fr|ltri|a(ngrt|r(s(igma|u(psetneq(q)?|bsetneq(q)?))|nothing|t(heta|riangle(left|right))|p(hi|i|ropto)|epsilon|kappa|r(ho)?))|rtri|Arr)|V(scr|cy|opf|dash(l)?|e(e|r(yThinSpace|t(ical(Bar|Separator|Tilde|Line))?|bar))|Dash|vdash|fr|bar))|(w(scr|circ|opf|p|e(ierp|d(ge(q)?|bar))|fr|r(eath)?)|W(scr|circ|opf|edge|fr))|(X(scr|i|opf|fr)|x(s(cr|qcup)|h([Aa]rr)|nis|c(irc|up|ap)|i|o(time|dot|p(f|lus))|dtri|u(tri|plus)|vee|fr|wedge|l([Aa]rr)|r([Aa]rr)|map))|(y(scr|c(y|irc)|icy|opf|u(cy|ml)|en|fr|ac(y|ute))|Y(scr|c(y|irc)|opf|uml|Icy|Ucy|fr|acute|Acy))|(z(scr|hcy|c(y|aron)|igrarr|opf|dot|e(ta|etrf)|fr|w(n?j)|acute)|Z(scr|c(y|aron)|Hcy|opf|dot|e(ta|roWidthSpace)|fr|acute)))(;)","name":"constant.character.entity.named.$2.html"},{"captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}},"match":"(&)#[0-9]+(;)","name":"constant.character.entity.numeric.decimal.html"},{"captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}},"match":"(&)#[Xx]\\\\h+(;)","name":"constant.character.entity.numeric.hexadecimal.html"},{"match":"&(?=[0-9A-Za-z]+;)","name":"invalid.illegal.ambiguous-ampersand.html"}]},"math":{"patterns":[{"begin":"(?i)(<)(math)(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.structure.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)(\\\\2)\\\\s*(>)","endCaptures":{"0":{"name":"meta.tag.structure.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.structure.$2.html","patterns":[{"begin":"(?<!>)\\\\G","end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]}],"repository":{"attribute":{"patterns":[{"begin":"(s(hift|ymmetric|cript(sizemultiplier|level|minsize)|t(ackalign|retchy)|ide|u([bp]scriptshift)|e(parator(s)?|lection)|rc)|h(eight|ref)|n(otation|umalign)|c(haralign|olumn(spa(n|cing)|width|lines|align)|lose|rossout)|i(n(dent(shift(first|last)?|target|align(first|last)?)|fixlinebreakstyle)|d)|o(pen|verflow)|d(i(splay(style)?|r)|e(nomalign|cimalpoint|pth))|position|e(dge|qual(columns|rows))|voffset|f(orm|ence|rame(spacing)?)|width|l(space|ine(thickness|leading|break(style|multchar)?)|o(ngdivstyle|cation)|ength|quote|argeop)|a(c(cent(under)?|tiontype)|l(t(text|img(-(height|valign|width))?)|ign(mentscope)?))|r(space|ow(spa(n|cing)|lines|align)|quote)|groupalign|x(link:href|mlns)|m(in(size|labelspacing)|ovablelimits|a(th(size|color|variant|background)|xsize))|bevelled)(?![-:\\\\w])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.$1.html","patterns":[{"include":"#attribute-interior"}]},{"begin":"([^\\\\x00- \\"\'/<=>\\\\x7F-\\\\x{9F}﷐-﷯￾￿🿾🿿𯿾𯿿𿿾𿿿\\\\x{4FFFE}\\\\x{4FFFF}\\\\x{5FFFE}\\\\x{5FFFF}\\\\x{6FFFE}\\\\x{6FFFF}\\\\x{7FFFE}\\\\x{7FFFF}\\\\x{8FFFE}\\\\x{8FFFF}\\\\x{9FFFE}\\\\x{9FFFF}\\\\x{AFFFE}\\\\x{AFFFF}\\\\x{BFFFE}\\\\x{BFFFF}\\\\x{CFFFE}\\\\x{CFFFF}\\\\x{DFFFE}\\\\x{DFFFF}\\\\x{EFFFE}\\\\x{EFFFF}\\\\x{FFFFE}\\\\x{FFFFF}\\\\x{10FFFE}\\\\x{10FFFF}]+)","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.unrecognized.$1.html","patterns":[{"include":"#attribute-interior"}]},{"match":"[^>\\\\s]+","name":"invalid.illegal.character-not-allowed-here.html"}]},"tags":{"patterns":[{"include":"#comment"},{"include":"#cdata"},{"captures":{"0":{"name":"meta.tag.structure.math.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(annotation|annotation-xml|semantics|menclose|merror|mfenced|mfrac|mpadded|mphantom|mroot|mrow|msqrt|mstyle|mmultiscripts|mover|mprescripts|msub|msubsup|msup|munder|munderover|none|mlabeledtr|mtable|mtd|mtr|mlongdiv|mscarries|mscarry|msgroup|msline|msrow|mstack|maction)(?=\\\\s|/?>)(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(/>)","name":"meta.element.structure.math.$2.html"},{"begin":"(?i)(<)(annotation|annotation-xml|semantics|menclose|merror|mfenced|mfrac|mpadded|mphantom|mroot|mrow|msqrt|mstyle|mmultiscripts|mover|mprescripts|msub|msubsup|msup|munder|munderover|none|mlabeledtr|mtable|mtd|mtr|mlongdiv|mscarries|mscarry|msgroup|msline|msrow|mstack|maction)(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.structure.math.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)(\\\\2)\\\\s*(>)|(/>)|(?=</\\\\w+)","endCaptures":{"0":{"name":"meta.tag.structure.math.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"},"4":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.structure.math.$2.html","patterns":[{"begin":"(?<!>)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.inline.math.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(m(?:[inos]|space|text|aligngroup|alignmark))(?=\\\\s|/?>)(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(/>)","name":"meta.element.inline.math.$2.html"},{"begin":"(?i)(<)(m(?:[inos]|space|text|aligngroup|alignmark))(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.inline.math.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)(\\\\2)\\\\s*(>)|(/>)|(?=</\\\\w+)","endCaptures":{"0":{"name":"meta.tag.inline.math.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"},"4":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.inline.math.$2.html","patterns":[{"begin":"(?<!>)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.object.math.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(mglyph)(?=\\\\s|/?>)(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(/>)","name":"meta.element.object.math.$2.html"},{"begin":"(?i)(<)(mglyph)(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.object.math.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)(\\\\2)\\\\s*(>)|(/>)|(?=</\\\\w+)","endCaptures":{"0":{"name":"meta.tag.object.math.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"},"4":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.object.math.$2.html","patterns":[{"begin":"(?<!>)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.other.invalid.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.unrecognized-tag.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(([:\\\\w]+))(?=\\\\s|/?>)(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(/>)","name":"meta.element.other.invalid.html"},{"begin":"(?i)(<)((\\\\w[^>\\\\s]*))(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.other.invalid.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.unrecognized-tag.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)((\\\\2))\\\\s*(>)|(/>)|(?=</\\\\w+)","endCaptures":{"0":{"name":"meta.tag.other.invalid.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.unrecognized-tag.html"},"4":{"name":"punctuation.definition.tag.end.html"},"5":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.other.invalid.html","patterns":[{"begin":"(?<!>)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.invalid.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"include":"#tags-invalid"}]}}},"svg":{"patterns":[{"begin":"(?i)(<)(svg)(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.structure.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)(\\\\2)\\\\s*(>)","endCaptures":{"0":{"name":"meta.tag.structure.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.structure.$2.html","patterns":[{"begin":"(?<!>)\\\\G","end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]}],"repository":{"attribute":{"patterns":[{"begin":"(s(hape-rendering|ystemLanguage|cale|t(yle|itchTiles|op-(color|opacity)|dDeviation|em([hv])|artOffset|r(i(ng|kethrough-(thickness|position))|oke(-(opacity|dash(offset|array)|width|line(cap|join)|miterlimit))?))|urfaceScale|p(e(cular(Constant|Exponent)|ed)|acing|readMethod)|eed|lope)|h(oriz-(origin-x|adv-x)|eight|anging|ref(lang)?)|y([12]|ChannelSelector)?|n(umOctaves|ame)|c(y|o(ntentS((?:cript|tyle)Type)|lor(-(interpolation(-filters)?|profile|rendering))?)|ursor|l(ip(-(path|rule)|PathUnits)?|ass)|a(p-height|lcMode)|x)|t(ype|o|ext(-(decoration|anchor|rendering)|Length)|a(rget([XY])?|b(index|leValues))|ransform)|i(n(tercept|2)?|d(eographic)?|mage-rendering)|z(oomAndPan)?|o(p(erator|acity)|ver(flow|line-(thickness|position))|ffset|r(i(ent(ation)?|gin)|der))|d(y|i(splay|visor|ffuseConstant|rection)|ominant-baseline|ur|e(scent|celerate)|x)?|u(1|n(i(code(-(range|bidi))?|ts-per-em)|derline-(thickness|position))|2)|p(ing|oint(s(At([XYZ]))?|er-events)|a(nose-1|t(h(Length)?|tern(ContentUnits|Transform|Units))|int-order)|r(imitiveUnits|eserveA(spectRatio|lpha)))|e(n(d|able-background)|dgeMode|levation|x(ternalResourcesRequired|ponent))|v(i(sibility|ew(Box|Target))|-(hanging|ideographic|alphabetic|mathematical)|e(ctor-effect|r(sion|t-(origin-([xy])|adv-y)))|alues)|k([123]|e(y(Splines|Times|Points)|rn(ing|el(Matrix|UnitLength)))|4)?|f(y|il(ter(Res|Units)?|l(-(opacity|rule))?)|o(nt-(s(t(yle|retch)|ize(-adjust)?)|variant|family|weight)|rmat)|lood-(color|opacity)|r(om)?|x)|w(idth(s)?|ord-spacing|riting-mode)|l(i(ghting-color|mitingConeAngle)|ocal|e(ngthAdjust|tter-spacing)|ang)|a(scent|cc(umulate|ent-height)|ttribute(Name|Type)|zimuth|dditive|utoReverse|l(ignment-baseline|phabetic|lowReorder)|rabic-form|mplitude)|r(y|otate|e(s(tart|ult)|ndering-intent|peat(Count|Dur)|quired(Extensions|Features)|f([XY]|errerPolicy)|l)|adius|x)?|g([12]|lyph(Ref|-(name|orientation-(horizontal|vertical)))|radient(Transform|Units))|x([12]|ChannelSelector|-height|link:(show|href|t(ype|itle)|a(ctuate|rcrole)|role)|ml:(space|lang|base))?|m(in|ode|e(thod|dia)|a(sk((?:Content|)Units)?|thematical|rker(Height|-(start|end|mid)|Units|Width)|x))|b(y|ias|egin|ase(Profile|line-shift|Frequency)|box))(?![-:\\\\w])","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.$1.html","patterns":[{"include":"#attribute-interior"}]},{"begin":"([^\\\\x00- \\"\'/<=>\\\\x7F-\\\\x{9F}﷐-﷯￾￿🿾🿿𯿾𯿿𿿾𿿿\\\\x{4FFFE}\\\\x{4FFFF}\\\\x{5FFFE}\\\\x{5FFFF}\\\\x{6FFFE}\\\\x{6FFFF}\\\\x{7FFFE}\\\\x{7FFFF}\\\\x{8FFFE}\\\\x{8FFFF}\\\\x{9FFFE}\\\\x{9FFFF}\\\\x{AFFFE}\\\\x{AFFFF}\\\\x{BFFFE}\\\\x{BFFFF}\\\\x{CFFFE}\\\\x{CFFFF}\\\\x{DFFFE}\\\\x{DFFFF}\\\\x{EFFFE}\\\\x{EFFFF}\\\\x{FFFFE}\\\\x{FFFFF}\\\\x{10FFFE}\\\\x{10FFFF}]+)","beginCaptures":{"0":{"name":"entity.other.attribute-name.html"}},"end":"(?=\\\\s*+[^=\\\\s])","name":"meta.attribute.unrecognized.$1.html","patterns":[{"include":"#attribute-interior"}]},{"match":"[^>\\\\s]+","name":"invalid.illegal.character-not-allowed-here.html"}]},"tags":{"patterns":[{"include":"#comment"},{"include":"#cdata"},{"captures":{"0":{"name":"meta.tag.metadata.svg.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(color-profile|desc|metadata|script|style|title)(?=\\\\s|/?>)(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(/>)","name":"meta.element.metadata.svg.$2.html"},{"begin":"(?i)(<)(color-profile|desc|metadata|script|style|title)(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.metadata.svg.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)(\\\\2)\\\\s*(>)|(/>)|(?=</\\\\w+)","endCaptures":{"0":{"name":"meta.tag.metadata.svg.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"},"4":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.metadata.svg.$2.html","patterns":[{"begin":"(?<!>)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.structure.svg.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(animateMotion|clipPath|defs|feComponentTransfer|feDiffuseLighting|feMerge|feSpecularLighting|filter|g|hatch|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|pattern|radialGradient|switch|text|textPath)(?=\\\\s|/?>)(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(/>)","name":"meta.element.structure.svg.$2.html"},{"begin":"(?i)(<)(animateMotion|clipPath|defs|feComponentTransfer|feDiffuseLighting|feMerge|feSpecularLighting|filter|g|hatch|linearGradient|marker|mask|mesh|meshgradient|meshpatch|meshrow|pattern|radialGradient|switch|text|textPath)(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.structure.svg.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)(\\\\2)\\\\s*(>)|(/>)|(?=</\\\\w+)","endCaptures":{"0":{"name":"meta.tag.structure.svg.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"},"4":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.structure.svg.$2.html","patterns":[{"begin":"(?<!>)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.inline.svg.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(a|animate|discard|feBlend|feColorMatrix|feComposite|feConvolveMatrix|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feMergeNode|feMorphology|feOffset|fePointLight|feSpotLight|feTile|feTurbulence|hatchPath|mpath|set|solidcolor|stop|tspan)(?=\\\\s|/?>)(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(/>)","name":"meta.element.inline.svg.$2.html"},{"begin":"(?i)(<)(a|animate|discard|feBlend|feColorMatrix|feComposite|feConvolveMatrix|feDisplacementMap|feDistantLight|feDropShadow|feFlood|feFuncA|feFuncB|feFuncG|feFuncR|feGaussianBlur|feMergeNode|feMorphology|feOffset|fePointLight|feSpotLight|feTile|feTurbulence|hatchPath|mpath|set|solidcolor|stop|tspan)(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.inline.svg.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)(\\\\2)\\\\s*(>)|(/>)|(?=</\\\\w+)","endCaptures":{"0":{"name":"meta.tag.inline.svg.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"},"4":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.inline.svg.$2.html","patterns":[{"begin":"(?<!>)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.object.svg.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(circle|ellipse|feImage|foreignObject|image|line|path|polygon|polyline|rect|symbol|use|view)(?=\\\\s|/?>)(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(/>)","name":"meta.element.object.svg.$2.html"},{"begin":"(?i)(<)(a|circle|ellipse|feImage|foreignObject|image|line|path|polygon|polyline|rect|symbol|use|view)(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.object.svg.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"patterns":[{"include":"#attribute"}]},"5":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)(\\\\2)\\\\s*(>)|(/>)|(?=</\\\\w+)","endCaptures":{"0":{"name":"meta.tag.object.svg.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"},"4":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.object.svg.$2.html","patterns":[{"begin":"(?<!>)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.other.svg.$2.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)((altGlyph|altGlyphDef|altGlyphItem|animateColor|animateTransform|cursor|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|glyph|glyphRef|hkern|missing-glyph|tref|vkern))(?=\\\\s|/?>)(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(/>)","name":"meta.element.other.svg.$2.html"},{"begin":"(?i)(<)((altGlyph|altGlyphDef|altGlyphItem|animateColor|animateTransform|cursor|font|font-face|font-face-format|font-face-name|font-face-src|font-face-uri|glyph|glyphRef|hkern|missing-glyph|tref|vkern))(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.other.svg.$2.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)((\\\\2))\\\\s*(>)|(/>)|(?=</\\\\w+)","endCaptures":{"0":{"name":"meta.tag.other.svg.$2.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"},"4":{"name":"punctuation.definition.tag.end.html"},"5":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.other.svg.$2.html","patterns":[{"begin":"(?<!>)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"captures":{"0":{"name":"meta.tag.other.invalid.void.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.unrecognized-tag.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"match":"(?i)(<)(([:\\\\w]+))(?=\\\\s|/?>)(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(/>)","name":"meta.element.other.invalid.html"},{"begin":"(?i)(<)((\\\\w[^>\\\\s]*))(?=\\\\s|/?>)(?:(([^\\"\'>]|\\"[^\\"]*\\"|\'[^\']*\')*)(>))?","beginCaptures":{"0":{"name":"meta.tag.other.invalid.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.unrecognized-tag.html"},"4":{"patterns":[{"include":"#attribute"}]},"6":{"name":"punctuation.definition.tag.end.html"}},"end":"(?i)(</)((\\\\2))\\\\s*(>)|(/>)|(?=</\\\\w+)","endCaptures":{"0":{"name":"meta.tag.other.invalid.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.unrecognized-tag.html"},"4":{"name":"punctuation.definition.tag.end.html"},"5":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.element.other.invalid.html","patterns":[{"begin":"(?<!>)\\\\G","end":"(?=/>)|>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.invalid.start.html","patterns":[{"include":"#attribute"}]},{"include":"#tags"}]},{"include":"#tags-invalid"}]}}},"tags-invalid":{"patterns":[{"begin":"(</?)((\\\\w[^>\\\\s]*))(?<!/)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.unrecognized-tag.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.$2.html","patterns":[{"include":"#attribute"}]}]},"tags-valid":{"patterns":[{"begin":"(^[\\\\t ]+)?(?=<(?i:style)\\\\b(?!-))","beginCaptures":{"1":{"name":"punctuation.whitespace.embedded.leading.html"}},"end":"(?!\\\\G)([\\\\t ]*$\\\\n?)?","endCaptures":{"1":{"name":"punctuation.whitespace.embedded.trailing.html"}},"patterns":[{"begin":"(?i)(<)(style)(?=\\\\s|/?>)","beginCaptures":{"0":{"name":"meta.tag.metadata.style.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"(?i)((<)/)(style)\\\\s*(>)","endCaptures":{"0":{"name":"meta.tag.metadata.style.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"source.css-ignored-vscode"},"3":{"name":"entity.name.tag.html"},"4":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.embedded.block.html","patterns":[{"begin":"\\\\G","captures":{"1":{"name":"punctuation.definition.tag.end.html"}},"end":"(>)","name":"meta.tag.metadata.style.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?!\\\\G)","end":"(?=</(?i:style))","name":"source.css","patterns":[{"include":"source.css"}]}]}]},{"begin":"(^[\\\\t ]+)?(?=<(?i:script)\\\\b(?!-))","beginCaptures":{"1":{"name":"punctuation.whitespace.embedded.leading.html"}},"end":"(?!\\\\G)([\\\\t ]*$\\\\n?)?","endCaptures":{"1":{"name":"punctuation.whitespace.embedded.trailing.html"}},"patterns":[{"begin":"(<)((?i:script))\\\\b","beginCaptures":{"0":{"name":"meta.tag.metadata.script.start.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"(/)((?i:script))(>)","endCaptures":{"0":{"name":"meta.tag.metadata.script.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.embedded.block.html","patterns":[{"begin":"\\\\G","end":"(?=/)","patterns":[{"begin":"(>)","beginCaptures":{"0":{"name":"meta.tag.metadata.script.start.html"},"1":{"name":"punctuation.definition.tag.end.html"}},"end":"((<))(?=/(?i:script))","endCaptures":{"0":{"name":"meta.tag.metadata.script.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"source.js-ignored-vscode"}},"patterns":[{"begin":"\\\\G","end":"(?=</(?i:script))","name":"source.js","patterns":[{"begin":"(^[\\\\t ]+)?(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.js"}},"end":"(?!\\\\G)","patterns":[{"begin":"//","beginCaptures":{"0":{"name":"punctuation.definition.comment.js"}},"end":"(?=</script)|\\\\n","name":"comment.line.double-slash.js"}]},{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.js"}},"end":"\\\\*/|(?=</script)","name":"comment.block.js"},{"include":"source.js"}]}]},{"begin":"\\\\G","end":"(?i:(?=>|type(?=[=\\\\s])(?!\\\\s*=\\\\s*(\'\'|\\"\\"|([\\"\']?)(text/(javascript(1\\\\.[0-5])?|x-javascript|jscript|livescript|(x-)?ecmascript|babel)|application/((?:(x-)?jav|(x-)?ecm)ascript)|module)[\\"\'>\\\\s]))))","name":"meta.tag.metadata.script.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i:(?=type\\\\s*=\\\\s*([\\"\']?)text/(x-handlebars|(x-(handlebars-)?|ng-)?template|html)[\\"\'>\\\\s]))","end":"((<))(?=/(?i:script))","endCaptures":{"0":{"name":"meta.tag.metadata.script.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"text.html.basic"}},"patterns":[{"begin":"\\\\G","end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.script.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?!\\\\G)","end":"(?=</(?i:script))","name":"text.html.basic","patterns":[{"include":"text.html.basic"}]}]},{"begin":"(?=(?i:type))","end":"(<)(?=/(?i:script))","endCaptures":{"0":{"name":"meta.tag.metadata.script.end.html"},"1":{"name":"punctuation.definition.tag.begin.html"}},"patterns":[{"begin":"\\\\G","end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.script.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?!\\\\G)","end":"(?=</(?i:script))","name":"source.unknown"}]}]}]}]},{"begin":"(?i)(<)(base|link|meta)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(noscript|title)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(</)(noscript|title)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(col|hr|input)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(address|article|aside|blockquote|body|button|caption|colgroup|datalist|dd|details|dialog|div|dl|dt|fieldset|figcaption|figure|footer|form|head|header|hgroup|html|h[1-6]|label|legend|li|main|map|menu|meter|nav|ol|optgroup|option|output|p|pre|progress|section|select|slot|summary|table|tbody|td|template|textarea|tfoot|th|thead|tr|ul)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(</)(address|article|aside|blockquote|body|button|caption|colgroup|datalist|dd|details|dialog|div|dl|dt|fieldset|figcaption|figure|footer|form|head|header|hgroup|html|h[1-6]|label|legend|li|main|map|menu|meter|nav|ol|optgroup|option|output|p|pre|progress|section|select|slot|summary|table|tbody|td|template|textarea|tfoot|th|thead|tr|ul)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(area|br|wbr)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(a|abbr|b|bdi|bdo|cite|code|data|del|dfn|em|i|ins|kbd|mark|q|rp|rt|ruby|s|samp|small|span|strong|sub|sup|time|u|var)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(</)(a|abbr|b|bdi|bdo|cite|code|data|del|dfn|em|i|ins|kbd|mark|q|rp|rt|ruby|s|samp|small|span|strong|sub|sup|time|u|var)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(embed|img|param|source|track)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)(audio|canvas|iframe|object|picture|video)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(</)(audio|canvas|iframe|object|picture|video)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((basefont|isindex))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.metadata.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((center|frameset|noembed|noframes))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(</)((center|frameset|noembed|noframes))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.structure.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((acronym|big|blink|font|strike|tt|xmp))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(</)((acronym|big|blink|font|strike|tt|xmp))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((frame))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.void.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((applet))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(</)((applet))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.deprecated.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.object.$2.end.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(<)((dir|keygen|listing|menuitem|plaintext|spacer))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.no-longer-supported.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.$2.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(?i)(</)((dir|keygen|listing|menuitem|plaintext|spacer))(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"},"3":{"name":"invalid.illegal.no-longer-supported.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.$2.end.html","patterns":[{"include":"#attribute"}]},{"include":"#math"},{"include":"#svg"},{"begin":"(<)([A-Za-z][.0-9A-Z_a-z·À-ÖØ-öø-ͽͿ-῿‌‍‿⁀⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-\\\\x{EFFFF}]*-[-.0-9A-Z_a-z·À-ÖØ-öø-ͽͿ-῿‌‍‿⁀⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-\\\\x{EFFFF}]*)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"/?>","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.custom.start.html","patterns":[{"include":"#attribute"}]},{"begin":"(</)([A-Za-z][.0-9A-Z_a-z·À-ÖØ-öø-ͽͿ-῿‌‍‿⁀⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-\\\\x{EFFFF}]*-[-.0-9A-Z_a-z·À-ÖØ-öø-ͽͿ-῿‌‍‿⁀⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-\\\\x{EFFFF}]*)(?=\\\\s|/?>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.custom.end.html","patterns":[{"include":"#attribute"}]}]},"xml-processing":{"begin":"(<\\\\?)(xml)","captures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.html"}},"end":"(\\\\?>)","name":"meta.tag.metadata.processing.xml.html","patterns":[{"include":"#attribute"}]}},"scopeName":"text.html.basic","embeddedLangs":["javascript","css"]}'))],a=Object.freeze(JSON.parse('{"displayName":"HTML (Derivative)","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"html-derivative","patterns":[{"include":"text.html.basic#core-minus-invalid"},{"begin":"(</?)(\\\\w[^<>\\\\s]*)(?<!/)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.unrecognized.html.derivative","patterns":[{"include":"text.html.basic#attribute"}]}],"scopeName":"text.html.derivative","embeddedLangs":["html"]}')),i=[...n,a];export{n as a,i as h};
@@ -0,0 +1 @@
1
+ const e={buttons:{edit:"Oldal szerkesztése",retryPublish:"Közzététel újrapróbálása",reloadApp:"Alkalmazás újratöltése",reload:"Újratöltés",signOut:"Kijelentkezés",review:"Áttekintés",publish:"Közzététel",back:"Vissza",backToEdition:"Vissza a szerkesztéshez",seeChanges:"Változtatások megtekintése"},headings:{directories:"Mappák",files:"Fájlok",media:"Média",pageSettings:"Oldalbeállítások"},tooltips:{toggleStudio:"Stúdió megjelenítése vagy elrejtése",unlinkEditor:"Szerkesztő és előnézet szétválasztása",linkEditor:"Szerkesztő és előnézet összekapcsolása",copiedToClipboard:"Vágólapra másolva",copyToClipboard:"Másolás a vágólapra",publishChanges:"Változtatások közzététele",backToContent:"Vissza a tartalomhoz",disableAICompletion:"AI-kiegészítés kikapcsolása",enableAICompletion:"AI-kiegészítés bekapcsolása",regenerateAIContext:"AI-környezet újragenerálása"},notifications:{error:{dismiss:"Bezárás",title:"Hiba történt",unknown:"Ismeretlen hiba történt"}},publish:{failedTitle:"Közzététel sikertelen",summary:"a(z) {repo} tároló (repo) {branch} ágán",errorTitle:"Hiba a(z) {providerName} közzététel során",failedGeneric:"Nem sikerült közzétenni a változtatásokat"},review:{title:"Változtatások áttekintése",created:"Létrehozva",updated:"Frissítve",renamed:"Átnevezve",deleted:"Törölve"},publishSuccess:{title:"Változtatások közzétéve",summary:"{count} változtatás közzétéve a(z) {repo} tároló (repo) {branch} ágán | {count} változtatás közzétéve a(z) {repo} tároló (repo) {branch} ágán",alertTitleWaiting:"Várakozás a közzétételre...",alertTitleComplete:"Közzététel befejezve",alertDescWaiting:"A weboldalt közzé kell tenni, hogy a változtatások láthatóak legyenek a Stúdióban.",alertDescComplete:"A weboldal új verziója közzé lett téve. Kérjük, frissítse az alkalmazást, hogy lássa a változtatásokat a Stúdióban."},newVersionBanner:{title:"Új weboldalverzió észlelve",description:"A weboldal új verziója közzé lett téve. Töltse újra az alkalmazást a legújabb változtatások megtekintéséhez.",reloadButton:"Újratöltés"},footer:{developer_view:"Fejlesztői nézet",localFilesystem:"Helyi fájlrendszer használata",debugMode:"Hibakeresési mód"},alert:{mdcFormatting:"Formázás alkalmazva az MDC szintaxis szabványnak megfelelően."},conflict:{title:"Ütközés észlelve",repository:"Tároló",branch:"Ág",file:"Fájl",description:"A(z) {providerName} tartalma eltér a weboldal verziójától. Győződjön meg róla, hogy a legújabb változtatások közzé lettek téve, majd frissítse az oldalt.",websiteVersion:"Weboldal"},nav:{content:"Tartalom",media:"Média",ai:"AI"},placeholders:{commitMessage:"Módosítás leírása",commitMessageWithPrefix:"Írja le a módosításokat",order:"Sorszám",fileName:"Fájlnév"},validation:{commitRequired:"A módosítás leírása kötelező",nameEmpty:"A név nem lehet üres",nameEndsWithDot:"A név nem végződhet ponttal",nameStartsWithSlash:"A név nem kezdődhet perjellel",nameExists:"A név már létezik",prefixDigitsOnly:"Az előtag csak számjegyeket tartalmazhat",prefixNonNegativeInteger:"Az előtag nem negatív egész szám lehet"},media:{altFilePreview:"Fájl előnézete",altImagePreview:"Kép előnézete",playAudio:"Hang lejátszása",audioTagNotSupported:"A böngésző nem támogatja az audio elemet.",playVideo:"Videó lejátszása",videoTagNotSupported:"A böngésző nem támogatja a videó elemet.",metaWidth:"Szélesség",metaHeight:"Magasság",metaType:"Típus",metaDuration:"Időtartam",metaSize:"Méret",fileName:"Fájlnév",publicPath:"Nyilvános útvonal",providerPath:"{providerName} útvonal",markdown:"Markdown"},aria:{openActions:"Műveletek megnyitása",cancel:"Mégse",submit:"Küldés"},actions:{confirmAction:"Kattintson újra a művelethez: {action}",verbs:{create:"létrehozás",delete:"törlés",rename:"átnevezés",upload:"feltöltés",duplicate:"másolat készítése"},labels:{createDocument:"Új fájl",createDocumentFolder:"Új mappa",createMediaFolder:"Új média mappa",renameItem:"Átnevezés",deleteItem:"Törlés",uploadMedia:"Média feltöltése",duplicateItem:"Másolat készítése",revertItem:"Változtatások visszavonása",publishBranch:"Ág közzététele",openGitProvider:"Megnyitás itt: {providerName}",switchToTipTap:"Vizuális szerkesztő használata",switchToCode:"Kódszerkesztő használata"},tooltips:{createDocument:"Új fájl létrehozása",createDocumentFolder:"Új mappa létrehozása",createMediaFolder:"Új média mappa létrehozása",renameItem:"Fájl átnevezése",deleteItem:"Fájl törlése",uploadMedia:"Média feltöltése",duplicateItem:"Fájl másolatának létrehozása",revertItem:"Változtatások visszavonása",publishBranch:"Ág közzététele"}},items:{itemCount:"1 elem | {count} elem"},monaco:{headings:{h1:"Címsor 1",h2:"Címsor 2",h3:"Címsor 3"},styles:{bold:"Félkövér",italic:"Dőlt"},lists:{bulleted:"Felsorolás",numbered:"Számozott lista"},other:{emojis:"Emojik",blockquote:"Idézetblokk",code:"Kód",inlineCode:"Sorközi kód",link:"Hivatkozás",image:"Kép"},writeSomething:"Írjon valamit",snippets:{title:"cím",item1:"Elem 1",item2:"Elem 2",language:"nyelv",code:"kód",link:"hivatkozás",alt:"alt",src:"forrás",value:"érték"},docs:{path:"Útvonal a projektben:",props:"Beállítások",slots:"Tartalmi helyek",type:"típus",required:"kötelező",default:"alapértelmezett"}},tiptap:{editor:{placeholder:"Írjon szöveget, vagy gépelje be a '/' jelet a parancsokhoz...",components:"Komponensek"},toolbar:{h1:"Címsor 1",h2:"Címsor 2",h3:"Címsor 3",h4:"Címsor 4",bulletList:"Felsorolás",orderedList:"Számozott lista",blockquote:"Idézetblokk",codeBlock:"Kódblokk",bold:"Félkövér",italic:"Dőlt",strike:"Áthúzott",code:"Kód",headings:"Címsorok"},suggestion:{style:"Stílus",paragraph:"Bekezdés",insert:"Beszúrás",image:"Kép",video:"Videó",horizontalRule:"Vízszintes vonal"},drag:{turnInto:"Átalakítás",resetFormatting:"Formázás visszaállítása",duplicate:"Másolat készítése",copyToClipboard:"Másolás a vágólapra",moveUp:"Mozgatás felfelé",moveDown:"Mozgatás lefelé",insertBefore:"Beszúrás elé",insertAfter:"Beszúrás utána",delete:"Törlés"}}},t={studio:e};export{t as default,e as studio};
@@ -1,2 +1,2 @@
1
- import{a as e}from"./main-BaiiAKHN.js";let t=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function n(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s<r;s++)t[s]=n(e[s]);return t}(e):e instanceof RegExp?e:"object"==typeof e?function(e){let t={};for(let s in e)t[s]=n(e[s]);return t}(e):e}function s(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function r(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t===e.length-1?r(e.substring(0,e.length-1)):e.substr(1+~t)}var o=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,i=class{static hasCaptures(e){return null!==e&&(o.lastIndex=0,o.test(e))}static replaceCaptures(e,t,n){return e.replace(o,(e,s,r,o)=>{let i=n[parseInt(s||r,10)];if(!i)return e;{let e=t.substring(i.start,i.end);for(;"."===e[0];)e=e.substring(1);switch(o){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function a(e,t){return e<t?-1:e>t?1:0}function c(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let s=0;s<n;s++){let n=a(e[s],t[s]);if(0!==n)return n}return 0}return n-s}function l(e){return!!/^#[0-9a-f]{6}$/i.test(e)||(!!/^#[0-9a-f]{8}$/i.test(e)||(!!/^#[0-9a-f]{3}$/i.test(e)||!!/^#[0-9a-f]{4}$/i.test(e)))}function u(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var d=class{constructor(e){this.fn=e}cache=/* @__PURE__ */new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},p=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],s=0;for(let r=0,o=t.length;r<o;r++){let e,o=t[r];if(!o.settings)continue;if("string"==typeof o.scope){let t=o.scope;t=t.replace(/^[,]+/,""),t=t.replace(/[,]+$/,""),e=t.split(",")}else e=Array.isArray(o.scope)?o.scope:[""];let i=-1;if("string"==typeof o.settings.fontStyle){i=0;let e=o.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++){switch(e[t]){case"italic":i|=1;break;case"bold":i|=2;break;case"underline":i|=4;break;case"strikethrough":i|=8}}}let a=null;"string"==typeof o.settings.foreground&&l(o.settings.foreground)&&(a=o.settings.foreground);let c=null;"string"==typeof o.settings.background&&l(o.settings.background)&&(c=o.settings.background);for(let t=0,l=e.length;t<l;t++){let o=e[t].trim().split(" "),l=o[o.length-1],u=null;o.length>1&&(u=o.slice(0,o.length-1),u.reverse()),n[s++]=new _(l,u,r,i,a,c)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{let n=a(e.scope,t.scope);return 0!==n?n:(n=c(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)});let n=0,s="#000000",r="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(s=t.foreground),null!==t.background&&(r=t.background)}let o=new b(t),i=new m(n,o.getId(s),o.getId(r)),l=new w(new S(0,null,-1,0,0),[]);for(let a=0,c=e.length;a<c;a++){let t=e[a];l.insert(0,t.scope,t.parentScopes,t.fontStyle,o.getId(t.foreground),o.getId(t.background))}return new p(o,i,l)}(e,t)}_cachedMatchRoot=new d(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>function(e,t){if(0===t.length)return!0;for(let n=0;n<t.length;n++){let s=t[n],r=!1;if(">"===s){if(n===t.length-1)return!1;s=t[++n],r=!0}for(;e&&!f(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}(e.parent,t.parentScopes));return n?new m(n.fontStyle,n.foreground,n.background):null}},g=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(const s of n)t=new e(t,s);return t}static from(...t){let n=null;for(let s=0;s<t.length;s++)n=new e(n,t[s]);return n}push(t){return new e(this,t)}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||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function f(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}var m=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};var _=class{constructor(e,t,n,s,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=o}},y=/* @__PURE__ */(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(y||{});var b=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=/* @__PURE__ */Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},k=Object.freeze([]),S=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,s,r){this.scopeDepth=e,this.parentScopes=t||k,this.fontStyle=n,this.foreground=s,this.background=r}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==s&&(this.background=s)}},w=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,s=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[s]&&s++,!(n>=e.parentScopes.length||s>=t.parentScopes.length);){const r=t.parentScopes[s].length-e.parentScopes[n].length;if(0!==r)return r;n++,s++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,s=t.indexOf(".");if(-1===s?(e=t,n=""):(e=t.substring(0,s),n=t.substring(s+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,s,r,o,i){if(""===n)return void this._doInsertHere(t,s,r,o,i);let a,c,l,u=n.indexOf(".");-1===u?(a=n,c=""):(a=n.substring(0,u),c=n.substring(u+1)),this._children.hasOwnProperty(a)?l=this._children[a]:(l=new e(this._mainRule.clone(),S.cloneArr(this._rulesWithParentScopes)),this._children[a]=l),l.insert(t+1,c,s,r,o,i)}_doInsertHere(e,t,n,s,r){if(null!==t){for(let o=0,i=this._rulesWithParentScopes.length;o<i;o++){let i=this._rulesWithParentScopes[o];if(0===c(i.parentScopes,t))return void i.acceptOverwrite(e,n,s,r)}-1===n&&(n=this._mainRule.fontStyle),0===s&&(s=this._mainRule.foreground),0===r&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new S(e,t,n,s,r))}else this._mainRule.acceptOverwrite(e,n,s,r)}},C=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){const n=e.getLanguageId(t),s=e.getTokenType(t),r=e.getFontStyle(t),o=e.getForeground(t),i=e.getBackground(t);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:o,background:i})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static set(t,n,s,r,o,i,a){let c=e.getLanguageId(t),l=e.getTokenType(t),u=e.containsBalancedBrackets(t)?1:0,d=e.getFontStyle(t),p=e.getForeground(t),g=e.getBackground(t);return 0!==n&&(c=n),8!==s&&(l=s),null!==r&&(u=r?1:0),-1!==o&&(d=o),0!==i&&(p=i),0!==a&&(g=a),(c|l<<8|u<<10|d<<11|p<<15|g<<24)>>>0}};function T(e){return e}function A(e,t){const n=[],s=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}(e);let r=s.next();for(;null!==r;){let e=0;if(2===r.length&&":"===r.charAt(1)){switch(r.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let t=i();if(n.push({matcher:t,priority:e}),","!==r)break;r=s.next()}return n;function o(){if("-"===r){r=s.next();const e=o();return t=>!!e&&!e(t)}if("("===r){r=s.next();const e=function(){const e=[];let t=i();for(;t&&(e.push(t),"|"===r||","===r);){do{r=s.next()}while("|"===r||","===r);t=i()}return t=>e.some(e=>e(t))}();return")"===r&&(r=s.next()),e}if(v(r)){const e=[];do{e.push(r),r=s.next()}while(v(r));return n=>t(e,n)}return null}function i(){const e=[];let t=o();for(;t;)e.push(t),t=o();return t=>e.every(e=>e(t))}}function v(e){return!!e&&!!e.match(/[\w\.:]+/)}function N(e){"function"==typeof e.dispose&&e.dispose()}var P=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},I=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},R=class{_references=[];_seenReferenceKeys=/* @__PURE__ */new Set;get references(){return this._references}visitedRule=/* @__PURE__ */new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},L=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new P(this.initialScopeName)]}seenFullScopeRequests=/* @__PURE__ */new Set;seenPartialScopeRequests=/* @__PURE__ */new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new R;for(const n of e)x(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof P){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName))continue;if(this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function x(e,t,n,s){const r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof P?E({baseGrammar:o,selfGrammar:r},s):G(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},s);const i=n.injections(e.scopeName);if(i)for(const a of i)s.add(new P(a))}function G(e,t,n){if(t.repository&&t.repository[e]){$([t.repository[e]],t,n)}}function E(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&$(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&$(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function $(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const e=r.repository?s({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&$(r.patterns,{...t,repository:e},n);const o=r.include;if(!o)continue;const i=W(o);switch(i.kind){case 0:E({...t,selfGrammar:t.baseGrammar},n);break;case 1:E(t,n);break;case 2:G(i.ruleName,{...t,repository:e},n);break;case 3:case 4:const s=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const r={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===i.kind?G(i.ruleName,r,n):E(r,n)}else 4===i.kind?n.add(new I(i.scopeName,i.ruleName)):n.add(new P(i.scopeName))}}}var B=class{kind=0},M=class{kind=1},j=class{constructor(e){this.ruleName=e}kind=2},O=class{constructor(e){this.scopeName=e}kind=3},F=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function W(e){if("$base"===e)return new B;if("$self"===e)return new M;const t=e.indexOf("#");if(-1===t)return new O(e);if(0===t)return new j(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new F(n,s)}}var D=/\\(\d+)/,q=/\\(\d+)/g;var U=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,s){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=i.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=i.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${r(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?i.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?i.replaceCaptures(this._contentName,e,t):this._contentName}},H=class extends U{retokenizeCapturedWithRuleId;constructor(e,t,n,s,r){super(e,t,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,s){throw new Error("Not supported!")}},z=class extends U{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,s,r){super(e,t,n,null),this._match=new V(s,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new X,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},K=class extends U{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,s,r){super(e,t,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns){e.getRule(n).collectPatterns(e,t)}}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new X,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Y=class extends U{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,s,r,o,i,a,c,l){super(e,t,n,s),this._begin=new V(r,this.id),this.beginCaptures=o,this._end=new V(i||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!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(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new X;for(const t of this.patterns){e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},J=class extends U{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,s,r,o,i,a,c){super(e,t,n,s),this._begin=new V(r,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new V(i,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new X;for(const t of this.patterns){e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new X,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Q=class e{static createCaptureRule(e,t,n,s,r){return e.registerRule(e=>new H(t,e,n,s,r))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new z(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=s({},r,t.repository));let o=t.patterns;return void 0===o&&t.include&&(o=[{include:t.include}]),new K(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(o,n,r))}return t.while?new J(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Y(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,s){let r=[];if(t){let o=0;for(const e in t){if("$vscodeTextmateLocation"===e)continue;const t=parseInt(e,10);t>o&&(o=t)}for(let e=0;e<=o;e++)r[e]=null;for(const i in t){if("$vscodeTextmateLocation"===i)continue;const o=parseInt(i,10);let a=0;t[i].patterns&&(a=e.getCompiledRuleId(t[i],n,s)),r[o]=e.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return r}static _compilePatterns(t,n,s){let r=[];if(t)for(let o=0,i=t.length;o<i;o++){const i=t[o];let a=-1;if(i.include){const t=W(i.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(s[i.include],n,s);break;case 2:let r=s[t.ruleName];r&&(a=e.getCompiledRuleId(r,n,s));break;case 3:case 4:const o=t.scopeName,c=4===t.kind?t.ruleName:null,l=n.getExternalGrammar(o,s);if(l)if(c){let t=l.repository[c];t&&(a=e.getCompiledRuleId(t,n,l.repository))}else a=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}else a=e.getCompiledRuleId(i,n,s);if(-1!==a){const e=n.getRule(a);let t=!1;if((e instanceof K||e instanceof Y||e instanceof J)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},V=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,s=[],r=!1;for(let o=0;o<t;o++){if("\\"===e.charAt(o)&&o+1<t){const t=e.charAt(o+1);"z"===t?(s.push(e.substring(n,o)),s.push("$(?!\\n)(?<!\\n)"),n=o+2):"A"!==t&&"G"!==t||(r=!0),o++}}this.hasAnchor=r,0===n?this.source=e:(s.push(e.substring(n,t)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=D.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return q.lastIndex=0,this.source.replace(q,(e,t)=>u(n[parseInt(t,10)]||""))}_buildAnchorCache(){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let e,t,n,s,r=[],o=[],i=[],a=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),r[e]=n,o[e]=n,i[e]=n,a[e]=n,"\\"===n&&e+1<t&&(s=this.source.charAt(e+1),"A"===s?(r[e+1]="￿",o[e+1]="￿",i[e+1]="A",a[e+1]="A"):"G"===s?(r[e+1]="￿",o[e+1]="G",i[e+1]="￿",a[e+1]="G"):(r[e+1]=s,o[e+1]=s,i[e+1]=s,a[e+1]=s),e++);return{A0_G0:r.join(""),A0_G1:o.join(""),A1_G0:i.join(""),A1_G1:a.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache&&"string"==typeof this.source?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},X=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Z(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map(e=>e.resolveAnchors(t,n));return new Z(e,s,this._items.map(e=>e.ruleId))}},Z=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},ee=class{constructor(e,t){this.languageId=e,this.tokenType=t}},te=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new ee(e,8),this._embeddedLanguagesMatcher=new ne(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ee(0,0);_getBasicScopeAttributes=new d(e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new ee(t,n)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){const n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ne=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>u(e));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}};"undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG;var se=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function re(e,t,n,s,r,o,i,a){const c=t.content.length;let l=!1,u=-1;if(i){const i=function(e,t,n,s,r,o){let i=r.beginRuleCapturedEOL?0:-1;const a=[];for(let c=r;c;c=c.pop()){const t=c.getRule(e);t instanceof J&&a.push({rule:t,stack:c})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:a,findOptions:l}=ie(c.rule,e,c.stack.endRule,n,s===i),u=a.findNextMatchSync(t,s,l);if(!u){r=c.stack.pop();break}if(-2!==u.ruleId){r=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(o.produce(c.stack,u.captureIndices[0].start),ae(e,t,n,c.stack,o,c.rule.whileCaptures,u.captureIndices),o.produce(c.stack,u.captureIndices[0].end),i=u.captureIndices[0].end,u.captureIndices[0].end>s&&(s=u.captureIndices[0].end,n=!1))}return{stack:r,linePos:s,anchorPosition:i,isFirstLine:n}}(e,t,n,s,r,o);r=i.stack,s=i.linePos,n=i.isFirstLine,u=i.anchorPosition}const d=Date.now();for(;!l;){if(0!==a){if(Date.now()-d>a)return new se(r,!0)}p()}return new se(r,!1);function p(){const i=function(e,t,n,s,r,o){const i=function(e,t,n,s,r,o){const i=r.getRule(e),{ruleScanner:a,findOptions:c}=oe(i,e,r.endRule,n,s===o),l=a.findNextMatchSync(t,s,c);if(l)return{captureIndices:l.captureIndices,matchedRuleId:l.ruleId};return null}(e,t,n,s,r,o),a=e.getInjections();if(0===a.length)return i;const c=function(e,t,n,s,r,o,i){let a,c=Number.MAX_VALUE,l=null,u=0;const d=o.contentNameScopesList.getScopeNames();for(let p=0,g=e.length;p<g;p++){const o=e[p];if(!o.matcher(d))continue;const g=t.getRule(o.ruleId),{ruleScanner:f,findOptions:m}=oe(g,t,null,s,r===i),_=f.findNextMatchSync(n,r,m);if(!_)continue;const y=_.captureIndices[0].start;if(!(y>=c)&&(c=y,l=_.captureIndices,a=_.ruleId,u=o.priority,c===r))break}if(l)return{priorityMatch:-1===u,captureIndices:l,matchedRuleId:a};return null}(a,e,t,n,s,r,o);if(!c)return i;if(!i)return c;const l=i.captureIndices[0].start,u=c.captureIndices[0].start;if(u<l||c.priorityMatch&&u===l)return c;return i}(e,t,n,s,r,u);if(!i)return o.produce(r,c),void(l=!0);const a=i.captureIndices,d=i.matchedRuleId,p=!!(a&&a.length>0)&&a[0].end>s;if(-1===d){const i=r.getRule(e);o.produce(r,a[0].start),r=r.withContentNameScopesList(r.nameScopesList),ae(e,t,n,r,o,i.endCaptures,a),o.produce(r,a[0].end);const d=r;if(r=r.parent,u=d.getAnchorPos(),!p&&d.getEnterPos()===s)return r=d,o.produce(r,c),void(l=!0)}else{const i=e.getRule(d);o.produce(r,a[0].start);const g=r,f=i.getName(t.content,a),m=r.contentNameScopesList.pushAttributed(f,e);if(r=r.push(d,s,u,a[0].end===c,null,m,m),i instanceof Y){const s=i;ae(e,t,n,r,o,s.beginCaptures,a),o.produce(r,a[0].end),u=a[0].end;const d=s.getContentName(t.content,a),f=m.pushAttributed(d,e);if(r=r.withContentNameScopesList(f),s.endHasBackReferences&&(r=r.withEndRule(s.getEndWithResolvedBackReferences(t.content,a))),!p&&g.hasSameRuleAs(r))return r=r.pop(),o.produce(r,c),void(l=!0)}else if(i instanceof J){const s=i;ae(e,t,n,r,o,s.beginCaptures,a),o.produce(r,a[0].end),u=a[0].end;const d=s.getContentName(t.content,a),f=m.pushAttributed(d,e);if(r=r.withContentNameScopesList(f),s.whileHasBackReferences&&(r=r.withEndRule(s.getWhileWithResolvedBackReferences(t.content,a))),!p&&g.hasSameRuleAs(r))return r=r.pop(),o.produce(r,c),void(l=!0)}else{if(ae(e,t,n,r,o,i.captures,a),o.produce(r,a[0].end),r=r.pop(),!p)return r=r.safePop(),o.produce(r,c),void(l=!0)}}a[0].end>s&&(s=a[0].end,n=!1)}}function oe(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function ie(e,t,n,s,r){return{ruleScanner:e.compileWhileAG(t,n,s,r),findOptions:0}}function ae(e,t,n,s,r,o,i){if(0===o.length)return;const a=t.content,c=Math.min(o.length,i.length),l=[],u=i[0].end;for(let d=0;d<c;d++){const t=o[d];if(null===t)continue;const c=i[d];if(0===c.length)continue;if(c.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=c.start;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?r.produceFromScopes(l[l.length-1].scopes,c.start):r.produce(s,c.start),t.retokenizeCapturedWithRuleId){const o=t.getName(a,i),l=s.contentNameScopesList.pushAttributed(o,e),u=t.getContentName(a,i),d=l.pushAttributed(u,e),p=s.push(t.retokenizeCapturedWithRuleId,c.start,-1,!1,null,l,d),g=e.createOnigString(a.substring(0,c.end));re(e,g,n&&0===c.start,c.start,p,r,!1,0),N(g);continue}const p=t.getName(a,i);if(null!==p){const t=(l.length>0?l[l.length-1].scopes:s.contentNameScopesList).pushAttributed(p,e);l.push(new ce(t,c.end))}}for(;l.length>0;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var ce=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function le(e,t,n,s,r){const o=A(t,he),i=Q.getCompiledRuleId(n,s,r.repository);for(const a of o)e.push({debugSelector:t,matcher:a.matcher,ruleId:i,grammar:r,priority:a.priority})}function he(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let s=n;s<t.length;s++)if(ue(t[s],e))return n=s+1,!0;return!1})}function ue(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}var de=class{constructor(e,t,n,s,r,o,i,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new te(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=pe(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const c of Object.keys(r)){const e=A(c,he);for(const t of e)this._tokenTypeMatchers.push({matcher:t.matcher,type:r[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),t=[],n=this._rootScopeName,s=e(n);if(s){const e=s.injections;if(e)for(let n in e)le(t,n,e[n],this,s);const r=this._grammarRepository.injections(n);r&&r.forEach(e=>{const n=this.getExternalGrammar(e);if(n){const e=n.injectionSelector;e&&le(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=pe(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){let r;if(-1===this._rootId&&(this._rootId=Q.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==fe.NULL)r=!1,t.reset();else{r=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),s=C.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=this.getRule(this._rootId).getName(null,null);let i;i=o?ge.createRootAndLookUpScopeName(o,s,this):ge.createRoot("unknown",s),t=new fe(null,this._rootId,-1,-1,!1,null,i,i)}e+="\n";const o=this.createOnigString(e),i=o.content.length,a=new _e(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=re(this,o,r,0,t,a,!0,s);return N(o),{lineLength:i,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function pe(e,t){return(e=n(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var ge=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let s=t,r=t?.scopePath??null;for(const o of n)r=g.push(r,o.scopeNames),s=new e(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new e(null,new g(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new g(null,t),i=s.themeProvider.themeMatch(o),a=e.mergeAttributes(n,r,i);return new e(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let s=-1,r=0,o=0;return null!==n&&(s=n.fontStyle,r=n.foregroundId,o=n.backgroundId),C.set(e,t.languageId,t.tokenType,null,s,r,o)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=e._pushAttributed(r,o,n);return r}static _pushAttributed(t,n,s){const r=s.getMetadataForScope(n),o=t.scopePath.push(n),i=s.themeProvider.themeMatch(o),a=e.mergeAttributes(t.tokenAttributes,r,i);return new e(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},fe=class e{constructor(e,t,n,s,r,o,i,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=r,this.endRule=o,this.nameScopesList=i,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&ge.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,s,r,o,i,a){return new e(this,t,n,s,r,o,i,a)}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(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,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(t,n){const s=ge.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,ge.fromExtension(s,n.contentNameScopesList))}},me=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):A(e,he).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>A(e,he).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},_e=class{constructor(e,t,n,s){this.balancedBracketSelectors=s,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e?.getScopeNames()??[];for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=C.set(n,0,T(e.type),null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(t))}return s&&(n=C.set(n,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n?void(this._lastTokenEndIndex=t):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t))}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},ye=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=/* @__PURE__ */new Map;_rawGrammars=/* @__PURE__ */new Map;_injectionGrammars=/* @__PURE__ */new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,s,r){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,function(e,t,n,s,r,o,i,a){return new de(e,t,n,s,r,o,i,a)}(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},be=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ye(p.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=/* @__PURE__ */new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(p.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new me(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,s,r){const o=new L(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(e=>this._loadSingleGrammar(e.scopeName)),o.processQueue();return this._grammarForScopeName(e,t,n,s,r)}_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 n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,s=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,s)}_grammarForScopeName(e,t=0,n=null,s=null,r=null){return this._syncRegistry.grammarForScopeName(e,t,n,s,r)}},ke=fe.NULL;function Se(e,t){const n="string"==typeof e?{}:{...e.colorReplacements},s="string"==typeof e?e:e.name;for(const[r,o]of Object.entries(t?.colorReplacements||{}))"string"==typeof o?n[r]=o:r===s&&Object.assign(n,o);return n}function we(e,t){return e&&t?.[e?.toLowerCase()]||e}function Ce(e){return Array.isArray(e)?e:[e]}async function Te(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function Ae(e){return!e||["plaintext","txt","text","plain"].includes(e)}function ve(e){return"ansi"===e||Ae(e)}function Ne(e){return"none"===e}function Pe(e){return Ne(e)}function Ie(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const s of n)s&&!e.properties.class.includes(s)&&e.properties.class.push(s);return e}function Re(e,t=!1){if(0===e.length)return[["",0]];const n=e.split(/(\r?\n)/g);let s=0;const r=[];for(let o=0;o<n.length;o+=2){const e=t?n[o]+(n[o+1]||""):n[o];r.push([e,s]),s+=n[o].length,s+=n[o+1]?.length||0}return r}function Le(e){const t=Re(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=n,r=0;for(const e of t){if(s<e.length)break;s-=e.length,r++}return{line:r,character:s}},posToIndex:function(e,n){let s=0;for(let r=0;r<e;r++)s+=t[r].length;return s+=n,s}}}function xe(e,t,n){const s=/* @__PURE__ */new Set;for(const o of e.matchAll(/:?lang=["']([^"']+)["']/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/\\begin\{([\w-]+)\}/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const e=o[1].toLowerCase().trim(),t=e.includes("/")?e.split("/").pop():e;t&&s.add(t)}if(!n)return Array.from(s);const r=n.getBundledLanguages();return Array.from(s).filter(e=>e&&r[e])}const Ge="light-dark()",Ee=["color","background-color"];function $e(e,t){let n=0;const s=[];for(const r of t)r>n&&s.push({...e,content:e.content.slice(n,r),offset:e.offset+n}),n=r;return n<e.content.length&&s.push({...e,content:e.content.slice(n),offset:e.offset+n}),s}function Be(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{const t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?$e(e,t):e})):e}function Me(e,n,s,r,o="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=n.map(t=>je(e.variants[t])),c=new Set(a.flatMap(e=>Object.keys(e))),l={},u=(e,t)=>{const r="color"===t?"":"background-color"===t?"-bg":`-${t}`;return s+n[e]+("color"===t?"":r)};return a.forEach((e,s)=>{for(const i of c){const c=e[i]||"inherit";if(0===s&&r&&Ee.includes(i))if(r===Ge&&a.length>1){const e=n.findIndex(e=>"light"===e),r=n.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new t('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const d=a[e][i]||"inherit",p=a[r][i]||"inherit";l[i]=`light-dark(${d}, ${p})`,"css-vars"===o&&(l[u(s,i)]=c)}else l[i]=c;else"css-vars"===o&&(l[u(s,i)]=c)}}),i.htmlStyle=l,i}function je(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&y.Italic&&(t["font-style"]="italic"),e.fontStyle&y.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&y.Underline&&n.push("underline"),e.fontStyle&y.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Oe(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}const Fe=/* @__PURE__ */new WeakMap;function We(e,t){Fe.set(e,t)}function De(e){return Fe.get(e)}class qe{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new qe(Object.fromEntries(Ce(t).map(e=>[e,ke])),e)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,s]=e;this.lang=n,this._stacks={[s]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return function(e){const t=[],n=/* @__PURE__ */new Set;function s(e){if(n.has(e))return;n.add(e);const r=e?.nameScopesList?.scopeName;r&&t.push(r),e.parent&&s(e.parent)}return s(e),t}(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Ue(){const e=/* @__PURE__ */new WeakMap;function n(n){if(!e.has(n.meta)){let s=function(e){if("number"==typeof e){if(e<0||e>n.source.length)throw new t(`Invalid decoration offset: ${e}. Code length: ${n.source.length}`);return{...r.indexToPos(e),offset:e}}{const n=r.lines[e.line];if(void 0===n)throw new t(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let s=e.character;if(s<0&&(s=n.length+s),s<0||s>n.length)throw new t(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${n.length}`);return{...e,character:s,offset:r.posToIndex(e.line,s)}}};const r=Le(n.source),o=(n.options.decorations||[]).map(e=>({...e,start:s(e.start),end:s(e.end)}));!function(e){for(let n=0;n<e.length;n++){const s=e[n];if(s.start.offset>s.end.offset)throw new t(`Invalid decoration range: ${JSON.stringify(s.start)} - ${JSON.stringify(s.end)}`);for(let r=n+1;r<e.length;r++){const n=e[r],o=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,i=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset,a=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,c=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset;if(o||i||a||c){if(o&&i)continue;if(a&&c)continue;if(a&&s.start.offset===s.end.offset)continue;if(i&&n.start.offset===n.end.offset)continue;throw new t(`Decorations ${JSON.stringify(s.start)} and ${JSON.stringify(n.start)} intersect.`)}}}}(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(e){if(!this.options.decorations?.length)return;return Be(e,n(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;const s=n(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==s.converter.lines.length)throw new t(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${s.converter.lines.length}). Failed to apply decorations.`);function o(e,n,s,o){const i=r[e];let c="",l=-1,u=-1;if(0===n&&(l=0),0===s&&(u=0),s===Number.POSITIVE_INFINITY&&(u=i.children.length),-1===l||-1===u)for(let t=0;t<i.children.length;t++)c+=He(i.children[t]),-1===l&&c.length===n&&(l=t+1),-1===u&&c.length===s&&(u=t+1);if(-1===l)throw new t(`Failed to find start index for decoration ${JSON.stringify(o.start)}`);if(-1===u)throw new t(`Failed to find end index for decoration ${JSON.stringify(o.end)}`);const d=i.children.slice(l,u);if(o.alwaysWrap||d.length!==i.children.length)if(o.alwaysWrap||1!==d.length||"element"!==d[0].type){const e={type:"element",tagName:"span",properties:{},children:d};a(e,o,"wrapper"),i.children.splice(l,d.length,e)}else a(d[0],o,"token");else a(i,o,"line")}function i(e,t){r[e]=a(r[e],t,"line")}function a(e,t,n){const s=t.properties||{},r=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...s,class:e.properties.class},t.properties?.class&&Ie(e,t.properties.class),e=r(e,n)||e}const c=[],l=s.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(const t of l){const{start:e,end:n}=t;if(e.line===n.line)o(e.line,e.character,n.character,t);else if(e.line<n.line){o(e.line,e.character,Number.POSITIVE_INFINITY,t);for(let s=e.line+1;s<n.line;s++)c.unshift(()=>i(s,t));o(n.line,0,n.character,t)}}c.forEach(e=>e())}}}function He(e){return"text"===e.type?e.value:"element"===e.type?e.children.map(He).join(""):""}const ze=[
1
+ import{a as e}from"./main-KMOUKf4W.js";let t=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function n(e){return Array.isArray(e)?function(e){let t=[];for(let s=0,r=e.length;s<r;s++)t[s]=n(e[s]);return t}(e):e instanceof RegExp?e:"object"==typeof e?function(e){let t={};for(let s in e)t[s]=n(e[s]);return t}(e):e}function s(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function r(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t===e.length-1?r(e.substring(0,e.length-1)):e.substr(1+~t)}var o=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,i=class{static hasCaptures(e){return null!==e&&(o.lastIndex=0,o.test(e))}static replaceCaptures(e,t,n){return e.replace(o,(e,s,r,o)=>{let i=n[parseInt(s||r,10)];if(!i)return e;{let e=t.substring(i.start,i.end);for(;"."===e[0];)e=e.substring(1);switch(o){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function a(e,t){return e<t?-1:e>t?1:0}function c(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let s=0;s<n;s++){let n=a(e[s],t[s]);if(0!==n)return n}return 0}return n-s}function l(e){return!!/^#[0-9a-f]{6}$/i.test(e)||(!!/^#[0-9a-f]{8}$/i.test(e)||(!!/^#[0-9a-f]{3}$/i.test(e)||!!/^#[0-9a-f]{4}$/i.test(e)))}function u(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var d=class{constructor(e){this.fn=e}cache=/* @__PURE__ */new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},p=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],s=0;for(let r=0,o=t.length;r<o;r++){let e,o=t[r];if(!o.settings)continue;if("string"==typeof o.scope){let t=o.scope;t=t.replace(/^[,]+/,""),t=t.replace(/[,]+$/,""),e=t.split(",")}else e=Array.isArray(o.scope)?o.scope:[""];let i=-1;if("string"==typeof o.settings.fontStyle){i=0;let e=o.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++){switch(e[t]){case"italic":i|=1;break;case"bold":i|=2;break;case"underline":i|=4;break;case"strikethrough":i|=8}}}let a=null;"string"==typeof o.settings.foreground&&l(o.settings.foreground)&&(a=o.settings.foreground);let c=null;"string"==typeof o.settings.background&&l(o.settings.background)&&(c=o.settings.background);for(let t=0,l=e.length;t<l;t++){let o=e[t].trim().split(" "),l=o[o.length-1],u=null;o.length>1&&(u=o.slice(0,o.length-1),u.reverse()),n[s++]=new _(l,u,r,i,a,c)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{let n=a(e.scope,t.scope);return 0!==n?n:(n=c(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)});let n=0,s="#000000",r="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(s=t.foreground),null!==t.background&&(r=t.background)}let o=new b(t),i=new m(n,o.getId(s),o.getId(r)),l=new w(new S(0,null,-1,0,0),[]);for(let a=0,c=e.length;a<c;a++){let t=e[a];l.insert(0,t.scope,t.parentScopes,t.fontStyle,o.getId(t.foreground),o.getId(t.background))}return new p(o,i,l)}(e,t)}_cachedMatchRoot=new d(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>function(e,t){if(0===t.length)return!0;for(let n=0;n<t.length;n++){let s=t[n],r=!1;if(">"===s){if(n===t.length-1)return!1;s=t[++n],r=!0}for(;e&&!f(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}(e.parent,t.parentScopes));return n?new m(n.fontStyle,n.foreground,n.background):null}},g=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(const s of n)t=new e(t,s);return t}static from(...t){let n=null;for(let s=0;s<t.length;s++)n=new e(n,t[s]);return n}push(t){return new e(this,t)}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||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function f(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}var m=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};var _=class{constructor(e,t,n,s,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=o}},y=/* @__PURE__ */(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(y||{});var b=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=/* @__PURE__ */Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},k=Object.freeze([]),S=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,s,r){this.scopeDepth=e,this.parentScopes=t||k,this.fontStyle=n,this.foreground=s,this.background=r}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==s&&(this.background=s)}},w=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,s=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[s]&&s++,!(n>=e.parentScopes.length||s>=t.parentScopes.length);){const r=t.parentScopes[s].length-e.parentScopes[n].length;if(0!==r)return r;n++,s++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,s=t.indexOf(".");if(-1===s?(e=t,n=""):(e=t.substring(0,s),n=t.substring(s+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,s,r,o,i){if(""===n)return void this._doInsertHere(t,s,r,o,i);let a,c,l,u=n.indexOf(".");-1===u?(a=n,c=""):(a=n.substring(0,u),c=n.substring(u+1)),this._children.hasOwnProperty(a)?l=this._children[a]:(l=new e(this._mainRule.clone(),S.cloneArr(this._rulesWithParentScopes)),this._children[a]=l),l.insert(t+1,c,s,r,o,i)}_doInsertHere(e,t,n,s,r){if(null!==t){for(let o=0,i=this._rulesWithParentScopes.length;o<i;o++){let i=this._rulesWithParentScopes[o];if(0===c(i.parentScopes,t))return void i.acceptOverwrite(e,n,s,r)}-1===n&&(n=this._mainRule.fontStyle),0===s&&(s=this._mainRule.foreground),0===r&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new S(e,t,n,s,r))}else this._mainRule.acceptOverwrite(e,n,s,r)}},C=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){const n=e.getLanguageId(t),s=e.getTokenType(t),r=e.getFontStyle(t),o=e.getForeground(t),i=e.getBackground(t);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:o,background:i})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return!!(1024&e)}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(16744448&e)>>>15}static getBackground(e){return(4278190080&e)>>>24}static set(t,n,s,r,o,i,a){let c=e.getLanguageId(t),l=e.getTokenType(t),u=e.containsBalancedBrackets(t)?1:0,d=e.getFontStyle(t),p=e.getForeground(t),g=e.getBackground(t);return 0!==n&&(c=n),8!==s&&(l=s),null!==r&&(u=r?1:0),-1!==o&&(d=o),0!==i&&(p=i),0!==a&&(g=a),(c|l<<8|u<<10|d<<11|p<<15|g<<24)>>>0}};function T(e){return e}function A(e,t){const n=[],s=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}(e);let r=s.next();for(;null!==r;){let e=0;if(2===r.length&&":"===r.charAt(1)){switch(r.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let t=i();if(n.push({matcher:t,priority:e}),","!==r)break;r=s.next()}return n;function o(){if("-"===r){r=s.next();const e=o();return t=>!!e&&!e(t)}if("("===r){r=s.next();const e=function(){const e=[];let t=i();for(;t&&(e.push(t),"|"===r||","===r);){do{r=s.next()}while("|"===r||","===r);t=i()}return t=>e.some(e=>e(t))}();return")"===r&&(r=s.next()),e}if(v(r)){const e=[];do{e.push(r),r=s.next()}while(v(r));return n=>t(e,n)}return null}function i(){const e=[];let t=o();for(;t;)e.push(t),t=o();return t=>e.every(e=>e(t))}}function v(e){return!!e&&!!e.match(/[\w\.:]+/)}function N(e){"function"==typeof e.dispose&&e.dispose()}var P=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},I=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},R=class{_references=[];_seenReferenceKeys=/* @__PURE__ */new Set;get references(){return this._references}visitedRule=/* @__PURE__ */new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},L=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new P(this.initialScopeName)]}seenFullScopeRequests=/* @__PURE__ */new Set;seenPartialScopeRequests=/* @__PURE__ */new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new R;for(const n of e)x(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof P){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName))continue;if(this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function x(e,t,n,s){const r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof P?E({baseGrammar:o,selfGrammar:r},s):G(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},s);const i=n.injections(e.scopeName);if(i)for(const a of i)s.add(new P(a))}function G(e,t,n){if(t.repository&&t.repository[e]){$([t.repository[e]],t,n)}}function E(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&$(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&$(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function $(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const e=r.repository?s({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&$(r.patterns,{...t,repository:e},n);const o=r.include;if(!o)continue;const i=W(o);switch(i.kind){case 0:E({...t,selfGrammar:t.baseGrammar},n);break;case 1:E(t,n);break;case 2:G(i.ruleName,{...t,repository:e},n);break;case 3:case 4:const s=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(s){const r={baseGrammar:t.baseGrammar,selfGrammar:s,repository:e};4===i.kind?G(i.ruleName,r,n):E(r,n)}else 4===i.kind?n.add(new I(i.scopeName,i.ruleName)):n.add(new P(i.scopeName))}}}var B=class{kind=0},M=class{kind=1},j=class{constructor(e){this.ruleName=e}kind=2},O=class{constructor(e){this.scopeName=e}kind=3},F=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function W(e){if("$base"===e)return new B;if("$self"===e)return new M;const t=e.indexOf("#");if(-1===t)return new O(e);if(0===t)return new j(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new F(n,s)}}var D=/\\(\d+)/,q=/\\(\d+)/g;var U=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,s){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=i.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=i.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${r(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?i.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?i.replaceCaptures(this._contentName,e,t):this._contentName}},H=class extends U{retokenizeCapturedWithRuleId;constructor(e,t,n,s,r){super(e,t,n,s),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,s){throw new Error("Not supported!")}},z=class extends U{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,s,r){super(e,t,n,null),this._match=new V(s,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new X,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},K=class extends U{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,s,r){super(e,t,n,s),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns){e.getRule(n).collectPatterns(e,t)}}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new X,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Y=class extends U{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,s,r,o,i,a,c,l){super(e,t,n,s),this._begin=new V(r,this.id),this.beginCaptures=o,this._end=new V(i||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!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(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,s)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new X;for(const t of this.patterns){e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},J=class extends U{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,s,r,o,i,a,c){super(e,t,n,s),this._begin=new V(r,this.id),this.beginCaptures=o,this.whileCaptures=a,this._while=new V(i,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,s){return this._getCachedCompiledPatterns(e).compileAG(e,n,s)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new X;for(const t of this.patterns){e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,s){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,s)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new X,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},Q=class e{static createCaptureRule(e,t,n,s,r){return e.registerRule(e=>new H(t,e,n,s,r))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(o=>{if(t.id=o,t.match)return new z(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=s({},r,t.repository));let o=t.patterns;return void 0===o&&t.include&&(o=[{include:t.include}]),new K(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(o,n,r))}return t.while?new J(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Y(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,s){let r=[];if(t){let o=0;for(const e in t){if("$vscodeTextmateLocation"===e)continue;const t=parseInt(e,10);t>o&&(o=t)}for(let e=0;e<=o;e++)r[e]=null;for(const i in t){if("$vscodeTextmateLocation"===i)continue;const o=parseInt(i,10);let a=0;t[i].patterns&&(a=e.getCompiledRuleId(t[i],n,s)),r[o]=e.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return r}static _compilePatterns(t,n,s){let r=[];if(t)for(let o=0,i=t.length;o<i;o++){const i=t[o];let a=-1;if(i.include){const t=W(i.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(s[i.include],n,s);break;case 2:let r=s[t.ruleName];r&&(a=e.getCompiledRuleId(r,n,s));break;case 3:case 4:const o=t.scopeName,c=4===t.kind?t.ruleName:null,l=n.getExternalGrammar(o,s);if(l)if(c){let t=l.repository[c];t&&(a=e.getCompiledRuleId(t,n,l.repository))}else a=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}else a=e.getCompiledRuleId(i,n,s);if(-1!==a){const e=n.getRule(a);let t=!1;if((e instanceof K||e instanceof Y||e instanceof J)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},V=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,s=[],r=!1;for(let o=0;o<t;o++){if("\\"===e.charAt(o)&&o+1<t){const t=e.charAt(o+1);"z"===t?(s.push(e.substring(n,o)),s.push("$(?!\\n)(?<!\\n)"),n=o+2):"A"!==t&&"G"!==t||(r=!0),o++}}this.hasAnchor=r,0===n?this.source=e:(s.push(e.substring(n,t)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=D.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return q.lastIndex=0,this.source.replace(q,(e,t)=>u(n[parseInt(t,10)]||""))}_buildAnchorCache(){if("string"!=typeof this.source)throw new Error("This method should only be called if the source is a string");let e,t,n,s,r=[],o=[],i=[],a=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),r[e]=n,o[e]=n,i[e]=n,a[e]=n,"\\"===n&&e+1<t&&(s=this.source.charAt(e+1),"A"===s?(r[e+1]="￿",o[e+1]="￿",i[e+1]="A",a[e+1]="A"):"G"===s?(r[e+1]="￿",o[e+1]="G",i[e+1]="￿",a[e+1]="G"):(r[e+1]=s,o[e+1]=s,i[e+1]=s,a[e+1]=s),e++);return{A0_G0:r.join(""),A0_G1:o.join(""),A1_G0:i.join(""),A1_G1:a.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache&&"string"==typeof this.source?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}},X=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Z(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map(e=>e.resolveAnchors(t,n));return new Z(e,s,this._items.map(e=>e.ruleId))}},Z=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},ee=class{constructor(e,t){this.languageId=e,this.tokenType=t}},te=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new ee(e,8),this._embeddedLanguagesMatcher=new ne(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ee(0,0);_getBasicScopeAttributes=new d(e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new ee(t,n)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){const n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ne=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>u(e));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}};"undefined"!=typeof process&&process.env.VSCODE_TEXTMATE_DEBUG;var se=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function re(e,t,n,s,r,o,i,a){const c=t.content.length;let l=!1,u=-1;if(i){const i=function(e,t,n,s,r,o){let i=r.beginRuleCapturedEOL?0:-1;const a=[];for(let c=r;c;c=c.pop()){const t=c.getRule(e);t instanceof J&&a.push({rule:t,stack:c})}for(let c=a.pop();c;c=a.pop()){const{ruleScanner:a,findOptions:l}=ie(c.rule,e,c.stack.endRule,n,s===i),u=a.findNextMatchSync(t,s,l);if(!u){r=c.stack.pop();break}if(-2!==u.ruleId){r=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(o.produce(c.stack,u.captureIndices[0].start),ae(e,t,n,c.stack,o,c.rule.whileCaptures,u.captureIndices),o.produce(c.stack,u.captureIndices[0].end),i=u.captureIndices[0].end,u.captureIndices[0].end>s&&(s=u.captureIndices[0].end,n=!1))}return{stack:r,linePos:s,anchorPosition:i,isFirstLine:n}}(e,t,n,s,r,o);r=i.stack,s=i.linePos,n=i.isFirstLine,u=i.anchorPosition}const d=Date.now();for(;!l;){if(0!==a){if(Date.now()-d>a)return new se(r,!0)}p()}return new se(r,!1);function p(){const i=function(e,t,n,s,r,o){const i=function(e,t,n,s,r,o){const i=r.getRule(e),{ruleScanner:a,findOptions:c}=oe(i,e,r.endRule,n,s===o),l=a.findNextMatchSync(t,s,c);if(l)return{captureIndices:l.captureIndices,matchedRuleId:l.ruleId};return null}(e,t,n,s,r,o),a=e.getInjections();if(0===a.length)return i;const c=function(e,t,n,s,r,o,i){let a,c=Number.MAX_VALUE,l=null,u=0;const d=o.contentNameScopesList.getScopeNames();for(let p=0,g=e.length;p<g;p++){const o=e[p];if(!o.matcher(d))continue;const g=t.getRule(o.ruleId),{ruleScanner:f,findOptions:m}=oe(g,t,null,s,r===i),_=f.findNextMatchSync(n,r,m);if(!_)continue;const y=_.captureIndices[0].start;if(!(y>=c)&&(c=y,l=_.captureIndices,a=_.ruleId,u=o.priority,c===r))break}if(l)return{priorityMatch:-1===u,captureIndices:l,matchedRuleId:a};return null}(a,e,t,n,s,r,o);if(!c)return i;if(!i)return c;const l=i.captureIndices[0].start,u=c.captureIndices[0].start;if(u<l||c.priorityMatch&&u===l)return c;return i}(e,t,n,s,r,u);if(!i)return o.produce(r,c),void(l=!0);const a=i.captureIndices,d=i.matchedRuleId,p=!!(a&&a.length>0)&&a[0].end>s;if(-1===d){const i=r.getRule(e);o.produce(r,a[0].start),r=r.withContentNameScopesList(r.nameScopesList),ae(e,t,n,r,o,i.endCaptures,a),o.produce(r,a[0].end);const d=r;if(r=r.parent,u=d.getAnchorPos(),!p&&d.getEnterPos()===s)return r=d,o.produce(r,c),void(l=!0)}else{const i=e.getRule(d);o.produce(r,a[0].start);const g=r,f=i.getName(t.content,a),m=r.contentNameScopesList.pushAttributed(f,e);if(r=r.push(d,s,u,a[0].end===c,null,m,m),i instanceof Y){const s=i;ae(e,t,n,r,o,s.beginCaptures,a),o.produce(r,a[0].end),u=a[0].end;const d=s.getContentName(t.content,a),f=m.pushAttributed(d,e);if(r=r.withContentNameScopesList(f),s.endHasBackReferences&&(r=r.withEndRule(s.getEndWithResolvedBackReferences(t.content,a))),!p&&g.hasSameRuleAs(r))return r=r.pop(),o.produce(r,c),void(l=!0)}else if(i instanceof J){const s=i;ae(e,t,n,r,o,s.beginCaptures,a),o.produce(r,a[0].end),u=a[0].end;const d=s.getContentName(t.content,a),f=m.pushAttributed(d,e);if(r=r.withContentNameScopesList(f),s.whileHasBackReferences&&(r=r.withEndRule(s.getWhileWithResolvedBackReferences(t.content,a))),!p&&g.hasSameRuleAs(r))return r=r.pop(),o.produce(r,c),void(l=!0)}else{if(ae(e,t,n,r,o,i.captures,a),o.produce(r,a[0].end),r=r.pop(),!p)return r=r.safePop(),o.produce(r,c),void(l=!0)}}a[0].end>s&&(s=a[0].end,n=!1)}}function oe(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function ie(e,t,n,s,r){return{ruleScanner:e.compileWhileAG(t,n,s,r),findOptions:0}}function ae(e,t,n,s,r,o,i){if(0===o.length)return;const a=t.content,c=Math.min(o.length,i.length),l=[],u=i[0].end;for(let d=0;d<c;d++){const t=o[d];if(null===t)continue;const c=i[d];if(0===c.length)continue;if(c.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=c.start;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?r.produceFromScopes(l[l.length-1].scopes,c.start):r.produce(s,c.start),t.retokenizeCapturedWithRuleId){const o=t.getName(a,i),l=s.contentNameScopesList.pushAttributed(o,e),u=t.getContentName(a,i),d=l.pushAttributed(u,e),p=s.push(t.retokenizeCapturedWithRuleId,c.start,-1,!1,null,l,d),g=e.createOnigString(a.substring(0,c.end));re(e,g,n&&0===c.start,c.start,p,r,!1,0),N(g);continue}const p=t.getName(a,i);if(null!==p){const t=(l.length>0?l[l.length-1].scopes:s.contentNameScopesList).pushAttributed(p,e);l.push(new ce(t,c.end))}}for(;l.length>0;)r.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var ce=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function le(e,t,n,s,r){const o=A(t,he),i=Q.getCompiledRuleId(n,s,r.repository);for(const a of o)e.push({debugSelector:t,matcher:a.matcher,ruleId:i,grammar:r,priority:a.priority})}function he(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let s=n;s<t.length;s++)if(ue(t[s],e))return n=s+1,!0;return!1})}function ue(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}var de=class{constructor(e,t,n,s,r,o,i,a){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=a,this._basicScopeAttributesProvider=new te(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=pe(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const c of Object.keys(r)){const e=A(c,he);for(const t of e)this._tokenTypeMatchers.push({matcher:t.matcher,type:r[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e=e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),t=[],n=this._rootScopeName,s=e(n);if(s){const e=s.injections;if(e)for(let n in e)le(t,n,e[n],this,s);const r=this._grammarRepository.injections(n);r&&r.forEach(e=>{const n=this.getExternalGrammar(e);if(n){const e=n.injectionSelector;e&&le(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=pe(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){let r;if(-1===this._rootId&&(this._rootId=Q.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==fe.NULL)r=!1,t.reset();else{r=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),s=C.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),o=this.getRule(this._rootId).getName(null,null);let i;i=o?ge.createRootAndLookUpScopeName(o,s,this):ge.createRoot("unknown",s),t=new fe(null,this._rootId,-1,-1,!1,null,i,i)}e+="\n";const o=this.createOnigString(e),i=o.content.length,a=new _e(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=re(this,o,r,0,t,a,!0,s);return N(o),{lineLength:i,lineTokens:a,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function pe(e,t){return(e=n(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var ge=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let s=t,r=t?.scopePath??null;for(const o of n)r=g.push(r,o.scopeNames),s=new e(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new e(null,new g(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new g(null,t),i=s.themeProvider.themeMatch(o),a=e.mergeAttributes(n,r,i);return new e(null,o,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let s=-1,r=0,o=0;return null!==n&&(s=n.fontStyle,r=n.foregroundId,o=n.backgroundId),C.set(e,t.languageId,t.tokenType,null,s,r,o)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=e._pushAttributed(r,o,n);return r}static _pushAttributed(t,n,s){const r=s.getMetadataForScope(n),o=t.scopePath.push(n),i=s.themeProvider.themeMatch(o),a=e.mergeAttributes(t.tokenAttributes,r,i);return new e(t,o,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},fe=class e{constructor(e,t,n,s,r,o,i,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=r,this.endRule=o,this.nameScopesList=i,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&ge.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,s,r,o,i,a){return new e(this,t,n,s,r,o,i,a)}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(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,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(t,n){const s=ge.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,ge.fromExtension(s,n.contentNameScopesList))}},me=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):A(e,he).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>A(e,he).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},_e=class{constructor(e,t,n,s){this.balancedBracketSelectors=s,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e?.getScopeNames()??[];for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=C.set(n,0,T(e.type),null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(t))}return s&&(n=C.set(n,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n?void(this._lastTokenEndIndex=t):(this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t))}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},ye=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=/* @__PURE__ */new Map;_rawGrammars=/* @__PURE__ */new Map;_injectionGrammars=/* @__PURE__ */new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,s,r){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,function(e,t,n,s,r,o,i,a){return new de(e,t,n,s,r,o,i,a)}(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},be=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ye(p.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=/* @__PURE__ */new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(p.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new me(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,s,r){const o=new L(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(e=>this._loadSingleGrammar(e.scopeName)),o.processQueue();return this._grammarForScopeName(e,t,n,s,r)}_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 n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,s=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,s)}_grammarForScopeName(e,t=0,n=null,s=null,r=null){return this._syncRegistry.grammarForScopeName(e,t,n,s,r)}},ke=fe.NULL;function Se(e,t){const n="string"==typeof e?{}:{...e.colorReplacements},s="string"==typeof e?e:e.name;for(const[r,o]of Object.entries(t?.colorReplacements||{}))"string"==typeof o?n[r]=o:r===s&&Object.assign(n,o);return n}function we(e,t){return e&&t?.[e?.toLowerCase()]||e}function Ce(e){return Array.isArray(e)?e:[e]}async function Te(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function Ae(e){return!e||["plaintext","txt","text","plain"].includes(e)}function ve(e){return"ansi"===e||Ae(e)}function Ne(e){return"none"===e}function Pe(e){return Ne(e)}function Ie(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const s of n)s&&!e.properties.class.includes(s)&&e.properties.class.push(s);return e}function Re(e,t=!1){if(0===e.length)return[["",0]];const n=e.split(/(\r?\n)/g);let s=0;const r=[];for(let o=0;o<n.length;o+=2){const e=t?n[o]+(n[o+1]||""):n[o];r.push([e,s]),s+=n[o].length,s+=n[o+1]?.length||0}return r}function Le(e){const t=Re(e,!0).map(([e])=>e);return{lines:t,indexToPos:function(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let s=n,r=0;for(const e of t){if(s<e.length)break;s-=e.length,r++}return{line:r,character:s}},posToIndex:function(e,n){let s=0;for(let r=0;r<e;r++)s+=t[r].length;return s+=n,s}}}function xe(e,t,n){const s=/* @__PURE__ */new Set;for(const o of e.matchAll(/:?lang=["']([^"']+)["']/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/\\begin\{([\w-]+)\}/g)){const e=o[1].toLowerCase().trim();e&&s.add(e)}for(const o of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const e=o[1].toLowerCase().trim(),t=e.includes("/")?e.split("/").pop():e;t&&s.add(t)}if(!n)return Array.from(s);const r=n.getBundledLanguages();return Array.from(s).filter(e=>e&&r[e])}const Ge="light-dark()",Ee=["color","background-color"];function $e(e,t){let n=0;const s=[];for(const r of t)r>n&&s.push({...e,content:e.content.slice(n,r),offset:e.offset+n}),n=r;return n<e.content.length&&s.push({...e,content:e.content.slice(n),offset:e.offset+n}),s}function Be(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{const t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?$e(e,t):e})):e}function Me(e,n,s,r,o="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=n.map(t=>je(e.variants[t])),c=new Set(a.flatMap(e=>Object.keys(e))),l={},u=(e,t)=>{const r="color"===t?"":"background-color"===t?"-bg":`-${t}`;return s+n[e]+("color"===t?"":r)};return a.forEach((e,s)=>{for(const i of c){const c=e[i]||"inherit";if(0===s&&r&&Ee.includes(i))if(r===Ge&&a.length>1){const e=n.findIndex(e=>"light"===e),r=n.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new t('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const d=a[e][i]||"inherit",p=a[r][i]||"inherit";l[i]=`light-dark(${d}, ${p})`,"css-vars"===o&&(l[u(s,i)]=c)}else l[i]=c;else"css-vars"===o&&(l[u(s,i)]=c)}}),i.htmlStyle=l,i}function je(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&y.Italic&&(t["font-style"]="italic"),e.fontStyle&y.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&y.Underline&&n.push("underline"),e.fontStyle&y.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Oe(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}const Fe=/* @__PURE__ */new WeakMap;function We(e,t){Fe.set(e,t)}function De(e){return Fe.get(e)}class qe{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new qe(Object.fromEntries(Ce(t).map(e=>[e,ke])),e)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,s]=e;this.lang=n,this._stacks={[s]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return function(e){const t=[],n=/* @__PURE__ */new Set;function s(e){if(n.has(e))return;n.add(e);const r=e?.nameScopesList?.scopeName;r&&t.push(r),e.parent&&s(e.parent)}return s(e),t}(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Ue(){const e=/* @__PURE__ */new WeakMap;function n(n){if(!e.has(n.meta)){let s=function(e){if("number"==typeof e){if(e<0||e>n.source.length)throw new t(`Invalid decoration offset: ${e}. Code length: ${n.source.length}`);return{...r.indexToPos(e),offset:e}}{const n=r.lines[e.line];if(void 0===n)throw new t(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let s=e.character;if(s<0&&(s=n.length+s),s<0||s>n.length)throw new t(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${n.length}`);return{...e,character:s,offset:r.posToIndex(e.line,s)}}};const r=Le(n.source),o=(n.options.decorations||[]).map(e=>({...e,start:s(e.start),end:s(e.end)}));!function(e){for(let n=0;n<e.length;n++){const s=e[n];if(s.start.offset>s.end.offset)throw new t(`Invalid decoration range: ${JSON.stringify(s.start)} - ${JSON.stringify(s.end)}`);for(let r=n+1;r<e.length;r++){const n=e[r],o=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,i=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset,a=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,c=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset;if(o||i||a||c){if(o&&i)continue;if(a&&c)continue;if(a&&s.start.offset===s.end.offset)continue;if(i&&n.start.offset===n.end.offset)continue;throw new t(`Decorations ${JSON.stringify(s.start)} and ${JSON.stringify(n.start)} intersect.`)}}}}(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(e){if(!this.options.decorations?.length)return;return Be(e,n(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;const s=n(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==s.converter.lines.length)throw new t(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${s.converter.lines.length}). Failed to apply decorations.`);function o(e,n,s,o){const i=r[e];let c="",l=-1,u=-1;if(0===n&&(l=0),0===s&&(u=0),s===Number.POSITIVE_INFINITY&&(u=i.children.length),-1===l||-1===u)for(let t=0;t<i.children.length;t++)c+=He(i.children[t]),-1===l&&c.length===n&&(l=t+1),-1===u&&c.length===s&&(u=t+1);if(-1===l)throw new t(`Failed to find start index for decoration ${JSON.stringify(o.start)}`);if(-1===u)throw new t(`Failed to find end index for decoration ${JSON.stringify(o.end)}`);const d=i.children.slice(l,u);if(o.alwaysWrap||d.length!==i.children.length)if(o.alwaysWrap||1!==d.length||"element"!==d[0].type){const e={type:"element",tagName:"span",properties:{},children:d};a(e,o,"wrapper"),i.children.splice(l,d.length,e)}else a(d[0],o,"token");else a(i,o,"line")}function i(e,t){r[e]=a(r[e],t,"line")}function a(e,t,n){const s=t.properties||{},r=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...s,class:e.properties.class},t.properties?.class&&Ie(e,t.properties.class),e=r(e,n)||e}const c=[],l=s.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(const t of l){const{start:e,end:n}=t;if(e.line===n.line)o(e.line,e.character,n.character,t);else if(e.line<n.line){o(e.line,e.character,Number.POSITIVE_INFINITY,t);for(let s=e.line+1;s<n.line;s++)c.unshift(()=>i(s,t));o(n.line,0,n.character,t)}}c.forEach(e=>e())}}}function He(e){return"text"===e.type?e.value:"element"===e.type?e.children.map(He).join(""):""}const ze=[
2
2
  /* @__PURE__ */Ue()];function Ke(e){const t=function(e){const t=[],n=[],s=[];for(const r of e)switch(r.enforce){case"pre":t.push(r);break;case"post":n.push(r);break;default:s.push(r)}return{pre:t,post:n,normal:s}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...ze]}var Ye=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Je={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Qe(e,t){const n=e.indexOf("",t);if(-1!==n&&"["===e[n+1]){const t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function Ve(e){const t=e.shift();if("2"===t){const t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){const t=e.shift();if(t)return{type:"table",index:Number(t)}}}function Xe(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(0===s)t.push({type:"resetAll"});else if(s<=9){Je[s]&&t.push({type:"setDecoration",value:Je[s]})}else if(s<=29){const e=Je[s-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(s<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Ye[s-30]}});else if(38===s){const n=Ve(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===s)t.push({type:"resetForegroundColor"});else if(s<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Ye[s-40]}});else if(48===s){const n=Ve(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===s?t.push({type:"resetBackgroundColor"}):53===s?t.push({type:"setDecoration",value:"overline"}):55===s?t.push({type:"resetDecoration",value:"overline"}):s>=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Ye[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Ye[s-100+8]}})}return t}var Ze={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function et(e=Ze){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}let s;function r(e){return function(){if(s)return s;s=[];for(let n=0;n<Ye.length;n++)s.push(t(Ye[n]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let r=0;r<6;r++)for(let o=0;o<6;o++)s.push(n([e[t],e[r],e[o]]));let r=8;for(let t=0;t<24;t++,r+=10)s.push(n([r,r,r]));return s}()[e]}return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return r(e.index)}}}}const tt={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function nt(e,t,n){const s=Se(e,n),r=Re(t),o=et(Object.fromEntries(Ye.map(t=>{const n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`,s=e.colors?.[n];return[t,s||tt[t]]}))),i=function(){let e=null,t=null,n=/* @__PURE__ */new Set;return{parse(s){const r=[];let o=0;do{const i=Qe(s,o),a=i.sequence?s.substring(o,i.startPosition):s.substring(o);if(a.length>0&&r.push({value:a,foreground:e,background:t,decorations:new Set(n)}),i.sequence){const s=Xe(i.sequence);for(const r of s)"resetAll"===r.type?(e=null,t=null,n.clear()):"resetForegroundColor"===r.type?e=null:"resetBackgroundColor"===r.type?t=null:"resetDecoration"===r.type&&n.delete(r.value);for(const r of s)"setForegroundColor"===r.type?e=r.value:"setBackgroundColor"===r.type?t=r.value:"setDecoration"===r.type&&n.add(r.value)}o=i.position}while(o<s.length);return r}}}();return r.map(t=>i.parse(t[0]).map(n=>{let r,i;n.decorations.has("reverse")?(r=n.background?o.value(n.background):e.bg,i=n.foreground?o.value(n.foreground):e.fg):(r=n.foreground?o.value(n.foreground):e.fg,i=n.background?o.value(n.background):void 0),r=we(r,s),i=we(i,s),n.decorations.has("dim")&&(r=function(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const e=t[1];if(8===e.length){const t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){const t=e[0],n=e[1],s=e[2],r=e[3];return`#${t}${t}${n}${n}${s}${s}${Math.round(Number.parseInt(`${r}${r}`,16)/2).toString(16).padStart(2,"0")}`}if(3===e.length){const t=e[0],n=e[1],s=e[2];return`#${t}${t}${n}${n}${s}${s}80`}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(r));let a=y.None;return n.decorations.has("bold")&&(a|=y.Bold),n.decorations.has("italic")&&(a|=y.Italic),n.decorations.has("underline")&&(a|=y.Underline),n.decorations.has("strikethrough")&&(a|=y.Strikethrough),{content:n.value,offset:t[1],color:r,bgColor:i,fontStyle:a}}))}function st(e,n,s={}){const{theme:r=e.getLoadedThemes()[0]}=s,o=e.resolveLangAlias(s.lang||"text");if(Ae(o)||Ne(r))return Re(n).map(e=>[{content:e[0],offset:e[1]}]);const{theme:i,colorMap:a}=e.setTheme(r);if("ansi"===o)return nt(i,n,s);const c=e.getLanguage(s.lang||"text");if(s.grammarState){if(s.grammarState.lang!==c.name)throw new t(`Grammar state language "${s.grammarState.lang}" does not match highlight language "${c.name}"`);if(!s.grammarState.themes.includes(i.name))throw new t(`Grammar state themes "${s.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return ot(n,c,i,a,s)}function rt(...e){if(2===e.length)return De(e[1]);const[n,s,r={}]=e,{lang:o="text",theme:i=n.getLoadedThemes()[0]}=r;if(Ae(o)||Ne(i))throw new t("Plain language does not have grammar state");if("ansi"===o)throw new t("ANSI language does not have grammar state");const{theme:a,colorMap:c}=n.setTheme(i),l=n.getLanguage(o);return new qe(it(s,l,a,c,r).stateStack,l.name,a.name)}function ot(e,t,n,s,r){const o=it(e,t,n,s,r),i=new qe(o.stateStack,t.name,n.name);return We(o.tokens,i),o.tokens}function it(e,n,s,r,o){const i=Se(s,o),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:c=500}=o,l=Re(e);let u=o.grammarState?function(e,n){if(!(e instanceof qe))throw new t("Invalid grammar state");return e.getInternalStack(n)}(o.grammarState,s.name)??ke:null!=o.grammarContextCode?it(o.grammarContextCode,n,s,r,{...o,grammarState:void 0,grammarContextCode:void 0}).stateStack:ke,d=[];const p=[];for(let t=0,g=l.length;t<g;t++){const[e,g]=l[t];if(""===e){d=[],p.push([]);continue}if(a>0&&e.length>=a){d=[],p.push([{content:e,offset:g,color:"",fontStyle:0}]);continue}let f,m,_;o.includeExplanation&&(f=n.tokenizeLine(e,u,c),m=f.tokens,_=0);const y=n.tokenizeLine2(e,u,c),b=y.tokens.length/2;for(let t=0;t<b;t++){const n=y.tokens[2*t],a=t+1<b?y.tokens[2*t+2]:e.length;if(n===a)continue;const c=y.tokens[2*t+1],l=we(r[C.getForeground(c)],i),u=C.getFontStyle(c),p={content:e.substring(n,a),offset:g+n,color:l,fontStyle:u};if(o.includeExplanation){const t=[];if("scopeName"!==o.includeExplanation)for(const e of s.settings){let n;switch(typeof e.scope){case"string":n=e.scope.split(/,/).map(e=>e.trim());break;case"object":n=e.scope;break;default:continue}t.push({settings:e,selectors:n.map(e=>e.split(/ /))})}p.explanation=[];let r=0;for(;n+r<a;){const n=m[_],s=e.substring(n.startIndex,n.endIndex);r+=s.length,p.explanation.push({content:s,scopes:"scopeName"===o.includeExplanation?at(n.scopes):ct(t,n.scopes)}),_+=1}}d.push(p)}p.push(d),d=[],u=y.ruleStack}return{tokens:p,stateStack:u}}function at(e){return e.map(e=>({scopeName:e}))}function ct(e,t){const n=[];for(let s=0,r=t.length;s<r;s++){const r=t[s];n[s]={scopeName:r,themeMatches:ut(e,r,t.slice(0,s))}}return n}function lt(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function ht(e,t,n){if(!lt(e[e.length-1],t))return!1;let s=e.length-2,r=n.length-1;for(;s>=0&&r>=0;)lt(e[s],n[r])&&(s-=1),r-=1;return-1===s}function ut(e,t,n){const s=[];for(const{selectors:r,settings:o}of e)for(const e of r)if(ht(e,t,n)){s.push(o);break}return s}function dt(e,t,n){const s=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),r=s.map(s=>{const r=st(e,t,{...n,theme:s.theme});return{tokens:r,state:De(r),theme:"string"==typeof s.theme?s.theme:s.theme.name}}),o=function(...e){const t=e.map(()=>[]),n=e.length;for(let s=0;s<e[0].length;s++){const r=e.map(e=>e[s]),o=t.map(()=>[]);t.forEach((e,t)=>e.push(o[t]));const i=r.map(()=>0),a=r.map(e=>e[0]);for(;a.every(e=>e);){const e=Math.min(...a.map(e=>e.content.length));for(let t=0;t<n;t++){const n=a[t];n.content.length===e?(o[t].push(n),i[t]+=1,a[t]=r[t][i[t]]):(o[t].push({...n,content:n.content.slice(0,e)}),a[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...r.map(e=>e.tokens)),i=o[0].map((e,t)=>e.map((e,r)=>{const i={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(i.explanation=e.explanation),o.forEach((e,n)=>{const{content:o,explanation:a,offset:c,...l}=e[t][r];i.variants[s[n].color]=l}),i})),a=r[0].state?new qe(Object.fromEntries(r.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),r[0].state.lang):void 0;return a&&We(i,a),i}function pt(e,n,s){let r,o,i,a,c,l;if("themes"in s){const{defaultColor:u="light",cssVariablePrefix:d="--shiki-",colorsRendering:p="css-vars"}=s,g=Object.entries(s.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===u?-1:t.color===u?1:0);if(0===g.length)throw new t("`themes` option must not be empty");const f=dt(e,n,s);if(l=De(f),u&&Ge!==u&&!g.find(e=>e.color===u))throw new t(`\`themes\` option must contain the defaultColor key \`${u}\``);const m=g.map(t=>e.getTheme(t.theme)),_=g.map(e=>e.color);i=f.map(e=>e.map(e=>Me(e,_,d,u,p))),l&&We(i,l);const y=g.map(e=>Se(e.theme,s));o=gt(g,m,y,d,u,"fg",p),r=gt(g,m,y,d,u,"bg",p),a=`shiki-themes ${m.map(e=>e.name).join(" ")}`,c=u?void 0:[o,r].join(";")}else{if(!("theme"in s))throw new t("Invalid options, either `theme` or `themes` must be provided");{const t=Se(s.theme,s);i=st(e,n,s);const c=e.getTheme(s.theme);r=we(c.bg,t),o=we(c.fg,t),a=c.name,l=De(i)}}return{tokens:i,fg:o,bg:r,themeName:a,rootStyle:c,grammarState:l}}function gt(e,n,s,r,o,i,a){return e.map((c,l)=>{const u=we(n[l][i],s[l])||"inherit",d=`${r+c.color}${"bg"===i?"-bg":""}:${u}`;if(0===l&&o){if(o===Ge&&e.length>1){const r=e.findIndex(e=>"light"===e.color),o=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===o)throw new t('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${we(n[r][i],s[r])||"inherit"}, ${we(n[o][i],s[o])||"inherit"});${d}`}return u}return"css-vars"===a?d:null}).filter(e=>!!e).join(";")}function ft(e,t,n,s={meta:{},options:n,codeToHast:(t,n)=>ft(e,t,n),codeToTokens:(t,n)=>pt(e,t,n)}){let r=t;for(const f of Ke(n))r=f.preprocess?.call(s,r,n)||r;let{tokens:o,fg:i,bg:a,themeName:c,rootStyle:l,grammarState:u}=pt(e,r,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:p=!1}=n;!0===d?o=function(e){return e.map(e=>{const t=[];let n,s="";return e.forEach((r,o)=>{const i=!(r.fontStyle&&(r.fontStyle&y.Underline||r.fontStyle&y.Strikethrough));i&&r.content.match(/^\s+$/)&&e[o+1]?(void 0===n&&(n=r.offset),s+=r.content):s?(i?t.push({...r,offset:n,content:s+r.content}):t.push({content:s,offset:n},r),n=void 0,s=""):t.push(r)}),t})}(o):"never"===d&&(o=function(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;const t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;const[,n,s,r]=t;if(!n&&!r)return e;const o=[{...e,offset:e.offset+n.length,content:s}];return n&&o.unshift({content:n,offset:e.offset}),r&&o.push({content:r,offset:e.offset+n.length+s.length}),o}))}(o)),p&&(o=function(e){return e.map(e=>{const t=[];for(const n of e){if(0===t.length){t.push({...n});continue}const e=t[t.length-1],s=Oe(e.htmlStyle||je(e)),r=Oe(n.htmlStyle||je(n)),o=e.fontStyle&&(e.fontStyle&y.Underline||e.fontStyle&y.Strikethrough),i=n.fontStyle&&(n.fontStyle&y.Underline||n.fontStyle&y.Strikethrough);o||i||s!==r?t.push({...n}):e.content+=n.content}return t})}(o));const g={...s,get source(){return r}};for(const f of Ke(n))o=f.tokens?.call(g,o)||o;return mt(o,{...n,fg:i,bg:a,themeName:c,rootStyle:!1!==n.rootStyle&&(n.rootStyle??l)},g,u)}function mt(e,t,n,s=De(e)){const r=Ke(t),o=[],i={type:"root",children:[]},{structure:a="classic",tabindex:c="0"}=t,l={class:`shiki ${t.themeName||""}`};!1!==t.rootStyle&&(null!=t.rootStyle?l.style=t.rootStyle:l.style=`background-color:${t.bg};color:${t.fg}`),!1!==c&&null!=c&&(l.tabindex=c.toString());for(const[m,_]of Object.entries(t.meta||{}))m.startsWith("_")||(l[m]=_);let u={type:"element",tagName:"pre",properties:l,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:o};const p=[],g={...n,structure:a,addClassToHast:Ie,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return i},get pre(){return u},get code(){return d},get lines(){return p}};if(e.forEach((e,t)=>{t&&("inline"===a?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===a&&o.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},s=0;for(const o of e){let e={type:"element",tagName:"span",properties:{...o.htmlAttrs},children:[{type:"text",value:o.content}]};const c=Oe(o.htmlStyle||je(o));c&&(e.properties.style=c);for(const i of r)e=i?.span?.call(g,e,t+1,s,n,o)||e;"inline"===a?i.children.push(e):"classic"===a&&n.children.push(e),s+=o.content.length}if("classic"===a){for(const e of r)n=e?.line?.call(g,n,t+1)||n;p.push(n),o.push(n)}else"inline"===a&&p.push(n)}),"classic"===a){for(const e of r)d=e?.code?.call(g,d)||d;u.children.push(d);for(const e of r)u=e?.pre?.call(g,u)||u;i.children.push(u)}else if("inline"===a){const e=[];let t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const s of i.children)"element"===s.type&&"br"===s.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):"element"!==s.type&&"text"!==s.type||t.children.push(s);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(const s of r)n=s?.code?.call(g,n)||n;i.children=[];for(let s=0;s<n.children.length;s++){s>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});const e=n.children[s];"element"===e.type&&i.children.push(...e.children)}}let f=i;for(const m of r)f=m?.root?.call(g,f)||f;return s&&We(f,s),f}const _t=e;function yt(e,t,n){const s={meta:{},options:n,codeToHast:(t,n)=>ft(e,t,n),codeToTokens:(t,n)=>pt(e,t,n)};let r=_t(ft(e,t,n,s));for(const o of Ke(n))r=o.postprocess?.call(s,r,n)||r;return r}const bt="#333333",kt="#bbbbbb",St="#fffffe",wt="#1e1e1e",Ct="__shiki_resolved";function Tt(e){if(e?.[Ct])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:s}=t;if(!n||!s){const e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(s=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!s&&t?.colors?.["editor.foreground"]&&(s=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),s||(s="light"===t.type?bt:kt),n||(n="light"===t.type?St:wt),t.fg=s,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let r=0;const o=/* @__PURE__ */new Map;function i(e){if(o.has(e))return o.get(e);r+=1;const n=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?i(e):(o.set(e,n),n)}t.settings=t.settings.map(e=>{const n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),s=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!s)return e;const r={...e,settings:{...e.settings}};if(n){const n=i(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,r.settings.foreground=n}if(s){const n=i(e.settings.background);t.colorReplacements[n]=e.settings.background,r.settings.background=n}return r});for(const a of Object.keys(t.colors||{}))if(("editor.foreground"===a||"editor.background"===a||a.startsWith("terminal.ansi"))&&!t.colors[a]?.startsWith("#")){const e=i(t.colors[a]);t.colorReplacements[e]=t.colors[a],t.colors[a]=e}return Object.defineProperty(t,Ct,{enumerable:!1,writable:!1,value:!0}),t}async function At(e){return Array.from(new Set((await Promise.all(e.filter(e=>!ve(e)).map(async e=>await Te(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function vt(e){return(await Promise.all(e.map(async e=>Pe(e)?null:Tt(await Te(e))))).filter(e=>!!e)}let Nt=3,Pt=!1;function It(e=!0,t=!1){Nt=e,Pt=t}function Rt(e,t=3){if(Nt&&!("number"==typeof Nt&&t>Nt)){if(Pt)throw new Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}class Lt extends Error{constructor(e){super(e),this.name="ShikiError"}}function xt(e,t){if(!t)return e;if(t[e]){const n=/* @__PURE__ */new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Lt(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class Gt extends be{constructor(e,t,n,s={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=s,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=/* @__PURE__ */new Map;_resolvedGrammars=/* @__PURE__ */new Map;_langMap=/* @__PURE__ */new Map;_langGraph=/* @__PURE__ */new Map;_textmateThemeCache=/* @__PURE__ */new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=Tt(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=p.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=xt(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const s=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(s.name=e.name,this._resolvedGrammars.set(e.name,s),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(const r of t)this._resolvedGrammars.delete(r.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(r.scopeName),this._syncRegistry?._grammars?.delete(r.scopeName),this.loadLanguage(this._langMap.get(r.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const s of e)this.resolveEmbeddedLanguages(s);const t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){const e=t.filter(([e,t])=>{if(!t)return!1;const s=t.embeddedLanguages||t.embeddedLangs;return s?.some(e=>n.map(([e])=>e).includes(e))}).filter(e=>!n.includes(e));throw new Lt(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(const[s,r]of t)this._resolver.addLanguage(r);for(const[s,r]of t)this.loadLanguage(r)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[.../* @__PURE__ */new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}}class Et{_langs=/* @__PURE__ */new Map;_scopeToLang=/* @__PURE__ */new Map;_injections=/* @__PURE__ */new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let s=1;s<=t.length;s++){const e=t.slice(0,s).join(".");n=[...n,...this._injections.get(e)||[]]}return n}}let $t=0;function Bt(e){$t+=1,!1!==e.warnings&&$t>=10&&$t%10==0&&console.warn(`[Shiki] ${$t} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Lt("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),s=(e.themes||[]).flat(1).map(Tt),r=new Et(e.engine,n),o=new Gt(r,s,n,e.langAlias);let i;function a(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};u();const t=o.getTheme(e);if(!t)throw new Lt(`Theme \`${e}\` not found, you may need to load it first`);return t}function c(...e){u(),o.loadLanguages(e.flat(1))}function l(...e){u();for(const t of e.flat(1))o.loadTheme(t)}function u(){if(t)throw new Lt("Shiki instance has been disposed")}function d(){t||(t=!0,o.dispose(),$t-=1)}return{setTheme:function(e){u();const t=a(e);return i!==e&&(o.setTheme(t),i=e),{theme:t,colorMap:o.getColorMap()}},getTheme:a,getLanguage:function(e){u();const t=o.getGrammar("string"==typeof e?e:e.name);if(!t)throw new Lt(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return u(),o.getLoadedThemes()},getLoadedLanguages:function(){return u(),o.getLoadedLanguages()},resolveLangAlias:function(t){return xt(t,e.langAlias)},loadLanguage:async function(...e){return c(await At(e))},loadLanguageSync:c,loadTheme:async function(...e){return u(),l(await vt(e))},loadThemeSync:l,dispose:d,[Symbol.dispose]:d}}async function Mt(e){e.engine||Rt("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,s]=await Promise.all([vt(e.themes||[]),At(e.langs||[]),e.engine]);return Bt({...e,themes:t,langs:n,engine:s})}async function jt(e){const t=await Mt(e);return{getLastGrammarState:(...e)=>rt(t,...e),codeToTokensBase:(e,n)=>st(t,e,n),codeToTokensWithThemes:(e,n)=>dt(t,e,n),codeToTokens:(e,n)=>pt(t,e,n),codeToHast:(e,n)=>ft(t,e,n),codeToHtml:(e,n)=>yt(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Ot(e){const t=Bt(e);return{getLastGrammarState:(...e)=>rt(t,...e),codeToTokensBase:(e,n)=>st(t,e,n),codeToTokensWithThemes:(e,n)=>dt(t,e,n),codeToTokens:(e,n)=>pt(t,e,n),codeToHast:(e,n)=>ft(t,e,n),codeToHtml:(e,n)=>yt(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Ft(e){let t;return async function(n){if(t){const e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}return t=e({...n,themes:n.themes||[],langs:n.langs||[]}),t}}const Wt=/* @__PURE__ */Ft(jt);function Dt(e){const n=e.langs,s=e.themes,r=e.engine;return async function(e){function o(s){if("string"==typeof s){if(ve(s=e.langAlias?.[s]||s))return[];const r=n[s];if(!r)throw new t(`Language \`${s}\` is not included in this bundle. You may want to load it from external source.`);return r}return s}function i(e){if(Pe(e))return"none";if("string"==typeof e){const n=s[e];if(!n)throw new t(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return n}return e}const a=(e.themes??[]).map(e=>i(e)),c=(e.langs??[]).map(e=>o(e)),l=await jt({engine:e.engine??r(),...e,themes:a,langs:c});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(o)),loadTheme:(...e)=>l.loadTheme(...e.map(i)),getBundledLanguages:()=>n,getBundledThemes:()=>s}}}function qt(e){let t;return async function(n={}){if(t){const e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});const s=await t;return await Promise.all([s.loadTheme(...n.themes||[]),s.loadLanguage(...n.langs||[])]),s}}}function Ut(e,t){const n=qt(e);async function s(e,s){const r=await n({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),o=await(t?.guessEmbeddedLanguages?.(e,s.lang,r));return o&&await r.loadLanguage(...o),r}return{getSingletonHighlighter:e=>n(e),codeToHtml:async(e,t)=>(await s(e,t)).codeToHtml(e,t),codeToHast:async(e,t)=>(await s(e,t)).codeToHast(e,t),codeToTokens:async(e,t)=>(await s(e,t)).codeToTokens(e,t),codeToTokensBase:async(e,t)=>(await s(e,t)).codeToTokensBase(e,t),codeToTokensWithThemes:async(e,t)=>(await s(e,t)).codeToTokensWithThemes(e,t),getLastGrammarState:async(e,t)=>(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}const Ht=Dt;function zt(e={}){const{name:t="css-variables",variablePrefix:n="--shiki-",fontStyle:s=!0}=e,r=t=>e.variableDefaults?.[t]?`var(${n}${t}, ${e.variableDefaults[t]})`:`var(${n}${t})`,o={name:t,type:"dark",colors:{"editor.foreground":r("foreground"),"editor.background":r("background"),"terminal.ansiBlack":r("ansi-black"),"terminal.ansiRed":r("ansi-red"),"terminal.ansiGreen":r("ansi-green"),"terminal.ansiYellow":r("ansi-yellow"),"terminal.ansiBlue":r("ansi-blue"),"terminal.ansiMagenta":r("ansi-magenta"),"terminal.ansiCyan":r("ansi-cyan"),"terminal.ansiWhite":r("ansi-white"),"terminal.ansiBrightBlack":r("ansi-bright-black"),"terminal.ansiBrightRed":r("ansi-bright-red"),"terminal.ansiBrightGreen":r("ansi-bright-green"),"terminal.ansiBrightYellow":r("ansi-bright-yellow"),"terminal.ansiBrightBlue":r("ansi-bright-blue"),"terminal.ansiBrightMagenta":r("ansi-bright-magenta"),"terminal.ansiBrightCyan":r("ansi-bright-cyan"),"terminal.ansiBrightWhite":r("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:r("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:r("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:r("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:r("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:r("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:r("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:r("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:r("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:r("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:r("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:r("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:r("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:r("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:r("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:r("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:r("token-changed")}}]};return s||(o.tokenColors=o.tokenColors?.map(e=>(e.settings?.fontStyle&&delete e.settings.fontStyle,e))),o}export{t as ShikiError,Ie as addClassToHast,we as applyColorReplacements,ft as codeToHast,yt as codeToHtml,pt as codeToTokens,st as codeToTokensBase,dt as codeToTokensWithThemes,Dt as createBundledHighlighter,zt as createCssVariablesTheme,jt as createHighlighterCore,Ot as createHighlighterCoreSync,Le as createPositionConverter,Mt as createShikiInternal,Bt as createShikiInternalSync,Ut as createSingletonShorthands,Ht as createdBundledHighlighter,It as enableDeprecationWarnings,Me as flatTokenVariants,Wt as getSingletonHighlighterCore,je as getTokenStyleObject,xe as guessEmbeddedLanguages,_t as hastToHtml,Ne as isNoneTheme,Ae as isPlainLang,ve as isSpecialLang,Pe as isSpecialTheme,qt as makeSingletonHighlighter,Ft as makeSingletonHighlighterCore,Te as normalizeGetter,Tt as normalizeTheme,Se as resolveColorReplacements,Re as splitLines,$e as splitToken,Be as splitTokens,Oe as stringifyTokenStyle,Ce as toArray,nt as tokenizeAnsiWithTheme,ot as tokenizeWithTheme,mt as tokensToHast,Ue as transformerDecorations,Rt as warnDeprecated};