@openchambery/web 2.0.0-beta.3 → 2.0.0-beta.5

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 (178) hide show
  1. package/dist/assets/{AgentAvatar-B_JQoreg.js → AgentAvatar-BBmQXYDq.js} +1 -1
  2. package/dist/assets/AssistantView-BG8hK4y9.js +3 -0
  3. package/dist/assets/{DiagramView-BNnda8qO.js → DiagramView-CN0qWNU5.js} +1 -1
  4. package/dist/assets/{FadeInOnReveal-VYQTSAkr.js → FadeInOnReveal-w_BQ7K7K.js} +1 -1
  5. package/dist/assets/Icon-B9kZgYZn.js +1 -0
  6. package/dist/assets/{MarkdownRenderer-CJHSsWin.js → MarkdownRenderer-Ds61--LT.js} +2 -2
  7. package/dist/assets/{MarkdownRendererImpl-DwrHFGUp.js → MarkdownRendererImpl-DOMmiOH0.js} +1 -1
  8. package/dist/assets/{MarkstreamRendererImpl-CSnbQMu3.js → MarkstreamRendererImpl-F7MGg5ER.js} +1 -1
  9. package/dist/assets/{MobileDetailNavigation-BXr6AGLT.js → MobileDetailNavigation-DcmVOjkw.js} +1 -1
  10. package/dist/assets/{MobileShareBridge-D7OE9OP_.js → MobileShareBridge-C1Fc4ErB.js} +2 -2
  11. package/dist/assets/MobileSurface-BA7eS5Yd.js +2 -0
  12. package/dist/assets/{MultiRunWindow-DF3iIFCd.js → MultiRunWindow-BoTnH6Yp.js} +1 -1
  13. package/dist/assets/{OnboardingScreen-BjHmlwlw.js → OnboardingScreen-BxItVnnO.js} +1 -1
  14. package/dist/assets/{OverlayScrollbar-DLtWO_Gp.js → OverlayScrollbar-B4e0QD05.js} +1 -1
  15. package/dist/assets/SettingsView-CjesWNLw.js +25 -0
  16. package/dist/assets/{SettingsWindow-BI5swspb.js → SettingsWindow-CReMbg-w.js} +1 -1
  17. package/dist/assets/TerminalView-C64-QYOG.js +8 -0
  18. package/dist/assets/{ToolOutputDialog-BEWhBcRd.js → ToolOutputDialog-CJu8DNrt.js} +1 -1
  19. package/dist/assets/{appThemeRegistry-4MR0F7Jz.js → appThemeRegistry-CF4lIxNt.js} +1 -1
  20. package/dist/assets/{assistant-attachment-cache-C0aRnFkj.js → assistant-attachment-cache-DphJleHr.js} +1 -1
  21. package/dist/assets/{button-DKuz3L8l.js → button-CwXyux0a.js} +1 -1
  22. package/dist/assets/collapsible-BZ6_cYJd.js +1 -0
  23. package/dist/assets/context-menu-DHrRifPE.js +1 -0
  24. package/dist/assets/{desktopHosts-CoDkOnyS.js → desktopHosts-JGFqhlaM.js} +1 -1
  25. package/dist/assets/{desktopRelayRestore-DDlVKyOE.js → desktopRelayRestore-CHEwrI93.js} +1 -1
  26. package/dist/assets/{diagram-D7T8HQgj.js → diagram-BwnPNKWt.js} +1 -1
  27. package/dist/assets/{dialog-DQYl3W_o.js → dialog-Dp0lQv5K.js} +1 -1
  28. package/dist/assets/es-DicJ8lKD.js +15 -0
  29. package/dist/assets/{fileMentionTouchSelection-BZ6ovBYH.js → fileMentionTouchSelection-DPZRxNa2.js} +3 -4
  30. package/dist/assets/{fileQueries-JrpcsOCs.js → fileQueries-DN6gbLhM.js} +1 -1
  31. package/dist/assets/fr-lhgVcBW_.js +13 -0
  32. package/dist/assets/{gitApi-CM42qUed.js → gitApi-D8R7ic-T.js} +3 -3
  33. package/dist/assets/{imageSource-CIl0FL10.js → imageSource-BMztRu0c.js} +1 -1
  34. package/dist/assets/{input-CzQy8UhV.js → input-Biw8aNzR.js} +1 -1
  35. package/dist/assets/insertionBoundaries-DdwCD4S2.js +1 -0
  36. package/dist/assets/ja-B9EZwOcw.js +15 -0
  37. package/dist/assets/ko-Dxk-uJRb.js +15 -0
  38. package/dist/assets/main-BhlwwJ2c.js +169 -0
  39. package/dist/assets/main-D2BzpnUt.css +1 -0
  40. package/dist/assets/main-DSPCkT74.js +2 -0
  41. package/dist/assets/{markdownHeightCache-Cj1I5NDw.js → markdownHeightCache-BOOrGCuG.js} +1 -1
  42. package/dist/assets/markdownTheme-DM5h1i18.js +1 -0
  43. package/dist/assets/{mcpQueries-D5mQymgM.js → mcpQueries-CE9tk-Jz.js} +1 -1
  44. package/dist/assets/miniChat-Ckk9ABql.js +2 -0
  45. package/dist/assets/mobile-cLMRZqI9.js +2 -0
  46. package/dist/assets/multirun-DVnFRb1V.js +4 -0
  47. package/dist/assets/persistence-D0y7226-.js +3 -0
  48. package/dist/assets/pl-CFhwWLJj.js +15 -0
  49. package/dist/assets/platform-D_c-T5nO.js +6 -0
  50. package/dist/assets/projectMeta-CSQgHequ.js +3 -0
  51. package/dist/assets/pt-BR-Ba6GfZ6J.js +15 -0
  52. package/dist/assets/{relay-image-stream-DM7atqJs.js → relay-image-stream-DrdVj99c.js} +1 -1
  53. package/dist/assets/renderElectronMiniChatApp-gGFkwoL_.js +2 -0
  54. package/dist/assets/renderMobileApp-B2w50kAc.js +28 -0
  55. package/dist/assets/runtime-fetch-Fs9ZV2V8.js +1 -0
  56. package/dist/assets/{runtimeConfig-BIGBRGQI.js → runtimeConfig-BHH1hJDd.js} +1 -1
  57. package/dist/assets/runtimeEndpointReset-5uJ4sJk0.js +149 -0
  58. package/dist/assets/{sessionChangeSummary-eIbpSfrO.js → sessionChangeSummary-spf_atO8.js} +2 -2
  59. package/dist/assets/{sessionLookup-myHe5ltu.js → sessionLookup-BGjjwiCq.js} +1 -1
  60. package/dist/assets/{sortable-tabs-strip-BQtmHx9r.js → sortable-tabs-strip-CTY_wG46.js} +1 -1
  61. package/dist/assets/src-BjEyU6if.css +2 -0
  62. package/dist/assets/store-DmowK-GO.js +15 -0
  63. package/dist/assets/{terminalApi-BxcdiduX.js → terminalApi-Dhqqp4xi.js} +1 -1
  64. package/dist/assets/textarea-QxsmcBGj.js +1 -0
  65. package/dist/assets/{tooltip-Cx5gTbdY.js → tooltip-CpMLl5_k.js} +1 -1
  66. package/dist/assets/uk-ChchBzy6.js +15 -0
  67. package/dist/assets/{url-CDHnjlsm.js → url-CGbJbiJq.js} +1 -1
  68. package/dist/assets/{useAppFontEffects-CNeo0aZs.js → useAppFontEffects-B1h7ab_J.js} +55 -50
  69. package/dist/assets/{useAssistantUIStore-asNG6K7n.js → useAssistantUIStore-Bz4tRflF.js} +1 -1
  70. package/dist/assets/useDesktopWindowControlsLayout-Cxsx84NO.js +1 -0
  71. package/dist/assets/{useEffectiveDirectory-B4LvR8Gt.js → useEffectiveDirectory-DsqhqsJR.js} +1 -1
  72. package/dist/assets/{useFontPreferences-CUnQ4TVm.js → useFontPreferences-Xw1vSkmC.js} +1 -1
  73. package/dist/assets/useMobileNavigationStore-B1axS4g-.js +414 -0
  74. package/dist/assets/{useRuntimeAPIs-DwLtO0c_.js → useRuntimeAPIs-DSLXJybW.js} +1 -1
  75. package/dist/assets/useSessionAutoCleanup-B5FTG_qf.js +2 -0
  76. package/dist/assets/{useThemeSystem-BlNUWH47.js → useThemeSystem-DMzWVJaW.js} +1 -1
  77. package/dist/assets/useUIStore-syVmbuDA.js +1 -0
  78. package/dist/assets/{useWorkerHighlightedLines-CJZbJDW3.js → useWorkerHighlightedLines-DC_Bc-RV.js} +1 -1
  79. package/dist/assets/{vendor-base-ui-CDjyofeD.js → vendor-base-ui-CnHfUmDN.js} +1 -1
  80. package/dist/assets/{vendor-cmdk-BFH0UpXX.js → vendor-cmdk-CeAGfrLo.js} +1 -1
  81. package/dist/assets/{vendor-dnd-kit-accessibility-BrR3AKvM.js → vendor-dnd-kit-accessibility-BY5LhhUB.js} +1 -1
  82. package/dist/assets/{vendor-dnd-kit-core-CNfdvk6H.js → vendor-dnd-kit-core-CvWxUPdb.js} +1 -1
  83. package/dist/assets/{vendor-dnd-kit-sortable-DQUaTeGj.js → vendor-dnd-kit-sortable-hHdP9lLb.js} +1 -1
  84. package/dist/assets/{vendor-framer-motion-4dogsUk3.js → vendor-framer-motion-DFy_BSVd.js} +1 -1
  85. package/dist/assets/{vendor-legendapp-list-BU7MdPZR.js → vendor-legendapp-list-WE32lwNk.js} +1 -1
  86. package/dist/assets/{vendor-markstream-react-qHC2FykU.js → vendor-markstream-react-DX55XLGO.js} +3 -3
  87. package/dist/assets/vendor-opencode-client-C12gfjag.js +12 -0
  88. package/dist/assets/{vendor-pierre-diffs-CUfqC003.js → vendor-pierre-diffs-DX7XTPG3.js} +1 -1
  89. package/dist/assets/{vendor-react-C94A0AHl.js → vendor-react-DLPElpoQ.js} +1 -1
  90. package/dist/assets/{vendor-react-drawio-FVlWqKVE.js → vendor-react-drawio-ECtEwvbc.js} +1 -1
  91. package/dist/assets/{vendor-reactuses-core-C2A3EjUi.js → vendor-reactuses-core-B8parU1Y.js} +1 -1
  92. package/dist/assets/{vendor-sonner-DNqHmUQs.js → vendor-sonner-DVzioF3d.js} +1 -1
  93. package/dist/assets/{vendor-stream-diffs-CwbKsmlv.js → vendor-stream-diffs-DWy3xSmp.js} +2 -2
  94. package/dist/assets/{vendor-tanstack-react-query-D0iFK57C.js → vendor-tanstack-react-query-D7pys_c9.js} +1 -1
  95. package/dist/assets/{vendor-tanstack-react-virtual-B2kV6cnT.js → vendor-tanstack-react-virtual-tlDgH6PG.js} +1 -1
  96. package/dist/assets/{vendor-zustand-BqLKf6ZY.js → vendor-zustand-B4dlGEM2.js} +1 -1
  97. package/dist/assets/zh-CN-Z_bkUQk5.js +15 -0
  98. package/dist/assets/zh-TW-CZeTm7kd.js +15 -0
  99. package/dist/index.html +14 -14
  100. package/dist/mini-chat.html +14 -14
  101. package/dist/mobile.html +14 -14
  102. package/package.json +3 -2
  103. package/server/index.js +38 -7
  104. package/server/lib/browser-provider/DOCUMENTATION.md +141 -0
  105. package/server/lib/browser-provider/contract.js +312 -0
  106. package/server/lib/browser-provider/host.js +421 -0
  107. package/server/lib/browser-provider/host.test.js +304 -0
  108. package/server/lib/browser-provider/routes.js +122 -0
  109. package/server/lib/browser-provider/routes.test.js +120 -0
  110. package/server/lib/browser-provider/selection-store.js +43 -0
  111. package/server/lib/browser-provider/selection-store.test.js +35 -0
  112. package/server/lib/event-stream/DOCUMENTATION.md +3 -1
  113. package/server/lib/event-stream/reasoning-projection.js +16 -1
  114. package/server/lib/event-stream/reasoning-projection.test.js +15 -0
  115. package/server/lib/notifications/DOCUMENTATION.md +3 -1
  116. package/server/lib/notifications/runtime.js +128 -31
  117. package/server/lib/notifications/runtime.test.js +103 -0
  118. package/server/lib/notifications/template-runtime.js +130 -38
  119. package/server/lib/notifications/template-runtime.test.js +96 -0
  120. package/server/lib/opencode/DOCUMENTATION.md +8 -0
  121. package/server/lib/opencode/config-entity-routes.js +6 -1
  122. package/server/lib/opencode/config-entity-routes.test.js +25 -0
  123. package/server/lib/opencode/ensure-cli.d.ts +8 -0
  124. package/server/lib/opencode/feature-routes-runtime.js +10 -0
  125. package/server/lib/opencode/feature-routes-runtime.test.js +7 -0
  126. package/server/lib/opencode/proxy.js +6 -1
  127. package/server/lib/opencode/proxy.test.js +18 -3
  128. package/server/lib/opencode/routes.js +30 -0
  129. package/server/lib/opencode/upgrade-screen.d.ts +30 -0
  130. package/server/lib/opencode/upgrade-screen.js +299 -0
  131. package/server/lib/opencode/upgrade-screen.test.js +196 -0
  132. package/server/lib/session-metadata/DOCUMENTATION.md +27 -17
  133. package/server/lib/session-metadata/opencode-session-record.d.ts +57 -0
  134. package/server/lib/session-metadata/opencode-session-record.js +316 -0
  135. package/server/lib/session-metadata/opencode-session-record.test.js +242 -0
  136. package/server/lib/session-metadata/routes.js +5 -1
  137. package/server/lib/session-metadata/session-archive.js +1 -1
  138. package/server/lib/session-metadata/session-metadata-store.d.ts +2 -0
  139. package/server/lib/session-metadata/session-metadata-store.js +63 -16
  140. package/server/lib/session-metadata/session-projection.js +26 -2
  141. package/dist/assets/AssistantView-ClQAfGOT.js +0 -3
  142. package/dist/assets/Icon-BiEQEcih.js +0 -1
  143. package/dist/assets/MobileSurface-D2jUkX9l.js +0 -2
  144. package/dist/assets/SettingsView-BRxELjow.js +0 -25
  145. package/dist/assets/TerminalView-BU3x8-fr.js +0 -8
  146. package/dist/assets/collapsible-DXbDynN4.js +0 -3
  147. package/dist/assets/context-menu-CqolsLCm.js +0 -1
  148. package/dist/assets/es-CN3E_zXj.js +0 -15
  149. package/dist/assets/fr-9zZvQZD2.js +0 -13
  150. package/dist/assets/insertionBoundaries-CtkZ9720.js +0 -1
  151. package/dist/assets/ja-Dnjk_82N.js +0 -15
  152. package/dist/assets/ko-BxCEE99C.js +0 -15
  153. package/dist/assets/main-BILgBI3B.js +0 -169
  154. package/dist/assets/main-BeveiW6F.js +0 -2
  155. package/dist/assets/main-qSeeJRW1.css +0 -1
  156. package/dist/assets/markdownTheme-CKac3wKC.js +0 -1
  157. package/dist/assets/miniChat-BgrzM3u7.js +0 -2
  158. package/dist/assets/mobile-DtYoQE8C.js +0 -2
  159. package/dist/assets/multirun-jy8dEI96.js +0 -4
  160. package/dist/assets/persistence-C9LQpiOS.js +0 -3
  161. package/dist/assets/pl-CNNsWnPM.js +0 -15
  162. package/dist/assets/platform-BQghHRfp.js +0 -6
  163. package/dist/assets/pt-BR-BZB2DJMp.js +0 -15
  164. package/dist/assets/renderElectronMiniChatApp-BGrrmeME.js +0 -2
  165. package/dist/assets/renderMobileApp-u3c4GtFC.js +0 -28
  166. package/dist/assets/runtime-fetch-zIalUnbb.js +0 -1
  167. package/dist/assets/runtimeEndpointReset-D2savkuw.js +0 -147
  168. package/dist/assets/src-CLN7Z-zx.css +0 -2
  169. package/dist/assets/store-DLCiZaA6.js +0 -15
  170. package/dist/assets/textarea-CakKvqFw.js +0 -1
  171. package/dist/assets/uk-rwQrxeYM.js +0 -15
  172. package/dist/assets/useDesktopWindowControlsLayout-DBJ56qIo.js +0 -1
  173. package/dist/assets/useMobileNavigationStore-ZHJPxlHt.js +0 -414
  174. package/dist/assets/useSessionAutoCleanup-BIVmrnYU.js +0 -2
  175. package/dist/assets/useUIStore-CQYKJnrg.js +0 -1
  176. package/dist/assets/vendor-opencode-client-BOe2qpQb.js +0 -12
  177. package/dist/assets/zh-CN-BvmBDnkD.js +0 -15
  178. package/dist/assets/zh-TW-9wcHTX0y.js +0 -15
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-stream-diffs-CwbKsmlv.js","assets/rolldown-runtime-C0FnF6B9.js","assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js","assets/vendor-katex--B5dHUyk.js"])))=>i.map(i=>d[i]);
2
- import{o as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{nt as n,rt as r,tt as i}from"./vendor-base-ui-CDjyofeD.js";import{o as a}from"./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js";import{n as o,t as s}from"./vendor-markstream-core-Cm34iPLL.js";import{a as c,i as l,n as u,r as d,t as f}from"./vendor-floating-ui-dom-BHhLtF5l.js";var p=t({EXTENDED_LANGUAGE_ICON_MAP:()=>g}),m=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M21.805 8.063a5 5 0 0 0-3.502.727A10.95 10.95 0 0 0 11 6H2.5a.5.5 0 0 0-.5.5v21a.5.5 0 0 0 .5.5H11a10.995 10.995 0 0 0 10.954-10.096 4.998 4.998 0 0 0-.149-9.841M11 24H6V10h5a7 7 0 0 1 0 14"/><circle cx="28" cy="7" r="1.5" fill="#f44336"/></svg>`,h=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M21.81 10.25c-.06-.04-.56-.43-1.64-.43-.28 0-.56.03-.84.08-.21-1.4-1.38-2.11-1.43-2.14l-.29-.17-.18.27c-.24.36-.43.77-.51 1.19-.2.8-.08 1.56.33 2.21-.49.28-1.29.35-1.46.35H2.62c-.34 0-.62.28-.62.63 0 1.15.18 2.3.58 3.38.45 1.19 1.13 2.07 2 2.61.98.6 2.59.94 4.42.94.79 0 1.61-.07 2.42-.22 1.12-.2 2.2-.59 3.19-1.16A8.3 8.3 0 0 0 16.78 16c1.05-1.17 1.67-2.5 2.12-3.65h.19c1.14 0 1.85-.46 2.24-.85.26-.24.45-.53.59-.87l.08-.24zm-17.96.99h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H3.85c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.43 0h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H6.28c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.47 0h1.75c.1 0 .17-.07.17-.16V9.5c0-.08-.06-.16-.17-.16H8.75c-.08 0-.15.07-.15.16v1.58c0 .09.06.16.15.16m2.44 0h1.77c.08 0 .15-.07.15-.16V9.5c0-.08-.06-.16-.15-.16h-1.77c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16M6.28 9h1.76c.08 0 .16-.09.16-.18V7.25c0-.09-.07-.16-.16-.16H6.28c-.09 0-.16.06-.16.16v1.57c.01.09.07.18.16.18m2.47 0h1.75c.1 0 .17-.09.17-.18V7.25c0-.09-.06-.16-.17-.16H8.75c-.08 0-.15.06-.15.16v1.57c0 .09.06.18.15.18m2.44 0h1.77c.08 0 .15-.09.15-.18V7.25c0-.09-.07-.16-.15-.16h-1.77c-.08 0-.15.06-.15.16v1.57c0 .09.07.18.15.18m0-2.28h1.77c.08 0 .15-.07.15-.16V5c0-.1-.07-.17-.15-.17h-1.77c-.08 0-.15.06-.15.17v1.56c0 .08.07.16.15.16m2.46 4.52h1.76c.09 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16h-1.76c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16"/></svg>`,g={ada:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0277bd" d="m2 12 2.9-1.07c.25-1.1.87-1.73.87-1.73a3.996 3.996 0 0 1 5.65 0l1.41 1.41 6.31-6.7c.95 3.81 0 7.62-2.33 10.69L22 19.62s-8.47 1.9-13.4-1.95c-2.63-2.06-3.22-3.26-3.59-4.52zm5.04.21c.37.37.98.37 1.35 0s.37-.97 0-1.34a.96.96 0 0 0-1.35 0c-.37.37-.37.97 0 1.34"/></svg>`,applescript:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#78909c" d="M25.425 26.498c-1.162 1.736-2.394 3.43-4.27 3.458-1.875.042-2.477-1.106-4.605-1.106-2.142 0-2.8 1.078-4.578 1.148-1.834.07-3.22-1.848-4.396-3.542C5.183 23 3.35 16.63 5.813 12.346a6.84 6.84 0 0 1 5.767-3.514c1.792-.028 3.5 1.217 4.606 1.217 1.092 0 3.164-1.497 5.334-1.273a6.5 6.5 0 0 1 5.095 2.771 6.38 6.38 0 0 0-3.01 5.334 6.18 6.18 0 0 0 3.752 5.656 15.5 15.5 0 0 1-1.932 3.961M17.432 4.1A6.36 6.36 0 0 1 21.548 2a6.13 6.13 0 0 1-1.456 4.466 5.11 5.11 0 0 1-4.13 1.988 5.98 5.98 0 0 1 1.47-4.354"/></svg>`,assembly:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff6e40" d="M8 6V2H4a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h4v-4H4V6Zm16-4v4h4v20h-4v4h4a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2Zm-4 4h-2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m-2 6V8h2v4Zm-4 6h-2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2m-2 6v-4h2v4Zm0-18c0 2 0 2-2 2v2h2v4h2V6Zm8 12c0 2 0 2-2 2v2h2v4h2v-8Z"/></svg>`,clojure:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="#64dd17" d="M123.456 129.975a507 507 0 0 0-3.54 7.846c-4.406 9.981-9.284 22.127-11.066 29.908-.64 2.77-1.037 6.205-1.03 10.013 0 1.506.081 3.09.21 4.702a58.1 58.1 0 0 0 19.98 3.559 58.2 58.2 0 0 0 18.29-2.98c-1.352-1.237-2.642-2.554-3.816-4.038-7.796-9.942-12.146-24.512-19.028-49.01m-28.784-49.39C79.782 91.08 70.039 108.387 70.002 128c.037 19.32 9.487 36.403 24.002 46.94 3.56-14.83 12.485-28.41 25.868-55.63a219 219 0 0 0-2.714-7.083c-3.708-9.3-9.059-20.102-13.834-24.993-2.435-2.555-5.389-4.763-8.652-6.648"/><path fill="#7cb342" d="M178.532 194.535c-7.683-.963-14.023-2.124-19.57-4.081a69.4 69.4 0 0 1-30.958 7.249c-38.491 0-69.693-31.198-69.698-69.7 0-20.891 9.203-39.62 23.764-52.392-3.895-.94-7.956-1.49-12.104-1.482-20.45.193-42.037 11.51-51.025 42.075-.84 4.45-.64 7.813-.64 11.8 0 60.591 49.12 109.715 109.705 109.715 37.104 0 69.882-18.437 89.732-46.633-10.736 2.675-21.06 3.955-29.902 3.982-3.314 0-6.425-.177-9.305-.53"/><path fill="#29b6f6" d="M157.922 173.271c.678.336 2.213.884 4.35 1.49 14.375-10.553 23.717-27.552 23.754-46.764h-.005c-.055-32.03-25.974-57.945-58.011-58.009a58.2 58.2 0 0 0-18.213 2.961c11.779 13.426 17.443 32.613 22.922 53.6l.01.025c.01.017 1.752 5.828 4.743 13.538 2.97 7.7 7.203 17.231 11.818 24.178 3.03 4.655 6.363 8 8.632 8.981"/><path fill="#1e88e5" d="M128.009 18.29c-36.746 0-69.25 18.089-89.16 45.826 10.361-6.49 20.941-8.83 30.174-8.747 12.753.037 22.779 3.991 27.589 6.696a51 51 0 0 1 3.345 2.131 69.4 69.4 0 0 1 28.049-5.894c38.496.004 69.703 31.202 69.709 69.698h-.006c0 19.409-7.938 36.957-20.736 49.594 3.142.352 6.492.571 9.912.554 12.15.006 25.284-2.675 35.13-10.956 6.42-5.408 11.798-13.327 14.78-25.199.584-4.586.92-9.247.92-13.991 0-60.588-49.116-109.715-109.705-109.715"/></svg>`,cobol:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M12 0h8v4h-8z"/><path fill="#0288d1" d="M16 5A11 11 0 1 1 5 16 11.01 11.01 0 0 1 16 5m0-3a14 14 0 1 0 14 14A14 14 0 0 0 16 2"/><path fill="#0288d1" d="M32 12v8h-4v-8zm-1.858 12.485-5.657 5.657-2.313-2.313 5.657-5.657zM7.514 30.143l-5.657-5.657 2.814-2.814 5.657 5.657zM12 28h8v4h-8zm15.329-17.672L21.672 4.67l2.814-2.814 5.657 5.657zM3 12v8H0v-8zm7.328-7.329L4.67 10.328 1.857 7.514l5.657-5.657zM20 10h-4a6 6 0 0 0 0 12h4v-4h-4a2 2 0 0 1 0-4h4z"/></svg>`,crystal:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path fill="#cfd8dc" d="m179.363 121.67-57.623 57.507c-.23.23-.576.346-.806.23l-78.713-21.09c-.346-.115-.577-.345-.577-.576L20.44 79.144c-.115-.345 0-.576.23-.806L78.294 20.83c.23-.23.576-.346.807-.23l78.713 21.09c.345.114.576.345.576.575l21.09 78.597c.23.346.115.577-.115.807zm-77.215-62.58-77.33 20.63c-.115 0-.23.23-.115.345l56.586 56.47c.115.115.346.115.346-.115l20.744-77.215c.115 0-.115-.23-.23-.116z"/></svg>`,dart:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#4fc3f7" d="M16.83 2a1.3 1.3 0 0 0-.916.377l-.013.01L7.323 7.34l8.556 8.55v.005l10.283 10.277 1.96-3.529-7.068-16.96-3.299-3.297A1.3 1.3 0 0 0 16.828 2Z"/><path fill="#01579b" d="m7.343 7.32-4.955 8.565-.01.013a1.297 1.297 0 0 0 .004 1.835l.005.005 4.106 4.107 16.064 6.314 3.632-2.015-.098-.098-.025.002L15.995 15.97h-.012z"/><path fill="#01579b" d="m7.321 7.324 8.753 8.755h.013L26.16 26.156l3.835-.73L30 14.089l-4.049-3.965a6.5 6.5 0 0 0-3.618-1.612l.002-.043L7.323 7.325Z"/><path fill="#64b5f6" d="m7.332 7.335 8.758 8.75v.013l10.079 10.071L25.436 30H14.09l-3.967-4.048a6.5 6.5 0 0 1-1.611-3.618l-.045.004Z"/></svg>`,dlang:m,d:m,docker:h,dockerfile:h,elixir:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#9575cd" d="M12.173 22.681c-3.86 0-6.99-3.64-6.99-8.13 0-3.678 2.773-8.172 4.916-10.91 1.014-1.296 2.93-2.322 2.93-2.322s-.982 5.239 1.683 7.319c2.366 1.847 4.106 4.25 4.106 6.363 0 4.232-2.784 7.68-6.645 7.68"/></svg>`,erlang:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path fill="#f44336" d="M5.207 4.33q-.072.075-.143.153Q1.5 8.476 1.5 15.33c0 4.418 1.155 7.862 3.459 10.34h19.415c2.553-1.152 4.127-3.43 4.127-3.43l-3.147-2.52L23.9 21.1c-.867.773-.845.931-2.315 1.78-1.495.674-3.04.966-4.634.966-2.515 0-4.423-.909-5.723-2.059-1.286-1.15-1.985-4.511-2.096-6.68l17.458.067-.183-1.472s-.847-7.129-2.541-9.372zm8.76.846c1.565 0 3.22.535 3.961 1.471.74.937.931 1.667.973 3.524H9.11c.112-1.955.436-2.81 1.373-3.698.936-.887 2.03-1.297 3.484-1.297"/></svg>`,fortran:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="M6 4v2h3a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6v2h12v-2h-3a1 1 0 0 1-1-1v-9h4a2 2 0 0 1 2 2v2h2V10h-2v2a2 2 0 0 1-2 2h-4V6h6a4 4 0 0 1 4 4h2V4Z"/></svg>`,groovy:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#26c6da" d="M19.322 2a6.5 6.5 0 0 1 4.352 1.419 4.55 4.55 0 0 1 1.685 3.662 5.82 5.82 0 0 1-1.886 4.275 6.04 6.04 0 0 1-4.34 1.846 4.15 4.15 0 0 1-2.385-.649 1.91 1.91 0 0 1-.936-1.603 1.6 1.6 0 0 1 .356-1.024 1.1 1.1 0 0 1 .861-.447q.469 0 .468.504a.79.79 0 0 0 .358.693 1.43 1.43 0 0 0 .826.245 3.1 3.1 0 0 0 2.39-1.573 5.66 5.66 0 0 0 1.154-3.39 2.64 2.64 0 0 0-.891-2.064 3.28 3.28 0 0 0-2.293-.812 6.18 6.18 0 0 0-4.086 1.736 12.9 12.9 0 0 0-3.215 4.557 13.4 13.4 0 0 0-1.233 5.36 5.86 5.86 0 0 0 1.091 3.723 3.53 3.53 0 0 0 2.905 1.372q3.058 0 5.848-4.002l2.935-.388q.546-.07.545.246a8 8 0 0 1-.423 1.24q-.421 1.097-1.152 3.668A12.7 12.7 0 0 0 26 17.72v1.66a14.2 14.2 0 0 1-4.055 2.57 10.38 10.38 0 0 1-2.764 5.931 6.7 6.7 0 0 1-4.806 2.11 3.3 3.3 0 0 1-2.012-.55 1.8 1.8 0 0 1-.718-1.514q0-2.685 5.634-5.212.532-1.766 1.152-3.507a8.6 8.6 0 0 1-2.853 2.323 7.4 7.4 0 0 1-3.48 1.01 5.46 5.46 0 0 1-4.366-2.093A8.1 8.1 0 0 1 6 15.122a11.6 11.6 0 0 1 1.966-6.426 14.7 14.7 0 0 1 5.162-4.862A12.44 12.44 0 0 1 19.322 2m-2.407 22.17q-4.055 1.875-4.054 3.695a.87.87 0 0 0 .999.97q1.964 0 3.055-4.665"/></svg>`,haskell:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><g stroke-width="2.422"><path fill="#ef5350" d="m23.928 240.5 59.94-89.852-59.94-89.855h44.955l59.94 89.855-59.94 89.852z"/><path fill="#ffa726" d="m83.869 240.5 59.94-89.852-59.94-89.855h44.955l119.88 179.71h-44.95l-37.46-56.156-37.468 56.156z"/><path fill="#ffee58" d="m228.72 188.08-19.98-29.953h69.93v29.956h-49.95zm-29.97-44.924-19.98-29.953h99.901v29.953z"/></g></svg>`,julia:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><g transform="translate(.21 -247.01)"><circle cx="13.497" cy="281.63" r="9.555" fill="#c62828"/><circle cx="36.081" cy="281.63" r="9.555" fill="#7e57c2"/><circle cx="24.722" cy="262.39" r="9.555" fill="#388e3c"/></g></svg>`,lisp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ef5350" d="M16 2a14 14 0 1 0 14 14A14.003 14.003 0 0 0 16 2m8.93 20.43a11 11 0 0 1-7.19 4.43 6.094 6.094 0 0 1-4.79-5.9v-.05a5 5 0 0 1 .04-.66 7.95 7.95 0 0 1 2.3-4.95 5.99 5.99 0 0 0-2.23-9.9 11.004 11.004 0 0 1 11.87 17.03"/></svg>`,lua:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="M30 6a3.86 3.86 0 0 1-1.167 2.833 4.024 4.024 0 0 1-5.666 0A3.86 3.86 0 0 1 22 6a3.86 3.86 0 0 1 1.167-2.833 4.024 4.024 0 0 1 5.666 0A3.86 3.86 0 0 1 30 6m-9.208 5.208A10.6 10.6 0 0 0 13 8a10.6 10.6 0 0 0-7.792 3.208A10.6 10.6 0 0 0 2 19a10.6 10.6 0 0 0 3.208 7.792A10.6 10.6 0 0 0 13 30a10.6 10.6 0 0 0 7.792-3.208A10.6 10.6 0 0 0 24 19a10.6 10.6 0 0 0-3.208-7.792m-1.959 7.625a4.024 4.024 0 0 1-5.666 0 4.024 4.024 0 0 1 0-5.666 4.024 4.024 0 0 1 5.666 0 4.024 4.024 0 0 1 0 5.666"/></svg>`,nim:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M6 24h20v2a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2zM30 6l-9 9-5-11-5 11-9-9 4 14h20z"/></svg>`,objectivec:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>`,objectivecpp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,ocaml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12.019 15.021.003-.008c-.005-.021-.006-.026-.003.008"/><path fill="#ff9800" d="M4.51 3.273a2.523 2.523 0 0 0-2.524 2.523V11.3c.361-.13.88-.898 1.043-1.085.285-.327.337-.743.478-1.006C3.83 8.612 3.886 8.2 4.62 8.2c.342 0 .478.08.71.39.16.216.438.615.568.882.15.307.396.724.503.808q.122.095.233.137c.119.044.218-.037.297-.1.102-.082.145-.247.24-.467.135-.317.283-.697.367-.83.146-.23.195-.501.352-.633.232-.195.535-.208.618-.225.466-.092.677.225.907.43.15.133.355.403.5.765.114.283.26.544.32.707.059.158.203.41.289.713.077.275.286.486.365.616 0 0 .121.34.858.65.16.067.482.176.674.246.32.116.63.101 1.025.054.281 0 .434-.408.562-.734.075-.193.148-.745.197-.902.048-.153-.064-.27.031-.405.112-.156.178-.164.242-.368.138-.436.936-.458 1.384-.458.374 0 .327.363.96.239.364-.072.714.046 1.1.149.324.086.63.184.812.398.119.139.412.834.113.863.029.035.05.099.104.134-.067.262-.357.075-.518.041-.217-.045-.37.007-.583.101-.363.162-.894.143-1.21.407-.27.223-.269.721-.394 1 0 0-.348.895-1.106 1.443-.194.14-.574.477-1.4.605a5.3 5.3 0 0 1-1.1.043c-.186-.009-.362-.018-.549-.02-.11-.002-.48-.013-.461.022l-.041.103.024.138c.015.083.019.149.022.225.006.157-.013.32-.005.478.017.328.138.627.154.958.017.368.199.758.375 1.059.067.114.169.128.213.269.052.161.003.333.028.505.1.668.292 1.366.592 1.97l.008.014c.371-.062.743-.196 1.226-.267.885-.132 2.115-.064 2.906-.138 2-.188 3.085.82 4.882.407V5.796a2.523 2.523 0 0 0-2.523-2.523zm-.907 11.144q-.022 0-.046.003c-.159.025-.313.08-.412.24-.08.13-.108.355-.164.505-.064.175-.176.338-.274.505-.18.305-.504.581-.644.879-.028.06-.053.13-.076.2v3.402c.163.028.333.062.524.113 1.407.375 1.75.407 3.13.25l.13-.018c.105-.22.187-.968.255-1.2.054-.178.127-.32.155-.5.026-.173-.003-.337-.017-.493-.04-.393.285-.533.44-.87.14-.304.22-.651.336-.963.11-.298.284-.721.579-.872-.036-.041-.617-.06-.772-.076a5 5 0 0 1-.5-.07c-.314-.064-.656-.126-.965-.2a10 10 0 0 1-.947-.328c-.298-.138-.503-.497-.732-.507m5.737.83c-.74.149-.97.876-1.32 1.451-.192.319-.396.59-.548.928-.14.312-.128.657-.368.924a2.55 2.55 0 0 0-.528.922c-.023.067-.088.776-.158.943l1.101-.078c1.026.07.73.464 2.332.378l2.529-.078a7 7 0 0 0-.228-.588c-.07-.147-.16-.434-.218-.56a3.5 3.5 0 0 0-.309-.526c-.184-.215-.227-.23-.28-.503-.095-.473-.344-1.33-.637-1.923-.151-.306-.403-.562-.634-.784-.2-.195-.655-.522-.734-.505z"/></svg>`,perl:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ba68c8" d="M11.057 2.981c.537.735.028 1.653.141 2.472a3.42 3.42 0 0 1-1.03 2.415c-1.414 1.625-3.165 3.038-4.097 5.03a5.28 5.28 0 0 0 1.412 5.847c.706.735 1.54 1.342 2.472 1.738.17.805-1.088.184-1.455 0A6.7 6.7 0 0 1 4.361 16.4a5.44 5.44 0 0 1 .904-5.368c1.272-1.61 3.136-2.543 4.662-3.857.565-.55 1.003-1.3.932-2.119.156-.678-.254-1.469.212-2.09zm-.07 18.929c-.17.198-.467.325-.495.24-.042-.085.212-.127.381-.325.17-.183.127-.522.24-.522.1 0 .043.395-.14.607zm2.16 0c.17.198.453.31.495.24.028-.085-.212-.141-.395-.339-.156-.184-.113-.523-.24-.523-.085 0-.029.41.14.608zm-1.03.48c-.1 0-.071-.296-.071-.65 0-.367-.028-.663.07-.663.085 0 .057.296.057.663 0 .354.014.65-.057.65m-.495-20.765c.34.24.254 2.077.254 3.136 0 1.653.184 3.376-.805 4.916-.96 1.497-2.048 3.108-1.95 4.972.1 1.837.99 3.504 2.148 5.043.664.876-.353.509-.876.085a7.2 7.2 0 0 1-2.755-5.664c.142-1.907 1.597-3.348 2.628-4.803.805-1.13 1.186-1.879 1.215-3.645.028-1.412-.142-3.531.042-3.983.014-.043.07-.1.099-.057m.537 2.232c-.085 0-.043.396.028.72.424 2.26-.198 4.52-.749 6.682a12.77 12.77 0 0 0 .283 7.826c.607 1.568 1.71.791 2.161 1.568.34.593 1.272.198 1.978-.141 2.232-1.102 4.012-3.108 4.11-5.566.029-.494 0-.989-.07-1.497-.283-1.837-1.78-3.065-3.15-4.083-1.215-.89-2.74-1.483-3.659-2.613-.523-.65-.297-1.638-.381-2.458-.043-.452-.255-.042-.382-.268-.084-.127-.14-.17-.17-.17zm.72 3.616c.057 0 .17.071.325.226a20 20 0 0 0 2.161 1.921c1.272.961 2.43 2.091 2.967 3.504.339.875.339 1.836.226 2.74-.184 1.384-1.187 2.444-2.119 3.404-.339.354-1.06.791-1.074.678-.084-.367.763-1.172 1.159-1.695A5.93 5.93 0 0 0 16 10.962c-1.102-1.214-2.317-1.907-2.995-3.08-.14-.253-.183-.409-.113-.409z"/></svg>`,prolog:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ef5350" d="M12 15.385a5.1 5.1 0 0 0 1.862 1.693L12 18.94l-1.862-1.862A5.04 5.04 0 0 0 12 15.385m4.232-4.063a1.693 1.693 0 0 0-1.693 1.693 1.693 1.693 0 0 0 1.693 1.693 1.693 1.693 0 0 0 1.693-1.693c0-.94-.762-1.693-1.693-1.693m-8.464 0a1.693 1.693 0 0 0-1.693 1.693 1.693 1.693 0 0 0 1.693 1.693 1.693 1.693 0 0 0 1.693-1.693c0-.94-.762-1.693-1.693-1.693m8.464-2.116a3.385 3.385 0 0 1 3.385 3.386 3.385 3.385 0 0 1-3.385 3.385 3.385 3.385 0 0 1-3.386-3.385 3.385 3.385 0 0 1 3.386-3.386m-8.464 0a3.385 3.385 0 0 1 3.386 3.386 3.385 3.385 0 0 1-3.386 3.385 3.385 3.385 0 0 1-3.385-3.385 3.385 3.385 0 0 1 3.385-3.386M3.74 2.69c1.49 3.132.415 5.468-.584 7.787a5.1 5.1 0 0 0-.465 2.116 5.08 5.08 0 0 0 5.078 5.078 6 6 0 0 0 .533-.042l2.506 2.505L12 21.31l1.194-1.177 2.505-2.505c.178.025.355.034.533.042a5.08 5.08 0 0 0 5.078-5.078 5.1 5.1 0 0 0-.465-2.116c-.999-2.319-2.074-4.655-.584-7.787-2.235 1.744-5.417 3.123-8.26 3.132-2.845-.008-6.027-1.388-8.261-3.132z"/></svg>`,r:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1976d2" d="M11.956 4.05c-5.694 0-10.354 3.106-10.354 6.947 0 3.396 3.686 6.212 8.531 6.813v2.205h3.53V17.82c.88-.093 1.699-.259 2.475-.497l1.43 2.692h3.996l-2.402-4.048c1.936-1.263 3.147-3.034 3.147-4.97 0-3.841-4.659-6.947-10.354-6.947m1.584 2.712c4.349 0 7.558 1.45 7.558 4.753 0 1.77-.952 3.013-2.505 3.779a1 1 0 0 1-.228-.156c-.373-.165-.994-.352-.994-.352s3.085-.227 3.085-3.302-3.23-3.127-3.23-3.127h-7.092v7.413c-2.64-.766-4.462-2.392-4.462-4.255 0-2.63 3.52-4.753 7.868-4.753m.156 4.12h2.143s.983-.05.983.974c0 1.004-.983 1.004-.983 1.004h-2.143v-1.977m-.031 4.566h.952c.186 0 .28.052.445.207.135.103.28.3.404.476-.57.073-1.17.104-1.801.104z"/></svg>`,scala:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="m6.457 9.894 12.523 5.163-.456 1.211L6 11.105Zm7.02-3.091L26 11.966l-.457 1.21L13.02 8.015ZM6.465 18.885l12.524 5.163-.457 1.21L6.01 20.097Zm7.007-3.086 12.524 5.163-.456 1.21-12.524-5.162Z"/><path fill="#f44336" d="M6 24.07V30l19.997-3.106V20.96zM6 5.11v5.99l20-3.11V2zm0 9.96v5.03l20-3.11v-5.03z"/></svg>`,solidity:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="#0288d1"><path d="m5.747 14.046 6.254 8.61 6.252-8.61-6.254 3.807z"/><path d="M11.999 1.343 5.747 11.83l6.252 3.807 6.253-3.807z"/></g></svg>`,svelte:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><path fill="#ff5722" d="M175.94 24.328c-13.037.252-26.009 3.872-37.471 11.174L79.912 72.818a67.13 67.13 0 0 0-30.355 44.906 70.8 70.8 0 0 0 6.959 45.445 67.2 67.2 0 0 0-10.035 25.102 71.54 71.54 0 0 0 12.236 54.156c23.351 33.41 69.468 43.311 102.81 22.07l58.559-37.158a67.36 67.36 0 0 0 30.355-44.906 70.77 70.77 0 0 0-6.982-45.422 67.65 67.65 0 0 0 10.059-25.102 71.63 71.63 0 0 0-12.236-54.156v-.18c-15.324-21.925-40.453-33.727-65.342-33.246zm5.137 28.68a46.5 46.5 0 0 1 36.09 19.969 42.98 42.98 0 0 1 7.365 32.557 45 45 0 0 1-1.393 5.455l-1.123 3.37-2.986-2.247a75.9 75.9 0 0 0-22.902-11.45l-2.244-.651.201-2.246a13.16 13.16 0 0 0-2.379-8.711 13.99 13.99 0 0 0-14.953-5.412 12.8 12.8 0 0 0-3.594 1.572l-58.578 37.25a12.24 12.24 0 0 0-5.502 8.15 13.1 13.1 0 0 0 2.246 9.834 14.03 14.03 0 0 0 14.93 5.569 13.5 13.5 0 0 0 3.594-1.573l22.453-14.234a41.8 41.8 0 0 1 11.898-5.232 46.48 46.48 0 0 1 49.914 18.502 43.02 43.02 0 0 1 7.363 32.557 40.42 40.42 0 0 1-18.254 27.078l-58.58 37.316a43 43 0 0 1-11.898 5.23A46.545 46.545 0 0 1 82.81 227.14a42.98 42.98 0 0 1-7.341-32.557 38 38 0 0 1 1.39-5.41l1.102-3.37 3.008 2.246a75.9 75.9 0 0 0 22.836 11.361l2.244.65-.201 2.247a13.25 13.25 0 0 0 2.447 8.644 14.03 14.03 0 0 0 15.043 5.569 13.1 13.1 0 0 0 3.592-1.573l58.467-37.316a12.17 12.17 0 0 0 5.502-8.173 12.96 12.96 0 0 0-2.246-9.811 14.03 14.03 0 0 0-15.043-5.568 12.8 12.8 0 0 0-3.592 1.57l-22.453 14.258a42.9 42.9 0 0 1-11.877 5.209 46.52 46.52 0 0 1-49.846-18.5 43.02 43.02 0 0 1-7.297-32.557A40.42 40.42 0 0 1 96.798 96.98l58.646-37.316a42.8 42.8 0 0 1 11.811-5.21 46.5 46.5 0 0 1 13.822-1.444z"/></svg>`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>`,swift:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff6e40" d="M17.087 19.721c-2.36 1.36-5.59 1.5-8.86.1a13.8 13.8 0 0 1-6.23-5.32c.67.55 1.46 1 2.3 1.4 3.37 1.57 6.73 1.46 9.1 0-3.37-2.59-6.24-5.96-8.37-8.71-.45-.45-.78-1.01-1.12-1.51 8.28 6.05 7.92 7.59 2.41-1.01 4.89 4.94 9.43 7.74 9.43 7.74.16.09.25.16.36.22.1-.25.19-.51.26-.78.79-2.85-.11-6.12-2.08-8.81 4.55 2.75 7.25 7.91 6.12 12.24-.03.11-.06.22-.05.39 2.24 2.83 1.64 5.78 1.35 5.22-1.21-2.39-3.48-1.65-4.62-1.17"/></svg>`,terraform:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#5c6bc0" d="m2 10 8 4V6L2 2zm10 5 8 4v-8l-8-4zm0 11 8 4v-8l-8-4zm10-14v8l8-4V8z"/></svg>`,vbnet:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`},_=e(r(),1),v=n(),y=Object.create,b=Object.defineProperty,x=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,C=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,T=(e,t)=>function(){return t||(0,e[S(e)[0]])((t={exports:{}}).exports,t),t.exports},E=e=>{let t={};for(var n in e)b(t,n,{get:e[n],enumerable:!0});return t},D=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=S(t),a=0,o=i.length,s;a<o;a++)s=i[a],!w.call(e,s)&&s!==n&&b(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=x(t,s))||r.enumerable});return e},O=(e,t,n)=>(n=e==null?{}:y(C(e)),D(t||!e||!e.__esModule?b(n,`default`,{value:e,enumerable:!0}):n,e));function k(e,t,n,r){let i=Number(e[t].meta.id+1).toString(),a=``;return typeof r.docId==`string`&&(a=`-${r.docId}-`),a+i}function A(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function j(e,t,n,r,i){let a=i.rules.footnote_anchor_name(e,t,n,r,i),o=i.rules.footnote_caption(e,t,n,r,i),s=a;return e[t].meta.subId>0&&(s+=`:${e[t].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${a}" id="fnref${s}">${o}</a></sup>`}function M(e,t,n){return(n.xhtmlOut?`<hr class="footnotes-sep" />
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-stream-diffs-DWy3xSmp.js","assets/rolldown-runtime-C0FnF6B9.js","assets/vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js","assets/vendor-katex--B5dHUyk.js"])))=>i.map(i=>d[i]);
2
+ import{o as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{nt as n,rt as r,tt as i}from"./vendor-base-ui-CnHfUmDN.js";import{o as a}from"./vendor-aparajita-capacitor-secure-storage-CjQdwfjS.js";import{n as o,t as s}from"./vendor-markstream-core-Cm34iPLL.js";import{a as c,i as l,n as u,r as d,t as f}from"./vendor-floating-ui-dom-BHhLtF5l.js";var p=t({EXTENDED_LANGUAGE_ICON_MAP:()=>g}),m=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M21.805 8.063a5 5 0 0 0-3.502.727A10.95 10.95 0 0 0 11 6H2.5a.5.5 0 0 0-.5.5v21a.5.5 0 0 0 .5.5H11a10.995 10.995 0 0 0 10.954-10.096 4.998 4.998 0 0 0-.149-9.841M11 24H6V10h5a7 7 0 0 1 0 14"/><circle cx="28" cy="7" r="1.5" fill="#f44336"/></svg>`,h=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M21.81 10.25c-.06-.04-.56-.43-1.64-.43-.28 0-.56.03-.84.08-.21-1.4-1.38-2.11-1.43-2.14l-.29-.17-.18.27c-.24.36-.43.77-.51 1.19-.2.8-.08 1.56.33 2.21-.49.28-1.29.35-1.46.35H2.62c-.34 0-.62.28-.62.63 0 1.15.18 2.3.58 3.38.45 1.19 1.13 2.07 2 2.61.98.6 2.59.94 4.42.94.79 0 1.61-.07 2.42-.22 1.12-.2 2.2-.59 3.19-1.16A8.3 8.3 0 0 0 16.78 16c1.05-1.17 1.67-2.5 2.12-3.65h.19c1.14 0 1.85-.46 2.24-.85.26-.24.45-.53.59-.87l.08-.24zm-17.96.99h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H3.85c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.43 0h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H6.28c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.47 0h1.75c.1 0 .17-.07.17-.16V9.5c0-.08-.06-.16-.17-.16H8.75c-.08 0-.15.07-.15.16v1.58c0 .09.06.16.15.16m2.44 0h1.77c.08 0 .15-.07.15-.16V9.5c0-.08-.06-.16-.15-.16h-1.77c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16M6.28 9h1.76c.08 0 .16-.09.16-.18V7.25c0-.09-.07-.16-.16-.16H6.28c-.09 0-.16.06-.16.16v1.57c.01.09.07.18.16.18m2.47 0h1.75c.1 0 .17-.09.17-.18V7.25c0-.09-.06-.16-.17-.16H8.75c-.08 0-.15.06-.15.16v1.57c0 .09.06.18.15.18m2.44 0h1.77c.08 0 .15-.09.15-.18V7.25c0-.09-.07-.16-.15-.16h-1.77c-.08 0-.15.06-.15.16v1.57c0 .09.07.18.15.18m0-2.28h1.77c.08 0 .15-.07.15-.16V5c0-.1-.07-.17-.15-.17h-1.77c-.08 0-.15.06-.15.17v1.56c0 .08.07.16.15.16m2.46 4.52h1.76c.09 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16h-1.76c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16"/></svg>`,g={ada:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0277bd" d="m2 12 2.9-1.07c.25-1.1.87-1.73.87-1.73a3.996 3.996 0 0 1 5.65 0l1.41 1.41 6.31-6.7c.95 3.81 0 7.62-2.33 10.69L22 19.62s-8.47 1.9-13.4-1.95c-2.63-2.06-3.22-3.26-3.59-4.52zm5.04.21c.37.37.98.37 1.35 0s.37-.97 0-1.34a.96.96 0 0 0-1.35 0c-.37.37-.37.97 0 1.34"/></svg>`,applescript:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#78909c" d="M25.425 26.498c-1.162 1.736-2.394 3.43-4.27 3.458-1.875.042-2.477-1.106-4.605-1.106-2.142 0-2.8 1.078-4.578 1.148-1.834.07-3.22-1.848-4.396-3.542C5.183 23 3.35 16.63 5.813 12.346a6.84 6.84 0 0 1 5.767-3.514c1.792-.028 3.5 1.217 4.606 1.217 1.092 0 3.164-1.497 5.334-1.273a6.5 6.5 0 0 1 5.095 2.771 6.38 6.38 0 0 0-3.01 5.334 6.18 6.18 0 0 0 3.752 5.656 15.5 15.5 0 0 1-1.932 3.961M17.432 4.1A6.36 6.36 0 0 1 21.548 2a6.13 6.13 0 0 1-1.456 4.466 5.11 5.11 0 0 1-4.13 1.988 5.98 5.98 0 0 1 1.47-4.354"/></svg>`,assembly:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff6e40" d="M8 6V2H4a2 2 0 0 0-2 2v24a2 2 0 0 0 2 2h4v-4H4V6Zm16-4v4h4v20h-4v4h4a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2Zm-4 4h-2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m-2 6V8h2v4Zm-4 6h-2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2m-2 6v-4h2v4Zm0-18c0 2 0 2-2 2v2h2v4h2V6Zm8 12c0 2 0 2-2 2v2h2v4h2v-8Z"/></svg>`,clojure:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256"><path fill="#64dd17" d="M123.456 129.975a507 507 0 0 0-3.54 7.846c-4.406 9.981-9.284 22.127-11.066 29.908-.64 2.77-1.037 6.205-1.03 10.013 0 1.506.081 3.09.21 4.702a58.1 58.1 0 0 0 19.98 3.559 58.2 58.2 0 0 0 18.29-2.98c-1.352-1.237-2.642-2.554-3.816-4.038-7.796-9.942-12.146-24.512-19.028-49.01m-28.784-49.39C79.782 91.08 70.039 108.387 70.002 128c.037 19.32 9.487 36.403 24.002 46.94 3.56-14.83 12.485-28.41 25.868-55.63a219 219 0 0 0-2.714-7.083c-3.708-9.3-9.059-20.102-13.834-24.993-2.435-2.555-5.389-4.763-8.652-6.648"/><path fill="#7cb342" d="M178.532 194.535c-7.683-.963-14.023-2.124-19.57-4.081a69.4 69.4 0 0 1-30.958 7.249c-38.491 0-69.693-31.198-69.698-69.7 0-20.891 9.203-39.62 23.764-52.392-3.895-.94-7.956-1.49-12.104-1.482-20.45.193-42.037 11.51-51.025 42.075-.84 4.45-.64 7.813-.64 11.8 0 60.591 49.12 109.715 109.705 109.715 37.104 0 69.882-18.437 89.732-46.633-10.736 2.675-21.06 3.955-29.902 3.982-3.314 0-6.425-.177-9.305-.53"/><path fill="#29b6f6" d="M157.922 173.271c.678.336 2.213.884 4.35 1.49 14.375-10.553 23.717-27.552 23.754-46.764h-.005c-.055-32.03-25.974-57.945-58.011-58.009a58.2 58.2 0 0 0-18.213 2.961c11.779 13.426 17.443 32.613 22.922 53.6l.01.025c.01.017 1.752 5.828 4.743 13.538 2.97 7.7 7.203 17.231 11.818 24.178 3.03 4.655 6.363 8 8.632 8.981"/><path fill="#1e88e5" d="M128.009 18.29c-36.746 0-69.25 18.089-89.16 45.826 10.361-6.49 20.941-8.83 30.174-8.747 12.753.037 22.779 3.991 27.589 6.696a51 51 0 0 1 3.345 2.131 69.4 69.4 0 0 1 28.049-5.894c38.496.004 69.703 31.202 69.709 69.698h-.006c0 19.409-7.938 36.957-20.736 49.594 3.142.352 6.492.571 9.912.554 12.15.006 25.284-2.675 35.13-10.956 6.42-5.408 11.798-13.327 14.78-25.199.584-4.586.92-9.247.92-13.991 0-60.588-49.116-109.715-109.705-109.715"/></svg>`,cobol:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M12 0h8v4h-8z"/><path fill="#0288d1" d="M16 5A11 11 0 1 1 5 16 11.01 11.01 0 0 1 16 5m0-3a14 14 0 1 0 14 14A14 14 0 0 0 16 2"/><path fill="#0288d1" d="M32 12v8h-4v-8zm-1.858 12.485-5.657 5.657-2.313-2.313 5.657-5.657zM7.514 30.143l-5.657-5.657 2.814-2.814 5.657 5.657zM12 28h8v4h-8zm15.329-17.672L21.672 4.67l2.814-2.814 5.657 5.657zM3 12v8H0v-8zm7.328-7.329L4.67 10.328 1.857 7.514l5.657-5.657zM20 10h-4a6 6 0 0 0 0 12h4v-4h-4a2 2 0 0 1 0-4h4z"/></svg>`,crystal:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path fill="#cfd8dc" d="m179.363 121.67-57.623 57.507c-.23.23-.576.346-.806.23l-78.713-21.09c-.346-.115-.577-.345-.577-.576L20.44 79.144c-.115-.345 0-.576.23-.806L78.294 20.83c.23-.23.576-.346.807-.23l78.713 21.09c.345.114.576.345.576.575l21.09 78.597c.23.346.115.577-.115.807zm-77.215-62.58-77.33 20.63c-.115 0-.23.23-.115.345l56.586 56.47c.115.115.346.115.346-.115l20.744-77.215c.115 0-.115-.23-.23-.116z"/></svg>`,dart:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#4fc3f7" d="M16.83 2a1.3 1.3 0 0 0-.916.377l-.013.01L7.323 7.34l8.556 8.55v.005l10.283 10.277 1.96-3.529-7.068-16.96-3.299-3.297A1.3 1.3 0 0 0 16.828 2Z"/><path fill="#01579b" d="m7.343 7.32-4.955 8.565-.01.013a1.297 1.297 0 0 0 .004 1.835l.005.005 4.106 4.107 16.064 6.314 3.632-2.015-.098-.098-.025.002L15.995 15.97h-.012z"/><path fill="#01579b" d="m7.321 7.324 8.753 8.755h.013L26.16 26.156l3.835-.73L30 14.089l-4.049-3.965a6.5 6.5 0 0 0-3.618-1.612l.002-.043L7.323 7.325Z"/><path fill="#64b5f6" d="m7.332 7.335 8.758 8.75v.013l10.079 10.071L25.436 30H14.09l-3.967-4.048a6.5 6.5 0 0 1-1.611-3.618l-.045.004Z"/></svg>`,dlang:m,d:m,docker:h,dockerfile:h,elixir:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#9575cd" d="M12.173 22.681c-3.86 0-6.99-3.64-6.99-8.13 0-3.678 2.773-8.172 4.916-10.91 1.014-1.296 2.93-2.322 2.93-2.322s-.982 5.239 1.683 7.319c2.366 1.847 4.106 4.25 4.106 6.363 0 4.232-2.784 7.68-6.645 7.68"/></svg>`,erlang:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30"><path fill="#f44336" d="M5.207 4.33q-.072.075-.143.153Q1.5 8.476 1.5 15.33c0 4.418 1.155 7.862 3.459 10.34h19.415c2.553-1.152 4.127-3.43 4.127-3.43l-3.147-2.52L23.9 21.1c-.867.773-.845.931-2.315 1.78-1.495.674-3.04.966-4.634.966-2.515 0-4.423-.909-5.723-2.059-1.286-1.15-1.985-4.511-2.096-6.68l17.458.067-.183-1.472s-.847-7.129-2.541-9.372zm8.76.846c1.565 0 3.22.535 3.961 1.471.74.937.931 1.667.973 3.524H9.11c.112-1.955.436-2.81 1.373-3.698.936-.887 2.03-1.297 3.484-1.297"/></svg>`,fortran:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="M6 4v2h3a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6v2h12v-2h-3a1 1 0 0 1-1-1v-9h4a2 2 0 0 1 2 2v2h2V10h-2v2a2 2 0 0 1-2 2h-4V6h6a4 4 0 0 1 4 4h2V4Z"/></svg>`,groovy:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#26c6da" d="M19.322 2a6.5 6.5 0 0 1 4.352 1.419 4.55 4.55 0 0 1 1.685 3.662 5.82 5.82 0 0 1-1.886 4.275 6.04 6.04 0 0 1-4.34 1.846 4.15 4.15 0 0 1-2.385-.649 1.91 1.91 0 0 1-.936-1.603 1.6 1.6 0 0 1 .356-1.024 1.1 1.1 0 0 1 .861-.447q.469 0 .468.504a.79.79 0 0 0 .358.693 1.43 1.43 0 0 0 .826.245 3.1 3.1 0 0 0 2.39-1.573 5.66 5.66 0 0 0 1.154-3.39 2.64 2.64 0 0 0-.891-2.064 3.28 3.28 0 0 0-2.293-.812 6.18 6.18 0 0 0-4.086 1.736 12.9 12.9 0 0 0-3.215 4.557 13.4 13.4 0 0 0-1.233 5.36 5.86 5.86 0 0 0 1.091 3.723 3.53 3.53 0 0 0 2.905 1.372q3.058 0 5.848-4.002l2.935-.388q.546-.07.545.246a8 8 0 0 1-.423 1.24q-.421 1.097-1.152 3.668A12.7 12.7 0 0 0 26 17.72v1.66a14.2 14.2 0 0 1-4.055 2.57 10.38 10.38 0 0 1-2.764 5.931 6.7 6.7 0 0 1-4.806 2.11 3.3 3.3 0 0 1-2.012-.55 1.8 1.8 0 0 1-.718-1.514q0-2.685 5.634-5.212.532-1.766 1.152-3.507a8.6 8.6 0 0 1-2.853 2.323 7.4 7.4 0 0 1-3.48 1.01 5.46 5.46 0 0 1-4.366-2.093A8.1 8.1 0 0 1 6 15.122a11.6 11.6 0 0 1 1.966-6.426 14.7 14.7 0 0 1 5.162-4.862A12.44 12.44 0 0 1 19.322 2m-2.407 22.17q-4.055 1.875-4.054 3.695a.87.87 0 0 0 .999.97q1.964 0 3.055-4.665"/></svg>`,haskell:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><g stroke-width="2.422"><path fill="#ef5350" d="m23.928 240.5 59.94-89.852-59.94-89.855h44.955l59.94 89.855-59.94 89.852z"/><path fill="#ffa726" d="m83.869 240.5 59.94-89.852-59.94-89.855h44.955l119.88 179.71h-44.95l-37.46-56.156-37.468 56.156z"/><path fill="#ffee58" d="m228.72 188.08-19.98-29.953h69.93v29.956h-49.95zm-29.97-44.924-19.98-29.953h99.901v29.953z"/></g></svg>`,julia:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><g transform="translate(.21 -247.01)"><circle cx="13.497" cy="281.63" r="9.555" fill="#c62828"/><circle cx="36.081" cy="281.63" r="9.555" fill="#7e57c2"/><circle cx="24.722" cy="262.39" r="9.555" fill="#388e3c"/></g></svg>`,lisp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ef5350" d="M16 2a14 14 0 1 0 14 14A14.003 14.003 0 0 0 16 2m8.93 20.43a11 11 0 0 1-7.19 4.43 6.094 6.094 0 0 1-4.79-5.9v-.05a5 5 0 0 1 .04-.66 7.95 7.95 0 0 1 2.3-4.95 5.99 5.99 0 0 0-2.23-9.9 11.004 11.004 0 0 1 11.87 17.03"/></svg>`,lua:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="M30 6a3.86 3.86 0 0 1-1.167 2.833 4.024 4.024 0 0 1-5.666 0A3.86 3.86 0 0 1 22 6a3.86 3.86 0 0 1 1.167-2.833 4.024 4.024 0 0 1 5.666 0A3.86 3.86 0 0 1 30 6m-9.208 5.208A10.6 10.6 0 0 0 13 8a10.6 10.6 0 0 0-7.792 3.208A10.6 10.6 0 0 0 2 19a10.6 10.6 0 0 0 3.208 7.792A10.6 10.6 0 0 0 13 30a10.6 10.6 0 0 0 7.792-3.208A10.6 10.6 0 0 0 24 19a10.6 10.6 0 0 0-3.208-7.792m-1.959 7.625a4.024 4.024 0 0 1-5.666 0 4.024 4.024 0 0 1 0-5.666 4.024 4.024 0 0 1 5.666 0 4.024 4.024 0 0 1 0 5.666"/></svg>`,nim:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M6 24h20v2a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2zM30 6l-9 9-5-11-5 11-9-9 4 14h20z"/></svg>`,objectivec:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>`,objectivecpp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,ocaml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12.019 15.021.003-.008c-.005-.021-.006-.026-.003.008"/><path fill="#ff9800" d="M4.51 3.273a2.523 2.523 0 0 0-2.524 2.523V11.3c.361-.13.88-.898 1.043-1.085.285-.327.337-.743.478-1.006C3.83 8.612 3.886 8.2 4.62 8.2c.342 0 .478.08.71.39.16.216.438.615.568.882.15.307.396.724.503.808q.122.095.233.137c.119.044.218-.037.297-.1.102-.082.145-.247.24-.467.135-.317.283-.697.367-.83.146-.23.195-.501.352-.633.232-.195.535-.208.618-.225.466-.092.677.225.907.43.15.133.355.403.5.765.114.283.26.544.32.707.059.158.203.41.289.713.077.275.286.486.365.616 0 0 .121.34.858.65.16.067.482.176.674.246.32.116.63.101 1.025.054.281 0 .434-.408.562-.734.075-.193.148-.745.197-.902.048-.153-.064-.27.031-.405.112-.156.178-.164.242-.368.138-.436.936-.458 1.384-.458.374 0 .327.363.96.239.364-.072.714.046 1.1.149.324.086.63.184.812.398.119.139.412.834.113.863.029.035.05.099.104.134-.067.262-.357.075-.518.041-.217-.045-.37.007-.583.101-.363.162-.894.143-1.21.407-.27.223-.269.721-.394 1 0 0-.348.895-1.106 1.443-.194.14-.574.477-1.4.605a5.3 5.3 0 0 1-1.1.043c-.186-.009-.362-.018-.549-.02-.11-.002-.48-.013-.461.022l-.041.103.024.138c.015.083.019.149.022.225.006.157-.013.32-.005.478.017.328.138.627.154.958.017.368.199.758.375 1.059.067.114.169.128.213.269.052.161.003.333.028.505.1.668.292 1.366.592 1.97l.008.014c.371-.062.743-.196 1.226-.267.885-.132 2.115-.064 2.906-.138 2-.188 3.085.82 4.882.407V5.796a2.523 2.523 0 0 0-2.523-2.523zm-.907 11.144q-.022 0-.046.003c-.159.025-.313.08-.412.24-.08.13-.108.355-.164.505-.064.175-.176.338-.274.505-.18.305-.504.581-.644.879-.028.06-.053.13-.076.2v3.402c.163.028.333.062.524.113 1.407.375 1.75.407 3.13.25l.13-.018c.105-.22.187-.968.255-1.2.054-.178.127-.32.155-.5.026-.173-.003-.337-.017-.493-.04-.393.285-.533.44-.87.14-.304.22-.651.336-.963.11-.298.284-.721.579-.872-.036-.041-.617-.06-.772-.076a5 5 0 0 1-.5-.07c-.314-.064-.656-.126-.965-.2a10 10 0 0 1-.947-.328c-.298-.138-.503-.497-.732-.507m5.737.83c-.74.149-.97.876-1.32 1.451-.192.319-.396.59-.548.928-.14.312-.128.657-.368.924a2.55 2.55 0 0 0-.528.922c-.023.067-.088.776-.158.943l1.101-.078c1.026.07.73.464 2.332.378l2.529-.078a7 7 0 0 0-.228-.588c-.07-.147-.16-.434-.218-.56a3.5 3.5 0 0 0-.309-.526c-.184-.215-.227-.23-.28-.503-.095-.473-.344-1.33-.637-1.923-.151-.306-.403-.562-.634-.784-.2-.195-.655-.522-.734-.505z"/></svg>`,perl:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ba68c8" d="M11.057 2.981c.537.735.028 1.653.141 2.472a3.42 3.42 0 0 1-1.03 2.415c-1.414 1.625-3.165 3.038-4.097 5.03a5.28 5.28 0 0 0 1.412 5.847c.706.735 1.54 1.342 2.472 1.738.17.805-1.088.184-1.455 0A6.7 6.7 0 0 1 4.361 16.4a5.44 5.44 0 0 1 .904-5.368c1.272-1.61 3.136-2.543 4.662-3.857.565-.55 1.003-1.3.932-2.119.156-.678-.254-1.469.212-2.09zm-.07 18.929c-.17.198-.467.325-.495.24-.042-.085.212-.127.381-.325.17-.183.127-.522.24-.522.1 0 .043.395-.14.607zm2.16 0c.17.198.453.31.495.24.028-.085-.212-.141-.395-.339-.156-.184-.113-.523-.24-.523-.085 0-.029.41.14.608zm-1.03.48c-.1 0-.071-.296-.071-.65 0-.367-.028-.663.07-.663.085 0 .057.296.057.663 0 .354.014.65-.057.65m-.495-20.765c.34.24.254 2.077.254 3.136 0 1.653.184 3.376-.805 4.916-.96 1.497-2.048 3.108-1.95 4.972.1 1.837.99 3.504 2.148 5.043.664.876-.353.509-.876.085a7.2 7.2 0 0 1-2.755-5.664c.142-1.907 1.597-3.348 2.628-4.803.805-1.13 1.186-1.879 1.215-3.645.028-1.412-.142-3.531.042-3.983.014-.043.07-.1.099-.057m.537 2.232c-.085 0-.043.396.028.72.424 2.26-.198 4.52-.749 6.682a12.77 12.77 0 0 0 .283 7.826c.607 1.568 1.71.791 2.161 1.568.34.593 1.272.198 1.978-.141 2.232-1.102 4.012-3.108 4.11-5.566.029-.494 0-.989-.07-1.497-.283-1.837-1.78-3.065-3.15-4.083-1.215-.89-2.74-1.483-3.659-2.613-.523-.65-.297-1.638-.381-2.458-.043-.452-.255-.042-.382-.268-.084-.127-.14-.17-.17-.17zm.72 3.616c.057 0 .17.071.325.226a20 20 0 0 0 2.161 1.921c1.272.961 2.43 2.091 2.967 3.504.339.875.339 1.836.226 2.74-.184 1.384-1.187 2.444-2.119 3.404-.339.354-1.06.791-1.074.678-.084-.367.763-1.172 1.159-1.695A5.93 5.93 0 0 0 16 10.962c-1.102-1.214-2.317-1.907-2.995-3.08-.14-.253-.183-.409-.113-.409z"/></svg>`,prolog:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ef5350" d="M12 15.385a5.1 5.1 0 0 0 1.862 1.693L12 18.94l-1.862-1.862A5.04 5.04 0 0 0 12 15.385m4.232-4.063a1.693 1.693 0 0 0-1.693 1.693 1.693 1.693 0 0 0 1.693 1.693 1.693 1.693 0 0 0 1.693-1.693c0-.94-.762-1.693-1.693-1.693m-8.464 0a1.693 1.693 0 0 0-1.693 1.693 1.693 1.693 0 0 0 1.693 1.693 1.693 1.693 0 0 0 1.693-1.693c0-.94-.762-1.693-1.693-1.693m8.464-2.116a3.385 3.385 0 0 1 3.385 3.386 3.385 3.385 0 0 1-3.385 3.385 3.385 3.385 0 0 1-3.386-3.385 3.385 3.385 0 0 1 3.386-3.386m-8.464 0a3.385 3.385 0 0 1 3.386 3.386 3.385 3.385 0 0 1-3.386 3.385 3.385 3.385 0 0 1-3.385-3.385 3.385 3.385 0 0 1 3.385-3.386M3.74 2.69c1.49 3.132.415 5.468-.584 7.787a5.1 5.1 0 0 0-.465 2.116 5.08 5.08 0 0 0 5.078 5.078 6 6 0 0 0 .533-.042l2.506 2.505L12 21.31l1.194-1.177 2.505-2.505c.178.025.355.034.533.042a5.08 5.08 0 0 0 5.078-5.078 5.1 5.1 0 0 0-.465-2.116c-.999-2.319-2.074-4.655-.584-7.787-2.235 1.744-5.417 3.123-8.26 3.132-2.845-.008-6.027-1.388-8.261-3.132z"/></svg>`,r:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1976d2" d="M11.956 4.05c-5.694 0-10.354 3.106-10.354 6.947 0 3.396 3.686 6.212 8.531 6.813v2.205h3.53V17.82c.88-.093 1.699-.259 2.475-.497l1.43 2.692h3.996l-2.402-4.048c1.936-1.263 3.147-3.034 3.147-4.97 0-3.841-4.659-6.947-10.354-6.947m1.584 2.712c4.349 0 7.558 1.45 7.558 4.753 0 1.77-.952 3.013-2.505 3.779a1 1 0 0 1-.228-.156c-.373-.165-.994-.352-.994-.352s3.085-.227 3.085-3.302-3.23-3.127-3.23-3.127h-7.092v7.413c-2.64-.766-4.462-2.392-4.462-4.255 0-2.63 3.52-4.753 7.868-4.753m.156 4.12h2.143s.983-.05.983.974c0 1.004-.983 1.004-.983 1.004h-2.143v-1.977m-.031 4.566h.952c.186 0 .28.052.445.207.135.103.28.3.404.476-.57.073-1.17.104-1.801.104z"/></svg>`,scala:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="m6.457 9.894 12.523 5.163-.456 1.211L6 11.105Zm7.02-3.091L26 11.966l-.457 1.21L13.02 8.015ZM6.465 18.885l12.524 5.163-.457 1.21L6.01 20.097Zm7.007-3.086 12.524 5.163-.456 1.21-12.524-5.162Z"/><path fill="#f44336" d="M6 24.07V30l19.997-3.106V20.96zM6 5.11v5.99l20-3.11V2zm0 9.96v5.03l20-3.11v-5.03z"/></svg>`,solidity:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="#0288d1"><path d="m5.747 14.046 6.254 8.61 6.252-8.61-6.254 3.807z"/><path d="M11.999 1.343 5.747 11.83l6.252 3.807 6.253-3.807z"/></g></svg>`,svelte:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><path fill="#ff5722" d="M175.94 24.328c-13.037.252-26.009 3.872-37.471 11.174L79.912 72.818a67.13 67.13 0 0 0-30.355 44.906 70.8 70.8 0 0 0 6.959 45.445 67.2 67.2 0 0 0-10.035 25.102 71.54 71.54 0 0 0 12.236 54.156c23.351 33.41 69.468 43.311 102.81 22.07l58.559-37.158a67.36 67.36 0 0 0 30.355-44.906 70.77 70.77 0 0 0-6.982-45.422 67.65 67.65 0 0 0 10.059-25.102 71.63 71.63 0 0 0-12.236-54.156v-.18c-15.324-21.925-40.453-33.727-65.342-33.246zm5.137 28.68a46.5 46.5 0 0 1 36.09 19.969 42.98 42.98 0 0 1 7.365 32.557 45 45 0 0 1-1.393 5.455l-1.123 3.37-2.986-2.247a75.9 75.9 0 0 0-22.902-11.45l-2.244-.651.201-2.246a13.16 13.16 0 0 0-2.379-8.711 13.99 13.99 0 0 0-14.953-5.412 12.8 12.8 0 0 0-3.594 1.572l-58.578 37.25a12.24 12.24 0 0 0-5.502 8.15 13.1 13.1 0 0 0 2.246 9.834 14.03 14.03 0 0 0 14.93 5.569 13.5 13.5 0 0 0 3.594-1.573l22.453-14.234a41.8 41.8 0 0 1 11.898-5.232 46.48 46.48 0 0 1 49.914 18.502 43.02 43.02 0 0 1 7.363 32.557 40.42 40.42 0 0 1-18.254 27.078l-58.58 37.316a43 43 0 0 1-11.898 5.23A46.545 46.545 0 0 1 82.81 227.14a42.98 42.98 0 0 1-7.341-32.557 38 38 0 0 1 1.39-5.41l1.102-3.37 3.008 2.246a75.9 75.9 0 0 0 22.836 11.361l2.244.65-.201 2.247a13.25 13.25 0 0 0 2.447 8.644 14.03 14.03 0 0 0 15.043 5.569 13.1 13.1 0 0 0 3.592-1.573l58.467-37.316a12.17 12.17 0 0 0 5.502-8.173 12.96 12.96 0 0 0-2.246-9.811 14.03 14.03 0 0 0-15.043-5.568 12.8 12.8 0 0 0-3.592 1.57l-22.453 14.258a42.9 42.9 0 0 1-11.877 5.209 46.52 46.52 0 0 1-49.846-18.5 43.02 43.02 0 0 1-7.297-32.557A40.42 40.42 0 0 1 96.798 96.98l58.646-37.316a42.8 42.8 0 0 1 11.811-5.21 46.5 46.5 0 0 1 13.822-1.444z"/></svg>`,svg:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>`,swift:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff6e40" d="M17.087 19.721c-2.36 1.36-5.59 1.5-8.86.1a13.8 13.8 0 0 1-6.23-5.32c.67.55 1.46 1 2.3 1.4 3.37 1.57 6.73 1.46 9.1 0-3.37-2.59-6.24-5.96-8.37-8.71-.45-.45-.78-1.01-1.12-1.51 8.28 6.05 7.92 7.59 2.41-1.01 4.89 4.94 9.43 7.74 9.43 7.74.16.09.25.16.36.22.1-.25.19-.51.26-.78.79-2.85-.11-6.12-2.08-8.81 4.55 2.75 7.25 7.91 6.12 12.24-.03.11-.06.22-.05.39 2.24 2.83 1.64 5.78 1.35 5.22-1.21-2.39-3.48-1.65-4.62-1.17"/></svg>`,terraform:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#5c6bc0" d="m2 10 8 4V6L2 2zm10 5 8 4v-8l-8-4zm0 11 8 4v-8l-8-4zm10-14v8l8-4V8z"/></svg>`,vbnet:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`},_=e(r(),1),v=n(),y=Object.create,b=Object.defineProperty,x=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,C=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,T=(e,t)=>function(){return t||(0,e[S(e)[0]])((t={exports:{}}).exports,t),t.exports},E=e=>{let t={};for(var n in e)b(t,n,{get:e[n],enumerable:!0});return t},D=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=S(t),a=0,o=i.length,s;a<o;a++)s=i[a],!w.call(e,s)&&s!==n&&b(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=x(t,s))||r.enumerable});return e},O=(e,t,n)=>(n=e==null?{}:y(C(e)),D(t||!e||!e.__esModule?b(n,`default`,{value:e,enumerable:!0}):n,e));function k(e,t,n,r){let i=Number(e[t].meta.id+1).toString(),a=``;return typeof r.docId==`string`&&(a=`-${r.docId}-`),a+i}function A(e,t){let n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=`:${e[t].meta.subId}`),`[${n}]`}function j(e,t,n,r,i){let a=i.rules.footnote_anchor_name(e,t,n,r,i),o=i.rules.footnote_caption(e,t,n,r,i),s=a;return e[t].meta.subId>0&&(s+=`:${e[t].meta.subId}`),`<sup class="footnote-ref"><a href="#fn${a}" id="fnref${s}">${o}</a></sup>`}function M(e,t,n){return(n.xhtmlOut?`<hr class="footnotes-sep" />
3
3
  `:`<hr class="footnotes-sep">
4
4
  `)+`<section class="footnotes">
5
5
  <ol class="footnotes-list">
@@ -166,7 +166,7 @@ import{o as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{nt as n,rt as r
166
166
  </div>`};let c=/^\[(\d+)\]/,l=/^\[([^\]\n]+)\]/,u=e=>{if(!e.startsWith(`[`))return!1;let t=l.exec(e);if(!t)return e!==`[`&&!/^\[\d+$/.test(e);let n=String(t[1]??``);return!e.slice(t[0].length).startsWith(`(`)&&!/^\d+$/.test(n)};n.inline.ruler.before(`escape`,`reference`,(e,t)=>{let n=e;if(n.src[n.pos]!==`[`)return!1;let r=c.exec(n.src.slice(n.pos));if(!r)return!1;let i=n.src.slice(Math.max(0,n.pos-120),n.pos);if(/"[^"\n]{1,80}"\s*:\s*$/.test(i))return!1;let a=n.src.slice(n.pos+r[0].length);if(a.startsWith(`](`)||a.startsWith(`(`)||u(a))return!1;if(!t){let e=r[1],t=n.push(`reference`,`span`,0);t.content=e,t.markup=r[0],t.raw=r[0]}return n.pos+=r[0].length,!0}),n.renderer.rules.reference=(e,t)=>{let n=String(e[t].content??``);return`<span class="reference-link" data-reference-id="${n}" role="button" tabindex="0" title="Click to view reference">${n}</span>`};let d=n.use.bind(n);return n.use=((...e)=>(r.__markstreamHasCustomParserExtensions=!0,d(...e))),n}var ib=new Set([`table`,`code_block`,`html_block`,`blockquote`,`list`,`list_item`,`definition_list`,`footnote`,`footnote_reference`,`footnote_anchor`,`admonition`,`thematic_break`,`math_block`,`thinking`,`vmr_container`]);function ab(e){if(Array.isArray(e)&&e.length!==0)return e.reduce((e,[t,n])=>(t&&(e[t===`for`?`htmlFor`:t===`class`?`className`:t]=n==null||n),e),{})}function ob(e,t,n,r){if(!Array.isArray(e)||e.length===0)return null;let i=[];for(let a=0;a<e.length;a++){let o=e[a];if(o){if(o.type===`label_open`){let s=[];for(a++;a<e.length;){let t=e[a];if(t?.type===`label_close`)break;t&&s.push(t),a++}let c=`${n}-label-${a}`;i.push((0,v.jsx)(`label`,{...ab(o.attrs),children:ob(s,t,`${c}-child`,r)},c));continue}o.type!==`label_close`&&i.push(r(o,`${n}-${a}`,t))}}return i}function sb(e,t,n,r){return(0,v.jsx)(v.Fragment,{children:ob(e,t,`${n}-inline`,r)})}var cb=`__global__`,lb=`__MARKSTREAM_REACT_CUSTOM_COMPONENTS_STORE__`,ub=(()=>{let e=globalThis;if(e[lb])return e[lb];let t={scopedComponents:{},revision:0,listeners:new Set};return e[lb]=t,t})();function db(){ub.revision++;for(let e of Array.from(ub.listeners))try{e()}catch{}}function fb(e){return ub.listeners.add(e),()=>{ub.listeners.delete(e)}}function pb(){return ub.revision}function mb(e,t){typeof e==`string`?ub.scopedComponents[e]={...t||{}}:ub.scopedComponents[cb]={...e},db()}function hb(e){let t=ub.scopedComponents[cb]||{};if(!e)return t;let n=ub.scopedComponents[e]||{};return t&&Object.keys(t).length!==0?n&&Object.keys(n).length!==0?{...t,...n}:t:n}function gb(e){return e?.markstreamDisplay}function _b(e,t){return e.markstreamDisplay=t,e}function vb(e){if(!e)return{};let t={};for(let[n,r]of Object.entries(e)){let e=Kc(n);e&&(t[e]=r)}return t}var yb=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,bb=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>`,xb=null,Sb=null,Cb=new Set,wb={"":``,javascript:`javascript`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,typescript:`typescript`,ts:`typescript`,jsx:`jsx`,tsx:`tsx`,golang:`go`,py:`python`,rb:`ruby`,sh:`shell`,bash:`shell`,zsh:`shell`,shellscript:`shell`,bat:`shell`,batch:`shell`,ps1:`powershell`,d2lang:`d2`,plaintext:`plain`,text:`plain`,txt:`plain`,"c++":`cpp`,"c#":`csharp`,cs:`csharp`,"objective-c":`objectivec`,"objective-c++":`objectivecpp`,yml:`yaml`,md:`markdown`,rs:`rust`,kt:`kotlin`},Tb={"":bb,plain:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="M0 0h24v24H0z"/><path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/></svg>`,text:bb,javascript:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ffca28" d="M2 2v12h12V2zm6 6h1v4a1.003 1.003 0 0 1-1 1H7a1.003 1.003 0 0 1-1-1v-1h1v1h1zm3 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>`,typescript:`<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 16 16"><path fill="#0288d1" d="M2 2v12h12V2zm4 6h3v1H8v4H7V9H6zm5 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/></svg>`,jsx:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00bcd4" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#00bcd4" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#00bcd4" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#00bcd4" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>`,tsx:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M16 12c7.444 0 12 2.59 12 4s-4.556 4-12 4-12-2.59-12-4 4.556-4 12-4m0-2c-7.732 0-14 2.686-14 6s6.268 6 14 6 14-2.686 14-6-6.268-6-14-6"/><path fill="#0288d1" d="M16 14a2 2 0 1 0 2 2 2 2 0 0 0-2-2"/><path fill="#0288d1" d="M10.458 5.507c2.017 0 5.937 3.177 9.006 8.493 3.722 6.447 3.757 11.687 2.536 12.392a.9.9 0 0 1-.457.1c-2.017 0-5.938-3.176-9.007-8.492C8.814 11.553 8.779 6.313 10 5.608a.9.9 0 0 1 .458-.1m-.001-2A2.87 2.87 0 0 0 9 3.875C6.13 5.532 6.938 12.304 10.804 19c3.284 5.69 7.72 9.493 10.74 9.493A2.87 2.87 0 0 0 23 28.124c2.87-1.656 2.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z"/><path fill="#0288d1" d="M21.543 5.507a.9.9 0 0 1 .457.1c1.221.706 1.186 5.946-2.536 12.393-3.07 5.316-6.99 8.493-9.007 8.493a.9.9 0 0 1-.457-.1C8.779 25.686 8.814 20.446 12.536 14c3.07-5.316 6.99-8.493 9.007-8.493m0-2c-3.02 0-7.455 3.804-10.74 9.493C6.939 19.696 6.13 26.468 9 28.124a2.87 2.87 0 0 0 1.457.369c3.02 0 7.455-3.804 10.74-9.493C25.061 12.304 25.87 5.532 23 3.876a2.87 2.87 0 0 0-1.457-.369"/></svg>`,html:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#e65100" d="m4 4 2 22 10 2 10-2 2-22Zm19.72 7H11.28l.29 3h11.86l-.802 9.335L15.99 25l-6.635-1.646L8.93 19h3.02l.19 2 3.86.77 3.84-.77.29-4H8.84L8 8h16Z"/></svg>`,css:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#7e57c2" d="M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/></svg>`,scss:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ec407a" d="M27.837 5.673a4.33 4.33 0 0 0-2.293-2.701c-2.362-1.261-6.11-1.298-9.548-.092a26.3 26.3 0 0 0-8.76 4.966c-2.752 2.542-3.438 4.925-3.189 6.194.523 2.668 3.274 4.539 5.485 6.042.418.284.822.559 1.175.816-1.429.76-4.261 2.444-5.088 4.248a3.88 3.88 0 0 0-.118 3.332A2.37 2.37 0 0 0 6.869 29.8a5.6 5.6 0 0 0 1.49.2 6.35 6.35 0 0 0 5.19-2.856 6.74 6.74 0 0 0 .864-5.382 7.3 7.3 0 0 1 2.044-.03 3.92 3.92 0 0 1 2.816 1.311 1.82 1.82 0 0 1 .423 1.262 1.55 1.55 0 0 1-.772 1.05c-.234.14-.586.355-.504.803.036.194.198.633.894.512a2.93 2.93 0 0 0 2.145-2.651 4 4 0 0 0-1.197-2.904 5.94 5.94 0 0 0-4.396-1.626 10.6 10.6 0 0 0-2.672.304 20 20 0 0 0-2.203-1.846c-1.712-1.3-3.33-2.529-3.235-4.26.125-2.263 2.468-4.532 6.964-6.744 4.016-1.976 7.254-2.037 8.944-1.438a2 2 0 0 1 1.204.883 2.77 2.77 0 0 1-.36 2.47 9.71 9.71 0 0 1-7.425 4.304 3.86 3.86 0 0 1-3.238-.757c-.278-.302-.593-.645-1.074-.383q-.565.31-.225 1.189a3.9 3.9 0 0 0 2.407 1.92 11.7 11.7 0 0 0 7.128-.671c3.527-1.35 6.681-5.202 5.756-8.787M11.895 24.475a4 4 0 0 1-.192.468 4.5 4.5 0 0 1-.753 1.081 2.83 2.83 0 0 1-2.533 1.107c-.056-.032-.078-.146-.085-.193a3.28 3.28 0 0 1 1.076-2.284 11.3 11.3 0 0 1 2.644-1.933 3.85 3.85 0 0 1-.157 1.754"/></svg>`,json:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="#f9a825" d="M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80z"/></svg>`,python:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#0288d1" d="M9.86 2A2.86 2.86 0 0 0 7 4.86v1.68h4.29c.39 0 .71.57.71.96H4.86A2.86 2.86 0 0 0 2 10.36v3.781a2.86 2.86 0 0 0 2.86 2.86h1.18v-2.68a2.85 2.85 0 0 1 2.85-2.86h5.25c1.58 0 2.86-1.271 2.86-2.851V4.86A2.86 2.86 0 0 0 14.14 2zm-.72 1.61c.4 0 .72.12.72.71s-.32.891-.72.891c-.39 0-.71-.3-.71-.89s.32-.711.71-.711"/><path fill="#fdd835" d="M17.959 7v2.68a2.85 2.85 0 0 1-2.85 2.859H9.86A2.85 2.85 0 0 0 7 15.389v3.75a2.86 2.86 0 0 0 2.86 2.86h4.28A2.86 2.86 0 0 0 17 19.14v-1.68h-4.291c-.39 0-.709-.57-.709-.96h7.14A2.86 2.86 0 0 0 22 13.64V9.86A2.86 2.86 0 0 0 19.14 7zM8.32 11.513l-.004.004.038-.004zm6.54 7.276c.39 0 .71.3.71.89a.71.71 0 0 1-.71.71c-.4 0-.72-.12-.72-.71s.32-.89.72-.89"/></svg>`,ruby:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#f44336" d="M18.041 3.177c2.24.382 2.879 1.919 2.843 3.527V6.67l-1.013 13.266-13.132.897h.008c-1.093-.044-3.518-.151-3.634-3.545l1.217-2.222 2.462 5.74 2.097-6.77-.045.009.018-.018 6.85 2.186L13.945 9.3l6.53-.409-5.144-4.212 2.71-1.51v.009M3.113 17.252v.017zM6.916 6.874c2.63-2.622 6.033-4.168 7.34-2.844 1.297 1.306-.072 4.523-2.702 7.135-2.666 2.613-6.015 4.248-7.322 2.933-1.306-1.324.036-4.612 2.675-7.224z"/></svg>`,go:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#00acc1" d="M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5"/><path fill="#00acc1" d="M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z"/></svg>`,java:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#f44336" d="M4 26h24v2H4zM28 4H7a1 1 0 0 0-1 1v13a4 4 0 0 0 4 4h10a4 4 0 0 0 4-4v-4h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 8h-4V6h4Z"/></svg>`,kotlin:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><defs><linearGradient id="a" x1="1.725" x2="22.185" y1="22.67" y2="1.982" gradientTransform="translate(1.306 1.129)scale(.89324)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#7c4dff"/><stop offset=".5" stop-color="#d500f9"/><stop offset="1" stop-color="#ef5350"/></linearGradient></defs><path fill="url(#a)" d="M2.975 2.976v18.048h18.05v-.03l-4.478-4.511-4.48-4.515 4.48-4.515 4.443-4.477z"/></svg>`,c:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M19.563 22A5.57 5.57 0 0 1 14 16.437v-2.873A5.57 5.57 0 0 1 19.563 8H24V2h-4.437A11.563 11.563 0 0 0 8 13.563v2.873A11.564 11.564 0 0 0 19.563 28H24v-6Z"/></svg>`,cpp:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/></svg>`,cs:yb,csharp:yb,php:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#1e88e5" d="M12 18.08c-6.63 0-12-2.72-12-6.08s5.37-6.08 12-6.08S24 8.64 24 12s-5.37 6.08-12 6.08m-5.19-7.95c.54 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.58 1.09q-.42.33-1.29.33h-.87l.53-2.76zm-3.5 5.55h1.44l.34-1.75h1.23c.54 0 .98-.06 1.33-.17.35-.12.67-.31.96-.58.24-.22.43-.46.58-.73.15-.26.26-.56.31-.88.16-.78.05-1.39-.33-1.82-.39-.44-.99-.65-1.82-.65H4.59zm7.25-8.33-1.28 6.58h1.42l.74-3.77h1.14c.36 0 .6.06.71.18s.13.34.07.66l-.57 2.93h1.45l.59-3.07c.13-.62.03-1.07-.27-1.36-.3-.27-.85-.4-1.65-.4h-1.27L12 7.35zM18 10.13c.55 0 .91.1 1.09.31.18.2.22.56.13 1.03-.1.53-.29.87-.57 1.09-.29.22-.72.33-1.3.33h-.85l.5-2.76zm-3.5 5.55h1.44l.34-1.75h1.22c.55 0 1-.06 1.35-.17.35-.12.65-.31.95-.58.24-.22.44-.46.58-.73.15-.26.26-.56.32-.88.15-.78.04-1.39-.34-1.82-.36-.44-.99-.65-1.82-.65h-2.75z"/></svg>`,shell:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>`,powershell:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#03a9f4" d="M29.07 6H7.677A1.535 1.535 0 0 0 6.24 7.113l-4.2 17.774A.852.852 0 0 0 2.93 26h21.393a1.535 1.535 0 0 0 1.436-1.113L29.96 7.112A.852.852 0 0 0 29.07 6M8.626 23.797a1.4 1.4 0 0 1-1.814-.31l-.007-.009a1.075 1.075 0 0 1 .315-1.599l9.6-6.061-6.102-5.852-.01-.01a1.068 1.068 0 0 1 .084-1.625l.037-.03a1.38 1.38 0 0 1 1.8.07l7.233 6.957a1.1 1.1 0 0 1 .236.739 1.08 1.08 0 0 1-.412.79c-.074.04-.146.119-10.951 6.935ZM24 22.94A1.135 1.135 0 0 1 22.803 24h-5.634a1.061 1.061 0 1 1 .001-2.112h5.633A1.134 1.134 0 0 1 24 22.938Z"/></svg>`,sql:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ffca28" d="M16 24c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-8c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-12C10.477 4 6 4.895 6 6v4c0 1.1 4.475 2 10 2s10-.9 10-2V6c0-1.105-4.477-2-10-2"/></svg>`,yaml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff5252" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m12 16v-2H9v2zm-4-4v-2H6v2z"/></svg>`,markdown:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>`,xml:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/></svg>`,rust:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#ff7043" d="m30 12-4-2V6h-4l-2-4-4 2-4-2-2 4H6v4l-4 2 2 4-2 4 4 2v4h4l2 4 4-2 4 2 2-4h4v-4l4-2-2-4ZM6 16a9.9 9.9 0 0 1 .842-4H10v8H6.842A9.9 9.9 0 0 1 6 16m10 10a9.98 9.98 0 0 1-7.978-4H16v-2h-2v-2h4c.819.819.297 2.308 1.179 3.37a1.89 1.89 0 0 0 1.46.63h3.34A9.98 9.98 0 0 1 16 26m-2-12v-2h4a1 1 0 0 1 0 2Zm11.158 6H24a2.006 2.006 0 0 1-2-2 2 2 0 0 0-2-2 3 3 0 0 0 3-3q0-.08-.004-.161A3.115 3.115 0 0 0 19.83 10H8.022a9.986 9.986 0 0 1 17.136 10"/></svg>`,vue:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#41b883" d="M1.791 3.851 12 21.471 22.209 3.936V3.85H18.24l-6.18 10.616L5.906 3.851z"/><path fill="#35495e" d="m5.907 3.851 6.152 10.617L18.24 3.851h-3.723L12.084 8.03 9.66 3.85z"/></svg>`,mermaid:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/></svg>`};function Eb(e){let t=function(e){if(!e)return``;let t=e.trim();if(!t)return``;let[n]=t.split(/\s+/),[r]=n.split(`:`);return r.toLowerCase()}(e);return wb[t]??t}function Db(e){let t=Eb(e);if(!t)return`plaintext`;switch(t){case`plain`:return`plaintext`;case`shell`:return`zsh`;case`objectivec`:return`objective-c`;case`objectivecpp`:return`objective-cpp`;default:return t}}async function Ob(){return xb||(Sb||=a(()=>Promise.resolve().then(()=>p).then(e=>(xb=e.EXTENDED_LANGUAGE_ICON_MAP,function(){for(let e of Cb)try{e()}catch{}}(),xb)),void 0).catch(()=>null),Sb)}function kb(e){return Cb.add(e),()=>{Cb.delete(e)}}function Ab(e){let t=Eb(e);return Tb[t]||xb?.[t]||(Ob(),`<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/></svg>`)}var jb={javascript:`JavaScript`,typescript:`TypeScript`,jsx:`JSX`,tsx:`TSX`,shell:`Shell`,powershell:`PowerShell`,plain:`Text`,text:`Text`,markdown:`Markdown`,json:`JSON`,python:`Python`,ruby:`Ruby`,go:`Go`,java:`Java`,kotlin:`Kotlin`,c:`C`,cpp:`C++`,csharp:`C#`,php:`PHP`,sql:`SQL`,yaml:`YAML`,xml:`XML`,rust:`Rust`,scss:`SCSS`,vue:`Vue`,html:`HTML`,css:`CSS`,svg:`SVG`,mermaid:`Mermaid`,d2:`D2`,ada:`Ada`,applescript:`AppleScript`,assembly:`Assembly`,clojure:`Clojure`,cobol:`COBOL`,crystal:`Crystal`,dart:`Dart`,dlang:`D`,docker:`Docker`,dockerfile:`Dockerfile`,elixir:`Elixir`,erlang:`Erlang`,fortran:`Fortran`,groovy:`Groovy`,haskell:`Haskell`,julia:`Julia`,lisp:`Lisp`,lua:`Lua`,nim:`Nim`,objectivec:`Objective-C`,objectivecpp:`Objective-C++`,ocaml:`OCaml`,perl:`Perl`,prolog:`Prolog`,r:`R`,scala:`Scala`,solidity:`Solidity`,svelte:`Svelte`,swift:`Swift`,terraform:`Terraform`,vbnet:`VB.NET`};function Mb(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function Nb(e,t){let n=Mb(e?.fontSize)??Mb(t)??12,r=Mb(e?.lineHeight)??(n===12?18:Math.max(12,Math.round(1.5*n)));return{fontFamily:typeof e?.fontFamily==`string`&&e.fontFamily.trim()?e.fontFamily.trim():`"SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono", "Courier New", monospace`,fontSize:n,lineHeight:r}}function Pb(e){return String(String(e??``).split(/\s+/g)[0]??``).split(`:`)[0].toLowerCase().replace(/[^\w-]/g,``)||`plaintext`}function Fb(e){let t=String(e??``);return t?t.split(/\r\n|\n|\r/):[]}function Ib(e){return e.startsWith(`-`)&&!e.startsWith(`---`)}function Lb(e){return e.startsWith(`+`)&&!e.startsWith(`+++`)}function Rb(e,t){return n=e[t],String(n??``).trim().length!==0||t<e.length-1;var n}function zb(e,t,n,r,i={}){let a=String(e??``).trim().length===0;return{code:e,empty:a,kind:a&&t!==`hunk`&&!i.preserveBlankKind?`context`:t,key:n,number:r}}function Bb(e,t){let n=Fb(e),r=Fb(t),i=function(e,t){let n=e.length,r=t.length;if((n+1)*(r+1)>15e5)return null;let i=r+1,a=new Uint16Array((n+1)*(r+1));for(let o=n-1;o>=0;o--)for(let n=r-1;n>=0;n--){let r=o*i+n;a[r]=e[o]===t[n]?a[(o+1)*i+n+1]+1:Math.max(a[(o+1)*i+n],a[o*i+n+1])}let o=[],s=0,c=0;for(;s<n&&c<r;)e[s]===t[c]?(o.push({originalIndex:s,modifiedIndex:c}),s++,c++):a[(s+1)*i+c]>=a[s*i+c+1]?s++:c++;return o}(n,r);if(i){let e=[],t=0,a=0;for(let o of i){for(;t<o.originalIndex;)e.push(zb(n[t],`removed`,`inline-removed-source-${t}`,``,{preserveBlankKind:Rb(n,t)})),t++;for(;a<o.modifiedIndex;)e.push(zb(r[a],`added`,`inline-added-source-${a}`,a+1,{preserveBlankKind:Rb(r,a)})),a++;e.push(zb(r[o.modifiedIndex],`context`,`inline-context-source-${o.originalIndex}-${o.modifiedIndex}`,o.modifiedIndex+1)),t=o.originalIndex+1,a=o.modifiedIndex+1}for(;t<n.length;)e.push(zb(n[t],`removed`,`inline-removed-source-${t}`,``,{preserveBlankKind:Rb(n,t)})),t++;for(;a<r.length;)e.push(zb(r[a],`added`,`inline-added-source-${a}`,a+1,{preserveBlankKind:Rb(r,a)})),a++;return e}let a=[],o=0,s=n.length-1,c=r.length-1;for(;o<=s&&o<=c&&n[o]===r[o];)a.push(zb(r[o],`context`,`inline-prefix-${o}`,o+1)),o++;let l=[];for(;s>=o&&c>=o&&n[s]===r[c];)l.unshift(zb(r[c],`context`,`inline-suffix-${c}`,c+1)),s--,c--;for(let e=o;e<=s;e++)a.push(zb(n[e],`removed`,`inline-removed-source-${e}`,``,{preserveBlankKind:Rb(n,e)}));for(let e=o;e<=c;e++)a.push(zb(r[e],`added`,`inline-added-source-${e}`,e+1,{preserveBlankKind:Rb(r,e)}));return a.concat(l)}function Vb(e,t=!1,n=Pb(e?.language)){let r=(i=e?.code,String(i??``).split(/\r\n|\n|\r/));var i;if(!function(e,t,n){let r=e.some(e=>Ib(e)),i=e.some(e=>Lb(e));return r&&i||function(e,t){if(t===`diff`)return!0;let n=String(e?.raw??``).split(/\r?\n/,1)[0]?.trim()??``;return/^`{3,}\s*diff(?:\s|$)|^~{3,}\s*diff(?:\s|$)/.test(n)}(t,n)&&(r||i)}(r,e,n)&&function(e){return e?.originalCode!=null||e?.updatedCode!=null}(e)){if(t)return[{key:`inline`,className:`markstream-pre__diff-pane--inline`,lines:Bb(e?.originalCode,e?.updatedCode)}];let n=Fb(e?.originalCode),r=Fb(e?.updatedCode);return[{key:`original`,className:`markstream-pre__diff-pane--original`,lines:n.map((e,t)=>zb(e,r[t]===e?`context`:`removed`,`original-${t}`,t+1,{preserveBlankKind:Rb(n,t)}))},{key:`modified`,className:`markstream-pre__diff-pane--modified`,lines:r.map((e,t)=>zb(e,n[t]===e?`context`:`added`,`modified-${t}`,t+1,{preserveBlankKind:Rb(r,t)}))}]}if(t)return[{key:`inline`,className:`markstream-pre__diff-pane--inline`,lines:function(e){let t=1;return e.map((e,n)=>e.startsWith(`@@`)?zb(e,`hunk`,`inline-hunk-${n}`,``):Ib(e)?zb(e.slice(1),`removed`,`inline-removed-${n}`,``,{preserveBlankKind:!0}):Lb(e)?zb(e.slice(1),`added`,`inline-added-${n}`,t++,{preserveBlankKind:!0}):zb(e.startsWith(` `)?e.slice(1):e,`context`,`inline-context-${n}`,t++))}(r)}];let a=[],o=[],s=1,c=1;for(let[e,t]of r.entries())if(t.startsWith(`@@`))a.push(zb(t,`hunk`,`original-hunk-${e}`,``)),o.push(zb(t,`hunk`,`modified-hunk-${e}`,``));else if(Ib(t))a.push(zb(t.slice(1),`removed`,`original-removed-${e}`,s++,{preserveBlankKind:!0}));else if(Lb(t))o.push(zb(t.slice(1),`added`,`modified-added-${e}`,c++,{preserveBlankKind:!0}));else{let n=t.startsWith(` `)?t.slice(1):t;a.push(zb(n,`context`,`original-context-${e}`,s++)),o.push(zb(n,`context`,`modified-context-${e}`,c++))}return[{key:`original`,className:`markstream-pre__diff-pane--original`,lines:a},{key:`modified`,className:`markstream-pre__diff-pane--modified`,lines:o}]}function Hb({node:e,className:t,diffInline:n,showLineNumbers:r,style:i}){let a=(0,_.useMemo)(()=>Pb(e?.language),[e]),o=`language-${a}`,s=a?`Code block: ${a}`:`Code block`,c=!0===r&&!0===e?.diff,l=(0,_.useMemo)(()=>c?Vb(e,!0===n,a):[],[n,c,e,a]),u=(0,_.useMemo)(()=>function(e){if(!0===e?.diff)return String(e?.code??``);let t=String(e?.code??``);return!0===e?.loading?t:t.replace(/\r\n$|\n$|\r$/,``)}(e),[e]),d=(0,_.useMemo)(()=>function(e){let t=1;for(let n=0;n<e.length;n++)e[n]===`
167
167
  `?t++:e[n]===`\r`&&(t++,e[n+1]===`
168
168
  `&&n++);return t}(u),[u]),f=(0,_.useMemo)(()=>{let e=``;for(let t=1;t<=d;t++)e+=`${e?`
169
- `:``}${t}`;return e},[d]),p=(0,_.useMemo)(()=>{if(!0===r&&!c)return{"--markstream-pre-line-number-width":`${Math.max(2,String(d).length)}ch`,"--markstream-code-padding-left":`calc(var(--markstream-pre-line-number-padding-left, 2ch) + var(--markstream-pre-line-number-width, 2ch) + var(--markstream-pre-line-number-padding-right, 1ch) + var(--markstream-pre-line-number-separator-width, 2px) + var(--markstream-pre-line-number-gap-to-code, 1ch))`}},[c,r,d]),m=(0,_.useMemo)(()=>{let e=!0===t?.split(/\s+/).includes(`code-fallback-plain`),n=e?Nb():{fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,fontSize:16,lineHeight:28},r=e?function(e,t=8){return{top:t,bottom:t}}(0,c?0:8):{top:0,bottom:0};return{"--markstream-pre-line-number-top":`${r.top}px`,fontFamily:n.fontFamily,fontSize:`${n.fontSize}px`,lineHeight:`${n.lineHeight}px`,paddingBottom:`${r.bottom}px`,paddingTop:`${r.top}px`,tabSize:e?4:2,...i,...p}},[t,c,p,i]);return(0,v.jsx)(`pre`,{className:[o,t,r?`markstream-pre--line-numbers`:``,c?`markstream-pre--diff-preview`:``,c&&n?`markstream-pre--diff-inline`:``].filter(Boolean).join(` `),style:m,"aria-busy":!0===e?.loading,"aria-label":s,"data-language":a,"data-markstream-line-numbers":r?`1`:void 0,"data-markstream-pre":`1`,tabIndex:0,children:c?(0,v.jsx)(`code`,{translate:`no`,className:`markstream-pre__diff-code`,children:l.map(e=>(0,v.jsx)(`span`,{className:[`markstream-pre__diff-pane`,e.className].join(` `),children:e.lines.map(e=>(0,v.jsxs)(`span`,{className:[`markstream-pre__diff-line`,`markstream-pre__diff-line--${e.kind}`,e.empty?`markstream-pre__diff-line--empty`:``].filter(Boolean).join(` `),children:[(0,v.jsx)(`span`,{className:`markstream-pre__diff-rail`,"aria-hidden":`true`}),(0,v.jsx)(`span`,{className:`markstream-pre__diff-number`,"aria-hidden":`true`,children:e.number}),(0,v.jsx)(`span`,{className:`markstream-pre__diff-content`,children:(0,v.jsx)(`span`,{className:`markstream-pre__diff-content-inner`,children:e.code})})]},e.key))},e.key))}):(0,v.jsxs)(v.Fragment,{children:[r&&(0,v.jsx)(`span`,{className:`markstream-pre__line-numbers`,"aria-hidden":`true`,children:(0,v.jsx)(`span`,{className:`markstream-pre__line-numbers-text`,children:f})}),(0,v.jsx)(`code`,{translate:`no`,className:`markstream-pre__code`,children:u})]})})}function Ub(e){return e.startsWith(`--`)?e:e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Wb(e){let t={...e};if(Object.prototype.hasOwnProperty.call(t,`class`)&&(t.className=t.class,delete t.class),Object.prototype.hasOwnProperty.call(t,`for`)&&(t.htmlFor=t.for,delete t.for),typeof t.style==`string`){let e=function(e){let t=e.trim();if(!t)return;let n={};for(let e of t.split(`;`)){let t=e.trim();if(!t)continue;let r=t.indexOf(`:`);if(r===-1)continue;let i=Ub(t.slice(0,r).trim()),a=t.slice(r+1).trim();i&&(n[i]=a)}return Object.keys(n).length?n:void 0}(t.style);e?t.style=e:delete t.style}return t}var Gb=Ty,Kb=yy;function qb(e,t){return vy(e,t)}function Jb(e,t){return Oy(e,t)}function Yb(e,t,n=!1){let r=Object.entries(t??{}),i=r.length>0?r.map(([e,t])=>t===``?` ${e}`:` ${e}="${t}"`).join(``):``;return n?`<${e}${i} />`:`<${e}${i}>`}function Xb(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function Zb(e,t){return t.nodeComponents?.[e]||t.nodeComponents?.[e.toLowerCase()]}function Qb(e){if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||typeof e==`number`)return String(e);if(Array.isArray(e))return e.map(Qb).join(``);if(!_.isValidElement(e))return``;let t=e;if(typeof t.type!=`string`)return Qb(t.props.children);let n=Object.entries(t.props).filter(([e,t])=>e!==`children`&&e!==`key`&&e!==`ref`&&t!=null&&typeof t!=`boolean`).map(([e,t])=>` ${e===`className`?`class`:e}="${String(t)}"`).join(``);return`<${t.type}${n}>${Qb(t.props.children)}</${t.type}>`}function $b(e){return Object.entries(e).map(([e,t])=>[e,t===``?null:t])}function ex(e){let t=e.sourceNode,n=!0!==e.ctx?.final&&(!1===e.ctx?.final||!!t?.loading);return{loading:n,autoClosed:n||!!t?.autoClosed}}function tx(e,t,n){return function(e,t){return!!(t.propComponents?.[e]||t.propComponents?.[e.toLowerCase()])}(e,n)?Cy(t):t}function nx(e,t,n,r,i,a,o,s=ex(i)){let c=Kc(e),l=a??function(e){return e.map(Qb).join(``)}(n),u={type:c,tag:c,attrs:$b(t),content:l,raw:o??`${Yb(e,t)}${l}</${e}>`,loading:s.loading,autoClosed:s.autoClosed};if(i.ctx&&i.renderNode)return i.renderNode(u,r,i.ctx);let d=Zb(e,i);return d?_.createElement(d,{key:r,node:u}):null}function rx(e,t,n=`safe`,r={}){if(!e)return[];if(n===`escape`)return[e];try{let i=Gb(e),a=0,o=r.keyPrefix??`ms-html`,s=[],c=[];for(let e of i){if(e.type===`text`){if(s.length>0&&s[s.length-1].hardBlocked)continue;(s.length>0?s[s.length-1].children:c).push(e.content??``),s.length>0&&s[s.length-1].sourceParts.push(e.content??``);continue}if(e.type===`self_closing`){let i=e.attrs||{},l=Yb(e.tagName,i,!0),u=qb(e.tagName,t),d=!!Zb(e.tagName,r);if(yc.has(e.tagName.toLowerCase())||!u&&!d&&uy(e.tagName,n))continue;if(!u&&!d&&ly(e.tagName,n)){(s.length>0?s[s.length-1].children:c).push(l),s.length>0&&s[s.length-1].sourceParts.push(l);continue}let f=Kb(i,n,e.tagName),p=f.key,m=p!=null&&p!==``?p:`${o}-${a++}`,h=u?t[e.tagName]||t[e.tagName.toLowerCase()]:void 0,g=s.length>0?s[s.length-1].children:c;if(d)g.push(nx(e.tagName,i,[],m,r,``,l,{loading:!1,autoClosed:!1}));else if(h){let t=tx(e.tagName,f,r);g.push(_.createElement(h,{...t,key:m}))}else g.push(_.createElement(e.tagName,{...Wb(f),key:m,suppressHydrationWarning:!0}));s.length>0&&s[s.length-1].sourceParts.push(l);continue}if(e.type===`tag_open`){let i=s.length>0&&s[s.length-1].hardBlocked,a=qb(e.tagName,t),o=!!Zb(e.tagName,r);s.push({tagName:e.tagName,children:[],attrs:e.attrs,sourceParts:[],customComponent:a||o,hardBlocked:i||yc.has(e.tagName.toLowerCase())||!a&&!o&&uy(e.tagName,n),softBlocked:!i&&!a&&!o&&ly(e.tagName,n)});continue}let i=e.tagName.toLowerCase(),l=-1;for(let e=s.length-1;e>=0;e--)if(s[e].tagName.toLowerCase()===i){l=e;break}if(l!==-1)for(;s.length>l;){let e=s.pop();if(!e)continue;let l=e.sourceParts.join(``),u=`${Yb(e.tagName,e.attrs)}${l}</${e.tagName}>`,d;if(e.hardBlocked)d=null;else if(e.softBlocked)d=[Yb(e.tagName,e.attrs),...e.children,`</${e.tagName}>`];else{let s=Kb(e.attrs||{},n,e.tagName),c=s.key,f=c!=null&&c!==``?c:`${o}-${a++}`,p=e.customComponent?t[e.tagName]||t[e.tagName.toLowerCase()]:void 0;if(Zb(e.tagName,r)){let t=e.tagName.toLowerCase()===i?{loading:!1,autoClosed:!1}:ex(r);d=nx(e.tagName,e.attrs||{},e.children,f,r,l,u,t)}else d=p?_.createElement(p,{...tx(e.tagName,s,r),key:f},...e.children):_.createElement(e.tagName,{...Wb(s),key:f,suppressHydrationWarning:!0},...e.children)}s.length>0?Xb(s[s.length-1].children,d):Xb(c,d),s.length>0&&!e.hardBlocked&&s[s.length-1].sourceParts.push(u)}}for(;s.length>0;){let e=s.pop();if(!e||e.hardBlocked)continue;let i=e.sourceParts.join(``),l=`${Yb(e.tagName,e.attrs)}${i}`;if(e.softBlocked){Xb(c,[Yb(e.tagName,e.attrs),...e.children,`</${e.tagName}>`]),s.length>0&&s[s.length-1].sourceParts.push(l);continue}let u=Kb(e.attrs||{},n,e.tagName),d=u.key,f=d!=null&&d!==``?d:`${o}-${a++}`,p=e.customComponent?t[e.tagName]||t[e.tagName.toLowerCase()]:void 0,m;m=Zb(e.tagName,r)?nx(e.tagName,e.attrs||{},e.children,f,r,i,l,ex(r)):p?_.createElement(p,{...tx(e.tagName,u,r),key:f},...e.children):_.createElement(e.tagName,{...Wb(u),key:f,suppressHydrationWarning:!0},...e.children),c.push(m),s.length>0&&s[s.length-1].sourceParts.push(l)}return c}catch{return null}}function ix(e){let t=typeof e==`number`?e:Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:null}function ax(e){let t=e.split(/\r?\n/).filter(e=>/^\s*-\s+/.test(e)).length;return t>=3?500:t>0?280+60*t:360}function ox(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function sx(e){return e?e.replace(/·/g,`⋅`).replace(/℃/g,`°C`):``}function cx(e){let t=typeof e==`number`?e:Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:null}function lx(e){let t=e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith(`%%`)),n=Math.max(1,t.length),r=function(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(!(!e||e.startsWith(`%%`)))return(e.match(/^([A-Z][\w-]*)\b/i)?.[1])?.toLowerCase()||``}return``}(e);return r===`gantt`?220+28*n:r===`sequencediagram`?180+26*n:r===`classdiagram`||r===`statediagram`||r===`erdiagram`?180+24*n:r===`flowchart`||r===`graph`?170+28*n:200+22*n}function ux(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function dx(e,t,n){let r=Kc(e.type),i=(n??[]).map(e=>Kc(e)).filter(Boolean),a=r===`html_inline`||r===`html_block`;if(!a&&!i.includes(r))return null;let o=a?Kc(e.tag)||Yc(e.content):Kc(e.tag)||r;if(!o)return null;let s=i.includes(o),c=t[o]??t[r]??null,l=s||a?c:null;return{tag:o,isWhitelisted:s,component:l,display:gb(l)}}function fx(e,t,n){return dx(e,t,n)?.display===`block`}var px=new Set([`node`,`key`,`ref`,`ctx`,`renderNode`,`indexKey`,`__proto__`,`prototype`,`constructor`]);function mx(e,t={}){let n={},r=new Set(t.omit??[]);if(!e||typeof e!=`object`)return n;let i=Object.getOwnPropertyDescriptors(e);for(let[e,t]of Object.entries(i))px.has(e)||r.has(e)||t.enumerable&&`value`in t&&(n[e]=t.value);return n}var hx=e(i(),1),gx={note:`ℹ️`,info:`ℹ️`,tip:`💡`,warning:`⚠️`,danger:`❗`,error:`⛔`,caution:`⚠️`};function _x(e){let{node:t,ctx:n,renderNode:r,indexKey:i,isDark:a}=e,o=String(t.kind||`note`),s=(0,_.useMemo)(()=>t.title&&String(t.title).trim().length?String(t.title):o.charAt(0).toUpperCase()+o.slice(1),[o,t.title]),[c,l]=(0,_.useState)(()=>{var e;return!!t.collapsible&&!((e=t.open)==null||e)}),u=(0,_.useMemo)(()=>`admonition-${Math.random().toString(36).slice(2,9)}`,[]);return(0,v.jsxs)(`div`,{className:`admonition admonition-${o}${a?` is-dark`:``}`,"data-index-key":i,children:[(0,v.jsxs)(`div`,{id:u,className:`admonition-header`,children:[gx[o]&&(0,v.jsx)(`span`,{className:`admonition-icon`,children:gx[o]}),(0,v.jsx)(`span`,{className:`admonition-title`,children:s}),t.collapsible&&(0,v.jsx)(`button`,{type:`button`,className:`admonition-toggle`,"aria-expanded":!c,"aria-controls":`${u}-content`,title:c?`Expand`:`Collapse`,onClick:()=>l(e=>!e),children:(0,v.jsx)(`span`,{children:c?`▶`:`▼`})})]}),!c&&(0,v.jsx)(`div`,{id:`${u}-content`,className:`admonition-content`,"aria-labelledby":u,children:n&&r?ob(t.children,n,String(i??u),r):null})]})}var vx=(0,_.createContext)(!1),yx=(0,_.createContext)(null);function bx(){return(0,_.useContext)(yx)}var xx=(0,_.createContext)(null);function Sx(e,t){let n=typeof window<`u`&&typeof document<`u`,r=n?window.requestIdleCallback??(e=>window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),16)):null,i=n?window.cancelIdleCallback??(e=>window.clearTimeout(e)):null,a=null,o=null,s=new Map,c=new Set,l=null,u=()=>{if(!s.size){try{a?.disconnect()}catch{}a=null,o=null,c.size||(()=>{if(l!=null){try{i?.(l)}catch{}l=null}})()}},d=e=>{let t=s.get(e);if(t){t.state.current=!0;try{t.resolve()}catch{}try{a?.unobserve(e)}catch{}s.delete(e),c.delete(e),u()}},f=()=>{r&&l==null&&c.size&&(l=r(()=>{l=null;let e=c.values().next().value;e&&(c.delete(e),d(e),c.size&&f())},{timeout:1200}))};return(r,i)=>{let l={current:!1},p,m=!1,h=new Promise(e=>{p=()=>{m||(m=!0,e())}}),g=()=>{if(s.has(r)){s.delete(r);try{a?.unobserve(r)}catch{}}c.delete(r),u()};if(!n||!t())return l.current=!0,p(),{isVisible:()=>!0,whenVisible:h,destroy:g};let _=((t,r)=>{if(!n||typeof IntersectionObserver>`u`)return null;let i=((t,n)=>({root:e()??null,rootMargin:t,threshold:n}))(t,r);if(a&&(l=i,(c=o)&&c.root===l.root&&c.rootMargin===l.rootMargin&&c.threshold===l.threshold))return a;var c,l;if(a)try{a.disconnect()}catch{}a=new IntersectionObserver(e=>{for(let t of e)(t.isIntersecting||t.intersectionRatio>0)&&d(t.target)},{root:i.root,rootMargin:i.rootMargin,threshold:i.threshold}),o=i;for(let e of s.keys())a.observe(e);return a})(i?.rootMargin??`300px`,i?.threshold??0);return _?(s.set(r,{resolve:p,state:l}),_.observe(r),c.add(r),f(),{isVisible:()=>l.current,whenVisible:h,destroy:g}):(l.current=!0,p(),{isVisible:()=>!0,whenVisible:h,destroy:g})}}var Cx=Sx(()=>null,()=>!0);function wx({getRoot:e,enabled:t=!0,children:n}){let r=(0,_.useRef)(t);r.current=t;let i=(0,_.useRef)(e);i.current=e;let a=(0,_.useMemo)(()=>Sx(()=>i.current?.call(i)??null,()=>r.current),[]);return(0,v.jsx)(xx.Provider,{value:a,children:n})}function Tx(){return(0,_.useContext)(xx)??Cx}function Ex(e={}){let t=(0,_.useRef)(null);t.current||=s(e);let n=t.current,[r,i]=(0,_.useState)(()=>n.getSnapshot());return(0,_.useEffect)(()=>{let e=n.subscribe(()=>{i(n.getSnapshot())});return n.resume(),i(n.getSnapshot()),()=>{e(),n.pause()}},[n]),(0,_.useMemo)(()=>({...r,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,getSnapshot:n.getSnapshot}),[n,r])}function Dx(e){let{node:t}=e;return(0,v.jsx)(`span`,{className:`checkbox-node`,children:(0,v.jsx)(`input`,{type:`checkbox`,checked:!!t.checked,disabled:!0,className:`checkbox-input`,readOnly:!0})})}var Ox={"common.copy":`Copy`,"common.copied":`Copied`,"common.decrease":`Decrease`,"common.reset":`Reset`,"common.increase":`Increase`,"common.expand":`Expand`,"common.collapse":`Collapse`,"common.preview":`Preview`,"common.source":`Source`,"common.export":`Export`,"common.open":`Open`,"common.close":`Close`,"common.zoomIn":`Zoom in`,"common.zoomOut":`Zoom out`,"common.resetZoom":`Reset zoom`,"image.loadError":`Image failed to load`,"image.loading":`Loading image...`};function kx(){return{t:e=>Ox[e]??function(e){return(e.split(`.`).pop()||e).replace(/[_-]/g,` `).replace(/([A-Z])/g,` $1`).replace(/\s+/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}(e)}}var Ax=null,jx=null,Mx=null,Nx=null,Px=null,Fx=null;function Ix(){Nx&&=(clearTimeout(Nx),null),Px&&=(clearTimeout(Px),null)}async function Lx(e){if(!Ax||!jx)return;let{x:t,y:n}=await u(jx,Ax,{placement:e,middleware:[l(8),d(),c({padding:8})],strategy:`fixed`});Ax.style.transform=`translate3d(${Math.round(t)}px, ${Math.round(n)}px, 0)`}function Rx(e,t,n=`top`,r=!1,i,a){if(!e||typeof document>`u`||(Ax||typeof document>`u`||(Ax=document.createElement(`div`),Ax.className=`markstream-react ms-tooltip`,Ax.setAttribute(`role`,`tooltip`),Ax.dataset.visible=`false`,Ax.style.position=`fixed`,Ax.style.left=`0px`,Ax.style.top=`0px`,Ax.style.transform=`translate3d(0,0,0)`,document.body.appendChild(Ax)),!Ax))return;Ix();let o=async()=>{if(Ax){jx=e,Ax.textContent=t,Ax.dataset.placement=n,Ax.dataset.dark=function(e){if(typeof e==`boolean`)return e;if(typeof document<`u`)try{if(document.documentElement.classList.contains(`dark`))return!0}catch{}if(typeof window<`u`&&typeof window.matchMedia==`function`)try{return window.matchMedia(`(prefers-color-scheme: dark)`).matches}catch{}return!1}(a)?`true`:`false`,Ax.dataset.visible=`false`,Fx=`tooltip-${Date.now()}-${Math.random().toString(36).slice(2)}`,Ax.id=Fx;try{e.setAttribute(`aria-describedby`,Fx)}catch{}await Lx(n),Ax.dataset.visible=`true`,Mx?.(),Mx=f(e,Ax,()=>{Lx(n)})}};r?o():Nx=setTimeout(o,80)}function zx(e=!1){if(!Ax)return;Ix();let t=()=>{if(Ax){if(Ax.dataset.visible=`false`,jx&&Fx)try{jx.removeAttribute(`aria-describedby`)}catch{}jx=null,Fx=null,Mx&&=(Mx(),null)}};e?t():Px=setTimeout(t,120)}function Bx(e){let{t}=kx(),n=(0,_.useMemo)(()=>{let t=e.code||``,n=t.trim().toLowerCase();return n.startsWith(`<!doctype`)||n.startsWith(`<html`)||n.startsWith(`<body`)?t:`<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background-color: ${e.isDark?`#020617`:`#ffffff`};\n color: ${e.isDark?`#e5e7eb`:`#020617`};\n }\n body {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;\n }\n </style>\n </head>\n <body>\n ${t}\n </body>\n</html>`},[e.code,e.isDark]),r=(0,_.useMemo)(()=>{return t=e.htmlPreviewSandbox,n=e.htmlPreviewAllowScripts,typeof t==`string`?t:t===void 0&&!0===n?`allow-scripts`:``;var t,n},[e.htmlPreviewAllowScripts,e.htmlPreviewSandbox]);return(0,_.useEffect)(()=>{let t=t=>{var n;t.key!==`Escape`&&t.key!==`Esc`||(n=e.onClose)==null||n.call(e)};return typeof window<`u`&&window.addEventListener(`keydown`,t),()=>{typeof window<`u`&&window.removeEventListener(`keydown`,t)}},[e]),typeof document>`u`?null:(0,hx.createPortal)((0,v.jsx)(`div`,{className:`markstream-react html-preview-frame__backdrop`+(e.isDark?` html-preview-frame__backdrop--dark`:``),onClick:()=>e.onClose?.call(e),children:(0,v.jsxs)(`div`,{className:`html-preview-frame`+(e.isDark?` html-preview-frame--dark`:``),onClick:e=>e.stopPropagation(),children:[(0,v.jsxs)(`div`,{className:`html-preview-frame__header`,children:[(0,v.jsxs)(`div`,{className:`html-preview-frame__title`,children:[(0,v.jsx)(`span`,{className:`html-preview-frame__dot`}),(0,v.jsx)(`span`,{className:`html-preview-frame__label`,children:e.title||`HTML ${t(`common.preview`)}`})]}),(0,v.jsx)(`button`,{type:`button`,className:`html-preview-frame__close`+(e.isDark?` html-preview-frame__close--dark`:``),onClick:()=>e.onClose?.call(e),children:`×`})]}),(0,v.jsx)(`iframe`,{className:`html-preview-frame__iframe`,sandbox:r,referrerPolicy:`no-referrer`,src:`about:blank`,srcDoc:n,title:e.title||`Preview`})]})}),document.body)}var Vx=!1,Hx=null,Ux=!1,Wx=null;async function Gx(){if(Wx)return Wx;if(Hx)return Hx;if(Ux)return null;Wx=(async()=>{try{let e=function(e){let t=typeof e?.createCodeBlockRuntime==`function`||typeof e?.useMonaco==`function`?e:e?.default,n=t?.createCodeBlockRuntime??t?.useMonaco;return typeof n==`function`?{createCodeBlockRuntime:e=>n.call(t,e),detectLanguage:(t?.detectLanguage)?.bind(t),preloadStreamDiffs:(t?.preloadStreamDiffs)?.bind(t)}:null}(await a(()=>import(`./vendor-stream-diffs-CwbKsmlv.js`).then(e=>e.t),__vite__mapDeps([0,1,2])));if(e)return await async function(e){Vx||(Vx=!0,e!=null&&e.preloadStreamDiffs&&await e.preloadStreamDiffs())}(e),Hx=e,Hx}catch{}return Ux=!0,null})();try{return await Wx}finally{Wx=null}}var Kx=typeof window<`u`?_.useLayoutEffect:_.useEffect,qx={isShowPreview:!0,loading:!0,stream:!0,enableFontSizeControl:!0,showHeader:!0,showCopyButton:!0,showExpandButton:!0,showPreviewButton:!0,showCollapseButton:!0,showFontSizeButtons:!0};async function Jx(e,t){if(t)try{if(!await t())return!1}catch{return!1}if(typeof window>`u`||typeof window.requestAnimationFrame!=`function`)return!1;let n=()=>new Promise(e=>window.requestAnimationFrame(()=>e()));for(let t=0;t<30;t++){await n();let t=e.querySelector([`.stream-diffs-shell`,`[data-stream-diffs-state]`].join(`,`))??e.firstElementChild;if(!t)continue;let r=t.getBoundingClientRect();if(r.width>0&&r.height>0)return await n(),!0}return!1}function Yx(e,t){let n={...t||{}};for(let e of[`theme`,`themes`,`themeType`,`language`,`languages`,`stream`,`disableFileHeader`,`onThemeChange`,`renderCustomHeader`,`renderHeaderMetadata`,`renderHeaderPrefix`])delete n[e];if(!e)return{overflow:`wrap`,...n};let r=n.parseDiffOptions&&typeof n.parseDiffOptions==`object`?n.parseDiffOptions:{},i={overflow:`wrap`,diffStyle:`split`,expandUnchanged:!1,collapsedContextThreshold:5,hunkSeparators:`line-info`,parseDiffOptions:{context:2}};return{...i,...n,parseDiffOptions:{...i.parseDiffOptions,...r}}}function Xx(e){let t=String(e??``).match(/\d+(?:\.\d+)?/g);if(!t||t.length<3)return null;let[n,r,i]=t.slice(0,3).map(Number);return .2126*n+.7152*r+.0722*i}function Zx(e){let t=String(e??``).trim().toLowerCase();if(!t||t===`transparent`)return!0;let n=t.match(/^#([0-9a-f]{8})$/);if(n)return Number.parseInt(n[1].slice(6),16)===0;let r=t.match(/^#([0-9a-f]{4})$/);if(r)return Number.parseInt(r[1][3]+r[1][3],16)===0;let i=(t.match(/^(?:rgba?|hsla?)\(([^)]+)\)/)?.[1])?.split(/[\s,/]+/).filter(Boolean);return i?.length===4&&Number(i[3])===0}function Qx(e){let t={...qx,...e},{node:n,isDark:r,loading:i,stream:a,isShowPreview:o,enableFontSizeControl:s,darkTheme:c,lightTheme:l,codeBlockOptions:u,themes:d,minWidth:f,maxWidth:p,showHeader:m,showCopyButton:h,showExpandButton:g,showPreviewButton:y,showCollapseButton:b,showFontSizeButtons:x,showLineNumbers:S,showTooltips:C}=t,w=(0,_.useRef)(null),T=(0,_.useRef)(null),E=(0,_.useRef)(null),D=(0,_.useRef)(null),O=(0,_.useRef)(null),k=(0,_.useRef)(null),A=(0,_.useRef)(null),j=(0,_.useRef)(0),M=(0,_.useRef)(null),N=(0,_.useRef)(null),P=Tx(),ee=(0,_.useRef)(null),F=(0,_.useRef)(null),I=(0,_.useRef)(u),te=(0,_.useRef)(null),L=(0,_.useRef)([]),ne=(0,_.useRef)(null),re=(0,_.useRef)(!1),R=(0,_.useRef)(void 0),[z,ie]=(0,_.useState)(!1),[B,ae]=(0,_.useState)(()=>typeof window>`u`),[oe,V]=(0,_.useState)(!1),[H,se]=(0,_.useState)(!1),[ce,le]=(0,_.useState)(!1),[ue,de]=(0,_.useState)(()=>n.language||`plaintext`),[U,fe]=(0,_.useState)(()=>Eb(n.language)),[pe,me]=(0,_.useState)(!1),[W,he]=(0,_.useState)(!1),[G,ge]=(0,_.useState)(!1),[_e,ve]=(0,_.useState)(!1),[ye,be]=(0,_.useState)(0),{t:K}=kx();(0,_.useEffect)(()=>{re.current=W},[W]);let q=(0,_.useMemo)(()=>Yx(!!n.diff,u),[u,n.diff]),[xe,Se]=(0,_.useState)(()=>{let e=Number(Yx(!!n.diff,u)?.fontSize);return Number.isFinite(e)&&e>0?e:12}),[Ce,we]=(0,_.useState)(xe),Te=(0,_.useMemo)(()=>!1!==C,[C]),Ee=typeof S==`boolean`?S:!0!==q.disableLineNumbers,De=(0,_.useRef)(Ee),Oe=Number(I.current?.fontSize),ke=Number(u?.fontSize),Ae=I.current!==u&&Number.isFinite(Oe)&&Oe>0&&(!Number.isFinite(ke)||ke<=0),je=(0,_.useCallback)(()=>{let e=q.maxHeight??500;return typeof e==`number`&&Number.isFinite(e)?e:500},[q.maxHeight]);Kx(()=>{let e=Number(q.fontSize),t=Number.isFinite(e)&&e>0?e:12;Se(t),we(t)},[q.fontSize]);let Me=(0,_.useCallback)(e=>{var t;if(z)return;let n=w.current,r=E.current;if(!n||!r)return;let i=k.current===`diff`?r.getDiffEditorView?.call(r):r.getEditorView?.call(r);if(!i)return;let a=je(),o=k.current===`diff`,s=o?`important`:``;e?(n.style.minHeight=`0px`,n.style.setProperty(`max-height`,`none`,s),n.style.overflow=`visible`):(n.style.minHeight=`0px`,n.style.setProperty(`max-height`,`${Math.ceil(a)}px`,s),n.style.overflow=o?`hidden`:`auto`);try{let r=Number((()=>{if(typeof i.getContentHeight==`function`)return i.getContentHeight();if(o&&typeof i.getModifiedEditor==`function`){let e=i.getModifiedEditor();if(e&&typeof e.getContentHeight==`function`)return e.getContentHeight()}})());if(Number.isFinite(r)&&r>0){let t=e?r:Math.min(r,a);n.style.setProperty(`height`,`${Math.ceil(Math.max(1,t))}px`,s)}(t=i.layout)==null||t.call(i)}catch{}},[je,z]),Ne=(0,_.useCallback)(e=>{if(Me(e),typeof window>`u`||typeof window.requestAnimationFrame!=`function`)return;let t=window.requestAnimationFrame(()=>{Me(e),window.requestAnimationFrame(()=>Me(e))});return window.setTimeout(()=>Me(e),180),()=>window.cancelAnimationFrame(t)},[Me]),Pe=(0,_.useCallback)(()=>{var e,t;for(let t of L.current)try{typeof t==`function`?t():(e=t?.dispose)==null||e.call(t)}catch{}L.current=[],(t=ne.current)==null||t.disconnect(),ne.current=null},[]),Fe=(0,_.useCallback)(()=>{Pe();let e=E.current,t=w.current;if(!e||!t||k.current!==`diff`)return;let n=()=>Ne(re.current),r=(e,t)=>{try{let r=e?.[t];if(typeof r!=`function`)return;let i=r.call(e,n);i&&L.current.push(i)}catch{}},i=e.getDiffEditorView?.call(e),a=(i?.getOriginalEditor)?.call(i),o=(i?.getModifiedEditor)?.call(i);if(r(i,`onDidUpdateDiff`),r(a,`onDidContentSizeChange`),r(o,`onDidContentSizeChange`),r(a,`onDidLayoutChange`),r(o,`onDidLayoutChange`),typeof window<`u`&&typeof window.MutationObserver==`function`){let e=new window.MutationObserver(e=>{e.some(e=>e.type===`childList`||e.type===`attributes`&&e.target!==t)&&n()});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`class`]}),ne.current=e}},[Pe,Ne]);(0,_.useEffect)(()=>kb(()=>{be(e=>e+1)}),[]),(0,_.useEffect)(()=>{fe(Eb(n.language))},[n.language]);let Ie=(0,_.useRef)(n);Ie.current=n;let Le=(0,_.useCallback)(()=>{var e;j.current+=1;try{(e=D.current)==null||e.call(D)}catch{}Pe(),O.current=null,k.current=null,A.current=null,le(!1),se(!1)},[Pe]),Re=(0,_.useMemo)(()=>r?c??d?.[0]??`vitesse-dark`:l??d?.[1]??`vitesse-light`,[c,r,l,d]),ze=(0,_.useCallback)(()=>Re,[Re]),J=(0,_.useMemo)(()=>ze(),[ze]),Be=(0,_.useMemo)(()=>function(e,t){let n=(function(e){return typeof e==`string`?e:null}(e)??``).toLowerCase();return n?[`dark`,`night`,`moon`,`black`,`dracula`,`mocha`,`frappe`,`macchiato`,`palenight`,`ocean`,`poimandres`,`monokai`,`laserwave`,`tokyo`,`slack-dark`,`rose-pine`,`github-dark`,`material-theme`,`one-dark`,`catppuccin-mocha`,`catppuccin-frappe`,`catppuccin-macchiato`].some(e=>n.includes(e))&&![`light`,`latte`,`dawn`,`lotus`].some(e=>n.includes(e)):t}(J,!!r),[r,J]),Ve=(0,_.useMemo)(()=>n.diff?r?`dark`:`light`:Be?`dark`:`light`,[r,n.diff,Be]),He=(0,_.useMemo)(()=>n.diff?Ve===`dark`:Be,[Ve,n.diff,Be]),Ue=(0,_.useMemo)(()=>{let e=q,t=Nb(q,Ae?12:Ce),r=function(e){let t=typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0;return{top:t,bottom:t}}(e?.padding),i=n.diff?0:8,a=typeof e?.padding==`number`&&Number.isFinite(e.padding)&&e.padding>=0,o=Mb(e?.tabSize)??4;return{...t,paddingBottom:a?r.bottom:i,paddingTop:a?r.top:i,tabSize:o}},[Ae,Ce,n.diff,q]),We=(0,_.useMemo)(()=>!!n.diff&&q.diffStyle===`unified`,[n.diff,q]),Ge=(0,_.useMemo)(()=>{let e=String(n.diff?n.updatedCode??n.code??``:n.code??``);if(!e)return 1;let t=i?e:e.replace(/\r\n$|\n$|\r$/,``);return Math.max(1,t.split(/\r\n|\r|\n/).length)},[i,n.code,n.diff,n.updatedCode]),Ke=(0,_.useMemo)(()=>Math.ceil(Ge*Ue.lineHeight+Ue.paddingTop+Ue.paddingBottom),[Ge,Ue]),qe=(0,_.useMemo)(()=>{let e={"--markstream-code-padding-left":`62px`,"--markstream-pre-diff-line-height":`${Ue.lineHeight}px`,"--markstream-pre-line-number-top":`${Ue.paddingTop}px`,"--markstream-pre-line-number-width":`36px`,"--markstream-pre-line-number-gap":`0px`,fontSize:`${Ue.fontSize}px`,lineHeight:`${Ue.lineHeight}px`,maxHeight:`${je()}px`,overflow:`auto`,paddingBottom:`${Ue.paddingBottom}px`,paddingTop:`${Ue.paddingTop}px`,tabSize:Ue.tabSize,whiteSpace:q.overflow===`scroll`?`pre`:`pre-wrap`};return Ue.fontFamily&&(e.fontFamily=Ue.fontFamily),e},[je,Ue,q.overflow]),Je=(0,_.useCallback)(()=>{let e=w.current,t=T.current;if(!e||!t)return;if(t.style.removeProperty(`--vscode-editor-foreground`),t.style.removeProperty(`--vscode-editor-background`),t.style.removeProperty(`--vscode-editor-selectionBackground`),e.style.setProperty(`--diffs-tab-size`,String(Ue.tabSize)),typeof q.padding==`number`&&Number.isFinite(q.padding)&&q.padding>=0?e.style.setProperty(`--diffs-gap-block`,`${Ue.paddingTop}px`):e.style.removeProperty(`--diffs-gap-block`),n.diff)return e.style.removeProperty(`--vscode-editor-foreground`),e.style.removeProperty(`--vscode-editor-background`),void e.style.removeProperty(`--vscode-editor-selectionBackground`);let r=e;try{let i=typeof window<`u`&&window.getComputedStyle?window.getComputedStyle(r):null,a=String(i?.getPropertyValue(`--vscode-editor-foreground`)??``).trim()||String(i?.color??``).trim(),o=String(i?.getPropertyValue(`--vscode-editor-background`)??``).trim(),s=String(i?.backgroundColor??``).trim(),c=Zx(o)?Zx(s)?``:s:o,l=String(i?.getPropertyValue(`--vscode-editor-selectionBackground`)??``).trim();if(function(e,t,n,r){if(!n)return!1;let i=Xx(e),a=Xx(t);return r?i!=null&&i>170||a!=null&&a<110:i!=null&&i<85||a!=null&&a>190}(c,a,Db(String(n.language||U||ue||`plaintext`))===`plaintext`,t.classList.contains(`is-dark`)))return e.style.removeProperty(`--vscode-editor-foreground`),e.style.removeProperty(`--vscode-editor-background`),void e.style.removeProperty(`--vscode-editor-selectionBackground`);a?e.style.setProperty(`--vscode-editor-foreground`,a):e.style.removeProperty(`--vscode-editor-foreground`),c?e.style.setProperty(`--vscode-editor-background`,c):e.style.removeProperty(`--vscode-editor-background`),l?e.style.setProperty(`--vscode-editor-selectionBackground`,l):e.style.removeProperty(`--vscode-editor-selectionBackground`)}catch{}},[U,ue,n.diff,n.language,Ue,q]),Ye=(0,_.useCallback)(()=>{let e=q.maxHeight,t={...q||{},...e==null?{}:{MAX_HEIGHT:e},themes:d?[...d]:void 0,stream:!1,disableFileHeader:!0,disableLineNumbers:!Ee,fontSize:Ue.fontSize,lineHeight:Ue.lineHeight,...Ue.fontFamily?{fontFamily:Ue.fontFamily}:{},theme:J,themeType:r?`dark`:`light`,onThemeChange(){Je()}};return delete t.maxHeight,delete t.padding,delete t.tabSize,t.unsafeCSS=[`[data-file], [data-diff] { --diffs-min-number-column-width-default: 2ch !important; }`,typeof t.unsafeCSS==`string`?t.unsafeCSS:``].filter(Boolean).join(`
169
+ `:``}${t}`;return e},[d]),p=(0,_.useMemo)(()=>{if(!0===r&&!c)return{"--markstream-pre-line-number-width":`${Math.max(2,String(d).length)}ch`,"--markstream-code-padding-left":`calc(var(--markstream-pre-line-number-padding-left, 2ch) + var(--markstream-pre-line-number-width, 2ch) + var(--markstream-pre-line-number-padding-right, 1ch) + var(--markstream-pre-line-number-separator-width, 2px) + var(--markstream-pre-line-number-gap-to-code, 1ch))`}},[c,r,d]),m=(0,_.useMemo)(()=>{let e=!0===t?.split(/\s+/).includes(`code-fallback-plain`),n=e?Nb():{fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,fontSize:16,lineHeight:28},r=e?function(e,t=8){return{top:t,bottom:t}}(0,c?0:8):{top:0,bottom:0};return{"--markstream-pre-line-number-top":`${r.top}px`,fontFamily:n.fontFamily,fontSize:`${n.fontSize}px`,lineHeight:`${n.lineHeight}px`,paddingBottom:`${r.bottom}px`,paddingTop:`${r.top}px`,tabSize:e?4:2,...i,...p}},[t,c,p,i]);return(0,v.jsx)(`pre`,{className:[o,t,r?`markstream-pre--line-numbers`:``,c?`markstream-pre--diff-preview`:``,c&&n?`markstream-pre--diff-inline`:``].filter(Boolean).join(` `),style:m,"aria-busy":!0===e?.loading,"aria-label":s,"data-language":a,"data-markstream-line-numbers":r?`1`:void 0,"data-markstream-pre":`1`,tabIndex:0,children:c?(0,v.jsx)(`code`,{translate:`no`,className:`markstream-pre__diff-code`,children:l.map(e=>(0,v.jsx)(`span`,{className:[`markstream-pre__diff-pane`,e.className].join(` `),children:e.lines.map(e=>(0,v.jsxs)(`span`,{className:[`markstream-pre__diff-line`,`markstream-pre__diff-line--${e.kind}`,e.empty?`markstream-pre__diff-line--empty`:``].filter(Boolean).join(` `),children:[(0,v.jsx)(`span`,{className:`markstream-pre__diff-rail`,"aria-hidden":`true`}),(0,v.jsx)(`span`,{className:`markstream-pre__diff-number`,"aria-hidden":`true`,children:e.number}),(0,v.jsx)(`span`,{className:`markstream-pre__diff-content`,children:(0,v.jsx)(`span`,{className:`markstream-pre__diff-content-inner`,children:e.code})})]},e.key))},e.key))}):(0,v.jsxs)(v.Fragment,{children:[r&&(0,v.jsx)(`span`,{className:`markstream-pre__line-numbers`,"aria-hidden":`true`,children:(0,v.jsx)(`span`,{className:`markstream-pre__line-numbers-text`,children:f})}),(0,v.jsx)(`code`,{translate:`no`,className:`markstream-pre__code`,children:u})]})})}function Ub(e){return e.startsWith(`--`)?e:e.replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Wb(e){let t={...e};if(Object.prototype.hasOwnProperty.call(t,`class`)&&(t.className=t.class,delete t.class),Object.prototype.hasOwnProperty.call(t,`for`)&&(t.htmlFor=t.for,delete t.for),typeof t.style==`string`){let e=function(e){let t=e.trim();if(!t)return;let n={};for(let e of t.split(`;`)){let t=e.trim();if(!t)continue;let r=t.indexOf(`:`);if(r===-1)continue;let i=Ub(t.slice(0,r).trim()),a=t.slice(r+1).trim();i&&(n[i]=a)}return Object.keys(n).length?n:void 0}(t.style);e?t.style=e:delete t.style}return t}var Gb=Ty,Kb=yy;function qb(e,t){return vy(e,t)}function Jb(e,t){return Oy(e,t)}function Yb(e,t,n=!1){let r=Object.entries(t??{}),i=r.length>0?r.map(([e,t])=>t===``?` ${e}`:` ${e}="${t}"`).join(``):``;return n?`<${e}${i} />`:`<${e}${i}>`}function Xb(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function Zb(e,t){return t.nodeComponents?.[e]||t.nodeComponents?.[e.toLowerCase()]}function Qb(e){if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||typeof e==`number`)return String(e);if(Array.isArray(e))return e.map(Qb).join(``);if(!_.isValidElement(e))return``;let t=e;if(typeof t.type!=`string`)return Qb(t.props.children);let n=Object.entries(t.props).filter(([e,t])=>e!==`children`&&e!==`key`&&e!==`ref`&&t!=null&&typeof t!=`boolean`).map(([e,t])=>` ${e===`className`?`class`:e}="${String(t)}"`).join(``);return`<${t.type}${n}>${Qb(t.props.children)}</${t.type}>`}function $b(e){return Object.entries(e).map(([e,t])=>[e,t===``?null:t])}function ex(e){let t=e.sourceNode,n=!0!==e.ctx?.final&&(!1===e.ctx?.final||!!t?.loading);return{loading:n,autoClosed:n||!!t?.autoClosed}}function tx(e,t,n){return function(e,t){return!!(t.propComponents?.[e]||t.propComponents?.[e.toLowerCase()])}(e,n)?Cy(t):t}function nx(e,t,n,r,i,a,o,s=ex(i)){let c=Kc(e),l=a??function(e){return e.map(Qb).join(``)}(n),u={type:c,tag:c,attrs:$b(t),content:l,raw:o??`${Yb(e,t)}${l}</${e}>`,loading:s.loading,autoClosed:s.autoClosed};if(i.ctx&&i.renderNode)return i.renderNode(u,r,i.ctx);let d=Zb(e,i);return d?_.createElement(d,{key:r,node:u}):null}function rx(e,t,n=`safe`,r={}){if(!e)return[];if(n===`escape`)return[e];try{let i=Gb(e),a=0,o=r.keyPrefix??`ms-html`,s=[],c=[];for(let e of i){if(e.type===`text`){if(s.length>0&&s[s.length-1].hardBlocked)continue;(s.length>0?s[s.length-1].children:c).push(e.content??``),s.length>0&&s[s.length-1].sourceParts.push(e.content??``);continue}if(e.type===`self_closing`){let i=e.attrs||{},l=Yb(e.tagName,i,!0),u=qb(e.tagName,t),d=!!Zb(e.tagName,r);if(yc.has(e.tagName.toLowerCase())||!u&&!d&&uy(e.tagName,n))continue;if(!u&&!d&&ly(e.tagName,n)){(s.length>0?s[s.length-1].children:c).push(l),s.length>0&&s[s.length-1].sourceParts.push(l);continue}let f=Kb(i,n,e.tagName),p=f.key,m=p!=null&&p!==``?p:`${o}-${a++}`,h=u?t[e.tagName]||t[e.tagName.toLowerCase()]:void 0,g=s.length>0?s[s.length-1].children:c;if(d)g.push(nx(e.tagName,i,[],m,r,``,l,{loading:!1,autoClosed:!1}));else if(h){let t=tx(e.tagName,f,r);g.push(_.createElement(h,{...t,key:m}))}else g.push(_.createElement(e.tagName,{...Wb(f),key:m,suppressHydrationWarning:!0}));s.length>0&&s[s.length-1].sourceParts.push(l);continue}if(e.type===`tag_open`){let i=s.length>0&&s[s.length-1].hardBlocked,a=qb(e.tagName,t),o=!!Zb(e.tagName,r);s.push({tagName:e.tagName,children:[],attrs:e.attrs,sourceParts:[],customComponent:a||o,hardBlocked:i||yc.has(e.tagName.toLowerCase())||!a&&!o&&uy(e.tagName,n),softBlocked:!i&&!a&&!o&&ly(e.tagName,n)});continue}let i=e.tagName.toLowerCase(),l=-1;for(let e=s.length-1;e>=0;e--)if(s[e].tagName.toLowerCase()===i){l=e;break}if(l!==-1)for(;s.length>l;){let e=s.pop();if(!e)continue;let l=e.sourceParts.join(``),u=`${Yb(e.tagName,e.attrs)}${l}</${e.tagName}>`,d;if(e.hardBlocked)d=null;else if(e.softBlocked)d=[Yb(e.tagName,e.attrs),...e.children,`</${e.tagName}>`];else{let s=Kb(e.attrs||{},n,e.tagName),c=s.key,f=c!=null&&c!==``?c:`${o}-${a++}`,p=e.customComponent?t[e.tagName]||t[e.tagName.toLowerCase()]:void 0;if(Zb(e.tagName,r)){let t=e.tagName.toLowerCase()===i?{loading:!1,autoClosed:!1}:ex(r);d=nx(e.tagName,e.attrs||{},e.children,f,r,l,u,t)}else d=p?_.createElement(p,{...tx(e.tagName,s,r),key:f},...e.children):_.createElement(e.tagName,{...Wb(s),key:f,suppressHydrationWarning:!0},...e.children)}s.length>0?Xb(s[s.length-1].children,d):Xb(c,d),s.length>0&&!e.hardBlocked&&s[s.length-1].sourceParts.push(u)}}for(;s.length>0;){let e=s.pop();if(!e||e.hardBlocked)continue;let i=e.sourceParts.join(``),l=`${Yb(e.tagName,e.attrs)}${i}`;if(e.softBlocked){Xb(c,[Yb(e.tagName,e.attrs),...e.children,`</${e.tagName}>`]),s.length>0&&s[s.length-1].sourceParts.push(l);continue}let u=Kb(e.attrs||{},n,e.tagName),d=u.key,f=d!=null&&d!==``?d:`${o}-${a++}`,p=e.customComponent?t[e.tagName]||t[e.tagName.toLowerCase()]:void 0,m;m=Zb(e.tagName,r)?nx(e.tagName,e.attrs||{},e.children,f,r,i,l,ex(r)):p?_.createElement(p,{...tx(e.tagName,u,r),key:f},...e.children):_.createElement(e.tagName,{...Wb(u),key:f,suppressHydrationWarning:!0},...e.children),c.push(m),s.length>0&&s[s.length-1].sourceParts.push(l)}return c}catch{return null}}function ix(e){let t=typeof e==`number`?e:Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:null}function ax(e){let t=e.split(/\r?\n/).filter(e=>/^\s*-\s+/.test(e)).length;return t>=3?500:t>0?280+60*t:360}function ox(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function sx(e){return e?e.replace(/·/g,`⋅`).replace(/℃/g,`°C`):``}function cx(e){let t=typeof e==`number`?e:Number.parseFloat(String(e??``));return Number.isFinite(t)&&t>0?t:null}function lx(e){let t=e.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith(`%%`)),n=Math.max(1,t.length),r=function(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(!(!e||e.startsWith(`%%`)))return(e.match(/^([A-Z][\w-]*)\b/i)?.[1])?.toLowerCase()||``}return``}(e);return r===`gantt`?220+28*n:r===`sequencediagram`?180+26*n:r===`classdiagram`||r===`statediagram`||r===`erdiagram`?180+24*n:r===`flowchart`||r===`graph`?170+28*n:200+22*n}function ux(e,t=360,n=500){return n==null?Math.max(t,e):Math.min(Math.max(t,e),n)}function dx(e,t,n){let r=Kc(e.type),i=(n??[]).map(e=>Kc(e)).filter(Boolean),a=r===`html_inline`||r===`html_block`;if(!a&&!i.includes(r))return null;let o=a?Kc(e.tag)||Yc(e.content):Kc(e.tag)||r;if(!o)return null;let s=i.includes(o),c=t[o]??t[r]??null,l=s||a?c:null;return{tag:o,isWhitelisted:s,component:l,display:gb(l)}}function fx(e,t,n){return dx(e,t,n)?.display===`block`}var px=new Set([`node`,`key`,`ref`,`ctx`,`renderNode`,`indexKey`,`__proto__`,`prototype`,`constructor`]);function mx(e,t={}){let n={},r=new Set(t.omit??[]);if(!e||typeof e!=`object`)return n;let i=Object.getOwnPropertyDescriptors(e);for(let[e,t]of Object.entries(i))px.has(e)||r.has(e)||t.enumerable&&`value`in t&&(n[e]=t.value);return n}var hx=e(i(),1),gx={note:`ℹ️`,info:`ℹ️`,tip:`💡`,warning:`⚠️`,danger:`❗`,error:`⛔`,caution:`⚠️`};function _x(e){let{node:t,ctx:n,renderNode:r,indexKey:i,isDark:a}=e,o=String(t.kind||`note`),s=(0,_.useMemo)(()=>t.title&&String(t.title).trim().length?String(t.title):o.charAt(0).toUpperCase()+o.slice(1),[o,t.title]),[c,l]=(0,_.useState)(()=>{var e;return!!t.collapsible&&!((e=t.open)==null||e)}),u=(0,_.useMemo)(()=>`admonition-${Math.random().toString(36).slice(2,9)}`,[]);return(0,v.jsxs)(`div`,{className:`admonition admonition-${o}${a?` is-dark`:``}`,"data-index-key":i,children:[(0,v.jsxs)(`div`,{id:u,className:`admonition-header`,children:[gx[o]&&(0,v.jsx)(`span`,{className:`admonition-icon`,children:gx[o]}),(0,v.jsx)(`span`,{className:`admonition-title`,children:s}),t.collapsible&&(0,v.jsx)(`button`,{type:`button`,className:`admonition-toggle`,"aria-expanded":!c,"aria-controls":`${u}-content`,title:c?`Expand`:`Collapse`,onClick:()=>l(e=>!e),children:(0,v.jsx)(`span`,{children:c?`▶`:`▼`})})]}),!c&&(0,v.jsx)(`div`,{id:`${u}-content`,className:`admonition-content`,"aria-labelledby":u,children:n&&r?ob(t.children,n,String(i??u),r):null})]})}var vx=(0,_.createContext)(!1),yx=(0,_.createContext)(null);function bx(){return(0,_.useContext)(yx)}var xx=(0,_.createContext)(null);function Sx(e,t){let n=typeof window<`u`&&typeof document<`u`,r=n?window.requestIdleCallback??(e=>window.setTimeout(()=>e({didTimeout:!0,timeRemaining:()=>0}),16)):null,i=n?window.cancelIdleCallback??(e=>window.clearTimeout(e)):null,a=null,o=null,s=new Map,c=new Set,l=null,u=()=>{if(!s.size){try{a?.disconnect()}catch{}a=null,o=null,c.size||(()=>{if(l!=null){try{i?.(l)}catch{}l=null}})()}},d=e=>{let t=s.get(e);if(t){t.state.current=!0;try{t.resolve()}catch{}try{a?.unobserve(e)}catch{}s.delete(e),c.delete(e),u()}},f=()=>{r&&l==null&&c.size&&(l=r(()=>{l=null;let e=c.values().next().value;e&&(c.delete(e),d(e),c.size&&f())},{timeout:1200}))};return(r,i)=>{let l={current:!1},p,m=!1,h=new Promise(e=>{p=()=>{m||(m=!0,e())}}),g=()=>{if(s.has(r)){s.delete(r);try{a?.unobserve(r)}catch{}}c.delete(r),u()};if(!n||!t())return l.current=!0,p(),{isVisible:()=>!0,whenVisible:h,destroy:g};let _=((t,r)=>{if(!n||typeof IntersectionObserver>`u`)return null;let i=((t,n)=>({root:e()??null,rootMargin:t,threshold:n}))(t,r);if(a&&(l=i,(c=o)&&c.root===l.root&&c.rootMargin===l.rootMargin&&c.threshold===l.threshold))return a;var c,l;if(a)try{a.disconnect()}catch{}a=new IntersectionObserver(e=>{for(let t of e)(t.isIntersecting||t.intersectionRatio>0)&&d(t.target)},{root:i.root,rootMargin:i.rootMargin,threshold:i.threshold}),o=i;for(let e of s.keys())a.observe(e);return a})(i?.rootMargin??`300px`,i?.threshold??0);return _?(s.set(r,{resolve:p,state:l}),_.observe(r),c.add(r),f(),{isVisible:()=>l.current,whenVisible:h,destroy:g}):(l.current=!0,p(),{isVisible:()=>!0,whenVisible:h,destroy:g})}}var Cx=Sx(()=>null,()=>!0);function wx({getRoot:e,enabled:t=!0,children:n}){let r=(0,_.useRef)(t);r.current=t;let i=(0,_.useRef)(e);i.current=e;let a=(0,_.useMemo)(()=>Sx(()=>i.current?.call(i)??null,()=>r.current),[]);return(0,v.jsx)(xx.Provider,{value:a,children:n})}function Tx(){return(0,_.useContext)(xx)??Cx}function Ex(e={}){let t=(0,_.useRef)(null);t.current||=s(e);let n=t.current,[r,i]=(0,_.useState)(()=>n.getSnapshot());return(0,_.useEffect)(()=>{let e=n.subscribe(()=>{i(n.getSnapshot())});return n.resume(),i(n.getSnapshot()),()=>{e(),n.pause()}},[n]),(0,_.useMemo)(()=>({...r,enqueue:n.enqueue,finish:n.finish,flush:n.flush,reset:n.reset,pause:n.pause,resume:n.resume,getSnapshot:n.getSnapshot}),[n,r])}function Dx(e){let{node:t}=e;return(0,v.jsx)(`span`,{className:`checkbox-node`,children:(0,v.jsx)(`input`,{type:`checkbox`,checked:!!t.checked,disabled:!0,className:`checkbox-input`,readOnly:!0})})}var Ox={"common.copy":`Copy`,"common.copied":`Copied`,"common.decrease":`Decrease`,"common.reset":`Reset`,"common.increase":`Increase`,"common.expand":`Expand`,"common.collapse":`Collapse`,"common.preview":`Preview`,"common.source":`Source`,"common.export":`Export`,"common.open":`Open`,"common.close":`Close`,"common.zoomIn":`Zoom in`,"common.zoomOut":`Zoom out`,"common.resetZoom":`Reset zoom`,"image.loadError":`Image failed to load`,"image.loading":`Loading image...`};function kx(){return{t:e=>Ox[e]??function(e){return(e.split(`.`).pop()||e).replace(/[_-]/g,` `).replace(/([A-Z])/g,` $1`).replace(/\s+/g,` `).replace(/\b\w/g,e=>e.toUpperCase()).trim()}(e)}}var Ax=null,jx=null,Mx=null,Nx=null,Px=null,Fx=null;function Ix(){Nx&&=(clearTimeout(Nx),null),Px&&=(clearTimeout(Px),null)}async function Lx(e){if(!Ax||!jx)return;let{x:t,y:n}=await u(jx,Ax,{placement:e,middleware:[l(8),d(),c({padding:8})],strategy:`fixed`});Ax.style.transform=`translate3d(${Math.round(t)}px, ${Math.round(n)}px, 0)`}function Rx(e,t,n=`top`,r=!1,i,a){if(!e||typeof document>`u`||(Ax||typeof document>`u`||(Ax=document.createElement(`div`),Ax.className=`markstream-react ms-tooltip`,Ax.setAttribute(`role`,`tooltip`),Ax.dataset.visible=`false`,Ax.style.position=`fixed`,Ax.style.left=`0px`,Ax.style.top=`0px`,Ax.style.transform=`translate3d(0,0,0)`,document.body.appendChild(Ax)),!Ax))return;Ix();let o=async()=>{if(Ax){jx=e,Ax.textContent=t,Ax.dataset.placement=n,Ax.dataset.dark=function(e){if(typeof e==`boolean`)return e;if(typeof document<`u`)try{if(document.documentElement.classList.contains(`dark`))return!0}catch{}if(typeof window<`u`&&typeof window.matchMedia==`function`)try{return window.matchMedia(`(prefers-color-scheme: dark)`).matches}catch{}return!1}(a)?`true`:`false`,Ax.dataset.visible=`false`,Fx=`tooltip-${Date.now()}-${Math.random().toString(36).slice(2)}`,Ax.id=Fx;try{e.setAttribute(`aria-describedby`,Fx)}catch{}await Lx(n),Ax.dataset.visible=`true`,Mx?.(),Mx=f(e,Ax,()=>{Lx(n)})}};r?o():Nx=setTimeout(o,80)}function zx(e=!1){if(!Ax)return;Ix();let t=()=>{if(Ax){if(Ax.dataset.visible=`false`,jx&&Fx)try{jx.removeAttribute(`aria-describedby`)}catch{}jx=null,Fx=null,Mx&&=(Mx(),null)}};e?t():Px=setTimeout(t,120)}function Bx(e){let{t}=kx(),n=(0,_.useMemo)(()=>{let t=e.code||``,n=t.trim().toLowerCase();return n.startsWith(`<!doctype`)||n.startsWith(`<html`)||n.startsWith(`<body`)?t:`<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <style>\n html, body {\n margin: 0;\n padding: 0;\n height: 100%;\n background-color: ${e.isDark?`#020617`:`#ffffff`};\n color: ${e.isDark?`#e5e7eb`:`#020617`};\n }\n body {\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Text', ui-sans-serif, sans-serif;\n }\n </style>\n </head>\n <body>\n ${t}\n </body>\n</html>`},[e.code,e.isDark]),r=(0,_.useMemo)(()=>{return t=e.htmlPreviewSandbox,n=e.htmlPreviewAllowScripts,typeof t==`string`?t:t===void 0&&!0===n?`allow-scripts`:``;var t,n},[e.htmlPreviewAllowScripts,e.htmlPreviewSandbox]);return(0,_.useEffect)(()=>{let t=t=>{var n;t.key!==`Escape`&&t.key!==`Esc`||(n=e.onClose)==null||n.call(e)};return typeof window<`u`&&window.addEventListener(`keydown`,t),()=>{typeof window<`u`&&window.removeEventListener(`keydown`,t)}},[e]),typeof document>`u`?null:(0,hx.createPortal)((0,v.jsx)(`div`,{className:`markstream-react html-preview-frame__backdrop`+(e.isDark?` html-preview-frame__backdrop--dark`:``),onClick:()=>e.onClose?.call(e),children:(0,v.jsxs)(`div`,{className:`html-preview-frame`+(e.isDark?` html-preview-frame--dark`:``),onClick:e=>e.stopPropagation(),children:[(0,v.jsxs)(`div`,{className:`html-preview-frame__header`,children:[(0,v.jsxs)(`div`,{className:`html-preview-frame__title`,children:[(0,v.jsx)(`span`,{className:`html-preview-frame__dot`}),(0,v.jsx)(`span`,{className:`html-preview-frame__label`,children:e.title||`HTML ${t(`common.preview`)}`})]}),(0,v.jsx)(`button`,{type:`button`,className:`html-preview-frame__close`+(e.isDark?` html-preview-frame__close--dark`:``),onClick:()=>e.onClose?.call(e),children:`×`})]}),(0,v.jsx)(`iframe`,{className:`html-preview-frame__iframe`,sandbox:r,referrerPolicy:`no-referrer`,src:`about:blank`,srcDoc:n,title:e.title||`Preview`})]})}),document.body)}var Vx=!1,Hx=null,Ux=!1,Wx=null;async function Gx(){if(Wx)return Wx;if(Hx)return Hx;if(Ux)return null;Wx=(async()=>{try{let e=function(e){let t=typeof e?.createCodeBlockRuntime==`function`||typeof e?.useMonaco==`function`?e:e?.default,n=t?.createCodeBlockRuntime??t?.useMonaco;return typeof n==`function`?{createCodeBlockRuntime:e=>n.call(t,e),detectLanguage:(t?.detectLanguage)?.bind(t),preloadStreamDiffs:(t?.preloadStreamDiffs)?.bind(t)}:null}(await a(()=>import(`./vendor-stream-diffs-DWy3xSmp.js`).then(e=>e.t),__vite__mapDeps([0,1,2])));if(e)return await async function(e){Vx||(Vx=!0,e!=null&&e.preloadStreamDiffs&&await e.preloadStreamDiffs())}(e),Hx=e,Hx}catch{}return Ux=!0,null})();try{return await Wx}finally{Wx=null}}var Kx=typeof window<`u`?_.useLayoutEffect:_.useEffect,qx={isShowPreview:!0,loading:!0,stream:!0,enableFontSizeControl:!0,showHeader:!0,showCopyButton:!0,showExpandButton:!0,showPreviewButton:!0,showCollapseButton:!0,showFontSizeButtons:!0};async function Jx(e,t){if(t)try{if(!await t())return!1}catch{return!1}if(typeof window>`u`||typeof window.requestAnimationFrame!=`function`)return!1;let n=()=>new Promise(e=>window.requestAnimationFrame(()=>e()));for(let t=0;t<30;t++){await n();let t=e.querySelector([`.stream-diffs-shell`,`[data-stream-diffs-state]`].join(`,`))??e.firstElementChild;if(!t)continue;let r=t.getBoundingClientRect();if(r.width>0&&r.height>0)return await n(),!0}return!1}function Yx(e,t){let n={...t||{}};for(let e of[`theme`,`themes`,`themeType`,`language`,`languages`,`stream`,`disableFileHeader`,`onThemeChange`,`renderCustomHeader`,`renderHeaderMetadata`,`renderHeaderPrefix`])delete n[e];if(!e)return{overflow:`wrap`,...n};let r=n.parseDiffOptions&&typeof n.parseDiffOptions==`object`?n.parseDiffOptions:{},i={overflow:`wrap`,diffStyle:`split`,expandUnchanged:!1,collapsedContextThreshold:5,hunkSeparators:`line-info`,parseDiffOptions:{context:2}};return{...i,...n,parseDiffOptions:{...i.parseDiffOptions,...r}}}function Xx(e){let t=String(e??``).match(/\d+(?:\.\d+)?/g);if(!t||t.length<3)return null;let[n,r,i]=t.slice(0,3).map(Number);return .2126*n+.7152*r+.0722*i}function Zx(e){let t=String(e??``).trim().toLowerCase();if(!t||t===`transparent`)return!0;let n=t.match(/^#([0-9a-f]{8})$/);if(n)return Number.parseInt(n[1].slice(6),16)===0;let r=t.match(/^#([0-9a-f]{4})$/);if(r)return Number.parseInt(r[1][3]+r[1][3],16)===0;let i=(t.match(/^(?:rgba?|hsla?)\(([^)]+)\)/)?.[1])?.split(/[\s,/]+/).filter(Boolean);return i?.length===4&&Number(i[3])===0}function Qx(e){let t={...qx,...e},{node:n,isDark:r,loading:i,stream:a,isShowPreview:o,enableFontSizeControl:s,darkTheme:c,lightTheme:l,codeBlockOptions:u,themes:d,minWidth:f,maxWidth:p,showHeader:m,showCopyButton:h,showExpandButton:g,showPreviewButton:y,showCollapseButton:b,showFontSizeButtons:x,showLineNumbers:S,showTooltips:C}=t,w=(0,_.useRef)(null),T=(0,_.useRef)(null),E=(0,_.useRef)(null),D=(0,_.useRef)(null),O=(0,_.useRef)(null),k=(0,_.useRef)(null),A=(0,_.useRef)(null),j=(0,_.useRef)(0),M=(0,_.useRef)(null),N=(0,_.useRef)(null),P=Tx(),ee=(0,_.useRef)(null),F=(0,_.useRef)(null),I=(0,_.useRef)(u),te=(0,_.useRef)(null),L=(0,_.useRef)([]),ne=(0,_.useRef)(null),re=(0,_.useRef)(!1),R=(0,_.useRef)(void 0),[z,ie]=(0,_.useState)(!1),[B,ae]=(0,_.useState)(()=>typeof window>`u`),[oe,V]=(0,_.useState)(!1),[H,se]=(0,_.useState)(!1),[ce,le]=(0,_.useState)(!1),[ue,de]=(0,_.useState)(()=>n.language||`plaintext`),[U,fe]=(0,_.useState)(()=>Eb(n.language)),[pe,me]=(0,_.useState)(!1),[W,he]=(0,_.useState)(!1),[G,ge]=(0,_.useState)(!1),[_e,ve]=(0,_.useState)(!1),[ye,be]=(0,_.useState)(0),{t:K}=kx();(0,_.useEffect)(()=>{re.current=W},[W]);let q=(0,_.useMemo)(()=>Yx(!!n.diff,u),[u,n.diff]),[xe,Se]=(0,_.useState)(()=>{let e=Number(Yx(!!n.diff,u)?.fontSize);return Number.isFinite(e)&&e>0?e:12}),[Ce,we]=(0,_.useState)(xe),Te=(0,_.useMemo)(()=>!1!==C,[C]),Ee=typeof S==`boolean`?S:!0!==q.disableLineNumbers,De=(0,_.useRef)(Ee),Oe=Number(I.current?.fontSize),ke=Number(u?.fontSize),Ae=I.current!==u&&Number.isFinite(Oe)&&Oe>0&&(!Number.isFinite(ke)||ke<=0),je=(0,_.useCallback)(()=>{let e=q.maxHeight??500;return typeof e==`number`&&Number.isFinite(e)?e:500},[q.maxHeight]);Kx(()=>{let e=Number(q.fontSize),t=Number.isFinite(e)&&e>0?e:12;Se(t),we(t)},[q.fontSize]);let Me=(0,_.useCallback)(e=>{var t;if(z)return;let n=w.current,r=E.current;if(!n||!r)return;let i=k.current===`diff`?r.getDiffEditorView?.call(r):r.getEditorView?.call(r);if(!i)return;let a=je(),o=k.current===`diff`,s=o?`important`:``;e?(n.style.minHeight=`0px`,n.style.setProperty(`max-height`,`none`,s),n.style.overflow=`visible`):(n.style.minHeight=`0px`,n.style.setProperty(`max-height`,`${Math.ceil(a)}px`,s),n.style.overflow=o?`hidden`:`auto`);try{let r=Number((()=>{if(typeof i.getContentHeight==`function`)return i.getContentHeight();if(o&&typeof i.getModifiedEditor==`function`){let e=i.getModifiedEditor();if(e&&typeof e.getContentHeight==`function`)return e.getContentHeight()}})());if(Number.isFinite(r)&&r>0){let t=e?r:Math.min(r,a);n.style.setProperty(`height`,`${Math.ceil(Math.max(1,t))}px`,s)}(t=i.layout)==null||t.call(i)}catch{}},[je,z]),Ne=(0,_.useCallback)(e=>{if(Me(e),typeof window>`u`||typeof window.requestAnimationFrame!=`function`)return;let t=window.requestAnimationFrame(()=>{Me(e),window.requestAnimationFrame(()=>Me(e))});return window.setTimeout(()=>Me(e),180),()=>window.cancelAnimationFrame(t)},[Me]),Pe=(0,_.useCallback)(()=>{var e,t;for(let t of L.current)try{typeof t==`function`?t():(e=t?.dispose)==null||e.call(t)}catch{}L.current=[],(t=ne.current)==null||t.disconnect(),ne.current=null},[]),Fe=(0,_.useCallback)(()=>{Pe();let e=E.current,t=w.current;if(!e||!t||k.current!==`diff`)return;let n=()=>Ne(re.current),r=(e,t)=>{try{let r=e?.[t];if(typeof r!=`function`)return;let i=r.call(e,n);i&&L.current.push(i)}catch{}},i=e.getDiffEditorView?.call(e),a=(i?.getOriginalEditor)?.call(i),o=(i?.getModifiedEditor)?.call(i);if(r(i,`onDidUpdateDiff`),r(a,`onDidContentSizeChange`),r(o,`onDidContentSizeChange`),r(a,`onDidLayoutChange`),r(o,`onDidLayoutChange`),typeof window<`u`&&typeof window.MutationObserver==`function`){let e=new window.MutationObserver(e=>{e.some(e=>e.type===`childList`||e.type===`attributes`&&e.target!==t)&&n()});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`class`]}),ne.current=e}},[Pe,Ne]);(0,_.useEffect)(()=>kb(()=>{be(e=>e+1)}),[]),(0,_.useEffect)(()=>{fe(Eb(n.language))},[n.language]);let Ie=(0,_.useRef)(n);Ie.current=n;let Le=(0,_.useCallback)(()=>{var e;j.current+=1;try{(e=D.current)==null||e.call(D)}catch{}Pe(),O.current=null,k.current=null,A.current=null,le(!1),se(!1)},[Pe]),Re=(0,_.useMemo)(()=>r?c??d?.[0]??`vitesse-dark`:l??d?.[1]??`vitesse-light`,[c,r,l,d]),ze=(0,_.useCallback)(()=>Re,[Re]),J=(0,_.useMemo)(()=>ze(),[ze]),Be=(0,_.useMemo)(()=>function(e,t){let n=(function(e){return typeof e==`string`?e:null}(e)??``).toLowerCase();return n?[`dark`,`night`,`moon`,`black`,`dracula`,`mocha`,`frappe`,`macchiato`,`palenight`,`ocean`,`poimandres`,`monokai`,`laserwave`,`tokyo`,`slack-dark`,`rose-pine`,`github-dark`,`material-theme`,`one-dark`,`catppuccin-mocha`,`catppuccin-frappe`,`catppuccin-macchiato`].some(e=>n.includes(e))&&![`light`,`latte`,`dawn`,`lotus`].some(e=>n.includes(e)):t}(J,!!r),[r,J]),Ve=(0,_.useMemo)(()=>n.diff?r?`dark`:`light`:Be?`dark`:`light`,[r,n.diff,Be]),He=(0,_.useMemo)(()=>n.diff?Ve===`dark`:Be,[Ve,n.diff,Be]),Ue=(0,_.useMemo)(()=>{let e=q,t=Nb(q,Ae?12:Ce),r=function(e){let t=typeof e==`number`&&Number.isFinite(e)&&e>=0?e:0;return{top:t,bottom:t}}(e?.padding),i=n.diff?0:8,a=typeof e?.padding==`number`&&Number.isFinite(e.padding)&&e.padding>=0,o=Mb(e?.tabSize)??4;return{...t,paddingBottom:a?r.bottom:i,paddingTop:a?r.top:i,tabSize:o}},[Ae,Ce,n.diff,q]),We=(0,_.useMemo)(()=>!!n.diff&&q.diffStyle===`unified`,[n.diff,q]),Ge=(0,_.useMemo)(()=>{let e=String(n.diff?n.updatedCode??n.code??``:n.code??``);if(!e)return 1;let t=i?e:e.replace(/\r\n$|\n$|\r$/,``);return Math.max(1,t.split(/\r\n|\r|\n/).length)},[i,n.code,n.diff,n.updatedCode]),Ke=(0,_.useMemo)(()=>Math.ceil(Ge*Ue.lineHeight+Ue.paddingTop+Ue.paddingBottom),[Ge,Ue]),qe=(0,_.useMemo)(()=>{let e={"--markstream-code-padding-left":`62px`,"--markstream-pre-diff-line-height":`${Ue.lineHeight}px`,"--markstream-pre-line-number-top":`${Ue.paddingTop}px`,"--markstream-pre-line-number-width":`36px`,"--markstream-pre-line-number-gap":`0px`,fontSize:`${Ue.fontSize}px`,lineHeight:`${Ue.lineHeight}px`,maxHeight:`${je()}px`,overflow:`auto`,paddingBottom:`${Ue.paddingBottom}px`,paddingTop:`${Ue.paddingTop}px`,tabSize:Ue.tabSize,whiteSpace:q.overflow===`scroll`?`pre`:`pre-wrap`};return Ue.fontFamily&&(e.fontFamily=Ue.fontFamily),e},[je,Ue,q.overflow]),Je=(0,_.useCallback)(()=>{let e=w.current,t=T.current;if(!e||!t)return;if(t.style.removeProperty(`--vscode-editor-foreground`),t.style.removeProperty(`--vscode-editor-background`),t.style.removeProperty(`--vscode-editor-selectionBackground`),e.style.setProperty(`--diffs-tab-size`,String(Ue.tabSize)),typeof q.padding==`number`&&Number.isFinite(q.padding)&&q.padding>=0?e.style.setProperty(`--diffs-gap-block`,`${Ue.paddingTop}px`):e.style.removeProperty(`--diffs-gap-block`),n.diff)return e.style.removeProperty(`--vscode-editor-foreground`),e.style.removeProperty(`--vscode-editor-background`),void e.style.removeProperty(`--vscode-editor-selectionBackground`);let r=e;try{let i=typeof window<`u`&&window.getComputedStyle?window.getComputedStyle(r):null,a=String(i?.getPropertyValue(`--vscode-editor-foreground`)??``).trim()||String(i?.color??``).trim(),o=String(i?.getPropertyValue(`--vscode-editor-background`)??``).trim(),s=String(i?.backgroundColor??``).trim(),c=Zx(o)?Zx(s)?``:s:o,l=String(i?.getPropertyValue(`--vscode-editor-selectionBackground`)??``).trim();if(function(e,t,n,r){if(!n)return!1;let i=Xx(e),a=Xx(t);return r?i!=null&&i>170||a!=null&&a<110:i!=null&&i<85||a!=null&&a>190}(c,a,Db(String(n.language||U||ue||`plaintext`))===`plaintext`,t.classList.contains(`is-dark`)))return e.style.removeProperty(`--vscode-editor-foreground`),e.style.removeProperty(`--vscode-editor-background`),void e.style.removeProperty(`--vscode-editor-selectionBackground`);a?e.style.setProperty(`--vscode-editor-foreground`,a):e.style.removeProperty(`--vscode-editor-foreground`),c?e.style.setProperty(`--vscode-editor-background`,c):e.style.removeProperty(`--vscode-editor-background`),l?e.style.setProperty(`--vscode-editor-selectionBackground`,l):e.style.removeProperty(`--vscode-editor-selectionBackground`)}catch{}},[U,ue,n.diff,n.language,Ue,q]),Ye=(0,_.useCallback)(()=>{let e=q.maxHeight,t={...q||{},...e==null?{}:{MAX_HEIGHT:e},themes:d?[...d]:void 0,stream:!1,disableFileHeader:!0,disableLineNumbers:!Ee,fontSize:Ue.fontSize,lineHeight:Ue.lineHeight,...Ue.fontFamily?{fontFamily:Ue.fontFamily}:{},theme:J,themeType:r?`dark`:`light`,onThemeChange(){Je()}};return delete t.maxHeight,delete t.padding,delete t.tabSize,t.unsafeCSS=[`[data-file], [data-diff] { --diffs-min-number-column-width-default: 2ch !important; }`,typeof t.unsafeCSS==`string`?t.unsafeCSS:``].filter(Boolean).join(`
170
170
  `),t},[Ee,r,Ue,J,q,Je,d]),Xe=(0,_.useCallback)(()=>{let e=Ye(),t=ee.current;if(!t)return ee.current=e,e;for(let n of Object.keys(t))n in e||delete t[n];return Object.assign(t,e),t},[Ye]),Ze=(0,_.useCallback)(e=>{let t=e(Xe());return E.current=t,D.current=typeof t.safeClean==`function`?()=>t.safeClean():typeof t.cleanupEditor==`function`?()=>t.cleanupEditor():null,t},[Xe]),Qe=(0,_.useMemo)(()=>JSON.stringify({diffStyle:q.diffStyle,expandUnchanged:q.expandUnchanged,collapsedContextThreshold:q.collapsedContextThreshold,hunkSeparators:q.hunkSeparators,lineDiffType:q.lineDiffType,maxLineDiffLength:q.maxLineDiffLength,expansionLineCount:q.expansionLineCount,context:q.parseDiffOptions?.context}),[q]);(0,_.useEffect)(()=>{Xe()},[q,Xe]),(0,_.useEffect)(()=>()=>{var e,t,n;j.current+=1,(e=D.current)==null||e.call(D),Pe(),D.current=null,O.current=null,k.current=null,A.current=null,E.current=null,F.current=null,M.current=null,(n=(t=N.current)?.destroy)==null||n.call(t),N.current=null},[Pe]),(0,_.useEffect)(()=>{var e,t;if(typeof window>`u`||B)return;let n=T.current;if(!n)return;(t=(e=N.current)?.destroy)==null||t.call(e);let r=P(n,{rootMargin:`400px`});return N.current=r,r.isVisible()&&ae(!0),r.whenVisible.then(()=>ae(!0)),()=>{r.destroy(),N.current===r&&(N.current=null)}},[P,B]),(0,_.useEffect)(()=>{let e=!0;return typeof window>`u`?()=>{e=!1}:E.current?(Xe(),()=>{e=!1}):((async()=>{try{let t=await Gx();if(!e)return;if(!t)return void ie(!0);let n=t.createCodeBlockRuntime,r=t.detectLanguage;if(typeof r==`function`&&(M.current=r),typeof n!=`function`)return void ie(!0);F.current=n,Ze(n),V(!0)}catch{e&&ie(!0)}})(),()=>{e=!1})},[Ze,Xe]),(0,_.useEffect)(()=>{if(!n.language&&!U&&M.current)try{let e=M.current(String(n.code??``));e&&de(e)}catch{}},[U,n.code,n.language]);let $e=(0,_.useMemo)(()=>String(n.language||U||ue||`plaintext`),[U,ue,n.language]),et=(0,_.useMemo)(()=>Eb($e),[$e]),tt=(0,_.useMemo)(()=>Db(et),[et]),nt=(0,_.useMemo)(()=>tt===`plaintext`,[tt]),rt=(0,_.useMemo)(()=>Ab(et),[et,ye]),it=(0,_.useMemo)(()=>!!o&&(et===`html`||et===`svg`),[et,o]),at=(0,_.useMemo)(()=>{let e=et;return e?jb[e]||e.charAt(0).toUpperCase()+e.slice(1):jb[``]||`Plain Text`},[et]),ot=(0,_.useMemo)(()=>function(e,t,n){let r=function(e){let t=function(e){let t=String(e??``).split(/\r?\n/,1)[0]?.trim()??``;if(t.length<3)return``;let n=t[0];if(n!=="`"&&n!==`~`||t[1]!==n||t[2]!==n)return``;let r=3;for(;t[r]===n;)r+=1;return t.slice(r).trim()}(e);if(!t)return``;let n=t.split(/\s+/).filter(Boolean);if(!n.length)return``;let r=n[0]===`diff`?n.slice(1):n;for(let e of r){let t=e.includes(`:`)?e.slice(e.indexOf(`:`)+1):e;if(t&&/[./\\-]/.test(t))return t}return``}(e);return{title:r||t,caption:r?n?`Diff / ${t}`:t:``}}(String(n.raw??``),at,!!n.diff),[at,n.diff,n.raw]),st=ot.title,ct=ot.caption,lt=(0,_.useMemo)(()=>n.diff?n.updatedCode??n.code??``:n.code??``,[n.code,n.diff,n.updatedCode]),ut=(0,_.useMemo)(()=>{let e=e=>{if(e!=null)return typeof e==`number`?`${e}px`:String(e)},t={},r=e(f),i=e(p);return r&&(t.minWidth=r),i&&(t.maxWidth=i),n.diff?(t.color=`var(--markstream-diff-shell-fg)`,t.borderColor=`var(--markstream-diff-shell-border)`):(t.color=`var(--vscode-editor-foreground, var(--markstream-code-fallback-fg, var(--code-fg)))`,t.backgroundColor=`var(--vscode-editor-background, var(--markstream-code-fallback-bg, var(--code-bg)))`,t.borderColor=`var(--markstream-code-border-color, var(--code-border))`),t},[p,f,n.diff]),dt=(0,_.useMemo)(()=>n.code.length>0||(n.originalCode?.length??0)>0||(n.updatedCode?.length??0)>0,[n.code,n.originalCode,n.updatedCode]),ft=!1===a&&i||!1!==a&&i&&!dt;(0,_.useEffect)(()=>{if(z||!oe||!H||!B)return;let e=E.current;Xe();let t=()=>{var t;n.diff&&((t=e?.refreshDiffPresentation)==null||t.call(e)),Je(),G||((typeof window<`u`&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>Ne(W)):null)??Ne(W))};e?.setTheme&&J?Promise.resolve(e.setTheme(J)).then(t).catch(()=>{}):t()},[G,H,Ve,W,oe,n.diff,J,Ne,Je,Xe,z,B]);let pt=(0,_.useCallback)(async()=>{if(z||!B||G||ft)return null;let e=E.current,t=w.current;if(!e||!t||!e.createEditor)return null;Xe();let n=Ie.current,r=n.diff?`diff`:`single`,i=A.current,a=r===`diff`?!!e.getDiffEditorView?.call(e):!!e.getEditorView?.call(e);if(k.current===r&&i===t&&a)return null;if(O.current)return O.current;j.current+=1;let o=j.current;se(!0);let s=(async()=>{var r;try{(r=D.current)==null||r.call(D),k.current=null,A.current=null,le(!1);let i=tt;if(n.diff?typeof e.createDiffEditor==`function`?(k.current=`diff`,await e.createDiffEditor(t,String(n.originalCode??``),String(n.updatedCode??``),i)):(k.current=`single`,await e.createEditor(t,String(n.updatedCode??n.code??``),i)):(k.current=`single`,await e.createEditor(t,String(n.code??``),i)),A.current=t,j.current!==o)return;Fe(),Je(),W||G||Ne(!1);let a=await Promise.race([Jx(t,e.whenVisualReady),new Promise(e=>{window.setTimeout(()=>e(!0),1500)})]);if(j.current!==o||!a)return;Me(W),le(!0)}catch{j.current===o&&(R.current=tt,ie(!0))}})().finally(()=>{O.current===s&&(O.current=null)});return O.current=s,s},[Me,Fe,G,W,tt,Ne,ft,Je,Xe,z,B]);(0,_.useEffect)(()=>{Xe();let e=I.current!==u;I.current=u;let t=De.current!==Ee;De.current=Ee;let r=te.current;if(te.current=Qe,z||!oe)return;let i=!1;if(e||t){let e=F.current;if(e){Le(),E.current=null,D.current=null;try{Ze(e),i=!0}catch{ie(!0);return}}}let a=!!(n.diff&&r!==Qe);if(!i&&!a||!B||!H&&!i||G||ft)return;let o=!1;return(async()=>{if(i||Le(),!o)try{await pt()}catch{}})(),()=>{o=!0}},[G,u,H,Ee,pt,Ze,oe,Qe,n.diff,Le,ft,Xe,z,B]),(0,_.useEffect)(()=>{if(z){let e=R.current;if(e===void 0||e===tt)return;R.current=void 0,Le(),ie(!1);return}oe&&B&&(G||ft?Le():pt())},[G,pt,tt,oe,Le,ft,z,B]),(0,_.useEffect)(()=>{if(z||!oe||!B||G||ft)return;let e=E.current;if(!e)return;let t=String(n.code??``);(async()=>{let r=U;if(!r&&M.current)try{r=Eb(M.current(t)),r&&fe(r)}catch{}let i=Db(r||et);if(e.createEditor&&w.current){try{await Promise.resolve(pt())}catch{}let e=O.current;if(e)try{await e}catch{}}try{n.diff&&e.updateDiff?await Promise.resolve(e.updateDiff(String(n.originalCode??``),String(n.updatedCode??``),i)):e.updateCode&&await Promise.resolve(e.updateCode(t,i))}catch{}let a=w.current;a&&a.getAttribute(`data-markstream-enhanced`)!==`true`&&await Jx(a,e.whenVisualReady)&&(Me(W),le(!0)),Ne(W)})()},[Me,et,U,G,H,pt,W,oe,n.code,n.diff,n.originalCode,n.updatedCode,Ne,ft,z,B]),(0,_.useEffect)(()=>{if(z||!oe||!B||G||ft||!W&&i)return;let e=typeof window<`u`&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>Ne(W)):null;return e??Ne(W),()=>{e!=null&&typeof window<`u`&&typeof window.cancelAnimationFrame==`function`&&window.cancelAnimationFrame(e)}},[G,W,i,oe,Ne,ft,z,B]),(0,_.useEffect)(()=>{var e;if(!s||z)return;let t=E.current;if(t){try{let n=k.current===`diff`?t.getDiffEditorView?.call(t):t.getEditorView?.call(t);(e=n?.updateOptions)==null||e.call(n,{fontSize:Ce})}catch{}Ne(W)}},[s,W,Ce,n.diff,Ne,z]),(0,_.useEffect)(()=>{Te||zx(!0)},[Te]);let mt=(0,_.useCallback)((e,t)=>{if(!Te)return;let n=e.currentTarget;n&&!n.disabled&&(`clientX`in e&&(e.clientX,e.clientY),Rx(n,t,`top`,!1,0,He))},[He,Te]),ht=(0,_.useCallback)(()=>{Te&&zx()},[Te]),gt=(0,_.useCallback)(async()=>{var e;try{typeof navigator<`u`&&navigator.clipboard&&typeof navigator.clipboard.writeText==`function`&&await navigator.clipboard.writeText(String(lt)),me(!0),(e=t.onCopy)==null||e.call(t,String(lt)),setTimeout(()=>me(!1),1e3)}catch{}},[t,lt]),_t=(0,_.useCallback)(()=>{if(!it)return;let e=et===`html`?`text/html`:`image/svg+xml`,r=et===`html`?K(`artifacts.htmlPreviewTitle`)||`HTML Preview`:K(`artifacts.svgPreviewTitle`)||`SVG Preview`;typeof t.onPreviewCode==`function`?t.onPreviewCode({node:n,artifactType:e,artifactTitle:r,id:`temp-${et}-${Date.now()}`}):et===`html`&&ve(e=>!e)},[et,it,n,t,K]);return(0,v.jsxs)(`div`,{ref:T,className:[`code-block-container my-4 rounded-lg border overflow-hidden shadow-sm`,He?`border-gray-700/30`:`border-gray-200`,i?`is-rendering`:``,He?`is-dark`:``,n.diff?`is-diff`:``,nt?`is-plain-text`:``].join(` `),style:ut,children:[m&&(0,v.jsxs)(`div`,{className:`code-block-header`,children:[(0,v.jsxs)(`div`,{className:`code-header-main`,children:[(0,v.jsx)(`span`,{className:`icon-slot h-4 w-4 flex-shrink-0`,dangerouslySetInnerHTML:{__html:rt}}),(0,v.jsxs)(`div`,{className:`code-header-copy min-w-0`,children:[(0,v.jsx)(`div`,{className:`code-header-title truncate`,children:st}),ct&&(0,v.jsx)(`div`,{className:`code-header-caption truncate`,children:ct})]})]}),(0,v.jsxs)(`div`,{className:`code-header-actions`,children:[b&&(0,v.jsx)(`button`,{type:`button`,className:`code-action-btn transition-colors`,"aria-pressed":G,onClick:()=>ge(e=>!e),onMouseEnter:e=>mt(e,G?K(`common.expand`)||`Expand`:K(`common.collapse`)||`Collapse`),onFocus:e=>mt(e,G?K(`common.expand`)||`Expand`:K(`common.collapse`)||`Collapse`),onMouseLeave:ht,onBlur:ht,children:(0,v.jsx)(`svg`,{style:{rotate:G?`0deg`:`90deg`},xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`action-icon`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m9 18l6-6l-6-6`})})}),x&&s&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`button`,{type:`button`,className:`code-action-btn transition-colors`,disabled:Ce<=10,onClick:()=>we(e=>Math.max(10,e-1)),onMouseEnter:e=>mt(e,K(`common.decrease`)||`Decrease`),onFocus:e=>mt(e,K(`common.decrease`)||`Decrease`),onMouseLeave:ht,onBlur:ht,children:(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`action-icon`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M5 12h14`})})}),(0,v.jsx)(`button`,{type:`button`,className:`code-action-btn transition-colors`,disabled:Ce===xe,onClick:()=>we(xe),onMouseEnter:e=>mt(e,K(`common.reset`)||`Reset`),onFocus:e=>mt(e,K(`common.reset`)||`Reset`),onMouseLeave:ht,onBlur:ht,children:(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`action-icon`,children:(0,v.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,children:[(0,v.jsx)(`path`,{d:`M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8`}),(0,v.jsx)(`path`,{d:`M3 3v5h5`})]})})}),(0,v.jsx)(`button`,{type:`button`,className:`code-action-btn transition-colors`,disabled:Ce>=36,onClick:()=>we(e=>Math.min(36,e+1)),onMouseEnter:e=>mt(e,K(`common.increase`)||`Increase`),onFocus:e=>mt(e,K(`common.increase`)||`Increase`),onMouseLeave:ht,onBlur:ht,children:(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`action-icon`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M5 12h14m-7-7v14`})})})]}),h&&(0,v.jsx)(`button`,{type:`button`,className:`code-action-btn transition-colors`,"aria-label":pe?K(`common.copied`)||`Copied`:K(`common.copy`)||`Copy`,onClick:gt,onMouseEnter:e=>mt(e,pe?K(`common.copied`)||`Copied`:K(`common.copy`)||`Copy`),onFocus:e=>mt(e,pe?K(`common.copied`)||`Copied`:K(`common.copy`)||`Copy`),onMouseLeave:ht,onBlur:ht,children:(0,v.jsx)(`svg`,pe?{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`action-icon`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M20 6L9 17l-5-5`})}:{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`action-icon`,children:(0,v.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,children:[(0,v.jsx)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,v.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})})}),g&&(0,v.jsx)(`button`,{type:`button`,className:`code-action-btn transition-colors`,"aria-pressed":W,onClick:e=>{he(e=>!e),mt(e,W?K(`common.expand`)||`Expand`:K(`common.collapse`)||`Collapse`)},onMouseEnter:e=>mt(e,W?K(`common.collapse`)||`Collapse`:K(`common.expand`)||`Expand`),onFocus:e=>mt(e,W?K(`common.collapse`)||`Collapse`:K(`common.expand`)||`Expand`),onMouseLeave:ht,onBlur:ht,children:(0,v.jsx)(`svg`,W?{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`action-icon`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`})}:{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`action-icon`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`})})}),it&&y&&(0,v.jsx)(`button`,{type:`button`,className:`code-action-btn transition-colors`,"aria-label":K(`common.preview`)||`Preview`,onClick:_t,onMouseEnter:e=>mt(e,K(`common.preview`)||`Preview`),onFocus:e=>mt(e,K(`common.preview`)||`Preview`),onMouseLeave:ht,onBlur:ht,children:(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,children:(0,v.jsxs)(`g`,{fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`,children:[(0,v.jsx)(`path`,{d:`M23.628 7.41c-.12-1.172-.08-3.583-.9-4.233c-1.921-1.51-6.143-1.11-8.815-1.19c-3.481-.15-7.193.14-10.625.24a.34.34 0 0 0 0 .67c3.472-.05 7.074-.29 10.575-.09c2.471.15 6.653-.14 8.254 1.16c.4.33.41 2.732.49 3.582a42 42 0 0 1 .08 9.005a13.8 13.8 0 0 1-.45 3.001c-2.42 1.4-19.69 2.381-20.72.55a21 21 0 0 1-.65-4.632a41.5 41.5 0 0 1 .12-7.964c.08 0 7.334.33 12.586.24c2.331 0 4.682-.13 6.764-.21a.33.33 0 0 0 0-.66c-7.714-.16-12.897-.43-19.31.05c.11-1.38.48-3.922.38-4.002a.3.3 0 0 0-.42 0c-.37.41-.29 1.77-.36 2.251s-.14 1.07-.2 1.6a45 45 0 0 0-.36 8.645a21.8 21.8 0 0 0 .66 5.002c1.46 2.702 17.248 1.461 20.95.43c1.45-.4 1.69-.8 1.871-1.95c.575-3.809.602-7.68.08-11.496`}),(0,v.jsx)(`path`,{d:`M4.528 5.237a.84.84 0 0 0-.21-1c-.77-.41-1.71.39-1 1.1a.83.83 0 0 0 1.21-.1m2.632-.25c.14-.14.19-.84-.2-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.2-.09m2.88 0a.83.83 0 0 0-.21-1c-.77-.41-1.71.39-1 1.09a.82.82 0 0 0 1.21-.09m-4.29 8.735c0 .08.23 2.471.31 2.561a.371.371 0 0 0 .63-.14c0-.09 0 0 .15-1.72a10 10 0 0 0-.11-2.232a5.3 5.3 0 0 1-.26-1.37a.3.3 0 0 0-.54-.24a6.8 6.8 0 0 0-.2 2.33c-1.281-.38-1.121.13-1.131-.42a15 15 0 0 0-.19-1.93c-.16-.17-.36-.17-.51.14a20 20 0 0 0-.43 3.471c.04.773.18 1.536.42 2.272c.26.4.7.22.7-.1c0-.09-.16-.09 0-1.862c.06-1.18-.23-.3 1.16-.76m5.033-2.552c.32-.07.41-.28.39-.37c0-.55-3.322-.34-3.462-.24s-.2.18-.18.28s0 .11 0 .16a3.8 3.8 0 0 0 1.591.361v.82a15 15 0 0 0-.13 3.132c0 .2-.09.94.17 1.16a.34.34 0 0 0 .48 0c.125-.35.196-.718.21-1.09a8 8 0 0 0 .14-3.232c0-.13.05-.7-.1-.89a8 8 0 0 0 .89-.09m5.544-.181a.69.69 0 0 0-.89-.44a2.8 2.8 0 0 0-1.252 1.001a2.3 2.3 0 0 0-.41-.83a1 1 0 0 0-1.6.27a7 7 0 0 0-.35 2.07c0 .571 0 2.642.06 2.762c.14 1.09 1 .51.63.13a17.6 17.6 0 0 1 .38-3.962c.32-1.18.32.2.39.51s.11 1.081.73 1.081s.48-.93 1.401-1.78q.075 1.345 0 2.69a15 15 0 0 0 0 1.811a.34.34 0 0 0 .68 0q.112-.861.11-1.73a16.7 16.7 0 0 0 .12-3.582m1.441-.201c-.05.16-.3 3.002-.31 3.202a6.3 6.3 0 0 0 .21 1.741c.33 1 1.21 1.07 2.291.82a3.7 3.7 0 0 0 1.14-.23c.21-.22.10-.59-.41-.64q-.817.096-1.64.07c-.44-.07-.34 0-.67-4.442q.015-.185 0-.37a.316.316 0 0 0-.23-.38a.316.316 0 0 0-.38.23`})]})})})]})]}),(0,v.jsxs)(`div`,{className:`code-block-body${G?` code-block-body--collapsed`:``}${W?` code-block-body--expanded`:``}`,children:[!G&&(!!a||!i)&&(z?(0,v.jsx)(Hb,{className:`code-fallback-plain m-0`,diffInline:We,node:n,showLineNumbers:Ee,style:qe}):(0,v.jsxs)(`div`,{className:`code-editor-layer`,children:[(0,v.jsx)(`div`,{ref:w,className:`code-editor-container`+(a?``:` code-height-placeholder`),"data-markstream-enhanced":ce?`true`:`false`,"data-markstream-host-hidden":ce?void 0:`true`,style:{"--markstream-editor-initial-height":`${Ke}px`,visibility:ce?`visible`:`hidden`},"aria-hidden":!ce}),!ce&&(0,v.jsx)(`div`,{className:`code-editor-fallback-surface`,children:(0,v.jsx)(Hb,{className:`code-fallback-plain m-0`,diffInline:We,node:n,showLineNumbers:Ee,style:qe})})]})),!a&&i&&(0,v.jsx)(`div`,{className:`code-loading-placeholder`,children:(0,v.jsxs)(`div`,{className:`loading-skeleton`,children:[(0,v.jsx)(`div`,{className:`skeleton-line`}),(0,v.jsx)(`div`,{className:`skeleton-line`}),(0,v.jsx)(`div`,{className:`skeleton-line short`})]})})]}),_e&&!t.onPreviewCode&&it&&et===`html`&&(0,v.jsx)(Bx,{code:String(n.code??``),htmlPreviewAllowScripts:t.htmlPreviewAllowScripts,htmlPreviewSandbox:t.htmlPreviewSandbox,isDark:r,onClose:()=>ve(!1)}),(0,v.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,role:`status`,children:pe?K(`common.copied`)||`Copied`:``})]})}function $x(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=$x(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Q(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=$x(e))&&(r&&(r+=` `),r+=t);return r}var eS=()=>a(()=>import(`./d2_markstream-react-DtM9g53j.js`),[]),tS=null,nS=eS;async function rS(){if(tS)return tS;let e=nS;if(!e)return null;let t;try{t=await e()}catch(t){throw e===eS?Error(`Optional dependency "@terrastruct/d2" is not installed. Please install it to enable D2 diagrams.`):t}return t?(tS=function(e){if(!e)return e;if(e.D2&&typeof e.D2==`function`)return e.D2;if(e.default&&e.default.D2&&typeof e.default.D2==`function`)return e.default.D2;let t=e.default??e;return typeof t==`function`?t:t?.D2&&typeof t.D2==`function`?t.D2:t}(t),tS):null}var iS={loading:!0,progressiveRender:!0,progressiveIntervalMs:700,showHeader:!0,showModeToggle:!0,showCopyButton:!0,showExportButton:!0,showCollapseButton:!0},aS={N1:`#E5E7EB`,N2:`#CBD5E1`,N3:`#94A3B8`,N4:`#64748B`,N5:`#475569`,N6:`#334155`,N7:`#0B1220`,B1:`#60A5FA`,B2:`#3B82F6`,B3:`#2563EB`,B4:`#1D4ED8`,B5:`#1E40AF`,B6:`#111827`,AA2:`#22D3EE`,AA4:`#0EA5E9`,AA5:`#0284C7`,AB4:`#FBBF24`,AB5:`#F59E0B`},oS=[/javascript:/i,/expression\s*\(/i,/url\s*\(\s*javascript:/i,/@import/i],sS=/^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;function cS(e){if(!e)return``;let t=e.trim();return sS.test(t)?t:``}function lS(e){let t={...iS,...e},{t:n}=kx(),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(null),[p,m]=(0,_.useState)(``),[h,g]=(0,_.useState)(null),[y,b]=(0,_.useState)(!1),[x,S]=(0,_.useState)(()=>typeof window>`u`),C=(0,_.useRef)(0),w=(0,_.useRef)(null),T=(0,_.useRef)(!1),E=(0,_.useRef)(!1),D=(0,_.useRef)(0),O=(0,_.useRef)(null),k=(0,_.useRef)(!1),A=(0,_.useRef)(null),j=(0,_.useRef)(null),M=(0,_.useRef)(null),N=(0,_.useRef)(null),P=(0,_.useRef)(!1),ee=(0,_.useRef)(()=>{}),F=Tx(),I=t.node?.code??``,te=s||!l||!p,L=!!p,ne=(0,_.useMemo)(()=>{if(!t.maxHeight)return;let e=typeof t.maxHeight==`number`?`${t.maxHeight}px`:String(t.maxHeight);return{maxHeight:e,"--ms-d2-render-max-height":e}},[t.maxHeight]),re=(0,_.useMemo)(()=>{if(te&&h)return{minHeight:`${h}px`}},[h,te]);(0,_.useEffect)(()=>{P.current=y},[y]),(0,_.useEffect)(()=>{let e=A.current;if(!e)return;let t=F(e,{rootMargin:`160px`});return j.current=t,t.isVisible()&&S(!0),t.whenVisible.then(()=>S(!0)),()=>{t.destroy(),j.current=null}},[F]);let R=(0,_.useCallback)(()=>{let e=M.current;if(!e)return;let t=e.getBoundingClientRect().height;t>0&&g(e=>e===t?e:t)},[]),z=(0,_.useCallback)((e=!1)=>{if(T.current||typeof window>`u`||E.current||!x)return;if(P.current)return void(k.current=!0);let n=Math.max(120,Number(t.progressiveIntervalMs)||0),r=Date.now()-D.current;if(!e&&r<n)return k.current=!0,void(O.current==null&&(O.current=window.setTimeout(()=>{O.current=null,k.current&&(k.current=!1,z(!0))},Math.max(0,n-r))));T.current=!0;let i=()=>{T.current=!1,D.current=Date.now(),ee.current()};typeof window<`u`&&typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(i):setTimeout(i,0)},[t.progressiveIntervalMs,x]),ie=(0,_.useCallback)(async()=>{if(w.current)return w.current;let e=await rS();if(!e)return null;if(typeof e==`function`){let t=new e;return t&&typeof t.compile==`function`?w.current=t:typeof e.compile==`function`&&(w.current=e),w.current}return e?.D2&&typeof e.D2==`function`?(w.current=new e.D2,w.current):(typeof e.compile==`function`&&(w.current=e),w.current)},[]),B=(0,_.useCallback)(async()=>{if(typeof window>`u`||E.current||!x||t.loading&&!t.progressiveRender)return;if(!I)return m(``),void f(null);let e=++C.current;b(!0),f(null);try{let n=await ie();if(!n)return u(!1),c(!0),m(``),void f(`D2 is not available.`);if(typeof n.compile!=`function`||typeof n.render!=`function`)throw Error(`D2 instance is missing compile/render methods.`);u(!0);let r=await n.compile(I);if(e!==C.current)return;let i=r?.diagram??r,a=r?.renderOptions??r?.options??{},o=t.themeId??a.themeID,s=t.darkThemeId??a.darkThemeID,l={...a};if(l.themeID=t.isDark&&s!=null?s:o,l.darkThemeID=null,l.darkThemeOverrides=null,t.isDark){let e=a.themeOverrides&&typeof a.themeOverrides==`object`?a.themeOverrides:null;l.themeOverrides={...aS,...e||{}}}let d=await n.render(i,l);if(e!==C.current)return;let p=function(e){return e?typeof e==`string`?e:typeof e.svg==`string`?e.svg:typeof e.data==`string`?e.data:``:``}(d);if(!p)throw Error(`D2 render returned empty output.`);let h=function(e){if(typeof window>`u`||typeof DOMParser>`u`||!e)return``;let t=e.replace(/["']\s*javascript:/gi,`#`).replace(/\bjavascript:/gi,`#`).replace(/["']\s*vbscript:/gi,`#`).replace(/\bvbscript:/gi,`#`).replace(/\bdata:text\/html/gi,`#`),n=new DOMParser().parseFromString(t,`image/svg+xml`).documentElement;if(!n||n.nodeName.toLowerCase()!==`svg`)return``;let r=n;return function(e){let t=new Set([`script`]),n=[e,...Array.from(e.querySelectorAll(`*`))];for(let e of n){if(t.has(e.tagName.toLowerCase())){e.remove();continue}let n=Array.from(e.attributes);for(let t of n){let n=t.name;if(/^on/i.test(n))e.removeAttribute(n);else{if(n===`style`&&t.value){let r=t.value;if(oS.some(e=>e.test(r))){e.removeAttribute(n);continue}}if((n===`href`||n===`xlink:href`)&&t.value){let r=cS(t.value);if(!r){e.removeAttribute(n);continue}r!==t.value&&e.setAttribute(n,r)}}}}}(r),r.classList.add(`markstream-d2-root-svg`),r.outerHTML}(p);m(h||``),t.loading&&c(!1),f(null)}catch(n){if(e!==C.current)return;let r=n?.message?String(n.message):`D2 render failed.`;t.loading||f(r),r.includes(`@terrastruct/d2`)&&(u(!1),c(!0))}finally{e===C.current&&(b(!1),k.current&&(k.current=!1,z()))}},[I,ie,t.darkThemeId,t.isDark,t.loading,t.progressiveRender,t.themeId,z,x]);(0,_.useEffect)(()=>{ee.current=B},[B]);let ae=(0,_.useCallback)(async()=>{var e;try{(e=navigator==null?void 0:navigator.clipboard)!=null&&e.writeText&&await navigator.clipboard.writeText(I),i(!0),setTimeout(()=>i(!1),1e3)}catch{}},[I]),oe=(0,_.useCallback)(()=>{if(p)try{let e=new Blob([p],{type:`image/svg+xml;charset=utf-8`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`d2-diagram-${Date.now()}.svg`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)}catch(e){console.error(`Failed to export SVG:`,e)}},[p]),V=(0,_.useCallback)((e,n)=>{var r;(r=e.currentTarget)&&!r.disabled&&Rx(e.currentTarget,n,`top`,!1,(e.clientX,e.clientY),t.isDark)},[t.isDark]),H=(0,_.useCallback)(()=>{zx()},[]);return(0,_.useEffect)(()=>{z()},[I,t.loading,t.isDark,z]),(0,_.useEffect)(()=>{t.loading||z(!0)},[t.loading,z]),(0,_.useEffect)(()=>{let e=requestAnimationFrame(()=>R());return()=>cancelAnimationFrame(e)},[te,p,I,R]),(0,_.useEffect)(()=>{E.current=!1,z();let e=requestAnimationFrame(()=>R());if(typeof ResizeObserver<`u`){let e=new ResizeObserver(()=>{R()});N.current=e,M.current&&e.observe(M.current)}return()=>{var t;E.current=!0,O.current!=null&&(clearTimeout(O.current),O.current=null),(t=N.current)==null||t.disconnect(),N.current=null,cancelAnimationFrame(e)}},[z,R]),(0,v.jsxs)(`div`,{ref:A,className:Q(`d2-block my-4 rounded-lg border overflow-hidden shadow-sm`,t.isDark?`border-gray-700/30 bg-gray-900 text-gray-100`:`border-gray-200 bg-white text-gray-900`),children:[t.showHeader&&(0,v.jsxs)(`div`,{className:`d2-block-header flex justify-between items-center px-4 py-2.5 border-b border-gray-400/5`,style:{color:`var(--vscode-editor-foreground)`,backgroundColor:`var(--vscode-editor-background)`},children:[(0,v.jsx)(`div`,{className:`flex items-center gap-x-2`,children:(0,v.jsx)(`span`,{className:`text-sm font-medium font-mono`,children:`D2`})}),(0,v.jsxs)(`div`,{className:`flex items-center gap-x-2`,children:[t.showModeToggle&&(0,v.jsxs)(`div`,{className:Q(`flex items-center gap-x-1 rounded-md p-0.5`,t.isDark?`bg-gray-700`:`bg-gray-100`),children:[(0,v.jsx)(`button`,{type:`button`,className:Q(`mode-btn px-2 py-1 text-xs rounded`,!s&&`is-active`),onClick:()=>c(!1),onMouseEnter:e=>V(e,n(`common.preview`)||`Preview`),onFocus:e=>V(e,n(`common.preview`)||`Preview`),onMouseLeave:H,onBlur:H,children:n(`common.preview`)||`Preview`}),(0,v.jsx)(`button`,{type:`button`,className:Q(`mode-btn px-2 py-1 text-xs rounded`,s&&`is-active`),onClick:()=>c(!0),onMouseEnter:e=>V(e,n(`common.source`)||`Source`),onFocus:e=>V(e,n(`common.source`)||`Source`),onMouseLeave:H,onBlur:H,children:n(`common.source`)||`Source`})]}),t.showCopyButton&&(0,v.jsx)(`button`,{type:`button`,className:`d2-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,"aria-label":r?n(`common.copied`)||`Copied`:n(`common.copy`)||`Copy`,onClick:ae,onMouseEnter:e=>V(e,r?n(`common.copied`)||`Copied`:n(`common.copy`)||`Copy`),onFocus:e=>V(e,r?n(`common.copied`)||`Copied`:n(`common.copy`)||`Copy`),onMouseLeave:H,onBlur:H,children:(0,v.jsx)(`svg`,r?{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M20 6L9 17l-5-5`})}:{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,children:[(0,v.jsx)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,v.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})})}),t.showExportButton&&p&&(0,v.jsx)(`button`,{type:`button`,className:`d2-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,"aria-label":n(`common.export`)||`Export`,onClick:oe,onMouseEnter:e=>V(e,n(`common.export`)||`Export`),onFocus:e=>V(e,n(`common.export`)||`Export`),onMouseLeave:H,onBlur:H,children:(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M12 3v12m0-12l-4 4m4-4l4 4M4 14v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4`})})}),t.showCollapseButton&&(0,v.jsx)(`button`,{type:`button`,className:`d2-action-btn p-2 text-xs rounded-md transition-colors hover:bg-[var(--vscode-editor-selectionBackground)]`,"aria-pressed":a,onClick:()=>o(e=>!e),onMouseEnter:e=>V(e,a?n(`common.expand`)||`Expand`:n(`common.collapse`)||`Collapse`),onFocus:e=>V(e,a?n(`common.expand`)||`Expand`:n(`common.collapse`)||`Collapse`),onMouseLeave:H,onBlur:H,children:(0,v.jsx)(`svg`,{style:{transform:`rotate(${a?0:90}deg)`},xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m9 18l6-6l-6-6`})})})]})]}),!a&&(0,v.jsx)(`div`,{ref:M,className:`d2-block-body`,style:re,children:t.loading&&!L?(0,v.jsxs)(`div`,{className:`d2-source px-4 py-4`,children:[(0,v.jsx)(`pre`,{className:`d2-code`,children:(0,v.jsx)(`code`,{children:I})}),d&&(0,v.jsx)(`p`,{className:`d2-error mt-2 text-xs`,children:d})]}):(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(`div`,te?{className:`d2-source px-4 py-4`,children:[(0,v.jsx)(`pre`,{className:`d2-code`,children:(0,v.jsx)(`code`,{children:I})}),d&&(0,v.jsx)(`p`,{className:`d2-error mt-2 text-xs`,children:d})]}:{className:`d2-render`,style:ne,children:[(0,v.jsx)(`div`,{className:`d2-svg`,dangerouslySetInnerHTML:{__html:p}}),d&&(0,v.jsx)(`p`,{className:`d2-error px-4 pb-3 text-xs`,children:d})]})})})]})}function uS(e){let{node:t,ctx:n,renderNode:r,indexKey:i}=e,a=Array.isArray(t.items)?t.items:[];return(0,v.jsx)(`dl`,{className:`definition-list`,"data-index-key":i,children:a.map((e,t)=>(0,v.jsxs)(`div`,{className:`mb-4`,children:[(0,v.jsx)(`dt`,{className:`definition-term font-semibold`,children:n&&r?sb(e.term,n,`${String(i??`definition`)}-term-${t}`,r):null}),(0,v.jsx)(`dd`,{className:`definition-desc ml-4`,children:n&&r?sb(e.definition,n,`${String(i??`definition`)}-desc-${t}`,r):null})]},`${String(i??`definition`)}-${t}`))})}function dS(e){let{node:t}=e;return(0,v.jsx)(`span`,{className:`emoji-node`,children:t.name??t.markup})}function fS(e){return(0,v.jsx)(`em`,{className:`emphasis-node`,children:e.children})}function pS(e){let{node:t}=e,n=(0,_.useCallback)(e=>{if(e.preventDefault(),typeof document>`u`)return;let n=document.getElementById(`fnref-${String(t.id??``)}`);n&&n.scrollIntoView({behavior:`smooth`})},[t.id]);return(0,v.jsx)(`a`,{className:`footnote-anchor text-sm hover:underline cursor-pointer`,href:`#fnref-${t.id}`,title:`返回引用 ${t.id}`,onClick:n,children:`↩︎`})}function mS(e){let{node:t,ctx:n,renderNode:r,indexKey:i}=e;return(0,v.jsx)(`div`,{id:`fnref--${t.id}`,className:`footnote-node flex text-sm leading-relaxed border-t border-[var(--footnote-border,#eaecef)] pt-2`,children:(0,v.jsx)(`div`,{className:`flex-1`,children:n&&r?ob(t.children,n,String(i??`footnote-${t.id}`),r):null})})}function hS(e){let{node:t}=e,n=(0,_.useMemo)(()=>`#fnref--${t.id}`,[t.id]),r=(0,_.useMemo)(()=>({href:n}),[n]),i=(0,_.useCallback)(e=>{if(e.preventDefault(),typeof document>`u`)return;let t=document.querySelector(n);t&&t.scrollIntoView({behavior:`smooth`})},[n]);return(0,v.jsx)(`sup`,{id:`fnref-${t.id}`,className:`footnote-reference`,onClick:i,children:(0,v.jsxs)(`span`,{...r,title:`查看脚注 ${t.id}`,className:`footnote-link cursor-pointer`,children:[`[`,t.id,`]`]})})}function gS(e){return(0,v.jsx)(`br`,{className:`hard-break`})}function _S(e){let{node:t,ctx:n,renderNode:r,indexKey:i,children:a}=e,o=Math.min(6,Math.max(1,Number(t.level)||1)),s=`h${o}`,{class:c,className:l,style:u,...d}=t?.attrs??{};return(0,v.jsx)(s,{dir:`auto`,className:Q(`heading-node font-semibold`,`heading-${o}`,c,l),...typeof u==`object`&&u?{style:u}:{},...d,children:a??(n&&r?ob(t.children,n,String(i??`heading-${o}`),r):null)})}function vS(e){return(0,v.jsx)(`mark`,{className:`highlight-node`,children:e.children})}function yS(e){let{node:t,placeholder:n,customId:r}=e,i=e.htmlPolicy??e.ctx?.htmlPolicy??`safe`,a=Tx(),[o,s]=(0,_.useState)(null),c=(0,_.useRef)(null),[l,u]=(0,_.useState)(()=>typeof window>`u`),[d,f]=(0,_.useState)(t.content),p=!!t.loading,m=(0,_.useSyncExternalStore)(fb,pb,pb),h=(0,_.useMemo)(()=>({...e.customComponents??e.ctx?.customComponents??hb(r),...e.ctx?.htmlComponents??{}}),[r,e.ctx?.customComponents,e.ctx?.htmlComponents,e.customComponents,m]),g=(0,_.useMemo)(()=>({...h,...e.ctx?.streamingComponents??{}}),[h,e.ctx?.streamingComponents]);(0,_.useEffect)(()=>{var e;if(typeof window>`u`)return void u(!0);if((e=c.current)==null||e.destroy(),c.current=null,!p)return u(!0),void f(t.content);if(!o)return void u(!1);let n=a(o,{rootMargin:`400px`});return c.current=n,n.isVisible()&&u(!0),n.whenVisible.then(()=>u(!0)).catch(()=>{}),()=>{n.destroy(),c.current=null}},[o,p,t.content,a]),(0,_.useEffect)(()=>()=>{var e;(e=c.current)==null||e.destroy(),c.current=null},[]),(0,_.useEffect)(()=>{p&&!l||f(t.content)},[p,t.content,l]);let y=(0,_.useMemo)(()=>{let e=ab(xy(t.attrs??void 0,i));return e?Wb(e):void 0},[i,t.attrs]),b=(0,_.useMemo)(()=>String(t.tag??``).trim(),[t.tag]),x=(0,_.useMemo)(()=>Kc(b),[b]),S=(0,_.useMemo)(()=>{let e=ab(xy(t.attrs??void 0,i,b));return e?Wb(e):void 0},[i,t.attrs,b]),C=(0,_.useMemo)(()=>Cy(by(xy(t.attrs??void 0,i,x))),[i,t.attrs,x]),w=(0,_.useMemo)(()=>Array.isArray(t.children)?t.children:[],[t.children]),T=w.length>0&&!!b&&!bc.has(b.toLowerCase())&&!ly(b,i)&&!!e.ctx&&!!e.renderNode,E=(0,_.useMemo)(()=>function(e){let t={...e||{}},n=typeof t.className==`string`?t.className.trim():``;return t.className=n?`html-block-node ${n}`:`html-block-node`,t}(S),[S]),D=(0,_.useMemo)(()=>i!==`escape`&&Jb(t.content??``,g),[g,i,t.content]),O=(0,_.useMemo)(()=>D&&t.content?rx(t.content,h,i,{ctx:e.ctx,keyPrefix:String(e.indexKey??`html-block`),nodeComponents:e.ctx?.streamingComponents,propComponents:e.ctx?.htmlComponents,renderNode:e.renderNode,sourceNode:t}):null,[h,i,t.autoClosed,t.content,t.loading,e.ctx,e.indexKey,e.renderNode,D]),k=(0,_.useMemo)(()=>ky(d??``,i),[i,d]),A=(0,_.useMemo)(()=>T&&e.ctx&&e.renderNode?ob(w,e.ctx,`${String(e.indexKey??`html-block`)}-structured`,e.renderNode):null,[T,e.ctx,e.indexKey,e.renderNode,w]),j=x?e.ctx?.htmlComponents?.[x]:void 0,M=(0,v.jsx)(`div`,{className:`html-block-node__placeholder`,children:n??(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`span`,{className:`html-block-node__placeholder-bar`}),(0,v.jsx)(`span`,{className:`html-block-node__placeholder-bar w-4/5`}),(0,v.jsx)(`span`,{className:`html-block-node__placeholder-bar w-2/3`})]})});return T&&j?_.createElement(j,C,A):T?_.createElement(b,{...E,ref:s},l?A:M):(0,v.jsx)(`div`,{ref:s,className:`html-block-node`,...y,children:l?D&&O?(0,v.jsx)(v.Fragment,{children:O}):(0,v.jsx)(`div`,{dangerouslySetInnerHTML:{__html:k}}):M})}var bS=(()=>{try{return!1}catch{}return!1})();function xS(e){bS&&console.warn(e)}function SS(e,t,n=!1){let r=Object.entries(t??{}),i=r.length>0?r.map(([e,t])=>t===``?` ${e}`:` ${e}="${t}"`).join(``):``;return n?`<${e}${i} />`:`<${e}${i}>`}function CS(e,t){Array.isArray(t)?e.push(...t):t!=null&&e.push(t)}function wS(e,t){for(let n of Gb(e)){if(n.type!==`tag_open`&&n.type!==`self_closing`)continue;let e=n.tagName??``;if(qb(e,t)&&gb(t[e]||t[e.toLowerCase()])===`block`)return!0}return!1}function TS(e,t){return t.nodeComponents?.[e]||t.nodeComponents?.[e.toLowerCase()]}function ES(e){if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||typeof e==`number`)return String(e);if(Array.isArray(e))return e.map(ES).join(``);if(!_.isValidElement(e))return``;let t=e;if(typeof t.type!=`string`)return ES(t.props.children);let n=Object.entries(t.props).filter(([e,t])=>e!==`children`&&e!==`key`&&e!==`ref`&&t!=null&&typeof t!=`boolean`).map(([e,t])=>` ${e===`className`?`class`:e}="${String(t)}"`).join(``);return`<${t.type}${n}>${ES(t.props.children)}</${t.type}>`}function DS(e){return Object.entries(e).map(([e,t])=>[e,t===``?null:t])}function OS(e){let t=e.sourceNode,n=!0!==e.ctx?.final&&(!1===e.ctx?.final||!!t?.loading);return{loading:n,autoClosed:n||!!t?.autoClosed}}function kS(e,t,n,r,i,a,o,s,c,l){let u=qb(e,r),d=!!TS(e,o);if(yc.has(e.toLowerCase())||!u&&!d&&uy(e,a))return null;if(!u&&!d&&ly(e,a))return[SS(e,t),...n,`</${e}>`];let f=Kb(t,a,e),p=f.key,m=p!=null&&p!==``?p:i;if(d)return function(e,t,n,r,i,a,o,s=OS(i)){let c=Kc(e),l=a??function(e){return e.map(ES).join(``)}(n),u={type:c,tag:c,attrs:DS(t),content:l,raw:o??`${SS(e,t)}${l}</${e}>`,loading:s.loading,autoClosed:s.autoClosed};if(i.ctx&&i.renderNode)return i.renderNode(u,r,i.ctx);let d=TS(e,i);return d?_.createElement(d,{key:r,node:u}):null}(e,t,n,String(m),o,s,c,l);if(u){let t=r[e]||r[e.toLowerCase()],i=Cy(f);return _.createElement(t,{...i,key:m},...n)}return _.createElement(e,{...Wb(f),key:m},...n)}function AS(e){let{node:t,customId:n}=e,r=e.htmlPolicy??e.ctx?.htmlPolicy??`safe`,i=(0,_.useRef)(null),[a,o]=(0,_.useState)(!1);(0,_.useEffect)(()=>{o(!0)},[]);let s=_.useMemo(()=>({...e.ctx?.customComponents??hb(n),...e.ctx?.htmlComponents??{}}),[n,e.ctx?.customComponents,e.ctx?.htmlComponents]),c=_.useMemo(()=>({...s,...e.ctx?.streamingComponents??{}}),[s,e.ctx?.streamingComponents]),l=_.useMemo(()=>ky(t.content??``,r),[r,t.content]),u=_.useMemo(()=>String(t.tag??``).trim(),[t.tag]),d=_.useMemo(()=>Kc(u),[u]),f=_.useMemo(()=>Array.isArray(t.children)?t.children:[],[t.children]),p=_.useMemo(()=>Cy(by(xy(t.attrs??void 0,r,d))),[r,t.attrs,d]),m=d?e.ctx?.htmlComponents?.[d]:void 0,h=f.length>0&&!!u&&r!==`escape`&&!ly(u,r)&&!!e.ctx&&!!e.renderNode&&!!m,g=_.useMemo(()=>h&&e.ctx&&e.renderNode?ob(f,e.ctx,`${String(e.indexKey??`html-inline`)}-structured`,e.renderNode):null,[h,e.ctx,e.indexKey,e.renderNode,f]),y=_.useMemo(()=>{let n=t.content;if(!n)return{mode:`html`,content:``};if(r===`escape`||!Jb(n,c))return{mode:`html`,content:n};let i=function(e,t,n=`safe`,r={}){if(!e)return[];try{return function(e,t,n=`safe`,r={}){let i=0,a=r.keyPrefix??`ms-html`,o=[],s=[];for(let c of e)if(c.type===`text`){if(o.length>0&&o[o.length-1].hardBlocked)continue;(o.length>0?o[o.length-1].children:s).push(c.content),o.length>0&&o[o.length-1].sourceParts.push(c.content)}else if(c.type===`self_closing`){let e=c.attrs||{},l=SS(c.tagName,e,!0),u=qb(c.tagName,t),d=!!TS(c.tagName,r);if(yc.has(c.tagName.toLowerCase())||!u&&!d&&uy(c.tagName,n))continue;if(!u&&!d&&ly(c.tagName,n)){(o.length>0?o[o.length-1].children:s).push(l),o.length>0&&o[o.length-1].sourceParts.push(l);continue}let f=kS(c.tagName,e,[],t,`${a}-${i++}`,n,r,``,l,{loading:!1,autoClosed:!1});CS(o.length>0?o[o.length-1].children:s,f),o.length>0&&o[o.length-1].sourceParts.push(l)}else if(c.type===`tag_open`){let e=o.length>0&&o[o.length-1].hardBlocked,i=qb(c.tagName,t),a=!!TS(c.tagName,r);o.push({tagName:c.tagName,children:[],attrs:c.attrs,sourceParts:[],customComponent:i||a,hardBlocked:e||yc.has(c.tagName.toLowerCase())||!i&&!a&&uy(c.tagName,n),softBlocked:!e&&!i&&!a&&ly(c.tagName,n)})}else if(c.type===`tag_close`){let e=c.tagName.toLowerCase(),l=-1;for(let t=o.length-1;t>=0;t--)if(o[t].tagName.toLowerCase()===e){l=t;break}if(l!==-1)for(;o.length>l;){let c=o.pop(),u=c.sourceParts.join(``),d=`${SS(c.tagName,c.attrs||{})}${u}</${c.tagName}>`,f;if(c.hardBlocked)f=null;else if(c.softBlocked)f=[SS(c.tagName,c.attrs||{}),...c.children,`</${c.tagName}>`];else{let o=c.tagName.toLowerCase()===e?{loading:!1,autoClosed:!1}:OS(r);f=kS(c.tagName,c.attrs||{},c.children,t,`${a}-${i++}`,n,r,u,d,o)}o.length>0?CS(o[o.length-1].children,f):CS(s,f),o.length>0&&!c.hardBlocked&&o[o.length-1].sourceParts.push(d),c.tagName.toLowerCase()!==e&&o.length>l&&xS(`Auto-closing unclosed tag: <${c.tagName}>`)}else xS(`Ignoring closing tag with no matching opening tag: </${c.tagName}>`)}for(;o.length>0;){let e=o.pop(),c=e.sourceParts.join(``),l=`${SS(e.tagName,e.attrs||{})}${c}`,u;u=e.hardBlocked?null:e.softBlocked?[SS(e.tagName,e.attrs||{}),...e.children,`</${e.tagName}>`]:kS(e.tagName,e.attrs||{},e.children,t,`${a}-${i++}`,n,r,c,l,OS(r)),CS(s,u),o.length>0&&!e.hardBlocked&&o[o.length-1].sourceParts.push(l),xS(`Auto-closing unclosed tag: <${e.tagName}>`)}return s}(Gb(e),t,n,r)}catch(e){return i=e,bS&&console.error(`Failed to parse HTML to React nodes:`,i),null}var i}(n,s,r,{ctx:e.ctx,keyPrefix:String(e.indexKey??`html-inline`),nodeComponents:e.ctx?.streamingComponents,renderNode:e.renderNode,sourceNode:t});return i===null?{mode:`html`,content:n}:{mode:`dynamic`,block:wS(n,c),nodes:i}},[s,c,r,t.autoClosed,t.content,t.loading,e.ctx,e.indexKey,e.renderNode]);return(0,_.useEffect)(()=>{if(!a||!i.current||y.mode!==`html`)return;let e=i.current;e.innerHTML=``;let t=document.createElement(`template`);t.innerHTML=l,e.appendChild(t.content.cloneNode(!0))},[y.mode,a,l]),!t.loading||t.autoClosed||h||y.mode===`dynamic`?h?_.createElement(m,p,g):y.mode===`dynamic`?y.block?(0,v.jsx)(v.Fragment,{children:y.nodes}):(0,v.jsx)(`span`,{className:`html-inline-node`,style:{display:`inline`},children:y.nodes}):(0,v.jsx)(`span`,{ref:i,className:`html-inline-node`,style:{display:`inline`}}):(0,v.jsx)(`span`,{className:`html-inline-node html-inline-node--loading`,children:t.content})}var jS={fallbackSrc:``,lazy:!0,usePlaceholder:!0};function MS(e,t,n){return n||e?{src:e,stage:`primary`}:t?{src:t,stage:`fallback`}:{src:``,stage:`failed`}}function NS(e){let t={...jS,...e},n=Ic(t.node.src),r=Ic(t.fallbackSrc),i=MS(n,r,t.node.loading),[a,o]=(0,_.useState)(!1),[s,c]=(0,_.useState)(!1),[l,u]=(0,_.useState)(i.src),[d,f]=(0,_.useState)(i.stage),p=l;return(0,_.useEffect)(()=>{let e=MS(n,r,t.node.loading);u(e.src),f(e.stage),o(!1),c(e.stage===`failed`)},[n,r,t.node.loading]),!t.node.loading&&d!==`failed`&&p?(0,v.jsx)(`img`,{src:p,alt:String(t.node.alt??t.node.title??``),title:String(t.node.title??t.node.alt??``),className:`image-node__img`+(a?` is-loaded`:``),loading:t.lazy?`lazy`:`eager`,decoding:`async`,tabIndex:a?0:-1,"aria-label":t.node.alt??`Preview image`,onError:()=>{var e;if(d===`primary`&&r&&r!==l)return u(r),f(`fallback`),o(!1),void c(!1);f(`failed`),c(!0),(e=t.onError)==null||e.call(t,l)},onLoad:()=>{var e;o(!0),c(!1),(e=t.onLoad)==null||e.call(t,p)},onClick:e=>{var n;e.preventDefault(),a&&!s&&((n=t.onClick)==null||n.call(t,[e,p]))}},`image`):t.node.loading&&!s?(0,v.jsx)(`span`,{className:`image-node__placeholder`,children:t.usePlaceholder?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`span`,{className:`image-node__spinner`,"aria-hidden":`true`}),(0,v.jsx)(`span`,{className:`image-node__placeholder-text`,children:`Loading image...`})]}):(0,v.jsx)(`span`,{className:`image-node__placeholder-text`,children:t.node.raw??`Loading image…`})},`placeholder`):t.node.loading||d!==`failed`?null:(0,v.jsxs)(`span`,{className:`image-node__error`,children:[(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:(0,v.jsx)(`path`,{fill:`currentColor`,d:`M2 2h20v10h-2V4H4v9.586l5-5L14.414 14L13 15.414l-4-4l-5 5V20h8v2H2zm13.547 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2m-3 1a3 3 0 1 1 6 0a3 3 0 0 1-6 0m3.625 6.757L19 17.586l2.828-2.829l1.415 1.415L20.414 19l2.829 2.828l-1.415 1.415L19 20.414l-2.828 2.829l-1.415-1.415L17.586 19l-2.829-2.828z`})}),(0,v.jsx)(`span`,{className:`image-node__placeholder-text`,children:`Image failed to load`})]})}var PS=null,FS=null,IS=(0,v.jsx)(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 291 300`,fill:`none`,className:`w-4 h-4 flex-shrink-0`,xmlns:`http://www.w3.org/2000/svg`,children:(0,v.jsxs)(`g`,{children:[(0,v.jsx)(`path`,{d:`M140.904 239.376C128.83 239.683 119.675 239.299 115.448 243.843C110.902 248.07 111.288 257.227 110.979 269.302C111.118 274.675 111.118 279.478 111.472 283.52C111.662 285.638 111.95 287.547 112.406 289.224C112.411 289.243 112.416 289.259 112.422 289.28C112.462 289.419 112.496 289.558 112.539 289.691C113.168 291.787 114.088 293.491 115.446 294.758C116.662 296.064 118.283 296.963 120.264 297.69C120.36 297.614 120.464 297.646 120.555 297.675C120.56 297.68 120.56 297.68 120.566 297.68C120.848 297.768 121.142 297.846 121.443 297.923C121.454 297.923 121.464 297.928 121.478 297.934C122.875 298.272 124.424 298.507 126.11 298.678C126.326 298.696 126.542 298.718 126.763 298.739C130.79 299.086 135.558 299.088 140.904 299.222C152.974 298.912 162.128 299.302 166.36 294.758C170.904 290.526 170.515 281.371 170.824 269.302C170.515 257.227 170.907 248.07 166.36 243.843C162.131 239.299 152.974 239.683 140.904 239.376Z`,fill:`#FF6376`}),(0,v.jsx)(`path`,{d:`M21.2155 128.398C12.6555 128.616 6.16484 128.339 3.16751 131.56C-0.0538222 134.56 0.218178 141.054 -0.000488281 149.608C0.218178 158.168 -0.0538222 164.659 3.16751 167.656C6.16484 170.878 12.6555 170.606 21.2155 170.824C25.0262 170.726 28.4288 170.726 31.2955 170.475C32.7968 170.342 34.1488 170.136 35.3382 169.814C35.3542 169.811 35.3648 169.806 35.3782 169.803C35.4768 169.774 35.5755 169.747 35.6688 169.718C37.1568 169.272 38.3648 168.622 39.2635 167.656C40.1915 166.795 40.8262 165.646 41.2715 164.243C41.2875 164.174 41.3115 164.102 41.3328 164.035C41.3328 164.035 41.3355 164.032 41.3355 164.027C41.3968 163.827 41.4529 163.622 41.5062 163.406C41.5062 163.398 41.5115 163.392 41.5142 163.382C41.7542 162.392 41.9222 161.294 42.0422 160.096C42.0555 159.944 42.0715 159.792 42.0848 159.635C42.3328 156.779 42.3328 153.398 42.4262 149.608C42.2075 141.054 42.4848 134.56 39.2635 131.56C36.2635 128.339 29.7728 128.616 21.2155 128.398Z`,fill:`#FFCCCC`}),(0,v.jsx)(`path`,{d:`M81.0595 184.171C70.8568 184.433 63.1208 184.102 59.5475 187.942C55.7075 191.518 56.0328 199.254 55.7742 209.454C56.0328 219.657 55.7075 227.393 59.5475 230.963C63.1208 234.803 70.8568 234.478 81.0595 234.739C85.6008 234.622 89.6595 234.622 93.0728 234.323C94.8648 234.163 96.4755 233.921 97.8942 233.534C97.9102 233.529 97.9235 233.526 97.9422 233.521C98.0568 233.486 98.1742 233.457 98.2888 233.422C100.06 232.889 101.5 232.113 102.569 230.963C103.676 229.937 104.433 228.566 104.964 226.894C104.985 226.811 105.012 226.726 105.036 226.646C105.041 226.643 105.041 226.643 105.041 226.638C105.116 226.401 105.18 226.153 105.244 225.897C105.244 225.889 105.249 225.881 105.254 225.867C105.54 224.689 105.74 223.379 105.881 221.953C105.9 221.771 105.916 221.59 105.934 221.403C106.228 218.001 106.228 213.969 106.342 209.454C106.081 199.254 106.412 191.518 102.572 187.942C98.9955 184.102 91.2568 184.433 81.0595 184.171Z`,fill:`#FF939F`}),(0,v.jsx)(`path`,{d:`M260.591 151.87C215.652 151.87 203.02 164.523 203.02 209.462H198.476C198.476 164.523 185.836 151.881 140.895 151.881V147.337C185.836 147.337 198.487 134.705 198.487 89.7659H203.02C203.02 134.705 215.652 147.337 260.591 147.337V151.87ZM286.052 124.158C281.82 119.614 272.66 120.001 260.591 119.689C248.521 119.385 239.361 119.771 235.129 115.227C230.585 110.995 230.983 101.846 230.671 89.7659C230.513 83.7312 230.535 78.4272 230.023 74.1019C229.513 69.7659 228.481 66.4219 226.209 64.3046C221.967 59.7606 212.817 60.1472 200.748 59.8459C188.681 60.1472 179.519 59.7606 175.287 64.3046C170.753 68.5366 171.129 77.6966 170.828 89.7659C170.516 101.835 170.9 110.995 166.356 115.227C162.124 119.771 152.985 119.374 140.905 119.689C138.873 119.739 136.924 119.771 135.071 119.811C119.313 118.697 106.337 112.318 106.337 89.7659C106.212 84.6699 106.233 80.1792 105.807 76.5206C105.367 72.8726 104.492 70.0379 102.575 68.2566C99.0013 64.4112 91.2573 64.7446 81.0653 64.4832C70.86 64.7446 63.1186 64.4112 59.5533 68.2566C55.708 71.8299 56.0306 79.5632 55.7693 89.7659C56.0306 99.9686 55.708 107.702 59.5533 111.278C63.1186 115.113 70.86 114.79 81.0653 115.049C103.617 115.049 109.996 128.035 111.1 143.803C111.068 145.659 111.028 147.587 110.975 149.619C111.121 154.987 111.121 159.79 111.476 163.835C111.663 165.95 111.945 167.857 112.404 169.534C112.412 169.555 112.412 169.566 112.423 169.598C112.465 169.734 112.497 169.867 112.537 170.003C113.164 172.099 114.092 173.809 115.447 175.07C116.665 176.371 118.281 177.278 120.271 177.905C120.364 177.934 120.46 177.955 120.564 177.987C120.855 178.081 121.145 178.153 121.439 178.238C121.46 178.238 121.471 178.238 121.479 178.249C122.876 178.582 124.42 178.822 126.108 178.987C126.327 179.009 126.545 179.03 126.764 179.051C130.788 179.395 135.559 179.395 140.905 179.529C152.975 179.843 162.124 179.457 166.356 184.001C170.9 188.233 170.516 197.371 170.828 209.451C171.129 221.529 170.743 230.681 175.287 234.91C179.519 239.454 188.681 239.07 200.748 239.371C206.127 239.235 210.921 239.235 214.975 238.881C217.079 238.694 218.985 238.403 220.676 237.955C220.695 237.945 220.705 237.934 220.727 237.934C220.873 237.891 220.999 237.859 221.135 237.819C223.228 237.193 224.937 236.265 226.209 234.91C227.511 233.691 228.409 232.065 229.044 230.097C229.065 230.003 229.095 229.899 229.127 229.803V229.793C229.22 229.513 229.295 229.222 229.367 228.918C229.367 228.897 229.377 228.897 229.377 228.878C229.721 227.481 229.951 225.937 230.127 224.249C230.137 224.03 230.169 223.811 230.191 223.593C230.535 219.571 230.535 214.798 230.671 209.451C230.972 197.371 230.585 188.233 235.129 184.001C239.361 179.457 248.511 179.843 260.591 179.529C272.66 179.227 281.82 179.614 286.052 175.07C290.596 170.838 290.209 161.689 290.511 149.619C290.209 137.539 290.596 128.379 286.052 124.158Z`,fill:`#FF356A`}),(0,v.jsx)(`path`,{d:`M112.405 49.848C112.411 49.8694 112.416 49.8827 112.421 49.904C112.461 50.0427 112.499 50.1814 112.539 50.3147C113.171 52.4134 114.088 54.1147 115.448 55.384C116.661 56.6907 118.283 57.5894 120.264 58.2134C120.36 58.24 120.464 58.2694 120.555 58.3014C120.56 58.3067 120.56 58.3067 120.565 58.3067C120.848 58.3947 121.141 58.4694 121.443 58.5467C121.453 58.5467 121.464 58.552 121.48 58.5574C122.875 58.896 124.424 59.1334 126.112 59.3014C126.325 59.3227 126.541 59.3414 126.763 59.3627C130.789 59.712 135.56 59.712 140.904 59.8454C152.973 59.5387 162.128 59.928 166.36 55.384C170.907 51.152 170.515 41.9947 170.824 29.9254C170.517 17.8507 170.907 8.69602 166.363 4.46935C162.131 -0.0746511 152.973 0.309349 140.904 1.52588e-05C128.829 0.309349 119.675 -0.0746511 115.448 4.46935C110.904 8.69602 111.288 17.8507 110.979 29.9254C111.117 35.3014 111.117 40.1014 111.472 44.144C111.661 46.2614 111.949 48.1707 112.405 49.848Z`,fill:`#FF6376`})]})}),LS={maxHeight:`500px`,loading:!0,showHeader:!0,showCopyButton:!0,showCollapseButton:!0,showModeToggle:!0,showExportButton:!0,showFullscreenButton:!0,showZoomControls:!0};function RS(e){let t={...LS,...e},{t:n}=kx(),[r,i]=(0,_.useState)(!1),[o,s]=(0,_.useState)(!1),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(!1),[f,p]=(0,_.useState)(()=>typeof window>`u`),m=t.node.code,h=(0,_.useMemo)(()=>t.maxHeight&&t.maxHeight!==`none`?ix(t.maxHeight):null,[t.maxHeight]),g=(0,_.useMemo)(()=>ix(t.estimatedPreviewHeightPx)??ax(m),[m,t.estimatedPreviewHeightPx]),[y,b]=(0,_.useState)(()=>`${ox(g,360,h)}px`),[x,S]=(0,_.useState)(!1),[C,w]=(0,_.useState)(!1),[T,E]=(0,_.useState)(1),[D,O]=(0,_.useState)({x:0,y:0}),[k,A]=(0,_.useState)(!1),j=(0,_.useRef)(null),M=(0,_.useRef)(null),N=(0,_.useRef)(null),P=(0,_.useRef)(null),ee=(0,_.useRef)(null),F=(0,_.useRef)({x:0,y:0}),I=(0,_.useRef)(null),te=(0,_.useRef)(0),L=Tx(),ne=(0,_.useCallback)(()=>{let e=j.current;return ix(e?getComputedStyle(e).getPropertyValue(`--ms-size-diagram-min-height`).trim():``)??360},[]),re=(0,_.useCallback)(()=>ox(g,ne(),h),[g,h,ne]),R=(0,_.useCallback)(e=>{let n=re();if(!t.maxHeight||t.maxHeight===`none`)return`${Math.max(e,n)}px`;let r=Number.parseFloat(String(t.maxHeight));return Number.isFinite(r)?`${Math.max(Math.min(e,r),n)}px`:`${Math.max(e,n)}px`},[t.maxHeight,re]),z=(0,_.useCallback)(()=>{let e=j.current;if(!e)return;let t=e.scrollHeight;t>0&&b(R(t))},[R]);(0,_.useEffect)(()=>{c||o||b(e=>{let t=ix(e),n=re();return t!=null&&t>=n?e:`${n}px`})},[o,re,c]);let ie=(0,_.useCallback)(async()=>{var e;try{await navigator.clipboard?.writeText(m),i(!0),(e=t.onCopy)==null||e.call(t,m),setTimeout(()=>i(!1),1e3)}catch{}},[m,t]),B=(0,_.useCallback)(async()=>{var e,n,r,i,o,s,c,l;if(!f||!j.current)return;let u=j.current,d=m,p=!1===t.loading,h=++te.current,g=null,_=null;try{let t=await async function(){return FS||PS||(PS=a(()=>import(`./infographic_markstream-react-C3vVus-4.js`).then(e=>{let t=e&&e.default?e.default:e,n=t;return typeof t==`function`&&t.prototype&&t.prototype.render?n=t:e.Infographic?n=e.Infographic:t&&t.Infographic&&(n=t.Infographic),FS=n,n}),[]).catch(e=>(console.warn(`Failed to load @antv/infographic`,e),null)),PS)}();if(h!==te.current||u!==j.current)return;if(!t)throw Error(`Infographic library failed to load.`);_=Array.from(u.childNodes),g=new t({container:u,width:`100%`,height:`100%`});let o=``,s=!1;if((e=g.on)==null||e.call(g,`error`,e=>{o=(Array.isArray(e)?e:[e]).map(e=>e instanceof Error?e.message:typeof e==`string`?e:String(e&&typeof e==`object`&&`message`in e?e.message??``:e??``)).filter(Boolean).join(`; `)}),(n=g.on)==null||n.call(g,`rendered`,()=>{s=!0}),g.render(d),o)throw Error(o);let c=Array.from(u.childNodes),l=c.length>0&&(c.length!==_.length||c.some((e,t)=>e!==_?.[t]));if(!s&&!l)throw Error(`Infographic render returned empty output.`);(i=(r=I.current)?.destroy)==null||i.call(r),I.current=g,g=null,S(!0),w(!1),setTimeout(()=>{z()},0)}catch(e){if(h!==te.current||u!==j.current)return;(o=g?.destroy)==null||o.call(g),g=null,p&&!1===t.loading&&d===m?(console.error(`Failed to render infographic:`,e),(c=(s=I.current)?.destroy)==null||c.call(s),I.current=null,S(!1),w(!0),u.innerHTML=`<div class="text-red-500 p-4">Failed to render infographic: ${e instanceof Error?e.message:`Unknown error`}</div>`):_&&u.replaceChildren(..._)}finally{(l=g?.destroy)==null||l.call(g)}},[m,t.loading,z,f]);(0,_.useEffect)(()=>{let e=M.current;if(!e)return;let t=L(e,{rootMargin:`160px`});return N.current=t,t.isVisible()&&p(!0),t.whenVisible.then(()=>p(!0)),()=>{t.destroy(),N.current=null}},[L]),(0,_.useEffect)(()=>{!f||c||o||B()},[m,o,B,c,f]),(0,_.useEffect)(()=>()=>{var e,t;te.current+=1,I.current&&=((t=(e=I.current).destroy)==null||t.call(e),null)},[]);let ae=(0,_.useCallback)(()=>{d(!1),P.current&&(P.current.innerHTML=``),ee.current=null,document.body.style.overflow=``},[]),oe=(0,_.useCallback)(()=>{d(!0),document.body.style.overflow=`hidden`},[]);(0,_.useEffect)(()=>{if(!u)return;let e=e=>{e.key===`Escape`&&ae()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[u,ae]),(0,_.useEffect)(()=>{u&&setTimeout(()=>{if(j.current&&P.current){P.current.innerHTML=``;let e=document.createElement(`div`);Object.assign(e.style,{transition:`transform 0.1s ease`,transformOrigin:`center center`,width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`});let t=j.current.cloneNode(!0);t.classList.add(`fullscreen`),t.style.height=`auto`,e.appendChild(t),P.current.appendChild(e),ee.current=e,e.style.transform=`translate(${D.x}px, ${D.y}px) scale(${T})`}},0)},[u]),(0,_.useEffect)(()=>{u&&ee.current&&(ee.current.style.transform=`translate(${D.x}px, ${D.y}px) scale(${T})`)},[u,D,T]);let V=(0,_.useCallback)(()=>{let e=j.current?.querySelector(`svg`);if(!e)return;let t=new XMLSerializer().serializeToString(e),n=new Blob([t],{type:`image/svg+xml;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`infographic-${Date.now()}.svg`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)},[]),H=e=>{A(!0);let t=`touches`in e?e.touches[0].clientX:e.clientX,n=`touches`in e?e.touches[0].clientY:e.clientY;F.current={x:t-D.x,y:n-D.y}},se=e=>{if(!k)return;let t=`touches`in e?e.touches[0].clientX:e.clientX,n=`touches`in e?e.touches[0].clientY:e.clientY;O({x:t-F.current.x,y:n-F.current.y})},ce=()=>A(!1),le=t.isDark?`p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200`:`p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700`,ue=c||o;return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`div`,{ref:M,"data-markstream-infographic":`1`,"data-markstream-mode":c?`source`:C?`error`:x?`preview`:`pending`,className:Q(`my-4 rounded-lg border overflow-hidden shadow-sm`,t.isDark?`border-gray-700/30`:`border-gray-200`,{"is-rendering":t.loading}),children:[t.showHeader&&(0,v.jsxs)(`div`,{className:Q(`flex justify-between items-center px-4 py-2.5 border-b`,t.isDark?`bg-gray-800 border-gray-700/30`:`bg-gray-50 border-gray-200`),children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-x-2 overflow-hidden`,children:[IS,(0,v.jsx)(`span`,{className:Q(`text-sm font-medium font-mono truncate`,t.isDark?`text-gray-400`:`text-gray-600`),children:`Infographic`})]}),t.showModeToggle&&(0,v.jsxs)(`div`,{className:Q(`flex items-center gap-x-1 rounded-md p-0.5`,t.isDark?`bg-gray-700`:`bg-gray-100`),children:[(0,v.jsx)(`button`,{className:Q(`px-2.5 py-1 text-xs rounded transition-colors`,c?t.isDark?`text-gray-400 hover:text-gray-200`:`text-gray-500 hover:text-gray-700`:t.isDark?`bg-gray-600 text-gray-200 shadow-sm`:`bg-white text-gray-700 shadow-sm`),onClick:()=>l(!1),onMouseEnter:e=>Rx(e.currentTarget,n(`common.preview`)||`Preview`,`top`,!1,0,t.isDark),onMouseLeave:()=>zx(),children:(0,v.jsxs)(`div`,{className:`flex items-center gap-x-1`,children:[(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,children:[(0,v.jsx)(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),(0,v.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}),(0,v.jsx)(`span`,{children:n(`common.preview`)||`Preview`})]})}),(0,v.jsx)(`button`,{className:Q(`px-2.5 py-1 text-xs rounded transition-colors`,c?t.isDark?`bg-gray-600 text-gray-200 shadow-sm`:`bg-white text-gray-700 shadow-sm`:t.isDark?`text-gray-400 hover:text-gray-200`:`text-gray-500 hover:text-gray-700`),onClick:()=>l(!0),onMouseEnter:e=>Rx(e.currentTarget,n(`common.source`)||`Source`,`top`,!1,0,t.isDark),onMouseLeave:()=>zx(),children:(0,v.jsxs)(`div`,{className:`flex items-center gap-x-1`,children:[(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m16 18l6-6l-6-6M8 6l-6 6l6 6`})}),(0,v.jsx)(`span`,{children:n(`common.source`)||`Source`})]})})]}),(0,v.jsxs)(`div`,{className:`flex items-center gap-x-1`,children:[t.showCollapseButton&&(0,v.jsx)(`button`,{className:le,onClick:()=>s(!o),onMouseEnter:e=>Rx(e.currentTarget,o?n(`common.expand`)||`Expand`:n(`common.collapse`)||`Collapse`,`top`,!1,0,t.isDark),onMouseLeave:()=>zx(),children:(0,v.jsx)(`svg`,{style:{rotate:o?`0deg`:`90deg`},xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m9 18l6-6l-6-6`})})}),t.showCopyButton&&(0,v.jsx)(`button`,{className:le,onClick:ie,onMouseEnter:e=>Rx(e.currentTarget,r?n(`common.copied`)||`Copied`:n(`common.copy`)||`Copy`,`top`,!1,0,t.isDark),onMouseLeave:()=>zx(),children:(0,v.jsx)(`svg`,r?{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M20 6L9 17l-5-5`})}:{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,children:[(0,v.jsx)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,v.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})})}),t.showExportButton&&(0,v.jsx)(`button`,{className:Q(le,ue&&`opacity-50 cursor-not-allowed`),disabled:ue,onClick:V,onMouseEnter:e=>Rx(e.currentTarget,n(`common.export`)||`Export`,`top`,!1,0,t.isDark),onMouseLeave:()=>zx(),children:(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,children:[(0,v.jsx)(`path`,{d:`M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,v.jsx)(`path`,{d:`m7 10l5 5l5-5`})]})})}),t.showFullscreenButton&&(0,v.jsx)(`button`,{className:Q(le,ue&&`opacity-50 cursor-not-allowed`),disabled:ue,onClick:oe,onMouseEnter:e=>Rx(e.currentTarget,u?n(`common.minimize`)||`Minimize`:n(`common.open`)||`Open`,`top`,!1,0,t.isDark),onMouseLeave:()=>zx(),children:(0,v.jsx)(`svg`,u?{xmlns:`http://www.w3.org/2000/svg`,width:`0.75rem`,height:`0.75rem`,viewBox:`0 0 24 24`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`})}:{xmlns:`http://www.w3.org/2000/svg`,width:`0.75rem`,height:`0.75rem`,viewBox:`0 0 24 24`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`})})})]})]}),!o&&(0,v.jsx)(`div`,{children:c?(0,v.jsx)(`div`,{className:Q(`p-4`,t.isDark?`bg-gray-900`:`bg-gray-50`),children:(0,v.jsx)(`pre`,{className:Q(`text-sm font-mono whitespace-pre-wrap`,t.isDark?`text-gray-300`:`text-gray-700`),children:m})}):(0,v.jsxs)(`div`,{className:`relative`,children:[t.showZoomControls&&(0,v.jsx)(`div`,{className:`absolute top-2 right-2 z-10 rounded-lg`,children:(0,v.jsxs)(`div`,{className:`flex items-center gap-2 backdrop-blur rounded-lg`,children:[(0,v.jsx)(`button`,{className:Q(`p-2 text-xs rounded transition-colors`,t.isDark?`text-gray-400 hover:bg-gray-700`:`text-gray-600 hover:bg-gray-200`),onClick:()=>E(Math.min(T+.1,3)),children:`+`}),(0,v.jsx)(`button`,{className:Q(`p-2 text-xs rounded transition-colors`,t.isDark?`text-gray-400 hover:bg-gray-700`:`text-gray-600 hover:bg-gray-200`),onClick:()=>E(Math.max(T-.1,.5)),children:`-`}),(0,v.jsxs)(`button`,{className:Q(`p-2 text-xs rounded transition-colors`,t.isDark?`text-gray-400 hover:bg-gray-700`:`text-gray-600 hover:bg-gray-200`),onClick:()=>{E(1),O({x:0,y:0})},children:[Math.round(100*T),`%`]})]})}),(0,v.jsxs)(`div`,{className:Q(`infographic-preview relative transition-all duration-100 overflow-hidden block`,t.isDark?`bg-gray-900`:`bg-gray-50`),style:{height:y,maxHeight:t.maxHeight??void 0,minHeight:`var(--ms-size-diagram-min-height, 360px)`},onMouseDown:H,onMouseMove:se,onMouseUp:ce,onMouseLeave:ce,onTouchStart:H,onTouchMove:se,onTouchEnd:ce,children:[!x&&!C&&(0,v.jsx)(`pre`,{className:Q(`absolute inset-0 overflow-auto p-4 text-left text-sm font-mono whitespace-pre-wrap`,t.isDark?`text-gray-300`:`text-gray-700`),children:m}),(0,v.jsx)(`div`,{className:Q(`absolute inset-0 cursor-grab`,k&&`cursor-grabbing`),style:{transform:`translate(${D.x}px, ${D.y}px) scale(${T})`},children:(0,v.jsx)(`div`,{ref:j,className:`w-full text-center flex items-center justify-center min-h-full`})})]})]})})]}),u&&typeof document<`u`&&(0,hx.createPortal)((0,v.jsx)(`div`,{className:`markstream-react fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4`,onClick:ae,role:`dialog`,"aria-modal":`true`,children:(0,v.jsxs)(`div`,{className:Q(`dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden`,t.isDark?`bg-gray-900`:`bg-white`),onClick:e=>e.stopPropagation(),children:[(0,v.jsxs)(`div`,{className:`absolute top-6 right-6 z-50 flex items-center gap-2`,children:[(0,v.jsx)(`button`,{className:Q(`p-2 text-xs rounded transition-colors`,t.isDark?`text-gray-400 hover:bg-gray-700`:`text-gray-600 hover:bg-gray-200`),onClick:()=>E(Math.min(T+.1,3)),children:`+`}),(0,v.jsx)(`button`,{className:Q(`p-2 text-xs rounded transition-colors`,t.isDark?`text-gray-400 hover:bg-gray-700`:`text-gray-600 hover:bg-gray-200`),onClick:()=>E(Math.max(T-.1,.5)),children:`-`}),(0,v.jsxs)(`button`,{className:Q(`p-2 text-xs rounded transition-colors`,t.isDark?`text-gray-400 hover:bg-gray-700`:`text-gray-600 hover:bg-gray-200`),onClick:()=>{E(1),O({x:0,y:0})},children:[Math.round(100*T),`%`]}),(0,v.jsx)(`button`,{className:Q(`inline-flex items-center justify-center p-2 rounded transition-colors`,t.isDark?`text-gray-400 hover:bg-gray-700`:`text-gray-600 hover:bg-gray-200`),onClick:ae,children:`X`})]}),(0,v.jsx)(`div`,{ref:P,className:Q(`w-full h-full flex items-center justify-center p-4 overflow-hidden`,!k&&`cursor-grab`,k&&`cursor-grabbing`),onMouseDown:H,onMouseMove:se,onMouseUp:ce,onMouseLeave:ce,onTouchStart:H,onTouchMove:se,onTouchEnd:ce})]})}),document.body)]})}function zS(e,t){return e.reduce((e,n)=>{let r=t==null||n.id===t?{...n,fading:!1}:n,i=e[e.length-1];return!i||i.fading||r.fading?e.push(r):e[e.length-1]={...i,content:i.content+r.content},e},[])}function BS(e){var t;let{node:n,children:r,ctx:i,indexKey:a,fade:o}=e,s=String(n.code??``),c=(t=o??i?.fade)==null||t,l=a==null||a===``?``:String(a),[u,d]=(0,_.useState)(s?[{id:0,content:s,fading:!1}]:[]),f=bx(),p=(0,_.useRef)(s),m=(0,_.useRef)(1),h=(0,_.useRef)(void 0);return(0,_.useEffect)(()=>{let e=f?.getStreamRenderVersion()??i?.streamRenderVersion,t=e!==h.current;if(r!=null)return p.current=``,d([]),void(h.current=e);let n=f?.textStreamState??i?.textStreamState,a=l?n?.get(l):void 0,o=p.current,u=!!(o===s&&a&&s.startsWith(a)&&s.length>a.length);if(u&&(o=a),c)if(s!==o)if(o&&s.startsWith(o)){let e=s.slice(o.length);d(t=>{if(u)return[{id:m.current++,content:o,fading:!1},{id:m.current++,content:e,fading:!0}];let n=t[t.length-1];return n?.fading?[...t.slice(0,-1),{...n,content:n.content+e}]:[...t,{id:m.current++,content:e,fading:!0}]})}else d(s?[{id:m.current++,content:s,fading:!1}]:[]);else t&&d(e=>e.some(e=>e.fading)?zS(e):e);else d(e=>e.length!==1||e[0]?.fading||e[0].content!==s?s?[{id:m.current++,content:s,fading:!1}]:[]:e);p.current=s,h.current=e,l&&n?.set(l,s)},[r,s,f,i?.textStreamState,i?.streamRenderVersion,l,c]),(0,v.jsx)(`code`,{className:`inline-code inline text-[85%] px-1 py-0.5 rounded font-mono bg-[hsl(var(--secondary))] whitespace-normal break-words max-w-full`,children:r||u.map(e=>(0,v.jsx)(`span`,{className:e.fading?Q(`text-node-stream-delta`,e.id%2==0?`text-node-stream-delta--a`:`text-node-stream-delta--b`):void 0,onAnimationEnd:e.fading?()=>{t=e.id,d(e=>e.some(e=>e.id===t&&e.fading)?zS(e,t):e);return;var t}:void 0,children:e.content},e.id))})}function VS(e){return(0,v.jsx)(`ins`,{className:`insert-node`,children:e.children})}function HS(e,t){return e.reduce((e,n)=>{let r=t==null||n.id===t?{...n,fading:!1}:n,i=e[e.length-1];return!i||i.fading||r.fading?e.push(r):e[e.length-1]={...i,content:i.content+r.content},e},[])}function US({content:e}){let t=(0,_.useRef)(e),n=(0,_.useRef)(t.current),r=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let t=r.current;if(t)if(e.startsWith(n.current)){let r=e.slice(n.current.length);r&&t.appendChild(document.createTextNode(r)),n.current=e}else t.textContent=e,n.current=e},[e]),(0,v.jsx)(`span`,{ref:r,children:t.current})}function WS(e){var t;let{node:n,children:r,ctx:i,indexKey:a,fade:o}=e,s=String(n.content??``),c=(t=o??i?.fade)==null||t,l=a==null||a===``?``:String(a),[u,d]=(0,_.useState)(s?[{id:0,content:s,fading:!1}]:[]),f=bx(),p=(0,_.useRef)(s),m=(0,_.useRef)(1),h=(0,_.useRef)(void 0);return(0,_.useEffect)(()=>{let e=f?.getStreamRenderVersion()??i?.streamRenderVersion,t=e!==h.current;if(r!=null)return p.current=``,d([]),void(h.current=e);let n=f?.textStreamState??i?.textStreamState,a=l?n?.get(l):void 0,o=p.current,u=!!(o===s&&a&&s.startsWith(a)&&s.length>a.length);if(u&&(o=a),c)if(s!==o)if(o&&s.startsWith(o)){let e=s.slice(o.length);d(t=>{if(u)return[{id:m.current++,content:o,fading:!1},{id:m.current++,content:e,fading:!0}];let n=t[t.length-1];return n?.fading?[...t.slice(0,-1),{...n,content:n.content+e}]:[...t,{id:m.current++,content:e,fading:!0}]})}else d(s?[{id:m.current++,content:s,fading:!1}]:[]);else t&&d(e=>e.some(e=>e.fading)?HS(e):e);else d(e=>{if(!s)return[];let t=e.reduce((e,t)=>e+t.content,``);return s===t?e:s.startsWith(t)?[...e,{id:m.current++,content:s.slice(t.length),fading:!1}]:[{id:m.current++,content:s,fading:!1}]});p.current=s,h.current=e,l&&n?.set(l,s)},[r,s,f,i?.textStreamState,i?.streamRenderVersion,l,c]),(0,v.jsx)(`span`,r==null?{className:Q(`text-node whitespace-pre-wrap break-words`,n.center&&`text-node-center`),children:u.map(e=>(0,v.jsx)(`span`,{className:e.fading?Q(`text-node-stream-delta`,e.id%2==0?`text-node-stream-delta--a`:`text-node-stream-delta--b`):void 0,onAnimationEnd:e.fading?()=>{t=e.id,d(e=>e.some(e=>e.id===t&&e.fading)?HS(e,t):e);return;var t}:void 0,children:e.fading?e.content:(0,v.jsx)(US,{content:e.content})},e.id))}:{className:Q(`text-node whitespace-pre-wrap break-words`,n.center&&`text-node-center`),children:r})}function GS(e){let{node:t,ctx:n,renderNode:r,indexKey:i}=e,a=!1!==e.showTooltip,o=e.isDark??n?.isDark,s=(0,_.useMemo)(()=>{let t=e.underlineBottom===void 0?`-3px`:typeof e.underlineBottom==`number`?`${e.underlineBottom}px`:String(e.underlineBottom),n=e.animationOpacity??.35,r=Math.max(.12,Math.min(.5*n,n));return{"--link-color":e.color??`#0366d6`,"--underline-height":`${e.underlineHeight??2}px`,"--underline-bottom":t,"--underline-opacity":String(n),"--underline-rest-opacity":String(r),"--underline-duration":`${e.animationDuration??1.6}s`,"--underline-timing":e.animationTiming??`ease-in-out`,"--underline-iteration":typeof e.animationIteration==`number`?String(e.animationIteration):e.animationIteration??`infinite`}},[e.animationDuration,e.animationIteration,e.animationOpacity,e.animationTiming,e.color,e.underlineBottom,e.underlineHeight]),c=(0,_.useMemo)(()=>yy({href:String(t.href??``)}).href,[t.href]),l=typeof t.title==`string`&&t.title.trim().length>0?t.title:String(c??``),u=Pc(c),d=(0,_.useCallback)(e=>{a&&Rx(e.currentTarget,String(t.title||c||t.text||``),`top`,!1,(e.clientX,e.clientY),o)},[o,t.text,t.title,c,a]),f=(0,_.useCallback)(()=>{a&&zx()},[a]);return t.loading?(0,v.jsx)(`span`,{className:`link-loading inline-flex items-baseline gap-1.5`,"aria-hidden":`false`,style:s,children:(0,v.jsxs)(`span`,{className:`link-text-wrapper relative inline-flex`,children:[(0,v.jsx)(`span`,{className:`leading-[normal] link-text`,children:(0,v.jsx)(WS,{node:{type:`text`,content:String(t.text??``)},ctx:n,indexKey:`${String(i??`link`)}-loading`,typewriter:e.typewriter})}),(0,v.jsx)(`span`,{className:`link-loading-indicator`,"aria-hidden":`true`})]})}):(0,v.jsx)(`a`,{className:`link-node`,href:c||void 0,title:a?``:l,"aria-label":`Link: ${l}`,target:u?`_blank`:void 0,rel:u?`noopener noreferrer`:void 0,style:s,onMouseEnter:d,onMouseLeave:f,children:n&&r?ob(t.children,n,String(i??`link`),r):(0,v.jsx)(WS,{node:{type:`text`,content:String(t.text??``)},ctx:n,indexKey:`${String(i??`link`)}-fallback`,typewriter:e.typewriter})})}function KS(e){let{node:t,ctx:n,renderNode:r,value:i,indexKey:a,children:o}=e;return(0,v.jsx)(`li`,{className:`list-item pl-1.5 my-2`,dir:`auto`,value:i??void 0,children:o??(n&&r?ob(t.children,n,String(a??`list-item`),r):null)})}function qS(e){let{node:t,ctx:n,renderNode:r,indexKey:i}=e,a=t.ordered?`ol`:`ul`,o=t.ordered&&t.start?t.start:void 0,s=n&&hb(n.customId).list_item||KS;return(0,v.jsx)(a,{className:Q(`list-node my-5 pl-[calc(13/8*1em)]`,t.ordered?`list-decimal`:`list-disc max-lg:my-[calc(4/3*1em)] max-lg:pl-[calc(14/9*1em)]`),start:o,children:t.items?.map((e,a)=>(0,v.jsx)(s,{node:e,value:t.ordered?(t.start??1)+a:void 0,ctx:n,renderNode:r,indexKey:`${String(i??`list`)}-${a}`,customId:n?.customId,isDark:n?.isDark,typewriter:n?.typewriter},`${String(i??`list`)}-${a}`))})}var JS=null,YS=null,XS=!1,ZS=new Map,QS=new Map,$S=5,eC=new Set;function tC(){if(ZS.size<$S&&eC.size){let e=Array.from(eC);eC.clear();for(let t of e)try{t()}catch{}}}var nC=`WORKER_BUSY`;async function rC(e,t=!0,n=2e3,r){performance.now();let i=sx(e);if(YS)return Promise.reject(YS);let a=`${t?`d`:`i`}:${i}`,o=QS.get(a);if(o)return Promise.resolve(o);let s=JS||(YS=Error(`[katexWorkerClient] No worker instance set. Please inject a Worker via setKaTeXWorker().`),YS.name=`WORKER_INIT_ERROR`,YS.code=`WORKER_INIT_ERROR`,null);if(!s)return Promise.reject(YS);if(ZS.size>=$S){let e=Error(`Worker busy`);return e.name=`WorkerBusy`,e.code=nC,e.busy=!0,e.inFlight=ZS.size,e.max=$S,Promise.reject(e)}return new Promise((e,a)=>{if(r?.aborted){let e=Error(`Aborted`);e.name=`AbortError`,a(e);return}let o=Math.random().toString(36).slice(2),c=setTimeout(()=>{ZS.delete(o);let e=Error(`Worker render timed out`);e.name=`WorkerTimeout`,e.code=`WORKER_TIMEOUT`,a(e),tC()},n),l=()=>{},u=()=>{ZS.delete(o),clearTimeout(c),eC.delete(l);let e=Error(`Aborted`);e.name=`AbortError`,a(e),tC()};r&&r.addEventListener(`abort`,u,{once:!0}),ZS.set(o,{resolve:t=>{r&&r.removeEventListener(`abort`,u),e(t)},reject:e=>{r&&r.removeEventListener(`abort`,u),a(e)},timeoutId:c});try{s.postMessage({id:o,content:i,displayMode:t,debug:XS})}catch(e){ZS.delete(o),clearTimeout(c),r&&r.removeEventListener(`abort`,u),a(e),tC()}})}function iC(e,t,n){let r=`${t?`d`:`i`}:${sx(e)}`;if(QS.set(r,n),QS.size>200){let e=QS.keys().next().value;QS.delete(e)}}function aC(e=1500,t){return ZS.size<$S?Promise.resolve():new Promise((n,r)=>{if(t?.aborted){let e=Error(`Aborted`);e.name=`AbortError`,r(e);return}let i=null;function a(){eC.delete(o),i!=null&&clearTimeout(i),t&&t.removeEventListener(`abort`,s)}function o(){a(),n()}function s(){a();let e=Error(`Aborted`);e.name=`AbortError`,r(e)}i=e>0?setTimeout(()=>{a(),r(Error(`Timeout waiting for worker slot`))},e):null,t&&t.addEventListener(`abort`,s,{once:!0}),eC.add(o)})}var oC={timeout:2e3,waitTimeout:1500,backoffMs:30,maxRetries:1};async function sC(e,t=!0,n={}){let r=n.timeout??oC.timeout,i=n.waitTimeout??oC.waitTimeout,a=n.backoffMs??oC.backoffMs,o=n.maxRetries??oC.maxRetries,s=Number.isFinite(o)?Math.max(0,Math.min(Math.floor(o),8)):oC.maxRetries,c=n.signal,l=0;for(;;){if(c?.aborted){let e=Error(`Aborted`);throw e.name=`AbortError`,e}try{return await rC(e,t,r,c)}catch(e){if(e?.code!==`WORKER_BUSY`||l>=s)throw e;if(l++,await aC(i,c).catch(()=>{}),c?.aborted){let e=Error(`Aborted`);throw e.name=`AbortError`,e}a>0&&await new Promise(e=>setTimeout(e,a*l))}}}var cC=null,lC=!1;async function uC(){if(cC)return cC;if(lC)return null;try{return cC=await a(()=>import(`./vendor-katex--B5dHUyk.js`).then(e=>e.r),__vite__mapDeps([3,1])),await a(()=>import(`./vendor-katex--B5dHUyk.js`).then(e=>e.t),__vite__mapDeps([3,1])),cC}catch{return lC=!0,null}}function dC({node:e}){let t=(0,_.useRef)(null),n=(0,_.useRef)(null),r=(0,_.useRef)(null),i=Tx(),[a,o]=(0,_.useState)(!0),[s,c]=(0,_.useState)(()=>typeof window>`u`),l=(0,_.useRef)(0);return(0,_.useEffect)(()=>{let e=t.current;if(!e)return;let n=i(e,{rootMargin:`400px`});return r.current=n,n.isVisible()&&c(!0),n.whenVisible.then(()=>c(!0)),()=>{n.destroy(),r.current=null}},[i]),(0,_.useEffect)(()=>{let t=sx(e.content??``);if(!t)return n.current&&(n.current.innerHTML=``),void o(!1);if(!s)return void o(!0);let r=!1,i=new AbortController,a=++l.current;return sC(t,!0,{timeout:3e3,waitTimeout:2e3,maxRetries:1,signal:i.signal}).then(e=>{r||a!==l.current||(n.current&&(n.current.innerHTML=e),o(!1))}).catch(async i=>{if(r||a!==l.current||!n.current)return;let s=i?.code||i?.name;if(s===`WORKER_INIT_ERROR`||i?.fallbackToRenderer||s===`WORKER_BUSY`||s===`WORKER_TIMEOUT`){let i=await uC();if(i)try{let s=i.renderToString(t,{throwOnError:e.loading,displayMode:!0});!r&&a===l.current&&n.current&&(n.current.innerHTML=s,o(!1),iC(t,!0,s));return}catch{}}e.loading||(n.current.textContent=e.raw,o(!1))}),()=>{r=!0,i.abort()}},[e.content,e.loading,e.raw,s]),(0,v.jsx)(`div`,{ref:t,className:`math-block text-center overflow-x-auto relative min-h-[40px]`,children:(0,v.jsx)(`div`,{ref:n,className:a?`math-rendering`:void 0})})}function fC({node:e}){let t=(0,_.useRef)(null),n=(0,_.useRef)(null),r=(0,_.useRef)(null),i=Tx(),[a,o]=(0,_.useState)(!0),[s,c]=(0,_.useState)(()=>typeof window>`u`),l=(0,_.useRef)(0);return(0,_.useEffect)(()=>{let e=t.current;if(!e)return;let n=i(e,{rootMargin:`400px`});return r.current=n,n.isVisible()&&c(!0),n.whenVisible.then(()=>c(!0)),()=>{n.destroy(),r.current=null}},[i]),(0,_.useEffect)(()=>{let t=sx(e.content??``);if(!t)return n.current&&(n.current.innerHTML=``),void o(!1);if(!s)return void o(!0);let r=!1,i=new AbortController,a=++l.current,c=e.markup===`$$`;return sC(t,c,{timeout:1500,waitTimeout:0,maxRetries:0,signal:i.signal}).then(e=>{r||a!==l.current||n.current&&(n.current.innerHTML=e,o(!1))}).catch(async i=>{if(r||a!==l.current||!n.current)return;let s=i?.code||i?.name;if(s===`WORKER_INIT_ERROR`||i?.fallbackToRenderer||s===`WORKER_BUSY`||s===`WORKER_TIMEOUT`){let i=await uC();if(i)try{let s=i.renderToString(t,{throwOnError:e.loading,displayMode:c});!r&&a===l.current&&n.current&&(n.current.innerHTML=s,o(!1),iC(t,c,s));return}catch{}}e.loading||(n.current.textContent=e.raw,o(!1))}),()=>{r=!0,i.abort()}},[e.content,e.loading,e.raw,e.markup,s]),(0,v.jsxs)(`span`,{ref:t,className:`math-inline-wrapper`,children:[(0,v.jsx)(`span`,{ref:n,className:`math-inline`+(a?` math-inline--hidden`:``)}),a&&(0,v.jsxs)(`span`,{className:`math-inline__loading`,role:`status`,"aria-live":`polite`,children:[(0,v.jsx)(`span`,{className:`math-inline__spinner`,"aria-hidden":`true`}),(0,v.jsx)(`span`,{className:`sr-only`,children:`Loading`})]})]})}function pC(e){try{if(typeof globalThis<`u`&&typeof globalThis.requestAnimationFrame==`function`)return globalThis.requestAnimationFrame(e)}catch{}return globalThis.setTimeout(e,0)}var mC=null,hC=null,gC=new Map,_C=5,vC=`WORKER_BUSY`;function yC(e,t,n=1400){if(hC)return Promise.reject(hC);let r=mC||(hC=Error(`[mermaidWorkerClient] No worker instance set. Please inject a Worker via setMermaidWorker().`),hC.name=`WORKER_INIT_ERROR`,hC.code=`WORKER_INIT_ERROR`,null);if(!r)return Promise.reject(hC);if(gC.size>=_C){let e=Error(`Worker busy`);return e.name=`WorkerBusy`,e.code=vC,e.inFlight=gC.size,e.max=_C,Promise.reject(e)}return new Promise((i,a)=>{let o=Math.random().toString(36).slice(2),s=!1,c=null,l=()=>{s||(s=!0,c!=null&&clearTimeout(c),gC.delete(o))};gC.set(o,{resolve:e=>{l(),i(e)},reject:e=>{l(),a(e)}});try{r.postMessage({id:o,action:e,payload:t})}catch(e){gC.delete(o),a(e);return}c=setTimeout(()=>{let e=Error(`Worker call timed out`);e.name=`WorkerTimeout`,e.code=`WORKER_TIMEOUT`,gC.get(o)?.reject(e)},n)})}async function bC(e,t,n=1400){return yC(`canParse`,{code:e,theme:t},n)}async function xC(e,t,n=2400){return yC(`findPrefix`,{code:e,theme:t},n)}function SC(){var e;(e=mC?.terminate)==null||e.call(mC),mC=null,hC=null,gC.clear()}var CC=null,wC=!1,TC=null,EC=null;function DC(e,t){var n;if(!e||!t)return;let r=function(e){return`${String(e?.securityLevel??`strict`)}|htmlLabels:${!1===e?.flowchart?.htmlLabels?`0`:`1`}`}(t);if(TC!==r)try{typeof e.initialize==`function`?e.initialize(t):(n=e.mermaidAPI)!=null&&n.initialize&&e.mermaidAPI.initialize(t),TC=r}catch{}}var OC=typeof window<`u`?_.useLayoutEffect:_.useEffect,kC={USE_PROFILES:{svg:!0},FORBID_TAGS:[`script`],FORBID_ATTR:[/^on/i],ADD_TAGS:[`style`],ADD_ATTR:[`style`],SAFE_FOR_TEMPLATES:!0};function AC(e){if(e)try{e.replaceChildren()}catch{e.innerHTML=``}}function jC(e,t,n={}){if(!e)return``;let r=function(e,t){if(!e)return``;let n=Zy(t);return n?(AC(e),e.appendChild(n),e.innerHTML):``}(e,t);return r||n.keepPreviousOnFailure||AC(e),r}function MC(e,t,n){if(n&&e?.querySelector(`svg`))try{t?.(e)}catch{}}var NC={maxHeight:`500px`,loading:!0,workerTimeoutMs:1400,parseTimeoutMs:1800,renderTimeoutMs:2500,fullRenderTimeoutMs:4e3,renderDebounceMs:300,contentStableDelayMs:500,previewPollDelayMs:800,previewPollMaxDelayMs:4e3,previewPollMaxAttempts:12,showHeader:!0,showModeToggle:!0,showCopyButton:!0,showExportButton:!0,showFullscreenButton:!0,showCollapseButton:!0,showZoomControls:!0,enableWheelZoom:!1,isStrict:!0,enableMermaidInteractions:!1};function PC(e){let t={...NC,...e},{t:n}=kx(),r=(0,_.useMemo)(()=>Ab(`mermaid`),[]),i=t.node?.code??``,o=(0,_.useMemo)(()=>i.replace(/\]::([^:])/g,`]:::$1`).replace(/:::subgraphNode$/gm,`::subgraphNode`),[i]),s=t.workerTimeoutMs??NC.workerTimeoutMs,c=t.parseTimeoutMs??NC.parseTimeoutMs,l=t.renderTimeoutMs??NC.renderTimeoutMs,u=t.fullRenderTimeoutMs??NC.fullRenderTimeoutMs,d=Math.max(0,t.renderDebounceMs??NC.renderDebounceMs),f=(0,_.useMemo)(()=>t.maxHeight&&t.maxHeight!==`none`?cx(t.maxHeight):null,[t.maxHeight]),p=(0,_.useMemo)(()=>cx(t.estimatedPreviewHeightPx)??lx(o),[o,t.estimatedPreviewHeightPx]),[m,h]=(0,_.useState)(!1),[g,y]=(0,_.useState)(!1),[b,x]=(0,_.useState)(!1),[S,C]=(0,_.useState)(!1),[w,T]=(0,_.useState)(1),[E,D]=(0,_.useState)({x:0,y:0}),[O,k]=(0,_.useState)(!1),[A,j]=(0,_.useState)(!1),[M,N]=(0,_.useState)(!1),[P,ee]=(0,_.useState)(null),[F,I]=(0,_.useState)(!1),[te,L]=(0,_.useState)(()=>`${ux(p,360,f)}px`),[ne,re]=(0,_.useState)(typeof window>`u`),R=(0,_.useRef)(null),z=(0,_.useRef)(null),ie=(0,_.useRef)(null),B=(0,_.useRef)(null),ae=(0,_.useRef)(null),oe=(0,_.useRef)(null),V=(0,_.useRef)(null),H=(0,_.useRef)({x:0,y:0}),se=(0,_.useRef)(0),ce=(0,_.useRef)({}),le=(0,_.useRef)(null),ue=(0,_.useRef)(``),de=(0,_.useRef)(!1),U=(0,_.useRef)(null),fe=(0,_.useRef)(!1),pe=(0,_.useRef)({zoom:1,translateX:0,translateY:0,containerHeight:te||`360px`}),me=Tx(),W=!!(t.node?.loading??t.loading),he=t.isDark?`dark`:`light`,G=!!t.isStrict,ge=!0===t.enableMermaidInteractions,_e=(0,_.useMemo)(()=>G?{startOnLoad:!1,securityLevel:`strict`,suppressErrorRendering:!0,dompurifyConfig:kC,flowchart:{htmlLabels:!1}}:{startOnLoad:!1,securityLevel:`loose`,suppressErrorRendering:!0},[G]);(0,_.useEffect)(()=>{fe.current=M},[M]);let ve=(0,_.useCallback)(()=>{let e=z.current;return cx(e?getComputedStyle(e).getPropertyValue(`--ms-size-diagram-min-height`).trim():``)??360},[]),ye=(0,_.useCallback)(()=>ux(p,ve(),f),[p,f,ve]);(0,_.useEffect)(()=>{g||b||L(e=>{let t=cx(e),n=ye();return t!=null&&t>=n?e:`${n}px`})},[b,ye,g]),(0,_.useEffect)(()=>{ce.current={}},[he,o,G]),(0,_.useEffect)(()=>{let e=!1;return(async()=>{let t=await async function(e){if(CC)return DC(CC,e),CC;if(EC){let t=await EC;return t&&DC(t,e),t}if(wC)return null;try{wC=!0,EC=(async()=>{try{let t=await a(()=>import(`./__vite-optional-peer-dep_mermaid_markstream-react-CQGbcmkI.js`),[]),n=t?.default||t;if(CC=n?.default?n.default:n?.mermaidAPI?n:n?.mermaid?n.mermaid:n,!CC)throw Error(`Mermaid module did not export expected API`);return DC(CC,e??{startOnLoad:!1,securityLevel:`strict`,flowchart:{htmlLabels:!1}}),CC}catch(e){return console.warn(`[markstream-react] Failed to load mermaid:`,e),null}finally{EC=null}})();let t=await EC;return t&&DC(t,e),t}catch{return null}}(_e);e||(R.current=t,h(!!t),de.current||y(!t))})(),()=>{e=!0}},[_e]),(0,_.useEffect)(()=>{let e=z.current;if(!e)return;let t=me(e,{rootMargin:`400px`});return U.current=t,t.isVisible()&&re(!0),t.whenVisible.then(()=>re(!0)),()=>{t.destroy(),U.current=null}},[me]),(0,_.useEffect)(()=>{if(typeof document>`u`||!F)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[F]);let be=(0,_.useCallback)(()=>f,[f]),K=(0,_.useCallback)(e=>{let n=z.current,r=B.current;if(!n||!r)return;let i=r.querySelector(`svg`);if(!i)return;let a=0,o=0,s=i.getAttribute(`viewBox`);if(s){let e=s.split(` `);e.length===4&&(a=Number.parseFloat(e[2]),o=Number.parseFloat(e[3]))}if(a&&o||!i.hasAttribute(`width`)||!i.hasAttribute(`height`)||(a=Number.parseFloat(i.getAttribute(`width`)||`0`),o=Number.parseFloat(i.getAttribute(`height`)||`0`)),!a||!o||Number.isNaN(a)||Number.isNaN(o))try{let e=i.getBBox();a=e.width,o=e.height}catch{return}if(!(a>0&&o>0))return;let c=(e??n.clientWidth)*(o/a),l=Number.isFinite(c)&&c>0?c:o,u=be(),d=u==null?l:Math.min(l,u),f=ye();L(`${t.maxHeight===`none`?d:Math.max(d,f)}px`)},[t.maxHeight,ye,be]);(0,_.useEffect)(()=>{if(!z.current||typeof ResizeObserver>`u`||g||b)return;let e=new ResizeObserver(e=>{if(!e.length)return;let t=e[0].contentRect.width;pC(()=>K(t))});return e.observe(z.current),()=>e.disconnect()},[b,g,K]),(0,_.useEffect)(()=>{g||b||K()},[b,t.maxHeight,g,K]),(0,_.useEffect)(()=>()=>{SC()},[]),(0,_.useLayoutEffect)(()=>{let e=ce.current[he];!g&&B.current&&e!=null&&e.svg&&(jC(B.current,e.svg)&&(le.current=e.bindFunctions??null,MC(B.current,e.bindFunctions,ge)),pC(()=>K()))},[ge,g,he,K]);let q=(0,_.useCallback)(async(e,n,r)=>{if(!R.current||!B.current)return!1;j(!0);try{let t=`mermaid-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,i=LC(e,n),a=await VC(()=>R.current.render(t,i),{timeoutMs:u,signal:r});if(!a?.svg)return!1;let o=jC(B.current,a.svg);return!!o&&(le.current=a.bindFunctions??null,MC(B.current,a.bindFunctions,ge),K(),ce.current[n]={svg:o,bindFunctions:a.bindFunctions},N(!0),ee(null),!0)}catch(e){if(!W){if(typeof t.onRenderError==`function`&&B.current&&!0===t.onRenderError(e,o,B.current))return!1;ee(e instanceof Error?e.message:String(e))}return!1}finally{j(!1)}},[ge,u,W,K]),xe=(0,_.useCallback)(async(e,t,n)=>{if(R.current&&B.current){j(!0);try{let r=`mermaid-preview-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,i=LC(BC(e)||e,t),a=await VC(()=>R.current.render(r,i),{timeoutMs:l,signal:n});if(a?.svg){let e=jC(B.current,a.svg,{keepPreviousOnFailure:!0});e&&(le.current=a.bindFunctions??null,MC(B.current,a.bindFunctions,ge)),e&&K()}}catch{}finally{j(!1)}}},[ge,l,W,K]),Se=(0,_.useCallback)(async(e,t)=>{if(!e.trim())return AC(B.current),N(!1),void(ue.current=``);let n=e.replace(/\s+/g,``);if(n===ue.current&&fe.current)return;let r=++se.current;if(RC(e)===`gantt`){let i=BC(e);if(!i.trim())return;try{if(await IC(i,he,{workerTimeout:s,parseTimeout:c,mermaid:R.current,signal:t}),t?.aborted||se.current!==r)return;i===e?await q(e,he,t)&&(ue.current=n):await xe(i,he,t)}catch(e){if(e?.name===`AbortError`)return}return}try{if(await IC(e,he,{workerTimeout:s,parseTimeout:c,mermaid:R.current,signal:t}),t?.aborted||se.current!==r)return;await q(e,he,t)&&(ue.current=n);return}catch(e){if(e?.name===`AbortError`)return}try{let n=await async function(e,t,n){try{let r=await xC(e,t,n.workerTimeout);if(r)return r}catch(e){if(e?.name===`AbortError`)throw e}return BC(e)}(e,he,{workerTimeout:s,signal:t});if(!n||t?.aborted||se.current!==r)return;await xe(n,he,t)}catch{}},[c,q,xe,he,s]),Ce=(0,_.useCallback)(()=>ne&&!g&&!b,[b,g,ne]);(0,_.useEffect)(()=>{if(!Ce()||!R.current)return;let e=new AbortController,t=window.setTimeout(()=>{!e.signal.aborted&&Ce()&&Se(o,e.signal)},d);return()=>{e.abort(),window.clearTimeout(t)}},[o,Ce,m,Se,d]);let we=(0,_.useCallback)((e,n)=>{e.clientX,e.clientY,Rx(e.currentTarget,n,`top`,!1,0,t.isDark)},[t.isDark]),Te=(0,_.useCallback)(async()=>{var e;try{await navigator.clipboard?.writeText(o),C(!0),(e=t.onCopy)==null||e.call(t,o),setTimeout(()=>C(!1),1e3)}catch{}},[o,t]),Ee=(0,_.useCallback)(()=>{var e;let n=B.current?.querySelector(`svg`)??null;if(!n)return;let r=HC(n),i={payload:{type:`export`},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:n,svgString:r};(e=t.onExport)==null||e.call(t,i),i.defaultPrevented||function(e,t){let n=t??HC(e),r=new Blob([n],{type:`image/svg+xml;charset=utf-8`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`mermaid-${Date.now()}.svg`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)}(n,r)},[t]),De=(0,_.useCallback)(()=>{V.current=null,AC(oe.current)},[]),Oe=(0,_.useCallback)(()=>{I(!1),De()},[De]),ke=(0,_.useCallback)(()=>{var e;let n=B.current?.querySelector(`svg`)??null,r={payload:{type:`open-modal`},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0},svgElement:n,svgString:n?HC(n):null};(e=t.onOpenModal)==null||e.call(t,r),r.defaultPrevented||I(!0)},[t]);(0,_.useEffect)(()=>{if(!F||typeof window>`u`)return;let e=e=>{e.key===`Escape`&&Oe()};try{window.addEventListener(`keydown`,e)}catch{}return()=>{try{window.removeEventListener(`keydown`,e)}catch{}}},[Oe,F]),OC(()=>{if(!F)return;let e=oe.current,t=z.current;if(!e||!t)return;let n=`translate(${E.x}px, ${E.y}px) scale(${w})`,r=t.cloneNode(!0);r.classList.add(`fullscreen`),r.style.height=`100%`,r.style.maxHeight=`100%`;let i=r.querySelector(`[data-mermaid-wrapper]`);i&&(V.current=i,i.style.transform=n),AC(e),e.appendChild(r),MC(e,le.current??ce.current[he]?.bindFunctions,ge)},[ge,F,he]),(0,_.useEffect)(()=>{F&&V.current&&(V.current.style.transform=`translate(${E.x}px, ${E.y}px) scale(${w})`)},[F,E.x,E.y,w]);let Ae=g||A||b,je=(0,_.useMemo)(()=>t.isDark?`mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200`:`mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700`,[t.isDark]),Me=(0,_.useCallback)(e=>{var n;let r={payload:{type:`toggle-mode`,target:e},defaultPrevented:!1,preventDefault(){this.defaultPrevented=!0}};if((n=t.onToggleMode)==null||n.call(t,e,r),!r.defaultPrevented)if(de.current=!0,e===`preview`){y(!1);let e=pe.current;T(e.zoom),D({x:e.translateX,y:e.translateY}),L(e.containerHeight)}else pe.current={zoom:w,translateX:E.x,translateY:E.y,containerHeight:te},y(!0)},[o,te,Se,t,he,E.x,E.y,K,w]),Ne=(0,_.useCallback)(e=>{if(!1===t.enableWheelZoom||!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let n=z.current;if(!n)return;let r=n.getBoundingClientRect(),i=e.clientX-r.left-E.x,a=e.clientY-r.top-E.y,o=.01*-e.deltaY,s=FC(w+o,.5,3);if(s===w)return;let c=s/w;D({x:E.x-i*(c-1),y:E.y-a*(c-1)}),T(s)},[E,w]),Pe=(0,_.useCallback)((e,t)=>{k(!0),H.current={x:e-E.x,y:t-E.y}},[E.x,E.y]),Fe=(0,_.useCallback)((e,t)=>{O&&D({x:e-H.current.x,y:t-H.current.y})},[O]),Ie=(0,_.useCallback)(()=>{k(!1)},[]),Le=(0,v.jsxs)(`div`,{className:`relative`,children:[t.showZoomControls&&(0,v.jsx)(`div`,{className:`absolute top-2 right-2 z-10 rounded-lg`,children:(0,v.jsxs)(`div`,{className:`flex items-center gap-2 backdrop-blur rounded-lg`,children:[(0,v.jsx)(`button`,{type:`button`,className:Q(`p-2 text-xs rounded transition-colors`,t.isDark?`text-gray-400 hover:bg-gray-700`:`text-gray-600 hover:bg-gray-200`),onMouseEnter:e=>we(e,n(`common.zoomIn`)),onMouseLeave:()=>zx(),onClick:()=>T(FC(w+.1,.5,3)),children:`+`}),(0,v.jsx)(`button`,{type:`button`,className:Q(`p-2 text-xs rounded transition-colors`,t.isDark?`text-gray-400 hover:bg-gray-700`:`text-gray-600 hover:bg-gray-200`),onMouseEnter:e=>we(e,n(`common.zoomOut`)),onMouseLeave:()=>zx(),onClick:()=>T(FC(w-.1,.5,3)),children:`−`}),(0,v.jsxs)(`button`,{type:`button`,className:Q(`p-2 text-xs rounded transition-colors`,t.isDark?`text-gray-400 hover:bg-gray-700`:`text-gray-600 hover:bg-gray-200`),onMouseEnter:e=>we(e,n(`common.resetZoom`)),onMouseLeave:()=>zx(),onClick:()=>{T(1),D({x:0,y:0})},children:[Math.round(100*w),`%`]})]})}),(0,v.jsxs)(`div`,{ref:z,className:Q(`relative overflow-hidden block transition-[height] duration-150 ease-out`,t.isDark?`bg-gray-900`:`bg-gray-50`),style:{height:te,maxHeight:t.maxHeight??void 0,minHeight:`var(--ms-size-diagram-min-height, 360px)`},onWheel:Ne,onMouseDown:e=>{e.button===0&&(e.preventDefault(),Pe(e.clientX,e.clientY))},onMouseMove:e=>Fe(e.clientX,e.clientY),onMouseUp:Ie,onMouseLeave:Ie,onTouchStart:e=>{let t=e.touches[0];t&&Pe(t.clientX,t.clientY)},onTouchMove:e=>{let t=e.touches[0];t&&Fe(t.clientX,t.clientY)},onTouchEnd:Ie,children:[(0,v.jsx)(`div`,{ref:ie,"data-mermaid-wrapper":!0,className:Q(`absolute inset-0 cursor-grab`,{"cursor-grabbing":O}),style:{transform:`translate(${E.x}px, ${E.y}px) scale(${w})`},children:(0,v.jsx)(`div`,{ref:B,className:`_mermaid w-full text-center flex items-center justify-center min-h-full`})}),(A||W)&&(0,v.jsxs)(`div`,{className:`mermaid-loading`,children:[(0,v.jsx)(`span`,{className:`mermaid-spinner`}),(0,v.jsx)(`span`,{children:`Rendering diagram…`})]})]})]}),Re=t.showHeader&&(0,v.jsxs)(`div`,{className:Q(`mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b`,t.isDark?`bg-gray-800 border-gray-700/30`:`bg-gray-50 border-gray-200`),children:[(0,v.jsxs)(`div`,{className:`flex items-center space-x-2 overflow-hidden`,children:[(0,v.jsx)(`span`,{className:`icon-slot h-4 w-4 flex-shrink-0`,dangerouslySetInnerHTML:{__html:r}}),(0,v.jsx)(`span`,{className:Q(`text-sm font-medium font-mono truncate`,t.isDark?`text-gray-400`:`text-gray-600`),children:`Mermaid`})]}),t.showModeToggle&&m&&(0,v.jsxs)(`div`,{className:Q(`flex items-center space-x-1 rounded-md p-0.5`,t.isDark?`bg-gray-700`:`bg-gray-100`),children:[(0,v.jsx)(`button`,{type:`button`,className:Q(`px-2.5 py-1 text-xs rounded transition-colors`,g?t.isDark?`text-gray-400 hover:text-gray-200`:`text-gray-500 hover:text-gray-700`:t.isDark?`bg-gray-600 text-gray-200 shadow-sm`:`bg-white text-gray-700 shadow-sm`),onClick:()=>Me(`preview`),onMouseEnter:e=>we(e,n(`common.preview`)),onFocus:e=>we(e,n(`common.preview`)),onMouseLeave:()=>zx(),onBlur:()=>zx(),children:(0,v.jsxs)(`div`,{className:`flex items-center space-x-1`,children:[(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,children:[(0,v.jsx)(`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0`}),(0,v.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}),(0,v.jsx)(`span`,{children:n(`common.preview`)})]})}),(0,v.jsx)(`button`,{type:`button`,className:Q(`px-2.5 py-1 text-xs rounded transition-colors`,g?t.isDark?`bg-gray-600 text-gray-200 shadow-sm`:`bg-white text-gray-700 shadow-sm`:t.isDark?`text-gray-400 hover:text-gray-200`:`text-gray-500 hover:text-gray-700`),onClick:()=>Me(`source`),onMouseEnter:e=>we(e,n(`common.source`)),onFocus:e=>we(e,n(`common.source`)),onMouseLeave:()=>zx(),onBlur:()=>zx(),children:(0,v.jsxs)(`div`,{className:`flex items-center space-x-1`,children:[(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m16 18l6-6l-6-6M8 6l-6 6l6 6`})}),(0,v.jsx)(`span`,{children:n(`common.source`)})]})})]}),(0,v.jsxs)(`div`,{className:`flex items-center space-x-1`,children:[t.showCollapseButton&&(0,v.jsx)(`button`,{type:`button`,className:je,"aria-pressed":b,onClick:()=>x(e=>!e),onMouseEnter:e=>we(e,n(b?`common.expand`:`common.collapse`)),onFocus:e=>we(e,n(b?`common.expand`:`common.collapse`)),onMouseLeave:()=>zx(),onBlur:()=>zx(),children:(0,v.jsx)(`svg`,{style:{rotate:b?`0deg`:`90deg`},xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m9 18l6-6l-6-6`})})}),t.showCopyButton&&(0,v.jsx)(`button`,{type:`button`,className:je,onClick:Te,onMouseEnter:e=>we(e,n(S?`common.copied`:`common.copy`)),onFocus:e=>we(e,n(S?`common.copied`:`common.copy`)),onMouseLeave:()=>zx(),onBlur:()=>zx(),children:(0,v.jsx)(`svg`,S?{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M20 6L9 17l-5-5`})}:{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,children:[(0,v.jsx)(`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}),(0,v.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})})}),t.showExportButton&&m&&(0,v.jsx)(`button`,{type:`button`,className:Q(je,Ae?`opacity-50 cursor-not-allowed`:``),disabled:Ae,onClick:Ee,onMouseEnter:e=>we(e,n(`common.export`)),onFocus:e=>we(e,n(`common.export`)),onMouseLeave:()=>zx(),onBlur:()=>zx(),children:(0,v.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,children:[(0,v.jsx)(`path`,{d:`M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,v.jsx)(`path`,{d:`m7 10l5 5l5-5`})]})})}),t.showFullscreenButton&&m&&(0,v.jsx)(`button`,{type:`button`,className:Q(je,Ae?`opacity-50 cursor-not-allowed`:``),disabled:Ae,onClick:F?Oe:ke,onMouseEnter:e=>we(e,n(F?`common.minimize`:`common.open`)),onFocus:e=>we(e,n(F?`common.minimize`:`common.open`)),onMouseLeave:()=>zx(),onBlur:()=>zx(),children:(0,v.jsx)(`svg`,F?{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6`})}:{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,"aria-hidden":`true`,role:`img`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,className:`w-3 h-3`,children:(0,v.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6`})})})]})]}),ze=(0,v.jsxs)(`div`,{children:[g?(0,v.jsx)(`div`,{className:Q(`p-4`,t.isDark?`bg-gray-900 text-gray-300`:`bg-gray-50 text-gray-700`),children:(0,v.jsx)(`pre`,{className:`text-sm font-mono whitespace-pre-wrap`,children:o})}):Le,P&&(0,v.jsx)(`div`,{className:`mermaid-error`,children:P})]});return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`div`,{"data-markstream-mermaid":`1`,"data-markstream-mode":g?`source`:M?`preview`:`pending`,className:Q(`my-4 rounded-lg border overflow-hidden shadow-sm mermaid-block`,t.isDark?`border-gray-700/30`:`border-gray-200`,{"is-rendering":W}),children:[Re,(0,v.jsx)(`div`,{ref:ae,style:{display:b?`none`:``},children:ze})]}),F&&typeof document<`u`&&(0,hx.createPortal)((0,v.jsx)(`div`,{className:`markstream-react mermaid-modal-overlay`,onClick:()=>Oe(),children:(0,v.jsxs)(`div`,{className:Q(`mermaid-modal-panel`,{"is-dark":t.isDark}),role:`dialog`,"aria-modal":`true`,onClick:e=>e.stopPropagation(),children:[(0,v.jsxs)(`div`,{className:`mermaid-modal-header`,children:[(0,v.jsx)(`span`,{className:`mermaid-modal-title`,children:`Mermaid ${n(`common.preview`)}`}),(0,v.jsx)(`button`,{type:`button`,className:`mermaid-modal-close`,onClick:Oe,children:n(`common.close`)})]}),(0,v.jsx)(`div`,{className:`mermaid-modal-body`,children:(0,v.jsx)(`div`,{ref:oe,className:`mermaid-modal-content`})})]})}),document.body)]})}function FC(e,t,n){return Math.min(Math.max(e,t),n)}async function IC(e,t,n){try{if(await bC(e,t,n.workerTimeout))return!0}catch(e){if(e?.name===`AbortError`)throw e}if(!n.mermaid)throw Error(`Mermaid not available`);let r=LC(e,t),i=n.mermaid;if(typeof i.parse==`function`)return await VC(()=>i.parse(r),{timeoutMs:n.parseTimeout,signal:n.signal}),!0;let a=`mermaid-parse-${Math.random().toString(36).slice(2,9)}`;return await VC(()=>i.render(a,r),{timeoutMs:n.parseTimeout,signal:n.signal}),!0}function LC(e,t){return e.trimStart().startsWith(`%%{`)?e:`%%{init: {"theme": "${t===`dark`?`dark`:`default`}"}}%%\n${e}`}function RC(e){for(let t of e.split(/\r?\n/)){let e=t.trim();if(!(!e||e.startsWith(`%%`)))return(e.match(/^([A-Z][\w-]*)\b/i)?.[1])?.toLowerCase()||``}return``}function zC(e){let t=e.trim();return!(!t||t.startsWith(`%%`))&&!/^(?:gantt|title|dateformat|axisformat|tickinterval|excludes|section|todaymarker|topaxis|weekday|weekend|acctitle|accdescr|accdescrmultiline)\b/i.test(t)&&t.includes(`:`)}function BC(e){if(RC(e)===`gantt`)return function(e){let t=e.split(/\r?\n/);for(!/\r?\n$/.test(e)&&t.length>0&&t.pop();t.length>0;){let e=t[t.length-1]?.trim();if(e&&!e.startsWith(`%%`)){if(zC(e))break;t.pop()}else t.pop()}return t.some(zC)?t.join(`
171
171
  `):``}(e);let t=e.split(`
172
172
  `);for(;t.length>0;){let e=t[t.length-1].trimEnd();if(e!==``){if(!(/^[-=~>|<\s]+$/.test(e.trim())||/(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(e)||/[-|><]$/.test(e)||/(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(e)))break;t.pop()}else t.pop()}return t.join(`