kcg-code 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/chunk-0k94bd7w.js +1 -0
- package/dist/web/chunk-1hsbtrt7.js +1 -0
- package/dist/web/chunk-1w20559j.js +2 -0
- package/dist/web/chunk-2g1d0p8k.js +1 -0
- package/dist/web/chunk-2y991ert.js +1 -0
- package/dist/web/chunk-3zr9b6sh.js +1 -0
- package/dist/web/chunk-4587k1kk.js +1 -0
- package/dist/web/chunk-4n8esv61.js +2 -0
- package/dist/web/chunk-5a2wt1wn.js +1 -0
- package/dist/web/chunk-6f4fhpq5.js +1 -0
- package/dist/web/chunk-70gs5473.js +2 -0
- package/dist/web/chunk-7fh46gy9.js +1 -0
- package/dist/web/chunk-7hpamxpk.js +1 -0
- package/dist/web/chunk-7k2ksd6m.js +1 -0
- package/dist/web/chunk-7r3qwgvk.js +1 -0
- package/dist/web/chunk-7vp7mn8t.js +1 -0
- package/dist/web/chunk-7zd31pph.js +2 -0
- package/dist/web/chunk-98m1ye59.js +1 -0
- package/dist/web/chunk-99ac747k.js +98 -0
- package/dist/web/chunk-9e08jfg6.js +1 -0
- package/dist/web/chunk-a4kekjaw.js +2 -0
- package/dist/web/chunk-a7dtx8vc.js +2 -0
- package/dist/web/chunk-aat7sg2w.js +2 -0
- package/dist/web/chunk-adfxb1sz.js +141 -0
- package/dist/web/chunk-c29x9yr7.js +1 -0
- package/dist/web/chunk-c84m5n2b.js +1 -0
- package/dist/web/chunk-deqmvh2y.js +1 -0
- package/dist/web/chunk-dwa0v44t.js +1 -0
- package/dist/web/chunk-ewkw0yxq.js +1 -0
- package/dist/web/chunk-fwhn9kja.js +1 -0
- package/dist/web/chunk-gzmwacrs.js +1 -0
- package/dist/web/chunk-jcnm8ap3.js +1 -0
- package/dist/web/chunk-jhww4q3p.css +1 -0
- package/dist/web/chunk-jt618p78.js +1 -0
- package/dist/web/chunk-k74h7e4d.js +2 -0
- package/dist/web/chunk-n2293q4w.js +2 -0
- package/dist/web/chunk-neqyf1jm.js +1 -0
- package/dist/web/chunk-nnhyekc9.js +1 -0
- package/dist/web/chunk-p5m4kcyp.js +1 -0
- package/dist/web/chunk-pae7wjqv.js +1 -0
- package/dist/web/chunk-pbh1r1h9.js +2 -0
- package/dist/web/chunk-qnky191x.js +1 -0
- package/dist/web/chunk-rachd7gd.js +1 -0
- package/dist/web/chunk-rcvsf7wj.js +2 -0
- package/dist/web/chunk-rj1164tm.js +1 -0
- package/dist/web/chunk-s0wykzpf.js +1 -0
- package/dist/web/chunk-sm5g3apm.js +1 -0
- package/dist/web/chunk-srr11f10.js +2 -0
- package/dist/web/chunk-tsyvyw54.js +2 -0
- package/dist/web/chunk-twh19bw5.js +2 -0
- package/dist/web/chunk-v0b1rz8b.js +1 -0
- package/dist/web/chunk-vcj3m7wp.js +1 -0
- package/dist/web/chunk-wqjjkgh9.js +1 -0
- package/dist/web/chunk-xgcdt3gc.js +2 -0
- package/dist/web/chunk-yenm06gj.js +1 -0
- package/dist/web/chunk-yvhjz3k7.js +12 -0
- package/dist/web/chunk-yymd449s.js +1 -0
- package/dist/web/chunk-z5ns215x.js +2 -0
- package/dist/web/index.html +14 -0
- package/dist/web/logo-sg2x36yb.svg +31 -0
- package/dist/web/logo.svg +1 -0
- package/dist/web/manifest.json +18 -0
- package/dist/web/sw.js +67 -0
- package/package.json +4 -3
- package/public/sw.js +20 -2
- package/src/cli/commands.ts +6 -1
- package/src/cli/dashboard.tsx +5 -1
- package/src/cli/ink-react.ts +26 -0
- package/src/paths.ts +3 -0
- package/src/server/__tests__/prebuilt-web.test.ts +35 -0
- package/src/server/app.ts +8 -0
- package/src/server/prebuilt-web.ts +46 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.freeze(JSON.parse(`{"displayName":"PowerShell","name":"powershell","patterns":[{"begin":"<#","beginCaptures":{"0":{"name":"punctuation.definition.comment.block.begin.powershell"}},"end":"#>","endCaptures":{"0":{"name":"punctuation.definition.comment.block.end.powershell"}},"name":"comment.block.powershell","patterns":[{"include":"#commentEmbeddedDocs"}]},{"match":"[2-6]>&1|>>?|<<|[<>]|>\\\\||[1-6]>|[1-6]>>","name":"keyword.operator.redirection.powershell"},{"include":"#commands"},{"include":"#commentLine"},{"include":"#variable"},{"include":"#subexpression"},{"include":"#function"},{"include":"#attribute"},{"include":"#UsingDirective"},{"include":"#type"},{"include":"#hashtable"},{"include":"#doubleQuotedString"},{"include":"#scriptblock"},{"include":"#doubleQuotedStringEscapes"},{"applyEndPatternLast":true,"begin":"['‘-‛]","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.powershell"}},"end":"['‘-‛]","endCaptures":{"0":{"name":"punctuation.definition.string.end.powershell"}},"name":"string.quoted.single.powershell","patterns":[{"match":"['‘-‛]{2}","name":"constant.character.escape.powershell"}]},{"begin":"(@[\\"“”„])\\\\s*$","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.powershell"}},"end":"^[\\"“”„]@","endCaptures":{"0":{"name":"punctuation.definition.string.end.powershell"}},"name":"string.quoted.double.heredoc.powershell","patterns":[{"include":"#variableNoProperty"},{"include":"#doubleQuotedStringEscapes"},{"include":"#interpolation"}]},{"begin":"(@['‘-‛])\\\\s*$","beginCaptures":{"1":{"name":"punctuation.definition.string.begin.powershell"}},"end":"^['‘-‛]@","endCaptures":{"0":{"name":"punctuation.definition.string.end.powershell"}},"name":"string.quoted.single.heredoc.powershell"},{"include":"#numericConstant"},{"begin":"(@)(\\\\()","beginCaptures":{"1":{"name":"keyword.other.array.begin.powershell"},"2":{"name":"punctuation.section.group.begin.powershell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.group.end.powershell"}},"name":"meta.group.array-expression.powershell","patterns":[{"include":"$self"}]},{"begin":"((\\\\$))(\\\\()","beginCaptures":{"1":{"name":"keyword.other.substatement.powershell"},"2":{"name":"punctuation.definition.subexpression.powershell"},"3":{"name":"punctuation.section.group.begin.powershell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.group.end.powershell"}},"name":"meta.group.complex.subexpression.powershell","patterns":[{"include":"$self"}]},{"match":"\\\\b((([-.0-9A-Z_a-z]+)\\\\.(?i:exe|com|cmd|bat)))\\\\b","name":"support.function.powershell"},{"match":"(?<![-.\\\\w])((?i:begin|break|catch|clean|continue|data|default|define|do|dynamicparam|else|elseif|end|exit|finally|for|from|if|in|inlinescript|parallel|param|process|return|sequence|switch|throw|trap|try|until|var|while)|[%?])(?!\\\\w)","name":"keyword.control.powershell"},{"match":"(?<![-\\\\w]|[^)]\\\\.)((?i:(foreach|where)(?!-object))|[%?])(?!\\\\w)","name":"keyword.control.powershell"},{"begin":"(?<!\\\\w)(--%)(?!\\\\w)","beginCaptures":{"1":{"name":"keyword.control.powershell"}},"end":"$","patterns":[{"match":".+","name":"string.unquoted.powershell"}]},{"match":"(?<!\\\\w)((?i:hidden|static))(?!\\\\w)","name":"storage.modifier.powershell"},{"captures":{"1":{"name":"storage.type.powershell"},"2":{"name":"entity.name.function"}},"match":"(?<![-\\\\w])((?i:class)|[%?])\\\\s+([-_\\\\p{L}\\\\d]?{1,})\\\\b"},{"match":"(?<!\\\\w)-(?i:is(?:not)?|as)\\\\b","name":"keyword.operator.comparison.powershell"},{"match":"(?<!\\\\w)-(?i:[ci]?(?:eq|ne|[gl][et]|(?:not)?(?:like|match|contains|in)|replace))(?!\\\\p{L})","name":"keyword.operator.comparison.powershell"},{"match":"(?<!\\\\w)-(?i:join|split)(?!\\\\p{L})|!","name":"keyword.operator.unary.powershell"},{"match":"(?<!\\\\w)-(?i:and|or|not|xor)(?!\\\\p{L})|!","name":"keyword.operator.logical.powershell"},{"match":"(?<!\\\\w)-(?i:band|bor|bnot|bxor|shl|shr)(?!\\\\p{L})","name":"keyword.operator.bitwise.powershell"},{"match":"(?<!\\\\w)-(?i:f)(?!\\\\p{L})","name":"keyword.operator.string-format.powershell"},{"match":"[-%*+/]?=|[-%*+/]","name":"keyword.operator.assignment.powershell"},{"match":"\\\\|{2}|&{2}|;","name":"punctuation.terminator.statement.powershell"},{"match":"&|(?<!\\\\w)\\\\.(?= )|[,\`|]","name":"keyword.operator.other.powershell"},{"match":"(?<!\\\\s|^)\\\\.\\\\.(?=-?\\\\d|[$(])","name":"keyword.operator.range.powershell"}],"repository":{"RequiresDirective":{"begin":"(?<=#)(?i:(requires))\\\\s","beginCaptures":{"0":{"name":"keyword.control.requires.powershell"}},"end":"$","name":"meta.requires.powershell","patterns":[{"match":"-(?i:Modules|PSSnapin|RunAsAdministrator|ShellId|Version|Assembly|PSEdition)","name":"keyword.other.powershell"},{"match":"(?<!-)\\\\b\\\\p{L}+|\\\\d+(?:\\\\.\\\\d+)*","name":"variable.parameter.powershell"},{"include":"#hashtable"}]},"UsingDirective":{"captures":{"1":{"name":"keyword.control.using.powershell"},"2":{"name":"keyword.other.powershell"},"3":{"name":"variable.parameter.powershell"}},"match":"(?<!\\\\w)(?i:(using))\\\\s+(?i:(namespace|module))\\\\s+(?i:((?:\\\\w+\\\\.?)+))"},"attribute":{"begin":"(\\\\[)\\\\s*\\\\b(?i)(cmdletbinding|alias|outputtype|parameter|validatenotnull|validatenotnullorempty|validatecount|validateset|allownull|allowemptycollection|allowemptystring|validatescript|validaterange|validatepattern|validatelength|supportswildcards)\\\\b","beginCaptures":{"1":{"name":"punctuation.section.bracket.begin.powershell"},"2":{"name":"support.function.attribute.powershell"}},"end":"(])","endCaptures":{"1":{"name":"punctuation.section.bracket.end.powershell"}},"name":"meta.attribute.powershell","patterns":[{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.group.begin.powershell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.group.end.powershell"}},"patterns":[{"include":"$self"},{"captures":{"1":{"name":"variable.parameter.attribute.powershell"},"2":{"name":"keyword.operator.assignment.powershell"}},"match":"(?i)\\\\b(mandatory|valuefrompipeline|valuefrompipelinebypropertyname|valuefromremainingarguments|position|parametersetname|defaultparametersetname|supportsshouldprocess|supportspaging|positionalbinding|helpuri|confirmimpact|helpmessage)\\\\b\\\\s+{0,1}(=)?"}]}]},"commands":{"patterns":[{"match":"(?:([-:\\\\\\\\_\\\\p{L}\\\\d])*\\\\\\\\)?\\\\b(?i:Add|Approve|Assert|Backup|Block|Build|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Deploy|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Mount|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Write)-.+?(?:\\\\.(?i:exe|cmd|bat|ps1))?\\\\b","name":"support.function.powershell"},{"match":"(?<!\\\\w)(?i:foreach-object)(?!\\\\w)","name":"support.function.powershell"},{"match":"(?<!\\\\w)(?i:where-object)(?!\\\\w)","name":"support.function.powershell"},{"match":"(?<!\\\\w)(?i:sort-object)(?!\\\\w)","name":"support.function.powershell"},{"match":"(?<!\\\\w)(?i:tee-object)(?!\\\\w)","name":"support.function.powershell"}]},"commentEmbeddedDocs":{"patterns":[{"captures":{"1":{"name":"constant.string.documentation.powershell"},"2":{"name":"keyword.operator.documentation.powershell"}},"match":"(?:^|\\\\G)(?i:\\\\s*(\\\\.)(COMPONENT|DESCRIPTION|EXAMPLE|FUNCTIONALITY|INPUTS|LINK|NOTES|OUTPUTS|ROLE|SYNOPSIS))\\\\s*$","name":"comment.documentation.embedded.powershell"},{"captures":{"1":{"name":"constant.string.documentation.powershell"},"2":{"name":"keyword.operator.documentation.powershell"},"3":{"name":"keyword.operator.documentation.powershell"}},"match":"(?:^|\\\\G)(?i:\\\\s*(\\\\.)(EXTERNALHELP|FORWARDHELP(?:CATEGORY|TARGETNAME)|PARAMETER|REMOTEHELPRUNSPACE))\\\\s+(.+?)\\\\s*$","name":"comment.documentation.embedded.powershell"}]},"commentLine":{"begin":"(?<![-\\\\\\\\\`])(#)#*","captures":{"1":{"name":"punctuation.definition.comment.powershell"}},"end":"$\\\\n?","name":"comment.line.powershell","patterns":[{"include":"#commentEmbeddedDocs"},{"include":"#RequiresDirective"}]},"doubleQuotedString":{"applyEndPatternLast":true,"begin":"[\\"“”„]","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.powershell"}},"end":"[\\"“”„]","endCaptures":{"0":{"name":"punctuation.definition.string.end.powershell"}},"name":"string.quoted.double.powershell","patterns":[{"match":"(?i)\\\\b[-%+.0-9A-Z_]+@[-.0-9A-Z]+\\\\.[A-Z]{2,64}\\\\b"},{"include":"#variableNoProperty"},{"include":"#doubleQuotedStringEscapes"},{"match":"[\\"“”„]{2}","name":"constant.character.escape.powershell"},{"include":"#interpolation"},{"match":"\`\\\\s*$","name":"keyword.other.powershell"}]},"doubleQuotedStringEscapes":{"patterns":[{"match":"\`[\\"$'0\`abefnrtv‘-„]","name":"constant.character.escape.powershell"},{"include":"#unicodeEscape"}]},"function":{"begin":"^\\\\s*+(?i)(function|filter|configuration|workflow)\\\\s+(?:(global|local|script|private):)?([-._\\\\p{L}\\\\d]+)","beginCaptures":{"0":{"name":"meta.function.powershell"},"1":{"name":"storage.type.powershell"},"2":{"name":"storage.modifier.scope.powershell"},"3":{"name":"entity.name.function.powershell"}},"end":"(?=[({])","patterns":[{"include":"#commentLine"}]},"hashtable":{"begin":"(@)(\\\\{)","beginCaptures":{"1":{"name":"keyword.other.hashtable.begin.powershell"},"2":{"name":"punctuation.section.braces.begin.powershell"}},"end":"(})","endCaptures":{"1":{"name":"punctuation.section.braces.end.powershell"}},"name":"meta.hashtable.powershell","patterns":[{"captures":{"1":{"name":"punctuation.definition.string.begin.powershell"},"2":{"name":"variable.other.readwrite.powershell"},"3":{"name":"punctuation.definition.string.end.powershell"},"4":{"name":"keyword.operator.assignment.powershell"}},"match":"\\\\b([\\"']?)(\\\\w+)([\\"']?)\\\\s+{0,1}(=)\\\\s+{0,1}","name":"meta.hashtable.assignment.powershell"},{"include":"#scriptblock"},{"include":"$self"}]},"interpolation":{"begin":"(((\\\\$)))((\\\\())","beginCaptures":{"1":{"name":"keyword.other.substatement.powershell"},"2":{"name":"punctuation.definition.substatement.powershell"},"3":{"name":"punctuation.section.embedded.substatement.begin.powershell"},"4":{"name":"punctuation.section.group.begin.powershell"},"5":{"name":"punctuation.section.embedded.substatement.begin.powershell"}},"contentName":"interpolated.complex.source.powershell","end":"(\\\\))","endCaptures":{"0":{"name":"punctuation.section.group.end.powershell"},"1":{"name":"punctuation.section.embedded.substatement.end.powershell"}},"name":"meta.embedded.substatement.powershell","patterns":[{"include":"$self"}]},"numericConstant":{"patterns":[{"captures":{"1":{"name":"constant.numeric.hex.powershell"},"2":{"name":"keyword.other.powershell"}},"match":"(?<!\\\\w)([-+]?0[Xx][_\\\\h]+(?:[LUlu]|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[gkmpt]b)?)\\\\b"},{"captures":{"1":{"name":"constant.numeric.integer.powershell"},"2":{"name":"keyword.other.powershell"}},"match":"(?<!\\\\w)([-+]?[0-9_]+{0,1}\\\\.[0-9_]+(?:[Ee][0-9]+)?[DFMdfm]?)((?i:[gkmpt]b)?)\\\\b"},{"captures":{"1":{"name":"constant.numeric.octal.powershell"},"2":{"name":"keyword.other.powershell"}},"match":"(?<!\\\\w)([-+]?0[Bb][01_]+(?:[LUlu]|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[gkmpt]b)?)\\\\b"},{"captures":{"1":{"name":"constant.numeric.integer.powershell"},"2":{"name":"keyword.other.powershell"}},"match":"(?<!\\\\w)([-+]?[0-9_]+[Ee][0-9_]?+[DFMdfm]?)((?i:[gkmpt]b)?)\\\\b"},{"captures":{"1":{"name":"constant.numeric.integer.powershell"},"2":{"name":"keyword.other.powershell"}},"match":"(?<!\\\\w)([-+]?[0-9_]+\\\\.[Ee][0-9_]?+[DFMdfm]?)((?i:[gkmpt]b)?)\\\\b"},{"captures":{"1":{"name":"constant.numeric.integer.powershell"},"2":{"name":"keyword.other.powershell"}},"match":"(?<!\\\\w)([-+]?[0-9_]+\\\\.?[DFMdfm])((?i:[gkmpt]b)?)\\\\b"},{"captures":{"1":{"name":"constant.numeric.integer.powershell"},"2":{"name":"keyword.other.powershell"}},"match":"(?<!\\\\w)([-+]?[0-9_]+\\\\.?(?:[LUlu]|UL|Ul|uL|ul|LU|Lu|lU|lu)?)((?i:[gkmpt]b)?)\\\\b"}]},"scriptblock":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.braces.begin.powershell"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.braces.end.powershell"}},"name":"meta.scriptblock.powershell","patterns":[{"include":"$self"}]},"subexpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.group.begin.powershell"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.group.end.powershell"}},"name":"meta.group.simple.subexpression.powershell","patterns":[{"include":"$self"}]},"type":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.section.bracket.begin.powershell"}},"end":"]","endCaptures":{"0":{"name":"punctuation.section.bracket.end.powershell"}},"patterns":[{"match":"(?!\\\\d+|\\\\.)[.\\\\p{L}\\\\p{N}]+","name":"storage.type.powershell"},{"include":"$self"}]},"unicodeEscape":{"patterns":[{"match":"\`u\\\\{(?:(?:10)?(\\\\h){1,4}|0?\\\\g<1>{1,5})}","name":"constant.character.escape.powershell"},{"match":"\`u(?:\\\\{\\\\h{0,6}.)?","name":"invalid.character.escape.powershell"}]},"variable":{"patterns":[{"captures":{"0":{"name":"constant.language.powershell"},"1":{"name":"punctuation.definition.variable.powershell"}},"match":"(\\\\$)(?i:(False|Null|True))\\\\b"},{"captures":{"0":{"name":"support.constant.variable.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"3":{"name":"variable.other.member.powershell"}},"match":"(\\\\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\\\\.[_\\\\p{L}\\\\d]+)*\\\\b)?\\\\b"},{"captures":{"0":{"name":"support.variable.automatic.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"3":{"name":"variable.other.member.powershell"}},"match":"(\\\\$)([$?^]|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\\\\b)((?:\\\\.[_\\\\p{L}\\\\d]+)*\\\\b)?"},{"captures":{"0":{"name":"variable.language.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"3":{"name":"variable.other.member.powershell"}},"match":"(\\\\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))((?:\\\\.[_\\\\p{L}\\\\d]+)*\\\\b)?\\\\b"},{"captures":{"0":{"name":"variable.other.readwrite.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"2":{"name":"storage.modifier.scope.powershell"},"4":{"name":"variable.other.member.powershell"}},"match":"(?i:([$@])(global|local|private|script|using|workflow):([_\\\\p{L}\\\\d]+))((?:\\\\.[_\\\\p{L}\\\\d]+)*\\\\b)?"},{"captures":{"0":{"name":"variable.other.readwrite.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"2":{"name":"punctuation.section.braces.begin.powershell"},"3":{"name":"storage.modifier.scope.powershell"},"5":{"name":"punctuation.section.braces.end.powershell"},"6":{"name":"variable.other.member.powershell"}},"match":"(?i:(\\\\$)(\\\\{)(global|local|private|script|using|workflow):([^}]*[^\`}])(}))((?:\\\\.[_\\\\p{L}\\\\d]+)*\\\\b)?"},{"captures":{"0":{"name":"variable.other.readwrite.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"2":{"name":"support.variable.drive.powershell"},"4":{"name":"variable.other.member.powershell"}},"match":"(?i:([$@])([_\\\\p{L}\\\\d]+:)?([_\\\\p{L}\\\\d]+))((?:\\\\.[_\\\\p{L}\\\\d]+)*\\\\b)?"},{"captures":{"0":{"name":"variable.other.readwrite.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"2":{"name":"punctuation.section.braces.begin.powershell"},"3":{"name":"support.variable.drive.powershell"},"5":{"name":"punctuation.section.braces.end.powershell"},"6":{"name":"variable.other.member.powershell"}},"match":"(?i:(\\\\$)(\\\\{)([_\\\\p{L}\\\\d]+:)?([^}]*[^\`}])(}))((?:\\\\.[_\\\\p{L}\\\\d]+)*\\\\b)?"}]},"variableNoProperty":{"patterns":[{"captures":{"0":{"name":"constant.language.powershell"},"1":{"name":"punctuation.definition.variable.powershell"}},"match":"(\\\\$)(?i:(False|Null|True))\\\\b"},{"captures":{"0":{"name":"support.constant.variable.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"3":{"name":"variable.other.member.powershell"}},"match":"(\\\\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))\\\\b"},{"captures":{"0":{"name":"support.variable.automatic.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"3":{"name":"variable.other.member.powershell"}},"match":"(\\\\$)([$?^]|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\\\\b)"},{"captures":{"0":{"name":"variable.language.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"3":{"name":"variable.other.member.powershell"}},"match":"(\\\\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))\\\\b"},{"captures":{"0":{"name":"variable.other.readwrite.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"2":{"name":"storage.modifier.scope.powershell"},"4":{"name":"variable.other.member.powershell"}},"match":"(?i:(\\\\$)(global|local|private|script|using|workflow):([_\\\\p{L}\\\\d]+))"},{"captures":{"0":{"name":"variable.other.readwrite.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"2":{"name":"storage.modifier.scope.powershell"},"4":{"name":"keyword.other.powershell"},"5":{"name":"variable.other.member.powershell"}},"match":"(?i:(\\\\$)(\\\\{)(global|local|private|script|using|workflow):([^}]*[^\`}])(}))"},{"captures":{"0":{"name":"variable.other.readwrite.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"2":{"name":"support.variable.drive.powershell"},"4":{"name":"variable.other.member.powershell"}},"match":"(?i:(\\\\$)([_\\\\p{L}\\\\d]+:)?([_\\\\p{L}\\\\d]+))"},{"captures":{"0":{"name":"variable.other.readwrite.powershell"},"1":{"name":"punctuation.definition.variable.powershell"},"2":{"name":"punctuation.section.braces.begin"},"3":{"name":"support.variable.drive.powershell"},"5":{"name":"punctuation.section.braces.end"}},"match":"(?i:(\\\\$)(\\\\{)([_\\\\p{L}\\\\d]+:)?([^}]*[^\`}])(}))"}]}},"scopeName":"source.powershell","aliases":["ps","ps1","pwsh"]}`)),n=[e];export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=Object.freeze(JSON.parse('{"displayName":"Diff","name":"diff","patterns":[{"captures":{"1":{"name":"punctuation.definition.separator.diff"}},"match":"^((\\\\*{15})|(={67})|(-{3}))$\\\\n?","name":"meta.separator.diff"},{"match":"^\\\\d+(,\\\\d+)*([acd])\\\\d+(,\\\\d+)*$\\\\n?","name":"meta.diff.range.normal"},{"captures":{"1":{"name":"punctuation.definition.range.diff"},"2":{"name":"meta.toc-list.line-number.diff"},"3":{"name":"punctuation.definition.range.diff"}},"match":"^(@@)\\\\s*(.+?)\\\\s*(@@)($\\\\n?)?","name":"meta.diff.range.unified"},{"captures":{"3":{"name":"punctuation.definition.range.diff"},"4":{"name":"punctuation.definition.range.diff"},"6":{"name":"punctuation.definition.range.diff"},"7":{"name":"punctuation.definition.range.diff"}},"match":"^(((-{3}) .+ (-{4}))|((\\\\*{3}) .+ (\\\\*{4})))$\\\\n?","name":"meta.diff.range.context"},{"match":"^diff --git a/.*$\\\\n?","name":"meta.diff.header.git"},{"match":"^diff (-|\\\\S+\\\\s+\\\\S+).*$\\\\n?","name":"meta.diff.header.command"},{"captures":{"4":{"name":"punctuation.definition.from-file.diff"},"6":{"name":"punctuation.definition.from-file.diff"},"7":{"name":"punctuation.definition.from-file.diff"}},"match":"^((((-{3}) .+)|((\\\\*{3}) .+))$\\\\n?|(={4}) .+(?= - ))","name":"meta.diff.header.from-file"},{"captures":{"2":{"name":"punctuation.definition.to-file.diff"},"3":{"name":"punctuation.definition.to-file.diff"},"4":{"name":"punctuation.definition.to-file.diff"}},"match":"(^(\\\\+{3}) .+$\\\\n?| (-) .* (={4})$\\\\n?)","name":"meta.diff.header.to-file"},{"captures":{"3":{"name":"punctuation.definition.inserted.diff"},"6":{"name":"punctuation.definition.inserted.diff"}},"match":"^(((>)( .*)?)|((\\\\+).*))$\\\\n?","name":"markup.inserted.diff"},{"captures":{"1":{"name":"punctuation.definition.changed.diff"}},"match":"^(!).*$\\\\n?","name":"markup.changed.diff"},{"captures":{"3":{"name":"punctuation.definition.deleted.diff"},"6":{"name":"punctuation.definition.deleted.diff"}},"match":"^(((<)( .*)?)|((-).*))$\\\\n?","name":"markup.deleted.diff"},{"begin":"^(#)","captures":{"1":{"name":"punctuation.definition.comment.diff"}},"end":"\\\\n","name":"comment.line.number-sign.diff"},{"match":"^index [0-9a-f]{7,40}\\\\.\\\\.[0-9a-f]{7,40}.*$\\\\n?","name":"meta.diff.index.git"},{"captures":{"1":{"name":"punctuation.separator.key-value.diff"},"2":{"name":"meta.toc-list.file-name.diff"}},"match":"^Index(:) (.+)$\\\\n?","name":"meta.diff.index"},{"match":"^Only in .*: .*$\\\\n?","name":"meta.diff.only-in"}],"scopeName":"source.diff"}')),e=[n];export{e as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.freeze(JSON.parse('{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&\'*,:>?@\\\\[`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&\'*,:>?@\\\\[`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&\'*,:>?@\\\\[`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&\'*,:>?@\\\\[`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&\'*,:>?@\\\\[`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&\'*,:>?@\\\\[`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\'(?!\')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"\'\'","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}')),d=[e];
|
|
2
|
+
export{d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l}from"/chunk-n2293q4w.js";export{l as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{b,o,p,_,i,y,u}from"/chunk-99ac747k.js";var v=class extends Error{constructor(t){super(t);this.name="ShikiError"}};function ln(t){return Le(t)}function Le(t){if(Array.isArray(t))return un(t);if(t instanceof RegExp)return t;if(typeof t==="object")return hn(t);return t}function un(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Le(t[n]);return e}function hn(t){let e={};for(let n in t)e[n]=Le(t[n]);return e}function tt(t,...e){return e.forEach((n)=>{for(let r in n)t[r]=n[r]}),t}function nt(t){let e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");if(e===0)return t;else if(~e===t.length-1)return nt(t.substring(0,t.length-1));else return t.substr(~e+1)}var Ne=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,re=class{static hasCaptures(t){if(t===null)return!1;return Ne.lastIndex=0,Ne.test(t)}static replaceCaptures(t,e,n){return t.replace(Ne,(r,s,a,c)=>{let l=n[parseInt(s||a,10)];if(l){let h=e.substring(l.start,l.end);while(h[0]===".")h=h.substring(1);switch(c){case"downcase":return h.toLowerCase();case"upcase":return h.toUpperCase();default:return h}}else return r})}};function rt(t,e){if(t<e)return-1;if(t>e)return 1;return 0}function st(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let s=0;s<n;s++){let a=rt(t[s],e[s]);if(a!==0)return a}return 0}return n-r}function Ke(t){if(/^#[0-9a-f]{6}$/i.test(t))return!0;if(/^#[0-9a-f]{8}$/i.test(t))return!0;if(/^#[0-9a-f]{3}$/i.test(t))return!0;if(/^#[0-9a-f]{4}$/i.test(t))return!0;return!1}function it(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ot=class{constructor(t){this.fn=t}cache=new Map;get(t){if(this.cache.has(t))return this.cache.get(t);let e=this.fn(t);return this.cache.set(t,e),e}},z=class{constructor(t,e,n){this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(mn(t),e)}static createFromParsedTheme(t,e){return pn(t,e)}_cachedMatchRoot=new ot((t)=>this._root.match(t));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;let e=t.scopeName,r=this._cachedMatchRoot.get(e).find((s)=>fn(t.parent,s.parentScopes));if(!r)return null;return new at(r.fontStyle,r.foreground,r.background)}},Te=class t{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(let r of n)e=new t(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new t(n,e[r]);return n}push(e){return new t(this,e)}getSegments(){let e=this,n=[];while(e)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){if(this===e)return!0;if(this.parent===null)return!1;return this.parent.extends(e)}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function fn(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],s=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],s=!0}while(t){if(dn(t.scopeName,r))break;if(s)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function dn(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var at=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function mn(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let s=0,a=e.length;s<a;s++){let c=e[s];if(!c.settings)continue;let l;if(typeof c.scope==="string"){let m=c.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),l=m.split(",")}else if(Array.isArray(c.scope))l=c.scope;else l=[""];let h=-1;if(typeof c.settings.fontStyle==="string"){h=0;let m=c.settings.fontStyle.split(" ");for(let S=0,g=m.length;S<g;S++)switch(m[S]){case"italic":h=h|1;break;case"bold":h=h|2;break;case"underline":h=h|4;break;case"strikethrough":h=h|8;break}}let f=null;if(typeof c.settings.foreground==="string"&&Ke(c.settings.foreground))f=c.settings.foreground;let d=null;if(typeof c.settings.background==="string"&&Ke(c.settings.background))d=c.settings.background;for(let m=0,S=l.length;m<S;m++){let w=l[m].trim().split(" "),N=w[w.length-1],R=null;if(w.length>1)R=w.slice(0,w.length-1),R.reverse();n[r++]=new gn(N,R,s,h,f,d)}}return n}var gn=class{constructor(t,e,n,r,s,a){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=s,this.background=a}},x=((t)=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(x||{});function pn(t,e){t.sort((h,f)=>{let d=rt(h.scope,f.scope);if(d!==0)return d;if(d=st(h.parentScopes,f.parentScopes),d!==0)return d;return h.index-f.index});let n=0,r="#000000",s="#ffffff";while(t.length>=1&&t[0].scope===""){let h=t.shift();if(h.fontStyle!==-1)n=h.fontStyle;if(h.foreground!==null)r=h.foreground;if(h.background!==null)s=h.background}let a=new _n(e),c=new at(n,a.getId(r),a.getId(s)),l=new bn(new Ae(0,null,-1,0,0),[]);for(let h=0,f=t.length;h<f;h++){let d=t[h];l.insert(0,d.scope,d.parentScopes,d.fontStyle,a.getId(d.foreground),a.getId(d.background))}return new z(a,c,l)}var _n=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(t){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},yn=Object.freeze([]),Ae=class t{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,n,r,s,a){this.scopeDepth=e,this.parentScopes=n||yn,this.fontStyle=r,this.foreground=s,this.background=a}clone(){return new t(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,s=e.length;r<s;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,s){if(this.scopeDepth>e)console.log("how did this happen?");else this.scopeDepth=e;if(n!==-1)this.fontStyle=n;if(r!==0)this.foreground=r;if(s!==0)this.background=s}},bn=class t{constructor(e,n=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,s=0;while(!0){if(e.parentScopes[r]===">")r++;if(n.parentScopes[s]===">")s++;if(r>=e.parentScopes.length||s>=n.parentScopes.length)break;let a=n.parentScopes[s].length-e.parentScopes[r].length;if(a!==0)return a;r++,s++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,a;if(r===-1)s=e,a="";else s=e.substring(0,r),a=e.substring(r+1);if(this._children.hasOwnProperty(s))return this._children[s].match(a)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(t._cmpBySpecificity),n}insert(e,n,r,s,a,c){if(n===""){this._doInsertHere(e,r,s,a,c);return}let l=n.indexOf("."),h,f;if(l===-1)h=n,f="";else h=n.substring(0,l),f=n.substring(l+1);let d;if(this._children.hasOwnProperty(h))d=this._children[h];else d=new t(this._mainRule.clone(),Ae.cloneArr(this._rulesWithParentScopes)),this._children[h]=d;d.insert(e+1,f,r,s,a,c)}_doInsertHere(e,n,r,s,a){if(n===null){this._mainRule.acceptOverwrite(e,r,s,a);return}for(let c=0,l=this._rulesWithParentScopes.length;c<l;c++){let h=this._rulesWithParentScopes[c];if(st(h.parentScopes,n)===0){h.acceptOverwrite(e,r,s,a);return}}if(r===-1)r=this._mainRule.fontStyle;if(s===0)s=this._mainRule.foreground;if(a===0)a=this._mainRule.background;this._rulesWithParentScopes.push(new Ae(e,n,r,s,a))}},M=class t{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){let n=t.getLanguageId(e),r=t.getTokenType(e),s=t.getFontStyle(e),a=t.getForeground(e),c=t.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:a,background:c})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,s,a,c,l){let h=t.getLanguageId(e),f=t.getTokenType(e),d=t.containsBalancedBrackets(e)?1:0,m=t.getFontStyle(e),S=t.getForeground(e),g=t.getBackground(e);if(n!==0)h=n;if(r!==8)f=wn(r);if(s!==null)d=s?1:0;if(a!==-1)m=a;if(c!==0)S=c;if(l!==0)g=l;return(h<<0|f<<8|d<<10|m<<11|S<<15|g<<24)>>>0}};function Sn(t){return t}function wn(t){return t}function ie(t,e){let n=[],r=Cn(t),s=r.next();while(s!==null){let h=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":h=1;break;case"L":h=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let f=c();if(n.push({matcher:f,priority:h}),s!==",")break;s=r.next()}return n;function a(){if(s==="-"){s=r.next();let h=a();return(f)=>!!h&&!h(f)}if(s==="("){s=r.next();let h=l();if(s===")")s=r.next();return h}if(Ve(s)){let h=[];do h.push(s),s=r.next();while(Ve(s));return(f)=>e(h,f)}return null}function c(){let h=[],f=a();while(f)h.push(f),f=a();return(d)=>h.every((m)=>m(d))}function l(){let h=[],f=c();while(f){if(h.push(f),s==="|"||s===",")do s=r.next();while(s==="|"||s===",");else break;f=c()}return(d)=>h.some((m)=>m(d))}}function Ve(t){return!!t&&!!t.match(/[\w\.:]+/)}function Cn(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;let r=n[0];return n=e.exec(t),r}}}function ct(t){if(typeof t.dispose==="function")t.dispose()}var U=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},kn=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Rn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(t){let e=t.toKey();if(this._seenReferenceKeys.has(e))return;this._seenReferenceKeys.add(e),this._references.push(t)}},Nn=class{constructor(t,e){this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new U(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let t=this.Q;this.Q=[];let e=new Rn;for(let n of t)Tn(n,this.initialScopeName,this.repo,e);for(let n of e.references)if(n instanceof U){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 Tn(t,e,n,r){let s=n.lookup(t.scopeName);if(!s){if(t.scopeName===e)throw Error(`No grammar provided for <${e}>`);return}let a=n.lookup(e);if(t instanceof U)se({baseGrammar:a,selfGrammar:s},r);else Ee(t.ruleName,{baseGrammar:a,selfGrammar:s,repository:s.repository},r);let c=n.injections(t.scopeName);if(c)for(let l of c)r.add(new U(l))}function Ee(t,e,n){if(e.repository&&e.repository[t]){let r=e.repository[t];oe([r],e,n)}}function se(t,e){if(t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns))oe(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e);if(t.selfGrammar.injections)oe(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function oe(t,e,n){for(let r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let s=r.repository?tt({},e.repository,r.repository):e.repository;if(Array.isArray(r.patterns))oe(r.patterns,{...e,repository:s},n);let a=r.include;if(!a)continue;let c=lt(a);switch(c.kind){case 0:se({...e,selfGrammar:e.baseGrammar},n);break;case 1:se(e,n);break;case 2:Ee(c.ruleName,{...e,repository:s},n);break;case 3:case 4:let l=c.scopeName===e.selfGrammar.scopeName?e.selfGrammar:c.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){let h={baseGrammar:e.baseGrammar,selfGrammar:l,repository:s};if(c.kind===4)Ee(c.ruleName,h,n);else se(h,n)}else if(c.kind===4)n.add(new kn(c.scopeName,c.ruleName));else n.add(new U(c.scopeName));break}}}var vn=class{kind=0},An=class{kind=1},En=class{constructor(t){this.ruleName=t}kind=2},xn=class{constructor(t){this.scopeName=t}kind=3},In=class{constructor(t,e){this.scopeName=t,this.ruleName=e}kind=4};function lt(t){if(t==="$base")return new vn;else if(t==="$self")return new An;let e=t.indexOf("#");if(e===-1)return new xn(t);else if(e===0)return new En(t.substring(1));else{let n=t.substring(0,e),r=t.substring(e+1);return new In(n,r)}}var Ln=/\\(\d+)/,Ye=/\\(\d+)/g,Rs=Symbol("RuleId"),Pn=-1,ut=-2;function ht(t){return t}function ft(t){return t}var Y=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(t,e,n,r){this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=re.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=re.hasCaptures(this._contentName)}get debugName(){let t=this.$location?`${nt(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){if(!this._nameIsCapturing||this._name===null||t===null||e===null)return this._name;return re.replaceCaptures(this._name,t,e)}getContentName(t,e){if(!this._contentNameIsCapturing||this._contentName===null)return this._contentName;return re.replaceCaptures(this._contentName,t,e)}},Gn=class extends Y{retokenizeCapturedWithRuleId;constructor(t,e,n,r,s){super(t,e,n,r);this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(t,e){throw Error("Not supported!")}compile(t,e){throw Error("Not supported!")}compileAG(t,e,n,r){throw Error("Not supported!")}},Bn=class extends Y{_match;captures;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,null);this._match=new K(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,e){e.push(this._match)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new V,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},Je=class extends Y{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s){super(t,e,n,r);this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}collectPatterns(t,e){for(let n of this.patterns)t.getRule(n).collectPatterns(t,e)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns)this._cachedCompiledPatterns=new V,this.collectPatterns(t,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}},xe=class extends Y{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(t,e,n,r,s,a,c,l,h,f){super(t,e,n,r);this._begin=new K(s,this.id),this.beginCaptures=a,this._end=new K(c?c:"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=h||!1,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,e){return this._end.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t,e).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t,e).compileAG(t,n,r)}_getCachedCompiledPatterns(t,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new V;for(let n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns);if(this.applyEndPatternLast)this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end);else this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}if(this._end.hasBackReferences)if(this.applyEndPatternLast)this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e);else this._cachedCompiledPatterns.setSource(0,e);return this._cachedCompiledPatterns}},ae=class extends Y{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(t,e,n,r,s,a,c,l,h){super(t,e,n,r);this._begin=new K(s,this.id),this.beginCaptures=a,this.whileCaptures=l,this._while=new K(c,ut),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){if(this._cachedCompiledPatterns)this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null;if(this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,e){return this._while.resolveBackReferences(t,e)}collectPatterns(t,e){e.push(this._begin)}compile(t,e){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,e,n,r){return this._getCachedCompiledPatterns(t).compileAG(t,n,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new V;for(let e of this.patterns)t.getRule(e).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,e){return this._getCachedCompiledWhilePatterns(t,e).compile(t)}compileWhileAG(t,e,n,r){return this._getCachedCompiledWhilePatterns(t,e).compileAG(t,n,r)}_getCachedCompiledWhilePatterns(t,e){if(!this._cachedCompiledWhilePatterns)this._cachedCompiledWhilePatterns=new V,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while);if(this._while.hasBackReferences)this._cachedCompiledWhilePatterns.setSource(0,e?e:"");return this._cachedCompiledWhilePatterns}},dt=class t{static createCaptureRule(e,n,r,s,a){return e.registerRule((c)=>new Gn(n,c,r,s,a))}static getCompiledRuleId(e,n,r){if(!e.id)n.registerRule((s)=>{if(e.id=s,e.match)return new Bn(e.$vscodeTextmateLocation,e.id,e.name,e.match,t._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){if(e.repository)r=tt({},r,e.repository);let a=e.patterns;if(typeof a>"u"&&e.include)a=[{include:e.include}];return new Je(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,t._compilePatterns(a,n,r))}if(e.while)return new ae(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,t._compileCaptures(e.whileCaptures||e.captures,n,r),t._compilePatterns(e.patterns,n,r));return new xe(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,t._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,t._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,t._compilePatterns(e.patterns,n,r))});return e.id}static _compileCaptures(e,n,r){let s=[];if(e){let a=0;for(let c in e){if(c==="$vscodeTextmateLocation")continue;let l=parseInt(c,10);if(l>a)a=l}for(let c=0;c<=a;c++)s[c]=null;for(let c in e){if(c==="$vscodeTextmateLocation")continue;let l=parseInt(c,10),h=0;if(e[c].patterns)h=t.getCompiledRuleId(e[c],n,r);s[l]=t.createCaptureRule(n,e[c].$vscodeTextmateLocation,e[c].name,e[c].contentName,h)}}return s}static _compilePatterns(e,n,r){let s=[];if(e)for(let a=0,c=e.length;a<c;a++){let l=e[a],h=-1;if(l.include){let f=lt(l.include);switch(f.kind){case 0:case 1:h=t.getCompiledRuleId(r[l.include],n,r);break;case 2:let d=r[f.ruleName];if(d)h=t.getCompiledRuleId(d,n,r);break;case 3:case 4:let m=f.scopeName,S=f.kind===4?f.ruleName:null,g=n.getExternalGrammar(m,r);if(g)if(S){let w=g.repository[S];if(w)h=t.getCompiledRuleId(w,n,g.repository)}else h=t.getCompiledRuleId(g.repository.$self,n,g.repository);break}}else h=t.getCompiledRuleId(l,n,r);if(h!==-1){let f=n.getRule(h),d=!1;if(f instanceof Je||f instanceof xe||f instanceof ae){if(f.hasMissingPatterns&&f.patterns.length===0)d=!0}if(d)continue;s.push(h)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},K=class t{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,n){if(e&&typeof e==="string"){let r=e.length,s=0,a=[],c=!1;for(let l=0;l<r;l++)if(e.charAt(l)==="\\"){if(l+1<r){let f=e.charAt(l+1);if(f==="z")a.push(e.substring(s,l)),a.push("$(?!\\n)(?<!\\n)"),s=l+2;else if(f==="A"||f==="G")c=!0;l++}}if(this.hasAnchor=c,s===0)this.source=e;else a.push(e.substring(s,r)),this.source=a.join("")}else this.hasAnchor=!1,this.source=e;if(this.hasAnchor)this._anchorCache=this._buildAnchorCache();else this._anchorCache=null;if(this.ruleId=n,typeof this.source==="string")this.hasBackReferences=Ln.test(this.source);else this.hasBackReferences=!1}clone(){return new t(this.source,this.ruleId)}setSource(e){if(this.source===e)return;if(this.source=e,this.hasAnchor)this._anchorCache=this._buildAnchorCache()}resolveBackReferences(e,n){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let r=n.map((s)=>e.substring(s.start,s.end));return Ye.lastIndex=0,this.source.replace(Ye,(s,a)=>it(r[parseInt(a,10)]||""))}_buildAnchorCache(){if(typeof this.source!=="string")throw Error("This method should only be called if the source is a string");let e=[],n=[],r=[],s=[],a,c,l,h;for(a=0,c=this.source.length;a<c;a++)if(l=this.source.charAt(a),e[a]=l,n[a]=l,r[a]=l,s[a]=l,l==="\\"){if(a+1<c){if(h=this.source.charAt(a+1),h==="A")e[a+1]="",n[a+1]="",r[a+1]="A",s[a+1]="A";else if(h==="G")e[a+1]="",n[a+1]="G",r[a+1]="",s[a+1]="G";else e[a+1]=h,n[a+1]=h,r[a+1]=h,s[a+1]=h;a++}}return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,n){if(!this.hasAnchor||!this._anchorCache||typeof this.source!=="string")return this.source;if(e)if(n)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;else if(n)return this._anchorCache.A0_G1;else return this._anchorCache.A0_G0}},V=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(){if(this._cached)this._cached.dispose(),this._cached=null;if(this._anchorCache.A0_G0)this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null;if(this._anchorCache.A0_G1)this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null;if(this._anchorCache.A1_G0)this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null;if(this._anchorCache.A1_G1)this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){if(this._items[t].source!==e)this._disposeCaches(),this._items[t].setSource(e)}compile(t){if(!this._cached){let e=this._items.map((n)=>n.source);this._cached=new Qe(t,e,this._items.map((n)=>n.ruleId))}return this._cached}compileAG(t,e,n){if(!this._hasAnchors)return this.compile(t);else if(e)if(n){if(!this._anchorCache.A1_G1)this._anchorCache.A1_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G1}else{if(!this._anchorCache.A1_G0)this._anchorCache.A1_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A1_G0}else if(n){if(!this._anchorCache.A0_G1)this._anchorCache.A0_G1=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G1}else{if(!this._anchorCache.A0_G0)this._anchorCache.A0_G0=this._resolveAnchors(t,e,n);return this._anchorCache.A0_G0}}_resolveAnchors(t,e,n){let r=this._items.map((s)=>s.resolveAnchors(e,n));return new Qe(t,r,this._items.map((s)=>s.ruleId))}},Qe=class{constructor(t,e,n){this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}scanner;dispose(){if(typeof this.scanner.dispose==="function")this.scanner.dispose()}toString(){let t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
|
|
2
|
+
`)}findNextMatchSync(t,e,n){let r=this.scanner.findNextMatchSync(t,e,n);if(!r)return null;return{ruleId:this.rules[r.index],captureIndices:r.captureIndices}}},ve=class{constructor(t,e){this.languageId=t,this.tokenType=e}},On=class t{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,n){this._defaultAttributes=new ve(e,8),this._embeddedLanguagesMatcher=new $n(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){if(e===null)return t._NULL_SCOPE_METADATA;return this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new ve(0,0);_getBasicScopeAttributes=new ot((e)=>{let n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new ve(n,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){let n=e.match(t.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 Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},$n=class{values;scopesRegExp;constructor(t){if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);let e=t.map(([n,r])=>it(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;let e=t.match(this.scopesRegExp);if(!e)return;return this.values.get(e[1])}},Ns={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},mt=!1,Xe=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function gt(t,e,n,r,s,a,c,l){let h=e.content.length,f=!1,d=-1;if(c){let g=Mn(t,e,n,r,s,a);s=g.stack,r=g.linePos,n=g.isFirstLine,d=g.anchorPosition}let m=Date.now();while(!f){if(l!==0){if(Date.now()-m>l)return new Xe(s,!0)}S()}return new Xe(s,!1);function S(){let g=jn(t,e,n,r,s,d);if(!g){a.produce(s,h),f=!0;return}let{captureIndices:w,matchedRuleId:N}=g,R=w&&w.length>0?w[0].end>r:!1;if(N===Pn){let k=s.getRule(t);a.produce(s,w[0].start),s=s.withContentNameScopesList(s.nameScopesList),H(t,e,n,s,a,k.endCaptures,w),a.produce(s,w[0].end);let C=s;if(s=s.parent,d=C.getAnchorPos(),!R&&C.getEnterPos()===r){s=C,a.produce(s,h),f=!0;return}}else{let k=t.getRule(N);a.produce(s,w[0].start);let C=s,T=k.getName(e.content,w),E=s.contentNameScopesList.pushAttributed(T,t);if(s=s.push(N,r,d,w[0].end===h,null,E,E),k instanceof xe){let I=k;H(t,e,n,s,a,I.beginCaptures,w),a.produce(s,w[0].end),d=w[0].end;let L=I.getContentName(e.content,w),O=E.pushAttributed(L,t);if(s=s.withContentNameScopesList(O),I.endHasBackReferences)s=s.withEndRule(I.getEndWithResolvedBackReferences(e.content,w));if(!R&&C.hasSameRuleAs(s)){s=s.pop(),a.produce(s,h),f=!0;return}}else if(k instanceof ae){let I=k;H(t,e,n,s,a,I.beginCaptures,w),a.produce(s,w[0].end),d=w[0].end;let L=I.getContentName(e.content,w),O=E.pushAttributed(L,t);if(s=s.withContentNameScopesList(O),I.whileHasBackReferences)s=s.withEndRule(I.getWhileWithResolvedBackReferences(e.content,w));if(!R&&C.hasSameRuleAs(s)){s=s.pop(),a.produce(s,h),f=!0;return}}else if(H(t,e,n,s,a,k.captures,w),a.produce(s,w[0].end),s=s.pop(),!R){s=s.safePop(),a.produce(s,h),f=!0;return}}if(w[0].end>r)r=w[0].end,n=!1}}function Mn(t,e,n,r,s,a){let c=s.beginRuleCapturedEOL?0:-1,l=[];for(let h=s;h;h=h.pop()){let f=h.getRule(t);if(f instanceof ae)l.push({rule:f,stack:h})}for(let h=l.pop();h;h=l.pop()){let{ruleScanner:f,findOptions:d}=Wn(h.rule,t,h.stack.endRule,n,r===c),m=f.findNextMatchSync(e,r,d);if(m){if(m.ruleId!==ut){s=h.stack.pop();break}if(m.captureIndices&&m.captureIndices.length){if(a.produce(h.stack,m.captureIndices[0].start),H(t,e,n,h.stack,a,h.rule.whileCaptures,m.captureIndices),a.produce(h.stack,m.captureIndices[0].end),c=m.captureIndices[0].end,m.captureIndices[0].end>r)r=m.captureIndices[0].end,n=!1}}else{s=h.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:c,isFirstLine:n}}function jn(t,e,n,r,s,a){let c=Fn(t,e,n,r,s,a),l=t.getInjections();if(l.length===0)return c;let h=Dn(l,t,e,n,r,s,a);if(!h)return c;if(!c)return h;let f=c.captureIndices[0].start,d=h.captureIndices[0].start;if(d<f||h.priorityMatch&&d===f)return h;return c}function Fn(t,e,n,r,s,a){let c=s.getRule(t),{ruleScanner:l,findOptions:h}=pt(c,t,s.endRule,n,r===a),f=l.findNextMatchSync(e,r,h);if(f)return{captureIndices:f.captureIndices,matchedRuleId:f.ruleId};return null}function Dn(t,e,n,r,s,a,c){let l=Number.MAX_VALUE,h=null,f,d=0,m=a.contentNameScopesList.getScopeNames();for(let S=0,g=t.length;S<g;S++){let w=t[S];if(!w.matcher(m))continue;let N=e.getRule(w.ruleId),{ruleScanner:R,findOptions:k}=pt(N,e,null,r,s===c),C=R.findNextMatchSync(n,s,k);if(!C)continue;let T=C.captureIndices[0].start;if(T>=l)continue;if(l=T,h=C.captureIndices,f=C.ruleId,d=w.priority,l===s)break}if(h)return{priorityMatch:d===-1,captureIndices:h,matchedRuleId:f};return null}function pt(t,e,n,r,s){if(mt){let c=t.compile(e,n),l=_t(r,s);return{ruleScanner:c,findOptions:l}}return{ruleScanner:t.compileAG(e,n,r,s),findOptions:0}}function Wn(t,e,n,r,s){if(mt){let c=t.compileWhile(e,n),l=_t(r,s);return{ruleScanner:c,findOptions:l}}return{ruleScanner:t.compileWhileAG(e,n,r,s),findOptions:0}}function _t(t,e){let n=0;if(!t)n|=1;if(!e)n|=4;return n}function H(t,e,n,r,s,a,c){if(a.length===0)return;let l=e.content,h=Math.min(a.length,c.length),f=[],d=c[0].end;for(let m=0;m<h;m++){let S=a[m];if(S===null)continue;let g=c[m];if(g.length===0)continue;if(g.start>d)break;while(f.length>0&&f[f.length-1].endPos<=g.start)s.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0)s.produceFromScopes(f[f.length-1].scopes,g.start);else s.produce(r,g.start);if(S.retokenizeCapturedWithRuleId){let N=S.getName(l,c),R=r.contentNameScopesList.pushAttributed(N,t),k=S.getContentName(l,c),C=R.pushAttributed(k,t),T=r.push(S.retokenizeCapturedWithRuleId,g.start,-1,!1,null,R,C),E=t.createOnigString(l.substring(0,g.end));gt(t,E,n&&g.start===0,g.start,T,s,!1,0),ct(E);continue}let w=S.getName(l,c);if(w!==null){let R=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(w,t);f.push(new Hn(R,g.end))}}while(f.length>0)s.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var Hn=class{scopes;endPos;constructor(t,e){this.scopes=t,this.endPos=e}};function qn(t,e,n,r,s,a,c,l){return new Un(t,e,n,r,s,a,c,l)}function Ze(t,e,n,r,s){let a=ie(e,ce),c=dt.getCompiledRuleId(n,r,s.repository);for(let l of a)t.push({debugSelector:e,matcher:l.matcher,ruleId:c,grammar:s,priority:l.priority})}function ce(t,e){if(e.length<t.length)return!1;let n=0;return t.every((r)=>{for(let s=n;s<e.length;s++)if(zn(e[s],r))return n=s+1,!0;return!1})}function zn(t,e){if(!t)return!1;if(t===e)return!0;let n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var Un=class{constructor(t,e,n,r,s,a,c,l){if(this._rootScopeName=t,this.balancedBracketSelectors=a,this._onigLib=l,this._basicScopeAttributesProvider=new On(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=c,this._grammar=et(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(let h of Object.keys(s)){let f=ie(h,ce);for(let d of f)this._tokenTypeMatchers.push({matcher:d.matcher,type:s[h]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let t of this._ruleId2desc)if(t)t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){let t={lookup:(s)=>{if(s===this._rootScopeName)return this._grammar;return this.getExternalGrammar(s)},injections:(s)=>this._grammarRepository.injections(s)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){let s=r.injections;if(s)for(let c in s)Ze(e,c,s[c],this,r);let a=this._grammarRepository.injections(n);if(a)a.forEach((c)=>{let l=this.getExternalGrammar(c);if(l){let h=l.injectionSelector;if(h)Ze(e,h,l,this,l)}})}return e.sort((s,a)=>s.priority-a.priority),e}getInjections(){if(this._injections===null)this._injections=this._collectInjections();return this._injections}registerRule(t){let e=++this._lastRuleId,n=t(ht(e));return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[ft(t)]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];else if(this._grammarRepository){let n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=et(n,e&&e.$base),this._includedGrammars[t]}return}tokenizeLine(t,e,n=0){let r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){let r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){if(this._rootId===-1)this._rootId=dt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections();let s;if(!e||e===Ie.NULL){s=!0;let f=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),m=M.set(0,f.languageId,f.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),S=this.getRule(this._rootId).getName(null,null),g;if(S)g=q.createRootAndLookUpScopeName(S,m,this);else g=q.createRoot("unknown",m);e=new Ie(null,this._rootId,-1,-1,!1,null,g,g)}else s=!1,e.reset();t=t+`
|
|
3
|
+
`;let a=this.createOnigString(t),c=a.content.length,l=new Vn(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),h=gt(this,a,s,0,e,l,!0,r);return ct(a),{lineLength:c,lineTokens:l,ruleStack:h.stack,stoppedEarly:h.stoppedEarly}}};function et(t,e){return t=ln(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var q=class t{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,s=e?.scopePath??null;for(let a of n)s=Te.push(s,a.scopeNames),r=new t(r,s,a.encodedTokenAttributes);return r}static createRoot(e,n){return new t(null,new Te(null,e),n)}static createRootAndLookUpScopeName(e,n,r){let s=r.getMetadataForScope(e),a=new Te(null,e),c=r.themeProvider.themeMatch(a),l=t.mergeAttributes(n,s,c);return new t(null,a,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return t.equals(this,e)}static equals(e,n){do{if(e===n)return!0;if(!e&&!n)return!0;if(!e||!n)return!1;if(e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let s=-1,a=0,c=0;if(r!==null)s=r.fontStyle,a=r.foregroundId,c=r.backgroundId;return M.set(e,n.languageId,n.tokenType,null,s,a,c)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return t._pushAttributed(this,e,n);let r=e.split(/ /g),s=this;for(let a of r)s=t._pushAttributed(s,a,n);return s}static _pushAttributed(e,n,r){let s=r.getMetadataForScope(n),a=e.scopePath.push(n),c=r.themeProvider.themeMatch(a),l=t.mergeAttributes(e.tokenAttributes,s,c);return new t(e,a,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let n=[],r=this;while(r&&r!==e)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?n.reverse():void 0}},Ie=class t{constructor(e,n,r,s,a,c,l,h){this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=a,this.endRule=c,this.nameScopesList=l,this.contentNameScopesList=h,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new t(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){if(e===null)return!1;return t._equals(this,e)}static _equals(e,n){if(e===n)return!0;if(!this._structuralEquals(e,n))return!1;return q.equals(e.contentNameScopesList,n.contentNameScopesList)}static _structuralEquals(e,n){do{if(e===n)return!0;if(!e&&!n)return!0;if(!e||!n)return!1;if(e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){while(e)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){t._reset(this)}pop(){return this.parent}safePop(){if(this.parent)return this.parent;return this}push(e,n,r,s,a,c,l){return new t(this,e,n,r,s,a,c,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){if(this.parent)n=this.parent._writeString(e,n);return e[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(e){if(this.contentNameScopesList===e)return this;return this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){if(this.endRule===e)return this;return new t(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;while(n&&n._enterPos===e._enterPos){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:ft(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,n){let r=q.fromExtension(e?.nameScopesList??null,n.nameScopesList);return new t(e,ht(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,q.fromExtension(r,n.contentNameScopesList))}},Kn=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(t,e){this.balancedBracketScopes=t.flatMap((n)=>{if(n==="*")return this.allowAny=!0,[];return ie(n,ce).map((r)=>r.matcher)}),this.unbalancedBracketScopes=e.flatMap((n)=>ie(n,ce).map((r)=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(let e of this.unbalancedBracketScopes)if(e(t))return!1;for(let e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Vn=class{constructor(t,e,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=t?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways)s=!0;if(this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let a=t?.getScopeNames()??[];for(let c of this._tokenTypeOverrides)if(c.matcher(a))r=M.set(r,0,Sn(c.type),null,-1,0,0);if(this.balancedBracketSelectors)s=this.balancedBracketSelectors.match(a)}if(s)r=M.set(r,0,8,s,-1,0,0);if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}let n=t?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){if(this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1)this._tokens.pop();if(this._tokens.length===0)this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0;return this._tokens}getBinaryResult(t,e){if(this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1)this._binaryTokens.pop(),this._binaryTokens.pop();if(this._binaryTokens.length===0)this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0;let n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},Yn=class{constructor(t,e){this._onigLib=e,this._theme=t}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){if(this._rawGrammars.set(t.scopeName,t),e)this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,s){if(!this._grammars.has(t)){let a=this._rawGrammars.get(t);if(!a)return null;this._grammars.set(t,qn(t,a,e,n,r,s,this,this._onigLib))}return this._grammars.get(t)}},yt=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Yn(z.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,e){this._syncRegistry.setTheme(z.createFromRawTheme(t,e))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,e,n){return this.loadGrammarWithConfiguration(t,e,{embeddedLanguages:n})}loadGrammarWithConfiguration(t,e,n){return this._loadGrammar(t,e,n.embeddedLanguages,n.tokenTypes,new Kn(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,e,n,r,s){let a=new Nn(this._syncRegistry,t);while(a.Q.length>0)a.Q.map((c)=>this._loadSingleGrammar(c.scopeName)),a.processQueue();return this._grammarForScopeName(t,e,n,r,s)}_loadSingleGrammar(t){if(!this._ensureGrammarCache.has(t))this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0)}_doLoadSingleGrammar(t){let e=this._options.loadGrammar(t);if(e){let n=typeof this._options.getInjections==="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(e,n)}}addGrammar(t,e=[],n=0,r=null){return this._syncRegistry.addGrammar(t,e),this._grammarForScopeName(t.scopeName,n,r)}_grammarForScopeName(t,e=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(t,e,n,r,s)}},le=Ie.NULL;function Q(t,e){let n=typeof t==="string"?{}:{...t.colorReplacements},r=typeof t==="string"?t:t.name;for(let[s,a]of Object.entries(e?.colorReplacements||{}))if(typeof a==="string")n[s]=a;else if(s===r)Object.assign(n,a);return n}function G(t,e){if(!t)return t;return e?.[t?.toLowerCase()]||t}function kt(t){return Array.isArray(t)?t:[t]}async function Pe(t){return Promise.resolve(typeof t==="function"?t():t).then((e)=>e.default||e)}function X(t){return!t||["plaintext","txt","text","plain"].includes(t)}function Rt(t){return t==="ansi"||X(t)}function Z(t){return t==="none"}function Nt(t){return Z(t)}var Jn=/(\r?\n)/g;function D(t,e=!1){if(t.length===0)return[["",0]];let n=t.split(Jn),r=0,s=[];for(let a=0;a<n.length;a+=2){let c=e?n[a]+(n[a+1]||""):n[a];s.push([c,r]),r+=n[a].length,r+=n[a+1]?.length||0}return s}var bt={light:"#333333",dark:"#bbbbbb"},St={light:"#fffffe",dark:"#1e1e1e"},wt="__shiki_resolved";function ue(t){if(t?.[wt])return t;let e={...t};if(e.tokenColors&&!e.settings)e.settings=e.tokenColors,delete e.tokenColors;e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:n,fg:r}=e;if(!n||!r){let l=e.settings?e.settings.find((h)=>!h.name&&!h.scope):void 0;if(l?.settings?.foreground)r=l.settings.foreground;if(l?.settings?.background)n=l.settings.background;if(!r&&e?.colors?.["editor.foreground"])r=e.colors["editor.foreground"];if(!n&&e?.colors?.["editor.background"])n=e.colors["editor.background"];if(!r)r=e.type==="light"?bt.light:bt.dark;if(!n)n=e.type==="light"?St.light:St.dark;e.fg=r,e.bg=n}if(!(e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope))e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0,a=new Map;function c(l){if(a.has(l))return a.get(l);s+=1;let h=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;if(e.colorReplacements?.[`#${h}`])return c(l);return a.set(l,h),h}e.settings=e.settings.map((l)=>{let h=l.settings?.foreground&&!l.settings.foreground.startsWith("#"),f=l.settings?.background&&!l.settings.background.startsWith("#");if(!h&&!f)return l;let d={...l,settings:{...l.settings}};if(h){let m=c(l.settings.foreground);e.colorReplacements[m]=l.settings.foreground,d.settings.foreground=m}if(f){let m=c(l.settings.background);e.colorReplacements[m]=l.settings.background,d.settings.background=m}return d});for(let l of Object.keys(e.colors||{}))if(l==="editor.foreground"||l==="editor.background"||l.startsWith("terminal.ansi")){if(!e.colors[l]?.startsWith("#")){let h=c(e.colors[l]);e.colorReplacements[h]=e.colors[l],e.colors[l]=h}}return Object.defineProperty(e,wt,{enumerable:!1,writable:!1,value:!0}),e}async function Tt(t){return[...new Set((await Promise.all(t.filter((e)=>!Rt(e)).map(async(e)=>await Pe(e).then((n)=>Array.isArray(n)?n:[n])))).flat())]}async function vt(t){return(await Promise.all(t.map(async(e)=>Nt(e)?null:ue(await Pe(e))))).filter((e)=>!!e)}function At(t,e){if(!e)return t;if(e[t]){let n=new Set([t]);while(e[t]){if(t=e[t],n.has(t))throw new v(`Circular alias \`${[...n].join(" -> ")} -> ${t}\``);n.add(t)}}return t}var Qn=class extends yt{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,e,n,r={}){super(t);this._resolver=t,this._themes=e,this._langs=n,this._alias=r,this._themes.map((s)=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){if(typeof t==="string")return this._resolvedThemes.get(t);else return this.loadTheme(t)}loadTheme(t){let e=ue(t);if(e.name)this._resolvedThemes.set(e.name,e),this._loadedThemesCache=null;return e}getLoadedThemes(){if(!this._loadedThemesCache)this._loadedThemesCache=[...this._resolvedThemes.keys()];return this._loadedThemesCache}setTheme(t){let e=this._textmateThemeCache.get(t);if(!e)e=z.createFromRawTheme(t),this._textmateThemeCache.set(t,e);this._syncRegistry.setTheme(e)}getGrammar(t){return t=At(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;let e=new Set([...this._langMap.values()].filter((s)=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);let n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);let r=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(r.name=t.name,this._resolvedGrammars.set(t.name,r),t.aliases)t.aliases.forEach((s)=>{this._alias[s]=t.name});if(this._loadedLanguagesCache=null,e.size)for(let s of e)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(let r of t)this.resolveEmbeddedLanguages(r);let e=[...this._langGraph.entries()],n=e.filter(([r,s])=>!s);if(n.length){let r=e.filter(([s,a])=>{if(!a)return!1;return(a.embeddedLanguages||a.embeddedLangs)?.some((c)=>n.map(([l])=>l).includes(c))}).filter((s)=>!n.includes(s));throw new v(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${r.map(([s])=>`\`${s}\``).join(", ")}`)}for(let[r,s]of e)this._resolver.addLanguage(s);for(let[r,s]of e)this.loadLanguage(s)}getLoadedLanguages(){if(!this._loadedLanguagesCache)this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])];return this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);let e=t.embeddedLanguages??t.embeddedLangs;if(e)for(let n of e)this._langGraph.set(n,this._langMap.get(n))}},Xn=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,e){this._onigLib={createOnigScanner:(n)=>t.createScanner(n),createOnigString:(n)=>t.createString(n)},e.forEach((n)=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){if(this._langs.set(t.name,t),t.aliases)t.aliases.forEach((e)=>{this._langs.set(e,t)});if(this._scopeToLang.set(t.scopeName,t),t.injectTo)t.injectTo.forEach((e)=>{if(!this._injections.get(e))this._injections.set(e,[]);this._injections.get(e).push(t.scopeName)})}getInjections(t){let e=t.split("."),n=[];for(let r=1;r<=e.length;r++){let s=e.slice(0,r).join(".");n=[...n,...this._injections.get(s)||[]]}return n}},J=0;function Ge(t){if(J+=1,t.warnings!==!1&&J>=10&&J%10===0)console.warn(`[Shiki] ${J} 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 e=!1;if(!t.engine)throw new v("`engine` option is required for synchronous mode");let n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(ue),s=new Qn(new Xn(t.engine,n),r,n,t.langAlias),a;function c(C){return At(C,t.langAlias)}function l(C){R();let T=s.getGrammar(typeof C==="string"?C:C.name);if(!T)throw new v(`Language \`${C}\` not found, you may need to load it first`);return T}function h(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};R();let T=s.getTheme(C);if(!T)throw new v(`Theme \`${C}\` not found, you may need to load it first`);return T}function f(C){R();let T=h(C);if(a!==C)s.setTheme(T),a=C;return{theme:T,colorMap:s.getColorMap()}}function d(){return R(),s.getLoadedThemes()}function m(){return R(),s.getLoadedLanguages()}function S(...C){R(),s.loadLanguages(C.flat(1))}async function g(...C){return S(await Tt(C))}function w(...C){R();for(let T of C.flat(1))s.loadTheme(T)}async function N(...C){return R(),w(await vt(C))}function R(){if(e)throw new v("Shiki instance has been disposed")}function k(){if(e)return;e=!0,s.dispose(),J-=1}return{setTheme:f,getTheme:h,getLanguage:l,getLoadedThemes:d,getLoadedLanguages:m,resolveLangAlias:c,loadLanguage:g,loadLanguageSync:S,loadTheme:N,loadThemeSync:w,dispose:k,[Symbol.dispose]:k}}async function Be(t){if(!t.engine)console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[e,n,r]=await Promise.all([vt(t.themes||[]),Tt(t.langs||[]),t.engine]);return Ge({...t,themes:e,langs:n,engine:r})}var Et=new WeakMap;function ee(t,e){Et.set(t,e)}function W(t){return Et.get(t)}var he=class t{_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,n){return new t(Object.fromEntries(kt(n).map((r)=>[r,le])),e)}constructor(...e){if(e.length===2){let[n,r]=e;this.lang=r,this._stacks=n}else{let[n,r,s]=e;this.lang=r,this._stacks={[s]:n}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Zn(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Zn(t){let e=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);let a=s?.nameScopesList?.scopeName;if(a)e.push(a);if(s.parent)r(s.parent)}return r(t),e}function er(t,e){if(!(t instanceof he))throw new v("Invalid grammar state");return t.getInternalStack(e)}var tr=/,/,nr=/ /;function Oe(t,e,n={}){let{theme:r=t.getLoadedThemes()[0]}=n;if(X(t.resolveLangAlias(n.lang||"text"))||Z(r))return D(e).map((l)=>[{content:l[0],offset:l[1]}]);let{theme:s,colorMap:a}=t.setTheme(r),c=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==c.name)throw new v(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${c.name}"`);if(!n.grammarState.themes.includes(s.name))throw new v(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return It(e,c,s,a,n)}function xt(...t){if(t.length===2)return W(t[1]);let[e,n,r={}]=t,{lang:s="text",theme:a=e.getLoadedThemes()[0]}=r;if(X(s)||Z(a))throw new v("Plain language does not have grammar state");if(s==="ansi")throw new v("ANSI language does not have grammar state");let{theme:c,colorMap:l}=e.setTheme(a),h=e.getLanguage(s);return new he($e(n,h,c,l,r).stateStack,h.name,c.name)}function It(t,e,n,r,s){let a=$e(t,e,n,r,s),c=new he(a.stateStack,e.name,n.name);return ee(a.tokens,c),a.tokens}function $e(t,e,n,r,s){let a=Q(n,s),{tokenizeMaxLineLength:c=0,tokenizeTimeLimit:l=500,includeExplanation:h=!1}=s,f=D(t),d=s.grammarState?er(s.grammarState,n.name)??le:s.grammarContextCode!=null?$e(s.grammarContextCode,e,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:le,m=[],S=[];for(let g=0,w=f.length;g<w;g++){let[N,R]=f[g];if(N===""){m=[],S.push([]);continue}if(c>0&&N.length>=c){m=[],S.push([{content:N,offset:R,color:"",fontStyle:0}]);continue}let k,C,T;if(h&&h!=="tokenType")k=e.tokenizeLine(N,d,l),C=k.tokens,T=0;let E=e.tokenizeLine2(N,d,l),I=E.tokens.length/2;for(let L=0;L<I;L++){let O=E.tokens[2*L],Ce=L+1<I?E.tokens[2*L+2]:N.length;if(O===Ce)continue;let ke=E.tokens[2*L+1],an=G(r[M.getForeground(ke)],a),cn=M.getFontStyle(ke),ne={content:N.substring(O,Ce),offset:R+O,color:an,fontStyle:cn};if(h==="tokenType")ne.type=M.getTokenType(ke);else if(h){let ze=[];if(h!=="scopeName")for(let P of n.settings){let F;switch(typeof P.scope){case"string":F=P.scope.split(tr).map((Re)=>Re.trim());break;case"object":F=P.scope;break;default:continue}ze.push({settings:P,selectors:F.map((Re)=>Re.split(nr))})}ne.explanation=[];let Ue=0;while(O+Ue<Ce){let P=C[T],F=N.substring(P.startIndex,P.endIndex);Ue+=F.length,ne.explanation.push({content:F,scopes:h==="scopeName"?rr(P.scopes):sr(ze,P.scopes)}),T+=1}}m.push(ne)}S.push(m),m=[],d=E.ruleStack}return{tokens:S,stateStack:d}}function rr(t){return t.map((e)=>({scopeName:e}))}function sr(t,e){let n=[];for(let r=0,s=e.length;r<s;r++){let a=e[r];n[r]={scopeName:a,themeMatches:or(t,a,e.slice(0,r))}}return n}function Ct(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function ir(t,e,n){if(!Ct(t.at(-1),e))return!1;let r=t.length-2,s=n.length-1;while(r>=0&&s>=0){if(Ct(t[r],n[s]))r-=1;s-=1}if(r===-1)return!0;return!1}function or(t,e,n){let r=[];for(let{selectors:s,settings:a}of t)for(let c of s)if(ir(c,e,n)){r.push(a);break}return r}function fe(t,e,n,r=Oe){let s=Object.entries(n.themes).filter((f)=>f[1]).map((f)=>({color:f[0],theme:f[1]})),a=s.map((f)=>{let d=r(t,e,{...n,theme:f.theme});return{tokens:d,state:W(d),theme:typeof f.theme==="string"?f.theme:f.theme.name}}),c=ar(...a.map((f)=>f.tokens)),l=c[0].map((f,d)=>f.map((m,S)=>{let g={content:m.content,variants:{},offset:m.offset};if("includeExplanation"in n&&n.includeExplanation)g.explanation=m.explanation;return c.forEach((w,N)=>{let{content:R,explanation:k,offset:C,...T}=w[d][S];g.variants[s[N].color]=T}),g})),h=a[0].state?new he(Object.fromEntries(a.map((f)=>[f.theme,f.state?.getInternalStack(f.theme)])),a[0].state.lang):void 0;if(h)ee(l,h);return l}function ar(...t){let e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){let s=t.map((h)=>h[r]),a=e.map(()=>[]);e.forEach((h,f)=>h.push(a[f]));let c=s.map(()=>0),l=s.map((h)=>h[0]);while(l.every((h)=>h)){let h=Math.min(...l.map((f)=>f.content.length));for(let f=0;f<n;f++){let d=l[f];if(d.content.length===h)a[f].push(d),c[f]+=1,l[f]=s[f][c[f]];else a[f].push({...d,content:d.content.slice(0,h)}),l[f]={...d,content:d.content.slice(h),offset:d.offset+h}}}}return e}var Lt=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Pt={}.hasOwnProperty;function Gt(t,e){let n=e||{};function r(s,...a){let{invalid:c,handlers:l}=r;if(s&&Pt.call(s,t)){let h=String(s[t]);c=Pt.call(l,h)?l[h]:r.unknown}if(c)return c.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var cr=/["&'<>`]/g,lr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,ur=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,hr=/[|\\{}()[\]^$+*?.]/g,Bt=new WeakMap;function Ot(t,e){if(t=t.replace(e.subset?fr(e.subset):cr,r),e.subset||e.escapeOnly)return t;return t.replace(lr,n).replace(ur,r);function n(s,a,c){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,c.charCodeAt(a+2),e)}function r(s,a,c){return e.format(s.charCodeAt(0),c.charCodeAt(a+1),e)}}function fr(t){let e=Bt.get(t);if(!e)e=dr(t),Bt.set(t,e);return e}function dr(t){let e=[],n=-1;while(++n<t.length)e.push(t[n].replace(hr,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}var mr=/[\dA-Fa-f]/;function $t(t,e,n){let r="&#x"+t.toString(16).toUpperCase();return n&&e&&!mr.test(String.fromCharCode(e))?r:r+";"}var gr=/\d/;function Mt(t,e,n){let r="&#"+String(t);return n&&e&&!gr.test(String.fromCharCode(e))?r:r+";"}var jt=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var de={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"};var Ft=["cent","copy","divide","gt","lt","not","para","times"];var Dt={}.hasOwnProperty,Me={},me;for(me in de)if(Dt.call(de,me))Me[de[me]]=me;var pr=/[^\dA-Za-z]/;function Wt(t,e,n,r){let s=String.fromCharCode(t);if(Dt.call(Me,s)){let a=Me[s],c="&"+a;if(n&&jt.includes(a)&&!Ft.includes(a)&&(!r||e&&e!==61&&pr.test(String.fromCharCode(e))))return c;return c+";"}return""}function Ht(t,e,n){let r=$t(t,e,n.omitOptionalSemicolons),s;if(n.useNamedReferences||n.useShortestReferences)s=Wt(t,e,n.omitOptionalSemicolons,n.attribute);if((n.useShortestReferences||!s)&&n.useShortestReferences){let a=Mt(t,e,n.omitOptionalSemicolons);if(a.length<r.length)r=a}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function B(t,e){return Ot(t,Object.assign({format:Ht},e))}var _r=/^>|^->|<!--|-->|--!>|<!-$/g,yr=[">"],br=["<",">"];function qt(t,e,n,r){return r.settings.bogusComments?"<?"+B(t.value,Object.assign({},r.settings.characterReferences,{subset:yr}))+">":"<!--"+t.value.replace(_r,s)+"-->";function s(a){return B(a,Object.assign({},r.settings.characterReferences,{subset:br}))}}function zt(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}var A=Ut(1),je=Ut(-1),Sr=[];function Ut(t){return e;function e(n,r,s){let a=n?n.children:Sr,c=(r||0)+t,l=a[c];if(!s)while(l&&o(l))c+=t,l=a[c];return l}}var wr={}.hasOwnProperty;function ge(t){return e;function e(n,r,s){return wr.call(t,n.tagName)&&t[n.tagName](n,r,s)}}var te=ge({body:kr,caption:Fe,colgroup:Fe,dd:vr,dt:Tr,head:Fe,html:Cr,li:Nr,optgroup:Ar,option:Er,p:Rr,rp:Kt,rt:Kt,tbody:Ir,td:Vt,tfoot:Lr,th:Vt,thead:xr,tr:Pr});function Fe(t,e,n){let r=A(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&o(r.value.charAt(0)))}function Cr(t,e,n){let r=A(n,e);return!r||r.type!=="comment"}function kr(t,e,n){let r=A(n,e);return!r||r.type!=="comment"}function Rr(t,e,n){let r=A(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function Nr(t,e,n){let r=A(n,e);return!r||r.type==="element"&&r.tagName==="li"}function Tr(t,e,n){let r=A(n,e);return Boolean(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function vr(t,e,n){let r=A(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Kt(t,e,n){let r=A(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Ar(t,e,n){let r=A(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function Er(t,e,n){let r=A(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function xr(t,e,n){let r=A(n,e);return Boolean(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Ir(t,e,n){let r=A(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function Lr(t,e,n){return!A(n,e)}function Pr(t,e,n){let r=A(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Vt(t,e,n){let r=A(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var Yt=ge({body:Or,colgroup:$r,head:Br,html:Gr,tbody:Mr});function Gr(t){let e=A(t,-1);return!e||e.type!=="comment"}function Br(t){let e=new Set;for(let r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}let n=t.children[0];return!n||n.type==="element"}function Or(t){let e=A(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&o(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function $r(t,e,n){let r=je(n,e),s=A(t,-1,!0);if(n&&r&&r.type==="element"&&r.tagName==="colgroup"&&te(r,n.children.indexOf(r),n))return!1;return Boolean(s&&s.type==="element"&&s.tagName==="col")}function Mr(t,e,n){let r=je(n,e),s=A(t,-1);if(n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&te(r,n.children.indexOf(r),n))return!1;return Boolean(s&&s.type==="element"&&s.tagName==="tr")}var pe={name:[[`
|
|
4
|
+
\f\r &/=>`.split(""),`
|
|
5
|
+
\f\r "&'/=>\``.split("")],[`\x00
|
|
6
|
+
\f\r "&'/<=>`.split(""),`\x00
|
|
7
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
8
|
+
\f\r &>`.split(""),`\x00
|
|
9
|
+
\f\r "&'<=>\``.split("")],[`\x00
|
|
10
|
+
\f\r "&'<=>\``.split(""),`\x00
|
|
11
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\x00&'".split(""),"\x00\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\x00"&'.split(""),"\x00\"&'`".split("")]]};function Jt(t,e,n,r){let s=r.schema,a=s.space==="svg"?!1:r.settings.omitOptionalTags,c=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase()),l=[],h;if(s.space==="html"&&t.tagName==="svg")r.schema=i;let f=jr(r,t.properties),d=r.all(s.space==="html"&&t.tagName==="template"?t.content:t);if(r.schema=s,d)c=!1;if(f||!a||!Yt(t,e,n)){if(l.push("<",t.tagName,f?" "+f:""),c&&(s.space==="svg"||r.settings.closeSelfClosing)){if(h=f.charAt(f.length-1),!r.settings.tightSelfClosing||h==="/"||h&&h!=='"'&&h!=="'")l.push(" ");l.push("/")}l.push(">")}if(l.push(d),!c&&(!a||!te(t,e,n)))l.push("</"+t.tagName+">");return l.join("")}function jr(t,e){let n=[],r=-1,s;if(e){for(s in e)if(e[s]!==null&&e[s]!==void 0){let a=Fr(t,s,e[s]);if(a)n.push(a)}}while(++r<n.length){let a=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;if(r!==n.length-1&&a!=='"'&&a!=="'")n[r]+=" "}return n.join("")}function Fr(t,e,n){let r=p(t.schema,e),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,a=t.settings.allowDangerousCharacters?0:1,c=t.quote,l;if(r.overloadedBoolean&&(n===r.attribute||n===""))n=!0;else if((r.boolean||r.overloadedBoolean)&&(typeof n!=="string"||n===r.attribute||n===""))n=Boolean(n);if(n===null||n===void 0||n===!1||typeof n==="number"&&Number.isNaN(n))return"";let h=B(r.attribute,Object.assign({},t.settings.characterReferences,{subset:pe.name[s][a]}));if(n===!0)return h;if(n=Array.isArray(n)?(r.commaSeparated?b:y)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)return h;if(t.settings.preferUnquoted)l=B(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:pe.unquoted[s][a]}));if(l!==n){if(t.settings.quoteSmart&&u(n,c)>u(n,t.alternative))c=t.alternative;l=c+B(n,Object.assign({},t.settings.characterReferences,{subset:(c==="'"?pe.single:pe.double)[s][a],attribute:!0}))+c}return h+(l?"="+l:l)}var Dr=["<","&"];function _e(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:B(t.value,Object.assign({},r.settings.characterReferences,{subset:Dr}))}function Qt(t,e,n,r){return r.settings.allowDangerousHtml?t.value:_e(t,e,n,r)}function Xt(t,e,n,r){return r.all(t)}var Zt=Gt("type",{invalid:Wr,unknown:Hr,handlers:{comment:qt,doctype:zt,element:Jt,raw:Qt,root:Xt,text:_e}});function Wr(t){throw Error("Expected node, not `"+t+"`")}function Hr(t){throw Error("Cannot compile unknown node `"+t.type+"`")}var qr={},zr={},Ur=[];function De(t,e){let n=e||qr,r=n.quote||'"',s=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Kr,all:Vr,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Lt,characterReferences:n.characterReferences||zr,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?i:_,quote:r,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Kr(t,e,n){return Zt(t,e,n,this)}function Vr(t){let e=[],n=t&&t.children||Ur,r=-1;while(++r<n.length)e[r]=this.one(n[r],r,t);return e.join("")}var en=/\s+/g;function rn(t,e){if(!e)return t;if(t.properties||={},t.properties.class||=[],typeof t.properties.class==="string")t.properties.class=t.properties.class.split(en);if(!Array.isArray(t.properties.class))t.properties.class=[];let n=Array.isArray(e)?e:e.split(en);for(let r of n)if(r&&!t.properties.class.includes(r))t.properties.class.push(r);return t}function Yr(t){let e=D(t,!0).map(([s])=>s);function n(s){if(s===t.length)return{line:e.length-1,character:e.at(-1).length};let a=s,c=0;for(let l of e){if(a<l.length)break;a-=l.length,c++}return{line:c,character:a}}function r(s,a){let c=0;for(let l=0;l<s;l++)c+=e[l].length;return c+=a,c}return{lines:e,indexToPos:n,posToIndex:r}}var Jr=["color","background-color"];function Qr(t,e){let n=0,r=[];for(let s of e){if(s>n)r.push({...t,content:t.content.slice(n,s),offset:t.offset+n});n=s}if(n<t.content.length)r.push({...t,content:t.content.slice(n),offset:t.offset+n});return r}function Xr(t,e){let n=0,r=t.length;while(n<r){let s=n+(r-n>>1);if(t[s]<=e)n=s+1;else r=s}return n}function Zr(t,e){let n=[...e instanceof Set?e:new Set(e)].sort((r,s)=>r-s);if(!n.length)return t;return t.map((r)=>r.flatMap((s)=>{let a=s.offset+s.content.length,c=Xr(n,s.offset),l=c;while(l<n.length&&n[l]<a)l++;if(c===l)return s;let h=n.slice(c,l);for(let f=0;f<h.length;f++)h[f]-=s.offset;return Qr(s,h)}))}function es(t,e,n,r,s="css-vars"){let a={content:t.content,explanation:t.explanation,offset:t.offset},c=e.map((d)=>ye(t.variants[d])),l=new Set(c.flatMap((d)=>Object.keys(d))),h={},f=(d,m)=>{let S=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+e[d]+(m==="color"?"":S)};return c.forEach((d,m)=>{for(let S of l){let g=d[S]||"inherit";if(m===0&&r&&Jr.includes(S))if(r==="light-dark()"&&c.length>1){let w=e.findIndex((C)=>C==="light"),N=e.findIndex((C)=>C==="dark");if(w===-1||N===-1)throw new v('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let R=c[w][S]||"inherit",k=c[N][S]||"inherit";if(h[S]=`light-dark(${R}, ${k})`,s==="css-vars")h[f(m,S)]=g}else h[S]=g;else if(s==="css-vars")h[f(m,S)]=g}}),a.htmlStyle=h,a}function ye(t){let e={};if(t.color)e.color=t.color;if(t.bgColor)e["background-color"]=t.bgColor;if(t.fontStyle){if(t.fontStyle&x.Italic)e["font-style"]="italic";if(t.fontStyle&x.Bold)e["font-weight"]="bold";let n=[];if(t.fontStyle&x.Underline)n.push("underline");if(t.fontStyle&x.Strikethrough)n.push("line-through");if(n.length)e["text-decoration"]=n.join(" ")}return e}function He(t){if(typeof t==="string")return t;return Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function ts(){let t=new WeakMap;function e(n){if(!t.has(n.meta)){let s=function(c){if(typeof c==="number"){if(c<0||c>n.source.length)throw new v(`Invalid decoration offset: ${c}. Code length: ${n.source.length}`);return{...r.indexToPos(c),offset:c}}else{let l=r.lines[c.line];if(l===void 0)throw new v(`Invalid decoration position ${JSON.stringify(c)}. Lines length: ${r.lines.length}`);let h=c.character;if(h<0)h=l.length+h;if(h<0||h>l.length)throw new v(`Invalid decoration position ${JSON.stringify(c)}. Line ${c.line} length: ${l.length}`);return{...c,character:h,offset:r.posToIndex(c.line,h)}}},r=Yr(n.source),a=(n.options.decorations||[]).map((c)=>({...c,start:s(c.start),end:s(c.end)}));ns(a),t.set(n.meta,{decorations:a,converter:r,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;return Zr(n,e(this).decorations.flatMap((r)=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;let r=e(this),s=[...n.children].filter((d)=>d.type==="element"&&d.tagName==="span");if(s.length!==r.converter.lines.length)throw new v(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function a(d,m,S,g){let w=s[d],N="",R=-1,k=-1;if(m===0)R=0;if(S===0)k=0;if(S===Number.POSITIVE_INFINITY)k=w.children.length;if(R===-1||k===-1)for(let T=0;T<w.children.length;T++){if(N+=sn(w.children[T]),R===-1&&N.length===m)R=T+1;if(k===-1&&N.length===S)k=T+1}if(R===-1)throw new v(`Failed to find start index for decoration ${JSON.stringify(g.start)}`);if(k===-1)throw new v(`Failed to find end index for decoration ${JSON.stringify(g.end)}`);let C=w.children.slice(R,k);if(!g.alwaysWrap&&C.length===w.children.length)l(w,g,"line");else if(!g.alwaysWrap&&C.length===1&&C[0].type==="element")l(C[0],g,"token");else{let T={type:"element",tagName:"span",properties:{},children:C};l(T,g,"wrapper"),w.children.splice(R,C.length,T)}}function c(d,m){s[d]=l(s[d],m,"line")}function l(d,m,S){let g=m.properties||{},w=m.transform||((N)=>N);if(d.tagName=m.tagName||"span",d.properties={...d.properties,...g,class:d.properties.class},m.properties?.class)rn(d,m.properties.class);return d=w(d,S)||d,d}let h=[],f=r.decorations.sort((d,m)=>m.start.offset-d.start.offset||d.end.offset-m.end.offset);for(let d of f){let{start:m,end:S}=d;if(m.line===S.line)a(m.line,m.character,S.character,d);else if(m.line<S.line){a(m.line,m.character,Number.POSITIVE_INFINITY,d);for(let g=m.line+1;g<S.line;g++)h.unshift(()=>c(g,d));a(S.line,0,S.character,d)}}h.forEach((d)=>d())}}}function ns(t){for(let e=0;e<t.length;e++){let n=t[e];if(n.start.offset>n.end.offset)throw new v(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){let s=t[r],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,l=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,h=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(a||c||l||h){if(a&&c)continue;if(l&&h)continue;if(l&&n.start.offset===n.end.offset)continue;if(c&&s.start.offset===s.end.offset)continue;throw new v(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function sn(t){if(t.type==="text")return t.value;if(t.type==="element")return t.children.map(sn).join("");return""}var rs=[ts()];function be(t){let e=ss(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...rs]}function ss(t){let e=[],n=[],r=[];for(let s of t)switch(s.enforce){case"pre":e.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:e,post:n,normal:r}}var j=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],We={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function is(t,e){let n=t.indexOf("\x1B",e);if(n!==-1){if(t[n+1]==="["){let r=t.indexOf("m",n);if(r!==-1)return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}}return{position:t.length}}function tn(t){let e=t.shift();if(e==="2"){let n=t.splice(0,3).map((r)=>Number.parseInt(r));if(n.length!==3||n.some((r)=>Number.isNaN(r)))return;return{type:"rgb",rgb:n}}else if(e==="5"){let n=t.shift();if(n)return{type:"table",index:Number(n)}}}function os(t){let e=[];while(t.length>0){let n=t.shift();if(!n)continue;let r=Number.parseInt(n);if(Number.isNaN(r))continue;if(r===0)e.push({type:"resetAll"});else if(r<=9){if(We[r])e.push({type:"setDecoration",value:We[r]})}else if(r<=29){let s=We[r-20];if(s){if(e.push({type:"resetDecoration",value:s}),s==="dim")e.push({type:"resetDecoration",value:"bold"})}}else if(r<=37)e.push({type:"setForegroundColor",value:{type:"named",name:j[r-30]}});else if(r===38){let s=tn(t);if(s)e.push({type:"setForegroundColor",value:s})}else if(r===39)e.push({type:"resetForegroundColor"});else if(r<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:j[r-40]}});else if(r===48){let s=tn(t);if(s)e.push({type:"setBackgroundColor",value:s})}else if(r===49)e.push({type:"resetBackgroundColor"});else if(r===53)e.push({type:"setDecoration",value:"overline"});else if(r===55)e.push({type:"resetDecoration",value:"overline"});else if(r>=90&&r<=97)e.push({type:"setForegroundColor",value:{type:"named",name:j[r-90+8]}});else if(r>=100&&r<=107)e.push({type:"setBackgroundColor",value:{type:"named",name:j[r-100+8]}})}return e}function as(){let t=null,e=null,n=new Set;return{parse(r){let s=[],a=0;do{let c=is(r,a),l=c.sequence?r.substring(a,c.startPosition):r.substring(a);if(l.length>0)s.push({value:l,foreground:t,background:e,decorations:new Set(n)});if(c.sequence){let h=os(c.sequence);for(let f of h)if(f.type==="resetAll")t=null,e=null,n.clear();else if(f.type==="resetForegroundColor")t=null;else if(f.type==="resetBackgroundColor")e=null;else if(f.type==="resetDecoration")n.delete(f.value);for(let f of h)if(f.type==="setForegroundColor")t=f.value;else if(f.type==="setBackgroundColor")e=f.value;else if(f.type==="setDecoration")n.add(f.value)}a=c.position}while(a<r.length);return s}}}var cs={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 ls(t=cs){function e(l){return t[l]}function n(l){return`#${l.map((h)=>Math.max(0,Math.min(h,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let f=0;f<j.length;f++)r.push(e(j[f]));let l=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let d=0;d<6;d++)for(let m=0;m<6;m++)r.push(n([l[f],l[d],l[m]]));let h=8;for(let f=0;f<24;f++,h+=10)r.push(n([h,h,h]));return r}function a(l){return s()[l]}function c(l){switch(l.type){case"named":return e(l.name);case"rgb":return n(l.rgb);case"table":return a(l.index)}}return{value:c}}var us=/#([0-9a-f]{3,8})/i,hs=/var\((--[\w-]+-ansi-[\w-]+)\)/,fs={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 ds(t,e,n){let r=Q(t,n),s=D(e),a=ls(Object.fromEntries(j.map((l)=>{let h=`terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`;return[l,t.colors?.[h]||fs[l]]}))),c=as();return s.map((l)=>c.parse(l[0]).map((h)=>{let f,d;if(h.decorations.has("reverse"))f=h.background?a.value(h.background):t.bg,d=h.foreground?a.value(h.foreground):t.fg;else f=h.foreground?a.value(h.foreground):t.fg,d=h.background?a.value(h.background):void 0;if(f=G(f,r),d=G(d,r),h.decorations.has("dim"))f=ms(f);let m=x.None;if(h.decorations.has("bold"))m|=x.Bold;if(h.decorations.has("italic"))m|=x.Italic;if(h.decorations.has("underline"))m|=x.Underline;if(h.decorations.has("strikethrough"))m|=x.Strikethrough;return{content:h.value,offset:l[1],color:f,bgColor:d,fontStyle:m}}))}function ms(t){let e=t.match(us);if(e){let r=e[1];if(r.length===8){let s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else if(r.length===6)return`#${r}80`;else if(r.length===4){let s=r[0],a=r[1],c=r[2],l=r[3];return`#${s}${s}${a}${a}${c}${c}${Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){let s=r[0],a=r[1],c=r[2];return`#${s}${s}${a}${a}${c}${c}80`}}let n=t.match(hs);if(n)return`var(${n[1]}-dim)`;return t}function qe(t,e,n={}){let r=t.resolveLangAlias(n.lang||"text"),{theme:s=t.getLoadedThemes()[0]}=n;if(!X(r)&&!Z(s)&&r==="ansi"){let{theme:a}=t.setTheme(s);return ds(a,e,n)}return Oe(t,e,n)}function Se(t,e,n){let r,s,a,c,l,h;if("themes"in n){let{defaultColor:f="light",cssVariablePrefix:d="--shiki-",colorsRendering:m="css-vars"}=n,S=Object.entries(n.themes).filter((k)=>k[1]).map((k)=>({color:k[0],theme:k[1]})).sort((k,C)=>k.color===f?-1:C.color===f?1:0);if(S.length===0)throw new v("`themes` option must not be empty");let g=fe(t,e,n,qe);if(h=W(g),f&&f!=="light-dark()"&&!S.some((k)=>k.color===f))throw new v(`\`themes\` option must contain the defaultColor key \`${f}\``);let w=S.map((k)=>t.getTheme(k.theme)),N=S.map((k)=>k.color);if(a=g.map((k)=>k.map((C)=>es(C,N,d,f,m))),h)ee(a,h);let R=S.map((k)=>Q(k.theme,n));s=nn(S,w,R,d,f,"fg",m),r=nn(S,w,R,d,f,"bg",m),c=`shiki-themes ${w.map((k)=>k.name).join(" ")}`,l=f?void 0:[s,r].join(";")}else if("theme"in n){let f=Q(n.theme,n);a=qe(t,e,n);let d=t.getTheme(n.theme);r=G(d.bg,f),s=G(d.fg,f),c=d.name,h=W(a)}else throw new v("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:s,bg:r,themeName:c,rootStyle:l,grammarState:h}}function nn(t,e,n,r,s,a,c){return t.map((l,h)=>{let f=G(e[h][a],n[h])||"inherit",d=`${r+l.color}${a==="bg"?"-bg":""}:${f}`;if(h===0&&s){if(s==="light-dark()"&&t.length>1){let m=t.findIndex((g)=>g.color==="light"),S=t.findIndex((g)=>g.color==="dark");if(m===-1||S===-1)throw new v('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${G(e[m][a],n[m])||"inherit"}, ${G(e[S][a],n[S])||"inherit"});${d}`}return f}if(c==="css-vars")return d;return null}).filter((l)=>!!l).join(";")}var on=/^\s+$/,gs=/^(\s*)(.*?)(\s*)$/;function we(t,e,n,r={meta:{},options:n,codeToHast:(s,a)=>we(t,s,a),codeToTokens:(s,a)=>Se(t,s,a)}){let s=e;for(let w of be(n))s=w.preprocess?.call(r,s,n)||s;let{tokens:a,fg:c,bg:l,themeName:h,rootStyle:f,grammarState:d}=Se(t,s,n),{mergeWhitespaces:m=!0,mergeSameStyleTokens:S=!1}=n;if(m===!0)a=_s(a);else if(m==="never")a=ys(a);if(S)a=bs(a);let g={...r,get source(){return s}};for(let w of be(n))a=w.tokens?.call(g,a)||a;return ps(a,{...n,fg:c,bg:l,themeName:h,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},g,d)}function ps(t,e,n,r=W(t)){let s=be(e),a=[],c={type:"root",children:[]},{structure:l="classic",tabindex:h="0"}=e,f={class:`shiki ${e.themeName||""}`};if(e.rootStyle!==!1)if(e.rootStyle!=null)f.style=e.rootStyle;else f.style=`background-color:${e.bg};color:${e.fg}`;if(h!==!1&&h!=null)f.tabindex=h.toString();for(let[N,R]of Object.entries(e.meta||{}))if(!N.startsWith("_"))f[N]=R;let d={type:"element",tagName:"pre",properties:f,children:[],data:e.data},m={type:"element",tagName:"code",properties:{},children:a},S=[],g={...n,structure:l,addClassToHast:rn,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return c},get pre(){return d},get code(){return m},get lines(){return S}};if(t.forEach((N,R)=>{if(R){if(l==="inline")c.children.push({type:"element",tagName:"br",properties:{},children:[]});else if(l==="classic")a.push({type:"text",value:`
|
|
12
|
+
`})}let k={type:"element",tagName:"span",properties:{class:"line"},children:[]},C=0;for(let T of N){let E={type:"element",tagName:"span",properties:{...T.htmlAttrs},children:[{type:"text",value:T.content}]},I=He(T.htmlStyle||ye(T));if(I)E.properties.style=I;for(let L of s)E=L?.span?.call(g,E,R+1,C,k,T)||E;if(l==="inline")c.children.push(E);else if(l==="classic")k.children.push(E);C+=T.content.length}if(l==="classic"){for(let T of s)k=T?.line?.call(g,k,R+1)||k;S.push(k),a.push(k)}else if(l==="inline")S.push(k)}),l==="classic"){for(let N of s)m=N?.code?.call(g,m)||m;d.children.push(m);for(let N of s)d=N?.pre?.call(g,d)||d;c.children.push(d)}else if(l==="inline"){let N=[],R={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let C of c.children)if(C.type==="element"&&C.tagName==="br")N.push(R),R={type:"element",tagName:"span",properties:{class:"line"},children:[]};else if(C.type==="element"||C.type==="text")R.children.push(C);N.push(R);let k={type:"element",tagName:"code",properties:{},children:N};for(let C of s)k=C?.code?.call(g,k)||k;c.children=[];for(let C=0;C<k.children.length;C++){if(C>0)c.children.push({type:"element",tagName:"br",properties:{},children:[]});let T=k.children[C];if(T.type==="element")c.children.push(...T.children)}}let w=c;for(let N of s)w=N?.root?.call(g,w)||w;if(r)ee(w,r);return w}function _s(t){return t.map((e)=>{let n=[],r="",s;return e.forEach((a,c)=>{let l=!(a.fontStyle&&(a.fontStyle&x.Underline||a.fontStyle&x.Strikethrough));if(l&&on.test(a.content)&&e[c+1]){if(s===void 0)s=a.offset;r+=a.content}else if(r){if(l)n.push({...a,offset:s,content:r+a.content});else n.push({content:r,offset:s},a);s=void 0,r=""}else n.push(a)}),n})}function ys(t){return t.map((e)=>e.flatMap((n)=>{if(on.test(n.content))return n;let r=n.content.match(gs);if(!r)return n;let[,s,a,c]=r;if(!s&&!c)return n;let l=[{...n,offset:n.offset+s.length,content:a}];if(s)l.unshift({content:s,offset:n.offset});if(c)l.push({content:c,offset:n.offset+s.length+a.length});return l}))}function bs(t){return t.map((e)=>{let n=[];for(let r of e){if(n.length===0){n.push({...r});continue}let s=n.at(-1),a=He(s.htmlStyle||ye(s)),c=He(r.htmlStyle||ye(r)),l=s.fontStyle&&(s.fontStyle&x.Underline||s.fontStyle&x.Strikethrough),h=r.fontStyle&&(r.fontStyle&x.Underline||r.fontStyle&x.Strikethrough);if(!l&&!h&&a===c)s.content+=r.content;else n.push({...r})}return n})}var Ss=De;function ws(t,e,n){let r={meta:{},options:n,codeToHast:(a,c)=>we(t,a,c),codeToTokens:(a,c)=>Se(t,a,c)},s=Ss(we(t,e,n,r));for(let a of be(n))s=a.postprocess?.call(r,s,n)||s;return s}async function No(t){let e=await Be(t);return{getLastGrammarState:(...n)=>xt(e,...n),codeToTokensBase:(n,r)=>qe(e,n,r),codeToTokensWithThemes:(n,r)=>fe(e,n,r),codeToTokens:(n,r)=>Se(e,n,r),codeToHast:(n,r)=>we(e,n,r),codeToHtml:(n,r)=>ws(e,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}export{No as createHighlighterCore};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m}from"/chunk-pbh1r1h9.js";export{m as default};
|