ryco-cli 0.1.22 → 0.1.24

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 (541) hide show
  1. package/dist/{ClaudeDriver-D7NatUx6.cjs → ClaudeDriver-B7mbf51W.cjs} +1 -1
  2. package/dist/{ClaudeDriver-D65SPdHR.mjs → ClaudeDriver-C4yu7Jit.mjs} +1 -1
  3. package/dist/{CodexDriver-DWGtHt9r.cjs → CodexDriver-CR0S17Lb.cjs} +2 -2
  4. package/dist/{CodexDriver-D4z5-wUD.mjs → CodexDriver-DnnqkGoY.mjs} +2 -2
  5. package/dist/{CodexTextGeneration-BikHow8k.mjs → CodexTextGeneration-Cw-FZbSS.mjs} +1 -1
  6. package/dist/{CodexTextGeneration-B4tJTUDo.cjs → CodexTextGeneration-tlfe1S5W.cjs} +1 -1
  7. package/dist/{CopilotDriver-ZvvsAIkd.mjs → CopilotDriver-GxKLX5pL.mjs} +2 -2
  8. package/dist/{CopilotDriver-DJvYncGI.cjs → CopilotDriver-IBd27Ji2.cjs} +2 -2
  9. package/dist/{CursorDriver-D3I4KULs.cjs → CursorDriver-C4Enoe9N.cjs} +1 -1
  10. package/dist/{CursorDriver-B1QSBzuH.mjs → CursorDriver-CNo9Uzo8.mjs} +1 -1
  11. package/dist/{GrokDriver-DgQe3pKz.mjs → GrokDriver-DSPEmiwq.mjs} +1 -1
  12. package/dist/{GrokDriver-_puXDTU3.cjs → GrokDriver-RyyFeh_q.cjs} +1 -1
  13. package/dist/{Metrics-DIjMQ5pa.cjs → Metrics-Bcb9vCAe.cjs} +21 -15
  14. package/dist/{Metrics-BP9YjxZB.mjs → Metrics-a1h4iBQi.mjs} +21 -15
  15. package/dist/{OpenCodeDriver-DNUlF8M-.mjs → OpenCodeDriver-0q44rSQX.mjs} +1 -1
  16. package/dist/{OpenCodeDriver-401RexI0.cjs → OpenCodeDriver-CDcvPT9v.cjs} +1 -1
  17. package/dist/bin.cjs +337 -123
  18. package/dist/bin.mjs +339 -125
  19. package/dist/client/assets/AccountSettings-ApnDA1f-.js +1 -0
  20. package/dist/client/assets/AiFocusSettings-CNmGHEcA.js +1 -0
  21. package/dist/client/assets/{AnimatedHeight-DKCe4x_Q.js → AnimatedHeight-i0YhvlGD.js} +1 -1
  22. package/dist/client/assets/AppearanceSettings-BG8W4DP0.js +1 -0
  23. package/dist/client/assets/BranchToolbar.logic-AgPy06Mx.js +1 -0
  24. package/dist/client/assets/BrowserPanel-BWztlNuL.js +1 -0
  25. package/dist/client/assets/ChatRightPanel-a6UOHNMm.js +194 -0
  26. package/dist/client/assets/ChatThreadRouteView-CWoBLzR_.js +1 -0
  27. package/dist/client/assets/CommandPaletteDialog-B2iKWCUi.js +1 -0
  28. package/dist/client/assets/CompositeRoot-C1G-Ejus.js +1 -0
  29. package/dist/client/assets/ComputerUseSettings-CPwWoHWj.js +1 -0
  30. package/dist/client/assets/ConnectionsSettings-CPMkuxza.js +7 -0
  31. package/dist/client/assets/ContextHandoffEndpointLabel-BildLLDY.js +4 -0
  32. package/dist/client/assets/DiagnosticsSettings-DvnNz2AZ.js +2 -0
  33. package/dist/client/assets/DialogHandle-8o3kfoiI.js +1 -0
  34. package/dist/client/assets/DialogPopup-CLw6NCkW.js +1 -0
  35. package/dist/client/assets/DialogRoot-SKkIuQHA.js +1 -0
  36. package/dist/client/assets/DialogTitle-DCHX74Tz.js +1 -0
  37. package/dist/client/assets/DialogTrigger-Bl_fcIV2.js +1 -0
  38. package/dist/client/assets/DialogViewport-DVDl03yd.js +1 -0
  39. package/dist/client/assets/DraftChatThreadRouteView-CEDYjbKq.js +1 -0
  40. package/dist/client/assets/{ExternalIdentityWeb.logic-CGJKCFPo.js → ExternalIdentityWeb.logic-arHvT6AX.js} +1 -1
  41. package/dist/client/assets/GlassSurface-GY6owikG.js +1 -0
  42. package/dist/client/assets/HostedConnectionControls-COUhSe9x.js +1 -0
  43. package/dist/client/assets/HostedHubRoot-BTWc0XoQ.js +2 -0
  44. package/dist/client/assets/HostedNativeAuthorizationRoute-DZhYxv--.js +2 -0
  45. package/dist/client/assets/HostedRelayTrustNotice-Bl6On0Yi.js +1 -0
  46. package/dist/client/assets/IntegrationsSettingsPanel-n9owMZf-.js +2 -0
  47. package/dist/client/assets/KeybindingsSettings-CPtXx-W2.js +7 -0
  48. package/dist/client/assets/LazyBrowserPanel-SUIBB7B4.js +2 -0
  49. package/dist/client/assets/McpServersSettings-BWIUud0Z.js +6 -0
  50. package/dist/client/assets/MobileSheet-NTayGHF6.js +1 -0
  51. package/dist/client/assets/NodeSecuritySettings-BFifrshE.js +1 -0
  52. package/dist/client/assets/OpinionatedPluginsSettings-D7WuuNWZ.js +1 -0
  53. package/dist/client/assets/PhoneGetAppInterstitial-R0cqI17q.js +1 -0
  54. package/dist/client/assets/PhoneHome-FqWvnJP_.js +1 -0
  55. package/dist/client/assets/PhoneSettingsSurface-w5PJnoBc.js +2 -0
  56. package/dist/client/assets/ProviderModelPicker-dwWhl7Uf.js +1 -0
  57. package/dist/client/assets/ProvidersSettingsPanel-Ww1ch3xA.js +1 -0
  58. package/dist/client/assets/QuitShortcutFeedback-CklL3jMd.js +1 -0
  59. package/dist/client/assets/RedactedSensitiveText-CLPBtvH1.js +1 -0
  60. package/dist/client/assets/RootAppShell-BdQCs2XJ.js +7 -0
  61. package/dist/client/assets/Separator-CpYBhf-I.js +1 -0
  62. package/dist/client/assets/SettingsDialog-DeMzEeCP.js +2 -0
  63. package/dist/client/assets/SettingsPanels-ZxNz9ZfL.js +3 -0
  64. package/dist/client/assets/SettingsPanels.editor-9pSZP875.js +1 -0
  65. package/dist/client/assets/SourceControlSettings-C1F3Brcn.js +1 -0
  66. package/dist/client/assets/StatisticsPage-C7v-6CTr.js +1 -0
  67. package/dist/client/assets/StatisticsPanel-CeIjiBm8.js +1 -0
  68. package/dist/client/assets/StatisticsSettingsLink-5s_violW.js +1 -0
  69. package/dist/client/assets/ThreadTerminalDrawer-CHZ60lPI.js +18 -0
  70. package/dist/client/assets/ThreadWorkspacePanel-Ct5kMcuY.js +2073 -0
  71. package/dist/client/assets/actionscript-3-Cs6JJXT5.js +1 -0
  72. package/dist/client/assets/activity-BMBx2Fu0.js +1 -0
  73. package/dist/client/assets/ahk-CA9gdOdF.js +1 -0
  74. package/dist/client/assets/ahk2-_6rzW9BS.js +1 -0
  75. package/dist/client/assets/alert-CXnC_RJc.js +1 -0
  76. package/dist/client/assets/apex-KFGFyKwG.js +1 -0
  77. package/dist/client/assets/{appChrome-CJauXpqv.js → appChrome-BzM66lXM.js} +1 -1
  78. package/dist/client/assets/appearancePreferences-nFx4MHoI.js +1 -0
  79. package/dist/client/assets/arrow-left-CymyVbCi.js +1 -0
  80. package/dist/client/assets/arrow-right-9wyq4YVq.js +1 -0
  81. package/dist/client/assets/arrow-up-right-mfU38K6p.js +1 -0
  82. package/dist/client/assets/asciidoc-SCjQUq34.js +1 -0
  83. package/dist/client/assets/authorization-CjOFkg7b.js +1 -0
  84. package/dist/client/assets/badge-Dg7mXiOh.js +1 -0
  85. package/dist/client/assets/{bat-Bo4NYOV-.js → bat-qdxAdBWQ.js} +1 -1
  86. package/dist/client/assets/bird2-CYIUgYqB.js +1 -0
  87. package/dist/client/assets/bot-BR3RyOWP.js +1 -0
  88. package/dist/client/assets/bsl-_VjlB9mv.js +1 -0
  89. package/dist/client/assets/c3-D0apG41V.js +1 -0
  90. package/dist/client/assets/{capabilities-D6bsjqkj.js → capabilities-C8sxDbKT.js} +1 -1
  91. package/dist/client/assets/chapel-B4wvmE90.js +1 -0
  92. package/dist/client/assets/chart-column-CcRi3pAd.js +1 -0
  93. package/dist/client/assets/chevron-right-CuUjBsQV.js +1 -0
  94. package/dist/client/assets/clarity-CtfBBspg.js +1 -0
  95. package/dist/client/assets/clipboard-copy-ezz8rnaT.js +1 -0
  96. package/dist/client/assets/coq-DuBRPxYg.js +1 -0
  97. package/dist/client/assets/cpp-C3nXdf7H.js +1 -0
  98. package/dist/client/assets/data-list-ZLhzdlED.js +1 -0
  99. package/dist/client/assets/{desktopWorkspace-8s8rm3zL.js → desktopWorkspace-P28r2lN2.js} +1 -1
  100. package/dist/client/assets/download-BA9L9tK9.js +1 -0
  101. package/dist/client/assets/editorPreferences-DeKdSV3s.js +1 -0
  102. package/dist/client/assets/emacs-lisp-c_oH4hRZ.js +1 -0
  103. package/dist/client/assets/empty-3NpXLnAM.js +1 -0
  104. package/dist/client/assets/{erb-UQla4w8B.js → erb-CXyXxaAM.js} +1 -1
  105. package/dist/client/assets/{gdresource-C0sCabJj.js → gdresource-xMC7jr7x.js} +1 -1
  106. package/dist/client/assets/gdscript-DYvRD3hg.js +1 -0
  107. package/dist/client/assets/group-D5qBdsaB.js +1 -0
  108. package/dist/client/assets/hack-Bw3mo9za.js +1 -0
  109. package/dist/client/assets/haxe-C8oCnwJJ.js +1 -0
  110. package/dist/client/assets/hostedConnectionCoordinator-CLV-JD1S.js +1 -0
  111. package/dist/client/assets/{hostedPairing-PogXRAb7.js → hostedPairing-B_ylEEDa.js} +1 -1
  112. package/dist/client/assets/hubRoutes-EWJ3Gdod.js +1 -0
  113. package/dist/client/assets/hxml-Dcm88srW.js +1 -0
  114. package/dist/client/assets/{index-DRY8Hgrj.js → index-DxCd1PgA.js} +2 -2
  115. package/dist/client/assets/input-DrOL1KPS.js +1 -0
  116. package/dist/client/assets/{julia-DTmLe4fA.js → julia-C-lBeOK5.js} +1 -1
  117. package/dist/client/assets/{just-CPUGe9J1.js → just-DfEtguTY.js} +1 -1
  118. package/dist/client/assets/kbd-rWDjJnWX.js +1 -0
  119. package/dist/client/assets/key-round-D2DtQ7aS.js +1 -0
  120. package/dist/client/assets/latex-6oxeCMbP.js +1 -0
  121. package/dist/client/assets/layers-DtSJWmwy.js +1 -0
  122. package/dist/client/assets/{liquidGlass-yFkZrRk5.js → liquidGlass-Dbl4k51l.js} +1 -1
  123. package/dist/client/assets/{llvm-Cm23YOpf.js → llvm-DqHOMS-s.js} +1 -1
  124. package/dist/client/assets/log-out-YAp9fsOg.js +1 -0
  125. package/dist/client/assets/{logging-Y73f240E.js → logging-BuUPX1SP.js} +1 -1
  126. package/dist/client/assets/luau-C2pBCSgt.js +1 -0
  127. package/dist/client/assets/main-BbtLAX7M.js +9 -0
  128. package/dist/client/assets/main-D4CtFNPY.css +2 -0
  129. package/dist/client/assets/mdc-uTSeACfH.js +1 -0
  130. package/dist/client/assets/mermaid-BxpfTIzt.js +1 -0
  131. package/dist/client/assets/mojo-fg40_ntQ.js +1 -0
  132. package/dist/client/assets/monitor-OyD484tI.js +1 -0
  133. package/dist/client/assets/moonbit-DgjMoLWr.js +1 -0
  134. package/dist/client/assets/move-BYnGhZoM.js +1 -0
  135. package/dist/client/assets/nsis-CjNLYCLg.js +1 -0
  136. package/dist/client/assets/nushell-DHYfO66s.js +1 -0
  137. package/dist/client/assets/org-DRYqs_wo.js +1 -0
  138. package/dist/client/assets/palette-D18VboLH.js +1 -0
  139. package/dist/client/assets/play-d3KUi4G6.js +1 -0
  140. package/dist/client/assets/{powershell-DshXNtvi.js → powershell-CCSX75yM.js} +1 -1
  141. package/dist/client/assets/primary-D_D7eLwT.js +2 -0
  142. package/dist/client/assets/prisma-DMgNhnYS.js +1 -0
  143. package/dist/client/assets/providerDriverMeta-DNTocCcU.js +1 -0
  144. package/dist/client/assets/providerModels-bFbEIfL9.js +1 -0
  145. package/dist/client/assets/{qr-code-BKrwYZ2s.js → qr-code-Bk1kdf_k.js} +1 -1
  146. package/dist/client/assets/qr-code-MAZkoKtL.js +1 -0
  147. package/dist/client/assets/r-B-BYV2IP.js +1 -0
  148. package/dist/client/assets/radio-group-D-VCGinX.js +2 -0
  149. package/dist/client/assets/rbs-C0MpOrj4.js +1 -0
  150. package/dist/client/assets/refresh-cw-DY3_Ph-S.js +1 -0
  151. package/dist/client/assets/{rst-C90_EUa_.js → rst-DKqX_39h.js} +1 -1
  152. package/dist/client/assets/{ruby-BlGyFGAQ.js → ruby-CaU3RLfE.js} +1 -1
  153. package/dist/client/assets/runtime-Djy96GJd.js +17 -0
  154. package/dist/client/assets/save-ugJXuJRM.js +1 -0
  155. package/dist/client/assets/{scala-DKOlJaKm.js → scala-BiFt_7mu.js} +1 -1
  156. package/dist/client/assets/scroll-area-BMnGzd2a.js +1 -0
  157. package/dist/client/assets/scrollEdges-QLSFwGSQ.js +1 -0
  158. package/dist/client/assets/separator-BwUYkCkX.js +1 -0
  159. package/dist/client/assets/settingsLayout-C6SUmJVB.js +1 -0
  160. package/dist/client/assets/sheet-DLy4aeVa.js +1 -0
  161. package/dist/client/assets/shield-Zq_ygsnJ.js +1 -0
  162. package/dist/client/assets/shield-alert-DfUhTI4-.js +1 -0
  163. package/dist/client/assets/shield-check-CO4SMhAs.js +1 -0
  164. package/dist/client/assets/sidebar-DNnW-a2V.js +1 -0
  165. package/dist/client/assets/sidebarProjectFolders-ygpaKZM6.js +4 -0
  166. package/dist/client/assets/sidebarStatusText-CawrXnx0.js +1 -0
  167. package/dist/client/assets/skeleton-DRm4_OvB.js +1 -0
  168. package/dist/client/assets/smalltalk-BHpQb5nM.js +1 -0
  169. package/dist/client/assets/smartphone-O2VACDhU.js +1 -0
  170. package/dist/client/assets/smithy-Dgaz7aur.js +1 -0
  171. package/dist/client/assets/solidity-Bj7E1mRn.js +1 -0
  172. package/dist/client/assets/sparkles-isHutYWU.js +1 -0
  173. package/dist/client/assets/src-BSuAGqhK.js +14 -0
  174. package/dist/client/assets/star-7UHEnC3x.js +1 -0
  175. package/dist/client/assets/surrealql-CVtmRpY6.js +1 -0
  176. package/dist/client/assets/swift-CyEgAFGc.js +1 -0
  177. package/dist/client/assets/switch-DD1qVLgN.js +48 -0
  178. package/dist/client/assets/system-verilog-Dh5ihWbf.js +1 -0
  179. package/dist/client/assets/tex-DOBpnpUK.js +1 -0
  180. package/dist/client/assets/toggle-CaKBNe6W.js +1 -0
  181. package/dist/client/assets/toggle-group-UeFeTI3u.js +1 -0
  182. package/dist/client/assets/tokenModePresentation-DV56ekA4.js +1 -0
  183. package/dist/client/assets/tooltip-DXvXxL37.js +1 -0
  184. package/dist/client/assets/twig-DsmcR2eZ.js +1 -0
  185. package/dist/client/assets/typst-Drab9wKO.js +1 -0
  186. package/dist/client/assets/unplug-DisTpujT.js +1 -0
  187. package/dist/client/assets/useAppSidebarCollapsed-CaAsLi1q.js +1 -0
  188. package/dist/client/assets/useAppearancePreference-BteoFdGa.js +1 -0
  189. package/dist/client/assets/useBaseUiId-CJN4MvrU.js +1 -0
  190. package/dist/client/assets/{useControlled-HocCF1v9.js → useControlled-DQwgzrEC.js} +1 -1
  191. package/dist/client/assets/useLabelableId-BsDFG9Oj.js +1 -0
  192. package/dist/client/assets/{useLongPress-OGlhYKlH.js → useLongPress-DG1W7YqV.js} +1 -1
  193. package/dist/client/assets/useNavigate-cLfxn_9L.js +1 -0
  194. package/dist/client/assets/usePhoneThreadActions-rekHL1Mi.js +1 -0
  195. package/dist/client/assets/usePopupViewport-kXU31P6l.js +1 -0
  196. package/dist/client/assets/useScrollLock-DjMxrUJe.js +1 -0
  197. package/dist/client/assets/useStatistics-BYP-9CmW.js +55 -0
  198. package/dist/client/assets/{useTheme-By1kfyiU.js → useTheme-CVNauCtz.js} +1 -1
  199. package/dist/client/assets/useTriggerFocusGuards-DuAm2B8C.js +1 -0
  200. package/dist/client/assets/useValueChanged-DreFjrMK.js +1 -0
  201. package/dist/client/assets/user-round-DctamWV6.js +1 -0
  202. package/dist/client/assets/{v-DETTlOr0.js → v-DBj4K9d_.js} +1 -1
  203. package/dist/client/assets/{vb-Djn5o6TS.js → vb-DOwzaHZ0.js} +1 -1
  204. package/dist/client/assets/verilog-B2gwz-sJ.js +1 -0
  205. package/dist/client/assets/vscode-icons-Dw-LGJAv.js +1 -0
  206. package/dist/client/assets/{vue-DStD_OmO.js → vue-Dt-rrFdH.js} +1 -1
  207. package/dist/client/assets/worker-Bs0l0ezO.js +162 -0
  208. package/dist/client/assets/{workspaceMetadataProjection-D3vqw40g.js → workspaceMetadataProjection-BL4sEIL2.js} +1 -1
  209. package/dist/client/assets/wrench-Ds8eZerZ.js +1 -0
  210. package/dist/client/index.html +1 -1
  211. package/dist/client/mockServiceWorker.js +124 -99
  212. package/dist/resource-monitor/darwin-arm64/ryco-resource-monitor +0 -0
  213. package/dist/resource-monitor/darwin-x64/ryco-resource-monitor +0 -0
  214. package/dist/resource-monitor/linux-arm64/ryco-resource-monitor +0 -0
  215. package/dist/resource-monitor/linux-x64/ryco-resource-monitor +0 -0
  216. package/dist/resource-monitor/ryco-resource-monitor +0 -0
  217. package/dist/resource-monitor/ryco-resource-monitor.exe +0 -0
  218. package/dist/resource-monitor/win32-arm64/ryco-resource-monitor.exe +0 -0
  219. package/dist/resource-monitor/win32-x64/ryco-resource-monitor.exe +0 -0
  220. package/package.json +20 -12
  221. package/dist/client/assets/AccountSettings-CypheYqM.js +0 -1
  222. package/dist/client/assets/AiFocusSettings-BlX0ED1t.js +0 -1
  223. package/dist/client/assets/AppearanceSettings-BSyn6NXf.js +0 -1
  224. package/dist/client/assets/BranchToolbar.logic-fpBz8Ajj.js +0 -1
  225. package/dist/client/assets/BrowserPanel-BWch19QH.js +0 -1
  226. package/dist/client/assets/ChatRightPanel-B7yrq-hS.js +0 -27
  227. package/dist/client/assets/ChatThreadRouteView-Cg0d_EHs.js +0 -1
  228. package/dist/client/assets/CommandPaletteDialog-DImCuPaX.js +0 -1
  229. package/dist/client/assets/CompositeItem-BYnHWRNf.js +0 -1
  230. package/dist/client/assets/CompositeRoot-B28uivk7.js +0 -1
  231. package/dist/client/assets/ComputerUseSettings-CosW7jaG.js +0 -1
  232. package/dist/client/assets/ConnectionsSettings-Bk6vI3G-.js +0 -7
  233. package/dist/client/assets/ContextHandoffEndpointLabel-BR6ygaub.js +0 -4
  234. package/dist/client/assets/DiagnosticsSettings-Dp_tCNLw.js +0 -2
  235. package/dist/client/assets/DialogHandle-BN-QB-sO.js +0 -1
  236. package/dist/client/assets/DialogPopup-BuJs5WUt.js +0 -1
  237. package/dist/client/assets/DialogRoot-PxEcoecQ.js +0 -1
  238. package/dist/client/assets/DialogTitle-4nxQsra4.js +0 -1
  239. package/dist/client/assets/DialogTrigger-D_0canul.js +0 -1
  240. package/dist/client/assets/DialogViewport-DSo-2hyf.js +0 -1
  241. package/dist/client/assets/DraftChatThreadRouteView-C94kpMx4.js +0 -1
  242. package/dist/client/assets/GlassSurface-CyOTUS7E.js +0 -1
  243. package/dist/client/assets/HostedConnectionControls-CL0Ws4ca.js +0 -1
  244. package/dist/client/assets/HostedHubRoot-LUINZl4r.js +0 -1
  245. package/dist/client/assets/HostedNativeAuthorizationRoute-CgYVBE6N.js +0 -1
  246. package/dist/client/assets/HostedRelayTrustNotice-DgdeZh52.js +0 -1
  247. package/dist/client/assets/Icons-BIUbIFr7.js +0 -1
  248. package/dist/client/assets/IntegrationsSettingsPanel-B7tXTaa3.js +0 -1
  249. package/dist/client/assets/KeybindingsSettings-HMlRcGQ4.js +0 -7
  250. package/dist/client/assets/LazyBrowserPanel-CKfmuM9U.js +0 -1
  251. package/dist/client/assets/McpServersSettings-Bq-HyhvC.js +0 -6
  252. package/dist/client/assets/MobileSheet-acDRH9aa.js +0 -1
  253. package/dist/client/assets/NoActiveThreadState-7rym7bV7.js +0 -1
  254. package/dist/client/assets/NodeSecuritySettings-D8qjh4Dc.js +0 -1
  255. package/dist/client/assets/OpinionatedPluginsSettings-D7Uks5yR.js +0 -1
  256. package/dist/client/assets/PhoneGetAppInterstitial-BQXUSufH.js +0 -1
  257. package/dist/client/assets/PhoneGetAppInterstitialBackdrop-BbUvwGmI.js +0 -1
  258. package/dist/client/assets/PhoneHome-DvgdMTkh.js +0 -1
  259. package/dist/client/assets/PhoneSettingsSurface-DncJ540i.js +0 -1
  260. package/dist/client/assets/ProjectFavicon-BY5Vyyk6.js +0 -1
  261. package/dist/client/assets/ProviderInstanceIcon-CZe1TbeC.js +0 -1
  262. package/dist/client/assets/ProviderModelPicker-DHAY1n_1.js +0 -1
  263. package/dist/client/assets/ProviderUpdateLaunchNotification.logic-DQJVrUIo.js +0 -1
  264. package/dist/client/assets/ProvidersSettingsPanel-BylxZs4S.js +0 -1
  265. package/dist/client/assets/RedactedSensitiveText-D-enj1h5.js +0 -1
  266. package/dist/client/assets/RootAppShell-DBK0WW2b.js +0 -6
  267. package/dist/client/assets/RycoLetterMark-PnGm6TQY.js +0 -1
  268. package/dist/client/assets/Separator-BWKYMFqt.js +0 -1
  269. package/dist/client/assets/SettingsDialog-N25hIv-a.js +0 -1
  270. package/dist/client/assets/SettingsPanels-D9YXmUPP.js +0 -3
  271. package/dist/client/assets/SettingsPanels.editor-Cn18k74l.js +0 -1
  272. package/dist/client/assets/SourceControlSettings-BAzSpMfR.js +0 -1
  273. package/dist/client/assets/StatisticsPage-CLKpfsQ8.js +0 -1
  274. package/dist/client/assets/StatisticsPanel-DxHUFn64.js +0 -1
  275. package/dist/client/assets/StatisticsSettingsLink-B3HIQYFh.js +0 -1
  276. package/dist/client/assets/ThreadStatusIndicators-CQZ_OgY8.js +0 -0
  277. package/dist/client/assets/ThreadTerminalDrawer-D1SPewXR.js +0 -20
  278. package/dist/client/assets/ThreadWorkspacePanel-DVF6oZsV.js +0 -2009
  279. package/dist/client/assets/ToolbarRootContext-Dt8G5aCw.js +0 -1
  280. package/dist/client/assets/WorkItemsTab-BoE-TcXJ.js +0 -19
  281. package/dist/client/assets/actionscript-3--17pq3dv.js +0 -1
  282. package/dist/client/assets/activity-DfFM6I8A.js +0 -1
  283. package/dist/client/assets/alert-DE5SkZhr.js +0 -1
  284. package/dist/client/assets/alert-dialog-BqPnPhb6.js +0 -1
  285. package/dist/client/assets/andromeeda-WkhI09AS.js +0 -1
  286. package/dist/client/assets/apex-VAyPSnFM.js +0 -1
  287. package/dist/client/assets/appearancePreferences-BhNRCg6W.js +0 -1
  288. package/dist/client/assets/archive-BFV4YQ7D.js +0 -1
  289. package/dist/client/assets/arrow-left-CCmICk1t.js +0 -1
  290. package/dist/client/assets/arrow-right-Z3Eay6Fd.js +0 -1
  291. package/dist/client/assets/arrow-up-caak6P06.js +0 -1
  292. package/dist/client/assets/arrow-up-right-BwC-fCE4.js +0 -1
  293. package/dist/client/assets/asciidoc-DE70LPWp.js +0 -1
  294. package/dist/client/assets/aurora-x-C7CFqhAd.js +0 -1
  295. package/dist/client/assets/authorization-bHsGYIT0.js +0 -1
  296. package/dist/client/assets/ayu-dark-CRu61w6_.js +0 -1
  297. package/dist/client/assets/ayu-light-Dn6O_aYR.js +0 -1
  298. package/dist/client/assets/ayu-mirage-CTjYAbs-.js +0 -1
  299. package/dist/client/assets/badge-m9kM3P07.js +0 -1
  300. package/dist/client/assets/bird2-C6vDhewU.js +0 -1
  301. package/dist/client/assets/bot-Cv7a7Ksf.js +0 -1
  302. package/dist/client/assets/bsl-BkkzgIyY.js +0 -1
  303. package/dist/client/assets/button-B6xQZNKz.js +0 -1
  304. package/dist/client/assets/c3-BFHwR3_K.js +0 -1
  305. package/dist/client/assets/catppuccin-frappe-3VR1Za6u.js +0 -1
  306. package/dist/client/assets/catppuccin-latte-DwIHMF0Q.js +0 -1
  307. package/dist/client/assets/catppuccin-macchiato-DYnBP6_5.js +0 -1
  308. package/dist/client/assets/catppuccin-mocha-DYhrFGRu.js +0 -1
  309. package/dist/client/assets/chart-column-DgGlY4sD.js +0 -1
  310. package/dist/client/assets/chatThreadActions-BXaNbPbp.js +0 -1
  311. package/dist/client/assets/check-BfnWUGBT.js +0 -1
  312. package/dist/client/assets/chevron-down-B_FKCRVh.js +0 -1
  313. package/dist/client/assets/chevron-right-B6CKNGh4.js +0 -1
  314. package/dist/client/assets/circle-alert-BV3vJE-c.js +0 -1
  315. package/dist/client/assets/circle-check-D2Vx39x-.js +0 -1
  316. package/dist/client/assets/circle-dashed-khcA8K3Y.js +0 -1
  317. package/dist/client/assets/circle-question-mark-DEuLdOiy.js +0 -1
  318. package/dist/client/assets/circle-x-DqfM_2wS.js +0 -1
  319. package/dist/client/assets/clamp-D0kAXd-u.js +0 -1
  320. package/dist/client/assets/clarity-SemFz856.js +0 -1
  321. package/dist/client/assets/clipboard-copy-CiD4tBsh.js +0 -1
  322. package/dist/client/assets/clock--4M7moiV.js +0 -1
  323. package/dist/client/assets/clock-3-NbnQqtcd.js +0 -1
  324. package/dist/client/assets/collapsible-BECg-ssO.js +0 -1
  325. package/dist/client/assets/command-DvbA3O0J.js +0 -1
  326. package/dist/client/assets/composerHandleContext-BrQ6d8r9.js +0 -1
  327. package/dist/client/assets/copy-CkPe1c-r.js +0 -1
  328. package/dist/client/assets/coq-BrsZFFmf.js +0 -1
  329. package/dist/client/assets/cpp-nUc1dxUX.js +0 -1
  330. package/dist/client/assets/dark-plus-GAt2ZgX8.js +0 -1
  331. package/dist/client/assets/data-list-7TiaqfZU.js +0 -1
  332. package/dist/client/assets/desktopUpdateAtoms-6j0d8vfy.js +0 -1
  333. package/dist/client/assets/device-CGaJ6fwD.js +0 -168
  334. package/dist/client/assets/dialog-C9v8Zl6e.js +0 -1
  335. package/dist/client/assets/download-DPjzVxTa.js +0 -1
  336. package/dist/client/assets/dracula-C2uKkzgK.js +0 -1
  337. package/dist/client/assets/dracula-soft-D1bVjxWZ.js +0 -1
  338. package/dist/client/assets/draft-input-BRSLIjV6.js +0 -1
  339. package/dist/client/assets/editorPreferences-D-9SDgRM.js +0 -1
  340. package/dist/client/assets/emacs-lisp-B4R74twV.js +0 -1
  341. package/dist/client/assets/empty-CuQ57p2u.js +0 -1
  342. package/dist/client/assets/everforest-dark-D-DlICQR.js +0 -1
  343. package/dist/client/assets/everforest-light-CeVdGHYG.js +0 -1
  344. package/dist/client/assets/external-link-CF9EzT-A.js +0 -1
  345. package/dist/client/assets/eye-C2Puut9B.js +0 -1
  346. package/dist/client/assets/folder-BKTxLq18.js +0 -1
  347. package/dist/client/assets/folder-closed-D2cwiusg.js +0 -1
  348. package/dist/client/assets/gdscript-Cp2uCuqX.js +0 -1
  349. package/dist/client/assets/getPseudoElementBounds-DdH76YK5.js +0 -1
  350. package/dist/client/assets/git-branch-Dauy2SWC.js +0 -1
  351. package/dist/client/assets/git-pull-request-DsK1gBtK.js +0 -1
  352. package/dist/client/assets/github-dark-DwbbXv51.js +0 -1
  353. package/dist/client/assets/github-dark-default-CxjRwzl6.js +0 -1
  354. package/dist/client/assets/github-dark-dimmed-Cr1oaoul.js +0 -1
  355. package/dist/client/assets/github-dark-high-contrast-B4qJZLZa.js +0 -1
  356. package/dist/client/assets/github-light-CsVXhIlR.js +0 -1
  357. package/dist/client/assets/github-light-default-DB_IwZa6.js +0 -1
  358. package/dist/client/assets/github-light-high-contrast-DLgVeSB-.js +0 -1
  359. package/dist/client/assets/globe-dS40wBdE.js +0 -1
  360. package/dist/client/assets/group-DBXm8riE.js +0 -1
  361. package/dist/client/assets/gruvbox-dark-hard-DXm60lX3.js +0 -1
  362. package/dist/client/assets/gruvbox-dark-medium-GE2thSmD.js +0 -1
  363. package/dist/client/assets/gruvbox-dark-soft-04Cj-4VZ.js +0 -1
  364. package/dist/client/assets/gruvbox-light-hard-K6wSn29D.js +0 -1
  365. package/dist/client/assets/gruvbox-light-medium-CVy3aSlc.js +0 -1
  366. package/dist/client/assets/gruvbox-light-soft-DNgJjaY0.js +0 -1
  367. package/dist/client/assets/hack-Vy6VBrBk.js +0 -1
  368. package/dist/client/assets/haxe-OTjmBuCE.js +0 -1
  369. package/dist/client/assets/horizon-0-RkHfro.js +0 -1
  370. package/dist/client/assets/horizon-bright-BgL2X9oq.js +0 -1
  371. package/dist/client/assets/hostedConnectionCoordinator-DSMW2Ldh.js +0 -1
  372. package/dist/client/assets/houston-KyjWKfuY.js +0 -1
  373. package/dist/client/assets/hxml-B0Qn7Nwc.js +0 -1
  374. package/dist/client/assets/input-Dn_zesdZ.js +0 -1
  375. package/dist/client/assets/isElementDisabled-KSuuBj8D.js +0 -1
  376. package/dist/client/assets/kanagawa-dragon-CXtmUGW6.js +0 -1
  377. package/dist/client/assets/kanagawa-lotus-BN08jTvb.js +0 -1
  378. package/dist/client/assets/kanagawa-wave-CTweb8Dz.js +0 -1
  379. package/dist/client/assets/kbd-BF2-WlxQ.js +0 -1
  380. package/dist/client/assets/key-round-BjaaL9Df.js +0 -1
  381. package/dist/client/assets/keybindings-FSJY3Tht.js +0 -1
  382. package/dist/client/assets/keyboard-AkUFPD_e.js +0 -1
  383. package/dist/client/assets/label-BKjVY2A9.js +0 -1
  384. package/dist/client/assets/laserwave-CQkdhozh.js +0 -1
  385. package/dist/client/assets/latex-UxGGx4RW.js +0 -1
  386. package/dist/client/assets/layers-tzRiuxSx.js +0 -1
  387. package/dist/client/assets/lib-D5cyGc84.js +0 -29
  388. package/dist/client/assets/light-plus-CNQ8_7Y0.js +0 -1
  389. package/dist/client/assets/loader-BrbWRz3I.js +0 -1
  390. package/dist/client/assets/loader-circle-DRKbHQst.js +0 -1
  391. package/dist/client/assets/log-out-BEihaal1.js +0 -1
  392. package/dist/client/assets/luau-FMPmPwt6.js +0 -1
  393. package/dist/client/assets/main-BiIQEybS.js +0 -9
  394. package/dist/client/assets/main-tZWU6iqX.css +0 -2
  395. package/dist/client/assets/material-theme-CAtLaHa3.js +0 -1
  396. package/dist/client/assets/material-theme-darker-k-s5Bc6K.js +0 -1
  397. package/dist/client/assets/material-theme-lighter-CD6a-c4d.js +0 -1
  398. package/dist/client/assets/material-theme-ocean-B3mraInd.js +0 -1
  399. package/dist/client/assets/material-theme-palenight-DEhAARHw.js +0 -1
  400. package/dist/client/assets/mdc-OfbQwt23.js +0 -1
  401. package/dist/client/assets/menu-BxtB33Up.js +0 -1
  402. package/dist/client/assets/mermaid-Bk4SNUv9.js +0 -1
  403. package/dist/client/assets/messages-square-e0Zg750i.js +0 -1
  404. package/dist/client/assets/min-dark-BFqTAwCr.js +0 -1
  405. package/dist/client/assets/min-light-O7UdaaxX.js +0 -1
  406. package/dist/client/assets/minimize-2-DC9gMgGl.js +0 -1
  407. package/dist/client/assets/mojo-BgCJLMeH.js +0 -1
  408. package/dist/client/assets/monitor-Dj0JFj4_.js +0 -1
  409. package/dist/client/assets/monokai-CdkpiU2Y.js +0 -1
  410. package/dist/client/assets/moonbit-CaWjb8XO.js +0 -1
  411. package/dist/client/assets/motion-thOBhZyM.js +0 -1
  412. package/dist/client/assets/move-B1IS1UjX.js +0 -1
  413. package/dist/client/assets/night-owl-BsnCLAKc.js +0 -1
  414. package/dist/client/assets/night-owl-light-BODRhcTU.js +0 -1
  415. package/dist/client/assets/nord-Cd-F4txO.js +0 -1
  416. package/dist/client/assets/nushell-DcLAeLz5.js +0 -1
  417. package/dist/client/assets/one-dark-pro-DUS_IGRK.js +0 -1
  418. package/dist/client/assets/one-light-CVUd7yD5.js +0 -1
  419. package/dist/client/assets/palette-0qvNt1CR.js +0 -1
  420. package/dist/client/assets/pathEntry-BR9vr7Ug.js +0 -1
  421. package/dist/client/assets/pencil-CA0DGufX.js +0 -1
  422. package/dist/client/assets/phoneAnchoredActions-CtpkI3yG.js +0 -1
  423. package/dist/client/assets/plastic-CF8VZTnn.js +0 -1
  424. package/dist/client/assets/play-wIyvqd_g.js +0 -1
  425. package/dist/client/assets/plus-5kH13lqq.js +0 -1
  426. package/dist/client/assets/poimandres-BX2TyY6j.js +0 -1
  427. package/dist/client/assets/popover-CwhgX3HA.js +0 -1
  428. package/dist/client/assets/primary-BqnEJHWx.js +0 -2
  429. package/dist/client/assets/prisma-BsRQq5mF.js +0 -1
  430. package/dist/client/assets/projectPaths-45WPhgoj.js +0 -1
  431. package/dist/client/assets/providerDriverMeta-Cc60r9Rb.js +0 -1
  432. package/dist/client/assets/providerInstances-Cr8JmFCe.js +0 -1
  433. package/dist/client/assets/providerModels-Cr8JmFCe.js +0 -1
  434. package/dist/client/assets/qr-code-DDmpRnPp.js +0 -1
  435. package/dist/client/assets/r-DbaFp5Gj.js +0 -1
  436. package/dist/client/assets/radio-group-DZCo21CF.js +0 -2
  437. package/dist/client/assets/react-dom-x9LNwWQc.js +0 -1
  438. package/dist/client/assets/red-CJ3rzSJv.js +0 -1
  439. package/dist/client/assets/refresh-cw-DiuiLTny.js +0 -1
  440. package/dist/client/assets/resolveAriaLabelledBy-927ShlEO.js +0 -1
  441. package/dist/client/assets/rightPanelRouteSearch-CExl-IaQ.js +0 -1
  442. package/dist/client/assets/rose-pine-BthvhNj6.js +0 -1
  443. package/dist/client/assets/rose-pine-dawn-Dg85fqjY.js +0 -1
  444. package/dist/client/assets/rose-pine-moon-hon4tzzS.js +0 -1
  445. package/dist/client/assets/rotate-ccw-XOYBPtyK.js +0 -1
  446. package/dist/client/assets/rotate-cw-D32Z4Sdd.js +0 -1
  447. package/dist/client/assets/runtime-CA2W9mZ-.js +0 -17
  448. package/dist/client/assets/save-DjlqeVG_.js +0 -1
  449. package/dist/client/assets/scroll-area-CylKYQms.js +0 -1
  450. package/dist/client/assets/scrollEdges-D7RQhYjX.js +0 -1
  451. package/dist/client/assets/search-B2nLj573.js +0 -1
  452. package/dist/client/assets/select-qTezUK8F.js +0 -1
  453. package/dist/client/assets/separator-D77goPy-.js +0 -1
  454. package/dist/client/assets/server-y8Wq0Qwv.js +0 -1
  455. package/dist/client/assets/session-logic-xfW418Rx.js +0 -1
  456. package/dist/client/assets/settings-2-DpwBKj3m.js +0 -1
  457. package/dist/client/assets/settingsLayout-BuaXzjIe.js +0 -1
  458. package/dist/client/assets/settingsSections.logic-CR4aytUI.js +0 -1
  459. package/dist/client/assets/shallow-DWZCFNun.js +0 -1
  460. package/dist/client/assets/sheet-z3AEiSN4.js +0 -1
  461. package/dist/client/assets/shield-BuXuMVtb.js +0 -1
  462. package/dist/client/assets/shield-alert-Dfk--o-I.js +0 -1
  463. package/dist/client/assets/shield-check-BHi57iF1.js +0 -1
  464. package/dist/client/assets/sidebar-Dst9O2OR.js +0 -1
  465. package/dist/client/assets/sidebarProjectFolders-DR1NBLLz.js +0 -4
  466. package/dist/client/assets/sidebarStatusText-7jo1n9E1.js +0 -1
  467. package/dist/client/assets/skeleton-D_kbMg21.js +0 -1
  468. package/dist/client/assets/slack-dark-DYvUXyrP.js +0 -1
  469. package/dist/client/assets/slack-ochin-bqtMVDfH.js +0 -1
  470. package/dist/client/assets/smalltalk-B16xEiuN.js +0 -1
  471. package/dist/client/assets/smartphone-DcUQ17YT.js +0 -1
  472. package/dist/client/assets/snazzy-light-D8dzFmq5.js +0 -1
  473. package/dist/client/assets/solarized-dark-DV17i1UV.js +0 -1
  474. package/dist/client/assets/solarized-light-DSh2HLQt.js +0 -1
  475. package/dist/client/assets/solidity-CKzVLygQ.js +0 -1
  476. package/dist/client/assets/sparkles-nVLLtdqb.js +0 -1
  477. package/dist/client/assets/spinner-CkXSwhuf.js +0 -1
  478. package/dist/client/assets/square-pen-dcArpda7.js +0 -1
  479. package/dist/client/assets/src-I4s4HU8f.js +0 -14
  480. package/dist/client/assets/star-CdUOqzzZ.js +0 -1
  481. package/dist/client/assets/storeSelectors-Cr8JmFCe.js +0 -1
  482. package/dist/client/assets/surrealql-CaZedS14.js +0 -1
  483. package/dist/client/assets/swift-DonLKvLd.js +0 -1
  484. package/dist/client/assets/switch-BMeRsIbg.js +0 -1
  485. package/dist/client/assets/synthwave-84-CIknw8y7.js +0 -1
  486. package/dist/client/assets/system-verilog-DJ5XKQeo.js +0 -1
  487. package/dist/client/assets/tabSwitchInstrumentation-BuxWNdCV.js +0 -1
  488. package/dist/client/assets/terminal-DupJfYRW.js +0 -1
  489. package/dist/client/assets/terminal-links-Bf4neyyn.js +0 -1
  490. package/dist/client/assets/tex-CLeF3jRN.js +0 -1
  491. package/dist/client/assets/textarea-Bu_OTJYe.js +0 -1
  492. package/dist/client/assets/threadPinning-DhnkssEa.js +0 -1
  493. package/dist/client/assets/threadPriorityRefreshRuntime-DJjlyX7f.js +0 -1
  494. package/dist/client/assets/timestampFormat-8uPXS812.js +0 -1
  495. package/dist/client/assets/toast-CIjfIWUw.js +0 -1
  496. package/dist/client/assets/toggle-BA4mJ5v9.js +0 -1
  497. package/dist/client/assets/toggle-group-ChGfILTR.js +0 -1
  498. package/dist/client/assets/tokenModePresentation-B64s_OK3.js +0 -1
  499. package/dist/client/assets/tokyo-night-iIspnLcq.js +0 -1
  500. package/dist/client/assets/tooltip-C2VVqN6U.js +0 -1
  501. package/dist/client/assets/trash-2-Dqgxd0nF.js +0 -1
  502. package/dist/client/assets/triangle-alert-D4cCh6sB.js +0 -1
  503. package/dist/client/assets/twig-BmgBVapk.js +0 -1
  504. package/dist/client/assets/types-Cr8JmFCe.js +0 -1
  505. package/dist/client/assets/typst-DI99ib-x.js +0 -1
  506. package/dist/client/assets/undo-2-C8EQVSSD.js +0 -1
  507. package/dist/client/assets/unplug-Dt3Sy2op.js +0 -1
  508. package/dist/client/assets/useAppSidebarCollapsed-w0th-164.js +0 -1
  509. package/dist/client/assets/useAtlassian-j7ex3bVN.js +0 -0
  510. package/dist/client/assets/useButton-Dx5k1uZG.js +0 -1
  511. package/dist/client/assets/useCompositeListItem-BqkyY0oT.js +0 -1
  512. package/dist/client/assets/useCopyToClipboard-BTpWxumf.js +0 -1
  513. package/dist/client/assets/useDebouncedValue-BevbEbPO.js +0 -1
  514. package/dist/client/assets/useFloatingRootContext-j6TgzEFa.js +0 -1
  515. package/dist/client/assets/useHandleNewThread-gVYty_Bg.js +0 -1
  516. package/dist/client/assets/useLabelableId-CcYPzJvj.js +0 -1
  517. package/dist/client/assets/useLocation-CZ3osOgz.js +0 -1
  518. package/dist/client/assets/useNavigate-2tVq4iZ2.js +0 -1
  519. package/dist/client/assets/useOpenInteractionType-apbY9ZEK.js +0 -1
  520. package/dist/client/assets/usePhoneThreadActions-CnDlicSp.js +0 -1
  521. package/dist/client/assets/usePopupViewport-0k75uXo1.js +0 -1
  522. package/dist/client/assets/useRenderElement-5DRNLBaU.js +0 -1
  523. package/dist/client/assets/useRouter-CcIDS3PN.js +0 -1
  524. package/dist/client/assets/useScrollLock-C5WLWXcc.js +0 -1
  525. package/dist/client/assets/useStatistics-GOFXPHO0.js +0 -55
  526. package/dist/client/assets/useSwipeDismiss-BNHPBucH.js +0 -1
  527. package/dist/client/assets/useThreadActions-B4Xy2soQ.js +0 -2
  528. package/dist/client/assets/useTriggerFocusGuards-C3geWFzt.js +0 -1
  529. package/dist/client/assets/useValueChanged-FVqPwcY_.js +0 -1
  530. package/dist/client/assets/user-round-KsVtJgon.js +0 -1
  531. package/dist/client/assets/utils-B5qahmRn.js +0 -1
  532. package/dist/client/assets/verilog-CiiDBU1e.js +0 -1
  533. package/dist/client/assets/vesper-BIFK_oDq.js +0 -1
  534. package/dist/client/assets/visuallyHidden-j2WbVEv-.js +0 -1
  535. package/dist/client/assets/vitesse-black-D082JcaE.js +0 -1
  536. package/dist/client/assets/vitesse-dark-z-nr_5O8.js +0 -1
  537. package/dist/client/assets/vitesse-light-ojz42ZLy.js +0 -1
  538. package/dist/client/assets/vscode-icons-D3XEYHTI.js +0 -1
  539. package/dist/client/assets/worker-B0IAubm_.js +0 -161
  540. package/dist/client/assets/wrench-BnpoYEZm.js +0 -1
  541. package/dist/client/assets/x-BXHT1Zj1.js +0 -1
@@ -1,168 +0,0 @@
1
- import{i as e,n as t,r as n,t as r}from"./react-SIfiwpqq.js";import{t as i}from"./index-DRY8Hgrj.js";import{G as a}from"./primary-BqnEJHWx.js";import{$r as o,Gn as s,Gt as c,Ht as l,bi as u,ia as d}from"./runtime-CA2W9mZ-.js";import{t as f}from"./compiler-runtime-qmuS0Svy.js";import{f as p}from"./useRenderElement-5DRNLBaU.js";import{t as m}from"./check-BfnWUGBT.js";import{o as h,s as g}from"./tabSwitchInstrumentation-BuxWNdCV.js";import{t as _}from"./copy-CkPe1c-r.js";import{S as v,a as y,b,g as x,h as S,i as ee,m as te,n as ne,o as re,p as ie,r as ae,t as oe,v as C}from"./lib-D5cyGc84.js";import{t as se}from"./folder-BKTxLq18.js";import{i as ce}from"./toast-CIjfIWUw.js";import{i as le,o as ue}from"./terminal-links-Bf4neyyn.js";import{t as w}from"./utils-B5qahmRn.js";import{i as de,n as fe,t as pe}from"./tooltip-C2VVqN6U.js";import{t as T}from"./toastHelpers-CSQRKo4F.js";import{t as E}from"./skeleton-D_kbMg21.js";import{t as me}from"./usePresentationTier-B_SCFvN7.js";import{n as he}from"./editorPreferences-D-9SDgRM.js";import"./session-logic-xfW418Rx.js";import{t as ge}from"./useLongPress-OGlhYKlH.js";import{t as _e}from"./useTheme-By1kfyiU.js";var ve=p(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]);function ye(e){return e.worktreePath??e.project.cwd}function be(e){let t={RYCO_PROJECT_ROOT:e.project.cwd};return e.worktreePath&&(t.RYCO_WORKTREE_PATH=e.worktreePath),e.extraEnv?{...t,...e.extraEnv}:t}function xe(e){let t=e.replaceAll(`\\`,`/`).split(`/`);for(let e=t.length-1;e>=0;--e){let n=t[e];if(n)return n}return e}function Se(e){return(e??``).replace(/\s+(?:complete|completed|done|finished|success|succeeded|started|running)\s*$/i,``).toLowerCase().replace(/\s+/g,` `).trim()}var Ce=new Set([`cat`,`nl`,`head`,`tail`,`sed`,`less`,`more`]),we=new Set([`rg`,`grep`,`ag`,`ack`]),Te=new Set([`find`,`fd`]),Ee=new Set([`ls`]);function De(e){return Ce.has(e)||we.has(e)||Te.has(e)||Ee.has(e)}function Oe(e,t=!1){let n=Ze(qe(e)),[r,i]=Ke(Le(n));if(Ce.has(r))return{verb:t?`Reading`:`Read`,target:Ne(i,`file`),fullCommand:e};if(we.has(r))return{verb:t?`Searching`:`Searched`,target:Ve(i),fullCommand:e};if(Ee.has(r))return{verb:t?`Listing`:`Listed`,target:Ne(i,`directory`),fullCommand:e};if(Te.has(r))return{verb:t?`Finding`:`Found`,target:Pe(i,`files`),fullCommand:e};switch(r){case`mkdir`:return{verb:t?`Creating`:`Created`,target:Ne(i,`directory`),fullCommand:e};case`rm`:return{verb:t?`Removing`:`Removed`,target:Ne(i,`file`),fullCommand:e};case`cp`:case`mv`:return{verb:t?r===`cp`?`Copying`:`Moving`:r===`cp`?`Copied`:`Moved`,target:Ne(i,`file`),fullCommand:e};case`git`:return Ae(i,e,t);case`node`:case`bun`:case`deno`:case`python`:case`python3`:case`ruby`:case`perl`:return{verb:t?`Running`:`Ran`,target:Re(r,n,i)??Ie(n),fullCommand:e};case`osascript`:return{verb:t?`Running`:`Ran`,target:`AppleScript`,fullCommand:e};default:return{verb:t?`Running`:`Ran`,target:Ie(n),fullCommand:e}}}function ke(e){let[t]=Ke(Le(Ze(qe(e))));return De(t)?`inspect`:t===`git`?`git`:t===`gh`||t===`hub`?`github`:`terminal`}function Ae(e,t,n){let r=je(e);switch(r.split(/\s+/,1)[0]?.toLowerCase()??``){case`status`:return{verb:n?`Checking`:`Checked`,target:`git status`,fullCommand:t};case`diff`:return{verb:n?`Comparing`:`Compared`,target:`changes`,fullCommand:t};case`show`:return{verb:n?`Inspecting`:`Inspected`,target:`commit`,fullCommand:t};case`log`:return{verb:n?`Reviewing`:`Reviewed`,target:`git history`,fullCommand:t};case`add`:return{verb:n?`Staging`:`Staged`,target:`changes`,fullCommand:t};case`commit`:return{verb:n?`Committing`:`Committed`,target:`changes`,fullCommand:t};case`push`:return{verb:n?`Pushing`:`Pushed`,target:`to remote`,fullCommand:t};case`pull`:return{verb:n?`Pulling`:`Pulled`,target:`from remote`,fullCommand:t};case`checkout`:case`switch`:return{verb:n?`Switching to`:`Switched to`,target:Me(e),fullCommand:t};default:return{verb:n?`Running`:`Ran`,target:Ie(`git ${r}`.trim()),fullCommand:t}}}function je(e){let t=D(e),n=0;for(;n<t.length;){let e=t[n];if(e===`-C`||e===`-c`||e===`--git-dir`||e===`--work-tree`){n+=2;continue}if(e.startsWith(`-C`)||e.startsWith(`-c`)||e.startsWith(`--git-dir=`)||e.startsWith(`--work-tree=`)){n+=1;continue}if(e.startsWith(`--`)){n+=1;continue}break}return t.slice(n).join(` `)}function Me(e){return D(e).at(-1)?.trim()||`branch`}function Ne(e,t){let n=D(e);for(let e=n.length-1;e>=0;--e){let t=n[e].replace(/^['"]|['"]$/g,``);if(!(!t||t.startsWith(`-`)))return Fe(t)}return t}function Pe(e,t){let n=D(e),r=!1;for(let e of n){if(r){r=!1;continue}if(e.startsWith(`-`)){(e===`-maxdepth`||e===`-mindepth`||e===`-name`||e===`-type`||e===`-path`)&&(r=!0);continue}return Fe(e)}return t}function Fe(e){if(e===`.`)return`current directory`;if(e===`..`)return`parent directory`;let t=e.split(/[\\/]/).filter(Boolean);return t.length<=2?e:t.slice(-2).join(`/`)}function Ie(e){let t=e.replace(/\s+/g,` `).trim();return t.length<=140?t:`${t.slice(0,137).trimEnd()}...`}function Le(e){let t=Xe(e);return t?e.slice(0,t.operatorStart).trim():e}function Re(e,t,n){let r=e===`python3`?`python`:e;return ze(t)||Be(n)?`${r} script`:null}function ze(e){return/(^|\s)<<-?\s*['"]?[A-Za-z0-9_]+/.test(e)}function Be(e){return D(e).some(e=>e===`-e`||e===`-c`||e.startsWith(`-e=`))}function Ve(e){let{pattern:t,path:n}=He(e);return t&&n?`for ${t} in ${n}`:t?`for ${t}`:n?`in ${n}`:`files`}function He(e){let t=D(e),n=null,r=null,i=!1;for(let e of t){if(i){i=!1;continue}if(e.startsWith(`-`)){(e===`-t`||e===`-g`||e===`--type`||e===`--glob`||e===`--max-count`)&&(i=!0);continue}if(!n){let t=Ue(e);if(!t){let t=We(e);t&&(!r||r===`current directory`)&&(r=t);continue}n=t;continue}(!r||r===`current directory`)&&(r=We(e)??r)}return n&&r===`current directory`&&Ge(n)&&(r=We(n),n=null),{pattern:n,path:r}}function Ue(e){let t=e.trim();return!t||t===`.`||t===`..`||!/[a-z0-9]/i.test(t)?null:t.length>30?`${t.slice(0,27)}...`:t}function We(e){let t=e.trim();return t?Fe(t):null}function Ge(e){return e.includes(`/`)||e.startsWith(`.`)||e.includes(`\\`)}function D(e){let t=[],n=0;for(;n<e.length;){for(;e[n]===` `;)n+=1;if(n>=e.length)break;let r=e[n];if(r===`"`||r===`'`){n+=1;let i=``;for(;n<e.length&&e[n]!==r;){if(e[n]===`\\`&&n+1<e.length){i+=e[n+1],n+=2;continue}i+=e[n],n+=1}e[n]===r&&(n+=1),t.push(i);continue}let i=``;for(;n<e.length&&e[n]!==` `;)i+=e[n],n+=1;i&&t.push(i)}return t}function Ke(e){let t=e.trim().replace(/\s+/g,` `);if(!t)return[``,``];let n=t.indexOf(` `);return n===-1?[xe(t).toLowerCase(),``]:[xe(t.slice(0,n)).toLowerCase(),t.slice(n+1).trim()]}function qe(e){let t=e.trim();if(!t)return t;let n=[`/usr/bin/bash -lc `,`/usr/bin/bash -c `,`/bin/bash -lc `,`/bin/bash -c `,`/usr/bin/zsh -lc `,`/usr/bin/zsh -c `,`/bin/zsh -lc `,`/bin/zsh -c `,`/bin/sh -lc `,`/bin/sh -c `,`bash -lc `,`bash -c `,`zsh -lc `,`zsh -c `,`sh -lc `,`sh -c `],r=t.toLowerCase();for(let e of n)if(r.startsWith(e)){t=t.slice(e.length).trim(),t.length>=2&&(t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`))&&(t=t.slice(1,-1).trim()),t=Je(t);break}let i=t.search(/\s*\|\s*/);return i>0&&(t=t.slice(0,i).trim()),t}function Je(e){let t=e.trim();for(let e=0;e<4;e+=1){let e=Xe(t);if(!e||!Ye(t.slice(0,e.operatorStart).trim()))return t;t=t.slice(e.commandStart).trim()}return t}function Ye(e){let t=e.replace(/\s+/g,` `).trim();return t?/^(?:builtin\s+)?cd\s+/.test(t)||/^(?:source|\.)\s+/.test(t)||/^set\s+[-+][A-Za-z]/.test(t)?!0:/^(?:export\s+)?[A-Za-z_][A-Za-z0-9_]*=\S+(?:\s+[A-Za-z_][A-Za-z0-9_]*=\S+)*$/.test(t):!1}function Xe(e){let t=null;for(let n=0;n<e.length-1;n+=1){let r=e[n];if(r===`\\`&&n+1<e.length){n+=1;continue}if(t){r===t&&(t=null);continue}if(r===`"`||r===`'`){t=r;continue}let i=e[n+1];if(r===`&`&&i===`&`)return{operatorStart:n,commandStart:n+2};if(r===`;`)return{operatorStart:n,commandStart:n+1}}return null}function Ze(e){let t=e.replace(/\s+/g,` `).trim();for(let e=0;e<4;e+=1){let[e,n]=Ke(t),r=e===`env`?Qe(n):e===`timeout`||e===`gtimeout`?$e(n):e===`nice`?et(n):e===`arch`?tt(n):e===`command`?n:null;if(!r||r===t)return t;t=r.trim()}return t}function Qe(e){let t=D(e),n=0;for(;n<t.length;){let e=t[n];if(e===`--`){n+=1;break}if(e===`-u`||e===`--unset`||e===`-C`||e===`--chdir`){n+=2;continue}if(e.startsWith(`--unset=`)||e.startsWith(`--chdir=`)){n+=1;continue}if(/^[A-Za-z_][A-Za-z0-9_]*=/.test(e)){n+=1;continue}if(e.startsWith(`-`)){n+=1;continue}break}return n<t.length?t.slice(n).join(` `):null}function $e(e){let t=D(e),n=0;for(;n<t.length&&t[n]?.startsWith(`-`);)n+=t[n]===`-s`||t[n]===`-k`?2:1;return n<t.length&&/^\d+(?:\.\d+)?[smhd]?$/.test(t[n])&&(n+=1),n<t.length?t.slice(n).join(` `):null}function et(e){let t=D(e),n=0;if(t[n]===`-n`)n+=2;else for(;t[n]?.startsWith(`-`);)n+=1;return n<t.length?t.slice(n).join(` `):null}function tt(e){let t=D(e),n=0;for(;t[n]?.startsWith(`-`);)n+=1;return n<t.length?t.slice(n).join(` `):null}function nt(e){return e.tone===`error`||e.exitCode!==void 0&&e.exitCode!==0?`failed`:e.completed?`completed`:`running`}function rt(e){switch(e){case`running`:return`Running`;case`completed`:return`Completed`;case`failed`:return`Failed`}}function it(e,t){if(!e.startedAt)return null;let n=Date.parse(e.startedAt);if(Number.isNaN(n))return null;let r=e.lastActivityAt??e.createdAt,i=t??Date.parse(r);return Number.isNaN(i)||i<n?null:l(i-n)}function at(e){let t=[rt(nt(e))],n=it(e);return n&&t.push(`${n} elapsed`),t.join(` · `)}var O=e(r(),1),k=f(),A=d(),ot=`diffs-container`,st=/(?=^From [a-f0-9]+ .+$)/m,ct=/(?=^diff --git)/gm,lt=/(?<=\n)/,ut=/^(---|\+\+\+)\s+([^\t\r\n]+)/,dt=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,ft=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,pt=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,mt=`header-prefix`,ht=`header-filename-suffix`,gt=`header-metadata`,_t=`header-custom`,vt={dark:`pierre-dark`,light:`pierre-light`},yt=`data-theme-css`,bt=`data-unsafe-css`,xt=`data-diffs-scrollbar-measure`,St=`--diffs-scrollbar-gutter-measured`,Ct=1e5,wt={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...wt});var Tt=Object.freeze({fromStart:0,fromEnd:0}),Et={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},Dt={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0};function Ot(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function kt(e){let t=e.length;return e.charCodeAt(t-1)===10&&(t--,e.charCodeAt(t-1)===13&&t--),e.slice(0,t)}function At(e,t){return e-(t===0?0:1)}function jt(e,t){return At(e,t)+t}var Mt=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},Nt=new class extends Mt{};function Pt(e,t,n){return Nt.diff(e,t,n)}function Ft(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function It(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function Lt(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function Rt(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function zt(e,t){return Lt(e,t,``)}function Bt(e,t){return Rt(e,t,``)}function Vt(e,t){return t.slice(0,Ht(e,t))}function Ht(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function Ut(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function Wt(e,t){if(t)return Kt(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function Gt(e,t){if(t)return Kt(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function Kt(e,t){if(!t)return[Gt(e),Wt(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=Ut(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var qt=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,Jt=RegExp(`[${qt}]+|\\s+|[^${qt}]`,`ug`);new class extends Mt{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=Ut(e,r)}else n=e.match(Jt)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&Yt(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&Yt(n,i,r,null,t.intlSegmenter),e}};function Yt(e,t,n,r,i){if(t&&n){let[a,o]=Kt(t.value,i),[s,c]=Kt(n.value,i);if(e){let r=Ft(a,s);e.value=Rt(e.value,s,r),t.value=zt(t.value,r),n.value=zt(n.value,r)}if(r){let e=It(o,c);r.value=Lt(r.value,c,e),t.value=Bt(t.value,e),n.value=Bt(n.value,e)}}else if(n){if(e){let e=Gt(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=Gt(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=Gt(r.value,i),[a,o]=Kt(t.value,i),s=Ft(n,a);t.value=zt(t.value,s);let c=It(zt(n,s),o);t.value=Bt(t.value,c),r.value=Lt(r.value,n,c),e.value=Rt(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=Gt(r.value,i),n=Vt(Wt(t.value,i),e);t.value=Bt(t.value,n)}else if(e){let n=Vt(Wt(e.value,i),Gt(t.value,i));t.value=zt(t.value,n)}}var Xt=new class extends Mt{tokenize(e){let t=RegExp(`(\\r?\\n)|[${qt}]+|[^\\S\\n\\r]+|[^${qt}]`,`ug`);return e.match(t)||[]}};function Zt(e,t,n){return Xt.diff(e,t,n)}var Qt=new class extends Mt{constructor(){super(...arguments),this.tokenize=en}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
2
- `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
3
- `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
4
- `)&&(e=e.slice(0,-1)),t.endsWith(`
5
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function $t(e,t,n){return Qt.diff(e,t,n)}function en(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
6
- `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function tn(e){return e==`.`||e==`!`||e==`?`}new class extends Mt{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(tn(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends Mt{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends Mt{constructor(){super(...arguments),this.tokenize=en}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(nn(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function nn(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=nn(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=nn(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends Mt{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function rn(e){for(let t=0;t<e.length;t++)if(e[t]<` `||e[t]>`~`||e[t]===`"`||e[t]===`\\`)return!0;return!1}function an(e){if(!rn(e))return e;let t=`"`,n=new TextEncoder().encode(e),r=0;for(;r<n.length;){let e=n[r];t+=e===7?`\\a`:e===8?`\\b`:e===9?`\\t`:e===10?`\\n`:e===11?`\\v`:e===12?`\\f`:e===13?`\\r`:e===34?`\\"`:e===92?`\\\\`:e>=32&&e<=126?String.fromCharCode(e):`\\`+e.toString(8).padStart(3,`0`),r++}return t+=`"`,t}var on={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function sn(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;$t(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l($t(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||un(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s){if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
7
- `)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function cn(e,t){if(t||=on,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders&&!e.every(e=>e.isGit))throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>cn(e,t)).join(`
8
- `)}let n=[];if(e.isGit){if(t=on,!e.oldFileName)throw Error(`oldFileName must be specified for Git patches`);if(!e.newFileName)throw Error(`newFileName must be specified for Git patches`);let r=e.oldFileName,i=e.newFileName;e.isCreate&&r===`/dev/null`?r=i.replace(/^b\//,`a/`):e.isDelete&&i===`/dev/null`&&(i=r.replace(/^a\//,`b/`)),n.push(`diff --git `+an(r)+` `+an(i)),e.isDelete&&n.push(`deleted file mode `+(e.oldMode??`100644`)),e.isCreate&&n.push(`new file mode `+(e.newMode??`100644`)),e.oldMode&&e.newMode&&!e.isDelete&&!e.isCreate&&(n.push(`old mode `+e.oldMode),n.push(`new mode `+e.newMode)),e.isRename&&(n.push(`rename from `+an((e.oldFileName??``).replace(/^a\//,``))),n.push(`rename to `+an((e.newFileName??``).replace(/^b\//,``)))),e.isCopy&&(n.push(`copy from `+an((e.oldFileName??``).replace(/^a\//,``))),n.push(`copy to `+an((e.newFileName??``).replace(/^b\//,``))))}else t.includeIndex&&e.oldFileName==e.newFileName&&e.oldFileName!==void 0&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`);let r=e.hunks.length>0;t.includeFileHeaders&&e.oldFileName!==void 0&&e.newFileName!==void 0&&(!e.isGit||r)&&(n.push(`--- `+an(e.oldFileName)+(e.oldHeader?` `+e.oldHeader:``)),n.push(`+++ `+an(e.newFileName)+(e.newHeader?` `+e.newHeader:``)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t],i=r.oldLines===0?r.oldStart-1:r.oldStart,a=r.newLines===0?r.newStart-1:r.newStart;n.push(`@@ -`+i+`,`+r.oldLines+` +`+a+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
9
- `)+`
10
- `}function ln(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;sn(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?cn(e,o.headerOptions):void 0)}}))}else{let s=sn(e,t,n,r,i,a,o);return s?cn(s,o?.headerOptions):void 0}}function un(e){let t=e.endsWith(`
11
- `),n=e.split(`
12
- `).map(e=>e+`
13
- `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function dn(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function fn(e){return{type:`text`,value:e}}function pn({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function mn({name:e,width:t=16,height:n=16,properties:r}){return pn({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[pn({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function hn(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function gn(e){return pn({tagName:`div`,properties:{"data-gutter":``},children:e})}function _n(e,t,n,r={}){return pn({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[pn({tagName:`span`,properties:{"data-line-number-content":``},children:[fn(`${t}`)]})]})}function vn(e,t,n){return pn({tagName:`div`,properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t===`annotation`?void 0:e,style:t===`annotation`?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}var yn=/["&'<>`]/g,bn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,xn=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Sn=/[|\\{}()[\]^$+*?.]/g,Cn=new WeakMap;function wn(e,t){if(e=e.replace(t.subset?Tn(t.subset):yn,r),t.subset||t.escapeOnly)return e;return e.replace(bn,n).replace(xn,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Tn(e){let t=Cn.get(e);return t||(t=En(e),Cn.set(e,t)),t}function En(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Sn,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Dn=/[\dA-Fa-f]/;function On(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Dn.test(String.fromCharCode(t))?r:r+`;`}var kn=/\d/;function An(e,t,n){let r=`&#`+String(e);return n&&t&&!kn.test(String.fromCharCode(t))?r:r+`;`}var jn=`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`.split(`.`),Mn={nbsp:`\xA0`,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:`€`},Nn=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Pn={}.hasOwnProperty,Fn={},In;for(In in Mn)Pn.call(Mn,In)&&(Fn[Mn[In]]=In);var Ln=/[^\dA-Za-z]/;function Rn(e,t,n,r){let i=String.fromCharCode(e);if(Pn.call(Fn,i)){let e=Fn[i],a=`&`+e;return n&&jn.includes(e)&&!Nn.includes(e)&&(!r||t&&t!==61&&Ln.test(String.fromCharCode(t)))?a:a+`;`}return``}function zn(e,t,n){let r=On(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Rn(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=An(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Bn(e,t){return wn(e,Object.assign({format:zn},t))}var Vn=/^>|^->|<!--|-->|--!>|<!-$/g,Hn=[`>`],Un=[`<`,`>`];function Wn(e,t,n,r){return r.settings.bogusComments?`<?`+Bn(e.value,Object.assign({},r.settings.characterReferences,{subset:Hn}))+`>`:`<!--`+e.value.replace(Vn,i)+`-->`;function i(e){return Bn(e,Object.assign({},r.settings.characterReferences,{subset:Un}))}}function Gn(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var j=Jn(1),Kn=Jn(-1),qn=[];function Jn(e){return t;function t(t,n,r){let i=t?t.children:qn,a=(n||0)+e,o=i[a];if(!r)for(;o&&C(o);)a+=e,o=i[a];return o}}var Yn={}.hasOwnProperty;function Xn(e){return t;function t(t,n,r){return Yn.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Zn=Xn({body:er,caption:Qn,colgroup:Qn,dd:ir,dt:rr,head:Qn,html:$n,li:nr,optgroup:or,option:sr,p:tr,rp:ar,rt:ar,tbody:lr,td:fr,tfoot:ur,th:fr,thead:cr,tr:dr});function Qn(e,t,n){let r=j(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&C(r.value.charAt(0)))}function $n(e,t,n){let r=j(n,t);return!r||r.type!==`comment`}function er(e,t,n){let r=j(n,t);return!r||r.type!==`comment`}function tr(e,t,n){let r=j(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||n.type!==`element`||n.tagName!==`a`&&n.tagName!==`audio`&&n.tagName!==`del`&&n.tagName!==`ins`&&n.tagName!==`map`&&n.tagName!==`noscript`&&n.tagName!==`video`}function nr(e,t,n){let r=j(n,t);return!r||r.type===`element`&&r.tagName===`li`}function rr(e,t,n){let r=j(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function ir(e,t,n){let r=j(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function ar(e,t,n){let r=j(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function or(e,t,n){let r=j(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function sr(e,t,n){let r=j(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function cr(e,t,n){let r=j(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function lr(e,t,n){let r=j(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function ur(e,t,n){return!j(n,t)}function dr(e,t,n){let r=j(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function fr(e,t,n){let r=j(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var pr=Xn({body:gr,colgroup:_r,head:hr,html:mr,tbody:vr});function mr(e){let t=j(e,-1);return!t||t.type!==`comment`}function hr(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function gr(e){let t=j(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&C(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function _r(e,t,n){let r=Kn(n,t),i=j(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Zn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function vr(e,t,n){let r=Kn(n,t),i=j(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Zn(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var yr={name:[[`
14
- \f\r &/=>`.split(``),`
15
- \f\r "&'/=>\``.split(``)],[`\0
16
- \f\r "&'/<=>`.split(``),`\0
17
- \f\r "&'/<=>\``.split(``)]],unquoted:[[`
18
- \f\r &>`.split(``),`\0
19
- \f\r "&'<=>\``.split(``)],[`\0
20
- \f\r "&'<=>\``.split(``),`\0
21
- \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function br(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=S);let l=xr(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!pr(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!Zn(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function xr(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=Sr(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function Sr(e,t,n){let r=x(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Bn(r.attribute,Object.assign({},e.settings.characterReferences,{subset:yr.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?b:ie)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Bn(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:yr.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&ne(n,o)>ne(n,e.alternative)&&(o=e.alternative),s=o+Bn(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?yr.single:yr.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var Cr=[`<`,`&`];function wr(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Bn(e.value,Object.assign({},r.settings.characterReferences,{subset:Cr}))}function Tr(e,t,n,r){return r.settings.allowDangerousHtml?e.value:wr(e,t,n,r)}function Er(e,t,n,r){return r.all(e)}var Dr=ee(`type`,{invalid:Or,unknown:kr,handlers:{comment:Wn,doctype:Gn,element:br,raw:Tr,root:Er,text:wr}});function Or(e){throw Error("Expected node, not `"+e+"`")}function kr(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var Ar={},jr={},Mr=[];function Nr(e,t){let n=t||Ar,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Pr,all:Fr,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||ae,characterReferences:n.characterReferences||jr,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?S:te,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function Pr(e,t,n){return Dr(e,t,n,this)}function Fr(e){let t=[],n=e&&e.children||Mr,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var Ir=new Map,Lr=new Map,Rr=new Map,zr=new Set;function Br(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(zr.has(n.name))continue;let e=Ir.get(n.name);e??(e=n,Ir.set(n.name,e)),zr.add(e.name),t.loadLanguageSync(e.data)}}function Vr(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var Hr=Object.defineProperty,Ur=Object.getOwnPropertyDescriptor,Wr=Object.getOwnPropertyNames,Gr=Object.prototype.hasOwnProperty,Kr=(e,t)=>{let n={};for(var r in e)Hr(n,r,{get:e[r],enumerable:!0});return t||Hr(n,Symbol.toStringTag,{value:`Module`}),n},qr=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Wr(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Gr.call(e,s)&&s!==n&&Hr(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Ur(t,s))||r.enumerable});return e},Jr=(e,t,n)=>(qr(e,t,`default`),n&&qr(n,t,`default`)),Yr=[{id:`abap`,name:`ABAP`,import:(()=>i(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>i(()=>import(`./actionscript-3--17pq3dv.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>i(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>i(()=>import(`./angular-html-Dht9YPGR.js`).then(e=>e.n),[]))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>i(()=>import(`./angular-ts-BQK9km6-.js`),[]))},{id:`apache`,name:`Apache Conf`,import:(()=>i(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>i(()=>import(`./apex-VAyPSnFM.js`),[]))},{id:`apl`,name:`APL`,import:(()=>i(()=>import(`./apl-C92MddLO.js`),[]))},{id:`applescript`,name:`AppleScript`,import:(()=>i(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>i(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>i(()=>import(`./asciidoc-DE70LPWp.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>i(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>i(()=>import(`./astro-CV97iv9o.js`),[]))},{id:`awk`,name:`AWK`,import:(()=>i(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>i(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>i(()=>import(`./bat-Bo4NYOV-.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>i(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>i(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>i(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>i(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>i(()=>import(`./bird2-C6vDhewU.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>i(()=>import(`./blade-yJCl9jZA.js`),[]))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>i(()=>import(`./bsl-BkkzgIyY.js`),[]))},{id:`c`,name:`C`,import:(()=>i(()=>import(`./c-Baw6W2ff.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>i(()=>import(`./c3-BFHwR3_K.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>i(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>i(()=>import(`./cairo-DLTphjLi.js`),[]))},{id:`clarity`,name:`Clarity`,import:(()=>i(()=>import(`./clarity-SemFz856.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>i(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>i(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>i(()=>import(`./cobol-NqUMvFU8.js`),[]))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>i(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>i(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>i(()=>import(`./coffee-DVKhASwQ.js`),[]))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>i(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>i(()=>import(`./coq-BrsZFFmf.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>i(()=>import(`./cpp-nUc1dxUX.js`).then(e=>e.n),[]))},{id:`crystal`,name:`Crystal`,import:(()=>i(()=>import(`./crystal-DTR4CTFy.js`),[]))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>i(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>i(()=>import(`./css-tyblAV2Z.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>i(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>i(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>i(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>i(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>i(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>i(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>i(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>i(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>i(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>i(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>i(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>i(()=>import(`./edge-CpqhDICu.js`),[]))},{id:`elixir`,name:`Elixir`,import:(()=>i(()=>import(`./elixir--isJgL2B.js`),[]))},{id:`elm`,name:`Elm`,import:(()=>i(()=>import(`./elm-DgHzNgm_.js`),[]))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>i(()=>import(`./emacs-lisp-B4R74twV.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>i(()=>import(`./erb-UQla4w8B.js`),[]))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>i(()=>import(`./erlang-Cphh6RMH.js`),[]))},{id:`fennel`,name:`Fennel`,import:(()=>i(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>i(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>i(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>i(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),[]))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>i(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>i(()=>import(`./fsharp-D13ZGOAj.js`),[]))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>i(()=>import(`./gdresource-C0sCabJj.js`),[]))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>i(()=>import(`./gdscript-Cp2uCuqX.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>i(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>i(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>i(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>i(()=>import(`./git-commit-BSykSTBG.js`),[]))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>i(()=>import(`./git-rebase-BqNqx552.js`),[]))},{id:`gleam`,name:`Gleam`,import:(()=>i(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>i(()=>import(`./glimmer-js-yZWXr7D1.js`),[]))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>i(()=>import(`./glimmer-ts-BgilwNe9.js`),[]))},{id:`glsl`,name:`GLSL`,import:(()=>i(()=>import(`./glsl-CiPx7o44.js`).then(e=>e.n),[]))},{id:`gn`,name:`GN`,import:(()=>i(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>i(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>i(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>i(()=>import(`./graphql-dVCFBcPU.js`).then(e=>e.n),[]))},{id:`groovy`,name:`Groovy`,import:(()=>i(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>i(()=>import(`./hack-Vy6VBrBk.js`),[]))},{id:`haml`,name:`Ruby Haml`,import:(()=>i(()=>import(`./haml-Bvq_b7GQ.js`).then(e=>e.n),[]))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>i(()=>import(`./handlebars-D71nAVX4.js`),[]))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>i(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>i(()=>import(`./haxe-OTjmBuCE.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>i(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>i(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>i(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>i(()=>import(`./html-CQCljoLJ.js`).then(e=>e.n),[]))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>i(()=>import(`./html-derivative-BwDrYmK9.js`),[]))},{id:`http`,name:`HTTP`,import:(()=>i(()=>import(`./http-BSiVGmrj.js`),[]))},{id:`hurl`,name:`Hurl`,import:(()=>i(()=>import(`./hurl-BUTu-xdf.js`),[]))},{id:`hxml`,name:`HXML`,import:(()=>i(()=>import(`./hxml-B0Qn7Nwc.js`),[]))},{id:`hy`,name:`Hy`,import:(()=>i(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>i(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>i(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>i(()=>import(`./java-DKLhoot1.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>i(()=>import(`./javascript-BoDf_Xaa.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>i(()=>import(`./jinja-BA7hgfzz.js`),[]))},{id:`jison`,name:`Jison`,import:(()=>i(()=>import(`./jison-CUMnSUVk.js`),[]))},{id:`json`,name:`JSON`,import:(()=>i(()=>import(`./json-D-CzDEr3.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>i(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>i(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>i(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>i(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>i(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>i(()=>import(`./jsx-RPKfHBaT.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>i(()=>import(`./julia-DTmLe4fA.js`),[]))},{id:`just`,name:`Just`,import:(()=>i(()=>import(`./just-CPUGe9J1.js`),[]))},{id:`kdl`,name:`KDL`,import:(()=>i(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>i(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>i(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>i(()=>import(`./latex-UxGGx4RW.js`),[]))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>i(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>i(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>i(()=>import(`./liquid-Cr73H0-U.js`),[]))},{id:`llvm`,name:`LLVM IR`,import:(()=>i(()=>import(`./llvm-Cm23YOpf.js`),[]))},{id:`log`,name:`Log file`,import:(()=>i(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>i(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>i(()=>import(`./lua-BNklVDJF.js`).then(e=>e.n),[]))},{id:`luau`,name:`Luau`,import:(()=>i(()=>import(`./luau-FMPmPwt6.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>i(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>i(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>i(()=>import(`./marko-8BhW8jZt.js`),[]))},{id:`matlab`,name:`MATLAB`,import:(()=>i(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>i(()=>import(`./mdc-OfbQwt23.js`),[]))},{id:`mdx`,name:`MDX`,import:(()=>i(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>i(()=>import(`./mermaid-Bk4SNUv9.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>i(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>i(()=>import(`./mojo-BgCJLMeH.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>i(()=>import(`./moonbit-CaWjb8XO.js`),[]))},{id:`move`,name:`Move`,import:(()=>i(()=>import(`./move-B1IS1UjX.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>i(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>i(()=>import(`./nextflow-BJtWHP5T.js`),[]))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>i(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>i(()=>import(`./nginx-BbzDIRDu.js`),[]))},{id:`nim`,name:`Nim`,import:(()=>i(()=>import(`./nim-C27DPxCt.js`),[]))},{id:`nix`,name:`Nix`,import:(()=>i(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>i(()=>import(`./nushell-DcLAeLz5.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>i(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>i(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>i(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>i(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>i(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>i(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>i(()=>import(`./perl-Dj7_nwz_.js`),[]))},{id:`php`,name:`PHP`,import:(()=>i(()=>import(`./php-Xqfm-TjX.js`),[]))},{id:`pkl`,name:`Pkl`,import:(()=>i(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>i(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>i(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>i(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>i(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>i(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>i(()=>import(`./powershell-DshXNtvi.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>i(()=>import(`./prisma-BsRQq5mF.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>i(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>i(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>i(()=>import(`./pug-CKEc9v9y.js`),[]))},{id:`puppet`,name:`Puppet`,import:(()=>i(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>i(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>i(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>i(()=>import(`./qml-C3bhdnuC.js`),[]))},{id:`qmldir`,name:`QML Directory`,import:(()=>i(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>i(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>i(()=>import(`./r-DbaFp5Gj.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>i(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>i(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>i(()=>import(`./razor-CCBiKnb_.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>i(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>i(()=>import(`./regexp-BG8FlKR9.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>i(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>i(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>i(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>i(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>i(()=>import(`./rst-C90_EUa_.js`),[]))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>i(()=>import(`./ruby-BlGyFGAQ.js`),[]))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>i(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>i(()=>import(`./sas-Dq8EnVfj.js`),[]))},{id:`sass`,name:`Sass`,import:(()=>i(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>i(()=>import(`./scala-DKOlJaKm.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>i(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>i(()=>import(`./scss-CMpBj9xp.js`).then(e=>e.n),[]))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>i(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>i(()=>import(`./shaderlab-TOUzSsQk.js`),[]))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>i(()=>import(`./shellscript-C5MCrJaB.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>i(()=>import(`./shellsession-26dOf2m0.js`),[]))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>i(()=>import(`./smalltalk-B16xEiuN.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>i(()=>import(`./solidity-CKzVLygQ.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>i(()=>import(`./soy-Bf3k5CrX.js`),[]))},{id:`sparql`,name:`SPARQL`,import:(()=>i(()=>import(`./sparql-D_iOobhT.js`),[]))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>i(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>i(()=>import(`./sql-DcFiju6z.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>i(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>i(()=>import(`./stata-DYvaCWJV.js`),[]))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>i(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>i(()=>import(`./surrealql-CaZedS14.js`),[]))},{id:`svelte`,name:`Svelte`,import:(()=>i(()=>import(`./svelte-k_k4XYnr.js`),[]))},{id:`swift`,name:`Swift`,import:(()=>i(()=>import(`./swift-DonLKvLd.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>i(()=>import(`./system-verilog-DJ5XKQeo.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>i(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>i(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>i(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>i(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>i(()=>import(`./templ-CxD_nC0J.js`),[]))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>i(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>i(()=>import(`./tex-CLeF3jRN.js`),[]))},{id:`toml`,name:`TOML`,import:(()=>i(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>i(()=>import(`./ts-tags-BriKwQve.js`),[]))},{id:`tsv`,name:`TSV`,import:(()=>i(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>i(()=>import(`./tsx-CltjRl2u.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>i(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>i(()=>import(`./twig-BmgBVapk.js`),[]))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>i(()=>import(`./typescript-BwOcYJx4.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>i(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>i(()=>import(`./typst-DI99ib-x.js`),[]))},{id:`v`,name:`V`,import:(()=>i(()=>import(`./v-DETTlOr0.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>i(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>i(()=>import(`./vb-Djn5o6TS.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>i(()=>import(`./verilog-CiiDBU1e.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>i(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>i(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>i(()=>import(`./vue-DStD_OmO.js`),[]))},{id:`vue-html`,name:`Vue HTML`,import:(()=>i(()=>import(`./vue-html-BrRsRUlP.js`),[]))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>i(()=>import(`./vue-vine-CxnolnwP.js`),[]))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>i(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>i(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>i(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>i(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>i(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>i(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>i(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>i(()=>import(`./xml-DUCOjSp4.js`).then(e=>e.n),[]))},{id:`xsl`,name:`XSL`,import:(()=>i(()=>import(`./xsl-BY-Cn9M_.js`),[]))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>i(()=>import(`./yaml-BONObsYN.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>i(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>i(()=>import(`./zig-CMLA9XwU.js`),[]))}],Xr=Object.fromEntries(Yr.map(e=>[e.id,e.import])),Zr=Object.fromEntries(Yr.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Qr={...Xr,...Zr},$r=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>i(()=>import(`./andromeeda-WkhI09AS.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>i(()=>import(`./aurora-x-C7CFqhAd.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>i(()=>import(`./ayu-dark-CRu61w6_.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>i(()=>import(`./ayu-light-Dn6O_aYR.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>i(()=>import(`./ayu-mirage-CTjYAbs-.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>i(()=>import(`./catppuccin-frappe-3VR1Za6u.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>i(()=>import(`./catppuccin-latte-DwIHMF0Q.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>i(()=>import(`./catppuccin-macchiato-DYnBP6_5.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>i(()=>import(`./catppuccin-mocha-DYhrFGRu.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>i(()=>import(`./dark-plus-GAt2ZgX8.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>i(()=>import(`./dracula-C2uKkzgK.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>i(()=>import(`./dracula-soft-D1bVjxWZ.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>i(()=>import(`./everforest-dark-D-DlICQR.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>i(()=>import(`./everforest-light-CeVdGHYG.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>i(()=>import(`./github-dark-DwbbXv51.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>i(()=>import(`./github-dark-default-CxjRwzl6.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>i(()=>import(`./github-dark-dimmed-Cr1oaoul.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>i(()=>import(`./github-dark-high-contrast-B4qJZLZa.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>i(()=>import(`./github-light-CsVXhIlR.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>i(()=>import(`./github-light-default-DB_IwZa6.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>i(()=>import(`./github-light-high-contrast-DLgVeSB-.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>i(()=>import(`./gruvbox-dark-hard-DXm60lX3.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>i(()=>import(`./gruvbox-dark-medium-GE2thSmD.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>i(()=>import(`./gruvbox-dark-soft-04Cj-4VZ.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>i(()=>import(`./gruvbox-light-hard-K6wSn29D.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>i(()=>import(`./gruvbox-light-medium-CVy3aSlc.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>i(()=>import(`./gruvbox-light-soft-DNgJjaY0.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>i(()=>import(`./horizon-0-RkHfro.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>i(()=>import(`./horizon-bright-BgL2X9oq.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>i(()=>import(`./houston-KyjWKfuY.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>i(()=>import(`./kanagawa-dragon-CXtmUGW6.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>i(()=>import(`./kanagawa-lotus-BN08jTvb.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>i(()=>import(`./kanagawa-wave-CTweb8Dz.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>i(()=>import(`./laserwave-CQkdhozh.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>i(()=>import(`./light-plus-CNQ8_7Y0.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>i(()=>import(`./material-theme-CAtLaHa3.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>i(()=>import(`./material-theme-darker-k-s5Bc6K.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>i(()=>import(`./material-theme-lighter-CD6a-c4d.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>i(()=>import(`./material-theme-ocean-B3mraInd.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>i(()=>import(`./material-theme-palenight-DEhAARHw.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>i(()=>import(`./min-dark-BFqTAwCr.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>i(()=>import(`./min-light-O7UdaaxX.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>i(()=>import(`./monokai-CdkpiU2Y.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>i(()=>import(`./night-owl-BsnCLAKc.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>i(()=>import(`./night-owl-light-BODRhcTU.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>i(()=>import(`./nord-Cd-F4txO.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>i(()=>import(`./one-dark-pro-DUS_IGRK.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>i(()=>import(`./one-light-CVUd7yD5.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>i(()=>import(`./plastic-CF8VZTnn.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>i(()=>import(`./poimandres-BX2TyY6j.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>i(()=>import(`./red-CJ3rzSJv.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>i(()=>import(`./rose-pine-BthvhNj6.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>i(()=>import(`./rose-pine-dawn-Dg85fqjY.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>i(()=>import(`./rose-pine-moon-hon4tzzS.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>i(()=>import(`./slack-dark-DYvUXyrP.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>i(()=>import(`./slack-ochin-bqtMVDfH.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>i(()=>import(`./snazzy-light-D8dzFmq5.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>i(()=>import(`./solarized-dark-DV17i1UV.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>i(()=>import(`./solarized-light-DSh2HLQt.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>i(()=>import(`./synthwave-84-CIknw8y7.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>i(()=>import(`./tokyo-night-iIspnLcq.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>i(()=>import(`./vesper-BIFK_oDq.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>i(()=>import(`./vitesse-black-D082JcaE.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>i(()=>import(`./vitesse-dark-z-nr_5O8.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>i(()=>import(`./vitesse-light-ojz42ZLy.js`),[]))}].map(e=>[e.id,e.import])),ei=n({createOnigurumaEngine:()=>Ei,getDefaultWasmLoader:()=>Ti,loadWasm:()=>yi,setDefaultWasmLoader:()=>wi}),ti=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ni(){return 2147483648}function ri(){return typeof performance<`u`?performance.now():Date.now()}var ii=(e,t)=>e+(t-e%t)%t;async function ai(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=ni();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,ii(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:ri,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var oi=Object.defineProperty,si=(e,t,n)=>t in e?oi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M=(e,t,n)=>si(e,typeof t==`symbol`?t:t+``,n),N=null;function ci(e){throw new ti(e.UTF8ToString(e.getLastOnigError()))}var li=class e{constructor(t){M(this,`utf16Length`),M(this,`utf8Length`),M(this,`utf16Value`),M(this,`utf8Value`),M(this,`utf16OffsetToUtf8`),M(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},ui=class e{constructor(t){if(M(this,`id`,++e.LAST_ID),M(this,`_onigBinding`),M(this,`content`),M(this,`utf16Length`),M(this,`utf8Length`),M(this,`utf16OffsetToUtf8`),M(this,`utf8OffsetToUtf16`),M(this,`ptr`),!N)throw new ti(`Must invoke loadWasm first.`);this._onigBinding=N,this.content=t;let n=new li(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=N.omalloc(1e4),e._sharedPtrInUse=!0,N.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(N)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};M(ui,`LAST_ID`,0),M(ui,`_sharedPtr`,0),M(ui,`_sharedPtrInUse`,!1);var di=ui,fi=class{constructor(e){if(M(this,`_onigBinding`),M(this,`_ptr`),!N)throw new ti(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new li(e[r]);t[r]=i.createString(N),n[r]=i.utf8Length}let r=N.omalloc(4*e.length);N.HEAPU32.set(t,r/4);let i=N.omalloc(4*e.length);N.HEAPU32.set(n,i/4);let a=N.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)N.ofree(t[n]);N.ofree(i),N.ofree(r),a===0&&ci(N),this._onigBinding=N,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new di(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function pi(e){return typeof e.instantiator==`function`}function mi(e){return typeof e.default==`function`}function hi(e){return e.data!==void 0}function gi(e){return typeof Response<`u`&&e instanceof Response}function _i(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var vi;function yi(e){if(vi)return vi;async function t(){N=await ai(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),pi(n)?n=await n.instantiator(t):mi(n)?n=await n.default(t):(hi(n)&&(n=n.data),gi(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await xi(n)(t):await Si(n)(t):_i(n)||n instanceof WebAssembly.Module?n=await bi(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await bi(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return vi=t(),vi}function bi(e){return t=>WebAssembly.instantiate(e,t)}function xi(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Si(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Ci;function wi(e){Ci=e}function Ti(){return Ci}async function Ei(e){return e&&await yi(e),{createScanner(e){return new fi(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new di(e)}}}var Di=Kr({});Jr(Di,ei);var P=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Oi(e){return ki(e)}function ki(e){return Array.isArray(e)?Ai(e):e instanceof RegExp?e:typeof e==`object`?ji(e):e}function Ai(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=ki(e[n]);return t}function ji(e){let t={};for(let n in e)t[n]=ki(e[n]);return t}function Mi(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Ni(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Ni(e.substring(0,e.length-1)):e.substr(~t+1)}var Pi=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Fi=class{static hasCaptures(e){return e!==null&&(Pi.lastIndex=0,Pi.test(e))}static replaceCaptures(e,t,n){return e.replace(Pi,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Ii(e,t){return e<t?-1:+(e>t)}function Li(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Ii(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Ri(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function zi(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Bi=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Vi=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Ki(e),t)}static createFromParsedTheme(e,t){return Ji(e,t)}_cachedMatchRoot=new Bi(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Ui(e.parent,t.parentScopes));return n?new Gi(n.fontStyle,n.foreground,n.background):null}},Hi=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e||this.parent!==null&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Ui(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Wi(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Wi(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Gi=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Ki(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8}}let s=null;typeof i.settings.foreground==`string`&&Ri(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Ri(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new qi(l,u,e,o,s,c)}}return n}var qi=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},F=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(F||{});function Ji(e,t){e.sort((e,t)=>{let n=Ii(e.scope,t.scope);return n!==0||(n=Li(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Yi(t),o=new Gi(n,a.getId(r),a.getId(i)),s=new Qi(new Zi(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Vi(a,o,s)}var Yi=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Xi=Object.freeze([]),Zi=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Xi,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Qi=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Zi.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Li(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Zi(e,t,n,r,i))}},$i=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return!!(e&1024)}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=ta(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function ea(e){return e}function ta(e){return e}function na(e,t){let n=[],r=ia(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(ra(i)){let e=[];do e.push(i),i=r.next();while(ra(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function ra(e){return!!e&&!!e.match(/[\w\.:]+/)}function ia(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function aa(e){typeof e.dispose==`function`&&e.dispose()}var oa=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},sa=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},ca=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},la=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new oa(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new ca;for(let n of e)ua(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof oa){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function ua(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof oa?fa({baseGrammar:a,selfGrammar:i},r):da(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new oa(e))}function da(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];pa([r],t,n)}}function fa(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&pa(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&pa(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function pa(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Mi({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&pa(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=ya(i);switch(a.kind){case 0:fa({...t,selfGrammar:t.baseGrammar},n);break;case 1:fa(t,n);break;case 2:da(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?da(a.ruleName,i,n):fa(i,n)}else a.kind===4?n.add(new sa(a.scopeName,a.ruleName)):n.add(new oa(a.scopeName))}}}var ma=class{kind=0},ha=class{kind=1},ga=class{constructor(e){this.ruleName=e}kind=2},_a=class{constructor(e){this.scopeName=e}kind=3},va=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function ya(e){if(e===`$base`)return new ma;if(e===`$self`)return new ha;let t=e.indexOf(`#`);return t===-1?new _a(e):t===0?new ga(e.substring(1)):new va(e.substring(0,t),e.substring(t+1))}var ba=/\\(\d+)/,xa=/\\(\d+)/g,Sa=-1,Ca=-2;function wa(e){return e}function Ta(e){return e}var Ea=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Fi.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Fi.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Ni(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Fi.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Fi.replaceCaptures(this._contentName,e,t)}},Da=class extends Ea{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},Oa=class extends Ea{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Na(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Pa,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ka=class extends Ea{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Pa,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Aa=class extends Ea{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Na(i,this.id),this.beginCaptures=a,this._end=new Na(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Pa;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ja=class extends Ea{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Na(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Na(o,Ca),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Pa;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Pa,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},Ma=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new Da(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new Oa(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Mi({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new ka(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new ja(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Aa(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=ya(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l){if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof ka||e instanceof Aa||e instanceof ja)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Na=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&ba.test(this.source)}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return xa.lastIndex=0,this.source.replace(xa,(e,t)=>zi(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.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}},Pa=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(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Fa(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Fa(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Fa=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
22
- `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Ia=class{constructor(e,t){this.languageId=e,this.tokenType=t}},La=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Ia(e,8),this._embeddedLanguagesMatcher=new Ra(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Ia(0,0);_getBasicScopeAttributes=new Bi(e=>new Ia(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ra=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>zi(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var za=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Ba(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Va(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new za(i,!0);f()}return new za(i,!1);function f(){let o=Ha(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===Sa){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),qa(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Aa){let r=o;qa(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof ja){let r=o;qa(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(qa(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Va(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof ja&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Ka(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Ca){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),qa(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Ha(e,t,n,r,i,a){let o=Ua(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Wa(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Ua(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Ga(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Wa(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Ga(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Ga(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Ka(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function qa(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Ba(e,p,n&&d.start===0,d.start,f,i,!1,0),aa(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Ja(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Ja=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Ya(e,t,n,r,i,a,o,s){return new $a(e,t,n,r,i,a,o,s)}function Xa(e,t,n,r,i){let a=na(t,Za),o=Ma.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Za(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(Qa(t[r],e))return n=r+1,!0;return!1})}function Qa(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var $a=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new La(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=eo(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=na(e,Za);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Xa(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Xa(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(wa(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[Ta(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=eo(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=Ma.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===no.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=$i.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?to.createRootAndLookUpScopeName(a,r,this):to.createRoot(`unknown`,r),t=new no(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
23
- `;let a=this.createOnigString(e),o=a.content.length,s=new io(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Ba(this,a,i,0,t,s,!0,r);return aa(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function eo(e,t){return e=Oi(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var to=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Hi.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Hi(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Hi(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}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,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),$i.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},no=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t!==null&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?to.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(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:Ta(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=to.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,wa(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,to.fromExtension(r,n.contentNameScopesList))}},ro=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):na(e,Za).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>na(e,Za).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},io=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=$i.set(n,0,ea(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=$i.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},ao=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Ya(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},oo=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new ao(Vi.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Vi.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new ro(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new la(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},so=no.NULL;function co(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function I(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function lo(e){return Array.isArray(e)?e:[e]}async function uo(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function fo(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function po(e){return e===`ansi`||fo(e)}function mo(e){return e===`none`}function ho(e){return mo(e)}var go=/(\r?\n)/g;function _o(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(go),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var vo={light:`#333333`,dark:`#bbbbbb`},yo={light:`#fffffe`,dark:`#1e1e1e`},bo=`__shiki_resolved`;function xo(e){if(e?.[bo])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?vo.light:vo.dark,n||=t.type===`light`?yo.light:yo.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,bo,{enumerable:!1,writable:!1,value:!0}),t}async function So(e){return[...new Set((await Promise.all(e.filter(e=>!po(e)).map(async e=>await uo(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Co(e){return(await Promise.all(e.map(async e=>ho(e)?null:xo(await uo(e))))).filter(e=>!!e)}function wo(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new P(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var To=class extends oo{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=xo(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Vi.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=wo(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new P(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return 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);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Eo=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Do=0;function Oo(e){Do+=1,e.warnings!==!1&&Do>=10&&Do%10==0&&console.warn(`[Shiki] ${Do} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new P("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(xo),i=new To(new Eo(e.engine,n),r,n,e.langAlias),a;function o(t){return wo(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new P(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new P(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await So(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Co(e))}function g(){if(t)throw new P(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Do)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function ko(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Co(e.themes||[]),So(e.langs||[]),e.engine]);return Oo({...e,themes:t,langs:n,engine:r})}var Ao=new WeakMap;function jo(e,t){Ao.set(e,t)}function Mo(e){return Ao.get(e)}var No=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(lo(n).map(e=>[e,so])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Po(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Po(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function Fo(e,t){if(!(e instanceof No))throw new P(`Invalid grammar state`);return e.getInternalStack(t)}var Io=/,/,Lo=/ /;function Ro(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(fo(e.resolveLangAlias(n.lang||`text`))||mo(r))return _o(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new P(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new P(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Bo(t,o,i,a,n)}function zo(...e){if(e.length===2)return Mo(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(fo(i)||mo(a))throw new P(`Plain language does not have grammar state`);if(i===`ansi`)throw new P(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new No(Vo(n,c,o,s,r).stateStack,c.name,o.name)}function Bo(e,t,n,r,i){let a=Vo(e,t,n,r,i),o=new No(a.stateStack,t.name,n.name);return jo(a.tokens,o),a.tokens}function Vo(e,t,n,r,i){let a=co(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=_o(e),l=i.grammarState?Fo(i.grammarState,n.name)??so:i.grammarContextCode==null?so:Vo(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=I(r[$i.getForeground(s)],a),l=$i.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(Io).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Lo))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Ho(t.scopes):Uo(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Ho(e){return e.map(e=>({scopeName:e}))}function Uo(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Ko(e,i,t.slice(0,r))}}return n}function Wo(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Go(e,t,n){if(!Wo(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Wo(e[r],n[i])&&--r,--i;return r===-1}function Ko(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Go(e,t,n)){r.push(a);break}return r}function qo(e,t,n,r=Ro){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:Mo(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=Jo(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new No(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&jo(s,c),s}function Jo(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var Yo=/\s+/g;function Xo(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(Yo)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(Yo);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var Zo=/:?lang=["']([^"']+)["']/g,Qo=/(?:```|~~~)([\w-]+)/g,$o=/\\begin\{([\w-]+)\}/g,es=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function ts(e){let t=_o(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-1).length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function ns(e,t,n){let r=new Set;for(let t of e.matchAll(Zo)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(Qo)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll($o)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(es)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var rs=[`color`,`background-color`];function is(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function as(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?is(e,t):e})):e}function os(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>ss(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&rs.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s}else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function ss(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&F.Italic&&(t[`font-style`]=`italic`),e.fontStyle&F.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&F.Underline&&n.push(`underline`),e.fontStyle&F.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function cs(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function ls(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=ts(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new P(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new P(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new P(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));us(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return as(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new P(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=ds(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new P(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new P(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&Xo(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function us(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new P(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new P(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function ds(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(ds).join(``):``}var fs=[ls()];function ps(e){let t=ms(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...fs]}function ms(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var hs=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],gs={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function _s(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function vs(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function ys(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r)){if(r===0)t.push({type:`resetAll`});else if(r<=9)gs[r]&&t.push({type:`setDecoration`,value:gs[r]});else if(r<=29){let e=gs[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:hs[r-30]}});else if(r===38){let n=vs(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:hs[r-40]}});else if(r===48){let n=vs(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:hs[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:hs[r-100+8]}})}}return t}function bs(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=_s(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=ys(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var xs={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 Ss(e=xs){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<hs.length;e++)r.push(t(hs[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Cs=/#([0-9a-f]{3,8})/i,ws=/var\((--[\w-]+-ansi-[\w-]+)\)/,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 Es(e,t,n){let r=co(e,n),i=_o(t),a=Ss(Object.fromEntries(hs.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Ts[t]]}))),o=bs();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=I(i,r),o=I(o,r),n.decorations.has(`dim`)&&(i=Ds(i));let s=F.None;return n.decorations.has(`bold`)&&(s|=F.Bold),n.decorations.has(`italic`)&&(s|=F.Italic),n.decorations.has(`underline`)&&(s|=F.Underline),n.decorations.has(`strikethrough`)&&(s|=F.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Ds(e){let t=e.match(Cs);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}if(e.length===6)return`#${e}80`;if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(ws);return n?`var(${n[1]}-dim)`:e}function Os(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!fo(r)&&!mo(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return Es(r,t,n)}return Ro(e,t,n)}function ks(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new P("`themes` option must not be empty");let p=qo(e,t,n,Os);if(c=Mo(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new P(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>os(e,h,u,l,d))),c&&jo(a,c);let g=f.map(e=>co(e.theme,n));i=As(f,m,g,u,l,`fg`,d),r=As(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=co(n.theme,n);a=Os(e,t,n);let l=e.getTheme(n.theme);r=I(l.bg,s),i=I(l.fg,s),o=l.name,c=Mo(a)}else throw new P("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function As(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=I(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new P('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${I(t[r][a],n[r])||`inherit`}, ${I(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var js=/^\s+$/,Ms=/^(\s*)(.*?)(\s*)$/;function Ns(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Ns(e,t,n),codeToTokens:(t,n)=>ks(e,t,n)}){let i=t;for(let e of ps(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=ks(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Fs(a):d===`never`&&(a=Is(a)),f&&(a=Ls(a));let p={...r,get source(){return i}};for(let e of ps(n))a=e.tokens?.call(p,a)||a;return Ps(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function Ps(e,t,n,r=Mo(e)){let i=ps(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`:t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:Xo,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
24
- `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=cs(a.htmlStyle||ss(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&jo(m,r),m}function Fs(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&F.Underline||i.fontStyle&F.Strikethrough));o&&js.test(i.content)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Is(e){return e.map(e=>e.flatMap(e=>{if(js.test(e.content))return e;let t=e.content.match(Ms);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Ls(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=cs(e.htmlStyle||ss(e)),i=cs(n.htmlStyle||ss(n)),a=e.fontStyle&&(e.fontStyle&F.Underline||e.fontStyle&F.Strikethrough),o=n.fontStyle&&(n.fontStyle&F.Underline||n.fontStyle&F.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Rs=Nr;function zs(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Ns(e,t,n),codeToTokens:(t,n)=>ks(e,t,n)},i=Rs(Ns(e,t,n,r));for(let e of ps(n))i=e.postprocess?.call(r,i,n)||i;return i}async function Bs(e){let t=await ko(e);return{getLastGrammarState:(...e)=>zo(t,...e),codeToTokensBase:(e,n)=>Os(t,e,n),codeToTokensWithThemes:(e,n)=>qo(t,e,n),codeToTokens:(e,n)=>ks(t,e,n),codeToHast:(e,n)=>Ns(t,e,n),codeToHtml:(e,n)=>zs(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Vs(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,po(n))return[];let r=t[n];if(!r)throw new P(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(ho(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new P(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await Bs({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function Hs(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function Us(e,t){let n=Hs(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var Ws=Vs({langs:Qr,themes:$r,engine:()=>(0,Di.createOnigurumaEngine)(i(()=>import(`./wasm-BnjxR4X6.js`),[]))}),{codeToHtml:Gs,codeToHast:Ks,codeToTokens:qs,codeToTokensBase:Js,codeToTokensWithThemes:Ys,getSingletonHighlighter:Xs,getLastGrammarState:Zs}=Us(Ws,{guessEmbeddedLanguages:ns}),Qs=4294967295,$s=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:Qs,end:Qs,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function ec(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function tc(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var nc=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),L=String.raw;function rc(e,t){if(e==null)throw Error(t??`Value expected`);return e}var ic=L`\[\^?`,ac=`c.? | C(?:-.?)?|${L`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${L`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${L`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${L`o\{[^\}]*\}?`}|${L`\d{1,3}`}`,oc=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,sc=new RegExp(L`
25
- \\ (?:
26
- ${ac}
27
- | [gk]<[^>]*>?
28
- | [gk]'[^']*'?
29
- | .
30
- )
31
- | \( (?:
32
- \? (?:
33
- [:=!>({]
34
- | <[=!]
35
- | <[^>]*>
36
- | '[^']*'
37
- | ~\|?
38
- | #(?:[^)\\]|\\.?)*
39
- | [^:)]*[:)]
40
- )?
41
- | \*[^\)]*\)?
42
- )?
43
- | (?:${oc.source})+
44
- | ${ic}
45
- | .
46
- `.replace(/\s+/g,``),`gsu`),cc=new RegExp(L`
47
- \\ (?:
48
- ${ac}
49
- | .
50
- )
51
- | \[:(?:\^?\p{Alpha}+|\^):\]
52
- | ${ic}
53
- | &&
54
- | .
55
- `.replace(/\s+/g,``),`gsu`);function lc(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=Rc(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(sc.lastIndex=0;s=sc.exec(e);){let t=uc(a,e,s[0],sc.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(sc.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?Bc(e,u):e).flat(),flags:r}}function uc(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=dc(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:hc(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Oc(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:gc(n)}}if(a===`K`)return{token:Sc(`keep`,n)};if(a===`N`||a===`R`)return{token:xc(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:xc(`any`,n)};if(a===`X`)return{token:xc(`text_segment`,n)};let e=pc(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:Nc(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Mc(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:Tc(`group`,n)};if(n===`(?>`)return{token:Tc(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:Tc(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:Tc(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:Tc(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:wc(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
56
- `,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:xc(`dot`,n)}:n===`^`||n===`$`?{token:hc(e.singleline?{"^":L`\A`,$:L`\Z`}[n]:n,n)}:n===`|`?{token:mc(n)}:oc.test(n)?{tokens:Vc(n)}:{token:R(ec(n),n)}}function dc(e,t,n){let r=[bc(t[1]===`^`,t)],i=1,a;for(cc.lastIndex=n;a=cc.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(bc(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(R(93,e));else if(i--,r.push(_c(e)),!i)break}else{let t=fc(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:cc.lastIndex||e.length}}function fc(e){if(e[0]===`\\`)return pc(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!nc.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return xc(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?vc(e):e===`&&`?yc(e):R(ec(e),e)}function pc(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return jc(e);if(`dDhHsSwW`.includes(n))return Fc(e);if(e.startsWith(L`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw Error(`Incomplete or invalid Unicode property "${e}"`);return Ic(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return R(ec(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return R(zc(e),e);if(Ac.has(n))return R(Ac.get(n),e);if(/\d/.test(n))return Cc(t,e);if(e===`\\`)throw Error(L`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return R(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function mc(e){return{type:`Alternator`,raw:e}}function hc(e,t){return{type:`Assertion`,kind:e,raw:t}}function gc(e){return{type:`Backreference`,raw:e}}function R(e,t){return{type:`Character`,value:e,raw:t}}function _c(e){return{type:`CharacterClassClose`,raw:e}}function vc(e){return{type:`CharacterClassHyphen`,raw:e}}function yc(e){return{type:`CharacterClassIntersector`,raw:e}}function bc(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function xc(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function Sc(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:rc(n.flags),raw:t}}function Cc(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function wc(e){return{type:`GroupClose`,raw:e}}function Tc(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function Ec(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function Dc(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function Oc(e){return{type:`Subroutine`,raw:e}}var kc=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),Ac=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function jc(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return R(ec(t.toUpperCase())-64,e)}function Mc(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=Lc(n),o=Lc(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),Sc(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,Tc(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function Nc(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=kc.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(typeof s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return Ec(l,r??null,i?.split(`,`)??null,e)}function Pc(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return Dc(t,n,r,e)}function Fc(e){let t=e[1].toLowerCase();return xc({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function Ic(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return xc(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function Lc(e){let t={};return e.includes(`i`)&&(t.ignoreCase=!0),e.includes(`m`)&&(t.dotAll=!0),e.includes(`x`)&&(t.extended=!0),Object.keys(t).length?t:null}function Rc(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function zc(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);let t=e[2]===`{`?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function Bc(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[gc(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(L`Octal encoded byte above 177 unsupported "${n}"`)}else r=ec(t);a.push(R(r,(e===0?`\\`:``)+t))}return a}function Vc(e){let t=[],n=new RegExp(oc,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(Pc(e.slice(0,-1)));continue}}}t.push(Pc(e))}return t}function Hc(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function Uc(e){return Wc.has(e.type)}var Wc=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function Gc(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=lc(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return tl();case`Assertion`:return Kc(n);case`Backreference`:return qc(n,a);case`Character`:return al(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return Jc(n,a,t);case`CharacterClassOpen`:return Yc(n,a,t);case`CharacterSet`:return Xc(n,a);case`Directive`:return ll(n.kind,{flags:n.flags});case`GroupOpen`:return Zc(n,a,t);case`NamedCallout`:return fl(n.kind,n.tag,n.arguments);case`Quantifier`:return Qc(n,a);case`Subroutine`:return $c(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=hl(ul(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(L`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(L`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function Kc({kind:e}){return nl(rc({"^":`line_start`,$:`line_end`,"\\A":`string_start`,"\\b":`word_boundary`,"\\B":`word_boundary`,"\\G":`search_start`,"\\y":`text_segment_boundary`,"\\Y":`text_segment_boundary`,"\\z":`string_end`,"\\Z":`string_end_newline`}[e],`Unexpected assertion kind "${e}"`),{negate:e===L`\B`||e===L`\Y`})}function qc({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i){if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`)}return t.hasNumberedRef=!0,rl(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return rl(r)}return i(+r)}function Jc(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),sl(o,e);throw Error(`Invalid character class range`)}return al(ec(`-`))}function Yc({negate:e},t,n){let{tokens:r,walk:i}=t,a=[ol()],o=r[t.nextIndex],s=El(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(ol()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=El(r[t.nextIndex],o)}let c=ol({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function Xc({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=Tl(n);if(nc.has(r)&&!o?.has(r))e=`posix`,n=r;else return _l(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?pl(n,{negate:t}):cl(e,{negate:t})}function Zc(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=vl(e),l=c.type===`AbsenceFunction`,u=Sl(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&tc(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=Dl(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(tl()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(xl(t)||t.type===`CapturingGroup`)throw Error(e)}else if(xl(t)||Sl(t)&&t.negate)throw Error(e)}}f=Dl(r[t.nextIndex])}return t.nextIndex++,c}function Qc({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!Uc(a))throw Error(`Quantifier requires a repeatable token`);let o=ml(e,t,n,a);return i.body.pop(),o}function $c({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=gl(i);return r.push(o),o}function el(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:yl(t?.body)}}function tl(e){return{type:`Alternative`,body:bl(e?.body)}}function nl(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function rl(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function il(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Cl(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:yl(t?.body)}}function al(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function ol(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:bl(e?.body)}}function sl(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function cl(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function ll(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:rc(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function ul(e){return{type:`Flags`,...e}}function z(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:yl(e?.body)}}function dl(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:yl(e?.body)}}function fl(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function pl(e,t){let n=!!t?.negate;if(!nc.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function ml(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function hl(e,t){return{type:`Regex`,body:yl(t?.body),flags:e}}function gl(e){return{type:`Subroutine`,ref:e}}function _l(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(Tl(e));if(!r){if(n.normalizeUnknownPropertyNames)r=wl(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(L`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function vl({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return el(`repeater`);case`atomic`:return z({atomic:!0});case`capturing`:return il(i,{name:n});case`group`:return z({flags:e});case`lookahead`:case`lookbehind`:return dl({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function yl(e){if(e===void 0)e=[tl()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function bl(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function xl(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function Sl(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function Cl(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function wl(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function Tl(e){return e.replace(/[- _]+/g,``).toLowerCase()}function El(e,t){let n=t;return rc(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function Dl(e){return rc(e,`Unclosed group`)}function Ol(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){kl(c).splice(Math.max(0,Al(s)+l),1),l--,u=!0},removeAllNextSiblings(){return kl(c).splice(Al(s)+1)},removeAllPrevSiblings(){let e=Al(s)+l;return l-=e,kl(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,Al(s)+l)]=e:rc(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(kl(c).splice(Math.max(0,Al(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,Al(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function kl(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function Al(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var jl=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Ml(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Nl(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var B=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function Pl(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===B.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?B.CHAR_CLASS:B.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function Fl(e,t,n,r){Pl(e,t,n,r)}function Il(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===B.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function Ll(e,t,n){return!!Il(e,t,0,n)}function Rl(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var zl=new RegExp(String.raw`(?<noncapturingStart>${jl})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function Bl(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(zl.lastIndex=Number.isNaN(c)?0:c+7;f=zl.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),Ml(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=Pl(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},B.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var Vl=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Hl=new RegExp(String.raw`
57
- \\(?: \d+
58
- | c[A-Za-z]
59
- | [gk]<[^>]+>
60
- | [pPu]\{[^\}]+\}
61
- | u[A-Fa-f\d]{4}
62
- | x[A-Fa-f\d]{2}
63
- )
64
- | \((?: \? (?: [:=!>]
65
- | <(?:[=!]|[^>]+>)
66
- | [A-Za-z\-]+:
67
- | \(DEFINE\)
68
- ))?
69
- | (?<qBase>${Vl})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
70
- | \\?.
71
- `.replace(/\s+/g,``),`gsu`);function Ul(e){if(!RegExp(`${Vl}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(Hl.lastIndex=0;o=Hl.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a){if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=Nl(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}Hl.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null)}i=s}return{pattern:e}}var V=String.raw,Wl=V`\(\?R=(?<rDepth>[^\)]+)\)|${V`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,Gl=V`\(\?<(?![=!])(?<captureName>[^>]+)>`,Kl=V`${Gl}|(?<unnamed>\()(?!\?)`,ql=new RegExp(V`${Gl}|${Wl}|\(\?|\\?.`,`gsu`),Jl=`Cannot use multiple overlapping recursions`;function Yl(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(Wl,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&Ll(e,V`\(\?\(DEFINE\)`,B.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=Ll(e,V`\\[1-9]`,B.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(ql.lastIndex=0;f=ql.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else{if(m){if(Xl(m),l)throw Error(Jl);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(ql.lastIndex);if(Ll(s,Wl,B.DEFAULT))throw Error(Jl);let c=m-1;e=Zl(t,s,c,!1,n,a,d),i=eu(i,t,c,a.length,0,d);break}if(h){Xl(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(Jl);break}if(!u)throw Error(V`Recursive \g cannot be used outside the referenced group "${r===`external`?h:V`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=Rl(e,p);if(o&&Ll(m,V`${Gl}|\((?!\?)`,B.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=Zl(_,v,b,!0,n,a,d);i=eu(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,ql.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),ql.lastIndex),s.set(p,ql.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),ql.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function Xl(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function Zl(e,t,n,r,i,a,o){let s=new Set;r&&Fl(e+t,Gl,({groups:{captureName:e}})=>{s.add(e)},B.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${Ql(`(?:${e}`,`forward`,...c)}(?:)${Ql(`${t})`,`backward`,...c)}${t}`}function Ql(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=Pl(e,V`${Kl}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),$l(i,n),s?e:`(?<${t}${l}>`}return V`\k<${c}${l}>`},B.DEFAULT)}return c}function $l(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function eu(e,t,n,r,i,a){if(e.size&&r){let o=0;Fl(t,Kl,()=>o++,B.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var H=String.fromCodePoint,U=String.raw,W={},tu=globalThis.RegExp;W.flagGroups=(()=>{try{new tu(`(?i:)`)}catch{return!1}return!0})(),W.unicodeSets=(()=>{try{new tu(`[[]]`,`v`)}catch{return!1}return!0})(),W.bugFlagVLiteralHyphenIsRange=W.unicodeSets?(()=>{try{new tu(U`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,W.bugNestedClassIgnoresNegation=W.unicodeSets&&new tu(`[[^a]]`,`v`).test(`a`);function nu(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function ru(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function iu(e,t){return ou[e]>=ou[t]}function au(e,t){if(e==null)throw Error(t??`Value expected`);return e}var ou={ES2025:2025,ES2024:2024,ES2018:2018},su={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function cu(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!su[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:`default`,avoidSubclass:!1,flags:``,global:!1,hasIndices:!1,lazyCompileLength:1/0,target:`auto`,verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target===`auto`&&(t.target=W.flagGroups?`ES2025`:W.unicodeSets?`ES2024`:`ES2018`),t}var lu=`[ -\r ]`,uu=new Set([H(304),H(305)]),G=U`[\p{L}\p{M}\p{N}\p{Pc}]`;function du(e){if(uu.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=hu.get(n),a=pu.get(n),o=mu.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var fu=new Map(`C Other
72
- Cc Control cntrl
73
- Cf Format
74
- Cn Unassigned
75
- Co Private_Use
76
- Cs Surrogate
77
- L Letter
78
- LC Cased_Letter
79
- Ll Lowercase_Letter
80
- Lm Modifier_Letter
81
- Lo Other_Letter
82
- Lt Titlecase_Letter
83
- Lu Uppercase_Letter
84
- M Mark Combining_Mark
85
- Mc Spacing_Mark
86
- Me Enclosing_Mark
87
- Mn Nonspacing_Mark
88
- N Number
89
- Nd Decimal_Number digit
90
- Nl Letter_Number
91
- No Other_Number
92
- P Punctuation punct
93
- Pc Connector_Punctuation
94
- Pd Dash_Punctuation
95
- Pe Close_Punctuation
96
- Pf Final_Punctuation
97
- Pi Initial_Punctuation
98
- Po Other_Punctuation
99
- Ps Open_Punctuation
100
- S Symbol
101
- Sc Currency_Symbol
102
- Sk Modifier_Symbol
103
- Sm Math_Symbol
104
- So Other_Symbol
105
- Z Separator
106
- Zl Line_Separator
107
- Zp Paragraph_Separator
108
- Zs Space_Separator
109
- ASCII
110
- ASCII_Hex_Digit AHex
111
- Alphabetic Alpha
112
- Any
113
- Assigned
114
- Bidi_Control Bidi_C
115
- Bidi_Mirrored Bidi_M
116
- Case_Ignorable CI
117
- Cased
118
- Changes_When_Casefolded CWCF
119
- Changes_When_Casemapped CWCM
120
- Changes_When_Lowercased CWL
121
- Changes_When_NFKC_Casefolded CWKCF
122
- Changes_When_Titlecased CWT
123
- Changes_When_Uppercased CWU
124
- Dash
125
- Default_Ignorable_Code_Point DI
126
- Deprecated Dep
127
- Diacritic Dia
128
- Emoji
129
- Emoji_Component EComp
130
- Emoji_Modifier EMod
131
- Emoji_Modifier_Base EBase
132
- Emoji_Presentation EPres
133
- Extended_Pictographic ExtPict
134
- Extender Ext
135
- Grapheme_Base Gr_Base
136
- Grapheme_Extend Gr_Ext
137
- Hex_Digit Hex
138
- IDS_Binary_Operator IDSB
139
- IDS_Trinary_Operator IDST
140
- ID_Continue IDC
141
- ID_Start IDS
142
- Ideographic Ideo
143
- Join_Control Join_C
144
- Logical_Order_Exception LOE
145
- Lowercase Lower
146
- Math
147
- Noncharacter_Code_Point NChar
148
- Pattern_Syntax Pat_Syn
149
- Pattern_White_Space Pat_WS
150
- Quotation_Mark QMark
151
- Radical
152
- Regional_Indicator RI
153
- Sentence_Terminal STerm
154
- Soft_Dotted SD
155
- Terminal_Punctuation Term
156
- Unified_Ideograph UIdeo
157
- Uppercase Upper
158
- Variation_Selector VS
159
- White_Space space
160
- XID_Continue XIDC
161
- XID_Start XIDS`.split(/\s/).map(e=>[Tl(e),e])),pu=new Map([[`s`,H(383)],[H(383),`s`]]),mu=new Map([[H(223),H(7838)],[H(107),H(8490)],[H(229),H(8491)],[H(969),H(8486)]]),hu=new Map([vu(453),vu(456),vu(459),vu(498),...yu(8072,8079),...yu(8088,8095),...yu(8104,8111),vu(8124),vu(8140),vu(8188)]),gu=new Map([[`alnum`,U`[\p{Alpha}\p{Nd}]`],[`alpha`,U`\p{Alpha}`],[`ascii`,U`\p{ASCII}`],[`blank`,U`[\p{Zs}\t]`],[`cntrl`,U`\p{Cc}`],[`digit`,U`\p{Nd}`],[`graph`,U`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,U`\p{Lower}`],[`print`,U`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,U`[\p{P}\p{S}]`],[`space`,U`\p{space}`],[`upper`,U`\p{Upper}`],[`word`,U`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,U`\p{AHex}`]]);function _u(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function vu(e){let t=H(e);return[t.toLowerCase(),t]}function yu(e,t){return _u(e,t).map(e=>vu(e))}var bu=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function xu(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};Tu(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:iu(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Ol(e,Su,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return Ol(e,Cu,a),Ol(e,wu,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var Su={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=z();e.body[0].body.push(dl({negate:!0,body:r}),_l(`Any`));let i=z();i.body[0].body.push(ml(`greedy`,0,1/0,e)),n(q(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];ru(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=Mu(t.get(e));if(n){let t=z({flags:n});t.body[0].body=e.body,e.body=[q(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(q(dl({body:[tl({body:[nl(`string_end`)]}),tl({body:[al(10)]})]}),t));else if(c===`line_start`)o(q(K(U`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`){if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&Ru(e))o(q(dl({negate:!0}),t));else if(d)throw Error(U`Uses "\G" in a way that requires a subclass`);else o(Hu(nl(`string_start`),t)),s.strategy=`clip_search`}}else if(c!==`string_end`&&c!==`string_start`){if(c===`string_end_newline`)o(q(K(U`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${G})(?!${G})|(?<!${G})(?=${G}))`,n=`(?:(?<=${G})(?=${G})|(?<!${G})(?!${G}))`;o(q(K(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)}},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!Bu(n)&&(n=ju(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Bu(r)&&(r=ju(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(q(ol({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(Hu(cl(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(q(Vu(K(lu),l),t));return}if(s&&(c===`word`||u===`word`)){n(Hu(cl(`word`,{negate:l}),t));return}if(c===`any`)n(Hu(_l(`Any`),t));else if(c===`digit`)n(Hu(_l(`Nd`,{negate:l}),t));else if(c!==`dot`){if(c===`text_segment`){if(r===`strict`)throw Error(U`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=U`\p{RI}{2}|${e}(?:\u200D${e})*`;n(q(K(U`(?>\r\n|${i?U`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(Hu(_l(`AHex`,{negate:l}),t));else if(c===`newline`)n(q(K(l?`[^
162
- ]`:`(?>\r
163
- ?|[
164
- \v\f…\u2028\u2029])`),t));else if(c===`posix`){if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${H(e.codePointAt(0)-1)}${H(e.codePointAt(2)+1)}-\u{10FFFF}`),n(q(K(`[${e}]`),t))}else n(q(Vu(K(gu.get(u)),l),t))}else if(c===`property`)fu.has(Tl(u))||(e.key=`sc`);else if(c===`space`)n(Hu(_l(`space`,{negate:l}),t));else if(c===`word`)n(q(Vu(K(G),l),t));else throw Error(`Unexpected character set kind "${c}"`)}},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`){if(!c.enable&&!c.disable)r();else{let e=z({flags:c});e.body[0].body=o(),i(q(e,t),{traverse:!0})}}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&Hc(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(U`Uses "\K" in a way that's unsupported`);let o=dl({behind:!0});o.body[0].body=a(),i(q(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error(`Unsupported flag "P"`);if(e.textSegmentMode===`word`)throw Error(`Unsupported flag "y{w}"`);[`digitIsAscii`,`extended`,`posixIsAscii`,`spaceIsAscii`,`wordIsAscii`,`textSegmentMode`].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(q(dl({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=z();t.body[0].body.push(e.body),e.body=q(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=Fu(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(U`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!Bu(n)&&(n=ju(n,t),e.ref=n)}},Cu={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=Hu(ku(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&ru(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=ru(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=nu(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&(n.type!==`CapturingGroup`||n.name!==a&&n.number!==a););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?ku(0):Ou(o,r.groupOriginByCopy,null),l=c;if(!s){let e=Mu(Au(o,e=>e.type===`Group`&&!!e.flags)),t=e?nu(r.globalFlags,e):r.globalFlags;Eu(t,r.currentFlags)||(l=z({flags:Nu(t)}),l.body[0].body.push(c))}n(q(l,t),{traverse:!s})}},wu={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>Du(t,e));i.length?i.length>1?n(q(z({atomic:!0,body:i.reverse().map(e=>tl({body:[rl(e.number)]}))}),t)):e.ref=i[0].number:n(q(dl({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=il();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Tu(e){Ol(e,{"*"({node:e,parent:t}){e.parent=t}})}function Eu(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Du(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=Pu(n.parent);for(let r of t){if(r===n)break;if(r===e||Iu(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function Ou(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=Ou(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function ku(e){let t=gl(e);return t.isRecursive=!0,t}function Au(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function ju(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function Mu(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Nu({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function Pu(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Fu(e){let t=e.find(e=>e.kind===`search_start`||zu(e,{negate:!1})||!Lu(e));if(!t)return null;if(t.kind===`search_start`)return t;if(t.type===`LookaroundAssertion`)return t.body[0].body[0];if(t.type===`CapturingGroup`||t.type===`Group`){let e=[];for(let n of t.body){let t=Fu(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function Iu(e,t){let n=Pu(e)??[];for(let e of n)if(e===t||Iu(e,t))return!0;return!1}function Lu({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function Ru(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function zu(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&Hc(e.body[0],{type:`Assertion`,kind:`search_start`})}function Bu(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function K(e,t){let n=Gc(e,{...t,unicodePropertyMap:fu}).body;return n.length>1||n[0].body.length>1?z({body:n}):n[0].body[0]}function Vu(e,t){return e.negate=t,e}function Hu(e,t){return e.parent=t,e}function q(e,t){return Tu(e),e.parent=t,e}function Uu(e,t){let n=cu(t),r=iu(n.target,`ES2024`),i=iu(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];Ol(e,Wu,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,au(Gu[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&ru(f._captureTransfers,e.transferTo,[]).push(t)}),f}var Wu={"*":{enter({node:e},t){if(rd(e)){let n=t.getCurrentModI();t.pushModI(e.flags?nu({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){rd(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){Zu(H(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),Qu(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&bu.has(e.value)&&t.setHasCasedChar()}},Gu={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?U`\B`:U`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!=`number`)throw Error(`Unexpected named backref in transformed AST`);if(!t.useFlagMods&&t.accuracy===`strict`&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error(`Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy`);return`\\`+e},CapturingGroup(e,t,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=H(e),r=$u(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&Zu(n)){let e=du(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);W.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(ad)&&(o=[al(45),...o.filter(e=>!ad(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||W.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=z(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=tl({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(W.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=$u(n,i),o=$u(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&ed(Qu(e)).forEach(e=>{s.add(Array.isArray(e)?`${$u(e[0],i)}-${$u(e[1],i)}`:$u(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:U`[^\n]`;if(e===`digit`)return t?U`\D`:U`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&bu.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?U`\P`:U`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?U`\W`:U`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?`i`:``)+(e.dotAll?`s`:``)+(e.sticky?`y`:``)},Group({atomic:e,body:t,flags:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=nu(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${td(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+nd(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:U`\g<${t}&R=${r}>`}},Ku=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),qu=new Set([`-`,`\\`,`]`,`^`,`[`]),Ju=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),Yu=new Map([[9,U`\t`],[10,U`\n`],[11,U`\v`],[12,U`\f`],[13,U`\r`],[8232,U`\u2028`],[8233,U`\u2029`],[65279,U`\uFEFF`]]),Xu=/^\p{Cased}$/u;function Zu(e){return Xu.test(e)}function Qu(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=H(e);if(!Zu(t))continue;let o=du(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function $u(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(Yu.has(e))return Yu.get(e);if(e<32||e>126&&e<160||e>262143||t&&id(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?Ju:qu:Ku,a=H(e);return(i.has(a)?`\\`:``)+a}function ed(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function td(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function nd({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function rd({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function id(e){return e>47&&e<58}function ad({type:e,value:t}){return e===`Character`&&t===45}var od=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=cd(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(sd(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=ld(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function sd(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function cd(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)ru(n,t,{}).transferTo=e;return n}function ld(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function ud(e,t){let n=dd(e,t);return n.options?new od(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function dd(e,t){let n=cu(t),r=xu(Gc(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:fu}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=Uu(r,n),a=Yl(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=Bl(Ul(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}function fd(e,t){return ud(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function pd(e={}){let t={target:`auto`,cache:new Map,...e};return t.regexConstructor||=e=>fd(e,{target:t.target}),{createScanner(e){return new $s(e,t)},createString(e){return{content:e}}}}async function md(e){if(Vr())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=Lr.get(e);if(t!=null)return t;try{let t=Rr.get(e);if(t==null&&Object.prototype.hasOwnProperty.call(Qr,e)&&(t=Qr[e]),t==null)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return Ir.has(e)||Ir.set(e,n),n});return Lr.set(e,n),await n}finally{Lr.delete(e)}}function hd(e){return Ir.get(e)??md(e)}var gd=new Set;function _d(e){let t=[],n=new Set;for(let r of vd(e.themes)){let e=xd(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return _d({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return _d({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function vd(e){return yd(e)?[e]:e}function yd(e){return xd(e)||bd(e)}function bd(e){return typeof e.name==`string`&&typeof e.load==`function`}function xd(e){return typeof e.getThemes==`function`}function Sd(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var Cd=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},wd=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},Td=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function Ed(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new Cd(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new wd(i));let c=r,l=s().then(e=>{let a=Sd(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new Td(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var J=Ed();function Dd(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=J.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,J.getResolvedTheme(n)??J.seedResolvedTheme(n,e);gd.has(n)||(gd.add(n),t.loadThemeSync(e))}}function Od({name:e,load:t,colorScheme:n,collection:r,displayName:i}){return{name:e,colorScheme:n,collection:r,displayName:i,load:kd(t)}}function kd(e){return async()=>xo(Sd(await e()))}var Ad=`pierre`,jd=[`pierre-dark`,`pierre-dark-soft`,`pierre-dark-vibrant`,`pierre-dark-protanopia-deuteranopia`,`pierre-dark-tritanopia`],Md=[`pierre-light`,`pierre-light-soft`,`pierre-light-vibrant`,`pierre-light-protanopia-deuteranopia`,`pierre-light-tritanopia`],Nd=[...Md,...jd],Pd=new Set(Md);function Fd(e){return Pd.has(e)?`light`:`dark`}var Id={"pierre-dark":`Pierre Dark`,"pierre-dark-soft":`Pierre Dark Soft`,"pierre-dark-vibrant":`Pierre Dark Vibrant`,"pierre-dark-protanopia-deuteranopia":`Pierre Dark Protanopia & Deuteranopia`,"pierre-dark-tritanopia":`Pierre Dark Tritanopia`,"pierre-light":`Pierre Light`,"pierre-light-soft":`Pierre Light Soft`,"pierre-light-vibrant":`Pierre Light Vibrant`,"pierre-light-protanopia-deuteranopia":`Pierre Light Protanopia & Deuteranopia`,"pierre-light-tritanopia":`Pierre Light Tritanopia`},Ld={"pierre-dark":()=>i(()=>import(`./pierre-dark-CpLgRqie.js`),[]),"pierre-dark-soft":()=>i(()=>import(`./pierre-dark-soft-kZQmAZld.js`),[]),"pierre-dark-vibrant":()=>i(()=>import(`./pierre-dark-vibrant-CpQYzh95.js`),[]),"pierre-dark-protanopia-deuteranopia":()=>i(()=>import(`./pierre-dark-protanopia-deuteranopia-B35FxJx-.js`),[]),"pierre-dark-tritanopia":()=>i(()=>import(`./pierre-dark-tritanopia-CpjhbsIL.js`),[]),"pierre-light":()=>i(()=>import(`./pierre-light-CoaEpmwp.js`),[]),"pierre-light-soft":()=>i(()=>import(`./pierre-light-soft-lWLdNTOI.js`),[]),"pierre-light-vibrant":()=>i(()=>import(`./pierre-light-vibrant-D80Fkn33.js`),[]),"pierre-light-protanopia-deuteranopia":()=>i(()=>import(`./pierre-light-protanopia-deuteranopia-0fSaH845.js`),[]),"pierre-light-tritanopia":()=>i(()=>import(`./pierre-light-tritanopia-CEbqgOJL.js`),[])};function Rd(e){return Od({name:e,collection:Ad,colorScheme:Fd(e),displayName:Id[e],load:Ld[e]})}var zd=_d({themes:Nd.map(e=>Rd(e))}),Bd=`shiki`,Vd=[`ayu-light`,`catppuccin-latte`,`everforest-light`,`github-light`,`github-light-default`,`github-light-high-contrast`,`gruvbox-light-hard`,`gruvbox-light-medium`,`gruvbox-light-soft`,`horizon-bright`,`kanagawa-lotus`,`light-plus`,`material-theme-lighter`,`min-light`,`night-owl-light`,`one-light`,`rose-pine-dawn`,`slack-ochin`,`snazzy-light`,`solarized-light`,`vitesse-light`],Hd=`andromeeda.aurora-x.ayu-dark.ayu-mirage.catppuccin-frappe.catppuccin-macchiato.catppuccin-mocha.dark-plus.dracula.dracula-soft.everforest-dark.github-dark.github-dark-default.github-dark-dimmed.github-dark-high-contrast.gruvbox-dark-hard.gruvbox-dark-medium.gruvbox-dark-soft.horizon.houston.kanagawa-dragon.kanagawa-wave.laserwave.material-theme.material-theme-darker.material-theme-ocean.material-theme-palenight.min-dark.monokai.night-owl.nord.one-dark-pro.plastic.poimandres.red.rose-pine.rose-pine-moon.slack-dark.solarized-dark.synthwave-84.tokyo-night.vesper.vitesse-black.vitesse-dark`.split(`.`),Ud=new Set(Vd);function Wd(e){return Ud.has(e)?`light`:`dark`}var Gd={andromeeda:()=>i(()=>import(`./andromeeda-vGVdxbeo.js`),[]),"aurora-x":()=>i(()=>import(`./aurora-x-CDeNXAV0.js`),[]),"ayu-dark":()=>i(()=>import(`./ayu-dark-DluEY0Gj.js`),[]),"ayu-light":()=>i(()=>import(`./ayu-light-C3h-C4tm.js`),[]),"ayu-mirage":()=>i(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]),"catppuccin-frappe":()=>i(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[]),"catppuccin-latte":()=>i(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[]),"catppuccin-macchiato":()=>i(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[]),"catppuccin-mocha":()=>i(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[]),"dark-plus":()=>i(()=>import(`./dark-plus-Cs2F2srj.js`),[]),dracula:()=>i(()=>import(`./dracula-BHWKrbxM.js`),[]),"dracula-soft":()=>i(()=>import(`./dracula-soft-5eyTD99u.js`),[]),"everforest-dark":()=>i(()=>import(`./everforest-dark-sB-x3p7T.js`),[]),"everforest-light":()=>i(()=>import(`./everforest-light-Df2xbC6M.js`),[]),"github-dark":()=>i(()=>import(`./github-dark-C-LZuMrd.js`),[]),"github-dark-default":()=>i(()=>import(`./github-dark-default-DXG-b-1a.js`),[]),"github-dark-dimmed":()=>i(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]),"github-dark-high-contrast":()=>i(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]),"github-light":()=>i(()=>import(`./github-light-EUqPIrTm.js`),[]),"github-light-default":()=>i(()=>import(`./github-light-default-BXViO-2h.js`),[]),"github-light-high-contrast":()=>i(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]),"gruvbox-dark-hard":()=>i(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]),"gruvbox-dark-medium":()=>i(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]),"gruvbox-dark-soft":()=>i(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]),"gruvbox-light-hard":()=>i(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]),"gruvbox-light-medium":()=>i(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]),"gruvbox-light-soft":()=>i(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]),horizon:()=>i(()=>import(`./horizon-CE9ld1lL.js`),[]),"horizon-bright":()=>i(()=>import(`./horizon-bright-DSNQnXHK.js`),[]),houston:()=>i(()=>import(`./houston-CsvMBhTu.js`),[]),"kanagawa-dragon":()=>i(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[]),"kanagawa-lotus":()=>i(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[]),"kanagawa-wave":()=>i(()=>import(`./kanagawa-wave-BML5mF2J.js`),[]),laserwave:()=>i(()=>import(`./laserwave-C_8bwKvT.js`),[]),"light-plus":()=>i(()=>import(`./light-plus-DVQuIRkW.js`),[]),"material-theme":()=>i(()=>import(`./material-theme-Bm3Qr25_.js`),[]),"material-theme-darker":()=>i(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]),"material-theme-lighter":()=>i(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]),"material-theme-ocean":()=>i(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]),"material-theme-palenight":()=>i(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]),"min-dark":()=>i(()=>import(`./min-dark-BSWPekZh.js`),[]),"min-light":()=>i(()=>import(`./min-light-DDpmG2fV.js`),[]),monokai:()=>i(()=>import(`./monokai-B_bV9PQ9.js`),[]),"night-owl":()=>i(()=>import(`./night-owl-DhmEMT88.js`),[]),"night-owl-light":()=>i(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]),nord:()=>i(()=>import(`./nord-Cb4Vim4T.js`),[]),"one-dark-pro":()=>i(()=>import(`./one-dark-pro-CLwyXe_n.js`),[]),"one-light":()=>i(()=>import(`./one-light-D7Lr4KcI.js`),[]),plastic:()=>i(()=>import(`./plastic-DQwYfKfQ.js`),[]),poimandres:()=>i(()=>import(`./poimandres-DRFjx7u4.js`),[]),red:()=>i(()=>import(`./red-DX1BQOs8.js`),[]),"rose-pine":()=>i(()=>import(`./rose-pine-aMsaMD1D.js`),[]),"rose-pine-dawn":()=>i(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[]),"rose-pine-moon":()=>i(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[]),"slack-dark":()=>i(()=>import(`./slack-dark-DnToyrRv.js`),[]),"slack-ochin":()=>i(()=>import(`./slack-ochin-B2OO5cIa.js`),[]),"snazzy-light":()=>i(()=>import(`./snazzy-light-4G7pJPwS.js`),[]),"solarized-dark":()=>i(()=>import(`./solarized-dark-UdsmMDCL.js`),[]),"solarized-light":()=>i(()=>import(`./solarized-light-C1IUL_tW.js`),[]),"synthwave-84":()=>i(()=>import(`./synthwave-84-nFMaYfgc.js`),[]),"tokyo-night":()=>i(()=>import(`./tokyo-night-oM2G3aXe.js`),[]),vesper:()=>i(()=>import(`./vesper-DdrHHSXu.js`),[]),"vitesse-black":()=>i(()=>import(`./vitesse-black-fwtXNY1n.js`),[]),"vitesse-dark":()=>i(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]),"vitesse-light":()=>i(()=>import(`./vitesse-light-VbXTXTou.js`),[])};function Kd(e){return Od({name:e,collection:Bd,colorScheme:Wd(e),load:Gd[e]})}var qd=_d({themes:Object.freeze([...Vd.map(e=>Kd(e)),...Hd.map(e=>Kd(e))])});function Jd(e){if(Vr())throw Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(J.hasRegisteredTheme(e))return;let t=qd.getTheme(e);if(t!=null){J.registerThemeIfAbsent(t.name,t.load);return}throw Error(`No valid theme loader registered for "${e}"`)}function Yd(e,t){if(t.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function Xd(e){Jd(e);let t=await J.resolveTheme(e);return Yd(e,t),t}function Zd(e){return J.getResolvedTheme(e)??Xd(e)}var Y;async function Qd({themes:e,langs:t,preferredHighlighter:n=`shiki-js`}){Y??=Ws({themes:[],langs:[`text`],engine:n===`shiki-wasm`?Ei(i(()=>import(`./wasm-BnjxR4X6.js`),[])):pd()});let r=ef(Y)?await Y:Y;Y=r;let a=[];for(let e of t){if(e===`text`||e===`ansi`)continue;let t=hd(e);`then`in t?a.push(t):Br(t,r)}let o=[];for(let t of e){let e=Zd(t);`then`in e?o.push(e):Dd(e,Y)}return(a.length>0||o.length>0)&&await Promise.all([Promise.all(a).then(e=>{Br(e,r)}),Promise.all(o).then(e=>{Dd(e,r)})]),r}function $d(){if(Y!=null&&!(`then`in Y))return Y}function ef(e=Y){return e!=null&&`then`in e}for(let e of zd.getThemes())J.registerThemeIfAbsent(e.name,e.load);function tf(e=vt){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}function nf(e){return J.hasResolvedThemes(e)}function rf(e,t){return Ot(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}var af=new Map,of=0,sf={"1c":`1c`,abap:`abap`,as:`actionscript-3`,ada:`ada`,adb:`ada`,ads:`ada`,adoc:`asciidoc`,asciidoc:`asciidoc`,"component.html":`angular-html`,"component.ts":`angular-ts`,conf:`nginx`,htaccess:`apache`,cls:`tex`,trigger:`apex`,apl:`apl`,applescript:`applescript`,scpt:`applescript`,ara:`ara`,asm:`asm`,s:`riscv`,astro:`astro`,awk:`awk`,bal:`ballerina`,sh:`zsh`,bash:`zsh`,bat:`cmd`,cmd:`cmd`,be:`berry`,beancount:`beancount`,bib:`bibtex`,bicep:`bicep`,"blade.php":`blade`,bsl:`bsl`,c:`c`,h:`objective-cpp`,cs:`csharp`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cxx:`cpp`,hh:`cpp`,cdc:`cdc`,cairo:`cairo`,clar:`clarity`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,soy:`soy`,cmake:`cmake`,"CMakeLists.txt":`cmake`,cob:`cobol`,cbl:`cobol`,cobol:`cobol`,CODEOWNERS:`codeowners`,ql:`ql`,coffee:`coffeescript`,lisp:`lisp`,cl:`lisp`,lsp:`lisp`,log:`log`,v:`verilog`,cql:`cql`,cr:`crystal`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cypher`,cyp:`cypher`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,patch:`diff`,Dockerfile:`dockerfile`,dockerfile:`dockerfile`,env:`dotenv`,dm:`dream-maker`,edge:`edge`,el:`emacs-lisp`,ex:`elixir`,exs:`elixir`,elm:`elm`,erb:`erb`,erl:`erlang`,hrl:`erlang`,f:`fortran-fixed-form`,for:`fortran-fixed-form`,fs:`fsharp`,fsi:`fsharp`,fsx:`fsharp`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`fortran-free-form`,f95:`fortran-free-form`,fnl:`fennel`,fish:`fish`,ftl:`ftl`,tres:`gdresource`,res:`gdresource`,gd:`gdscript`,gdshader:`gdshader`,gs:`genie`,feature:`gherkin`,COMMIT_EDITMSG:`git-commit`,"git-rebase-todo":`git-rebase`,gjs:`glimmer-js`,gleam:`gleam`,gts:`glimmer-ts`,glsl:`glsl`,vert:`glsl`,frag:`glsl`,shader:`shaderlab`,gp:`gnuplot`,plt:`gnuplot`,gnuplot:`gnuplot`,go:`go`,graphql:`graphql`,gql:`graphql`,groovy:`groovy`,gvy:`groovy`,hack:`hack`,haml:`haml`,hbs:`handlebars`,handlebars:`handlebars`,hs:`haskell`,lhs:`haskell`,hx:`haxe`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,fx:`hlsl`,html:`html`,htm:`html`,http:`http`,rest:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,cfg:`ini`,jade:`pug`,pug:`pug`,java:`java`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jinja:`jinja`,jinja2:`jinja`,j2:`jinja`,jison:`jison`,jl:`julia`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,libsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,kt:`kotlin`,kts:`kts`,kql:`kusto`,tex:`tex`,ltx:`tex`,lean:`lean4`,less:`less`,liquid:`liquid`,lit:`lit`,ll:`llvm`,logo:`logo`,lua:`lua`,luau:`luau`,Makefile:`makefile`,mk:`makefile`,makefile:`makefile`,md:`markdown`,markdown:`markdown`,marko:`marko`,m:`wolfram`,mat:`matlab`,mdc:`mdc`,mdx:`mdx`,wiki:`wikitext`,mediawiki:`wikitext`,mmd:`mermaid`,mermaid:`mermaid`,mips:`mipsasm`,mojo:`mojo`,"🔥":`mojo`,move:`move`,nar:`narrat`,nf:`nextflow`,nim:`nim`,nims:`nim`,nimble:`nim`,nix:`nix`,nu:`nushell`,mm:`objective-cpp`,ml:`ocaml`,mli:`ocaml`,mll:`ocaml`,mly:`ocaml`,pas:`pascal`,p:`pascal`,pl:`prolog`,pm:`perl`,t:`perl`,raku:`raku`,p6:`raku`,pl6:`raku`,php:`php`,phtml:`php`,pls:`plsql`,sql:`sql`,po:`po`,polar:`polar`,pcss:`postcss`,pot:`pot`,potx:`potx`,pq:`powerquery`,pqm:`powerquery`,ps1:`powershell`,psm1:`powershell`,psd1:`powershell`,prisma:`prisma`,pro:`prolog`,P:`prolog`,properties:`properties`,proto:`protobuf`,pp:`puppet`,purs:`purescript`,py:`python`,pyw:`python`,pyi:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,jbuilder:`ruby`,builder:`ruby`,rabl:`ruby`,arb:`ruby`,ru:`ruby`,podspec:`ruby`,Gemfile:`ruby`,Rakefile:`ruby`,Guardfile:`ruby`,Capfile:`ruby`,Berksfile:`ruby`,Brewfile:`ruby`,Vagrantfile:`ruby`,Thorfile:`ruby`,Appraisals:`ruby`,Dangerfile:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,mts:`typescript`,cts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function X(e){if(af.has(e))return af.get(e)??`text`;if(sf[e]!=null)return sf[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(af.has(t[1]))return af.get(t[1])??`text`;if(sf[t[1]]!=null)return sf[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return af.has(n)?af.get(n)??`text`:sf[n]??`text`}function cf(){return of}function lf(){return Object.fromEntries(af)}function uf(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName=`div`,e.properties[`data-line`]=r.lineNumber,e.properties[`data-alt-line`]=r.altLineNumber,e.properties[`data-line-type`]=r.type,e.properties[`data-line-index`]=r.lineIndex,e.children.length===0&&e.children.push(fn(`
165
- `)),e}var df=Symbol(`no-token`),ff=Symbol(`multiple-tokens`);function pf(e){let t=mf(e);if(t!=null)return t;let n=df,r=[],i=[],a,o=()=>{if(i.length===0||a==null){i=[],a=void 0;return}if(i.length===1){let e=i[0];if(e?.type===`element`){gf(e,a);for(let t of e.children)hf(t)}else hf(e);r.push(e),i=[],a=void 0;return}for(let e of i)hf(e);r.push(pn({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0},s=e=>{if(e!==df){if(e===ff){n=ff;return}if(n===df){n=e;return}n!==e&&(n=ff)}};for(let t of e.children){let e=t.type===`element`?pf(t):df;if(s(e),typeof e!=`number`){o(),r.push(t);continue}a!=null&&a!==e&&o(),a??=e,i.push(t)}return o(),e.children=r,n}function mf(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function hf(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)hf(t)}}function gf(e,t){e.properties[`data-char`]=t}function _f(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=typeof e==`string`?e:a(e),s=t+vf(o)+n;return s=r(s),i.has(s)||i.set(s,typeof e==`string`?e:{...e}),s}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function vf(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function yf(e=!1,t=!1){let n={lineInfo:[]},r=[{line(e){return delete e.properties.class,e},pre(t){let r=hn(t),i=[];if(r!=null){let t=1;for(let a of r.children)a.type===`element`&&(e&&pf(a),i.push(uf(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t){let t=n;t.__lineChar??=e,e+=n.content.length}}},preprocess(e,t){t.mergeWhitespaces=`never`},span(e,t,n,r,i){if(i?.offset!=null&&i.content!=null){let t=i.__lineChar;return t!=null&&(e.properties[`data-char`]=t),e}return e}}:null}];return t&&r.push(xf,bf),e&&r.push({line:e=>(e.type===`element`&&e.children.length===0&&e.children.push({type:`element`,tagName:`br`,properties:{},children:[]}),e)}),{state:n,transformers:r,toClass:bf}}var bf=_f({classPrefix:`hl-`}),xf={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function Z(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}var Sf=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,Cf=/^0(?:\.0+)?%?$/;function wf(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function Tf(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;let n=t[1],r,i=1;return n.length===3?r=n.split(``).map(e=>e+e).join(``):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function Q(e){if(e==null)return null;let t=Tf(e);if(t==null)return null;let n=t[0]/255,r=t[1]/255,i=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(r)+.0722*a(i)}function Ef(e,t){let[n,r]=e>t?[e,t]:[t,e];return(n+.05)/(r+.05)}function Df(e,t){if(t==null)return;let n=Tf(e),r=Tf(t);if(n==null||r==null)return;let[i,a,o,s]=n,[c,l,u]=r;return`#`+[Math.round(i*s+c*(1-s)),Math.round(a*s+l*(1-s)),Math.round(o*s+u*(1-s))].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Of(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||Sf.test(t))return!0;let n=wf(t);return n!=null&&Cf.test(n)}function kf(e,t){let n=Q(e);if(n!=null)return n<.4;let r=Q(t);return r!=null&&r>.6}function Af(e,t){if(e==null||t==null)return!1;if(e.trim().toLowerCase()===t.trim().toLowerCase())return!0;let n=Q(e),r=Q(t);return n==null||r==null?!1:Math.abs(n-r)<.06}function jf(e,t,n){if(t==null||n==null)return!1;let r=Q(e),i=Q(t),a=Q(n);return r==null||i==null||a==null?!1:Math.abs(r-a)<Math.abs(r-i)}function Mf(e,t){let n=Q(e),r=t.find(e=>e!=null&&e!==``);if(n==null)return r;let i,a=-1;for(let e of t){if(e==null||e===``)continue;let t=Q(e);if(t==null)continue;let r=Ef(n,t);if(r>=3)return e;r>a&&(i=e,a=r)}return i??r}function Nf(e,t){if(t==null)return e;let n=Tf(e),r=Tf(t),i=Q(t);if(n==null||r==null||i==null)return`color-mix(in srgb, ${e} 70%, ${t})`;let[a,o,s]=n,[c,l,u]=r;for(let e of[.6,.7,.8,.9]){let t=`#`+[Math.round(a*e+c*(1-e)),Math.round(o*e+l*(1-e)),Math.round(s*e+u*(1-e))].map(e=>e.toString(16).padStart(2,`0`)).join(``),n=Q(t);if(n!=null&&Ef(i,n)>=4.5)return t}return e}var Pf=new WeakMap;function Ff(e){let t=Pf.get(e);if(t!=null)return t;let n=e.colors??{},r={...n},i=n[`editor.background`]??e.bg,a=n[`editor.foreground`]??e.fg,o=n[`sideBar.background`]??i,s=n[`sideBar.foreground`]??a;$(r,`editor.background`,i),$(r,`editor.foreground`,a),$(r,`sideBar.background`,o),$(r,`sideBar.foreground`,s),$(r,`input.background`,n[`input.background`]??o),$(r,`sideBarSectionHeader.foreground`,n[`sideBarSectionHeader.foreground`]??s),$(r,`list.activeSelectionForeground`,n[`list.activeSelectionForeground`]??s),$(r,`gitDecoration.addedResourceForeground`,If(n[`gitDecoration.addedResourceForeground`],n[`terminal.ansiGreen`],n[`editorGutter.addedBackground`])),$(r,`gitDecoration.modifiedResourceForeground`,If(n[`gitDecoration.modifiedResourceForeground`],n[`terminal.ansiBlue`],n[`editorGutter.modifiedBackground`])),$(r,`gitDecoration.deletedResourceForeground`,If(n[`gitDecoration.deletedResourceForeground`],n[`terminal.ansiRed`],n[`editorGutter.deletedBackground`]));let c=(Of(n[`list.focusOutline`])?void 0:n[`list.focusOutline`])??(Of(n.focusBorder)?void 0:n.focusBorder);c==null?delete r[`list.focusOutline`]:r[`list.focusOutline`]=c;let l=n[`list.hoverBackground`];l!=null&&(Lf(l,o)||jf(l,o,s))&&delete r[`list.hoverBackground`];let u=Object.freeze({...e,colors:Object.freeze(r)});return Pf.set(e,u),u}function $(e,t,n){n!=null&&n!==``&&(e[t]=n)}function If(...e){for(let t of e)if(t!=null&&t!==``)return t}function Lf(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function Rf({theme:e=vt,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e),a=Ff(i);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${Z(`global`)}fg:${a.fg};`,r+=`${Z(`global`)}bg:${a.bg};`,r+=zf(i,n)}else{let n=t.getTheme(e.dark),i=Ff(n);r+=`${Z(`global`)}dark:${i.fg};`,r+=`${Z(`global`)}dark-bg:${i.bg};`,r+=zf(n,`dark`),n=t.getTheme(e.light),i=Ff(n),r+=`${Z(`global`)}light:${i.fg};`,r+=`${Z(`global`)}light-bg:${i.bg};`,r+=zf(n,`light`)}return r}function zf(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${Z(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${Z(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${Z(`global`)}${t}modified-color:${a};`),n}function Bf(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}var Vf=10,Hf=13,Uf=4,Wf=40;function Gf(e){let t=[0],n=e.indexOf(`\r`),r=e.indexOf(`
166
- `),i=0,a=0;for(;n!==-1||r!==-1;){let o;if(n!==-1&&(r===-1||n<r)?r===n+1?(o=r+1,n=e.indexOf(`\r`,o),r=e.indexOf(`
167
- `,o)):(o=n+1,n=e.indexOf(`\r`,o)):(o=r+1,r=e.indexOf(`
168
- `,o)),t.push(o),++a===Uf){if(o-i<=Wf){for(let n=o;n<e.length;n++){let r=e.charCodeAt(n);(r===Vf||r===Hf)&&(r===Hf&&n+1<e.length&&e.charCodeAt(n+1)===Vf&&n++,t.push(n+1))}return t}i=o,a=0}}return t}function Kf(e){let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);(r===Vf||r===Hf)&&(r===Hf&&n+1<e.length&&e.charCodeAt(n+1)===Vf&&n++,t++)}return t}function qf(e){let t=Gf(e);return Array.from({length:t.length},(n,r)=>{let i=t[r],a=t[r+1]??e.length;return e.slice(i,a)})}var Jf={forcePlainText:!1};function Yf(e,t,{theme:n=vt,tokenizeMaxLineLength:r,useTokenTransformer:i},{forcePlainText:a,startingLine:o,totalLines:s,lines:c}=Jf){a?(o??=0,s??=1/0):(o=0,s=1/0);let l=o>0||s<1/0,{state:u,transformers:d}=yf(i),f=a?`text`:e.lang??X(e.name),p=typeof n==`string`?t.getTheme(n).type:void 0,m=Rf({theme:n,highlighter:t});u.lineInfo=e=>({type:`context`,lineIndex:e-1+o,lineNumber:e+o});let h=typeof n==`string`?{lang:f,theme:n,transformers:d,defaultColor:!1,cssVariablePrefix:Z(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0}:{lang:f,themes:n,transformers:d,defaultColor:!1,cssVariablePrefix:Z(`token`),tokenizeMaxLineLength:r,tokenizeTimeLimit:0},g=Bf(t.codeToHast(l?Xf(c??qf(e.contents),o,s):e.contents,h)),_=l?Array(o):g;return l&&_.push(...g),{code:_,themeStyles:m,baseThemeType:p}}function Xf(e,t,n){if(e.length===0)return``;let r=Math.min(t+n,e.length);return e.slice(t,r).join(``)}function Zf(e){return(e.lang??X(e.name))===`text`}function Qf(e){return{...wt,...e}}function $f(e,t){let n=ep(e,t);return t?n:e.diffHeaderHeight+n}function ep(e,t){return e.paddingTop??(t?e.spacing:0)}function tp(e){return e.paddingBottom??e.spacing}function np(e){switch(e){case`simple`:return 4;case`metadata`:case`line-info`:case`line-info-basic`:case`custom`:return 32}}function rp(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}function ip(e,t){return Ot(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function ap({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function op({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}function sp(e){return[At(e.additionStart,e.additionCount)+1,jt(e.additionStart,e.additionCount)+1]}function cp({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){let a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(n===!0||a<=i)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(r),s=Math.min(Math.max(o?.fromStart??0,0),a),c=Math.min(Math.max(o?.fromEnd??0,0),a),l=s+c,u=l>=a;return{fromStart:u?a:s,fromEnd:u?0:c,rangeSize:a,collapsedLines:Math.max(a-l,0),renderAll:u}}function lp(e){let t=e.hunks[e.hunks.length-1];if(t==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return!1;let n=e.additionLines.length-jt(t.additionStart,t.additionCount),r=e.deletionLines.length-jt(t.deletionStart,t.deletionCount);return n<=0&&r<=0?!1:n!==r}function up({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let r=e.additionLines.length-jt(n.additionStart,n.additionCount),i=e.deletionLines.length-jt(n.deletionStart,n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function dp({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;let a=up({fileDiff:e,errorPrefix:i});if(a<=0)return;if(n===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(e.hunks.length),s=Math.min(Math.max(o?.fromStart??0,0),a);return{fromStart:s,fromEnd:0,rangeSize:a,collapsedLines:a-s,renderAll:s>=a}}function fp({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:r}){if(n===!0||e.isPartial)return!0;for(let[i,a]of e.hunks.entries()){let[o,s]=sp(a);if(t<o){let s=cp({isPartial:e.isPartial,rangeSize:a.collapsedBefore,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:r}),c=o-s.rangeSize;return s.renderAll||t<c+s.fromStart||t>=o-s.fromEnd}if(t<s)return!0}let i=dp({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:`isAdditionLineRenderable`});if(i==null||i.renderAll)return!0;let a=e.hunks[e.hunks.length-1],[,o]=sp(a);return t<o+i.fromStart||t>=o+i.rangeSize}function pp({fileDiff:e,lineNumber:t,direction:n,expandedHunks:r,collapsedContextThreshold:i}){if(r===!0||e.isPartial)return t;let a=[],o=1;for(let[t,n]of e.hunks.entries()){let[s,c]=sp(n),l=cp({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:r,hunkIndex:t,collapsedContextThreshold:i}),u=s-l.rangeSize;l.renderAll?a.push([u,s]):(l.fromStart>0&&a.push([u,u+l.fromStart]),l.fromEnd>0&&a.push([s-l.fromEnd,s])),a.push([s,c]),o=c}let s=dp({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:r,collapsedContextThreshold:i,errorPrefix:`getNearestRenderableAdditionLine`});if(s!=null){let e=o;o=e+s.rangeSize,s.renderAll?a.push([e,o]):s.fromStart>0&&a.push([e,e+s.fromStart])}if(t>=o)return t;if(n===`down`){for(let[e,n]of a)if(n>t)return Math.max(e,t);return}for(let e=a.length-1;e>=0;e--){let[n,r]=a[e];if(n<=t)return Math.min(r-1,t)}}function mp({type:e,metrics:t}){return t.hunkSeparatorHeight??np(e)}function hp({type:e,metrics:t}){return e===`simple`||e===`metadata`||e===`line-info-basic`?0:t.spacing}function gp({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case`simple`:return t>0;case`metadata`:return n!=null;case`line-info`:case`line-info-basic`:case`custom`:return!0}}function _p(e){return e!==`simple`&&e!==`metadata`}function vp({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!gp({type:e,hunkIndex:n,hunkSpecs:r}))return;let i=mp({type:e,metrics:t}),a=hp({type:e,metrics:t}),o=n>0?a:0,s=a;return{height:i,gapBefore:o,gapAfter:s,totalHeight:o+i+s}}function yp({type:e,metrics:t}){if(!_p(e))return;let n=mp({type:e,metrics:t}),r=hp({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function bp({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s=xp({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:a}),c={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;let e=c.unifiedCount>=n+r,i=c.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!c.isWindowedHighlight)return!1;let i=e>0&&c.unifiedCount+e<=n,a=r>0&&c.splitCount+r<=n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(c.unifiedCount+=e),(t===`split`||t===`both`)&&(c.splitCount+=n)},isInWindow(e,n){if(!c.isWindowedHighlight)return!0;let r=c.isInUnifiedWindow(e),i=c.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!c.isWindowedHighlight||c.unifiedCount>=n-e&&c.unifiedCount<n+r},isInSplitWindow(e){return!c.isWindowedHighlight||c.splitCount>=n-e&&c.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?c.incrementCounts(1,0):t===`split`?c.incrementCounts(0,1):c.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let n=s.hunkIndex;n<e.hunks.length;n++){let r=e.hunks[n];if(r==null)throw Error(`iterateOverDiff: invalid hunk index`);if(c.shouldBreak())break;let o=At(r.deletionStart,r.deletionCount),s=At(r.additionStart,r.additionCount),l=!e.isPartial&&r.deletionCount===0?o:r.deletionLineIndex,u=!e.isPartial&&r.additionCount===0?s:r.additionLineIndex,d=cp({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:a}),f=n===c.finalHunkIndex?dp({fileDiff:e,hunkIndex:n,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:`iterateOverDiff`}):void 0,p=d.fromStart+d.fromEnd;function m(e,n){return f==null||f.collapsedLines<=0||f.fromStart+f.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?f.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?f.collapsedLines:0}let h=d.collapsedLines===0;function g(){return h?0:(h=!0,d.collapsedLines)}if(c.shouldSkip(p,p))c.incrementCounts(p,p),g();else{let e=r.unifiedLineStart-d.rangeSize,i=r.splitLineStart-d.rangeSize,a=l-d.rangeSize,f=u-d.rangeSize,p=o+1-d.rangeSize,m=s+1-d.rangeSize;if(wp(c,d.fromStart,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}))||(e=r.unifiedLineStart-d.fromEnd,i=r.splitLineStart-d.fromEnd,a=l-d.fromEnd,f=u-d.fromEnd,p=o+1-d.fromEnd,m=s+1-d.fromEnd,wp(c,d.fromEnd,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:p+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:f+t,lineNumber:m+t,noEOFCR:!1}}),()=>{g()})))break hunkIterator}let _=r.unifiedLineStart,v=r.splitLineStart,y=l,b=u,x=o+1,S=s+1,ee=r.hunkContent.at(-1);for(let e of r.hunkContent){if(c.shouldBreak())break hunkIterator;let i=e===ee;if(e.type===`context`){if(c.shouldSkip(e.lines,e.lines))c.incrementCounts(e.lines,e.lines),g();else if(wp(c,e.lines,t,t=>{let a=i&&t===e.lines-1,o=_+t,s=v+t;return c.emit({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:m(o,s),type:`context`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:s},additionLine:{unifiedLineIndex:o,splitLineIndex:s,lineIndex:b+t,lineNumber:S+t,noEOFCR:a&&r.noEOFCRAdditions}})},()=>{g()}))break hunkIterator;_+=e.lines,v+=e.lines,y+=e.lines,b+=e.lines,x+=e.lines,S+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!c.shouldSkip(o,a)){let s=Tp(c,e,t);(s[0]?.[0]??0)>0&&g();for(let[l,u]of s)for(let s=l;s<u;s++){let l=m(_+s,t===`unified`?v+(s<e.deletions?s:s-e.deletions):v+s);if(c.emit(Ep({hunkIndex:n,hunk:r,collapsedBefore:g(),collapsedAfter:l,diffStyle:t,index:s,unifiedLineIndex:_,splitLineIndex:v,additionLineIndex:b,deletionLineIndex:y,additionLineNumber:S,deletionLineNumber:x,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}g(),c.incrementCounts(o,a),_+=o,v+=a,y+=e.deletions,b+=e.additions,x+=e.deletions,S+=e.additions}}if(f!=null){let{collapsedLines:n,fromStart:r,fromEnd:i}=f,a=r+i;if(wp(c,a,t,t=>{let r=t===a-1;return c.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:r?n:0,type:`context-expanded`,deletionLine:{lineNumber:x+t,lineIndex:y+t,noEOFCR:!1,unifiedLineIndex:_+t,splitLineIndex:v+t},additionLine:{unifiedLineIndex:_+t,splitLineIndex:v+t,lineIndex:b+t,lineNumber:S+t,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break hunkIterator}}}function xp({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t===`both`)return{hunkIndex:0,splitCount:0,unifiedCount:0};let a=Sp({diff:e,expandedHunks:r,collapsedContextThreshold:i}),o=0,s=e.hunks.length-1,c=e.hunks.length;for(;o<=s;){let e=o+s>>1,r=a[e+1];if(r==null)throw Error(`iterateOverDiff: invalid hunk prefix index`);(t===`unified`?r.unifiedCount:r.splitCount)>n?(c=e,s=e-1):o=e+1}if(c>=e.hunks.length){let t=a[e.hunks.length];if(t==null)throw Error(`iterateOverDiff: invalid terminal hunk prefix index`);return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let l=a[c];if(l==null)throw Error(`iterateOverDiff: invalid selected hunk prefix index`);return{hunkIndex:c,splitCount:l.splitCount,unifiedCount:l.unifiedCount}}function Sp({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0,a=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let c=e.hunks[s];if(c==null)throw Error(`iterateOverDiff: invalid hunk summary index`);let l=cp({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=l.fromStart+l.fromEnd;r+=u+c.splitLineCount,i+=u+c.unifiedLineCount;let d=s===a?dp({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`iterateOverDiff`}):void 0;if(d!=null){let e=d.fromStart+d.fromEnd;r+=e,i+=e}o.push({splitCount:r,unifiedCount:i})}return o}function Cp(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let r=[];function i(n){let i=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>i&&r.push([i,a])}if(n!==`split`&&i(e.unifiedCount),n!==`unified`&&i(e.splitCount),r.length===0)return[0,0];let a=r[0][0],o=r[0][1];for(let e=1;e<r.length;e++){let t=r[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}function wp(e,t,n,r,i,a){let[o,s]=Cp(e,t,n);o>0&&(e.incrementCounts(o,o),i?.());let c=o;for(;c<t;){if(a?.()===!0)return!0;if(c>=s){e.incrementCounts(t-c,t-c);break}if(e.isInWindow(0,0)){if(r(c)===!0)return!0}else e.incrementCounts(1,1);c++}return!1}function Tp(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function Ep({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,ee=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,te=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,ne=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:ee,unifiedLineIndex:g,splitLineIndex:v}:void 0,re=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:te}:void 0;if(ne==null&&re!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:re};if(ne!=null&&re==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:ne,additionLine:void 0};if(ne==null||re==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:ne,additionLine:re}}var Dp={forcePlainText:!1};function Op(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=Dp){r?(i??=0,a??=1/0):(i=0,a=1/0);let c=i>0||a<1/0,l=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,u=Rf({theme:n.theme,highlighter:t}),d=r&&!c&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:p}=n,m=!r&&!e.isPartial,h=r?o:void 0,g=new Map;function _(e){let t=m?0:e,n=g.get(t)??Ap();return g.set(t,n),n}function v(e,t,n,r){if(c){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}bp({diff:e,diffStyle:`both`,startingLine:i,totalLines:a,expandedHunks:!c||h,collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=_(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&kp({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:d,maxLineDiffLength:p}),r!=null&&(v(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(v(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let i of g.values()){if(i.deletionContent.length===0&&i.additionContent.length===0)continue;let a={name:e.prevName??e.name,contents:i.deletionContent.value},o={name:e.name,contents:i.additionContent.value},{deletionLines:s,additionLines:c}=jp({deletionFile:a,deletionInfo:i.deletionInfo,deletionDecorations:i.deletionDecorations,additionFile:o,additionInfo:i.additionInfo,additionDecorations:i.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang});if(m){f.deletionLines=s,f.additionLines=c;continue}if(i.deletionSegments.length>0)for(let e of i.deletionSegments)for(let t=0;t<e.count;t++)f.deletionLines[e.targetIndex+t]=s[e.originalOffset+t];else f.deletionLines.push(...s);if(i.additionSegments.length>0)for(let e of i.additionSegments)for(let t=0;t<e.count;t++)f.additionLines[e.targetIndex+t]=c[e.originalOffset+t];else f.additionLines.push(...c)}return{code:f,themeStyles:u,baseThemeType:l}}function kp({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=kt(e),t=kt(t),e.length>s||t.length>s))return;let c=o===`char`?Pt(e,t):Zt(e,t),l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(op({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),op({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?op({item:e,arr:l,enableJoin:d,isLastItem:t}):op({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(ap({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(ap({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function Ap(){return{deletionContent:{push(e){this.value+=e,this.length++},value:``,length:0},additionContent:{push(e){this.value+=e,this.length++},value:``,length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function jp({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:c=vt,...l}}){let u=s??X(e.name),d=s??X(t.name),{state:f,transformers:p}=yf(l.useTokenTransformer),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Z(`token`),tokenizeTimeLimit:0}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:Z(`token`),tokenizeTimeLimit:0};return{deletionLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,Bf(i.codeToHast(kt(e.contents),m))),additionLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,Bf(i.codeToHast(kt(t.contents),m)))}}function Mp(e){let t=e.lang??X(e.name),n=e.lang??(e.prevName==null?`text`:X(e.prevName));return t===`text`&&n===`text`}function Np(e){let t=[];for(let n of e){let e=Ir.get(n);if(e==null)throw Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(e)}return t}function Pp(e){for(let t of Array.isArray(e)?e:[e])if(!Ir.has(t))return!1;return!0}async function Fp(e){let t=[],n=[];for(let r of e){if(r===`text`||r===`ansi`)continue;let e=hd(r)??md(r);`then`in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e){if(n==null)throw Error(`resolvedLanguages: unable to resolve language`);t.push(n)}}),t}function Ip(e){return J.getResolvedThemes(e)}async function Lp(e){for(let t of e)Jd(t);let t=await J.resolveThemes(e);for(let n=0;n<e.length;n++)Yd(e[n],t[n]);return t}var Rp=null,zp=null;function Bp(){return Rp?Promise.resolve(Rp):(zp??=i(()=>import(`./vscode-icons-D3XEYHTI.js`).then(e=>(Rp=e.getVscodeIconUrlForEntry,Rp)),[]).catch(e=>{throw zp=null,e}),zp)}function Vp(e,t,n){let r=(0,k.c)(9),i;r[0]!==t||r[1]!==e||r[2]!==n?(i=()=>Rp?Rp(e,t,n):null,r[0]=t,r[1]=e,r[2]=n,r[3]=i):i=r[3];let[a,o]=(0,O.useState)(i),s,c;return r[4]!==t||r[5]!==e||r[6]!==n?(s=()=>{if(Rp){o(Rp(e,t,n));return}let r=!1;return o(null),Bp().then(i=>{r||o(i(e,t,n))}).catch(()=>{r||o(null)}),()=>{r=!0}},c=[t,e,n],r[4]=t,r[5]=e,r[6]=n,r[7]=s,r[8]=c):(s=r[7],c=r[8]),(0,O.useEffect)(s,c),a}var Hp=(0,O.memo)(function(e){let t=(0,k.c)(11),[n,r]=(0,O.useState)(null),i=Vp(e.pathValue,e.kind,e.theme);if(!i||i!==null&&n===i){let n;return t[0]!==e.className||t[1]!==e.kind?(n=e.kind===`directory`?(0,A.jsx)(se,{className:w(`size-4 text-muted-foreground/80`,e.className)}):(0,A.jsx)(v,{className:w(`size-4 text-muted-foreground/80`,e.className)}),t[0]=e.className,t[1]=e.kind,t[2]=n):n=t[2],n}let a;t[3]===e.className?a=t[4]:(a=w(`size-4 shrink-0`,e.className),t[3]=e.className,t[4]=a);let o;t[5]===i?o=t[6]:(o=()=>r(i),t[5]=i,t[6]=o);let s;return t[7]!==i||t[8]!==a||t[9]!==o?(s=(0,A.jsx)(`img`,{src:i,alt:``,"aria-hidden":`true`,className:a,loading:`lazy`,onError:o}),t[7]=i,t[8]=a,t[9]=o,t[10]=s):s=t[10],s});function Up(e){return e.split(/[\s:_-]+/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)}function Wp(e){return e.replaceAll(`\\`,`/`)}function Gp(e){return e.displayName?.trim()||Up(e.name)}function Kp(e){let t=Wp(e.path);if(t.includes(`/.codex/plugins/`)||t.includes(`/.agents/plugins/`))return`App`;let n=e.scope?.trim().toLowerCase();return n===`system`?`System`:n===`project`||n===`workspace`||n===`local`?`Project`:n===`user`||n===`personal`?`Personal`:n?Up(n):null}var qp=`inline-flex max-w-full select-none items-center gap-1 rounded-md border border-border/70 bg-accent/40 px-1.5 py-px font-medium text-[12px] leading-[1.1] text-foreground align-middle`,Jp=`size-3.5 shrink-0 opacity-85`,Yp=`truncate select-none leading-tight`,Xp=`inline-flex max-w-full select-none items-center gap-1 rounded-md border border-fuchsia-500/25 bg-fuchsia-500/12 px-1.5 py-px font-medium text-[12px] leading-[1.1] text-fuchsia-700 align-middle dark:text-fuchsia-300`,Zp=`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.85" stroke-linecap="round" stroke-linejoin="round"><path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"/><path d="m3.3 7 8.7 5 8.7-5"/><path d="M12 22V12"/></svg>`,Qp=`ml-0.5 inline-flex size-3.5 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground/72 transition-colors hover:bg-foreground/6 hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring`;function $p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function em(e){let t=e.trim();if(t.length===0)return null;let n=t.split(/(\s+)/).map(e=>/\s+/.test(e)?`\\s+`:$p(e)).join(``);return new RegExp(n,`gi`)}function tm(e){return e.message.role===`user`?o(e.message.text).visibleText:e.message.text}function nm(e){let t=em(e.query);if(!t)return[];let n=[];for(let r of e.timelineEntries){if(r.kind!==`message`||r.message.role!==`user`&&r.message.role!==`assistant`)continue;let e=tm(r),i=0;t.lastIndex=0;for(let a of e.matchAll(t)){let e=a.index??0,t=a[0]??``;if(t.length===0)continue;let o=e+t.length,s=`${r.message.id}:${e}:${o}:${i}`;n.push({id:s,messageId:r.message.id,occurrenceIndex:n.length,messageOccurrenceIndex:i,start:e,end:o,text:t}),i+=1}}return n}function rm(e,t){return t<=0?0:Math.min(Math.max(0,e),t-1)}function im(e){return e.matchCount<=0?0:e.direction===`previous`?(e.currentIndex-1+e.matchCount)%e.matchCount:(e.currentIndex+1)%e.matchCount}function am(e){let t=em(e.query);if(!t)return e.text;let n=[],r=0;t.lastIndex=0;for(let i of e.text.matchAll(t)){let t=i.index??0,a=i[0]??``;if(a.length===0)continue;let o=t+a.length;t>r&&n.push(e.text.slice(r,t));let s=e.cursor.occurrenceIndex;e.cursor.occurrenceIndex+=1,n.push((0,A.jsx)(`mark`,{className:w(`thread-message-search-highlight`,e.activeOccurrenceIndex===s&&`thread-message-search-highlight-active`),"data-thread-message-search-hit":`true`,"data-thread-message-search-active":e.activeOccurrenceIndex===s?`true`:void 0,children:a},`${e.keyPrefix}:thread-search:${t}:${o}:${s}`)),r=o}return n.length===0?e.text:(r<e.text.length&&n.push(e.text.slice(r)),(0,A.jsx)(A.Fragment,{children:n}))}var om=/(^|\s)\$([a-zA-Z][a-zA-Z0-9:_-]*)(?=\s|$)/g;function sm(e){return e.highlight?am({text:e.text,query:e.highlight.query,activeOccurrenceIndex:e.highlight.activeOccurrenceIndex,cursor:e.highlight.cursor,keyPrefix:`${e.highlight.keyPrefix}:${e.start}`}):e.text}function cm(e){let t=(0,k.c)(14),n,r;if(t[0]!==e.searchHighlight||t[1]!==e.skills||t[2]!==e.text){r=Symbol.for(`react.early_return_sentinel`);bb0:{let i=[],a=0;for(let t of e.text.matchAll(om)){let n=t[1]??``,r=t[2]??``,o=(t.index??0)+n.length,s=`$${r}`,c=e.skills.find(e=>e.name===r);c&&(o>a&&i.push(sm({text:e.text.slice(a,o),start:a,highlight:e.searchHighlight})),i.push((0,A.jsx)(um,{skill:c,rawText:s},`${o}:${r}`)),a=o+s.length)}if(a===0){let n;t[5]!==e.searchHighlight||t[6]!==e.text?(n=sm({text:e.text,start:0,highlight:e.searchHighlight}),t[5]=e.searchHighlight,t[6]=e.text,t[7]=n):n=t[7];let i;t[8]===n?i=t[9]:(i=(0,A.jsx)(A.Fragment,{children:n}),t[8]=n,t[9]=i),r=i;break bb0}if(a<e.text.length){let n;t[10]!==a||t[11]!==e.searchHighlight||t[12]!==e.text?(n=sm({text:e.text.slice(a),start:a,highlight:e.searchHighlight}),t[10]=a,t[11]=e.searchHighlight,t[12]=e.text,t[13]=n):n=t[13],i.push(n)}n=(0,A.jsx)(A.Fragment,{children:i})}t[0]=e.searchHighlight,t[1]=e.skills,t[2]=e.text,t[3]=n,t[4]=r}else n=t[3],r=t[4];return r===Symbol.for(`react.early_return_sentinel`)?n:r}function lm(e,t,n){return O.Children.map(e,e=>typeof e==`string`?(0,A.jsx)(cm,{text:e,skills:t,searchHighlight:n}):!(0,O.isValidElement)(e)||e.type===`code`||e.type===`a`||!(`children`in e.props)?e:(0,O.cloneElement)(e,void 0,lm(e.props.children,t,n)))}function um(e){let t=(0,k.c)(10),n;t[0]===e.rawText?n=t[1]:(n=(0,A.jsx)(`span`,{className:`sr-only`,children:e.rawText}),t[0]=e.rawText,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,A.jsx)(`span`,{"aria-hidden":`true`,className:Jp,dangerouslySetInnerHTML:{__html:Zp}}),t[2]=r):r=t[2];let i;t[3]===e.skill?i=t[4]:(i=Gp(e.skill),t[3]=e.skill,t[4]=i);let a;t[5]===i?a=t[6]:(a=(0,A.jsxs)(`span`,{"aria-hidden":`true`,className:Xp,children:[r,(0,A.jsx)(`span`,{className:Yp,children:i})]}),t[5]=i,t[6]=a);let o;return t[7]!==n||t[8]!==a?(o=(0,A.jsxs)(`span`,{className:`inline-flex align-middle leading-none`,children:[n,a]}),t[7]=n,t[8]=a,t[9]=o):o=t[9],o}var dm={light:`pierre-light`,dark:`pierre-dark`};function fm(e){return e===`dark`?dm.dark:dm.light}var pm=2166136261,mm=16777619,hm=2654435769,gm=2246822507;function _m(e,t=pm,n=mm){let r=t>>>0;for(let t=0;t<e.length;t+=1)r^=e.charCodeAt(t),r=Math.imul(r,n)>>>0;return r>>>0}function vm(e,t=`diff-panel`){let n=e.trim(),r=_m(n,pm,mm).toString(36),i=_m(n,hm,gm).toString(36);return`${t}:${n.length}:${r}:${i}`}var ym=class{maxEntries;maxMemoryBytes;cache=new Map;totalSize=0;constructor(e,t){this.maxEntries=e,this.maxMemoryBytes=t}get(e){let t=this.cache.get(e);return t?(this.promote(e,t),t.value):null}set(e,t,n){let r=this.cache.get(e);r&&(this.totalSize-=r.approximateSize,this.cache.delete(e)),this.evictIfNeeded(n),this.cache.set(e,{value:t,approximateSize:n}),this.totalSize+=n}clear(){this.cache.clear(),this.totalSize=0}promote(e,t){this.cache.delete(e),this.cache.set(e,t)}evictIfNeeded(e){for(;(this.cache.size>=this.maxEntries||this.totalSize+e>this.maxMemoryBytes)&&this.cache.size>0;){let e=this.cache.keys().next().value;if(e===void 0)break;let t=this.cache.get(e);t&&(this.totalSize-=t.approximateSize),this.cache.delete(e)}}},bm=.16,xm=2e3,Sm=.15,Cm=.05;function wm(e,t){if(t<=0||t>=e.length)return t;let n=e.charCodeAt(t-1);return n>=55296&&n<=56319?t-1:t}function Tm(e,t){let n=(0,k.c)(10),r=g(`(prefers-reduced-motion: reduce)`),i=t&&!r,[a,o]=(0,O.useState)(e),s=(0,O.useRef)(e),c=(0,O.useRef)(e.length),l=(0,O.useRef)(e.length),u=(0,O.useRef)(0),d=(0,O.useRef)(null),f=(0,O.useRef)(Em),p=(0,O.useRef)(0),m;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>{d.current!==null&&(cancelAnimationFrame(d.current),d.current=null)},n[0]=m):m=n[0];let h=m,_;n[1]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>{d.current===null&&(d.current=requestAnimationFrame(e=>{d.current=null,f.current(e)}))},n[1]=_):_=n[1];let v=_,y,b;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{f.current=e=>{let t=p.current,n=t?Math.min((e-t)/1e3,Cm):0;p.current=e;let r=s.current,i=r.length;c.current>i&&(c.current=i);let a=i-c.current;if(a<=0){u.current=0,p.current=0;return}let d=Math.min(xm,a/bm);u.current+=(d-u.current)*Sm,c.current=Math.min(i,c.current+u.current*n);let f=wm(r,Math.floor(c.current));f!==l.current&&(l.current=f,o(f>=i?r:r.slice(0,f))),i-c.current>0?v():(u.current=0,p.current=0)}},b=[v],n[2]=y,n[3]=b):(y=n[2],b=n[3]),(0,O.useEffect)(y,b);let x,S;n[4]!==i||n[5]!==e?(x=()=>{let t=s.current,n=e.length>=t.length&&e.startsWith(t);if(s.current=e,!i||!n){h(),c.current=e.length,l.current=e.length,u.current=0,p.current=0,o(e);return}e.length>c.current&&v()},S=[i,h,v,e],n[4]=i,n[5]=e,n[6]=x,n[7]=S):(x=n[6],S=n[7]),(0,O.useEffect)(x,S);let ee,te;return n[8]===Symbol.for(`react.memo_cache_sentinel`)?(ee=()=>h,te=[h],n[8]=ee,n[9]=te):(ee=n[8],te=n[9]),(0,O.useEffect)(ee,te),i?a:e}function Em(){}function Dm(e){return e.replaceAll(`\\`,`/`)}function Om(e){return/^\/[A-Za-z]:\//.test(e)?e.slice(1):e}function km(e){return e.replace(/[\\/]+$/,``)}function Am(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t>=0?e.slice(t+1):e}function jm(e){return e.replace(/^\.\/+/,``).replace(/^\/+/,``)}function Mm(e,t){let{path:n,line:r,column:i}=ue(e),a=Om(Dm(n)),o=a;if(t){let e=Om(Dm(km(t))),n=Am(e),r=a.toLowerCase(),i=e.toLowerCase(),s=`${i}/`,c=`${n.toLowerCase()}/`;if(r===i)o=n;else if(r.startsWith(s))o=`${n}/${a.slice(e.length+1)}`;else if(!a.startsWith(`/`)){let e=jm(a);o=r.startsWith(c)?a:`${n}/${e}`}}return r?`${o}:${r}${i?`:${i}`:``}`:o}var Nm=/^[A-Za-z]:[\\/]/,Pm=/^\\\\/,Fm=/^([A-Za-z][A-Za-z0-9+.-]*):(.*)$/,Im=/^(~\/|\.{1,2}\/)/,Lm=/^[A-Za-z0-9._-]+(?:\/[A-Za-z0-9._-]+)+(?::\d+){0,2}$/,Rm=/^[A-Za-z0-9._-]+\.[A-Za-z0-9_-]+(?::\d+){0,2}$/,zm=/:\d+(?::\d+)?$/,Bm=/^\d+(?::\d+)?$/,Vm=[`/Users/`,`/home/`,`/tmp/`,`/var/`,`/etc/`,`/opt/`,`/mnt/`,`/Volumes/`,`/private/`,`/root/`];function Hm(e){try{return decodeURIComponent(e)}catch{return e}}function Um(e){let t=e.indexOf(`#`),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t):``,i=n.indexOf(`?`);return{path:i>=0?n.slice(0,i):n,hash:r}}function Wm(e,t){try{let n=new URL(e);if(n.protocol.toLowerCase()!==`file:`)return null;let r=n.pathname;if(r.length===0)return null;let i=/^\/[A-Za-z]:[\\/]/.test(r)?r.slice(1):r;return{path:t?.decodePath===!1?i:Hm(i),hash:n.hash}}catch{return null}}function Gm(e){if(!e)return null;let t=Wm(e.trim(),{decodePath:!1});return t?`${t.path}${t.hash}`:null}function Km(e){if(!e.startsWith(`/`))return!1;if(Vm.some(t=>e.startsWith(t))||zm.test(e))return!0;let t=e.slice(e.lastIndexOf(`/`)+1);return/\.[A-Za-z0-9_-]+$/.test(t)}function qm(e,t){if(!t||zm.test(e))return e;let n=t.match(/^#L(\d+)(?:C(\d+))?$/i);if(!n?.[1])return e;let r=n[1],i=n[2];return`${e}:${r}${i?`:${i}`:``}`}function Jm(e){return Nm.test(e)||Pm.test(e)||Im.test(e)?!0:e.startsWith(`/`)?Km(e):Lm.test(e)||Rm.test(e)}function Ym(e){return Im.test(e)||!e.startsWith(`/`)&&!Nm.test(e)&&!Pm.test(e)}function Xm(e){let t=e.match(Fm);if(!t)return!1;let n=t[2]??``;return n.startsWith(`//`)?!0:!Bm.test(n)}function Zm(e,t){if(!e)return null;let n=e.trim();if(n.length===0||n.startsWith(`#`))return null;let r=n.toLowerCase().startsWith(`file:`)?Wm(n):null,i=r??Um(n),a=r?i.path.trim():Hm(i.path.trim()),o=Hm(i.hash.trim());if(a.length===0||!Nm.test(a)&&!Pm.test(a)&&Xm(a)||!Jm(a))return null;let s=qm(a,o);return Ym(s)?t?le(s,t):null:s}function Qm(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t>=0?e.slice(t+1):e}function $m(e,t){let n=Zm(e,t);if(!n)return null;let{path:r,line:i,column:a}=ue(n),o=i?Number.parseInt(i,10):NaN,s=a?Number.parseInt(a,10):NaN,c=Number.isFinite(o)?o:void 0,l=Number.isFinite(s)?s:void 0;return{filePath:r,targetPath:n,displayPath:Mm(n,t),basename:Qm(r),...c===void 0?{}:{line:c},...l===void 0?{}:{column:l}}}var eh=/^([A-Za-z][A-Za-z0-9+.-]*):/,th=/^[A-Za-z]:[\\/]/;function nh(e){try{return decodeURIComponent(e)}catch{return null}}function rh(e){let t=[e.indexOf(`?`),e.indexOf(`#`)].filter(e=>e>=0).reduce((e,t)=>Math.min(e,t),e.length);return e.slice(0,t)}function ih(e){let t=e.replaceAll(`\\`,`/`),n=t.match(/^([A-Za-z]:)\//)?.[1];if(!(t.startsWith(`/`)||n!==void 0)||t.startsWith(`//`))return null;let r=[];for(let e of t.slice(n?n.length+1:1).split(`/`))if(e.length!==0&&e!==`.`){if(e===`..`){if(r.length===0)return null;r.pop();continue}r.push(e)}return`${n?`${n}/`:`/`}${r.join(`/`)}`}function ah(e){try{let t=new URL(e);if(t.protocol!==`file:`||t.hostname&&t.hostname!==`localhost`)return null;let n=nh(t.pathname);return n?/^\/[A-Za-z]:\//.test(n)?n.slice(1):n:null}catch{return null}}function oh(e,t){if(!e||!t)return null;let n=e.trim();if(!n||n.includes(`\0`))return null;let r=th.test(n)?void 0:n.match(eh)?.[1]?.toLowerCase();if(r&&r!==`file`)return null;let i=r===`file`?ah(n):nh(rh(n));if(!i)return null;let a=ih(t);if(!a)return null;let o=ih(i.startsWith(`/`)||th.test(i)?i:`${a}/${i}`);if(!o)return null;let s=th.test(a),c=s?a.toLowerCase():a,l=s?o.toLowerCase():o;if(l===c||!l.startsWith(`${c}/`))return null;let u=o.slice(a.length+1);return u.length>0?u:null}function sh(e){if(!e)return!1;let t=e.trim();return/^https:\/\//i.test(t)||/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/=\s]+$/i.test(t)}var ch=class extends O.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback:this.props.children}},lh=[],uh=(0,O.memo)(function(e){let t=(0,k.c)(12),[n,r]=(0,O.useState)(null),[i,a]=(0,O.useState)(!1),o,c;if(t[0]!==e.cwd||t[1]!==e.environmentId||t[2]!==e.relativePath?(o=()=>{let t=!0;r(null),a(!1);let n=s(e.environmentId);return n?(n.projects.readFileBinary({cwd:e.cwd,relativePath:e.relativePath}).then(e=>{t&&r(`data:${e.mimeType};base64,${e.dataBase64}`)}).catch(()=>{t&&a(!0)}),()=>{t=!1}):(a(!0),()=>{t=!1})},c=[e.cwd,e.environmentId,e.relativePath],t[0]=e.cwd,t[1]=e.environmentId,t[2]=e.relativePath,t[3]=o,t[4]=c):(o=t[3],c=t[4]),(0,O.useEffect)(o,c),i){let n=e.alt||`Image unavailable`,r;return t[5]===n?r=t[6]:(r=(0,A.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`[`,n,`]`]}),t[5]=n,t[6]=r),r}if(!n){let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,A.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`[Loading image…]`}),t[7]=e):e=t[7],e}let l;return t[8]!==e.alt||t[9]!==e.title||t[10]!==n?(l=(0,A.jsx)(`img`,{src:n,alt:e.alt,title:e.title,loading:`lazy`,decoding:`async`,draggable:!1,className:`max-h-[32rem] max-w-full rounded-lg border border-border/60 object-contain`}),t[8]=e.alt,t[9]=e.title,t[10]=n,t[11]=l):l=t[11],l}),dh=/(?:^|\s)language-([^\s]+)/,fh=new ym(500,52428800),ph=new Map;function mh(e){let t=e?.match(dh)?.[1]??`text`;return t===`gitignore`?`ini`:t}function hh(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(e=>hh(e)).join(``):(0,O.isValidElement)(e)?hh(e.props.children):``}function gh(e){let t=O.Children.toArray(e);if(t.length!==1)return null;let n=t[0];return!(0,O.isValidElement)(n)||n.type!==`code`?null:{className:n.props.className,code:hh(n.props.children)}}function _h(e,t,n){return`${_m(e).toString(36)}:${e.length}:${t}:${n}`}function vh(e,t){return Math.max(e.length*2,t.length*3)}function yh(e){let t=ph.get(e);if(t)return t;let n=Qd({themes:[fm(`dark`),fm(`light`)],langs:[e],preferredHighlighter:`shiki-js`}).catch(t=>{if(ph.delete(e),e===`text`)throw t;return yh(`text`)});return ph.set(e,n),n}function bh(e){let t=(0,k.c)(14),{code:n,children:r}=e,[i,a]=(0,O.useState)(!1),o=(0,O.useRef)(null),s;t[0]===n?s=t[1]:(s=()=>{typeof navigator>`u`||navigator.clipboard==null||navigator.clipboard.writeText(n).then(()=>{o.current!=null&&clearTimeout(o.current),a(!0),o.current=setTimeout(()=>{a(!1),o.current=null},1200)}).catch(xh)},t[0]=n,t[1]=s);let c=s,l,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=()=>()=>{o.current!=null&&(clearTimeout(o.current),o.current=null)},u=[],t[2]=l,t[3]=u):(l=t[2],u=t[3]),(0,O.useEffect)(l,u);let d=i?`Copied`:`Copy code`,f=i?`Copied`:`Copy code`,p;t[4]===i?p=t[5]:(p=i?(0,A.jsx)(m,{className:`size-3`}):(0,A.jsx)(_,{className:`size-3`}),t[4]=i,t[5]=p);let h;t[6]!==c||t[7]!==d||t[8]!==f||t[9]!==p?(h=(0,A.jsx)(`button`,{type:`button`,className:`chat-markdown-copy-button`,onClick:c,title:d,"aria-label":f,children:p}),t[6]=c,t[7]=d,t[8]=f,t[9]=p,t[10]=h):h=t[10];let g;return t[11]!==r||t[12]!==h?(g=(0,A.jsxs)(`div`,{className:`chat-markdown-codeblock leading-snug`,children:[h,r]}),t[11]=r,t[12]=h,t[13]=g):g=t[13],g}function xh(){}function Sh(e){let t=(0,k.c)(13),{className:n,code:r,themeName:i}=e,a,o,s;t[0]!==n||t[1]!==r||t[2]!==i?(o=mh(n),a=_h(r,o,i),s=fh.get(a),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s):(a=t[3],o=t[4],s=t[5]);let c=s;if(c!=null){let e;return t[6]===c?e=t[7]:(e=(0,A.jsx)(`div`,{className:`chat-markdown-shiki`,dangerouslySetInnerHTML:{__html:c}}),t[6]=c,t[7]=e),e}let l;return t[8]!==a||t[9]!==r||t[10]!==o||t[11]!==i?(l=(0,A.jsx)(Ch,{code:r,language:o,themeName:i,cacheKey:a}),t[8]=a,t[9]=r,t[10]=o,t[11]=i,t[12]=l):l=t[12],l}function Ch(e){let t=(0,k.c)(18),{code:n,language:r,themeName:i,cacheKey:a}=e,o;t[0]===r?o=t[1]:(o=yh(r),t[0]=r,t[1]=o);let s=(0,O.use)(o),c;try{let e;t[2]!==n||t[3]!==s||t[4]!==r||t[5]!==i?(e=s.codeToHtml(n,{lang:r,theme:i}),t[2]=n,t[3]=s,t[4]=r,t[5]=i,t[6]=e):e=t[6],c=e}catch(e){let a=e;console.warn(`Code highlighting failed for language "${r}", falling back to plain text.`,a instanceof Error?a.message:a);let o;t[7]!==n||t[8]!==s||t[9]!==i?(o=s.codeToHtml(n,{lang:`text`,theme:i}),t[7]=n,t[8]=s,t[9]=i,t[10]=o):o=t[10],c=o}let l=c,u,d;t[11]!==a||t[12]!==n||t[13]!==l?(u=()=>{fh.set(a,l,vh(l,n))},d=[a,n,l],t[11]=a,t[12]=n,t[13]=l,t[14]=u,t[15]=d):(u=t[14],d=t[15]),(0,O.useEffect)(u,d);let f;return t[16]===l?f=t[17]:(f=(0,A.jsx)(`div`,{className:`chat-markdown-shiki`,dangerouslySetInnerHTML:{__html:l}}),t[16]=l,t[17]=f),f}function wh(e){let t=(0,k.c)(6),{className:n,code:r,preProps:i}=e,a;t[0]!==n||t[1]!==r?(a=(0,A.jsx)(`code`,{className:n,children:r}),t[0]=n,t[1]=r,t[2]=a):a=t[2];let o;return t[3]!==i||t[4]!==a?(o=(0,A.jsx)(`pre`,{...i,children:a}),t[3]=i,t[4]=a,t[5]=o):o=t[5],o}var Th=/\[[^\]]*]\(([^)\s]+)(?:\s+["'][^"']*["'])?\)/g,Eh=`chat-markdown-file-link`,Dh=`chat-markdown-file-link-icon`,Oh=`chat-markdown-file-link-label`;function kh(e){return e.replaceAll(`\\`,`/`).split(`/`).filter(e=>e.length>0).slice(0,-1)}function Ah(e){let t=new Map;for(let n of e){let e=n.replaceAll(`\\`,`/`).split(`/`).filter(e=>e.length>0),r=e[e.length-1];if(!r)continue;let i=t.get(r)??new Set;i.add(n),t.set(r,i)}let n=new Map;for(let e of t.values()){let t=[...e];if(t.length<2)continue;let r=new Map(t.map(e=>[e,kh(e)])),i=new Map;for(let e of t){let n=r.get(e)??[],a=n.length;for(let i=1;i<=n.length;i+=1){let o=n.slice(-i).join(`/`);if(!t.some(t=>t!==e&&(r.get(t)??[]).slice(-i).join(`/`)===o)){a=i;break}}i.set(e,a)}for(let e of t){let t=r.get(e)??[];if(t.length===0)continue;let a=i.get(e)??1,o=Math.min(t.length,Math.max(a,2));n.set(e,t.slice(-o).join(`/`))}}return n}function jh(e){let t=[];for(let n of e.matchAll(Th)){let e=n[1]?.trim();e&&t.push(e)}return t}function Mh(e){return Gm(e.trim())??e.trim()}var Nh=(0,O.memo)(function(e){let t=(0,k.c)(43),{href:n,targetPath:r,displayPath:i,filePath:a,label:o,theme:s,className:c}=e,l;t[0]===r?l=t[1]:(l=()=>{let e=u();if(!e){ce.add({type:`error`,title:`Open in editor is unavailable`});return}he(e,r).catch(Rh)},t[0]=r,t[1]=l);let d=l,f=zh,p;t[2]!==i||t[3]!==d||t[4]!==r?(p=async e=>{let t=u();if(!t)return;let n=await t.contextMenu.show([{id:`open`,label:`Open in editor`},{id:`copy-relative`,label:`Copy relative path`},{id:`copy-full`,label:`Copy full path`}],e);if(n===`open`){d();return}if(n===`copy-relative`){f(i,`Relative path`);return}n===`copy-full`&&f(r,`Full path`)},t[2]=i,t[3]=d,t[4]=r,t[5]=p):p=t[5];let m=p,h;t[6]===m?h=t[7]:(h=e=>{e.preventDefault(),e.stopPropagation(),m({x:e.clientX,y:e.clientY})},t[6]=m,t[7]=h);let g=h,_=me()===`phone`,v;t[8]===m?v=t[9]:(v=e=>{m(e)},t[8]=m,t[9]=v);let y=!_,b;t[10]===y?b=t[11]:(b={disabled:y},t[10]=y,t[11]=b);let x=ge(v,b),S;t[12]===c?S=t[13]:(S=w(Eh,c),t[12]=c,t[13]=S);let ee=x.onPointerDown,te=x.onPointerMove,ne=x.onPointerUp,re=x.onPointerCancel,ie=x.onPointerLeave,ae=x.onClickCapture,oe;t[14]===d?oe=t[15]:(oe=e=>{e.preventDefault(),e.stopPropagation(),d()},t[14]=d,t[15]=oe);let C;t[16]!==g||t[17]!==x?(C=e=>{x.onContextMenu(e),!e.defaultPrevented&&g(e)},t[16]=g,t[17]=x,t[18]=C):C=t[18];let se;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(se=w(Dh,`text-current`),t[19]=se):se=t[19];let le;t[20]!==a||t[21]!==s?(le=(0,A.jsx)(Hp,{pathValue:a,kind:`file`,theme:s,className:se}),t[20]=a,t[21]=s,t[22]=le):le=t[22];let ue;t[23]===o?ue=t[24]:(ue=(0,A.jsx)(`span`,{className:Oh,children:o}),t[23]=o,t[24]=ue);let T;t[25]!==n||t[26]!==x.onClickCapture||t[27]!==x.onPointerCancel||t[28]!==x.onPointerDown||t[29]!==x.onPointerLeave||t[30]!==x.onPointerMove||t[31]!==x.onPointerUp||t[32]!==oe||t[33]!==C||t[34]!==le||t[35]!==ue||t[36]!==S?(T=(0,A.jsx)(de,{render:(0,A.jsxs)(`a`,{href:n,className:S,onPointerDown:ee,onPointerMove:te,onPointerUp:ne,onPointerCancel:re,onPointerLeave:ie,onClickCapture:ae,onClick:oe,onContextMenu:C,children:[le,ue]})}),t[25]=n,t[26]=x.onClickCapture,t[27]=x.onPointerCancel,t[28]=x.onPointerDown,t[29]=x.onPointerLeave,t[30]=x.onPointerMove,t[31]=x.onPointerUp,t[32]=oe,t[33]=C,t[34]=le,t[35]=ue,t[36]=S,t[37]=T):T=t[37];let E;t[38]===i?E=t[39]:(E=(0,A.jsx)(fe,{side:`top`,className:`max-w-[min(40rem,calc(100vw-2rem))] font-mono text-[11px] leading-tight`,children:(0,A.jsx)(`div`,{className:`markdown-file-link-tooltip-scroll overflow-x-auto whitespace-nowrap`,children:i})}),t[38]=i,t[39]=E);let _e;return t[40]!==T||t[41]!==E?(_e=(0,A.jsxs)(pe,{children:[T,E]}),t[40]=T,t[41]=E,t[42]=_e):_e=t[42],_e},Ph);function Ph(e,t){return e.href===t.href&&e.targetPath===t.targetPath&&e.displayPath===t.displayPath&&e.filePath===t.filePath&&e.label===t.label&&e.theme===t.theme&&e.className===t.className}function Fh(e){let t=(0,k.c)(3),n=!!e.isStreaming,r=Tm(e.text,n),i=(0,O.useDeferredValue)(r),a=n?i:r,o;return t[0]!==a||t[1]!==e?(o=(0,A.jsx)(Ih,{...e,text:a}),t[0]=a,t[1]=e,t[2]=o):o=t[2],o}var Ih=(0,O.memo)(function({text:e,cwd:t,environmentId:n,isStreaming:r=!1,skills:i=lh,searchHighlight:a}){h(`ChatMarkdown`);let{resolvedTheme:o}=_e(),s=fm(o),c=(0,O.useRef)({occurrenceIndex:0});c.current.occurrenceIndex=0;let l=(0,O.useRef)(void 0);l.current=a?{...a,cursor:c.current,keyPrefix:`chat-markdown`}:void 0;let u=(0,O.useMemo)(()=>{let n=new Map;for(let r of jh(e)){let e=Mh(r);if(n.has(e))continue;let i=$m(e,t);i&&n.set(e,i)}return n},[t,e]),d=(0,O.useMemo)(()=>Ah([...u.values()].map(e=>e.filePath)),[u]),f=(0,O.useCallback)(e=>Gm(e)??re(e),[]),p=(0,O.useMemo)(()=>({p({node:e,children:t,...n}){return(0,A.jsx)(`p`,{...n,children:lm(t,i,l.current)})},li({node:e,children:t,...n}){return(0,A.jsx)(`li`,{...n,children:lm(t,i,l.current)})},blockquote({node:e,children:t,...n}){return(0,A.jsx)(`blockquote`,{...n,children:lm(t,i,l.current)})},table({node:e,children:t,...n}){return(0,A.jsx)(`div`,{className:`chat-markdown-table-scroll`,children:(0,A.jsx)(`table`,{...n,children:t})})},td({node:e,children:t,...n}){return(0,A.jsx)(`td`,{...n,children:lm(t,i,l.current)})},th({node:e,children:t,...n}){return(0,A.jsx)(`th`,{...n,children:lm(t,i,l.current)})},a({node:e,href:t,...n}){let r=t?Mh(t):``,a=r?u.get(r):null;if(!a)return(0,A.jsx)(`a`,{...n,href:t,target:`_blank`,rel:`noopener noreferrer`,children:lm(n.children,i,l.current)});let s=d.get(a.filePath),c=[a.basename];return typeof s==`string`&&s.length>0&&c.push(s),a.line&&(a.line!==1||a.column)&&c.push(`L${a.line}${a.column?`:C${a.column}`:``}`),(0,A.jsx)(Nh,{href:t??a.targetPath,targetPath:a.targetPath,displayPath:a.displayPath,filePath:a.filePath,label:c.join(` · `),theme:o,className:n.className})},img({node:e,src:r,alt:i,title:a}){let o=oh(r,t);return o&&t&&n?(0,A.jsx)(uh,{environmentId:n,cwd:t,relativePath:o,alt:i??``,...a?{title:a}:{}}):sh(r)?(0,A.jsx)(`img`,{src:r,alt:i??``,title:a,loading:`lazy`,decoding:`async`,draggable:!1,referrerPolicy:`no-referrer`,className:`max-h-[32rem] max-w-full rounded-lg border border-border/60 object-contain`}):(0,A.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`[`,i||`Image unavailable`,`]`]})},pre({node:e,children:t,...n}){let i=gh(t);return i?r?i.className?.split(/\s+/).includes(`language-ryco-attachments`)?(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:`Preparing files…`}):(0,A.jsx)(bh,{code:i.code,children:(0,A.jsx)(wh,{className:i.className,code:i.code,preProps:n})}):(0,A.jsx)(bh,{code:i.code,children:(0,A.jsx)(ch,{fallback:(0,A.jsx)(`pre`,{...n,children:t}),children:(0,A.jsx)(O.Suspense,{fallback:(0,A.jsx)(`pre`,{...n,children:t}),children:(0,A.jsx)(Sh,{className:i.className,code:i.code,themeName:s})})})}):(0,A.jsx)(`pre`,{...n,children:t})}}),[s,t,n,d,r,u,o,i]);return(0,A.jsx)(`div`,{className:`chat-markdown w-full min-w-0 text-sm leading-relaxed text-foreground/80`,children:(0,A.jsx)(y,{remarkPlugins:[oe],components:p,urlTransform:f,children:e})})}),Lh=(0,O.memo)(Fh);function Rh(e){ce.add(T({type:`error`,title:`Unable to open file`,description:e instanceof Error?e.message:`An error occurred.`}))}function zh(e,t){if(typeof window>`u`||!navigator.clipboard?.writeText){ce.add(T({type:`error`,title:`Failed to copy ${t.toLowerCase()}`,description:`Clipboard API unavailable.`}));return}navigator.clipboard.writeText(e).then(()=>{ce.add({type:`success`,title:`${t} copied`,description:e})},e=>{ce.add(T({type:`error`,title:`Failed to copy ${t.toLowerCase()}`,description:e instanceof Error?e.message:`An error occurred.`}))})}var Bh=[`#f97316`,`#a855f7`,`#6366f1`,`#3b82f6`,`#0ea5e9`,`#06b6d4`,`#14b8a6`,`#22c55e`,`#84cc16`,`#eab308`,`#ef4444`,`#ec4899`,`#f43f5e`,`#8b5cf6`],Vh=5,Hh=4,Uh=20,Wh=.4,Gh=Hh-Wh*2;function Kh(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function qh(e){return Bh[Kh(e)%Bh.length]}function Jh(e){let t=qh(e),n=Kh(`avatar:${e}`),r=[];for(let e=0;e<Vh;e+=1)for(let t=0;t<Vh;t+=1){let i=t<3?t:4-t,a=e*3+i;r.push((n>>>a&1)==1)}if(!r.some(Boolean))for(let e=0;e<Vh;e+=1)r[e*Vh+2]=!0;return{color:t,cells:r}}function Yh(e){let t=(0,k.c)(12),{name:n,className:r}=e,i;t[0]===n?i=t[1]:(i=Jh(n),t[0]=n,t[1]=i);let{color:a,cells:o}=i,s;t[2]===r?s=t[3]:(s=w(`size-5 shrink-0`,r),t[2]=r,t[3]=s);let c;if(t[4]!==o||t[5]!==a){let e;t[7]===a?e=t[8]:(e=(e,t)=>{if(!e)return null;let n=Math.floor(t/Vh),r=t%Vh;return(0,A.jsx)(`rect`,{x:r*Hh+Wh,y:n*Hh+Wh,width:Gh,height:Gh,rx:.6,fill:a},`${n}-${r}`)},t[7]=a,t[8]=e),c=o.map(e),t[4]=o,t[5]=a,t[6]=c}else c=t[6];let l;return t[9]!==s||t[10]!==c?(l=(0,A.jsx)(`svg`,{viewBox:`0 0 ${Uh} ${Uh}`,className:s,role:`img`,"aria-hidden":`true`,focusable:`false`,children:c}),t[9]=s,t[10]=c,t[11]=l):l=t[11],l}function Xh(e){return`${e} ${e===1?`agent`:`agents`} active`}function Zh(e){let t=(0,k.c)(6),{count:n,className:r}=e;if(n<=0)return null;let i;t[0]===r?i=t[1]:(i=w(`absolute flex items-center justify-center rounded-full bg-info font-semibold tabular-nums text-white shadow-[0_0_0_2px_var(--color-background)]`,r),t[0]=r,t[1]=i);let a=n>99?`99+`:n,o;return t[2]!==n||t[3]!==i||t[4]!==a?(o=(0,A.jsx)(`span`,{"aria-hidden":!0,"data-live-agent-count":n,className:i,children:a}),t[2]=n,t[3]=i,t[4]=a,t[5]=o):o=t[5],o}var Qh=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n||=self).lru_map=n.lru_map||{})})(e,function(e){let t=Symbol(`newer`),n=Symbol(`older`);class r{constructor(e,t){typeof e!=`number`&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let r,a=this.limit||Number.MAX_VALUE;this._keymap.clear();let o=e[Symbol.iterator]();for(let e=o.next();!e.done;e=o.next()){let o=new i(e.value[0],e.value[1]);if(this._keymap.set(o.key,o),r?(r[t]=o,o[n]=r):this.oldest=o,r=o,a--==0)throw Error(`overflow`)}this.newest=r,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,r){var a=this._keymap.get(e);return a?(a.value=r,this._markEntryAsUsed(a),this):(this._keymap.set(e,a=new i(e,r)),this.newest?(this.newest[t]=a,a[n]=this.newest):this.oldest=a,this.newest=a,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var r=this._keymap.get(e);return r?(this._keymap.delete(r.key),r[t]&&r[n]?(r[n][t]=r[t],r[t][n]=r[n]):r[t]?(r[t][n]=void 0,this.oldest=r[t]):r[n]?(r[n][t]=void 0,this.newest=r[n]):this.oldest=this.newest=void 0,this.size--,r.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new o(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(e,n){typeof n!=`object`&&(n=this);let r=this.oldest;for(;r;)e.call(n,r.value,r.key,this),r=r[t]}toJSON(){for(var e=Array(this.size),n=0,r=this.oldest;r;)e[n++]={key:r.key,value:r.value},r=r[t];return e}toString(){for(var e=``,n=this.oldest;n;)e+=String(n.key)+`:`+n.value,n=n[t],n&&(e+=` < `);return e}}e.LRUMap=r;function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}function a(e){this.entry=e}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}};function o(e){this.entry=e}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}};function s(e){this.entry=e}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}})}))(),1),$h=Symbol(`IGNORE_RESPONSE`),eg=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`)}},tg=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled before the task completed`)}},ng=class{options;highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=vt,useTokenTransformer:r=!1,lineDiffType:i=`word-alt`,maxLineDiffLength:a=1e3,tokenizeMaxLineLength:o=1e3,preferredHighlighter:s=`shiki-js`}){this.options=e,this.preferredHighlighter=s,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:i,maxLineDiffLength:a,tokenizeMaxLineLength:o},this.fileCache=new Qh.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new Qh.default.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey==null?void 0:this.fileCache.get(e.cacheKey)}getDiffResultCache(e){return e.cacheKey==null?void 0:this.diffCache.get(e.cacheKey)}inspectCaches(){let{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??vt,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??`word-alt`,maxLineDiffLength:r=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:i=this.renderOptions.tokenizeMaxLineLength??1e3}){let{lifecycleGeneration:a}=this,o=++this.renderOptionsRequestVersion,s=()=>this.isCurrentLifecycle(a)&&this.renderOptionsRequestVersion===o;try{let a={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:i};if(this.isInitialized()||await this.initialize(),!s()||ip(a,this.renderOptions))return;let o=tf(e),c=[];if(Ot(a.theme,this.renderOptions.theme)||(c=nf(o)?Ip(o):await Lp(o)),!s())return;if(this.highlighter!=null)Dd(c,this.highlighter);else{let e=await Qd({themes:o,langs:[`text`],preferredHighlighter:this.preferredHighlighter});if(!s())return;this.highlighter=e}let l=this.setRenderOptionsOnWorkers(a,c);this.renderOptions=a,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(let e of this.themeSubscribers)e.onThemeChange();await l}catch(e){if(e instanceof eg||!s())return;throw e}}getPreferredHighlighter(){return this.preferredHighlighter}getFileRenderOptions(){let{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();let n=[];for(let r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),Error(`setRenderOptionsOnWorkers: Somehow we have an uninitialized worker`);n.push(new Promise((n,i)=>{let a=this.generateRequestId(),o={type:`set-render-options`,id:a,request:{type:`set-render-options`,id:a,renderOptions:e,resolvedThemes:t},resolve:n,reject:i,requestStart:Date.now()};this.activeTaskById.set(a,o),r.pendingSetupRequestId=a,r.worker.postMessage(o.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast??=requestAnimationFrame(this._broadcastStateChanges)}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);let e=this.getStats();for(let t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);let t=this.activeRequestByInstance.get(e);if(t!=null){let n=this.activeTaskById.get(t);ag(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0){if(this.initialized===!1){let{lifecycleGeneration:t}=this;this.initialized=new Promise((n,r)=>{(async()=>{try{let r=tf(this.renderOptions.theme),i=[];if(i=nf(r)?Ip(r):await Lp(r),!this.isCurrentLifecycle(t)){n();return}let a=[];if(a=Pp(e)?Np(e):await Fp(e),!this.isCurrentLifecycle(t)){n();return}let[o]=await Promise.all([Qd({themes:r,langs:[`text`,...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(i,a)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=o,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(e){if(e instanceof eg||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0;for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,sg(e));this.queueBroadcastStateChanges(),r(e)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}}async initializeWorkers(e,t){this.workersFailed=!1;let n=[],r=cf(),i=r>0?lf():void 0;this.workers.length>0&&this.terminateWorkers();for(let a=0;a<(this.options.poolSize??8);a++){let a=this.options.workerFactory(),o={worker:a,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set([`text`,...t.map(({name:e})=>e)]),customExtensionsVersion:0};a.addEventListener(`message`,e=>{this.handleWorkerMessage(o,e.data)}),a.addEventListener(`error`,e=>console.error(`Worker error:`,e,o)),this.workers.push(o),n.push(new Promise((n,a)=>{let s=this.generateRequestId(),c={type:`initialize`,id:s,request:{type:`initialize`,id:s,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:i==null?void 0:r,customExtensionMap:i},resolve(){o.initialized=!0,n()},reject:a,requestStart:Date.now()};this.activeTaskById.set(s,c),this.executeTask(o,c)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,this.initialized===!0&&this.queuedTasks.length!==0){for(let e=0;e<this.queuedTasks.length;){let t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}let n=ig(t),r=this.getAvailableWorker(n);if(r==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,r),this.resolveLanguagesAndExecuteTask(r,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){let n=this.getFileResultCache(t);Zf(t)||n!=null&&rf(n.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:`file`,file:t})}primeFileHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeFileHighlightCache: worker pool is not working`));let t=this.getOrCreateFileHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateFileHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}let t=this.getFileResultCache(e),n=this.getFileHighlightKey(e);if(n==null||Zf(e)||t!=null&&rf(t.options,this.getFileRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`file`?r:void 0;{let t=this.submitCacheTask({type:`file`,file:e},n);return t.type===`file`?t:void 0}}getPlainFileAST(e,t,n,r){if(this.highlighter==null){this.queueInitialization();return}return Yf(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){let n=this.getDiffResultCache(t);Mp(t)||n!=null&&ip(n.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:`diff`,diff:t})}primeDiffHighlightCache(e){if(!this.isWorkingPool())return Promise.reject(Error(`WorkerPoolManager.primeDiffHighlightCache: worker pool is not working`));let t=this.getOrCreateDiffHighlightCacheTask(e);return t==null?Promise.resolve():this.createRenderTaskCallbacks(t)}getOrCreateDiffHighlightCacheTask(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}let t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||Mp(e)||t!=null&&ip(t.options,this.getDiffRenderOptions()))return;let r=this.getTaskByHighlightKey(n);if(r!=null)return r.primeCache=!0,r.type===`diff`?r:void 0;{let t=this.submitCacheTask({type:`diff`,diff:e},n);return t.type===`diff`?t:void 0}}getPlainDiffAST(e,t,n,r,i){return this.highlighter==null?void 0:Op(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i})}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers();let e=new eg;for(let t of this.queuedTasks)this.rejectRenderTaskCallbacks(t,e);this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(e=>{console.error(e)})}cancelActiveWorkerTasks(){let e=new eg;for(let t of this.activeTaskById.values())`reject`in t?t.reject(e):ag(t)&&this.rejectRenderTaskCallbacks(t,e)}terminateWorkers(){for(let e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?`waiting`:this.initialized===!0?`initialized`:`initializing`,totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.getHighlightKeyForRequest(t),r=n==null?void 0:this.getTaskByHighlightKey(n);if(r!=null){this.detachInstanceFromQueuedTasks(e,r),this.addInstanceToTask(r,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);let i=this.generateRequestId(),a=Date.now(),{renderOptionsVersion:o}=this,s=(()=>{switch(t.type){case`file`:return{type:`file`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a};case`diff`:return{type:`diff`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,callbacks:new Set,renderOptionsVersion:o,requestStart:a}}})();this.enqueueRenderTask(s,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.generateRequestId(),r=Date.now(),{renderOptionsVersion:i}=this,a=(()=>{switch(e.type){case`file`:return{type:`file`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:i,requestStart:r};case`diff`:return{type:`diff`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,callbacks:new Set,renderOptionsVersion:i,requestStart:r}}})();return this.enqueueRenderTask(a),a}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{let r=n.filter(t=>!e.langs.has(t));if(r.length>0&&(Pp(r)?t.request.resolvedLanguages=Np(r):t.request.resolvedLanguages=await Fp(r)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch(n){this.rejectRenderTaskCallbacks(t,sg(n)),this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){let n=this.activeTaskById.get(t.id);try{if(n==null)throw $h;if(t.type===`error`){let e=Error(t.error);if(t.stack&&(e.stack=t.stack),`reject`in n)n.reject(e);else if(ag(n))this.notifyHighlightError(n,e),this.rejectRenderTaskCallbacks(n,e);else throw Error(`handleWorkerMessage: unknown task type`);throw e}switch(t.requestType){case`initialize`:if(n.type!==`initialize`)throw Error(`handleWorkerMessage: task/response dont match`);this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case`set-render-options`:if(n.type!==`set-render-options`)throw Error(`handleWorkerMessage: task/response dont match`);n.resolve();break;case`file`:{if(n.type!==`file`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!rf(i,this.getFileRenderOptions()))throw $h;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.fileCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyFileInstances(n,r,i);break}case`diff`:{if(n.type!==`diff`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!ip(i,this.getDiffRenderOptions()))throw $h;let{request:a}=n;this.syncCustomExtensionVersion(e,a),n.cacheKeyAtDispatch!=null&&this.diffCache.set(n.cacheKeyAtDispatch,{result:r,options:i}),this.resolveRenderTaskCallbacks(n),this.notifyDiffInstances(n,r,i);break}}}catch(e){e!==$h&&console.error(e,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain??(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,ag(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(ag(t)&&(this.rejectRenderTaskCallbacks(t,new tg),this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){rg(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(let n of ig(t))e.langs.add(n);try{t.type===`file`?t.cacheKeyAtDispatch=t.request.file.cacheKey:t.type===`diff`&&(t.cacheKeyAtDispatch=t.request.diff.cacheKey),e.worker.postMessage(t.request)}catch(n){console.error(`Failed to post message to worker:`,n),ag(t)?(this.notifyHighlightError(t,n),this.rejectRenderTaskCallbacks(t,sg(n))):`reject`in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;let n=cf();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=lf())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(let n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(let t of e)if(!n.langs.has(t)){r=!1;break}if(r)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case`file`:return this.getFileHighlightKey(e.file);case`diff`:return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(let t of og(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){let n=this.queuedTaskByInstance.get(e);n!=null&&n!==t&&(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){let t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.rejectRenderTaskCallbacks(e,new tg),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.rejectRenderTaskCallbacks(e,new tg),this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}createRenderTaskCallbacks(e){return new Promise((t,n)=>{e.callbacks.add({resolve:t,reject:n})})}resolveRenderTaskCallbacks(e){for(let t of e.callbacks)t.resolve();e.callbacks.clear()}rejectRenderTaskCallbacks(e,t){for(let n of e.callbacks)n.reject(t);e.callbacks.clear()}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){let t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(let e of Array.from(this.activeTaskById.values()))ag(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(let t of og(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(let t of og(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(let t of og(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(let n of og(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`file`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&dn(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`diff`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&rp(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){let t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(let e of this.queuedTasks)yield e;for(let e of this.activeTaskById.values())ag(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function rg(e){return e.type===`initialize`||e.type===`file`||e.type===`diff`}function ig(e){let t=new Set;if(e.type===`initialize`||e.type===`set-render-options`)return[];switch(e.type){case`file`:t.add(e.request.file.lang??X(e.request.file.name));break;case`diff`:t.add(e.request.diff.lang??X(e.request.diff.name)),t.add(e.request.diff.lang??X(e.request.diff.prevName??`-`))}return t.delete(`text`),Array.from(t)}function ag(e){return e?.type===`file`||e?.type===`diff`}function og(e){return e.instances}function sg(e){return e instanceof Error?e:Error(String(e))}var cg;function lg({poolOptions:e,highlighterOptions:t}){return cg??=new ng(e,t),cg}function ug(){cg!=null&&(cg.terminate(),cg=void 0)}var dg=(0,O.createContext)(void 0),fg=0;function pg({children:e,poolOptions:t,highlighterOptions:n}){let[r]=(0,O.useState)(()=>{if(!(typeof window>`u`))return lg({poolOptions:t,highlighterOptions:n})});return(0,O.useInsertionEffect)(()=>{if(r!=null)return fg++,()=>{fg--}},[r]),(0,O.useEffect)(()=>()=>{fg===0&&ug()},[]),(0,A.jsx)(dg.Provider,{value:r,children:e})}function mg(){return(0,O.useContext)(dg)}function hg(e){let t=(0,k.c)(6),n;bb0:{if(!e){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=[],t[0]=e):e=t[0],n=e;break bb0}n=e.turnDiffSummaries}let r=n,i;t[1]===r?i=t[2]:(i=c(r),t[1]=r,t[2]=i);let a=i,o;return t[3]!==a||t[4]!==r?(o={turnDiffSummaries:r,inferredCheckpointTurnCountByTurnId:a},t[3]=a,t[4]=r,t[5]=o):o=t[5],o}function gg(e){return w(`flex items-center justify-between gap-2 px-4`,a&&e!==`sheet`&&e!==`phone`?`drag-region h-[52px] border-b border-border wco:h-[env(titlebar-area-height)] wco:pr-[calc(100vw-env(titlebar-area-width)-env(titlebar-area-x)+1em)]`:`h-12 wco:max-h-[env(titlebar-area-height)]`)}function _g(e){let t=(0,k.c)(10),n=a&&e.mode!==`sheet`&&e.mode!==`phone`,r=e.mode===`inline`?`w-[42vw] min-w-[360px] max-w-[560px] shrink-0 border-l border-border`:`w-full`,i;t[0]===r?i=t[1]:(i=w(`flex h-full min-w-0 flex-col bg-background`,r),t[0]=r,t[1]=i);let o;t[2]!==e.header||t[3]!==e.mode||t[4]!==n?(o=n?(0,A.jsx)(`div`,{className:gg(e.mode),children:e.header}):(0,A.jsx)(`div`,{className:`border-b border-border`,children:(0,A.jsx)(`div`,{className:gg(e.mode),children:e.header})}),t[2]=e.header,t[3]=e.mode,t[4]=n,t[5]=o):o=t[5];let s;return t[6]!==e.children||t[7]!==i||t[8]!==o?(s=(0,A.jsxs)(`div`,{className:i,children:[o,e.children]}),t[6]=e.children,t[7]=i,t[8]=o,t[9]=s):s=t[9],s}function vg(){let e=(0,k.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,A.jsx)(E,{className:`absolute left-0 top-1/2 size-6 -translate-y-1/2 rounded-md border border-border/50`}),n=(0,A.jsx)(E,{className:`absolute right-0 top-1/2 size-6 -translate-y-1/2 rounded-md border border-border/50`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,A.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[t,n,(0,A.jsxs)(`div`,{className:`flex gap-1 overflow-hidden px-8 py-0.5`,children:[(0,A.jsx)(E,{className:`h-6 w-16 shrink-0 rounded-md`}),(0,A.jsx)(E,{className:`h-6 w-24 shrink-0 rounded-md`}),(0,A.jsx)(E,{className:`h-6 w-24 shrink-0 rounded-md phone:hidden`})]})]}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,A.jsxs)(A.Fragment,{children:[r,(0,A.jsxs)(`div`,{className:`flex shrink-0 gap-1`,children:[(0,A.jsx)(E,{className:`size-7 rounded-md`}),(0,A.jsx)(E,{className:`size-7 rounded-md`})]})]}),e[3]=i):i=e[3],i}function yg(e){let t=(0,k.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,A.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border/50 px-3 py-2`,children:[(0,A.jsx)(E,{className:`h-4 w-32 rounded-full`}),(0,A.jsx)(E,{className:`ml-auto h-4 w-20 rounded-full`})]}),t[0]=n):n=t[0];let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,A.jsxs)(`div`,{className:`space-y-2`,children:[(0,A.jsx)(E,{className:`h-3 w-full rounded-full`}),(0,A.jsx)(E,{className:`h-3 w-full rounded-full`}),(0,A.jsx)(E,{className:`h-3 w-10/12 rounded-full`}),(0,A.jsx)(E,{className:`h-3 w-11/12 rounded-full`}),(0,A.jsx)(E,{className:`h-3 w-9/12 rounded-full`})]}),t[1]=r):r=t[1];let i;t[2]===e.label?i=t[3]:(i=(0,A.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-4 px-3 py-4`,children:[r,(0,A.jsx)(`span`,{className:`sr-only`,children:e.label})]}),t[2]=e.label,t[3]=i);let a;return t[4]!==e.label||t[5]!==i?(a=(0,A.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col p-2`,children:(0,A.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border border-border/60 bg-card/25`,role:`status`,"aria-live":`polite`,"aria-label":e.label,children:[n,i]})}),t[4]=e.label,t[5]=i,t[6]=a):a=t[6],a}function bg(e){return new Worker(`/assets/worker-B0IAubm_.js`,{name:e?.name})}var xg=3,Sg=120;function Cg(e){let t=(0,k.c)(4),{themeName:n}=e,r=mg(),i,a;return t[0]!==n||t[1]!==r?(i=()=>{if(!r)return;let e=r.getDiffRenderOptions();e.theme!==n&&r.setRenderOptions({...e,theme:n}).catch(wg)},a=[n,r],t[0]=n,t[1]=r,t[2]=i,t[3]=a):(i=t[2],a=t[3]),(0,O.useEffect)(i,a),null}function wg(){}function Tg(e){let t=(0,k.c)(10),{children:n}=e,{resolvedTheme:r}=_e(),i;t[0]===r?i=t[1]:(i=fm(r),t[0]=r,t[1]=i);let a=i,o=typeof navigator>`u`?4:Math.max(1,navigator.hardwareConcurrency||4),s=Math.max(1,Math.min(xg,Math.floor(o/3))),c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c={workerFactory:Eg,poolSize:s,totalASTLRUCacheSize:Sg},t[2]=c):c=t[2];let l,u;t[3]===a?(l=t[4],u=t[5]):(l={theme:a,tokenizeMaxLineLength:1e3},u=(0,A.jsx)(Cg,{themeName:a}),t[3]=a,t[4]=l,t[5]=u);let d;return t[6]!==n||t[7]!==l||t[8]!==u?(d=(0,A.jsxs)(pg,{poolOptions:c,highlighterOptions:l,children:[u,n]}),t[6]=n,t[7]=l,t[8]=u,t[9]=d):d=t[9],d}function Eg(){return new bg}var Dg={numeric:!0,sensitivity:`base`};function Og(e){return e.replaceAll(`\\`,`/`).split(`/`).filter(e=>e.length>0)}function kg(e,t){return e.name.localeCompare(t.name,void 0,Dg)}function Ag(e){return!(`additions`in e)||typeof e.additions!=`number`||!(`deletions`in e)||typeof e.deletions!=`number`?null:{additions:e.additions,deletions:e.deletions}}function jg(e){let t=e.children.map(e=>e.kind===`directory`?jg(e):e),n={...e,children:t};for(;n.children.length===1&&n.children[0]?.kind===`directory`;){let e=n.children[0];n={kind:`directory`,name:`${n.name}/${e.name}`,path:e.path,stat:e.stat,children:e.children}}return n}function Mg(e){let t=Array.from(e.directories.values()).toSorted(kg).map(e=>({kind:`directory`,name:e.name,path:e.path,stat:{additions:e.stat.additions,deletions:e.stat.deletions},children:Mg(e)})).map(e=>jg(e)),n=e.files.toSorted(kg);return[...t,...n]}function Ng(e){return e.reduce((e,t)=>{let n=Ag(t);return n?{additions:e.additions+n.additions,deletions:e.deletions+n.deletions}:e},{additions:0,deletions:0})}function Pg(e){let t={name:``,path:``,stat:{additions:0,deletions:0},directories:new Map,files:[]};for(let n of e){let e=Og(n.path);if(e.length===0)continue;let r=n.kind===`directory`,i=Ag(n),a=[t],o=t;for(let t of r?e:e.slice(0,-1)){let e=o.path?`${o.path}/${t}`:t,n=o.directories.get(t);if(n)o=n;else{let n={name:t,path:e,stat:{additions:0,deletions:0},directories:new Map,files:[]};o.directories.set(t,n),o=n}a.push(o)}if(!r){let t=e.join(`/`),n=e.at(-1);if(!n)continue;o.files.push({kind:`file`,name:n,path:t,stat:i})}if(i)for(let e of a)e.stat.additions+=i.additions,e.stat.deletions+=i.deletions}return Mg(t)}function Fg(e){return e.additions>0||e.deletions>0}var Ig=(0,O.memo)(function(e){let t=(0,k.c)(14),{additions:n,deletions:r,showParentheses:i}=e,a=i!==void 0&&i,o;t[0]===a?o=t[1]:(o=a&&(0,A.jsx)(`span`,{className:`text-muted-foreground/70`,children:`(`}),t[0]=a,t[1]=o);let s;t[2]===n?s=t[3]:(s=(0,A.jsxs)(`span`,{className:`text-success`,children:[`+`,n]}),t[2]=n,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,A.jsx)(`span`,{className:`mx-0.5 text-muted-foreground/70`,children:`/`}),t[4]=c):c=t[4];let l;t[5]===r?l=t[6]:(l=(0,A.jsxs)(`span`,{className:`text-destructive`,children:[`-`,r]}),t[5]=r,t[6]=l);let u;t[7]===a?u=t[8]:(u=a&&(0,A.jsx)(`span`,{className:`text-muted-foreground/70`,children:`)`}),t[7]=a,t[8]=u);let d;return t[9]!==o||t[10]!==s||t[11]!==l||t[12]!==u?(d=(0,A.jsxs)(A.Fragment,{children:[o,s,c,l,u]}),t[9]=o,t[10]=s,t[11]=l,t[12]=u,t[13]=d):d=t[13],d});export{Kf as $,yt as $t,Gp as A,At,up as B,wt as Bt,im as C,gn as Ct,Yp as D,dn as Dt,Jp as E,fn as Et,bp as F,_t as Ft,ip as G,ut as Gt,yp as H,xt as Ht,cp as I,Tt as It,$f as J,ht as Jt,rp as K,dt as Kt,sp as L,Et as Lt,Hp as M,Ot as Mt,Mp as N,ft as Nt,Xp as O,ln as Ot,Op as P,st as Pt,Gf as Q,lt as Qt,vp as R,vt as Rt,rm as S,_n as St,Qp as T,mn as Tt,lp as U,ot as Ut,dp as V,St as Vt,fp as W,Dt as Wt,Zf as X,mt as Xt,tp as Y,gt as Yt,Yf as Z,pt as Zt,vm as _,$i as _t,Tg as a,xe as an,kf as at,cm as b,Nr as bt,_g as c,ke as cn,Q as ct,Zh as d,ve as dn,rf as dt,bt as en,qf as et,Xh as f,nf as ft,ym as g,gd as gt,Mm as h,Qd as ht,Ng as i,at as in,jf as it,Kp as j,kt as jt,Zp as k,jt as kt,hg as l,ye as ln,Af as lt,Lh as m,$d as mt,Fg as n,rt as nn,Ef as nt,vg as o,Oe as on,Of as ot,Yh as p,tf as pt,Qf as q,ct as qt,Pg as r,nt as rn,Nf as rt,yg as s,Se as sn,Mf as st,Ig as t,it as tn,Df as tt,dg as u,be as un,X as ut,_m as v,so as vt,qp as w,pn as wt,nm as x,vn as xt,fm as y,zr as yt,pp as z,Ct as zt};