zudoku 0.0.0-ff3751f → 0.0.0-fix-display-option-navigation-items.4bdfe991

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 (1841) hide show
  1. package/README.md +3 -3
  2. package/cli.js +9 -0
  3. package/dist/app/ZuploBuildConfig.d.ts +45 -0
  4. package/dist/app/ZuploBuildConfig.js +29 -0
  5. package/dist/app/ZuploBuildConfig.js.map +1 -0
  6. package/dist/app/demo.js +22 -9
  7. package/dist/app/demo.js.map +1 -1
  8. package/dist/app/entry.client.d.ts +6 -2
  9. package/dist/app/entry.client.js +51 -3
  10. package/dist/app/entry.client.js.map +1 -1
  11. package/dist/app/entry.server.d.ts +9 -8
  12. package/dist/app/entry.server.js +18 -16
  13. package/dist/app/entry.server.js.map +1 -1
  14. package/dist/app/env.d.ts +33 -0
  15. package/dist/app/env.js +37 -0
  16. package/dist/app/env.js.map +1 -0
  17. package/dist/app/main.d.ts +4 -3
  18. package/dist/app/main.js +44 -43
  19. package/dist/app/main.js.map +1 -1
  20. package/dist/app/sentry.d.ts +3 -0
  21. package/dist/app/sentry.js +19 -0
  22. package/dist/app/sentry.js.map +1 -0
  23. package/dist/app/standalone.js +8 -10
  24. package/dist/app/standalone.js.map +1 -1
  25. package/dist/cli/build/handler.d.ts +1 -3
  26. package/dist/cli/build/handler.js +18 -2
  27. package/dist/cli/build/handler.js.map +1 -1
  28. package/dist/cli/cli.js +17 -3
  29. package/dist/cli/cli.js.map +1 -1
  30. package/dist/cli/cmds/build.d.ts +11 -3
  31. package/dist/cli/cmds/build.js +21 -13
  32. package/dist/cli/cmds/build.js.map +1 -1
  33. package/dist/cli/cmds/dev.d.ts +1 -1
  34. package/dist/cli/cmds/dev.js +5 -0
  35. package/dist/cli/cmds/dev.js.map +1 -1
  36. package/dist/cli/cmds/preview.d.ts +16 -0
  37. package/dist/cli/cmds/preview.js +25 -0
  38. package/dist/cli/cmds/preview.js.map +1 -0
  39. package/dist/cli/common/logger.js +9 -0
  40. package/dist/cli/common/logger.js.map +1 -1
  41. package/dist/cli/common/machine-id/lib.js +1 -0
  42. package/dist/cli/common/machine-id/lib.js.map +1 -1
  43. package/dist/cli/common/outdated.js +2 -1
  44. package/dist/cli/common/outdated.js.map +1 -1
  45. package/dist/cli/common/output.js.map +1 -1
  46. package/dist/cli/common/utils/ports.d.ts +1 -1
  47. package/dist/cli/common/utils/ports.js +16 -15
  48. package/dist/cli/common/utils/ports.js.map +1 -1
  49. package/dist/cli/dev/handler.d.ts +1 -0
  50. package/dist/cli/dev/handler.js +15 -12
  51. package/dist/cli/dev/handler.js.map +1 -1
  52. package/dist/cli/preview/handler.d.ts +3 -0
  53. package/dist/cli/preview/handler.js +35 -0
  54. package/dist/cli/preview/handler.js.map +1 -0
  55. package/dist/codegen.d.ts +3 -0
  56. package/dist/codegen.js +45 -0
  57. package/dist/codegen.js.map +1 -0
  58. package/dist/config/config.d.ts +28 -13
  59. package/dist/config/file-exists.d.ts +1 -0
  60. package/dist/config/file-exists.js +5 -0
  61. package/dist/config/file-exists.js.map +1 -0
  62. package/dist/config/loader.d.ts +21 -0
  63. package/dist/config/loader.js +141 -0
  64. package/dist/config/loader.js.map +1 -0
  65. package/dist/config/validators/BuildSchema.d.ts +36 -0
  66. package/dist/config/validators/BuildSchema.js +25 -0
  67. package/dist/config/validators/BuildSchema.js.map +1 -0
  68. package/dist/config/validators/InputNavigationSchema.d.ts +7460 -0
  69. package/dist/config/validators/InputNavigationSchema.js +74 -0
  70. package/dist/config/validators/InputNavigationSchema.js.map +1 -0
  71. package/dist/config/validators/InputNavigationSchema.test-d.js +145 -0
  72. package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -0
  73. package/dist/config/validators/NavigationSchema.d.ts +44 -0
  74. package/dist/config/validators/NavigationSchema.js +96 -0
  75. package/dist/config/validators/NavigationSchema.js.map +1 -0
  76. package/dist/config/validators/ProtectedRoutesSchema.d.ts +12 -0
  77. package/dist/config/validators/ProtectedRoutesSchema.js +19 -0
  78. package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
  79. package/dist/config/validators/icon-types.d.ts +2 -0
  80. package/dist/config/validators/icon-types.js +1830 -0
  81. package/dist/config/validators/icon-types.js.map +1 -0
  82. package/dist/config/validators/validate.d.ts +655 -1564
  83. package/dist/config/validators/validate.js +345 -145
  84. package/dist/config/validators/validate.js.map +1 -1
  85. package/dist/config/validators/validate.test.js +141 -0
  86. package/dist/config/validators/validate.test.js.map +1 -0
  87. package/dist/index.d.ts +9 -5
  88. package/dist/index.js +5 -1
  89. package/dist/index.js.map +1 -1
  90. package/dist/lib/MissingIcon.d.ts +2 -0
  91. package/dist/lib/MissingIcon.js +7 -0
  92. package/dist/lib/MissingIcon.js.map +1 -0
  93. package/dist/lib/auth/issuer.d.ts +2 -0
  94. package/dist/lib/auth/issuer.js +37 -0
  95. package/dist/lib/auth/issuer.js.map +1 -0
  96. package/dist/lib/auth/issuer.test.js +94 -0
  97. package/dist/lib/auth/issuer.test.js.map +1 -0
  98. package/dist/lib/authentication/AuthenticationPlugin.d.ts +6 -4
  99. package/dist/lib/authentication/AuthenticationPlugin.js +4 -1
  100. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  101. package/dist/lib/authentication/authentication.d.ts +6 -5
  102. package/dist/lib/authentication/components/CallbackHandler.js +17 -11
  103. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  104. package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
  105. package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
  106. package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
  107. package/dist/lib/authentication/components/SignIn.d.ts +1 -1
  108. package/dist/lib/authentication/components/SignIn.js +6 -2
  109. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  110. package/dist/lib/authentication/components/SignOut.js +2 -2
  111. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  112. package/dist/lib/authentication/components/SignUp.d.ts +1 -1
  113. package/dist/lib/authentication/components/SignUp.js +4 -1
  114. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  115. package/dist/lib/authentication/errors.d.ts +6 -12
  116. package/dist/lib/authentication/errors.js +2 -1
  117. package/dist/lib/authentication/errors.js.map +1 -1
  118. package/dist/lib/authentication/hook.d.ts +13 -4
  119. package/dist/lib/authentication/hook.js +12 -4
  120. package/dist/lib/authentication/hook.js.map +1 -1
  121. package/dist/lib/authentication/providers/auth0.d.ts +2 -2
  122. package/dist/lib/authentication/providers/auth0.js +16 -14
  123. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  124. package/dist/lib/authentication/providers/azureb2c.d.ts +28 -0
  125. package/dist/lib/authentication/providers/azureb2c.js +147 -0
  126. package/dist/lib/authentication/providers/azureb2c.js.map +1 -0
  127. package/dist/lib/authentication/providers/clerk.d.ts +2 -2
  128. package/dist/lib/authentication/providers/clerk.js +108 -48
  129. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  130. package/dist/lib/authentication/providers/openid.d.ts +26 -21
  131. package/dist/lib/authentication/providers/openid.js +112 -73
  132. package/dist/lib/authentication/providers/openid.js.map +1 -1
  133. package/dist/lib/authentication/providers/supabase.d.ts +4 -0
  134. package/dist/lib/authentication/providers/supabase.js +108 -0
  135. package/dist/lib/authentication/providers/supabase.js.map +1 -0
  136. package/dist/lib/authentication/state.d.ts +24 -19
  137. package/dist/lib/authentication/state.js +47 -7
  138. package/dist/lib/authentication/state.js.map +1 -1
  139. package/dist/lib/authentication/use-broadcast/shared.d.ts +48 -0
  140. package/dist/lib/authentication/use-broadcast/shared.js +243 -0
  141. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -0
  142. package/dist/lib/authentication/use-broadcast/useBroadcast.d.ts +24 -0
  143. package/dist/lib/authentication/use-broadcast/useBroadcast.js +106 -0
  144. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -0
  145. package/dist/lib/components/AnchorLink.d.ts +2 -2
  146. package/dist/lib/components/AnchorLink.js +9 -5
  147. package/dist/lib/components/AnchorLink.js.map +1 -1
  148. package/dist/lib/components/Autocomplete.d.ts +13 -0
  149. package/dist/lib/components/Autocomplete.js +47 -0
  150. package/dist/lib/components/Autocomplete.js.map +1 -0
  151. package/dist/lib/components/Banner.js +2 -2
  152. package/dist/lib/components/Banner.js.map +1 -1
  153. package/dist/lib/components/Bootstrap.d.ts +5 -3
  154. package/dist/lib/components/Bootstrap.js +13 -6
  155. package/dist/lib/components/Bootstrap.js.map +1 -1
  156. package/dist/lib/components/BuildCheck.d.ts +4 -0
  157. package/dist/lib/components/BuildCheck.js +38 -0
  158. package/dist/lib/components/BuildCheck.js.map +1 -0
  159. package/dist/lib/components/CategoryHeading.js +1 -1
  160. package/dist/lib/components/CategoryHeading.js.map +1 -1
  161. package/dist/lib/components/ClientOnly.d.ts +4 -2
  162. package/dist/lib/components/ClientOnly.js +1 -1
  163. package/dist/lib/components/ClientOnly.js.map +1 -1
  164. package/dist/lib/components/DeveloperHint.js +2 -1
  165. package/dist/lib/components/DeveloperHint.js.map +1 -1
  166. package/dist/lib/components/ErrorPage.js +2 -2
  167. package/dist/lib/components/ErrorPage.js.map +1 -1
  168. package/dist/lib/components/Footer.d.ts +1 -0
  169. package/dist/lib/components/Footer.js +32 -0
  170. package/dist/lib/components/Footer.js.map +1 -0
  171. package/dist/lib/components/Framed.d.ts +7 -0
  172. package/dist/lib/components/Framed.js +26 -0
  173. package/dist/lib/components/Framed.js.map +1 -0
  174. package/dist/lib/components/Header.js +32 -17
  175. package/dist/lib/components/Header.js.map +1 -1
  176. package/dist/lib/components/Heading.d.ts +10 -6
  177. package/dist/lib/components/Heading.js +7 -2
  178. package/dist/lib/components/Heading.js.map +1 -1
  179. package/dist/lib/components/InlineCode.d.ts +2 -1
  180. package/dist/lib/components/InlineCode.js +2 -9
  181. package/dist/lib/components/InlineCode.js.map +1 -1
  182. package/dist/lib/components/Layout.js +10 -21
  183. package/dist/lib/components/Layout.js.map +1 -1
  184. package/dist/lib/components/Main.d.ts +2 -0
  185. package/dist/lib/components/Main.js +18 -0
  186. package/dist/lib/components/Main.js.map +1 -0
  187. package/dist/lib/components/Markdown.d.ts +4 -3
  188. package/dist/lib/components/Markdown.js +14 -14
  189. package/dist/lib/components/Markdown.js.map +1 -1
  190. package/dist/lib/components/MobileTopNavigation.js +18 -9
  191. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  192. package/dist/lib/components/NotFoundPage.js +3 -3
  193. package/dist/lib/components/NotFoundPage.js.map +1 -1
  194. package/dist/lib/components/PageProgress.d.ts +1 -0
  195. package/dist/lib/components/PageProgress.js +20 -0
  196. package/dist/lib/components/PageProgress.js.map +1 -0
  197. package/dist/lib/components/Pagination.d.ts +11 -0
  198. package/dist/lib/components/Pagination.js +10 -0
  199. package/dist/lib/components/Pagination.js.map +1 -0
  200. package/dist/lib/components/PathRenderer.d.ts +11 -0
  201. package/dist/lib/components/PathRenderer.js +28 -0
  202. package/dist/lib/components/PathRenderer.js.map +1 -0
  203. package/dist/lib/components/ReactMarkdown.d.ts +29 -0
  204. package/dist/lib/components/ReactMarkdown.js +182 -0
  205. package/dist/lib/components/ReactMarkdown.js.map +1 -0
  206. package/dist/lib/components/Search.d.ts +3 -1
  207. package/dist/lib/components/Search.js +9 -3
  208. package/dist/lib/components/Search.js.map +1 -1
  209. package/dist/lib/components/Slot.d.ts +17 -0
  210. package/dist/lib/components/Slot.js +24 -0
  211. package/dist/lib/components/Slot.js.map +1 -0
  212. package/dist/lib/components/Slot.test.d.ts +1 -0
  213. package/dist/lib/components/Slot.test.js +168 -0
  214. package/dist/lib/components/Slot.test.js.map +1 -0
  215. package/dist/lib/components/StatusPage.d.ts +7 -0
  216. package/dist/lib/components/StatusPage.js +75 -0
  217. package/dist/lib/components/StatusPage.js.map +1 -0
  218. package/dist/lib/components/ThemeSwitch.d.ts +1 -0
  219. package/dist/lib/components/ThemeSwitch.js +16 -0
  220. package/dist/lib/components/ThemeSwitch.js.map +1 -0
  221. package/dist/lib/components/TopNavigation.d.ts +7 -3
  222. package/dist/lib/components/TopNavigation.js +55 -37
  223. package/dist/lib/components/TopNavigation.js.map +1 -1
  224. package/dist/lib/components/Typography.d.ts +5 -0
  225. package/dist/lib/components/Typography.js +8 -0
  226. package/dist/lib/components/Typography.js.map +1 -0
  227. package/dist/lib/components/Zudoku.d.ts +7 -0
  228. package/dist/lib/components/Zudoku.js +58 -0
  229. package/dist/lib/components/Zudoku.js.map +1 -0
  230. package/dist/lib/components/cache.d.ts +13 -0
  231. package/dist/lib/components/cache.js +20 -0
  232. package/dist/lib/components/cache.js.map +1 -0
  233. package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
  234. package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
  235. package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
  236. package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
  237. package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
  238. package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
  239. package/dist/lib/components/context/SlotProvider.d.ts +26 -0
  240. package/dist/lib/components/context/SlotProvider.js +83 -0
  241. package/dist/lib/components/context/SlotProvider.js.map +1 -0
  242. package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
  243. package/dist/lib/components/context/ViewportAnchorContext.js +29 -23
  244. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  245. package/dist/lib/components/context/ZudokuContext.d.ts +9 -13
  246. package/dist/lib/components/context/ZudokuContext.js +64 -31
  247. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  248. package/dist/lib/components/context/ZudokuProvider.d.ts +2 -2
  249. package/dist/lib/components/context/ZudokuProvider.js +2 -1
  250. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  251. package/dist/lib/components/index.d.ts +69 -20
  252. package/dist/lib/components/index.js +31 -9
  253. package/dist/lib/components/index.js.map +1 -1
  254. package/dist/lib/components/navigation/Navigation.d.ts +5 -0
  255. package/dist/lib/components/navigation/Navigation.js +12 -0
  256. package/dist/lib/components/navigation/Navigation.js.map +1 -0
  257. package/dist/lib/components/navigation/NavigationBadge.d.ts +26 -0
  258. package/dist/lib/components/navigation/NavigationBadge.js +26 -0
  259. package/dist/lib/components/navigation/NavigationBadge.js.map +1 -0
  260. package/dist/lib/components/navigation/NavigationCategory.d.ts +5 -0
  261. package/dist/lib/components/navigation/NavigationCategory.js +61 -0
  262. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -0
  263. package/dist/lib/components/navigation/NavigationItem.d.ts +6 -0
  264. package/dist/lib/components/navigation/NavigationItem.js +54 -0
  265. package/dist/lib/components/navigation/NavigationItem.js.map +1 -0
  266. package/dist/lib/components/navigation/NavigationWrapper.d.ts +7 -0
  267. package/dist/lib/components/navigation/NavigationWrapper.js +21 -0
  268. package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -0
  269. package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
  270. package/dist/lib/components/navigation/PoweredByZudoku.js +7 -0
  271. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
  272. package/dist/lib/components/navigation/Toc.js +46 -0
  273. package/dist/lib/components/navigation/Toc.js.map +1 -0
  274. package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
  275. package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
  276. package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
  277. package/dist/lib/components/navigation/ZuploLogo.d.ts +3 -0
  278. package/dist/lib/components/navigation/ZuploLogo.js +4 -0
  279. package/dist/lib/components/navigation/ZuploLogo.js.map +1 -0
  280. package/dist/lib/components/navigation/utils.d.ts +14 -6
  281. package/dist/lib/components/navigation/utils.js +50 -19
  282. package/dist/lib/components/navigation/utils.js.map +1 -1
  283. package/dist/lib/core/RouteGuard.d.ts +2 -0
  284. package/dist/lib/core/RouteGuard.js +52 -0
  285. package/dist/lib/core/RouteGuard.js.map +1 -0
  286. package/dist/lib/core/ZudokuContext.d.ts +113 -0
  287. package/dist/lib/core/ZudokuContext.js +93 -0
  288. package/dist/lib/core/ZudokuContext.js.map +1 -0
  289. package/dist/lib/core/plugins.d.ts +37 -19
  290. package/dist/lib/core/plugins.js +4 -0
  291. package/dist/lib/core/plugins.js.map +1 -1
  292. package/dist/lib/errors/ErrorAlert.js +5 -1
  293. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  294. package/dist/lib/errors/RouterError.js +1 -1
  295. package/dist/lib/errors/RouterError.js.map +1 -1
  296. package/dist/lib/hooks/index.d.ts +28 -0
  297. package/dist/lib/hooks/index.js +16 -0
  298. package/dist/lib/hooks/index.js.map +1 -0
  299. package/dist/lib/hooks/useEvent.d.ts +11 -0
  300. package/dist/lib/hooks/useEvent.js +19 -0
  301. package/dist/lib/hooks/useEvent.js.map +1 -0
  302. package/dist/lib/hooks/useEvent.test.d.ts +1 -0
  303. package/dist/lib/hooks/useEvent.test.js +102 -0
  304. package/dist/lib/hooks/useEvent.test.js.map +1 -0
  305. package/dist/lib/hooks/useHotkey.d.ts +4 -0
  306. package/dist/lib/hooks/useHotkey.js +58 -0
  307. package/dist/lib/hooks/useHotkey.js.map +1 -0
  308. package/dist/lib/icons.d.ts +1 -0
  309. package/dist/lib/icons.js +1 -0
  310. package/dist/lib/icons.js.map +1 -1
  311. package/dist/lib/oas/graphql/circular.d.ts +3 -0
  312. package/dist/lib/oas/graphql/circular.js +43 -0
  313. package/dist/lib/oas/graphql/circular.js.map +1 -0
  314. package/dist/lib/oas/graphql/index.d.ts +25 -1
  315. package/dist/lib/oas/graphql/index.js +216 -69
  316. package/dist/lib/oas/graphql/index.js.map +1 -1
  317. package/dist/lib/oas/parser/dereference/index.js +8 -3
  318. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  319. package/dist/lib/oas/parser/index.d.ts +8 -3
  320. package/dist/lib/oas/parser/index.js +7 -23
  321. package/dist/lib/oas/parser/index.js.map +1 -1
  322. package/dist/lib/oas/parser/upgrade/index.d.ts +3 -2
  323. package/dist/lib/oas/parser/upgrade/index.js +83 -31
  324. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  325. package/dist/lib/plugins/api-catalog/Catalog.d.ts +4 -0
  326. package/dist/lib/plugins/api-catalog/Catalog.js +26 -0
  327. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
  328. package/dist/lib/plugins/api-catalog/index.d.ts +31 -0
  329. package/dist/lib/plugins/api-catalog/index.js +46 -0
  330. package/dist/lib/plugins/api-catalog/index.js.map +1 -0
  331. package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +3 -2
  332. package/dist/lib/plugins/api-keys/CreateApiKey.js +15 -7
  333. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  334. package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
  335. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
  336. package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
  337. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +151 -28
  338. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  339. package/dist/lib/plugins/api-keys/index.d.ts +25 -15
  340. package/dist/lib/plugins/api-keys/index.js +68 -30
  341. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  342. package/dist/lib/plugins/custom-pages/index.d.ts +4 -6
  343. package/dist/lib/plugins/custom-pages/index.js +15 -10
  344. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  345. package/dist/lib/plugins/markdown/MdxPage.d.ts +9 -2
  346. package/dist/lib/plugins/markdown/MdxPage.js +43 -10
  347. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  348. package/dist/lib/plugins/markdown/index.d.ts +14 -4
  349. package/dist/lib/plugins/markdown/index.js +9 -26
  350. package/dist/lib/plugins/markdown/index.js.map +1 -1
  351. package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +5 -0
  352. package/dist/lib/plugins/openapi/CollapsibleCode.js +25 -0
  353. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -0
  354. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +10 -2
  355. package/dist/lib/plugins/openapi/ColorizedParam.js +29 -14
  356. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  357. package/dist/lib/plugins/openapi/Endpoint.js +13 -16
  358. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  359. package/dist/lib/plugins/openapi/OasProvider.d.ts +8 -0
  360. package/dist/lib/plugins/openapi/OasProvider.js +29 -0
  361. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -0
  362. package/dist/lib/plugins/openapi/OperationList.d.ts +6 -3
  363. package/dist/lib/plugins/openapi/OperationList.js +109 -29
  364. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  365. package/dist/lib/plugins/openapi/OperationListItem.d.ts +5 -3
  366. package/dist/lib/plugins/openapi/OperationListItem.js +13 -7
  367. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  368. package/dist/lib/plugins/openapi/ParamInfos.d.ts +6 -0
  369. package/dist/lib/plugins/openapi/ParamInfos.js +45 -0
  370. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -0
  371. package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
  372. package/dist/lib/plugins/openapi/ParameterList.js +3 -2
  373. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  374. package/dist/lib/plugins/openapi/ParameterListItem.js +19 -1
  375. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  376. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +4 -2
  377. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +17 -4
  378. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  379. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +3 -4
  380. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -9
  381. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  382. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
  383. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +4 -6
  384. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  385. package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
  386. package/dist/lib/plugins/openapi/SchemaList.js +52 -0
  387. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
  388. package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -1
  389. package/dist/lib/plugins/openapi/Sidecar.js +87 -118
  390. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  391. package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
  392. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  393. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -0
  394. package/dist/lib/plugins/openapi/SidecarExamples.js +76 -0
  395. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -0
  396. package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
  397. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
  398. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +8 -0
  399. package/dist/lib/plugins/openapi/client/GraphQLClient.js +43 -0
  400. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -0
  401. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +7 -0
  402. package/dist/lib/plugins/openapi/client/GraphQLContext.js +5 -0
  403. package/dist/lib/plugins/openapi/client/GraphQLContext.js.map +1 -0
  404. package/dist/lib/plugins/openapi/client/createServer.d.ts +3 -1
  405. package/dist/lib/plugins/openapi/client/createServer.js +5 -2
  406. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  407. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +14 -0
  408. package/dist/lib/plugins/openapi/client/useCreateQuery.js +20 -0
  409. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -0
  410. package/dist/lib/plugins/openapi/components/ConstValue.d.ts +5 -0
  411. package/dist/lib/plugins/openapi/components/ConstValue.js +6 -0
  412. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -0
  413. package/dist/lib/plugins/openapi/components/EnumValues.d.ts +5 -0
  414. package/dist/lib/plugins/openapi/components/EnumValues.js +15 -0
  415. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -0
  416. package/dist/lib/plugins/openapi/components/ResponseContent.d.ts +12 -0
  417. package/dist/lib/plugins/openapi/components/ResponseContent.js +21 -0
  418. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
  419. package/dist/lib/plugins/openapi/components/SelectOnClick.d.ts +5 -0
  420. package/dist/lib/plugins/openapi/components/SelectOnClick.js +16 -0
  421. package/dist/lib/plugins/openapi/components/SelectOnClick.js.map +1 -0
  422. package/dist/lib/plugins/openapi/context.d.ts +3 -3
  423. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +3 -3
  424. package/dist/lib/plugins/openapi/graphql/fragment-masking.js +3 -4
  425. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  426. package/dist/lib/plugins/openapi/graphql/gql.d.ts +8 -46
  427. package/dist/lib/plugins/openapi/graphql/gql.js +6 -13
  428. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  429. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +142 -25
  430. package/dist/lib/plugins/openapi/graphql/graphql.js +239 -662
  431. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  432. package/dist/lib/plugins/openapi/index.d.ts +11 -8
  433. package/dist/lib/plugins/openapi/index.js +106 -104
  434. package/dist/lib/plugins/openapi/index.js.map +1 -1
  435. package/dist/lib/plugins/openapi/interfaces.d.ts +58 -4
  436. package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +5 -0
  437. package/dist/lib/plugins/openapi/playground/BodyPanel.js +26 -0
  438. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -0
  439. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
  440. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
  441. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
  442. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
  443. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +9 -0
  444. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
  445. package/dist/lib/plugins/openapi/playground/Headers.d.ts +5 -4
  446. package/dist/lib/plugins/openapi/playground/Headers.js +108 -7
  447. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  448. package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
  449. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +15 -0
  450. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
  451. package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
  452. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +7 -0
  453. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
  454. package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
  455. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
  456. package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +9 -0
  457. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +5 -0
  458. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
  459. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
  460. package/dist/lib/plugins/openapi/playground/PathParams.js +4 -7
  461. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  462. package/dist/lib/plugins/openapi/playground/Playground.d.ts +32 -2
  463. package/dist/lib/plugins/openapi/playground/Playground.js +168 -84
  464. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  465. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  466. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  467. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +3 -3
  468. package/dist/lib/plugins/openapi/playground/QueryParams.js +43 -22
  469. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  470. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
  471. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
  472. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
  473. package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
  474. package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
  475. package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
  476. package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +2 -0
  477. package/dist/lib/plugins/openapi/playground/fileUtils.js +22 -0
  478. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -0
  479. package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
  480. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
  481. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
  482. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
  483. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
  484. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
  485. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
  486. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
  487. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
  488. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
  489. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
  490. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
  491. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +8 -0
  492. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +69 -0
  493. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
  494. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +14 -0
  495. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +103 -0
  496. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
  497. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +11 -0
  498. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +15 -0
  499. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
  500. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
  501. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
  502. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
  503. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
  504. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
  505. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
  506. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +16 -0
  507. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +10 -0
  508. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -0
  509. package/dist/lib/plugins/openapi/processors/removeExtensions.d.ts +8 -0
  510. package/dist/lib/plugins/openapi/processors/removeExtensions.js +16 -0
  511. package/dist/lib/plugins/openapi/processors/removeExtensions.js.map +1 -0
  512. package/dist/lib/plugins/openapi/processors/removeExtensions.test.d.ts +1 -0
  513. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +194 -0
  514. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -0
  515. package/dist/lib/plugins/openapi/processors/removeParameters.d.ts +12 -0
  516. package/dist/lib/plugins/openapi/processors/removeParameters.js +66 -0
  517. package/dist/lib/plugins/openapi/processors/removeParameters.js.map +1 -0
  518. package/dist/lib/plugins/openapi/processors/removeParameters.test.d.ts +1 -0
  519. package/dist/lib/plugins/openapi/processors/removeParameters.test.js +159 -0
  520. package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -0
  521. package/dist/lib/plugins/openapi/processors/removePaths.d.ts +13 -0
  522. package/dist/lib/plugins/openapi/processors/removePaths.js +33 -0
  523. package/dist/lib/plugins/openapi/processors/removePaths.js.map +1 -0
  524. package/dist/lib/plugins/openapi/processors/removePaths.test.d.ts +1 -0
  525. package/dist/lib/plugins/openapi/processors/removePaths.test.js +144 -0
  526. package/dist/lib/plugins/openapi/processors/removePaths.test.js.map +1 -0
  527. package/dist/lib/plugins/openapi/processors/traverse.d.ts +1 -0
  528. package/dist/lib/plugins/openapi/processors/traverse.js +2 -0
  529. package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -0
  530. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
  531. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
  532. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
  533. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
  534. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
  535. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
  536. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
  537. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
  538. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
  539. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
  540. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +15 -0
  541. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
  542. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +11 -0
  543. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +44 -0
  544. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
  545. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -2
  546. package/dist/lib/plugins/openapi/schema/SchemaView.js +40 -51
  547. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  548. package/dist/lib/plugins/openapi/schema/utils.d.ts +8 -1
  549. package/dist/lib/plugins/openapi/schema/utils.js +16 -4
  550. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  551. package/dist/lib/plugins/openapi/state.d.ts +25 -0
  552. package/dist/lib/plugins/openapi/state.js +18 -0
  553. package/dist/lib/plugins/openapi/state.js.map +1 -0
  554. package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +11 -0
  555. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +89 -0
  556. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -0
  557. package/dist/lib/plugins/openapi/util/createNavigationCategory.d.ts +9 -0
  558. package/dist/lib/plugins/openapi/util/createNavigationCategory.js +24 -0
  559. package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -0
  560. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -2
  561. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +80 -39
  562. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  563. package/dist/lib/plugins/openapi/util/getRoutes.d.ts +10 -0
  564. package/dist/lib/plugins/openapi/util/getRoutes.js +117 -0
  565. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -0
  566. package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +2 -0
  567. package/dist/lib/plugins/openapi/util/methodColorMap.js +10 -0
  568. package/dist/lib/plugins/openapi/util/methodColorMap.js.map +1 -0
  569. package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
  570. package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
  571. package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
  572. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
  573. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
  574. package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
  575. package/dist/lib/plugins/redirect/index.d.ts +3 -3
  576. package/dist/lib/plugins/redirect/index.js +1 -1
  577. package/dist/lib/plugins/redirect/index.js.map +1 -1
  578. package/dist/lib/plugins/search-inkeep/index.d.ts +8 -6
  579. package/dist/lib/plugins/search-inkeep/index.js +49 -7
  580. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  581. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +2 -19
  582. package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
  583. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  584. package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
  585. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +80 -0
  586. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
  587. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
  588. package/dist/lib/plugins/search-pagefind/ResultList.js +39 -0
  589. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
  590. package/dist/lib/plugins/search-pagefind/get-results.d.ts +10 -0
  591. package/dist/lib/plugins/search-pagefind/get-results.js +42 -0
  592. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
  593. package/dist/lib/plugins/search-pagefind/index.d.ts +6 -0
  594. package/dist/lib/plugins/search-pagefind/index.js +9 -0
  595. package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
  596. package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
  597. package/dist/lib/plugins/search-pagefind/types.js +2 -0
  598. package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
  599. package/dist/lib/shiki.d.ts +31 -0
  600. package/dist/lib/shiki.js +101 -0
  601. package/dist/lib/shiki.js.map +1 -0
  602. package/dist/lib/ui/ActionButton.d.ts +4 -0
  603. package/dist/lib/ui/ActionButton.js +10 -0
  604. package/dist/lib/ui/ActionButton.js.map +1 -0
  605. package/dist/lib/ui/Alert.d.ts +6 -5
  606. package/dist/lib/ui/Alert.js +12 -10
  607. package/dist/lib/ui/Alert.js.map +1 -1
  608. package/dist/lib/ui/Badge.d.ts +2 -2
  609. package/dist/lib/ui/Badge.js +2 -1
  610. package/dist/lib/ui/Badge.js.map +1 -1
  611. package/dist/lib/ui/Button.d.ts +3 -3
  612. package/dist/lib/ui/Button.js +9 -6
  613. package/dist/lib/ui/Button.js.map +1 -1
  614. package/dist/lib/ui/Callout.d.ts +2 -1
  615. package/dist/lib/ui/Callout.js +3 -2
  616. package/dist/lib/ui/Callout.js.map +1 -1
  617. package/dist/lib/ui/Card.js +1 -1
  618. package/dist/lib/ui/Card.js.map +1 -1
  619. package/dist/lib/ui/Checkbox.js +1 -1
  620. package/dist/lib/ui/Checkbox.js.map +1 -1
  621. package/dist/lib/ui/CodeBlock.d.ts +15 -0
  622. package/dist/lib/ui/CodeBlock.js +17 -0
  623. package/dist/lib/ui/CodeBlock.js.map +1 -0
  624. package/dist/lib/ui/Command.d.ts +17 -3
  625. package/dist/lib/ui/Command.js +9 -5
  626. package/dist/lib/ui/Command.js.map +1 -1
  627. package/dist/lib/ui/Dialog.d.ts +3 -1
  628. package/dist/lib/ui/Dialog.js +2 -2
  629. package/dist/lib/ui/Dialog.js.map +1 -1
  630. package/dist/lib/ui/DropdownMenu.js +4 -4
  631. package/dist/lib/ui/DropdownMenu.js.map +1 -1
  632. package/dist/lib/ui/EmbeddedCodeBlock.d.ts +15 -0
  633. package/dist/lib/ui/EmbeddedCodeBlock.js +18 -0
  634. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -0
  635. package/dist/lib/ui/Form.d.ts +1 -1
  636. package/dist/lib/ui/HoverCard.js +1 -1
  637. package/dist/lib/ui/HoverCard.js.map +1 -1
  638. package/dist/lib/ui/Input.d.ts +1 -2
  639. package/dist/lib/ui/Input.js +1 -1
  640. package/dist/lib/ui/Input.js.map +1 -1
  641. package/dist/lib/ui/Popover.js +1 -1
  642. package/dist/lib/ui/Popover.js.map +1 -1
  643. package/dist/lib/ui/RadioGroup.js +1 -1
  644. package/dist/lib/ui/RadioGroup.js.map +1 -1
  645. package/dist/lib/ui/Select.js +4 -4
  646. package/dist/lib/ui/Select.js.map +1 -1
  647. package/dist/lib/ui/Slider.js +1 -1
  648. package/dist/lib/ui/Slider.js.map +1 -1
  649. package/dist/lib/ui/Stepper.d.ts +3 -0
  650. package/dist/lib/ui/Stepper.js +7 -0
  651. package/dist/lib/ui/Stepper.js.map +1 -0
  652. package/dist/lib/ui/Switch.js +1 -1
  653. package/dist/lib/ui/Switch.js.map +1 -1
  654. package/dist/lib/ui/SyntaxHighlight.d.ts +12 -0
  655. package/dist/lib/ui/SyntaxHighlight.js +15 -0
  656. package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
  657. package/dist/lib/ui/Tabs.js +2 -2
  658. package/dist/lib/ui/Tabs.js.map +1 -1
  659. package/dist/lib/ui/Textarea.js +1 -1
  660. package/dist/lib/ui/Textarea.js.map +1 -1
  661. package/dist/lib/ui/Toggle.js +1 -1
  662. package/dist/lib/ui/Toggle.js.map +1 -1
  663. package/dist/lib/ui/Tooltip.d.ts +2 -1
  664. package/dist/lib/ui/Tooltip.js +2 -1
  665. package/dist/lib/ui/Tooltip.js.map +1 -1
  666. package/dist/lib/ui/util.d.ts +2 -0
  667. package/dist/lib/ui/util.js +3 -0
  668. package/dist/lib/ui/util.js.map +1 -0
  669. package/dist/lib/util/MdxComponents.d.ts +38 -21
  670. package/dist/lib/util/MdxComponents.js +21 -17
  671. package/dist/lib/util/MdxComponents.js.map +1 -1
  672. package/dist/lib/util/createVariantComponent.d.ts +2 -2
  673. package/dist/lib/util/detectOS.d.ts +1 -0
  674. package/dist/lib/util/detectOS.js +11 -0
  675. package/dist/lib/util/detectOS.js.map +1 -0
  676. package/dist/lib/util/ensureArray.d.ts +1 -0
  677. package/dist/lib/util/ensureArray.js +2 -0
  678. package/dist/lib/util/ensureArray.js.map +1 -0
  679. package/dist/lib/util/humanFileSize.d.ts +6 -0
  680. package/dist/lib/util/humanFileSize.js +14 -0
  681. package/dist/lib/util/humanFileSize.js.map +1 -0
  682. package/dist/lib/util/humanFileSize.test.d.ts +1 -0
  683. package/dist/lib/util/humanFileSize.test.js +22 -0
  684. package/dist/lib/util/humanFileSize.test.js.map +1 -0
  685. package/dist/lib/util/invariant.d.ts +6 -5
  686. package/dist/lib/util/invariant.js +1 -1
  687. package/dist/lib/util/invariant.js.map +1 -1
  688. package/dist/lib/util/joinPath.d.ts +3 -0
  689. package/dist/lib/util/joinPath.js +3 -0
  690. package/dist/lib/util/joinPath.js.map +1 -1
  691. package/dist/lib/util/joinUrl.d.ts +1 -0
  692. package/dist/lib/util/joinUrl.js +40 -0
  693. package/dist/lib/util/joinUrl.js.map +1 -0
  694. package/dist/lib/util/joinUrl.test.d.ts +1 -0
  695. package/dist/lib/util/joinUrl.test.js +43 -0
  696. package/dist/lib/util/joinUrl.test.js.map +1 -0
  697. package/dist/lib/util/os.d.ts +2 -0
  698. package/dist/lib/util/os.js +21 -0
  699. package/dist/lib/util/os.js.map +1 -0
  700. package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
  701. package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
  702. package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
  703. package/dist/lib/util/traverse.d.ts +3 -0
  704. package/dist/lib/util/traverse.js +23 -0
  705. package/dist/lib/util/traverse.js.map +1 -0
  706. package/dist/lib/util/types.d.ts +7 -0
  707. package/dist/lib/util/types.js +2 -0
  708. package/dist/lib/util/types.js.map +1 -0
  709. package/dist/lib/util/url.d.ts +4 -0
  710. package/dist/lib/util/url.js +13 -0
  711. package/dist/lib/util/url.js.map +1 -0
  712. package/dist/lib/util/url.test.d.ts +1 -0
  713. package/dist/lib/util/url.test.js +26 -0
  714. package/dist/lib/util/url.test.js.map +1 -0
  715. package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
  716. package/dist/lib/util/useCopyToClipboard.js +11 -0
  717. package/dist/lib/util/useCopyToClipboard.js.map +1 -0
  718. package/dist/lib/util/useExposedProps.d.ts +8 -1
  719. package/dist/lib/util/useExposedProps.js +1 -1
  720. package/dist/lib/util/useExposedProps.js.map +1 -1
  721. package/dist/lib/util/useIsomorphicLayoutEffect.d.ts +3 -0
  722. package/dist/lib/util/useIsomorphicLayoutEffect.js +4 -0
  723. package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -0
  724. package/dist/lib/util/useLatest.d.ts +1 -0
  725. package/dist/lib/util/useLatest.js +15 -0
  726. package/dist/lib/util/useLatest.js.map +1 -0
  727. package/dist/lib/util/useOnScreen.d.ts +5 -0
  728. package/dist/lib/util/useOnScreen.js +19 -0
  729. package/dist/lib/util/useOnScreen.js.map +1 -0
  730. package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
  731. package/dist/lib/util/useScrollToAnchor.js +43 -38
  732. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  733. package/dist/lib/util/useScrollToTop.js +7 -5
  734. package/dist/lib/util/useScrollToTop.js.map +1 -1
  735. package/dist/vite/api/SchemaManager.d.ts +36 -0
  736. package/dist/vite/api/SchemaManager.js +141 -0
  737. package/dist/vite/api/SchemaManager.js.map +1 -0
  738. package/dist/vite/api/SchemaManager.test.d.ts +1 -0
  739. package/dist/vite/api/SchemaManager.test.js +106 -0
  740. package/dist/vite/api/SchemaManager.test.js.map +1 -0
  741. package/dist/vite/api/schema-codegen.d.ts +12 -0
  742. package/dist/vite/api/schema-codegen.js +116 -0
  743. package/dist/vite/api/schema-codegen.js.map +1 -0
  744. package/dist/vite/api/schema-codegen.test.d.ts +1 -0
  745. package/dist/vite/api/schema-codegen.test.js +395 -0
  746. package/dist/vite/api/schema-codegen.test.js.map +1 -0
  747. package/dist/vite/build.js +58 -18
  748. package/dist/vite/build.js.map +1 -1
  749. package/dist/vite/config.d.ts +2 -10
  750. package/dist/vite/config.js +115 -112
  751. package/dist/vite/config.js.map +1 -1
  752. package/dist/vite/config.test.js +12 -6
  753. package/dist/vite/config.test.js.map +1 -1
  754. package/dist/vite/create-pagefind-index.d.ts +4 -0
  755. package/dist/vite/create-pagefind-index.js +12 -0
  756. package/dist/vite/create-pagefind-index.js.map +1 -0
  757. package/dist/vite/css/collect.d.ts +2 -0
  758. package/dist/vite/css/collect.js +27 -0
  759. package/dist/vite/css/collect.js.map +1 -0
  760. package/dist/vite/css/plugin.d.ts +4 -0
  761. package/dist/vite/css/plugin.js +91 -0
  762. package/dist/vite/css/plugin.js.map +1 -0
  763. package/dist/vite/dev-server.d.ts +5 -3
  764. package/dist/vite/dev-server.js +81 -22
  765. package/dist/vite/dev-server.js.map +1 -1
  766. package/dist/vite/error-handler.d.ts +1 -1
  767. package/dist/vite/error-handler.js +1 -1
  768. package/dist/vite/error-handler.js.map +1 -1
  769. package/dist/vite/html.d.ts +7 -3
  770. package/dist/vite/html.js +15 -11
  771. package/dist/vite/html.js.map +1 -1
  772. package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
  773. package/dist/vite/mdx/remark-last-modified.js +29 -0
  774. package/dist/vite/mdx/remark-last-modified.js.map +1 -0
  775. package/dist/vite/mdx/utils.d.ts +2 -0
  776. package/dist/vite/mdx/utils.js +31 -0
  777. package/dist/vite/mdx/utils.js.map +1 -0
  778. package/dist/vite/output.d.ts +15 -3
  779. package/dist/vite/output.js +46 -16
  780. package/dist/vite/output.js.map +1 -1
  781. package/dist/vite/plugin-api-keys.d.ts +1 -2
  782. package/dist/vite/plugin-api-keys.js +13 -7
  783. package/dist/vite/plugin-api-keys.js.map +1 -1
  784. package/dist/vite/plugin-api.d.ts +1 -2
  785. package/dist/vite/plugin-api.js +146 -32
  786. package/dist/vite/plugin-api.js.map +1 -1
  787. package/dist/vite/plugin-auth.d.ts +1 -2
  788. package/dist/vite/plugin-auth.js +10 -6
  789. package/dist/vite/plugin-auth.js.map +1 -1
  790. package/dist/vite/plugin-component.d.ts +1 -2
  791. package/dist/vite/plugin-component.js +23 -22
  792. package/dist/vite/plugin-component.js.map +1 -1
  793. package/dist/vite/plugin-config-reload.d.ts +3 -4
  794. package/dist/vite/plugin-config-reload.js +31 -23
  795. package/dist/vite/plugin-config-reload.js.map +1 -1
  796. package/dist/vite/plugin-config.d.ts +1 -2
  797. package/dist/vite/plugin-config.js +27 -2
  798. package/dist/vite/plugin-config.js.map +1 -1
  799. package/dist/vite/plugin-custom-pages.d.ts +1 -2
  800. package/dist/vite/plugin-custom-pages.js +7 -6
  801. package/dist/vite/plugin-custom-pages.js.map +1 -1
  802. package/dist/vite/plugin-docs.d.ts +2 -3
  803. package/dist/vite/plugin-docs.js +73 -46
  804. package/dist/vite/plugin-docs.js.map +1 -1
  805. package/dist/vite/plugin-frontmatter.d.ts +1 -2
  806. package/dist/vite/plugin-frontmatter.js +13 -7
  807. package/dist/vite/plugin-frontmatter.js.map +1 -1
  808. package/dist/vite/plugin-mdx.d.ts +1 -8
  809. package/dist/vite/plugin-mdx.js +72 -26
  810. package/dist/vite/plugin-mdx.js.map +1 -1
  811. package/dist/vite/plugin-navigation.d.ts +4 -0
  812. package/dist/vite/plugin-navigation.js +64 -0
  813. package/dist/vite/plugin-navigation.js.map +1 -0
  814. package/dist/vite/plugin-redirect.d.ts +1 -2
  815. package/dist/vite/plugin-redirect.js +6 -5
  816. package/dist/vite/plugin-redirect.js.map +1 -1
  817. package/dist/vite/plugin-search.d.ts +1 -2
  818. package/dist/vite/plugin-search.js +8 -3
  819. package/dist/vite/plugin-search.js.map +1 -1
  820. package/dist/vite/plugin-shiki-register.d.ts +2 -0
  821. package/dist/vite/plugin-shiki-register.js +39 -0
  822. package/dist/vite/plugin-shiki-register.js.map +1 -0
  823. package/dist/vite/plugin-theme.d.ts +8 -0
  824. package/dist/vite/plugin-theme.js +274 -0
  825. package/dist/vite/plugin-theme.js.map +1 -0
  826. package/dist/vite/plugin-theme.test.d.ts +1 -0
  827. package/dist/vite/plugin-theme.test.js +312 -0
  828. package/dist/vite/plugin-theme.test.js.map +1 -0
  829. package/dist/vite/plugin.d.ts +1 -3
  830. package/dist/vite/plugin.js +24 -21
  831. package/dist/vite/plugin.js.map +1 -1
  832. package/dist/vite/prerender/FileWritingResponse.d.ts +25 -0
  833. package/dist/vite/prerender/FileWritingResponse.js +51 -0
  834. package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
  835. package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
  836. package/dist/vite/prerender/InMemoryResponse.js +32 -0
  837. package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
  838. package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
  839. package/dist/vite/prerender/PrerenderResponse.js +2 -0
  840. package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
  841. package/dist/vite/prerender/prerender.d.ts +15 -0
  842. package/dist/vite/prerender/prerender.js +109 -0
  843. package/dist/vite/prerender/prerender.js.map +1 -0
  844. package/dist/vite/prerender/worker.d.ts +13 -0
  845. package/dist/vite/prerender/worker.js +63 -0
  846. package/dist/vite/prerender/worker.js.map +1 -0
  847. package/dist/vite/remarkStaticGeneration.d.ts +3 -0
  848. package/dist/vite/remarkStaticGeneration.js +125 -0
  849. package/dist/vite/remarkStaticGeneration.js.map +1 -0
  850. package/dist/vite/reporter.d.ts +3 -0
  851. package/dist/vite/reporter.js +33 -0
  852. package/dist/vite/reporter.js.map +1 -0
  853. package/dist/vite/shadcn-registry.d.ts +45 -0
  854. package/dist/vite/shadcn-registry.js +29 -0
  855. package/dist/vite/shadcn-registry.js.map +1 -0
  856. package/dist/vite/sitemap.d.ts +1 -1
  857. package/dist/vite/sitemap.js +2 -1
  858. package/dist/vite/sitemap.js.map +1 -1
  859. package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
  860. package/dist/zuplo/enrich-with-zuplo.js +185 -0
  861. package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
  862. package/dist/zuplo/policy-types.d.ts +33 -0
  863. package/dist/zuplo/policy-types.js +8 -0
  864. package/dist/zuplo/policy-types.js.map +1 -0
  865. package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
  866. package/dist/zuplo/with-zuplo-processors.js +26 -0
  867. package/dist/zuplo/with-zuplo-processors.js.map +1 -0
  868. package/dist/zuplo/with-zuplo.d.ts +6 -0
  869. package/dist/zuplo/with-zuplo.js +10 -0
  870. package/dist/zuplo/with-zuplo.js.map +1 -0
  871. package/lib/Alert-De-0F8I9.js +161 -0
  872. package/lib/Alert-De-0F8I9.js.map +1 -0
  873. package/lib/Button-B3o-2Xdf.js +51 -0
  874. package/lib/Button-B3o-2Xdf.js.map +1 -0
  875. package/lib/Card-CMDQUPM4.js +61 -0
  876. package/lib/Card-CMDQUPM4.js.map +1 -0
  877. package/lib/ClientOnly-E7hGysn1.js +11 -0
  878. package/lib/ClientOnly-E7hGysn1.js.map +1 -0
  879. package/lib/CodeBlock-B-G0eKtw.js +85 -0
  880. package/lib/CodeBlock-B-G0eKtw.js.map +1 -0
  881. package/lib/Command-C9AC5cf-.js +140 -0
  882. package/lib/Command-C9AC5cf-.js.map +1 -0
  883. package/lib/Dialog-DMWw1doX.js +99 -0
  884. package/lib/Dialog-DMWw1doX.js.map +1 -0
  885. package/lib/Drawer-DJ05s2pH.js +1133 -0
  886. package/lib/Drawer-DJ05s2pH.js.map +1 -0
  887. package/lib/MdxPage-Cipn_ReM.js +110 -0
  888. package/lib/MdxPage-Cipn_ReM.js.map +1 -0
  889. package/lib/OAuthErrorPage-DpNmpL61.js +150 -0
  890. package/lib/OAuthErrorPage-DpNmpL61.js.map +1 -0
  891. package/lib/OasProvider-6hriUaZr.js +35 -0
  892. package/lib/OasProvider-6hriUaZr.js.map +1 -0
  893. package/lib/OperationList-o1tnXlAi.js +5167 -0
  894. package/lib/OperationList-o1tnXlAi.js.map +1 -0
  895. package/lib/Pagination-BtZ4LBGC.js +37 -0
  896. package/lib/Pagination-BtZ4LBGC.js.map +1 -0
  897. package/lib/RouteGuard-BxsRhHRt.js +738 -0
  898. package/lib/RouteGuard-BxsRhHRt.js.map +1 -0
  899. package/lib/SchemaList-XZWLQ9Iu.js +149 -0
  900. package/lib/SchemaList-XZWLQ9Iu.js.map +1 -0
  901. package/lib/SchemaView-CnCipUNH.js +366 -0
  902. package/lib/SchemaView-CnCipUNH.js.map +1 -0
  903. package/lib/SignUp-CEKqv066.js +56 -0
  904. package/lib/SignUp-CEKqv066.js.map +1 -0
  905. package/lib/Slot-DAyXieeZ.js +15726 -0
  906. package/lib/Slot-DAyXieeZ.js.map +1 -0
  907. package/lib/Spinner-mNLZ6awP.js +7 -0
  908. package/lib/Spinner-mNLZ6awP.js.map +1 -0
  909. package/lib/SyntaxHighlight-BMKR4pl6.js +10306 -0
  910. package/lib/SyntaxHighlight-BMKR4pl6.js.map +1 -0
  911. package/lib/Toc-BKDRCQzU.js +92 -0
  912. package/lib/Toc-BKDRCQzU.js.map +1 -0
  913. package/lib/ZudokuContext-CLl5w57E.js +1278 -0
  914. package/lib/ZudokuContext-CLl5w57E.js.map +1 -0
  915. package/lib/chunk-QMGIS6GS-CEOk3lro.js +1839 -0
  916. package/lib/chunk-QMGIS6GS-CEOk3lro.js.map +1 -0
  917. package/lib/circular-NO6Ikm3k.js +14934 -0
  918. package/lib/circular-NO6Ikm3k.js.map +1 -0
  919. package/lib/clsx-OuTLNxxd.js +17 -0
  920. package/lib/clsx-OuTLNxxd.js.map +1 -0
  921. package/lib/cn-dYga0KKN.js +2731 -0
  922. package/lib/cn-dYga0KKN.js.map +1 -0
  923. package/lib/createServer-CSgplJuR.js +12505 -0
  924. package/lib/createServer-CSgplJuR.js.map +1 -0
  925. package/lib/errors-D036swsq.js +45 -0
  926. package/lib/errors-D036swsq.js.map +1 -0
  927. package/lib/hook-DbUCLQNg.js +247 -0
  928. package/lib/hook-DbUCLQNg.js.map +1 -0
  929. package/lib/index-BdJ_3lZe.js +3500 -0
  930. package/lib/index-BdJ_3lZe.js.map +1 -0
  931. package/lib/index-BkW9tJ6j.js +2094 -0
  932. package/lib/index-BkW9tJ6j.js.map +1 -0
  933. package/lib/index-Bm35Tkgf.js +107 -0
  934. package/lib/index-Bm35Tkgf.js.map +1 -0
  935. package/lib/index-BtBsh6LU.js +4081 -0
  936. package/lib/index-BtBsh6LU.js.map +1 -0
  937. package/lib/index-CrcNWbel.js +316 -0
  938. package/lib/index-CrcNWbel.js.map +1 -0
  939. package/lib/index-DI5SPFK9.js +36 -0
  940. package/lib/index-DI5SPFK9.js.map +1 -0
  941. package/lib/index-DmNq2fbN.js +4827 -0
  942. package/lib/index-DmNq2fbN.js.map +1 -0
  943. package/lib/index.esm-CpVp4hQq.js +1254 -0
  944. package/lib/index.esm-CpVp4hQq.js.map +1 -0
  945. package/lib/invariant-Bm-FVUQE.js +44 -0
  946. package/lib/invariant-Bm-FVUQE.js.map +1 -0
  947. package/lib/jsx-runtime-C5mzlN2N.js +285 -0
  948. package/lib/jsx-runtime-C5mzlN2N.js.map +1 -0
  949. package/lib/processors/removeExtensions.js +11 -0
  950. package/lib/processors/removeExtensions.js.map +1 -0
  951. package/lib/processors/removeParameters.js +47 -0
  952. package/lib/processors/removeParameters.js.map +1 -0
  953. package/lib/processors/removePaths.js +28 -0
  954. package/lib/processors/removePaths.js.map +1 -0
  955. package/lib/processors/traverse.js +17 -0
  956. package/lib/processors/traverse.js.map +1 -0
  957. package/lib/ui/Accordion.js +2 -2
  958. package/lib/ui/Accordion.js.map +1 -1
  959. package/lib/ui/ActionButton.js +25 -0
  960. package/lib/ui/ActionButton.js.map +1 -0
  961. package/lib/ui/Alert.js +55 -39
  962. package/lib/ui/Alert.js.map +1 -1
  963. package/lib/ui/AlertDialog.js +2 -2
  964. package/lib/ui/AlertDialog.js.map +1 -1
  965. package/lib/ui/Badge.js +5 -4
  966. package/lib/ui/Badge.js.map +1 -1
  967. package/lib/ui/Breadcrumb.js +5 -5
  968. package/lib/ui/Breadcrumb.js.map +1 -1
  969. package/lib/ui/Button.js +22 -19
  970. package/lib/ui/Button.js.map +1 -1
  971. package/lib/ui/Callout.js +40 -20
  972. package/lib/ui/Callout.js.map +1 -1
  973. package/lib/ui/Card.js +3 -3
  974. package/lib/ui/Card.js.map +1 -1
  975. package/lib/ui/Carousel.js +552 -546
  976. package/lib/ui/Carousel.js.map +1 -1
  977. package/lib/ui/Checkbox.js +14 -13
  978. package/lib/ui/Checkbox.js.map +1 -1
  979. package/lib/ui/CodeBlock.js +9 -0
  980. package/lib/ui/CodeBlock.js.map +1 -0
  981. package/lib/ui/Command.js +116 -510
  982. package/lib/ui/Command.js.map +1 -1
  983. package/lib/ui/Dialog.js +41 -41
  984. package/lib/ui/Dialog.js.map +1 -1
  985. package/lib/ui/Drawer.js +14 -1150
  986. package/lib/ui/Drawer.js.map +1 -1
  987. package/lib/ui/DropdownMenu.js +35 -35
  988. package/lib/ui/DropdownMenu.js.map +1 -1
  989. package/lib/ui/EmbeddedCodeBlock.js +80 -0
  990. package/lib/ui/EmbeddedCodeBlock.js.map +1 -0
  991. package/lib/ui/Form.js +6 -6
  992. package/lib/ui/Form.js.map +1 -1
  993. package/lib/ui/HoverCard.js +6 -6
  994. package/lib/ui/HoverCard.js.map +1 -1
  995. package/lib/ui/Input.js +3 -3
  996. package/lib/ui/Input.js.map +1 -1
  997. package/lib/ui/Label.js +3 -3
  998. package/lib/ui/Label.js.map +1 -1
  999. package/lib/ui/Pagination.js +5 -5
  1000. package/lib/ui/Pagination.js.map +1 -1
  1001. package/lib/ui/Popover.js +3 -3
  1002. package/lib/ui/Popover.js.map +1 -1
  1003. package/lib/ui/Progress.js +2 -2
  1004. package/lib/ui/Progress.js.map +1 -1
  1005. package/lib/ui/RadioGroup.js +11 -11
  1006. package/lib/ui/RadioGroup.js.map +1 -1
  1007. package/lib/ui/ScrollArea.js +2 -2
  1008. package/lib/ui/ScrollArea.js.map +1 -1
  1009. package/lib/ui/Select.js +34 -34
  1010. package/lib/ui/Select.js.map +1 -1
  1011. package/lib/ui/Skeleton.js +2 -2
  1012. package/lib/ui/Skeleton.js.map +1 -1
  1013. package/lib/ui/Slider.js +6 -6
  1014. package/lib/ui/Slider.js.map +1 -1
  1015. package/lib/ui/Stepper.js +6 -0
  1016. package/lib/ui/Stepper.js.map +1 -0
  1017. package/lib/ui/Switch.js +6 -6
  1018. package/lib/ui/Switch.js.map +1 -1
  1019. package/lib/ui/SyntaxHighlight.js +11 -0
  1020. package/lib/ui/SyntaxHighlight.js.map +1 -0
  1021. package/lib/ui/Tabs.js +17 -17
  1022. package/lib/ui/Tabs.js.map +1 -1
  1023. package/lib/ui/Textarea.js +6 -6
  1024. package/lib/ui/Textarea.js.map +1 -1
  1025. package/lib/ui/Toggle.js +8 -8
  1026. package/lib/ui/Toggle.js.map +1 -1
  1027. package/lib/ui/ToggleGroup.js +2 -2
  1028. package/lib/ui/ToggleGroup.js.map +1 -1
  1029. package/lib/ui/Tooltip.js +15 -8
  1030. package/lib/ui/Tooltip.js.map +1 -1
  1031. package/lib/ui/util.js +6 -0
  1032. package/lib/ui/util.js.map +1 -0
  1033. package/lib/useExposedProps-KcgXHKeE.js +9 -0
  1034. package/lib/useExposedProps-KcgXHKeE.js.map +1 -0
  1035. package/lib/zudoku.auth-auth0.js +32 -30
  1036. package/lib/zudoku.auth-auth0.js.map +1 -1
  1037. package/lib/zudoku.auth-azureb2c.js +137 -0
  1038. package/lib/zudoku.auth-azureb2c.js.map +1 -0
  1039. package/lib/zudoku.auth-clerk.js +108 -60
  1040. package/lib/zudoku.auth-clerk.js.map +1 -1
  1041. package/lib/zudoku.auth-openid.js +600 -623
  1042. package/lib/zudoku.auth-openid.js.map +1 -1
  1043. package/lib/zudoku.auth-supabase.js +97 -0
  1044. package/lib/zudoku.auth-supabase.js.map +1 -0
  1045. package/lib/zudoku.components.js +34 -1464
  1046. package/lib/zudoku.components.js.map +1 -1
  1047. package/lib/zudoku.hooks.js +28 -0
  1048. package/lib/zudoku.hooks.js.map +1 -0
  1049. package/lib/zudoku.icons.js +10 -0
  1050. package/lib/zudoku.icons.js.map +1 -1
  1051. package/lib/zudoku.plugin-api-catalog.js +118 -0
  1052. package/lib/zudoku.plugin-api-catalog.js.map +1 -0
  1053. package/lib/zudoku.plugin-api-keys.js +560 -204
  1054. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  1055. package/lib/zudoku.plugin-custom-pages.js +12 -18
  1056. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  1057. package/lib/zudoku.plugin-markdown.js +20 -93
  1058. package/lib/zudoku.plugin-markdown.js.map +1 -1
  1059. package/lib/zudoku.plugin-openapi.js +8 -10
  1060. package/lib/zudoku.plugin-openapi.js.map +1 -1
  1061. package/lib/zudoku.plugin-redirect.js +1 -1
  1062. package/lib/zudoku.plugin-redirect.js.map +1 -1
  1063. package/lib/zudoku.plugin-search-inkeep.js +61 -36
  1064. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  1065. package/lib/zudoku.plugin-search-pagefind.js +325 -0
  1066. package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
  1067. package/lib/zudoku.plugins.js +15 -0
  1068. package/lib/zudoku.plugins.js.map +1 -0
  1069. package/package.json +187 -101
  1070. package/src/app/ZuploBuildConfig.ts +33 -0
  1071. package/src/app/defaultTheme.css +73 -0
  1072. package/src/app/demo-cdn.html +31 -31
  1073. package/src/app/demo.html +1 -1
  1074. package/src/app/demo.tsx +25 -11
  1075. package/src/app/entry.client.tsx +67 -3
  1076. package/src/app/entry.server.tsx +80 -65
  1077. package/src/app/env.ts +43 -0
  1078. package/src/app/font.geist.css +73 -0
  1079. package/src/app/main.css +177 -130
  1080. package/src/app/main.tsx +72 -50
  1081. package/src/app/sentry.ts +24 -0
  1082. package/src/app/standalone.tsx +8 -11
  1083. package/src/lib/MissingIcon.tsx +22 -0
  1084. package/src/lib/auth/issuer.test.ts +120 -0
  1085. package/src/lib/auth/issuer.ts +41 -0
  1086. package/src/lib/authentication/AuthenticationPlugin.tsx +8 -5
  1087. package/src/lib/authentication/authentication.ts +7 -8
  1088. package/src/lib/authentication/components/CallbackHandler.tsx +29 -12
  1089. package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
  1090. package/src/lib/authentication/components/SignIn.tsx +28 -2
  1091. package/src/lib/authentication/components/SignOut.tsx +3 -2
  1092. package/src/lib/authentication/components/SignUp.tsx +35 -1
  1093. package/src/lib/authentication/errors.ts +27 -13
  1094. package/src/lib/authentication/hook.ts +15 -4
  1095. package/src/lib/authentication/providers/auth0.tsx +29 -19
  1096. package/src/lib/authentication/providers/azureb2c.tsx +201 -0
  1097. package/src/lib/authentication/providers/clerk.tsx +127 -53
  1098. package/src/lib/authentication/providers/openid.tsx +169 -88
  1099. package/src/lib/authentication/providers/supabase.tsx +150 -0
  1100. package/src/lib/authentication/state.ts +86 -25
  1101. package/src/lib/authentication/use-broadcast/LICENSE.md +9 -0
  1102. package/src/lib/authentication/use-broadcast/shared.ts +372 -0
  1103. package/src/lib/authentication/use-broadcast/useBroadcast.ts +146 -0
  1104. package/src/lib/components/AnchorLink.tsx +13 -8
  1105. package/src/lib/components/Autocomplete.tsx +114 -0
  1106. package/src/lib/components/Banner.tsx +3 -3
  1107. package/src/lib/components/Bootstrap.tsx +43 -16
  1108. package/src/lib/components/BuildCheck.tsx +75 -0
  1109. package/src/lib/components/CategoryHeading.tsx +4 -1
  1110. package/src/lib/components/ClientOnly.tsx +6 -3
  1111. package/src/lib/components/DeveloperHint.tsx +6 -1
  1112. package/src/lib/components/ErrorPage.tsx +3 -3
  1113. package/src/lib/components/Footer.tsx +136 -0
  1114. package/src/lib/components/Framed.tsx +51 -0
  1115. package/src/lib/components/Header.tsx +119 -80
  1116. package/src/lib/components/Heading.tsx +26 -18
  1117. package/src/lib/components/InlineCode.tsx +13 -16
  1118. package/src/lib/components/Layout.tsx +36 -60
  1119. package/src/lib/components/Main.tsx +51 -0
  1120. package/src/lib/components/Markdown.tsx +42 -30
  1121. package/src/lib/components/MobileTopNavigation.tsx +96 -32
  1122. package/src/lib/components/NotFoundPage.tsx +7 -6
  1123. package/src/lib/components/PageProgress.tsx +28 -0
  1124. package/src/lib/components/Pagination.tsx +45 -0
  1125. package/src/lib/components/PathRenderer.tsx +61 -0
  1126. package/src/lib/components/ReactMarkdown.license.txt +21 -0
  1127. package/src/lib/components/ReactMarkdown.tsx +264 -0
  1128. package/src/lib/components/Search.tsx +18 -7
  1129. package/src/lib/components/Slot.test.tsx +465 -0
  1130. package/src/lib/components/Slot.tsx +64 -0
  1131. package/src/lib/components/StatusPage.tsx +96 -0
  1132. package/src/lib/components/ThemeSwitch.tsx +46 -0
  1133. package/src/lib/components/TopNavigation.tsx +91 -61
  1134. package/src/lib/components/Typography.tsx +14 -0
  1135. package/src/lib/components/Zudoku.tsx +119 -0
  1136. package/src/lib/components/cache.ts +23 -0
  1137. package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
  1138. package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
  1139. package/src/lib/components/context/SlotProvider.tsx +149 -0
  1140. package/src/lib/components/context/ViewportAnchorContext.tsx +34 -36
  1141. package/src/lib/components/context/ZudokuContext.ts +79 -38
  1142. package/src/lib/components/context/ZudokuProvider.tsx +4 -3
  1143. package/src/lib/components/index.ts +37 -13
  1144. package/src/lib/components/navigation/Navigation.tsx +50 -0
  1145. package/src/lib/components/navigation/NavigationBadge.tsx +48 -0
  1146. package/src/lib/components/navigation/NavigationCategory.tsx +146 -0
  1147. package/src/lib/components/navigation/NavigationItem.tsx +159 -0
  1148. package/src/lib/components/navigation/NavigationWrapper.tsx +49 -0
  1149. package/src/lib/components/navigation/PoweredByZudoku.tsx +33 -0
  1150. package/src/lib/components/navigation/Toc.tsx +126 -0
  1151. package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
  1152. package/src/lib/components/navigation/ZuploLogo.tsx +14 -0
  1153. package/src/lib/components/navigation/utils.ts +70 -29
  1154. package/src/lib/core/RouteGuard.tsx +96 -0
  1155. package/src/lib/core/ZudokuContext.ts +227 -0
  1156. package/src/lib/core/plugins.ts +55 -24
  1157. package/src/lib/errors/ErrorAlert.tsx +18 -18
  1158. package/src/lib/errors/RouterError.tsx +1 -1
  1159. package/src/lib/hooks/index.ts +16 -0
  1160. package/src/lib/hooks/useEvent.test.tsx +151 -0
  1161. package/src/lib/hooks/useEvent.ts +41 -0
  1162. package/src/lib/hooks/useHotkey.ts +70 -0
  1163. package/src/lib/icons.ts +1 -0
  1164. package/src/lib/oas/graphql/circular.ts +58 -0
  1165. package/src/lib/oas/graphql/index.ts +298 -104
  1166. package/src/lib/oas/parser/dereference/index.ts +10 -4
  1167. package/src/lib/oas/parser/index.ts +14 -30
  1168. package/src/lib/oas/parser/upgrade/index.ts +103 -38
  1169. package/src/lib/plugins/api-catalog/Catalog.tsx +73 -0
  1170. package/src/lib/plugins/api-catalog/index.tsx +115 -0
  1171. package/src/lib/plugins/api-keys/CreateApiKey.tsx +61 -45
  1172. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
  1173. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +464 -116
  1174. package/src/lib/plugins/api-keys/index.tsx +141 -62
  1175. package/src/lib/plugins/custom-pages/index.tsx +22 -17
  1176. package/src/lib/plugins/markdown/MdxPage.tsx +111 -54
  1177. package/src/lib/plugins/markdown/index.tsx +33 -43
  1178. package/src/lib/plugins/openapi/CollapsibleCode.tsx +86 -0
  1179. package/src/lib/plugins/openapi/ColorizedParam.tsx +49 -23
  1180. package/src/lib/plugins/openapi/Endpoint.tsx +19 -22
  1181. package/src/lib/plugins/openapi/OasProvider.tsx +51 -0
  1182. package/src/lib/plugins/openapi/OperationList.tsx +234 -72
  1183. package/src/lib/plugins/openapi/OperationListItem.tsx +123 -94
  1184. package/src/lib/plugins/openapi/ParamInfos.tsx +90 -0
  1185. package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
  1186. package/src/lib/plugins/openapi/ParameterListItem.tsx +84 -31
  1187. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +28 -3
  1188. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +15 -33
  1189. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +36 -59
  1190. package/src/lib/plugins/openapi/SchemaList.tsx +157 -0
  1191. package/src/lib/plugins/openapi/Sidecar.tsx +154 -172
  1192. package/src/lib/plugins/openapi/SidecarBox.tsx +4 -16
  1193. package/src/lib/plugins/openapi/SidecarExamples.tsx +169 -0
  1194. package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
  1195. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +65 -0
  1196. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +16 -0
  1197. package/src/lib/plugins/openapi/client/createServer.ts +8 -2
  1198. package/src/lib/plugins/openapi/client/useCreateQuery.ts +45 -0
  1199. package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
  1200. package/src/lib/plugins/openapi/components/EnumValues.tsx +58 -0
  1201. package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -0
  1202. package/src/lib/plugins/openapi/components/SelectOnClick.tsx +29 -0
  1203. package/src/lib/plugins/openapi/context.tsx +2 -2
  1204. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +11 -18
  1205. package/src/lib/plugins/openapi/graphql/gql.ts +38 -30
  1206. package/src/lib/plugins/openapi/graphql/graphql.ts +388 -682
  1207. package/src/lib/plugins/openapi/index.tsx +161 -134
  1208. package/src/lib/plugins/openapi/interfaces.ts +59 -4
  1209. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +55 -0
  1210. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
  1211. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +59 -0
  1212. package/src/lib/plugins/openapi/playground/Headers.tsx +284 -53
  1213. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +75 -0
  1214. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +38 -0
  1215. package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
  1216. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +13 -0
  1217. package/src/lib/plugins/openapi/playground/PathParams.tsx +38 -64
  1218. package/src/lib/plugins/openapi/playground/Playground.tsx +405 -288
  1219. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +7 -3
  1220. package/src/lib/plugins/openapi/playground/QueryParams.tsx +134 -90
  1221. package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
  1222. package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
  1223. package/src/lib/plugins/openapi/playground/fileUtils.ts +32 -0
  1224. package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
  1225. package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
  1226. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
  1227. package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
  1228. package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +115 -0
  1229. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +271 -0
  1230. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +102 -0
  1231. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
  1232. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
  1233. package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +20 -0
  1234. package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +222 -0
  1235. package/src/lib/plugins/openapi/processors/removeExtensions.ts +29 -0
  1236. package/src/lib/plugins/openapi/processors/removeParameters.test.ts +182 -0
  1237. package/src/lib/plugins/openapi/processors/removeParameters.ts +103 -0
  1238. package/src/lib/plugins/openapi/processors/removePaths.test.ts +167 -0
  1239. package/src/lib/plugins/openapi/processors/removePaths.ts +57 -0
  1240. package/src/lib/plugins/openapi/processors/traverse.ts +1 -0
  1241. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
  1242. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
  1243. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
  1244. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +39 -0
  1245. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +159 -0
  1246. package/src/lib/plugins/openapi/schema/SchemaView.tsx +103 -141
  1247. package/src/lib/plugins/openapi/schema/utils.ts +33 -5
  1248. package/src/lib/plugins/openapi/state.ts +36 -0
  1249. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +107 -0
  1250. package/src/lib/plugins/openapi/util/createNavigationCategory.tsx +38 -0
  1251. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +95 -44
  1252. package/src/lib/plugins/openapi/util/getRoutes.tsx +198 -0
  1253. package/src/lib/plugins/openapi/util/methodColorMap.tsx +11 -0
  1254. package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
  1255. package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
  1256. package/src/lib/plugins/redirect/index.tsx +4 -4
  1257. package/src/lib/plugins/search-inkeep/index.tsx +83 -32
  1258. package/src/lib/plugins/search-inkeep/inkeep.ts +15 -23
  1259. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +165 -0
  1260. package/src/lib/plugins/search-pagefind/ResultList.tsx +114 -0
  1261. package/src/lib/plugins/search-pagefind/get-results.tsx +75 -0
  1262. package/src/lib/plugins/search-pagefind/index.tsx +21 -0
  1263. package/src/lib/plugins/search-pagefind/types.ts +118 -0
  1264. package/src/lib/shiki.ts +132 -0
  1265. package/src/lib/ui/ActionButton.tsx +30 -0
  1266. package/src/lib/ui/Alert.tsx +45 -39
  1267. package/src/lib/ui/Badge.tsx +3 -2
  1268. package/src/lib/ui/Button.tsx +12 -7
  1269. package/src/lib/ui/Callout.tsx +30 -10
  1270. package/src/lib/ui/Card.tsx +1 -1
  1271. package/src/lib/ui/Checkbox.tsx +2 -1
  1272. package/src/lib/ui/CodeBlock.tsx +88 -0
  1273. package/src/lib/ui/Command.tsx +47 -5
  1274. package/src/lib/ui/Dialog.tsx +11 -7
  1275. package/src/lib/ui/DropdownMenu.tsx +4 -4
  1276. package/src/lib/ui/EmbeddedCodeBlock.tsx +94 -0
  1277. package/src/lib/ui/HoverCard.tsx +1 -1
  1278. package/src/lib/ui/Input.tsx +2 -3
  1279. package/src/lib/ui/Popover.tsx +1 -1
  1280. package/src/lib/ui/RadioGroup.tsx +1 -1
  1281. package/src/lib/ui/Select.tsx +4 -4
  1282. package/src/lib/ui/Slider.tsx +1 -1
  1283. package/src/lib/ui/Stepper.tsx +8 -0
  1284. package/src/lib/ui/Switch.tsx +1 -1
  1285. package/src/lib/ui/SyntaxHighlight.tsx +35 -0
  1286. package/src/lib/ui/Tabs.tsx +2 -2
  1287. package/src/lib/ui/Textarea.tsx +1 -1
  1288. package/src/lib/ui/Toggle.tsx +1 -1
  1289. package/src/lib/ui/Tooltip.tsx +16 -1
  1290. package/src/lib/ui/util.tsx +3 -0
  1291. package/src/lib/util/MdxComponents.tsx +50 -25
  1292. package/src/lib/util/createVariantComponent.tsx +2 -2
  1293. package/src/lib/util/detectOS.ts +9 -0
  1294. package/src/lib/util/ensureArray.ts +3 -0
  1295. package/src/lib/util/humanFileSize.test.ts +24 -0
  1296. package/src/lib/util/humanFileSize.ts +16 -0
  1297. package/src/lib/util/invariant.ts +7 -5
  1298. package/src/lib/util/joinPath.tsx +3 -0
  1299. package/src/lib/util/joinUrl.test.ts +62 -0
  1300. package/src/lib/util/joinUrl.ts +57 -0
  1301. package/src/lib/util/os.ts +18 -0
  1302. package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
  1303. package/src/lib/util/traverse.ts +34 -0
  1304. package/src/lib/util/types.ts +7 -0
  1305. package/src/lib/util/url.test.ts +51 -0
  1306. package/src/lib/util/url.ts +18 -0
  1307. package/src/lib/util/useCopyToClipboard.ts +17 -0
  1308. package/src/lib/util/useExposedProps.tsx +13 -2
  1309. package/src/lib/util/useIsomorphicLayoutEffect.ts +5 -0
  1310. package/src/lib/util/useLatest.ts +18 -0
  1311. package/src/lib/util/useOnScreen.ts +34 -0
  1312. package/src/lib/util/useScrollToAnchor.ts +49 -40
  1313. package/src/lib/util/useScrollToTop.ts +9 -4
  1314. package/src/shiki/langs/abap.js +1 -0
  1315. package/src/shiki/langs/actionscript-3.js +1 -0
  1316. package/src/shiki/langs/ada.js +1 -0
  1317. package/src/shiki/langs/angular-expression.js +1 -0
  1318. package/src/shiki/langs/angular-html.js +1 -0
  1319. package/src/shiki/langs/angular-inline-style.js +1 -0
  1320. package/src/shiki/langs/angular-inline-template.js +1 -0
  1321. package/src/shiki/langs/angular-let-declaration.js +1 -0
  1322. package/src/shiki/langs/angular-template-blocks.js +1 -0
  1323. package/src/shiki/langs/angular-template.js +1 -0
  1324. package/src/shiki/langs/angular-ts.js +1 -0
  1325. package/src/shiki/langs/apache.js +1 -0
  1326. package/src/shiki/langs/apex.js +1 -0
  1327. package/src/shiki/langs/apl.js +1 -0
  1328. package/src/shiki/langs/applescript.js +1 -0
  1329. package/src/shiki/langs/ara.js +1 -0
  1330. package/src/shiki/langs/asciidoc.js +1 -0
  1331. package/src/shiki/langs/asm.js +1 -0
  1332. package/src/shiki/langs/astro.js +1 -0
  1333. package/src/shiki/langs/awk.js +1 -0
  1334. package/src/shiki/langs/ballerina.js +1 -0
  1335. package/src/shiki/langs/bat.js +1 -0
  1336. package/src/shiki/langs/beancount.js +1 -0
  1337. package/src/shiki/langs/berry.js +1 -0
  1338. package/src/shiki/langs/bibtex.js +1 -0
  1339. package/src/shiki/langs/bicep.js +1 -0
  1340. package/src/shiki/langs/blade.js +1 -0
  1341. package/src/shiki/langs/bsl.js +1 -0
  1342. package/src/shiki/langs/c.js +1 -0
  1343. package/src/shiki/langs/cadence.js +1 -0
  1344. package/src/shiki/langs/cairo.js +1 -0
  1345. package/src/shiki/langs/clarity.js +1 -0
  1346. package/src/shiki/langs/clojure.js +1 -0
  1347. package/src/shiki/langs/cmake.js +1 -0
  1348. package/src/shiki/langs/cobol.js +1 -0
  1349. package/src/shiki/langs/codeowners.js +1 -0
  1350. package/src/shiki/langs/codeql.js +1 -0
  1351. package/src/shiki/langs/coffee.js +1 -0
  1352. package/src/shiki/langs/common-lisp.js +1 -0
  1353. package/src/shiki/langs/coq.js +1 -0
  1354. package/src/shiki/langs/cpp-macro.js +1 -0
  1355. package/src/shiki/langs/cpp.js +1 -0
  1356. package/src/shiki/langs/crystal.js +1 -0
  1357. package/src/shiki/langs/csharp.js +1 -0
  1358. package/src/shiki/langs/css.js +1 -0
  1359. package/src/shiki/langs/csv.js +1 -0
  1360. package/src/shiki/langs/cue.js +1 -0
  1361. package/src/shiki/langs/cypher.js +1 -0
  1362. package/src/shiki/langs/d.js +1 -0
  1363. package/src/shiki/langs/dart.js +1 -0
  1364. package/src/shiki/langs/dax.js +1 -0
  1365. package/src/shiki/langs/desktop.js +1 -0
  1366. package/src/shiki/langs/diff.js +1 -0
  1367. package/src/shiki/langs/docker.js +1 -0
  1368. package/src/shiki/langs/dotenv.js +1 -0
  1369. package/src/shiki/langs/dream-maker.js +1 -0
  1370. package/src/shiki/langs/edge.js +1 -0
  1371. package/src/shiki/langs/elixir.js +1 -0
  1372. package/src/shiki/langs/elm.js +1 -0
  1373. package/src/shiki/langs/emacs-lisp.js +1 -0
  1374. package/src/shiki/langs/erb.js +1 -0
  1375. package/src/shiki/langs/erlang.js +1 -0
  1376. package/src/shiki/langs/es-tag-css.js +1 -0
  1377. package/src/shiki/langs/es-tag-glsl.js +1 -0
  1378. package/src/shiki/langs/es-tag-html.js +1 -0
  1379. package/src/shiki/langs/es-tag-sql.js +1 -0
  1380. package/src/shiki/langs/es-tag-xml.js +1 -0
  1381. package/src/shiki/langs/fennel.js +1 -0
  1382. package/src/shiki/langs/fish.js +1 -0
  1383. package/src/shiki/langs/fluent.js +1 -0
  1384. package/src/shiki/langs/fortran-fixed-form.js +1 -0
  1385. package/src/shiki/langs/fortran-free-form.js +1 -0
  1386. package/src/shiki/langs/fsharp.js +1 -0
  1387. package/src/shiki/langs/gdresource.js +1 -0
  1388. package/src/shiki/langs/gdscript.js +1 -0
  1389. package/src/shiki/langs/gdshader.js +1 -0
  1390. package/src/shiki/langs/genie.js +1 -0
  1391. package/src/shiki/langs/gherkin.js +1 -0
  1392. package/src/shiki/langs/git-commit.js +1 -0
  1393. package/src/shiki/langs/git-rebase.js +1 -0
  1394. package/src/shiki/langs/gleam.js +1 -0
  1395. package/src/shiki/langs/glimmer-js.js +1 -0
  1396. package/src/shiki/langs/glimmer-ts.js +1 -0
  1397. package/src/shiki/langs/glsl.js +1 -0
  1398. package/src/shiki/langs/gnuplot.js +1 -0
  1399. package/src/shiki/langs/go.js +1 -0
  1400. package/src/shiki/langs/graphql.js +1 -0
  1401. package/src/shiki/langs/groovy.js +1 -0
  1402. package/src/shiki/langs/hack.js +1 -0
  1403. package/src/shiki/langs/haml.js +1 -0
  1404. package/src/shiki/langs/handlebars.js +1 -0
  1405. package/src/shiki/langs/haskell.js +1 -0
  1406. package/src/shiki/langs/haxe.js +1 -0
  1407. package/src/shiki/langs/hcl.js +1 -0
  1408. package/src/shiki/langs/hjson.js +1 -0
  1409. package/src/shiki/langs/hlsl.js +1 -0
  1410. package/src/shiki/langs/html-derivative.js +1 -0
  1411. package/src/shiki/langs/html.js +1 -0
  1412. package/src/shiki/langs/http.js +1 -0
  1413. package/src/shiki/langs/hxml.js +1 -0
  1414. package/src/shiki/langs/hy.js +1 -0
  1415. package/src/shiki/langs/imba.js +1 -0
  1416. package/src/shiki/langs/ini.js +1 -0
  1417. package/src/shiki/langs/java.js +1 -0
  1418. package/src/shiki/langs/javascript.js +1 -0
  1419. package/src/shiki/langs/jinja-html.js +1 -0
  1420. package/src/shiki/langs/jinja.js +1 -0
  1421. package/src/shiki/langs/jison.js +1 -0
  1422. package/src/shiki/langs/json.js +1 -0
  1423. package/src/shiki/langs/json5.js +1 -0
  1424. package/src/shiki/langs/jsonc.js +1 -0
  1425. package/src/shiki/langs/jsonl.js +1 -0
  1426. package/src/shiki/langs/jsonnet.js +1 -0
  1427. package/src/shiki/langs/jssm.js +1 -0
  1428. package/src/shiki/langs/jsx.js +1 -0
  1429. package/src/shiki/langs/julia.js +1 -0
  1430. package/src/shiki/langs/kotlin.js +1 -0
  1431. package/src/shiki/langs/kusto.js +1 -0
  1432. package/src/shiki/langs/latex.js +1 -0
  1433. package/src/shiki/langs/lean.js +1 -0
  1434. package/src/shiki/langs/less.js +1 -0
  1435. package/src/shiki/langs/liquid.js +1 -0
  1436. package/src/shiki/langs/llvm.js +1 -0
  1437. package/src/shiki/langs/log.js +1 -0
  1438. package/src/shiki/langs/logo.js +1 -0
  1439. package/src/shiki/langs/lua.js +1 -0
  1440. package/src/shiki/langs/luau.js +1 -0
  1441. package/src/shiki/langs/make.js +1 -0
  1442. package/src/shiki/langs/markdown-vue.js +1 -0
  1443. package/src/shiki/langs/markdown.js +1 -0
  1444. package/src/shiki/langs/marko.js +1 -0
  1445. package/src/shiki/langs/matlab.js +1 -0
  1446. package/src/shiki/langs/mdc.js +1 -0
  1447. package/src/shiki/langs/mdx.js +1 -0
  1448. package/src/shiki/langs/mermaid.js +1 -0
  1449. package/src/shiki/langs/mipsasm.js +1 -0
  1450. package/src/shiki/langs/mojo.js +1 -0
  1451. package/src/shiki/langs/move.js +1 -0
  1452. package/src/shiki/langs/narrat.js +1 -0
  1453. package/src/shiki/langs/nextflow.js +1 -0
  1454. package/src/shiki/langs/nginx.js +1 -0
  1455. package/src/shiki/langs/nim.js +1 -0
  1456. package/src/shiki/langs/nix.js +1 -0
  1457. package/src/shiki/langs/nushell.js +1 -0
  1458. package/src/shiki/langs/objective-c.js +1 -0
  1459. package/src/shiki/langs/objective-cpp.js +1 -0
  1460. package/src/shiki/langs/ocaml.js +1 -0
  1461. package/src/shiki/langs/pascal.js +1 -0
  1462. package/src/shiki/langs/perl.js +1 -0
  1463. package/src/shiki/langs/php.js +1 -0
  1464. package/src/shiki/langs/plsql.js +1 -0
  1465. package/src/shiki/langs/po.js +1 -0
  1466. package/src/shiki/langs/polar.js +1 -0
  1467. package/src/shiki/langs/postcss.js +1 -0
  1468. package/src/shiki/langs/powerquery.js +1 -0
  1469. package/src/shiki/langs/powershell.js +1 -0
  1470. package/src/shiki/langs/prisma.js +1 -0
  1471. package/src/shiki/langs/prolog.js +1 -0
  1472. package/src/shiki/langs/proto.js +1 -0
  1473. package/src/shiki/langs/pug.js +1 -0
  1474. package/src/shiki/langs/puppet.js +1 -0
  1475. package/src/shiki/langs/purescript.js +1 -0
  1476. package/src/shiki/langs/python.js +1 -0
  1477. package/src/shiki/langs/qml.js +1 -0
  1478. package/src/shiki/langs/qmldir.js +1 -0
  1479. package/src/shiki/langs/qss.js +1 -0
  1480. package/src/shiki/langs/r.js +1 -0
  1481. package/src/shiki/langs/racket.js +1 -0
  1482. package/src/shiki/langs/raku.js +1 -0
  1483. package/src/shiki/langs/razor.js +1 -0
  1484. package/src/shiki/langs/reg.js +1 -0
  1485. package/src/shiki/langs/regexp.js +1 -0
  1486. package/src/shiki/langs/rel.js +1 -0
  1487. package/src/shiki/langs/riscv.js +1 -0
  1488. package/src/shiki/langs/rst.js +1 -0
  1489. package/src/shiki/langs/ruby.js +1 -0
  1490. package/src/shiki/langs/rust.js +1 -0
  1491. package/src/shiki/langs/sas.js +1 -0
  1492. package/src/shiki/langs/sass.js +1 -0
  1493. package/src/shiki/langs/scala.js +1 -0
  1494. package/src/shiki/langs/scheme.js +1 -0
  1495. package/src/shiki/langs/scss.js +1 -0
  1496. package/src/shiki/langs/sdbl.js +1 -0
  1497. package/src/shiki/langs/shaderlab.js +1 -0
  1498. package/src/shiki/langs/shellscript.js +1 -0
  1499. package/src/shiki/langs/shellsession.js +1 -0
  1500. package/src/shiki/langs/smalltalk.js +1 -0
  1501. package/src/shiki/langs/solidity.js +1 -0
  1502. package/src/shiki/langs/soy.js +1 -0
  1503. package/src/shiki/langs/sparql.js +1 -0
  1504. package/src/shiki/langs/splunk.js +1 -0
  1505. package/src/shiki/langs/sql.js +1 -0
  1506. package/src/shiki/langs/ssh-config.js +1 -0
  1507. package/src/shiki/langs/stata.js +1 -0
  1508. package/src/shiki/langs/stylus.js +1 -0
  1509. package/src/shiki/langs/svelte.js +1 -0
  1510. package/src/shiki/langs/swift.js +1 -0
  1511. package/src/shiki/langs/system-verilog.js +1 -0
  1512. package/src/shiki/langs/systemd.js +1 -0
  1513. package/src/shiki/langs/talonscript.js +1 -0
  1514. package/src/shiki/langs/tasl.js +1 -0
  1515. package/src/shiki/langs/tcl.js +1 -0
  1516. package/src/shiki/langs/templ.js +1 -0
  1517. package/src/shiki/langs/terraform.js +1 -0
  1518. package/src/shiki/langs/tex.js +1 -0
  1519. package/src/shiki/langs/toml.js +1 -0
  1520. package/src/shiki/langs/ts-tags.js +1 -0
  1521. package/src/shiki/langs/tsv.js +1 -0
  1522. package/src/shiki/langs/tsx.js +1 -0
  1523. package/src/shiki/langs/turtle.js +1 -0
  1524. package/src/shiki/langs/twig.js +1 -0
  1525. package/src/shiki/langs/typescript.js +1 -0
  1526. package/src/shiki/langs/typespec.js +1 -0
  1527. package/src/shiki/langs/typst.js +1 -0
  1528. package/src/shiki/langs/v.js +1 -0
  1529. package/src/shiki/langs/vala.js +1 -0
  1530. package/src/shiki/langs/vb.js +1 -0
  1531. package/src/shiki/langs/verilog.js +1 -0
  1532. package/src/shiki/langs/vhdl.js +1 -0
  1533. package/src/shiki/langs/viml.js +1 -0
  1534. package/src/shiki/langs/vue-directives.js +1 -0
  1535. package/src/shiki/langs/vue-html.js +1 -0
  1536. package/src/shiki/langs/vue-interpolations.js +1 -0
  1537. package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
  1538. package/src/shiki/langs/vue.js +1 -0
  1539. package/src/shiki/langs/vyper.js +1 -0
  1540. package/src/shiki/langs/wasm.js +1 -0
  1541. package/src/shiki/langs/wenyan.js +1 -0
  1542. package/src/shiki/langs/wgsl.js +1 -0
  1543. package/src/shiki/langs/wikitext.js +1 -0
  1544. package/src/shiki/langs/wit.js +1 -0
  1545. package/src/shiki/langs/wolfram.js +1 -0
  1546. package/src/shiki/langs/xml.js +1 -0
  1547. package/src/shiki/langs/xsl.js +1 -0
  1548. package/src/shiki/langs/yaml.js +1 -0
  1549. package/src/shiki/langs/zenscript.js +1 -0
  1550. package/src/shiki/langs/zig.js +1 -0
  1551. package/src/shiki/themes/andromeeda.js +1 -0
  1552. package/src/shiki/themes/aurora-x.js +1 -0
  1553. package/src/shiki/themes/ayu-dark.js +1 -0
  1554. package/src/shiki/themes/catppuccin-frappe.js +1 -0
  1555. package/src/shiki/themes/catppuccin-latte.js +1 -0
  1556. package/src/shiki/themes/catppuccin-macchiato.js +1 -0
  1557. package/src/shiki/themes/catppuccin-mocha.js +1 -0
  1558. package/src/shiki/themes/dark-plus.js +1 -0
  1559. package/src/shiki/themes/dracula-soft.js +1 -0
  1560. package/src/shiki/themes/dracula.js +1 -0
  1561. package/src/shiki/themes/everforest-dark.js +1 -0
  1562. package/src/shiki/themes/everforest-light.js +1 -0
  1563. package/src/shiki/themes/github-dark-default.js +1 -0
  1564. package/src/shiki/themes/github-dark-dimmed.js +1 -0
  1565. package/src/shiki/themes/github-dark-high-contrast.js +1 -0
  1566. package/src/shiki/themes/github-dark.js +1 -0
  1567. package/src/shiki/themes/github-light-default.js +1 -0
  1568. package/src/shiki/themes/github-light-high-contrast.js +1 -0
  1569. package/src/shiki/themes/github-light.js +1 -0
  1570. package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
  1571. package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
  1572. package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
  1573. package/src/shiki/themes/gruvbox-light-hard.js +1 -0
  1574. package/src/shiki/themes/gruvbox-light-medium.js +1 -0
  1575. package/src/shiki/themes/gruvbox-light-soft.js +1 -0
  1576. package/src/shiki/themes/houston.js +1 -0
  1577. package/src/shiki/themes/kanagawa-dragon.js +1 -0
  1578. package/src/shiki/themes/kanagawa-lotus.js +1 -0
  1579. package/src/shiki/themes/kanagawa-wave.js +1 -0
  1580. package/src/shiki/themes/laserwave.js +1 -0
  1581. package/src/shiki/themes/light-plus.js +1 -0
  1582. package/src/shiki/themes/material-theme-darker.js +1 -0
  1583. package/src/shiki/themes/material-theme-lighter.js +1 -0
  1584. package/src/shiki/themes/material-theme-ocean.js +1 -0
  1585. package/src/shiki/themes/material-theme-palenight.js +1 -0
  1586. package/src/shiki/themes/material-theme.js +1 -0
  1587. package/src/shiki/themes/min-dark.js +1 -0
  1588. package/src/shiki/themes/min-light.js +1 -0
  1589. package/src/shiki/themes/monokai.js +1 -0
  1590. package/src/shiki/themes/night-owl.js +1 -0
  1591. package/src/shiki/themes/nord.js +1 -0
  1592. package/src/shiki/themes/one-dark-pro.js +1 -0
  1593. package/src/shiki/themes/one-light.js +1 -0
  1594. package/src/shiki/themes/plastic.js +1 -0
  1595. package/src/shiki/themes/poimandres.js +1 -0
  1596. package/src/shiki/themes/red.js +1 -0
  1597. package/src/shiki/themes/rose-pine-dawn.js +1 -0
  1598. package/src/shiki/themes/rose-pine-moon.js +1 -0
  1599. package/src/shiki/themes/rose-pine.js +1 -0
  1600. package/src/shiki/themes/slack-dark.js +1 -0
  1601. package/src/shiki/themes/slack-ochin.js +1 -0
  1602. package/src/shiki/themes/snazzy-light.js +1 -0
  1603. package/src/shiki/themes/solarized-dark.js +1 -0
  1604. package/src/shiki/themes/solarized-light.js +1 -0
  1605. package/src/shiki/themes/synthwave-84.js +1 -0
  1606. package/src/shiki/themes/tokyo-night.js +1 -0
  1607. package/src/shiki/themes/vesper.js +1 -0
  1608. package/src/shiki/themes/vitesse-black.js +1 -0
  1609. package/src/shiki/themes/vitesse-dark.js +1 -0
  1610. package/src/shiki/themes/vitesse-light.js +1 -0
  1611. package/LICENSE.md +0 -9
  1612. package/client.d.ts +0 -1
  1613. package/dist/app/tailwind.d.ts +0 -3
  1614. package/dist/app/tailwind.js +0 -65
  1615. package/dist/app/tailwind.js.map +0 -1
  1616. package/dist/config/validators/InputSidebarSchema.d.ts +0 -201
  1617. package/dist/config/validators/InputSidebarSchema.js +0 -52
  1618. package/dist/config/validators/InputSidebarSchema.js.map +0 -1
  1619. package/dist/config/validators/SidebarSchema.d.ts +0 -46
  1620. package/dist/config/validators/SidebarSchema.js +0 -118
  1621. package/dist/config/validators/SidebarSchema.js.map +0 -1
  1622. package/dist/lib/components/DevPortal.d.ts +0 -7
  1623. package/dist/lib/components/DevPortal.js +0 -54
  1624. package/dist/lib/components/DevPortal.js.map +0 -1
  1625. package/dist/lib/components/SlotletProvider.d.ts +0 -17
  1626. package/dist/lib/components/SlotletProvider.js +0 -18
  1627. package/dist/lib/components/SlotletProvider.js.map +0 -1
  1628. package/dist/lib/components/SyntaxHighlight.d.ts +0 -11
  1629. package/dist/lib/components/SyntaxHighlight.js +0 -53
  1630. package/dist/lib/components/SyntaxHighlight.js.map +0 -1
  1631. package/dist/lib/components/context/PluginSystem.js +0 -2
  1632. package/dist/lib/components/context/PluginSystem.js.map +0 -1
  1633. package/dist/lib/components/context/ThemeContext.d.ts +0 -2
  1634. package/dist/lib/components/context/ThemeContext.js +0 -7
  1635. package/dist/lib/components/context/ThemeContext.js.map +0 -1
  1636. package/dist/lib/components/context/ThemeProvider.d.ts +0 -4
  1637. package/dist/lib/components/context/ThemeProvider.js +0 -23
  1638. package/dist/lib/components/context/ThemeProvider.js.map +0 -1
  1639. package/dist/lib/components/navigation/Sidebar.d.ts +0 -1
  1640. package/dist/lib/components/navigation/Sidebar.js +0 -14
  1641. package/dist/lib/components/navigation/Sidebar.js.map +0 -1
  1642. package/dist/lib/components/navigation/SidebarBadge.d.ts +0 -23
  1643. package/dist/lib/components/navigation/SidebarBadge.js +0 -24
  1644. package/dist/lib/components/navigation/SidebarBadge.js.map +0 -1
  1645. package/dist/lib/components/navigation/SidebarCategory.d.ts +0 -5
  1646. package/dist/lib/components/navigation/SidebarCategory.js +0 -50
  1647. package/dist/lib/components/navigation/SidebarCategory.js.map +0 -1
  1648. package/dist/lib/components/navigation/SidebarItem.d.ts +0 -12
  1649. package/dist/lib/components/navigation/SidebarItem.js +0 -48
  1650. package/dist/lib/components/navigation/SidebarItem.js.map +0 -1
  1651. package/dist/lib/components/navigation/SidebarWrapper.d.ts +0 -6
  1652. package/dist/lib/components/navigation/SidebarWrapper.js +0 -6
  1653. package/dist/lib/components/navigation/SidebarWrapper.js.map +0 -1
  1654. package/dist/lib/core/DevPortalContext.d.ts +0 -75
  1655. package/dist/lib/core/DevPortalContext.js +0 -49
  1656. package/dist/lib/core/DevPortalContext.js.map +0 -1
  1657. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
  1658. package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
  1659. package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
  1660. package/dist/lib/plugins/markdown/Toc.js +0 -48
  1661. package/dist/lib/plugins/markdown/Toc.js.map +0 -1
  1662. package/dist/lib/plugins/markdown/resolver.d.ts +0 -38
  1663. package/dist/lib/plugins/markdown/resolver.js +0 -75
  1664. package/dist/lib/plugins/markdown/resolver.js.map +0 -1
  1665. package/dist/lib/plugins/openapi/Route.d.ts +0 -6
  1666. package/dist/lib/plugins/openapi/Route.js +0 -8
  1667. package/dist/lib/plugins/openapi/Route.js.map +0 -1
  1668. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +0 -12
  1669. package/dist/lib/plugins/openapi/client/createMemoryClient.js +0 -46
  1670. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +0 -1
  1671. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +0 -10
  1672. package/dist/lib/plugins/openapi/client/createWorkerClient.js +0 -61
  1673. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +0 -1
  1674. package/dist/lib/plugins/openapi/client/interfaces.d.ts +0 -4
  1675. package/dist/lib/plugins/openapi/client/interfaces.js +0 -2
  1676. package/dist/lib/plugins/openapi/client/interfaces.js.map +0 -1
  1677. package/dist/lib/plugins/openapi/client/worker.js +0 -20
  1678. package/dist/lib/plugins/openapi/client/worker.js.map +0 -1
  1679. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
  1680. package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
  1681. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
  1682. package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
  1683. package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
  1684. package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
  1685. package/dist/lib/plugins/openapi/schema/SchemaComponents.d.ts +0 -13
  1686. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +0 -28
  1687. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
  1688. package/dist/lib/plugins/openapi-worker.d.ts +0 -1
  1689. package/dist/lib/plugins/openapi-worker.js +0 -2
  1690. package/dist/lib/plugins/openapi-worker.js.map +0 -1
  1691. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
  1692. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
  1693. package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
  1694. package/dist/lib/themeToggle.d.ts +0 -1
  1695. package/dist/lib/themeToggle.js +0 -7
  1696. package/dist/lib/themeToggle.js.map +0 -1
  1697. package/dist/lib/util/createWaitForNotify.d.ts +0 -1
  1698. package/dist/lib/util/createWaitForNotify.js +0 -15
  1699. package/dist/lib/util/createWaitForNotify.js.map +0 -1
  1700. package/dist/vite/plugin-custom-css.d.ts +0 -6
  1701. package/dist/vite/plugin-custom-css.js +0 -55
  1702. package/dist/vite/plugin-custom-css.js.map +0 -1
  1703. package/dist/vite/plugin-docs.test.js +0 -30
  1704. package/dist/vite/plugin-docs.test.js.map +0 -1
  1705. package/dist/vite/plugin-html-transform.d.ts +0 -2
  1706. package/dist/vite/plugin-html-transform.js +0 -15
  1707. package/dist/vite/plugin-html-transform.js.map +0 -1
  1708. package/dist/vite/plugin-sidebar.d.ts +0 -3
  1709. package/dist/vite/plugin-sidebar.js +0 -47
  1710. package/dist/vite/plugin-sidebar.js.map +0 -1
  1711. package/dist/vite/prerender.d.ts +0 -21
  1712. package/dist/vite/prerender.js +0 -88
  1713. package/dist/vite/prerender.js.map +0 -1
  1714. package/lib/AnchorLink-BbB2q-jx.js +0 -705
  1715. package/lib/AnchorLink-BbB2q-jx.js.map +0 -1
  1716. package/lib/AuthenticationPlugin-C9BHGXlE.js +0 -55
  1717. package/lib/AuthenticationPlugin-C9BHGXlE.js.map +0 -1
  1718. package/lib/CategoryHeading-Bb9dqxD3.js +0 -10
  1719. package/lib/CategoryHeading-Bb9dqxD3.js.map +0 -1
  1720. package/lib/ClientOnly-CVN6leDu.js +0 -11
  1721. package/lib/ClientOnly-CVN6leDu.js.map +0 -1
  1722. package/lib/DeveloperHint-DHdLXGHA.js +0 -16
  1723. package/lib/DeveloperHint-DHdLXGHA.js.map +0 -1
  1724. package/lib/Dialog-k70Qfukb.js +0 -67
  1725. package/lib/Dialog-k70Qfukb.js.map +0 -1
  1726. package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
  1727. package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
  1728. package/lib/Markdown-BDcCAWwm.js +0 -18059
  1729. package/lib/Markdown-BDcCAWwm.js.map +0 -1
  1730. package/lib/MdxPage-DKMH_t0f.js +0 -174
  1731. package/lib/MdxPage-DKMH_t0f.js.map +0 -1
  1732. package/lib/OperationList-Tj7ubW_t.js +0 -604
  1733. package/lib/OperationList-Tj7ubW_t.js.map +0 -1
  1734. package/lib/Route-C3DGB6OS.js +0 -13
  1735. package/lib/Route-C3DGB6OS.js.map +0 -1
  1736. package/lib/Select-Bagt3Bme.js +0 -223
  1737. package/lib/Select-Bagt3Bme.js.map +0 -1
  1738. package/lib/SlotletProvider-Da7eFgd2.js +0 -241
  1739. package/lib/SlotletProvider-Da7eFgd2.js.map +0 -1
  1740. package/lib/Spinner-C6zroowC.js +0 -40
  1741. package/lib/Spinner-C6zroowC.js.map +0 -1
  1742. package/lib/StaggeredRender-DDHSzQKE.js +0 -17
  1743. package/lib/StaggeredRender-DDHSzQKE.js.map +0 -1
  1744. package/lib/ZudokuContext-BKXGJTmu.js +0 -1222
  1745. package/lib/ZudokuContext-BKXGJTmu.js.map +0 -1
  1746. package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
  1747. package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
  1748. package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
  1749. package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
  1750. package/lib/assets/index-B_Jk_Yzp.js +0 -4820
  1751. package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
  1752. package/lib/assets/worker-Bf8vjASY.js +0 -18197
  1753. package/lib/assets/worker-Bf8vjASY.js.map +0 -1
  1754. package/lib/cn-BmFQLtkS.js +0 -2279
  1755. package/lib/cn-BmFQLtkS.js.map +0 -1
  1756. package/lib/hook-sn0zMTkE.js +0 -229
  1757. package/lib/hook-sn0zMTkE.js.map +0 -1
  1758. package/lib/index-AjWCJNGC.js +0 -5690
  1759. package/lib/index-AjWCJNGC.js.map +0 -1
  1760. package/lib/index-Bn6Lc9tq.js +0 -9
  1761. package/lib/index-Bn6Lc9tq.js.map +0 -1
  1762. package/lib/index-BuAyrJe3.js +0 -46
  1763. package/lib/index-BuAyrJe3.js.map +0 -1
  1764. package/lib/index-CRo94sKK.js +0 -1783
  1765. package/lib/index-CRo94sKK.js.map +0 -1
  1766. package/lib/index-CkwDvuPt.js +0 -4820
  1767. package/lib/index-CkwDvuPt.js.map +0 -1
  1768. package/lib/index-LNp6rxyU.js +0 -2094
  1769. package/lib/index-LNp6rxyU.js.map +0 -1
  1770. package/lib/index.esm-C5mr_sKO.js +0 -1193
  1771. package/lib/index.esm-C5mr_sKO.js.map +0 -1
  1772. package/lib/invariant-Caa8-XvF.js +0 -26
  1773. package/lib/invariant-Caa8-XvF.js.map +0 -1
  1774. package/lib/jsx-runtime-B6kdoens.js +0 -635
  1775. package/lib/jsx-runtime-B6kdoens.js.map +0 -1
  1776. package/lib/prism-bash.min-DadFsM4Z.js +0 -7
  1777. package/lib/prism-bash.min-DadFsM4Z.js.map +0 -1
  1778. package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
  1779. package/lib/prism-csharp.min-Yizuc34Y.js.map +0 -1
  1780. package/lib/prism-java.min-d5iT_mOd.js +0 -7
  1781. package/lib/prism-java.min-d5iT_mOd.js.map +0 -1
  1782. package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
  1783. package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
  1784. package/lib/prism-json.min-B1GJqK1k.js +0 -2
  1785. package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
  1786. package/lib/prism-markdown.min-F3U-vPBi.js +0 -61
  1787. package/lib/prism-markdown.min-F3U-vPBi.js.map +0 -1
  1788. package/lib/prism-markup-BNGj0Tvm.js +0 -174
  1789. package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
  1790. package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
  1791. package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
  1792. package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
  1793. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
  1794. package/lib/prism-php.min-o7FpoMP_.js +0 -11
  1795. package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
  1796. package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
  1797. package/lib/prism-ruby.min-C7LwcKyz.js.map +0 -1
  1798. package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
  1799. package/lib/prism-typescript.min-oSVeWCAd.js.map +0 -1
  1800. package/lib/router-BsfSoK2j.js +0 -3024
  1801. package/lib/router-BsfSoK2j.js.map +0 -1
  1802. package/lib/state-CsuHT8ZO.js +0 -183
  1803. package/lib/state-CsuHT8ZO.js.map +0 -1
  1804. package/lib/urql-core-KJnLL26g.js +0 -1455
  1805. package/lib/urql-core-KJnLL26g.js.map +0 -1
  1806. package/lib/useExposedProps-ChOIUaS4.js +0 -9
  1807. package/lib/useExposedProps-ChOIUaS4.js.map +0 -1
  1808. package/lib/zudoku.openapi-worker.js +0 -16341
  1809. package/lib/zudoku.openapi-worker.js.map +0 -1
  1810. package/src/app/tailwind.ts +0 -68
  1811. package/src/lib/components/DevPortal.tsx +0 -111
  1812. package/src/lib/components/SlotletProvider.tsx +0 -55
  1813. package/src/lib/components/SyntaxHighlight.tsx +0 -126
  1814. package/src/lib/components/context/PluginSystem.ts +0 -0
  1815. package/src/lib/components/context/ThemeContext.tsx +0 -8
  1816. package/src/lib/components/context/ThemeProvider.tsx +0 -27
  1817. package/src/lib/components/navigation/Sidebar.tsx +0 -39
  1818. package/src/lib/components/navigation/SidebarBadge.tsx +0 -43
  1819. package/src/lib/components/navigation/SidebarCategory.tsx +0 -137
  1820. package/src/lib/components/navigation/SidebarItem.tsx +0 -127
  1821. package/src/lib/components/navigation/SidebarWrapper.tsx +0 -26
  1822. package/src/lib/core/DevPortalContext.ts +0 -136
  1823. package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
  1824. package/src/lib/plugins/markdown/Toc.tsx +0 -135
  1825. package/src/lib/plugins/markdown/resolver.ts +0 -92
  1826. package/src/lib/plugins/openapi/Route.tsx +0 -20
  1827. package/src/lib/plugins/openapi/client/createMemoryClient.ts +0 -51
  1828. package/src/lib/plugins/openapi/client/createWorkerClient.ts +0 -75
  1829. package/src/lib/plugins/openapi/client/interfaces.ts +0 -5
  1830. package/src/lib/plugins/openapi/client/worker.ts +0 -30
  1831. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
  1832. package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
  1833. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +0 -126
  1834. package/src/lib/plugins/openapi-worker.ts +0 -1
  1835. package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
  1836. package/src/lib/themeToggle.ts +0 -7
  1837. package/src/lib/util/createWaitForNotify.ts +0 -18
  1838. /package/dist/{lib/components/context/PluginSystem.d.ts → config/validators/InputNavigationSchema.test-d.d.ts} +0 -0
  1839. /package/dist/{lib/plugins/openapi/client/worker.d.ts → config/validators/validate.test.d.ts} +0 -0
  1840. /package/dist/{vite/plugin-docs.test.d.ts → lib/auth/issuer.test.d.ts} +0 -0
  1841. /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
@@ -1,4820 +0,0 @@
1
- const dt = Symbol.for("yaml.alias"), lt = Symbol.for("yaml.document"), Y = Symbol.for("yaml.map"), qt = Symbol.for("yaml.pair"), U = Symbol.for("yaml.scalar"), he = Symbol.for("yaml.seq"), j = Symbol.for("yaml.node.type"), x = (s) => !!s && typeof s == "object" && s[j] === dt, ee = (s) => !!s && typeof s == "object" && s[j] === lt, de = (s) => !!s && typeof s == "object" && s[j] === Y, I = (s) => !!s && typeof s == "object" && s[j] === qt, E = (s) => !!s && typeof s == "object" && s[j] === U, pe = (s) => !!s && typeof s == "object" && s[j] === he;
2
- function L(s) {
3
- if (s && typeof s == "object")
4
- switch (s[j]) {
5
- case Y:
6
- case he:
7
- return !0;
8
- }
9
- return !1;
10
- }
11
- function $(s) {
12
- if (s && typeof s == "object")
13
- switch (s[j]) {
14
- case dt:
15
- case Y:
16
- case U:
17
- case he:
18
- return !0;
19
- }
20
- return !1;
21
- }
22
- const Bs = (s) => (E(s) || L(s)) && !!s.anchor, M = Symbol("break visit"), Rt = Symbol("skip children"), R = Symbol("remove node");
23
- function G(s, e) {
24
- const t = Ut(e);
25
- ee(s) ? ie(null, s.contents, t, Object.freeze([s])) === R && (s.contents = null) : ie(null, s, t, Object.freeze([]));
26
- }
27
- G.BREAK = M;
28
- G.SKIP = Rt;
29
- G.REMOVE = R;
30
- function ie(s, e, t, n) {
31
- const i = Ft(s, e, t, n);
32
- if ($(i) || I(i))
33
- return Vt(s, n, i), ie(s, i, t, n);
34
- if (typeof i != "symbol") {
35
- if (L(e)) {
36
- n = Object.freeze(n.concat(e));
37
- for (let r = 0; r < e.items.length; ++r) {
38
- const o = ie(r, e.items[r], t, n);
39
- if (typeof o == "number")
40
- r = o - 1;
41
- else {
42
- if (o === M)
43
- return M;
44
- o === R && (e.items.splice(r, 1), r -= 1);
45
- }
46
- }
47
- } else if (I(e)) {
48
- n = Object.freeze(n.concat(e));
49
- const r = ie("key", e.key, t, n);
50
- if (r === M)
51
- return M;
52
- r === R && (e.key = null);
53
- const o = ie("value", e.value, t, n);
54
- if (o === M)
55
- return M;
56
- o === R && (e.value = null);
57
- }
58
- }
59
- return i;
60
- }
61
- async function Re(s, e) {
62
- const t = Ut(e);
63
- ee(s) ? await re(null, s.contents, t, Object.freeze([s])) === R && (s.contents = null) : await re(null, s, t, Object.freeze([]));
64
- }
65
- Re.BREAK = M;
66
- Re.SKIP = Rt;
67
- Re.REMOVE = R;
68
- async function re(s, e, t, n) {
69
- const i = await Ft(s, e, t, n);
70
- if ($(i) || I(i))
71
- return Vt(s, n, i), re(s, i, t, n);
72
- if (typeof i != "symbol") {
73
- if (L(e)) {
74
- n = Object.freeze(n.concat(e));
75
- for (let r = 0; r < e.items.length; ++r) {
76
- const o = await re(r, e.items[r], t, n);
77
- if (typeof o == "number")
78
- r = o - 1;
79
- else {
80
- if (o === M)
81
- return M;
82
- o === R && (e.items.splice(r, 1), r -= 1);
83
- }
84
- }
85
- } else if (I(e)) {
86
- n = Object.freeze(n.concat(e));
87
- const r = await re("key", e.key, t, n);
88
- if (r === M)
89
- return M;
90
- r === R && (e.key = null);
91
- const o = await re("value", e.value, t, n);
92
- if (o === M)
93
- return M;
94
- o === R && (e.value = null);
95
- }
96
- }
97
- return i;
98
- }
99
- function Ut(s) {
100
- return typeof s == "object" && (s.Collection || s.Node || s.Value) ? Object.assign({
101
- Alias: s.Node,
102
- Map: s.Node,
103
- Scalar: s.Node,
104
- Seq: s.Node
105
- }, s.Value && {
106
- Map: s.Value,
107
- Scalar: s.Value,
108
- Seq: s.Value
109
- }, s.Collection && {
110
- Map: s.Collection,
111
- Seq: s.Collection
112
- }, s) : s;
113
- }
114
- function Ft(s, e, t, n) {
115
- var i, r, o, l, a;
116
- if (typeof t == "function")
117
- return t(s, e, n);
118
- if (de(e))
119
- return (i = t.Map) == null ? void 0 : i.call(t, s, e, n);
120
- if (pe(e))
121
- return (r = t.Seq) == null ? void 0 : r.call(t, s, e, n);
122
- if (I(e))
123
- return (o = t.Pair) == null ? void 0 : o.call(t, s, e, n);
124
- if (E(e))
125
- return (l = t.Scalar) == null ? void 0 : l.call(t, s, e, n);
126
- if (x(e))
127
- return (a = t.Alias) == null ? void 0 : a.call(t, s, e, n);
128
- }
129
- function Vt(s, e, t) {
130
- const n = e[e.length - 1];
131
- if (L(n))
132
- n.items[s] = t;
133
- else if (I(n))
134
- s === "key" ? n.key = t : n.value = t;
135
- else if (ee(n))
136
- n.contents = t;
137
- else {
138
- const i = x(n) ? "alias" : "scalar";
139
- throw new Error(`Cannot replace node with ${i} parent`);
140
- }
141
- }
142
- const vs = {
143
- "!": "%21",
144
- ",": "%2C",
145
- "[": "%5B",
146
- "]": "%5D",
147
- "{": "%7B",
148
- "}": "%7D"
149
- }, Ms = (s) => s.replace(/[!,[\]{}]/g, (e) => vs[e]);
150
- class v {
151
- constructor(e, t) {
152
- this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, v.defaultYaml, e), this.tags = Object.assign({}, v.defaultTags, t);
153
- }
154
- clone() {
155
- const e = new v(this.yaml, this.tags);
156
- return e.docStart = this.docStart, e;
157
- }
158
- /**
159
- * During parsing, get a Directives instance for the current document and
160
- * update the stream state according to the current version's spec.
161
- */
162
- atDocument() {
163
- const e = new v(this.yaml, this.tags);
164
- switch (this.yaml.version) {
165
- case "1.1":
166
- this.atNextDocument = !0;
167
- break;
168
- case "1.2":
169
- this.atNextDocument = !1, this.yaml = {
170
- explicit: v.defaultYaml.explicit,
171
- version: "1.2"
172
- }, this.tags = Object.assign({}, v.defaultTags);
173
- break;
174
- }
175
- return e;
176
- }
177
- /**
178
- * @param onError - May be called even if the action was successful
179
- * @returns `true` on success
180
- */
181
- add(e, t) {
182
- this.atNextDocument && (this.yaml = { explicit: v.defaultYaml.explicit, version: "1.1" }, this.tags = Object.assign({}, v.defaultTags), this.atNextDocument = !1);
183
- const n = e.trim().split(/[ \t]+/), i = n.shift();
184
- switch (i) {
185
- case "%TAG": {
186
- if (n.length !== 2 && (t(0, "%TAG directive should contain exactly two parts"), n.length < 2))
187
- return !1;
188
- const [r, o] = n;
189
- return this.tags[r] = o, !0;
190
- }
191
- case "%YAML": {
192
- if (this.yaml.explicit = !0, n.length !== 1)
193
- return t(0, "%YAML directive should contain exactly one part"), !1;
194
- const [r] = n;
195
- if (r === "1.1" || r === "1.2")
196
- return this.yaml.version = r, !0;
197
- {
198
- const o = /^\d+\.\d+$/.test(r);
199
- return t(6, `Unsupported YAML version ${r}`, o), !1;
200
- }
201
- }
202
- default:
203
- return t(0, `Unknown directive ${i}`, !0), !1;
204
- }
205
- }
206
- /**
207
- * Resolves a tag, matching handles to those defined in %TAG directives.
208
- *
209
- * @returns Resolved tag, which may also be the non-specific tag `'!'` or a
210
- * `'!local'` tag, or `null` if unresolvable.
211
- */
212
- tagName(e, t) {
213
- if (e === "!")
214
- return "!";
215
- if (e[0] !== "!")
216
- return t(`Not a valid tag: ${e}`), null;
217
- if (e[1] === "<") {
218
- const o = e.slice(2, -1);
219
- return o === "!" || o === "!!" ? (t(`Verbatim tags aren't resolved, so ${e} is invalid.`), null) : (e[e.length - 1] !== ">" && t("Verbatim tags must end with a >"), o);
220
- }
221
- const [, n, i] = e.match(/^(.*!)([^!]*)$/s);
222
- i || t(`The ${e} tag has no suffix`);
223
- const r = this.tags[n];
224
- if (r)
225
- try {
226
- return r + decodeURIComponent(i);
227
- } catch (o) {
228
- return t(String(o)), null;
229
- }
230
- return n === "!" ? e : (t(`Could not resolve tag: ${e}`), null);
231
- }
232
- /**
233
- * Given a fully resolved tag, returns its printable string form,
234
- * taking into account current tag prefixes and defaults.
235
- */
236
- tagString(e) {
237
- for (const [t, n] of Object.entries(this.tags))
238
- if (e.startsWith(n))
239
- return t + Ms(e.substring(n.length));
240
- return e[0] === "!" ? e : `!<${e}>`;
241
- }
242
- toString(e) {
243
- const t = this.yaml.explicit ? [`%YAML ${this.yaml.version || "1.2"}`] : [], n = Object.entries(this.tags);
244
- let i;
245
- if (e && n.length > 0 && $(e.contents)) {
246
- const r = {};
247
- G(e.contents, (o, l) => {
248
- $(l) && l.tag && (r[l.tag] = !0);
249
- }), i = Object.keys(r);
250
- } else
251
- i = [];
252
- for (const [r, o] of n)
253
- r === "!!" && o === "tag:yaml.org,2002:" || (!e || i.some((l) => l.startsWith(o))) && t.push(`%TAG ${r} ${o}`);
254
- return t.join(`
255
- `);
256
- }
257
- }
258
- v.defaultYaml = { explicit: !1, version: "1.2" };
259
- v.defaultTags = { "!!": "tag:yaml.org,2002:" };
260
- function Jt(s) {
261
- if (/[\x00-\x19\s,[\]{}]/.test(s)) {
262
- const t = `Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;
263
- throw new Error(t);
264
- }
265
- return !0;
266
- }
267
- function Yt(s) {
268
- const e = /* @__PURE__ */ new Set();
269
- return G(s, {
270
- Value(t, n) {
271
- n.anchor && e.add(n.anchor);
272
- }
273
- }), e;
274
- }
275
- function Gt(s, e) {
276
- for (let t = 1; ; ++t) {
277
- const n = `${s}${t}`;
278
- if (!e.has(n))
279
- return n;
280
- }
281
- }
282
- function Ks(s, e) {
283
- const t = [], n = /* @__PURE__ */ new Map();
284
- let i = null;
285
- return {
286
- onAnchor: (r) => {
287
- t.push(r), i || (i = Yt(s));
288
- const o = Gt(e, i);
289
- return i.add(o), o;
290
- },
291
- /**
292
- * With circular references, the source node is only resolved after all
293
- * of its child nodes are. This is why anchors are set only after all of
294
- * the nodes have been created.
295
- */
296
- setAnchors: () => {
297
- for (const r of t) {
298
- const o = n.get(r);
299
- if (typeof o == "object" && o.anchor && (E(o.node) || L(o.node)))
300
- o.node.anchor = o.anchor;
301
- else {
302
- const l = new Error("Failed to resolve repeated object (this should not happen)");
303
- throw l.source = r, l;
304
- }
305
- }
306
- },
307
- sourceObjects: n
308
- };
309
- }
310
- function oe(s, e, t, n) {
311
- if (n && typeof n == "object")
312
- if (Array.isArray(n))
313
- for (let i = 0, r = n.length; i < r; ++i) {
314
- const o = n[i], l = oe(s, n, String(i), o);
315
- l === void 0 ? delete n[i] : l !== o && (n[i] = l);
316
- }
317
- else if (n instanceof Map)
318
- for (const i of Array.from(n.keys())) {
319
- const r = n.get(i), o = oe(s, n, i, r);
320
- o === void 0 ? n.delete(i) : o !== r && n.set(i, o);
321
- }
322
- else if (n instanceof Set)
323
- for (const i of Array.from(n)) {
324
- const r = oe(s, n, i, i);
325
- r === void 0 ? n.delete(i) : r !== i && (n.delete(i), n.add(r));
326
- }
327
- else
328
- for (const [i, r] of Object.entries(n)) {
329
- const o = oe(s, n, i, r);
330
- o === void 0 ? delete n[i] : o !== r && (n[i] = o);
331
- }
332
- return s.call(e, t, n);
333
- }
334
- function P(s, e, t) {
335
- if (Array.isArray(s))
336
- return s.map((n, i) => P(n, String(i), t));
337
- if (s && typeof s.toJSON == "function") {
338
- if (!t || !Bs(s))
339
- return s.toJSON(e, t);
340
- const n = { aliasCount: 0, count: 1, res: void 0 };
341
- t.anchors.set(s, n), t.onCreate = (r) => {
342
- n.res = r, delete t.onCreate;
343
- };
344
- const i = s.toJSON(e, t);
345
- return t.onCreate && t.onCreate(i), i;
346
- }
347
- return typeof s == "bigint" && !(t != null && t.keep) ? Number(s) : s;
348
- }
349
- class pt {
350
- constructor(e) {
351
- Object.defineProperty(this, j, { value: e });
352
- }
353
- /** Create a copy of this node. */
354
- clone() {
355
- const e = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
356
- return this.range && (e.range = this.range.slice()), e;
357
- }
358
- /** A plain JavaScript representation of this node. */
359
- toJS(e, { mapAsMap: t, maxAliasCount: n, onAnchor: i, reviver: r } = {}) {
360
- if (!ee(e))
361
- throw new TypeError("A document argument is required");
362
- const o = {
363
- anchors: /* @__PURE__ */ new Map(),
364
- doc: e,
365
- keep: !0,
366
- mapAsMap: t === !0,
367
- mapKeyWarned: !1,
368
- maxAliasCount: typeof n == "number" ? n : 100
369
- }, l = P(this, "", o);
370
- if (typeof i == "function")
371
- for (const { count: a, res: c } of o.anchors.values())
372
- i(c, a);
373
- return typeof r == "function" ? oe(r, { "": l }, "", l) : l;
374
- }
375
- }
376
- class Ue extends pt {
377
- constructor(e) {
378
- super(dt), this.source = e, Object.defineProperty(this, "tag", {
379
- set() {
380
- throw new Error("Alias nodes cannot have tags");
381
- }
382
- });
383
- }
384
- /**
385
- * Resolve the value of this alias within `doc`, finding the last
386
- * instance of the `source` anchor before this node.
387
- */
388
- resolve(e) {
389
- let t;
390
- return G(e, {
391
- Node: (n, i) => {
392
- if (i === this)
393
- return G.BREAK;
394
- i.anchor === this.source && (t = i);
395
- }
396
- }), t;
397
- }
398
- toJSON(e, t) {
399
- if (!t)
400
- return { source: this.source };
401
- const { anchors: n, doc: i, maxAliasCount: r } = t, o = this.resolve(i);
402
- if (!o) {
403
- const a = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
404
- throw new ReferenceError(a);
405
- }
406
- let l = n.get(o);
407
- if (l || (P(o, null, t), l = n.get(o)), !l || l.res === void 0) {
408
- const a = "This should not happen: Alias anchor was not resolved?";
409
- throw new ReferenceError(a);
410
- }
411
- if (r >= 0 && (l.count += 1, l.aliasCount === 0 && (l.aliasCount = Be(i, o, n)), l.count * l.aliasCount > r)) {
412
- const a = "Excessive alias count indicates a resource exhaustion attack";
413
- throw new ReferenceError(a);
414
- }
415
- return l.res;
416
- }
417
- toString(e, t, n) {
418
- const i = `*${this.source}`;
419
- if (e) {
420
- if (Jt(this.source), e.options.verifyAliasOrder && !e.anchors.has(this.source)) {
421
- const r = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
422
- throw new Error(r);
423
- }
424
- if (e.implicitKey)
425
- return `${i} `;
426
- }
427
- return i;
428
- }
429
- }
430
- function Be(s, e, t) {
431
- if (x(e)) {
432
- const n = e.resolve(s), i = t && n && t.get(n);
433
- return i ? i.count * i.aliasCount : 0;
434
- } else if (L(e)) {
435
- let n = 0;
436
- for (const i of e.items) {
437
- const r = Be(s, i, t);
438
- r > n && (n = r);
439
- }
440
- return n;
441
- } else if (I(e)) {
442
- const n = Be(s, e.key, t), i = Be(s, e.value, t);
443
- return Math.max(n, i);
444
- }
445
- return 1;
446
- }
447
- const Qt = (s) => !s || typeof s != "function" && typeof s != "object";
448
- class O extends pt {
449
- constructor(e) {
450
- super(U), this.value = e;
451
- }
452
- toJSON(e, t) {
453
- return t != null && t.keep ? this.value : P(this.value, e, t);
454
- }
455
- toString() {
456
- return String(this.value);
457
- }
458
- }
459
- O.BLOCK_FOLDED = "BLOCK_FOLDED";
460
- O.BLOCK_LITERAL = "BLOCK_LITERAL";
461
- O.PLAIN = "PLAIN";
462
- O.QUOTE_DOUBLE = "QUOTE_DOUBLE";
463
- O.QUOTE_SINGLE = "QUOTE_SINGLE";
464
- const Ps = "tag:yaml.org,2002:";
465
- function js(s, e, t) {
466
- if (e) {
467
- const n = t.filter((r) => r.tag === e), i = n.find((r) => !r.format) ?? n[0];
468
- if (!i)
469
- throw new Error(`Tag ${e} not found`);
470
- return i;
471
- }
472
- return t.find((n) => {
473
- var i;
474
- return ((i = n.identify) == null ? void 0 : i.call(n, s)) && !n.format;
475
- });
476
- }
477
- function ke(s, e, t) {
478
- var f, d, h;
479
- if (ee(s) && (s = s.contents), $(s))
480
- return s;
481
- if (I(s)) {
482
- const y = (d = (f = t.schema[Y]).createNode) == null ? void 0 : d.call(f, t.schema, null, t);
483
- return y.items.push(s), y;
484
- }
485
- (s instanceof String || s instanceof Number || s instanceof Boolean || typeof BigInt < "u" && s instanceof BigInt) && (s = s.valueOf());
486
- const { aliasDuplicateObjects: n, onAnchor: i, onTagObj: r, schema: o, sourceObjects: l } = t;
487
- let a;
488
- if (n && s && typeof s == "object") {
489
- if (a = l.get(s), a)
490
- return a.anchor || (a.anchor = i(s)), new Ue(a.anchor);
491
- a = { anchor: null, node: null }, l.set(s, a);
492
- }
493
- e != null && e.startsWith("!!") && (e = Ps + e.slice(2));
494
- let c = js(s, e, o.tags);
495
- if (!c) {
496
- if (s && typeof s.toJSON == "function" && (s = s.toJSON()), !s || typeof s != "object") {
497
- const y = new O(s);
498
- return a && (a.node = y), y;
499
- }
500
- c = s instanceof Map ? o[Y] : Symbol.iterator in Object(s) ? o[he] : o[Y];
501
- }
502
- r && (r(c), delete t.onTagObj);
503
- const p = c != null && c.createNode ? c.createNode(t.schema, s, t) : typeof ((h = c == null ? void 0 : c.nodeClass) == null ? void 0 : h.from) == "function" ? c.nodeClass.from(t.schema, s, t) : new O(s);
504
- return e ? p.tag = e : c.default || (p.tag = c.tag), a && (a.node = p), p;
505
- }
506
- function Pe(s, e, t) {
507
- let n = t;
508
- for (let i = e.length - 1; i >= 0; --i) {
509
- const r = e[i];
510
- if (typeof r == "number" && Number.isInteger(r) && r >= 0) {
511
- const o = [];
512
- o[r] = n, n = o;
513
- } else
514
- n = /* @__PURE__ */ new Map([[r, n]]);
515
- }
516
- return ke(n, void 0, {
517
- aliasDuplicateObjects: !1,
518
- keepUndefined: !1,
519
- onAnchor: () => {
520
- throw new Error("This should not happen, please report a bug.");
521
- },
522
- schema: s,
523
- sourceObjects: /* @__PURE__ */ new Map()
524
- });
525
- }
526
- const we = (s) => s == null || typeof s == "object" && !!s[Symbol.iterator]().next().done;
527
- class Wt extends pt {
528
- constructor(e, t) {
529
- super(e), Object.defineProperty(this, "schema", {
530
- value: t,
531
- configurable: !0,
532
- enumerable: !1,
533
- writable: !0
534
- });
535
- }
536
- /**
537
- * Create a copy of this collection.
538
- *
539
- * @param schema - If defined, overwrites the original's schema
540
- */
541
- clone(e) {
542
- const t = Object.create(Object.getPrototypeOf(this), Object.getOwnPropertyDescriptors(this));
543
- return e && (t.schema = e), t.items = t.items.map((n) => $(n) || I(n) ? n.clone(e) : n), this.range && (t.range = this.range.slice()), t;
544
- }
545
- /**
546
- * Adds a value to the collection. For `!!map` and `!!omap` the value must
547
- * be a Pair instance or a `{ key, value }` object, which may not have a key
548
- * that already exists in the map.
549
- */
550
- addIn(e, t) {
551
- if (we(e))
552
- this.add(t);
553
- else {
554
- const [n, ...i] = e, r = this.get(n, !0);
555
- if (L(r))
556
- r.addIn(i, t);
557
- else if (r === void 0 && this.schema)
558
- this.set(n, Pe(this.schema, i, t));
559
- else
560
- throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
561
- }
562
- }
563
- /**
564
- * Removes a value from the collection.
565
- * @returns `true` if the item was found and removed.
566
- */
567
- deleteIn(e) {
568
- const [t, ...n] = e;
569
- if (n.length === 0)
570
- return this.delete(t);
571
- const i = this.get(t, !0);
572
- if (L(i))
573
- return i.deleteIn(n);
574
- throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`);
575
- }
576
- /**
577
- * Returns item at `key`, or `undefined` if not found. By default unwraps
578
- * scalar values from their surrounding node; to disable set `keepScalar` to
579
- * `true` (collections are always returned intact).
580
- */
581
- getIn(e, t) {
582
- const [n, ...i] = e, r = this.get(n, !0);
583
- return i.length === 0 ? !t && E(r) ? r.value : r : L(r) ? r.getIn(i, t) : void 0;
584
- }
585
- hasAllNullValues(e) {
586
- return this.items.every((t) => {
587
- if (!I(t))
588
- return !1;
589
- const n = t.value;
590
- return n == null || e && E(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
591
- });
592
- }
593
- /**
594
- * Checks if the collection includes a value with the key `key`.
595
- */
596
- hasIn(e) {
597
- const [t, ...n] = e;
598
- if (n.length === 0)
599
- return this.has(t);
600
- const i = this.get(t, !0);
601
- return L(i) ? i.hasIn(n) : !1;
602
- }
603
- /**
604
- * Sets a value in this collection. For `!!set`, `value` needs to be a
605
- * boolean to add/remove the item from the set.
606
- */
607
- setIn(e, t) {
608
- const [n, ...i] = e;
609
- if (i.length === 0)
610
- this.set(n, t);
611
- else {
612
- const r = this.get(n, !0);
613
- if (L(r))
614
- r.setIn(i, t);
615
- else if (r === void 0 && this.schema)
616
- this.set(n, Pe(this.schema, i, t));
617
- else
618
- throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`);
619
- }
620
- }
621
- }
622
- const Ds = (s) => s.replace(/^(?!$)(?: $)?/gm, "#");
623
- function F(s, e) {
624
- return /^\n+$/.test(s) ? s.substring(1) : e ? s.replace(/^(?! *$)/gm, e) : s;
625
- }
626
- const H = (s, e, t) => s.endsWith(`
627
- `) ? F(t, e) : t.includes(`
628
- `) ? `
629
- ` + F(t, e) : (s.endsWith(" ") ? "" : " ") + t, Ht = "flow", at = "block", ve = "quoted";
630
- function Fe(s, e, t = "flow", { indentAtStart: n, lineWidth: i = 80, minContentWidth: r = 20, onFold: o, onOverflow: l } = {}) {
631
- if (!i || i < 0)
632
- return s;
633
- i < r && (r = 0);
634
- const a = Math.max(1 + r, 1 + i - e.length);
635
- if (s.length <= a)
636
- return s;
637
- const c = [], p = {};
638
- let f = i - e.length;
639
- typeof n == "number" && (n > i - Math.max(2, r) ? c.push(0) : f = i - n);
640
- let d, h, y = !1, u = -1, m = -1, b = -1;
641
- t === at && (u = $t(s, u, e.length), u !== -1 && (f = u + a));
642
- for (let N; N = s[u += 1]; ) {
643
- if (t === ve && N === "\\") {
644
- switch (m = u, s[u + 1]) {
645
- case "x":
646
- u += 3;
647
- break;
648
- case "u":
649
- u += 5;
650
- break;
651
- case "U":
652
- u += 9;
653
- break;
654
- default:
655
- u += 1;
656
- }
657
- b = u;
658
- }
659
- if (N === `
660
- `)
661
- t === at && (u = $t(s, u, e.length)), f = u + e.length + a, d = void 0;
662
- else {
663
- if (N === " " && h && h !== " " && h !== `
664
- ` && h !== " ") {
665
- const S = s[u + 1];
666
- S && S !== " " && S !== `
667
- ` && S !== " " && (d = u);
668
- }
669
- if (u >= f)
670
- if (d)
671
- c.push(d), f = d + a, d = void 0;
672
- else if (t === ve) {
673
- for (; h === " " || h === " "; )
674
- h = N, N = s[u += 1], y = !0;
675
- const S = u > b + 1 ? u - 2 : m - 1;
676
- if (p[S])
677
- return s;
678
- c.push(S), p[S] = !0, f = S + a, d = void 0;
679
- } else
680
- y = !0;
681
- }
682
- h = N;
683
- }
684
- if (y && l && l(), c.length === 0)
685
- return s;
686
- o && o();
687
- let w = s.slice(0, c[0]);
688
- for (let N = 0; N < c.length; ++N) {
689
- const S = c[N], A = c[N + 1] || s.length;
690
- S === 0 ? w = `
691
- ${e}${s.slice(0, A)}` : (t === ve && p[S] && (w += `${s[S]}\\`), w += `
692
- ${e}${s.slice(S + 1, A)}`);
693
- }
694
- return w;
695
- }
696
- function $t(s, e, t) {
697
- let n = e, i = e + 1, r = s[i];
698
- for (; r === " " || r === " "; )
699
- if (e < i + t)
700
- r = s[++e];
701
- else {
702
- do
703
- r = s[++e];
704
- while (r && r !== `
705
- `);
706
- n = e, i = e + 1, r = s[i];
707
- }
708
- return n;
709
- }
710
- const Ve = (s, e) => ({
711
- indentAtStart: e ? s.indent.length : s.indentAtStart,
712
- lineWidth: s.options.lineWidth,
713
- minContentWidth: s.options.minContentWidth
714
- }), Je = (s) => /^(%|---|\.\.\.)/m.test(s);
715
- function qs(s, e, t) {
716
- if (!e || e < 0)
717
- return !1;
718
- const n = e - t, i = s.length;
719
- if (i <= n)
720
- return !1;
721
- for (let r = 0, o = 0; r < i; ++r)
722
- if (s[r] === `
723
- `) {
724
- if (r - o > n)
725
- return !0;
726
- if (o = r + 1, i - o <= n)
727
- return !1;
728
- }
729
- return !0;
730
- }
731
- function Se(s, e) {
732
- const t = JSON.stringify(s);
733
- if (e.options.doubleQuotedAsJSON)
734
- return t;
735
- const { implicitKey: n } = e, i = e.options.doubleQuotedMinMultiLineLength, r = e.indent || (Je(s) ? " " : "");
736
- let o = "", l = 0;
737
- for (let a = 0, c = t[a]; c; c = t[++a])
738
- if (c === " " && t[a + 1] === "\\" && t[a + 2] === "n" && (o += t.slice(l, a) + "\\ ", a += 1, l = a, c = "\\"), c === "\\")
739
- switch (t[a + 1]) {
740
- case "u":
741
- {
742
- o += t.slice(l, a);
743
- const p = t.substr(a + 2, 4);
744
- switch (p) {
745
- case "0000":
746
- o += "\\0";
747
- break;
748
- case "0007":
749
- o += "\\a";
750
- break;
751
- case "000b":
752
- o += "\\v";
753
- break;
754
- case "001b":
755
- o += "\\e";
756
- break;
757
- case "0085":
758
- o += "\\N";
759
- break;
760
- case "00a0":
761
- o += "\\_";
762
- break;
763
- case "2028":
764
- o += "\\L";
765
- break;
766
- case "2029":
767
- o += "\\P";
768
- break;
769
- default:
770
- p.substr(0, 2) === "00" ? o += "\\x" + p.substr(2) : o += t.substr(a, 6);
771
- }
772
- a += 5, l = a + 1;
773
- }
774
- break;
775
- case "n":
776
- if (n || t[a + 2] === '"' || t.length < i)
777
- a += 1;
778
- else {
779
- for (o += t.slice(l, a) + `
780
-
781
- `; t[a + 2] === "\\" && t[a + 3] === "n" && t[a + 4] !== '"'; )
782
- o += `
783
- `, a += 2;
784
- o += r, t[a + 2] === " " && (o += "\\"), a += 1, l = a + 1;
785
- }
786
- break;
787
- default:
788
- a += 1;
789
- }
790
- return o = l ? o + t.slice(l) : t, n ? o : Fe(o, r, ve, Ve(e, !1));
791
- }
792
- function ct(s, e) {
793
- if (e.options.singleQuote === !1 || e.implicitKey && s.includes(`
794
- `) || /[ \t]\n|\n[ \t]/.test(s))
795
- return Se(s, e);
796
- const t = e.indent || (Je(s) ? " " : ""), n = "'" + s.replace(/'/g, "''").replace(/\n+/g, `$&
797
- ${t}`) + "'";
798
- return e.implicitKey ? n : Fe(n, t, Ht, Ve(e, !1));
799
- }
800
- function le(s, e) {
801
- const { singleQuote: t } = e.options;
802
- let n;
803
- if (t === !1)
804
- n = Se;
805
- else {
806
- const i = s.includes('"'), r = s.includes("'");
807
- i && !r ? n = ct : r && !i ? n = Se : n = t ? ct : Se;
808
- }
809
- return n(s, e);
810
- }
811
- let ft;
812
- try {
813
- ft = new RegExp(`(^|(?<!
814
- ))
815
- +(?!
816
- |$)`, "g");
817
- } catch {
818
- ft = /\n+(?!\n|$)/g;
819
- }
820
- function Me({ comment: s, type: e, value: t }, n, i, r) {
821
- const { blockQuote: o, commentString: l, lineWidth: a } = n.options;
822
- if (!o || /\n[\t ]+$/.test(t) || /^\s*$/.test(t))
823
- return le(t, n);
824
- const c = n.indent || (n.forceBlockIndent || Je(t) ? " " : ""), p = o === "literal" ? !0 : o === "folded" || e === O.BLOCK_FOLDED ? !1 : e === O.BLOCK_LITERAL ? !0 : !qs(t, a, c.length);
825
- if (!t)
826
- return p ? `|
827
- ` : `>
828
- `;
829
- let f, d;
830
- for (d = t.length; d > 0; --d) {
831
- const k = t[d - 1];
832
- if (k !== `
833
- ` && k !== " " && k !== " ")
834
- break;
835
- }
836
- let h = t.substring(d);
837
- const y = h.indexOf(`
838
- `);
839
- y === -1 ? f = "-" : t === h || y !== h.length - 1 ? (f = "+", r && r()) : f = "", h && (t = t.slice(0, -h.length), h[h.length - 1] === `
840
- ` && (h = h.slice(0, -1)), h = h.replace(ft, `$&${c}`));
841
- let u = !1, m, b = -1;
842
- for (m = 0; m < t.length; ++m) {
843
- const k = t[m];
844
- if (k === " ")
845
- u = !0;
846
- else if (k === `
847
- `)
848
- b = m;
849
- else
850
- break;
851
- }
852
- let w = t.substring(0, b < m ? b + 1 : m);
853
- w && (t = t.substring(w.length), w = w.replace(/\n+/g, `$&${c}`));
854
- let S = (p ? "|" : ">") + (u ? c ? "2" : "1" : "") + f;
855
- if (s && (S += " " + l(s.replace(/ ?[\r\n]+/g, " ")), i && i()), p)
856
- return t = t.replace(/\n+/g, `$&${c}`), `${S}
857
- ${c}${w}${t}${h}`;
858
- t = t.replace(/\n+/g, `
859
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
860
- const A = Fe(`${w}${t}${h}`, c, at, Ve(n, !0));
861
- return `${S}
862
- ${c}${A}`;
863
- }
864
- function Rs(s, e, t, n) {
865
- const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow: p } = e;
866
- if (l && r.includes(`
867
- `) || p && /[[\]{},]/.test(r))
868
- return le(r, e);
869
- if (!r || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))
870
- return l || p || !r.includes(`
871
- `) ? le(r, e) : Me(s, e, t, n);
872
- if (!l && !p && i !== O.PLAIN && r.includes(`
873
- `))
874
- return Me(s, e, t, n);
875
- if (Je(r)) {
876
- if (a === "")
877
- return e.forceBlockIndent = !0, Me(s, e, t, n);
878
- if (l && a === c)
879
- return le(r, e);
880
- }
881
- const f = r.replace(/\n+/g, `$&
882
- ${a}`);
883
- if (o) {
884
- const d = (u) => {
885
- var m;
886
- return u.default && u.tag !== "tag:yaml.org,2002:str" && ((m = u.test) == null ? void 0 : m.test(f));
887
- }, { compat: h, tags: y } = e.doc.schema;
888
- if (y.some(d) || h != null && h.some(d))
889
- return le(r, e);
890
- }
891
- return l ? f : Fe(f, a, Ht, Ve(e, !1));
892
- }
893
- function Ae(s, e, t, n) {
894
- const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
895
- let { type: l } = s;
896
- l !== O.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (l = O.QUOTE_DOUBLE);
897
- const a = (p) => {
898
- switch (p) {
899
- case O.BLOCK_FOLDED:
900
- case O.BLOCK_LITERAL:
901
- return i || r ? le(o.value, e) : Me(o, e, t, n);
902
- case O.QUOTE_DOUBLE:
903
- return Se(o.value, e);
904
- case O.QUOTE_SINGLE:
905
- return ct(o.value, e);
906
- case O.PLAIN:
907
- return Rs(o, e, t, n);
908
- default:
909
- return null;
910
- }
911
- };
912
- let c = a(l);
913
- if (c === null) {
914
- const { defaultKeyType: p, defaultStringType: f } = e.options, d = i && p || f;
915
- if (c = a(d), c === null)
916
- throw new Error(`Unsupported default string type ${d}`);
917
- }
918
- return c;
919
- }
920
- function Xt(s, e) {
921
- const t = Object.assign({
922
- blockQuote: !0,
923
- commentString: Ds,
924
- defaultKeyType: null,
925
- defaultStringType: "PLAIN",
926
- directives: null,
927
- doubleQuotedAsJSON: !1,
928
- doubleQuotedMinMultiLineLength: 40,
929
- falseStr: "false",
930
- flowCollectionPadding: !0,
931
- indentSeq: !0,
932
- lineWidth: 80,
933
- minContentWidth: 20,
934
- nullStr: "null",
935
- simpleKeys: !1,
936
- singleQuote: null,
937
- trueStr: "true",
938
- verifyAliasOrder: !0
939
- }, s.schema.toStringOptions, e);
940
- let n;
941
- switch (t.collectionStyle) {
942
- case "block":
943
- n = !1;
944
- break;
945
- case "flow":
946
- n = !0;
947
- break;
948
- default:
949
- n = null;
950
- }
951
- return {
952
- anchors: /* @__PURE__ */ new Set(),
953
- doc: s,
954
- flowCollectionPadding: t.flowCollectionPadding ? " " : "",
955
- indent: "",
956
- indentStep: typeof t.indent == "number" ? " ".repeat(t.indent) : " ",
957
- inFlow: n,
958
- options: t
959
- };
960
- }
961
- function Us(s, e) {
962
- var i;
963
- if (e.tag) {
964
- const r = s.filter((o) => o.tag === e.tag);
965
- if (r.length > 0)
966
- return r.find((o) => o.format === e.format) ?? r[0];
967
- }
968
- let t, n;
969
- if (E(e)) {
970
- n = e.value;
971
- let r = s.filter((o) => {
972
- var l;
973
- return (l = o.identify) == null ? void 0 : l.call(o, n);
974
- });
975
- if (r.length > 1) {
976
- const o = r.filter((l) => l.test);
977
- o.length > 0 && (r = o);
978
- }
979
- t = r.find((o) => o.format === e.format) ?? r.find((o) => !o.format);
980
- } else
981
- n = e, t = s.find((r) => r.nodeClass && n instanceof r.nodeClass);
982
- if (!t) {
983
- const r = ((i = n == null ? void 0 : n.constructor) == null ? void 0 : i.name) ?? typeof n;
984
- throw new Error(`Tag not resolved for ${r} value`);
985
- }
986
- return t;
987
- }
988
- function Fs(s, e, { anchors: t, doc: n }) {
989
- if (!n.directives)
990
- return "";
991
- const i = [], r = (E(s) || L(s)) && s.anchor;
992
- r && Jt(r) && (t.add(r), i.push(`&${r}`));
993
- const o = s.tag ? s.tag : e.default ? null : e.tag;
994
- return o && i.push(n.directives.tagString(o)), i.join(" ");
995
- }
996
- function fe(s, e, t, n) {
997
- var a;
998
- if (I(s))
999
- return s.toString(e, t, n);
1000
- if (x(s)) {
1001
- if (e.doc.directives)
1002
- return s.toString(e);
1003
- if ((a = e.resolvedAliases) != null && a.has(s))
1004
- throw new TypeError("Cannot stringify circular structure without alias nodes");
1005
- e.resolvedAliases ? e.resolvedAliases.add(s) : e.resolvedAliases = /* @__PURE__ */ new Set([s]), s = s.resolve(e.doc);
1006
- }
1007
- let i;
1008
- const r = $(s) ? s : e.doc.createNode(s, { onTagObj: (c) => i = c });
1009
- i || (i = Us(e.doc.schema.tags, r));
1010
- const o = Fs(r, i, e);
1011
- o.length > 0 && (e.indentAtStart = (e.indentAtStart ?? 0) + o.length + 1);
1012
- const l = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : E(r) ? Ae(r, e, t, n) : r.toString(e, t, n);
1013
- return o ? E(r) || l[0] === "{" || l[0] === "[" ? `${o} ${l}` : `${o}
1014
- ${e.indent}${l}` : l;
1015
- }
1016
- function Vs({ key: s, value: e }, t, n, i) {
1017
- const { allNullValues: r, doc: o, indent: l, indentStep: a, options: { commentString: c, indentSeq: p, simpleKeys: f } } = t;
1018
- let d = $(s) && s.comment || null;
1019
- if (f) {
1020
- if (d)
1021
- throw new Error("With simple keys, key nodes cannot have comments");
1022
- if (L(s) || !$(s) && typeof s == "object") {
1023
- const T = "With simple keys, collection cannot be used as a key value";
1024
- throw new Error(T);
1025
- }
1026
- }
1027
- let h = !f && (!s || d && e == null && !t.inFlow || L(s) || (E(s) ? s.type === O.BLOCK_FOLDED || s.type === O.BLOCK_LITERAL : typeof s == "object"));
1028
- t = Object.assign({}, t, {
1029
- allNullValues: !1,
1030
- implicitKey: !h && (f || !r),
1031
- indent: l + a
1032
- });
1033
- let y = !1, u = !1, m = fe(s, t, () => y = !0, () => u = !0);
1034
- if (!h && !t.inFlow && m.length > 1024) {
1035
- if (f)
1036
- throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
1037
- h = !0;
1038
- }
1039
- if (t.inFlow) {
1040
- if (r || e == null)
1041
- return y && n && n(), m === "" ? "?" : h ? `? ${m}` : m;
1042
- } else if (r && !f || e == null && h)
1043
- return m = `? ${m}`, d && !y ? m += H(m, t.indent, c(d)) : u && i && i(), m;
1044
- y && (d = null), h ? (d && (m += H(m, t.indent, c(d))), m = `? ${m}
1045
- ${l}:`) : (m = `${m}:`, d && (m += H(m, t.indent, c(d))));
1046
- let b, w, N;
1047
- $(e) ? (b = !!e.spaceBefore, w = e.commentBefore, N = e.comment) : (b = !1, w = null, N = null, e && typeof e == "object" && (e = o.createNode(e))), t.implicitKey = !1, !h && !d && E(e) && (t.indentAtStart = m.length + 1), u = !1, !p && a.length >= 2 && !t.inFlow && !h && pe(e) && !e.flow && !e.tag && !e.anchor && (t.indent = t.indent.substring(2));
1048
- let S = !1;
1049
- const A = fe(e, t, () => S = !0, () => u = !0);
1050
- let k = " ";
1051
- if (d || b || w) {
1052
- if (k = b ? `
1053
- ` : "", w) {
1054
- const T = c(w);
1055
- k += `
1056
- ${F(T, t.indent)}`;
1057
- }
1058
- A === "" && !t.inFlow ? k === `
1059
- ` && (k = `
1060
-
1061
- `) : k += `
1062
- ${t.indent}`;
1063
- } else if (!h && L(e)) {
1064
- const T = A[0], g = A.indexOf(`
1065
- `), _ = g !== -1, J = t.inFlow ?? e.flow ?? e.items.length === 0;
1066
- if (_ || !J) {
1067
- let te = !1;
1068
- if (_ && (T === "&" || T === "!")) {
1069
- let C = A.indexOf(" ");
1070
- T === "&" && C !== -1 && C < g && A[C + 1] === "!" && (C = A.indexOf(" ", C + 1)), (C === -1 || g < C) && (te = !0);
1071
- }
1072
- te || (k = `
1073
- ${t.indent}`);
1074
- }
1075
- } else (A === "" || A[0] === `
1076
- `) && (k = "");
1077
- return m += k + A, t.inFlow ? S && n && n() : N && !S ? m += H(m, t.indent, c(N)) : u && i && i(), m;
1078
- }
1079
- function zt(s, e) {
1080
- (s === "debug" || s === "warn") && (typeof process < "u" && process.emitWarning ? process.emitWarning(e) : console.warn(e));
1081
- }
1082
- const Te = "<<", V = {
1083
- identify: (s) => s === Te || typeof s == "symbol" && s.description === Te,
1084
- default: "key",
1085
- tag: "tag:yaml.org,2002:merge",
1086
- test: /^<<$/,
1087
- resolve: () => Object.assign(new O(Symbol(Te)), {
1088
- addToJSMap: Zt
1089
- }),
1090
- stringify: () => Te
1091
- }, Js = (s, e) => (V.identify(e) || E(e) && (!e.type || e.type === O.PLAIN) && V.identify(e.value)) && (s == null ? void 0 : s.doc.schema.tags.some((t) => t.tag === V.tag && t.default));
1092
- function Zt(s, e, t) {
1093
- if (t = s && x(t) ? t.resolve(s.doc) : t, pe(t))
1094
- for (const n of t.items)
1095
- et(s, e, n);
1096
- else if (Array.isArray(t))
1097
- for (const n of t)
1098
- et(s, e, n);
1099
- else
1100
- et(s, e, t);
1101
- }
1102
- function et(s, e, t) {
1103
- const n = s && x(t) ? t.resolve(s.doc) : t;
1104
- if (!de(n))
1105
- throw new Error("Merge sources must be maps or map aliases");
1106
- const i = n.toJSON(null, s, Map);
1107
- for (const [r, o] of i)
1108
- e instanceof Map ? e.has(r) || e.set(r, o) : e instanceof Set ? e.add(r) : Object.prototype.hasOwnProperty.call(e, r) || Object.defineProperty(e, r, {
1109
- value: o,
1110
- writable: !0,
1111
- enumerable: !0,
1112
- configurable: !0
1113
- });
1114
- return e;
1115
- }
1116
- function xt(s, e, { key: t, value: n }) {
1117
- if ($(t) && t.addToJSMap)
1118
- t.addToJSMap(s, e, n);
1119
- else if (Js(s, t))
1120
- Zt(s, e, n);
1121
- else {
1122
- const i = P(t, "", s);
1123
- if (e instanceof Map)
1124
- e.set(i, P(n, i, s));
1125
- else if (e instanceof Set)
1126
- e.add(i);
1127
- else {
1128
- const r = Ys(t, i, s), o = P(n, r, s);
1129
- r in e ? Object.defineProperty(e, r, {
1130
- value: o,
1131
- writable: !0,
1132
- enumerable: !0,
1133
- configurable: !0
1134
- }) : e[r] = o;
1135
- }
1136
- }
1137
- return e;
1138
- }
1139
- function Ys(s, e, t) {
1140
- if (e === null)
1141
- return "";
1142
- if (typeof e != "object")
1143
- return String(e);
1144
- if ($(s) && (t != null && t.doc)) {
1145
- const n = Xt(t.doc, {});
1146
- n.anchors = /* @__PURE__ */ new Set();
1147
- for (const r of t.anchors.keys())
1148
- n.anchors.add(r.anchor);
1149
- n.inFlow = !0, n.inStringifyKey = !0;
1150
- const i = s.toString(n);
1151
- if (!t.mapKeyWarned) {
1152
- let r = JSON.stringify(i);
1153
- r.length > 40 && (r = r.substring(0, 36) + '..."'), zt(t.doc.options.logLevel, `Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`), t.mapKeyWarned = !0;
1154
- }
1155
- return i;
1156
- }
1157
- return JSON.stringify(e);
1158
- }
1159
- function mt(s, e, t) {
1160
- const n = ke(s, void 0, t), i = ke(e, void 0, t);
1161
- return new B(n, i);
1162
- }
1163
- class B {
1164
- constructor(e, t = null) {
1165
- Object.defineProperty(this, j, { value: qt }), this.key = e, this.value = t;
1166
- }
1167
- clone(e) {
1168
- let { key: t, value: n } = this;
1169
- return $(t) && (t = t.clone(e)), $(n) && (n = n.clone(e)), new B(t, n);
1170
- }
1171
- toJSON(e, t) {
1172
- const n = t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1173
- return xt(t, n, this);
1174
- }
1175
- toString(e, t, n) {
1176
- return e != null && e.doc ? Vs(this, e, t, n) : JSON.stringify(this);
1177
- }
1178
- }
1179
- function es(s, e, t) {
1180
- return (e.inFlow ?? s.flow ? Qs : Gs)(s, e, t);
1181
- }
1182
- function Gs({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: l }) {
1183
- const { indent: a, options: { commentString: c } } = t, p = Object.assign({}, t, { indent: r, type: null });
1184
- let f = !1;
1185
- const d = [];
1186
- for (let y = 0; y < e.length; ++y) {
1187
- const u = e[y];
1188
- let m = null;
1189
- if ($(u))
1190
- !f && u.spaceBefore && d.push(""), je(t, d, u.commentBefore, f), u.comment && (m = u.comment);
1191
- else if (I(u)) {
1192
- const w = $(u.key) ? u.key : null;
1193
- w && (!f && w.spaceBefore && d.push(""), je(t, d, w.commentBefore, f));
1194
- }
1195
- f = !1;
1196
- let b = fe(u, p, () => m = null, () => f = !0);
1197
- m && (b += H(b, r, c(m))), f && m && (f = !1), d.push(n + b);
1198
- }
1199
- let h;
1200
- if (d.length === 0)
1201
- h = i.start + i.end;
1202
- else {
1203
- h = d[0];
1204
- for (let y = 1; y < d.length; ++y) {
1205
- const u = d[y];
1206
- h += u ? `
1207
- ${a}${u}` : `
1208
- `;
1209
- }
1210
- }
1211
- return s ? (h += `
1212
- ` + F(c(s), a), l && l()) : f && o && o(), h;
1213
- }
1214
- function Qs({ items: s }, e, { flowChars: t, itemIndent: n }) {
1215
- const { indent: i, indentStep: r, flowCollectionPadding: o, options: { commentString: l } } = e;
1216
- n += r;
1217
- const a = Object.assign({}, e, {
1218
- indent: n,
1219
- inFlow: !0,
1220
- type: null
1221
- });
1222
- let c = !1, p = 0;
1223
- const f = [];
1224
- for (let y = 0; y < s.length; ++y) {
1225
- const u = s[y];
1226
- let m = null;
1227
- if ($(u))
1228
- u.spaceBefore && f.push(""), je(e, f, u.commentBefore, !1), u.comment && (m = u.comment);
1229
- else if (I(u)) {
1230
- const w = $(u.key) ? u.key : null;
1231
- w && (w.spaceBefore && f.push(""), je(e, f, w.commentBefore, !1), w.comment && (c = !0));
1232
- const N = $(u.value) ? u.value : null;
1233
- N ? (N.comment && (m = N.comment), N.commentBefore && (c = !0)) : u.value == null && (w != null && w.comment) && (m = w.comment);
1234
- }
1235
- m && (c = !0);
1236
- let b = fe(u, a, () => m = null);
1237
- y < s.length - 1 && (b += ","), m && (b += H(b, n, l(m))), !c && (f.length > p || b.includes(`
1238
- `)) && (c = !0), f.push(b), p = f.length;
1239
- }
1240
- const { start: d, end: h } = t;
1241
- if (f.length === 0)
1242
- return d + h;
1243
- if (!c) {
1244
- const y = f.reduce((u, m) => u + m.length + 2, 2);
1245
- c = e.options.lineWidth > 0 && y > e.options.lineWidth;
1246
- }
1247
- if (c) {
1248
- let y = d;
1249
- for (const u of f)
1250
- y += u ? `
1251
- ${r}${i}${u}` : `
1252
- `;
1253
- return `${y}
1254
- ${i}${h}`;
1255
- } else
1256
- return `${d}${o}${f.join(" ")}${o}${h}`;
1257
- }
1258
- function je({ indent: s, options: { commentString: e } }, t, n, i) {
1259
- if (n && i && (n = n.replace(/^\n+/, "")), n) {
1260
- const r = F(e(n), s);
1261
- t.push(r.trimStart());
1262
- }
1263
- }
1264
- function X(s, e) {
1265
- const t = E(e) ? e.value : e;
1266
- for (const n of s)
1267
- if (I(n) && (n.key === e || n.key === t || E(n.key) && n.key.value === t))
1268
- return n;
1269
- }
1270
- class K extends Wt {
1271
- static get tagName() {
1272
- return "tag:yaml.org,2002:map";
1273
- }
1274
- constructor(e) {
1275
- super(Y, e), this.items = [];
1276
- }
1277
- /**
1278
- * A generic collection parsing method that can be extended
1279
- * to other node classes that inherit from YAMLMap
1280
- */
1281
- static from(e, t, n) {
1282
- const { keepUndefined: i, replacer: r } = n, o = new this(e), l = (a, c) => {
1283
- if (typeof r == "function")
1284
- c = r.call(t, a, c);
1285
- else if (Array.isArray(r) && !r.includes(a))
1286
- return;
1287
- (c !== void 0 || i) && o.items.push(mt(a, c, n));
1288
- };
1289
- if (t instanceof Map)
1290
- for (const [a, c] of t)
1291
- l(a, c);
1292
- else if (t && typeof t == "object")
1293
- for (const a of Object.keys(t))
1294
- l(a, t[a]);
1295
- return typeof e.sortMapEntries == "function" && o.items.sort(e.sortMapEntries), o;
1296
- }
1297
- /**
1298
- * Adds a value to the collection.
1299
- *
1300
- * @param overwrite - If not set `true`, using a key that is already in the
1301
- * collection will throw. Otherwise, overwrites the previous value.
1302
- */
1303
- add(e, t) {
1304
- var o;
1305
- let n;
1306
- I(e) ? n = e : !e || typeof e != "object" || !("key" in e) ? n = new B(e, e == null ? void 0 : e.value) : n = new B(e.key, e.value);
1307
- const i = X(this.items, n.key), r = (o = this.schema) == null ? void 0 : o.sortMapEntries;
1308
- if (i) {
1309
- if (!t)
1310
- throw new Error(`Key ${n.key} already set`);
1311
- E(i.value) && Qt(n.value) ? i.value.value = n.value : i.value = n.value;
1312
- } else if (r) {
1313
- const l = this.items.findIndex((a) => r(n, a) < 0);
1314
- l === -1 ? this.items.push(n) : this.items.splice(l, 0, n);
1315
- } else
1316
- this.items.push(n);
1317
- }
1318
- delete(e) {
1319
- const t = X(this.items, e);
1320
- return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
1321
- }
1322
- get(e, t) {
1323
- const n = X(this.items, e), i = n == null ? void 0 : n.value;
1324
- return (!t && E(i) ? i.value : i) ?? void 0;
1325
- }
1326
- has(e) {
1327
- return !!X(this.items, e);
1328
- }
1329
- set(e, t) {
1330
- this.add(new B(e, t), !0);
1331
- }
1332
- /**
1333
- * @param ctx - Conversion context, originally set in Document#toJS()
1334
- * @param {Class} Type - If set, forces the returned collection type
1335
- * @returns Instance of Type, Map, or Object
1336
- */
1337
- toJSON(e, t, n) {
1338
- const i = n ? new n() : t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1339
- t != null && t.onCreate && t.onCreate(i);
1340
- for (const r of this.items)
1341
- xt(t, i, r);
1342
- return i;
1343
- }
1344
- toString(e, t, n) {
1345
- if (!e)
1346
- return JSON.stringify(this);
1347
- for (const i of this.items)
1348
- if (!I(i))
1349
- throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);
1350
- return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), es(this, e, {
1351
- blockItemPrefix: "",
1352
- flowChars: { start: "{", end: "}" },
1353
- itemIndent: e.indent || "",
1354
- onChompKeep: n,
1355
- onComment: t
1356
- });
1357
- }
1358
- }
1359
- const me = {
1360
- collection: "map",
1361
- default: !0,
1362
- nodeClass: K,
1363
- tag: "tag:yaml.org,2002:map",
1364
- resolve(s, e) {
1365
- return de(s) || e("Expected a mapping for this tag"), s;
1366
- },
1367
- createNode: (s, e, t) => K.from(s, e, t)
1368
- };
1369
- class Q extends Wt {
1370
- static get tagName() {
1371
- return "tag:yaml.org,2002:seq";
1372
- }
1373
- constructor(e) {
1374
- super(he, e), this.items = [];
1375
- }
1376
- add(e) {
1377
- this.items.push(e);
1378
- }
1379
- /**
1380
- * Removes a value from the collection.
1381
- *
1382
- * `key` must contain a representation of an integer for this to succeed.
1383
- * It may be wrapped in a `Scalar`.
1384
- *
1385
- * @returns `true` if the item was found and removed.
1386
- */
1387
- delete(e) {
1388
- const t = Le(e);
1389
- return typeof t != "number" ? !1 : this.items.splice(t, 1).length > 0;
1390
- }
1391
- get(e, t) {
1392
- const n = Le(e);
1393
- if (typeof n != "number")
1394
- return;
1395
- const i = this.items[n];
1396
- return !t && E(i) ? i.value : i;
1397
- }
1398
- /**
1399
- * Checks if the collection includes a value with the key `key`.
1400
- *
1401
- * `key` must contain a representation of an integer for this to succeed.
1402
- * It may be wrapped in a `Scalar`.
1403
- */
1404
- has(e) {
1405
- const t = Le(e);
1406
- return typeof t == "number" && t < this.items.length;
1407
- }
1408
- /**
1409
- * Sets a value in this collection. For `!!set`, `value` needs to be a
1410
- * boolean to add/remove the item from the set.
1411
- *
1412
- * If `key` does not contain a representation of an integer, this will throw.
1413
- * It may be wrapped in a `Scalar`.
1414
- */
1415
- set(e, t) {
1416
- const n = Le(e);
1417
- if (typeof n != "number")
1418
- throw new Error(`Expected a valid index, not ${e}.`);
1419
- const i = this.items[n];
1420
- E(i) && Qt(t) ? i.value = t : this.items[n] = t;
1421
- }
1422
- toJSON(e, t) {
1423
- const n = [];
1424
- t != null && t.onCreate && t.onCreate(n);
1425
- let i = 0;
1426
- for (const r of this.items)
1427
- n.push(P(r, String(i++), t));
1428
- return n;
1429
- }
1430
- toString(e, t, n) {
1431
- return e ? es(this, e, {
1432
- blockItemPrefix: "- ",
1433
- flowChars: { start: "[", end: "]" },
1434
- itemIndent: (e.indent || "") + " ",
1435
- onChompKeep: n,
1436
- onComment: t
1437
- }) : JSON.stringify(this);
1438
- }
1439
- static from(e, t, n) {
1440
- const { replacer: i } = n, r = new this(e);
1441
- if (t && Symbol.iterator in Object(t)) {
1442
- let o = 0;
1443
- for (let l of t) {
1444
- if (typeof i == "function") {
1445
- const a = t instanceof Set ? l : String(o++);
1446
- l = i.call(t, a, l);
1447
- }
1448
- r.items.push(ke(l, void 0, n));
1449
- }
1450
- }
1451
- return r;
1452
- }
1453
- }
1454
- function Le(s) {
1455
- let e = E(s) ? s.value : s;
1456
- return e && typeof e == "string" && (e = Number(e)), typeof e == "number" && Number.isInteger(e) && e >= 0 ? e : null;
1457
- }
1458
- const ye = {
1459
- collection: "seq",
1460
- default: !0,
1461
- nodeClass: Q,
1462
- tag: "tag:yaml.org,2002:seq",
1463
- resolve(s, e) {
1464
- return pe(s) || e("Expected a sequence for this tag"), s;
1465
- },
1466
- createNode: (s, e, t) => Q.from(s, e, t)
1467
- }, Ye = {
1468
- identify: (s) => typeof s == "string",
1469
- default: !0,
1470
- tag: "tag:yaml.org,2002:str",
1471
- resolve: (s) => s,
1472
- stringify(s, e, t, n) {
1473
- return e = Object.assign({ actualString: !0 }, e), Ae(s, e, t, n);
1474
- }
1475
- }, Ge = {
1476
- identify: (s) => s == null,
1477
- createNode: () => new O(null),
1478
- default: !0,
1479
- tag: "tag:yaml.org,2002:null",
1480
- test: /^(?:~|[Nn]ull|NULL)?$/,
1481
- resolve: () => new O(null),
1482
- stringify: ({ source: s }, e) => typeof s == "string" && Ge.test.test(s) ? s : e.options.nullStr
1483
- }, yt = {
1484
- identify: (s) => typeof s == "boolean",
1485
- default: !0,
1486
- tag: "tag:yaml.org,2002:bool",
1487
- test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
1488
- resolve: (s) => new O(s[0] === "t" || s[0] === "T"),
1489
- stringify({ source: s, value: e }, t) {
1490
- if (s && yt.test.test(s)) {
1491
- const n = s[0] === "t" || s[0] === "T";
1492
- if (e === n)
1493
- return s;
1494
- }
1495
- return e ? t.options.trueStr : t.options.falseStr;
1496
- }
1497
- };
1498
- function q({ format: s, minFractionDigits: e, tag: t, value: n }) {
1499
- if (typeof n == "bigint")
1500
- return String(n);
1501
- const i = typeof n == "number" ? n : Number(n);
1502
- if (!isFinite(i))
1503
- return isNaN(i) ? ".nan" : i < 0 ? "-.inf" : ".inf";
1504
- let r = JSON.stringify(n);
1505
- if (!s && e && (!t || t === "tag:yaml.org,2002:float") && /^\d/.test(r)) {
1506
- let o = r.indexOf(".");
1507
- o < 0 && (o = r.length, r += ".");
1508
- let l = e - (r.length - o - 1);
1509
- for (; l-- > 0; )
1510
- r += "0";
1511
- }
1512
- return r;
1513
- }
1514
- const ts = {
1515
- identify: (s) => typeof s == "number",
1516
- default: !0,
1517
- tag: "tag:yaml.org,2002:float",
1518
- test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1519
- resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1520
- stringify: q
1521
- }, ss = {
1522
- identify: (s) => typeof s == "number",
1523
- default: !0,
1524
- tag: "tag:yaml.org,2002:float",
1525
- format: "EXP",
1526
- test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
1527
- resolve: (s) => parseFloat(s),
1528
- stringify(s) {
1529
- const e = Number(s.value);
1530
- return isFinite(e) ? e.toExponential() : q(s);
1531
- }
1532
- }, ns = {
1533
- identify: (s) => typeof s == "number",
1534
- default: !0,
1535
- tag: "tag:yaml.org,2002:float",
1536
- test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
1537
- resolve(s) {
1538
- const e = new O(parseFloat(s)), t = s.indexOf(".");
1539
- return t !== -1 && s[s.length - 1] === "0" && (e.minFractionDigits = s.length - t - 1), e;
1540
- },
1541
- stringify: q
1542
- }, Qe = (s) => typeof s == "bigint" || Number.isInteger(s), gt = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
1543
- function is(s, e, t) {
1544
- const { value: n } = s;
1545
- return Qe(n) && n >= 0 ? t + n.toString(e) : q(s);
1546
- }
1547
- const rs = {
1548
- identify: (s) => Qe(s) && s >= 0,
1549
- default: !0,
1550
- tag: "tag:yaml.org,2002:int",
1551
- format: "OCT",
1552
- test: /^0o[0-7]+$/,
1553
- resolve: (s, e, t) => gt(s, 2, 8, t),
1554
- stringify: (s) => is(s, 8, "0o")
1555
- }, os = {
1556
- identify: Qe,
1557
- default: !0,
1558
- tag: "tag:yaml.org,2002:int",
1559
- test: /^[-+]?[0-9]+$/,
1560
- resolve: (s, e, t) => gt(s, 0, 10, t),
1561
- stringify: q
1562
- }, ls = {
1563
- identify: (s) => Qe(s) && s >= 0,
1564
- default: !0,
1565
- tag: "tag:yaml.org,2002:int",
1566
- format: "HEX",
1567
- test: /^0x[0-9a-fA-F]+$/,
1568
- resolve: (s, e, t) => gt(s, 2, 16, t),
1569
- stringify: (s) => is(s, 16, "0x")
1570
- }, Ws = [
1571
- me,
1572
- ye,
1573
- Ye,
1574
- Ge,
1575
- yt,
1576
- rs,
1577
- os,
1578
- ls,
1579
- ts,
1580
- ss,
1581
- ns
1582
- ];
1583
- function _t(s) {
1584
- return typeof s == "bigint" || Number.isInteger(s);
1585
- }
1586
- const $e = ({ value: s }) => JSON.stringify(s), Hs = [
1587
- {
1588
- identify: (s) => typeof s == "string",
1589
- default: !0,
1590
- tag: "tag:yaml.org,2002:str",
1591
- resolve: (s) => s,
1592
- stringify: $e
1593
- },
1594
- {
1595
- identify: (s) => s == null,
1596
- createNode: () => new O(null),
1597
- default: !0,
1598
- tag: "tag:yaml.org,2002:null",
1599
- test: /^null$/,
1600
- resolve: () => null,
1601
- stringify: $e
1602
- },
1603
- {
1604
- identify: (s) => typeof s == "boolean",
1605
- default: !0,
1606
- tag: "tag:yaml.org,2002:bool",
1607
- test: /^true|false$/,
1608
- resolve: (s) => s === "true",
1609
- stringify: $e
1610
- },
1611
- {
1612
- identify: _t,
1613
- default: !0,
1614
- tag: "tag:yaml.org,2002:int",
1615
- test: /^-?(?:0|[1-9][0-9]*)$/,
1616
- resolve: (s, e, { intAsBigInt: t }) => t ? BigInt(s) : parseInt(s, 10),
1617
- stringify: ({ value: s }) => _t(s) ? s.toString() : JSON.stringify(s)
1618
- },
1619
- {
1620
- identify: (s) => typeof s == "number",
1621
- default: !0,
1622
- tag: "tag:yaml.org,2002:float",
1623
- test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
1624
- resolve: (s) => parseFloat(s),
1625
- stringify: $e
1626
- }
1627
- ], Xs = {
1628
- default: !0,
1629
- tag: "",
1630
- test: /^/,
1631
- resolve(s, e) {
1632
- return e(`Unresolved plain scalar ${JSON.stringify(s)}`), s;
1633
- }
1634
- }, zs = [me, ye].concat(Hs, Xs), bt = {
1635
- identify: (s) => s instanceof Uint8Array,
1636
- // Buffer inherits from Uint8Array
1637
- default: !1,
1638
- tag: "tag:yaml.org,2002:binary",
1639
- /**
1640
- * Returns a Buffer in node and an Uint8Array in browsers
1641
- *
1642
- * To use the resulting buffer as an image, you'll want to do something like:
1643
- *
1644
- * const blob = new Blob([buffer], { type: 'image/jpeg' })
1645
- * document.querySelector('#photo').src = URL.createObjectURL(blob)
1646
- */
1647
- resolve(s, e) {
1648
- if (typeof Buffer == "function")
1649
- return Buffer.from(s, "base64");
1650
- if (typeof atob == "function") {
1651
- const t = atob(s.replace(/[\n\r]/g, "")), n = new Uint8Array(t.length);
1652
- for (let i = 0; i < t.length; ++i)
1653
- n[i] = t.charCodeAt(i);
1654
- return n;
1655
- } else
1656
- return e("This environment does not support reading binary tags; either Buffer or atob is required"), s;
1657
- },
1658
- stringify({ comment: s, type: e, value: t }, n, i, r) {
1659
- const o = t;
1660
- let l;
1661
- if (typeof Buffer == "function")
1662
- l = o instanceof Buffer ? o.toString("base64") : Buffer.from(o.buffer).toString("base64");
1663
- else if (typeof btoa == "function") {
1664
- let a = "";
1665
- for (let c = 0; c < o.length; ++c)
1666
- a += String.fromCharCode(o[c]);
1667
- l = btoa(a);
1668
- } else
1669
- throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
1670
- if (e || (e = O.BLOCK_LITERAL), e !== O.QUOTE_DOUBLE) {
1671
- const a = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(l.length / a), p = new Array(c);
1672
- for (let f = 0, d = 0; f < c; ++f, d += a)
1673
- p[f] = l.substr(d, a);
1674
- l = p.join(e === O.BLOCK_LITERAL ? `
1675
- ` : " ");
1676
- }
1677
- return Ae({ comment: s, type: e, value: l }, n, i, r);
1678
- }
1679
- };
1680
- function as(s, e) {
1681
- if (pe(s))
1682
- for (let t = 0; t < s.items.length; ++t) {
1683
- let n = s.items[t];
1684
- if (!I(n)) {
1685
- if (de(n)) {
1686
- n.items.length > 1 && e("Each pair must have its own sequence indicator");
1687
- const i = n.items[0] || new B(new O(null));
1688
- if (n.commentBefore && (i.key.commentBefore = i.key.commentBefore ? `${n.commentBefore}
1689
- ${i.key.commentBefore}` : n.commentBefore), n.comment) {
1690
- const r = i.value ?? i.key;
1691
- r.comment = r.comment ? `${n.comment}
1692
- ${r.comment}` : n.comment;
1693
- }
1694
- n = i;
1695
- }
1696
- s.items[t] = I(n) ? n : new B(n);
1697
- }
1698
- }
1699
- else
1700
- e("Expected a sequence for this tag");
1701
- return s;
1702
- }
1703
- function cs(s, e, t) {
1704
- const { replacer: n } = t, i = new Q(s);
1705
- i.tag = "tag:yaml.org,2002:pairs";
1706
- let r = 0;
1707
- if (e && Symbol.iterator in Object(e))
1708
- for (let o of e) {
1709
- typeof n == "function" && (o = n.call(e, String(r++), o));
1710
- let l, a;
1711
- if (Array.isArray(o))
1712
- if (o.length === 2)
1713
- l = o[0], a = o[1];
1714
- else
1715
- throw new TypeError(`Expected [key, value] tuple: ${o}`);
1716
- else if (o && o instanceof Object) {
1717
- const c = Object.keys(o);
1718
- if (c.length === 1)
1719
- l = c[0], a = o[l];
1720
- else
1721
- throw new TypeError(`Expected tuple with one key, not ${c.length} keys`);
1722
- } else
1723
- l = o;
1724
- i.items.push(mt(l, a, t));
1725
- }
1726
- return i;
1727
- }
1728
- const wt = {
1729
- collection: "seq",
1730
- default: !1,
1731
- tag: "tag:yaml.org,2002:pairs",
1732
- resolve: as,
1733
- createNode: cs
1734
- };
1735
- class ae extends Q {
1736
- constructor() {
1737
- super(), this.add = K.prototype.add.bind(this), this.delete = K.prototype.delete.bind(this), this.get = K.prototype.get.bind(this), this.has = K.prototype.has.bind(this), this.set = K.prototype.set.bind(this), this.tag = ae.tag;
1738
- }
1739
- /**
1740
- * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
1741
- * but TypeScript won't allow widening the signature of a child method.
1742
- */
1743
- toJSON(e, t) {
1744
- if (!t)
1745
- return super.toJSON(e);
1746
- const n = /* @__PURE__ */ new Map();
1747
- t != null && t.onCreate && t.onCreate(n);
1748
- for (const i of this.items) {
1749
- let r, o;
1750
- if (I(i) ? (r = P(i.key, "", t), o = P(i.value, r, t)) : r = P(i, "", t), n.has(r))
1751
- throw new Error("Ordered maps must not include duplicate keys");
1752
- n.set(r, o);
1753
- }
1754
- return n;
1755
- }
1756
- static from(e, t, n) {
1757
- const i = cs(e, t, n), r = new this();
1758
- return r.items = i.items, r;
1759
- }
1760
- }
1761
- ae.tag = "tag:yaml.org,2002:omap";
1762
- const St = {
1763
- collection: "seq",
1764
- identify: (s) => s instanceof Map,
1765
- nodeClass: ae,
1766
- default: !1,
1767
- tag: "tag:yaml.org,2002:omap",
1768
- resolve(s, e) {
1769
- const t = as(s, e), n = [];
1770
- for (const { key: i } of t.items)
1771
- E(i) && (n.includes(i.value) ? e(`Ordered maps must not include duplicate keys: ${i.value}`) : n.push(i.value));
1772
- return Object.assign(new ae(), t);
1773
- },
1774
- createNode: (s, e, t) => ae.from(s, e, t)
1775
- };
1776
- function fs({ value: s, source: e }, t) {
1777
- return e && (s ? us : hs).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
1778
- }
1779
- const us = {
1780
- identify: (s) => s === !0,
1781
- default: !0,
1782
- tag: "tag:yaml.org,2002:bool",
1783
- test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1784
- resolve: () => new O(!0),
1785
- stringify: fs
1786
- }, hs = {
1787
- identify: (s) => s === !1,
1788
- default: !0,
1789
- tag: "tag:yaml.org,2002:bool",
1790
- test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1791
- resolve: () => new O(!1),
1792
- stringify: fs
1793
- }, Zs = {
1794
- identify: (s) => typeof s == "number",
1795
- default: !0,
1796
- tag: "tag:yaml.org,2002:float",
1797
- test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1798
- resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1799
- stringify: q
1800
- }, xs = {
1801
- identify: (s) => typeof s == "number",
1802
- default: !0,
1803
- tag: "tag:yaml.org,2002:float",
1804
- format: "EXP",
1805
- test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
1806
- resolve: (s) => parseFloat(s.replace(/_/g, "")),
1807
- stringify(s) {
1808
- const e = Number(s.value);
1809
- return isFinite(e) ? e.toExponential() : q(s);
1810
- }
1811
- }, en = {
1812
- identify: (s) => typeof s == "number",
1813
- default: !0,
1814
- tag: "tag:yaml.org,2002:float",
1815
- test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
1816
- resolve(s) {
1817
- const e = new O(parseFloat(s.replace(/_/g, ""))), t = s.indexOf(".");
1818
- if (t !== -1) {
1819
- const n = s.substring(t + 1).replace(/_/g, "");
1820
- n[n.length - 1] === "0" && (e.minFractionDigits = n.length);
1821
- }
1822
- return e;
1823
- },
1824
- stringify: q
1825
- }, Ee = (s) => typeof s == "bigint" || Number.isInteger(s);
1826
- function We(s, e, t, { intAsBigInt: n }) {
1827
- const i = s[0];
1828
- if ((i === "-" || i === "+") && (e += 1), s = s.substring(e).replace(/_/g, ""), n) {
1829
- switch (t) {
1830
- case 2:
1831
- s = `0b${s}`;
1832
- break;
1833
- case 8:
1834
- s = `0o${s}`;
1835
- break;
1836
- case 16:
1837
- s = `0x${s}`;
1838
- break;
1839
- }
1840
- const o = BigInt(s);
1841
- return i === "-" ? BigInt(-1) * o : o;
1842
- }
1843
- const r = parseInt(s, t);
1844
- return i === "-" ? -1 * r : r;
1845
- }
1846
- function kt(s, e, t) {
1847
- const { value: n } = s;
1848
- if (Ee(n)) {
1849
- const i = n.toString(e);
1850
- return n < 0 ? "-" + t + i.substr(1) : t + i;
1851
- }
1852
- return q(s);
1853
- }
1854
- const tn = {
1855
- identify: Ee,
1856
- default: !0,
1857
- tag: "tag:yaml.org,2002:int",
1858
- format: "BIN",
1859
- test: /^[-+]?0b[0-1_]+$/,
1860
- resolve: (s, e, t) => We(s, 2, 2, t),
1861
- stringify: (s) => kt(s, 2, "0b")
1862
- }, sn = {
1863
- identify: Ee,
1864
- default: !0,
1865
- tag: "tag:yaml.org,2002:int",
1866
- format: "OCT",
1867
- test: /^[-+]?0[0-7_]+$/,
1868
- resolve: (s, e, t) => We(s, 1, 8, t),
1869
- stringify: (s) => kt(s, 8, "0")
1870
- }, nn = {
1871
- identify: Ee,
1872
- default: !0,
1873
- tag: "tag:yaml.org,2002:int",
1874
- test: /^[-+]?[0-9][0-9_]*$/,
1875
- resolve: (s, e, t) => We(s, 0, 10, t),
1876
- stringify: q
1877
- }, rn = {
1878
- identify: Ee,
1879
- default: !0,
1880
- tag: "tag:yaml.org,2002:int",
1881
- format: "HEX",
1882
- test: /^[-+]?0x[0-9a-fA-F_]+$/,
1883
- resolve: (s, e, t) => We(s, 2, 16, t),
1884
- stringify: (s) => kt(s, 16, "0x")
1885
- };
1886
- class ce extends K {
1887
- constructor(e) {
1888
- super(e), this.tag = ce.tag;
1889
- }
1890
- add(e) {
1891
- let t;
1892
- I(e) ? t = e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? t = new B(e.key, null) : t = new B(e, null), X(this.items, t.key) || this.items.push(t);
1893
- }
1894
- /**
1895
- * If `keepPair` is `true`, returns the Pair matching `key`.
1896
- * Otherwise, returns the value of that Pair's key.
1897
- */
1898
- get(e, t) {
1899
- const n = X(this.items, e);
1900
- return !t && I(n) ? E(n.key) ? n.key.value : n.key : n;
1901
- }
1902
- set(e, t) {
1903
- if (typeof t != "boolean")
1904
- throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
1905
- const n = X(this.items, e);
1906
- n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new B(e));
1907
- }
1908
- toJSON(e, t) {
1909
- return super.toJSON(e, t, Set);
1910
- }
1911
- toString(e, t, n) {
1912
- if (!e)
1913
- return JSON.stringify(this);
1914
- if (this.hasAllNullValues(!0))
1915
- return super.toString(Object.assign({}, e, { allNullValues: !0 }), t, n);
1916
- throw new Error("Set items must all have null values");
1917
- }
1918
- static from(e, t, n) {
1919
- const { replacer: i } = n, r = new this(e);
1920
- if (t && Symbol.iterator in Object(t))
1921
- for (let o of t)
1922
- typeof i == "function" && (o = i.call(t, o, o)), r.items.push(mt(o, null, n));
1923
- return r;
1924
- }
1925
- }
1926
- ce.tag = "tag:yaml.org,2002:set";
1927
- const Nt = {
1928
- collection: "map",
1929
- identify: (s) => s instanceof Set,
1930
- nodeClass: ce,
1931
- default: !1,
1932
- tag: "tag:yaml.org,2002:set",
1933
- createNode: (s, e, t) => ce.from(s, e, t),
1934
- resolve(s, e) {
1935
- if (de(s)) {
1936
- if (s.hasAllNullValues(!0))
1937
- return Object.assign(new ce(), s);
1938
- e("Set items must all have null values");
1939
- } else
1940
- e("Expected a mapping for this tag");
1941
- return s;
1942
- }
1943
- };
1944
- function Ot(s, e) {
1945
- const t = s[0], n = t === "-" || t === "+" ? s.substring(1) : s, i = (o) => e ? BigInt(o) : Number(o), r = n.replace(/_/g, "").split(":").reduce((o, l) => o * i(60) + i(l), i(0));
1946
- return t === "-" ? i(-1) * r : r;
1947
- }
1948
- function ds(s) {
1949
- let { value: e } = s, t = (o) => o;
1950
- if (typeof e == "bigint")
1951
- t = (o) => BigInt(o);
1952
- else if (isNaN(e) || !isFinite(e))
1953
- return q(s);
1954
- let n = "";
1955
- e < 0 && (n = "-", e *= t(-1));
1956
- const i = t(60), r = [e % i];
1957
- return e < 60 ? r.unshift(0) : (e = (e - r[0]) / i, r.unshift(e % i), e >= 60 && (e = (e - r[0]) / i, r.unshift(e))), n + r.map((o) => String(o).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
1958
- }
1959
- const ps = {
1960
- identify: (s) => typeof s == "bigint" || Number.isInteger(s),
1961
- default: !0,
1962
- tag: "tag:yaml.org,2002:int",
1963
- format: "TIME",
1964
- test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
1965
- resolve: (s, e, { intAsBigInt: t }) => Ot(s, t),
1966
- stringify: ds
1967
- }, ms = {
1968
- identify: (s) => typeof s == "number",
1969
- default: !0,
1970
- tag: "tag:yaml.org,2002:float",
1971
- format: "TIME",
1972
- test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
1973
- resolve: (s) => Ot(s, !1),
1974
- stringify: ds
1975
- }, He = {
1976
- identify: (s) => s instanceof Date,
1977
- default: !0,
1978
- tag: "tag:yaml.org,2002:timestamp",
1979
- // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
1980
- // may be omitted altogether, resulting in a date format. In such a case, the time part is
1981
- // assumed to be 00:00:00Z (start of day, UTC).
1982
- test: RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),
1983
- resolve(s) {
1984
- const e = s.match(He.test);
1985
- if (!e)
1986
- throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
1987
- const [, t, n, i, r, o, l] = e.map(Number), a = e[7] ? Number((e[7] + "00").substr(1, 3)) : 0;
1988
- let c = Date.UTC(t, n - 1, i, r || 0, o || 0, l || 0, a);
1989
- const p = e[8];
1990
- if (p && p !== "Z") {
1991
- let f = Ot(p, !1);
1992
- Math.abs(f) < 30 && (f *= 60), c -= 6e4 * f;
1993
- }
1994
- return new Date(c);
1995
- },
1996
- stringify: ({ value: s }) => s.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "")
1997
- }, Ct = [
1998
- me,
1999
- ye,
2000
- Ye,
2001
- Ge,
2002
- us,
2003
- hs,
2004
- tn,
2005
- sn,
2006
- nn,
2007
- rn,
2008
- Zs,
2009
- xs,
2010
- en,
2011
- bt,
2012
- V,
2013
- St,
2014
- wt,
2015
- Nt,
2016
- ps,
2017
- ms,
2018
- He
2019
- ], Bt = /* @__PURE__ */ new Map([
2020
- ["core", Ws],
2021
- ["failsafe", [me, ye, Ye]],
2022
- ["json", zs],
2023
- ["yaml11", Ct],
2024
- ["yaml-1.1", Ct]
2025
- ]), vt = {
2026
- binary: bt,
2027
- bool: yt,
2028
- float: ns,
2029
- floatExp: ss,
2030
- floatNaN: ts,
2031
- floatTime: ms,
2032
- int: os,
2033
- intHex: ls,
2034
- intOct: rs,
2035
- intTime: ps,
2036
- map: me,
2037
- merge: V,
2038
- null: Ge,
2039
- omap: St,
2040
- pairs: wt,
2041
- seq: ye,
2042
- set: Nt,
2043
- timestamp: He
2044
- }, on = {
2045
- "tag:yaml.org,2002:binary": bt,
2046
- "tag:yaml.org,2002:merge": V,
2047
- "tag:yaml.org,2002:omap": St,
2048
- "tag:yaml.org,2002:pairs": wt,
2049
- "tag:yaml.org,2002:set": Nt,
2050
- "tag:yaml.org,2002:timestamp": He
2051
- };
2052
- function tt(s, e, t) {
2053
- const n = Bt.get(e);
2054
- if (n && !s)
2055
- return t && !n.includes(V) ? n.concat(V) : n.slice();
2056
- let i = n;
2057
- if (!i)
2058
- if (Array.isArray(s))
2059
- i = [];
2060
- else {
2061
- const r = Array.from(Bt.keys()).filter((o) => o !== "yaml11").map((o) => JSON.stringify(o)).join(", ");
2062
- throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`);
2063
- }
2064
- if (Array.isArray(s))
2065
- for (const r of s)
2066
- i = i.concat(r);
2067
- else typeof s == "function" && (i = s(i.slice()));
2068
- return t && (i = i.concat(V)), i.reduce((r, o) => {
2069
- const l = typeof o == "string" ? vt[o] : o;
2070
- if (!l) {
2071
- const a = JSON.stringify(o), c = Object.keys(vt).map((p) => JSON.stringify(p)).join(", ");
2072
- throw new Error(`Unknown custom tag ${a}; use one of ${c}`);
2073
- }
2074
- return r.includes(l) || r.push(l), r;
2075
- }, []);
2076
- }
2077
- const ln = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
2078
- class Xe {
2079
- constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: r, sortMapEntries: o, toStringDefaults: l }) {
2080
- this.compat = Array.isArray(e) ? tt(e, "compat") : e ? tt(null, e) : null, this.name = typeof r == "string" && r || "core", this.knownTags = i ? on : {}, this.tags = tt(t, this.name, n), this.toStringOptions = l ?? null, Object.defineProperty(this, Y, { value: me }), Object.defineProperty(this, U, { value: Ye }), Object.defineProperty(this, he, { value: ye }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? ln : null;
2081
- }
2082
- clone() {
2083
- const e = Object.create(Xe.prototype, Object.getOwnPropertyDescriptors(this));
2084
- return e.tags = this.tags.slice(), e;
2085
- }
2086
- }
2087
- function an(s, e) {
2088
- var a;
2089
- const t = [];
2090
- let n = e.directives === !0;
2091
- if (e.directives !== !1 && s.directives) {
2092
- const c = s.directives.toString(s);
2093
- c ? (t.push(c), n = !0) : s.directives.docStart && (n = !0);
2094
- }
2095
- n && t.push("---");
2096
- const i = Xt(s, e), { commentString: r } = i.options;
2097
- if (s.commentBefore) {
2098
- t.length !== 1 && t.unshift("");
2099
- const c = r(s.commentBefore);
2100
- t.unshift(F(c, ""));
2101
- }
2102
- let o = !1, l = null;
2103
- if (s.contents) {
2104
- if ($(s.contents)) {
2105
- if (s.contents.spaceBefore && n && t.push(""), s.contents.commentBefore) {
2106
- const f = r(s.contents.commentBefore);
2107
- t.push(F(f, ""));
2108
- }
2109
- i.forceBlockIndent = !!s.comment, l = s.contents.comment;
2110
- }
2111
- const c = l ? void 0 : () => o = !0;
2112
- let p = fe(s.contents, i, () => l = null, c);
2113
- l && (p += H(p, "", r(l))), (p[0] === "|" || p[0] === ">") && t[t.length - 1] === "---" ? t[t.length - 1] = `--- ${p}` : t.push(p);
2114
- } else
2115
- t.push(fe(s.contents, i));
2116
- if ((a = s.directives) != null && a.docEnd)
2117
- if (s.comment) {
2118
- const c = r(s.comment);
2119
- c.includes(`
2120
- `) ? (t.push("..."), t.push(F(c, ""))) : t.push(`... ${c}`);
2121
- } else
2122
- t.push("...");
2123
- else {
2124
- let c = s.comment;
2125
- c && o && (c = c.replace(/^\n+/, "")), c && ((!o || l) && t[t.length - 1] !== "" && t.push(""), t.push(F(r(c), "")));
2126
- }
2127
- return t.join(`
2128
- `) + `
2129
- `;
2130
- }
2131
- class ge {
2132
- constructor(e, t, n) {
2133
- this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, j, { value: lt });
2134
- let i = null;
2135
- typeof t == "function" || Array.isArray(t) ? i = t : n === void 0 && t && (n = t, t = void 0);
2136
- const r = Object.assign({
2137
- intAsBigInt: !1,
2138
- keepSourceTokens: !1,
2139
- logLevel: "warn",
2140
- prettyErrors: !0,
2141
- strict: !0,
2142
- stringKeys: !1,
2143
- uniqueKeys: !0,
2144
- version: "1.2"
2145
- }, n);
2146
- this.options = r;
2147
- let { version: o } = r;
2148
- n != null && n._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (o = this.directives.yaml.version)) : this.directives = new v({ version: o }), this.setSchema(o, n), this.contents = e === void 0 ? null : this.createNode(e, i, n);
2149
- }
2150
- /**
2151
- * Create a deep copy of this Document and its contents.
2152
- *
2153
- * Custom Node values that inherit from `Object` still refer to their original instances.
2154
- */
2155
- clone() {
2156
- const e = Object.create(ge.prototype, {
2157
- [j]: { value: lt }
2158
- });
2159
- return e.commentBefore = this.commentBefore, e.comment = this.comment, e.errors = this.errors.slice(), e.warnings = this.warnings.slice(), e.options = Object.assign({}, this.options), this.directives && (e.directives = this.directives.clone()), e.schema = this.schema.clone(), e.contents = $(this.contents) ? this.contents.clone(e.schema) : this.contents, this.range && (e.range = this.range.slice()), e;
2160
- }
2161
- /** Adds a value to the document. */
2162
- add(e) {
2163
- se(this.contents) && this.contents.add(e);
2164
- }
2165
- /** Adds a value to the document. */
2166
- addIn(e, t) {
2167
- se(this.contents) && this.contents.addIn(e, t);
2168
- }
2169
- /**
2170
- * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
2171
- *
2172
- * If `node` already has an anchor, `name` is ignored.
2173
- * Otherwise, the `node.anchor` value will be set to `name`,
2174
- * or if an anchor with that name is already present in the document,
2175
- * `name` will be used as a prefix for a new unique anchor.
2176
- * If `name` is undefined, the generated anchor will use 'a' as a prefix.
2177
- */
2178
- createAlias(e, t) {
2179
- if (!e.anchor) {
2180
- const n = Yt(this);
2181
- e.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2182
- !t || n.has(t) ? Gt(t || "a", n) : t;
2183
- }
2184
- return new Ue(e.anchor);
2185
- }
2186
- createNode(e, t, n) {
2187
- let i;
2188
- if (typeof t == "function")
2189
- e = t.call({ "": e }, "", e), i = t;
2190
- else if (Array.isArray(t)) {
2191
- const m = (w) => typeof w == "number" || w instanceof String || w instanceof Number, b = t.filter(m).map(String);
2192
- b.length > 0 && (t = t.concat(b)), i = t;
2193
- } else n === void 0 && t && (n = t, t = void 0);
2194
- const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: p } = n ?? {}, { onAnchor: f, setAnchors: d, sourceObjects: h } = Ks(
2195
- this,
2196
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2197
- o || "a"
2198
- ), y = {
2199
- aliasDuplicateObjects: r ?? !0,
2200
- keepUndefined: a ?? !1,
2201
- onAnchor: f,
2202
- onTagObj: c,
2203
- replacer: i,
2204
- schema: this.schema,
2205
- sourceObjects: h
2206
- }, u = ke(e, p, y);
2207
- return l && L(u) && (u.flow = !0), d(), u;
2208
- }
2209
- /**
2210
- * Convert a key and a value into a `Pair` using the current schema,
2211
- * recursively wrapping all values as `Scalar` or `Collection` nodes.
2212
- */
2213
- createPair(e, t, n = {}) {
2214
- const i = this.createNode(e, null, n), r = this.createNode(t, null, n);
2215
- return new B(i, r);
2216
- }
2217
- /**
2218
- * Removes a value from the document.
2219
- * @returns `true` if the item was found and removed.
2220
- */
2221
- delete(e) {
2222
- return se(this.contents) ? this.contents.delete(e) : !1;
2223
- }
2224
- /**
2225
- * Removes a value from the document.
2226
- * @returns `true` if the item was found and removed.
2227
- */
2228
- deleteIn(e) {
2229
- return we(e) ? this.contents == null ? !1 : (this.contents = null, !0) : se(this.contents) ? this.contents.deleteIn(e) : !1;
2230
- }
2231
- /**
2232
- * Returns item at `key`, or `undefined` if not found. By default unwraps
2233
- * scalar values from their surrounding node; to disable set `keepScalar` to
2234
- * `true` (collections are always returned intact).
2235
- */
2236
- get(e, t) {
2237
- return L(this.contents) ? this.contents.get(e, t) : void 0;
2238
- }
2239
- /**
2240
- * Returns item at `path`, or `undefined` if not found. By default unwraps
2241
- * scalar values from their surrounding node; to disable set `keepScalar` to
2242
- * `true` (collections are always returned intact).
2243
- */
2244
- getIn(e, t) {
2245
- return we(e) ? !t && E(this.contents) ? this.contents.value : this.contents : L(this.contents) ? this.contents.getIn(e, t) : void 0;
2246
- }
2247
- /**
2248
- * Checks if the document includes a value with the key `key`.
2249
- */
2250
- has(e) {
2251
- return L(this.contents) ? this.contents.has(e) : !1;
2252
- }
2253
- /**
2254
- * Checks if the document includes a value at `path`.
2255
- */
2256
- hasIn(e) {
2257
- return we(e) ? this.contents !== void 0 : L(this.contents) ? this.contents.hasIn(e) : !1;
2258
- }
2259
- /**
2260
- * Sets a value in this document. For `!!set`, `value` needs to be a
2261
- * boolean to add/remove the item from the set.
2262
- */
2263
- set(e, t) {
2264
- this.contents == null ? this.contents = Pe(this.schema, [e], t) : se(this.contents) && this.contents.set(e, t);
2265
- }
2266
- /**
2267
- * Sets a value in this document. For `!!set`, `value` needs to be a
2268
- * boolean to add/remove the item from the set.
2269
- */
2270
- setIn(e, t) {
2271
- we(e) ? this.contents = t : this.contents == null ? this.contents = Pe(this.schema, Array.from(e), t) : se(this.contents) && this.contents.setIn(e, t);
2272
- }
2273
- /**
2274
- * Change the YAML version and schema used by the document.
2275
- * A `null` version disables support for directives, explicit tags, anchors, and aliases.
2276
- * It also requires the `schema` option to be given as a `Schema` instance value.
2277
- *
2278
- * Overrides all previously set schema options.
2279
- */
2280
- setSchema(e, t = {}) {
2281
- typeof e == "number" && (e = String(e));
2282
- let n;
2283
- switch (e) {
2284
- case "1.1":
2285
- this.directives ? this.directives.yaml.version = "1.1" : this.directives = new v({ version: "1.1" }), n = { resolveKnownTags: !1, schema: "yaml-1.1" };
2286
- break;
2287
- case "1.2":
2288
- case "next":
2289
- this.directives ? this.directives.yaml.version = e : this.directives = new v({ version: e }), n = { resolveKnownTags: !0, schema: "core" };
2290
- break;
2291
- case null:
2292
- this.directives && delete this.directives, n = null;
2293
- break;
2294
- default: {
2295
- const i = JSON.stringify(e);
2296
- throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`);
2297
- }
2298
- }
2299
- if (t.schema instanceof Object)
2300
- this.schema = t.schema;
2301
- else if (n)
2302
- this.schema = new Xe(Object.assign(n, t));
2303
- else
2304
- throw new Error("With a null YAML version, the { schema: Schema } option is required");
2305
- }
2306
- // json & jsonArg are only used from toJSON()
2307
- toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: i, onAnchor: r, reviver: o } = {}) {
2308
- const l = {
2309
- anchors: /* @__PURE__ */ new Map(),
2310
- doc: this,
2311
- keep: !e,
2312
- mapAsMap: n === !0,
2313
- mapKeyWarned: !1,
2314
- maxAliasCount: typeof i == "number" ? i : 100
2315
- }, a = P(this.contents, t ?? "", l);
2316
- if (typeof r == "function")
2317
- for (const { count: c, res: p } of l.anchors.values())
2318
- r(p, c);
2319
- return typeof o == "function" ? oe(o, { "": a }, "", a) : a;
2320
- }
2321
- /**
2322
- * A JSON representation of the document `contents`.
2323
- *
2324
- * @param jsonArg Used by `JSON.stringify` to indicate the array index or
2325
- * property name.
2326
- */
2327
- toJSON(e, t) {
2328
- return this.toJS({ json: !0, jsonArg: e, mapAsMap: !1, onAnchor: t });
2329
- }
2330
- /** A YAML representation of the document. */
2331
- toString(e = {}) {
2332
- if (this.errors.length > 0)
2333
- throw new Error("Document with errors cannot be stringified");
2334
- if ("indent" in e && (!Number.isInteger(e.indent) || Number(e.indent) <= 0)) {
2335
- const t = JSON.stringify(e.indent);
2336
- throw new Error(`"indent" option must be a positive integer, not ${t}`);
2337
- }
2338
- return an(this, e);
2339
- }
2340
- }
2341
- function se(s) {
2342
- if (L(s))
2343
- return !0;
2344
- throw new Error("Expected a YAML collection as document contents");
2345
- }
2346
- class At extends Error {
2347
- constructor(e, t, n, i) {
2348
- super(), this.name = e, this.code = n, this.message = i, this.pos = t;
2349
- }
2350
- }
2351
- class z extends At {
2352
- constructor(e, t, n) {
2353
- super("YAMLParseError", e, t, n);
2354
- }
2355
- }
2356
- class ys extends At {
2357
- constructor(e, t, n) {
2358
- super("YAMLWarning", e, t, n);
2359
- }
2360
- }
2361
- const De = (s, e) => (t) => {
2362
- if (t.pos[0] === -1)
2363
- return;
2364
- t.linePos = t.pos.map((l) => e.linePos(l));
2365
- const { line: n, col: i } = t.linePos[0];
2366
- t.message += ` at line ${n}, column ${i}`;
2367
- let r = i - 1, o = s.substring(e.lineStarts[n - 1], e.lineStarts[n]).replace(/[\n\r]+$/, "");
2368
- if (r >= 60 && o.length > 80) {
2369
- const l = Math.min(r - 39, o.length - 79);
2370
- o = "…" + o.substring(l), r -= l - 1;
2371
- }
2372
- if (o.length > 80 && (o = o.substring(0, 79) + "…"), n > 1 && /^ *$/.test(o.substring(0, r))) {
2373
- let l = s.substring(e.lineStarts[n - 2], e.lineStarts[n - 1]);
2374
- l.length > 80 && (l = l.substring(0, 79) + `…
2375
- `), o = l + o;
2376
- }
2377
- if (/[^ ]/.test(o)) {
2378
- let l = 1;
2379
- const a = t.linePos[1];
2380
- a && a.line === n && a.col > i && (l = Math.max(1, Math.min(a.col - i, 80 - r)));
2381
- const c = " ".repeat(r) + "^".repeat(l);
2382
- t.message += `:
2383
-
2384
- ${o}
2385
- ${c}
2386
- `;
2387
- }
2388
- };
2389
- function ue(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIndent: o, startOnNewline: l }) {
2390
- let a = !1, c = l, p = l, f = "", d = "", h = !1, y = !1, u = null, m = null, b = null, w = null, N = null, S = null, A = null;
2391
- for (const g of s)
2392
- switch (y && (g.type !== "space" && g.type !== "newline" && g.type !== "comma" && r(g.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), y = !1), u && (c && g.type !== "comment" && g.type !== "newline" && r(u, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), u = null), g.type) {
2393
- case "space":
2394
- !e && (t !== "doc-start" || (n == null ? void 0 : n.type) !== "flow-collection") && g.source.includes(" ") && (u = g), p = !0;
2395
- break;
2396
- case "comment": {
2397
- p || r(g, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2398
- const _ = g.source.substring(1) || " ";
2399
- f ? f += d + _ : f = _, d = "", c = !1;
2400
- break;
2401
- }
2402
- case "newline":
2403
- c ? f ? f += g.source : a = !0 : d += g.source, c = !0, h = !0, (m || b) && (w = g), p = !0;
2404
- break;
2405
- case "anchor":
2406
- m && r(g, "MULTIPLE_ANCHORS", "A node can have at most one anchor"), g.source.endsWith(":") && r(g.offset + g.source.length - 1, "BAD_ALIAS", "Anchor ending in : is ambiguous", !0), m = g, A === null && (A = g.offset), c = !1, p = !1, y = !0;
2407
- break;
2408
- case "tag": {
2409
- b && r(g, "MULTIPLE_TAGS", "A node can have at most one tag"), b = g, A === null && (A = g.offset), c = !1, p = !1, y = !0;
2410
- break;
2411
- }
2412
- case t:
2413
- (m || b) && r(g, "BAD_PROP_ORDER", `Anchors and tags must be after the ${g.source} indicator`), S && r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.source} in ${e ?? "collection"}`), S = g, c = t === "seq-item-ind" || t === "explicit-key-ind", p = !1;
2414
- break;
2415
- case "comma":
2416
- if (e) {
2417
- N && r(g, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), N = g, c = !1, p = !1;
2418
- break;
2419
- }
2420
- default:
2421
- r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.type} token`), c = !1, p = !1;
2422
- }
2423
- const k = s[s.length - 1], T = k ? k.offset + k.source.length : i;
2424
- return y && n && n.type !== "space" && n.type !== "newline" && n.type !== "comma" && (n.type !== "scalar" || n.source !== "") && r(n.offset, "MISSING_CHAR", "Tags and anchors must be separated from the next token by white space"), u && (c && u.indent <= o || (n == null ? void 0 : n.type) === "block-map" || (n == null ? void 0 : n.type) === "block-seq") && r(u, "TAB_AS_INDENT", "Tabs are not allowed as indentation"), {
2425
- comma: N,
2426
- found: S,
2427
- spaceBefore: a,
2428
- comment: f,
2429
- hasNewline: h,
2430
- anchor: m,
2431
- tag: b,
2432
- newlineAfterProp: w,
2433
- end: T,
2434
- start: A ?? T
2435
- };
2436
- }
2437
- function Ne(s) {
2438
- if (!s)
2439
- return null;
2440
- switch (s.type) {
2441
- case "alias":
2442
- case "scalar":
2443
- case "double-quoted-scalar":
2444
- case "single-quoted-scalar":
2445
- if (s.source.includes(`
2446
- `))
2447
- return !0;
2448
- if (s.end) {
2449
- for (const e of s.end)
2450
- if (e.type === "newline")
2451
- return !0;
2452
- }
2453
- return !1;
2454
- case "flow-collection":
2455
- for (const e of s.items) {
2456
- for (const t of e.start)
2457
- if (t.type === "newline")
2458
- return !0;
2459
- if (e.sep) {
2460
- for (const t of e.sep)
2461
- if (t.type === "newline")
2462
- return !0;
2463
- }
2464
- if (Ne(e.key) || Ne(e.value))
2465
- return !0;
2466
- }
2467
- return !1;
2468
- default:
2469
- return !0;
2470
- }
2471
- }
2472
- function ut(s, e, t) {
2473
- if ((e == null ? void 0 : e.type) === "flow-collection") {
2474
- const n = e.end[0];
2475
- n.indent === s && (n.source === "]" || n.source === "}") && Ne(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2476
- }
2477
- }
2478
- function gs(s, e, t) {
2479
- const { uniqueKeys: n } = s.options;
2480
- if (n === !1)
2481
- return !1;
2482
- const i = typeof n == "function" ? n : (r, o) => r === o || E(r) && E(o) && r.value === o.value;
2483
- return e.some((r) => i(r.key, t));
2484
- }
2485
- const Mt = "All mapping items must start at the same column";
2486
- function cn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2487
- var p;
2488
- const o = (r == null ? void 0 : r.nodeClass) ?? K, l = new o(t.schema);
2489
- t.atRoot && (t.atRoot = !1);
2490
- let a = n.offset, c = null;
2491
- for (const f of n.items) {
2492
- const { start: d, key: h, sep: y, value: u } = f, m = ue(d, {
2493
- indicator: "explicit-key-ind",
2494
- next: h ?? (y == null ? void 0 : y[0]),
2495
- offset: a,
2496
- onError: i,
2497
- parentIndent: n.indent,
2498
- startOnNewline: !0
2499
- }), b = !m.found;
2500
- if (b) {
2501
- if (h && (h.type === "block-seq" ? i(a, "BLOCK_AS_IMPLICIT_KEY", "A block sequence may not be used as an implicit map key") : "indent" in h && h.indent !== n.indent && i(a, "BAD_INDENT", Mt)), !m.anchor && !m.tag && !y) {
2502
- c = m.end, m.comment && (l.comment ? l.comment += `
2503
- ` + m.comment : l.comment = m.comment);
2504
- continue;
2505
- }
2506
- (m.newlineAfterProp || Ne(h)) && i(h ?? d[d.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2507
- } else ((p = m.found) == null ? void 0 : p.indent) !== n.indent && i(a, "BAD_INDENT", Mt);
2508
- t.atKey = !0;
2509
- const w = m.end, N = h ? s(t, h, m, i) : e(t, w, d, null, m, i);
2510
- t.schema.compat && ut(n.indent, h, i), t.atKey = !1, gs(t, l.items, N) && i(w, "DUPLICATE_KEY", "Map keys must be unique");
2511
- const S = ue(y ?? [], {
2512
- indicator: "map-value-ind",
2513
- next: u,
2514
- offset: N.range[2],
2515
- onError: i,
2516
- parentIndent: n.indent,
2517
- startOnNewline: !h || h.type === "block-scalar"
2518
- });
2519
- if (a = S.end, S.found) {
2520
- b && ((u == null ? void 0 : u.type) === "block-map" && !S.hasNewline && i(a, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && m.start < S.found.offset - 1024 && i(N.range, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));
2521
- const A = u ? s(t, u, S, i) : e(t, a, y, null, S, i);
2522
- t.schema.compat && ut(n.indent, u, i), a = A.range[2];
2523
- const k = new B(N, A);
2524
- t.options.keepSourceTokens && (k.srcToken = f), l.items.push(k);
2525
- } else {
2526
- b && i(N.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), S.comment && (N.comment ? N.comment += `
2527
- ` + S.comment : N.comment = S.comment);
2528
- const A = new B(N);
2529
- t.options.keepSourceTokens && (A.srcToken = f), l.items.push(A);
2530
- }
2531
- }
2532
- return c && c < a && i(c, "IMPOSSIBLE", "Map comment with trailing content"), l.range = [n.offset, a, c ?? a], l;
2533
- }
2534
- function fn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2535
- const o = (r == null ? void 0 : r.nodeClass) ?? Q, l = new o(t.schema);
2536
- t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2537
- let a = n.offset, c = null;
2538
- for (const { start: p, value: f } of n.items) {
2539
- const d = ue(p, {
2540
- indicator: "seq-item-ind",
2541
- next: f,
2542
- offset: a,
2543
- onError: i,
2544
- parentIndent: n.indent,
2545
- startOnNewline: !0
2546
- });
2547
- if (!d.found)
2548
- if (d.anchor || d.tag || f)
2549
- f && f.type === "block-seq" ? i(d.end, "BAD_INDENT", "All sequence items must start at the same column") : i(a, "MISSING_CHAR", "Sequence item without - indicator");
2550
- else {
2551
- c = d.end, d.comment && (l.comment = d.comment);
2552
- continue;
2553
- }
2554
- const h = f ? s(t, f, d, i) : e(t, d.end, p, null, d, i);
2555
- t.schema.compat && ut(n.indent, f, i), a = h.range[2], l.items.push(h);
2556
- }
2557
- return l.range = [n.offset, a, c ?? a], l;
2558
- }
2559
- function Ie(s, e, t, n) {
2560
- let i = "";
2561
- if (s) {
2562
- let r = !1, o = "";
2563
- for (const l of s) {
2564
- const { source: a, type: c } = l;
2565
- switch (c) {
2566
- case "space":
2567
- r = !0;
2568
- break;
2569
- case "comment": {
2570
- t && !r && n(l, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2571
- const p = a.substring(1) || " ";
2572
- i ? i += o + p : i = p, o = "";
2573
- break;
2574
- }
2575
- case "newline":
2576
- i && (o += a), r = !0;
2577
- break;
2578
- default:
2579
- n(l, "UNEXPECTED_TOKEN", `Unexpected ${c} at node end`);
2580
- }
2581
- e += a.length;
2582
- }
2583
- }
2584
- return { comment: i, offset: e };
2585
- }
2586
- const st = "Block collections are not allowed within flow collections", nt = (s) => s && (s.type === "block-map" || s.type === "block-seq");
2587
- function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2588
- const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = (r == null ? void 0 : r.nodeClass) ?? (o ? K : Q), c = new a(t.schema);
2589
- c.flow = !0;
2590
- const p = t.atRoot;
2591
- p && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2592
- let f = n.offset + n.start.source.length;
2593
- for (let m = 0; m < n.items.length; ++m) {
2594
- const b = n.items[m], { start: w, key: N, sep: S, value: A } = b, k = ue(w, {
2595
- flow: l,
2596
- indicator: "explicit-key-ind",
2597
- next: N ?? (S == null ? void 0 : S[0]),
2598
- offset: f,
2599
- onError: i,
2600
- parentIndent: n.indent,
2601
- startOnNewline: !1
2602
- });
2603
- if (!k.found) {
2604
- if (!k.anchor && !k.tag && !S && !A) {
2605
- m === 0 && k.comma ? i(k.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`) : m < n.items.length - 1 && i(k.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${l}`), k.comment && (c.comment ? c.comment += `
2606
- ` + k.comment : c.comment = k.comment), f = k.end;
2607
- continue;
2608
- }
2609
- !o && t.options.strict && Ne(N) && i(
2610
- N,
2611
- // checked by containsNewline()
2612
- "MULTILINE_IMPLICIT_KEY",
2613
- "Implicit keys of flow sequence pairs need to be on a single line"
2614
- );
2615
- }
2616
- if (m === 0)
2617
- k.comma && i(k.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`);
2618
- else if (k.comma || i(k.start, "MISSING_CHAR", `Missing , between ${l} items`), k.comment) {
2619
- let T = "";
2620
- e: for (const g of w)
2621
- switch (g.type) {
2622
- case "comma":
2623
- case "space":
2624
- break;
2625
- case "comment":
2626
- T = g.source.substring(1);
2627
- break e;
2628
- default:
2629
- break e;
2630
- }
2631
- if (T) {
2632
- let g = c.items[c.items.length - 1];
2633
- I(g) && (g = g.value ?? g.key), g.comment ? g.comment += `
2634
- ` + T : g.comment = T, k.comment = k.comment.substring(T.length + 1);
2635
- }
2636
- }
2637
- if (!o && !S && !k.found) {
2638
- const T = A ? s(t, A, k, i) : e(t, k.end, S, null, k, i);
2639
- c.items.push(T), f = T.range[2], nt(A) && i(T.range, "BLOCK_IN_FLOW", st);
2640
- } else {
2641
- t.atKey = !0;
2642
- const T = k.end, g = N ? s(t, N, k, i) : e(t, T, w, null, k, i);
2643
- nt(N) && i(g.range, "BLOCK_IN_FLOW", st), t.atKey = !1;
2644
- const _ = ue(S ?? [], {
2645
- flow: l,
2646
- indicator: "map-value-ind",
2647
- next: A,
2648
- offset: g.range[2],
2649
- onError: i,
2650
- parentIndent: n.indent,
2651
- startOnNewline: !1
2652
- });
2653
- if (_.found) {
2654
- if (!o && !k.found && t.options.strict) {
2655
- if (S)
2656
- for (const C of S) {
2657
- if (C === _.found)
2658
- break;
2659
- if (C.type === "newline") {
2660
- i(C, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2661
- break;
2662
- }
2663
- }
2664
- k.start < _.found.offset - 1024 && i(_.found, "KEY_OVER_1024_CHARS", "The : indicator must be at most 1024 chars after the start of an implicit flow sequence key");
2665
- }
2666
- } else A && ("source" in A && A.source && A.source[0] === ":" ? i(A, "MISSING_CHAR", `Missing space after : in ${l}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${l} items`));
2667
- const J = A ? s(t, A, _, i) : _.found ? e(t, _.end, S, null, _, i) : null;
2668
- J ? nt(A) && i(J.range, "BLOCK_IN_FLOW", st) : _.comment && (g.comment ? g.comment += `
2669
- ` + _.comment : g.comment = _.comment);
2670
- const te = new B(g, J);
2671
- if (t.options.keepSourceTokens && (te.srcToken = b), o) {
2672
- const C = c;
2673
- gs(t, C.items, g) && i(T, "DUPLICATE_KEY", "Map keys must be unique"), C.items.push(te);
2674
- } else {
2675
- const C = new K(t.schema);
2676
- C.flow = !0, C.items.push(te);
2677
- const Lt = (J ?? g).range;
2678
- C.range = [g.range[0], Lt[1], Lt[2]], c.items.push(C);
2679
- }
2680
- f = J ? J.range[2] : _.end;
2681
- }
2682
- }
2683
- const d = o ? "}" : "]", [h, ...y] = n.end;
2684
- let u = f;
2685
- if (h && h.source === d)
2686
- u = h.offset + h.source.length;
2687
- else {
2688
- const m = l[0].toUpperCase() + l.substring(1), b = p ? `${m} must end with a ${d}` : `${m} in block collection must be sufficiently indented and end with a ${d}`;
2689
- i(f, p ? "MISSING_CHAR" : "BAD_INDENT", b), h && h.source.length !== 1 && y.unshift(h);
2690
- }
2691
- if (y.length > 0) {
2692
- const m = Ie(y, u, t.options.strict, i);
2693
- m.comment && (c.comment ? c.comment += `
2694
- ` + m.comment : c.comment = m.comment), c.range = [n.offset, u, m.offset];
2695
- } else
2696
- c.range = [n.offset, u, u];
2697
- return c;
2698
- }
2699
- function it(s, e, t, n, i, r) {
2700
- const o = t.type === "block-map" ? cn(s, e, t, n, r) : t.type === "block-seq" ? fn(s, e, t, n, r) : un(s, e, t, n, r), l = o.constructor;
2701
- return i === "!" || i === l.tagName ? (o.tag = l.tagName, o) : (i && (o.tag = i), o);
2702
- }
2703
- function hn(s, e, t, n, i) {
2704
- var d;
2705
- const r = n.tag, o = r ? e.directives.tagName(r.source, (h) => i(r, "TAG_RESOLVE_FAILED", h)) : null;
2706
- if (t.type === "block-seq") {
2707
- const { anchor: h, newlineAfterProp: y } = n, u = h && r ? h.offset > r.offset ? h : r : h ?? r;
2708
- u && (!y || y.offset < u.offset) && i(u, "MISSING_CHAR", "Missing newline after block sequence props");
2709
- }
2710
- const l = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
2711
- if (!r || !o || o === "!" || o === K.tagName && l === "map" || o === Q.tagName && l === "seq")
2712
- return it(s, e, t, i, o);
2713
- let a = e.schema.tags.find((h) => h.tag === o && h.collection === l);
2714
- if (!a) {
2715
- const h = e.schema.knownTags[o];
2716
- if (h && h.collection === l)
2717
- e.schema.tags.push(Object.assign({}, h, { default: !1 })), a = h;
2718
- else
2719
- return h != null && h.collection ? i(r, "BAD_COLLECTION_TYPE", `${h.tag} used for ${l} collection, but expects ${h.collection}`, !0) : i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), it(s, e, t, i, o);
2720
- }
2721
- const c = it(s, e, t, i, o, a), p = ((d = a.resolve) == null ? void 0 : d.call(a, c, (h) => i(r, "TAG_RESOLVE_FAILED", h), e.options)) ?? c, f = $(p) ? p : new O(p);
2722
- return f.range = c.range, f.tag = o, a != null && a.format && (f.format = a.format), f;
2723
- }
2724
- function bs(s, e, t) {
2725
- const n = e.offset, i = dn(e, s.options.strict, t);
2726
- if (!i)
2727
- return { value: "", type: null, comment: "", range: [n, n, n] };
2728
- const r = i.mode === ">" ? O.BLOCK_FOLDED : O.BLOCK_LITERAL, o = e.source ? pn(e.source) : [];
2729
- let l = o.length;
2730
- for (let u = o.length - 1; u >= 0; --u) {
2731
- const m = o[u][1];
2732
- if (m === "" || m === "\r")
2733
- l = u;
2734
- else
2735
- break;
2736
- }
2737
- if (l === 0) {
2738
- const u = i.chomp === "+" && o.length > 0 ? `
2739
- `.repeat(Math.max(1, o.length - 1)) : "";
2740
- let m = n + i.length;
2741
- return e.source && (m += e.source.length), { value: u, type: r, comment: i.comment, range: [n, m, m] };
2742
- }
2743
- let a = e.indent + i.indent, c = e.offset + i.length, p = 0;
2744
- for (let u = 0; u < l; ++u) {
2745
- const [m, b] = o[u];
2746
- if (b === "" || b === "\r")
2747
- i.indent === 0 && m.length > a && (a = m.length);
2748
- else {
2749
- m.length < a && t(c + m.length, "MISSING_CHAR", "Block scalars with more-indented leading empty lines must use an explicit indentation indicator"), i.indent === 0 && (a = m.length), p = u, a === 0 && !s.atRoot && t(c, "BAD_INDENT", "Block scalar values in collections must be indented");
2750
- break;
2751
- }
2752
- c += m.length + b.length + 1;
2753
- }
2754
- for (let u = o.length - 1; u >= l; --u)
2755
- o[u][0].length > a && (l = u + 1);
2756
- let f = "", d = "", h = !1;
2757
- for (let u = 0; u < p; ++u)
2758
- f += o[u][0].slice(a) + `
2759
- `;
2760
- for (let u = p; u < l; ++u) {
2761
- let [m, b] = o[u];
2762
- c += m.length + b.length + 1;
2763
- const w = b[b.length - 1] === "\r";
2764
- if (w && (b = b.slice(0, -1)), b && m.length < a) {
2765
- const S = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
2766
- t(c - b.length - (w ? 2 : 1), "BAD_INDENT", S), m = "";
2767
- }
2768
- r === O.BLOCK_LITERAL ? (f += d + m.slice(a) + b, d = `
2769
- `) : m.length > a || b[0] === " " ? (d === " " ? d = `
2770
- ` : !h && d === `
2771
- ` && (d = `
2772
-
2773
- `), f += d + m.slice(a) + b, d = `
2774
- `, h = !0) : b === "" ? d === `
2775
- ` ? f += `
2776
- ` : d = `
2777
- ` : (f += d + b, d = " ", h = !1);
2778
- }
2779
- switch (i.chomp) {
2780
- case "-":
2781
- break;
2782
- case "+":
2783
- for (let u = l; u < o.length; ++u)
2784
- f += `
2785
- ` + o[u][0].slice(a);
2786
- f[f.length - 1] !== `
2787
- ` && (f += `
2788
- `);
2789
- break;
2790
- default:
2791
- f += `
2792
- `;
2793
- }
2794
- const y = n + i.length + e.source.length;
2795
- return { value: f, type: r, comment: i.comment, range: [n, y, y] };
2796
- }
2797
- function dn({ offset: s, props: e }, t, n) {
2798
- if (e[0].type !== "block-scalar-header")
2799
- return n(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
2800
- const { source: i } = e[0], r = i[0];
2801
- let o = 0, l = "", a = -1;
2802
- for (let d = 1; d < i.length; ++d) {
2803
- const h = i[d];
2804
- if (!l && (h === "-" || h === "+"))
2805
- l = h;
2806
- else {
2807
- const y = Number(h);
2808
- !o && y ? o = y : a === -1 && (a = s + d);
2809
- }
2810
- }
2811
- a !== -1 && n(a, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${i}`);
2812
- let c = !1, p = "", f = i.length;
2813
- for (let d = 1; d < e.length; ++d) {
2814
- const h = e[d];
2815
- switch (h.type) {
2816
- case "space":
2817
- c = !0;
2818
- case "newline":
2819
- f += h.source.length;
2820
- break;
2821
- case "comment":
2822
- t && !c && n(h, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters"), f += h.source.length, p = h.source.substring(1);
2823
- break;
2824
- case "error":
2825
- n(h, "UNEXPECTED_TOKEN", h.message), f += h.source.length;
2826
- break;
2827
- default: {
2828
- const y = `Unexpected token in block scalar header: ${h.type}`;
2829
- n(h, "UNEXPECTED_TOKEN", y);
2830
- const u = h.source;
2831
- u && typeof u == "string" && (f += u.length);
2832
- }
2833
- }
2834
- }
2835
- return { mode: r, indent: o, chomp: l, comment: p, length: f };
2836
- }
2837
- function pn(s) {
2838
- const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n != null && n[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
2839
- for (let o = 1; o < e.length; o += 2)
2840
- r.push([e[o], e[o + 1]]);
2841
- return r;
2842
- }
2843
- function ws(s, e, t) {
2844
- const { offset: n, type: i, source: r, end: o } = s;
2845
- let l, a;
2846
- const c = (d, h, y) => t(n + d, h, y);
2847
- switch (i) {
2848
- case "scalar":
2849
- l = O.PLAIN, a = mn(r, c);
2850
- break;
2851
- case "single-quoted-scalar":
2852
- l = O.QUOTE_SINGLE, a = yn(r, c);
2853
- break;
2854
- case "double-quoted-scalar":
2855
- l = O.QUOTE_DOUBLE, a = gn(r, c);
2856
- break;
2857
- default:
2858
- return t(s, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
2859
- value: "",
2860
- type: null,
2861
- comment: "",
2862
- range: [n, n + r.length, n + r.length]
2863
- };
2864
- }
2865
- const p = n + r.length, f = Ie(o, p, e, t);
2866
- return {
2867
- value: a,
2868
- type: l,
2869
- comment: f.comment,
2870
- range: [n, p, f.offset]
2871
- };
2872
- }
2873
- function mn(s, e) {
2874
- let t = "";
2875
- switch (s[0]) {
2876
- case " ":
2877
- t = "a tab character";
2878
- break;
2879
- case ",":
2880
- t = "flow indicator character ,";
2881
- break;
2882
- case "%":
2883
- t = "directive indicator character %";
2884
- break;
2885
- case "|":
2886
- case ">": {
2887
- t = `block scalar indicator ${s[0]}`;
2888
- break;
2889
- }
2890
- case "@":
2891
- case "`": {
2892
- t = `reserved character ${s[0]}`;
2893
- break;
2894
- }
2895
- }
2896
- return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), Ss(s);
2897
- }
2898
- function yn(s, e) {
2899
- return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), Ss(s.slice(1, -1)).replace(/''/g, "'");
2900
- }
2901
- function Ss(s) {
2902
- let e, t;
2903
- try {
2904
- e = new RegExp(`(.*?)(?<![ ])[ ]*\r?
2905
- `, "sy"), t = new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
2906
- `, "sy");
2907
- } catch {
2908
- e = /(.*?)[ \t]*\r?\n/sy, t = /[ \t]*(.*?)[ \t]*\r?\n/sy;
2909
- }
2910
- let n = e.exec(s);
2911
- if (!n)
2912
- return s;
2913
- let i = n[1], r = " ", o = e.lastIndex;
2914
- for (t.lastIndex = o; n = t.exec(s); )
2915
- n[1] === "" ? r === `
2916
- ` ? i += r : r = `
2917
- ` : (i += r + n[1], r = " "), o = t.lastIndex;
2918
- const l = /[ \t]*(.*)/sy;
2919
- return l.lastIndex = o, n = l.exec(s), i + r + ((n == null ? void 0 : n[1]) ?? "");
2920
- }
2921
- function gn(s, e) {
2922
- let t = "";
2923
- for (let n = 1; n < s.length - 1; ++n) {
2924
- const i = s[n];
2925
- if (!(i === "\r" && s[n + 1] === `
2926
- `))
2927
- if (i === `
2928
- `) {
2929
- const { fold: r, offset: o } = bn(s, n);
2930
- t += r, n = o;
2931
- } else if (i === "\\") {
2932
- let r = s[++n];
2933
- const o = wn[r];
2934
- if (o)
2935
- t += o;
2936
- else if (r === `
2937
- `)
2938
- for (r = s[n + 1]; r === " " || r === " "; )
2939
- r = s[++n + 1];
2940
- else if (r === "\r" && s[n + 1] === `
2941
- `)
2942
- for (r = s[++n + 1]; r === " " || r === " "; )
2943
- r = s[++n + 1];
2944
- else if (r === "x" || r === "u" || r === "U") {
2945
- const l = { x: 2, u: 4, U: 8 }[r];
2946
- t += Sn(s, n + 1, l, e), n += l;
2947
- } else {
2948
- const l = s.substr(n - 1, 2);
2949
- e(n - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${l}`), t += l;
2950
- }
2951
- } else if (i === " " || i === " ") {
2952
- const r = n;
2953
- let o = s[n + 1];
2954
- for (; o === " " || o === " "; )
2955
- o = s[++n + 1];
2956
- o !== `
2957
- ` && !(o === "\r" && s[n + 2] === `
2958
- `) && (t += n > r ? s.slice(r, n + 1) : i);
2959
- } else
2960
- t += i;
2961
- }
2962
- return (s[s.length - 1] !== '"' || s.length === 1) && e(s.length, "MISSING_CHAR", 'Missing closing "quote'), t;
2963
- }
2964
- function bn(s, e) {
2965
- let t = "", n = s[e + 1];
2966
- for (; (n === " " || n === " " || n === `
2967
- ` || n === "\r") && !(n === "\r" && s[e + 2] !== `
2968
- `); )
2969
- n === `
2970
- ` && (t += `
2971
- `), e += 1, n = s[e + 1];
2972
- return t || (t = " "), { fold: t, offset: e };
2973
- }
2974
- const wn = {
2975
- 0: "\0",
2976
- // null character
2977
- a: "\x07",
2978
- // bell character
2979
- b: "\b",
2980
- // backspace
2981
- e: "\x1B",
2982
- // escape character
2983
- f: "\f",
2984
- // form feed
2985
- n: `
2986
- `,
2987
- // line feed
2988
- r: "\r",
2989
- // carriage return
2990
- t: " ",
2991
- // horizontal tab
2992
- v: "\v",
2993
- // vertical tab
2994
- N: "…",
2995
- // Unicode next line
2996
- _: " ",
2997
- // Unicode non-breaking space
2998
- L: "\u2028",
2999
- // Unicode line separator
3000
- P: "\u2029",
3001
- // Unicode paragraph separator
3002
- " ": " ",
3003
- '"': '"',
3004
- "/": "/",
3005
- "\\": "\\",
3006
- " ": " "
3007
- };
3008
- function Sn(s, e, t, n) {
3009
- const i = s.substr(e, t), o = i.length === t && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
3010
- if (isNaN(o)) {
3011
- const l = s.substr(e - 2, t + 2);
3012
- return n(e - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${l}`), l;
3013
- }
3014
- return String.fromCodePoint(o);
3015
- }
3016
- function ks(s, e, t, n) {
3017
- const { value: i, type: r, comment: o, range: l } = e.type === "block-scalar" ? bs(s, e, n) : ws(e, s.options.strict, n), a = t ? s.directives.tagName(t.source, (f) => n(t, "TAG_RESOLVE_FAILED", f)) : null;
3018
- let c;
3019
- s.options.stringKeys && s.atKey ? c = s.schema[U] : a ? c = kn(s.schema, i, a, t, n) : e.type === "scalar" ? c = Nn(s, i, e, n) : c = s.schema[U];
3020
- let p;
3021
- try {
3022
- const f = c.resolve(i, (d) => n(t ?? e, "TAG_RESOLVE_FAILED", d), s.options);
3023
- p = E(f) ? f : new O(f);
3024
- } catch (f) {
3025
- const d = f instanceof Error ? f.message : String(f);
3026
- n(t ?? e, "TAG_RESOLVE_FAILED", d), p = new O(i);
3027
- }
3028
- return p.range = l, p.source = i, r && (p.type = r), a && (p.tag = a), c.format && (p.format = c.format), o && (p.comment = o), p;
3029
- }
3030
- function kn(s, e, t, n, i) {
3031
- var l;
3032
- if (t === "!")
3033
- return s[U];
3034
- const r = [];
3035
- for (const a of s.tags)
3036
- if (!a.collection && a.tag === t)
3037
- if (a.default && a.test)
3038
- r.push(a);
3039
- else
3040
- return a;
3041
- for (const a of r)
3042
- if ((l = a.test) != null && l.test(e))
3043
- return a;
3044
- const o = s.knownTags[t];
3045
- return o && !o.collection ? (s.tags.push(Object.assign({}, o, { default: !1, test: void 0 })), o) : (i(n, "TAG_RESOLVE_FAILED", `Unresolved tag: ${t}`, t !== "tag:yaml.org,2002:str"), s[U]);
3046
- }
3047
- function Nn({ atKey: s, directives: e, schema: t }, n, i, r) {
3048
- const o = t.tags.find((l) => {
3049
- var a;
3050
- return (l.default === !0 || s && l.default === "key") && ((a = l.test) == null ? void 0 : a.test(n));
3051
- }) || t[U];
3052
- if (t.compat) {
3053
- const l = t.compat.find((a) => {
3054
- var c;
3055
- return a.default && ((c = a.test) == null ? void 0 : c.test(n));
3056
- }) ?? t[U];
3057
- if (o.tag !== l.tag) {
3058
- const a = e.tagString(o.tag), c = e.tagString(l.tag), p = `Value may be parsed as either ${a} or ${c}`;
3059
- r(i, "TAG_RESOLVE_FAILED", p, !0);
3060
- }
3061
- }
3062
- return o;
3063
- }
3064
- function On(s, e, t) {
3065
- if (e) {
3066
- t === null && (t = e.length);
3067
- for (let n = t - 1; n >= 0; --n) {
3068
- let i = e[n];
3069
- switch (i.type) {
3070
- case "space":
3071
- case "comment":
3072
- case "newline":
3073
- s -= i.source.length;
3074
- continue;
3075
- }
3076
- for (i = e[++n]; (i == null ? void 0 : i.type) === "space"; )
3077
- s += i.source.length, i = e[++n];
3078
- break;
3079
- }
3080
- }
3081
- return s;
3082
- }
3083
- const An = { composeNode: Ns, composeEmptyNode: Et };
3084
- function Ns(s, e, t, n) {
3085
- const i = s.atKey, { spaceBefore: r, comment: o, anchor: l, tag: a } = t;
3086
- let c, p = !0;
3087
- switch (e.type) {
3088
- case "alias":
3089
- c = En(s, e, n), (l || a) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
3090
- break;
3091
- case "scalar":
3092
- case "single-quoted-scalar":
3093
- case "double-quoted-scalar":
3094
- case "block-scalar":
3095
- c = ks(s, e, a, n), l && (c.anchor = l.source.substring(1));
3096
- break;
3097
- case "block-map":
3098
- case "block-seq":
3099
- case "flow-collection":
3100
- c = hn(An, s, e, t, n), l && (c.anchor = l.source.substring(1));
3101
- break;
3102
- default: {
3103
- const f = e.type === "error" ? e.message : `Unsupported token (type: ${e.type})`;
3104
- n(e, "UNEXPECTED_TOKEN", f), c = Et(s, e.offset, void 0, null, t, n), p = !1;
3105
- }
3106
- }
3107
- return l && c.anchor === "" && n(l, "BAD_ALIAS", "Anchor cannot be an empty string"), i && s.options.stringKeys && (!E(c) || typeof c.value != "string" || c.tag && c.tag !== "tag:yaml.org,2002:str") && n(a ?? e, "NON_STRING_KEY", "With stringKeys, all keys must be strings"), r && (c.spaceBefore = !0), o && (e.type === "scalar" && e.source === "" ? c.comment = o : c.commentBefore = o), s.options.keepSourceTokens && p && (c.srcToken = e), c;
3108
- }
3109
- function Et(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: l, end: a }, c) {
3110
- const p = {
3111
- type: "scalar",
3112
- offset: On(e, t, n),
3113
- indent: -1,
3114
- source: ""
3115
- }, f = ks(s, p, l, c);
3116
- return o && (f.anchor = o.source.substring(1), f.anchor === "" && c(o, "BAD_ALIAS", "Anchor cannot be an empty string")), i && (f.spaceBefore = !0), r && (f.comment = r, f.range[2] = a), f;
3117
- }
3118
- function En({ options: s }, { offset: e, source: t, end: n }, i) {
3119
- const r = new Ue(t.substring(1));
3120
- r.source === "" && i(e, "BAD_ALIAS", "Alias cannot be an empty string"), r.source.endsWith(":") && i(e + t.length - 1, "BAD_ALIAS", "Alias ending in : is ambiguous", !0);
3121
- const o = e + t.length, l = Ie(n, o, s.strict, i);
3122
- return r.range = [e, o, l.offset], l.comment && (r.comment = l.comment), r;
3123
- }
3124
- function In(s, e, { offset: t, start: n, value: i, end: r }, o) {
3125
- const l = Object.assign({ _directives: e }, s), a = new ge(void 0, l), c = {
3126
- atKey: !1,
3127
- atRoot: !0,
3128
- directives: a.directives,
3129
- options: a.options,
3130
- schema: a.schema
3131
- }, p = ue(n, {
3132
- indicator: "doc-start",
3133
- next: i ?? (r == null ? void 0 : r[0]),
3134
- offset: t,
3135
- onError: o,
3136
- parentIndent: 0,
3137
- startOnNewline: !0
3138
- });
3139
- p.found && (a.directives.docStart = !0, i && (i.type === "block-map" || i.type === "block-seq") && !p.hasNewline && o(p.end, "MISSING_CHAR", "Block collection cannot start on same line with directives-end marker")), a.contents = i ? Ns(c, i, p, o) : Et(c, p.end, n, null, p, o);
3140
- const f = a.contents.range[2], d = Ie(r, f, !1, o);
3141
- return d.comment && (a.comment = d.comment), a.range = [t, f, d.offset], a;
3142
- }
3143
- function be(s) {
3144
- if (typeof s == "number")
3145
- return [s, s + 1];
3146
- if (Array.isArray(s))
3147
- return s.length === 2 ? s : [s[0], s[1]];
3148
- const { offset: e, source: t } = s;
3149
- return [e, e + (typeof t == "string" ? t.length : 1)];
3150
- }
3151
- function Kt(s) {
3152
- var i;
3153
- let e = "", t = !1, n = !1;
3154
- for (let r = 0; r < s.length; ++r) {
3155
- const o = s[r];
3156
- switch (o[0]) {
3157
- case "#":
3158
- e += (e === "" ? "" : n ? `
3159
-
3160
- ` : `
3161
- `) + (o.substring(1) || " "), t = !0, n = !1;
3162
- break;
3163
- case "%":
3164
- ((i = s[r + 1]) == null ? void 0 : i[0]) !== "#" && (r += 1), t = !1;
3165
- break;
3166
- default:
3167
- t || (n = !0), t = !1;
3168
- }
3169
- }
3170
- return { comment: e, afterEmptyLine: n };
3171
- }
3172
- class It {
3173
- constructor(e = {}) {
3174
- this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (t, n, i, r) => {
3175
- const o = be(t);
3176
- r ? this.warnings.push(new ys(o, n, i)) : this.errors.push(new z(o, n, i));
3177
- }, this.directives = new v({ version: e.version || "1.2" }), this.options = e;
3178
- }
3179
- decorate(e, t) {
3180
- const { comment: n, afterEmptyLine: i } = Kt(this.prelude);
3181
- if (n) {
3182
- const r = e.contents;
3183
- if (t)
3184
- e.comment = e.comment ? `${e.comment}
3185
- ${n}` : n;
3186
- else if (i || e.directives.docStart || !r)
3187
- e.commentBefore = n;
3188
- else if (L(r) && !r.flow && r.items.length > 0) {
3189
- let o = r.items[0];
3190
- I(o) && (o = o.key);
3191
- const l = o.commentBefore;
3192
- o.commentBefore = l ? `${n}
3193
- ${l}` : n;
3194
- } else {
3195
- const o = r.commentBefore;
3196
- r.commentBefore = o ? `${n}
3197
- ${o}` : n;
3198
- }
3199
- }
3200
- t ? (Array.prototype.push.apply(e.errors, this.errors), Array.prototype.push.apply(e.warnings, this.warnings)) : (e.errors = this.errors, e.warnings = this.warnings), this.prelude = [], this.errors = [], this.warnings = [];
3201
- }
3202
- /**
3203
- * Current stream status information.
3204
- *
3205
- * Mostly useful at the end of input for an empty stream.
3206
- */
3207
- streamInfo() {
3208
- return {
3209
- comment: Kt(this.prelude).comment,
3210
- directives: this.directives,
3211
- errors: this.errors,
3212
- warnings: this.warnings
3213
- };
3214
- }
3215
- /**
3216
- * Compose tokens into documents.
3217
- *
3218
- * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
3219
- * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
3220
- */
3221
- *compose(e, t = !1, n = -1) {
3222
- for (const i of e)
3223
- yield* this.next(i);
3224
- yield* this.end(t, n);
3225
- }
3226
- /** Advance the composer by one CST token. */
3227
- *next(e) {
3228
- switch (e.type) {
3229
- case "directive":
3230
- this.directives.add(e.source, (t, n, i) => {
3231
- const r = be(e);
3232
- r[0] += t, this.onError(r, "BAD_DIRECTIVE", n, i);
3233
- }), this.prelude.push(e.source), this.atDirectives = !0;
3234
- break;
3235
- case "document": {
3236
- const t = In(this.options, this.directives, e, this.onError);
3237
- this.atDirectives && !t.directives.docStart && this.onError(e, "MISSING_CHAR", "Missing directives-end/doc-start indicator line"), this.decorate(t, !1), this.doc && (yield this.doc), this.doc = t, this.atDirectives = !1;
3238
- break;
3239
- }
3240
- case "byte-order-mark":
3241
- case "space":
3242
- break;
3243
- case "comment":
3244
- case "newline":
3245
- this.prelude.push(e.source);
3246
- break;
3247
- case "error": {
3248
- const t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new z(be(e), "UNEXPECTED_TOKEN", t);
3249
- this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
3250
- break;
3251
- }
3252
- case "doc-end": {
3253
- if (!this.doc) {
3254
- const n = "Unexpected doc-end without preceding document";
3255
- this.errors.push(new z(be(e), "UNEXPECTED_TOKEN", n));
3256
- break;
3257
- }
3258
- this.doc.directives.docEnd = !0;
3259
- const t = Ie(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
3260
- if (this.decorate(this.doc, !0), t.comment) {
3261
- const n = this.doc.comment;
3262
- this.doc.comment = n ? `${n}
3263
- ${t.comment}` : t.comment;
3264
- }
3265
- this.doc.range[2] = t.offset;
3266
- break;
3267
- }
3268
- default:
3269
- this.errors.push(new z(be(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
3270
- }
3271
- }
3272
- /**
3273
- * Call at end of input to yield any remaining document.
3274
- *
3275
- * @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
3276
- * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
3277
- */
3278
- *end(e = !1, t = -1) {
3279
- if (this.doc)
3280
- this.decorate(this.doc, !0), yield this.doc, this.doc = null;
3281
- else if (e) {
3282
- const n = Object.assign({ _directives: this.directives }, this.options), i = new ge(void 0, n);
3283
- this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), i.range = [0, t, t], this.decorate(i, !1), yield i;
3284
- }
3285
- }
3286
- }
3287
- function Tn(s, e = !0, t) {
3288
- if (s) {
3289
- const n = (i, r, o) => {
3290
- const l = typeof i == "number" ? i : Array.isArray(i) ? i[0] : i.offset;
3291
- if (t)
3292
- t(l, r, o);
3293
- else
3294
- throw new z([l, l + 1], r, o);
3295
- };
3296
- switch (s.type) {
3297
- case "scalar":
3298
- case "single-quoted-scalar":
3299
- case "double-quoted-scalar":
3300
- return ws(s, e, n);
3301
- case "block-scalar":
3302
- return bs({ options: { strict: e } }, s, n);
3303
- }
3304
- }
3305
- return null;
3306
- }
3307
- function Ln(s, e) {
3308
- const { implicitKey: t = !1, indent: n, inFlow: i = !1, offset: r = -1, type: o = "PLAIN" } = e, l = Ae({ type: o, value: s }, {
3309
- implicitKey: t,
3310
- indent: n > 0 ? " ".repeat(n) : "",
3311
- inFlow: i,
3312
- options: { blockQuote: !0, lineWidth: -1 }
3313
- }), a = e.end ?? [
3314
- { type: "newline", offset: -1, indent: n, source: `
3315
- ` }
3316
- ];
3317
- switch (l[0]) {
3318
- case "|":
3319
- case ">": {
3320
- const c = l.indexOf(`
3321
- `), p = l.substring(0, c), f = l.substring(c + 1) + `
3322
- `, d = [
3323
- { type: "block-scalar-header", offset: r, indent: n, source: p }
3324
- ];
3325
- return Os(d, a) || d.push({ type: "newline", offset: -1, indent: n, source: `
3326
- ` }), { type: "block-scalar", offset: r, indent: n, props: d, source: f };
3327
- }
3328
- case '"':
3329
- return { type: "double-quoted-scalar", offset: r, indent: n, source: l, end: a };
3330
- case "'":
3331
- return { type: "single-quoted-scalar", offset: r, indent: n, source: l, end: a };
3332
- default:
3333
- return { type: "scalar", offset: r, indent: n, source: l, end: a };
3334
- }
3335
- }
3336
- function $n(s, e, t = {}) {
3337
- let { afterKey: n = !1, implicitKey: i = !1, inFlow: r = !1, type: o } = t, l = "indent" in s ? s.indent : null;
3338
- if (n && typeof l == "number" && (l += 2), !o)
3339
- switch (s.type) {
3340
- case "single-quoted-scalar":
3341
- o = "QUOTE_SINGLE";
3342
- break;
3343
- case "double-quoted-scalar":
3344
- o = "QUOTE_DOUBLE";
3345
- break;
3346
- case "block-scalar": {
3347
- const c = s.props[0];
3348
- if (c.type !== "block-scalar-header")
3349
- throw new Error("Invalid block scalar header");
3350
- o = c.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL";
3351
- break;
3352
- }
3353
- default:
3354
- o = "PLAIN";
3355
- }
3356
- const a = Ae({ type: o, value: e }, {
3357
- implicitKey: i || l === null,
3358
- indent: l !== null && l > 0 ? " ".repeat(l) : "",
3359
- inFlow: r,
3360
- options: { blockQuote: !0, lineWidth: -1 }
3361
- });
3362
- switch (a[0]) {
3363
- case "|":
3364
- case ">":
3365
- _n(s, a);
3366
- break;
3367
- case '"':
3368
- rt(s, a, "double-quoted-scalar");
3369
- break;
3370
- case "'":
3371
- rt(s, a, "single-quoted-scalar");
3372
- break;
3373
- default:
3374
- rt(s, a, "scalar");
3375
- }
3376
- }
3377
- function _n(s, e) {
3378
- const t = e.indexOf(`
3379
- `), n = e.substring(0, t), i = e.substring(t + 1) + `
3380
- `;
3381
- if (s.type === "block-scalar") {
3382
- const r = s.props[0];
3383
- if (r.type !== "block-scalar-header")
3384
- throw new Error("Invalid block scalar header");
3385
- r.source = n, s.source = i;
3386
- } else {
3387
- const { offset: r } = s, o = "indent" in s ? s.indent : -1, l = [
3388
- { type: "block-scalar-header", offset: r, indent: o, source: n }
3389
- ];
3390
- Os(l, "end" in s ? s.end : void 0) || l.push({ type: "newline", offset: -1, indent: o, source: `
3391
- ` });
3392
- for (const a of Object.keys(s))
3393
- a !== "type" && a !== "offset" && delete s[a];
3394
- Object.assign(s, { type: "block-scalar", indent: o, props: l, source: i });
3395
- }
3396
- }
3397
- function Os(s, e) {
3398
- if (e)
3399
- for (const t of e)
3400
- switch (t.type) {
3401
- case "space":
3402
- case "comment":
3403
- s.push(t);
3404
- break;
3405
- case "newline":
3406
- return s.push(t), !0;
3407
- }
3408
- return !1;
3409
- }
3410
- function rt(s, e, t) {
3411
- switch (s.type) {
3412
- case "scalar":
3413
- case "double-quoted-scalar":
3414
- case "single-quoted-scalar":
3415
- s.type = t, s.source = e;
3416
- break;
3417
- case "block-scalar": {
3418
- const n = s.props.slice(1);
3419
- let i = e.length;
3420
- s.props[0].type === "block-scalar-header" && (i -= s.props[0].source.length);
3421
- for (const r of n)
3422
- r.offset += i;
3423
- delete s.props, Object.assign(s, { type: t, source: e, end: n });
3424
- break;
3425
- }
3426
- case "block-map":
3427
- case "block-seq": {
3428
- const i = { type: "newline", offset: s.offset + e.length, indent: s.indent, source: `
3429
- ` };
3430
- delete s.items, Object.assign(s, { type: t, source: e, end: [i] });
3431
- break;
3432
- }
3433
- default: {
3434
- const n = "indent" in s ? s.indent : -1, i = "end" in s && Array.isArray(s.end) ? s.end.filter((r) => r.type === "space" || r.type === "comment" || r.type === "newline") : [];
3435
- for (const r of Object.keys(s))
3436
- r !== "type" && r !== "offset" && delete s[r];
3437
- Object.assign(s, { type: t, indent: n, source: e, end: i });
3438
- }
3439
- }
3440
- }
3441
- const Cn = (s) => "type" in s ? qe(s) : Ke(s);
3442
- function qe(s) {
3443
- switch (s.type) {
3444
- case "block-scalar": {
3445
- let e = "";
3446
- for (const t of s.props)
3447
- e += qe(t);
3448
- return e + s.source;
3449
- }
3450
- case "block-map":
3451
- case "block-seq": {
3452
- let e = "";
3453
- for (const t of s.items)
3454
- e += Ke(t);
3455
- return e;
3456
- }
3457
- case "flow-collection": {
3458
- let e = s.start.source;
3459
- for (const t of s.items)
3460
- e += Ke(t);
3461
- for (const t of s.end)
3462
- e += t.source;
3463
- return e;
3464
- }
3465
- case "document": {
3466
- let e = Ke(s);
3467
- if (s.end)
3468
- for (const t of s.end)
3469
- e += t.source;
3470
- return e;
3471
- }
3472
- default: {
3473
- let e = s.source;
3474
- if ("end" in s && s.end)
3475
- for (const t of s.end)
3476
- e += t.source;
3477
- return e;
3478
- }
3479
- }
3480
- }
3481
- function Ke({ start: s, key: e, sep: t, value: n }) {
3482
- let i = "";
3483
- for (const r of s)
3484
- i += r.source;
3485
- if (e && (i += qe(e)), t)
3486
- for (const r of t)
3487
- i += r.source;
3488
- return n && (i += qe(n)), i;
3489
- }
3490
- const ht = Symbol("break visit"), Bn = Symbol("skip children"), As = Symbol("remove item");
3491
- function Z(s, e) {
3492
- "type" in s && s.type === "document" && (s = { start: s.start, value: s.value }), Es(Object.freeze([]), s, e);
3493
- }
3494
- Z.BREAK = ht;
3495
- Z.SKIP = Bn;
3496
- Z.REMOVE = As;
3497
- Z.itemAtPath = (s, e) => {
3498
- let t = s;
3499
- for (const [n, i] of e) {
3500
- const r = t == null ? void 0 : t[n];
3501
- if (r && "items" in r)
3502
- t = r.items[i];
3503
- else
3504
- return;
3505
- }
3506
- return t;
3507
- };
3508
- Z.parentCollection = (s, e) => {
3509
- const t = Z.itemAtPath(s, e.slice(0, -1)), n = e[e.length - 1][0], i = t == null ? void 0 : t[n];
3510
- if (i && "items" in i)
3511
- return i;
3512
- throw new Error("Parent collection not found");
3513
- };
3514
- function Es(s, e, t) {
3515
- let n = t(e, s);
3516
- if (typeof n == "symbol")
3517
- return n;
3518
- for (const i of ["key", "value"]) {
3519
- const r = e[i];
3520
- if (r && "items" in r) {
3521
- for (let o = 0; o < r.items.length; ++o) {
3522
- const l = Es(Object.freeze(s.concat([[i, o]])), r.items[o], t);
3523
- if (typeof l == "number")
3524
- o = l - 1;
3525
- else {
3526
- if (l === ht)
3527
- return ht;
3528
- l === As && (r.items.splice(o, 1), o -= 1);
3529
- }
3530
- }
3531
- typeof n == "function" && i === "key" && (n = n(e, s));
3532
- }
3533
- }
3534
- return typeof n == "function" ? n(e, s) : n;
3535
- }
3536
- const ze = "\uFEFF", Ze = "", xe = "", Oe = "", vn = (s) => !!s && "items" in s, Mn = (s) => !!s && (s.type === "scalar" || s.type === "single-quoted-scalar" || s.type === "double-quoted-scalar" || s.type === "block-scalar");
3537
- function Kn(s) {
3538
- switch (s) {
3539
- case ze:
3540
- return "<BOM>";
3541
- case Ze:
3542
- return "<DOC>";
3543
- case xe:
3544
- return "<FLOW_END>";
3545
- case Oe:
3546
- return "<SCALAR>";
3547
- default:
3548
- return JSON.stringify(s);
3549
- }
3550
- }
3551
- function Is(s) {
3552
- switch (s) {
3553
- case ze:
3554
- return "byte-order-mark";
3555
- case Ze:
3556
- return "doc-mode";
3557
- case xe:
3558
- return "flow-error-end";
3559
- case Oe:
3560
- return "scalar";
3561
- case "---":
3562
- return "doc-start";
3563
- case "...":
3564
- return "doc-end";
3565
- case "":
3566
- case `
3567
- `:
3568
- case `\r
3569
- `:
3570
- return "newline";
3571
- case "-":
3572
- return "seq-item-ind";
3573
- case "?":
3574
- return "explicit-key-ind";
3575
- case ":":
3576
- return "map-value-ind";
3577
- case "{":
3578
- return "flow-map-start";
3579
- case "}":
3580
- return "flow-map-end";
3581
- case "[":
3582
- return "flow-seq-start";
3583
- case "]":
3584
- return "flow-seq-end";
3585
- case ",":
3586
- return "comma";
3587
- }
3588
- switch (s[0]) {
3589
- case " ":
3590
- case " ":
3591
- return "space";
3592
- case "#":
3593
- return "comment";
3594
- case "%":
3595
- return "directive-line";
3596
- case "*":
3597
- return "alias";
3598
- case "&":
3599
- return "anchor";
3600
- case "!":
3601
- return "tag";
3602
- case "'":
3603
- return "single-quoted-scalar";
3604
- case '"':
3605
- return "double-quoted-scalar";
3606
- case "|":
3607
- case ">":
3608
- return "block-scalar-header";
3609
- }
3610
- return null;
3611
- }
3612
- const Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3613
- __proto__: null,
3614
- BOM: ze,
3615
- DOCUMENT: Ze,
3616
- FLOW_END: xe,
3617
- SCALAR: Oe,
3618
- createScalarToken: Ln,
3619
- isCollection: vn,
3620
- isScalar: Mn,
3621
- prettyToken: Kn,
3622
- resolveAsScalar: Tn,
3623
- setScalarValue: $n,
3624
- stringify: Cn,
3625
- tokenType: Is,
3626
- visit: Z
3627
- }, Symbol.toStringTag, { value: "Module" }));
3628
- function D(s) {
3629
- switch (s) {
3630
- case void 0:
3631
- case " ":
3632
- case `
3633
- `:
3634
- case "\r":
3635
- case " ":
3636
- return !0;
3637
- default:
3638
- return !1;
3639
- }
3640
- }
3641
- const Pt = new Set("0123456789ABCDEFabcdef"), jn = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), _e = new Set(",[]{}"), Dn = new Set(` ,[]{}
3642
- \r `), ot = (s) => !s || Dn.has(s);
3643
- class Ts {
3644
- constructor() {
3645
- this.atEnd = !1, this.blockScalarIndent = -1, this.blockScalarKeep = !1, this.buffer = "", this.flowKey = !1, this.flowLevel = 0, this.indentNext = 0, this.indentValue = 0, this.lineEndPos = null, this.next = null, this.pos = 0;
3646
- }
3647
- /**
3648
- * Generate YAML tokens from the `source` string. If `incomplete`,
3649
- * a part of the last line may be left as a buffer for the next call.
3650
- *
3651
- * @returns A generator of lexical tokens
3652
- */
3653
- *lex(e, t = !1) {
3654
- if (e) {
3655
- if (typeof e != "string")
3656
- throw TypeError("source is not a string");
3657
- this.buffer = this.buffer ? this.buffer + e : e, this.lineEndPos = null;
3658
- }
3659
- this.atEnd = !t;
3660
- let n = this.next ?? "stream";
3661
- for (; n && (t || this.hasChars(1)); )
3662
- n = yield* this.parseNext(n);
3663
- }
3664
- atLineEnd() {
3665
- let e = this.pos, t = this.buffer[e];
3666
- for (; t === " " || t === " "; )
3667
- t = this.buffer[++e];
3668
- return !t || t === "#" || t === `
3669
- ` ? !0 : t === "\r" ? this.buffer[e + 1] === `
3670
- ` : !1;
3671
- }
3672
- charAt(e) {
3673
- return this.buffer[this.pos + e];
3674
- }
3675
- continueScalar(e) {
3676
- let t = this.buffer[e];
3677
- if (this.indentNext > 0) {
3678
- let n = 0;
3679
- for (; t === " "; )
3680
- t = this.buffer[++n + e];
3681
- if (t === "\r") {
3682
- const i = this.buffer[n + e + 1];
3683
- if (i === `
3684
- ` || !i && !this.atEnd)
3685
- return e + n + 1;
3686
- }
3687
- return t === `
3688
- ` || n >= this.indentNext || !t && !this.atEnd ? e + n : -1;
3689
- }
3690
- if (t === "-" || t === ".") {
3691
- const n = this.buffer.substr(e, 3);
3692
- if ((n === "---" || n === "...") && D(this.buffer[e + 3]))
3693
- return -1;
3694
- }
3695
- return e;
3696
- }
3697
- getLine() {
3698
- let e = this.lineEndPos;
3699
- return (typeof e != "number" || e !== -1 && e < this.pos) && (e = this.buffer.indexOf(`
3700
- `, this.pos), this.lineEndPos = e), e === -1 ? this.atEnd ? this.buffer.substring(this.pos) : null : (this.buffer[e - 1] === "\r" && (e -= 1), this.buffer.substring(this.pos, e));
3701
- }
3702
- hasChars(e) {
3703
- return this.pos + e <= this.buffer.length;
3704
- }
3705
- setNext(e) {
3706
- return this.buffer = this.buffer.substring(this.pos), this.pos = 0, this.lineEndPos = null, this.next = e, null;
3707
- }
3708
- peek(e) {
3709
- return this.buffer.substr(this.pos, e);
3710
- }
3711
- *parseNext(e) {
3712
- switch (e) {
3713
- case "stream":
3714
- return yield* this.parseStream();
3715
- case "line-start":
3716
- return yield* this.parseLineStart();
3717
- case "block-start":
3718
- return yield* this.parseBlockStart();
3719
- case "doc":
3720
- return yield* this.parseDocument();
3721
- case "flow":
3722
- return yield* this.parseFlowCollection();
3723
- case "quoted-scalar":
3724
- return yield* this.parseQuotedScalar();
3725
- case "block-scalar":
3726
- return yield* this.parseBlockScalar();
3727
- case "plain-scalar":
3728
- return yield* this.parsePlainScalar();
3729
- }
3730
- }
3731
- *parseStream() {
3732
- let e = this.getLine();
3733
- if (e === null)
3734
- return this.setNext("stream");
3735
- if (e[0] === ze && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
3736
- let t = e.length, n = e.indexOf("#");
3737
- for (; n !== -1; ) {
3738
- const r = e[n - 1];
3739
- if (r === " " || r === " ") {
3740
- t = n - 1;
3741
- break;
3742
- } else
3743
- n = e.indexOf("#", n + 1);
3744
- }
3745
- for (; ; ) {
3746
- const r = e[t - 1];
3747
- if (r === " " || r === " ")
3748
- t -= 1;
3749
- else
3750
- break;
3751
- }
3752
- const i = (yield* this.pushCount(t)) + (yield* this.pushSpaces(!0));
3753
- return yield* this.pushCount(e.length - i), this.pushNewline(), "stream";
3754
- }
3755
- if (this.atLineEnd()) {
3756
- const t = yield* this.pushSpaces(!0);
3757
- return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
3758
- }
3759
- return yield Ze, yield* this.parseLineStart();
3760
- }
3761
- *parseLineStart() {
3762
- const e = this.charAt(0);
3763
- if (!e && !this.atEnd)
3764
- return this.setNext("line-start");
3765
- if (e === "-" || e === ".") {
3766
- if (!this.atEnd && !this.hasChars(4))
3767
- return this.setNext("line-start");
3768
- const t = this.peek(3);
3769
- if ((t === "---" || t === "...") && D(this.charAt(3)))
3770
- return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, t === "---" ? "doc" : "stream";
3771
- }
3772
- return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !D(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
3773
- }
3774
- *parseBlockStart() {
3775
- const [e, t] = this.peek(2);
3776
- if (!t && !this.atEnd)
3777
- return this.setNext("block-start");
3778
- if ((e === "-" || e === "?" || e === ":") && D(t)) {
3779
- const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
3780
- return this.indentNext = this.indentValue + 1, this.indentValue += n, yield* this.parseBlockStart();
3781
- }
3782
- return "doc";
3783
- }
3784
- *parseDocument() {
3785
- yield* this.pushSpaces(!0);
3786
- const e = this.getLine();
3787
- if (e === null)
3788
- return this.setNext("doc");
3789
- let t = yield* this.pushIndicators();
3790
- switch (e[t]) {
3791
- case "#":
3792
- yield* this.pushCount(e.length - t);
3793
- case void 0:
3794
- return yield* this.pushNewline(), yield* this.parseLineStart();
3795
- case "{":
3796
- case "[":
3797
- return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
3798
- case "}":
3799
- case "]":
3800
- return yield* this.pushCount(1), "doc";
3801
- case "*":
3802
- return yield* this.pushUntil(ot), "doc";
3803
- case '"':
3804
- case "'":
3805
- return yield* this.parseQuotedScalar();
3806
- case "|":
3807
- case ">":
3808
- return t += yield* this.parseBlockScalarHeader(), t += yield* this.pushSpaces(!0), yield* this.pushCount(e.length - t), yield* this.pushNewline(), yield* this.parseBlockScalar();
3809
- default:
3810
- return yield* this.parsePlainScalar();
3811
- }
3812
- }
3813
- *parseFlowCollection() {
3814
- let e, t, n = -1;
3815
- do
3816
- e = yield* this.pushNewline(), e > 0 ? (t = yield* this.pushSpaces(!1), this.indentValue = n = t) : t = 0, t += yield* this.pushSpaces(!0);
3817
- while (e + t > 0);
3818
- const i = this.getLine();
3819
- if (i === null)
3820
- return this.setNext("flow");
3821
- if ((n !== -1 && n < this.indentNext && i[0] !== "#" || n === 0 && (i.startsWith("---") || i.startsWith("...")) && D(i[3])) && !(n === this.indentNext - 1 && this.flowLevel === 1 && (i[0] === "]" || i[0] === "}")))
3822
- return this.flowLevel = 0, yield xe, yield* this.parseLineStart();
3823
- let r = 0;
3824
- for (; i[r] === ","; )
3825
- r += yield* this.pushCount(1), r += yield* this.pushSpaces(!0), this.flowKey = !1;
3826
- switch (r += yield* this.pushIndicators(), i[r]) {
3827
- case void 0:
3828
- return "flow";
3829
- case "#":
3830
- return yield* this.pushCount(i.length - r), "flow";
3831
- case "{":
3832
- case "[":
3833
- return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
3834
- case "}":
3835
- case "]":
3836
- return yield* this.pushCount(1), this.flowKey = !0, this.flowLevel -= 1, this.flowLevel ? "flow" : "doc";
3837
- case "*":
3838
- return yield* this.pushUntil(ot), "flow";
3839
- case '"':
3840
- case "'":
3841
- return this.flowKey = !0, yield* this.parseQuotedScalar();
3842
- case ":": {
3843
- const o = this.charAt(1);
3844
- if (this.flowKey || D(o) || o === ",")
3845
- return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
3846
- }
3847
- default:
3848
- return this.flowKey = !1, yield* this.parsePlainScalar();
3849
- }
3850
- }
3851
- *parseQuotedScalar() {
3852
- const e = this.charAt(0);
3853
- let t = this.buffer.indexOf(e, this.pos + 1);
3854
- if (e === "'")
3855
- for (; t !== -1 && this.buffer[t + 1] === "'"; )
3856
- t = this.buffer.indexOf("'", t + 2);
3857
- else
3858
- for (; t !== -1; ) {
3859
- let r = 0;
3860
- for (; this.buffer[t - 1 - r] === "\\"; )
3861
- r += 1;
3862
- if (r % 2 === 0)
3863
- break;
3864
- t = this.buffer.indexOf('"', t + 1);
3865
- }
3866
- const n = this.buffer.substring(0, t);
3867
- let i = n.indexOf(`
3868
- `, this.pos);
3869
- if (i !== -1) {
3870
- for (; i !== -1; ) {
3871
- const r = this.continueScalar(i + 1);
3872
- if (r === -1)
3873
- break;
3874
- i = n.indexOf(`
3875
- `, r);
3876
- }
3877
- i !== -1 && (t = i - (n[i - 1] === "\r" ? 2 : 1));
3878
- }
3879
- if (t === -1) {
3880
- if (!this.atEnd)
3881
- return this.setNext("quoted-scalar");
3882
- t = this.buffer.length;
3883
- }
3884
- return yield* this.pushToIndex(t + 1, !1), this.flowLevel ? "flow" : "doc";
3885
- }
3886
- *parseBlockScalarHeader() {
3887
- this.blockScalarIndent = -1, this.blockScalarKeep = !1;
3888
- let e = this.pos;
3889
- for (; ; ) {
3890
- const t = this.buffer[++e];
3891
- if (t === "+")
3892
- this.blockScalarKeep = !0;
3893
- else if (t > "0" && t <= "9")
3894
- this.blockScalarIndent = Number(t) - 1;
3895
- else if (t !== "-")
3896
- break;
3897
- }
3898
- return yield* this.pushUntil((t) => D(t) || t === "#");
3899
- }
3900
- *parseBlockScalar() {
3901
- let e = this.pos - 1, t = 0, n;
3902
- e: for (let r = this.pos; n = this.buffer[r]; ++r)
3903
- switch (n) {
3904
- case " ":
3905
- t += 1;
3906
- break;
3907
- case `
3908
- `:
3909
- e = r, t = 0;
3910
- break;
3911
- case "\r": {
3912
- const o = this.buffer[r + 1];
3913
- if (!o && !this.atEnd)
3914
- return this.setNext("block-scalar");
3915
- if (o === `
3916
- `)
3917
- break;
3918
- }
3919
- default:
3920
- break e;
3921
- }
3922
- if (!n && !this.atEnd)
3923
- return this.setNext("block-scalar");
3924
- if (t >= this.indentNext) {
3925
- this.blockScalarIndent === -1 ? this.indentNext = t : this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
3926
- do {
3927
- const r = this.continueScalar(e + 1);
3928
- if (r === -1)
3929
- break;
3930
- e = this.buffer.indexOf(`
3931
- `, r);
3932
- } while (e !== -1);
3933
- if (e === -1) {
3934
- if (!this.atEnd)
3935
- return this.setNext("block-scalar");
3936
- e = this.buffer.length;
3937
- }
3938
- }
3939
- let i = e + 1;
3940
- for (n = this.buffer[i]; n === " "; )
3941
- n = this.buffer[++i];
3942
- if (n === " ") {
3943
- for (; n === " " || n === " " || n === "\r" || n === `
3944
- `; )
3945
- n = this.buffer[++i];
3946
- e = i - 1;
3947
- } else if (!this.blockScalarKeep)
3948
- do {
3949
- let r = e - 1, o = this.buffer[r];
3950
- o === "\r" && (o = this.buffer[--r]);
3951
- const l = r;
3952
- for (; o === " "; )
3953
- o = this.buffer[--r];
3954
- if (o === `
3955
- ` && r >= this.pos && r + 1 + t > l)
3956
- e = r;
3957
- else
3958
- break;
3959
- } while (!0);
3960
- return yield Oe, yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3961
- }
3962
- *parsePlainScalar() {
3963
- const e = this.flowLevel > 0;
3964
- let t = this.pos - 1, n = this.pos - 1, i;
3965
- for (; i = this.buffer[++n]; )
3966
- if (i === ":") {
3967
- const r = this.buffer[n + 1];
3968
- if (D(r) || e && _e.has(r))
3969
- break;
3970
- t = n;
3971
- } else if (D(i)) {
3972
- let r = this.buffer[n + 1];
3973
- if (i === "\r" && (r === `
3974
- ` ? (n += 1, i = `
3975
- `, r = this.buffer[n + 1]) : t = n), r === "#" || e && _e.has(r))
3976
- break;
3977
- if (i === `
3978
- `) {
3979
- const o = this.continueScalar(n + 1);
3980
- if (o === -1)
3981
- break;
3982
- n = Math.max(n, o - 2);
3983
- }
3984
- } else {
3985
- if (e && _e.has(i))
3986
- break;
3987
- t = n;
3988
- }
3989
- return !i && !this.atEnd ? this.setNext("plain-scalar") : (yield Oe, yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
3990
- }
3991
- *pushCount(e) {
3992
- return e > 0 ? (yield this.buffer.substr(this.pos, e), this.pos += e, e) : 0;
3993
- }
3994
- *pushToIndex(e, t) {
3995
- const n = this.buffer.slice(this.pos, e);
3996
- return n ? (yield n, this.pos += n.length, n.length) : (t && (yield ""), 0);
3997
- }
3998
- *pushIndicators() {
3999
- switch (this.charAt(0)) {
4000
- case "!":
4001
- return (yield* this.pushTag()) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
4002
- case "&":
4003
- return (yield* this.pushUntil(ot)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
4004
- case "-":
4005
- case "?":
4006
- case ":": {
4007
- const e = this.flowLevel > 0, t = this.charAt(1);
4008
- if (D(t) || e && _e.has(t))
4009
- return e ? this.flowKey && (this.flowKey = !1) : this.indentNext = this.indentValue + 1, (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
4010
- }
4011
- }
4012
- return 0;
4013
- }
4014
- *pushTag() {
4015
- if (this.charAt(1) === "<") {
4016
- let e = this.pos + 2, t = this.buffer[e];
4017
- for (; !D(t) && t !== ">"; )
4018
- t = this.buffer[++e];
4019
- return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
4020
- } else {
4021
- let e = this.pos + 1, t = this.buffer[e];
4022
- for (; t; )
4023
- if (jn.has(t))
4024
- t = this.buffer[++e];
4025
- else if (t === "%" && Pt.has(this.buffer[e + 1]) && Pt.has(this.buffer[e + 2]))
4026
- t = this.buffer[e += 3];
4027
- else
4028
- break;
4029
- return yield* this.pushToIndex(e, !1);
4030
- }
4031
- }
4032
- *pushNewline() {
4033
- const e = this.buffer[this.pos];
4034
- return e === `
4035
- ` ? yield* this.pushCount(1) : e === "\r" && this.charAt(1) === `
4036
- ` ? yield* this.pushCount(2) : 0;
4037
- }
4038
- *pushSpaces(e) {
4039
- let t = this.pos - 1, n;
4040
- do
4041
- n = this.buffer[++t];
4042
- while (n === " " || e && n === " ");
4043
- const i = t - this.pos;
4044
- return i > 0 && (yield this.buffer.substr(this.pos, i), this.pos = t), i;
4045
- }
4046
- *pushUntil(e) {
4047
- let t = this.pos, n = this.buffer[t];
4048
- for (; !e(n); )
4049
- n = this.buffer[++t];
4050
- return yield* this.pushToIndex(t, !1);
4051
- }
4052
- }
4053
- class Ls {
4054
- constructor() {
4055
- this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
4056
- let t = 0, n = this.lineStarts.length;
4057
- for (; t < n; ) {
4058
- const r = t + n >> 1;
4059
- this.lineStarts[r] < e ? t = r + 1 : n = r;
4060
- }
4061
- if (this.lineStarts[t] === e)
4062
- return { line: t + 1, col: 1 };
4063
- if (t === 0)
4064
- return { line: 0, col: e };
4065
- const i = this.lineStarts[t - 1];
4066
- return { line: t, col: e - i + 1 };
4067
- };
4068
- }
4069
- }
4070
- function W(s, e) {
4071
- for (let t = 0; t < s.length; ++t)
4072
- if (s[t].type === e)
4073
- return !0;
4074
- return !1;
4075
- }
4076
- function jt(s) {
4077
- for (let e = 0; e < s.length; ++e)
4078
- switch (s[e].type) {
4079
- case "space":
4080
- case "comment":
4081
- case "newline":
4082
- break;
4083
- default:
4084
- return e;
4085
- }
4086
- return -1;
4087
- }
4088
- function $s(s) {
4089
- switch (s == null ? void 0 : s.type) {
4090
- case "alias":
4091
- case "scalar":
4092
- case "single-quoted-scalar":
4093
- case "double-quoted-scalar":
4094
- case "flow-collection":
4095
- return !0;
4096
- default:
4097
- return !1;
4098
- }
4099
- }
4100
- function Ce(s) {
4101
- switch (s.type) {
4102
- case "document":
4103
- return s.start;
4104
- case "block-map": {
4105
- const e = s.items[s.items.length - 1];
4106
- return e.sep ?? e.start;
4107
- }
4108
- case "block-seq":
4109
- return s.items[s.items.length - 1].start;
4110
- default:
4111
- return [];
4112
- }
4113
- }
4114
- function ne(s) {
4115
- var t;
4116
- if (s.length === 0)
4117
- return [];
4118
- let e = s.length;
4119
- e: for (; --e >= 0; )
4120
- switch (s[e].type) {
4121
- case "doc-start":
4122
- case "explicit-key-ind":
4123
- case "map-value-ind":
4124
- case "seq-item-ind":
4125
- case "newline":
4126
- break e;
4127
- }
4128
- for (; ((t = s[++e]) == null ? void 0 : t.type) === "space"; )
4129
- ;
4130
- return s.splice(e, s.length);
4131
- }
4132
- function Dt(s) {
4133
- if (s.start.type === "flow-seq-start")
4134
- for (const e of s.items)
4135
- e.sep && !e.value && !W(e.start, "explicit-key-ind") && !W(e.sep, "map-value-ind") && (e.key && (e.value = e.key), delete e.key, $s(e.value) ? e.value.end ? Array.prototype.push.apply(e.value.end, e.sep) : e.value.end = e.sep : Array.prototype.push.apply(e.start, e.sep), delete e.sep);
4136
- }
4137
- class Tt {
4138
- /**
4139
- * @param onNewLine - If defined, called separately with the start position of
4140
- * each new line (in `parse()`, including the start of input).
4141
- */
4142
- constructor(e) {
4143
- this.atNewLine = !0, this.atScalar = !1, this.indent = 0, this.offset = 0, this.onKeyLine = !1, this.stack = [], this.source = "", this.type = "", this.lexer = new Ts(), this.onNewLine = e;
4144
- }
4145
- /**
4146
- * Parse `source` as a YAML stream.
4147
- * If `incomplete`, a part of the last line may be left as a buffer for the next call.
4148
- *
4149
- * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.
4150
- *
4151
- * @returns A generator of tokens representing each directive, document, and other structure.
4152
- */
4153
- *parse(e, t = !1) {
4154
- this.onNewLine && this.offset === 0 && this.onNewLine(0);
4155
- for (const n of this.lexer.lex(e, t))
4156
- yield* this.next(n);
4157
- t || (yield* this.end());
4158
- }
4159
- /**
4160
- * Advance the parser by the `source` of one lexical token.
4161
- */
4162
- *next(e) {
4163
- if (this.source = e, this.atScalar) {
4164
- this.atScalar = !1, yield* this.step(), this.offset += e.length;
4165
- return;
4166
- }
4167
- const t = Is(e);
4168
- if (t)
4169
- if (t === "scalar")
4170
- this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
4171
- else {
4172
- switch (this.type = t, yield* this.step(), t) {
4173
- case "newline":
4174
- this.atNewLine = !0, this.indent = 0, this.onNewLine && this.onNewLine(this.offset + e.length);
4175
- break;
4176
- case "space":
4177
- this.atNewLine && e[0] === " " && (this.indent += e.length);
4178
- break;
4179
- case "explicit-key-ind":
4180
- case "map-value-ind":
4181
- case "seq-item-ind":
4182
- this.atNewLine && (this.indent += e.length);
4183
- break;
4184
- case "doc-mode":
4185
- case "flow-error-end":
4186
- return;
4187
- default:
4188
- this.atNewLine = !1;
4189
- }
4190
- this.offset += e.length;
4191
- }
4192
- else {
4193
- const n = `Not a YAML token: ${e}`;
4194
- yield* this.pop({ type: "error", offset: this.offset, message: n, source: e }), this.offset += e.length;
4195
- }
4196
- }
4197
- /** Call at end of input to push out any remaining constructions */
4198
- *end() {
4199
- for (; this.stack.length > 0; )
4200
- yield* this.pop();
4201
- }
4202
- get sourceToken() {
4203
- return {
4204
- type: this.type,
4205
- offset: this.offset,
4206
- indent: this.indent,
4207
- source: this.source
4208
- };
4209
- }
4210
- *step() {
4211
- const e = this.peek(1);
4212
- if (this.type === "doc-end" && (!e || e.type !== "doc-end")) {
4213
- for (; this.stack.length > 0; )
4214
- yield* this.pop();
4215
- this.stack.push({
4216
- type: "doc-end",
4217
- offset: this.offset,
4218
- source: this.source
4219
- });
4220
- return;
4221
- }
4222
- if (!e)
4223
- return yield* this.stream();
4224
- switch (e.type) {
4225
- case "document":
4226
- return yield* this.document(e);
4227
- case "alias":
4228
- case "scalar":
4229
- case "single-quoted-scalar":
4230
- case "double-quoted-scalar":
4231
- return yield* this.scalar(e);
4232
- case "block-scalar":
4233
- return yield* this.blockScalar(e);
4234
- case "block-map":
4235
- return yield* this.blockMap(e);
4236
- case "block-seq":
4237
- return yield* this.blockSequence(e);
4238
- case "flow-collection":
4239
- return yield* this.flowCollection(e);
4240
- case "doc-end":
4241
- return yield* this.documentEnd(e);
4242
- }
4243
- yield* this.pop();
4244
- }
4245
- peek(e) {
4246
- return this.stack[this.stack.length - e];
4247
- }
4248
- *pop(e) {
4249
- const t = e ?? this.stack.pop();
4250
- if (!t)
4251
- yield { type: "error", offset: this.offset, source: "", message: "Tried to pop an empty stack" };
4252
- else if (this.stack.length === 0)
4253
- yield t;
4254
- else {
4255
- const n = this.peek(1);
4256
- switch (t.type === "block-scalar" ? t.indent = "indent" in n ? n.indent : 0 : t.type === "flow-collection" && n.type === "document" && (t.indent = 0), t.type === "flow-collection" && Dt(t), n.type) {
4257
- case "document":
4258
- n.value = t;
4259
- break;
4260
- case "block-scalar":
4261
- n.props.push(t);
4262
- break;
4263
- case "block-map": {
4264
- const i = n.items[n.items.length - 1];
4265
- if (i.value) {
4266
- n.items.push({ start: [], key: t, sep: [] }), this.onKeyLine = !0;
4267
- return;
4268
- } else if (i.sep)
4269
- i.value = t;
4270
- else {
4271
- Object.assign(i, { key: t, sep: [] }), this.onKeyLine = !i.explicitKey;
4272
- return;
4273
- }
4274
- break;
4275
- }
4276
- case "block-seq": {
4277
- const i = n.items[n.items.length - 1];
4278
- i.value ? n.items.push({ start: [], value: t }) : i.value = t;
4279
- break;
4280
- }
4281
- case "flow-collection": {
4282
- const i = n.items[n.items.length - 1];
4283
- !i || i.value ? n.items.push({ start: [], key: t, sep: [] }) : i.sep ? i.value = t : Object.assign(i, { key: t, sep: [] });
4284
- return;
4285
- }
4286
- default:
4287
- yield* this.pop(), yield* this.pop(t);
4288
- }
4289
- if ((n.type === "document" || n.type === "block-map" || n.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
4290
- const i = t.items[t.items.length - 1];
4291
- i && !i.sep && !i.value && i.start.length > 0 && jt(i.start) === -1 && (t.indent === 0 || i.start.every((r) => r.type !== "comment" || r.indent < t.indent)) && (n.type === "document" ? n.end = i.start : n.items.push({ start: i.start }), t.items.splice(-1, 1));
4292
- }
4293
- }
4294
- }
4295
- *stream() {
4296
- switch (this.type) {
4297
- case "directive-line":
4298
- yield { type: "directive", offset: this.offset, source: this.source };
4299
- return;
4300
- case "byte-order-mark":
4301
- case "space":
4302
- case "comment":
4303
- case "newline":
4304
- yield this.sourceToken;
4305
- return;
4306
- case "doc-mode":
4307
- case "doc-start": {
4308
- const e = {
4309
- type: "document",
4310
- offset: this.offset,
4311
- start: []
4312
- };
4313
- this.type === "doc-start" && e.start.push(this.sourceToken), this.stack.push(e);
4314
- return;
4315
- }
4316
- }
4317
- yield {
4318
- type: "error",
4319
- offset: this.offset,
4320
- message: `Unexpected ${this.type} token in YAML stream`,
4321
- source: this.source
4322
- };
4323
- }
4324
- *document(e) {
4325
- if (e.value)
4326
- return yield* this.lineEnd(e);
4327
- switch (this.type) {
4328
- case "doc-start": {
4329
- jt(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4330
- return;
4331
- }
4332
- case "anchor":
4333
- case "tag":
4334
- case "space":
4335
- case "comment":
4336
- case "newline":
4337
- e.start.push(this.sourceToken);
4338
- return;
4339
- }
4340
- const t = this.startBlockValue(e);
4341
- t ? this.stack.push(t) : yield {
4342
- type: "error",
4343
- offset: this.offset,
4344
- message: `Unexpected ${this.type} token in YAML document`,
4345
- source: this.source
4346
- };
4347
- }
4348
- *scalar(e) {
4349
- if (this.type === "map-value-ind") {
4350
- const t = Ce(this.peek(2)), n = ne(t);
4351
- let i;
4352
- e.end ? (i = e.end, i.push(this.sourceToken), delete e.end) : i = [this.sourceToken];
4353
- const r = {
4354
- type: "block-map",
4355
- offset: e.offset,
4356
- indent: e.indent,
4357
- items: [{ start: n, key: e, sep: i }]
4358
- };
4359
- this.onKeyLine = !0, this.stack[this.stack.length - 1] = r;
4360
- } else
4361
- yield* this.lineEnd(e);
4362
- }
4363
- *blockScalar(e) {
4364
- switch (this.type) {
4365
- case "space":
4366
- case "comment":
4367
- case "newline":
4368
- e.props.push(this.sourceToken);
4369
- return;
4370
- case "scalar":
4371
- if (e.source = this.source, this.atNewLine = !0, this.indent = 0, this.onNewLine) {
4372
- let t = this.source.indexOf(`
4373
- `) + 1;
4374
- for (; t !== 0; )
4375
- this.onNewLine(this.offset + t), t = this.source.indexOf(`
4376
- `, t) + 1;
4377
- }
4378
- yield* this.pop();
4379
- break;
4380
- default:
4381
- yield* this.pop(), yield* this.step();
4382
- }
4383
- }
4384
- *blockMap(e) {
4385
- var n;
4386
- const t = e.items[e.items.length - 1];
4387
- switch (this.type) {
4388
- case "newline":
4389
- if (this.onKeyLine = !1, t.value) {
4390
- const i = "end" in t.value ? t.value.end : void 0, r = Array.isArray(i) ? i[i.length - 1] : void 0;
4391
- (r == null ? void 0 : r.type) === "comment" ? i == null || i.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4392
- } else t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4393
- return;
4394
- case "space":
4395
- case "comment":
4396
- if (t.value)
4397
- e.items.push({ start: [this.sourceToken] });
4398
- else if (t.sep)
4399
- t.sep.push(this.sourceToken);
4400
- else {
4401
- if (this.atIndentedComment(t.start, e.indent)) {
4402
- const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4403
- if (Array.isArray(r)) {
4404
- Array.prototype.push.apply(r, t.start), r.push(this.sourceToken), e.items.pop();
4405
- return;
4406
- }
4407
- }
4408
- t.start.push(this.sourceToken);
4409
- }
4410
- return;
4411
- }
4412
- if (this.indent >= e.indent) {
4413
- const i = !this.onKeyLine && this.indent === e.indent, r = i && (t.sep || t.explicitKey) && this.type !== "seq-item-ind";
4414
- let o = [];
4415
- if (r && t.sep && !t.value) {
4416
- const l = [];
4417
- for (let a = 0; a < t.sep.length; ++a) {
4418
- const c = t.sep[a];
4419
- switch (c.type) {
4420
- case "newline":
4421
- l.push(a);
4422
- break;
4423
- case "space":
4424
- break;
4425
- case "comment":
4426
- c.indent > e.indent && (l.length = 0);
4427
- break;
4428
- default:
4429
- l.length = 0;
4430
- }
4431
- }
4432
- l.length >= 2 && (o = t.sep.splice(l[1]));
4433
- }
4434
- switch (this.type) {
4435
- case "anchor":
4436
- case "tag":
4437
- r || t.value ? (o.push(this.sourceToken), e.items.push({ start: o }), this.onKeyLine = !0) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4438
- return;
4439
- case "explicit-key-ind":
4440
- !t.sep && !t.explicitKey ? (t.start.push(this.sourceToken), t.explicitKey = !0) : r || t.value ? (o.push(this.sourceToken), e.items.push({ start: o, explicitKey: !0 })) : this.stack.push({
4441
- type: "block-map",
4442
- offset: this.offset,
4443
- indent: this.indent,
4444
- items: [{ start: [this.sourceToken], explicitKey: !0 }]
4445
- }), this.onKeyLine = !0;
4446
- return;
4447
- case "map-value-ind":
4448
- if (t.explicitKey)
4449
- if (t.sep)
4450
- if (t.value)
4451
- e.items.push({ start: [], key: null, sep: [this.sourceToken] });
4452
- else if (W(t.sep, "map-value-ind"))
4453
- this.stack.push({
4454
- type: "block-map",
4455
- offset: this.offset,
4456
- indent: this.indent,
4457
- items: [{ start: o, key: null, sep: [this.sourceToken] }]
4458
- });
4459
- else if ($s(t.key) && !W(t.sep, "newline")) {
4460
- const l = ne(t.start), a = t.key, c = t.sep;
4461
- c.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
4462
- type: "block-map",
4463
- offset: this.offset,
4464
- indent: this.indent,
4465
- items: [{ start: l, key: a, sep: c }]
4466
- });
4467
- } else o.length > 0 ? t.sep = t.sep.concat(o, this.sourceToken) : t.sep.push(this.sourceToken);
4468
- else if (W(t.start, "newline"))
4469
- Object.assign(t, { key: null, sep: [this.sourceToken] });
4470
- else {
4471
- const l = ne(t.start);
4472
- this.stack.push({
4473
- type: "block-map",
4474
- offset: this.offset,
4475
- indent: this.indent,
4476
- items: [{ start: l, key: null, sep: [this.sourceToken] }]
4477
- });
4478
- }
4479
- else
4480
- t.sep ? t.value || r ? e.items.push({ start: o, key: null, sep: [this.sourceToken] }) : W(t.sep, "map-value-ind") ? this.stack.push({
4481
- type: "block-map",
4482
- offset: this.offset,
4483
- indent: this.indent,
4484
- items: [{ start: [], key: null, sep: [this.sourceToken] }]
4485
- }) : t.sep.push(this.sourceToken) : Object.assign(t, { key: null, sep: [this.sourceToken] });
4486
- this.onKeyLine = !0;
4487
- return;
4488
- case "alias":
4489
- case "scalar":
4490
- case "single-quoted-scalar":
4491
- case "double-quoted-scalar": {
4492
- const l = this.flowScalar(this.type);
4493
- r || t.value ? (e.items.push({ start: o, key: l, sep: [] }), this.onKeyLine = !0) : t.sep ? this.stack.push(l) : (Object.assign(t, { key: l, sep: [] }), this.onKeyLine = !0);
4494
- return;
4495
- }
4496
- default: {
4497
- const l = this.startBlockValue(e);
4498
- if (l) {
4499
- i && l.type !== "block-seq" && e.items.push({ start: o }), this.stack.push(l);
4500
- return;
4501
- }
4502
- }
4503
- }
4504
- }
4505
- yield* this.pop(), yield* this.step();
4506
- }
4507
- *blockSequence(e) {
4508
- var n;
4509
- const t = e.items[e.items.length - 1];
4510
- switch (this.type) {
4511
- case "newline":
4512
- if (t.value) {
4513
- const i = "end" in t.value ? t.value.end : void 0, r = Array.isArray(i) ? i[i.length - 1] : void 0;
4514
- (r == null ? void 0 : r.type) === "comment" ? i == null || i.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4515
- } else
4516
- t.start.push(this.sourceToken);
4517
- return;
4518
- case "space":
4519
- case "comment":
4520
- if (t.value)
4521
- e.items.push({ start: [this.sourceToken] });
4522
- else {
4523
- if (this.atIndentedComment(t.start, e.indent)) {
4524
- const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4525
- if (Array.isArray(r)) {
4526
- Array.prototype.push.apply(r, t.start), r.push(this.sourceToken), e.items.pop();
4527
- return;
4528
- }
4529
- }
4530
- t.start.push(this.sourceToken);
4531
- }
4532
- return;
4533
- case "anchor":
4534
- case "tag":
4535
- if (t.value || this.indent <= e.indent)
4536
- break;
4537
- t.start.push(this.sourceToken);
4538
- return;
4539
- case "seq-item-ind":
4540
- if (this.indent !== e.indent)
4541
- break;
4542
- t.value || W(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4543
- return;
4544
- }
4545
- if (this.indent > e.indent) {
4546
- const i = this.startBlockValue(e);
4547
- if (i) {
4548
- this.stack.push(i);
4549
- return;
4550
- }
4551
- }
4552
- yield* this.pop(), yield* this.step();
4553
- }
4554
- *flowCollection(e) {
4555
- const t = e.items[e.items.length - 1];
4556
- if (this.type === "flow-error-end") {
4557
- let n;
4558
- do
4559
- yield* this.pop(), n = this.peek(1);
4560
- while (n && n.type === "flow-collection");
4561
- } else if (e.end.length === 0) {
4562
- switch (this.type) {
4563
- case "comma":
4564
- case "explicit-key-ind":
4565
- !t || t.sep ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4566
- return;
4567
- case "map-value-ind":
4568
- !t || t.value ? e.items.push({ start: [], key: null, sep: [this.sourceToken] }) : t.sep ? t.sep.push(this.sourceToken) : Object.assign(t, { key: null, sep: [this.sourceToken] });
4569
- return;
4570
- case "space":
4571
- case "comment":
4572
- case "newline":
4573
- case "anchor":
4574
- case "tag":
4575
- !t || t.value ? e.items.push({ start: [this.sourceToken] }) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4576
- return;
4577
- case "alias":
4578
- case "scalar":
4579
- case "single-quoted-scalar":
4580
- case "double-quoted-scalar": {
4581
- const i = this.flowScalar(this.type);
4582
- !t || t.value ? e.items.push({ start: [], key: i, sep: [] }) : t.sep ? this.stack.push(i) : Object.assign(t, { key: i, sep: [] });
4583
- return;
4584
- }
4585
- case "flow-map-end":
4586
- case "flow-seq-end":
4587
- e.end.push(this.sourceToken);
4588
- return;
4589
- }
4590
- const n = this.startBlockValue(e);
4591
- n ? this.stack.push(n) : (yield* this.pop(), yield* this.step());
4592
- } else {
4593
- const n = this.peek(2);
4594
- if (n.type === "block-map" && (this.type === "map-value-ind" && n.indent === e.indent || this.type === "newline" && !n.items[n.items.length - 1].sep))
4595
- yield* this.pop(), yield* this.step();
4596
- else if (this.type === "map-value-ind" && n.type !== "flow-collection") {
4597
- const i = Ce(n), r = ne(i);
4598
- Dt(e);
4599
- const o = e.end.splice(1, e.end.length);
4600
- o.push(this.sourceToken);
4601
- const l = {
4602
- type: "block-map",
4603
- offset: e.offset,
4604
- indent: e.indent,
4605
- items: [{ start: r, key: e, sep: o }]
4606
- };
4607
- this.onKeyLine = !0, this.stack[this.stack.length - 1] = l;
4608
- } else
4609
- yield* this.lineEnd(e);
4610
- }
4611
- }
4612
- flowScalar(e) {
4613
- if (this.onNewLine) {
4614
- let t = this.source.indexOf(`
4615
- `) + 1;
4616
- for (; t !== 0; )
4617
- this.onNewLine(this.offset + t), t = this.source.indexOf(`
4618
- `, t) + 1;
4619
- }
4620
- return {
4621
- type: e,
4622
- offset: this.offset,
4623
- indent: this.indent,
4624
- source: this.source
4625
- };
4626
- }
4627
- startBlockValue(e) {
4628
- switch (this.type) {
4629
- case "alias":
4630
- case "scalar":
4631
- case "single-quoted-scalar":
4632
- case "double-quoted-scalar":
4633
- return this.flowScalar(this.type);
4634
- case "block-scalar-header":
4635
- return {
4636
- type: "block-scalar",
4637
- offset: this.offset,
4638
- indent: this.indent,
4639
- props: [this.sourceToken],
4640
- source: ""
4641
- };
4642
- case "flow-map-start":
4643
- case "flow-seq-start":
4644
- return {
4645
- type: "flow-collection",
4646
- offset: this.offset,
4647
- indent: this.indent,
4648
- start: this.sourceToken,
4649
- items: [],
4650
- end: []
4651
- };
4652
- case "seq-item-ind":
4653
- return {
4654
- type: "block-seq",
4655
- offset: this.offset,
4656
- indent: this.indent,
4657
- items: [{ start: [this.sourceToken] }]
4658
- };
4659
- case "explicit-key-ind": {
4660
- this.onKeyLine = !0;
4661
- const t = Ce(e), n = ne(t);
4662
- return n.push(this.sourceToken), {
4663
- type: "block-map",
4664
- offset: this.offset,
4665
- indent: this.indent,
4666
- items: [{ start: n, explicitKey: !0 }]
4667
- };
4668
- }
4669
- case "map-value-ind": {
4670
- this.onKeyLine = !0;
4671
- const t = Ce(e), n = ne(t);
4672
- return {
4673
- type: "block-map",
4674
- offset: this.offset,
4675
- indent: this.indent,
4676
- items: [{ start: n, key: null, sep: [this.sourceToken] }]
4677
- };
4678
- }
4679
- }
4680
- return null;
4681
- }
4682
- atIndentedComment(e, t) {
4683
- return this.type !== "comment" || this.indent <= t ? !1 : e.every((n) => n.type === "newline" || n.type === "space");
4684
- }
4685
- *documentEnd(e) {
4686
- this.type !== "doc-mode" && (e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop()));
4687
- }
4688
- *lineEnd(e) {
4689
- switch (this.type) {
4690
- case "comma":
4691
- case "doc-start":
4692
- case "doc-end":
4693
- case "flow-seq-end":
4694
- case "flow-map-end":
4695
- case "map-value-ind":
4696
- yield* this.pop(), yield* this.step();
4697
- break;
4698
- case "newline":
4699
- this.onKeyLine = !1;
4700
- case "space":
4701
- case "comment":
4702
- default:
4703
- e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop());
4704
- }
4705
- }
4706
- }
4707
- function _s(s) {
4708
- const e = s.prettyErrors !== !1;
4709
- return { lineCounter: s.lineCounter || e && new Ls() || null, prettyErrors: e };
4710
- }
4711
- function qn(s, e = {}) {
4712
- const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t == null ? void 0 : t.addNewLine), r = new It(e), o = Array.from(r.compose(i.parse(s)));
4713
- if (n && t)
4714
- for (const l of o)
4715
- l.errors.forEach(De(s, t)), l.warnings.forEach(De(s, t));
4716
- return o.length > 0 ? o : Object.assign([], { empty: !0 }, r.streamInfo());
4717
- }
4718
- function Cs(s, e = {}) {
4719
- const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t == null ? void 0 : t.addNewLine), r = new It(e);
4720
- let o = null;
4721
- for (const l of r.compose(i.parse(s), !0, s.length))
4722
- if (!o)
4723
- o = l;
4724
- else if (o.options.logLevel !== "silent") {
4725
- o.errors.push(new z(l.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4726
- break;
4727
- }
4728
- return n && t && (o.errors.forEach(De(s, t)), o.warnings.forEach(De(s, t))), o;
4729
- }
4730
- function Rn(s, e, t) {
4731
- let n;
4732
- typeof e == "function" ? n = e : t === void 0 && e && typeof e == "object" && (t = e);
4733
- const i = Cs(s, t);
4734
- if (!i)
4735
- return null;
4736
- if (i.warnings.forEach((r) => zt(i.options.logLevel, r)), i.errors.length > 0) {
4737
- if (i.options.logLevel !== "silent")
4738
- throw i.errors[0];
4739
- i.errors = [];
4740
- }
4741
- return i.toJS(Object.assign({ reviver: n }, t));
4742
- }
4743
- function Un(s, e, t) {
4744
- let n = null;
4745
- if (typeof e == "function" || Array.isArray(e) ? n = e : t === void 0 && e && (t = e), typeof t == "string" && (t = t.length), typeof t == "number") {
4746
- const i = Math.round(t);
4747
- t = i < 1 ? void 0 : i > 8 ? { indent: 8 } : { indent: i };
4748
- }
4749
- if (s === void 0) {
4750
- const { keepUndefined: i } = t ?? e ?? {};
4751
- if (!i)
4752
- return;
4753
- }
4754
- return ee(s) && !n ? s.toString(t) : new ge(s, n, t).toString(t);
4755
- }
4756
- const Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4757
- __proto__: null,
4758
- Alias: Ue,
4759
- CST: Pn,
4760
- Composer: It,
4761
- Document: ge,
4762
- Lexer: Ts,
4763
- LineCounter: Ls,
4764
- Pair: B,
4765
- Parser: Tt,
4766
- Scalar: O,
4767
- Schema: Xe,
4768
- YAMLError: At,
4769
- YAMLMap: K,
4770
- YAMLParseError: z,
4771
- YAMLSeq: Q,
4772
- YAMLWarning: ys,
4773
- isAlias: x,
4774
- isCollection: L,
4775
- isDocument: ee,
4776
- isMap: de,
4777
- isNode: $,
4778
- isPair: I,
4779
- isScalar: E,
4780
- isSeq: pe,
4781
- parse: Rn,
4782
- parseAllDocuments: qn,
4783
- parseDocument: Cs,
4784
- stringify: Un,
4785
- visit: G,
4786
- visitAsync: Re
4787
- }, Symbol.toStringTag, { value: "Module" }));
4788
- export {
4789
- Ue as Alias,
4790
- Pn as CST,
4791
- It as Composer,
4792
- ge as Document,
4793
- Ts as Lexer,
4794
- Ls as LineCounter,
4795
- B as Pair,
4796
- Tt as Parser,
4797
- O as Scalar,
4798
- Xe as Schema,
4799
- At as YAMLError,
4800
- K as YAMLMap,
4801
- z as YAMLParseError,
4802
- Q as YAMLSeq,
4803
- ys as YAMLWarning,
4804
- Fn as default,
4805
- x as isAlias,
4806
- L as isCollection,
4807
- ee as isDocument,
4808
- de as isMap,
4809
- $ as isNode,
4810
- I as isPair,
4811
- E as isScalar,
4812
- pe as isSeq,
4813
- Rn as parse,
4814
- qn as parseAllDocuments,
4815
- Cs as parseDocument,
4816
- Un as stringify,
4817
- G as visit,
4818
- Re as visitAsync
4819
- };
4820
- //# sourceMappingURL=index-CkwDvuPt.js.map