@modern-js/module-tools-docs 2.0.2 → 2.2.0

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 (313) hide show
  1. package/doc_build/api/config/build-config.html +332 -0
  2. package/doc_build/api/config/build-preset.html +43 -0
  3. package/doc_build/api/config/design-system.html +103 -0
  4. package/doc_build/api/config/plugins.html +7 -0
  5. package/doc_build/api/config/testing.html +21 -0
  6. package/doc_build/api/index.html +1 -0
  7. package/doc_build/api/plugin-api/plugin-hooks.html +113 -0
  8. package/doc_build/en/api/config/build-config.html +316 -0
  9. package/doc_build/en/api/config/build-preset.html +43 -0
  10. package/doc_build/en/api/config/design-system.html +117 -0
  11. package/doc_build/en/api/config/plugins.html +7 -0
  12. package/doc_build/en/api/config/testing.html +21 -0
  13. package/doc_build/en/api/index.html +1 -0
  14. package/doc_build/en/api/plugin-api/plugin-hooks.html +113 -0
  15. package/doc_build/en/guide/advance/asset.html +25 -0
  16. package/doc_build/en/guide/advance/build-umd.html +32 -0
  17. package/doc_build/en/guide/advance/copy.html +42 -0
  18. package/doc_build/en/guide/advance/external-dependency.html +31 -0
  19. package/doc_build/en/guide/advance/in-depth-about-build.html +112 -0
  20. package/doc_build/en/guide/advance/in-depth-about-dev-command.html +12 -0
  21. package/doc_build/en/guide/advance/theme-config.html +29 -0
  22. package/doc_build/en/guide/basic/before-getting-started.html +89 -0
  23. package/doc_build/en/guide/basic/command-preview.html +63 -0
  24. package/doc_build/en/guide/basic/modify-output-product.html +98 -0
  25. package/doc_build/en/guide/basic/publish-your-project.html +50 -0
  26. package/doc_build/en/guide/basic/test-your-project.html +31 -0
  27. package/doc_build/en/guide/basic/use-micro-generator.html +29 -0
  28. package/doc_build/en/guide/basic/using-storybook.html +66 -0
  29. package/doc_build/en/guide/best-practices/components.html +111 -0
  30. package/doc_build/en/guide/intro/getting-started.html +36 -0
  31. package/doc_build/en/guide/intro/welcome.html +13 -0
  32. package/doc_build/en/guide/intro/why-module-engineering-solution.html +9 -0
  33. package/doc_build/en/index.html +1 -0
  34. package/doc_build/en/plugins/guide/getting-started.html +15 -0
  35. package/doc_build/en/plugins/guide/plugin-object.html +14 -0
  36. package/doc_build/en/plugins/guide/setup-function.html +30 -0
  37. package/doc_build/en/plugins/official-list/overview.html +3 -0
  38. package/doc_build/guide/advance/asset.html +25 -0
  39. package/doc_build/guide/advance/build-umd.html +32 -0
  40. package/doc_build/guide/advance/copy.html +42 -0
  41. package/doc_build/guide/advance/external-dependency.html +31 -0
  42. package/doc_build/guide/advance/in-depth-about-build.html +112 -0
  43. package/doc_build/guide/advance/in-depth-about-dev-command.html +14 -0
  44. package/doc_build/guide/advance/theme-config.html +28 -0
  45. package/doc_build/guide/basic/before-getting-started.html +89 -0
  46. package/doc_build/guide/basic/command-preview.html +63 -0
  47. package/doc_build/guide/basic/modify-output-product.html +97 -0
  48. package/doc_build/guide/basic/publish-your-project.html +52 -0
  49. package/doc_build/guide/basic/test-your-project.html +32 -0
  50. package/doc_build/guide/basic/use-micro-generator.html +27 -0
  51. package/doc_build/guide/basic/using-storybook.html +67 -0
  52. package/doc_build/guide/best-practices/components.html +111 -0
  53. package/doc_build/guide/intro/getting-started.html +39 -0
  54. package/doc_build/guide/intro/welcome.html +13 -0
  55. package/doc_build/guide/intro/why-module-engineering-solution.html +9 -0
  56. package/doc_build/index.html +1 -0
  57. package/doc_build/plugins/guide/getting-started.html +15 -0
  58. package/doc_build/plugins/guide/plugin-object.html +14 -0
  59. package/doc_build/plugins/guide/setup-function.html +30 -0
  60. package/doc_build/plugins/official-list/overview.html +3 -0
  61. package/doc_build/static/css/main.edaad072.css +1 -0
  62. package/doc_build/static/js/1607.70af642a.js +2 -0
  63. package/doc_build/static/js/1607.70af642a.js.LICENSE.txt +23 -0
  64. package/doc_build/static/js/async/3799.e31e8293.js +1 -0
  65. package/doc_build/static/js/async/8652.6fbf1cb7.js +1 -0
  66. package/doc_build/static/js/async/en_api_config_build-config.367a5701.js +1 -0
  67. package/doc_build/static/js/async/en_api_config_build-preset.0d78b268.js +1 -0
  68. package/doc_build/static/js/async/en_api_config_design-system.b28d6723.js +1 -0
  69. package/doc_build/static/js/async/en_api_config_plugins.fc95fb77.js +1 -0
  70. package/doc_build/static/js/async/en_api_config_testing.8bc7f316.js +1 -0
  71. package/doc_build/static/js/async/en_api_index.669f0a56.js +1 -0
  72. package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.60d0260c.js +1 -0
  73. package/doc_build/static/js/async/en_guide_advance_asset.5ff1d623.js +1 -0
  74. package/doc_build/static/js/async/en_guide_advance_build-umd.c254ed46.js +1 -0
  75. package/doc_build/static/js/async/en_guide_advance_copy.45c0a51d.js +1 -0
  76. package/doc_build/static/js/async/en_guide_advance_external-dependency.a52d3247.js +1 -0
  77. package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.51bf3569.js +1 -0
  78. package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.aec0b4e1.js +1 -0
  79. package/doc_build/static/js/async/en_guide_advance_theme-config.db0ad9fc.js +1 -0
  80. package/doc_build/static/js/async/en_guide_basic_before-getting-started.a22fc49a.js +1 -0
  81. package/doc_build/static/js/async/en_guide_basic_command-preview.1707ed29.js +1 -0
  82. package/doc_build/static/js/async/en_guide_basic_modify-output-product.ad453d13.js +1 -0
  83. package/doc_build/static/js/async/en_guide_basic_publish-your-project.08c5112f.js +1 -0
  84. package/doc_build/static/js/async/en_guide_basic_test-your-project.f5f6b204.js +1 -0
  85. package/doc_build/static/js/async/en_guide_basic_use-micro-generator.56325139.js +1 -0
  86. package/doc_build/static/js/async/en_guide_basic_using-storybook.9d721554.js +1 -0
  87. package/doc_build/static/js/async/en_guide_best-practices_components.45155af9.js +1 -0
  88. package/doc_build/static/js/async/en_guide_intro_getting-started.f8682be3.js +1 -0
  89. package/doc_build/static/js/async/en_guide_intro_welcome.9cc45924.js +1 -0
  90. package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.7f2dae5c.js +1 -0
  91. package/doc_build/static/js/async/en_index.7bd869c4.js +1 -0
  92. package/doc_build/static/js/async/en_plugins_guide_getting-started.b850249c.js +1 -0
  93. package/doc_build/static/js/async/en_plugins_guide_plugin-object.bf6c6221.js +1 -0
  94. package/doc_build/static/js/async/en_plugins_guide_setup-function.80a2bd97.js +1 -0
  95. package/doc_build/static/js/async/en_plugins_official-list_overview.84e5cea0.js +1 -0
  96. package/doc_build/static/js/async/zh_api_config_build-config.048fd5ec.js +1 -0
  97. package/doc_build/static/js/async/zh_api_config_build-preset.7c13584d.js +1 -0
  98. package/doc_build/static/js/async/zh_api_config_design-system.1eecd474.js +1 -0
  99. package/doc_build/static/js/async/zh_api_config_plugins.c22dc4be.js +1 -0
  100. package/doc_build/static/js/async/zh_api_config_testing.a9888eed.js +1 -0
  101. package/doc_build/static/js/async/zh_api_index.22957707.js +1 -0
  102. package/doc_build/static/js/async/zh_api_plugin-api_plugin-hooks.a4d81bf6.js +1 -0
  103. package/doc_build/static/js/async/zh_guide_advance_asset.5b936003.js +1 -0
  104. package/doc_build/static/js/async/zh_guide_advance_build-umd.b6d541ff.js +1 -0
  105. package/doc_build/static/js/async/zh_guide_advance_copy.21a1aea4.js +1 -0
  106. package/doc_build/static/js/async/zh_guide_advance_external-dependency.c7cf5d4b.js +1 -0
  107. package/doc_build/static/js/async/zh_guide_advance_in-depth-about-build.64e795f3.js +1 -0
  108. package/doc_build/static/js/async/zh_guide_advance_in-depth-about-dev-command.168ce7dd.js +1 -0
  109. package/doc_build/static/js/async/zh_guide_advance_theme-config.b9570109.js +1 -0
  110. package/doc_build/static/js/async/zh_guide_basic_before-getting-started.6b06b54a.js +1 -0
  111. package/doc_build/static/js/async/zh_guide_basic_command-preview.1199124a.js +1 -0
  112. package/doc_build/static/js/async/zh_guide_basic_modify-output-product.8ccbc8d1.js +1 -0
  113. package/doc_build/static/js/async/zh_guide_basic_publish-your-project.bf11b1c4.js +1 -0
  114. package/doc_build/static/js/async/zh_guide_basic_test-your-project.ae52c47a.js +1 -0
  115. package/doc_build/static/js/async/zh_guide_basic_use-micro-generator.a091d57d.js +1 -0
  116. package/doc_build/static/js/async/zh_guide_basic_using-storybook.27829e44.js +1 -0
  117. package/doc_build/static/js/async/zh_guide_best-practices_components.7454d916.js +1 -0
  118. package/doc_build/static/js/async/zh_guide_intro_getting-started.a4c00d9a.js +1 -0
  119. package/doc_build/static/js/async/zh_guide_intro_welcome.71c3fe16.js +1 -0
  120. package/doc_build/static/js/async/zh_guide_intro_why-module-engineering-solution.6f8b5ff6.js +1 -0
  121. package/doc_build/static/js/async/zh_index.c19f9dcf.js +1 -0
  122. package/doc_build/static/js/async/zh_plugins_guide_getting-started.099dfaea.js +1 -0
  123. package/doc_build/static/js/async/zh_plugins_guide_plugin-object.963289d5.js +1 -0
  124. package/doc_build/static/js/async/zh_plugins_guide_setup-function.67d07b91.js +1 -0
  125. package/doc_build/static/js/async/zh_plugins_official-list_overview.a7635714.js +1 -0
  126. package/doc_build/static/js/lib-lodash.c5845536.js +1 -0
  127. package/doc_build/static/js/lib-polyfill.b3038509.js +1 -0
  128. package/doc_build/static/js/lib-react.d41ace5e.js +2 -0
  129. package/doc_build/static/js/lib-react.d41ace5e.js.LICENSE.txt +29 -0
  130. package/doc_build/static/js/main.2d3257a4.js +1 -0
  131. package/doc_build/static/search_index.json +1 -0
  132. package/docs/en/api/config/build-config.md +15 -5
  133. package/docs/en/api/config/build-preset.md +3 -2
  134. package/docs/en/api/config/design-system.md +623 -615
  135. package/docs/en/api/config/plugins.md +2 -2
  136. package/docs/en/api/config/testing.md +2 -1
  137. package/docs/en/guide/advance/asset.mdx +0 -4
  138. package/docs/en/guide/advance/build-umd.mdx +3 -3
  139. package/docs/en/guide/advance/in-depth-about-build.md +14 -13
  140. package/docs/en/guide/advance/in-depth-about-dev-command.md +2 -1
  141. package/docs/en/guide/basic/before-getting-started.md +16 -9
  142. package/docs/en/guide/basic/command-preview.md +2 -2
  143. package/docs/en/guide/basic/modify-output-product.md +65 -69
  144. package/docs/en/guide/basic/test-your-project.mdx +1 -3
  145. package/docs/en/guide/basic/use-micro-generator.md +4 -0
  146. package/docs/en/guide/basic/using-storybook.mdx +1 -13
  147. package/docs/en/plugins/guide/getting-started.mdx +2 -2
  148. package/docs/en/plugins/guide/plugin-object.mdx +5 -5
  149. package/docs/zh/api/config/build-config.md +18 -6
  150. package/docs/zh/api/config/build-preset.md +3 -2
  151. package/docs/zh/api/config/design-system.md +2 -2
  152. package/docs/zh/api/config/plugins.md +2 -2
  153. package/docs/zh/api/config/testing.md +3 -2
  154. package/docs/zh/guide/advance/asset.mdx +0 -5
  155. package/docs/zh/guide/advance/build-umd.mdx +3 -3
  156. package/docs/zh/guide/advance/in-depth-about-build.md +14 -13
  157. package/docs/zh/guide/advance/in-depth-about-dev-command.md +2 -1
  158. package/docs/zh/guide/basic/before-getting-started.md +15 -8
  159. package/docs/zh/guide/basic/command-preview.md +2 -2
  160. package/docs/zh/guide/basic/modify-output-product.md +17 -19
  161. package/docs/zh/guide/basic/test-your-project.mdx +1 -3
  162. package/docs/zh/guide/basic/use-micro-generator.md +5 -1
  163. package/docs/zh/guide/basic/using-storybook.mdx +9 -19
  164. package/docs/zh/guide/intro/getting-started.md +1 -1
  165. package/docs/zh/plugins/guide/getting-started.mdx +2 -2
  166. package/docs/zh/plugins/guide/plugin-object.mdx +5 -5
  167. package/modern.config.ts +11 -5
  168. package/package.json +3 -3
  169. package/LICENSE +0 -144
  170. package/doc_build/html/main/index.html +0 -16
  171. package/doc_build/route.json +0 -10
  172. package/doc_build/static/css/main.css +0 -3370
  173. package/doc_build/static/css/main.css.map +0 -1
  174. package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css +0 -85
  175. package/doc_build/static/css/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.css.map +0 -1
  176. package/doc_build/static/js/async/api_.js +0 -56
  177. package/doc_build/static/js/async/api_.js.map +0 -1
  178. package/doc_build/static/js/async/api_config_build-config.js +0 -11309
  179. package/doc_build/static/js/async/api_config_build-config.js.map +0 -1
  180. package/doc_build/static/js/async/api_config_build-preset.js +0 -7849
  181. package/doc_build/static/js/async/api_config_build-preset.js.map +0 -1
  182. package/doc_build/static/js/async/api_config_design-system.js +0 -48708
  183. package/doc_build/static/js/async/api_config_design-system.js.map +0 -1
  184. package/doc_build/static/js/async/api_config_plugins.js +0 -1492
  185. package/doc_build/static/js/async/api_config_plugins.js.map +0 -1
  186. package/doc_build/static/js/async/api_config_testing.js +0 -2130
  187. package/doc_build/static/js/async/api_config_testing.js.map +0 -1
  188. package/doc_build/static/js/async/api_plugin-api_plugin-hooks.js +0 -14394
  189. package/doc_build/static/js/async/api_plugin-api_plugin-hooks.js.map +0 -1
  190. package/doc_build/static/js/async/en_.js +0 -85
  191. package/doc_build/static/js/async/en_.js.map +0 -1
  192. package/doc_build/static/js/async/en_api_.js +0 -55
  193. package/doc_build/static/js/async/en_api_.js.map +0 -1
  194. package/doc_build/static/js/async/en_api_config_build-config.js +0 -8363
  195. package/doc_build/static/js/async/en_api_config_build-config.js.map +0 -1
  196. package/doc_build/static/js/async/en_api_config_build-preset.js +0 -7845
  197. package/doc_build/static/js/async/en_api_config_build-preset.js.map +0 -1
  198. package/doc_build/static/js/async/en_api_config_design-system.js +0 -16345
  199. package/doc_build/static/js/async/en_api_config_design-system.js.map +0 -1
  200. package/doc_build/static/js/async/en_api_config_plugins.js +0 -1492
  201. package/doc_build/static/js/async/en_api_config_plugins.js.map +0 -1
  202. package/doc_build/static/js/async/en_api_config_testing.js +0 -2137
  203. package/doc_build/static/js/async/en_api_config_testing.js.map +0 -1
  204. package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js +0 -14362
  205. package/doc_build/static/js/async/en_api_plugin-api_plugin-hooks.js.map +0 -1
  206. package/doc_build/static/js/async/en_guide_advance_asset.js +0 -3997
  207. package/doc_build/static/js/async/en_guide_advance_asset.js.map +0 -1
  208. package/doc_build/static/js/async/en_guide_advance_build-umd.js +0 -9861
  209. package/doc_build/static/js/async/en_guide_advance_build-umd.js.map +0 -1
  210. package/doc_build/static/js/async/en_guide_advance_copy.js +0 -6539
  211. package/doc_build/static/js/async/en_guide_advance_copy.js.map +0 -1
  212. package/doc_build/static/js/async/en_guide_advance_external-dependency.js +0 -3810
  213. package/doc_build/static/js/async/en_guide_advance_external-dependency.js.map +0 -1
  214. package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js +0 -5046
  215. package/doc_build/static/js/async/en_guide_advance_in-depth-about-build.js.map +0 -1
  216. package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js +0 -150
  217. package/doc_build/static/js/async/en_guide_advance_in-depth-about-dev-command.js.map +0 -1
  218. package/doc_build/static/js/async/en_guide_advance_theme-config.js +0 -2484
  219. package/doc_build/static/js/async/en_guide_advance_theme-config.js.map +0 -1
  220. package/doc_build/static/js/async/en_guide_basic_before-getting-started.js +0 -3671
  221. package/doc_build/static/js/async/en_guide_basic_before-getting-started.js.map +0 -1
  222. package/doc_build/static/js/async/en_guide_basic_command-preview.js +0 -3961
  223. package/doc_build/static/js/async/en_guide_basic_command-preview.js.map +0 -1
  224. package/doc_build/static/js/async/en_guide_basic_modify-output-product.js +0 -2970
  225. package/doc_build/static/js/async/en_guide_basic_modify-output-product.js.map +0 -1
  226. package/doc_build/static/js/async/en_guide_basic_publish-your-project.js +0 -2182
  227. package/doc_build/static/js/async/en_guide_basic_publish-your-project.js.map +0 -1
  228. package/doc_build/static/js/async/en_guide_basic_test-your-project.js +0 -3892
  229. package/doc_build/static/js/async/en_guide_basic_test-your-project.js.map +0 -1
  230. package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js +0 -168
  231. package/doc_build/static/js/async/en_guide_basic_use-micro-generator.js.map +0 -1
  232. package/doc_build/static/js/async/en_guide_basic_using-storybook.js +0 -4762
  233. package/doc_build/static/js/async/en_guide_basic_using-storybook.js.map +0 -1
  234. package/doc_build/static/js/async/en_guide_best-practices_components.js +0 -21388
  235. package/doc_build/static/js/async/en_guide_best-practices_components.js.map +0 -1
  236. package/doc_build/static/js/async/en_guide_intro_getting-started.js +0 -1906
  237. package/doc_build/static/js/async/en_guide_intro_getting-started.js.map +0 -1
  238. package/doc_build/static/js/async/en_guide_intro_welcome.js +0 -148
  239. package/doc_build/static/js/async/en_guide_intro_welcome.js.map +0 -1
  240. package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js +0 -92
  241. package/doc_build/static/js/async/en_guide_intro_why-module-engineering-solution.js.map +0 -1
  242. package/doc_build/static/js/async/en_plugins_guide_getting-started.js +0 -2560
  243. package/doc_build/static/js/async/en_plugins_guide_getting-started.js.map +0 -1
  244. package/doc_build/static/js/async/en_plugins_guide_plugin-object.js +0 -4177
  245. package/doc_build/static/js/async/en_plugins_guide_plugin-object.js.map +0 -1
  246. package/doc_build/static/js/async/en_plugins_guide_setup-function.js +0 -3819
  247. package/doc_build/static/js/async/en_plugins_guide_setup-function.js.map +0 -1
  248. package/doc_build/static/js/async/en_plugins_official-list_overview.js +0 -70
  249. package/doc_build/static/js/async/en_plugins_official-list_overview.js.map +0 -1
  250. package/doc_build/static/js/async/guide_advance_asset.js +0 -3997
  251. package/doc_build/static/js/async/guide_advance_asset.js.map +0 -1
  252. package/doc_build/static/js/async/guide_advance_build-umd.js +0 -9863
  253. package/doc_build/static/js/async/guide_advance_build-umd.js.map +0 -1
  254. package/doc_build/static/js/async/guide_advance_copy.js +0 -6539
  255. package/doc_build/static/js/async/guide_advance_copy.js.map +0 -1
  256. package/doc_build/static/js/async/guide_advance_external-dependency.js +0 -3812
  257. package/doc_build/static/js/async/guide_advance_external-dependency.js.map +0 -1
  258. package/doc_build/static/js/async/guide_advance_in-depth-about-build.js +0 -5046
  259. package/doc_build/static/js/async/guide_advance_in-depth-about-build.js.map +0 -1
  260. package/doc_build/static/js/async/guide_advance_in-depth-about-dev-command.js +0 -152
  261. package/doc_build/static/js/async/guide_advance_in-depth-about-dev-command.js.map +0 -1
  262. package/doc_build/static/js/async/guide_advance_theme-config.js +0 -2475
  263. package/doc_build/static/js/async/guide_advance_theme-config.js.map +0 -1
  264. package/doc_build/static/js/async/guide_basic_before-getting-started.js +0 -3662
  265. package/doc_build/static/js/async/guide_basic_before-getting-started.js.map +0 -1
  266. package/doc_build/static/js/async/guide_basic_command-preview.js +0 -3793
  267. package/doc_build/static/js/async/guide_basic_command-preview.js.map +0 -1
  268. package/doc_build/static/js/async/guide_basic_modify-output-product.js +0 -2949
  269. package/doc_build/static/js/async/guide_basic_modify-output-product.js.map +0 -1
  270. package/doc_build/static/js/async/guide_basic_publish-your-project.js +0 -2243
  271. package/doc_build/static/js/async/guide_basic_publish-your-project.js.map +0 -1
  272. package/doc_build/static/js/async/guide_basic_test-your-project.js +0 -3892
  273. package/doc_build/static/js/async/guide_basic_test-your-project.js.map +0 -1
  274. package/doc_build/static/js/async/guide_basic_use-micro-generator.js +0 -172
  275. package/doc_build/static/js/async/guide_basic_use-micro-generator.js.map +0 -1
  276. package/doc_build/static/js/async/guide_basic_using-storybook.js +0 -4762
  277. package/doc_build/static/js/async/guide_basic_using-storybook.js.map +0 -1
  278. package/doc_build/static/js/async/guide_best-practices_components.js +0 -21088
  279. package/doc_build/static/js/async/guide_best-practices_components.js.map +0 -1
  280. package/doc_build/static/js/async/guide_intro_getting-started.js +0 -1782
  281. package/doc_build/static/js/async/guide_intro_getting-started.js.map +0 -1
  282. package/doc_build/static/js/async/guide_intro_welcome.js +0 -148
  283. package/doc_build/static/js/async/guide_intro_welcome.js.map +0 -1
  284. package/doc_build/static/js/async/guide_intro_why-module-engineering-solution.js +0 -92
  285. package/doc_build/static/js/async/guide_intro_why-module-engineering-solution.js.map +0 -1
  286. package/doc_build/static/js/async/index.js +0 -85
  287. package/doc_build/static/js/async/index.js.map +0 -1
  288. package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js +0 -447
  289. package/doc_build/static/js/async/packages_cli_doc-core_src_theme-default_components_Search_logic_search_ts.js.map +0 -1
  290. package/doc_build/static/js/async/plugins_guide_getting-started.js +0 -2608
  291. package/doc_build/static/js/async/plugins_guide_getting-started.js.map +0 -1
  292. package/doc_build/static/js/async/plugins_guide_plugin-object.js +0 -4173
  293. package/doc_build/static/js/async/plugins_guide_plugin-object.js.map +0 -1
  294. package/doc_build/static/js/async/plugins_guide_setup-function.js +0 -3819
  295. package/doc_build/static/js/async/plugins_guide_setup-function.js.map +0 -1
  296. package/doc_build/static/js/async/plugins_official-list_overview.js +0 -70
  297. package/doc_build/static/js/async/plugins_official-list_overview.js.map +0 -1
  298. package/doc_build/static/js/async/vendors-node_modules_pnpm_code-hike_mdx_0_7_4_react_18_2_0_node_modules_code-hike_mdx_dist_co-06dd41.js +0 -6656
  299. package/doc_build/static/js/async/vendors-node_modules_pnpm_code-hike_mdx_0_7_4_react_18_2_0_node_modules_code-hike_mdx_dist_co-06dd41.js.map +0 -1
  300. package/doc_build/static/js/async/vendors-node_modules_pnpm_flexsearch_0_6_32_node_modules_flexsearch_dist_flexsearch_min_js.js +0 -54
  301. package/doc_build/static/js/async/vendors-node_modules_pnpm_flexsearch_0_6_32_node_modules_flexsearch_dist_flexsearch_min_js.js.map +0 -1
  302. package/doc_build/static/js/builder-runtime.js +0 -1375
  303. package/doc_build/static/js/builder-runtime.js.map +0 -1
  304. package/doc_build/static/js/lib-lodash.js +0 -4907
  305. package/doc_build/static/js/lib-lodash.js.map +0 -1
  306. package/doc_build/static/js/lib-polyfill.js +0 -24769
  307. package/doc_build/static/js/lib-polyfill.js.map +0 -1
  308. package/doc_build/static/js/lib-react.js +0 -39510
  309. package/doc_build/static/js/lib-react.js.map +0 -1
  310. package/doc_build/static/js/main.js +0 -9237
  311. package/doc_build/static/js/main.js.map +0 -1
  312. package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js +0 -8532
  313. package/doc_build/static/js/vendors-node_modules_pnpm_remix-run_router_1_2_0_node_modules_remix-run_router_dist_router_js-9d5e9c.js.map +0 -1
@@ -0,0 +1,23 @@
1
+ /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
2
+ * @license MIT */
3
+
4
+ /**
5
+ * @license React
6
+ * scheduler.production.min.js
7
+ *
8
+ * Copyright (c) Facebook, Inc. and its affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+
14
+ /**
15
+ * @remix-run/router v1.2.0
16
+ *
17
+ * Copyright (c) Remix Software Inc.
18
+ *
19
+ * This source code is licensed under the MIT license found in the
20
+ * LICENSE.md file in the root directory of this source tree.
21
+ *
22
+ * @license MIT
23
+ */
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_modern_js_module_tools_docs=self.webpackChunk_modern_js_module_tools_docs||[]).push([[3799],{53799:function(e,t,n){n.d(t,{$1:function(){return hn},Af:function(){return fn},EK:function(){return Mt},ds:function(){return gn}});var r=n(52983),o=n(63730);function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}const s=e=>parseInt(e.repeat(2/e.length),16);function a(e,t){return void 0!==e?e/255:"number"!=typeof t||t<0||t>1?1:t}function l(e){if(!e)return;if(!(e=>/^#([A-Fa-f0-9]{3,4}){1,2}$/.test(e))(e))throw new Error("Invalid color string, must be a valid hex color");const t=Math.floor((e.length-1)/3),n=((e,t)=>e.match(new RegExp(`.{${t}}`,"g")))(e.slice(1),t),[r,o,i,l]=n.map(s);return{r:r,g:o,b:i,a:a(l,1)}}function c(e,t){if(!e)return e;const{r:n,g:r,b:o,a:i}=l(e);return function(e){if(!e)return;const{r:t,g:n,b:r,a:o}=e,i=Math.round(255*o);return`#${t.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${i.toString(16).padStart(2,"0")}`}({r:n,g:r,b:o,a:i*t})}function u(e,t){return{prev:t(e.prev,"prev"),next:t(e.next,"next")}}function d(e,t){return{prev:void 0===(null==e?void 0:e.prev)?t:e.prev,next:void 0===(null==e?void 0:e.next)?t:e.next}}function h(e,t,n){return u(d(e,t),n)}function f(e,t){return t(e.prev)||t(e.next)}function p(e){return e.lines.map((e=>e.tokens.map((e=>e.content)).join(""))).join("\n")}function m(e){return e.split(/,(?![^\[]*\])/g)}function g(e){return e.reduce(((e,t)=>Object.assign(e,t)),{})}function v(e){const t=e.match(/(\d+)\[(.+)\]/);if(t){const[,e,n]=t,r=n.split(",").map(b);return{[Number(e)]:r}}return g(E(e).map((e=>({[e]:!0}))))}function b(e){const[t,n]=e.split(":");if(!w(t))throw new j(t);const r=Number(t);if(r<1)throw new k;if(n){if(!w(n))throw new j(n);return{start:r,end:+n}}return{start:r,end:r}}function y(e){if(!e)throw new Error("Focus cannot be empty");try{return function(e){const t={};let n=-1,r=null==e?0:e.length;for(;++n<r;){var o=e[n];t[o[0]]=o[1]}return t}(e.split(/,(?![^\[]*\])/g).map(x).flat())}catch(t){throw t}}function x(e){const t=e.match(/(\d+)\[(.+)\]/);if(t){const[,e,n]=t,r=n.split(",").map(E);return[[Number(e)-1,r.flat().map((e=>e-1))]]}return E(e).map((e=>[e-1,!0]))}function E(e){const[t,n]=e.split(":");if(!w(t))throw new j(t);const r=Number(t);if(r<1)throw new k;if(n){if(!w(n))throw new j(n);const e=[];for(let t=r;t<=+n;t++)e.push(t);return e}return[r]}function w(e){e=e.toString();var t=Math.abs(e),n=parseInt(e,10);return!isNaN(t)&&n===t&&t.toString()===e}class k extends Error{constructor(){super("Invalid line or column number in focus string"),Object.setPrototypeOf(this,new.target.prototype)}}class j extends Error{constructor(e){super(`Invalid number "${e}" in focus string`),this.number=e,Object.setPrototypeOf(this,new.target.prototype)}}var C;!function(e){e[e.CodeForeground=0]="CodeForeground",e[e.CodeBackground=1]="CodeBackground",e[e.EditorForeground=2]="EditorForeground",e[e.EditorBackground=3]="EditorBackground",e[e.FocusBorder=4]="FocusBorder",e[e.ActiveTabBackground=5]="ActiveTabBackground",e[e.ActiveTabForeground=6]="ActiveTabForeground",e[e.InactiveTabBackground=7]="InactiveTabBackground",e[e.InactiveTabForeground=8]="InactiveTabForeground",e[e.EditorGroupBorder=9]="EditorGroupBorder",e[e.EditorGroupHeaderBackground=10]="EditorGroupHeaderBackground",e[e.TabBorder=11]="TabBorder",e[e.ActiveTabBottomBorder=12]="ActiveTabBottomBorder",e[e.LineNumberForeground=13]="LineNumberForeground",e[e.InputForeground=14]="InputForeground",e[e.InputBackground=15]="InputBackground",e[e.InputBorder=16]="InputBorder",e[e.SelectionBackground=17]="SelectionBackground",e[e.IconForeground=18]="IconForeground",e[e.ListActiveSelectionBackground=19]="ListActiveSelectionBackground",e[e.ListActiveSelectionForeground=20]="ListActiveSelectionForeground",e[e.ListHoverBackground=21]="ListHoverBackground",e[e.ListHoverForeground=22]="ListHoverForeground",e[e.SideBarBackground=23]="SideBarBackground",e[e.SideBarForeground=24]="SideBarForeground",e[e.SideBarBorder=25]="SideBarBorder",e[e.LineHighlightBackground=26]="LineHighlightBackground",e[e.RangeHighlightBackground=27]="RangeHighlightBackground",e[e.EditorInfoForeground=28]="EditorInfoForeground"}(C||(C={}));const O="#6FC3DF";function F(e,t){var n,r;const o=e.colors||{};switch(t){case C.CodeForeground:return(null===(n=_(e))||void 0===n?void 0:n.foreground)||F(e,C.EditorForeground);case C.CodeBackground:return(null===(r=_(e))||void 0===r?void 0:r.background)||F(e,C.EditorBackground);case C.EditorBackground:return o["editor.background"]||B(e,{light:"#fffffe",dark:"#1E1E1E",hc:"#000000"});case C.EditorForeground:return o["editor.foreground"]||B(e,{light:"#333333",dark:"#BBBBBB",hc:"#fffffe"});case C.FocusBorder:return o.focusBorder||B(e,{light:"#0090F1",dark:"#007FD4",hc:O});case C.ActiveTabBackground:return o["tab.activeBackground"]||F(e,C.EditorBackground);case C.ActiveTabForeground:return o["tab.activeForeground"]||B(e,{dark:"#ffffff",light:"#333333",hc:"#ffffff"});case C.InactiveTabBackground:return o["tab.inactiveBackground"]||B(e,{dark:"#2D2D2D",light:"#ECECEC",hc:void 0});case C.InactiveTabForeground:return o["tab.inactiveForeground"]||B(e,{dark:c(F(e,C.ActiveTabForeground),.5),light:c(F(e,C.ActiveTabForeground),.7),hc:"#ffffff"});case C.TabBorder:return o["tab.border"]||B(e,{dark:"#252526",light:"#F3F3F3",hc:O});case C.ActiveTabBottomBorder:return o["tab.activeBorder"]||F(e,C.ActiveTabBackground);case C.EditorGroupBorder:return o["editorGroup.border"]||B(e,{dark:"#444444",light:"#E7E7E7",hc:O});case C.EditorGroupHeaderBackground:return o["editorGroupHeader.tabsBackground"]||B(e,{dark:"#252526",light:"#F3F3F3",hc:void 0});case C.LineNumberForeground:return o["editorLineNumber.foreground"]||B(e,{dark:"#858585",light:"#237893",hc:"#fffffe"});case C.InputBackground:return o["input.background"]||B(e,{dark:"#3C3C3C",light:"#fffffe",hc:"#000000"});case C.InputForeground:return o["input.foreground"]||F(e,C.EditorForeground);case C.InputBorder:return o["input.border"]||B(e,{dark:void 0,light:void 0,hc:O});case C.SelectionBackground:return o["editor.selectionBackground"]||B(e,{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"});case C.IconForeground:return o["icon.foreground"]||B(e,{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"});case C.SideBarBackground:return o["sideBar.background"]||B(e,{dark:"#252526",light:"#F3F3F3",hc:"#000000"});case C.SideBarForeground:return o["sideBar.foreground"]||F(e,C.EditorForeground);case C.SideBarBorder:return o["sideBar.border"]||F(e,C.SideBarBackground);case C.ListActiveSelectionBackground:return o["list.activeSelectionBackground"]||B(e,{dark:"#094771",light:"#0060C0",hc:"#000000"});case C.ListActiveSelectionForeground:return o["list.activeSelectionForeground"]||B(e,{dark:"#fffffe",light:"#fffffe",hc:"#fffffe"});case C.ListHoverBackground:return o["list.hoverBackground"]||B(e,{dark:"#2A2D2E",light:"#F0F0F0",hc:void 0});case C.ListHoverForeground:return o["list.hoverForeground"]||void 0;case C.LineHighlightBackground:return o["editor.lineHighlightBackground"]||B(e,{dark:void 0,light:void 0,hc:void 0});case C.RangeHighlightBackground:return o["editor.rangeHighlightBackground"]||B(e,{dark:"#ffffff0b",light:"#fdff0033",hc:void 0});case C.EditorInfoForeground:return o["editor.infoForeground"]||B(e,{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"});default:return"#f00"}}function N(e){const t=S(e);return"dark"===t?"dark":"light"===t?"light":void 0}function B(e,t){return t[S(e)]}function S(e){var t;return e.type?e.type:(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes("light"))?"light":"dark"}function _(e){let t=e.settings?e.settings:e.tokenColors;const n=t?t.find((e=>!e.name&&!e.scope)):void 0;return null==n?void 0:n.settings}const L="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;const I=200;function H(e,t,n,o,i,s){const[a,l]=r.useState(null),c=function(){const[e,t]=r.useState(void 0);return r.useEffect((()=>{function e(){t(window.innerWidth)}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e}(),u=r.useRef(null),{prevLongestLine:d,nextLongestLine:h,element:f}=r.useMemo((()=>{const n=T(e.prev,t.prev),s=T(e.next,t.next),a=(e.prev||e.next).trimEnd().split(P),l=a.length;if(i){const e="focus"===i?function(e,t){const[n,r]=function(e,t){if(e){const t=y(e),n=Object.keys(t).map((e=>parseInt(e,10)));return[Math.min(...n),Math.max(...n)]}return[0,t.length-1]}(e.prev,t);return r-n+1}(t,a):i;let r=a.length;for(;r<e;)a.push(""),r++;for(;r>e;)a.pop(),r--;n&&!a.includes(n)&&(a[a.length-1]=n)}let c=!1;const d=r.createElement("code",{className:"ch-code-scroll-parent"},r.createElement("br",null),a.map(((e,t)=>{const i=c||e!==n?void 0:u;return c=c||null!=i,r.createElement("div",{ref:i,key:t},o?r.createElement("span",{className:"ch-code-line-number"},"_",l):void 0,r.createElement("div",{style:{display:"inline-block",marginLeft:16}},r.createElement("span",null,e)))})),r.createElement("br",null));return{prevLongestLine:n,nextLongestLine:s,element:d}}),[e]),p=[...s,c,d,h,n];return L((()=>{var e;if(u.current){const t=u.current,r=null==t?void 0:t.parentElement,o=r.parentElement,i=null==t?void 0:t.querySelector(":scope > div"),s=null==t?void 0:t.querySelector(":scope > span"),a=s?function(e){const t=getComputedStyle(e);return parseFloat(t.width)}(s):0,c=A(i),f=c/d.length||1,m=h.length*f,g=null!==(e=M(i))&&void 0!==e?e:20,v={containerWidth:A(o.parentElement),containerHeight:M(o.parentElement),contentWidth:A(r.parentElement),contentHeight:M(r.parentElement),lineWidths:[c||m||I,m||c||I],lineWidth:[Math.max(c||m||I,f*n),Math.max(m||c||I,f*n)],lineHeight:g,colWidth:f,lineNumberWidth:a,deps:p};l(v)}}),p),!a||function(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(a.deps,p)?{element:f,dimensions:null}:{element:f,dimensions:a}}const P=/\r\n|\r|\n/;function T(e,t){const n=e?e.split(P):[""],r=function(e,t){if(e){const t=y(e);return Object.keys(t).map((e=>parseInt(e,10)))}return[...t.keys()]}(t,n);let o="";return n.forEach(((e,t)=>{r.includes(t)&&e.length>o.length&&(o=e)})),o}function A(e){const t=getComputedStyle(e);return parseFloat(t.width)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)}function M(e){if(!e)return null;const t=getComputedStyle(e);return parseFloat(t.height)-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom)}function $(){}function z(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var c=t[i];if(c.removed){if(c.value=e.join(r.slice(l,l+c.count)),l+=c.count,i&&t[i-1].added){var u=t[i-1];t[i-1]=t[i],t[i]=u}}else{if(!c.added&&o){var d=n.slice(a,a+c.count);d=d.map((function(e,t){var n=r[l+t];return n.length>e.length?n:e})),c.value=e.join(d)}else c.value=e.join(n.slice(a,a+c.count));a+=c.count,c.added||(l+=c.count)}}var h=t[s-1];return s>1&&"string"==typeof h.value&&(h.added||h.removed)&&e.equals("",h.value)&&(t[s-2].value+=h.value,t.pop()),t}function W(e){return{newPos:e.newPos,components:e.components.slice(0)}}$.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.callback;"function"==typeof n&&(r=n,n={}),this.options=n;var o=this;function i(e){return r?(setTimeout((function(){r(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,a=e.length,l=1,c=s+a,u=[{newPos:-1,components:[]}],d=this.extractCommon(u[0],t,e,0);if(u[0].newPos+1>=s&&d+1>=a)return i([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*l;n<=l;n+=2){var r=void 0,c=u[n-1],d=u[n+1],h=(d?d.newPos:0)-n;c&&(u[n-1]=void 0);var f=c&&c.newPos+1<s,p=d&&0<=h&&h<a;if(f||p){if(!f||p&&c.newPos<d.newPos?(r=W(d),o.pushComponent(r.components,void 0,!0)):((r=c).newPos++,o.pushComponent(r.components,!0,void 0)),h=o.extractCommon(r,t,e,n),r.newPos+1>=s&&h+1>=a)return i(z(o,r.components,t,e,o.useLongestToken));u[n]=r}else u[n]=void 0}l++}if(r)!function e(){setTimeout((function(){if(l>c)return r();h()||e()}),0)}();else for(;l<=c;){var f=h();if(f)return f}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,i=n.length,s=e.newPos,a=s-r,l=0;s+1<o&&a+1<i&&this.equals(t[s+1],n[a+1]);)s++,a++,l++;return l&&e.components.push({count:l}),e.newPos=s,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var R=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,U=/\S/,q=new $;q.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!U.test(e)&&!U.test(t)},q.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&R.test(t[n])&&R.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var G=new $;function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}G.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t},(new $).tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)},(new $).tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var X=Object.prototype.toString,Z=new $;function K(e,t,n,r,o){var i,s;for(t=t||[],n=n||[],r&&(e=r(o,e)),i=0;i<t.length;i+=1)if(t[i]===e)return n[i];if("[object Array]"===X.call(e)){for(t.push(e),s=new Array(e.length),n.push(s),i=0;i<e.length;i+=1)s[i]=K(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),"object"===D(e)&&null!==e){t.push(e),s={},n.push(s);var a,l=[];for(a in e)e.hasOwnProperty(a)&&l.push(a);for(l.sort(),i=0;i<l.length;i+=1)s[a=l[i]]=K(e[a],t,n,r,a);t.pop(),n.pop()}else s=e;return s}Z.useLongestToken=!0,Z.tokenize=G.tokenize,Z.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=void 0===r?function(e,t){return void 0===t?n:t}:r;return"string"==typeof e?e:JSON.stringify(K(e,null,null,o),o," ")},Z.equals=function(e,t){return $.prototype.equals.call(Z,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};var Y=new $;function V(e,t){let n=0,r=0;const o=function(e){const t=(n=e.prev,r=e.next,G.diff(n,r,o));var n,r,o;let i=[],s=0,a=0;return t.forEach((e=>{if(e.added)for(let t=0;t<e.count;t++)i.push({next:a++});else if(e.removed)for(let t=0;t<e.count;t++)i.push({prev:s++});else for(let t=0;t<e.count;t++)i.push({prev:s++,next:a++})})),i}(e);return{lines:o.map((e=>void 0===e.next?Object.assign(Object.assign({},t.prev[e.prev]),{lineNumber:{prev:e.prev+1},move:"exit",enterIndex:null,exitIndex:r++}):void 0===e.prev?Object.assign(Object.assign({},t.next[e.next]),{lineNumber:{next:e.next+1},move:"enter",enterIndex:n++,exitIndex:null}):Object.assign(Object.assign({},t.prev[e.prev]),{lineNumber:{prev:e.prev+1,next:e.next+1},move:"stay",enterIndex:null,exitIndex:null}))),enterCount:n,exitCount:r}}function J(e,t,n){const{lines:r}=e,o=i(e,["lines"]),s=u(t,((e,t)=>function(e,t){return g(e?m(e).map(v):[...t.keys()].map((e=>({[e+1]:!0}))))}(e,"prev"===t?r.filter((e=>"enter"!==e.move)):r.filter((e=>"exit"!==e.move))))),a=r.map((e=>{const{tokens:t}=e,r=i(e,["tokens"]),o={prev:!!e.lineNumber.prev&&s.prev[e.lineNumber.prev],next:!!e.lineNumber.next&&s.next[e.lineNumber.next]},a={prev:e.lineNumber.prev&&n.prev[e.lineNumber.prev]||[],next:e.lineNumber.next&&n.next[e.lineNumber.next]||[]};return Object.assign({focused:u(o,(e=>!!e)),groups:Q(t,o,a)},r)})),l=u(s,(e=>Object.keys(e).map((e=>Number(e))))),c=u(l,(e=>Math.min(...e))),d=u(l,(e=>Math.max(...e)));return Object.assign({lines:a,firstFocusedLineNumber:c,lastFocusedLineNumber:d},o)}function Q(e,t,n){const r=u(t,(e=>Array.isArray(e)?e:[])),o=u(n,(e=>e.map((({columnNumbers:e})=>e)))),i=function(e,t){const n=[...t.map((e=>e.start-1)),...t.map((e=>e.end))];let r=e;return n.forEach((e=>{const t=[];let n=0;r.forEach((r=>{const o=n,i=n+r.content.length;if(o<e&&e<i){const n=e-o,i=r.content.slice(0,n),s=r.content.slice(n);t.push(Object.assign(Object.assign({},r),{content:i})),t.push(Object.assign(Object.assign({},r),{content:s}))}else t.push(r);n=i})),r=t})),r}(e,[...r.prev,...r.next,...o.prev,...o.next]);let s=0,a=null;const l=[];return i.forEach((e=>{const r=te(s,t.prev),o=te(s,t.next),i=ne(s,n.prev),c=ne(s,n.next);a&&a.focused.prev===r&&a.focused.next===o&&a.annotation.prev===i&&a.annotation.next===c||(a={focused:{prev:r,next:o},tokens:[],annotation:{prev:i,next:c}},l.push(a)),null==a||a.tokens.push(e),s+=e.content.length})),l.map((e=>({focused:e.focused,tokens:e.tokens,element:ee(e)})))}function ee(e){return r.createElement(r.Fragment,null,e.tokens.map((({content:e,props:t},n)=>r.createElement("span",Object.assign({},t,{key:n+1}),e))))}function te(e,t){return Array.isArray(t)?t.some((({start:t,end:n})=>t-1<=e&&e<n)):t}function ne(e,t){return t.find((({columnNumbers:t})=>t.start-1<=e&&e<t.end))}function re(e,t){if(!0===e.fixed)return e.value;{const[n,r]=e.interval,[o,i]=e.extremes;if(t<n)return o;if(t>r)return i;const s=(t-n)/(r-n);return o+(e.ease||ie.linear)(s)*(i-o)}}function oe([e,t],n,r){if(r<=1)return[e,t];const o=t-e,i=o/Math.pow(r,1/8),s=e+(o-i)/(r-1)*n;return[s,s+i]}Y.tokenize=function(e){return e.slice()},Y.join=Y.removeEmpty=function(e){return e};const ie={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}};function se(e,t,n,r){const[o,i]=t;return e.map((e=>{const t=u(e.lineNumber,(e=>e&&e-1)),{enterIndex:s,exitIndex:a}=e,l="exit"===e.move?{fixed:!0,value:t.prev}:"enter"===e.move?{fixed:!0,value:t.next}:{fixed:!1,extremes:[t.prev,t.next],interval:[o,i],ease:ie.easeInOutCubic},c="exit"===e.move?{fixed:!1,extremes:[0,-1],ease:ie.easeInQuad,interval:oe([0,o],a,r)}:"enter"===e.move?{fixed:!1,extremes:[1,0],ease:ie.easeOutQuad,interval:oe([i,1],s,n)}:{fixed:!0,value:0};return Object.assign(Object.assign({},e),{tweenX:c,tweenY:l})}))}function ae(e,t){const n=h(e,[],(e=>e.flatMap((e=>m(e.focus).map((t=>Object.assign(Object.assign({},e),{focus:t}))))))),r=h(n,[],(e=>e.filter(le))),o=h(n,[],(e=>e.filter((e=>!le(e)))));return{inlineAnnotations:u(r,(e=>function(e,t){const n={};return e.forEach((e=>{const r=v(e.focus),o=+Object.keys(r)[0],i=r[o],s=n[o]||[];s.push({columnNumbers:i[0],data:e.data,theme:t,Component:e.Component||ce()}),n[o]=s})),n}(e,t))),multilineAnnotations:u(o,(e=>function(e,t){return e.map((e=>({lineNumbers:b(e.focus),data:e.data,theme:t,Component:e.Component||ue(e,t)})))}(e,t)))}}function le(e){return!!e.focus.match(/(\d+)\[(.+)\]/)}function ce(e,t){return({children:e})=>r.createElement("span",{style:{outline:"red 1px solid"}},e)}function ue(e,t){const n=t.colors["editor.lineHighlightBackground"]||t.colors["editor.selectionHighlightBackground"];return({children:e,style:t})=>r.createElement("div",{style:Object.assign(Object.assign({},t),{background:n,cursor:"pointer"}),onClick:e=>alert("clicked"),className:"ch-code-bg-annotation"},r.createElement("span",{className:"ch-code-bg-annotation-border",style:{background:"#00a2d3",width:"3px",height:"100%",position:"absolute",left:0}}),e)}function de(e,t,n){const r=[...t];r.sort(((e,t)=>e.lineNumbers.start-t.lineNumbers.start));let o=0;const i=[];for(;o<e.length;){const t=r[0];let s=e[o];if(t&&n(s)>t.lineNumbers.start)throw"Code Hike can't handle two annotations for the same line";if(t&&n(s)===t.lineNumbers.start){const a={lines:[],annotation:t};for(;s&&(!n(s)||n(s)<=t.lineNumbers.end);)a.lines.push(s),s=e[++o];i.push(a),r.shift()}else if(t){const r={lines:[]};for(;s&&(!n(s)||n(s)<t.lineNumbers.start);)r.lines.push(s),s=e[++o];i.push(r)}else i.push({lines:e.slice(o)}),o=e.length}return i}function he(e,t){let n=[...e],r=[...e];const o=[...t.prev],i=[...t.next],s=[];let a=1,l=1;for(;n.length>0||r.length>0;){const e=o[0],t=i[0],c=e&&e.columnNumbers.start===a,u=t&&t.columnNumbers.start===l;if(a<l)if(c){const t=e.columnNumbers.end+1;s.push({prev:{annotation:e,groups:fe(n,a,t)}}),a=t,o.shift()}else{const t=Math.min(l,(null==e?void 0:e.columnNumbers.start)||l);s.push({prev:{groups:fe(n,a,t)}}),a=t}else if(a>l)if(u){const e=t.columnNumbers.end+1;s.push({next:{annotation:t,groups:fe(r,l,e)}}),l=e,i.shift()}else{const e=Math.min(a,(null==t?void 0:t.columnNumbers.start)||a);s.push({next:{groups:fe(r,l,e)}}),l=e}else if(a==l)if(c&&u&&e.columnNumbers.end===t.columnNumbers.end){const c=t.columnNumbers.end+1;s.push({prev:{annotation:e,groups:fe(n,a,c)},next:{annotation:t,groups:fe(r,l,c)}}),a=c,l=c,o.shift(),i.shift()}else if(c){const t=e.columnNumbers.end+1;s.push({prev:{annotation:e,groups:fe(n,a,t)}}),a=t,o.shift()}else if(u){const e=t.columnNumbers.end+1;s.push({next:{annotation:t,groups:fe(r,l,e)}}),l=e,i.shift()}else if(e||t){const o=Math.min((null==e?void 0:e.columnNumbers.start)||Number.MAX_VALUE,(null==t?void 0:t.columnNumbers.start)||Number.MAX_VALUE);s.push({prev:{groups:fe(n,a,o)},next:{groups:fe(r,l,o)}}),a=o,l=o}else s.push({prev:{groups:n},next:{groups:r}}),n=[],r=[]}return s}function fe(e,t,n){const r=[];let o=t;for(;o<n&&e.length>0;){const t=e.shift();r.push(t);o+=t.tokens.reduce(((e,t)=>e+t.content.length),0)}return r}function pe(e){const{highlightedLines:t,theme:n,focus:o}=e;return r.useMemo((()=>function({theme:e,focus:t,annotations:n,highlightedLines:r,lang:o}){const s=function(e){return u(e,(e=>e.map((e=>e.tokens.map((e=>e.content)).join(""))).join("\n").trimEnd().concat("\n")))}(r),a=function(e,t){return V(e,t)}(s,r),{inlineAnnotations:l,multilineAnnotations:c}=function(e,t){return ae(e,t)}(n,e),h=function(e,t,n){var{lines:r}=e,o=i(e,["lines"]);const s=function(e,t){return{prev:de(e,t.prev,(e=>e.lineNumber.prev)),next:de(e,t.next,(e=>e.lineNumber.next))}}(function(e,t){return e.map((e=>{var{groups:n}=e,r=i(e,["groups"]);const{lineNumber:o}=r,s={prev:o.prev&&t.prev[o.prev]||[],next:o.next&&t.next[o.next]||[]};return Object.assign(Object.assign({},r),{annotatedGroups:he(n,s)})}))}(r,t),n);return Object.assign(Object.assign({},o),{lineGroups:s,lineCount:{prev:r.filter((e=>null!=e.lineNumber.prev)).length,next:r.filter((e=>null!=e.lineNumber.next)).length}})}(function(e,t,n){return J(e,t,n)}(a,d(t,null),l),l,c);return function(e,t,n){const r=(i=e.enterCount,s=e.exitCount,i<=0&&s<=0?[0,1]:i<=0&&s>=1?[.33,1]:i>=1&&s<=0?[0,.67]:[.25,.75]),o=u(e.lineGroups,(t=>t.map((t=>Object.assign(Object.assign({},t),{lines:se(t.lines,r,e.enterCount,e.exitCount)})))));var i,s;return Object.assign(Object.assign({},e),{groups:o,verticalInterval:r,code:t,lang:n})}(h,s,o)}(e)),[t.prev,t.next,o.prev,o.next,n])}function me({dimensions:e,codeStep:t,children:n,minZoom:o=0,maxZoom:s=1.2,center:a=!1,progress:l}){const{prev:c,next:d}=function(e){var{codeStep:t}=e,n=i(e,["codeStep"]);const{lineHeight:r,lineWidth:o}=n.dimensions;return u({prev:{extremes:[t.firstFocusedLineNumber.prev-1,t.lastFocusedLineNumber.prev-1],originalContentHeight:t.lineCount.prev*r,lineWidth:o[0]},next:{extremes:[t.firstFocusedLineNumber.next-1,t.lastFocusedLineNumber.next-1],originalContentHeight:t.lineCount.next*r,lineWidth:o[1]}},(({extremes:e,originalContentHeight:t,lineWidth:r})=>function({dimensions:e,lineWidth:t,minZoom:n,maxZoom:r,extremes:o,originalContentHeight:i,horizontalCenter:s}){const{lineHeight:a}=e,l=null==e?void 0:e.contentHeight,c=null==e?void 0:e.contentWidth,u=(o[1]-o[0]+3)*a,d=(null==e?void 0:e.lineNumberWidth)||16,h=16,f=Math.max(Math.min((c-d-h)/t,l/u,r),n),p=i*f,m=(o[0]-1)*a*f,g=(o[1]+2)*a*f,v=(g+m)/2,b=g-m,y=l>p?(l-p)/2:(E=l/2-v,w=Math.max(l-p,-m),k=0,E<=w?w:E>=k?k:E),x=s?Math.max(c/2-t*f/2,0):0;var E,w,k;return{zoom:f,dx:x,dy:y,focusHeight:b,focusWidth:t*f}}(Object.assign({extremes:e,originalContentHeight:t,lineWidth:r},n))))}({codeStep:t,dimensions:e,minZoom:o,maxZoom:s,horizontalCenter:a}),h=be(c.zoom,d.zoom,l),f=be(c.dx,d.dx,l),p=be(c.dy,d.dy,l,t.verticalInterval),m=be(c.focusHeight,d.focusHeight,l),g=be(c.focusWidth,d.focusWidth,l),v=((null==e?void 0:e.lineNumberWidth)||0)*h||16,b=Math.max(g+v,e.contentWidth),y=v/h;return r.createElement(ge,{width:e.containerWidth,height:e.containerHeight,lang:t.lang},r.createElement(ve,{dx:f,dy:p,scale:h,height:Math.max(m,e.contentHeight),width:b},n(g,y)))}function ge({width:e,height:t,children:n,lang:o}){return r.createElement("code",{style:{width:e,height:t,position:"relative",overflow:"auto"},className:"ch-code-scroll-parent",children:n,"data-ch-lang":o})}function ve({dx:e,dy:t,scale:n,height:o,width:i,children:s}){return r.createElement("div",{style:{position:"absolute",top:0,left:0,transformOrigin:"top left",width:i,height:o,overflow:"hidden"},className:"ch-code-scroll-content"},r.createElement("div",{style:{position:"absolute",top:0,left:0,transform:`translateX(${e}px) translateY(${t}px) scale(${n})`,transformOrigin:"left top",width:i/n,height:(o-2*t)/n},children:s}))}function be(e,t,n,r=[0,1]){return re({fixed:!1,interval:r,extremes:[e,t],ease:ie.easeInOutCubic},n)}function ye(e){return r.createElement(me,Object.assign({},e),((t,n)=>r.createElement(xe,{codeStep:e.codeStep,focusWidth:t,lineHeight:e.dimensions.lineHeight,progress:e.progress,theme:e.theme,startX:n,lineNumberWidth:e.dimensions.lineNumberWidth})))}function xe({codeStep:e,progress:t,focusWidth:n,lineHeight:o,startX:i,theme:s,lineNumberWidth:a}){const l=t<.5?e.groups.prev:e.groups.next;return r.createElement(r.Fragment,null,l.map(((e,l)=>{if(!e.annotation)return r.createElement(Ee,{lines:e.lines,t:t,focusWidth:n,lineHeight:o,startX:i,key:l,theme:s,lineNumberWidth:a});const c=re(e.lines[0].tweenY,t),u=e.annotation.lineNumbers.end-e.annotation.lineNumbers.start+1,d=e.annotation.Component;return r.createElement(d,{style:{position:"absolute",height:u*o,width:"100%",transform:`translateY(${c*o}px)`},key:l,data:e.annotation.data,theme:e.annotation.theme,isInline:!1},r.createElement(Ee,{lines:e.lines,t:t,focusWidth:n,lineHeight:o,startY:c,startX:i,theme:s,lineNumberWidth:a}))})))}function Ee({lines:e,focusWidth:t,lineHeight:n,t:o,startX:i,startY:s=0,theme:a,lineNumberWidth:l}){return r.createElement(r.Fragment,null,e.map(((e,c)=>{const{tweenX:u,tweenY:d,focused:h}=e,f=re(u,o),p=re(d,o),m=Ce(h,o,f);return r.createElement(r.Fragment,{key:c},l?r.createElement("span",{className:"ch-code-line-number",style:{position:"absolute",top:0,left:0,transform:`translate(${f*t}px, ${(p-s)*n}px)`,width:l,opacity:m,color:F(a,C.LineNumberForeground)}},o<.5?e.lineNumber.prev:e.lineNumber.next):void 0,r.createElement(je,{dx:i+f*t,dy:(p-s)*n,width:t,opacity:m},r.createElement(we,{line:e,progress:o,dx:f})))})))}function we({line:e,progress:t,dx:n}){return r.createElement("div",{style:{display:"inline-block",width:"100%"}},e.annotatedGroups.map(((e,o)=>r.createElement(ke,{annotatedGroup:e,progress:t,dx:n,key:o}))),r.createElement("br",null))}function ke({annotatedGroup:e,progress:t,dx:n}){var o,i,s;const a=t<.5?e.prev:e.next,l=(null==a?void 0:a.groups)||[],c=null===(o=null==a?void 0:a.annotation)||void 0===o?void 0:o.Component,u=l.map(((e,o)=>{const i=Ce(e.focused,t,n);return r.createElement("span",{style:{opacity:i},key:o+1},e.element)}));return c?r.createElement(c,{children:u,data:null===(i=null==a?void 0:a.annotation)||void 0===i?void 0:i.data,theme:null===(s=null==a?void 0:a.annotation)||void 0===s?void 0:s.theme,isInline:!0}):r.createElement(r.Fragment,null,u)}function je({children:e,dx:t,dy:n,opacity:o,width:i}){return r.createElement("div",{style:{position:"absolute",top:0,left:0,transform:`translate(${t}px, ${n}px)`,width:i,display:o<=0?"none":void 0}},e)}function Ce(e,t,n){return re({fixed:!1,extremes:[e.prev?.99:.33,e.next?.99:.33],interval:[0,1]},t)-1*Math.abs(n)}function Oe({content:e,style:t,className:n}){const[o,i]=r.useState(!1);return r.createElement("svg",{style:t,onClick:()=>{!function(e){if(!navigator.clipboard)return void function(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(n){}document.body.removeChild(t)}(e);navigator.clipboard.writeText(e)}(e),i(!0),setTimeout((()=>{i(!1)}),1200)},fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:n},r.createElement("title",null,"Copy"),o?r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}):r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.6px",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"}))}function Fe(e){var{tween:t,progress:n,config:o}=e,s=i(e,["tween","progress","config"]);const a=function({tween:e,theme:t}){return pe({highlightedLines:u(e,(e=>e.code.lines)),theme:t,focus:u(e,(e=>e.focus)),annotations:u(e,(e=>e.annotations)),lang:f(e,(e=>{var t;return null===(t=null==e?void 0:e.code)||void 0===t?void 0:t.lang}))})}({tween:t,theme:o.theme}),{element:l,dimensions:c}=H(a.code,u(t,(e=>e.focus)),o.minColumns||10,o.lineNumbers||!1,o.rows,[o.parentHeight]);return!c||o.debug?r.createElement(Ne,{element:l,htmlProps:s,debug:o.debug}):r.createElement(Be,{dimensions:c,stepInfo:a,config:o,progress:n,htmlProps:s})}function Ne({element:e,htmlProps:t,debug:n}){return r.createElement(Se,{htmlProps:t,style:{opacity:n?.9:0,overflow:"auto"}},e)}function Be({config:{minZoom:e=1,maxZoom:t=1,horizontalCenter:n=!1,theme:o},dimensions:i,stepInfo:s,progress:a,htmlProps:l,config:c}){var u;const{bg:d,fg:h}=function(e){return{fg:F(e,C.CodeForeground),bg:F(e,C.CodeBackground)}}(o);return r.createElement(Se,{htmlProps:l,style:{opacity:1,backgroundColor:d,color:h,colorScheme:N(o),"--ch-selection-background":F(o,C.SelectionBackground)}},r.createElement(ye,{codeStep:s,progress:a,dimensions:i,minZoom:e,maxZoom:t,center:n,theme:o}),c.showCopyButton?r.createElement(Oe,{className:"ch-code-button",content:null===(u=null==s?void 0:s.code)||void 0===u?void 0:u.prev}):void 0)}function Se({htmlProps:e,style:t,children:n}){return r.createElement("div",Object.assign({className:"ch-code-wrapper"},e,{style:Object.assign(Object.assign({margin:0,padding:0,position:"relative",whiteSpace:"pre",boxSizing:"content-box"},t),null==e?void 0:e.style),children:n}))}function _e(){return"undefined"!=typeof window?performance.now():0}function Le(e,t){var n=t.stiffness,r=t.damping,o=t.mass,i=t.decimals,s=t.teleport;return{X:e,k:null!=n?n:170,c:null!=r?r:26,m:null!=o?o:1,teleport:null!=s&&s,decimals:null!=i?i:2}}function Ie(e,t){var n=t.from,r=t.initialSpeed;return{x0:null!=n?n:e,v0:null!=r?r:0,t0:_e(),raf:null}}var He=Math.sqrt,Pe=Math.exp,Te=Math.sin,Ae=Math.cos;function Me(e){var t=e.x0,n=e.v0,r=e.t0,o=e.t,i=e.k,s=e.c,a=e.m,l=e.X,c=t-l,u=(o-r)/1e3,d=s*s-4*i*a;if(d>0){var h=(-s+He(d))/(2*a),f=(-s-He(d))/(2*a),p=(c*h-n)/(h-f),m=(n-c*f)/(h-f);return{x:l+p*Pe(f*u)+m*Pe(h*u),v:p*f*Pe(f*u)+m*h*Pe(h*u)}}if(d<0){var g=-s/(2*a),v=He(-d)/(2*a),b=c,y=(n-g*c)/v;return{x:l+Pe(g*u)*(b*Ae(v*u)+y*Te(v*u)),v:Pe(g*u)*((y*v+b*g)*Ae(v*u)-(b*v-y*g)*Te(v*u))}}var x=-s/(2*a),E=c,w=n-x*c;return{x:l+(E+w*u)*Pe(x*u),v:(w+E*x+w*x*u)*Pe(x*u)}}var $e=[],ze=null;function We(e){var t=$e.push(e);return 1===t&&(ze=requestAnimationFrame(Ue)),[ze,t-1]}function Re(e){var t=e[0],n=e[1];t===ze&&delete $e[n]}function Ue(){var e=_e(),t=$e;$e=[],(0,o.unstable_batchedUpdates)((function(){return t.forEach((function(t){return t&&t(e)}))}))}var qe="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function Ge(e,t){void 0===t&&(t={});var n=r.useState()[1],o=Le(e,t),i=function(e,t){var n=r.useRef(null);return null==n.current&&(n.current={config:Le(e,t),state:Ie(e,t)}),n.current}(e,t),s=i.state,a=i.config,l=_e(),c=s.x0,u=s.v0,d=s.t0,h=a.k,f=a.c,p=a.m,m=a.X,g=o.teleport?{x:m,v:0}:Me({x0:c,v0:u,t0:d,t:l,k:h,c:f,m:p,X:m}),v=g.x,b=g.v,y=function(e,t,n,r){var o=r.decimals,i=r.X,s=r.k,a=r.c,l=r.m;if(De(e,o)!==De(i,o))return!0;return De(Me({x0:e,v0:t,t0:n,t:n+.016,k:s,c:a,m:l,X:i}).x,o)!==De(i,o)}(v,b,l,o);return qe((function(){Object.assign(a,o)}),[o.X,o.k,o.c,o.m,o.teleport]),qe((function(){s.x0=v,s.v0=b,s.t0=l}),[v,b,l]),qe((function(){y&&null==s.raf?s.raf=We((function e(t){var r=s.x0,o=s.v0,i=s.t0,l=a.k,c=a.c,u=a.m,d=a.X,h=a.decimals;De(Me({x0:r,v0:o,t0:i,t:t,k:l,c:c,m:u,X:d}).x,h)!==De(r,h)?(s.raf=null,n(t)):s.raf=We(e)})):y||null==s.raf||(Re(s.raf),s.raf=null)})),qe((function(){return function(){null!=s.raf&&Re(s.raf)}}),[]),[De(v,o.decimals),y]}function De(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}const Xe={stiffness:120,damping:24,mass:.2,decimals:3};function Ze(e){var{step:t,config:n}=e,o=i(e,["step","config"]);const{tween:s,t:a}=function(e,t=Xe){const[{target:n,steps:o,index:i},s]=r.useState({target:2,steps:[e,e,e],index:0});r.useEffect((()=>{o[o.length-1]!=e&&s((t=>function(e,t,n){const{steps:r,target:o,index:i}=e,s=r.slice();return n-i<1?(s[2]=t,Object.assign(Object.assign({},e),{steps:s})):(s[0]=r[1],s[1]=r[2],s[2]=t,Object.assign(Object.assign({},e),{steps:s,target:o+1,index:i+1}))}(t,e,a)))}),[e]);const[a]=Ge(n,t),l=a-i;return l<=1?{tween:{prev:o[0],next:o[1]},t:l}:{tween:{prev:o[1],next:o[2]},t:l-1}}(t,n.spring);return r.createElement(Fe,Object.assign({tween:s,progress:a,config:n},o))}const Ke=(0,r.createContext)({});function Ye({classes:e,children:t}){const n=Je((0,r.useContext)(Ke),e);return r.createElement(Ke.Provider,{value:n,children:t})}function Ve(e,t){const n=Je((0,r.useContext)(Ke),t);return(0,r.useCallback)(function(e,t){return function(...n){const r=n.map((t=>e+(e&&t?"-":"")+t)),o=r.slice();return r.forEach((e=>{e in t&&o.push(t[e])})),o.join(" ")}}(e,n),[e,n])}function Je(e,t){return(0,r.useMemo)((()=>Object.assign(Object.assign({},e),t)),[e,t])}const Qe=r.forwardRef((function(e,t){var{title:n,children:o,titleBar:s,classes:a,theme:l,zoom:c=1,overflow:u}=e,d=i(e,["title","children","titleBar","classes","theme","zoom","overflow"]);const h=Ve("ch-frame",a),f=s||r.createElement(et,{title:n}),p={"--ch-frame-zoom":c,overflow:u};return r.createElement(Ye,{classes:a},r.createElement("div",Object.assign({},d,{ref:t}),r.createElement("div",{className:h("")},r.createElement("div",{className:h("title-bar"),style:{background:F(l,C.EditorGroupHeaderBackground)}},f),r.createElement("div",{className:h("content")},r.createElement("div",{className:h("zoom"),style:p},o)))))}));function et({title:e}){const t=Ve("ch-frame");return r.createElement(r.Fragment,null,r.createElement("div",{className:t("left-bar")},r.createElement(tt,null)),r.createElement("div",{className:t("middle-bar")},e),r.createElement("div",{className:t("right-bar")}))}function tt(){const e=Ve("ch-frame");return r.createElement("div",{className:e("buttons")},r.createElement("div",{className:e("button","button-left")}),r.createElement("div",{className:e("button-space")}),r.createElement("div",{className:e("button","button-middle")}),r.createElement("div",{className:e("button-space")}),r.createElement("div",{className:e("button","button-right")}))}r.forwardRef((function(e,t){var{title:n,children:o,titleBar:s,classes:a,overflow:l}=e,c=i(e,["title","children","titleBar","classes","overflow"]);const u=Ve("ch",a),d=s||r.createElement(et,{title:n});return r.createElement(Ye,{classes:a},r.createElement("div",Object.assign({},c,{ref:t}),r.createElement("div",{className:u("simple-frame")},r.createElement("div",{className:u("frame-title-bar")},d),o)))}));const nt=r.forwardRef((function(e,t){var n,{northPanel:o,southPanel:s,terminalPanel:a,style:l,height:c,northButton:u,southButton:d,theme:h,className:f,onTabClick:p}=e,m=i(e,["northPanel","southPanel","terminalPanel","style","height","northButton","southButton","theme","className","onTabClick"]);return r.createElement("div",Object.assign({ref:t},m,{className:"ch-editor-frame",style:Object.assign({background:F(h,C.EditorBackground)},l)}),r.createElement("div",{className:"ch-frame-title-bar",style:{color:F(h,C.IconForeground),background:F(h,C.EditorGroupHeaderBackground)}},r.createElement(rt,{tabs:o.tabs,showFrameButtons:!0,button:u,panel:"north",theme:h,onTabClick:p})),r.createElement("div",{"data-ch-panel":"north",style:o.style,children:o.children}),s&&r.createElement(r.Fragment,null,r.createElement("div",{className:"ch-frame-title-bar",style:{transform:null===(n=s.style)||void 0===n?void 0:n.transform,color:F(h,C.IconForeground),background:F(h,C.EditorGroupHeaderBackground)}},r.createElement(rt,{tabs:s.tabs,showFrameButtons:!1,button:d,topBorder:!0,panel:"south",theme:h,onTabClick:p})),r.createElement("div",{"data-ch-panel":"south",children:s.children,style:s.style})))}));function rt({tabs:e,button:t,showFrameButtons:n,topBorder:o,panel:i,theme:s,onTabClick:a}){const l=Ve("ch-editor-tab");return r.createElement(r.Fragment,null,o&&r.createElement("div",{style:{position:"absolute",height:"1px",background:F(s,C.EditorGroupBorder),width:"100%",top:0,zIndex:1}}),n?r.createElement(tt,null):r.createElement("div",null),e.map((({title:e,active:t,style:n})=>r.createElement("div",{key:e,title:e,"data-ch-tab":i,className:l("",t?"active":"inactive"),style:Object.assign(Object.assign({},n),{background:F(s,t?C.ActiveTabBackground:C.InactiveTabBackground),color:F(s,t?C.ActiveTabForeground:C.InactiveTabForeground),borderRightColor:F(s,C.TabBorder),borderBottomColor:F(s,t?C.ActiveTabBottomBorder:C.InactiveTabBackground)}),onClick:a&&(()=>a(e))},r.createElement(ot,{title:e})))),r.createElement("div",{style:{flex:1,minWidth:"0.8em"}}),t)}function ot({title:e}){if(!e)return r.createElement("div",null);const t=e.lastIndexOf("/")+1,n=e.substring(t),o=e.substring(0,t);return r.createElement("div",null,r.createElement("span",{style:{opacity:.5}},o),n)}const it=r.createElement("span",{className:"ch-terminal-prompt"},"$");function st({text:e,progress:t=1,style:n}){const o=function(e,t){if(!e)return[];const n=Math.round(e.length*t),{commands:r}=function(e){const[,...t]=e.split(/^\$\s*/gm),n=t.map((e=>{const[t,...n]=e.split(/\r?\n/);return{run:t,output:n.length>0?n.join("\n"):null}})),r=n[n.length-1],o=n.length>0&&null!=r.output;return{title:o?r.run.split(/(\s+)/)[0]:"bash",isRunning:o,commands:n}}(e.slice(0,n));return r}(e,t);return r.createElement("pre",{style:n,className:"ch-terminal-content"},o.map((({run:e,output:t},n)=>r.createElement(r.Fragment,{key:n},r.createElement("div",null,it," ",r.createElement("span",null,e)),t&&r.createElement("div",{className:"ch-terminal-output"},t)))))}function at({prev:e="",prevKey:t,next:n="",nextKey:o,progress:i}){return r.createElement("div",{className:"ch-terminal"},r.createElement("div",{style:{position:"relative",transform:`translateY(-${100*i}%)`}},r.createElement(st,{text:e,progress:1,key:t}),r.createElement(st,{style:{position:"absolute"},text:n,progress:i,key:o})))}function lt({steps:e,progress:t}){const n=e.map((e=>e.text)),o=t%1,i=(s=Math.floor(t),a=0,l=e.length-1,Math.min(Math.max(s,a),l));var s,a,l;const c=i+1;return r.createElement(at,{prev:n[i],prevKey:i,next:n[c]||"",nextKey:c,progress:o})}function ct({prev:e,next:t,t:n,backward:o}){const i=function({prev:e,next:t,t:n,backward:r}){return e||t?!e&&t?ut*Math.min(4*n,1):e&&!t?ut*Math.max(1-4*n,0):ut:0}({prev:e,next:t,t:n,backward:o});return i?r.createElement("div",{className:"ch-editor-terminal",style:{height:i}},r.createElement("div",{className:"ch-editor-terminal-tab"},r.createElement("span",null,"Terminal")),r.createElement("div",{className:"ch-editor-terminal-content"},r.createElement(lt,{steps:[{text:e||""},{text:t||""}],progress:n}),")")):null}const ut=150;function dt(e){return Array.isArray(e.rows)?Object.assign(Object.assign({},e),{rows:e.rows[0]}):e}function ht(e){return Array.isArray(e.rows)?Object.assign(Object.assign({},e),{rows:e.rows[1]}):e}function ft(e,t,n,o,i,s){const{prevSnapshot:a,nextSnapshot:l}=function(e,t,n){const[{prevSnapshot:o,nextSnapshot:i},s]=r.useState({prevSnapshot:null,nextSnapshot:null});return Et((()=>{(o||i)&&s({prevSnapshot:null,nextSnapshot:null})}),[t,n]),Et((()=>{if(o){if(!i){const t=e.current;s((e=>Object.assign(Object.assign({},e),{nextSnapshot:Object.assign(Object.assign({},wt(t,n)),kt(t,n))})))}}else{const n=e.current;s((e=>Object.assign(Object.assign({},e),{prevSnapshot:Object.assign(Object.assign({},wt(n,t)),kt(n,t))})))}})),{prevSnapshot:o,nextSnapshot:i}}(e,t,n);if(!a)return function(e,t,n){const o=e.northPanel,i=e.southPanel,{prevNorthFile:s,prevSouthFile:a,nextNorthFile:l,nextSouthFile:c}=vt(e,t,!0);return{northContent:gt(s),northPanel:{tabs:o.tabs.map((e=>({title:e,active:e===o.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(mt,{codeConfig:dt(n),prevFile:s,nextFile:s,t:0,parentHeight:"0"})},southContent:gt(a),southPanel:i&&{tabs:i.tabs.map((e=>({title:e,active:e===i.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(mt,{codeConfig:ht(n),prevFile:a,nextFile:a,t:0,parentHeight:"0"})}}}(t,n,s);if(!l)return pt(t,n,s);if(1===o)return pt(t,n,s);const c=t.southPanel||n.southPanel,{prevNorthFile:u,prevSouthFile:d,nextNorthFile:h,nextSouthFile:f}=vt(t,n,0==o||i),{northStyle:p,southStyle:m}=function(e,t,n){if(null===e.southHeight&&null===t.southHeight)return{northStyle:{minHeight:e.northHeight}};if(null!==e.southHeight&&null===t.southHeight&&t.northKey!==e.southKey)return{northStyle:{minHeight:bt(e.northHeight,t.northHeight,n)},southStyle:{minHeight:e.southHeight}};if(null!==e.southHeight&&null===t.southHeight&&e.southKey===t.northKey)return{northStyle:{minHeight:e.northHeight},southStyle:{position:"relative",minHeight:bt(e.southHeight,t.northHeight,n),transform:`translateY(${bt(0,-(e.northHeight+e.titleBarHeight),n)}px)`}};if(null===e.southHeight&&null!==t.southHeight&&e.northKey!==t.southKey)return{northStyle:{minHeight:bt(e.northHeight,t.northHeight,n)},southStyle:{position:"relative",minHeight:t.southHeight}};if(null===e.southHeight&&null!==t.southHeight&&e.northKey===t.southKey)return{northStyle:{minHeight:t.northHeight},southStyle:{position:"relative",minHeight:bt(e.northHeight,t.southHeight,n),transform:`translateY(${bt(-(t.northHeight+t.titleBarHeight),0,n)}px)`}};return{northStyle:{minHeight:bt(e.northHeight,t.northHeight,n)},southStyle:{minHeight:bt(e.southHeight,t.southHeight,n)}}}(a,l,o),{northTabs:g,southTabs:v}=function(e,t,n,r,o){if(!e.southTabs&&xt(r,e.northTabs))return{northTabs:yt(t.northTabs,t.southTabs,e.southTabs,e.northTabs,n,o),southTabs:yt(t.southTabs,t.northTabs,e.northTabs,e.southTabs,r,o)};if(!t.southTabs&&xt(r,t.northTabs))return{northTabs:yt(t.southTabs,t.northTabs,e.northTabs,e.southTabs,n,o),southTabs:yt(t.northTabs,t.southTabs,e.southTabs,e.northTabs,r,o)};return{northTabs:yt(t.northTabs,t.southTabs,e.northTabs,e.southTabs,n,o),southTabs:yt(t.southTabs,t.northTabs,e.southTabs,e.northTabs,r,o)}}(a,l,u.name,null==d?void 0:d.name,o);return{northContent:gt(h),northPanel:{tabs:g,style:p,children:r.createElement(mt,{codeConfig:dt(s),prevFile:u,nextFile:h,t:o,parentHeight:p.height||p.minHeight})},southContent:gt(f),southPanel:c&&{tabs:v,style:m,children:r.createElement(mt,{codeConfig:ht(s),prevFile:d,nextFile:f,t:o,parentHeight:(null==m?void 0:m.height)||(null==m?void 0:m.minHeight)})}}}function pt(e,t,n){var o;const i=t.northPanel,s=t.southPanel;let{prevNorthFile:a,prevSouthFile:l,nextNorthFile:c,nextSouthFile:u}=vt(e,t,!1);return!s&&i.active===(null===(o=null==e?void 0:e.southPanel)||void 0===o?void 0:o.active)&&(c=u),{northContent:gt(c),northPanel:{tabs:i.tabs.map((e=>({title:e,active:e===i.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(mt,{codeConfig:dt(n),prevFile:c,nextFile:c,t:1,parentHeight:"1"})},southContent:gt(u),southPanel:s&&{tabs:s.tabs.map((e=>({title:e,active:e===s.active,style:{}}))),style:{flexGrow:1,overflow:"hidden"},children:r.createElement(mt,{codeConfig:ht(n),prevFile:u,nextFile:u,t:1,parentHeight:"1"})}}}function mt({prevFile:e,nextFile:t,t:n,codeConfig:o,parentHeight:i}){var s;const a=Object.assign(Object.assign({},null==o?void 0:o.htmlProps),{style:Object.assign({height:"100%"},null===(s=null==o?void 0:o.htmlProps)||void 0===s?void 0:s.style)});return r.createElement(Fe,Object.assign({progress:n,tween:{prev:e,next:t},config:Object.assign(Object.assign({},o),{parentHeight:i})},a))}function gt(e){return e?p(e.code):""}function vt(e,t,n){var r,o;const i=e.northPanel.active,s=t.northPanel.active,a=null===(r=e.southPanel)||void 0===r?void 0:r.active,l=null===(o=t.southPanel)||void 0===o?void 0:o.active,c=e.files.find((e=>e.name===i)),u=t.files.find((e=>e.name===s)),d=a?e.files.find((e=>e.name===a)):null,h=l?t.files.find((e=>e.name===l)):null;if(!a&&i===l)return{prevNorthFile:u,nextNorthFile:u,prevSouthFile:c,nextSouthFile:h};if(!l&&s===a)return{prevNorthFile:c,nextNorthFile:c,prevSouthFile:d,nextSouthFile:u};return{prevNorthFile:i===s||n?c:u,nextNorthFile:i===s?u:n?c:u,prevSouthFile:a===l?d:n?d||h:h||d,nextSouthFile:a===l?h:n?d||h:h||d}}function bt(e,t,n){return e+(t-e)*n}function yt(e,t,n,r,o,i){const s=e?Object.keys(e).filter((e=>xt(e,n)||!n)).map((t=>{const r=n&&n[t],s=e[t],a=r?r.left+(s.left-r.left)*i:s.left,l=r?r.width+(s.width-r.width)*i:s.width;return{active:t===o,title:t,style:{position:"absolute",transform:`translateX(${a}px)`,width:l}}})):[],a=e?Object.keys(e).filter((e=>n&&!xt(e,n))).map((t=>{const n=e[t];return{active:t===o,title:t,style:{position:"absolute",transform:`translateX(${n.left}px)`,opacity:i,width:n.width}}})):[];!e||Object.keys(e).filter((e=>xt(e,r))).map((t=>{const n=r[t],i=e[t].left-n.left;return{active:t===o,title:t,style:{position:"absolute",transform:`translateX(${i}px)`}}}));return[...a,...s,...n?Object.keys(n).filter((t=>!xt(t,e))).map((e=>{const t=n[e];return{active:e===o,title:e,style:{position:"absolute",opacity:1-i,transform:`translateX(${t.left}px)`,width:t.width}}})):[]]}function xt(e,t){return t&&e&&e in t}const Et="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function wt(e,t){var n;const r=e.querySelector("[data-ch-panel='north']"),o=e.querySelector("[data-ch-panel='south']");return{titleBarHeight:e.querySelector(".ch-frame-title-bar").getBoundingClientRect().height,northHeight:r.getBoundingClientRect().height,northKey:t.northPanel.active,southHeight:(null==o?void 0:o.getBoundingClientRect().height)||null,southKey:null===(n=t.southPanel)||void 0===n?void 0:n.active}}function kt(e,t){var n;const r=Array.from(e.querySelectorAll("[data-ch-tab='north']")),o=Array.from(e.querySelectorAll("[data-ch-tab='south']"));return{northTabs:jt(r,t.northPanel.active),southTabs:jt(o,null===(n=t.southPanel)||void 0===n?void 0:n.active)}}function jt(e,t){if(!e[0])return null;const n=e[0].parentElement.getBoundingClientRect().left,r={};return e.forEach((e=>{const o=e.getAttribute("title"),i=e.getBoundingClientRect();r[o]={left:i.left-n,width:i.width,active:o===t}})),r}function Ct({files:e,theme:t,startingFileName:n}){const[o,i]=r.useState((()=>e.find((e=>e.name===n))));return r.createElement("div",{className:"ch-code-browser",style:{color:F(t,C.EditorForeground)}},r.createElement(Ot,{files:e,theme:t,activeFile:o,setActiveFile:i}),r.createElement(Bt,{file:o,theme:t}))}function Ot({theme:e,files:t,activeFile:n,setActiveFile:o}){const i=r.useMemo((()=>function(e){let t=[];for(const n of e){const e=n.name.split("/");let r=t;for(let t=0;t<e.length;t++){const o=e[t],i=t===e.length-1,s=r.findIndex((e=>e.name===o));if(-1===s){const e={name:o,children:[],codeFile:void 0};i&&(e.codeFile=n),r.push(e),r=e.children}else r=r[s].children}}return t=St(t),t}(t)),[t]);return r.createElement("div",{className:"ch-code-browser-sidebar",style:{borderColor:F(e,C.SideBarBorder),background:F(e,C.SideBarBackground),color:F(e,C.SideBarForeground),"--ch-list-selection-background":F(e,C.ListActiveSelectionBackground),"--ch-list-selection-foreground":F(e,C.ListActiveSelectionForeground),"--ch-hover-background":F(e,C.ListHoverBackground),"--ch-hover-foreground":F(e,C.ListHoverForeground)}},r.createElement(Ft,{tree:i,activeFile:n,setActiveFile:o}))}function Ft({tree:e,activeFile:t,setActiveFile:n,level:o=0}){return r.createElement(r.Fragment,null,e.map((e=>r.createElement(Nt,{key:e.name,node:e,activeFile:t,setActiveFile:n,level:o}))))}function Nt({node:e,activeFile:t,setActiveFile:n,level:o}){const i=e.children&&e.children.length>0,s=e.codeFile===t;return i?r.createElement("div",null,r.createElement("div",{className:"ch-code-browser-sidebar-folder"},r.createElement("div",{style:{paddingLeft:1.5*o+"ch"}},e.name)),r.createElement(Ft,{tree:e.children,activeFile:t,setActiveFile:n,level:o+1})):r.createElement("div",null,r.createElement("div",{className:"ch-code-browser-sidebar-file",onClick:()=>n(e.codeFile),style:s?{color:"var(--ch-list-selection-foreground)",background:"var(--ch-list-selection-background)"}:{}},r.createElement("div",{style:{paddingLeft:1.5*o+"ch"}},e.name)))}function Bt({file:e,theme:t}){return r.createElement("div",{className:"ch-code-browser-content",style:{background:F(t,C.CodeBackground),color:F(t,C.CodeForeground),"--ch-selection-background":F(t,C.SelectionBackground),colorScheme:N(t)}},r.createElement(Oe,{className:"ch-code-browser-button",content:p(e.code)}),e.code.lines.map(((e,t)=>r.createElement("div",{key:t},0===e.tokens.length?r.createElement("br",null):e.tokens.map(((e,t)=>r.createElement("span",Object.assign({key:t},e.props),e.content)))))))}function St(e){for(const t of e)t.children=St(t.children);return e.sort(((e,t)=>{const n=e.children&&e.children.length>0,r=t.children&&t.children.length>0;return n&&r||!n&&!r?e.name.localeCompare(t.name):n?-1:1}))}function _t({style:e,step:t,theme:n,className:o}){const[i,s]=r.useState(!1),[a,l]=r.useState(!0),c=r.useRef(null),u=t.files;return r.useEffect((()=>{c.current&&!c.current.showModal&&l(!1)}),[]),a?r.createElement(r.Fragment,null,r.createElement(Lt,{className:o,style:e,onClick:()=>{c.current.showModal(),document.body.classList.add("ch-no-scroll"),s(!0)}}),r.createElement("dialog",{ref:c,className:"ch-expand-dialog",onClose:()=>{s(!1)},onClick:e=>{e.currentTarget===e.target&&(c.current.close(),document.body.classList.remove("ch-no-scroll"))}},r.createElement(It,{onClick:()=>{c.current.close(),document.body.classList.remove("ch-no-scroll")}}),i?r.createElement("div",{className:"ch-expand-dialog-content",style:{borderColor:F(n,C.SideBarBorder)}},r.createElement(Ct,{files:u,theme:n,startingFileName:t.northPanel.active})):void 0)):null}function Lt({onClick:e,style:t,className:n}){return r.createElement("svg",{style:t,onClick:e,className:n,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"button"},r.createElement("title",null,"Expand"),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"}))}function It({onClick:e}){return r.createElement("svg",{onClick:e,className:"ch-expand-close",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",role:"button"},r.createElement("title",null,"Close"),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}))}const Ht={files:[{code:{lines:[],lang:"js"},focus:"",name:""}],northPanel:{active:"",tabs:[""],heightRatio:1}};function Pt(e){var{prev:t=Ht,next:n,t:o,backward:s,codeConfig:a,frameProps:l={}}=e,c=i(e,["prev","next","t","backward","codeConfig","frameProps"]);const u=r.createRef(),{showCopyButton:d,showExpandButton:h}=a,f=i(a,["showCopyButton","showExpandButton"]),{northPanel:p,southPanel:m,northContent:g,southContent:v}=ft(u,t,n||t,o,s,f),[b,y]=r.useState(void 0);L((()=>{var e;const t=null===(e=u.current)||void 0===e?void 0:e.getBoundingClientRect().height;y(t)}),[]);const x=Object.assign(Object.assign(Object.assign({},l),c),{style:Object.assign(Object.assign({},null==l?void 0:l.style),null==c?void 0:c.style)});b&&(x.style.height=b,x.style.maxHeight=b);const E=r.createElement(r.Fragment,null,d?r.createElement(Oe,{className:"ch-editor-button",content:g}):void 0,h?r.createElement(_t,{className:"ch-editor-button",step:n||t,theme:a.theme}):void 0),w=d?r.createElement(Oe,{className:"ch-editor-button",content:v}):void 0,k=r.createElement(ct,{prev:t.terminal,next:(n||t).terminal,t:o,backward:s});return r.createElement(nt,Object.assign({ref:u},x,{northPanel:p,southPanel:m,terminalPanel:k,theme:a.theme,northButton:E,southButton:w}))}const Tt={stiffness:120,damping:24,mass:.2,decimals:3};function At(e){var{northPanel:t,southPanel:n,files:o,terminal:s,springConfig:a}=e,l=i(e,["northPanel","southPanel","files","terminal","springConfig"]);const c=r.useMemo((()=>({northPanel:t,southPanel:n,files:o,terminal:s})),[t,n,o,s]),{prev:u,next:d,t:h}=function(e,t=Tt){const[{target:n,steps:o,index:i},s]=r.useState({target:2,steps:[e,e,e],index:0});r.useEffect((()=>{o[o.length-1]!=e&&s((t=>function(e,t,n){const{steps:r,target:o,index:i}=e,s=r.slice();return n-i<1?(s[2]=t,Object.assign(Object.assign({},e),{steps:s})):(s[0]=r[1],s[1]=r[2],s[2]=t,Object.assign(Object.assign({},e),{steps:s,target:o+1,index:i+1}))}(t,e,a)))}),[e]);const[a]=Ge(n,t),l=a-i;return l<=1?{prev:o[0],next:o[1],t:l}:{prev:o[1],next:o[2],t:l-1}}(c,a);return r.createElement(Pt,Object.assign({t:h,backward:!1,prev:u,next:d},l))}function Mt(e){const[t,n]=r.useState(e);return r.createElement($t,Object.assign({},t,{onTabClick:function(e){const r=zt(t,e,null);n(Object.assign(Object.assign({},t),r))}}))}function $t(e){var{onTabClick:t}=e,n=i(e,["onTabClick"]);const o=function(e){var t,n,r,o,s,a,l,c,u;const{lineNumbers:d,showCopyButton:h,showExpandButton:f,minZoom:p,maxZoom:m}=e,g=i(e,["lineNumbers","showCopyButton","showExpandButton","minZoom","maxZoom"]),v=Object.assign(Object.assign({},e.codeConfig),{maxZoom:null==m?null===(t=e.codeConfig)||void 0===t?void 0:t.maxZoom:m,minZoom:null==p?null===(n=e.codeConfig)||void 0===n?void 0:n.minZoom:p,horizontalCenter:null!==(o=null===(r=e.codeConfig)||void 0===r?void 0:r.horizontalCenter)&&void 0!==o?o:e.horizontalCenter,lineNumbers:null==d?null===(s=e.codeConfig)||void 0===s?void 0:s.lineNumbers:d,showCopyButton:null==h?null===(a=e.codeConfig)||void 0===a?void 0:a.showCopyButton:h,showExpandButton:null==f?null===(l=e.codeConfig)||void 0===l?void 0:l.showExpandButton:f,rows:e.rows,debug:null!==(c=e.debug)&&void 0!==c?c:null===(u=e.codeConfig)||void 0===u?void 0:u.debug});return Object.assign(Object.assign({},g),{codeConfig:v})}(n),{className:s,style:a,codeConfig:l}=o,c=i(o,["className","style","codeConfig"]);if(n.southPanel||1!==n.files.length||n.files[0].name){const e=Object.assign(Object.assign({},null==c?void 0:c.frameProps),{onTabClick:t});return r.createElement("div",{className:`ch-codegroup not-prose ${s||""}`,style:a},r.createElement(At,Object.assign({},c,{frameProps:e,codeConfig:l})))}return r.createElement("div",{className:`ch-codeblock not-prose ${s||""}`,style:a},r.createElement(Ze,{className:"ch-code",config:l,step:c.files[0]}))}function zt(e,t,n){const r=t||e.northPanel.active,o=e.files.map((e=>e.name===r?Object.assign(Object.assign({},e),{focus:null===n?e.focus:n}):e));let i=Object.assign({},e.northPanel),s=e.southPanel&&Object.assign({},e.southPanel);return e.northPanel.tabs.includes(r)?i.active=r:s&&(s.active=r),{files:o,northPanel:i,southPanel:s}}r.createContext({props:null,setFocus:()=>{}});r.createContext({activatedId:void 0,activate:()=>{},reset:()=>{}});function Wt(){const e=Ve("ch-browser");return r.createElement("svg",{fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:"1em",viewBox:"13 10 14 23",className:e("button","back-button")},r.createElement("g",null,r.createElement("path",{d:"m26.5 12.1q0 0.3-0.2 0.6l-8.8 8.7 8.8 8.8q0.2 0.2 0.2 0.5t-0.2 0.5l-1.1 1.1q-0.3 0.3-0.6 0.3t-0.5-0.3l-10.4-10.4q-0.2-0.2-0.2-0.5t0.2-0.5l10.4-10.4q0.3-0.2 0.5-0.2t0.6 0.2l1.1 1.1q0.2 0.2 0.2 0.5z"})))}function Rt(){const e=Ve("ch-browser");return r.createElement("svg",{fill:"currentColor",preserveAspectRatio:"xMidYMid meet",height:"1em",viewBox:"13 10 14 23",className:e("button","forward-button")},r.createElement("g",null,r.createElement("path",{d:"m26.3 21.4q0 0.3-0.2 0.5l-10.4 10.4q-0.3 0.3-0.6 0.3t-0.5-0.3l-1.1-1.1q-0.2-0.2-0.2-0.5t0.2-0.5l8.8-8.8-8.8-8.7q-0.2-0.3-0.2-0.6t0.2-0.5l1.1-1.1q0.3-0.2 0.5-0.2t0.6 0.2l10.4 10.4q0.2 0.2 0.2 0.5z"})))}function Ut({href:e,style:t}){const n=Ve("ch-browser");return r.createElement("a",{className:n("button","open-button"),title:"Open in new tab",href:e,style:t,target:"_blank",rel:"noopener noreferrer"},r.createElement("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"3 3 18 18",height:"1em",width:"1em",className:n("open-icon"),xmlns:"http://www.w3.org/2000/svg"},r.createElement("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})))}function qt({url:e,linkUrl:t,theme:n}){const o=F(n,C.InputBorder);return r.createElement(r.Fragment,null,r.createElement(tt,null),r.createElement(Wt,null),r.createElement(Rt,null),r.createElement("input",{value:e||"",readOnly:!0,style:{background:F(n,C.InputBackground),color:F(n,C.InputForeground),border:o?`1px solid ${o}`:void 0}}),r.createElement(Ut,{href:t,style:{color:F(n,C.EditorForeground)}}))}function Gt(e){return r.useMemo((()=>e?e.map((e=>{const{displayUrl:t,loadUrl:n}=function(e,t,n){const r="undefined"!=typeof window?window.origin:"",o=e&&!0===n?r+e:e;return{displayUrl:o,loadUrl:t||o}}(e.url,e.loadUrl,e.prependOrigin);return{zoom:e.zoom||1,displayUrl:t,loadUrl:n,children:e.children}})):[{zoom:1}]),[e])}const Dt=r.forwardRef((function(e,t){var{progress:n=0,backward:o=!1,steps:s,transition:a="none",classes:l,theme:c}=e,u=i(e,["progress","backward","steps","transition","classes","theme"]);const d=Ve("ch-mini-browser",l),h=Gt(s),f=Math.round(n),{zoom:p,displayUrl:m,loadUrl:g,children:v}=h[f];return r.createElement(Qe,Object.assign({},u,{zoom:p,className:`${d("")} ${u.className||""}`,style:Object.assign(Object.assign({},Xt({progress:n,transition:a})),u.style),classes:l,titleBar:r.createElement(qt,{url:m,linkUrl:g,theme:c}),theme:c}),v||r.createElement("iframe",{ref:t,src:g}))}));function Xt({progress:e,transition:t}){if("slide"===t){const t=50,n=e-Math.floor(e),r=n<=.5?-t*n:t-t*n,o=2*Math.abs(n-.5);return{transform:`translateX(${r}px)`,opacity:o*o}}return{}}function Zt(e){var{url:t,loadUrl:n,prependOrigin:o,children:s,zoom:a}=e,l=i(e,["url","loadUrl","prependOrigin","children","zoom"]);const[c,u]=function({url:e,loadUrl:t,prependOrigin:n,children:o,zoom:i}){const[s,a]=r.useState({target:0,steps:[{url:e,loadUrl:t,prependOrigin:n,children:o,zoom:i}]});r.useEffect((()=>{const r=s.steps[s.steps.length-1];r.url===e&&r.loadUrl===t&&r.prependOrigin===n&&r.children===o||a((r=>({target:r.target+1,steps:[...r.steps,{url:e,loadUrl:t,prependOrigin:n,children:o,zoom:i}]})))}),[e,t,n,o,i]);const[l]=Ge(s.target,{stiffness:100,decimals:3});return[s.steps,l]}({url:t,loadUrl:n,prependOrigin:o,children:s,zoom:a});return r.createElement(Dt,Object.assign({},l,{steps:c,progress:u}))}var Kt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Yt={};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.getMainFile=function(e){return"vue-cli"===e?"src/main.js":"angular-cli"===e?"src/main.ts":"create-react-app-typescript"===e?"src/index.tsx":"parcel"===e?"index.html":"gatsby"===e?"src/pages/index.js":"nuxt"===e||"next"===e||"apollo"===e||"reason"===e||"sapper"===e?"package.json":"nest"===e?"src/main.ts":"static"===e?"index.html":"src/index.js"};var Vt="sandbox.config.json";var Jt=Yt.getTemplate=function(e,t){var n=t[Vt]||t["/"+Vt];if(n)try{var r=JSON.parse(n.content);if(r.template)return r.template}catch(f){}var o=e.dependencies,i=void 0===o?{}:o,s=e.devDependencies,a=void 0===s?{}:s,l=Object.keys(i).concat(Object.keys(a)),c=["nuxt","nuxt-edge"];if(l.some((function(e){return c.indexOf(e)>-1})))return"nuxt";if(l.indexOf("next")>-1)return"next";var u=["apollo-server","apollo-server-express","apollo-server-hapi","apollo-server-koa","apollo-server-lambda","apollo-server-micro"];if(l.some((function(e){return u.indexOf(e)>-1})))return"apollo";if(l.indexOf("ember-cli")>-1)return"ember";if(l.indexOf("sapper")>-1)return"sapper";var d=Object.keys(t);if(d.some((function(e){return e.endsWith(".vue")})))return"vue-cli";if(d.some((function(e){return e.endsWith(".re")})))return"reason";if(l.indexOf("gatsby")>-1)return"gatsby";if(l.indexOf("parcel-bundler")>-1)return"parcel";if(l.indexOf("react-scripts")>-1)return"create-react-app";if(l.indexOf("react-scripts-ts")>-1)return"create-react-app-typescript";if(l.indexOf("@angular/core")>-1)return"angular-cli";if(l.indexOf("preact-cli")>-1)return"preact-cli";if(l.indexOf("svelte")>-1)return"svelte";if(l.indexOf("vue")>-1)return"vue-cli";var h=["@dojo/core","@dojo/framework"];return l.some((function(e){return h.indexOf(e)>-1}))?"@dojo/cli-create-app":l.indexOf("cx")>-1?"cxjs":l.indexOf("@nestjs/core")>-1||l.indexOf("@nestjs/common")>-1?"nest":void 0},Qt={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Array]",s="[object Boolean]",a="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",h="[object Object]",f="[object Promise]",p="[object RegExp]",m="[object Set]",g="[object String]",v="[object Symbol]",b="[object WeakMap]",y="[object ArrayBuffer]",x="[object DataView]",E=/^\[object .+?Constructor\]$/,w=/^(?:0|[1-9]\d*)$/,k={};k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k[o]=k[i]=k[y]=k[s]=k[x]=k[a]=k[l]=k[c]=k[u]=k[d]=k[h]=k[p]=k[m]=k[g]=k[b]=!1;var j="object"==typeof Kt&&Kt&&Kt.Object===Object&&Kt,C="object"==typeof self&&self&&self.Object===Object&&self,O=j||C||Function("return this")(),F=t&&!t.nodeType&&t,N=F&&e&&!e.nodeType&&e,B=N&&N.exports===F,S=B&&j.process,_=function(){try{return S&&S.binding&&S.binding("util")}catch(e){}}(),L=_&&_.isTypedArray;function I(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function H(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function P(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var T,A,M,$=Array.prototype,z=Function.prototype,W=Object.prototype,R=O["__core-js_shared__"],U=z.toString,q=W.hasOwnProperty,G=(T=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+T:"",D=W.toString,X=RegExp("^"+U.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=B?O.Buffer:void 0,K=O.Symbol,Y=O.Uint8Array,V=W.propertyIsEnumerable,J=$.splice,Q=K?K.toStringTag:void 0,ee=Object.getOwnPropertySymbols,te=Z?Z.isBuffer:void 0,ne=(A=Object.keys,M=Object,function(e){return A(M(e))}),re=_e(O,"DataView"),oe=_e(O,"Map"),ie=_e(O,"Promise"),se=_e(O,"Set"),ae=_e(O,"WeakMap"),le=_e(Object,"create"),ce=Pe(re),ue=Pe(oe),de=Pe(ie),he=Pe(se),fe=Pe(ae),pe=K?K.prototype:void 0,me=pe?pe.valueOf:void 0;function ge(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function be(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new be;++t<n;)this.add(e[t])}function xe(e){var t=this.__data__=new ve(e);this.size=t.size}function Ee(e,t){var n=Me(e),r=!n&&Ae(e),o=!n&&!r&&$e(e),i=!n&&!r&&!o&&qe(e),s=n||r||o||i,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=a.length;for(var c in e)!t&&!q.call(e,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||He(c,l))||a.push(c);return a}function we(e,t){for(var n=e.length;n--;)if(Te(e[n][0],t))return n;return-1}function ke(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Q&&Q in Object(e)?function(e){var t=q.call(e,Q),n=e[Q];try{e[Q]=void 0;var r=!0}catch(i){}var o=D.call(e);r&&(t?e[Q]=n:delete e[Q]);return o}(e):function(e){return D.call(e)}(e)}function je(e){return Ue(e)&&ke(e)==o}function Ce(e,t,n,r,c){return e===t||(null==e||null==t||!Ue(e)&&!Ue(t)?e!=e&&t!=t:function(e,t,n,r,c,f){var b=Me(e),E=Me(t),w=b?i:Ie(e),k=E?i:Ie(t),j=(w=w==o?h:w)==h,C=(k=k==o?h:k)==h,O=w==k;if(O&&$e(e)){if(!$e(t))return!1;b=!0,j=!1}if(O&&!j)return f||(f=new xe),b||qe(e)?Ne(e,t,n,r,c,f):function(e,t,n,r,o,i,c){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!i(new Y(e),new Y(t)));case s:case a:case d:return Te(+e,+t);case l:return e.name==t.name&&e.message==t.message;case p:case g:return e==t+"";case u:var h=H;case m:var f=1&r;if(h||(h=P),e.size!=t.size&&!f)return!1;var b=c.get(e);if(b)return b==t;r|=2,c.set(e,t);var E=Ne(h(e),h(t),r,o,i,c);return c.delete(e),E;case v:if(me)return me.call(e)==me.call(t)}return!1}(e,t,w,n,r,c,f);if(!(1&n)){var F=j&&q.call(e,"__wrapped__"),N=C&&q.call(t,"__wrapped__");if(F||N){var B=F?e.value():e,S=N?t.value():t;return f||(f=new xe),c(B,S,n,r,f)}}if(!O)return!1;return f||(f=new xe),function(e,t,n,r,o,i){var s=1&n,a=Be(e),l=a.length,c=Be(t).length;if(l!=c&&!s)return!1;var u=l;for(;u--;){var d=a[u];if(!(s?d in t:q.call(t,d)))return!1}var h=i.get(e);if(h&&i.get(t))return h==t;var f=!0;i.set(e,t),i.set(t,e);var p=s;for(;++u<l;){var m=e[d=a[u]],g=t[d];if(r)var v=s?r(g,m,d,t,e,i):r(m,g,d,e,t,i);if(!(void 0===v?m===g||o(m,g,n,r,i):v)){f=!1;break}p||(p="constructor"==d)}if(f&&!p){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return i.delete(e),i.delete(t),f}(e,t,n,r,c,f)}(e,t,n,r,Ce,c))}function Oe(e){return!(!Re(e)||function(e){return!!G&&G in e}(e))&&(ze(e)?X:E).test(Pe(e))}function Fe(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||W,t!==r)return ne(e);var t,n,r,o=[];for(var i in Object(e))q.call(e,i)&&"constructor"!=i&&o.push(i);return o}function Ne(e,t,n,r,o,i){var s=1&n,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var c=i.get(e);if(c&&i.get(t))return c==t;var u=-1,d=!0,h=2&n?new ye:void 0;for(i.set(e,t),i.set(t,e);++u<a;){var f=e[u],p=t[u];if(r)var m=s?r(p,f,u,t,e,i):r(f,p,u,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!I(t,(function(e,t){if(s=t,!h.has(s)&&(f===e||o(f,e,n,r,i)))return h.push(t);var s}))){d=!1;break}}else if(f!==p&&!o(f,p,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d}function Be(e){return function(e,t,n){var r=t(e);return Me(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ge,Le)}function Se(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function _e(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Oe(n)?n:void 0}ge.prototype.clear=function(){this.__data__=le?le(null):{},this.size=0},ge.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ge.prototype.get=function(e){var t=this.__data__;if(le){var r=t[e];return r===n?void 0:r}return q.call(t,e)?t[e]:void 0},ge.prototype.has=function(e){var t=this.__data__;return le?void 0!==t[e]:q.call(t,e)},ge.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=le&&void 0===t?n:t,this},ve.prototype.clear=function(){this.__data__=[],this.size=0},ve.prototype.delete=function(e){var t=this.__data__,n=we(t,e);return!(n<0)&&(n==t.length-1?t.pop():J.call(t,n,1),--this.size,!0)},ve.prototype.get=function(e){var t=this.__data__,n=we(t,e);return n<0?void 0:t[n][1]},ve.prototype.has=function(e){return we(this.__data__,e)>-1},ve.prototype.set=function(e,t){var n=this.__data__,r=we(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},be.prototype.clear=function(){this.size=0,this.__data__={hash:new ge,map:new(oe||ve),string:new ge}},be.prototype.delete=function(e){var t=Se(this,e).delete(e);return this.size-=t?1:0,t},be.prototype.get=function(e){return Se(this,e).get(e)},be.prototype.has=function(e){return Se(this,e).has(e)},be.prototype.set=function(e,t){var n=Se(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ye.prototype.add=ye.prototype.push=function(e){return this.__data__.set(e,n),this},ye.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.clear=function(){this.__data__=new ve,this.size=0},xe.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xe.prototype.get=function(e){return this.__data__.get(e)},xe.prototype.has=function(e){return this.__data__.has(e)},xe.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ve){var r=n.__data__;if(!oe||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new be(r)}return n.set(e,t),this.size=n.size,this};var Le=ee?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}(ee(e),(function(t){return V.call(e,t)})))}:function(){return[]},Ie=ke;function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||w.test(e))&&e>-1&&e%1==0&&e<t}function Pe(e){if(null!=e){try{return U.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Te(e,t){return e===t||e!=e&&t!=t}(re&&Ie(new re(new ArrayBuffer(1)))!=x||oe&&Ie(new oe)!=u||ie&&Ie(ie.resolve())!=f||se&&Ie(new se)!=m||ae&&Ie(new ae)!=b)&&(Ie=function(e){var t=ke(e),n=t==h?e.constructor:void 0,r=n?Pe(n):"";if(r)switch(r){case ce:return x;case ue:return u;case de:return f;case he:return m;case fe:return b}return t});var Ae=je(function(){return arguments}())?je:function(e){return Ue(e)&&q.call(e,"callee")&&!V.call(e,"callee")},Me=Array.isArray;var $e=te||function(){return!1};function ze(e){if(!Re(e))return!1;var t=ke(e);return t==c||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function We(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Re(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ue(e){return null!=e&&"object"==typeof e}var qe=L?function(e){return function(t){return e(t)}}(L):function(e){return Ue(e)&&We(e.length)&&!!k[ke(e)]};function Ge(e){return null!=(t=e)&&We(t.length)&&!ze(t)?Ee(e):Fe(e);var t}e.exports=function(e,t){return Ce(e,t)}}(Qt,Qt.exports);var en=Qt.exports,tn=()=>Math.floor(1e6*Math.random()+1e6*Math.random());function nn(e={},t={},n="/index.js"){return JSON.stringify({name:"sandpack-project",main:n,dependencies:e,devDependencies:t},null,2)}function rn(e){if("SyntaxError"===e.title){const{title:t,path:n,message:r,line:o,column:i}=e;return{title:t,path:n,message:r,line:o,column:i}}const t=function(e){if(!e)return;return e.find((e=>!!e._originalFileName))}(e.payload.frames);if(!t)return{message:e.message};const n=function(e){const t=e._originalScriptCode[e._originalScriptCode.length-1].lineNumber.toString().length,n=2+t+3+e._originalColumnNumber;return e._originalScriptCode.reduce(((e,r)=>{const o=r.highlight?">":" ",i=r.lineNumber.toString().length===t?`${r.lineNumber}`:` ${r.lineNumber}`,s=r.highlight?"\n"+" ".repeat(n)+"^":"";return e+"\n"+o+" "+i+" | "+r.content+s}),"")}(t),r=(o=t)?` (${o._originalLineNumber}:${o._originalColumnNumber})`:"";var o;const i=function(e,t,n,r){return`${e}: ${t}${n}\n${r}`}(t._originalFileName,e.message,r,n);return{message:i,title:e.title,path:t._originalFileName,line:t._originalLineNumber,column:t._originalColumnNumber}}var on,sn,an=`https://${"0.19.0".replace(/\./g,"-")}-sandpack.codesandbox.io/`;function ln(e){var{className:t,files:n,presetConfig:o,show:s,children:a,codeConfig:l,style:c,frameless:u}=e,d=i(e,["className","files","presetConfig","show","children","codeConfig","style","frameless"]);const h=o?r.createElement(cn,{files:n,presetConfig:o}):a;return r.createElement("div",{className:"ch-preview"+(t?" "+t:""),style:c},u?h:r.createElement(Zt,Object.assign({loadUrl:s,theme:l.theme},d,{children:h})))}function cn({files:e,presetConfig:t}){const n=r.useRef(null),o=r.useRef(null);return r.useEffect((()=>{o.current=new class{constructor(e,t,n={}){var r;if(this.getTranspilerContext=()=>new Promise((e=>{const t=this.listen((n=>{"transpiler-context"===n.type&&(e(n.data),t())}));this.dispatch({type:"get-transpiler-context"})})),this.options=n,this.sandboxInfo=t,this.bundlerURL=n.bundlerURL||an,this.bundlerState=void 0,this.errors=[],this.status="initializing","string"==typeof e){this.selector=e;const t=document.querySelector(e);if(!t)throw new Error(`No element found for selector '${e}'`);this.element=t,this.iframe=document.createElement("iframe"),this.initializeElement()}else this.element=e,this.iframe=e;this.iframe.getAttribute("sandbox")||this.iframe.setAttribute("sandbox","allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts");const o=n.startRoute?new URL(n.startRoute,this.bundlerURL).toString():this.bundlerURL;null==(r=this.iframe.contentWindow)||r.location.replace(o),this.iframeProtocol=new class{constructor(e,t){this.globalListeners={},this.globalListenersCount=0,this.channelListeners={},this.channelListenersCount=0,this.channelId=Math.floor(1e6*Math.random()),this.frameWindow=e.contentWindow,this.origin=t,this.globalListeners=[],this.channelListeners=[],this.eventListener=this.eventListener.bind(this),"undefined"!=typeof window&&window.addEventListener("message",this.eventListener)}cleanup(){window.removeEventListener("message",this.eventListener),this.globalListeners={},this.channelListeners={},this.globalListenersCount=0,this.channelListenersCount=0}register(){this.frameWindow&&this.frameWindow.postMessage({type:"register-frame",origin:document.location.origin,id:this.channelId},this.origin)}dispatch(e){this.frameWindow&&this.frameWindow.postMessage({$id:this.channelId,codesandbox:!0,...e},this.origin)}globalListen(e){if("function"!=typeof e)return()=>{};const t=this.globalListenersCount;return this.globalListeners[t]=e,this.globalListenersCount++,()=>{delete this.globalListeners[t]}}channelListen(e){if("function"!=typeof e)return()=>{};const t=this.channelListenersCount;return this.channelListeners[t]=e,this.channelListenersCount++,()=>{delete this.channelListeners[t]}}eventListener(e){if(e.source!==this.frameWindow)return;const t=e.data;t.codesandbox&&(Object.values(this.globalListeners).forEach((e=>e(t))),t.$id===this.channelId&&Object.values(this.channelListeners).forEach((e=>e(t))))}}(this.iframe,this.bundlerURL),this.unsubscribeGlobalListener=this.iframeProtocol.globalListen((e=>{"initialized"===e.type&&this.iframe.contentWindow&&(this.iframeProtocol.register(),this.options.fileResolver&&(this.fileResolverProtocol=new class{constructor(e,t,n){this.type=e,this.handleMessage=t,this.target=n,this.outgoingMessages=new Set,this._messageListener=async e=>{var t;const{data:n}=e;if(n.$type!==this.getTypeId())return;if(this.outgoingMessages.has(n.$id))return;let r={$originId:this.internalId,$type:this.getTypeId(),$id:n.$id};try{const e=await this.handleMessage(n.$data);r.$data=e}catch(o){o.message||console.error(o),r.$error={message:null!=(t=o.message)?t:"Unknown error"}}e.source?e.source.postMessage(r,"*"):this._postMessage(r)},this.createConnection(),this.internalId=tn(),this.isWorker="Worker"===(e=>{try{return e.constructor.name}catch(t){return""}})(n)}getTypeId(){return`p-${this.type}`}createConnection(){self.addEventListener("message",this._messageListener)}dispose(){self.removeEventListener("message",this._messageListener)}sendMessage(e){return new Promise((t=>{const n=tn(),r={$originId:this.internalId,$type:this.getTypeId(),$data:e,$id:n};this.outgoingMessages.add(n);const o=e=>{const{data:r}=e;r.$type===this.getTypeId()&&r.$id===n&&r.$originId!==this.internalId&&(t(r.$data),self.removeEventListener("message",o))};self.addEventListener("message",o),this._postMessage(r)}))}_postMessage(e){this.isWorker||"undefined"!=typeof DedicatedWorkerGlobalScope&&this.target instanceof DedicatedWorkerGlobalScope?this.target.postMessage(e):this.target.postMessage(e,"*")}}("file-resolver",(async e=>"isFile"===e.m?this.options.fileResolver.isFile(e.p):this.options.fileResolver.readFile(e.p)),this.iframe.contentWindow)),this.updatePreview(this.sandboxInfo,!0))})),this.unsubscribeChannelListener=this.iframeProtocol.channelListen((e=>{switch(e.type){case"start":this.errors=[];break;case"status":this.status=e.status;break;case"action":"show-error"===e.action&&(this.errors=[...this.errors,rn(e)]);break;case"state":this.bundlerState=e.state}}))}cleanup(){this.unsubscribeChannelListener(),this.unsubscribeGlobalListener(),this.iframeProtocol.cleanup()}updateOptions(e){en(this.options,e)||(this.options=e,this.updatePreview())}updatePreview(e=this.sandboxInfo,t){var n,r,o,i;this.sandboxInfo={...this.sandboxInfo,...e};const s=this.getFiles(),a=Object.keys(s).reduce(((e,t)=>({...e,[t]:{code:s[t].code,path:t}})),{});let l=JSON.parse(nn(this.sandboxInfo.dependencies,this.sandboxInfo.devDependencies,this.sandboxInfo.entry));try{l=JSON.parse(s["/package.json"].code)}catch(u){console.error("Could not parse package.json file: "+u.message)}const c=Object.keys(s).reduce(((e,t)=>({...e,[t]:{content:s[t].code,path:t}})),{});this.dispatch({type:"compile",codesandbox:!0,version:3,isInitializationCompile:t,modules:a,reactDevTools:this.options.reactDevTools,externalResources:this.options.externalResources||[],hasFileResolver:Boolean(this.options.fileResolver),disableDependencyPreprocessing:this.sandboxInfo.disableDependencyPreprocessing,template:this.sandboxInfo.template||Jt(l,c),showOpenInCodeSandbox:null==(n=this.options.showOpenInCodeSandbox)||n,showErrorScreen:null==(r=this.options.showErrorScreen)||r,showLoadingScreen:null==(o=this.options.showLoadingScreen)||o,skipEval:this.options.skipEval||!1,clearConsoleDisabled:!this.options.clearConsoleOnFirstCompile,logLevel:null!=(i=this.options.logLevel)?i:on.Info})}dispatch(e){this.iframeProtocol.dispatch(e)}listen(e){return this.iframeProtocol.channelListen(e)}getCodeSandboxURL(){const e=this.getFiles(),t=Object.keys(e).reduce(((t,n)=>({...t,[n.replace("/","")]:{content:e[n].code,isBinary:!1}})),{});return fetch("https://codesandbox.io/api/v1/sandboxes/define?json=1",{method:"POST",body:JSON.stringify({files:t}),headers:{Accept:"application/json","Content-Type":"application/json"}}).then((e=>e.json())).then((e=>({sandboxId:e.sandbox_id,editorUrl:`https://codesandbox.io/s/${e.sandbox_id}`,embedUrl:`https://codesandbox.io/embed/${e.sandbox_id}`})))}getFiles(){const{sandboxInfo:e}=this;return void 0===e.files["/package.json"]?function(e,t,n,r){const o={...e};if(!o["/package.json"]){if(!t)throw new Error("No dependencies specified, please specify either a package.json or dependencies.");if(!r)throw new Error("Missing 'entry' parameter. Either specify an entry point, or pass in a package.json with the 'main' field set.");o["/package.json"]={code:nn(t,n,r)}}return o}(e.files,e.dependencies,e.devDependencies,e.entry):this.sandboxInfo.files}initializeElement(){if(this.iframe.style.border="0",this.iframe.style.width=this.options.width||"100%",this.iframe.style.height=this.options.height||"100%",this.iframe.style.overflow="hidden",!this.element.parentNode)throw new Error("Given element does not have a parent.");this.element.parentNode.replaceChild(this.iframe,this.element)}}(n.current,Object.assign(Object.assign({},t),{files:un(t.files,e)}),{showOpenInCodeSandbox:!1})}),[]),r.useEffect((()=>{o.current&&o.current.updatePreview(Object.assign(Object.assign({},t),{files:un(t.files,e)}))}),[e]),r.createElement("iframe",{ref:n})}function un(e,t){const n=Object.assign({},e);return t.forEach((e=>{n["/"+e.name]={code:e.code.lines.map((e=>e.tokens.map((e=>e.content)).join(""))).join("\n")}})),n}function dn(e,t){const n=r.Children.toArray(e);return{stepsChildren:t?n.slice(0,n.length/2):n,previewChildren:t?n.slice(n.length/2):void 0}}function hn(e){var t,{children:n,editorSteps:o,codeConfig:s,start:a=0,presetConfig:l,className:c,style:u,hasPreviewSteps:d}=e,h=i(e,["children","editorSteps","codeConfig","start","presetConfig","className","style","hasPreviewSteps"]);const{stepsChildren:f,previewChildren:p}=dn(n,d),m=l||d,[g,v]=r.useState({stepIndex:a,step:o[a]}),b=g.step;const y=f[0];return r.createElement("section",{className:`ch-spotlight ${m?"ch-spotlight-with-preview":""} ${c||""}`,style:u},r.createElement("div",{className:"ch-spotlight-tabs"},(null===(t=null==y?void 0:y.props)||void 0===t?void 0:t.children)?r.createElement("div",null,f[0]):null,f.map(((e,t)=>0===t?null:r.createElement("div",{key:t,onClick:()=>v({stepIndex:t,step:o[t]}),className:"ch-spotlight-tab","data-selected":t===g.stepIndex?"true":void 0},e)))),r.createElement("div",{className:"ch-spotlight-sticker"},r.createElement($t,Object.assign({},h,b,{codeConfig:s,onTabClick:function(e){const t=zt(g.step,e,null);v(Object.assign(Object.assign({},g),{step:t}))}})),l?r.createElement(ln,{className:"ch-spotlight-preview",files:b.files,presetConfig:l,codeConfig:s}):d?r.createElement(ln,Object.assign({className:"ch-spotlight-preview"},p[g.stepIndex].props)):null))}(sn=on||(on={}))[sn.None=0]="None",sn[sn.Error=10]="Error",sn[sn.Warning=20]="Warning",sn[sn.Info=30]="Info",sn[sn.Debug=40]="Debug";"undefined"!=typeof window?r.useLayoutEffect:r.useEffect;r.createContext(void 0),"undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function fn(){const e=r.useContext(mn);return e?r.createElement(pn,Object.assign({},e)):null}function pn({editorStep:e,setFocus:t}){const n=i(e,["preset","presetConfig"]);return r.createElement($t,Object.assign({},n,{onTabClick:e=>{t({fileName:e,focus:null,id:""})}}))}const mn=r.createContext(null);const gn={box:function({children:e,data:t,theme:n}){var o,i;const s="string"==typeof t?t:(null===(i=null===(o=n.tokenColors.find((e=>{var t;return null===(t=e.scope)||void 0===t?void 0:t.includes("string")})))||void 0===o?void 0:o.settings)||void 0===i?void 0:i.foreground)||"yellow";return r.createElement("span",{className:"ch-code-box-annotation",style:{outline:`2px solid ${s}`}},e)},bg:vn,label:function({children:e,data:t,style:n,theme:o}){const i=o.colors["editor.lineHighlightBackground"]||o.colors["editor.selectionHighlightBackground"],[s,a]=r.useState(!1);return r.createElement("div",{style:Object.assign(Object.assign({},n),{background:s?i:void 0}),onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1)},e,r.createElement("div",{style:{position:"absolute",right:0,paddingRight:16,display:s?"block":"none",opacity:.7}},(null==t?void 0:t.children)||t))},link:function({children:e,isInline:t,style:n,data:o}){const i=(null==o?void 0:o.url)||o,s=null==o?void 0:o.title;return r.createElement("a",{href:i,title:s,className:t?"ch-code-inline-link":"ch-code-link",style:n},e)},mark:function(e){return e.isInline?r.createElement(bn,Object.assign({},e)):r.createElement(vn,Object.assign({},e))},withClass:function({children:e,data:t,style:n,theme:o}){const i=t;return r.createElement("span",{style:n,className:i},e)}};function vn({children:e,data:t,style:n,theme:o}){const i="ch-code-multiline-mark "+(null!=t?t:""),s=F(o,C.RangeHighlightBackground),a=F(o,C.EditorInfoForeground);return r.createElement("div",{style:Object.assign(Object.assign({},n),{background:s}),className:i},r.createElement("span",{className:"ch-code-multiline-mark-border",style:{background:a}}),e)}function bn({children:e,data:t,theme:n}){const o=function(e){var t,n,o;const i=r.Children.toArray(e)[0],s=r.Children.toArray((null===(t=null==i?void 0:i.props)||void 0===t?void 0:t.children)||[])[0],a=r.Children.toArray((null===(n=null==s?void 0:s.props)||void 0===n?void 0:n.children)||[])[0],{color:l}=(null===(o=null==a?void 0:a.props)||void 0===o?void 0:o.style)||{};if(l)return c(l,.2);return}(e)||c(F(n,C.CodeForeground),.2),i="ch-code-inline-mark "+(null!=t?t:"");return r.createElement("span",{className:i,style:{background:o}},e)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_modern_js_module_tools_docs=self.webpackChunk_modern_js_module_tools_docs||[]).push([[8652],{11533:function(t){!function(e,i,s){let n;(n=s.define)&&n.amd?n([],(function(){return i})):(n=s.modules)?n["FlexSearch".toLowerCase()]=i:t.exports=i}(0,function t(e){function i(t,e){const i=e?e.id:t&&t.id;this.id=i||0===i?i:P++,this.init(t,e),o(this,"index",(function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].c):Object.keys(this.c)})),o(this,"length",(function(){return this.index.length}))}function s(t,e,i,s){return this.u!==this.g&&(this.o=this.o.concat(i),this.u++,s&&this.o.length>=s&&(this.u=this.g),this.u===this.g&&(this.cache&&this.j.set(e,this.o),this.F&&this.F(this.o))),this}function n(t){const e=D();for(const i in t)if(t.hasOwnProperty(i)){const s=t[i];w(s)?e[i]=s.slice(0):k(s)?e[i]=n(s):e[i]=s}return e}function r(t,e){const i=t.length,s=b(e),n=[];for(let r=0,h=0;r<i;r++){const i=t[r];(s&&e(i)||!s&&!e[i])&&(n[h++]=i)}return n}function h(t,e,i,s,n,r,h,o,l,c){let u;if(i=y(i,h?0:n,o,r,e,l,c),o&&(o=i.page,u=i.next,i=i.result),h)e=this.where(h,null,n,i);else{for(e=i,i=this.l,n=e.length,r=Array(n),h=0;h<n;h++)r[h]=i[e[h]];e=r}return i=e,s&&(b(s)||(S=s.split(":"),1<S.length?s=g:(S=S[0],s=p)),i.sort(s)),i=v(o,u,i),this.cache&&this.j.set(t,i),i}function o(t,e,i){Object.defineProperty(t,e,{get:i})}function l(t){return new RegExp(t,"g")}function c(t,e){for(let i=0;i<e.length;i+=2)t=t.replace(e[i],e[i+1]);return t}function u(t,e,i,s,n,r,h,o){return e[i]?e[i]:(n=n?(o-(h||o/1.5))*r+(h||o/1.5)*n:r,e[i]=n,n>=h&&((t=(t=t[o-(n+.5>>0)])[i]||(t[i]=[]))[t.length]=s),n)}function a(t,e){if(t){const i=Object.keys(t);for(let s=0,n=i.length;s<n;s++){const n=i[s],r=t[n];if(r)for(let i=0,s=r.length;i<s;i++){if(r[i]===e){1===s?delete t[n]:r.splice(i,1);break}k(r[i])&&a(r[i],e)}}}}function f(t){let e="",i="";var s="";for(let n=0;n<t.length;n++){const r=t[n];r!==i&&(n&&"h"===r?(s="a"===s||"e"===s||"i"===s||"o"===s||"u"===s||"y"===s,(("a"===i||"e"===i||"i"===i||"o"===i||"u"===i||"y"===i)&&s||" "===i)&&(e+=r)):e+=r),s=n===t.length-1?"":t[n+1],i=r}return e}function d(t,e){return 0>(t=t.length-e.length)?1:t?-1:0}function p(t,e){return(t=t[S])<(e=e[S])?-1:t>e?1:0}function g(t,e){const i=S.length;for(let s=0;s<i;s++)t=t[S[s]],e=e[S[s]];return t<e?-1:t>e?1:0}function v(t,e,i){return t?{page:t,next:e?""+e:null,result:i}:i}function y(t,e,i,s,n,r,h){let o,l=[];if(!0===i){i="0";var c=""}else c=i&&i.split(":");const u=t.length;if(1<u){const w=D(),b=[];let k,x;var a,f=0;let Z;var d=!0;let j,O,A,C,P,W,M=0;if(c&&(2===c.length?(C=c,c=!1):c=P=parseInt(c[0],10)),h){for(k=D();f<u;f++)if("not"===n[f])for(x=t[f],Z=x.length,a=0;a<Z;a++)k["@"+x[a]]=1;else A=f+1;if(F(A))return v(i,o,l);f=0}else O=m(n)&&n;for(;f<u;f++){const m=f===(A||u)-1;if(!O||!f)if((a=O||n&&n[f])&&"and"!==a){if("or"!==a)continue;W=!1}else W=r=!0;if(x=t[f],Z=x.length){if(d){if(!j){j=x;continue}var p=j.length;for(a=0;a<p;a++){var g="@"+(d=j[a]);h&&k[g]||(w[g]=1,r||(l[M++]=d))}j=null,d=!1}for(g=!1,a=0;a<Z;a++){var y="@"+(p=x[a]);const t=r?w[y]||0:f;if(!(!t&&!s||h&&k[y]||!r&&w[y]))if(t===f){if(m){if((!P||--P<M)&&(l[M++]=p,e&&M===e))return v(i,M+(c||0),l)}else w[y]=f+1;g=!0}else s&&((y=b[t]||(b[t]=[]))[y.length]=p)}if(W&&!g&&!s)break}else if(W&&!s)return v(i,o,x)}if(j)if(f=j.length,h)for(a=c?parseInt(c,10):0;a<f;a++)k["@"+(t=j[a])]||(l[M++]=t);else l=j;if(s)for(M=l.length,C?(f=parseInt(C[0],10)+1,a=parseInt(C[1],10)+1):(f=b.length,a=0);f--;)if(p=b[f]){for(Z=p.length;a<Z;a++)if(s=p[a],(!h||!k["@"+s])&&(l[M++]=s,e&&M===e))return v(i,f+":"+a,l);a=0}}else!u||n&&"not"===n[0]||(l=t[0],c&&(c=parseInt(c[0],10)));return e&&(h=l.length,c&&c>h&&(c=0),o=(c=c||0)+e,o<h?l=l.slice(c,o):(o=0,c&&(l=l.slice(c)))),v(i,o,l)}function m(t){return"string"==typeof t}function w(t){return t.constructor===Array}function b(t){return"function"==typeof t}function k(t){return"object"==typeof t}function F(t){return void 0===t}function x(t){const e=Array(t);for(let i=0;i<t;i++)e[i]=D();return e}function D(){return Object.create(null)}function Z(){let t,e;self.onmessage=function(i){if(i=i.data)if(i.search){const s=e.search(i.content,i.threshold?{limit:i.limit,threshold:i.threshold,where:i.where}:i.limit);self.postMessage({id:t,content:i.content,limit:i.limit,result:s})}else i.add?e.add(i.id,i.content):i.update?e.update(i.id,i.content):i.remove?e.remove(i.id):i.clear?e.clear():i.info?((i=e.info()).worker=t,console.log(i)):i.register&&(t=i.id,i.options.cache=!1,i.options.async=!1,i.options.worker=!1,e=new Function(i.register.substring(i.register.indexOf("{")+1,i.register.lastIndexOf("}")))(),e=new e(i.options))}}function j(i,s,n,r){i=e("flexsearch","id"+i,Z,(function(t){(t=t.data)&&t.result&&r(t.id,t.content,t.result,t.limit,t.where,t.cursor,t.suggest)}),s);const h=t.toString();return n.id=s,i.postMessage({register:h,options:n,id:s}),i}const O={encode:"icase",f:"forward",split:/\W+/,cache:!1,async:!1,g:!1,D:!1,a:!1,b:9,threshold:0,depth:0},A={memory:{encode:"extra",f:"strict",threshold:0,b:1},speed:{encode:"icase",f:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",f:"full",threshold:1,b:3},score:{encode:"extra",f:"strict",threshold:1,b:9,depth:4},balance:{encode:"balance",f:"strict",threshold:0,b:3,depth:3},fast:{encode:"icase",f:"strict",threshold:8,b:9,depth:1}},C=[];let P=0;const W={},M={};let S;i.create=function(t,e){return new i(t,e)},i.registerMatcher=function(t){for(const e in t)t.hasOwnProperty(e)&&C.push(l(e),t[e]);return this},i.registerEncoder=function(t,e){return I[t]=e.bind(I),this},i.registerLanguage=function(t,e){return W[t]=e.filter,M[t]=e.stemmer,this},i.encode=function(t,e){return I[t](e)},i.prototype.init=function(t,e){if(this.v=[],e){var r=e.preset;t=e}else t||(t=O),r=t.preset;if(e={},m(t)?(e=A[t],t={}):r&&(e=A[r]),r=t.worker)if("undefined"==typeof Worker)t.worker=!1,this.m=null;else{var h=parseInt(r,10)||4;this.C=-1,this.u=0,this.o=[],this.F=null,this.m=Array(h);for(var o=0;o<h;o++)this.m[o]=j(this.id,o,t,s.bind(this))}if(this.f=t.tokenize||e.f||this.f||O.f,this.split=F(r=t.split)?this.split||O.split:m(r)?l(r):r,this.D=t.rtl||this.D||O.D,this.async="undefined"==typeof Promise||F(r=t.async)?this.async||O.async:r,this.g=F(r=t.worker)?this.g||O.g:r,this.threshold=F(r=t.threshold)?e.threshold||this.threshold||O.threshold:r,this.b=F(r=t.resolution)?r=e.b||this.b||O.b:r,r<=this.threshold&&(this.b=this.threshold+1),this.depth="strict"!==this.f||F(r=t.depth)?e.depth||this.depth||O.depth:r,this.w=(r=F(r=t.encode)?e.encode||O.encode:r)&&I[r]&&I[r].bind(I)||(b(r)?r:this.w||!1),(r=t.matcher)&&this.addMatcher(r),r=(e=t.lang)||t.filter){if(m(r)&&(r=W[r]),w(r)){h=this.w,o=D();for(var c=0;c<r.length;c++){var u=h?h(r[c]):r[c];o[u]=1}r=o}this.filter=r}if(r=e||t.stemmer){var a;for(a in e=m(r)?M[r]:r,h=this.w,o=[],e)e.hasOwnProperty(a)&&(c=h?h(a):a,o.push(l(c+"($|\\W)"),h?h(e[a]):e[a]));this.stemmer=a=o}if(this.a=o=(r=t.doc)?n(r):this.a||O.a,this.i=x(this.b-(this.threshold||0)),this.h=D(),this.c=D(),o){if(this.l=D(),t.doc=null,a=o.index={},e=o.keys=[],h=o.field,c=o.tag,u=o.store,w(o.id)||(o.id=o.id.split(":")),u){var f=D();if(m(u))f[u]=1;else if(w(u))for(let t=0;t<u.length;t++)f[u[t]]=1;else k(u)&&(f=u);o.store=f}if(c){if(this.G=D(),u=D(),h)if(m(h))u[h]=t;else if(w(h))for(f=0;f<h.length;f++)u[h[f]]=t;else k(h)&&(u=h);for(w(c)||(o.tag=c=[c]),h=0;h<c.length;h++)this.G[c[h]]=D();this.I=c,h=u}if(h){let s;for(w(h)||(k(h)?(s=h,o.field=h=Object.keys(h)):o.field=h=[h]),o=0;o<h.length;o++)w(c=h[o])||(s&&(t=s[c]),e[o]=c,h[o]=c.split(":")),a[c]=new i(t)}t.doc=r}return this.B=!0,this.j=!!(this.cache=r=F(r=t.cache)?this.cache||O.cache:r)&&new _(r),this},i.prototype.encode=function(t){return t&&(C.length&&(t=c(t,C)),this.v.length&&(t=c(t,this.v)),this.w&&(t=this.w(t)),this.stemmer&&(t=c(t,this.stemmer))),t},i.prototype.addMatcher=function(t){const e=this.v;for(const i in t)t.hasOwnProperty(i)&&e.push(l(i),t[i]);return this},i.prototype.add=function(t,e,i,s,n){if(this.a&&k(t))return this.A("add",t,e);if(e&&m(e)&&(t||0===t)){var h="@"+t;if(this.c[h]&&!s)return this.update(t,e);if(this.g)return++this.C>=this.m.length&&(this.C=0),this.m[this.C].postMessage({add:!0,id:t,content:e}),this.c[h]=""+this.C,i&&i(),this;if(!n){if(this.async&&"function"!=typeof importScripts){let n=this;return h=new Promise((function(i){setTimeout((function(){n.add(t,e,null,s,!0),n=null,i()}))})),i?(h.then(i),this):h}if(i)return this.add(t,e,null,s,!0),i(),this}if(!(e=this.encode(e)).length)return this;n=b(i=this.f)?i(e):e.split(this.split),this.filter&&(n=r(n,this.filter));const d=D();d._ctx=D();const p=n.length,g=this.threshold,v=this.depth,y=this.b,m=this.i,w=this.D;for(let e=0;e<p;e++){var o=n[e];if(o){var l=o.length,c=(w?e+1:p-e)/p,a="";switch(i){case"reverse":case"both":for(var f=l;--f;)u(m,d,a=o[f]+a,t,w?1:(l-f)/l,c,g,y-1);a="";case"forward":for(f=0;f<l;f++)u(m,d,a+=o[f],t,w?(f+1)/l:1,c,g,y-1);break;case"full":for(f=0;f<l;f++){const e=(w?f+1:l-f)/l;for(let i=l;i>f;i--)u(m,d,a=o.substring(f,i),t,e,c,g,y-1)}break;default:if(l=u(m,d,o,t,1,c,g,y-1),v&&1<p&&l>=g)for(l=d._ctx[o]||(d._ctx[o]=D()),o=this.h[o]||(this.h[o]=x(y-(g||0))),0>(c=e-v)&&(c=0),(a=e+v+1)>p&&(a=p);c<a;c++)c!==e&&u(o,l,n[c],t,0,y-(c<e?e-c:c-e),g,y-1)}}}this.c[h]=1,this.B=!1}return this},i.prototype.A=function(t,e,i){if(w(e)){var s=e.length;if(s--){for(var n=0;n<s;n++)this.A(t,e[n]);return this.A(t,e[s],i)}}else{var r,h=this.a.index,o=this.a.keys,l=this.a.tag;n=this.a.store;var c=this.a.id;s=e;for(var u=0;u<c.length;u++)s=s[c[u]];if("remove"===t&&(delete this.l[s],c=o.length,c--)){for(e=0;e<c;e++)h[o[e]].remove(s);return h[o[c]].remove(s,i)}if(l){for(r=0;r<l.length;r++){var a=l[r],f=e;for(c=a.split(":"),u=0;u<c.length;u++)f=f[c[u]];f="@"+f}r=(r=this.G[a])[f]||(r[f]=[])}for(let n=0,r=(c=this.a.field).length;n<r;n++){for(a=c[n],l=e,f=0;f<a.length;f++)l=l[a[f]];a=h[o[n]],f="add"===t?a.add:a.update,n===r-1?f.call(a,s,l,i):f.call(a,s,l)}if(n){for(i=Object.keys(n),t=D(),h=0;h<i.length;h++)if(n[o=i[h]]){let i,s;for(o=o.split(":"),c=0;c<o.length;c++)i=(i||e)[l=o[c]],s=(s||t)[l]=i}e=t}r&&(r[r.length]=e),this.l[s]=e}return this},i.prototype.update=function(t,e,i){return this.a&&k(t)?this.A("update",t,e):(this.c["@"+t]&&m(e)&&(this.remove(t),this.add(t,e,i,!0)),this)},i.prototype.remove=function(t,e,i){if(this.a&&k(t))return this.A("remove",t,e);var s="@"+t;if(this.c[s]){if(this.g)return this.m[this.c[s]].postMessage({remove:!0,id:t}),delete this.c[s],e&&e(),this;if(!i){if(this.async&&"function"!=typeof importScripts){let i=this;return s=new Promise((function(e){setTimeout((function(){i.remove(t,null,!0),i=null,e()}))})),e?(s.then(e),this):s}if(e)return this.remove(t,null,!0),e(),this}for(e=0;e<this.b-(this.threshold||0);e++)a(this.i[e],t);this.depth&&a(this.h,t),delete this.c[s],this.B=!1}return this},i.prototype.search=function(t,e,i,s){if(k(e)){if(w(e))for(var n=0;n<e.length;n++)e[n].query=t;else e.query=t;t=e,e=1e3}else e&&b(e)?(i=e,e=1e3):e||0===e||(e=1e3);if(!this.g){var o=[],l=t;if(k(t)&&!w(t)){i||(i=t.callback)&&(l.callback=null);var c=t.sort,u=t.page;e=t.limit,Z=t.threshold;var a=t.suggest;t=t.query}if(this.a){Z=this.a.index;const r=l.where;var f=l.bool||"or",p=l.field;let d,y,b=f;if(p)w(p)||(p=[p]);else if(w(l)){var g=l;p=[],b=[];for(var v=0;v<l.length;v++)n=(s=l[v]).bool||f,p[v]=s.field,b[v]=n,"not"===n?d=!0:"and"===n&&(y=!0)}else p=this.a.keys;for(f=p.length,v=0;v<f;v++)g&&(l=g[v]),u&&!m(l)&&(l.page=null,l.limit=0),o[v]=Z[p[v]].search(l,0);if(i)return i(h.call(this,t,b,o,c,e,a,r,u,y,d));if(this.async){const i=this;return new Promise((function(s){Promise.all(o).then((function(n){s(h.call(i,t,b,n,c,e,a,r,u,y,d))}))}))}return h.call(this,t,b,o,c,e,a,r,u,y,d)}if(Z||(Z=this.threshold||0),!s){if(this.async&&"function"!=typeof importScripts){let t=this;return Z=new Promise((function(i){setTimeout((function(){i(t.search(l,e,null,!0)),t=null}))})),i?(Z.then(i),this):Z}if(i)return i(this.search(l,e,null,!0)),this}if(!t||!m(t))return o;if(l=t,this.cache)if(this.B){if(i=this.j.get(t))return i}else this.j.clear(),this.B=!0;if(!(l=this.encode(l)).length)return o;i=b(i=this.f)?i(l):l.split(this.split),this.filter&&(i=r(i,this.filter)),g=i.length,s=!0,n=[];var F=D(),x=0;if(1<g&&(this.depth&&"strict"===this.f?f=!0:i.sort(d)),!f||(v=this.h)){const t=this.b;for(;x<g;x++){let e=i[x];if(e){if(f){if(!p)if(v[e])p=e,F[e]=1;else if(!a)return o;if(a&&x===g-1&&!n.length)f=!1,e=p||e,F[e]=0;else if(!p)continue}if(!F[e]){const i=[];let r=!1,h=0;const o=f?v[p]:this.i;if(o){let s;for(let n=0;n<t-Z;n++)(s=o[n]&&o[n][e])&&(i[h++]=s,r=!0)}if(r)p=e,n[n.length]=1<h?i.concat.apply([],i):i[0];else if(!a){s=!1;break}F[e]=1}}}}else s=!1;return s&&(o=y(n,e,u,a)),this.cache&&this.j.set(t,o),o}this.F=i,this.u=0,this.o=[];for(var Z=0;Z<this.g;Z++)this.m[Z].postMessage({search:!0,limit:e,content:t})},i.prototype.find=function(t,e){return this.where(t,e,1)[0]||null},i.prototype.where=function(t,e,i,s){const n=this.l,r=[];let h,o=0;var l;let c;if(k(t)){i||(i=e);var u=Object.keys(t),a=u.length;if(h=!1,1===a&&"id"===u[0])return[n[t.id]];if((l=this.I)&&!s)for(var f=0;f<l.length;f++){var d=l[f],p=t[d];if(!F(p)){if(c=this.G[d]["@"+p],0==--a)return c;u.splice(u.indexOf(d),1),delete t[d];break}}for(l=Array(a),f=0;f<a;f++)l[f]=u[f].split(":")}else{if(b(t)){for(i=(e=s||Object.keys(n)).length,u=0;u<i;u++)t(a=n[e[u]])&&(r[o++]=a);return r}if(F(e))return[n[t]];if("id"===t)return[n[e]];u=[t],a=1,l=[t.split(":")],h=!0}for(f=(s=c||s||Object.keys(n)).length,d=0;d<f;d++){p=c?s[d]:n[s[d]];let f=!0;for(let i=0;i<a;i++){h||(e=t[u[i]]);const s=l[i],n=s.length;let r=p;if(1<n)for(let t=0;t<n;t++)r=r[s[t]];else r=r[s[0]];if(r!==e){f=!1;break}}if(f&&(r[o++]=p,i&&o===i))break}return r},i.prototype.info=function(){if(!this.g)return{id:this.id,items:this.length,cache:!(!this.cache||!this.cache.s)&&this.cache.s.length,matcher:C.length+(this.v?this.v.length:0),worker:this.g,threshold:this.threshold,depth:this.depth,resolution:this.b,contextual:this.depth&&"strict"===this.f};for(let t=0;t<this.g;t++)this.m[t].postMessage({info:!0,id:this.id})},i.prototype.clear=function(){return this.destroy().init()},i.prototype.destroy=function(){if(this.cache&&(this.j.clear(),this.j=null),this.i=this.h=this.c=null,this.a){const t=this.a.keys;for(let e=0;e<t.length;e++)this.a.index[t[e]].destroy();this.a=this.l=null}return this},i.prototype.export=function(t){const e=!t||F(t.serialize)||t.serialize;if(this.a){const e=!t||F(t.doc)||t.doc;var i=!t||F(t.index)||t.index;t=[];let s=0;if(i)for(i=this.a.keys;s<i.length;s++){const e=this.a.index[i[s]];t[s]=[e.i,e.h,Object.keys(e.c)]}e&&(t[s]=this.l)}else t=[this.i,this.h,Object.keys(this.c)];return e&&(t=JSON.stringify(t)),t},i.prototype.import=function(t,e){(!e||F(e.serialize)||e.serialize)&&(t=JSON.parse(t));const i=D();if(this.a){var s=!e||F(e.doc)||e.doc,n=0;if(!e||F(e.index)||e.index){const s=(e=this.a.keys).length;for(var r=t[0][2];n<r.length;n++)i[r[n]]=1;for(n=0;n<s;n++){r=this.a.index[e[n]];const s=t[n];s&&(r.i=s[0],r.h=s[1],r.c=i)}}s&&(this.l=k(s)?s:t[n])}else{for(s=t[2],n=0;n<s.length;n++)i[s[n]]=1;this.i=t[0],this.h=t[1],this.c=i}};const B=function(){const t=l("\\s+"),e=l("[^a-z0-9 ]"),i=[l("[-/]")," ",e,"",t," "];return function(t){return f(c(t.toLowerCase(),i))}}(),I={icase:function(t){return t.toLowerCase()},simple:function(){const t=l("\\s+"),e=l("[^a-z0-9 ]"),i=l("[-/]"),s=[l("[\xe0\xe1\xe2\xe3\xe4\xe5]"),"a",l("[\xe8\xe9\xea\xeb]"),"e",l("[\xec\xed\xee\xef]"),"i",l("[\xf2\xf3\xf4\xf5\xf6\u0151]"),"o",l("[\xf9\xfa\xfb\xfc\u0171]"),"u",l("[\xfd\u0177\xff]"),"y",l("\xf1"),"n",l("[\xe7c]"),"k",l("\xdf"),"s",l(" & ")," and ",i," ",e,"",t," "];return function(t){return" "===(t=c(t.toLowerCase(),s))?"":t}}(),advanced:function(){const t=l("ae"),e=l("ai"),i=l("ay"),s=l("ey"),n=l("oe"),r=l("ue"),h=l("ie"),o=l("sz"),u=l("zs"),a=l("ck"),d=l("cc"),p=[t,"a",e,"ei",i,"ei",s,"ei",n,"o",r,"u",h,"i",o,"s",u,"s",l("sh"),"s",a,"k",d,"k",l("th"),"t",l("dt"),"t",l("ph"),"f",l("pf"),"f",l("ou"),"o",l("uo"),"u"];return function(t,e){return t?(2<(t=this.simple(t)).length&&(t=c(t,p)),e||1<t.length&&(t=f(t)),t):t}}(),extra:function(){const t=[l("p"),"b",l("z"),"s",l("[cgq]"),"k",l("n"),"m",l("d"),"t",l("[vw]"),"f",l("[aeiouy]"),""];return function(e){if(!e)return e;if(1<(e=this.advanced(e,!0)).length){e=e.split(" ");for(let i=0;i<e.length;i++){const s=e[i];1<s.length&&(e[i]=s[0]+c(s.substring(1),t))}e=f(e=e.join(" "))}return e}}(),balance:B},_=function(){function t(t){this.clear(),this.H=!0!==t&&t}return t.prototype.clear=function(){this.cache=D(),this.count=D(),this.index=D(),this.s=[]},t.prototype.set=function(t,e){if(this.H&&F(this.cache[t])){let i=this.s.length;if(i===this.H){i--;const t=this.s[i];delete this.cache[t],delete this.count[t],delete this.index[t]}this.index[t]=i,this.s[i]=t,this.count[t]=-1,this.cache[t]=e,this.get(t)}else this.cache[t]=e},t.prototype.get=function(t){const e=this.cache[t];if(this.H&&e){var i=++this.count[t];const e=this.index;let n=e[t];if(0<n){const r=this.s;for(var s=n;this.count[r[--n]]<=i&&-1!==n;);if(n++,n!==s){for(i=s;i>n;i--)s=r[i-1],r[i]=s,e[s]=i;r[n]=t,e[t]=n}}}return e},t}();return i}(function(){const t={},e="undefined"!=typeof Blob&&"undefined"!=typeof URL&&URL.createObjectURL;return function(i,s,n,r,h){return n=e?URL.createObjectURL(new Blob(["("+n.toString()+")()"],{type:"text/javascript"})):i+".min.js",t[i+="-"+s]||(t[i]=[]),t[i][h]=new Worker(n),t[i][h].onmessage=r,t[i][h]}}()),this)},48652:function(t,e,i){i.r(e),i.d(e,{PageSearcher:function(){return A}});var s=i(40600),n=i(23180),r=i(68633),h=i(20784),o=i(82882),l=i(39106),c=i(39933),u=i(11533),a=i.n(u),f=i(96934),d=i(71837),p=i(60205);const g=/[\|\u3131-\u3163\uAC00-\uD7A3]|[\u3400-\u4DB5\u4E00-\u9FCC\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|(?:[\uD840-\uD868](?![\uDC00-\uDFFF]))(?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|(?:\uD869(?![\uDC00-\uDFFF]))(?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDED6\uDF00-\uDFFF])|(?:[\uD86A-\uD86C](?![\uDC00-\uDFFF]))(?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])|(?:\uD86D(?![\uDC00-\uDFFF]))(?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDF34\uDF40-\uDFFF])|(?:\uD86E(?![\uDC00-\uDFFF]))(?:(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDC1D])|[\u3041-\u3096]|[\u30A1-\u30FA]/gi,v=["home","api","404","custom"];var y=new WeakMap,m=new WeakMap,w=new WeakMap,b=new WeakMap,k=new WeakMap,F=new WeakMap,x=new WeakMap,D=new WeakSet,Z=new WeakSet,j=new WeakSet,O=new WeakSet;class A{constructor(t){(0,n.Z)(this,O),(0,n.Z)(this,j),(0,n.Z)(this,Z),(0,n.Z)(this,D),(0,r.Z)(this,y,{writable:!0,value:void 0}),(0,r.Z)(this,m,{writable:!0,value:void 0}),(0,r.Z)(this,w,{writable:!0,value:{}}),(0,r.Z)(this,b,{writable:!0,value:void 0}),(0,r.Z)(this,k,{writable:!0,value:void 0}),(0,r.Z)(this,F,{writable:!0,value:[]}),(0,r.Z)(this,x,{writable:!0,value:void 0}),(0,l.Z)(this,b,t.langRoutePrefix),(0,l.Z)(this,k,t.defaultLang),(0,l.Z)(this,F,t.langs)}async init(t={}){(0,l.Z)(this,x,await(0,o.Z)(this,D,C).call(this));const e=(0,h.Z)(this,x).filter((t=>{if("/"===(0,h.Z)(this,b)){return!(0,h.Z)(this,F).filter((t=>t!==(0,h.Z)(this,k))).map((t=>(0,d.pJ)(t))).every((e=>t.routePath.startsWith(e)))}return t.routePath.startsWith((0,d.pJ)((0,h.Z)(this,b)))})),i=e.filter((t=>{var e;return!v.includes((null===(e=t.frontmatter)||void 0===e?void 0:e.pageType)||"")})).map((t=>{var e,i,s,n;const r=(t.toc||[]).map((t=>t.text));return{title:null!==(e=null!==(i=null!==(s=t.title)&&void 0!==s?s:null===(n=t.frontmatter)||void 0===n?void 0:n.title)&&void 0!==i?i:t.routePath.split("/").pop())&&void 0!==e?e:"",headers:r,headerStr:r.join(" "),content:(0,f.gS)(t.content||""),path:t.routePath,rawHeaders:t.toc||[]}}));(0,l.Z)(this,w,e.reduce(((t,e)=>((e.toc||[]).forEach((i=>{t[e.routePath+i.text]=i.id})),t)),{}));const n=(0,s.Z)({encode:"simple",tokenize:"forward",split:/\W+/,async:!0,doc:{id:"path",field:["title","headerStr","content"]}},t);(0,l.Z)(this,y,a().create(n)),(0,l.Z)(this,m,a().create((0,s.Z)((0,s.Z)({},n),{},{encode:!1,tokenize(t){const e=[];let i=null;do{i=g.exec(t),i&&e.push(i[0])}while(i);return e}}))),(0,h.Z)(this,y).add(i),(0,h.Z)(this,m).add(i)}async match(t,e=7){var i,s;const n=(await Promise.all([null===(i=(0,h.Z)(this,y))||void 0===i?void 0:i.search({query:t,limit:e}),null===(s=(0,h.Z)(this,m))||void 0===s?void 0:s.search(t,e)])).flat(2).filter(Boolean),r=[];n.forEach((e=>{(0,o.Z)(this,Z,P).call(this,e,t,r)||(0,o.Z)(this,j,W).call(this,e,t,r)}));return(0,c.Z)(r,"link")}}async function C(){return(await fetch(`/static/${p.Zi}`)).json()}function P(t,e,i){const{headers:s,rawHeaders:n}=t;for(const[r,o]of s.entries())if(o.includes(e)){const s=(0,h.Z)(this,w)[t.path+o],l=(0,f.is)(n,r).map((t=>t.text)).join(" > ");return i.push({type:"header",title:t.title,header:l,headerHighlightIndex:l.indexOf(e),link:`${(0,p.yc)(t.path)}#${s}`}),!0}return!1}function W(t,e,i){var s;const{content:n,headers:r}=t,h=n.indexOf(e);if(-1===h)return;const l=r.map((t=>n.indexOf(t))),c=l.findIndex(((t,e)=>{if(!(e<r.length-1))return t<h;{const i=l[e+1];if(t<=h&&i>=h)return!0}return!1})),u=null!==(s=r[c])&&void 0!==s?s:t.title;let a=n.slice(0,h).lastIndexOf("\n");a=-1===a?0:a;const f=n.indexOf("\n",h+e.length);let d=n.slice(a,f);d.length>100&&(d=(0,o.Z)(this,O,M).call(this,d,e)),i.push({type:"content",title:t.title,header:u,statement:d,statementHighlightIndex:d.indexOf(e),link:`${(0,p.yc)(t.path)}#${u}`})}function M(t,e){const i=t.indexOf(e),s=Math.floor((100-e.length)/2);let n=t.slice(0,i);n.length>s&&(n=`...${t.slice(i-s+3,i)}`);let r=t.slice(i+e.length);return r.length>s&&(r=`${t.slice(i+e.length,i+s-3)}...`),n+e+r}}}]);