opencami 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/client/assets/{CSPContext-EgWK8bIJ.js → CSPContext-BBLAL_m_.js} +1 -1
  2. package/dist/client/assets/{DirectionContext-DXtY05YF.js → DirectionContext-DXnZc0zz.js} +1 -1
  3. package/dist/client/assets/{_sessionKey-B89e7G3y.js → _sessionKey-BidmO1-D.js} +32 -32
  4. package/dist/client/assets/agents-CtZs_u1j.js +2 -0
  5. package/dist/client/assets/agents-screen-Basce5qo.js +1 -0
  6. package/dist/client/assets/bots-C_dWjy3z.js +2 -0
  7. package/dist/client/assets/bots-screen-n_xhYOEE.js +1 -0
  8. package/dist/client/assets/{button-nDcsaNPl.js → button-BaHefIXU.js} +1 -1
  9. package/dist/client/assets/c-BIGW1oBm.js +1 -0
  10. package/dist/client/assets/{connect-w4lLOqiJ.js → connect-DHr3hhUR.js} +1 -1
  11. package/dist/client/assets/core-BrHBc0Zp.js +12 -0
  12. package/dist/client/assets/cpp-B-lmv-kZ.js +1 -0
  13. package/dist/client/assets/csharp-K5feNrxe.js +1 -0
  14. package/dist/client/assets/css-DPfMkruS.js +1 -0
  15. package/dist/client/assets/diff-D97Zzqfu.js +1 -0
  16. package/dist/client/assets/dockerfile-BcOcwvcX.js +1 -0
  17. package/dist/client/assets/engine-javascript-PwbX1GN8.js +141 -0
  18. package/dist/client/assets/file-explorer-screen-8t6M4Xco.js +1 -0
  19. package/dist/client/assets/files-BdlpK3Cy.js +2 -0
  20. package/dist/client/assets/go-Dn2_MT6a.js +1 -0
  21. package/dist/client/assets/graphql-ChdNCCLP.js +1 -0
  22. package/dist/client/assets/html-GMplVEZG.js +1 -0
  23. package/dist/client/assets/index-B2iG4EM1.js +3 -0
  24. package/dist/client/assets/{index-36G0WCxU.js → index-GTR-Xzl2.js} +1 -1
  25. package/dist/client/assets/index-T4TOjvD0.js +1 -0
  26. package/dist/client/assets/java-CylS5w8V.js +1 -0
  27. package/dist/client/assets/javascript-wDzz0qaB.js +1 -0
  28. package/dist/client/assets/json-Cp-IABpG.js +1 -0
  29. package/dist/client/assets/jsx-g9-lgVsj.js +1 -0
  30. package/dist/client/assets/{keyboard-shortcuts-dialog-BdCeXRjD.js → keyboard-shortcuts-dialog-CcKSlK52.js} +1 -1
  31. package/dist/client/assets/kotlin-BdnUsdx6.js +1 -0
  32. package/dist/client/assets/{main-B3N0eQFg.js → main-mIHr_ble.js} +3 -3
  33. package/dist/client/assets/markdown-Cvjx9yec.js +1 -0
  34. package/dist/client/assets/{opencami-logo-DD0DPFRQ.js → opencami-logo-CRIdKbbZ.js} +1 -1
  35. package/dist/client/assets/php-CDn_0X-4.js +1 -0
  36. package/dist/client/assets/python-B6aJPvgy.js +1 -0
  37. package/dist/client/assets/react-Cfq4ot0g.js +1 -0
  38. package/dist/client/assets/regexp-CDVJQ6XC.js +1 -0
  39. package/dist/client/assets/ruby-FDmvQDUv.js +1 -0
  40. package/dist/client/assets/rust-B1yitclQ.js +1 -0
  41. package/dist/client/assets/search-dialog-D19x_xaG.js +1 -0
  42. package/dist/client/assets/{session-export-dialog-DtHKG2zW.js → session-export-dialog-DRlJwhMa.js} +1 -1
  43. package/dist/client/assets/settings-dialog-BA5FjiyP.js +1 -0
  44. package/dist/client/assets/shell-DfDnw5Jg.js +1 -0
  45. package/dist/client/assets/skills-lmNPZksG.js +2 -0
  46. package/dist/client/assets/{skills-panel-BLUjzfjJ.js → skills-panel-Cv-N_MDk.js} +2 -2
  47. package/dist/client/assets/sql-BLtJtn59.js +1 -0
  48. package/dist/client/assets/styles-JgjN_ZCd.css +1 -0
  49. package/dist/client/assets/swift-Dg5xB15N.js +1 -0
  50. package/dist/client/assets/switch-Bh9tVOYh.js +1 -0
  51. package/dist/client/assets/tabs-BfaEc9zS.js +1 -0
  52. package/dist/client/assets/toml-vGWfd6FD.js +1 -0
  53. package/dist/client/assets/tooltip-w9D-e_R-.js +1 -0
  54. package/dist/client/assets/tsx-COt5Ahok.js +1 -0
  55. package/dist/client/assets/typescript-BPQ3VLAy.js +1 -0
  56. package/dist/client/assets/{use-file-explorer-state-BnaJEqRP.js → use-file-explorer-state-CLaDuI9X.js} +2 -2
  57. package/dist/client/assets/useButton-DsMdJPGn.js +1 -0
  58. package/dist/client/assets/{useCompositeItem-BgiEMKAt.js → useCompositeItem-CaYygSfB.js} +1 -1
  59. package/dist/client/assets/{useControlled-BhUuiHAm.js → useControlled-wOKVgKF4.js} +1 -1
  60. package/dist/client/assets/{useMutation-CFmVaBag.js → useMutation-fJnleJAb.js} +1 -1
  61. package/dist/client/assets/{visuallyHidden-DCCICp6T.js → visuallyHidden-CqGRL_Oq.js} +2 -2
  62. package/dist/client/assets/vitesse-dark-D0r3Knsf.js +1 -0
  63. package/dist/client/assets/vitesse-light-CVO1_9PV.js +1 -0
  64. package/dist/client/assets/xml-sdJ4AIDG.js +1 -0
  65. package/dist/client/assets/yaml-Buea-lGh.js +1 -0
  66. package/dist/server/assets/{_sessionKey-tRze5NLR.js → _sessionKey-B5UHBd2U.js} +16 -12
  67. package/dist/server/assets/{_tanstack-start-manifest_v-CyfoMvUa.js → _tanstack-start-manifest_v-D11xMFUx.js} +1 -1
  68. package/dist/server/assets/{connect-d3AqjAqe.js → connect-CbgijWz4.js} +1 -34
  69. package/dist/server/assets/{index-CRfLKh30.js → index--_jH_0mX.js} +1 -1
  70. package/dist/server/assets/{index-CNIATlJ9.js → index-Dl2BOKP7.js} +94 -79
  71. package/dist/server/assets/{router-rn7pJO_D.js → router-DJA7GtMo.js} +4 -4
  72. package/dist/server/assets/{search-dialog-Bz4Cu0KW.js → search-dialog-C2a3OYm_.js} +45 -81
  73. package/dist/server/assets/{settings-dialog-BBM7jCjE.js → settings-dialog-CHVzrou9.js} +9 -38
  74. package/dist/server/server.js +2 -2
  75. package/package.json +2 -1
  76. package/dist/client/assets/agents-screen-1BiEZ9od.js +0 -1
  77. package/dist/client/assets/agents-x54ocA9z.js +0 -2
  78. package/dist/client/assets/bots-screen-BNQciUeJ.js +0 -1
  79. package/dist/client/assets/bots-x86ZHG4b.js +0 -2
  80. package/dist/client/assets/file-explorer-screen-CAsjd3w8.js +0 -1
  81. package/dist/client/assets/files-Bype5Mnb.js +0 -2
  82. package/dist/client/assets/index-BXkRE220.js +0 -153
  83. package/dist/client/assets/react-B16OrBeM.js +0 -1
  84. package/dist/client/assets/search-dialog-BjTPceEl.js +0 -1
  85. package/dist/client/assets/settings-dialog-hiqdk_UD.js +0 -1
  86. package/dist/client/assets/skills-DhwyFq3y.js +0 -2
  87. package/dist/client/assets/styles-CHP4l6vZ.css +0 -1
  88. package/dist/client/assets/switch-J6wLIVu2.js +0 -1
  89. package/dist/client/assets/tabs-DvPgTz5I.js +0 -1
  90. package/dist/client/assets/tooltip-C14vdXHK.js +0 -1
  91. package/dist/client/assets/useButton-Bnnac1eR.js +0 -1
@@ -0,0 +1 @@
1
+ const e=Object.freeze(JSON.parse(`{"displayName":"C","name":"c","patterns":[{"include":"#preprocessor-rule-enabled"},{"include":"#preprocessor-rule-disabled"},{"include":"#preprocessor-rule-conditional"},{"include":"#predefined_macros"},{"include":"#comments"},{"include":"#switch_statement"},{"include":"#anon_pattern_1"},{"include":"#storage_types"},{"include":"#anon_pattern_2"},{"include":"#anon_pattern_3"},{"include":"#anon_pattern_4"},{"include":"#anon_pattern_5"},{"include":"#anon_pattern_6"},{"include":"#anon_pattern_7"},{"include":"#operators"},{"include":"#numbers"},{"include":"#strings"},{"include":"#anon_pattern_range_1"},{"include":"#anon_pattern_range_2"},{"include":"#anon_pattern_range_3"},{"include":"#pragma-mark"},{"include":"#anon_pattern_range_4"},{"include":"#anon_pattern_range_5"},{"include":"#anon_pattern_range_6"},{"include":"#anon_pattern_8"},{"include":"#anon_pattern_9"},{"include":"#anon_pattern_10"},{"include":"#anon_pattern_11"},{"include":"#anon_pattern_12"},{"include":"#anon_pattern_13"},{"include":"#block"},{"include":"#parens"},{"include":"#anon_pattern_range_7"},{"include":"#line_continuation_character"},{"include":"#anon_pattern_range_8"},{"include":"#anon_pattern_range_9"},{"include":"#anon_pattern_14"},{"include":"#anon_pattern_15"}],"repository":{"access-method":{"begin":"([A-Z_a-z][0-9A-Z_a-z]*|(?<=[])]))\\\\s*(?:(\\\\.)|(->))((?:[A-Z_a-z][0-9A-Z_a-z]*\\\\s*(?:\\\\.|->))*)\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)(\\\\()","beginCaptures":{"1":{"name":"variable.object.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"},"4":{"patterns":[{"match":"\\\\.","name":"punctuation.separator.dot-access.c"},{"match":"->","name":"punctuation.separator.pointer-access.c"},{"match":"[A-Z_a-z][0-9A-Z_a-z]*","name":"variable.object.c"},{"match":".+","name":"everything.else.c"}]},"5":{"name":"entity.name.function.member.c"},"6":{"name":"punctuation.section.arguments.begin.bracket.round.function.member.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arguments.end.bracket.round.function.member.c"}},"name":"meta.function-call.member.c","patterns":[{"include":"#function-call-innards"}]},"anon_pattern_1":{"match":"\\\\b(break|continue|do|else|for|goto|if|_Pragma|return|while)\\\\b","name":"keyword.control.c"},"anon_pattern_10":{"match":"\\\\b((?:int8|int16|int32|int64|uint8|uint16|uint32|uint64|int_least8|int_least16|int_least32|int_least64|uint_least8|uint_least16|uint_least32|uint_least64|int_fast8|int_fast16|int_fast32|int_fast64|uint_fast8|uint_fast16|uint_fast32|uint_fast64|intptr|uintptr|intmax|uintmax)_t)\\\\b","name":"support.type.stdint.c"},"anon_pattern_11":{"match":"\\\\b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\\\\b","name":"support.constant.mac-classic.c"},"anon_pattern_12":{"match":"\\\\b(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\\\\b","name":"support.type.mac-classic.c"},"anon_pattern_13":{"match":"\\\\b([0-9A-Z_a-z]+_t)\\\\b","name":"support.type.posix-reserved.c"},"anon_pattern_14":{"match":";","name":"punctuation.terminator.statement.c"},"anon_pattern_15":{"match":",","name":"punctuation.separator.delimiter.c"},"anon_pattern_2":{"match":"typedef","name":"keyword.other.typedef.c"},"anon_pattern_3":{"match":"\\\\b(const|extern|register|restrict|static|volatile|inline)\\\\b","name":"storage.modifier.c"},"anon_pattern_4":{"match":"\\\\bk[A-Z]\\\\w*\\\\b","name":"constant.other.variable.mac-classic.c"},"anon_pattern_5":{"match":"\\\\bg[A-Z]\\\\w*\\\\b","name":"variable.other.readwrite.global.mac-classic.c"},"anon_pattern_6":{"match":"\\\\bs[A-Z]\\\\w*\\\\b","name":"variable.other.readwrite.static.mac-classic.c"},"anon_pattern_7":{"match":"\\\\b(NULL|true|false|TRUE|FALSE)\\\\b","name":"constant.language.c"},"anon_pattern_8":{"match":"\\\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\\\b","name":"support.type.sys-types.c"},"anon_pattern_9":{"match":"\\\\b(pthread_(?:attr_|cond_|condattr_|mutex_|mutexattr_|once_|rwlock_|rwlockattr_||key_)t)\\\\b","name":"support.type.pthread.c"},"anon_pattern_range_1":{"begin":"((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))((#)\\\\s*define)\\\\b\\\\s+((?<!\\\\w)[A-Z_a-z]\\\\w*(?!\\\\w))(?:(\\\\()([^()\\\\\\\\]+)(\\\\)))?","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.control.directive.define.c"},"6":{"name":"punctuation.definition.directive.c"},"7":{"name":"entity.name.function.preprocessor.c"},"8":{"name":"punctuation.definition.parameters.begin.c"},"9":{"patterns":[{"captures":{"1":{"name":"variable.parameter.preprocessor.c"}},"match":"(?<=[(,])\\\\s*((?<!\\\\w)[A-Z_a-z]\\\\w*(?!\\\\w))\\\\s*"},{"match":",","name":"punctuation.separator.parameters.c"},{"match":"\\\\.\\\\.\\\\.","name":"ellipses.c punctuation.vararg-ellipses.variable.parameter.preprocessor.c"}]},"10":{"name":"punctuation.definition.parameters.end.c"}},"end":"(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.macro.c","patterns":[{"include":"#preprocessor-rule-define-line-contents"}]},"anon_pattern_range_2":{"begin":"^\\\\s*((#)\\\\s*(error|warning))\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.control.directive.diagnostic.$3.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.diagnostic.c","patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.c","patterns":[{"include":"#line_continuation_character"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"'|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.single.c","patterns":[{"include":"#line_continuation_character"}]},{"begin":"[^\\"']","end":"(?<!\\\\\\\\)(?=\\\\s*\\\\n)","name":"string.unquoted.single.c","patterns":[{"include":"#line_continuation_character"},{"include":"#comments"}]}]},"anon_pattern_range_3":{"begin":"^\\\\s*((#)\\\\s*(i(?:nclude(?:_next)?|mport)))\\\\b\\\\s*","beginCaptures":{"1":{"name":"keyword.control.directive.$3.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.include.c","patterns":[{"include":"#line_continuation_character"},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.include.c"},{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.other.lt-gt.include.c"}]},"anon_pattern_range_4":{"begin":"^\\\\s*((#)\\\\s*line)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.line.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#strings"},{"include":"#numbers"},{"include":"#line_continuation_character"}]},"anon_pattern_range_5":{"begin":"^\\\\s*((#)\\\\s*undef)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.undef.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"match":"[$A-Z_a-z][$\\\\w]*","name":"entity.name.function.preprocessor.c"},{"include":"#line_continuation_character"}]},"anon_pattern_range_6":{"begin":"^\\\\s*((#)\\\\s*pragma)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.pragma.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=/[*/])|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.pragma.c","patterns":[{"include":"#strings"},{"match":"[$A-Z_a-z][-$\\\\w]*","name":"entity.other.attribute-name.pragma.preprocessor.c"},{"include":"#numbers"},{"include":"#line_continuation_character"}]},"anon_pattern_range_7":{"begin":"(?<!\\\\w)(?!\\\\s*(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|pthread_rwlock_t|atomic_uintptr_t|atomic_ptrdiff_t|atomic_uintmax_t|atomic_intmax_t|atomic_char32_t|atomic_intptr_t|atomic_char16_t|pthread_mutex_t|pthread_cond_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_once_t|pthread_attr_t|uint_least8_t|int_least32_t|int_least16_t|pthread_key_t|uint_fast32_t|uint_fast64_t|uint_fast16_t|atomic_size_t|atomic_ushort|atomic_ullong|int_least64_t|atomic_ulong|int_least8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|memory_order|atomic_schar|atomic_uchar|atomic_short|atomic_llong|thread_local|atomic_bool|atomic_uint|atomic_long|int_fast8_t|suseconds_t|atomic_char|atomic_int|useconds_t|_Imaginary|uintmax_t|in_addr_t|in_port_t|_Noreturn|blksize_t|pthread_t|uintptr_t|volatile|u_quad_t|blkcnt_t|intmax_t|intptr_t|_Complex|uint16_t|uint32_t|uint64_t|_Alignof|_Alignas|continue|unsigned|restrict|intmax_t|register|int64_t|qaddr_t|segsz_t|_Atomic|alignas|default|caddr_t|nlink_t|typedef|u_short|fixpt_t|clock_t|swblk_t|ssize_t|alignof|daddr_t|int16_t|int32_t|uint8_t|struct|mode_t|size_t|time_t|ushort|u_long|u_char|int8_t|double|signed|static|extern|inline|return|switch|xor_eq|and_eq|bitand|not_eq|sizeof|quad_t|uid_t|bitor|union|off_t|key_t|ino_t|compl|u_int|short|const|false|while|float|pid_t|break|_Bool|or_eq|div_t|dev_t|gid_t|id_t|long|case|goto|else|bool|auto|id_t|enum|uint|true|NULL|void|char|for|not|int|and|xor|do|or|if)\\\\s*\\\\()(?=[A-Z_a-z]\\\\w*\\\\s*\\\\()","end":"(?!\\\\G)(?<=\\\\))","name":"meta.function.c","patterns":[{"include":"#function-innards"}]},"anon_pattern_range_8":{"begin":"([A-Z_a-z][0-9A-Z_a-z]*|(?<=[])]))?(\\\\[)(?!])","beginCaptures":{"1":{"name":"variable.object.c"},"2":{"name":"punctuation.definition.begin.bracket.square.c"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.end.bracket.square.c"}},"name":"meta.bracket.square.access.c","patterns":[{"include":"#function-call-innards"}]},"anon_pattern_range_9":{"match":"\\\\[\\\\s*]","name":"storage.modifier.array.bracket.square.c"},"backslash_escapes":{"match":"\\\\\\\\([\\"'?\\\\\\\\abefnprtv]|[0-3][0-7]{0,2}|[4-7]\\\\d?|x\\\\h{0,2}|u\\\\h{0,4}|U\\\\h{0,8})","name":"constant.character.escape.c"},"block":{"patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"name":"meta.block.c","patterns":[{"include":"#block_innards"}]}]},"block_comment":{"patterns":[{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.c"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.c"}},"name":"comment.block.c"},{"begin":"\\\\s*+(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.c"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.c"}},"name":"comment.block.c"}]},"block_innards":{"patterns":[{"include":"#preprocessor-rule-enabled-block"},{"include":"#preprocessor-rule-disabled-block"},{"include":"#preprocessor-rule-conditional-block"},{"include":"#method_access"},{"include":"#member_access"},{"include":"#c_function_call"},{"begin":"(?=\\\\s)(?<!else|new|return)(?<=\\\\w)\\\\s+(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"variable.other.c"},"2":{"name":"punctuation.section.parens.begin.bracket.round.initialization.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.initialization.c"}},"name":"meta.initialization.c","patterns":[{"include":"#function-call-innards"}]},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"patterns":[{"include":"#block_innards"}]},{"include":"#parens-block"},{"include":"$self"}]},"c_conditional_context":{"patterns":[{"include":"$self"},{"include":"#block_innards"}]},"c_function_call":{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()(?=(?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++\\\\s*\\\\(|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[])\\\\s*\\\\()","end":"(?<=\\\\))(?!\\\\w)","name":"meta.function-call.c","patterns":[{"include":"#function-call-innards"}]},"case_statement":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)case(?!\\\\w))","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.control.case.c"}},"end":"(:)","endCaptures":{"1":{"name":"punctuation.separator.colon.case.c"}},"name":"meta.conditional.case.c","patterns":[{"include":"#evaluation_context"},{"include":"#c_conditional_context"}]},"comments":{"patterns":[{"patterns":[{"patterns":[{"begin":"^(?>\\\\s*)(//[!/]+)","beginCaptures":{"1":{"name":"punctuation.definition.comment.documentation.c"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","name":"comment.line.double-slash.documentation.c","patterns":[{"include":"#line_continuation_character"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:callergraph|callgraph|else|endif|f\\\\$|f\\\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\\"-%.<=>]|::|\\\\||---??)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.italic.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\](?:a|em?))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.bold.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]b)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.inline.raw.string.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\][cp])\\\\s+(\\\\S+)"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"patterns":[{"match":"in|out","name":"keyword.other.parameter.direction.$0.c"}]},"3":{"name":"variable.parameter.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]param)(?:\\\\s*\\\\[((?:,?\\\\s*(?:in|out)\\\\s*)+)])?\\\\s+\\\\b(\\\\w+)\\\\b"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"\\\\b[A-Z]+:|@[_a-z]+:","name":"storage.type.class.gtkdoc"}]},{"captures":{"1":{"name":"punctuation.definition.comment.begin.documentation.c"},"2":{"patterns":[{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:callergraph|callgraph|else|endif|f\\\\$|f\\\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\\"-%.<=>]|::|\\\\||---??)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.italic.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\](?:a|em?))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.bold.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]b)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.inline.raw.string.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\][cp])\\\\s+(\\\\S+)"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"patterns":[{"match":"in|out","name":"keyword.other.parameter.direction.$0.c"}]},"3":{"name":"variable.parameter.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]param)(?:\\\\s*\\\\[((?:,?\\\\s*(?:in|out)\\\\s*)+)])?\\\\s+\\\\b(\\\\w+)\\\\b"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"\\\\b[A-Z]+:|@[_a-z]+:","name":"storage.type.class.gtkdoc"}]},"3":{"name":"punctuation.definition.comment.end.documentation.c"}},"match":"(/\\\\*[!*]+(?=\\\\s))(.+)([!*]*\\\\*/)","name":"comment.block.documentation.c"},{"begin":"((?>\\\\s*)/\\\\*[!*]+(?:(?:\\\\n|$)|(?=\\\\s)))","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.documentation.c"}},"end":"([!*]*\\\\*/)","endCaptures":{"1":{"name":"punctuation.definition.comment.end.documentation.c"}},"name":"comment.block.documentation.c","patterns":[{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:callergraph|callgraph|else|endif|f\\\\$|f\\\\[|f]|hidecallergraph|hidecallgraph|hiderefby|hiderefs|hideinitializer|htmlinclude|n|nosubgrouping|private|privatesection|protected|protectedsection|public|publicsection|pure|showinitializer|showrefby|showrefs|tableofcontents|[\\"-%.<=>]|::|\\\\||---??)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.italic.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\](?:a|em?))\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.bold.doxygen.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]b)\\\\s+(\\\\S+)"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"name":"markup.inline.raw.string.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\][cp])\\\\s+(\\\\S+)"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:a|anchor|[bc]|cite|copybrief|copydetail|copydoc|def|dir|dontinclude|em??|emoji|enum|example|extends|file|idlexcept|implements|include|includedoc|includelineno|latexinclude|link|memberof|namespace|p|package|ref|refitem|related|relates|relatedalso|relatesalso|verbinclude)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:addindex|addtogroup|category|class|defgroup|diafile|dotfile|elseif|fn|headerfile|if|ifnot|image|ingroup|interface|line|mainpage|mscfile|name|overload|page|property|protocol|section|skip|skipline|snippet|snippetdoc|snippetlineno|struct|subpage|subsection|subsubsection|typedef|union|until|vhdlflow|weakgroup)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"captures":{"1":{"name":"storage.type.class.doxygen.c"},"2":{"patterns":[{"match":"in|out","name":"keyword.other.parameter.direction.$0.c"}]},"3":{"name":"variable.parameter.c"}},"match":"((?<=[!*/\\\\s])[@\\\\\\\\]param)(?:\\\\s*\\\\[((?:,?\\\\s*(?:in|out)\\\\s*)+)])?\\\\s+\\\\b(\\\\w+)\\\\b"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:arg|attention|authors??|brief|bug|copyright|date|deprecated|details|exception|invariant|li|note|par|paragraph|param|post|pre|remarks??|result|returns??|retval|sa|see|short|since|test|throw|todo|tparam|version|warning|xrefitem)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"(?<=[!*/\\\\s])[@\\\\\\\\](?:code|cond|docbookonly|dot|htmlonly|internal|latexonly|link|manonly|msc|parblock|rtfonly|secreflist|uml|verbatim|xmlonly|endcode|endcond|enddocbookonly|enddot|endhtmlonly|endinternal|endlatexonly|endlink|endmanonly|endmsc|endparblock|endrtfonly|endsecreflist|enduml|endverbatim|endxmlonly)\\\\b(?:\\\\{[^}]*})?","name":"storage.type.class.doxygen.c"},{"match":"\\\\b[A-Z]+:|@[_a-z]+:","name":"storage.type.class.gtkdoc"}]},{"captures":{"1":{"name":"meta.toc-list.banner.block.c"}},"match":"^/\\\\* =(\\\\s*.*?)\\\\s*= \\\\*/$\\\\n?","name":"comment.block.banner.c"},{"begin":"(/\\\\*)","beginCaptures":{"1":{"name":"punctuation.definition.comment.begin.c"}},"end":"(\\\\*/)","endCaptures":{"1":{"name":"punctuation.definition.comment.end.c"}},"name":"comment.block.c"},{"captures":{"1":{"name":"meta.toc-list.banner.line.c"}},"match":"^// =(\\\\s*.*?)\\\\s*=$\\\\n?","name":"comment.line.banner.c"},{"begin":"((?:^[\\\\t ]+)?)(?=//)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.c"}},"end":"(?!\\\\G)","patterns":[{"begin":"(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.c"}},"end":"(?=\\\\n)","name":"comment.line.double-slash.c","patterns":[{"include":"#line_continuation_character"}]}]}]},{"include":"#block_comment"},{"include":"#line_comment"}]},{"include":"#block_comment"},{"include":"#line_comment"}]},"default_statement":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)default(?!\\\\w))","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.control.default.c"}},"end":"(:)","endCaptures":{"1":{"name":"punctuation.separator.colon.case.default.c"}},"name":"meta.conditional.case.c","patterns":[{"include":"#evaluation_context"},{"include":"#c_conditional_context"}]},"disabled":{"begin":"^\\\\s*#\\\\s*if(n?def)?\\\\b.*$","end":"^\\\\s*#\\\\s*endif\\\\b","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},"evaluation_context":{"patterns":[{"include":"#function-call-innards"},{"include":"$self"}]},"function-call-innards":{"patterns":[{"include":"#comments"},{"include":"#storage_types"},{"include":"#method_access"},{"include":"#member_access"},{"include":"#operators"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.c"},"2":{"name":"punctuation.section.arguments.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.arguments.end.bracket.round.c"}},"patterns":[{"include":"#function-call-innards"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#function-call-innards"}]},{"include":"#block_innards"}]},"function-innards":{"patterns":[{"include":"#comments"},{"include":"#storage_types"},{"include":"#operators"},{"include":"#vararg_ellipses"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.c"},"2":{"name":"punctuation.section.parameters.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parameters.end.bracket.round.c"}},"name":"meta.function.definition.parameters.c","patterns":[{"include":"#probably_a_parameter"},{"include":"#function-innards"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#function-innards"}]},{"include":"$self"}]},"inline_comment":{"patterns":[{"patterns":[{"captures":{"1":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"2":{"name":"comment.block.c"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/))"},{"captures":{"1":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"2":{"name":"comment.block.c"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"}]},{"captures":{"1":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"2":{"name":"comment.block.c"},"3":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"(/\\\\*)((?:[^*]|\\\\*++[^/])*+(\\\\*++/))"}]},"line_comment":{"patterns":[{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.c"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.c","patterns":[{"include":"#line_continuation_character"}]},{"begin":"\\\\s*+(//)","beginCaptures":{"1":{"name":"punctuation.definition.comment.c"}},"end":"(?<=\\\\n)(?<!\\\\\\\\\\\\n)","endCaptures":{},"name":"comment.line.double-slash.c","patterns":[{"include":"#line_continuation_character"}]}]},"line_continuation_character":{"patterns":[{"captures":{"1":{"name":"constant.character.escape.line-continuation.c"}},"match":"(\\\\\\\\)\\\\n"}]},"member_access":{"captures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"},"4":{"patterns":[{"include":"#member_access"},{"include":"#method_access"},{"captures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"}},"match":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))"}]},"5":{"name":"variable.other.member.c"}},"match":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))((?:[A-Z_a-z]\\\\w*\\\\s*(?:\\\\.\\\\*?|->\\\\*?)\\\\s*)*)\\\\s*\\\\b((?!(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|atomic_uint_least8_t|atomic_int_least16_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_int_least64_t|atomic_int_least32_t|pthread_rwlockattr_t|atomic_uint_fast16_t|pthread_mutexattr_t|atomic_int_fast16_t|atomic_uint_fast8_t|atomic_int_fast64_t|atomic_int_least8_t|atomic_int_fast32_t|atomic_int_fast8_t|pthread_condattr_t|atomic_uintptr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintmax_t|pthread_mutex_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_attr_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_cond_t|pthread_once_t|uint_fast64_t|uint_fast16_t|atomic_size_t|uint_least8_t|int_least64_t|int_least32_t|int_least16_t|pthread_key_t|atomic_ullong|atomic_ushort|uint_fast32_t|atomic_schar|atomic_short|uint_fast8_t|int_fast64_t|int_fast32_t|int_fast16_t|atomic_ulong|atomic_llong|int_least8_t|atomic_uchar|memory_order|suseconds_t|int_fast8_t|atomic_bool|atomic_char|atomic_uint|atomic_long|atomic_int|useconds_t|_Imaginary|blksize_t|pthread_t|in_addr_t|uintptr_t|in_port_t|uintmax_t|blkcnt_t|uint16_t|unsigned|_Complex|uint32_t|intptr_t|intmax_t|uint64_t|u_quad_t|int64_t|int32_t|ssize_t|caddr_t|clock_t|uint8_t|u_short|swblk_t|segsz_t|int16_t|fixpt_t|daddr_t|nlink_t|qaddr_t|size_t|time_t|mode_t|signed|quad_t|ushort|u_long|u_char|double|int8_t|ino_t|uid_t|pid_t|_Bool|float|dev_t|div_t|short|gid_t|off_t|u_int|key_t|id_t|uint|long|void|char|bool|id_t|int)\\\\b)[A-Z_a-z]\\\\w*\\\\b(?!\\\\())"},"method_access":{"begin":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))((?:[A-Z_a-z]\\\\w*\\\\s*(?:\\\\.\\\\*?|->\\\\*?)\\\\s*)*)\\\\s*([A-Z_a-z]\\\\w*)(\\\\()","beginCaptures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"},"4":{"patterns":[{"include":"#member_access"},{"include":"#method_access"},{"captures":{"1":{"name":"variable.other.object.access.c"},"2":{"name":"punctuation.separator.dot-access.c"},"3":{"name":"punctuation.separator.pointer-access.c"}},"match":"((?:[A-Z_a-z]\\\\w*|(?<=[])]))\\\\s*)(?:(\\\\.\\\\*?)|(->\\\\*?))"}]},"5":{"name":"entity.name.function.member.c"},"6":{"name":"punctuation.section.arguments.begin.bracket.round.function.member.c"}},"contentName":"meta.function-call.member.c","end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.arguments.end.bracket.round.function.member.c"}},"patterns":[{"include":"#function-call-innards"}]},"numbers":{"captures":{"0":{"patterns":[{"begin":"(?=.)","end":"$","patterns":[{"captures":{"1":{"name":"keyword.other.unit.hexadecimal.c"},"2":{"name":"constant.numeric.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"constant.numeric.hexadecimal.c"},"5":{"name":"constant.numeric.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"6":{"name":"punctuation.separator.constant.numeric"},"8":{"name":"keyword.other.unit.exponent.hexadecimal.c"},"9":{"name":"keyword.operator.plus.exponent.hexadecimal.c"},"10":{"name":"keyword.operator.minus.exponent.hexadecimal.c"},"11":{"name":"constant.numeric.exponent.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"12":{"name":"keyword.other.unit.suffix.floating-point.c"}},"match":"\\\\G(0[Xx])(\\\\h(?:\\\\h|((?<=\\\\h)'(?=\\\\h)))*)?((?<=\\\\h)\\\\.|\\\\.(?=\\\\h))(\\\\h(?:\\\\h|((?<=\\\\h)'(?=\\\\h)))*)?((?<!')([Pp])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?([FLfl](?!\\\\w))?$"},{"captures":{"2":{"name":"constant.numeric.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"constant.numeric.decimal.point.c"},"5":{"name":"constant.numeric.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"6":{"name":"punctuation.separator.constant.numeric"},"8":{"name":"keyword.other.unit.exponent.decimal.c"},"9":{"name":"keyword.operator.plus.exponent.decimal.c"},"10":{"name":"keyword.operator.minus.exponent.decimal.c"},"11":{"name":"constant.numeric.exponent.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"12":{"name":"keyword.other.unit.suffix.floating-point.c"}},"match":"\\\\G((?=[.0-9])(?!0[BXbx]))([0-9](?:[0-9]|((?<=\\\\h)'(?=\\\\h)))*)?((?<=[0-9])\\\\.|\\\\.(?=[0-9]))([0-9](?:[0-9]|((?<=\\\\h)'(?=\\\\h)))*)?((?<!')([Ee])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?([FLfl](?!\\\\w))?$"},{"captures":{"1":{"name":"keyword.other.unit.binary.c"},"2":{"name":"constant.numeric.binary.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G(0[Bb])([01](?:[01]|((?<=\\\\h)'(?=\\\\h)))*)((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"captures":{"1":{"name":"keyword.other.unit.octal.c"},"2":{"name":"constant.numeric.octal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"4":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G(0)((?:[0-7]|((?<=\\\\h)'(?=\\\\h)))+)((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"captures":{"1":{"name":"keyword.other.unit.hexadecimal.c"},"2":{"name":"constant.numeric.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"5":{"name":"keyword.other.unit.exponent.hexadecimal.c"},"6":{"name":"keyword.operator.plus.exponent.hexadecimal.c"},"7":{"name":"keyword.operator.minus.exponent.hexadecimal.c"},"8":{"name":"constant.numeric.exponent.hexadecimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"9":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G(0[Xx])(\\\\h(?:\\\\h|((?<=\\\\h)'(?=\\\\h)))*)((?<!')([Pp])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"captures":{"2":{"name":"constant.numeric.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"3":{"name":"punctuation.separator.constant.numeric"},"5":{"name":"keyword.other.unit.exponent.decimal.c"},"6":{"name":"keyword.operator.plus.exponent.decimal.c"},"7":{"name":"keyword.operator.minus.exponent.decimal.c"},"8":{"name":"constant.numeric.exponent.decimal.c","patterns":[{"match":"(?<=\\\\h)'(?=\\\\h)","name":"punctuation.separator.constant.numeric"}]},"9":{"name":"keyword.other.unit.suffix.integer.c"}},"match":"\\\\G((?=[.0-9])(?!0[BXbx]))([0-9](?:[0-9]|((?<=\\\\h)'(?=\\\\h)))*)((?<!')([Ee])(\\\\+?)(-?)([0-9](?:[0-9]|(?<=\\\\h)'(?=\\\\h))*))?((?:(?:(?:(?:(?:[Uu]|[Uu]ll?)|[Uu]LL?)|ll?[Uu]?)|LL?[Uu]?)|[Ff])(?!\\\\w))?$"},{"match":"(?:['.0-9A-Z_a-z]|(?<=[EPep])[-+])+","name":"invalid.illegal.constant.numeric"}]}]}},"match":"(?<!\\\\w)\\\\.?\\\\d(?:['.0-9A-Z_a-z]|(?<=[EPep])[-+])*"},"operators":{"patterns":[{"match":"(?<![$\\\\w])(sizeof)(?![$\\\\w])","name":"keyword.operator.sizeof.c"},{"match":"--","name":"keyword.operator.decrement.c"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.c"},{"match":"(?:[-%*+]|(?<!\\\\()/)=","name":"keyword.operator.assignment.compound.c"},{"match":"(?:[\\\\&^]|<<|>>|\\\\|)=","name":"keyword.operator.assignment.compound.bitwise.c"},{"match":"<<|>>","name":"keyword.operator.bitwise.shift.c"},{"match":"!=|<=|>=|==|[<>]","name":"keyword.operator.comparison.c"},{"match":"&&|!|\\\\|\\\\|","name":"keyword.operator.logical.c"},{"match":"[\\\\&^|~]","name":"keyword.operator.c"},{"match":"=","name":"keyword.operator.assignment.c"},{"match":"[-%*+/]","name":"keyword.operator.c"},{"begin":"(\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.c"}},"end":"(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.c"}},"patterns":[{"include":"#function-call-innards"},{"include":"$self"}]}]},"parens":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"name":"meta.parens.c","patterns":[{"include":"$self"}]},"parens-block":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"name":"meta.parens.block.c","patterns":[{"include":"#block_innards"},{"match":"(?-im:(?<!:):(?!:))","name":"punctuation.range-based.c"}]},"pragma-mark":{"captures":{"1":{"name":"meta.preprocessor.pragma.c"},"2":{"name":"keyword.control.directive.pragma.pragma-mark.c"},"3":{"name":"punctuation.definition.directive.c"},"4":{"name":"entity.name.tag.pragma-mark.c"}},"match":"^\\\\s*(((#)\\\\s*pragma\\\\s+mark)\\\\s+(.*))","name":"meta.section.c"},"predefined_macros":{"patterns":[{"captures":{"1":{"name":"entity.name.other.preprocessor.macro.predefined.$1.c"}},"match":"\\\\b(__cplusplus|__DATE__|__FILE__|__LINE__|__STDC__|__STDC_HOSTED__|__STDC_NO_COMPLEX__|__STDC_VERSION__|__STDCPP_THREADS__|__TIME__|NDEBUG|__OBJC__|__ASSEMBLER__|__ATOM__|__AVX__|__AVX2__|_CHAR_UNSIGNED|__CLR_VER|_CONTROL_FLOW_GUARD|__COUNTER__|__cplusplus_cli|__cplusplus_winrt|_CPPRTTI|_CPPUNWIND|_DEBUG|_DLL|__FUNCDNAME__|__FUNCSIG__|__FUNCTION__|_INTEGRAL_MAX_BITS|__INTELLISENSE__|_ISO_VOLATILE|_KERNEL_MODE|_M_AMD64|_M_ARM|_M_ARM_ARMV7VE|_M_ARM_FP|_M_ARM64|_M_CEE|_M_CEE_PURE|_M_CEE_SAFE|_M_FP_EXCEPT|_M_FP_FAST|_M_FP_PRECISE|_M_FP_STRICT|_M_IX86|_M_IX86_FP|_M_X64|_MANAGED|_MSC_BUILD|_MSC_EXTENSIONS|_MSC_FULL_VER|_MSC_VER|_MSVC_LANG|__MSVC_RUNTIME_CHECKS|_MT|_NATIVE_WCHAR_T_DEFINED|_OPENMP|_PREFAST|__TIMESTAMP__|_VC_NO_DEFAULTLIB|_WCHAR_T_DEFINED|_WIN32|_WIN64|_WINRT_DLL|_ATL_VER|_MFC_VER|__GFORTRAN__|__GNUC__|__GNUC_MINOR__|__GNUC_PATCHLEVEL__|__GNUG__|__STRICT_ANSI__|__BASE_FILE__|__INCLUDE_LEVEL__|__ELF__|__VERSION__|__OPTIMIZE__|__OPTIMIZE_SIZE__|__NO_INLINE__|__GNUC_STDC_INLINE__|__CHAR_UNSIGNED__|__WCHAR_UNSIGNED__|__REGISTER_PREFIX__|__SIZE_TYPE__|__PTRDIFF_TYPE__|__WCHAR_TYPE__|__WINT_TYPE__|__INTMAX_TYPE__|__UINTMAX_TYPE__|__SIG_ATOMIC_TYPE__|__INT8_TYPE__|__INT16_TYPE__|__INT32_TYPE__|__INT64_TYPE__|__UINT8_TYPE__|__UINT16_TYPE__|__UINT32_TYPE__|__UINT64_TYPE__|__INT_LEAST8_TYPE__|__INT_LEAST16_TYPE__|__INT_LEAST32_TYPE__|__INT_LEAST64_TYPE__|__UINT_LEAST8_TYPE__|__UINT_LEAST16_TYPE__|__UINT_LEAST32_TYPE__|__UINT_LEAST64_TYPE__|__INT_FAST8_TYPE__|__INT_FAST16_TYPE__|__INT_FAST32_TYPE__|__INT_FAST64_TYPE__|__UINT_FAST8_TYPE__|__UINT_FAST16_TYPE__|__UINT_FAST32_TYPE__|__UINT_FAST64_TYPE__|__INTPTR_TYPE__|__UINTPTR_TYPE__|__CHAR_BIT__|__SCHAR_MAX__|__WCHAR_MAX__|__SHRT_MAX__|__INT_MAX__|__LONG_MAX__|__LONG_LONG_MAX__|__WINT_MAX__|__SIZE_MAX__|__PTRDIFF_MAX__|__INTMAX_MAX__|__UINTMAX_MAX__|__SIG_ATOMIC_MAX__|__INT8_MAX__|__INT16_MAX__|__INT32_MAX__|__INT64_MAX__|__UINT8_MAX__|__UINT16_MAX__|__UINT32_MAX__|__UINT64_MAX__|__INT_LEAST8_MAX__|__INT_LEAST16_MAX__|__INT_LEAST32_MAX__|__INT_LEAST64_MAX__|__UINT_LEAST8_MAX__|__UINT_LEAST16_MAX__|__UINT_LEAST32_MAX__|__UINT_LEAST64_MAX__|__INT_FAST8_MAX__|__INT_FAST16_MAX__|__INT_FAST32_MAX__|__INT_FAST64_MAX__|__UINT_FAST8_MAX__|__UINT_FAST16_MAX__|__UINT_FAST32_MAX__|__UINT_FAST64_MAX__|__INTPTR_MAX__|__UINTPTR_MAX__|__WCHAR_MIN__|__WINT_MIN__|__SIG_ATOMIC_MIN__|__SCHAR_WIDTH__|__SHRT_WIDTH__|__INT_WIDTH__|__LONG_WIDTH__|__LONG_LONG_WIDTH__|__PTRDIFF_WIDTH__|__SIG_ATOMIC_WIDTH__|__SIZE_WIDTH__|__WCHAR_WIDTH__|__WINT_WIDTH__|__INT_LEAST8_WIDTH__|__INT_LEAST16_WIDTH__|__INT_LEAST32_WIDTH__|__INT_LEAST64_WIDTH__|__INT_FAST8_WIDTH__|__INT_FAST16_WIDTH__|__INT_FAST32_WIDTH__|__INT_FAST64_WIDTH__|__INTPTR_WIDTH__|__INTMAX_WIDTH__|__SIZEOF_INT__|__SIZEOF_LONG__|__SIZEOF_LONG_LONG__|__SIZEOF_SHORT__|__SIZEOF_POINTER__|__SIZEOF_FLOAT__|__SIZEOF_DOUBLE__|__SIZEOF_LONG_DOUBLE__|__SIZEOF_SIZE_T__|__SIZEOF_WCHAR_T__|__SIZEOF_WINT_T__|__SIZEOF_PTRDIFF_T__|__BYTE_ORDER__|__ORDER_LITTLE_ENDIAN__|__ORDER_BIG_ENDIAN__|__ORDER_PDP_ENDIAN__|__FLOAT_WORD_ORDER__|__DEPRECATED|__EXCEPTIONS|__GXX_RTTI|__USING_SJLJ_EXCEPTIONS__|__GXX_EXPERIMENTAL_CXX0X__|__GXX_WEAK__|__NEXT_RUNTIME__|__LP64__|_LP64|__SSP__|__SSP_ALL__|__SSP_STRONG__|__SSP_EXPLICIT__|__SANITIZE_ADDRESS__|__SANITIZE_THREAD__|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8|__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16|__HAVE_SPECULATION_SAFE_VALUE|__GCC_HAVE_DWARF2_CFI_ASM|__FP_FAST_FMAF??|__FP_FAST_FMAL|__FP_FAST_FMAF16|__FP_FAST_FMAF32|__FP_FAST_FMAF64|__FP_FAST_FMAF128|__FP_FAST_FMAF32X|__FP_FAST_FMAF64X|__FP_FAST_FMAF128X|__GCC_IEC_559|__GCC_IEC_559_COMPLEX|__NO_MATH_ERRNO__|__has_builtin|__has_feature|__has_extension|__has_cpp_attribute|__has_c_attribute|__has_attribute|__has_declspec_attribute|__is_identifier|__has_include|__has_include_next|__has_warning|__BASE_FILE__|__FILE_NAME__|__clang__|__clang_major__|__clang_minor__|__clang_patchlevel__|__clang_version__|__fp16|_Float16)\\\\b"},{"match":"\\\\b__([A-Z_]+)__\\\\b","name":"entity.name.other.preprocessor.macro.predefined.probably.$1.c"}]},"preprocessor-rule-conditional":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if(?:n?def)?)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#preprocessor-rule-enabled-elif"},{"include":"#preprocessor-rule-enabled-else"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"$self"}]},{"captures":{"0":{"name":"invalid.illegal.stray-$1.c"}},"match":"^\\\\s*#\\\\s*(e(?:lse|lif|ndif))\\\\b"}]},"preprocessor-rule-conditional-block":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if(?:n?def)?)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#preprocessor-rule-enabled-elif-block"},{"include":"#preprocessor-rule-enabled-else-block"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#block_innards"}]},{"captures":{"0":{"name":"invalid.illegal.stray-$1.c"}},"match":"^\\\\s*#\\\\s*(e(?:lse|lif|ndif))\\\\b"}]},"preprocessor-rule-conditional-line":{"patterns":[{"match":"\\\\bdefined\\\\b(?:\\\\s*$|(?=\\\\s*\\\\(*\\\\s*(?!defined\\\\b)[$A-Z_a-z][$\\\\w]*\\\\b\\\\s*\\\\)*\\\\s*(?:\\\\n|//|/\\\\*|[:?]|&&|\\\\|\\\\||\\\\\\\\\\\\s*\\\\n)))","name":"keyword.control.directive.conditional.c"},{"match":"\\\\bdefined\\\\b","name":"invalid.illegal.macro-name.c"},{"include":"#comments"},{"include":"#strings"},{"include":"#numbers"},{"begin":"\\\\?","beginCaptures":{"0":{"name":"keyword.operator.ternary.c"}},"end":":","endCaptures":{"0":{"name":"keyword.operator.ternary.c"}},"patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#operators"},{"match":"\\\\b(NULL|true|false|TRUE|FALSE)\\\\b","name":"constant.language.c"},{"match":"[$A-Z_a-z][$\\\\w]*","name":"entity.name.function.preprocessor.c"},{"include":"#line_continuation_character"},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"\\\\)|(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","endCaptures":{"0":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#preprocessor-rule-conditional-line"}]}]},"preprocessor-rule-define-line-blocks":{"patterns":[{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"patterns":[{"include":"#preprocessor-rule-define-line-blocks"},{"include":"#preprocessor-rule-define-line-contents"}]},{"include":"#preprocessor-rule-define-line-contents"}]},"preprocessor-rule-define-line-contents":{"patterns":[{"include":"#vararg_ellipses"},{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.section.block.begin.bracket.curly.c"}},"end":"}|(?=\\\\s*#\\\\s*e(?:lif|lse|ndif)\\\\b)|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.section.block.end.bracket.curly.c"}},"name":"meta.block.c","patterns":[{"include":"#preprocessor-rule-define-line-blocks"}]},{"match":"\\\\(","name":"punctuation.section.parens.begin.bracket.round.c"},{"match":"\\\\)","name":"punctuation.section.parens.end.bracket.round.c"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\\\s*\\\\()(?=(?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++\\\\s*\\\\(|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[])\\\\s*\\\\()","end":"(?<=\\\\))(?!\\\\w)|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","name":"meta.function.c","patterns":[{"include":"#preprocessor-rule-define-line-functions"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.c","patterns":[{"include":"#string_escaped_char"},{"include":"#string_placeholder"},{"include":"#line_continuation_character"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"'|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.single.c","patterns":[{"include":"#string_escaped_char"},{"include":"#line_continuation_character"}]},{"include":"#method_access"},{"include":"#member_access"},{"include":"$self"}]},"preprocessor-rule-define-line-functions":{"patterns":[{"include":"#comments"},{"include":"#storage_types"},{"include":"#vararg_ellipses"},{"include":"#method_access"},{"include":"#member_access"},{"include":"#operators"},{"begin":"(?!(?:while|for|do|if|else|switch|catch|enumerate|return|typeid|alignof|alignas|sizeof|[cr]?iterate|and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\\\s*\\\\()((?:[A-Z_a-z][0-9A-Z_a-z]*+|::)++|(?<=operator)(?:[-!\\\\&*+<=>]+|\\\\(\\\\)|\\\\[]))\\\\s*(\\\\()","beginCaptures":{"1":{"name":"entity.name.function.c"},"2":{"name":"punctuation.section.arguments.begin.bracket.round.c"}},"end":"(\\\\))|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"1":{"name":"punctuation.section.arguments.end.bracket.round.c"}},"patterns":[{"include":"#preprocessor-rule-define-line-functions"}]},{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.section.parens.begin.bracket.round.c"}},"end":"(\\\\))|(?<!\\\\\\\\)(?=\\\\s*\\\\n)","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.c"}},"patterns":[{"include":"#preprocessor-rule-define-line-functions"}]},{"include":"#preprocessor-rule-define-line-contents"}]},"preprocessor-rule-disabled":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0+\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"include":"#preprocessor-rule-enabled-elif"},{"include":"#preprocessor-rule-enabled-else"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*e(?:lif|lse|ndif))\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"$self"}]},{"begin":"\\\\n","contentName":"comment.block.preprocessor.if-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]}]}]},"preprocessor-rule-disabled-block":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0+\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"include":"#preprocessor-rule-enabled-elif-block"},{"include":"#preprocessor-rule-enabled-else-block"},{"include":"#preprocessor-rule-disabled-elif"},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*e(?:lif|lse|ndif))\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#block_innards"}]},{"begin":"\\\\n","contentName":"comment.block.preprocessor.if-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]}]}]},"preprocessor-rule-disabled-elif":{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b(?=\\\\s*\\\\(*\\\\b0+\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*e(?:lif|lse|ndif))\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"\\\\n","contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]}]},"preprocessor-rule-enabled":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"},"3":{"name":"constant.numeric.preprocessor.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.else-branch.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.if-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"$self"}]}]}]},"preprocessor-rule-enabled-block":{"patterns":[{"begin":"^\\\\s*((#)\\\\s*if)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"^\\\\s*((#)\\\\s*endif)\\\\b","endCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.else-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.if-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#block_innards"}]}]}]},"preprocessor-rule-enabled-elif":{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"^\\\\s*((#)\\\\s*(else))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*(elif))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"include":"$self"}]}]},"preprocessor-rule-enabled-elif-block":{"begin":"^\\\\s*((#)\\\\s*elif)\\\\b(?=\\\\s*\\\\(*\\\\b0*1\\\\b\\\\)*\\\\s*(?:$|//|/\\\\*))","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"\\\\G(?=.)(?!/(?:/|\\\\*(?!.*\\\\\\\\\\\\s*\\\\n)))","end":"(?=//)|(?=/\\\\*(?!.*\\\\\\\\\\\\s*\\\\n))|(?<!\\\\\\\\)(?=\\\\n)","name":"meta.preprocessor.c","patterns":[{"include":"#preprocessor-rule-conditional-line"}]},{"include":"#comments"},{"begin":"\\\\n","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"begin":"^\\\\s*((#)\\\\s*(else))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.in-block.c","end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"begin":"^\\\\s*((#)\\\\s*(elif))\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"contentName":"comment.block.preprocessor.elif-branch.c","end":"(?=^\\\\s*((#)\\\\s*e(?:lse|lif|ndif))\\\\b)","patterns":[{"include":"#disabled"},{"include":"#pragma-mark"}]},{"include":"#block_innards"}]}]},"preprocessor-rule-enabled-else":{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"$self"}]},"preprocessor-rule-enabled-else-block":{"begin":"^\\\\s*((#)\\\\s*else)\\\\b","beginCaptures":{"0":{"name":"meta.preprocessor.c"},"1":{"name":"keyword.control.directive.conditional.c"},"2":{"name":"punctuation.definition.directive.c"}},"end":"(?=^\\\\s*((#)\\\\s*endif)\\\\b)","patterns":[{"include":"#block_innards"}]},"probably_a_parameter":{"captures":{"1":{"name":"variable.parameter.probably.c"}},"match":"(?<=[0-9A-Z_a-z] |[]\\\\&)*>])\\\\s*([A-Z_a-z]\\\\w*)\\\\s*(?=(?:\\\\[]\\\\s*)?[),])"},"static_assert":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)static_assert|_Static_assert(?!\\\\w))((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))(\\\\()","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"keyword.other.static_assert.c"},"6":{"patterns":[{"include":"#inline_comment"}]},"7":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"8":{"name":"comment.block.c"},"9":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"10":{"name":"punctuation.section.arguments.begin.bracket.round.static_assert.c"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.arguments.end.bracket.round.static_assert.c"}},"patterns":[{"begin":"(,)\\\\s*(?=(?:L|u8?|U\\\\s*\\")?)","beginCaptures":{"1":{"name":"punctuation.separator.delimiter.comma.c"}},"end":"(?=\\\\))","name":"meta.static_assert.message.c","patterns":[{"include":"#string_context"}]},{"include":"#evaluation_context"}]},"storage_types":{"patterns":[{"match":"(?-im:(?<!\\\\w)(?:unsigned|signed|double|_Bool|short|float|long|void|char|bool|int)(?!\\\\w))","name":"storage.type.built-in.primitive.c"},{"match":"(?-im:(?<!\\\\w)(?:atomic_uint_least64_t|atomic_uint_least16_t|atomic_uint_least32_t|pthread_rwlockattr_t|atomic_uint_fast64_t|atomic_uint_fast32_t|atomic_uint_fast16_t|atomic_int_least64_t|atomic_int_least32_t|atomic_int_least16_t|atomic_uint_least8_t|atomic_uint_fast8_t|atomic_int_least8_t|atomic_int_fast16_t|pthread_mutexattr_t|atomic_int_fast32_t|atomic_int_fast64_t|atomic_int_fast8_t|pthread_condattr_t|atomic_ptrdiff_t|pthread_rwlock_t|atomic_uintptr_t|atomic_uintmax_t|atomic_intmax_t|atomic_intptr_t|atomic_char32_t|atomic_char16_t|pthread_mutex_t|pthread_cond_t|atomic_wchar_t|uint_least64_t|uint_least32_t|uint_least16_t|pthread_once_t|pthread_attr_t|int_least32_t|pthread_key_t|int_least16_t|int_least64_t|uint_least8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|atomic_ushort|atomic_ullong|atomic_size_t|int_fast16_t|int_fast64_t|uint_fast8_t|atomic_short|atomic_uchar|atomic_schar|int_least8_t|memory_order|atomic_llong|atomic_ulong|int_fast32_t|atomic_long|atomic_uint|atomic_char|int_fast8_t|suseconds_t|atomic_bool|atomic_int|_Imaginary|useconds_t|in_port_t|uintmax_t|pthread_t|blksize_t|in_addr_t|uintptr_t|blkcnt_t|uint16_t|uint32_t|uint64_t|u_quad_t|_Complex|intptr_t|intmax_t|segsz_t|u_short|nlink_t|uint8_t|int64_t|int32_t|int16_t|fixpt_t|daddr_t|caddr_t|qaddr_t|ssize_t|clock_t|swblk_t|u_long|mode_t|int8_t|time_t|ushort|u_char|quad_t|size_t|pid_t|gid_t|uid_t|dev_t|div_t|off_t|u_int|key_t|ino_t|uint|id_t)(?!\\\\w))","name":"storage.type.built-in.c"},{"match":"(?-im:\\\\b(enum|struct|union)\\\\b)","name":"storage.type.$1.c"},{"begin":"\\\\b(__asm__|asm)\\\\b\\\\s*((?:volatile)?)","beginCaptures":{"1":{"name":"storage.type.asm.c"},"2":{"name":"storage.modifier.c"}},"end":"(?!\\\\G)","name":"meta.asm.c","patterns":[{"captures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"^((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))(?:\\\\n|$)"},{"include":"#comments"},{"begin":"(((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))\\\\()","beginCaptures":{"1":{"name":"punctuation.section.parens.begin.bracket.round.assembly.c"},"2":{"patterns":[{"include":"#inline_comment"}]},"3":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"4":{"name":"comment.block.c"},"5":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.assembly.c"}},"patterns":[{"begin":"(R?)(\\")","beginCaptures":{"1":{"name":"meta.encoding.c"},"2":{"name":"punctuation.definition.string.begin.assembly.c"}},"contentName":"meta.embedded.assembly.c","end":"(\\")","endCaptures":{"1":{"name":"punctuation.definition.string.end.assembly.c"}},"name":"string.quoted.double.c","patterns":[{"include":"source.asm"},{"include":"source.x86"},{"include":"source.x86_64"},{"include":"source.arm"},{"include":"#backslash_escapes"},{"include":"#string_escaped_char"}]},{"begin":"(\\\\()","beginCaptures":{"1":{"name":"punctuation.section.parens.begin.bracket.round.assembly.inner.c"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.assembly.inner.c"}},"patterns":[{"include":"#evaluation_context"}]},{"captures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"variable.other.asm.label.c"},"6":{"patterns":[{"include":"#inline_comment"}]},"7":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"8":{"name":"comment.block.c"},"9":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]}},"match":"\\\\[((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))([A-Z_a-z]\\\\w*)((?:(?>\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+?|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z))]"},{"match":":","name":"punctuation.separator.delimiter.colon.assembly.c"},{"include":"#comments"}]}]}]},"string_escaped_char":{"patterns":[{"match":"\\\\\\\\([\\"'?\\\\\\\\abefnprtv]|[0-3]\\\\d{0,2}|[4-7]\\\\d?|x\\\\h{0,2}|u\\\\h{0,4}|U\\\\h{0,8})","name":"constant.character.escape.c"},{"match":"\\\\\\\\.","name":"invalid.illegal.unknown-escape.c"}]},"string_placeholder":{"patterns":[{"match":"%(\\\\d+\\\\$)?[- #'+0]*[,:;_]?((-?\\\\d+)|\\\\*(-?\\\\d+\\\\$)?)?(\\\\.((-?\\\\d+)|\\\\*(-?\\\\d+\\\\$)?)?)?(hh?|ll|[Ljlqtz]|vh|vl?|hv|hl)?[%AC-GOSUXac-ginopsux]","name":"constant.other.placeholder.c"},{"captures":{"1":{"name":"invalid.illegal.placeholder.c"}},"match":"(%)(?!\\"\\\\s*(PRI|SCN))"}]},"strings":{"patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.double.c","patterns":[{"include":"#string_escaped_char"},{"include":"#string_placeholder"},{"include":"#line_continuation_character"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.c"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.c"}},"name":"string.quoted.single.c","patterns":[{"include":"#string_escaped_char"},{"include":"#line_continuation_character"}]}]},"switch_conditional_parentheses":{"begin":"((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))(\\\\()","beginCaptures":{"1":{"patterns":[{"include":"#inline_comment"}]},"2":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"3":{"name":"comment.block.c"},"4":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"5":{"name":"punctuation.section.parens.begin.bracket.round.conditional.switch.c"}},"end":"(\\\\))","endCaptures":{"1":{"name":"punctuation.section.parens.end.bracket.round.conditional.switch.c"}},"name":"meta.conditional.switch.c","patterns":[{"include":"#evaluation_context"},{"include":"#c_conditional_context"}]},"switch_statement":{"begin":"(((?>(?:(?>(?<!\\\\s)\\\\s+)|(/\\\\*)((?>(?:[^*]|(?>\\\\*+)[^/])*)((?>\\\\*+)/)))+|(?:(?:(?:(?:\\\\b|(?<=\\\\W))|(?=\\\\W))|\\\\A)|\\\\Z)))((?<!\\\\w)switch(?!\\\\w)))","beginCaptures":{"1":{"name":"meta.head.switch.c"},"2":{"patterns":[{"include":"#inline_comment"}]},"3":{"name":"comment.block.c punctuation.definition.comment.begin.c"},"4":{"name":"comment.block.c"},"5":{"patterns":[{"match":"\\\\*/","name":"comment.block.c punctuation.definition.comment.end.c"},{"match":"\\\\*","name":"comment.block.c"}]},"6":{"name":"keyword.control.switch.c"}},"end":"(?<=}|%>|\\\\?\\\\?>)|(?=[];=>\\\\[])","name":"meta.block.switch.c","patterns":[{"begin":"\\\\G ?","end":"(\\\\{|<%|\\\\?\\\\?<|(?=;))","endCaptures":{"1":{"name":"punctuation.section.block.begin.bracket.curly.switch.c"}},"name":"meta.head.switch.c","patterns":[{"include":"#switch_conditional_parentheses"},{"include":"$self"}]},{"begin":"(?<=\\\\{|<%|\\\\?\\\\?<)","end":"(}|%>|\\\\?\\\\?>)","endCaptures":{"1":{"name":"punctuation.section.block.end.bracket.curly.switch.c"}},"name":"meta.body.switch.c","patterns":[{"include":"#default_statement"},{"include":"#case_statement"},{"include":"$self"},{"include":"#block_innards"}]},{"begin":"(?<=}|%>|\\\\?\\\\?>)[\\\\n\\\\s]*","end":"[\\\\n\\\\s]*(?=;)","name":"meta.tail.switch.c","patterns":[{"include":"$self"}]}]},"vararg_ellipses":{"match":"(?<!\\\\.)\\\\.\\\\.\\\\.(?!\\\\.)","name":"punctuation.vararg-ellipses.c"}},"scopeName":"source.c"}`)),n=[e];export{n as default};
@@ -1,2 +1,2 @@
1
- import{j as e}from"./main-B3N0eQFg.js";import{C as a}from"./index-BXkRE220.js";import"./button-nDcsaNPl.js";import"./react-B16OrBeM.js";function c(){return e.jsx("div",{className:"min-h-screen bg-primary-50 text-primary-900",children:e.jsxs("div",{className:"max-w-2xl mx-auto px-6 py-10 space-y-10",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h1",{className:"text-3xl font-medium tracking-[-0.02em] text-center mb-10",children:"Connect to OpenCami"}),e.jsx("p",{className:"text-primary-700",children:"This client needs access to your OpenClaw gateway before you can start chatting."})]}),e.jsxs("div",{className:"space-y-4 text-primary-700",children:[e.jsxs("p",{children:["At the root of the project, create a new file named"," ",e.jsx("code",{className:"inline-code",children:".env.local"}),"."]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Paste this into it:"}),e.jsx(a,{content:`CLAWDBOT_GATEWAY_URL=ws://127.0.0.1:18789
1
+ import{j as e}from"./main-mIHr_ble.js";import{C as a}from"./index-B2iG4EM1.js";import"./button-BaHefIXU.js";import"./react-Cfq4ot0g.js";function c(){return e.jsx("div",{className:"min-h-screen bg-primary-50 text-primary-900",children:e.jsxs("div",{className:"max-w-2xl mx-auto px-6 py-10 space-y-10",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx("h1",{className:"text-3xl font-medium tracking-[-0.02em] text-center mb-10",children:"Connect to OpenCami"}),e.jsx("p",{className:"text-primary-700",children:"This client needs access to your OpenClaw gateway before you can start chatting."})]}),e.jsxs("div",{className:"space-y-4 text-primary-700",children:[e.jsxs("p",{children:["At the root of the project, create a new file named"," ",e.jsx("code",{className:"inline-code",children:".env.local"}),"."]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Paste this into it:"}),e.jsx(a,{content:`CLAWDBOT_GATEWAY_URL=ws://127.0.0.1:18789
2
2
  CLAWDBOT_GATEWAY_TOKEN=YOUR_TOKEN_HERE`,ariaLabel:"Copy gateway token example",language:"bash"}),e.jsx("p",{className:"text-primary-600 text-sm",children:"or:"}),e.jsx(a,{content:"CLAWDBOT_GATEWAY_PASSWORD=YOUR_PASSWORD_HERE",ariaLabel:"Copy gateway password example",language:"bash"})]}),e.jsx("p",{children:"Environment variables are loaded at startup. Restart your dev server:"}),e.jsx(a,{content:"npm run dev",ariaLabel:"Copy npm run dev",language:"bash"}),e.jsx("p",{children:"Refresh the page after the restart and you should be connected."})]}),e.jsxs("div",{className:"space-y-3 rounded-lg border border-primary-200 bg-primary-100 px-4 py-3 text-primary-700 text-sm",children:[e.jsx("p",{className:"text-primary-900 font-medium",children:"Where to find these values"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:[e.jsx("code",{className:"inline-code",children:"CLAWDBOT_GATEWAY_URL"}),e.jsx("br",{}),"Your OpenClaw gateway endpoint (default is",e.jsx("code",{className:"inline-code",children:"ws://127.0.0.1:18789"}),")."]}),e.jsxs("p",{children:[e.jsx("code",{className:"inline-code",children:"CLAWDBOT_GATEWAY_TOKEN"})," ","(recommended)",e.jsx("br",{}),"Matches your Gateway token (",e.jsx("code",{className:"inline-code",children:"gateway.auth.token"})," or",e.jsx("code",{className:"inline-code",children:"OPENCLAW_GATEWAY_TOKEN"}),")."]}),e.jsxs("p",{children:[e.jsx("code",{className:"inline-code",children:"CLAWDBOT_GATEWAY_PASSWORD"})," ","(fallback)",e.jsx("br",{}),"Matches your Gateway password (",e.jsx("code",{className:"inline-code",children:"gateway.auth.password"}),")."]})]}),e.jsxs("p",{children:["Gateway docs:"," ",e.jsx("a",{className:"text-primary-700 hover:text-primary-900 underline",href:"https://docs.openclaw.ai/gateway",target:"_blank",rel:"noreferrer",children:"https://docs.openclaw.ai/gateway"})]})]})]})})}export{c as component};
@@ -0,0 +1,12 @@
1
+ import{w as Ie,s as ot,f as qt,a as Ht,b as zt,c as We,h as Ut}from"./index-T4TOjvD0.js";const Fe={}.hasOwnProperty;function Kt(n,e){const t=e||{};function r(s,...i){let o=r.invalid;const c=r.handlers;if(s&&Fe.call(s,n)){const a=String(s[n]);o=Fe.call(c,a)?c[a]:r.unknown}if(o)return o.call(this,s,...i)}return r.handlers=t.handlers||{},r.invalid=t.invalid,r.unknown=t.unknown,r}let C=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Vt(n){return Ee(n)}function Ee(n){return Array.isArray(n)?Yt(n):n instanceof RegExp?n:typeof n=="object"?Jt(n):n}function Yt(n){let e=[];for(let t=0,r=n.length;t<r;t++)e[t]=Ee(n[t]);return e}function Jt(n){let e={};for(let t in n)e[t]=Ee(n[t]);return e}function at(n,...e){return e.forEach(t=>{for(let r in t)n[r]=t[r]}),n}function ct(n){const e=~n.lastIndexOf("/")||~n.lastIndexOf("\\");return e===0?n:~e===n.length-1?ct(n.substring(0,n.length-1)):n.substr(~e+1)}var ge=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Y=class{static hasCaptures(n){return n===null?!1:(ge.lastIndex=0,ge.test(n))}static replaceCaptures(n,e,t){return n.replace(ge,(r,s,i,o)=>{let c=t[parseInt(s||i,10)];if(c){let a=e.substring(c.start,c.end);for(;a[0]===".";)a=a.substring(1);switch(o){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return r})}};function lt(n,e){return n<e?-1:n>e?1:0}function ut(n,e){if(n===null&&e===null)return 0;if(!n)return-1;if(!e)return 1;let t=n.length,r=e.length;if(t===r){for(let s=0;s<t;s++){let i=lt(n[s],e[s]);if(i!==0)return i}return 0}return t-r}function qe(n){return!!(/^#[0-9a-f]{6}$/i.test(n)||/^#[0-9a-f]{8}$/i.test(n)||/^#[0-9a-f]{3}$/i.test(n)||/^#[0-9a-f]{4}$/i.test(n))}function ht(n){return n.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ft=class{constructor(n){this.fn=n}cache=new Map;get(n){if(this.cache.has(n))return this.cache.get(n);const e=this.fn(n);return this.cache.set(n,e),e}},te=class{constructor(n,e,t){this._colorMap=n,this._defaults=e,this._root=t}static createFromRawTheme(n,e){return this.createFromParsedTheme(Zt(n),e)}static createFromParsedTheme(n,e){return tn(n,e)}_cachedMatchRoot=new ft(n=>this._root.match(n));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(n){if(n===null)return this._defaults;const e=n.scopeName,r=this._cachedMatchRoot.get(e).find(s=>Qt(n.parent,s.parentScopes));return r?new dt(r.fontStyle,r.foreground,r.background):null}},me=class X{constructor(e,t){this.parent=e,this.scopeName=t}static push(e,t){for(const r of t)e=new X(e,r);return e}static from(...e){let t=null;for(let r=0;r<e.length;r++)t=new X(t,e[r]);return t}push(e){return new X(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push(r.scopeName),r=r.parent;return r===e?t.reverse():void 0}};function Qt(n,e){if(e.length===0)return!0;for(let t=0;t<e.length;t++){let r=e[t],s=!1;if(r===">"){if(t===e.length-1)return!1;r=e[++t],s=!0}for(;n&&!Xt(n.scopeName,r);){if(s)return!1;n=n.parent}if(!n)return!1;n=n.parent}return!0}function Xt(n,e){return e===n||n.startsWith(e)&&n[e.length]==="."}var dt=class{constructor(n,e,t){this.fontStyle=n,this.foregroundId=e,this.backgroundId=t}};function Zt(n){if(!n)return[];if(!n.settings||!Array.isArray(n.settings))return[];let e=n.settings,t=[],r=0;for(let s=0,i=e.length;s<i;s++){let o=e[s];if(!o.settings)continue;let c;if(typeof o.scope=="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),c=h.split(",")}else Array.isArray(o.scope)?c=o.scope:c=[""];let a=-1;if(typeof o.settings.fontStyle=="string"){a=0;let h=o.settings.fontStyle.split(" ");for(let f=0,g=h.length;f<g;f++)switch(h[f]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let l=null;typeof o.settings.foreground=="string"&&qe(o.settings.foreground)&&(l=o.settings.foreground);let u=null;typeof o.settings.background=="string"&&qe(o.settings.background)&&(u=o.settings.background);for(let h=0,f=c.length;h<f;h++){let d=c[h].trim().split(" "),_=d[d.length-1],b=null;d.length>1&&(b=d.slice(0,d.length-1),b.reverse()),t[r++]=new en(_,b,s,a,l,u)}}return t}var en=class{constructor(n,e,t,r,s,i){this.scope=n,this.parentScopes=e,this.index=t,this.fontStyle=r,this.foreground=s,this.background=i}},N=(n=>(n[n.NotSet=-1]="NotSet",n[n.None=0]="None",n[n.Italic=1]="Italic",n[n.Bold=2]="Bold",n[n.Underline=4]="Underline",n[n.Strikethrough=8]="Strikethrough",n))(N||{});function tn(n,e){n.sort((a,l)=>{let u=lt(a.scope,l.scope);return u!==0||(u=ut(a.parentScopes,l.parentScopes),u!==0)?u:a.index-l.index});let t=0,r="#000000",s="#ffffff";for(;n.length>=1&&n[0].scope==="";){let a=n.shift();a.fontStyle!==-1&&(t=a.fontStyle),a.foreground!==null&&(r=a.foreground),a.background!==null&&(s=a.background)}let i=new nn(e),o=new dt(t,i.getId(r),i.getId(s)),c=new sn(new Se(0,null,-1,0,0),[]);for(let a=0,l=n.length;a<l;a++){let u=n[a];c.insert(0,u.scope,u.parentScopes,u.fontStyle,i.getId(u.foreground),i.getId(u.background))}return new te(i,o,c)}var nn=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(n){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(n)){this._isFrozen=!0;for(let e=0,t=n.length;e<t;e++)this._color2id[n[e]]=e,this._id2color[e]=n[e]}else this._isFrozen=!1}getId(n){if(n===null)return 0;n=n.toUpperCase();let e=this._color2id[n];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${n}`);return e=++this._lastColorId,this._color2id[n]=e,this._id2color[e]=n,e}getColorMap(){return this._id2color.slice(0)}},rn=Object.freeze([]),Se=class gt{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,r,s,i){this.scopeDepth=e,this.parentScopes=t||rn,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new gt(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let r=0,s=e.length;r<s;r++)t[r]=e[r].clone();return t}acceptOverwrite(e,t,r,s){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},sn=class we{constructor(e,t=[],r={}){this._mainRule=e,this._children=r,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let r=0,s=0;for(;e.parentScopes[r]===">"&&r++,t.parentScopes[s]===">"&&s++,!(r>=e.parentScopes.length||s>=t.parentScopes.length);){const i=t.parentScopes[s].length-e.parentScopes[r].length;if(i!==0)return i;r++,s++}return t.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),s,i;if(r===-1?(s=e,i=""):(s=e.substring(0,r),i=e.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(i)}const t=this._rulesWithParentScopes.concat(this._mainRule);return t.sort(we._cmpBySpecificity),t}insert(e,t,r,s,i,o){if(t===""){this._doInsertHere(e,r,s,i,o);return}let c=t.indexOf("."),a,l;c===-1?(a=t,l=""):(a=t.substring(0,c),l=t.substring(c+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new we(this._mainRule.clone(),Se.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(e+1,l,r,s,i,o)}_doInsertHere(e,t,r,s,i){if(t===null){this._mainRule.acceptOverwrite(e,r,s,i);return}for(let o=0,c=this._rulesWithParentScopes.length;o<c;o++){let a=this._rulesWithParentScopes[o];if(ut(a.parentScopes,t)===0){a.acceptOverwrite(e,r,s,i);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Se(e,t,r,s,i))}},O=class v{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const t=v.getLanguageId(e),r=v.getTokenType(e),s=v.getFontStyle(e),i=v.getForeground(e),o=v.getBackground(e);console.log({languageId:t,tokenType:r,fontStyle:s,foreground:i,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,t,r,s,i,o,c){let a=v.getLanguageId(e),l=v.getTokenType(e),u=v.containsBalancedBrackets(e)?1:0,h=v.getFontStyle(e),f=v.getForeground(e),g=v.getBackground(e);return t!==0&&(a=t),r!==8&&(l=r),s!==null&&(u=s?1:0),i!==-1&&(h=i),o!==0&&(f=o),c!==0&&(g=c),(a<<0|l<<8|u<<10|h<<11|f<<15|g<<24)>>>0}};function ne(n,e){const t=[],r=on(n);let s=r.next();for(;s!==null;){let a=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let l=o();if(t.push({matcher:l,priority:a}),s!==",")break;s=r.next()}return t;function i(){if(s==="-"){s=r.next();const a=i();return l=>!!a&&!a(l)}if(s==="("){s=r.next();const a=c();return s===")"&&(s=r.next()),a}if(He(s)){const a=[];do a.push(s),s=r.next();while(He(s));return l=>e(a,l)}return null}function o(){const a=[];let l=i();for(;l;)a.push(l),l=i();return u=>a.every(h=>h(u))}function c(){const a=[];let l=o();for(;l&&(a.push(l),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");l=o()}return u=>a.some(h=>h(u))}}function He(n){return!!n&&!!n.match(/[\w\.:]+/)}function on(n){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,t=e.exec(n);return{next:()=>{if(!t)return null;const r=t[0];return t=e.exec(n),r}}}function mt(n){typeof n.dispose=="function"&&n.dispose()}var F=class{constructor(n){this.scopeName=n}toKey(){return this.scopeName}},an=class{constructor(n,e){this.scopeName=n,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},cn=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(n){const e=n.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(n))}},ln=class{constructor(n,e){this.repo=n,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new F(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const n=this.Q;this.Q=[];const e=new cn;for(const t of n)un(t,this.initialScopeName,this.repo,e);for(const t of e.references)if(t instanceof F){if(this.seenFullScopeRequests.has(t.scopeName))continue;this.seenFullScopeRequests.add(t.scopeName),this.Q.push(t)}else{if(this.seenFullScopeRequests.has(t.scopeName)||this.seenPartialScopeRequests.has(t.toKey()))continue;this.seenPartialScopeRequests.add(t.toKey()),this.Q.push(t)}}};function un(n,e,t,r){const s=t.lookup(n.scopeName);if(!s){if(n.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const i=t.lookup(e);n instanceof F?Z({baseGrammar:i,selfGrammar:s},r):Ce(n.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);const o=t.injections(n.scopeName);if(o)for(const c of o)r.add(new F(c))}function Ce(n,e,t){if(e.repository&&e.repository[n]){const r=e.repository[n];re([r],e,t)}}function Z(n,e){n.selfGrammar.patterns&&Array.isArray(n.selfGrammar.patterns)&&re(n.selfGrammar.patterns,{...n,repository:n.selfGrammar.repository},e),n.selfGrammar.injections&&re(Object.values(n.selfGrammar.injections),{...n,repository:n.selfGrammar.repository},e)}function re(n,e,t){for(const r of n){if(t.visitedRule.has(r))continue;t.visitedRule.add(r);const s=r.repository?at({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&re(r.patterns,{...e,repository:s},t);const i=r.include;if(!i)continue;const o=pt(i);switch(o.kind){case 0:Z({...e,selfGrammar:e.baseGrammar},t);break;case 1:Z(e,t);break;case 2:Ce(o.ruleName,{...e,repository:s},t);break;case 3:case 4:const c=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(c){const a={baseGrammar:e.baseGrammar,selfGrammar:c,repository:s};o.kind===4?Ce(o.ruleName,a,t):Z(a,t)}else o.kind===4?t.add(new an(o.scopeName,o.ruleName)):t.add(new F(o.scopeName));break}}}var hn=class{kind=0},fn=class{kind=1},dn=class{constructor(n){this.ruleName=n}kind=2},gn=class{constructor(n){this.scopeName=n}kind=3},mn=class{constructor(n,e){this.scopeName=n,this.ruleName=e}kind=4};function pt(n){if(n==="$base")return new hn;if(n==="$self")return new fn;const e=n.indexOf("#");if(e===-1)return new gn(n);if(e===0)return new dn(n.substring(1));{const t=n.substring(0,e),r=n.substring(e+1);return new mn(t,r)}}var pn=/\\(\d+)/,ze=/\\(\d+)/g,_n=-1,_t=-2;var V=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(n,e,t,r){this.$location=n,this.id=e,this._name=t||null,this._nameIsCapturing=Y.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Y.hasCaptures(this._contentName)}get debugName(){const n=this.$location?`${ct(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${n}`}getName(n,e){return!this._nameIsCapturing||this._name===null||n===null||e===null?this._name:Y.replaceCaptures(this._name,n,e)}getContentName(n,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Y.replaceCaptures(this._contentName,n,e)}},yn=class extends V{retokenizeCapturedWithRuleId;constructor(n,e,t,r,s){super(n,e,t,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(n,e){throw new Error("Not supported!")}compile(n,e){throw new Error("Not supported!")}compileAG(n,e,t,r){throw new Error("Not supported!")}},bn=class extends V{_match;captures;_cachedCompiledPatterns;constructor(n,e,t,r,s){super(n,e,t,null),this._match=new q(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(n,e){e.push(this._match)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new H,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Ue=class extends V{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(n,e,t,r,s){super(n,e,t,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(n,e){for(const t of this.patterns)n.getRule(t).collectPatterns(n,e)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new H,this.collectPatterns(n,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ke=class extends V{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(n,e,t,r,s,i,o,c,a,l){super(n,e,t,r),this._begin=new q(s,this.id),this.beginCaptures=i,this._end=new q(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=a||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(n,e){return this._end.resolveBackReferences(n,e)}collectPatterns(n,e){e.push(this._begin)}compile(n,e){return this._getCachedCompiledPatterns(n,e).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n,e).compileAG(n,t,r)}_getCachedCompiledPatterns(n,e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new H;for(const t of this.patterns)n.getRule(t).collectPatterns(n,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,e):this._cachedCompiledPatterns.setSource(0,e)),this._cachedCompiledPatterns}},se=class extends V{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(n,e,t,r,s,i,o,c,a){super(n,e,t,r),this._begin=new q(s,this.id),this.beginCaptures=i,this.whileCaptures=c,this._while=new q(o,_t),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(n,e){return this._while.resolveBackReferences(n,e)}collectPatterns(n,e){e.push(this._begin)}compile(n,e){return this._getCachedCompiledPatterns(n).compile(n)}compileAG(n,e,t,r){return this._getCachedCompiledPatterns(n).compileAG(n,t,r)}_getCachedCompiledPatterns(n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new H;for(const e of this.patterns)n.getRule(e).collectPatterns(n,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(n,e){return this._getCachedCompiledWhilePatterns(n,e).compile(n)}compileWhileAG(n,e,t,r){return this._getCachedCompiledWhilePatterns(n,e).compileAG(n,t,r)}_getCachedCompiledWhilePatterns(n,e){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new H,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,e||"￿"),this._cachedCompiledWhilePatterns}},yt=class R{static createCaptureRule(e,t,r,s,i){return e.registerRule(o=>new yn(t,o,r,s,i))}static getCompiledRuleId(e,t,r){return e.id||t.registerRule(s=>{if(e.id=s,e.match)return new bn(e.$vscodeTextmateLocation,e.id,e.name,e.match,R._compileCaptures(e.captures,t,r));if(typeof e.begin>"u"){e.repository&&(r=at({},r,e.repository));let i=e.patterns;return typeof i>"u"&&e.include&&(i=[{include:e.include}]),new Ue(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,R._compilePatterns(i,t,r))}return e.while?new se(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,R._compileCaptures(e.beginCaptures||e.captures,t,r),e.while,R._compileCaptures(e.whileCaptures||e.captures,t,r),R._compilePatterns(e.patterns,t,r)):new ke(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,R._compileCaptures(e.beginCaptures||e.captures,t,r),e.end,R._compileCaptures(e.endCaptures||e.captures,t,r),e.applyEndPatternLast,R._compilePatterns(e.patterns,t,r))}),e.id}static _compileCaptures(e,t,r){let s=[];if(e){let i=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const c=parseInt(o,10);c>i&&(i=c)}for(let o=0;o<=i;o++)s[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const c=parseInt(o,10);let a=0;e[o].patterns&&(a=R.getCompiledRuleId(e[o],t,r)),s[c]=R.createCaptureRule(t,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,a)}}return s}static _compilePatterns(e,t,r){let s=[];if(e)for(let i=0,o=e.length;i<o;i++){const c=e[i];let a=-1;if(c.include){const l=pt(c.include);switch(l.kind){case 0:case 1:a=R.getCompiledRuleId(r[c.include],t,r);break;case 2:let u=r[l.ruleName];u&&(a=R.getCompiledRuleId(u,t,r));break;case 3:case 4:const h=l.scopeName,f=l.kind===4?l.ruleName:null,g=t.getExternalGrammar(h,r);if(g)if(f){let d=g.repository[f];d&&(a=R.getCompiledRuleId(d,t,g.repository))}else a=R.getCompiledRuleId(g.repository.$self,t,g.repository);break}}else a=R.getCompiledRuleId(c,t,r);if(a!==-1){const l=t.getRule(a);let u=!1;if((l instanceof Ue||l instanceof ke||l instanceof se)&&l.hasMissingPatterns&&l.patterns.length===0&&(u=!0),u)continue;s.push(a)}}return{patterns:s,hasMissingPatterns:(e?e.length:0)!==s.length}}},q=class bt{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e=="string"){const r=e.length;let s=0,i=[],o=!1;for(let c=0;c<r;c++)if(e.charAt(c)==="\\"&&c+1<r){const l=e.charAt(c+1);l==="z"?(i.push(e.substring(s,c)),i.push("$(?!\\n)(?<!\\n)"),s=c+2):(l==="A"||l==="G")&&(o=!0),c++}this.hasAnchor=o,s===0?this.source=e:(i.push(e.substring(s,r)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source=="string"?this.hasBackReferences=pn.test(this.source):this.hasBackReferences=!1}clone(){return new bt(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=t.map(s=>e.substring(s.start,s.end));return ze.lastIndex=0,this.source.replace(ze,(s,i)=>ht(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],t=[],r=[],s=[],i,o,c,a;for(i=0,o=this.source.length;i<o;i++)c=this.source.charAt(i),e[i]=c,t[i]=c,r[i]=c,s[i]=c,c==="\\"&&i+1<o&&(a=this.source.charAt(i+1),a==="A"?(e[i+1]="￿",t[i+1]="￿",r[i+1]="A",s[i+1]="A"):a==="G"?(e[i+1]="￿",t[i+1]="G",r[i+1]="￿",s[i+1]="G"):(e[i+1]=a,t[i+1]=a,r[i+1]=a,s[i+1]=a),i++);return{A0_G0:e.join(""),A0_G1:t.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},H=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(n){this._items.push(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}unshift(n){this._items.unshift(n),this._hasAnchors=this._hasAnchors||n.hasAnchor}length(){return this._items.length}setSource(n,e){this._items[n].source!==e&&(this._disposeCaches(),this._items[n].setSource(e))}compile(n){if(!this._cached){let e=this._items.map(t=>t.source);this._cached=new Ke(n,e,this._items.map(t=>t.ruleId))}return this._cached}compileAG(n,e,t){return this._hasAnchors?e?t?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A1_G0):t?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(n,e,t)),this._anchorCache.A0_G0):this.compile(n)}_resolveAnchors(n,e,t){let r=this._items.map(s=>s.resolveAnchors(e,t));return new Ke(n,r,this._items.map(s=>s.ruleId))}},Ke=class{constructor(n,e,t){this.regExps=e,this.rules=t,this.scanner=n.createOnigScanner(e)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const n=[];for(let e=0,t=this.rules.length;e<t;e++)n.push(" - "+this.rules[e]+": "+this.regExps[e]);return n.join(`
2
+ `)}findNextMatchSync(n,e,t){const r=this.scanner.findNextMatchSync(n,e,t);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},pe=class{constructor(n,e){this.languageId=n,this.tokenType=e}},Sn=class Re{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new pe(e,8),this._embeddedLanguagesMatcher=new wn(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?Re._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}static _NULL_SCOPE_METADATA=new pe(0,0);_getBasicScopeAttributes=new ft(e=>{const t=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new pe(t,r)});_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(Re.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},wn=class{values;scopesRegExp;constructor(n){if(n.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(n);const e=n.map(([t,r])=>ht(t));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(n){if(!this.scopesRegExp)return;const e=n.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},Ve=class{constructor(n,e){this.stack=n,this.stoppedEarly=e}};function St(n,e,t,r,s,i,o,c){const a=e.content.length;let l=!1,u=-1;if(o){const g=Cn(n,e,t,r,s,i);s=g.stack,r=g.linePos,t=g.isFirstLine,u=g.anchorPosition}const h=Date.now();for(;!l;){if(c!==0&&Date.now()-h>c)return new Ve(s,!0);f()}return new Ve(s,!1);function f(){const g=kn(n,e,t,r,s,u);if(!g){i.produce(s,a),l=!0;return}const d=g.captureIndices,_=g.matchedRuleId,b=d&&d.length>0?d[0].end>r:!1;if(_===_n){const p=s.getRule(n);i.produce(s,d[0].start),s=s.withContentNameScopesList(s.nameScopesList),D(n,e,t,s,i,p.endCaptures,d),i.produce(s,d[0].end);const y=s;if(s=s.parent,u=y.getAnchorPos(),!b&&y.getEnterPos()===r){s=y,i.produce(s,a),l=!0;return}}else{const p=n.getRule(_);i.produce(s,d[0].start);const y=s,m=p.getName(e.content,d),S=s.contentNameScopesList.pushAttributed(m,n);if(s=s.push(_,r,u,d[0].end===a,null,S,S),p instanceof ke){const w=p;D(n,e,t,s,i,w.beginCaptures,d),i.produce(s,d[0].end),u=d[0].end;const T=w.getContentName(e.content,d),x=S.pushAttributed(T,n);if(s=s.withContentNameScopesList(x),w.endHasBackReferences&&(s=s.withEndRule(w.getEndWithResolvedBackReferences(e.content,d))),!b&&y.hasSameRuleAs(s)){s=s.pop(),i.produce(s,a),l=!0;return}}else if(p instanceof se){const w=p;D(n,e,t,s,i,w.beginCaptures,d),i.produce(s,d[0].end),u=d[0].end;const T=w.getContentName(e.content,d),x=S.pushAttributed(T,n);if(s=s.withContentNameScopesList(x),w.whileHasBackReferences&&(s=s.withEndRule(w.getWhileWithResolvedBackReferences(e.content,d))),!b&&y.hasSameRuleAs(s)){s=s.pop(),i.produce(s,a),l=!0;return}}else if(D(n,e,t,s,i,p.captures,d),i.produce(s,d[0].end),s=s.pop(),!b){s=s.safePop(),i.produce(s,a),l=!0;return}}d[0].end>r&&(r=d[0].end,t=!1)}}function Cn(n,e,t,r,s,i){let o=s.beginRuleCapturedEOL?0:-1;const c=[];for(let a=s;a;a=a.pop()){const l=a.getRule(n);l instanceof se&&c.push({rule:l,stack:a})}for(let a=c.pop();a;a=c.pop()){const{ruleScanner:l,findOptions:u}=vn(a.rule,n,a.stack.endRule,t,r===o),h=l.findNextMatchSync(e,r,u);if(h){if(h.ruleId!==_t){s=a.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(i.produce(a.stack,h.captureIndices[0].start),D(n,e,t,a.stack,i,a.rule.whileCaptures,h.captureIndices),i.produce(a.stack,h.captureIndices[0].end),o=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,t=!1))}else{s=a.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:o,isFirstLine:t}}function kn(n,e,t,r,s,i){const o=Rn(n,e,t,r,s,i),c=n.getInjections();if(c.length===0)return o;const a=Nn(c,n,e,t,r,s,i);if(!a)return o;if(!o)return a;const l=o.captureIndices[0].start,u=a.captureIndices[0].start;return u<l||a.priorityMatch&&u===l?a:o}function Rn(n,e,t,r,s,i){const o=s.getRule(n),{ruleScanner:c,findOptions:a}=wt(o,n,s.endRule,t,r===i),l=c.findNextMatchSync(e,r,a);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function Nn(n,e,t,r,s,i,o){let c=Number.MAX_VALUE,a=null,l,u=0;const h=i.contentNameScopesList.getScopeNames();for(let f=0,g=n.length;f<g;f++){const d=n[f];if(!d.matcher(h))continue;const _=e.getRule(d.ruleId),{ruleScanner:b,findOptions:p}=wt(_,e,null,r,s===o),y=b.findNextMatchSync(t,s,p);if(!y)continue;const m=y.captureIndices[0].start;if(!(m>=c)&&(c=m,a=y.captureIndices,l=y.ruleId,u=d.priority,c===s))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:l}:null}function wt(n,e,t,r,s){return{ruleScanner:n.compileAG(e,t,r,s),findOptions:0}}function vn(n,e,t,r,s){return{ruleScanner:n.compileWhileAG(e,t,r,s),findOptions:0}}function D(n,e,t,r,s,i,o){if(i.length===0)return;const c=e.content,a=Math.min(i.length,o.length),l=[],u=o[0].end;for(let h=0;h<a;h++){const f=i[h];if(f===null)continue;const g=o[h];if(g.length===0)continue;if(g.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=g.start;)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?s.produceFromScopes(l[l.length-1].scopes,g.start):s.produce(r,g.start),f.retokenizeCapturedWithRuleId){const _=f.getName(c,o),b=r.contentNameScopesList.pushAttributed(_,n),p=f.getContentName(c,o),y=b.pushAttributed(p,n),m=r.push(f.retokenizeCapturedWithRuleId,g.start,-1,!1,null,b,y),S=n.createOnigString(c.substring(0,g.end));St(n,S,t&&g.start===0,g.start,m,s,!1,0),mt(S);continue}const d=f.getName(c,o);if(d!==null){const b=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(d,n);l.push(new Tn(b,g.end))}}for(;l.length>0;)s.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Tn=class{scopes;endPos;constructor(n,e){this.scopes=n,this.endPos=e}};function An(n,e,t,r,s,i,o,c){return new En(n,e,t,r,s,i,o,c)}function Ye(n,e,t,r,s){const i=ne(e,ie),o=yt.getCompiledRuleId(t,r,s.repository);for(const c of i)n.push({debugSelector:e,matcher:c.matcher,ruleId:o,grammar:s,priority:c.priority})}function ie(n,e){if(e.length<n.length)return!1;let t=0;return n.every(r=>{for(let s=t;s<e.length;s++)if(In(e[s],r))return t=s+1,!0;return!1})}function In(n,e){if(!n)return!1;if(n===e)return!0;const t=e.length;return n.length>t&&n.substr(0,t)===e&&n[t]==="."}var En=class{constructor(n,e,t,r,s,i,o,c){if(this._rootScopeName=n,this.balancedBracketSelectors=i,this._onigLib=c,this._basicScopeAttributesProvider=new Sn(t,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Je(e,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const a of Object.keys(s)){const l=ne(a,ie);for(const u of l)this._tokenTypeMatchers.push({matcher:u.matcher,type:s[a]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const n of this._ruleId2desc)n&&n.dispose()}createOnigScanner(n){return this._onigLib.createOnigScanner(n)}createOnigString(n){return this._onigLib.createOnigString(n)}getMetadataForScope(n){return this._basicScopeAttributesProvider.getBasicScopeAttributes(n)}_collectInjections(){const n={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},e=[],t=this._rootScopeName,r=n.lookup(t);if(r){const s=r.injections;if(s)for(let o in s)Ye(e,o,s[o],this,r);const i=this._grammarRepository.injections(t);i&&i.forEach(o=>{const c=this.getExternalGrammar(o);if(c){const a=c.injectionSelector;a&&Ye(e,a,c,this,c)}})}return e.sort((s,i)=>s.priority-i.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(n){const e=++this._lastRuleId,t=n(e);return this._ruleId2desc[e]=t,t}getRule(n){return this._ruleId2desc[n]}getExternalGrammar(n,e){if(this._includedGrammars[n])return this._includedGrammars[n];if(this._grammarRepository){const t=this._grammarRepository.lookup(n);if(t)return this._includedGrammars[n]=Je(t,e&&e.$base),this._includedGrammars[n]}}tokenizeLine(n,e,t=0){const r=this._tokenize(n,e,!1,t);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(n,e,t=0){const r=this._tokenize(n,e,!0,t);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(n,e,t,r){this._rootId===-1&&(this._rootId=yt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!e||e===Ne.NULL){s=!0;const l=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=O.set(0,l.languageId,l.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),f=this.getRule(this._rootId).getName(null,null);let g;f?g=W.createRootAndLookUpScopeName(f,h,this):g=W.createRoot("unknown",h),e=new Ne(null,this._rootId,-1,-1,!1,null,g,g)}else s=!1,e.reset();n=n+`
3
+ `;const i=this.createOnigString(n),o=i.content.length,c=new Ln(t,n,this._tokenTypeMatchers,this.balancedBracketSelectors),a=St(this,i,s,0,e,c,!0,r);return mt(i),{lineLength:o,lineTokens:c,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function Je(n,e){return n=Vt(n),n.repository=n.repository||{},n.repository.$self={$vscodeTextmateLocation:n.$vscodeTextmateLocation,patterns:n.patterns,name:n.scopeName},n.repository.$base=e||n.repository.$self,n}var W=class A{constructor(e,t,r){this.parent=e,this.scopePath=t,this.tokenAttributes=r}static fromExtension(e,t){let r=e,s=e?.scopePath??null;for(const i of t)s=me.push(s,i.scopeNames),r=new A(r,s,i.encodedTokenAttributes);return r}static createRoot(e,t){return new A(null,new me(null,e),t)}static createRootAndLookUpScopeName(e,t,r){const s=r.getMetadataForScope(e),i=new me(null,e),o=r.themeProvider.themeMatch(i),c=A.mergeAttributes(t,s,o);return new A(null,i,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return A.equals(this,e)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,r){let s=-1,i=0,o=0;return r!==null&&(s=r.fontStyle,i=r.foregroundId,o=r.backgroundId),O.set(e,t.languageId,t.tokenType,null,s,i,o)}pushAttributed(e,t){if(e===null)return this;if(e.indexOf(" ")===-1)return A._pushAttributed(this,e,t);const r=e.split(/ /g);let s=this;for(const i of r)s=A._pushAttributed(s,i,t);return s}static _pushAttributed(e,t,r){const s=r.getMetadataForScope(t),i=e.scopePath.push(t),o=r.themeProvider.themeMatch(i),c=A.mergeAttributes(e.tokenAttributes,s,o);return new A(e,i,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){const t=[];let r=this;for(;r&&r!==e;)t.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===e?t.reverse():void 0}},Ne=class L{constructor(e,t,r,s,i,o,c,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=o,this.nameScopesList=c,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new L(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(e){return e===null?!1:L._equals(this,e)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?W.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){L._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,r,s,i,o,c){return new L(this,e,t,r,s,i,o,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new L(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(e,t){const r=W.fromExtension(e?.nameScopesList??null,t.nameScopesList);return new L(e,t.ruleId,t.enterPos??-1,t.anchorPos??-1,t.beginRuleCapturedEOL,t.endRule,r,W.fromExtension(r,t.contentNameScopesList))}},xn=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(n,e){this.balancedBracketScopes=n.flatMap(t=>t==="*"?(this.allowAny=!0,[]):ne(t,ie).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(t=>ne(t,ie).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(n){for(const e of this.unbalancedBracketScopes)if(e(n))return!1;for(const e of this.balancedBracketScopes)if(e(n))return!0;return this.allowAny}},Ln=class{constructor(n,e,t,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=n,this._tokenTypeOverrides=t,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(n,e){this.produceFromScopes(n.contentNameScopesList,e)}produceFromScopes(n,e){if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=n?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=n?.getScopeNames()??[];for(const o of this._tokenTypeOverrides)o.matcher(i)&&(r=O.set(r,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(i))}if(s&&(r=O.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const t=n?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:t}),this._lastTokenEndIndex=e}getResult(n,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(n,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(n,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(n,e),this._binaryTokens[this._binaryTokens.length-2]=0);const t=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)t[r]=this._binaryTokens[r];return t}},Pn=class{constructor(n,e){this._onigLib=e,this._theme=n}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const n of this._grammars.values())n.dispose()}setTheme(n){this._theme=n}getColorMap(){return this._theme.getColorMap()}addGrammar(n,e){this._rawGrammars.set(n.scopeName,n),e&&this._injectionGrammars.set(n.scopeName,e)}lookup(n){return this._rawGrammars.get(n)}injections(n){return this._injectionGrammars.get(n)}getDefaults(){return this._theme.getDefaults()}themeMatch(n){return this._theme.match(n)}grammarForScopeName(n,e,t,r,s){if(!this._grammars.has(n)){let i=this._rawGrammars.get(n);if(!i)return null;this._grammars.set(n,An(n,i,e,t,r,s,this,this._onigLib))}return this._grammars.get(n)}},Gn=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Pn(te.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(te.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,r){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,t,r){return this._loadGrammar(e,t,r.embeddedLanguages,r.tokenTypes,new xn(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,r,s,i){const o=new ln(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(c=>this._loadSingleGrammar(c.scopeName)),o.processQueue();return this._grammarForScopeName(e,t,r,s,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const t=this._options.loadGrammar(e);if(t){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,r)}}addGrammar(e,t=[],r=0,s=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,r,s)}_grammarForScopeName(e,t=0,r=null,s=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,r,s,i)}},ve=Ne.NULL;const Bn=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],$n=/["&'<>`]/g,On=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Mn=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,jn=/[|\\{}()[\]^$+*?.]/g,Qe=new WeakMap;function Dn(n,e){if(n=n.replace(e.subset?Wn(e.subset):$n,r),e.subset||e.escapeOnly)return n;return n.replace(On,t).replace(Mn,r);function t(s,i,o){return e.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,o.charCodeAt(i+2),e)}function r(s,i,o){return e.format(s.charCodeAt(0),o.charCodeAt(i+1),e)}}function Wn(n){let e=Qe.get(n);return e||(e=Fn(n),Qe.set(n,e)),e}function Fn(n){const e=[];let t=-1;for(;++t<n.length;)e.push(n[t].replace(jn,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const qn=/[\dA-Fa-f]/;function Hn(n,e,t){const r="&#x"+n.toString(16).toUpperCase();return t&&e&&!qn.test(String.fromCharCode(e))?r:r+";"}const zn=/\d/;function Un(n,e,t){const r="&#"+String(n);return t&&e&&!zn.test(String.fromCharCode(e))?r:r+";"}const Kn=["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"],_e={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:"€"},Vn=["cent","copy","divide","gt","lt","not","para","times"],Ct={}.hasOwnProperty,Te={};let J;for(J in _e)Ct.call(_e,J)&&(Te[_e[J]]=J);const Yn=/[^\dA-Za-z]/;function Jn(n,e,t,r){const s=String.fromCharCode(n);if(Ct.call(Te,s)){const i=Te[s],o="&"+i;return t&&Kn.includes(i)&&!Vn.includes(i)&&(!r||e&&e!==61&&Yn.test(String.fromCharCode(e)))?o:o+";"}return""}function Qn(n,e,t){let r=Hn(n,e,t.omitOptionalSemicolons),s;if((t.useNamedReferences||t.useShortestReferences)&&(s=Jn(n,e,t.omitOptionalSemicolons,t.attribute)),(t.useShortestReferences||!s)&&t.useShortestReferences){const i=Un(n,e,t.omitOptionalSemicolons);i.length<r.length&&(r=i)}return s&&(!t.useShortestReferences||s.length<r.length)?s:r}function $(n,e){return Dn(n,Object.assign({format:Qn},e))}const Xn=/^>|^->|<!--|-->|--!>|<!-$/g,Zn=[">"],er=["<",">"];function tr(n,e,t,r){return r.settings.bogusComments?"<?"+$(n.value,Object.assign({},r.settings.characterReferences,{subset:Zn}))+">":"<!--"+n.value.replace(Xn,s)+"-->";function s(i){return $(i,Object.assign({},r.settings.characterReferences,{subset:er}))}}function nr(n,e,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}const k=Rt(1),kt=Rt(-1),rr=[];function Rt(n){return e;function e(t,r,s){const i=t?t.children:rr;let o=(r||0)+n,c=i[o];if(!s)for(;c&&Ie(c);)o+=n,c=i[o];return c}}const sr={}.hasOwnProperty;function Nt(n){return e;function e(t,r,s){return sr.call(n,t.tagName)&&n[t.tagName](t,r,s)}}const xe=Nt({body:or,caption:ye,colgroup:ye,dd:ur,dt:lr,head:ye,html:ir,li:cr,optgroup:hr,option:fr,p:ar,rp:Xe,rt:Xe,tbody:gr,td:Ze,tfoot:mr,th:Ze,thead:dr,tr:pr});function ye(n,e,t){const r=k(t,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Ie(r.value.charAt(0)))}function ir(n,e,t){const r=k(t,e);return!r||r.type!=="comment"}function or(n,e,t){const r=k(t,e);return!r||r.type!=="comment"}function ar(n,e,t){const r=k(t,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function cr(n,e,t){const r=k(t,e);return!r||r.type==="element"&&r.tagName==="li"}function lr(n,e,t){const r=k(t,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ur(n,e,t){const r=k(t,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Xe(n,e,t){const r=k(t,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function hr(n,e,t){const r=k(t,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function fr(n,e,t){const r=k(t,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function dr(n,e,t){const r=k(t,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function gr(n,e,t){const r=k(t,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function mr(n,e,t){return!k(t,e)}function pr(n,e,t){const r=k(t,e);return!r||r.type==="element"&&r.tagName==="tr"}function Ze(n,e,t){const r=k(t,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const _r=Nt({body:Sr,colgroup:wr,head:br,html:yr,tbody:Cr});function yr(n){const e=k(n,-1);return!e||e.type!=="comment"}function br(n){const e=new Set;for(const r of n.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const t=n.children[0];return!t||t.type==="element"}function Sr(n){const e=k(n,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Ie(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function wr(n,e,t){const r=kt(t,e),s=k(n,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&xe(r,t.children.indexOf(r),t)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function Cr(n,e,t){const r=kt(t,e),s=k(n,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&xe(r,t.children.indexOf(r),t)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const Q={name:[[`
4
+ \f\r &/=>`.split(""),`
5
+ \f\r "&'/=>\``.split("")],[`\0
6
+ \f\r "&'/<=>`.split(""),`\0
7
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
8
+ \f\r &>`.split(""),`\0
9
+ \f\r "&'<=>\``.split("")],[`\0
10
+ \f\r "&'<=>\``.split(""),`\0
11
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function kr(n,e,t,r){const s=r.schema,i=s.space==="svg"?!1:r.settings.omitOptionalTags;let o=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(n.tagName.toLowerCase());const c=[];let a;s.space==="html"&&n.tagName==="svg"&&(r.schema=ot);const l=Rr(r,n.properties),u=r.all(s.space==="html"&&n.tagName==="template"?n.content:n);return r.schema=s,u&&(o=!1),(l||!i||!_r(n,e,t))&&(c.push("<",n.tagName,l?" "+l:""),o&&(s.space==="svg"||r.settings.closeSelfClosing)&&(a=l.charAt(l.length-1),(!r.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(u),!o&&(!i||!xe(n,e,t))&&c.push("</"+n.tagName+">"),c.join("")}function Rr(n,e){const t=[];let r=-1,s;if(e){for(s in e)if(e[s]!==null&&e[s]!==void 0){const i=Nr(n,s,e[s]);i&&t.push(i)}}for(;++r<t.length;){const i=n.settings.tightAttributes?t[r].charAt(t[r].length-1):void 0;r!==t.length-1&&i!=='"'&&i!=="'"&&(t[r]+=" ")}return t.join("")}function Nr(n,e,t){const r=qt(n.schema,e),s=n.settings.allowParseErrors&&n.schema.space==="html"?0:1,i=n.settings.allowDangerousCharacters?0:1;let o=n.quote,c;if(r.overloadedBoolean&&(t===r.attribute||t==="")?t=!0:(r.boolean||r.overloadedBoolean)&&(typeof t!="string"||t===r.attribute||t==="")&&(t=!!t),t==null||t===!1||typeof t=="number"&&Number.isNaN(t))return"";const a=$(r.attribute,Object.assign({},n.settings.characterReferences,{subset:Q.name[s][i]}));return t===!0||(t=Array.isArray(t)?(r.commaSeparated?Ht:zt)(t,{padLeft:!n.settings.tightCommaSeparatedLists}):String(t),n.settings.collapseEmptyAttributes&&!t)?a:(n.settings.preferUnquoted&&(c=$(t,Object.assign({},n.settings.characterReferences,{attribute:!0,subset:Q.unquoted[s][i]}))),c!==t&&(n.settings.quoteSmart&&We(t,o)>We(t,n.alternative)&&(o=n.alternative),c=o+$(t,Object.assign({},n.settings.characterReferences,{subset:(o==="'"?Q.single:Q.double)[s][i],attribute:!0}))+o),a+(c&&"="+c))}const vr=["<","&"];function vt(n,e,t,r){return t&&t.type==="element"&&(t.tagName==="script"||t.tagName==="style")?n.value:$(n.value,Object.assign({},r.settings.characterReferences,{subset:vr}))}function Tr(n,e,t,r){return r.settings.allowDangerousHtml?n.value:vt(n,e,t,r)}function Ar(n,e,t,r){return r.all(n)}const Ir=Kt("type",{invalid:Er,unknown:xr,handlers:{comment:tr,doctype:nr,element:kr,raw:Tr,root:Ar,text:vt}});function Er(n){throw new Error("Expected node, not `"+n+"`")}function xr(n){const e=n;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Lr={},Pr={},Gr=[];function Br(n,e){const t=e||Lr,r=t.quote||'"',s=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:$r,all:Or,settings:{omitOptionalTags:t.omitOptionalTags||!1,allowParseErrors:t.allowParseErrors||!1,allowDangerousCharacters:t.allowDangerousCharacters||!1,quoteSmart:t.quoteSmart||!1,preferUnquoted:t.preferUnquoted||!1,tightAttributes:t.tightAttributes||!1,upperDoctype:t.upperDoctype||!1,tightDoctype:t.tightDoctype||!1,bogusComments:t.bogusComments||!1,tightCommaSeparatedLists:t.tightCommaSeparatedLists||!1,tightSelfClosing:t.tightSelfClosing||!1,collapseEmptyAttributes:t.collapseEmptyAttributes||!1,allowDangerousHtml:t.allowDangerousHtml||!1,voids:t.voids||Bn,characterReferences:t.characterReferences||Pr,closeSelfClosing:t.closeSelfClosing||!1,closeEmptyElements:t.closeEmptyElements||!1},schema:t.space==="svg"?ot:Ut,quote:r,alternative:s}.one(Array.isArray(n)?{type:"root",children:n}:n,void 0,void 0)}function $r(n,e,t){return Ir(n,e,t,this)}function Or(n){const e=[],t=n&&n.children||Gr;let r=-1;for(;++r<t.length;)e[r]=this.one(t[r],r,n);return e.join("")}function oe(n,e){const t=typeof n=="string"?{}:{...n.colorReplacements},r=typeof n=="string"?n:n.name;for(const[s,i]of Object.entries(e?.colorReplacements||{}))typeof i=="string"?t[s]=i:s===r&&Object.assign(t,i);return t}function E(n,e){return n&&(e?.[n?.toLowerCase()]||n)}function Mr(n){return Array.isArray(n)?n:[n]}async function Tt(n){return Promise.resolve(typeof n=="function"?n():n).then(e=>e.default||e)}function Le(n){return!n||["plaintext","txt","text","plain"].includes(n)}function At(n){return n==="ansi"||Le(n)}function Pe(n){return n==="none"}function It(n){return Pe(n)}function Et(n,e){if(!e)return n;n.properties||={},n.properties.class||=[],typeof n.properties.class=="string"&&(n.properties.class=n.properties.class.split(/\s+/g)),Array.isArray(n.properties.class)||(n.properties.class=[]);const t=Array.isArray(e)?e:e.split(/\s+/g);for(const r of t)r&&!n.properties.class.includes(r)&&n.properties.class.push(r);return n}function le(n,e=!1){if(n.length===0)return[["",0]];const t=n.split(/(\r?\n)/g);let r=0;const s=[];for(let i=0;i<t.length;i+=2){const o=e?t[i]+(t[i+1]||""):t[i];s.push([o,r]),r+=t[i].length,r+=t[i+1]?.length||0}return s}function jr(n){const e=le(n,!0).map(([s])=>s);function t(s){if(s===n.length)return{line:e.length-1,character:e[e.length-1].length};let i=s,o=0;for(const c of e){if(i<c.length)break;i-=c.length,o++}return{line:o,character:i}}function r(s,i){let o=0;for(let c=0;c<s;c++)o+=e[c].length;return o+=i,o}return{lines:e,indexToPos:t,posToIndex:r}}function Ns(n,e,t){const r=new Set;for(const i of n.matchAll(/:?lang=["']([^"']+)["']/g)){const o=i[1].toLowerCase().trim();o&&r.add(o)}for(const i of n.matchAll(/(?:```|~~~)([\w-]+)/g)){const o=i[1].toLowerCase().trim();o&&r.add(o)}for(const i of n.matchAll(/\\begin\{([\w-]+)\}/g)){const o=i[1].toLowerCase().trim();o&&r.add(o)}for(const i of n.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const o=i[1].toLowerCase().trim(),c=o.includes("/")?o.split("/").pop():o;c&&r.add(c)}if(!t)return Array.from(r);const s=t.getBundledLanguages();return Array.from(r).filter(i=>i&&s[i])}const Ge="light-dark()",Dr=["color","background-color"];function Wr(n,e){let t=0;const r=[];for(const s of e)s>t&&r.push({...n,content:n.content.slice(t,s),offset:n.offset+t}),t=s;return t<n.content.length&&r.push({...n,content:n.content.slice(t),offset:n.offset+t}),r}function Fr(n,e){const t=Array.from(e instanceof Set?e:new Set(e)).sort((r,s)=>r-s);return t.length?n.map(r=>r.flatMap(s=>{const i=t.filter(o=>s.offset<o&&o<s.offset+s.content.length).map(o=>o-s.offset).sort((o,c)=>o-c);return i.length?Wr(s,i):s})):n}function qr(n,e,t,r,s="css-vars"){const i={content:n.content,explanation:n.explanation,offset:n.offset},o=e.map(u=>ae(n.variants[u])),c=new Set(o.flatMap(u=>Object.keys(u))),a={},l=(u,h)=>{const f=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return t+e[u]+(h==="color"?"":f)};return o.forEach((u,h)=>{for(const f of c){const g=u[f]||"inherit";if(h===0&&r&&Dr.includes(f))if(r===Ge&&o.length>1){const d=e.findIndex(y=>y==="light"),_=e.findIndex(y=>y==="dark");if(d===-1||_===-1)throw new C('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=o[d][f]||"inherit",p=o[_][f]||"inherit";a[f]=`light-dark(${b}, ${p})`,s==="css-vars"&&(a[l(h,f)]=g)}else a[f]=g;else s==="css-vars"&&(a[l(h,f)]=g)}}),i.htmlStyle=a,i}function ae(n){const e={};if(n.color&&(e.color=n.color),n.bgColor&&(e["background-color"]=n.bgColor),n.fontStyle){n.fontStyle&N.Italic&&(e["font-style"]="italic"),n.fontStyle&N.Bold&&(e["font-weight"]="bold");const t=[];n.fontStyle&N.Underline&&t.push("underline"),n.fontStyle&N.Strikethrough&&t.push("line-through"),t.length&&(e["text-decoration"]=t.join(" "))}return e}function Ae(n){return typeof n=="string"?n:Object.entries(n).map(([e,t])=>`${e}:${t}`).join(";")}const xt=new WeakMap;function ue(n,e){xt.set(n,e)}function z(n){return xt.get(n)}class M{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new M(Object.fromEntries(Mr(t).map(r=>[r,ve])),e)}constructor(...e){if(e.length===2){const[t,r]=e;this.lang=r,this._stacks=t}else{const[t,r,s]=e;this.lang=r,this._stacks={[s]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Hr(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Hr(n){const e=[],t=new Set;function r(s){if(t.has(s))return;t.add(s);const i=s?.nameScopesList?.scopeName;i&&e.push(i),s.parent&&r(s.parent)}return r(n),e}function zr(n,e){if(!(n instanceof M))throw new C("Invalid grammar state");return n.getInternalStack(e)}function Ur(){const n=new WeakMap;function e(t){if(!n.has(t.meta)){let r=function(o){if(typeof o=="number"){if(o<0||o>t.source.length)throw new C(`Invalid decoration offset: ${o}. Code length: ${t.source.length}`);return{...s.indexToPos(o),offset:o}}else{const c=s.lines[o.line];if(c===void 0)throw new C(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${s.lines.length}`);let a=o.character;if(a<0&&(a=c.length+a),a<0||a>c.length)throw new C(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${c.length}`);return{...o,character:a,offset:s.posToIndex(o.line,a)}}};const s=jr(t.source),i=(t.options.decorations||[]).map(o=>({...o,start:r(o.start),end:r(o.end)}));Kr(i),n.set(t.meta,{decorations:i,converter:s,source:t.source})}return n.get(t.meta)}return{name:"shiki:decorations",tokens(t){if(!this.options.decorations?.length)return;const s=e(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]);return Fr(t,s)},code(t){if(!this.options.decorations?.length)return;const r=e(this),s=Array.from(t.children).filter(u=>u.type==="element"&&u.tagName==="span");if(s.length!==r.converter.lines.length)throw new C(`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 i(u,h,f,g){const d=s[u];let _="",b=-1,p=-1;if(h===0&&(b=0),f===0&&(p=0),f===Number.POSITIVE_INFINITY&&(p=d.children.length),b===-1||p===-1)for(let m=0;m<d.children.length;m++)_+=Lt(d.children[m]),b===-1&&_.length===h&&(b=m+1),p===-1&&_.length===f&&(p=m+1);if(b===-1)throw new C(`Failed to find start index for decoration ${JSON.stringify(g.start)}`);if(p===-1)throw new C(`Failed to find end index for decoration ${JSON.stringify(g.end)}`);const y=d.children.slice(b,p);if(!g.alwaysWrap&&y.length===d.children.length)c(d,g,"line");else if(!g.alwaysWrap&&y.length===1&&y[0].type==="element")c(y[0],g,"token");else{const m={type:"element",tagName:"span",properties:{},children:y};c(m,g,"wrapper"),d.children.splice(b,y.length,m)}}function o(u,h){s[u]=c(s[u],h,"line")}function c(u,h,f){const g=h.properties||{},d=h.transform||(_=>_);return u.tagName=h.tagName||"span",u.properties={...u.properties,...g,class:u.properties.class},h.properties?.class&&Et(u,h.properties.class),u=d(u,f)||u,u}const a=[],l=r.decorations.sort((u,h)=>h.start.offset-u.start.offset||u.end.offset-h.end.offset);for(const u of l){const{start:h,end:f}=u;if(h.line===f.line)i(h.line,h.character,f.character,u);else if(h.line<f.line){i(h.line,h.character,Number.POSITIVE_INFINITY,u);for(let g=h.line+1;g<f.line;g++)a.unshift(()=>o(g,u));i(f.line,0,f.character,u)}}a.forEach(u=>u())}}}function Kr(n){for(let e=0;e<n.length;e++){const t=n[e];if(t.start.offset>t.end.offset)throw new C(`Invalid decoration range: ${JSON.stringify(t.start)} - ${JSON.stringify(t.end)}`);for(let r=e+1;r<n.length;r++){const s=n[r],i=t.start.offset<=s.start.offset&&s.start.offset<t.end.offset,o=t.start.offset<s.end.offset&&s.end.offset<=t.end.offset,c=s.start.offset<=t.start.offset&&t.start.offset<s.end.offset,a=s.start.offset<t.end.offset&&t.end.offset<=s.end.offset;if(i||o||c||a){if(i&&o||c&&a||c&&t.start.offset===t.end.offset||o&&s.start.offset===s.end.offset)continue;throw new C(`Decorations ${JSON.stringify(t.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function Lt(n){return n.type==="text"?n.value:n.type==="element"?n.children.map(Lt).join(""):""}const Vr=[Ur()];function ce(n){const e=Yr(n.transformers||[]);return[...e.pre,...e.normal,...e.post,...Vr]}function Yr(n){const e=[],t=[],r=[];for(const s of n)switch(s.enforce){case"pre":e.push(s);break;case"post":t.push(s);break;default:r.push(s)}return{pre:e,post:t,normal:r}}var P=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],be={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Jr(n,e){const t=n.indexOf("\x1B",e);if(t!==-1&&n[t+1]==="["){const r=n.indexOf("m",t);if(r!==-1)return{sequence:n.substring(t+2,r).split(";"),startPosition:t,position:r+1}}return{position:n.length}}function et(n){const e=n.shift();if(e==="2"){const t=n.splice(0,3).map(r=>Number.parseInt(r));return t.length!==3||t.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:t}}else if(e==="5"){const t=n.shift();if(t)return{type:"table",index:Number(t)}}}function Qr(n){const e=[];for(;n.length>0;){const t=n.shift();if(!t)continue;const r=Number.parseInt(t);if(!Number.isNaN(r))if(r===0)e.push({type:"resetAll"});else if(r<=9)be[r]&&e.push({type:"setDecoration",value:be[r]});else if(r<=29){const s=be[r-20];s&&(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:P[r-30]}});else if(r===38){const s=et(n);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:P[r-40]}});else if(r===48){const s=et(n);s&&e.push({type:"setBackgroundColor",value:s})}else r===49?e.push({type:"resetBackgroundColor"}):r===53?e.push({type:"setDecoration",value:"overline"}):r===55?e.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?e.push({type:"setForegroundColor",value:{type:"named",name:P[r-90+8]}}):r>=100&&r<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:P[r-100+8]}})}return e}function Xr(){let n=null,e=null,t=new Set;return{parse(r){const s=[];let i=0;do{const o=Jr(r,i),c=o.sequence?r.substring(i,o.startPosition):r.substring(i);if(c.length>0&&s.push({value:c,foreground:n,background:e,decorations:new Set(t)}),o.sequence){const a=Qr(o.sequence);for(const l of a)l.type==="resetAll"?(n=null,e=null,t.clear()):l.type==="resetForegroundColor"?n=null:l.type==="resetBackgroundColor"?e=null:l.type==="resetDecoration"&&t.delete(l.value);for(const l of a)l.type==="setForegroundColor"?n=l.value:l.type==="setBackgroundColor"?e=l.value:l.type==="setDecoration"&&t.add(l.value)}i=o.position}while(i<r.length);return s}}}var Zr={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 es(n=Zr){function e(c){return n[c]}function t(c){return`#${c.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let l=0;l<P.length;l++)r.push(e(P[l]));let c=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let u=0;u<6;u++)for(let h=0;h<6;h++)r.push(t([c[l],c[u],c[h]]));let a=8;for(let l=0;l<24;l++,a+=10)r.push(t([a,a,a]));return r}function i(c){return s()[c]}function o(c){switch(c.type){case"named":return e(c.name);case"rgb":return t(c.rgb);case"table":return i(c.index)}}return{value:o}}const ts={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 ns(n,e,t){const r=oe(n,t),s=le(e),i=Object.fromEntries(P.map(a=>{const l=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=n.colors?.[l];return[a,u||ts[a]]})),o=es(i),c=Xr();return s.map(a=>c.parse(a[0]).map(l=>{let u,h;l.decorations.has("reverse")?(u=l.background?o.value(l.background):n.bg,h=l.foreground?o.value(l.foreground):n.fg):(u=l.foreground?o.value(l.foreground):n.fg,h=l.background?o.value(l.background):void 0),u=E(u,r),h=E(h,r),l.decorations.has("dim")&&(u=rs(u));let f=N.None;return l.decorations.has("bold")&&(f|=N.Bold),l.decorations.has("italic")&&(f|=N.Italic),l.decorations.has("underline")&&(f|=N.Underline),l.decorations.has("strikethrough")&&(f|=N.Strikethrough),{content:l.value,offset:a[1],color:u,bgColor:h,fontStyle:f}}))}function rs(n){const e=n.match(/#([0-9a-f]{3,8})/i);if(e){const r=e[1];if(r.length===8){const 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`;if(r.length===4){const s=r[0],i=r[1],o=r[2],c=r[3],a=Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0");return`#${s}${s}${i}${i}${o}${o}${a}`}else if(r.length===3){const s=r[0],i=r[1],o=r[2];return`#${s}${s}${i}${i}${o}${o}80`}}}const t=n.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return t?`var(${t[1]}-dim)`:n}function he(n,e,t={}){const{theme:r=n.getLoadedThemes()[0]}=t,s=n.resolveLangAlias(t.lang||"text");if(Le(s)||Pe(r))return le(e).map(a=>[{content:a[0],offset:a[1]}]);const{theme:i,colorMap:o}=n.setTheme(r);if(s==="ansi")return ns(i,e,t);const c=n.getLanguage(t.lang||"text");if(t.grammarState){if(t.grammarState.lang!==c.name)throw new C(`Grammar state language "${t.grammarState.lang}" does not match highlight language "${c.name}"`);if(!t.grammarState.themes.includes(i.name))throw new C(`Grammar state themes "${t.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return ss(e,c,i,o,t)}function Pt(...n){if(n.length===2)return z(n[1]);const[e,t,r={}]=n,{lang:s="text",theme:i=e.getLoadedThemes()[0]}=r;if(Le(s)||Pe(i))throw new C("Plain language does not have grammar state");if(s==="ansi")throw new C("ANSI language does not have grammar state");const{theme:o,colorMap:c}=e.setTheme(i),a=e.getLanguage(s);return new M(Be(t,a,o,c,r).stateStack,a.name,o.name)}function ss(n,e,t,r,s){const i=Be(n,e,t,r,s),o=new M(i.stateStack,e.name,t.name);return ue(i.tokens,o),i.tokens}function Be(n,e,t,r,s){const i=oe(t,s),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:c=500}=s,a=le(n);let l=s.grammarState?zr(s.grammarState,t.name)??ve:s.grammarContextCode!=null?Be(s.grammarContextCode,e,t,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:ve,u=[];const h=[];for(let f=0,g=a.length;f<g;f++){const[d,_]=a[f];if(d===""){u=[],h.push([]);continue}if(o>0&&d.length>=o){u=[],h.push([{content:d,offset:_,color:"",fontStyle:0}]);continue}let b,p,y;s.includeExplanation&&(b=e.tokenizeLine(d,l,c),p=b.tokens,y=0);const m=e.tokenizeLine2(d,l,c),S=m.tokens.length/2;for(let w=0;w<S;w++){const T=m.tokens[2*w],x=w+1<S?m.tokens[2*w+2]:d.length;if(T===x)continue;const Me=m.tokens[2*w+1],Wt=E(r[O.getForeground(Me)],i),Ft=O.getFontStyle(Me),fe={content:d.substring(T,x),offset:_+T,color:Wt,fontStyle:Ft};if(s.includeExplanation){const je=[];if(s.includeExplanation!=="scopeName")for(const I of t.settings){let G;switch(typeof I.scope){case"string":G=I.scope.split(/,/).map(de=>de.trim());break;case"object":G=I.scope;break;default:continue}je.push({settings:I,selectors:G.map(de=>de.split(/ /))})}fe.explanation=[];let De=0;for(;T+De<x;){const I=p[y],G=d.substring(I.startIndex,I.endIndex);De+=G.length,fe.explanation.push({content:G,scopes:s.includeExplanation==="scopeName"?is(I.scopes):os(je,I.scopes)}),y+=1}}u.push(fe)}h.push(u),u=[],l=m.ruleStack}return{tokens:h,stateStack:l}}function is(n){return n.map(e=>({scopeName:e}))}function os(n,e){const t=[];for(let r=0,s=e.length;r<s;r++){const i=e[r];t[r]={scopeName:i,themeMatches:cs(n,i,e.slice(0,r))}}return t}function tt(n,e){return n===e||e.substring(0,n.length)===n&&e[n.length]==="."}function as(n,e,t){if(!tt(n[n.length-1],e))return!1;let r=n.length-2,s=t.length-1;for(;r>=0&&s>=0;)tt(n[r],t[s])&&(r-=1),s-=1;return r===-1}function cs(n,e,t){const r=[];for(const{selectors:s,settings:i}of n)for(const o of s)if(as(o,e,t)){r.push(i);break}return r}function $e(n,e,t){const r=Object.entries(t.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),s=r.map(a=>{const l=he(n,e,{...t,theme:a.theme}),u=z(l),h=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:l,state:u,theme:h}}),i=ls(...s.map(a=>a.tokens)),o=i[0].map((a,l)=>a.map((u,h)=>{const f={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in t&&t.includeExplanation&&(f.explanation=u.explanation),i.forEach((g,d)=>{const{content:_,explanation:b,offset:p,...y}=g[l][h];f.variants[r[d].color]=y}),f})),c=s[0].state?new M(Object.fromEntries(s.map(a=>[a.theme,a.state?.getInternalStack(a.theme)])),s[0].state.lang):void 0;return c&&ue(o,c),o}function ls(...n){const e=n.map(()=>[]),t=n.length;for(let r=0;r<n[0].length;r++){const s=n.map(a=>a[r]),i=e.map(()=>[]);e.forEach((a,l)=>a.push(i[l]));const o=s.map(()=>0),c=s.map(a=>a[0]);for(;c.every(a=>a);){const a=Math.min(...c.map(l=>l.content.length));for(let l=0;l<t;l++){const u=c[l];u.content.length===a?(i[l].push(u),o[l]+=1,c[l]=s[l][o[l]]):(i[l].push({...u,content:u.content.slice(0,a)}),c[l]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return e}function U(n,e,t){let r,s,i,o,c,a;if("themes"in t){const{defaultColor:l="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=t,f=Object.entries(t.themes).filter(p=>p[1]).map(p=>({color:p[0],theme:p[1]})).sort((p,y)=>p.color===l?-1:y.color===l?1:0);if(f.length===0)throw new C("`themes` option must not be empty");const g=$e(n,e,t);if(a=z(g),l&&Ge!==l&&!f.find(p=>p.color===l))throw new C(`\`themes\` option must contain the defaultColor key \`${l}\``);const d=f.map(p=>n.getTheme(p.theme)),_=f.map(p=>p.color);i=g.map(p=>p.map(y=>qr(y,_,u,l,h))),a&&ue(i,a);const b=f.map(p=>oe(p.theme,t));s=nt(f,d,b,u,l,"fg",h),r=nt(f,d,b,u,l,"bg",h),o=`shiki-themes ${d.map(p=>p.name).join(" ")}`,c=l?void 0:[s,r].join(";")}else if("theme"in t){const l=oe(t.theme,t);i=he(n,e,t);const u=n.getTheme(t.theme);r=E(u.bg,l),s=E(u.fg,l),o=u.name,a=z(i)}else throw new C("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:s,bg:r,themeName:o,rootStyle:c,grammarState:a}}function nt(n,e,t,r,s,i,o){return n.map((c,a)=>{const l=E(e[a][i],t[a])||"inherit",u=`${r+c.color}${i==="bg"?"-bg":""}:${l}`;if(a===0&&s){if(s===Ge&&n.length>1){const h=n.findIndex(_=>_.color==="light"),f=n.findIndex(_=>_.color==="dark");if(h===-1||f===-1)throw new C('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const g=E(e[h][i],t[h])||"inherit",d=E(e[f][i],t[f])||"inherit";return`light-dark(${g}, ${d});${u}`}return l}return o==="css-vars"?u:null}).filter(c=>!!c).join(";")}function K(n,e,t,r={meta:{},options:t,codeToHast:(s,i)=>K(n,s,i),codeToTokens:(s,i)=>U(n,s,i)}){let s=e;for(const d of ce(t))s=d.preprocess?.call(r,s,t)||s;let{tokens:i,fg:o,bg:c,themeName:a,rootStyle:l,grammarState:u}=U(n,s,t);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:f=!1}=t;h===!0?i=hs(i):h==="never"&&(i=fs(i)),f&&(i=ds(i));const g={...r,get source(){return s}};for(const d of ce(t))i=d.tokens?.call(g,i)||i;return us(i,{...t,fg:o,bg:c,themeName:a,rootStyle:t.rootStyle===!1?!1:t.rootStyle??l},g,u)}function us(n,e,t,r=z(n)){const s=ce(e),i=[],o={type:"root",children:[]},{structure:c="classic",tabindex:a="0"}=e,l={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?l.style=e.rootStyle:l.style=`background-color:${e.bg};color:${e.fg}`),a!==!1&&a!=null&&(l.tabindex=a.toString());for(const[_,b]of Object.entries(e.meta||{}))_.startsWith("_")||(l[_]=b);let u={type:"element",tagName:"pre",properties:l,children:[],data:e.data},h={type:"element",tagName:"code",properties:{},children:i};const f=[],g={...t,structure:c,addClassToHast:Et,get source(){return t.source},get tokens(){return n},get options(){return e},get root(){return o},get pre(){return u},get code(){return h},get lines(){return f}};if(n.forEach((_,b)=>{b&&(c==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&i.push({type:"text",value:`
12
+ `}));let p={type:"element",tagName:"span",properties:{class:"line"},children:[]},y=0;for(const m of _){let S={type:"element",tagName:"span",properties:{...m.htmlAttrs},children:[{type:"text",value:m.content}]};const w=Ae(m.htmlStyle||ae(m));w&&(S.properties.style=w);for(const T of s)S=T?.span?.call(g,S,b+1,y,p,m)||S;c==="inline"?o.children.push(S):c==="classic"&&p.children.push(S),y+=m.content.length}if(c==="classic"){for(const m of s)p=m?.line?.call(g,p,b+1)||p;f.push(p),i.push(p)}else c==="inline"&&f.push(p)}),c==="classic"){for(const _ of s)h=_?.code?.call(g,h)||h;u.children.push(h);for(const _ of s)u=_?.pre?.call(g,u)||u;o.children.push(u)}else if(c==="inline"){const _=[];let b={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const m of o.children)m.type==="element"&&m.tagName==="br"?(_.push(b),b={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(m.type==="element"||m.type==="text")&&b.children.push(m);_.push(b);let y={type:"element",tagName:"code",properties:{},children:_};for(const m of s)y=m?.code?.call(g,y)||y;o.children=[];for(let m=0;m<y.children.length;m++){m>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const S=y.children[m];S.type==="element"&&o.children.push(...S.children)}}let d=o;for(const _ of s)d=_?.root?.call(g,d)||d;return r&&ue(d,r),d}function hs(n){return n.map(e=>{const t=[];let r="",s;return e.forEach((i,o)=>{const a=!(i.fontStyle&&(i.fontStyle&N.Underline||i.fontStyle&N.Strikethrough));a&&i.content.match(/^\s+$/)&&e[o+1]?(s===void 0&&(s=i.offset),r+=i.content):r?(a?t.push({...i,offset:s,content:r+i.content}):t.push({content:r,offset:s},i),s=void 0,r=""):t.push(i)}),t})}function fs(n){return n.map(e=>e.flatMap(t=>{if(t.content.match(/^\s+$/))return t;const r=t.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return t;const[,s,i,o]=r;if(!s&&!o)return t;const c=[{...t,offset:t.offset+s.length,content:i}];return s&&c.unshift({content:s,offset:t.offset}),o&&c.push({content:o,offset:t.offset+s.length+i.length}),c}))}function ds(n){return n.map(e=>{const t=[];for(const r of e){if(t.length===0){t.push({...r});continue}const s=t[t.length-1],i=Ae(s.htmlStyle||ae(s)),o=Ae(r.htmlStyle||ae(r)),c=s.fontStyle&&(s.fontStyle&N.Underline||s.fontStyle&N.Strikethrough),a=r.fontStyle&&(r.fontStyle&N.Underline||r.fontStyle&N.Strikethrough);!c&&!a&&i===o?s.content+=r.content:t.push({...r})}return t})}const gs=Br;function Gt(n,e,t){const r={meta:{},options:t,codeToHast:(i,o)=>K(n,i,o),codeToTokens:(i,o)=>U(n,i,o)};let s=gs(K(n,e,t,r));for(const i of ce(t))s=i.postprocess?.call(r,s,t)||s;return s}const rt={light:"#333333",dark:"#bbbbbb"},st={light:"#fffffe",dark:"#1e1e1e"},it="__shiki_resolved";function Oe(n){if(n?.[it])return n;const e={...n};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||="dark",e.colorReplacements={...e.colorReplacements},e.settings||=[];let{bg:t,fg:r}=e;if(!t||!r){const c=e.settings?e.settings.find(a=>!a.name&&!a.scope):void 0;c?.settings?.foreground&&(r=c.settings.foreground),c?.settings?.background&&(t=c.settings.background),!r&&e?.colors?.["editor.foreground"]&&(r=e.colors["editor.foreground"]),!t&&e?.colors?.["editor.background"]&&(t=e.colors["editor.background"]),r||(r=e.type==="light"?rt.light:rt.dark),t||(t=e.type==="light"?st.light:st.dark),e.fg=r,e.bg=t}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let s=0;const i=new Map;function o(c){if(i.has(c))return i.get(c);s+=1;const a=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return e.colorReplacements?.[`#${a}`]?o(c):(i.set(c,a),a)}e.settings=e.settings.map(c=>{const a=c.settings?.foreground&&!c.settings.foreground.startsWith("#"),l=c.settings?.background&&!c.settings.background.startsWith("#");if(!a&&!l)return c;const u={...c,settings:{...c.settings}};if(a){const h=o(c.settings.foreground);e.colorReplacements[h]=c.settings.foreground,u.settings.foreground=h}if(l){const h=o(c.settings.background);e.colorReplacements[h]=c.settings.background,u.settings.background=h}return u});for(const c of Object.keys(e.colors||{}))if((c==="editor.foreground"||c==="editor.background"||c.startsWith("terminal.ansi"))&&!e.colors[c]?.startsWith("#")){const a=o(e.colors[c]);e.colorReplacements[a]=e.colors[c],e.colors[c]=a}return Object.defineProperty(e,it,{enumerable:!1,writable:!1,value:!0}),e}async function Bt(n){return Array.from(new Set((await Promise.all(n.filter(e=>!At(e)).map(async e=>await Tt(e).then(t=>Array.isArray(t)?t:[t])))).flat()))}async function $t(n){return(await Promise.all(n.map(async t=>It(t)?null:Oe(await Tt(t))))).filter(t=>!!t)}let ee=3,Ot=!1;function vs(n=!0,e=!1){ee=n,Ot=e}function ms(n,e=3){if(ee&&!(typeof ee=="number"&&e>ee)){if(Ot)throw new Error(`[SHIKI DEPRECATE]: ${n}`);console.trace(`[SHIKI DEPRECATE]: ${n}`)}}class B extends Error{constructor(e){super(e),this.name="ShikiError"}}function Mt(n,e){if(!e)return n;if(e[n]){const t=new Set([n]);for(;e[n];){if(n=e[n],t.has(n))throw new B(`Circular alias \`${Array.from(t).join(" -> ")} -> ${n}\``);t.add(n)}}return n}class ps extends Gn{constructor(e,t,r,s={}){super(e),this._resolver=e,this._themes=t,this._langs=r,this._alias=s,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=Oe(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=te.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Mt(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const r={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const s=this.loadGrammarWithConfiguration(e.scopeName,1,r);if(s.name=e.name,this._resolvedGrammars.set(e.name,s),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const s of e)this.resolveEmbeddedLanguages(s);const t=Array.from(this._langGraph.entries()),r=t.filter(([s,i])=>!i);if(r.length){const s=t.filter(([i,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(a=>r.map(([l])=>l).includes(a)):!1).filter(i=>!r.includes(i));throw new B(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${s.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[s,i]of t)this._resolver.addLanguage(i);for(const[s,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const r of t)this._langGraph.set(r,this._langMap.get(r))}}class _s{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},t.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let r=[];for(let s=1;s<=t.length;s++){const i=t.slice(0,s).join(".");r=[...r,...this._injections.get(i)||[]]}return r}}let j=0;function jt(n){j+=1,n.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(!n.engine)throw new B("`engine` option is required for synchronous mode");const t=(n.langs||[]).flat(1),r=(n.themes||[]).flat(1).map(Oe),s=new _s(n.engine,t),i=new ps(s,r,t,n.langAlias);let o;function c(m){return Mt(m,n.langAlias)}function a(m){p();const S=i.getGrammar(typeof m=="string"?m:m.name);if(!S)throw new B(`Language \`${m}\` not found, you may need to load it first`);return S}function l(m){if(m==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};p();const S=i.getTheme(m);if(!S)throw new B(`Theme \`${m}\` not found, you may need to load it first`);return S}function u(m){p();const S=l(m);o!==m&&(i.setTheme(S),o=m);const w=i.getColorMap();return{theme:S,colorMap:w}}function h(){return p(),i.getLoadedThemes()}function f(){return p(),i.getLoadedLanguages()}function g(...m){p(),i.loadLanguages(m.flat(1))}async function d(...m){return g(await Bt(m))}function _(...m){p();for(const S of m.flat(1))i.loadTheme(S)}async function b(...m){return p(),_(await $t(m))}function p(){if(e)throw new B("Shiki instance has been disposed")}function y(){e||(e=!0,i.dispose(),j-=1)}return{setTheme:u,getTheme:l,getLanguage:a,getLoadedThemes:h,getLoadedLanguages:f,resolveLangAlias:c,loadLanguage:d,loadLanguageSync:g,loadTheme:b,loadThemeSync:_,dispose:y,[Symbol.dispose]:y}}async function ys(n){n.engine||ms("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,t,r]=await Promise.all([$t(n.themes||[]),Bt(n.langs||[]),n.engine]);return jt({...n,themes:e,langs:t,engine:r})}async function Dt(n){const e=await ys(n);return{getLastGrammarState:(...t)=>Pt(e,...t),codeToTokensBase:(t,r)=>he(e,t,r),codeToTokensWithThemes:(t,r)=>$e(e,t,r),codeToTokens:(t,r)=>U(e,t,r),codeToHast:(t,r)=>K(e,t,r),codeToHtml:(t,r)=>Gt(e,t,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function Ts(n){const e=jt(n);return{getLastGrammarState:(...t)=>Pt(e,...t),codeToTokensBase:(t,r)=>he(e,t,r),codeToTokensWithThemes:(t,r)=>$e(e,t,r),codeToTokens:(t,r)=>U(e,t,r),codeToHast:(t,r)=>K(e,t,r),codeToHtml:(t,r)=>Gt(e,t,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function bs(n){let e;async function t(r){if(e){const s=await e;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}else return e=n({...r,themes:r.themes||[],langs:r.langs||[]}),e}return t}const As=bs(Dt);function Ss(n){const e=n.langs,t=n.themes,r=n.engine;async function s(i){function o(h){if(typeof h=="string"){if(h=i.langAlias?.[h]||h,At(h))return[];const f=e[h];if(!f)throw new C(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return f}return h}function c(h){if(It(h))return"none";if(typeof h=="string"){const f=t[h];if(!f)throw new C(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return f}return h}const a=(i.themes??[]).map(h=>c(h)),l=(i.langs??[]).map(h=>o(h)),u=await Dt({engine:i.engine??r(),...i,themes:a,langs:l});return{...u,loadLanguage(...h){return u.loadLanguage(...h.map(o))},loadTheme(...h){return u.loadTheme(...h.map(c))},getBundledLanguages(){return e},getBundledThemes(){return t}}}return s}function ws(n){let e;async function t(r={}){if(e){const s=await e;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}else{e=n({...r,themes:[],langs:[]});const s=await e;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}}return t}function Is(n,e){const t=ws(n);async function r(s,i){const o=await t({langs:[i.lang],themes:"theme"in i?[i.theme]:Object.values(i.themes)}),c=await e?.guessEmbeddedLanguages?.(s,i.lang,o);return c&&await o.loadLanguage(...c),o}return{getSingletonHighlighter(s){return t(s)},async codeToHtml(s,i){return(await r(s,i)).codeToHtml(s,i)},async codeToHast(s,i){return(await r(s,i)).codeToHast(s,i)},async codeToTokens(s,i){return(await r(s,i)).codeToTokens(s,i)},async codeToTokensBase(s,i){return(await r(s,i)).codeToTokensBase(s,i)},async codeToTokensWithThemes(s,i){return(await r(s,i)).codeToTokensWithThemes(s,i)},async getLastGrammarState(s,i){return(await t({langs:[i.lang],themes:[i.theme]})).getLastGrammarState(s,i)}}}const Es=Ss;function xs(n={}){const{name:e="css-variables",variablePrefix:t="--shiki-",fontStyle:r=!0}=n,s=o=>n.variableDefaults?.[o]?`var(${t}${o}, ${n.variableDefaults[o]})`:`var(${t}${o})`,i={name:e,type:"dark",colors:{"editor.foreground":s("foreground"),"editor.background":s("background"),"terminal.ansiBlack":s("ansi-black"),"terminal.ansiRed":s("ansi-red"),"terminal.ansiGreen":s("ansi-green"),"terminal.ansiYellow":s("ansi-yellow"),"terminal.ansiBlue":s("ansi-blue"),"terminal.ansiMagenta":s("ansi-magenta"),"terminal.ansiCyan":s("ansi-cyan"),"terminal.ansiWhite":s("ansi-white"),"terminal.ansiBrightBlack":s("ansi-bright-black"),"terminal.ansiBrightRed":s("ansi-bright-red"),"terminal.ansiBrightGreen":s("ansi-bright-green"),"terminal.ansiBrightYellow":s("ansi-bright-yellow"),"terminal.ansiBrightBlue":s("ansi-bright-blue"),"terminal.ansiBrightMagenta":s("ansi-bright-magenta"),"terminal.ansiBrightCyan":s("ansi-bright-cyan"),"terminal.ansiBrightWhite":s("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:s("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:s("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:s("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:s("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:s("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:s("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:s("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:s("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:s("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:s("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:s("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:s("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:s("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:s("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:s("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:s("token-changed")}}]};return r||(i.tokenColors=i.tokenColors?.map(o=>(o.settings?.fontStyle&&delete o.settings.fontStyle,o))),i}export{C as ShikiError,Et as addClassToHast,E as applyColorReplacements,K as codeToHast,Gt as codeToHtml,U as codeToTokens,he as codeToTokensBase,$e as codeToTokensWithThemes,Ss as createBundledHighlighter,xs as createCssVariablesTheme,Dt as createHighlighterCore,Ts as createHighlighterCoreSync,jr as createPositionConverter,ys as createShikiInternal,jt as createShikiInternalSync,Is as createSingletonShorthands,Es as createdBundledHighlighter,vs as enableDeprecationWarnings,qr as flatTokenVariants,As as getSingletonHighlighterCore,ae as getTokenStyleObject,Ns as guessEmbeddedLanguages,gs as hastToHtml,Pe as isNoneTheme,Le as isPlainLang,At as isSpecialLang,It as isSpecialTheme,ws as makeSingletonHighlighter,bs as makeSingletonHighlighterCore,Tt as normalizeGetter,Oe as normalizeTheme,oe as resolveColorReplacements,le as splitLines,Wr as splitToken,Fr as splitTokens,Ae as stringifyTokenStyle,Mr as toArray,ns as tokenizeAnsiWithTheme,ss as tokenizeWithTheme,us as tokensToHast,Ur as transformerDecorations,ms as warnDeprecated};