zudoku 0.0.0-ed94abf → 0.0.0-edf4a635

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 (1827) hide show
  1. package/README.md +33 -13
  2. package/cli.js +9 -2
  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 -6
  7. package/dist/app/demo.js.map +1 -1
  8. package/dist/app/entry.client.d.ts +0 -2
  9. package/dist/app/entry.client.js +37 -4
  10. package/dist/app/entry.client.js.map +1 -1
  11. package/dist/app/entry.server.d.ts +0 -2
  12. package/dist/app/entry.server.js +3 -5
  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 +2 -1
  18. package/dist/app/main.js +38 -47
  19. package/dist/app/main.js.map +1 -1
  20. package/dist/app/standalone.js +11 -7
  21. package/dist/app/standalone.js.map +1 -1
  22. package/dist/cli/build/handler.js +9 -1
  23. package/dist/cli/build/handler.js.map +1 -1
  24. package/dist/cli/cli.js +14 -2
  25. package/dist/cli/cli.js.map +1 -1
  26. package/dist/cli/cmds/build.d.ts +1 -1
  27. package/dist/cli/cmds/dev.d.ts +1 -1
  28. package/dist/cli/cmds/preview.d.ts +1 -1
  29. package/dist/cli/common/analytics/lib.js +1 -1
  30. package/dist/cli/common/analytics/lib.js.map +1 -1
  31. package/dist/cli/common/logger.js +0 -1
  32. package/dist/cli/common/logger.js.map +1 -1
  33. package/dist/cli/common/machine-id/lib.js +3 -2
  34. package/dist/cli/common/machine-id/lib.js.map +1 -1
  35. package/dist/cli/common/outdated.js +2 -1
  36. package/dist/cli/common/outdated.js.map +1 -1
  37. package/dist/cli/common/output.js +2 -3
  38. package/dist/cli/common/output.js.map +1 -1
  39. package/dist/cli/common/utils/box.js +2 -2
  40. package/dist/cli/common/utils/box.js.map +1 -1
  41. package/dist/cli/common/validators/lib.js +1 -1
  42. package/dist/cli/common/validators/lib.js.map +1 -1
  43. package/dist/cli/dev/handler.js +0 -4
  44. package/dist/cli/dev/handler.js.map +1 -1
  45. package/dist/codegen.js +2 -2
  46. package/dist/codegen.js.map +1 -1
  47. package/dist/config/config.d.ts +14 -2
  48. package/dist/config/file-exists.d.ts +1 -0
  49. package/dist/config/file-exists.js +5 -0
  50. package/dist/config/file-exists.js.map +1 -0
  51. package/dist/config/loader.d.ts +18 -18
  52. package/dist/config/loader.js +95 -100
  53. package/dist/config/loader.js.map +1 -1
  54. package/dist/config/validators/BuildSchema.d.ts +20 -44
  55. package/dist/config/validators/BuildSchema.js +10 -16
  56. package/dist/config/validators/BuildSchema.js.map +1 -1
  57. package/dist/config/validators/InputNavigationSchema.d.ts +7562 -0
  58. package/dist/config/validators/InputNavigationSchema.js +77 -0
  59. package/dist/config/validators/InputNavigationSchema.js.map +1 -0
  60. package/dist/config/validators/InputNavigationSchema.test-d.js +146 -0
  61. package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -0
  62. package/dist/config/validators/NavigationSchema.d.ts +44 -0
  63. package/dist/config/validators/NavigationSchema.js +98 -0
  64. package/dist/config/validators/NavigationSchema.js.map +1 -0
  65. package/dist/config/validators/ProtectedRoutesSchema.d.ts +13 -0
  66. package/dist/config/validators/ProtectedRoutesSchema.js +10 -0
  67. package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
  68. package/dist/config/validators/auth.d.ts +2 -2
  69. package/dist/config/validators/auth.js +1 -1
  70. package/dist/config/validators/auth.js.map +1 -1
  71. package/dist/config/validators/icon-types.d.ts +2 -1
  72. package/dist/config/validators/icon-types.js +1852 -1
  73. package/dist/config/validators/icon-types.js.map +1 -1
  74. package/dist/config/validators/validate.d.ts +591 -2739
  75. package/dist/config/validators/validate.js +441 -18
  76. package/dist/config/validators/validate.js.map +1 -1
  77. package/dist/config/validators/validate.test.d.ts +1 -0
  78. package/dist/config/validators/validate.test.js +140 -0
  79. package/dist/config/validators/validate.test.js.map +1 -0
  80. package/dist/flat-config.d.ts +331 -0
  81. package/dist/index.d.ts +9 -5
  82. package/dist/index.js +4 -0
  83. package/dist/index.js.map +1 -1
  84. package/dist/lib/MissingIcon.d.ts +1 -1
  85. package/dist/lib/MissingIcon.js.map +1 -1
  86. package/dist/lib/assets/language-icons/csharp.d.ts +3 -0
  87. package/dist/lib/assets/language-icons/csharp.js +4 -0
  88. package/dist/lib/assets/language-icons/csharp.js.map +1 -0
  89. package/dist/lib/assets/language-icons/css.d.ts +3 -0
  90. package/dist/lib/assets/language-icons/css.js +4 -0
  91. package/dist/lib/assets/language-icons/css.js.map +1 -0
  92. package/dist/lib/assets/language-icons/go.d.ts +3 -0
  93. package/dist/lib/assets/language-icons/go.js +4 -0
  94. package/dist/lib/assets/language-icons/go.js.map +1 -0
  95. package/dist/lib/assets/language-icons/graphql.d.ts +3 -0
  96. package/dist/lib/assets/language-icons/graphql.js +4 -0
  97. package/dist/lib/assets/language-icons/graphql.js.map +1 -0
  98. package/dist/lib/assets/language-icons/html.d.ts +3 -0
  99. package/dist/lib/assets/language-icons/html.js +4 -0
  100. package/dist/lib/assets/language-icons/html.js.map +1 -0
  101. package/dist/lib/assets/language-icons/java.d.ts +3 -0
  102. package/dist/lib/assets/language-icons/java.js +4 -0
  103. package/dist/lib/assets/language-icons/java.js.map +1 -0
  104. package/dist/lib/assets/language-icons/javascript.d.ts +3 -0
  105. package/dist/lib/assets/language-icons/javascript.js +4 -0
  106. package/dist/lib/assets/language-icons/javascript.js.map +1 -0
  107. package/dist/lib/assets/language-icons/json.d.ts +3 -0
  108. package/dist/lib/assets/language-icons/json.js +4 -0
  109. package/dist/lib/assets/language-icons/json.js.map +1 -0
  110. package/dist/lib/assets/language-icons/kotlin.d.ts +3 -0
  111. package/dist/lib/assets/language-icons/kotlin.js +4 -0
  112. package/dist/lib/assets/language-icons/kotlin.js.map +1 -0
  113. package/dist/lib/assets/language-icons/markdown.d.ts +3 -0
  114. package/dist/lib/assets/language-icons/markdown.js +4 -0
  115. package/dist/lib/assets/language-icons/markdown.js.map +1 -0
  116. package/dist/lib/assets/language-icons/mdx.d.ts +3 -0
  117. package/dist/lib/assets/language-icons/mdx.js +4 -0
  118. package/dist/lib/assets/language-icons/mdx.js.map +1 -0
  119. package/dist/lib/assets/language-icons/objectivec.d.ts +3 -0
  120. package/dist/lib/assets/language-icons/objectivec.js +4 -0
  121. package/dist/lib/assets/language-icons/objectivec.js.map +1 -0
  122. package/dist/lib/assets/language-icons/php.d.ts +3 -0
  123. package/dist/lib/assets/language-icons/php.js +4 -0
  124. package/dist/lib/assets/language-icons/php.js.map +1 -0
  125. package/dist/lib/assets/language-icons/python.d.ts +3 -0
  126. package/dist/lib/assets/language-icons/python.js +4 -0
  127. package/dist/lib/assets/language-icons/python.js.map +1 -0
  128. package/dist/lib/assets/language-icons/react.d.ts +3 -0
  129. package/dist/lib/assets/language-icons/react.js +4 -0
  130. package/dist/lib/assets/language-icons/react.js.map +1 -0
  131. package/dist/lib/assets/language-icons/ruby.d.ts +3 -0
  132. package/dist/lib/assets/language-icons/ruby.js +4 -0
  133. package/dist/lib/assets/language-icons/ruby.js.map +1 -0
  134. package/dist/lib/assets/language-icons/rust.d.ts +3 -0
  135. package/dist/lib/assets/language-icons/rust.js +4 -0
  136. package/dist/lib/assets/language-icons/rust.js.map +1 -0
  137. package/dist/lib/assets/language-icons/shell.d.ts +3 -0
  138. package/dist/lib/assets/language-icons/shell.js +4 -0
  139. package/dist/lib/assets/language-icons/shell.js.map +1 -0
  140. package/dist/lib/assets/language-icons/swift.d.ts +3 -0
  141. package/dist/lib/assets/language-icons/swift.js +4 -0
  142. package/dist/lib/assets/language-icons/swift.js.map +1 -0
  143. package/dist/lib/assets/language-icons/toml.d.ts +3 -0
  144. package/dist/lib/assets/language-icons/toml.js +4 -0
  145. package/dist/lib/assets/language-icons/toml.js.map +1 -0
  146. package/dist/lib/assets/language-icons/typescript.d.ts +3 -0
  147. package/dist/lib/assets/language-icons/typescript.js +4 -0
  148. package/dist/lib/assets/language-icons/typescript.js.map +1 -0
  149. package/dist/lib/assets/language-icons/xml.d.ts +3 -0
  150. package/dist/lib/assets/language-icons/xml.js +4 -0
  151. package/dist/lib/assets/language-icons/xml.js.map +1 -0
  152. package/dist/lib/assets/language-icons/yaml.d.ts +3 -0
  153. package/dist/lib/assets/language-icons/yaml.js +4 -0
  154. package/dist/lib/assets/language-icons/yaml.js.map +1 -0
  155. package/dist/lib/auth/issuer.d.ts +2 -0
  156. package/dist/lib/auth/issuer.js +37 -0
  157. package/dist/lib/auth/issuer.js.map +1 -0
  158. package/dist/lib/auth/issuer.test.d.ts +1 -0
  159. package/dist/lib/auth/issuer.test.js +95 -0
  160. package/dist/lib/auth/issuer.test.js.map +1 -0
  161. package/dist/lib/authentication/AuthenticationPlugin.d.ts +2 -2
  162. package/dist/lib/authentication/AuthenticationPlugin.js +1 -1
  163. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
  164. package/dist/lib/authentication/authentication.d.ts +4 -6
  165. package/dist/lib/authentication/components/CallbackHandler.js +16 -10
  166. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  167. package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
  168. package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
  169. package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
  170. package/dist/lib/authentication/components/SignIn.d.ts +1 -1
  171. package/dist/lib/authentication/components/SignIn.js +5 -1
  172. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  173. package/dist/lib/authentication/components/SignOut.js +1 -1
  174. package/dist/lib/authentication/components/SignOut.js.map +1 -1
  175. package/dist/lib/authentication/components/SignUp.d.ts +1 -1
  176. package/dist/lib/authentication/components/SignUp.js +4 -1
  177. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  178. package/dist/lib/authentication/errors.d.ts +6 -12
  179. package/dist/lib/authentication/errors.js +2 -1
  180. package/dist/lib/authentication/errors.js.map +1 -1
  181. package/dist/lib/authentication/hook.d.ts +7 -0
  182. package/dist/lib/authentication/hook.js.map +1 -1
  183. package/dist/lib/authentication/providers/auth0.d.ts +2 -2
  184. package/dist/lib/authentication/providers/auth0.js +3 -3
  185. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  186. package/dist/lib/authentication/providers/azureb2c.d.ts +28 -0
  187. package/dist/lib/authentication/providers/azureb2c.js +147 -0
  188. package/dist/lib/authentication/providers/azureb2c.js.map +1 -0
  189. package/dist/lib/authentication/providers/clerk.d.ts +2 -2
  190. package/dist/lib/authentication/providers/clerk.js +78 -58
  191. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  192. package/dist/lib/authentication/providers/openid.d.ts +17 -20
  193. package/dist/lib/authentication/providers/openid.js +73 -44
  194. package/dist/lib/authentication/providers/openid.js.map +1 -1
  195. package/dist/lib/authentication/providers/supabase.d.ts +2 -2
  196. package/dist/lib/authentication/providers/supabase.js +6 -14
  197. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  198. package/dist/lib/authentication/state.d.ts +6 -5
  199. package/dist/lib/authentication/state.js +19 -6
  200. package/dist/lib/authentication/state.js.map +1 -1
  201. package/dist/lib/authentication/use-broadcast/shared.d.ts +1 -1
  202. package/dist/lib/authentication/use-broadcast/shared.js +3 -3
  203. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -1
  204. package/dist/lib/authentication/use-broadcast/useBroadcast.js +2 -2
  205. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -1
  206. package/dist/lib/components/Autocomplete.js +3 -3
  207. package/dist/lib/components/Autocomplete.js.map +1 -1
  208. package/dist/lib/components/Banner.js +2 -2
  209. package/dist/lib/components/Banner.js.map +1 -1
  210. package/dist/lib/components/Bootstrap.js.map +1 -1
  211. package/dist/lib/components/BuildCheck.d.ts +2 -1
  212. package/dist/lib/components/BuildCheck.js +29 -6
  213. package/dist/lib/components/BuildCheck.js.map +1 -1
  214. package/dist/lib/components/CategoryHeading.js +1 -1
  215. package/dist/lib/components/CategoryHeading.js.map +1 -1
  216. package/dist/lib/components/ErrorPage.js +2 -2
  217. package/dist/lib/components/ErrorPage.js.map +1 -1
  218. package/dist/lib/components/Footer.js +6 -6
  219. package/dist/lib/components/Footer.js.map +1 -1
  220. package/dist/lib/components/Framed.d.ts +7 -0
  221. package/dist/lib/components/Framed.js +26 -0
  222. package/dist/lib/components/Framed.js.map +1 -0
  223. package/dist/lib/components/Header.js +25 -18
  224. package/dist/lib/components/Header.js.map +1 -1
  225. package/dist/lib/components/Heading.d.ts +8 -4
  226. package/dist/lib/components/Heading.js +8 -3
  227. package/dist/lib/components/Heading.js.map +1 -1
  228. package/dist/lib/components/InlineCode.js +1 -1
  229. package/dist/lib/components/InlineCode.js.map +1 -1
  230. package/dist/lib/components/LanguageIcon.d.ts +3 -0
  231. package/dist/lib/components/LanguageIcon.js +118 -0
  232. package/dist/lib/components/LanguageIcon.js.map +1 -0
  233. package/dist/lib/components/Layout.js +5 -8
  234. package/dist/lib/components/Layout.js.map +1 -1
  235. package/dist/lib/components/Main.js +7 -6
  236. package/dist/lib/components/Main.js.map +1 -1
  237. package/dist/lib/components/Markdown.d.ts +3 -2
  238. package/dist/lib/components/Markdown.js +14 -16
  239. package/dist/lib/components/Markdown.js.map +1 -1
  240. package/dist/lib/components/Meta.d.ts +2 -0
  241. package/dist/lib/components/Meta.js +11 -0
  242. package/dist/lib/components/Meta.js.map +1 -0
  243. package/dist/lib/components/MobileTopNavigation.js +13 -6
  244. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  245. package/dist/lib/components/NotFoundPage.js +2 -2
  246. package/dist/lib/components/NotFoundPage.js.map +1 -1
  247. package/dist/lib/components/PageProgress.d.ts +1 -0
  248. package/dist/lib/components/PageProgress.js +20 -0
  249. package/dist/lib/components/PageProgress.js.map +1 -0
  250. package/dist/lib/components/Pagination.js +2 -2
  251. package/dist/lib/components/Pagination.js.map +1 -1
  252. package/dist/lib/components/PathRenderer.js +1 -1
  253. package/dist/lib/components/PathRenderer.js.map +1 -1
  254. package/dist/lib/components/Search.js +3 -3
  255. package/dist/lib/components/Search.js.map +1 -1
  256. package/dist/lib/components/Slot.d.ts +17 -0
  257. package/dist/lib/components/Slot.js +24 -0
  258. package/dist/lib/components/Slot.js.map +1 -0
  259. package/dist/lib/components/Slot.test.d.ts +1 -0
  260. package/dist/lib/components/Slot.test.js +172 -0
  261. package/dist/lib/components/Slot.test.js.map +1 -0
  262. package/dist/lib/components/StatusPage.js +4 -0
  263. package/dist/lib/components/StatusPage.js.map +1 -1
  264. package/dist/lib/components/TopNavigation.d.ts +7 -6
  265. package/dist/lib/components/TopNavigation.js +53 -55
  266. package/dist/lib/components/TopNavigation.js.map +1 -1
  267. package/dist/lib/components/Typography.d.ts +5 -0
  268. package/dist/lib/components/Typography.js +8 -0
  269. package/dist/lib/components/Typography.js.map +1 -0
  270. package/dist/lib/components/Zudoku.js +4 -4
  271. package/dist/lib/components/Zudoku.js.map +1 -1
  272. package/dist/lib/components/context/ComponentsContext.js.map +1 -1
  273. package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -1
  274. package/dist/lib/components/context/SlotProvider.d.ts +26 -0
  275. package/dist/lib/components/context/SlotProvider.js +83 -0
  276. package/dist/lib/components/context/SlotProvider.js.map +1 -0
  277. package/dist/lib/components/context/ViewportAnchorContext.js +9 -10
  278. package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
  279. package/dist/lib/components/context/ZudokuContext.d.ts +3 -7
  280. package/dist/lib/components/context/ZudokuContext.js +57 -32
  281. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  282. package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
  283. package/dist/lib/components/context/ZudokuProvider.js +2 -1
  284. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  285. package/dist/lib/components/index.d.ts +51 -50
  286. package/dist/lib/components/index.js +17 -22
  287. package/dist/lib/components/index.js.map +1 -1
  288. package/dist/lib/components/navigation/Navigation.d.ts +5 -0
  289. package/dist/lib/components/navigation/Navigation.js +12 -0
  290. package/dist/lib/components/navigation/Navigation.js.map +1 -0
  291. package/dist/lib/components/navigation/NavigationBadge.d.ts +26 -0
  292. package/dist/lib/components/navigation/NavigationBadge.js +26 -0
  293. package/dist/lib/components/navigation/NavigationBadge.js.map +1 -0
  294. package/dist/lib/components/navigation/NavigationCategory.d.ts +5 -0
  295. package/dist/lib/components/navigation/NavigationCategory.js +66 -0
  296. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -0
  297. package/dist/lib/components/navigation/NavigationItem.d.ts +6 -0
  298. package/dist/lib/components/navigation/NavigationItem.js +55 -0
  299. package/dist/lib/components/navigation/NavigationItem.js.map +1 -0
  300. package/dist/lib/components/navigation/NavigationWrapper.d.ts +7 -0
  301. package/dist/lib/components/navigation/NavigationWrapper.js +21 -0
  302. package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -0
  303. package/dist/lib/components/navigation/PoweredByZudoku.js +1 -1
  304. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -1
  305. package/dist/lib/components/navigation/Toc.js +2 -2
  306. package/dist/lib/components/navigation/Toc.js.map +1 -1
  307. package/dist/lib/components/navigation/ZudokuLogo.d.ts +1 -1
  308. package/dist/lib/components/navigation/utils.d.ts +16 -8
  309. package/dist/lib/components/navigation/utils.js +58 -27
  310. package/dist/lib/components/navigation/utils.js.map +1 -1
  311. package/dist/lib/core/RouteGuard.js +9 -9
  312. package/dist/lib/core/RouteGuard.js.map +1 -1
  313. package/dist/lib/core/ZudokuContext.d.ts +37 -21
  314. package/dist/lib/core/ZudokuContext.js +49 -14
  315. package/dist/lib/core/ZudokuContext.js.map +1 -1
  316. package/dist/lib/core/__internal.d.ts +37 -0
  317. package/dist/lib/core/__internal.js +26 -0
  318. package/dist/lib/core/__internal.js.map +1 -0
  319. package/dist/lib/core/plugins.d.ts +8 -4
  320. package/dist/lib/core/plugins.js +1 -0
  321. package/dist/lib/core/plugins.js.map +1 -1
  322. package/dist/lib/core/router.d.ts +1 -0
  323. package/dist/lib/core/router.js +2 -0
  324. package/dist/lib/core/router.js.map +1 -0
  325. package/dist/lib/errors/ErrorAlert.js +2 -4
  326. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  327. package/dist/lib/errors/TopLevelError.d.ts +2 -2
  328. package/dist/lib/errors/TopLevelError.js +1 -2
  329. package/dist/lib/errors/TopLevelError.js.map +1 -1
  330. package/dist/lib/hooks/index.d.ts +25 -0
  331. package/dist/lib/hooks/index.js +11 -0
  332. package/dist/lib/hooks/index.js.map +1 -1
  333. package/dist/lib/hooks/useEvent.test.js +5 -3
  334. package/dist/lib/hooks/useEvent.test.js.map +1 -1
  335. package/dist/lib/hooks/useHotkey.d.ts +4 -0
  336. package/dist/lib/hooks/useHotkey.js +58 -0
  337. package/dist/lib/hooks/useHotkey.js.map +1 -0
  338. package/dist/lib/oas/graphql/circular.js +24 -19
  339. package/dist/lib/oas/graphql/circular.js.map +1 -1
  340. package/dist/lib/oas/graphql/index.js +22 -3
  341. package/dist/lib/oas/graphql/index.js.map +1 -1
  342. package/dist/lib/oas/parser/dereference/index.js +2 -1
  343. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  344. package/dist/lib/oas/parser/dereference/resolveRef.js +3 -3
  345. package/dist/lib/oas/parser/dereference/resolveRef.js.map +1 -1
  346. package/dist/lib/oas/parser/index.d.ts +3 -0
  347. package/dist/lib/oas/parser/index.js +8 -2
  348. package/dist/lib/oas/parser/index.js.map +1 -1
  349. package/dist/lib/oas/parser/upgrade/index.d.ts +1 -0
  350. package/dist/lib/oas/parser/upgrade/index.js +79 -26
  351. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  352. package/dist/lib/plugins/api-catalog/Catalog.d.ts +1 -1
  353. package/dist/lib/plugins/api-catalog/Catalog.js +8 -2
  354. package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
  355. package/dist/lib/plugins/api-catalog/index.d.ts +6 -6
  356. package/dist/lib/plugins/api-catalog/index.js +10 -10
  357. package/dist/lib/plugins/api-catalog/index.js.map +1 -1
  358. package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +3 -2
  359. package/dist/lib/plugins/api-keys/CreateApiKey.js +18 -4
  360. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  361. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.d.ts +11 -0
  362. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js +9 -0
  363. package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js.map +1 -0
  364. package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
  365. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +146 -27
  366. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  367. package/dist/lib/plugins/api-keys/index.d.ts +29 -15
  368. package/dist/lib/plugins/api-keys/index.js +63 -33
  369. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  370. package/dist/lib/plugins/custom-pages/index.d.ts +4 -6
  371. package/dist/lib/plugins/custom-pages/index.js +18 -10
  372. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  373. package/dist/lib/plugins/markdown/MdxPage.d.ts +2 -3
  374. package/dist/lib/plugins/markdown/MdxPage.js +31 -11
  375. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  376. package/dist/lib/plugins/markdown/index.d.ts +12 -4
  377. package/dist/lib/plugins/markdown/index.js +9 -26
  378. package/dist/lib/plugins/markdown/index.js.map +1 -1
  379. package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
  380. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
  381. package/dist/lib/plugins/openapi/ColorizedParam.js +5 -2
  382. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  383. package/dist/lib/plugins/openapi/Endpoint.js +2 -2
  384. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  385. package/dist/lib/plugins/openapi/MCPEndpoint.d.ts +5 -0
  386. package/dist/lib/plugins/openapi/MCPEndpoint.js +65 -0
  387. package/dist/lib/plugins/openapi/MCPEndpoint.js.map +1 -0
  388. package/dist/lib/plugins/openapi/OasProvider.d.ts +1 -1
  389. package/dist/lib/plugins/openapi/OasProvider.js +1 -0
  390. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
  391. package/dist/lib/plugins/openapi/OperationList.d.ts +1 -3
  392. package/dist/lib/plugins/openapi/OperationList.js +29 -12
  393. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  394. package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
  395. package/dist/lib/plugins/openapi/OperationListItem.js +11 -6
  396. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  397. package/dist/lib/plugins/openapi/ParamInfos.d.ts +1 -1
  398. package/dist/lib/plugins/openapi/ParamInfos.js +15 -10
  399. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  400. package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -2
  401. package/dist/lib/plugins/openapi/ParameterList.js +1 -1
  402. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  403. package/dist/lib/plugins/openapi/ParameterListItem.d.ts +2 -3
  404. package/dist/lib/plugins/openapi/ParameterListItem.js +9 -2
  405. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  406. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -4
  407. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +8 -4
  408. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  409. package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +2 -2
  410. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  411. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
  412. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -4
  413. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  414. package/dist/lib/plugins/openapi/SchemaList.js +7 -7
  415. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  416. package/dist/lib/plugins/openapi/Sidecar.d.ts +2 -2
  417. package/dist/lib/plugins/openapi/Sidecar.js +14 -62
  418. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  419. package/dist/lib/plugins/openapi/SidecarExamples.d.ts +2 -4
  420. package/dist/lib/plugins/openapi/SidecarExamples.js +9 -1
  421. package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
  422. package/dist/lib/plugins/openapi/StaggeredRender.d.ts +1 -1
  423. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +1 -1
  424. package/dist/lib/plugins/openapi/client/createServer.js +1 -2
  425. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
  426. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
  427. package/dist/lib/plugins/openapi/client/useCreateQuery.js +10 -4
  428. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  429. package/dist/lib/plugins/openapi/components/ConstValue.d.ts +5 -0
  430. package/dist/lib/plugins/openapi/components/ConstValue.js +6 -0
  431. package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -0
  432. package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
  433. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
  434. package/dist/lib/plugins/openapi/components/ResponseContent.d.ts +12 -0
  435. package/dist/lib/plugins/openapi/components/ResponseContent.js +21 -0
  436. package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
  437. package/dist/lib/plugins/openapi/context.d.ts +1 -1
  438. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +1 -1
  439. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  440. package/dist/lib/plugins/openapi/graphql/gql.d.ts +2 -2
  441. package/dist/lib/plugins/openapi/graphql/gql.js +2 -3
  442. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  443. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +7 -3
  444. package/dist/lib/plugins/openapi/graphql/graphql.js +6 -2
  445. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  446. package/dist/lib/plugins/openapi/index.d.ts +5 -6
  447. package/dist/lib/plugins/openapi/index.js +56 -21
  448. package/dist/lib/plugins/openapi/index.js.map +1 -1
  449. package/dist/lib/plugins/openapi/interfaces.d.ts +8 -7
  450. package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +5 -0
  451. package/dist/lib/plugins/openapi/playground/BodyPanel.js +26 -0
  452. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -0
  453. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
  454. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
  455. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
  456. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +3 -3
  457. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -1
  458. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  459. package/dist/lib/plugins/openapi/playground/Headers.d.ts +5 -4
  460. package/dist/lib/plugins/openapi/playground/Headers.js +54 -32
  461. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  462. package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +1 -1
  463. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
  464. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
  465. package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +1 -1
  466. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -4
  467. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
  468. package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
  469. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
  470. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
  471. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  472. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
  473. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  474. package/dist/lib/plugins/openapi/playground/Playground.d.ts +5 -10
  475. package/dist/lib/plugins/openapi/playground/Playground.js +116 -94
  476. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  477. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  478. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  479. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +4 -4
  480. package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
  481. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  482. package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
  483. package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
  484. package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
  485. package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +2 -0
  486. package/dist/lib/plugins/openapi/playground/fileUtils.js +22 -0
  487. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -0
  488. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
  489. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
  490. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
  491. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
  492. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
  493. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
  494. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
  495. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
  496. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
  497. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +8 -0
  498. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +71 -0
  499. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
  500. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +10 -4
  501. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +33 -31
  502. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  503. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
  504. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
  505. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  506. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +1 -1
  507. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +1 -1
  508. package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -1
  509. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +16 -0
  510. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +10 -0
  511. package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -0
  512. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +1 -0
  513. package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -1
  514. package/dist/lib/plugins/openapi/processors/removeParameters.test.js +1 -0
  515. package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -1
  516. package/dist/lib/plugins/openapi/processors/traverse.d.ts +1 -1
  517. package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -1
  518. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.d.ts +5 -0
  519. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js +7 -0
  520. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js.map +1 -0
  521. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.d.ts +4 -0
  522. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js +10 -0
  523. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js.map +1 -0
  524. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.d.ts +5 -0
  525. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js +16 -0
  526. package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js.map +1 -0
  527. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +5 -2
  528. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  529. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +0 -3
  530. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +19 -25
  531. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  532. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +3 -1
  533. package/dist/lib/plugins/openapi/schema/SchemaView.js +25 -17
  534. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  535. package/dist/lib/plugins/openapi/schema/UnionView.d.ts +5 -0
  536. package/dist/lib/plugins/openapi/schema/UnionView.js +36 -0
  537. package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -0
  538. package/dist/lib/plugins/openapi/schema/union-helpers.d.ts +28 -0
  539. package/dist/lib/plugins/openapi/schema/union-helpers.js +72 -0
  540. package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -0
  541. package/dist/lib/plugins/openapi/schema/utils.d.ts +6 -8
  542. package/dist/lib/plugins/openapi/schema/utils.js +15 -13
  543. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  544. package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +11 -0
  545. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +89 -0
  546. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -0
  547. package/dist/lib/plugins/openapi/util/createNavigationCategory.d.ts +9 -0
  548. package/dist/lib/plugins/openapi/util/createNavigationCategory.js +25 -0
  549. package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -0
  550. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +2 -2
  551. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +45 -2
  552. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  553. package/dist/lib/plugins/openapi/util/getRoutes.js +52 -15
  554. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  555. package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
  556. package/dist/lib/plugins/redirect/index.d.ts +1 -1
  557. package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
  558. package/dist/lib/plugins/search-inkeep/index.js +35 -29
  559. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  560. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
  561. package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
  562. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  563. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +2 -2
  564. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  565. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +2 -2
  566. package/dist/lib/plugins/search-pagefind/ResultList.js +15 -5
  567. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  568. package/dist/lib/plugins/search-pagefind/get-results.js +0 -1
  569. package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
  570. package/dist/lib/shiki.d.ts +32 -0
  571. package/dist/lib/shiki.js +104 -0
  572. package/dist/lib/shiki.js.map +1 -0
  573. package/dist/lib/ui/ActionButton.js +1 -1
  574. package/dist/lib/ui/ActionButton.js.map +1 -1
  575. package/dist/lib/ui/Alert.d.ts +6 -5
  576. package/dist/lib/ui/Alert.js +12 -10
  577. package/dist/lib/ui/Alert.js.map +1 -1
  578. package/dist/lib/ui/Badge.d.ts +2 -2
  579. package/dist/lib/ui/Badge.js +1 -1
  580. package/dist/lib/ui/Badge.js.map +1 -1
  581. package/dist/lib/ui/Breadcrumb.js +1 -1
  582. package/dist/lib/ui/Breadcrumb.js.map +1 -1
  583. package/dist/lib/ui/Button.d.ts +2 -2
  584. package/dist/lib/ui/Button.js +8 -6
  585. package/dist/lib/ui/Button.js.map +1 -1
  586. package/dist/lib/ui/Callout.js +1 -1
  587. package/dist/lib/ui/Callout.js.map +1 -1
  588. package/dist/lib/ui/Card.js +1 -1
  589. package/dist/lib/ui/Carousel.js.map +1 -1
  590. package/dist/lib/ui/Checkbox.js +1 -1
  591. package/dist/lib/ui/Checkbox.js.map +1 -1
  592. package/dist/lib/ui/CodeBlock.d.ts +15 -0
  593. package/dist/lib/ui/CodeBlock.js +18 -0
  594. package/dist/lib/ui/CodeBlock.js.map +1 -0
  595. package/dist/lib/ui/Command.d.ts +2 -2
  596. package/dist/lib/ui/Command.js +3 -7
  597. package/dist/lib/ui/Command.js.map +1 -1
  598. package/dist/lib/ui/Dialog.d.ts +3 -1
  599. package/dist/lib/ui/Dialog.js +2 -2
  600. package/dist/lib/ui/Dialog.js.map +1 -1
  601. package/dist/lib/ui/DropdownMenu.js +4 -4
  602. package/dist/lib/ui/DropdownMenu.js.map +1 -1
  603. package/dist/lib/ui/EmbeddedCodeBlock.d.ts +15 -0
  604. package/dist/lib/ui/EmbeddedCodeBlock.js +18 -0
  605. package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -0
  606. package/dist/lib/ui/Form.d.ts +2 -2
  607. package/dist/lib/ui/HoverCard.js +1 -1
  608. package/dist/lib/ui/HoverCard.js.map +1 -1
  609. package/dist/lib/ui/Input.js +1 -1
  610. package/dist/lib/ui/Input.js.map +1 -1
  611. package/dist/lib/ui/Pagination.d.ts +1 -1
  612. package/dist/lib/ui/Pagination.js +1 -1
  613. package/dist/lib/ui/Pagination.js.map +1 -1
  614. package/dist/lib/ui/Popover.js +1 -1
  615. package/dist/lib/ui/Popover.js.map +1 -1
  616. package/dist/lib/ui/RadioGroup.js +1 -1
  617. package/dist/lib/ui/RadioGroup.js.map +1 -1
  618. package/dist/lib/ui/ReactComponentDoc.d.ts +20 -0
  619. package/dist/lib/ui/ReactComponentDoc.js +10 -0
  620. package/dist/lib/ui/ReactComponentDoc.js.map +1 -0
  621. package/dist/lib/ui/Secret.d.ts +12 -0
  622. package/dist/lib/ui/Secret.js +23 -0
  623. package/dist/lib/ui/Secret.js.map +1 -0
  624. package/dist/lib/ui/Select.js +2 -2
  625. package/dist/lib/ui/Select.js.map +1 -1
  626. package/dist/lib/ui/Slider.js +1 -1
  627. package/dist/lib/ui/Slider.js.map +1 -1
  628. package/dist/lib/ui/Switch.js +1 -1
  629. package/dist/lib/ui/Switch.js.map +1 -1
  630. package/dist/lib/ui/SyntaxHighlight.d.ts +12 -15
  631. package/dist/lib/ui/SyntaxHighlight.js +13 -60
  632. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  633. package/dist/lib/ui/Tabs.js +2 -2
  634. package/dist/lib/ui/Tabs.js.map +1 -1
  635. package/dist/lib/ui/Textarea.js +1 -1
  636. package/dist/lib/ui/Textarea.js.map +1 -1
  637. package/dist/lib/ui/Toggle.js +1 -1
  638. package/dist/lib/ui/Toggle.js.map +1 -1
  639. package/dist/lib/ui/ToggleGroup.d.ts +1 -1
  640. package/dist/lib/ui/Tooltip.d.ts +2 -1
  641. package/dist/lib/ui/Tooltip.js +2 -1
  642. package/dist/lib/ui/Tooltip.js.map +1 -1
  643. package/dist/lib/ui/Value.d.ts +5 -0
  644. package/dist/lib/ui/Value.js +13 -0
  645. package/dist/lib/ui/Value.js.map +1 -0
  646. package/dist/lib/util/MdxComponents.d.ts +18 -4
  647. package/dist/lib/util/MdxComponents.js +15 -12
  648. package/dist/lib/util/MdxComponents.js.map +1 -1
  649. package/dist/lib/util/cn.js.map +1 -1
  650. package/dist/lib/util/createVariantComponent.d.ts +2 -2
  651. package/dist/lib/util/createVariantComponent.js.map +1 -1
  652. package/dist/lib/util/ensureArray.d.ts +1 -0
  653. package/dist/lib/util/ensureArray.js +2 -0
  654. package/dist/lib/util/ensureArray.js.map +1 -0
  655. package/dist/lib/util/groupBy.js +1 -0
  656. package/dist/lib/util/groupBy.js.map +1 -1
  657. package/dist/lib/util/humanFileSize.d.ts +6 -0
  658. package/dist/lib/util/humanFileSize.js +14 -0
  659. package/dist/lib/util/humanFileSize.js.map +1 -0
  660. package/dist/lib/util/humanFileSize.test.d.ts +1 -0
  661. package/dist/lib/util/humanFileSize.test.js +22 -0
  662. package/dist/lib/util/humanFileSize.test.js.map +1 -0
  663. package/dist/lib/util/invariant.d.ts +6 -5
  664. package/dist/lib/util/invariant.js +4 -2
  665. package/dist/lib/util/invariant.js.map +1 -1
  666. package/dist/lib/util/os.d.ts +2 -0
  667. package/dist/lib/util/os.js +21 -0
  668. package/dist/lib/util/os.js.map +1 -0
  669. package/dist/lib/util/pastellize.js +2 -2
  670. package/dist/lib/util/pastellize.js.map +1 -1
  671. package/dist/lib/util/traverse.d.ts +2 -1
  672. package/dist/lib/util/traverse.js +31 -5
  673. package/dist/lib/util/traverse.js.map +1 -1
  674. package/dist/lib/util/url.d.ts +4 -0
  675. package/dist/lib/util/url.js +13 -0
  676. package/dist/lib/util/url.js.map +1 -0
  677. package/dist/lib/util/url.test.d.ts +1 -0
  678. package/dist/lib/util/url.test.js +26 -0
  679. package/dist/lib/util/url.test.js.map +1 -0
  680. package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
  681. package/dist/lib/util/useCopyToClipboard.js +11 -0
  682. package/dist/lib/util/useCopyToClipboard.js.map +1 -0
  683. package/dist/lib/util/useExposedProps.d.ts +8 -1
  684. package/dist/lib/util/useExposedProps.js.map +1 -1
  685. package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -1
  686. package/dist/lib/util/useScrollToAnchor.js +5 -3
  687. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  688. package/dist/ts.js +3 -3
  689. package/dist/ts.js.map +1 -1
  690. package/dist/vite/api/SchemaManager.d.ts +36 -0
  691. package/dist/vite/api/SchemaManager.js +145 -0
  692. package/dist/vite/api/SchemaManager.js.map +1 -0
  693. package/dist/vite/api/SchemaManager.test.d.ts +1 -0
  694. package/dist/vite/api/SchemaManager.test.js +106 -0
  695. package/dist/vite/api/SchemaManager.test.js.map +1 -0
  696. package/dist/vite/api/schema-codegen.js +71 -22
  697. package/dist/vite/api/schema-codegen.js.map +1 -1
  698. package/dist/vite/api/schema-codegen.test.js +156 -1
  699. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  700. package/dist/vite/build.js +22 -7
  701. package/dist/vite/build.js.map +1 -1
  702. package/dist/vite/config.d.ts +2 -9
  703. package/dist/vite/config.js +59 -99
  704. package/dist/vite/config.js.map +1 -1
  705. package/dist/vite/config.test.js +1 -1
  706. package/dist/vite/config.test.js.map +1 -1
  707. package/dist/vite/css/plugin.d.ts +1 -2
  708. package/dist/vite/css/plugin.js +14 -2
  709. package/dist/vite/css/plugin.js.map +1 -1
  710. package/dist/vite/dev-server.d.ts +0 -1
  711. package/dist/vite/dev-server.js +25 -16
  712. package/dist/vite/dev-server.js.map +1 -1
  713. package/dist/vite/error-handler.d.ts +2 -2
  714. package/dist/vite/error-handler.js.map +1 -1
  715. package/dist/vite/html.d.ts +7 -3
  716. package/dist/vite/html.js +15 -9
  717. package/dist/vite/html.js.map +1 -1
  718. package/dist/vite/mdx/remark-inject-filepath.d.ts +3 -0
  719. package/dist/vite/mdx/remark-inject-filepath.js +6 -0
  720. package/dist/vite/mdx/remark-inject-filepath.js.map +1 -0
  721. package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
  722. package/dist/vite/mdx/remark-last-modified.js +28 -0
  723. package/dist/vite/mdx/remark-last-modified.js.map +1 -0
  724. package/dist/vite/mdx/remark-link-rewrite.d.ts +2 -0
  725. package/dist/vite/mdx/remark-link-rewrite.js +20 -0
  726. package/dist/vite/mdx/remark-link-rewrite.js.map +1 -0
  727. package/dist/vite/mdx/remark-normalize-image-url.d.ts +2 -0
  728. package/dist/vite/mdx/remark-normalize-image-url.js +12 -0
  729. package/dist/vite/mdx/remark-normalize-image-url.js.map +1 -0
  730. package/dist/vite/mdx/remark-static-generation.d.ts +3 -0
  731. package/dist/vite/mdx/remark-static-generation.js +125 -0
  732. package/dist/vite/mdx/remark-static-generation.js.map +1 -0
  733. package/dist/vite/mdx/utils.d.ts +2 -0
  734. package/dist/vite/mdx/utils.js +31 -0
  735. package/dist/vite/mdx/utils.js.map +1 -0
  736. package/dist/vite/output.d.ts +1 -1
  737. package/dist/vite/output.js +1 -1
  738. package/dist/vite/output.js.map +1 -1
  739. package/dist/vite/plugin-api-keys.d.ts +2 -3
  740. package/dist/vite/plugin-api-keys.js +10 -4
  741. package/dist/vite/plugin-api-keys.js.map +1 -1
  742. package/dist/vite/plugin-api.d.ts +1 -2
  743. package/dist/vite/plugin-api.js +47 -124
  744. package/dist/vite/plugin-api.js.map +1 -1
  745. package/dist/vite/plugin-auth.d.ts +2 -3
  746. package/dist/vite/plugin-auth.js +4 -3
  747. package/dist/vite/plugin-auth.js.map +1 -1
  748. package/dist/vite/plugin-component.d.ts +2 -3
  749. package/dist/vite/plugin-component.js +3 -2
  750. package/dist/vite/plugin-component.js.map +1 -1
  751. package/dist/vite/plugin-config-reload.d.ts +2 -3
  752. package/dist/vite/plugin-config-reload.js +23 -22
  753. package/dist/vite/plugin-config-reload.js.map +1 -1
  754. package/dist/vite/plugin-config.d.ts +2 -3
  755. package/dist/vite/plugin-config.js +6 -4
  756. package/dist/vite/plugin-config.js.map +1 -1
  757. package/dist/vite/plugin-custom-pages.d.ts +2 -3
  758. package/dist/vite/plugin-custom-pages.js +6 -5
  759. package/dist/vite/plugin-custom-pages.js.map +1 -1
  760. package/dist/vite/plugin-docs.d.ts +1 -2
  761. package/dist/vite/plugin-docs.js +75 -63
  762. package/dist/vite/plugin-docs.js.map +1 -1
  763. package/dist/vite/plugin-frontmatter.d.ts +1 -2
  764. package/dist/vite/plugin-frontmatter.js +10 -5
  765. package/dist/vite/plugin-frontmatter.js.map +1 -1
  766. package/dist/vite/plugin-mdx.d.ts +2 -3
  767. package/dist/vite/plugin-mdx.js +32 -76
  768. package/dist/vite/plugin-mdx.js.map +1 -1
  769. package/dist/vite/plugin-metadata.d.ts +1 -1
  770. package/dist/vite/plugin-navigation.d.ts +4 -0
  771. package/dist/vite/plugin-navigation.js +63 -0
  772. package/dist/vite/plugin-navigation.js.map +1 -0
  773. package/dist/vite/plugin-redirect.d.ts +2 -3
  774. package/dist/vite/plugin-redirect.js +4 -3
  775. package/dist/vite/plugin-redirect.js.map +1 -1
  776. package/dist/vite/plugin-search.d.ts +2 -3
  777. package/dist/vite/plugin-search.js +4 -3
  778. package/dist/vite/plugin-search.js.map +1 -1
  779. package/dist/vite/plugin-shiki-register.d.ts +2 -0
  780. package/dist/vite/plugin-shiki-register.js +39 -0
  781. package/dist/vite/plugin-shiki-register.js.map +1 -0
  782. package/dist/vite/plugin-theme.d.ts +8 -0
  783. package/dist/vite/plugin-theme.js +274 -0
  784. package/dist/vite/plugin-theme.js.map +1 -0
  785. package/dist/vite/plugin-theme.test.d.ts +1 -0
  786. package/dist/vite/plugin-theme.test.js +314 -0
  787. package/dist/vite/plugin-theme.test.js.map +1 -0
  788. package/dist/vite/plugin.d.ts +2 -3
  789. package/dist/vite/plugin.js +24 -23
  790. package/dist/vite/plugin.js.map +1 -1
  791. package/dist/vite/prerender/FileWritingResponse.js +5 -3
  792. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  793. package/dist/vite/prerender/InMemoryResponse.js +3 -1
  794. package/dist/vite/prerender/InMemoryResponse.js.map +1 -1
  795. package/dist/vite/prerender/prerender.js +1 -1
  796. package/dist/vite/prerender/prerender.js.map +1 -1
  797. package/dist/vite/prerender/worker.d.ts +1 -1
  798. package/dist/vite/prerender/worker.js +5 -1
  799. package/dist/vite/prerender/worker.js.map +1 -1
  800. package/dist/vite/reporter.js +2 -2
  801. package/dist/vite/reporter.js.map +1 -1
  802. package/dist/vite/shadcn-registry.d.ts +20 -0
  803. package/dist/vite/shadcn-registry.js +29 -0
  804. package/dist/vite/shadcn-registry.js.map +1 -0
  805. package/dist/vite/sitemap.d.ts +1 -1
  806. package/dist/vite/sitemap.js +14 -13
  807. package/dist/vite/sitemap.js.map +1 -1
  808. package/dist/zuplo/enrich-with-zuplo-mcp.d.ts +4 -0
  809. package/dist/zuplo/enrich-with-zuplo-mcp.js +117 -0
  810. package/dist/zuplo/enrich-with-zuplo-mcp.js.map +1 -0
  811. package/dist/zuplo/enrich-with-zuplo.d.ts +1 -0
  812. package/dist/zuplo/enrich-with-zuplo.js +4 -4
  813. package/dist/zuplo/enrich-with-zuplo.js.map +1 -1
  814. package/dist/zuplo/policy-types.js +0 -1
  815. package/dist/zuplo/policy-types.js.map +1 -1
  816. package/dist/zuplo/with-zuplo-processors.js +3 -1
  817. package/dist/zuplo/with-zuplo-processors.js.map +1 -1
  818. package/dist/zuplo/with-zuplo.d.ts +2 -2
  819. package/dist/zuplo/with-zuplo.js +1 -1
  820. package/dist/zuplo/with-zuplo.js.map +1 -1
  821. package/lib/Button-DTDRi4CT.js +51 -0
  822. package/lib/Button-DTDRi4CT.js.map +1 -0
  823. package/lib/Card-hTy9PAnh.js +61 -0
  824. package/lib/Card-hTy9PAnh.js.map +1 -0
  825. package/lib/CategoryHeading-BGCNu3VK.js +17 -0
  826. package/lib/CategoryHeading-BGCNu3VK.js.map +1 -0
  827. package/lib/ClientOnly-E7hGysn1.js.map +1 -1
  828. package/lib/CodeBlock-i0BM_QFf.js +176 -0
  829. package/lib/CodeBlock-i0BM_QFf.js.map +1 -0
  830. package/lib/Command-TEBTONf1.js +134 -0
  831. package/lib/Command-TEBTONf1.js.map +1 -0
  832. package/lib/Dialog-VIMic7xI.js +114 -0
  833. package/lib/Dialog-VIMic7xI.js.map +1 -0
  834. package/lib/Drawer-DM9wJUC6.js +1133 -0
  835. package/lib/Drawer-DM9wJUC6.js.map +1 -0
  836. package/lib/ErrorAlert-Diu_w5Po.js +15522 -0
  837. package/lib/ErrorAlert-Diu_w5Po.js.map +1 -0
  838. package/lib/MdxPage-CDs_vtjC.js +111 -0
  839. package/lib/MdxPage-CDs_vtjC.js.map +1 -0
  840. package/lib/OAuthErrorPage-BbI9XJWR.js +150 -0
  841. package/lib/OAuthErrorPage-BbI9XJWR.js.map +1 -0
  842. package/lib/OasProvider-D3Cjaaxr.js +36 -0
  843. package/lib/OasProvider-D3Cjaaxr.js.map +1 -0
  844. package/lib/OperationList-BH4cFU-0.js +5454 -0
  845. package/lib/OperationList-BH4cFU-0.js.map +1 -0
  846. package/lib/Pagination-BKphudjx.js +37 -0
  847. package/lib/Pagination-BKphudjx.js.map +1 -0
  848. package/lib/RouteGuard-nFlgfJqk.js +56 -0
  849. package/lib/RouteGuard-nFlgfJqk.js.map +1 -0
  850. package/lib/RouterError-CnS5hYUh.js +41 -0
  851. package/lib/RouterError-CnS5hYUh.js.map +1 -0
  852. package/lib/SchemaList-BcJyi2sR.js +150 -0
  853. package/lib/SchemaList-BcJyi2sR.js.map +1 -0
  854. package/lib/SchemaView-DnTxmN15.js +458 -0
  855. package/lib/SchemaView-DnTxmN15.js.map +1 -0
  856. package/lib/Select-BPQp7Yqx.js +273 -0
  857. package/lib/Select-BPQp7Yqx.js.map +1 -0
  858. package/lib/SignUp-tBtnwuXL.js +56 -0
  859. package/lib/SignUp-tBtnwuXL.js.map +1 -0
  860. package/lib/Spinner-Cf6E803I.js +7 -0
  861. package/lib/Spinner-Cf6E803I.js.map +1 -0
  862. package/lib/SyntaxHighlight-Cqh6cwC3.js +10307 -0
  863. package/lib/SyntaxHighlight-Cqh6cwC3.js.map +1 -0
  864. package/lib/Toc-Zzozy3eB.js +92 -0
  865. package/lib/Toc-Zzozy3eB.js.map +1 -0
  866. package/lib/ZudokuContext-3cqbu21w.js +1285 -0
  867. package/lib/ZudokuContext-3cqbu21w.js.map +1 -0
  868. package/lib/chunk-QMGIS6GS-DqecZ6nq.js +9204 -0
  869. package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +1 -0
  870. package/lib/circular-CokAagii.js +14934 -0
  871. package/lib/circular-CokAagii.js.map +1 -0
  872. package/lib/clsx-OuTLNxxd.js +17 -0
  873. package/lib/clsx-OuTLNxxd.js.map +1 -0
  874. package/lib/cn-dYga0KKN.js +2731 -0
  875. package/lib/cn-dYga0KKN.js.map +1 -0
  876. package/lib/createServer-DW4hIUUB.js +12499 -0
  877. package/lib/createServer-DW4hIUUB.js.map +1 -0
  878. package/lib/csharp-rrJEDRrV.js +53 -0
  879. package/lib/csharp-rrJEDRrV.js.map +1 -0
  880. package/lib/css-Dpk9bCql.js +54 -0
  881. package/lib/css-Dpk9bCql.js.map +1 -0
  882. package/lib/errors-CQLQ5016.js +45 -0
  883. package/lib/errors-CQLQ5016.js.map +1 -0
  884. package/lib/go-D8SJIQ0Z.js +25 -0
  885. package/lib/go-D8SJIQ0Z.js.map +1 -0
  886. package/lib/graphql-aeVKJNa2.js +25 -0
  887. package/lib/graphql-aeVKJNa2.js.map +1 -0
  888. package/lib/hook-ChlxzJwv.js +247 -0
  889. package/lib/hook-ChlxzJwv.js.map +1 -0
  890. package/lib/html-D_7om-nA.js +33 -0
  891. package/lib/html-D_7om-nA.js.map +1 -0
  892. package/lib/index-7FEjMkZ_.js +1058 -0
  893. package/lib/index-7FEjMkZ_.js.map +1 -0
  894. package/lib/index-CF3Ls1wd.js +2094 -0
  895. package/lib/index-CF3Ls1wd.js.map +1 -0
  896. package/lib/index-CrcNWbel.js +316 -0
  897. package/lib/index-CrcNWbel.js.map +1 -0
  898. package/lib/index-DI5SPFK9.js +36 -0
  899. package/lib/index-DI5SPFK9.js.map +1 -0
  900. package/lib/index-QwGs6inR.js +3397 -0
  901. package/lib/index-QwGs6inR.js.map +1 -0
  902. package/lib/index-nGbmHh_A.js +4827 -0
  903. package/lib/index-nGbmHh_A.js.map +1 -0
  904. package/lib/index.esm-BnYHxCYC.js +683 -0
  905. package/lib/index.esm-BnYHxCYC.js.map +1 -0
  906. package/lib/index.esm-CdzlRw50.js +1254 -0
  907. package/lib/index.esm-CdzlRw50.js.map +1 -0
  908. package/lib/invariant-Bm-FVUQE.js +44 -0
  909. package/lib/invariant-Bm-FVUQE.js.map +1 -0
  910. package/lib/java-DUh-EL8n.js +53 -0
  911. package/lib/java-DUh-EL8n.js.map +1 -0
  912. package/lib/javascript-CrY8dcGu.js +10 -0
  913. package/lib/javascript-CrY8dcGu.js.map +1 -0
  914. package/lib/json-DLK2_sdf.js +25 -0
  915. package/lib/json-DLK2_sdf.js.map +1 -0
  916. package/lib/jsx-runtime-DywqP_6a.js +285 -0
  917. package/lib/jsx-runtime-DywqP_6a.js.map +1 -0
  918. package/lib/kotlin-rJMOGl7D.js +37 -0
  919. package/lib/kotlin-rJMOGl7D.js.map +1 -0
  920. package/lib/markdown-BD9bIU5J.js +25 -0
  921. package/lib/markdown-BD9bIU5J.js.map +1 -0
  922. package/lib/mdx-G25UCvf3.js +32 -0
  923. package/lib/mdx-G25UCvf3.js.map +1 -0
  924. package/lib/mutation-DvBlWyBr.js +196 -0
  925. package/lib/mutation-DvBlWyBr.js.map +1 -0
  926. package/lib/objectivec-DDpj0aWX.js +32 -0
  927. package/lib/objectivec-DDpj0aWX.js.map +1 -0
  928. package/lib/php-BeG18bSy.js +25 -0
  929. package/lib/php-BeG18bSy.js.map +1 -0
  930. package/lib/processors/removeExtensions.js.map +1 -1
  931. package/lib/processors/removeParameters.js +27 -28
  932. package/lib/processors/removeParameters.js.map +1 -1
  933. package/lib/processors/removePaths.js +17 -17
  934. package/lib/processors/removePaths.js.map +1 -1
  935. package/lib/processors/traverse.js +9 -7
  936. package/lib/processors/traverse.js.map +1 -1
  937. package/lib/python-BaF2byD-.js +32 -0
  938. package/lib/python-BaF2byD-.js.map +1 -0
  939. package/lib/react-CQvDN20M.js +24 -0
  940. package/lib/react-CQvDN20M.js.map +1 -0
  941. package/lib/ruby-CmxRVHMR.js +25 -0
  942. package/lib/ruby-CmxRVHMR.js.map +1 -0
  943. package/lib/rust-IfSC62c5.js +25 -0
  944. package/lib/rust-IfSC62c5.js.map +1 -0
  945. package/lib/shell-BFu0M6m4.js +25 -0
  946. package/lib/shell-BFu0M6m4.js.map +1 -0
  947. package/lib/swift-DckbsN4v.js +25 -0
  948. package/lib/swift-DckbsN4v.js.map +1 -0
  949. package/lib/toml-BJsCc8TC.js +32 -0
  950. package/lib/toml-BJsCc8TC.js.map +1 -0
  951. package/lib/typescript-7qOVMjOC.js +32 -0
  952. package/lib/typescript-7qOVMjOC.js.map +1 -0
  953. package/lib/ui/Accordion.js +2 -2
  954. package/lib/ui/Accordion.js.map +1 -1
  955. package/lib/ui/ActionButton.js +11 -11
  956. package/lib/ui/ActionButton.js.map +1 -1
  957. package/lib/ui/Alert.js +55 -39
  958. package/lib/ui/Alert.js.map +1 -1
  959. package/lib/ui/AlertDialog.js +2 -2
  960. package/lib/ui/AlertDialog.js.map +1 -1
  961. package/lib/ui/Badge.js +4 -4
  962. package/lib/ui/Badge.js.map +1 -1
  963. package/lib/ui/Breadcrumb.js +24 -23
  964. package/lib/ui/Breadcrumb.js.map +1 -1
  965. package/lib/ui/Button.js +20 -18
  966. package/lib/ui/Button.js.map +1 -1
  967. package/lib/ui/Callout.js +12 -11
  968. package/lib/ui/Callout.js.map +1 -1
  969. package/lib/ui/Card.js +9 -9
  970. package/lib/ui/Card.js.map +1 -1
  971. package/lib/ui/Carousel.js +176 -176
  972. package/lib/ui/Carousel.js.map +1 -1
  973. package/lib/ui/Checkbox.js +8 -8
  974. package/lib/ui/Checkbox.js.map +1 -1
  975. package/lib/ui/CodeBlock.js +10 -0
  976. package/lib/ui/CodeBlock.js.map +1 -0
  977. package/lib/ui/Command.js +67 -73
  978. package/lib/ui/Command.js.map +1 -1
  979. package/lib/ui/Dialog.js +74 -59
  980. package/lib/ui/Dialog.js.map +1 -1
  981. package/lib/ui/Drawer.js +3 -3
  982. package/lib/ui/DropdownMenu.js +35 -35
  983. package/lib/ui/DropdownMenu.js.map +1 -1
  984. package/lib/ui/EmbeddedCodeBlock.js +80 -0
  985. package/lib/ui/EmbeddedCodeBlock.js.map +1 -0
  986. package/lib/ui/Form.js +3 -3
  987. package/lib/ui/Form.js.map +1 -1
  988. package/lib/ui/HoverCard.js +6 -6
  989. package/lib/ui/HoverCard.js.map +1 -1
  990. package/lib/ui/Input.js +3 -3
  991. package/lib/ui/Input.js.map +1 -1
  992. package/lib/ui/Label.js +3 -3
  993. package/lib/ui/Label.js.map +1 -1
  994. package/lib/ui/Pagination.js +29 -30
  995. package/lib/ui/Pagination.js.map +1 -1
  996. package/lib/ui/Popover.js +3 -3
  997. package/lib/ui/Popover.js.map +1 -1
  998. package/lib/ui/Progress.js +2 -2
  999. package/lib/ui/Progress.js.map +1 -1
  1000. package/lib/ui/RadioGroup.js +11 -11
  1001. package/lib/ui/RadioGroup.js.map +1 -1
  1002. package/lib/ui/ReactComponentDoc.js +28 -0
  1003. package/lib/ui/ReactComponentDoc.js.map +1 -0
  1004. package/lib/ui/ScrollArea.js +2 -2
  1005. package/lib/ui/ScrollArea.js.map +1 -1
  1006. package/lib/ui/Secret.js +96 -0
  1007. package/lib/ui/Secret.js.map +1 -0
  1008. package/lib/ui/Select.js +32 -32
  1009. package/lib/ui/Select.js.map +1 -1
  1010. package/lib/ui/Skeleton.js +2 -2
  1011. package/lib/ui/Skeleton.js.map +1 -1
  1012. package/lib/ui/Slider.js +6 -6
  1013. package/lib/ui/Slider.js.map +1 -1
  1014. package/lib/ui/Stepper.js +1 -1
  1015. package/lib/ui/Stepper.js.map +1 -1
  1016. package/lib/ui/Switch.js +6 -6
  1017. package/lib/ui/Switch.js.map +1 -1
  1018. package/lib/ui/SyntaxHighlight.js +6 -6
  1019. package/lib/ui/Tabs.js +17 -17
  1020. package/lib/ui/Tabs.js.map +1 -1
  1021. package/lib/ui/Textarea.js +6 -6
  1022. package/lib/ui/Textarea.js.map +1 -1
  1023. package/lib/ui/Toggle.js +8 -8
  1024. package/lib/ui/Toggle.js.map +1 -1
  1025. package/lib/ui/ToggleGroup.js +2 -2
  1026. package/lib/ui/ToggleGroup.js.map +1 -1
  1027. package/lib/ui/Tooltip.js +15 -8
  1028. package/lib/ui/Tooltip.js.map +1 -1
  1029. package/lib/ui/Value.js +39 -0
  1030. package/lib/ui/Value.js.map +1 -0
  1031. package/lib/ui/util.js +1 -1
  1032. package/lib/useCopyToClipboard-B_085nfO.js +14 -0
  1033. package/lib/useCopyToClipboard-B_085nfO.js.map +1 -0
  1034. package/lib/useExposedProps-BH9aq4MD.js +113 -0
  1035. package/lib/useExposedProps-BH9aq4MD.js.map +1 -0
  1036. package/lib/useLatest-hmRS46UF.js.map +1 -1
  1037. package/lib/xml-DAaTIkBX.js +25 -0
  1038. package/lib/xml-DAaTIkBX.js.map +1 -0
  1039. package/lib/yaml-DUi-dbfu.js +32 -0
  1040. package/lib/yaml-DUi-dbfu.js.map +1 -0
  1041. package/lib/zudoku.__internal.js +2981 -0
  1042. package/lib/zudoku.__internal.js.map +1 -0
  1043. package/lib/zudoku.auth-auth0.js +29 -32
  1044. package/lib/zudoku.auth-auth0.js.map +1 -1
  1045. package/lib/zudoku.auth-azureb2c.js +137 -0
  1046. package/lib/zudoku.auth-azureb2c.js.map +1 -0
  1047. package/lib/zudoku.auth-clerk.js +104 -99
  1048. package/lib/zudoku.auth-clerk.js.map +1 -1
  1049. package/lib/zudoku.auth-openid.js +557 -544
  1050. package/lib/zudoku.auth-openid.js.map +1 -1
  1051. package/lib/zudoku.auth-supabase.js +98 -0
  1052. package/lib/zudoku.auth-supabase.js.map +1 -0
  1053. package/lib/zudoku.components.js +22 -28
  1054. package/lib/zudoku.hooks.js +21 -13
  1055. package/lib/zudoku.hooks.js.map +1 -1
  1056. package/lib/zudoku.icons.js +1 -1
  1057. package/lib/zudoku.icons.js.map +1 -1
  1058. package/lib/zudoku.plugin-api-catalog.js +76 -68
  1059. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  1060. package/lib/zudoku.plugin-api-keys.js +717 -192
  1061. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  1062. package/lib/zudoku.plugin-custom-pages.js +15 -18
  1063. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  1064. package/lib/zudoku.plugin-markdown.js +20 -73
  1065. package/lib/zudoku.plugin-markdown.js.map +1 -1
  1066. package/lib/zudoku.plugin-openapi.js +8 -6
  1067. package/lib/zudoku.plugin-openapi.js.map +1 -1
  1068. package/lib/zudoku.plugin-redirect.js +3 -3
  1069. package/lib/zudoku.plugin-redirect.js.map +1 -1
  1070. package/lib/zudoku.plugin-search-inkeep.js +55 -59
  1071. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  1072. package/lib/zudoku.plugin-search-pagefind.js +216 -124
  1073. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  1074. package/lib/zudoku.plugins.js +7 -6
  1075. package/lib/zudoku.plugins.js.map +1 -1
  1076. package/lib/zudoku.router.js +123 -0
  1077. package/lib/zudoku.router.js.map +1 -0
  1078. package/package.json +128 -101
  1079. package/src/app/ZuploBuildConfig.ts +33 -0
  1080. package/src/app/defaultTheme.css +73 -0
  1081. package/src/app/demo.html +1 -1
  1082. package/src/app/demo.tsx +25 -7
  1083. package/src/app/entry.client.tsx +45 -5
  1084. package/src/app/entry.server.tsx +4 -6
  1085. package/src/app/env.ts +43 -0
  1086. package/src/app/font.geist.css +73 -0
  1087. package/src/app/main.css +133 -151
  1088. package/src/app/main.tsx +56 -62
  1089. package/src/app/standalone.tsx +14 -8
  1090. package/src/lib/MissingIcon.tsx +1 -1
  1091. package/src/lib/assets/language-icons/csharp.tsx +35 -0
  1092. package/src/lib/assets/language-icons/css.tsx +36 -0
  1093. package/src/lib/assets/language-icons/go.tsx +19 -0
  1094. package/src/lib/assets/language-icons/graphql.tsx +19 -0
  1095. package/src/lib/assets/language-icons/html.tsx +24 -0
  1096. package/src/lib/assets/language-icons/java.tsx +35 -0
  1097. package/src/lib/assets/language-icons/javascript.tsx +11 -0
  1098. package/src/lib/assets/language-icons/json.tsx +19 -0
  1099. package/src/lib/assets/language-icons/kotlin.tsx +30 -0
  1100. package/src/lib/assets/language-icons/markdown.tsx +19 -0
  1101. package/src/lib/assets/language-icons/mdx.tsx +23 -0
  1102. package/src/lib/assets/language-icons/objectivec.tsx +23 -0
  1103. package/src/lib/assets/language-icons/php.tsx +19 -0
  1104. package/src/lib/assets/language-icons/python.tsx +23 -0
  1105. package/src/lib/assets/language-icons/react.tsx +21 -0
  1106. package/src/lib/assets/language-icons/ruby.tsx +19 -0
  1107. package/src/lib/assets/language-icons/rust.tsx +19 -0
  1108. package/src/lib/assets/language-icons/shell.tsx +19 -0
  1109. package/src/lib/assets/language-icons/swift.tsx +19 -0
  1110. package/src/lib/assets/language-icons/toml.tsx +23 -0
  1111. package/src/lib/assets/language-icons/typescript.tsx +23 -0
  1112. package/src/lib/assets/language-icons/xml.tsx +19 -0
  1113. package/src/lib/assets/language-icons/yaml.tsx +23 -0
  1114. package/src/lib/auth/issuer.test.ts +121 -0
  1115. package/src/lib/auth/issuer.ts +41 -0
  1116. package/src/lib/authentication/AuthenticationPlugin.tsx +2 -2
  1117. package/src/lib/authentication/authentication.ts +6 -9
  1118. package/src/lib/authentication/components/CallbackHandler.tsx +28 -11
  1119. package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
  1120. package/src/lib/authentication/components/SignIn.tsx +27 -1
  1121. package/src/lib/authentication/components/SignOut.tsx +1 -1
  1122. package/src/lib/authentication/components/SignUp.tsx +35 -1
  1123. package/src/lib/authentication/errors.ts +27 -13
  1124. package/src/lib/authentication/hook.ts +2 -0
  1125. package/src/lib/authentication/providers/auth0.tsx +12 -6
  1126. package/src/lib/authentication/providers/azureb2c.tsx +201 -0
  1127. package/src/lib/authentication/providers/clerk.tsx +91 -69
  1128. package/src/lib/authentication/providers/openid.tsx +121 -57
  1129. package/src/lib/authentication/providers/supabase.tsx +14 -20
  1130. package/src/lib/authentication/state.ts +37 -7
  1131. package/src/lib/authentication/use-broadcast/LICENSE.md +12 -3
  1132. package/src/lib/authentication/use-broadcast/shared.ts +4 -4
  1133. package/src/lib/authentication/use-broadcast/useBroadcast.ts +2 -2
  1134. package/src/lib/components/AnchorLink.tsx +1 -1
  1135. package/src/lib/components/Autocomplete.tsx +4 -3
  1136. package/src/lib/components/Banner.tsx +3 -4
  1137. package/src/lib/components/Bootstrap.tsx +1 -0
  1138. package/src/lib/components/BuildCheck.tsx +35 -9
  1139. package/src/lib/components/CategoryHeading.tsx +4 -1
  1140. package/src/lib/components/ErrorPage.tsx +3 -3
  1141. package/src/lib/components/Footer.tsx +8 -11
  1142. package/src/lib/components/Framed.tsx +51 -0
  1143. package/src/lib/components/Header.tsx +46 -43
  1144. package/src/lib/components/Heading.tsx +19 -12
  1145. package/src/lib/components/InlineCode.tsx +1 -1
  1146. package/src/lib/components/LanguageIcon.tsx +136 -0
  1147. package/src/lib/components/Layout.tsx +7 -29
  1148. package/src/lib/components/Main.tsx +15 -14
  1149. package/src/lib/components/Markdown.tsx +43 -27
  1150. package/src/lib/components/Meta.tsx +45 -0
  1151. package/src/lib/components/MobileTopNavigation.tsx +72 -16
  1152. package/src/lib/components/NotFoundPage.tsx +6 -5
  1153. package/src/lib/components/PageProgress.tsx +28 -0
  1154. package/src/lib/components/Pagination.tsx +6 -11
  1155. package/src/lib/components/PathRenderer.tsx +2 -2
  1156. package/src/lib/components/Search.tsx +3 -3
  1157. package/src/lib/components/Slot.test.tsx +465 -0
  1158. package/src/lib/components/Slot.tsx +64 -0
  1159. package/src/lib/components/StatusPage.tsx +5 -0
  1160. package/src/lib/components/TopNavigation.tsx +81 -86
  1161. package/src/lib/components/Typography.tsx +14 -0
  1162. package/src/lib/components/Zudoku.tsx +11 -11
  1163. package/src/lib/components/context/ComponentsContext.tsx +2 -2
  1164. package/src/lib/components/context/RouterEventsEmitter.tsx +1 -1
  1165. package/src/lib/components/context/SlotProvider.tsx +149 -0
  1166. package/src/lib/components/context/ViewportAnchorContext.tsx +10 -17
  1167. package/src/lib/components/context/ZudokuContext.ts +67 -43
  1168. package/src/lib/components/context/ZudokuProvider.tsx +3 -2
  1169. package/src/lib/components/index.ts +18 -28
  1170. package/src/lib/components/navigation/Navigation.tsx +50 -0
  1171. package/src/lib/components/navigation/NavigationBadge.tsx +48 -0
  1172. package/src/lib/components/navigation/NavigationCategory.tsx +153 -0
  1173. package/src/lib/components/navigation/NavigationItem.tsx +161 -0
  1174. package/src/lib/components/navigation/NavigationWrapper.tsx +49 -0
  1175. package/src/lib/components/navigation/PoweredByZudoku.tsx +7 -2
  1176. package/src/lib/components/navigation/Toc.tsx +7 -7
  1177. package/src/lib/components/navigation/ZudokuLogo.tsx +1 -1
  1178. package/src/lib/components/navigation/utils.ts +82 -42
  1179. package/src/lib/core/RouteGuard.tsx +13 -13
  1180. package/src/lib/core/ZudokuContext.ts +96 -30
  1181. package/src/lib/core/__internal.tsx +30 -0
  1182. package/src/lib/core/plugins.ts +13 -4
  1183. package/src/lib/core/router.ts +1 -0
  1184. package/src/lib/errors/ErrorAlert.tsx +8 -17
  1185. package/src/lib/errors/TopLevelError.tsx +2 -4
  1186. package/src/lib/hooks/index.ts +11 -0
  1187. package/src/lib/hooks/useEvent.test.tsx +9 -7
  1188. package/src/lib/hooks/useHotkey.ts +70 -0
  1189. package/src/lib/oas/graphql/circular.ts +28 -20
  1190. package/src/lib/oas/graphql/index.ts +20 -3
  1191. package/src/lib/oas/parser/dereference/index.ts +2 -1
  1192. package/src/lib/oas/parser/dereference/resolveRef.ts +4 -4
  1193. package/src/lib/oas/parser/index.ts +9 -3
  1194. package/src/lib/oas/parser/upgrade/index.ts +100 -29
  1195. package/src/lib/plugins/api-catalog/Catalog.tsx +9 -2
  1196. package/src/lib/plugins/api-catalog/index.tsx +19 -19
  1197. package/src/lib/plugins/api-keys/CreateApiKey.tsx +70 -44
  1198. package/src/lib/plugins/api-keys/CreateApiKeyDialog.tsx +49 -0
  1199. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +441 -122
  1200. package/src/lib/plugins/api-keys/index.tsx +143 -65
  1201. package/src/lib/plugins/custom-pages/index.tsx +24 -16
  1202. package/src/lib/plugins/markdown/MdxPage.tsx +81 -26
  1203. package/src/lib/plugins/markdown/index.tsx +30 -43
  1204. package/src/lib/plugins/openapi/CollapsibleCode.tsx +8 -5
  1205. package/src/lib/plugins/openapi/ColorizedParam.tsx +5 -3
  1206. package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
  1207. package/src/lib/plugins/openapi/MCPEndpoint.tsx +293 -0
  1208. package/src/lib/plugins/openapi/OasProvider.tsx +2 -1
  1209. package/src/lib/plugins/openapi/OperationList.tsx +47 -33
  1210. package/src/lib/plugins/openapi/OperationListItem.tsx +103 -103
  1211. package/src/lib/plugins/openapi/ParamInfos.tsx +14 -10
  1212. package/src/lib/plugins/openapi/ParameterList.tsx +3 -5
  1213. package/src/lib/plugins/openapi/ParameterListItem.tsx +42 -12
  1214. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +16 -8
  1215. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +3 -2
  1216. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +5 -16
  1217. package/src/lib/plugins/openapi/SchemaList.tsx +25 -19
  1218. package/src/lib/plugins/openapi/Sidecar.tsx +18 -69
  1219. package/src/lib/plugins/openapi/SidecarExamples.tsx +11 -11
  1220. package/src/lib/plugins/openapi/StaggeredRender.tsx +1 -1
  1221. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +1 -1
  1222. package/src/lib/plugins/openapi/client/createServer.ts +1 -2
  1223. package/src/lib/plugins/openapi/client/useCreateQuery.ts +24 -4
  1224. package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
  1225. package/src/lib/plugins/openapi/components/EnumValues.tsx +1 -1
  1226. package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -0
  1227. package/src/lib/plugins/openapi/context.tsx +1 -1
  1228. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +1 -2
  1229. package/src/lib/plugins/openapi/graphql/gql.ts +8 -9
  1230. package/src/lib/plugins/openapi/graphql/graphql.ts +14 -7
  1231. package/src/lib/plugins/openapi/index.tsx +85 -33
  1232. package/src/lib/plugins/openapi/interfaces.ts +10 -7
  1233. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +55 -0
  1234. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
  1235. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +11 -4
  1236. package/src/lib/plugins/openapi/playground/Headers.tsx +217 -115
  1237. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +4 -3
  1238. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +20 -36
  1239. package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
  1240. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
  1241. package/src/lib/plugins/openapi/playground/PathParams.tsx +5 -6
  1242. package/src/lib/plugins/openapi/playground/Playground.tsx +270 -293
  1243. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +3 -2
  1244. package/src/lib/plugins/openapi/playground/QueryParams.tsx +106 -60
  1245. package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
  1246. package/src/lib/plugins/openapi/playground/fileUtils.ts +32 -0
  1247. package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
  1248. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
  1249. package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
  1250. package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +117 -0
  1251. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +149 -108
  1252. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +70 -91
  1253. package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +1 -1
  1254. package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +20 -0
  1255. package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +1 -0
  1256. package/src/lib/plugins/openapi/processors/removeParameters.test.ts +1 -0
  1257. package/src/lib/plugins/openapi/processors/traverse.ts +1 -1
  1258. package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.tsx +36 -0
  1259. package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.tsx +25 -0
  1260. package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.tsx +42 -0
  1261. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +10 -7
  1262. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +39 -46
  1263. package/src/lib/plugins/openapi/schema/SchemaView.tsx +67 -45
  1264. package/src/lib/plugins/openapi/schema/UnionView.tsx +143 -0
  1265. package/src/lib/plugins/openapi/schema/union-helpers.ts +124 -0
  1266. package/src/lib/plugins/openapi/schema/utils.ts +24 -17
  1267. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +107 -0
  1268. package/src/lib/plugins/openapi/util/createNavigationCategory.tsx +39 -0
  1269. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +54 -5
  1270. package/src/lib/plugins/openapi/util/getRoutes.tsx +87 -15
  1271. package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
  1272. package/src/lib/plugins/redirect/index.tsx +1 -1
  1273. package/src/lib/plugins/search-inkeep/index.tsx +54 -58
  1274. package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
  1275. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +3 -4
  1276. package/src/lib/plugins/search-pagefind/ResultList.tsx +16 -8
  1277. package/src/lib/plugins/search-pagefind/get-results.tsx +0 -1
  1278. package/src/lib/shiki.ts +138 -0
  1279. package/src/lib/ui/ActionButton.tsx +3 -1
  1280. package/src/lib/ui/Alert.tsx +45 -39
  1281. package/src/lib/ui/Badge.tsx +2 -2
  1282. package/src/lib/ui/Breadcrumb.tsx +1 -0
  1283. package/src/lib/ui/Button.tsx +9 -6
  1284. package/src/lib/ui/Callout.tsx +2 -1
  1285. package/src/lib/ui/Card.tsx +1 -1
  1286. package/src/lib/ui/Carousel.tsx +1 -0
  1287. package/src/lib/ui/Checkbox.tsx +1 -1
  1288. package/src/lib/ui/CodeBlock.tsx +80 -0
  1289. package/src/lib/ui/Command.tsx +6 -8
  1290. package/src/lib/ui/Dialog.tsx +20 -8
  1291. package/src/lib/ui/DropdownMenu.tsx +4 -4
  1292. package/src/lib/ui/EmbeddedCodeBlock.tsx +94 -0
  1293. package/src/lib/ui/Form.tsx +4 -4
  1294. package/src/lib/ui/HoverCard.tsx +1 -1
  1295. package/src/lib/ui/Input.tsx +1 -1
  1296. package/src/lib/ui/Pagination.tsx +1 -2
  1297. package/src/lib/ui/Popover.tsx +1 -1
  1298. package/src/lib/ui/RadioGroup.tsx +1 -1
  1299. package/src/lib/ui/ReactComponentDoc.tsx +68 -0
  1300. package/src/lib/ui/Secret.tsx +106 -0
  1301. package/src/lib/ui/Select.tsx +3 -3
  1302. package/src/lib/ui/Slider.tsx +1 -1
  1303. package/src/lib/ui/Switch.tsx +1 -1
  1304. package/src/lib/ui/SyntaxHighlight.tsx +28 -179
  1305. package/src/lib/ui/Tabs.tsx +2 -2
  1306. package/src/lib/ui/Textarea.tsx +1 -1
  1307. package/src/lib/ui/Toggle.tsx +1 -1
  1308. package/src/lib/ui/ToggleGroup.tsx +1 -1
  1309. package/src/lib/ui/Tooltip.tsx +16 -1
  1310. package/src/lib/ui/Value.tsx +42 -0
  1311. package/src/lib/util/MdxComponents.tsx +51 -17
  1312. package/src/lib/util/cn.ts +1 -1
  1313. package/src/lib/util/createVariantComponent.tsx +2 -2
  1314. package/src/lib/util/ensureArray.ts +3 -0
  1315. package/src/lib/util/groupBy.ts +1 -0
  1316. package/src/lib/util/humanFileSize.test.ts +24 -0
  1317. package/src/lib/util/humanFileSize.ts +15 -0
  1318. package/src/lib/util/invariant.ts +8 -5
  1319. package/src/lib/util/os.ts +18 -0
  1320. package/src/lib/util/pastellize.ts +2 -2
  1321. package/src/lib/util/traverse.ts +44 -5
  1322. package/src/lib/util/types.ts +1 -1
  1323. package/src/lib/util/url.test.ts +51 -0
  1324. package/src/lib/util/url.ts +18 -0
  1325. package/src/lib/util/useCopyToClipboard.ts +17 -0
  1326. package/src/lib/util/useExposedProps.tsx +12 -1
  1327. package/src/lib/util/useIsomorphicLayoutEffect.ts +1 -0
  1328. package/src/lib/util/useScrollToAnchor.ts +6 -4
  1329. package/src/shiki/langs/abap.js +1 -0
  1330. package/src/shiki/langs/actionscript-3.js +1 -0
  1331. package/src/shiki/langs/ada.js +1 -0
  1332. package/src/shiki/langs/angular-expression.js +1 -0
  1333. package/src/shiki/langs/angular-html.js +1 -0
  1334. package/src/shiki/langs/angular-inline-style.js +1 -0
  1335. package/src/shiki/langs/angular-inline-template.js +1 -0
  1336. package/src/shiki/langs/angular-let-declaration.js +1 -0
  1337. package/src/shiki/langs/angular-template-blocks.js +1 -0
  1338. package/src/shiki/langs/angular-template.js +1 -0
  1339. package/src/shiki/langs/angular-ts.js +1 -0
  1340. package/src/shiki/langs/apache.js +1 -0
  1341. package/src/shiki/langs/apex.js +1 -0
  1342. package/src/shiki/langs/apl.js +1 -0
  1343. package/src/shiki/langs/applescript.js +1 -0
  1344. package/src/shiki/langs/ara.js +1 -0
  1345. package/src/shiki/langs/asciidoc.js +1 -0
  1346. package/src/shiki/langs/asm.js +1 -0
  1347. package/src/shiki/langs/astro.js +1 -0
  1348. package/src/shiki/langs/awk.js +1 -0
  1349. package/src/shiki/langs/ballerina.js +1 -0
  1350. package/src/shiki/langs/bat.js +1 -0
  1351. package/src/shiki/langs/beancount.js +1 -0
  1352. package/src/shiki/langs/berry.js +1 -0
  1353. package/src/shiki/langs/bibtex.js +1 -0
  1354. package/src/shiki/langs/bicep.js +1 -0
  1355. package/src/shiki/langs/blade.js +1 -0
  1356. package/src/shiki/langs/bsl.js +1 -0
  1357. package/src/shiki/langs/c.js +1 -0
  1358. package/src/shiki/langs/cadence.js +1 -0
  1359. package/src/shiki/langs/cairo.js +1 -0
  1360. package/src/shiki/langs/clarity.js +1 -0
  1361. package/src/shiki/langs/clojure.js +1 -0
  1362. package/src/shiki/langs/cmake.js +1 -0
  1363. package/src/shiki/langs/cobol.js +1 -0
  1364. package/src/shiki/langs/codeowners.js +1 -0
  1365. package/src/shiki/langs/codeql.js +1 -0
  1366. package/src/shiki/langs/coffee.js +1 -0
  1367. package/src/shiki/langs/common-lisp.js +1 -0
  1368. package/src/shiki/langs/coq.js +1 -0
  1369. package/src/shiki/langs/cpp-macro.js +1 -0
  1370. package/src/shiki/langs/cpp.js +1 -0
  1371. package/src/shiki/langs/crystal.js +1 -0
  1372. package/src/shiki/langs/csharp.js +1 -0
  1373. package/src/shiki/langs/css.js +1 -0
  1374. package/src/shiki/langs/csv.js +1 -0
  1375. package/src/shiki/langs/cue.js +1 -0
  1376. package/src/shiki/langs/cypher.js +1 -0
  1377. package/src/shiki/langs/d.js +1 -0
  1378. package/src/shiki/langs/dart.js +1 -0
  1379. package/src/shiki/langs/dax.js +1 -0
  1380. package/src/shiki/langs/desktop.js +1 -0
  1381. package/src/shiki/langs/diff.js +1 -0
  1382. package/src/shiki/langs/docker.js +1 -0
  1383. package/src/shiki/langs/dotenv.js +1 -0
  1384. package/src/shiki/langs/dream-maker.js +1 -0
  1385. package/src/shiki/langs/edge.js +1 -0
  1386. package/src/shiki/langs/elixir.js +1 -0
  1387. package/src/shiki/langs/elm.js +1 -0
  1388. package/src/shiki/langs/emacs-lisp.js +1 -0
  1389. package/src/shiki/langs/erb.js +1 -0
  1390. package/src/shiki/langs/erlang.js +1 -0
  1391. package/src/shiki/langs/es-tag-css.js +1 -0
  1392. package/src/shiki/langs/es-tag-glsl.js +1 -0
  1393. package/src/shiki/langs/es-tag-html.js +1 -0
  1394. package/src/shiki/langs/es-tag-sql.js +1 -0
  1395. package/src/shiki/langs/es-tag-xml.js +1 -0
  1396. package/src/shiki/langs/fennel.js +1 -0
  1397. package/src/shiki/langs/fish.js +1 -0
  1398. package/src/shiki/langs/fluent.js +1 -0
  1399. package/src/shiki/langs/fortran-fixed-form.js +1 -0
  1400. package/src/shiki/langs/fortran-free-form.js +1 -0
  1401. package/src/shiki/langs/fsharp.js +1 -0
  1402. package/src/shiki/langs/gdresource.js +1 -0
  1403. package/src/shiki/langs/gdscript.js +1 -0
  1404. package/src/shiki/langs/gdshader.js +1 -0
  1405. package/src/shiki/langs/genie.js +1 -0
  1406. package/src/shiki/langs/gherkin.js +1 -0
  1407. package/src/shiki/langs/git-commit.js +1 -0
  1408. package/src/shiki/langs/git-rebase.js +1 -0
  1409. package/src/shiki/langs/gleam.js +1 -0
  1410. package/src/shiki/langs/glimmer-js.js +1 -0
  1411. package/src/shiki/langs/glimmer-ts.js +1 -0
  1412. package/src/shiki/langs/glsl.js +1 -0
  1413. package/src/shiki/langs/gnuplot.js +1 -0
  1414. package/src/shiki/langs/go.js +1 -0
  1415. package/src/shiki/langs/graphql.js +1 -0
  1416. package/src/shiki/langs/groovy.js +1 -0
  1417. package/src/shiki/langs/hack.js +1 -0
  1418. package/src/shiki/langs/haml.js +1 -0
  1419. package/src/shiki/langs/handlebars.js +1 -0
  1420. package/src/shiki/langs/haskell.js +1 -0
  1421. package/src/shiki/langs/haxe.js +1 -0
  1422. package/src/shiki/langs/hcl.js +1 -0
  1423. package/src/shiki/langs/hjson.js +1 -0
  1424. package/src/shiki/langs/hlsl.js +1 -0
  1425. package/src/shiki/langs/html-derivative.js +1 -0
  1426. package/src/shiki/langs/html.js +1 -0
  1427. package/src/shiki/langs/http.js +1 -0
  1428. package/src/shiki/langs/hxml.js +1 -0
  1429. package/src/shiki/langs/hy.js +1 -0
  1430. package/src/shiki/langs/imba.js +1 -0
  1431. package/src/shiki/langs/ini.js +1 -0
  1432. package/src/shiki/langs/java.js +1 -0
  1433. package/src/shiki/langs/javascript.js +1 -0
  1434. package/src/shiki/langs/jinja-html.js +1 -0
  1435. package/src/shiki/langs/jinja.js +1 -0
  1436. package/src/shiki/langs/jison.js +1 -0
  1437. package/src/shiki/langs/json.js +1 -0
  1438. package/src/shiki/langs/json5.js +1 -0
  1439. package/src/shiki/langs/jsonc.js +1 -0
  1440. package/src/shiki/langs/jsonl.js +1 -0
  1441. package/src/shiki/langs/jsonnet.js +1 -0
  1442. package/src/shiki/langs/jssm.js +1 -0
  1443. package/src/shiki/langs/jsx.js +1 -0
  1444. package/src/shiki/langs/julia.js +1 -0
  1445. package/src/shiki/langs/kotlin.js +1 -0
  1446. package/src/shiki/langs/kusto.js +1 -0
  1447. package/src/shiki/langs/latex.js +1 -0
  1448. package/src/shiki/langs/lean.js +1 -0
  1449. package/src/shiki/langs/less.js +1 -0
  1450. package/src/shiki/langs/liquid.js +1 -0
  1451. package/src/shiki/langs/llvm.js +1 -0
  1452. package/src/shiki/langs/log.js +1 -0
  1453. package/src/shiki/langs/logo.js +1 -0
  1454. package/src/shiki/langs/lua.js +1 -0
  1455. package/src/shiki/langs/luau.js +1 -0
  1456. package/src/shiki/langs/make.js +1 -0
  1457. package/src/shiki/langs/markdown-vue.js +1 -0
  1458. package/src/shiki/langs/markdown.js +1 -0
  1459. package/src/shiki/langs/marko.js +1 -0
  1460. package/src/shiki/langs/matlab.js +1 -0
  1461. package/src/shiki/langs/mdc.js +1 -0
  1462. package/src/shiki/langs/mdx.js +1 -0
  1463. package/src/shiki/langs/mermaid.js +1 -0
  1464. package/src/shiki/langs/mipsasm.js +1 -0
  1465. package/src/shiki/langs/mojo.js +1 -0
  1466. package/src/shiki/langs/move.js +1 -0
  1467. package/src/shiki/langs/narrat.js +1 -0
  1468. package/src/shiki/langs/nextflow.js +1 -0
  1469. package/src/shiki/langs/nginx.js +1 -0
  1470. package/src/shiki/langs/nim.js +1 -0
  1471. package/src/shiki/langs/nix.js +1 -0
  1472. package/src/shiki/langs/nushell.js +1 -0
  1473. package/src/shiki/langs/objective-c.js +1 -0
  1474. package/src/shiki/langs/objective-cpp.js +1 -0
  1475. package/src/shiki/langs/ocaml.js +1 -0
  1476. package/src/shiki/langs/pascal.js +1 -0
  1477. package/src/shiki/langs/perl.js +1 -0
  1478. package/src/shiki/langs/php.js +1 -0
  1479. package/src/shiki/langs/plsql.js +1 -0
  1480. package/src/shiki/langs/po.js +1 -0
  1481. package/src/shiki/langs/polar.js +1 -0
  1482. package/src/shiki/langs/postcss.js +1 -0
  1483. package/src/shiki/langs/powerquery.js +1 -0
  1484. package/src/shiki/langs/powershell.js +1 -0
  1485. package/src/shiki/langs/prisma.js +1 -0
  1486. package/src/shiki/langs/prolog.js +1 -0
  1487. package/src/shiki/langs/proto.js +1 -0
  1488. package/src/shiki/langs/pug.js +1 -0
  1489. package/src/shiki/langs/puppet.js +1 -0
  1490. package/src/shiki/langs/purescript.js +1 -0
  1491. package/src/shiki/langs/python.js +1 -0
  1492. package/src/shiki/langs/qml.js +1 -0
  1493. package/src/shiki/langs/qmldir.js +1 -0
  1494. package/src/shiki/langs/qss.js +1 -0
  1495. package/src/shiki/langs/r.js +1 -0
  1496. package/src/shiki/langs/racket.js +1 -0
  1497. package/src/shiki/langs/raku.js +1 -0
  1498. package/src/shiki/langs/razor.js +1 -0
  1499. package/src/shiki/langs/reg.js +1 -0
  1500. package/src/shiki/langs/regexp.js +1 -0
  1501. package/src/shiki/langs/rel.js +1 -0
  1502. package/src/shiki/langs/riscv.js +1 -0
  1503. package/src/shiki/langs/rst.js +1 -0
  1504. package/src/shiki/langs/ruby.js +1 -0
  1505. package/src/shiki/langs/rust.js +1 -0
  1506. package/src/shiki/langs/sas.js +1 -0
  1507. package/src/shiki/langs/sass.js +1 -0
  1508. package/src/shiki/langs/scala.js +1 -0
  1509. package/src/shiki/langs/scheme.js +1 -0
  1510. package/src/shiki/langs/scss.js +1 -0
  1511. package/src/shiki/langs/sdbl.js +1 -0
  1512. package/src/shiki/langs/shaderlab.js +1 -0
  1513. package/src/shiki/langs/shellscript.js +1 -0
  1514. package/src/shiki/langs/shellsession.js +1 -0
  1515. package/src/shiki/langs/smalltalk.js +1 -0
  1516. package/src/shiki/langs/solidity.js +1 -0
  1517. package/src/shiki/langs/soy.js +1 -0
  1518. package/src/shiki/langs/sparql.js +1 -0
  1519. package/src/shiki/langs/splunk.js +1 -0
  1520. package/src/shiki/langs/sql.js +1 -0
  1521. package/src/shiki/langs/ssh-config.js +1 -0
  1522. package/src/shiki/langs/stata.js +1 -0
  1523. package/src/shiki/langs/stylus.js +1 -0
  1524. package/src/shiki/langs/svelte.js +1 -0
  1525. package/src/shiki/langs/swift.js +1 -0
  1526. package/src/shiki/langs/system-verilog.js +1 -0
  1527. package/src/shiki/langs/systemd.js +1 -0
  1528. package/src/shiki/langs/talonscript.js +1 -0
  1529. package/src/shiki/langs/tasl.js +1 -0
  1530. package/src/shiki/langs/tcl.js +1 -0
  1531. package/src/shiki/langs/templ.js +1 -0
  1532. package/src/shiki/langs/terraform.js +1 -0
  1533. package/src/shiki/langs/tex.js +1 -0
  1534. package/src/shiki/langs/toml.js +1 -0
  1535. package/src/shiki/langs/ts-tags.js +1 -0
  1536. package/src/shiki/langs/tsv.js +1 -0
  1537. package/src/shiki/langs/tsx.js +1 -0
  1538. package/src/shiki/langs/turtle.js +1 -0
  1539. package/src/shiki/langs/twig.js +1 -0
  1540. package/src/shiki/langs/typescript.js +1 -0
  1541. package/src/shiki/langs/typespec.js +1 -0
  1542. package/src/shiki/langs/typst.js +1 -0
  1543. package/src/shiki/langs/v.js +1 -0
  1544. package/src/shiki/langs/vala.js +1 -0
  1545. package/src/shiki/langs/vb.js +1 -0
  1546. package/src/shiki/langs/verilog.js +1 -0
  1547. package/src/shiki/langs/vhdl.js +1 -0
  1548. package/src/shiki/langs/viml.js +1 -0
  1549. package/src/shiki/langs/vue-directives.js +1 -0
  1550. package/src/shiki/langs/vue-html.js +1 -0
  1551. package/src/shiki/langs/vue-interpolations.js +1 -0
  1552. package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
  1553. package/src/shiki/langs/vue-vine.js +1 -0
  1554. package/src/shiki/langs/vue.js +1 -0
  1555. package/src/shiki/langs/vyper.js +1 -0
  1556. package/src/shiki/langs/wasm.js +1 -0
  1557. package/src/shiki/langs/wenyan.js +1 -0
  1558. package/src/shiki/langs/wgsl.js +1 -0
  1559. package/src/shiki/langs/wikitext.js +1 -0
  1560. package/src/shiki/langs/wit.js +1 -0
  1561. package/src/shiki/langs/wolfram.js +1 -0
  1562. package/src/shiki/langs/xml.js +1 -0
  1563. package/src/shiki/langs/xsl.js +1 -0
  1564. package/src/shiki/langs/yaml.js +1 -0
  1565. package/src/shiki/langs/zenscript.js +1 -0
  1566. package/src/shiki/langs/zig.js +1 -0
  1567. package/src/shiki/themes/andromeeda.js +1 -0
  1568. package/src/shiki/themes/aurora-x.js +1 -0
  1569. package/src/shiki/themes/ayu-dark.js +1 -0
  1570. package/src/shiki/themes/catppuccin-frappe.js +1 -0
  1571. package/src/shiki/themes/catppuccin-latte.js +1 -0
  1572. package/src/shiki/themes/catppuccin-macchiato.js +1 -0
  1573. package/src/shiki/themes/catppuccin-mocha.js +1 -0
  1574. package/src/shiki/themes/dark-plus.js +1 -0
  1575. package/src/shiki/themes/dracula-soft.js +1 -0
  1576. package/src/shiki/themes/dracula.js +1 -0
  1577. package/src/shiki/themes/everforest-dark.js +1 -0
  1578. package/src/shiki/themes/everforest-light.js +1 -0
  1579. package/src/shiki/themes/github-dark-default.js +1 -0
  1580. package/src/shiki/themes/github-dark-dimmed.js +1 -0
  1581. package/src/shiki/themes/github-dark-high-contrast.js +1 -0
  1582. package/src/shiki/themes/github-dark.js +1 -0
  1583. package/src/shiki/themes/github-light-default.js +1 -0
  1584. package/src/shiki/themes/github-light-high-contrast.js +1 -0
  1585. package/src/shiki/themes/github-light.js +1 -0
  1586. package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
  1587. package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
  1588. package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
  1589. package/src/shiki/themes/gruvbox-light-hard.js +1 -0
  1590. package/src/shiki/themes/gruvbox-light-medium.js +1 -0
  1591. package/src/shiki/themes/gruvbox-light-soft.js +1 -0
  1592. package/src/shiki/themes/houston.js +1 -0
  1593. package/src/shiki/themes/kanagawa-dragon.js +1 -0
  1594. package/src/shiki/themes/kanagawa-lotus.js +1 -0
  1595. package/src/shiki/themes/kanagawa-wave.js +1 -0
  1596. package/src/shiki/themes/laserwave.js +1 -0
  1597. package/src/shiki/themes/light-plus.js +1 -0
  1598. package/src/shiki/themes/material-theme-darker.js +1 -0
  1599. package/src/shiki/themes/material-theme-lighter.js +1 -0
  1600. package/src/shiki/themes/material-theme-ocean.js +1 -0
  1601. package/src/shiki/themes/material-theme-palenight.js +1 -0
  1602. package/src/shiki/themes/material-theme.js +1 -0
  1603. package/src/shiki/themes/min-dark.js +1 -0
  1604. package/src/shiki/themes/min-light.js +1 -0
  1605. package/src/shiki/themes/monokai.js +1 -0
  1606. package/src/shiki/themes/night-owl.js +1 -0
  1607. package/src/shiki/themes/nord.js +1 -0
  1608. package/src/shiki/themes/one-dark-pro.js +1 -0
  1609. package/src/shiki/themes/one-light.js +1 -0
  1610. package/src/shiki/themes/plastic.js +1 -0
  1611. package/src/shiki/themes/poimandres.js +1 -0
  1612. package/src/shiki/themes/red.js +1 -0
  1613. package/src/shiki/themes/rose-pine-dawn.js +1 -0
  1614. package/src/shiki/themes/rose-pine-moon.js +1 -0
  1615. package/src/shiki/themes/rose-pine.js +1 -0
  1616. package/src/shiki/themes/slack-dark.js +1 -0
  1617. package/src/shiki/themes/slack-ochin.js +1 -0
  1618. package/src/shiki/themes/snazzy-light.js +1 -0
  1619. package/src/shiki/themes/solarized-dark.js +1 -0
  1620. package/src/shiki/themes/solarized-light.js +1 -0
  1621. package/src/shiki/themes/synthwave-84.js +1 -0
  1622. package/src/shiki/themes/tokyo-night.js +1 -0
  1623. package/src/shiki/themes/vesper.js +1 -0
  1624. package/src/shiki/themes/vitesse-black.js +1 -0
  1625. package/src/shiki/themes/vitesse-dark.js +1 -0
  1626. package/src/shiki/themes/vitesse-light.js +1 -0
  1627. package/dist/app/tailwind.d.ts +0 -4
  1628. package/dist/app/tailwind.js +0 -97
  1629. package/dist/app/tailwind.js.map +0 -1
  1630. package/dist/config/ZuploBuildConfig.d.ts +0 -155
  1631. package/dist/config/ZuploBuildConfig.js +0 -29
  1632. package/dist/config/ZuploBuildConfig.js.map +0 -1
  1633. package/dist/config/common.d.ts +0 -10
  1634. package/dist/config/common.js +0 -2
  1635. package/dist/config/common.js.map +0 -1
  1636. package/dist/config/validators/InputSidebarSchema.d.ts +0 -217
  1637. package/dist/config/validators/InputSidebarSchema.js +0 -62
  1638. package/dist/config/validators/InputSidebarSchema.js.map +0 -1
  1639. package/dist/config/validators/SidebarSchema.d.ts +0 -46
  1640. package/dist/config/validators/SidebarSchema.js +0 -118
  1641. package/dist/config/validators/SidebarSchema.js.map +0 -1
  1642. package/dist/config/validators/common.d.ts +0 -7659
  1643. package/dist/config/validators/common.js +0 -401
  1644. package/dist/config/validators/common.js.map +0 -1
  1645. package/dist/lib/components/ReactMarkdown.d.ts +0 -29
  1646. package/dist/lib/components/ReactMarkdown.js +0 -182
  1647. package/dist/lib/components/ReactMarkdown.js.map +0 -1
  1648. package/dist/lib/components/SlotletProvider.d.ts +0 -17
  1649. package/dist/lib/components/SlotletProvider.js +0 -18
  1650. package/dist/lib/components/SlotletProvider.js.map +0 -1
  1651. package/dist/lib/components/navigation/Sidebar.d.ts +0 -5
  1652. package/dist/lib/components/navigation/Sidebar.js +0 -10
  1653. package/dist/lib/components/navigation/Sidebar.js.map +0 -1
  1654. package/dist/lib/components/navigation/SidebarBadge.d.ts +0 -26
  1655. package/dist/lib/components/navigation/SidebarBadge.js +0 -26
  1656. package/dist/lib/components/navigation/SidebarBadge.js.map +0 -1
  1657. package/dist/lib/components/navigation/SidebarCategory.d.ts +0 -5
  1658. package/dist/lib/components/navigation/SidebarCategory.js +0 -55
  1659. package/dist/lib/components/navigation/SidebarCategory.js.map +0 -1
  1660. package/dist/lib/components/navigation/SidebarItem.d.ts +0 -11
  1661. package/dist/lib/components/navigation/SidebarItem.js +0 -50
  1662. package/dist/lib/components/navigation/SidebarItem.js.map +0 -1
  1663. package/dist/lib/components/navigation/SidebarWrapper.d.ts +0 -7
  1664. package/dist/lib/components/navigation/SidebarWrapper.js +0 -21
  1665. package/dist/lib/components/navigation/SidebarWrapper.js.map +0 -1
  1666. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
  1667. package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
  1668. package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
  1669. package/dist/lib/plugins/markdown/resolver.d.ts +0 -32
  1670. package/dist/lib/plugins/markdown/resolver.js +0 -46
  1671. package/dist/lib/plugins/markdown/resolver.js.map +0 -1
  1672. package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +0 -7
  1673. package/dist/lib/plugins/openapi/playground/SubmitButton.js +0 -22
  1674. package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +0 -1
  1675. package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
  1676. package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
  1677. package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
  1678. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
  1679. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
  1680. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
  1681. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +0 -8
  1682. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +0 -14
  1683. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +0 -1
  1684. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +0 -7
  1685. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +0 -17
  1686. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +0 -1
  1687. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -6
  1688. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +0 -10
  1689. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +0 -1
  1690. package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +0 -9
  1691. package/dist/lib/plugins/openapi/util/createSidebarCategory.js +0 -23
  1692. package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +0 -1
  1693. package/dist/vite/plugin-docs.test.js +0 -22
  1694. package/dist/vite/plugin-docs.test.js.map +0 -1
  1695. package/dist/vite/plugin-sidebar.d.ts +0 -4
  1696. package/dist/vite/plugin-sidebar.js +0 -56
  1697. package/dist/vite/plugin-sidebar.js.map +0 -1
  1698. package/dist/vite/plugin-theme-css.d.ts +0 -6
  1699. package/dist/vite/plugin-theme-css.js +0 -117
  1700. package/dist/vite/plugin-theme-css.js.map +0 -1
  1701. package/dist/vite/remarkStaticGeneration.d.ts +0 -3
  1702. package/dist/vite/remarkStaticGeneration.js +0 -125
  1703. package/dist/vite/remarkStaticGeneration.js.map +0 -1
  1704. package/dist/zuplo/env.d.ts +0 -33
  1705. package/dist/zuplo/env.js +0 -29
  1706. package/dist/zuplo/env.js.map +0 -1
  1707. package/lib/AuthenticationPlugin-CJOFRBk3.js +0 -58
  1708. package/lib/AuthenticationPlugin-CJOFRBk3.js.map +0 -1
  1709. package/lib/Button-BBNrKpQd.js +0 -49
  1710. package/lib/Button-BBNrKpQd.js.map +0 -1
  1711. package/lib/Callout-D3Ja4OPX.js +0 -230
  1712. package/lib/Callout-D3Ja4OPX.js.map +0 -1
  1713. package/lib/CategoryHeading-D06WK_Wo.js +0 -10
  1714. package/lib/CategoryHeading-D06WK_Wo.js.map +0 -1
  1715. package/lib/Dialog-ByYz4ABw.js +0 -98
  1716. package/lib/Dialog-ByYz4ABw.js.map +0 -1
  1717. package/lib/Drawer-CEwbkLDb.js +0 -1133
  1718. package/lib/Drawer-CEwbkLDb.js.map +0 -1
  1719. package/lib/Markdown-C5h6bxbE.js +0 -17126
  1720. package/lib/Markdown-C5h6bxbE.js.map +0 -1
  1721. package/lib/MdxPage-DhGqXQTK.js +0 -85
  1722. package/lib/MdxPage-DhGqXQTK.js.map +0 -1
  1723. package/lib/OasProvider-q0ncKgHr.js +0 -34
  1724. package/lib/OasProvider-q0ncKgHr.js.map +0 -1
  1725. package/lib/OperationList-CW4jENLV.js +0 -5069
  1726. package/lib/OperationList-CW4jENLV.js.map +0 -1
  1727. package/lib/Pagination-DsG3YIT_.js +0 -48
  1728. package/lib/Pagination-DsG3YIT_.js.map +0 -1
  1729. package/lib/RouteGuard-BZ_VsiXc.js +0 -744
  1730. package/lib/RouteGuard-BZ_VsiXc.js.map +0 -1
  1731. package/lib/SchemaList-n24-qSa5.js +0 -148
  1732. package/lib/SchemaList-n24-qSa5.js.map +0 -1
  1733. package/lib/SchemaView-DCSWtnYr.js +0 -357
  1734. package/lib/SchemaView-DCSWtnYr.js.map +0 -1
  1735. package/lib/Select-Dg5R11Dx.js +0 -223
  1736. package/lib/Select-Dg5R11Dx.js.map +0 -1
  1737. package/lib/SlotletProvider-VUmTNmLZ.js +0 -340
  1738. package/lib/SlotletProvider-VUmTNmLZ.js.map +0 -1
  1739. package/lib/Spinner-mNLZ6awP.js +0 -7
  1740. package/lib/Spinner-mNLZ6awP.js.map +0 -1
  1741. package/lib/SyntaxHighlight-CxhyyMkF.js +0 -2890
  1742. package/lib/SyntaxHighlight-CxhyyMkF.js.map +0 -1
  1743. package/lib/Toc-BK39DQvI.js +0 -92
  1744. package/lib/Toc-BK39DQvI.js.map +0 -1
  1745. package/lib/_commonjsHelpers-B4e78b8K.js +0 -29
  1746. package/lib/_commonjsHelpers-B4e78b8K.js.map +0 -1
  1747. package/lib/chunk-KNED5TY2-BUPjb3LQ.js +0 -1822
  1748. package/lib/chunk-KNED5TY2-BUPjb3LQ.js.map +0 -1
  1749. package/lib/circular-ByJI6Mci.js +0 -15877
  1750. package/lib/circular-ByJI6Mci.js.map +0 -1
  1751. package/lib/cn-qaFjX9_3.js +0 -2279
  1752. package/lib/cn-qaFjX9_3.js.map +0 -1
  1753. package/lib/context-Lrf2Y9bR.js +0 -22
  1754. package/lib/context-Lrf2Y9bR.js.map +0 -1
  1755. package/lib/createServer-DLN7APz_.js +0 -12318
  1756. package/lib/createServer-DLN7APz_.js.map +0 -1
  1757. package/lib/hook-pPrHCB6G.js +0 -1478
  1758. package/lib/hook-pPrHCB6G.js.map +0 -1
  1759. package/lib/index-Bn6Lc9tq.js +0 -9
  1760. package/lib/index-Bn6Lc9tq.js.map +0 -1
  1761. package/lib/index-CBpciIfE.js +0 -2054
  1762. package/lib/index-CBpciIfE.js.map +0 -1
  1763. package/lib/index-CPNSgwSb.js +0 -36
  1764. package/lib/index-CPNSgwSb.js.map +0 -1
  1765. package/lib/index-CuBIgTKC.js +0 -316
  1766. package/lib/index-CuBIgTKC.js.map +0 -1
  1767. package/lib/index-DcHeSvkE.js +0 -4850
  1768. package/lib/index-DcHeSvkE.js.map +0 -1
  1769. package/lib/index-DwT-v3zK.js +0 -86
  1770. package/lib/index-DwT-v3zK.js.map +0 -1
  1771. package/lib/index-LNp6rxyU.js +0 -2094
  1772. package/lib/index-LNp6rxyU.js.map +0 -1
  1773. package/lib/index-bu-rfaLA.js +0 -2227
  1774. package/lib/index-bu-rfaLA.js.map +0 -1
  1775. package/lib/index.esm-D2ZUREQN.js +0 -1216
  1776. package/lib/index.esm-D2ZUREQN.js.map +0 -1
  1777. package/lib/invariant-Caa8-XvF.js +0 -26
  1778. package/lib/invariant-Caa8-XvF.js.map +0 -1
  1779. package/lib/jsx-runtime-C5mzlN2N.js +0 -285
  1780. package/lib/jsx-runtime-C5mzlN2N.js.map +0 -1
  1781. package/lib/mutation-Csa9eQDM.js +0 -211
  1782. package/lib/mutation-Csa9eQDM.js.map +0 -1
  1783. package/lib/objectEntries-yMIkr2mI.js +0 -5
  1784. package/lib/objectEntries-yMIkr2mI.js.map +0 -1
  1785. package/lib/prism-bash.min-HHIMdNJ_.js +0 -7
  1786. package/lib/prism-bash.min-HHIMdNJ_.js.map +0 -1
  1787. package/lib/prism-csharp.min-C43x1RY2.js +0 -63
  1788. package/lib/prism-csharp.min-C43x1RY2.js.map +0 -1
  1789. package/lib/prism-java.min-CQzr40NQ.js +0 -35
  1790. package/lib/prism-java.min-CQzr40NQ.js.map +0 -1
  1791. package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
  1792. package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
  1793. package/lib/prism-json.min-B1GJqK1k.js +0 -2
  1794. package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
  1795. package/lib/prism-jsstacktrace.min-BfobCF2F.js +0 -2
  1796. package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +0 -1
  1797. package/lib/prism-markdown.min-C0Qn0m-5.js +0 -61
  1798. package/lib/prism-markdown.min-C0Qn0m-5.js.map +0 -1
  1799. package/lib/prism-markup-BNGj0Tvm.js +0 -174
  1800. package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
  1801. package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
  1802. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
  1803. package/lib/prism-ruby.min-L9OdQ6tU.js +0 -38
  1804. package/lib/prism-ruby.min-L9OdQ6tU.js.map +0 -1
  1805. package/lib/prism-typescript.min-qTySPvCh.js +0 -34
  1806. package/lib/prism-typescript.min-qTySPvCh.js.map +0 -1
  1807. package/lib/useExposedProps-Dq2yUQIG.js +0 -9
  1808. package/lib/useExposedProps-Dq2yUQIG.js.map +0 -1
  1809. package/src/app/tailwind.ts +0 -103
  1810. package/src/lib/components/ReactMarkdown.license.txt +0 -21
  1811. package/src/lib/components/ReactMarkdown.tsx +0 -264
  1812. package/src/lib/components/SlotletProvider.tsx +0 -55
  1813. package/src/lib/components/navigation/Sidebar.tsx +0 -48
  1814. package/src/lib/components/navigation/SidebarBadge.tsx +0 -48
  1815. package/src/lib/components/navigation/SidebarCategory.tsx +0 -140
  1816. package/src/lib/components/navigation/SidebarItem.tsx +0 -118
  1817. package/src/lib/components/navigation/SidebarWrapper.tsx +0 -46
  1818. package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
  1819. package/src/lib/plugins/markdown/resolver.ts +0 -57
  1820. package/src/lib/plugins/openapi/playground/SubmitButton.tsx +0 -75
  1821. package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
  1822. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
  1823. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +0 -40
  1824. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +0 -57
  1825. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +0 -33
  1826. package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +0 -37
  1827. /package/dist/{vite/plugin-docs.test.d.ts → config/validators/InputNavigationSchema.test-d.d.ts} +0 -0
@@ -1,4850 +0,0 @@
1
- const dt = Symbol.for("yaml.alias"), lt = Symbol.for("yaml.document"), G = Symbol.for("yaml.map"), qt = Symbol.for("yaml.pair"), R = 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] === G, T = (s) => !!s && typeof s == "object" && s[j] === qt, E = (s) => !!s && typeof s == "object" && s[j] === R, 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 G:
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 G:
16
- case R:
17
- case he:
18
- return !0;
19
- }
20
- return !1;
21
- }
22
- const vs = (s) => (E(s) || L(s)) && !!s.anchor, M = Symbol("break visit"), Ft = Symbol("skip children"), F = Symbol("remove node");
23
- function Q(s, e) {
24
- const t = Rt(e);
25
- ee(s) ? ie(null, s.contents, t, Object.freeze([s])) === F && (s.contents = null) : ie(null, s, t, Object.freeze([]));
26
- }
27
- Q.BREAK = M;
28
- Q.SKIP = Ft;
29
- Q.REMOVE = F;
30
- function ie(s, e, t, n) {
31
- const i = Ut(s, e, t, n);
32
- if ($(i) || T(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 === F && (e.items.splice(r, 1), r -= 1);
45
- }
46
- }
47
- } else if (T(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 === F && (e.key = null);
53
- const o = ie("value", e.value, t, n);
54
- if (o === M)
55
- return M;
56
- o === F && (e.value = null);
57
- }
58
- }
59
- return i;
60
- }
61
- async function Fe(s, e) {
62
- const t = Rt(e);
63
- ee(s) ? await re(null, s.contents, t, Object.freeze([s])) === F && (s.contents = null) : await re(null, s, t, Object.freeze([]));
64
- }
65
- Fe.BREAK = M;
66
- Fe.SKIP = Ft;
67
- Fe.REMOVE = F;
68
- async function re(s, e, t, n) {
69
- const i = await Ut(s, e, t, n);
70
- if ($(i) || T(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 === F && (e.items.splice(r, 1), r -= 1);
83
- }
84
- }
85
- } else if (T(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 === F && (e.key = null);
91
- const o = await re("value", e.value, t, n);
92
- if (o === M)
93
- return M;
94
- o === F && (e.value = null);
95
- }
96
- }
97
- return i;
98
- }
99
- function Rt(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 Ut(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 (T(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 (T(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 Bs = {
143
- "!": "%21",
144
- ",": "%2C",
145
- "[": "%5B",
146
- "]": "%5D",
147
- "{": "%7B",
148
- "}": "%7D"
149
- }, Ms = (s) => s.replace(/[!,[\]{}]/g, (e) => Bs[e]);
150
- class B {
151
- constructor(e, t) {
152
- this.docStart = null, this.docEnd = !1, this.yaml = Object.assign({}, B.defaultYaml, e), this.tags = Object.assign({}, B.defaultTags, t);
153
- }
154
- clone() {
155
- const e = new B(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 B(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: B.defaultYaml.explicit,
171
- version: "1.2"
172
- }, this.tags = Object.assign({}, B.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: B.defaultYaml.explicit, version: "1.1" }, this.tags = Object.assign({}, B.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
- Q(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
- B.defaultYaml = { explicit: !1, version: "1.2" };
259
- B.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 Q(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 || !vs(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 Re 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 Q(e, {
391
- Node: (n, i) => {
392
- if (i === this)
393
- return Q.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 = ve(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 ve(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 = ve(s, i, t);
438
- r > n && (n = r);
439
- }
440
- return n;
441
- } else if (T(e)) {
442
- const n = ve(s, e.key, t), i = ve(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 A extends pt {
449
- constructor(e) {
450
- super(R), 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
- A.BLOCK_FOLDED = "BLOCK_FOLDED";
460
- A.BLOCK_LITERAL = "BLOCK_LITERAL";
461
- A.PLAIN = "PLAIN";
462
- A.QUOTE_DOUBLE = "QUOTE_DOUBLE";
463
- A.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 (T(s)) {
482
- const y = (d = (f = t.schema[G]).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 Re(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 A(s);
498
- return a && (a.node = y), y;
499
- }
500
- c = s instanceof Map ? o[G] : Symbol.iterator in Object(s) ? o[he] : o[G];
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 A(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) || T(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 (!T(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 U(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
- `) ? U(t, e) : t.includes(`
628
- `) ? `
629
- ` + U(t, e) : (s.endsWith(" ") ? "" : " ") + t, Ht = "flow", at = "block", Be = "quoted";
630
- function Ue(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 === Be && 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 w = s[u + 1];
666
- w && w !== " " && w !== `
667
- ` && w !== " " && (d = u);
668
- }
669
- if (u >= f)
670
- if (d)
671
- c.push(d), f = d + a, d = void 0;
672
- else if (t === Be) {
673
- for (; h === " " || h === " "; )
674
- h = N, N = s[u += 1], y = !0;
675
- const w = u > b + 1 ? u - 2 : m - 1;
676
- if (p[w])
677
- return s;
678
- c.push(w), p[w] = !0, f = w + 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 S = s.slice(0, c[0]);
688
- for (let N = 0; N < c.length; ++N) {
689
- const w = c[N], k = c[N + 1] || s.length;
690
- w === 0 ? S = `
691
- ${e}${s.slice(0, k)}` : (t === Be && p[w] && (S += `${s[w]}\\`), S += `
692
- ${e}${s.slice(w + 1, k)}`);
693
- }
694
- return S;
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 : Ue(o, r, Be, 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 : Ue(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 === A.BLOCK_FOLDED ? !1 : e === A.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 S = t.substring(0, b < m ? b + 1 : m);
853
- S && (t = t.substring(S.length), S = S.replace(/\n+/g, `$&${c}`));
854
- let w = (u ? c ? "2" : "1" : "") + f;
855
- if (s && (w += " " + l(s.replace(/ ?[\r\n]+/g, " ")), i && i()), !p) {
856
- const k = t.replace(/\n+/g, `
857
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${c}`);
858
- let O = !1;
859
- const I = Ve(n, !0);
860
- o !== "folded" && e !== A.BLOCK_FOLDED && (I.onOverflow = () => {
861
- O = !0;
862
- });
863
- const g = Ue(`${S}${k}${h}`, c, at, I);
864
- if (!O)
865
- return `>${w}
866
- ${c}${g}`;
867
- }
868
- return t = t.replace(/\n+/g, `$&${c}`), `|${w}
869
- ${c}${S}${t}${h}`;
870
- }
871
- function Fs(s, e, t, n) {
872
- const { type: i, value: r } = s, { actualString: o, implicitKey: l, indent: a, indentStep: c, inFlow: p } = e;
873
- if (l && r.includes(`
874
- `) || p && /[[\]{},]/.test(r))
875
- return le(r, e);
876
- if (!r || /^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(r))
877
- return l || p || !r.includes(`
878
- `) ? le(r, e) : Me(s, e, t, n);
879
- if (!l && !p && i !== A.PLAIN && r.includes(`
880
- `))
881
- return Me(s, e, t, n);
882
- if (Je(r)) {
883
- if (a === "")
884
- return e.forceBlockIndent = !0, Me(s, e, t, n);
885
- if (l && a === c)
886
- return le(r, e);
887
- }
888
- const f = r.replace(/\n+/g, `$&
889
- ${a}`);
890
- if (o) {
891
- const d = (u) => {
892
- var m;
893
- return u.default && u.tag !== "tag:yaml.org,2002:str" && ((m = u.test) == null ? void 0 : m.test(f));
894
- }, { compat: h, tags: y } = e.doc.schema;
895
- if (y.some(d) || h != null && h.some(d))
896
- return le(r, e);
897
- }
898
- return l ? f : Ue(f, a, Ht, Ve(e, !1));
899
- }
900
- function Ae(s, e, t, n) {
901
- const { implicitKey: i, inFlow: r } = e, o = typeof s.value == "string" ? s : Object.assign({}, s, { value: String(s.value) });
902
- let { type: l } = s;
903
- l !== A.QUOTE_DOUBLE && /[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value) && (l = A.QUOTE_DOUBLE);
904
- const a = (p) => {
905
- switch (p) {
906
- case A.BLOCK_FOLDED:
907
- case A.BLOCK_LITERAL:
908
- return i || r ? le(o.value, e) : Me(o, e, t, n);
909
- case A.QUOTE_DOUBLE:
910
- return Se(o.value, e);
911
- case A.QUOTE_SINGLE:
912
- return ct(o.value, e);
913
- case A.PLAIN:
914
- return Fs(o, e, t, n);
915
- default:
916
- return null;
917
- }
918
- };
919
- let c = a(l);
920
- if (c === null) {
921
- const { defaultKeyType: p, defaultStringType: f } = e.options, d = i && p || f;
922
- if (c = a(d), c === null)
923
- throw new Error(`Unsupported default string type ${d}`);
924
- }
925
- return c;
926
- }
927
- function Xt(s, e) {
928
- const t = Object.assign({
929
- blockQuote: !0,
930
- commentString: Ds,
931
- defaultKeyType: null,
932
- defaultStringType: "PLAIN",
933
- directives: null,
934
- doubleQuotedAsJSON: !1,
935
- doubleQuotedMinMultiLineLength: 40,
936
- falseStr: "false",
937
- flowCollectionPadding: !0,
938
- indentSeq: !0,
939
- lineWidth: 80,
940
- minContentWidth: 20,
941
- nullStr: "null",
942
- simpleKeys: !1,
943
- singleQuote: null,
944
- trueStr: "true",
945
- verifyAliasOrder: !0
946
- }, s.schema.toStringOptions, e);
947
- let n;
948
- switch (t.collectionStyle) {
949
- case "block":
950
- n = !1;
951
- break;
952
- case "flow":
953
- n = !0;
954
- break;
955
- default:
956
- n = null;
957
- }
958
- return {
959
- anchors: /* @__PURE__ */ new Set(),
960
- doc: s,
961
- flowCollectionPadding: t.flowCollectionPadding ? " " : "",
962
- indent: "",
963
- indentStep: typeof t.indent == "number" ? " ".repeat(t.indent) : " ",
964
- inFlow: n,
965
- options: t
966
- };
967
- }
968
- function Rs(s, e) {
969
- var i;
970
- if (e.tag) {
971
- const r = s.filter((o) => o.tag === e.tag);
972
- if (r.length > 0)
973
- return r.find((o) => o.format === e.format) ?? r[0];
974
- }
975
- let t, n;
976
- if (E(e)) {
977
- n = e.value;
978
- let r = s.filter((o) => {
979
- var l;
980
- return (l = o.identify) == null ? void 0 : l.call(o, n);
981
- });
982
- if (r.length > 1) {
983
- const o = r.filter((l) => l.test);
984
- o.length > 0 && (r = o);
985
- }
986
- t = r.find((o) => o.format === e.format) ?? r.find((o) => !o.format);
987
- } else
988
- n = e, t = s.find((r) => r.nodeClass && n instanceof r.nodeClass);
989
- if (!t) {
990
- const r = ((i = n == null ? void 0 : n.constructor) == null ? void 0 : i.name) ?? typeof n;
991
- throw new Error(`Tag not resolved for ${r} value`);
992
- }
993
- return t;
994
- }
995
- function Us(s, e, { anchors: t, doc: n }) {
996
- if (!n.directives)
997
- return "";
998
- const i = [], r = (E(s) || L(s)) && s.anchor;
999
- r && Jt(r) && (t.add(r), i.push(`&${r}`));
1000
- const o = s.tag ? s.tag : e.default ? null : e.tag;
1001
- return o && i.push(n.directives.tagString(o)), i.join(" ");
1002
- }
1003
- function fe(s, e, t, n) {
1004
- var a;
1005
- if (T(s))
1006
- return s.toString(e, t, n);
1007
- if (x(s)) {
1008
- if (e.doc.directives)
1009
- return s.toString(e);
1010
- if ((a = e.resolvedAliases) != null && a.has(s))
1011
- throw new TypeError("Cannot stringify circular structure without alias nodes");
1012
- e.resolvedAliases ? e.resolvedAliases.add(s) : e.resolvedAliases = /* @__PURE__ */ new Set([s]), s = s.resolve(e.doc);
1013
- }
1014
- let i;
1015
- const r = $(s) ? s : e.doc.createNode(s, { onTagObj: (c) => i = c });
1016
- i || (i = Rs(e.doc.schema.tags, r));
1017
- const o = Us(r, i, e);
1018
- o.length > 0 && (e.indentAtStart = (e.indentAtStart ?? 0) + o.length + 1);
1019
- const l = typeof i.stringify == "function" ? i.stringify(r, e, t, n) : E(r) ? Ae(r, e, t, n) : r.toString(e, t, n);
1020
- return o ? E(r) || l[0] === "{" || l[0] === "[" ? `${o} ${l}` : `${o}
1021
- ${e.indent}${l}` : l;
1022
- }
1023
- function Vs({ key: s, value: e }, t, n, i) {
1024
- const { allNullValues: r, doc: o, indent: l, indentStep: a, options: { commentString: c, indentSeq: p, simpleKeys: f } } = t;
1025
- let d = $(s) && s.comment || null;
1026
- if (f) {
1027
- if (d)
1028
- throw new Error("With simple keys, key nodes cannot have comments");
1029
- if (L(s) || !$(s) && typeof s == "object") {
1030
- const I = "With simple keys, collection cannot be used as a key value";
1031
- throw new Error(I);
1032
- }
1033
- }
1034
- let h = !f && (!s || d && e == null && !t.inFlow || L(s) || (E(s) ? s.type === A.BLOCK_FOLDED || s.type === A.BLOCK_LITERAL : typeof s == "object"));
1035
- t = Object.assign({}, t, {
1036
- allNullValues: !1,
1037
- implicitKey: !h && (f || !r),
1038
- indent: l + a
1039
- });
1040
- let y = !1, u = !1, m = fe(s, t, () => y = !0, () => u = !0);
1041
- if (!h && !t.inFlow && m.length > 1024) {
1042
- if (f)
1043
- throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
1044
- h = !0;
1045
- }
1046
- if (t.inFlow) {
1047
- if (r || e == null)
1048
- return y && n && n(), m === "" ? "?" : h ? `? ${m}` : m;
1049
- } else if (r && !f || e == null && h)
1050
- return m = `? ${m}`, d && !y ? m += H(m, t.indent, c(d)) : u && i && i(), m;
1051
- y && (d = null), h ? (d && (m += H(m, t.indent, c(d))), m = `? ${m}
1052
- ${l}:`) : (m = `${m}:`, d && (m += H(m, t.indent, c(d))));
1053
- let b, S, N;
1054
- $(e) ? (b = !!e.spaceBefore, S = e.commentBefore, N = e.comment) : (b = !1, S = 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));
1055
- let w = !1;
1056
- const k = fe(e, t, () => w = !0, () => u = !0);
1057
- let O = " ";
1058
- if (d || b || S) {
1059
- if (O = b ? `
1060
- ` : "", S) {
1061
- const I = c(S);
1062
- O += `
1063
- ${U(I, t.indent)}`;
1064
- }
1065
- k === "" && !t.inFlow ? O === `
1066
- ` && (O = `
1067
-
1068
- `) : O += `
1069
- ${t.indent}`;
1070
- } else if (!h && L(e)) {
1071
- const I = k[0], g = k.indexOf(`
1072
- `), _ = g !== -1, J = t.inFlow ?? e.flow ?? e.items.length === 0;
1073
- if (_ || !J) {
1074
- let te = !1;
1075
- if (_ && (I === "&" || I === "!")) {
1076
- let C = k.indexOf(" ");
1077
- I === "&" && C !== -1 && C < g && k[C + 1] === "!" && (C = k.indexOf(" ", C + 1)), (C === -1 || g < C) && (te = !0);
1078
- }
1079
- te || (O = `
1080
- ${t.indent}`);
1081
- }
1082
- } else (k === "" || k[0] === `
1083
- `) && (O = "");
1084
- return m += O + k, t.inFlow ? w && n && n() : N && !w ? m += H(m, t.indent, c(N)) : u && i && i(), m;
1085
- }
1086
- function zt(s, e) {
1087
- (s === "debug" || s === "warn") && console.warn(e);
1088
- }
1089
- const Te = "<<", V = {
1090
- identify: (s) => s === Te || typeof s == "symbol" && s.description === Te,
1091
- default: "key",
1092
- tag: "tag:yaml.org,2002:merge",
1093
- test: /^<<$/,
1094
- resolve: () => Object.assign(new A(Symbol(Te)), {
1095
- addToJSMap: Zt
1096
- }),
1097
- stringify: () => Te
1098
- }, Js = (s, e) => (V.identify(e) || E(e) && (!e.type || e.type === A.PLAIN) && V.identify(e.value)) && (s == null ? void 0 : s.doc.schema.tags.some((t) => t.tag === V.tag && t.default));
1099
- function Zt(s, e, t) {
1100
- if (t = s && x(t) ? t.resolve(s.doc) : t, pe(t))
1101
- for (const n of t.items)
1102
- et(s, e, n);
1103
- else if (Array.isArray(t))
1104
- for (const n of t)
1105
- et(s, e, n);
1106
- else
1107
- et(s, e, t);
1108
- }
1109
- function et(s, e, t) {
1110
- const n = s && x(t) ? t.resolve(s.doc) : t;
1111
- if (!de(n))
1112
- throw new Error("Merge sources must be maps or map aliases");
1113
- const i = n.toJSON(null, s, Map);
1114
- for (const [r, o] of i)
1115
- 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, {
1116
- value: o,
1117
- writable: !0,
1118
- enumerable: !0,
1119
- configurable: !0
1120
- });
1121
- return e;
1122
- }
1123
- function xt(s, e, { key: t, value: n }) {
1124
- if ($(t) && t.addToJSMap)
1125
- t.addToJSMap(s, e, n);
1126
- else if (Js(s, t))
1127
- Zt(s, e, n);
1128
- else {
1129
- const i = P(t, "", s);
1130
- if (e instanceof Map)
1131
- e.set(i, P(n, i, s));
1132
- else if (e instanceof Set)
1133
- e.add(i);
1134
- else {
1135
- const r = Ys(t, i, s), o = P(n, r, s);
1136
- r in e ? Object.defineProperty(e, r, {
1137
- value: o,
1138
- writable: !0,
1139
- enumerable: !0,
1140
- configurable: !0
1141
- }) : e[r] = o;
1142
- }
1143
- }
1144
- return e;
1145
- }
1146
- function Ys(s, e, t) {
1147
- if (e === null)
1148
- return "";
1149
- if (typeof e != "object")
1150
- return String(e);
1151
- if ($(s) && (t != null && t.doc)) {
1152
- const n = Xt(t.doc, {});
1153
- n.anchors = /* @__PURE__ */ new Set();
1154
- for (const r of t.anchors.keys())
1155
- n.anchors.add(r.anchor);
1156
- n.inFlow = !0, n.inStringifyKey = !0;
1157
- const i = s.toString(n);
1158
- if (!t.mapKeyWarned) {
1159
- let r = JSON.stringify(i);
1160
- 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;
1161
- }
1162
- return i;
1163
- }
1164
- return JSON.stringify(e);
1165
- }
1166
- function mt(s, e, t) {
1167
- const n = ke(s, void 0, t), i = ke(e, void 0, t);
1168
- return new v(n, i);
1169
- }
1170
- class v {
1171
- constructor(e, t = null) {
1172
- Object.defineProperty(this, j, { value: qt }), this.key = e, this.value = t;
1173
- }
1174
- clone(e) {
1175
- let { key: t, value: n } = this;
1176
- return $(t) && (t = t.clone(e)), $(n) && (n = n.clone(e)), new v(t, n);
1177
- }
1178
- toJSON(e, t) {
1179
- const n = t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1180
- return xt(t, n, this);
1181
- }
1182
- toString(e, t, n) {
1183
- return e != null && e.doc ? Vs(this, e, t, n) : JSON.stringify(this);
1184
- }
1185
- }
1186
- function es(s, e, t) {
1187
- return (e.inFlow ?? s.flow ? Qs : Gs)(s, e, t);
1188
- }
1189
- function Gs({ comment: s, items: e }, t, { blockItemPrefix: n, flowChars: i, itemIndent: r, onChompKeep: o, onComment: l }) {
1190
- const { indent: a, options: { commentString: c } } = t, p = Object.assign({}, t, { indent: r, type: null });
1191
- let f = !1;
1192
- const d = [];
1193
- for (let y = 0; y < e.length; ++y) {
1194
- const u = e[y];
1195
- let m = null;
1196
- if ($(u))
1197
- !f && u.spaceBefore && d.push(""), je(t, d, u.commentBefore, f), u.comment && (m = u.comment);
1198
- else if (T(u)) {
1199
- const S = $(u.key) ? u.key : null;
1200
- S && (!f && S.spaceBefore && d.push(""), je(t, d, S.commentBefore, f));
1201
- }
1202
- f = !1;
1203
- let b = fe(u, p, () => m = null, () => f = !0);
1204
- m && (b += H(b, r, c(m))), f && m && (f = !1), d.push(n + b);
1205
- }
1206
- let h;
1207
- if (d.length === 0)
1208
- h = i.start + i.end;
1209
- else {
1210
- h = d[0];
1211
- for (let y = 1; y < d.length; ++y) {
1212
- const u = d[y];
1213
- h += u ? `
1214
- ${a}${u}` : `
1215
- `;
1216
- }
1217
- }
1218
- return s ? (h += `
1219
- ` + U(c(s), a), l && l()) : f && o && o(), h;
1220
- }
1221
- function Qs({ items: s }, e, { flowChars: t, itemIndent: n }) {
1222
- const { indent: i, indentStep: r, flowCollectionPadding: o, options: { commentString: l } } = e;
1223
- n += r;
1224
- const a = Object.assign({}, e, {
1225
- indent: n,
1226
- inFlow: !0,
1227
- type: null
1228
- });
1229
- let c = !1, p = 0;
1230
- const f = [];
1231
- for (let y = 0; y < s.length; ++y) {
1232
- const u = s[y];
1233
- let m = null;
1234
- if ($(u))
1235
- u.spaceBefore && f.push(""), je(e, f, u.commentBefore, !1), u.comment && (m = u.comment);
1236
- else if (T(u)) {
1237
- const S = $(u.key) ? u.key : null;
1238
- S && (S.spaceBefore && f.push(""), je(e, f, S.commentBefore, !1), S.comment && (c = !0));
1239
- const N = $(u.value) ? u.value : null;
1240
- N ? (N.comment && (m = N.comment), N.commentBefore && (c = !0)) : u.value == null && (S != null && S.comment) && (m = S.comment);
1241
- }
1242
- m && (c = !0);
1243
- let b = fe(u, a, () => m = null);
1244
- y < s.length - 1 && (b += ","), m && (b += H(b, n, l(m))), !c && (f.length > p || b.includes(`
1245
- `)) && (c = !0), f.push(b), p = f.length;
1246
- }
1247
- const { start: d, end: h } = t;
1248
- if (f.length === 0)
1249
- return d + h;
1250
- if (!c) {
1251
- const y = f.reduce((u, m) => u + m.length + 2, 2);
1252
- c = e.options.lineWidth > 0 && y > e.options.lineWidth;
1253
- }
1254
- if (c) {
1255
- let y = d;
1256
- for (const u of f)
1257
- y += u ? `
1258
- ${r}${i}${u}` : `
1259
- `;
1260
- return `${y}
1261
- ${i}${h}`;
1262
- } else
1263
- return `${d}${o}${f.join(" ")}${o}${h}`;
1264
- }
1265
- function je({ indent: s, options: { commentString: e } }, t, n, i) {
1266
- if (n && i && (n = n.replace(/^\n+/, "")), n) {
1267
- const r = U(e(n), s);
1268
- t.push(r.trimStart());
1269
- }
1270
- }
1271
- function X(s, e) {
1272
- const t = E(e) ? e.value : e;
1273
- for (const n of s)
1274
- if (T(n) && (n.key === e || n.key === t || E(n.key) && n.key.value === t))
1275
- return n;
1276
- }
1277
- class K extends Wt {
1278
- static get tagName() {
1279
- return "tag:yaml.org,2002:map";
1280
- }
1281
- constructor(e) {
1282
- super(G, e), this.items = [];
1283
- }
1284
- /**
1285
- * A generic collection parsing method that can be extended
1286
- * to other node classes that inherit from YAMLMap
1287
- */
1288
- static from(e, t, n) {
1289
- const { keepUndefined: i, replacer: r } = n, o = new this(e), l = (a, c) => {
1290
- if (typeof r == "function")
1291
- c = r.call(t, a, c);
1292
- else if (Array.isArray(r) && !r.includes(a))
1293
- return;
1294
- (c !== void 0 || i) && o.items.push(mt(a, c, n));
1295
- };
1296
- if (t instanceof Map)
1297
- for (const [a, c] of t)
1298
- l(a, c);
1299
- else if (t && typeof t == "object")
1300
- for (const a of Object.keys(t))
1301
- l(a, t[a]);
1302
- return typeof e.sortMapEntries == "function" && o.items.sort(e.sortMapEntries), o;
1303
- }
1304
- /**
1305
- * Adds a value to the collection.
1306
- *
1307
- * @param overwrite - If not set `true`, using a key that is already in the
1308
- * collection will throw. Otherwise, overwrites the previous value.
1309
- */
1310
- add(e, t) {
1311
- var o;
1312
- let n;
1313
- T(e) ? n = e : !e || typeof e != "object" || !("key" in e) ? n = new v(e, e == null ? void 0 : e.value) : n = new v(e.key, e.value);
1314
- const i = X(this.items, n.key), r = (o = this.schema) == null ? void 0 : o.sortMapEntries;
1315
- if (i) {
1316
- if (!t)
1317
- throw new Error(`Key ${n.key} already set`);
1318
- E(i.value) && Qt(n.value) ? i.value.value = n.value : i.value = n.value;
1319
- } else if (r) {
1320
- const l = this.items.findIndex((a) => r(n, a) < 0);
1321
- l === -1 ? this.items.push(n) : this.items.splice(l, 0, n);
1322
- } else
1323
- this.items.push(n);
1324
- }
1325
- delete(e) {
1326
- const t = X(this.items, e);
1327
- return t ? this.items.splice(this.items.indexOf(t), 1).length > 0 : !1;
1328
- }
1329
- get(e, t) {
1330
- const n = X(this.items, e), i = n == null ? void 0 : n.value;
1331
- return (!t && E(i) ? i.value : i) ?? void 0;
1332
- }
1333
- has(e) {
1334
- return !!X(this.items, e);
1335
- }
1336
- set(e, t) {
1337
- this.add(new v(e, t), !0);
1338
- }
1339
- /**
1340
- * @param ctx - Conversion context, originally set in Document#toJS()
1341
- * @param {Class} Type - If set, forces the returned collection type
1342
- * @returns Instance of Type, Map, or Object
1343
- */
1344
- toJSON(e, t, n) {
1345
- const i = n ? new n() : t != null && t.mapAsMap ? /* @__PURE__ */ new Map() : {};
1346
- t != null && t.onCreate && t.onCreate(i);
1347
- for (const r of this.items)
1348
- xt(t, i, r);
1349
- return i;
1350
- }
1351
- toString(e, t, n) {
1352
- if (!e)
1353
- return JSON.stringify(this);
1354
- for (const i of this.items)
1355
- if (!T(i))
1356
- throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);
1357
- return !e.allNullValues && this.hasAllNullValues(!1) && (e = Object.assign({}, e, { allNullValues: !0 })), es(this, e, {
1358
- blockItemPrefix: "",
1359
- flowChars: { start: "{", end: "}" },
1360
- itemIndent: e.indent || "",
1361
- onChompKeep: n,
1362
- onComment: t
1363
- });
1364
- }
1365
- }
1366
- const me = {
1367
- collection: "map",
1368
- default: !0,
1369
- nodeClass: K,
1370
- tag: "tag:yaml.org,2002:map",
1371
- resolve(s, e) {
1372
- return de(s) || e("Expected a mapping for this tag"), s;
1373
- },
1374
- createNode: (s, e, t) => K.from(s, e, t)
1375
- };
1376
- class W extends Wt {
1377
- static get tagName() {
1378
- return "tag:yaml.org,2002:seq";
1379
- }
1380
- constructor(e) {
1381
- super(he, e), this.items = [];
1382
- }
1383
- add(e) {
1384
- this.items.push(e);
1385
- }
1386
- /**
1387
- * Removes a value from the collection.
1388
- *
1389
- * `key` must contain a representation of an integer for this to succeed.
1390
- * It may be wrapped in a `Scalar`.
1391
- *
1392
- * @returns `true` if the item was found and removed.
1393
- */
1394
- delete(e) {
1395
- const t = Le(e);
1396
- return typeof t != "number" ? !1 : this.items.splice(t, 1).length > 0;
1397
- }
1398
- get(e, t) {
1399
- const n = Le(e);
1400
- if (typeof n != "number")
1401
- return;
1402
- const i = this.items[n];
1403
- return !t && E(i) ? i.value : i;
1404
- }
1405
- /**
1406
- * Checks if the collection includes a value with the key `key`.
1407
- *
1408
- * `key` must contain a representation of an integer for this to succeed.
1409
- * It may be wrapped in a `Scalar`.
1410
- */
1411
- has(e) {
1412
- const t = Le(e);
1413
- return typeof t == "number" && t < this.items.length;
1414
- }
1415
- /**
1416
- * Sets a value in this collection. For `!!set`, `value` needs to be a
1417
- * boolean to add/remove the item from the set.
1418
- *
1419
- * If `key` does not contain a representation of an integer, this will throw.
1420
- * It may be wrapped in a `Scalar`.
1421
- */
1422
- set(e, t) {
1423
- const n = Le(e);
1424
- if (typeof n != "number")
1425
- throw new Error(`Expected a valid index, not ${e}.`);
1426
- const i = this.items[n];
1427
- E(i) && Qt(t) ? i.value = t : this.items[n] = t;
1428
- }
1429
- toJSON(e, t) {
1430
- const n = [];
1431
- t != null && t.onCreate && t.onCreate(n);
1432
- let i = 0;
1433
- for (const r of this.items)
1434
- n.push(P(r, String(i++), t));
1435
- return n;
1436
- }
1437
- toString(e, t, n) {
1438
- return e ? es(this, e, {
1439
- blockItemPrefix: "- ",
1440
- flowChars: { start: "[", end: "]" },
1441
- itemIndent: (e.indent || "") + " ",
1442
- onChompKeep: n,
1443
- onComment: t
1444
- }) : JSON.stringify(this);
1445
- }
1446
- static from(e, t, n) {
1447
- const { replacer: i } = n, r = new this(e);
1448
- if (t && Symbol.iterator in Object(t)) {
1449
- let o = 0;
1450
- for (let l of t) {
1451
- if (typeof i == "function") {
1452
- const a = t instanceof Set ? l : String(o++);
1453
- l = i.call(t, a, l);
1454
- }
1455
- r.items.push(ke(l, void 0, n));
1456
- }
1457
- }
1458
- return r;
1459
- }
1460
- }
1461
- function Le(s) {
1462
- let e = E(s) ? s.value : s;
1463
- return e && typeof e == "string" && (e = Number(e)), typeof e == "number" && Number.isInteger(e) && e >= 0 ? e : null;
1464
- }
1465
- const ye = {
1466
- collection: "seq",
1467
- default: !0,
1468
- nodeClass: W,
1469
- tag: "tag:yaml.org,2002:seq",
1470
- resolve(s, e) {
1471
- return pe(s) || e("Expected a sequence for this tag"), s;
1472
- },
1473
- createNode: (s, e, t) => W.from(s, e, t)
1474
- }, Ye = {
1475
- identify: (s) => typeof s == "string",
1476
- default: !0,
1477
- tag: "tag:yaml.org,2002:str",
1478
- resolve: (s) => s,
1479
- stringify(s, e, t, n) {
1480
- return e = Object.assign({ actualString: !0 }, e), Ae(s, e, t, n);
1481
- }
1482
- }, Ge = {
1483
- identify: (s) => s == null,
1484
- createNode: () => new A(null),
1485
- default: !0,
1486
- tag: "tag:yaml.org,2002:null",
1487
- test: /^(?:~|[Nn]ull|NULL)?$/,
1488
- resolve: () => new A(null),
1489
- stringify: ({ source: s }, e) => typeof s == "string" && Ge.test.test(s) ? s : e.options.nullStr
1490
- }, yt = {
1491
- identify: (s) => typeof s == "boolean",
1492
- default: !0,
1493
- tag: "tag:yaml.org,2002:bool",
1494
- test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
1495
- resolve: (s) => new A(s[0] === "t" || s[0] === "T"),
1496
- stringify({ source: s, value: e }, t) {
1497
- if (s && yt.test.test(s)) {
1498
- const n = s[0] === "t" || s[0] === "T";
1499
- if (e === n)
1500
- return s;
1501
- }
1502
- return e ? t.options.trueStr : t.options.falseStr;
1503
- }
1504
- };
1505
- function q({ format: s, minFractionDigits: e, tag: t, value: n }) {
1506
- if (typeof n == "bigint")
1507
- return String(n);
1508
- const i = typeof n == "number" ? n : Number(n);
1509
- if (!isFinite(i))
1510
- return isNaN(i) ? ".nan" : i < 0 ? "-.inf" : ".inf";
1511
- let r = JSON.stringify(n);
1512
- if (!s && e && (!t || t === "tag:yaml.org,2002:float") && /^\d/.test(r)) {
1513
- let o = r.indexOf(".");
1514
- o < 0 && (o = r.length, r += ".");
1515
- let l = e - (r.length - o - 1);
1516
- for (; l-- > 0; )
1517
- r += "0";
1518
- }
1519
- return r;
1520
- }
1521
- const ts = {
1522
- identify: (s) => typeof s == "number",
1523
- default: !0,
1524
- tag: "tag:yaml.org,2002:float",
1525
- test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1526
- resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1527
- stringify: q
1528
- }, ss = {
1529
- identify: (s) => typeof s == "number",
1530
- default: !0,
1531
- tag: "tag:yaml.org,2002:float",
1532
- format: "EXP",
1533
- test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
1534
- resolve: (s) => parseFloat(s),
1535
- stringify(s) {
1536
- const e = Number(s.value);
1537
- return isFinite(e) ? e.toExponential() : q(s);
1538
- }
1539
- }, ns = {
1540
- identify: (s) => typeof s == "number",
1541
- default: !0,
1542
- tag: "tag:yaml.org,2002:float",
1543
- test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
1544
- resolve(s) {
1545
- const e = new A(parseFloat(s)), t = s.indexOf(".");
1546
- return t !== -1 && s[s.length - 1] === "0" && (e.minFractionDigits = s.length - t - 1), e;
1547
- },
1548
- stringify: q
1549
- }, Qe = (s) => typeof s == "bigint" || Number.isInteger(s), gt = (s, e, t, { intAsBigInt: n }) => n ? BigInt(s) : parseInt(s.substring(e), t);
1550
- function is(s, e, t) {
1551
- const { value: n } = s;
1552
- return Qe(n) && n >= 0 ? t + n.toString(e) : q(s);
1553
- }
1554
- const rs = {
1555
- identify: (s) => Qe(s) && s >= 0,
1556
- default: !0,
1557
- tag: "tag:yaml.org,2002:int",
1558
- format: "OCT",
1559
- test: /^0o[0-7]+$/,
1560
- resolve: (s, e, t) => gt(s, 2, 8, t),
1561
- stringify: (s) => is(s, 8, "0o")
1562
- }, os = {
1563
- identify: Qe,
1564
- default: !0,
1565
- tag: "tag:yaml.org,2002:int",
1566
- test: /^[-+]?[0-9]+$/,
1567
- resolve: (s, e, t) => gt(s, 0, 10, t),
1568
- stringify: q
1569
- }, ls = {
1570
- identify: (s) => Qe(s) && s >= 0,
1571
- default: !0,
1572
- tag: "tag:yaml.org,2002:int",
1573
- format: "HEX",
1574
- test: /^0x[0-9a-fA-F]+$/,
1575
- resolve: (s, e, t) => gt(s, 2, 16, t),
1576
- stringify: (s) => is(s, 16, "0x")
1577
- }, Ws = [
1578
- me,
1579
- ye,
1580
- Ye,
1581
- Ge,
1582
- yt,
1583
- rs,
1584
- os,
1585
- ls,
1586
- ts,
1587
- ss,
1588
- ns
1589
- ];
1590
- function _t(s) {
1591
- return typeof s == "bigint" || Number.isInteger(s);
1592
- }
1593
- const $e = ({ value: s }) => JSON.stringify(s), Hs = [
1594
- {
1595
- identify: (s) => typeof s == "string",
1596
- default: !0,
1597
- tag: "tag:yaml.org,2002:str",
1598
- resolve: (s) => s,
1599
- stringify: $e
1600
- },
1601
- {
1602
- identify: (s) => s == null,
1603
- createNode: () => new A(null),
1604
- default: !0,
1605
- tag: "tag:yaml.org,2002:null",
1606
- test: /^null$/,
1607
- resolve: () => null,
1608
- stringify: $e
1609
- },
1610
- {
1611
- identify: (s) => typeof s == "boolean",
1612
- default: !0,
1613
- tag: "tag:yaml.org,2002:bool",
1614
- test: /^true$|^false$/,
1615
- resolve: (s) => s === "true",
1616
- stringify: $e
1617
- },
1618
- {
1619
- identify: _t,
1620
- default: !0,
1621
- tag: "tag:yaml.org,2002:int",
1622
- test: /^-?(?:0|[1-9][0-9]*)$/,
1623
- resolve: (s, e, { intAsBigInt: t }) => t ? BigInt(s) : parseInt(s, 10),
1624
- stringify: ({ value: s }) => _t(s) ? s.toString() : JSON.stringify(s)
1625
- },
1626
- {
1627
- identify: (s) => typeof s == "number",
1628
- default: !0,
1629
- tag: "tag:yaml.org,2002:float",
1630
- test: /^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,
1631
- resolve: (s) => parseFloat(s),
1632
- stringify: $e
1633
- }
1634
- ], Xs = {
1635
- default: !0,
1636
- tag: "",
1637
- test: /^/,
1638
- resolve(s, e) {
1639
- return e(`Unresolved plain scalar ${JSON.stringify(s)}`), s;
1640
- }
1641
- }, zs = [me, ye].concat(Hs, Xs), bt = {
1642
- identify: (s) => s instanceof Uint8Array,
1643
- // Buffer inherits from Uint8Array
1644
- default: !1,
1645
- tag: "tag:yaml.org,2002:binary",
1646
- /**
1647
- * Returns a Buffer in node and an Uint8Array in browsers
1648
- *
1649
- * To use the resulting buffer as an image, you'll want to do something like:
1650
- *
1651
- * const blob = new Blob([buffer], { type: 'image/jpeg' })
1652
- * document.querySelector('#photo').src = URL.createObjectURL(blob)
1653
- */
1654
- resolve(s, e) {
1655
- if (typeof atob == "function") {
1656
- const t = atob(s.replace(/[\n\r]/g, "")), n = new Uint8Array(t.length);
1657
- for (let i = 0; i < t.length; ++i)
1658
- n[i] = t.charCodeAt(i);
1659
- return n;
1660
- } else
1661
- return e("This environment does not support reading binary tags; either Buffer or atob is required"), s;
1662
- },
1663
- stringify({ comment: s, type: e, value: t }, n, i, r) {
1664
- if (!t)
1665
- return "";
1666
- const o = t;
1667
- let l;
1668
- if (typeof btoa == "function") {
1669
- let a = "";
1670
- for (let c = 0; c < o.length; ++c)
1671
- a += String.fromCharCode(o[c]);
1672
- l = btoa(a);
1673
- } else
1674
- throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
1675
- if (e || (e = A.BLOCK_LITERAL), e !== A.QUOTE_DOUBLE) {
1676
- const a = Math.max(n.options.lineWidth - n.indent.length, n.options.minContentWidth), c = Math.ceil(l.length / a), p = new Array(c);
1677
- for (let f = 0, d = 0; f < c; ++f, d += a)
1678
- p[f] = l.substr(d, a);
1679
- l = p.join(e === A.BLOCK_LITERAL ? `
1680
- ` : " ");
1681
- }
1682
- return Ae({ comment: s, type: e, value: l }, n, i, r);
1683
- }
1684
- };
1685
- function as(s, e) {
1686
- if (pe(s))
1687
- for (let t = 0; t < s.items.length; ++t) {
1688
- let n = s.items[t];
1689
- if (!T(n)) {
1690
- if (de(n)) {
1691
- n.items.length > 1 && e("Each pair must have its own sequence indicator");
1692
- const i = n.items[0] || new v(new A(null));
1693
- if (n.commentBefore && (i.key.commentBefore = i.key.commentBefore ? `${n.commentBefore}
1694
- ${i.key.commentBefore}` : n.commentBefore), n.comment) {
1695
- const r = i.value ?? i.key;
1696
- r.comment = r.comment ? `${n.comment}
1697
- ${r.comment}` : n.comment;
1698
- }
1699
- n = i;
1700
- }
1701
- s.items[t] = T(n) ? n : new v(n);
1702
- }
1703
- }
1704
- else
1705
- e("Expected a sequence for this tag");
1706
- return s;
1707
- }
1708
- function cs(s, e, t) {
1709
- const { replacer: n } = t, i = new W(s);
1710
- i.tag = "tag:yaml.org,2002:pairs";
1711
- let r = 0;
1712
- if (e && Symbol.iterator in Object(e))
1713
- for (let o of e) {
1714
- typeof n == "function" && (o = n.call(e, String(r++), o));
1715
- let l, a;
1716
- if (Array.isArray(o))
1717
- if (o.length === 2)
1718
- l = o[0], a = o[1];
1719
- else
1720
- throw new TypeError(`Expected [key, value] tuple: ${o}`);
1721
- else if (o && o instanceof Object) {
1722
- const c = Object.keys(o);
1723
- if (c.length === 1)
1724
- l = c[0], a = o[l];
1725
- else
1726
- throw new TypeError(`Expected tuple with one key, not ${c.length} keys`);
1727
- } else
1728
- l = o;
1729
- i.items.push(mt(l, a, t));
1730
- }
1731
- return i;
1732
- }
1733
- const wt = {
1734
- collection: "seq",
1735
- default: !1,
1736
- tag: "tag:yaml.org,2002:pairs",
1737
- resolve: as,
1738
- createNode: cs
1739
- };
1740
- class ae extends W {
1741
- constructor() {
1742
- 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;
1743
- }
1744
- /**
1745
- * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
1746
- * but TypeScript won't allow widening the signature of a child method.
1747
- */
1748
- toJSON(e, t) {
1749
- if (!t)
1750
- return super.toJSON(e);
1751
- const n = /* @__PURE__ */ new Map();
1752
- t != null && t.onCreate && t.onCreate(n);
1753
- for (const i of this.items) {
1754
- let r, o;
1755
- if (T(i) ? (r = P(i.key, "", t), o = P(i.value, r, t)) : r = P(i, "", t), n.has(r))
1756
- throw new Error("Ordered maps must not include duplicate keys");
1757
- n.set(r, o);
1758
- }
1759
- return n;
1760
- }
1761
- static from(e, t, n) {
1762
- const i = cs(e, t, n), r = new this();
1763
- return r.items = i.items, r;
1764
- }
1765
- }
1766
- ae.tag = "tag:yaml.org,2002:omap";
1767
- const St = {
1768
- collection: "seq",
1769
- identify: (s) => s instanceof Map,
1770
- nodeClass: ae,
1771
- default: !1,
1772
- tag: "tag:yaml.org,2002:omap",
1773
- resolve(s, e) {
1774
- const t = as(s, e), n = [];
1775
- for (const { key: i } of t.items)
1776
- E(i) && (n.includes(i.value) ? e(`Ordered maps must not include duplicate keys: ${i.value}`) : n.push(i.value));
1777
- return Object.assign(new ae(), t);
1778
- },
1779
- createNode: (s, e, t) => ae.from(s, e, t)
1780
- };
1781
- function fs({ value: s, source: e }, t) {
1782
- return e && (s ? us : hs).test.test(e) ? e : s ? t.options.trueStr : t.options.falseStr;
1783
- }
1784
- const us = {
1785
- identify: (s) => s === !0,
1786
- default: !0,
1787
- tag: "tag:yaml.org,2002:bool",
1788
- test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
1789
- resolve: () => new A(!0),
1790
- stringify: fs
1791
- }, hs = {
1792
- identify: (s) => s === !1,
1793
- default: !0,
1794
- tag: "tag:yaml.org,2002:bool",
1795
- test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
1796
- resolve: () => new A(!1),
1797
- stringify: fs
1798
- }, Zs = {
1799
- identify: (s) => typeof s == "number",
1800
- default: !0,
1801
- tag: "tag:yaml.org,2002:float",
1802
- test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
1803
- resolve: (s) => s.slice(-3).toLowerCase() === "nan" ? NaN : s[0] === "-" ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY,
1804
- stringify: q
1805
- }, xs = {
1806
- identify: (s) => typeof s == "number",
1807
- default: !0,
1808
- tag: "tag:yaml.org,2002:float",
1809
- format: "EXP",
1810
- test: /^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,
1811
- resolve: (s) => parseFloat(s.replace(/_/g, "")),
1812
- stringify(s) {
1813
- const e = Number(s.value);
1814
- return isFinite(e) ? e.toExponential() : q(s);
1815
- }
1816
- }, en = {
1817
- identify: (s) => typeof s == "number",
1818
- default: !0,
1819
- tag: "tag:yaml.org,2002:float",
1820
- test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
1821
- resolve(s) {
1822
- const e = new A(parseFloat(s.replace(/_/g, ""))), t = s.indexOf(".");
1823
- if (t !== -1) {
1824
- const n = s.substring(t + 1).replace(/_/g, "");
1825
- n[n.length - 1] === "0" && (e.minFractionDigits = n.length);
1826
- }
1827
- return e;
1828
- },
1829
- stringify: q
1830
- }, Ee = (s) => typeof s == "bigint" || Number.isInteger(s);
1831
- function We(s, e, t, { intAsBigInt: n }) {
1832
- const i = s[0];
1833
- if ((i === "-" || i === "+") && (e += 1), s = s.substring(e).replace(/_/g, ""), n) {
1834
- switch (t) {
1835
- case 2:
1836
- s = `0b${s}`;
1837
- break;
1838
- case 8:
1839
- s = `0o${s}`;
1840
- break;
1841
- case 16:
1842
- s = `0x${s}`;
1843
- break;
1844
- }
1845
- const o = BigInt(s);
1846
- return i === "-" ? BigInt(-1) * o : o;
1847
- }
1848
- const r = parseInt(s, t);
1849
- return i === "-" ? -1 * r : r;
1850
- }
1851
- function kt(s, e, t) {
1852
- const { value: n } = s;
1853
- if (Ee(n)) {
1854
- const i = n.toString(e);
1855
- return n < 0 ? "-" + t + i.substr(1) : t + i;
1856
- }
1857
- return q(s);
1858
- }
1859
- const tn = {
1860
- identify: Ee,
1861
- default: !0,
1862
- tag: "tag:yaml.org,2002:int",
1863
- format: "BIN",
1864
- test: /^[-+]?0b[0-1_]+$/,
1865
- resolve: (s, e, t) => We(s, 2, 2, t),
1866
- stringify: (s) => kt(s, 2, "0b")
1867
- }, sn = {
1868
- identify: Ee,
1869
- default: !0,
1870
- tag: "tag:yaml.org,2002:int",
1871
- format: "OCT",
1872
- test: /^[-+]?0[0-7_]+$/,
1873
- resolve: (s, e, t) => We(s, 1, 8, t),
1874
- stringify: (s) => kt(s, 8, "0")
1875
- }, nn = {
1876
- identify: Ee,
1877
- default: !0,
1878
- tag: "tag:yaml.org,2002:int",
1879
- test: /^[-+]?[0-9][0-9_]*$/,
1880
- resolve: (s, e, t) => We(s, 0, 10, t),
1881
- stringify: q
1882
- }, rn = {
1883
- identify: Ee,
1884
- default: !0,
1885
- tag: "tag:yaml.org,2002:int",
1886
- format: "HEX",
1887
- test: /^[-+]?0x[0-9a-fA-F_]+$/,
1888
- resolve: (s, e, t) => We(s, 2, 16, t),
1889
- stringify: (s) => kt(s, 16, "0x")
1890
- };
1891
- class ce extends K {
1892
- constructor(e) {
1893
- super(e), this.tag = ce.tag;
1894
- }
1895
- add(e) {
1896
- let t;
1897
- T(e) ? t = e : e && typeof e == "object" && "key" in e && "value" in e && e.value === null ? t = new v(e.key, null) : t = new v(e, null), X(this.items, t.key) || this.items.push(t);
1898
- }
1899
- /**
1900
- * If `keepPair` is `true`, returns the Pair matching `key`.
1901
- * Otherwise, returns the value of that Pair's key.
1902
- */
1903
- get(e, t) {
1904
- const n = X(this.items, e);
1905
- return !t && T(n) ? E(n.key) ? n.key.value : n.key : n;
1906
- }
1907
- set(e, t) {
1908
- if (typeof t != "boolean")
1909
- throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);
1910
- const n = X(this.items, e);
1911
- n && !t ? this.items.splice(this.items.indexOf(n), 1) : !n && t && this.items.push(new v(e));
1912
- }
1913
- toJSON(e, t) {
1914
- return super.toJSON(e, t, Set);
1915
- }
1916
- toString(e, t, n) {
1917
- if (!e)
1918
- return JSON.stringify(this);
1919
- if (this.hasAllNullValues(!0))
1920
- return super.toString(Object.assign({}, e, { allNullValues: !0 }), t, n);
1921
- throw new Error("Set items must all have null values");
1922
- }
1923
- static from(e, t, n) {
1924
- const { replacer: i } = n, r = new this(e);
1925
- if (t && Symbol.iterator in Object(t))
1926
- for (let o of t)
1927
- typeof i == "function" && (o = i.call(t, o, o)), r.items.push(mt(o, null, n));
1928
- return r;
1929
- }
1930
- }
1931
- ce.tag = "tag:yaml.org,2002:set";
1932
- const Nt = {
1933
- collection: "map",
1934
- identify: (s) => s instanceof Set,
1935
- nodeClass: ce,
1936
- default: !1,
1937
- tag: "tag:yaml.org,2002:set",
1938
- createNode: (s, e, t) => ce.from(s, e, t),
1939
- resolve(s, e) {
1940
- if (de(s)) {
1941
- if (s.hasAllNullValues(!0))
1942
- return Object.assign(new ce(), s);
1943
- e("Set items must all have null values");
1944
- } else
1945
- e("Expected a mapping for this tag");
1946
- return s;
1947
- }
1948
- };
1949
- function Ot(s, e) {
1950
- 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));
1951
- return t === "-" ? i(-1) * r : r;
1952
- }
1953
- function ds(s) {
1954
- let { value: e } = s, t = (o) => o;
1955
- if (typeof e == "bigint")
1956
- t = (o) => BigInt(o);
1957
- else if (isNaN(e) || !isFinite(e))
1958
- return q(s);
1959
- let n = "";
1960
- e < 0 && (n = "-", e *= t(-1));
1961
- const i = t(60), r = [e % i];
1962
- 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*$/, "");
1963
- }
1964
- const ps = {
1965
- identify: (s) => typeof s == "bigint" || Number.isInteger(s),
1966
- default: !0,
1967
- tag: "tag:yaml.org,2002:int",
1968
- format: "TIME",
1969
- test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,
1970
- resolve: (s, e, { intAsBigInt: t }) => Ot(s, t),
1971
- stringify: ds
1972
- }, ms = {
1973
- identify: (s) => typeof s == "number",
1974
- default: !0,
1975
- tag: "tag:yaml.org,2002:float",
1976
- format: "TIME",
1977
- test: /^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,
1978
- resolve: (s) => Ot(s, !1),
1979
- stringify: ds
1980
- }, He = {
1981
- identify: (s) => s instanceof Date,
1982
- default: !0,
1983
- tag: "tag:yaml.org,2002:timestamp",
1984
- // If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
1985
- // may be omitted altogether, resulting in a date format. In such a case, the time part is
1986
- // assumed to be 00:00:00Z (start of day, UTC).
1987
- 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})?))?)?$"),
1988
- resolve(s) {
1989
- const e = s.match(He.test);
1990
- if (!e)
1991
- throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");
1992
- const [, t, n, i, r, o, l] = e.map(Number), a = e[7] ? Number((e[7] + "00").substr(1, 3)) : 0;
1993
- let c = Date.UTC(t, n - 1, i, r || 0, o || 0, l || 0, a);
1994
- const p = e[8];
1995
- if (p && p !== "Z") {
1996
- let f = Ot(p, !1);
1997
- Math.abs(f) < 30 && (f *= 60), c -= 6e4 * f;
1998
- }
1999
- return new Date(c);
2000
- },
2001
- stringify: ({ value: s }) => (s == null ? void 0 : s.toISOString().replace(/(T00:00:00)?\.000Z$/, "")) ?? ""
2002
- }, Ct = [
2003
- me,
2004
- ye,
2005
- Ye,
2006
- Ge,
2007
- us,
2008
- hs,
2009
- tn,
2010
- sn,
2011
- nn,
2012
- rn,
2013
- Zs,
2014
- xs,
2015
- en,
2016
- bt,
2017
- V,
2018
- St,
2019
- wt,
2020
- Nt,
2021
- ps,
2022
- ms,
2023
- He
2024
- ], vt = /* @__PURE__ */ new Map([
2025
- ["core", Ws],
2026
- ["failsafe", [me, ye, Ye]],
2027
- ["json", zs],
2028
- ["yaml11", Ct],
2029
- ["yaml-1.1", Ct]
2030
- ]), Bt = {
2031
- binary: bt,
2032
- bool: yt,
2033
- float: ns,
2034
- floatExp: ss,
2035
- floatNaN: ts,
2036
- floatTime: ms,
2037
- int: os,
2038
- intHex: ls,
2039
- intOct: rs,
2040
- intTime: ps,
2041
- map: me,
2042
- merge: V,
2043
- null: Ge,
2044
- omap: St,
2045
- pairs: wt,
2046
- seq: ye,
2047
- set: Nt,
2048
- timestamp: He
2049
- }, on = {
2050
- "tag:yaml.org,2002:binary": bt,
2051
- "tag:yaml.org,2002:merge": V,
2052
- "tag:yaml.org,2002:omap": St,
2053
- "tag:yaml.org,2002:pairs": wt,
2054
- "tag:yaml.org,2002:set": Nt,
2055
- "tag:yaml.org,2002:timestamp": He
2056
- };
2057
- function tt(s, e, t) {
2058
- const n = vt.get(e);
2059
- if (n && !s)
2060
- return t && !n.includes(V) ? n.concat(V) : n.slice();
2061
- let i = n;
2062
- if (!i)
2063
- if (Array.isArray(s))
2064
- i = [];
2065
- else {
2066
- const r = Array.from(vt.keys()).filter((o) => o !== "yaml11").map((o) => JSON.stringify(o)).join(", ");
2067
- throw new Error(`Unknown schema "${e}"; use one of ${r} or define customTags array`);
2068
- }
2069
- if (Array.isArray(s))
2070
- for (const r of s)
2071
- i = i.concat(r);
2072
- else typeof s == "function" && (i = s(i.slice()));
2073
- return t && (i = i.concat(V)), i.reduce((r, o) => {
2074
- const l = typeof o == "string" ? Bt[o] : o;
2075
- if (!l) {
2076
- const a = JSON.stringify(o), c = Object.keys(Bt).map((p) => JSON.stringify(p)).join(", ");
2077
- throw new Error(`Unknown custom tag ${a}; use one of ${c}`);
2078
- }
2079
- return r.includes(l) || r.push(l), r;
2080
- }, []);
2081
- }
2082
- const ln = (s, e) => s.key < e.key ? -1 : s.key > e.key ? 1 : 0;
2083
- class Xe {
2084
- constructor({ compat: e, customTags: t, merge: n, resolveKnownTags: i, schema: r, sortMapEntries: o, toStringDefaults: l }) {
2085
- 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, G, { value: me }), Object.defineProperty(this, R, { value: Ye }), Object.defineProperty(this, he, { value: ye }), this.sortMapEntries = typeof o == "function" ? o : o === !0 ? ln : null;
2086
- }
2087
- clone() {
2088
- const e = Object.create(Xe.prototype, Object.getOwnPropertyDescriptors(this));
2089
- return e.tags = this.tags.slice(), e;
2090
- }
2091
- }
2092
- function an(s, e) {
2093
- var a;
2094
- const t = [];
2095
- let n = e.directives === !0;
2096
- if (e.directives !== !1 && s.directives) {
2097
- const c = s.directives.toString(s);
2098
- c ? (t.push(c), n = !0) : s.directives.docStart && (n = !0);
2099
- }
2100
- n && t.push("---");
2101
- const i = Xt(s, e), { commentString: r } = i.options;
2102
- if (s.commentBefore) {
2103
- t.length !== 1 && t.unshift("");
2104
- const c = r(s.commentBefore);
2105
- t.unshift(U(c, ""));
2106
- }
2107
- let o = !1, l = null;
2108
- if (s.contents) {
2109
- if ($(s.contents)) {
2110
- if (s.contents.spaceBefore && n && t.push(""), s.contents.commentBefore) {
2111
- const f = r(s.contents.commentBefore);
2112
- t.push(U(f, ""));
2113
- }
2114
- i.forceBlockIndent = !!s.comment, l = s.contents.comment;
2115
- }
2116
- const c = l ? void 0 : () => o = !0;
2117
- let p = fe(s.contents, i, () => l = null, c);
2118
- l && (p += H(p, "", r(l))), (p[0] === "|" || p[0] === ">") && t[t.length - 1] === "---" ? t[t.length - 1] = `--- ${p}` : t.push(p);
2119
- } else
2120
- t.push(fe(s.contents, i));
2121
- if ((a = s.directives) != null && a.docEnd)
2122
- if (s.comment) {
2123
- const c = r(s.comment);
2124
- c.includes(`
2125
- `) ? (t.push("..."), t.push(U(c, ""))) : t.push(`... ${c}`);
2126
- } else
2127
- t.push("...");
2128
- else {
2129
- let c = s.comment;
2130
- c && o && (c = c.replace(/^\n+/, "")), c && ((!o || l) && t[t.length - 1] !== "" && t.push(""), t.push(U(r(c), "")));
2131
- }
2132
- return t.join(`
2133
- `) + `
2134
- `;
2135
- }
2136
- class ge {
2137
- constructor(e, t, n) {
2138
- this.commentBefore = null, this.comment = null, this.errors = [], this.warnings = [], Object.defineProperty(this, j, { value: lt });
2139
- let i = null;
2140
- typeof t == "function" || Array.isArray(t) ? i = t : n === void 0 && t && (n = t, t = void 0);
2141
- const r = Object.assign({
2142
- intAsBigInt: !1,
2143
- keepSourceTokens: !1,
2144
- logLevel: "warn",
2145
- prettyErrors: !0,
2146
- strict: !0,
2147
- stringKeys: !1,
2148
- uniqueKeys: !0,
2149
- version: "1.2"
2150
- }, n);
2151
- this.options = r;
2152
- let { version: o } = r;
2153
- n != null && n._directives ? (this.directives = n._directives.atDocument(), this.directives.yaml.explicit && (o = this.directives.yaml.version)) : this.directives = new B({ version: o }), this.setSchema(o, n), this.contents = e === void 0 ? null : this.createNode(e, i, n);
2154
- }
2155
- /**
2156
- * Create a deep copy of this Document and its contents.
2157
- *
2158
- * Custom Node values that inherit from `Object` still refer to their original instances.
2159
- */
2160
- clone() {
2161
- const e = Object.create(ge.prototype, {
2162
- [j]: { value: lt }
2163
- });
2164
- 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;
2165
- }
2166
- /** Adds a value to the document. */
2167
- add(e) {
2168
- se(this.contents) && this.contents.add(e);
2169
- }
2170
- /** Adds a value to the document. */
2171
- addIn(e, t) {
2172
- se(this.contents) && this.contents.addIn(e, t);
2173
- }
2174
- /**
2175
- * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
2176
- *
2177
- * If `node` already has an anchor, `name` is ignored.
2178
- * Otherwise, the `node.anchor` value will be set to `name`,
2179
- * or if an anchor with that name is already present in the document,
2180
- * `name` will be used as a prefix for a new unique anchor.
2181
- * If `name` is undefined, the generated anchor will use 'a' as a prefix.
2182
- */
2183
- createAlias(e, t) {
2184
- if (!e.anchor) {
2185
- const n = Yt(this);
2186
- e.anchor = // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2187
- !t || n.has(t) ? Gt(t || "a", n) : t;
2188
- }
2189
- return new Re(e.anchor);
2190
- }
2191
- createNode(e, t, n) {
2192
- let i;
2193
- if (typeof t == "function")
2194
- e = t.call({ "": e }, "", e), i = t;
2195
- else if (Array.isArray(t)) {
2196
- const m = (S) => typeof S == "number" || S instanceof String || S instanceof Number, b = t.filter(m).map(String);
2197
- b.length > 0 && (t = t.concat(b)), i = t;
2198
- } else n === void 0 && t && (n = t, t = void 0);
2199
- const { aliasDuplicateObjects: r, anchorPrefix: o, flow: l, keepUndefined: a, onTagObj: c, tag: p } = n ?? {}, { onAnchor: f, setAnchors: d, sourceObjects: h } = Ks(
2200
- this,
2201
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
2202
- o || "a"
2203
- ), y = {
2204
- aliasDuplicateObjects: r ?? !0,
2205
- keepUndefined: a ?? !1,
2206
- onAnchor: f,
2207
- onTagObj: c,
2208
- replacer: i,
2209
- schema: this.schema,
2210
- sourceObjects: h
2211
- }, u = ke(e, p, y);
2212
- return l && L(u) && (u.flow = !0), d(), u;
2213
- }
2214
- /**
2215
- * Convert a key and a value into a `Pair` using the current schema,
2216
- * recursively wrapping all values as `Scalar` or `Collection` nodes.
2217
- */
2218
- createPair(e, t, n = {}) {
2219
- const i = this.createNode(e, null, n), r = this.createNode(t, null, n);
2220
- return new v(i, r);
2221
- }
2222
- /**
2223
- * Removes a value from the document.
2224
- * @returns `true` if the item was found and removed.
2225
- */
2226
- delete(e) {
2227
- return se(this.contents) ? this.contents.delete(e) : !1;
2228
- }
2229
- /**
2230
- * Removes a value from the document.
2231
- * @returns `true` if the item was found and removed.
2232
- */
2233
- deleteIn(e) {
2234
- return we(e) ? this.contents == null ? !1 : (this.contents = null, !0) : se(this.contents) ? this.contents.deleteIn(e) : !1;
2235
- }
2236
- /**
2237
- * Returns item at `key`, or `undefined` if not found. By default unwraps
2238
- * scalar values from their surrounding node; to disable set `keepScalar` to
2239
- * `true` (collections are always returned intact).
2240
- */
2241
- get(e, t) {
2242
- return L(this.contents) ? this.contents.get(e, t) : void 0;
2243
- }
2244
- /**
2245
- * Returns item at `path`, or `undefined` if not found. By default unwraps
2246
- * scalar values from their surrounding node; to disable set `keepScalar` to
2247
- * `true` (collections are always returned intact).
2248
- */
2249
- getIn(e, t) {
2250
- return we(e) ? !t && E(this.contents) ? this.contents.value : this.contents : L(this.contents) ? this.contents.getIn(e, t) : void 0;
2251
- }
2252
- /**
2253
- * Checks if the document includes a value with the key `key`.
2254
- */
2255
- has(e) {
2256
- return L(this.contents) ? this.contents.has(e) : !1;
2257
- }
2258
- /**
2259
- * Checks if the document includes a value at `path`.
2260
- */
2261
- hasIn(e) {
2262
- return we(e) ? this.contents !== void 0 : L(this.contents) ? this.contents.hasIn(e) : !1;
2263
- }
2264
- /**
2265
- * Sets a value in this document. For `!!set`, `value` needs to be a
2266
- * boolean to add/remove the item from the set.
2267
- */
2268
- set(e, t) {
2269
- this.contents == null ? this.contents = Pe(this.schema, [e], t) : se(this.contents) && this.contents.set(e, t);
2270
- }
2271
- /**
2272
- * Sets a value in this document. For `!!set`, `value` needs to be a
2273
- * boolean to add/remove the item from the set.
2274
- */
2275
- setIn(e, t) {
2276
- 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);
2277
- }
2278
- /**
2279
- * Change the YAML version and schema used by the document.
2280
- * A `null` version disables support for directives, explicit tags, anchors, and aliases.
2281
- * It also requires the `schema` option to be given as a `Schema` instance value.
2282
- *
2283
- * Overrides all previously set schema options.
2284
- */
2285
- setSchema(e, t = {}) {
2286
- typeof e == "number" && (e = String(e));
2287
- let n;
2288
- switch (e) {
2289
- case "1.1":
2290
- this.directives ? this.directives.yaml.version = "1.1" : this.directives = new B({ version: "1.1" }), n = { resolveKnownTags: !1, schema: "yaml-1.1" };
2291
- break;
2292
- case "1.2":
2293
- case "next":
2294
- this.directives ? this.directives.yaml.version = e : this.directives = new B({ version: e }), n = { resolveKnownTags: !0, schema: "core" };
2295
- break;
2296
- case null:
2297
- this.directives && delete this.directives, n = null;
2298
- break;
2299
- default: {
2300
- const i = JSON.stringify(e);
2301
- throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`);
2302
- }
2303
- }
2304
- if (t.schema instanceof Object)
2305
- this.schema = t.schema;
2306
- else if (n)
2307
- this.schema = new Xe(Object.assign(n, t));
2308
- else
2309
- throw new Error("With a null YAML version, the { schema: Schema } option is required");
2310
- }
2311
- // json & jsonArg are only used from toJSON()
2312
- toJS({ json: e, jsonArg: t, mapAsMap: n, maxAliasCount: i, onAnchor: r, reviver: o } = {}) {
2313
- const l = {
2314
- anchors: /* @__PURE__ */ new Map(),
2315
- doc: this,
2316
- keep: !e,
2317
- mapAsMap: n === !0,
2318
- mapKeyWarned: !1,
2319
- maxAliasCount: typeof i == "number" ? i : 100
2320
- }, a = P(this.contents, t ?? "", l);
2321
- if (typeof r == "function")
2322
- for (const { count: c, res: p } of l.anchors.values())
2323
- r(p, c);
2324
- return typeof o == "function" ? oe(o, { "": a }, "", a) : a;
2325
- }
2326
- /**
2327
- * A JSON representation of the document `contents`.
2328
- *
2329
- * @param jsonArg Used by `JSON.stringify` to indicate the array index or
2330
- * property name.
2331
- */
2332
- toJSON(e, t) {
2333
- return this.toJS({ json: !0, jsonArg: e, mapAsMap: !1, onAnchor: t });
2334
- }
2335
- /** A YAML representation of the document. */
2336
- toString(e = {}) {
2337
- if (this.errors.length > 0)
2338
- throw new Error("Document with errors cannot be stringified");
2339
- if ("indent" in e && (!Number.isInteger(e.indent) || Number(e.indent) <= 0)) {
2340
- const t = JSON.stringify(e.indent);
2341
- throw new Error(`"indent" option must be a positive integer, not ${t}`);
2342
- }
2343
- return an(this, e);
2344
- }
2345
- }
2346
- function se(s) {
2347
- if (L(s))
2348
- return !0;
2349
- throw new Error("Expected a YAML collection as document contents");
2350
- }
2351
- class At extends Error {
2352
- constructor(e, t, n, i) {
2353
- super(), this.name = e, this.code = n, this.message = i, this.pos = t;
2354
- }
2355
- }
2356
- class z extends At {
2357
- constructor(e, t, n) {
2358
- super("YAMLParseError", e, t, n);
2359
- }
2360
- }
2361
- class ys extends At {
2362
- constructor(e, t, n) {
2363
- super("YAMLWarning", e, t, n);
2364
- }
2365
- }
2366
- const De = (s, e) => (t) => {
2367
- if (t.pos[0] === -1)
2368
- return;
2369
- t.linePos = t.pos.map((l) => e.linePos(l));
2370
- const { line: n, col: i } = t.linePos[0];
2371
- t.message += ` at line ${n}, column ${i}`;
2372
- let r = i - 1, o = s.substring(e.lineStarts[n - 1], e.lineStarts[n]).replace(/[\n\r]+$/, "");
2373
- if (r >= 60 && o.length > 80) {
2374
- const l = Math.min(r - 39, o.length - 79);
2375
- o = "…" + o.substring(l), r -= l - 1;
2376
- }
2377
- if (o.length > 80 && (o = o.substring(0, 79) + "…"), n > 1 && /^ *$/.test(o.substring(0, r))) {
2378
- let l = s.substring(e.lineStarts[n - 2], e.lineStarts[n - 1]);
2379
- l.length > 80 && (l = l.substring(0, 79) + `…
2380
- `), o = l + o;
2381
- }
2382
- if (/[^ ]/.test(o)) {
2383
- let l = 1;
2384
- const a = t.linePos[1];
2385
- a && a.line === n && a.col > i && (l = Math.max(1, Math.min(a.col - i, 80 - r)));
2386
- const c = " ".repeat(r) + "^".repeat(l);
2387
- t.message += `:
2388
-
2389
- ${o}
2390
- ${c}
2391
- `;
2392
- }
2393
- };
2394
- function ue(s, { flow: e, indicator: t, next: n, offset: i, onError: r, parentIndent: o, startOnNewline: l }) {
2395
- let a = !1, c = l, p = l, f = "", d = "", h = !1, y = !1, u = null, m = null, b = null, S = null, N = null, w = null, k = null;
2396
- for (const g of s)
2397
- 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) {
2398
- case "space":
2399
- !e && (t !== "doc-start" || (n == null ? void 0 : n.type) !== "flow-collection") && g.source.includes(" ") && (u = g), p = !0;
2400
- break;
2401
- case "comment": {
2402
- p || r(g, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2403
- const _ = g.source.substring(1) || " ";
2404
- f ? f += d + _ : f = _, d = "", c = !1;
2405
- break;
2406
- }
2407
- case "newline":
2408
- c ? f ? f += g.source : (!w || t !== "seq-item-ind") && (a = !0) : d += g.source, c = !0, h = !0, (m || b) && (S = g), p = !0;
2409
- break;
2410
- case "anchor":
2411
- 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, k === null && (k = g.offset), c = !1, p = !1, y = !0;
2412
- break;
2413
- case "tag": {
2414
- b && r(g, "MULTIPLE_TAGS", "A node can have at most one tag"), b = g, k === null && (k = g.offset), c = !1, p = !1, y = !0;
2415
- break;
2416
- }
2417
- case t:
2418
- (m || b) && r(g, "BAD_PROP_ORDER", `Anchors and tags must be after the ${g.source} indicator`), w && r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.source} in ${e ?? "collection"}`), w = g, c = t === "seq-item-ind" || t === "explicit-key-ind", p = !1;
2419
- break;
2420
- case "comma":
2421
- if (e) {
2422
- N && r(g, "UNEXPECTED_TOKEN", `Unexpected , in ${e}`), N = g, c = !1, p = !1;
2423
- break;
2424
- }
2425
- // else fallthrough
2426
- default:
2427
- r(g, "UNEXPECTED_TOKEN", `Unexpected ${g.type} token`), c = !1, p = !1;
2428
- }
2429
- const O = s[s.length - 1], I = O ? O.offset + O.source.length : i;
2430
- 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"), {
2431
- comma: N,
2432
- found: w,
2433
- spaceBefore: a,
2434
- comment: f,
2435
- hasNewline: h,
2436
- anchor: m,
2437
- tag: b,
2438
- newlineAfterProp: S,
2439
- end: I,
2440
- start: k ?? I
2441
- };
2442
- }
2443
- function Ne(s) {
2444
- if (!s)
2445
- return null;
2446
- switch (s.type) {
2447
- case "alias":
2448
- case "scalar":
2449
- case "double-quoted-scalar":
2450
- case "single-quoted-scalar":
2451
- if (s.source.includes(`
2452
- `))
2453
- return !0;
2454
- if (s.end) {
2455
- for (const e of s.end)
2456
- if (e.type === "newline")
2457
- return !0;
2458
- }
2459
- return !1;
2460
- case "flow-collection":
2461
- for (const e of s.items) {
2462
- for (const t of e.start)
2463
- if (t.type === "newline")
2464
- return !0;
2465
- if (e.sep) {
2466
- for (const t of e.sep)
2467
- if (t.type === "newline")
2468
- return !0;
2469
- }
2470
- if (Ne(e.key) || Ne(e.value))
2471
- return !0;
2472
- }
2473
- return !1;
2474
- default:
2475
- return !0;
2476
- }
2477
- }
2478
- function ut(s, e, t) {
2479
- if ((e == null ? void 0 : e.type) === "flow-collection") {
2480
- const n = e.end[0];
2481
- n.indent === s && (n.source === "]" || n.source === "}") && Ne(e) && t(n, "BAD_INDENT", "Flow end indicator should be more indented than parent", !0);
2482
- }
2483
- }
2484
- function gs(s, e, t) {
2485
- const { uniqueKeys: n } = s.options;
2486
- if (n === !1)
2487
- return !1;
2488
- const i = typeof n == "function" ? n : (r, o) => r === o || E(r) && E(o) && r.value === o.value;
2489
- return e.some((r) => i(r.key, t));
2490
- }
2491
- const Mt = "All mapping items must start at the same column";
2492
- function cn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2493
- var p;
2494
- const o = (r == null ? void 0 : r.nodeClass) ?? K, l = new o(t.schema);
2495
- t.atRoot && (t.atRoot = !1);
2496
- let a = n.offset, c = null;
2497
- for (const f of n.items) {
2498
- const { start: d, key: h, sep: y, value: u } = f, m = ue(d, {
2499
- indicator: "explicit-key-ind",
2500
- next: h ?? (y == null ? void 0 : y[0]),
2501
- offset: a,
2502
- onError: i,
2503
- parentIndent: n.indent,
2504
- startOnNewline: !0
2505
- }), b = !m.found;
2506
- if (b) {
2507
- 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) {
2508
- c = m.end, m.comment && (l.comment ? l.comment += `
2509
- ` + m.comment : l.comment = m.comment);
2510
- continue;
2511
- }
2512
- (m.newlineAfterProp || Ne(h)) && i(h ?? d[d.length - 1], "MULTILINE_IMPLICIT_KEY", "Implicit keys need to be on a single line");
2513
- } else ((p = m.found) == null ? void 0 : p.indent) !== n.indent && i(a, "BAD_INDENT", Mt);
2514
- t.atKey = !0;
2515
- const S = m.end, N = h ? s(t, h, m, i) : e(t, S, d, null, m, i);
2516
- t.schema.compat && ut(n.indent, h, i), t.atKey = !1, gs(t, l.items, N) && i(S, "DUPLICATE_KEY", "Map keys must be unique");
2517
- const w = ue(y ?? [], {
2518
- indicator: "map-value-ind",
2519
- next: u,
2520
- offset: N.range[2],
2521
- onError: i,
2522
- parentIndent: n.indent,
2523
- startOnNewline: !h || h.type === "block-scalar"
2524
- });
2525
- if (a = w.end, w.found) {
2526
- b && ((u == null ? void 0 : u.type) === "block-map" && !w.hasNewline && i(a, "BLOCK_AS_IMPLICIT_KEY", "Nested mappings are not allowed in compact mappings"), t.options.strict && m.start < w.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"));
2527
- const k = u ? s(t, u, w, i) : e(t, a, y, null, w, i);
2528
- t.schema.compat && ut(n.indent, u, i), a = k.range[2];
2529
- const O = new v(N, k);
2530
- t.options.keepSourceTokens && (O.srcToken = f), l.items.push(O);
2531
- } else {
2532
- b && i(N.range, "MISSING_CHAR", "Implicit map keys need to be followed by map values"), w.comment && (N.comment ? N.comment += `
2533
- ` + w.comment : N.comment = w.comment);
2534
- const k = new v(N);
2535
- t.options.keepSourceTokens && (k.srcToken = f), l.items.push(k);
2536
- }
2537
- }
2538
- return c && c < a && i(c, "IMPOSSIBLE", "Map comment with trailing content"), l.range = [n.offset, a, c ?? a], l;
2539
- }
2540
- function fn({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2541
- const o = (r == null ? void 0 : r.nodeClass) ?? W, l = new o(t.schema);
2542
- t.atRoot && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2543
- let a = n.offset, c = null;
2544
- for (const { start: p, value: f } of n.items) {
2545
- const d = ue(p, {
2546
- indicator: "seq-item-ind",
2547
- next: f,
2548
- offset: a,
2549
- onError: i,
2550
- parentIndent: n.indent,
2551
- startOnNewline: !0
2552
- });
2553
- if (!d.found)
2554
- if (d.anchor || d.tag || f)
2555
- 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");
2556
- else {
2557
- c = d.end, d.comment && (l.comment = d.comment);
2558
- continue;
2559
- }
2560
- const h = f ? s(t, f, d, i) : e(t, d.end, p, null, d, i);
2561
- t.schema.compat && ut(n.indent, f, i), a = h.range[2], l.items.push(h);
2562
- }
2563
- return l.range = [n.offset, a, c ?? a], l;
2564
- }
2565
- function Ie(s, e, t, n) {
2566
- let i = "";
2567
- if (s) {
2568
- let r = !1, o = "";
2569
- for (const l of s) {
2570
- const { source: a, type: c } = l;
2571
- switch (c) {
2572
- case "space":
2573
- r = !0;
2574
- break;
2575
- case "comment": {
2576
- t && !r && n(l, "MISSING_CHAR", "Comments must be separated from other tokens by white space characters");
2577
- const p = a.substring(1) || " ";
2578
- i ? i += o + p : i = p, o = "";
2579
- break;
2580
- }
2581
- case "newline":
2582
- i && (o += a), r = !0;
2583
- break;
2584
- default:
2585
- n(l, "UNEXPECTED_TOKEN", `Unexpected ${c} at node end`);
2586
- }
2587
- e += a.length;
2588
- }
2589
- }
2590
- return { comment: i, offset: e };
2591
- }
2592
- const st = "Block collections are not allowed within flow collections", nt = (s) => s && (s.type === "block-map" || s.type === "block-seq");
2593
- function un({ composeNode: s, composeEmptyNode: e }, t, n, i, r) {
2594
- const o = n.start.source === "{", l = o ? "flow map" : "flow sequence", a = (r == null ? void 0 : r.nodeClass) ?? (o ? K : W), c = new a(t.schema);
2595
- c.flow = !0;
2596
- const p = t.atRoot;
2597
- p && (t.atRoot = !1), t.atKey && (t.atKey = !1);
2598
- let f = n.offset + n.start.source.length;
2599
- for (let m = 0; m < n.items.length; ++m) {
2600
- const b = n.items[m], { start: S, key: N, sep: w, value: k } = b, O = ue(S, {
2601
- flow: l,
2602
- indicator: "explicit-key-ind",
2603
- next: N ?? (w == null ? void 0 : w[0]),
2604
- offset: f,
2605
- onError: i,
2606
- parentIndent: n.indent,
2607
- startOnNewline: !1
2608
- });
2609
- if (!O.found) {
2610
- if (!O.anchor && !O.tag && !w && !k) {
2611
- m === 0 && O.comma ? i(O.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`) : m < n.items.length - 1 && i(O.start, "UNEXPECTED_TOKEN", `Unexpected empty item in ${l}`), O.comment && (c.comment ? c.comment += `
2612
- ` + O.comment : c.comment = O.comment), f = O.end;
2613
- continue;
2614
- }
2615
- !o && t.options.strict && Ne(N) && i(
2616
- N,
2617
- // checked by containsNewline()
2618
- "MULTILINE_IMPLICIT_KEY",
2619
- "Implicit keys of flow sequence pairs need to be on a single line"
2620
- );
2621
- }
2622
- if (m === 0)
2623
- O.comma && i(O.comma, "UNEXPECTED_TOKEN", `Unexpected , in ${l}`);
2624
- else if (O.comma || i(O.start, "MISSING_CHAR", `Missing , between ${l} items`), O.comment) {
2625
- let I = "";
2626
- e: for (const g of S)
2627
- switch (g.type) {
2628
- case "comma":
2629
- case "space":
2630
- break;
2631
- case "comment":
2632
- I = g.source.substring(1);
2633
- break e;
2634
- default:
2635
- break e;
2636
- }
2637
- if (I) {
2638
- let g = c.items[c.items.length - 1];
2639
- T(g) && (g = g.value ?? g.key), g.comment ? g.comment += `
2640
- ` + I : g.comment = I, O.comment = O.comment.substring(I.length + 1);
2641
- }
2642
- }
2643
- if (!o && !w && !O.found) {
2644
- const I = k ? s(t, k, O, i) : e(t, O.end, w, null, O, i);
2645
- c.items.push(I), f = I.range[2], nt(k) && i(I.range, "BLOCK_IN_FLOW", st);
2646
- } else {
2647
- t.atKey = !0;
2648
- const I = O.end, g = N ? s(t, N, O, i) : e(t, I, S, null, O, i);
2649
- nt(N) && i(g.range, "BLOCK_IN_FLOW", st), t.atKey = !1;
2650
- const _ = ue(w ?? [], {
2651
- flow: l,
2652
- indicator: "map-value-ind",
2653
- next: k,
2654
- offset: g.range[2],
2655
- onError: i,
2656
- parentIndent: n.indent,
2657
- startOnNewline: !1
2658
- });
2659
- if (_.found) {
2660
- if (!o && !O.found && t.options.strict) {
2661
- if (w)
2662
- for (const C of w) {
2663
- if (C === _.found)
2664
- break;
2665
- if (C.type === "newline") {
2666
- i(C, "MULTILINE_IMPLICIT_KEY", "Implicit keys of flow sequence pairs need to be on a single line");
2667
- break;
2668
- }
2669
- }
2670
- O.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");
2671
- }
2672
- } else k && ("source" in k && k.source && k.source[0] === ":" ? i(k, "MISSING_CHAR", `Missing space after : in ${l}`) : i(_.start, "MISSING_CHAR", `Missing , or : between ${l} items`));
2673
- const J = k ? s(t, k, _, i) : _.found ? e(t, _.end, w, null, _, i) : null;
2674
- J ? nt(k) && i(J.range, "BLOCK_IN_FLOW", st) : _.comment && (g.comment ? g.comment += `
2675
- ` + _.comment : g.comment = _.comment);
2676
- const te = new v(g, J);
2677
- if (t.options.keepSourceTokens && (te.srcToken = b), o) {
2678
- const C = c;
2679
- gs(t, C.items, g) && i(I, "DUPLICATE_KEY", "Map keys must be unique"), C.items.push(te);
2680
- } else {
2681
- const C = new K(t.schema);
2682
- C.flow = !0, C.items.push(te);
2683
- const Lt = (J ?? g).range;
2684
- C.range = [g.range[0], Lt[1], Lt[2]], c.items.push(C);
2685
- }
2686
- f = J ? J.range[2] : _.end;
2687
- }
2688
- }
2689
- const d = o ? "}" : "]", [h, ...y] = n.end;
2690
- let u = f;
2691
- if (h && h.source === d)
2692
- u = h.offset + h.source.length;
2693
- else {
2694
- 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}`;
2695
- i(f, p ? "MISSING_CHAR" : "BAD_INDENT", b), h && h.source.length !== 1 && y.unshift(h);
2696
- }
2697
- if (y.length > 0) {
2698
- const m = Ie(y, u, t.options.strict, i);
2699
- m.comment && (c.comment ? c.comment += `
2700
- ` + m.comment : c.comment = m.comment), c.range = [n.offset, u, m.offset];
2701
- } else
2702
- c.range = [n.offset, u, u];
2703
- return c;
2704
- }
2705
- function it(s, e, t, n, i, r) {
2706
- 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;
2707
- return i === "!" || i === l.tagName ? (o.tag = l.tagName, o) : (i && (o.tag = i), o);
2708
- }
2709
- function hn(s, e, t, n, i) {
2710
- var d;
2711
- const r = n.tag, o = r ? e.directives.tagName(r.source, (h) => i(r, "TAG_RESOLVE_FAILED", h)) : null;
2712
- if (t.type === "block-seq") {
2713
- const { anchor: h, newlineAfterProp: y } = n, u = h && r ? h.offset > r.offset ? h : r : h ?? r;
2714
- u && (!y || y.offset < u.offset) && i(u, "MISSING_CHAR", "Missing newline after block sequence props");
2715
- }
2716
- const l = t.type === "block-map" ? "map" : t.type === "block-seq" ? "seq" : t.start.source === "{" ? "map" : "seq";
2717
- if (!r || !o || o === "!" || o === K.tagName && l === "map" || o === W.tagName && l === "seq")
2718
- return it(s, e, t, i, o);
2719
- let a = e.schema.tags.find((h) => h.tag === o && h.collection === l);
2720
- if (!a) {
2721
- const h = e.schema.knownTags[o];
2722
- if (h && h.collection === l)
2723
- e.schema.tags.push(Object.assign({}, h, { default: !1 })), a = h;
2724
- else
2725
- return h ? i(r, "BAD_COLLECTION_TYPE", `${h.tag} used for ${l} collection, but expects ${h.collection ?? "scalar"}`, !0) : i(r, "TAG_RESOLVE_FAILED", `Unresolved tag: ${o}`, !0), it(s, e, t, i, o);
2726
- }
2727
- 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 A(p);
2728
- return f.range = c.range, f.tag = o, a != null && a.format && (f.format = a.format), f;
2729
- }
2730
- function bs(s, e, t) {
2731
- const n = e.offset, i = dn(e, s.options.strict, t);
2732
- if (!i)
2733
- return { value: "", type: null, comment: "", range: [n, n, n] };
2734
- const r = i.mode === ">" ? A.BLOCK_FOLDED : A.BLOCK_LITERAL, o = e.source ? pn(e.source) : [];
2735
- let l = o.length;
2736
- for (let u = o.length - 1; u >= 0; --u) {
2737
- const m = o[u][1];
2738
- if (m === "" || m === "\r")
2739
- l = u;
2740
- else
2741
- break;
2742
- }
2743
- if (l === 0) {
2744
- const u = i.chomp === "+" && o.length > 0 ? `
2745
- `.repeat(Math.max(1, o.length - 1)) : "";
2746
- let m = n + i.length;
2747
- return e.source && (m += e.source.length), { value: u, type: r, comment: i.comment, range: [n, m, m] };
2748
- }
2749
- let a = e.indent + i.indent, c = e.offset + i.length, p = 0;
2750
- for (let u = 0; u < l; ++u) {
2751
- const [m, b] = o[u];
2752
- if (b === "" || b === "\r")
2753
- i.indent === 0 && m.length > a && (a = m.length);
2754
- else {
2755
- 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");
2756
- break;
2757
- }
2758
- c += m.length + b.length + 1;
2759
- }
2760
- for (let u = o.length - 1; u >= l; --u)
2761
- o[u][0].length > a && (l = u + 1);
2762
- let f = "", d = "", h = !1;
2763
- for (let u = 0; u < p; ++u)
2764
- f += o[u][0].slice(a) + `
2765
- `;
2766
- for (let u = p; u < l; ++u) {
2767
- let [m, b] = o[u];
2768
- c += m.length + b.length + 1;
2769
- const S = b[b.length - 1] === "\r";
2770
- if (S && (b = b.slice(0, -1)), b && m.length < a) {
2771
- const w = `Block scalar lines must not be less indented than their ${i.indent ? "explicit indentation indicator" : "first line"}`;
2772
- t(c - b.length - (S ? 2 : 1), "BAD_INDENT", w), m = "";
2773
- }
2774
- r === A.BLOCK_LITERAL ? (f += d + m.slice(a) + b, d = `
2775
- `) : m.length > a || b[0] === " " ? (d === " " ? d = `
2776
- ` : !h && d === `
2777
- ` && (d = `
2778
-
2779
- `), f += d + m.slice(a) + b, d = `
2780
- `, h = !0) : b === "" ? d === `
2781
- ` ? f += `
2782
- ` : d = `
2783
- ` : (f += d + b, d = " ", h = !1);
2784
- }
2785
- switch (i.chomp) {
2786
- case "-":
2787
- break;
2788
- case "+":
2789
- for (let u = l; u < o.length; ++u)
2790
- f += `
2791
- ` + o[u][0].slice(a);
2792
- f[f.length - 1] !== `
2793
- ` && (f += `
2794
- `);
2795
- break;
2796
- default:
2797
- f += `
2798
- `;
2799
- }
2800
- const y = n + i.length + e.source.length;
2801
- return { value: f, type: r, comment: i.comment, range: [n, y, y] };
2802
- }
2803
- function dn({ offset: s, props: e }, t, n) {
2804
- if (e[0].type !== "block-scalar-header")
2805
- return n(e[0], "IMPOSSIBLE", "Block scalar header not found"), null;
2806
- const { source: i } = e[0], r = i[0];
2807
- let o = 0, l = "", a = -1;
2808
- for (let d = 1; d < i.length; ++d) {
2809
- const h = i[d];
2810
- if (!l && (h === "-" || h === "+"))
2811
- l = h;
2812
- else {
2813
- const y = Number(h);
2814
- !o && y ? o = y : a === -1 && (a = s + d);
2815
- }
2816
- }
2817
- a !== -1 && n(a, "UNEXPECTED_TOKEN", `Block scalar header includes extra characters: ${i}`);
2818
- let c = !1, p = "", f = i.length;
2819
- for (let d = 1; d < e.length; ++d) {
2820
- const h = e[d];
2821
- switch (h.type) {
2822
- case "space":
2823
- c = !0;
2824
- // fallthrough
2825
- case "newline":
2826
- f += h.source.length;
2827
- break;
2828
- case "comment":
2829
- 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);
2830
- break;
2831
- case "error":
2832
- n(h, "UNEXPECTED_TOKEN", h.message), f += h.source.length;
2833
- break;
2834
- /* istanbul ignore next should not happen */
2835
- default: {
2836
- const y = `Unexpected token in block scalar header: ${h.type}`;
2837
- n(h, "UNEXPECTED_TOKEN", y);
2838
- const u = h.source;
2839
- u && typeof u == "string" && (f += u.length);
2840
- }
2841
- }
2842
- }
2843
- return { mode: r, indent: o, chomp: l, comment: p, length: f };
2844
- }
2845
- function pn(s) {
2846
- const e = s.split(/\n( *)/), t = e[0], n = t.match(/^( *)/), r = [n != null && n[1] ? [n[1], t.slice(n[1].length)] : ["", t]];
2847
- for (let o = 1; o < e.length; o += 2)
2848
- r.push([e[o], e[o + 1]]);
2849
- return r;
2850
- }
2851
- function ws(s, e, t) {
2852
- const { offset: n, type: i, source: r, end: o } = s;
2853
- let l, a;
2854
- const c = (d, h, y) => t(n + d, h, y);
2855
- switch (i) {
2856
- case "scalar":
2857
- l = A.PLAIN, a = mn(r, c);
2858
- break;
2859
- case "single-quoted-scalar":
2860
- l = A.QUOTE_SINGLE, a = yn(r, c);
2861
- break;
2862
- case "double-quoted-scalar":
2863
- l = A.QUOTE_DOUBLE, a = gn(r, c);
2864
- break;
2865
- /* istanbul ignore next should not happen */
2866
- default:
2867
- return t(s, "UNEXPECTED_TOKEN", `Expected a flow scalar value, but found: ${i}`), {
2868
- value: "",
2869
- type: null,
2870
- comment: "",
2871
- range: [n, n + r.length, n + r.length]
2872
- };
2873
- }
2874
- const p = n + r.length, f = Ie(o, p, e, t);
2875
- return {
2876
- value: a,
2877
- type: l,
2878
- comment: f.comment,
2879
- range: [n, p, f.offset]
2880
- };
2881
- }
2882
- function mn(s, e) {
2883
- let t = "";
2884
- switch (s[0]) {
2885
- /* istanbul ignore next should not happen */
2886
- case " ":
2887
- t = "a tab character";
2888
- break;
2889
- case ",":
2890
- t = "flow indicator character ,";
2891
- break;
2892
- case "%":
2893
- t = "directive indicator character %";
2894
- break;
2895
- case "|":
2896
- case ">": {
2897
- t = `block scalar indicator ${s[0]}`;
2898
- break;
2899
- }
2900
- case "@":
2901
- case "`": {
2902
- t = `reserved character ${s[0]}`;
2903
- break;
2904
- }
2905
- }
2906
- return t && e(0, "BAD_SCALAR_START", `Plain value cannot start with ${t}`), Ss(s);
2907
- }
2908
- function yn(s, e) {
2909
- return (s[s.length - 1] !== "'" || s.length === 1) && e(s.length, "MISSING_CHAR", "Missing closing 'quote"), Ss(s.slice(1, -1)).replace(/''/g, "'");
2910
- }
2911
- function Ss(s) {
2912
- let e, t;
2913
- try {
2914
- e = new RegExp(`(.*?)(?<![ ])[ ]*\r?
2915
- `, "sy"), t = new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
2916
- `, "sy");
2917
- } catch {
2918
- e = /(.*?)[ \t]*\r?\n/sy, t = /[ \t]*(.*?)[ \t]*\r?\n/sy;
2919
- }
2920
- let n = e.exec(s);
2921
- if (!n)
2922
- return s;
2923
- let i = n[1], r = " ", o = e.lastIndex;
2924
- for (t.lastIndex = o; n = t.exec(s); )
2925
- n[1] === "" ? r === `
2926
- ` ? i += r : r = `
2927
- ` : (i += r + n[1], r = " "), o = t.lastIndex;
2928
- const l = /[ \t]*(.*)/sy;
2929
- return l.lastIndex = o, n = l.exec(s), i + r + ((n == null ? void 0 : n[1]) ?? "");
2930
- }
2931
- function gn(s, e) {
2932
- let t = "";
2933
- for (let n = 1; n < s.length - 1; ++n) {
2934
- const i = s[n];
2935
- if (!(i === "\r" && s[n + 1] === `
2936
- `))
2937
- if (i === `
2938
- `) {
2939
- const { fold: r, offset: o } = bn(s, n);
2940
- t += r, n = o;
2941
- } else if (i === "\\") {
2942
- let r = s[++n];
2943
- const o = wn[r];
2944
- if (o)
2945
- t += o;
2946
- else if (r === `
2947
- `)
2948
- for (r = s[n + 1]; r === " " || r === " "; )
2949
- r = s[++n + 1];
2950
- else if (r === "\r" && s[n + 1] === `
2951
- `)
2952
- for (r = s[++n + 1]; r === " " || r === " "; )
2953
- r = s[++n + 1];
2954
- else if (r === "x" || r === "u" || r === "U") {
2955
- const l = { x: 2, u: 4, U: 8 }[r];
2956
- t += Sn(s, n + 1, l, e), n += l;
2957
- } else {
2958
- const l = s.substr(n - 1, 2);
2959
- e(n - 1, "BAD_DQ_ESCAPE", `Invalid escape sequence ${l}`), t += l;
2960
- }
2961
- } else if (i === " " || i === " ") {
2962
- const r = n;
2963
- let o = s[n + 1];
2964
- for (; o === " " || o === " "; )
2965
- o = s[++n + 1];
2966
- o !== `
2967
- ` && !(o === "\r" && s[n + 2] === `
2968
- `) && (t += n > r ? s.slice(r, n + 1) : i);
2969
- } else
2970
- t += i;
2971
- }
2972
- return (s[s.length - 1] !== '"' || s.length === 1) && e(s.length, "MISSING_CHAR", 'Missing closing "quote'), t;
2973
- }
2974
- function bn(s, e) {
2975
- let t = "", n = s[e + 1];
2976
- for (; (n === " " || n === " " || n === `
2977
- ` || n === "\r") && !(n === "\r" && s[e + 2] !== `
2978
- `); )
2979
- n === `
2980
- ` && (t += `
2981
- `), e += 1, n = s[e + 1];
2982
- return t || (t = " "), { fold: t, offset: e };
2983
- }
2984
- const wn = {
2985
- 0: "\0",
2986
- // null character
2987
- a: "\x07",
2988
- // bell character
2989
- b: "\b",
2990
- // backspace
2991
- e: "\x1B",
2992
- // escape character
2993
- f: "\f",
2994
- // form feed
2995
- n: `
2996
- `,
2997
- // line feed
2998
- r: "\r",
2999
- // carriage return
3000
- t: " ",
3001
- // horizontal tab
3002
- v: "\v",
3003
- // vertical tab
3004
- N: "…",
3005
- // Unicode next line
3006
- _: " ",
3007
- // Unicode non-breaking space
3008
- L: "\u2028",
3009
- // Unicode line separator
3010
- P: "\u2029",
3011
- // Unicode paragraph separator
3012
- " ": " ",
3013
- '"': '"',
3014
- "/": "/",
3015
- "\\": "\\",
3016
- " ": " "
3017
- };
3018
- function Sn(s, e, t, n) {
3019
- const i = s.substr(e, t), o = i.length === t && /^[0-9a-fA-F]+$/.test(i) ? parseInt(i, 16) : NaN;
3020
- if (isNaN(o)) {
3021
- const l = s.substr(e - 2, t + 2);
3022
- return n(e - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${l}`), l;
3023
- }
3024
- return String.fromCodePoint(o);
3025
- }
3026
- function ks(s, e, t, n) {
3027
- 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;
3028
- let c;
3029
- s.options.stringKeys && s.atKey ? c = s.schema[R] : a ? c = kn(s.schema, i, a, t, n) : e.type === "scalar" ? c = Nn(s, i, e, n) : c = s.schema[R];
3030
- let p;
3031
- try {
3032
- const f = c.resolve(i, (d) => n(t ?? e, "TAG_RESOLVE_FAILED", d), s.options);
3033
- p = E(f) ? f : new A(f);
3034
- } catch (f) {
3035
- const d = f instanceof Error ? f.message : String(f);
3036
- n(t ?? e, "TAG_RESOLVE_FAILED", d), p = new A(i);
3037
- }
3038
- 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;
3039
- }
3040
- function kn(s, e, t, n, i) {
3041
- var l;
3042
- if (t === "!")
3043
- return s[R];
3044
- const r = [];
3045
- for (const a of s.tags)
3046
- if (!a.collection && a.tag === t)
3047
- if (a.default && a.test)
3048
- r.push(a);
3049
- else
3050
- return a;
3051
- for (const a of r)
3052
- if ((l = a.test) != null && l.test(e))
3053
- return a;
3054
- const o = s.knownTags[t];
3055
- 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[R]);
3056
- }
3057
- function Nn({ atKey: s, directives: e, schema: t }, n, i, r) {
3058
- const o = t.tags.find((l) => {
3059
- var a;
3060
- return (l.default === !0 || s && l.default === "key") && ((a = l.test) == null ? void 0 : a.test(n));
3061
- }) || t[R];
3062
- if (t.compat) {
3063
- const l = t.compat.find((a) => {
3064
- var c;
3065
- return a.default && ((c = a.test) == null ? void 0 : c.test(n));
3066
- }) ?? t[R];
3067
- if (o.tag !== l.tag) {
3068
- const a = e.tagString(o.tag), c = e.tagString(l.tag), p = `Value may be parsed as either ${a} or ${c}`;
3069
- r(i, "TAG_RESOLVE_FAILED", p, !0);
3070
- }
3071
- }
3072
- return o;
3073
- }
3074
- function On(s, e, t) {
3075
- if (e) {
3076
- t === null && (t = e.length);
3077
- for (let n = t - 1; n >= 0; --n) {
3078
- let i = e[n];
3079
- switch (i.type) {
3080
- case "space":
3081
- case "comment":
3082
- case "newline":
3083
- s -= i.source.length;
3084
- continue;
3085
- }
3086
- for (i = e[++n]; (i == null ? void 0 : i.type) === "space"; )
3087
- s += i.source.length, i = e[++n];
3088
- break;
3089
- }
3090
- }
3091
- return s;
3092
- }
3093
- const An = { composeNode: Ns, composeEmptyNode: Et };
3094
- function Ns(s, e, t, n) {
3095
- const i = s.atKey, { spaceBefore: r, comment: o, anchor: l, tag: a } = t;
3096
- let c, p = !0;
3097
- switch (e.type) {
3098
- case "alias":
3099
- c = En(s, e, n), (l || a) && n(e, "ALIAS_PROPS", "An alias node must not specify any properties");
3100
- break;
3101
- case "scalar":
3102
- case "single-quoted-scalar":
3103
- case "double-quoted-scalar":
3104
- case "block-scalar":
3105
- c = ks(s, e, a, n), l && (c.anchor = l.source.substring(1));
3106
- break;
3107
- case "block-map":
3108
- case "block-seq":
3109
- case "flow-collection":
3110
- c = hn(An, s, e, t, n), l && (c.anchor = l.source.substring(1));
3111
- break;
3112
- default: {
3113
- const f = e.type === "error" ? e.message : `Unsupported token (type: ${e.type})`;
3114
- n(e, "UNEXPECTED_TOKEN", f), c = Et(s, e.offset, void 0, null, t, n), p = !1;
3115
- }
3116
- }
3117
- 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;
3118
- }
3119
- function Et(s, e, t, n, { spaceBefore: i, comment: r, anchor: o, tag: l, end: a }, c) {
3120
- const p = {
3121
- type: "scalar",
3122
- offset: On(e, t, n),
3123
- indent: -1,
3124
- source: ""
3125
- }, f = ks(s, p, l, c);
3126
- 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;
3127
- }
3128
- function En({ options: s }, { offset: e, source: t, end: n }, i) {
3129
- const r = new Re(t.substring(1));
3130
- 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);
3131
- const o = e + t.length, l = Ie(n, o, s.strict, i);
3132
- return r.range = [e, o, l.offset], l.comment && (r.comment = l.comment), r;
3133
- }
3134
- function In(s, e, { offset: t, start: n, value: i, end: r }, o) {
3135
- const l = Object.assign({ _directives: e }, s), a = new ge(void 0, l), c = {
3136
- atKey: !1,
3137
- atRoot: !0,
3138
- directives: a.directives,
3139
- options: a.options,
3140
- schema: a.schema
3141
- }, p = ue(n, {
3142
- indicator: "doc-start",
3143
- next: i ?? (r == null ? void 0 : r[0]),
3144
- offset: t,
3145
- onError: o,
3146
- parentIndent: 0,
3147
- startOnNewline: !0
3148
- });
3149
- 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);
3150
- const f = a.contents.range[2], d = Ie(r, f, !1, o);
3151
- return d.comment && (a.comment = d.comment), a.range = [t, f, d.offset], a;
3152
- }
3153
- function be(s) {
3154
- if (typeof s == "number")
3155
- return [s, s + 1];
3156
- if (Array.isArray(s))
3157
- return s.length === 2 ? s : [s[0], s[1]];
3158
- const { offset: e, source: t } = s;
3159
- return [e, e + (typeof t == "string" ? t.length : 1)];
3160
- }
3161
- function Kt(s) {
3162
- var i;
3163
- let e = "", t = !1, n = !1;
3164
- for (let r = 0; r < s.length; ++r) {
3165
- const o = s[r];
3166
- switch (o[0]) {
3167
- case "#":
3168
- e += (e === "" ? "" : n ? `
3169
-
3170
- ` : `
3171
- `) + (o.substring(1) || " "), t = !0, n = !1;
3172
- break;
3173
- case "%":
3174
- ((i = s[r + 1]) == null ? void 0 : i[0]) !== "#" && (r += 1), t = !1;
3175
- break;
3176
- default:
3177
- t || (n = !0), t = !1;
3178
- }
3179
- }
3180
- return { comment: e, afterEmptyLine: n };
3181
- }
3182
- class It {
3183
- constructor(e = {}) {
3184
- this.doc = null, this.atDirectives = !1, this.prelude = [], this.errors = [], this.warnings = [], this.onError = (t, n, i, r) => {
3185
- const o = be(t);
3186
- r ? this.warnings.push(new ys(o, n, i)) : this.errors.push(new z(o, n, i));
3187
- }, this.directives = new B({ version: e.version || "1.2" }), this.options = e;
3188
- }
3189
- decorate(e, t) {
3190
- const { comment: n, afterEmptyLine: i } = Kt(this.prelude);
3191
- if (n) {
3192
- const r = e.contents;
3193
- if (t)
3194
- e.comment = e.comment ? `${e.comment}
3195
- ${n}` : n;
3196
- else if (i || e.directives.docStart || !r)
3197
- e.commentBefore = n;
3198
- else if (L(r) && !r.flow && r.items.length > 0) {
3199
- let o = r.items[0];
3200
- T(o) && (o = o.key);
3201
- const l = o.commentBefore;
3202
- o.commentBefore = l ? `${n}
3203
- ${l}` : n;
3204
- } else {
3205
- const o = r.commentBefore;
3206
- r.commentBefore = o ? `${n}
3207
- ${o}` : n;
3208
- }
3209
- }
3210
- 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 = [];
3211
- }
3212
- /**
3213
- * Current stream status information.
3214
- *
3215
- * Mostly useful at the end of input for an empty stream.
3216
- */
3217
- streamInfo() {
3218
- return {
3219
- comment: Kt(this.prelude).comment,
3220
- directives: this.directives,
3221
- errors: this.errors,
3222
- warnings: this.warnings
3223
- };
3224
- }
3225
- /**
3226
- * Compose tokens into documents.
3227
- *
3228
- * @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.
3229
- * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
3230
- */
3231
- *compose(e, t = !1, n = -1) {
3232
- for (const i of e)
3233
- yield* this.next(i);
3234
- yield* this.end(t, n);
3235
- }
3236
- /** Advance the composer by one CST token. */
3237
- *next(e) {
3238
- switch (e.type) {
3239
- case "directive":
3240
- this.directives.add(e.source, (t, n, i) => {
3241
- const r = be(e);
3242
- r[0] += t, this.onError(r, "BAD_DIRECTIVE", n, i);
3243
- }), this.prelude.push(e.source), this.atDirectives = !0;
3244
- break;
3245
- case "document": {
3246
- const t = In(this.options, this.directives, e, this.onError);
3247
- 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;
3248
- break;
3249
- }
3250
- case "byte-order-mark":
3251
- case "space":
3252
- break;
3253
- case "comment":
3254
- case "newline":
3255
- this.prelude.push(e.source);
3256
- break;
3257
- case "error": {
3258
- const t = e.source ? `${e.message}: ${JSON.stringify(e.source)}` : e.message, n = new z(be(e), "UNEXPECTED_TOKEN", t);
3259
- this.atDirectives || !this.doc ? this.errors.push(n) : this.doc.errors.push(n);
3260
- break;
3261
- }
3262
- case "doc-end": {
3263
- if (!this.doc) {
3264
- const n = "Unexpected doc-end without preceding document";
3265
- this.errors.push(new z(be(e), "UNEXPECTED_TOKEN", n));
3266
- break;
3267
- }
3268
- this.doc.directives.docEnd = !0;
3269
- const t = Ie(e.end, e.offset + e.source.length, this.doc.options.strict, this.onError);
3270
- if (this.decorate(this.doc, !0), t.comment) {
3271
- const n = this.doc.comment;
3272
- this.doc.comment = n ? `${n}
3273
- ${t.comment}` : t.comment;
3274
- }
3275
- this.doc.range[2] = t.offset;
3276
- break;
3277
- }
3278
- default:
3279
- this.errors.push(new z(be(e), "UNEXPECTED_TOKEN", `Unsupported token ${e.type}`));
3280
- }
3281
- }
3282
- /**
3283
- * Call at end of input to yield any remaining document.
3284
- *
3285
- * @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.
3286
- * @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
3287
- */
3288
- *end(e = !1, t = -1) {
3289
- if (this.doc)
3290
- this.decorate(this.doc, !0), yield this.doc, this.doc = null;
3291
- else if (e) {
3292
- const n = Object.assign({ _directives: this.directives }, this.options), i = new ge(void 0, n);
3293
- this.atDirectives && this.onError(t, "MISSING_CHAR", "Missing directives-end indicator line"), i.range = [0, t, t], this.decorate(i, !1), yield i;
3294
- }
3295
- }
3296
- }
3297
- function Tn(s, e = !0, t) {
3298
- if (s) {
3299
- const n = (i, r, o) => {
3300
- const l = typeof i == "number" ? i : Array.isArray(i) ? i[0] : i.offset;
3301
- if (t)
3302
- t(l, r, o);
3303
- else
3304
- throw new z([l, l + 1], r, o);
3305
- };
3306
- switch (s.type) {
3307
- case "scalar":
3308
- case "single-quoted-scalar":
3309
- case "double-quoted-scalar":
3310
- return ws(s, e, n);
3311
- case "block-scalar":
3312
- return bs({ options: { strict: e } }, s, n);
3313
- }
3314
- }
3315
- return null;
3316
- }
3317
- function Ln(s, e) {
3318
- const { implicitKey: t = !1, indent: n, inFlow: i = !1, offset: r = -1, type: o = "PLAIN" } = e, l = Ae({ type: o, value: s }, {
3319
- implicitKey: t,
3320
- indent: n > 0 ? " ".repeat(n) : "",
3321
- inFlow: i,
3322
- options: { blockQuote: !0, lineWidth: -1 }
3323
- }), a = e.end ?? [
3324
- { type: "newline", offset: -1, indent: n, source: `
3325
- ` }
3326
- ];
3327
- switch (l[0]) {
3328
- case "|":
3329
- case ">": {
3330
- const c = l.indexOf(`
3331
- `), p = l.substring(0, c), f = l.substring(c + 1) + `
3332
- `, d = [
3333
- { type: "block-scalar-header", offset: r, indent: n, source: p }
3334
- ];
3335
- return Os(d, a) || d.push({ type: "newline", offset: -1, indent: n, source: `
3336
- ` }), { type: "block-scalar", offset: r, indent: n, props: d, source: f };
3337
- }
3338
- case '"':
3339
- return { type: "double-quoted-scalar", offset: r, indent: n, source: l, end: a };
3340
- case "'":
3341
- return { type: "single-quoted-scalar", offset: r, indent: n, source: l, end: a };
3342
- default:
3343
- return { type: "scalar", offset: r, indent: n, source: l, end: a };
3344
- }
3345
- }
3346
- function $n(s, e, t = {}) {
3347
- let { afterKey: n = !1, implicitKey: i = !1, inFlow: r = !1, type: o } = t, l = "indent" in s ? s.indent : null;
3348
- if (n && typeof l == "number" && (l += 2), !o)
3349
- switch (s.type) {
3350
- case "single-quoted-scalar":
3351
- o = "QUOTE_SINGLE";
3352
- break;
3353
- case "double-quoted-scalar":
3354
- o = "QUOTE_DOUBLE";
3355
- break;
3356
- case "block-scalar": {
3357
- const c = s.props[0];
3358
- if (c.type !== "block-scalar-header")
3359
- throw new Error("Invalid block scalar header");
3360
- o = c.source[0] === ">" ? "BLOCK_FOLDED" : "BLOCK_LITERAL";
3361
- break;
3362
- }
3363
- default:
3364
- o = "PLAIN";
3365
- }
3366
- const a = Ae({ type: o, value: e }, {
3367
- implicitKey: i || l === null,
3368
- indent: l !== null && l > 0 ? " ".repeat(l) : "",
3369
- inFlow: r,
3370
- options: { blockQuote: !0, lineWidth: -1 }
3371
- });
3372
- switch (a[0]) {
3373
- case "|":
3374
- case ">":
3375
- _n(s, a);
3376
- break;
3377
- case '"':
3378
- rt(s, a, "double-quoted-scalar");
3379
- break;
3380
- case "'":
3381
- rt(s, a, "single-quoted-scalar");
3382
- break;
3383
- default:
3384
- rt(s, a, "scalar");
3385
- }
3386
- }
3387
- function _n(s, e) {
3388
- const t = e.indexOf(`
3389
- `), n = e.substring(0, t), i = e.substring(t + 1) + `
3390
- `;
3391
- if (s.type === "block-scalar") {
3392
- const r = s.props[0];
3393
- if (r.type !== "block-scalar-header")
3394
- throw new Error("Invalid block scalar header");
3395
- r.source = n, s.source = i;
3396
- } else {
3397
- const { offset: r } = s, o = "indent" in s ? s.indent : -1, l = [
3398
- { type: "block-scalar-header", offset: r, indent: o, source: n }
3399
- ];
3400
- Os(l, "end" in s ? s.end : void 0) || l.push({ type: "newline", offset: -1, indent: o, source: `
3401
- ` });
3402
- for (const a of Object.keys(s))
3403
- a !== "type" && a !== "offset" && delete s[a];
3404
- Object.assign(s, { type: "block-scalar", indent: o, props: l, source: i });
3405
- }
3406
- }
3407
- function Os(s, e) {
3408
- if (e)
3409
- for (const t of e)
3410
- switch (t.type) {
3411
- case "space":
3412
- case "comment":
3413
- s.push(t);
3414
- break;
3415
- case "newline":
3416
- return s.push(t), !0;
3417
- }
3418
- return !1;
3419
- }
3420
- function rt(s, e, t) {
3421
- switch (s.type) {
3422
- case "scalar":
3423
- case "double-quoted-scalar":
3424
- case "single-quoted-scalar":
3425
- s.type = t, s.source = e;
3426
- break;
3427
- case "block-scalar": {
3428
- const n = s.props.slice(1);
3429
- let i = e.length;
3430
- s.props[0].type === "block-scalar-header" && (i -= s.props[0].source.length);
3431
- for (const r of n)
3432
- r.offset += i;
3433
- delete s.props, Object.assign(s, { type: t, source: e, end: n });
3434
- break;
3435
- }
3436
- case "block-map":
3437
- case "block-seq": {
3438
- const i = { type: "newline", offset: s.offset + e.length, indent: s.indent, source: `
3439
- ` };
3440
- delete s.items, Object.assign(s, { type: t, source: e, end: [i] });
3441
- break;
3442
- }
3443
- default: {
3444
- 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") : [];
3445
- for (const r of Object.keys(s))
3446
- r !== "type" && r !== "offset" && delete s[r];
3447
- Object.assign(s, { type: t, indent: n, source: e, end: i });
3448
- }
3449
- }
3450
- }
3451
- const Cn = (s) => "type" in s ? qe(s) : Ke(s);
3452
- function qe(s) {
3453
- switch (s.type) {
3454
- case "block-scalar": {
3455
- let e = "";
3456
- for (const t of s.props)
3457
- e += qe(t);
3458
- return e + s.source;
3459
- }
3460
- case "block-map":
3461
- case "block-seq": {
3462
- let e = "";
3463
- for (const t of s.items)
3464
- e += Ke(t);
3465
- return e;
3466
- }
3467
- case "flow-collection": {
3468
- let e = s.start.source;
3469
- for (const t of s.items)
3470
- e += Ke(t);
3471
- for (const t of s.end)
3472
- e += t.source;
3473
- return e;
3474
- }
3475
- case "document": {
3476
- let e = Ke(s);
3477
- if (s.end)
3478
- for (const t of s.end)
3479
- e += t.source;
3480
- return e;
3481
- }
3482
- default: {
3483
- let e = s.source;
3484
- if ("end" in s && s.end)
3485
- for (const t of s.end)
3486
- e += t.source;
3487
- return e;
3488
- }
3489
- }
3490
- }
3491
- function Ke({ start: s, key: e, sep: t, value: n }) {
3492
- let i = "";
3493
- for (const r of s)
3494
- i += r.source;
3495
- if (e && (i += qe(e)), t)
3496
- for (const r of t)
3497
- i += r.source;
3498
- return n && (i += qe(n)), i;
3499
- }
3500
- const ht = Symbol("break visit"), vn = Symbol("skip children"), As = Symbol("remove item");
3501
- function Z(s, e) {
3502
- "type" in s && s.type === "document" && (s = { start: s.start, value: s.value }), Es(Object.freeze([]), s, e);
3503
- }
3504
- Z.BREAK = ht;
3505
- Z.SKIP = vn;
3506
- Z.REMOVE = As;
3507
- Z.itemAtPath = (s, e) => {
3508
- let t = s;
3509
- for (const [n, i] of e) {
3510
- const r = t == null ? void 0 : t[n];
3511
- if (r && "items" in r)
3512
- t = r.items[i];
3513
- else
3514
- return;
3515
- }
3516
- return t;
3517
- };
3518
- Z.parentCollection = (s, e) => {
3519
- const t = Z.itemAtPath(s, e.slice(0, -1)), n = e[e.length - 1][0], i = t == null ? void 0 : t[n];
3520
- if (i && "items" in i)
3521
- return i;
3522
- throw new Error("Parent collection not found");
3523
- };
3524
- function Es(s, e, t) {
3525
- let n = t(e, s);
3526
- if (typeof n == "symbol")
3527
- return n;
3528
- for (const i of ["key", "value"]) {
3529
- const r = e[i];
3530
- if (r && "items" in r) {
3531
- for (let o = 0; o < r.items.length; ++o) {
3532
- const l = Es(Object.freeze(s.concat([[i, o]])), r.items[o], t);
3533
- if (typeof l == "number")
3534
- o = l - 1;
3535
- else {
3536
- if (l === ht)
3537
- return ht;
3538
- l === As && (r.items.splice(o, 1), o -= 1);
3539
- }
3540
- }
3541
- typeof n == "function" && i === "key" && (n = n(e, s));
3542
- }
3543
- }
3544
- return typeof n == "function" ? n(e, s) : n;
3545
- }
3546
- const ze = "\uFEFF", Ze = "", xe = "", Oe = "", Bn = (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");
3547
- function Kn(s) {
3548
- switch (s) {
3549
- case ze:
3550
- return "<BOM>";
3551
- case Ze:
3552
- return "<DOC>";
3553
- case xe:
3554
- return "<FLOW_END>";
3555
- case Oe:
3556
- return "<SCALAR>";
3557
- default:
3558
- return JSON.stringify(s);
3559
- }
3560
- }
3561
- function Is(s) {
3562
- switch (s) {
3563
- case ze:
3564
- return "byte-order-mark";
3565
- case Ze:
3566
- return "doc-mode";
3567
- case xe:
3568
- return "flow-error-end";
3569
- case Oe:
3570
- return "scalar";
3571
- case "---":
3572
- return "doc-start";
3573
- case "...":
3574
- return "doc-end";
3575
- case "":
3576
- case `
3577
- `:
3578
- case `\r
3579
- `:
3580
- return "newline";
3581
- case "-":
3582
- return "seq-item-ind";
3583
- case "?":
3584
- return "explicit-key-ind";
3585
- case ":":
3586
- return "map-value-ind";
3587
- case "{":
3588
- return "flow-map-start";
3589
- case "}":
3590
- return "flow-map-end";
3591
- case "[":
3592
- return "flow-seq-start";
3593
- case "]":
3594
- return "flow-seq-end";
3595
- case ",":
3596
- return "comma";
3597
- }
3598
- switch (s[0]) {
3599
- case " ":
3600
- case " ":
3601
- return "space";
3602
- case "#":
3603
- return "comment";
3604
- case "%":
3605
- return "directive-line";
3606
- case "*":
3607
- return "alias";
3608
- case "&":
3609
- return "anchor";
3610
- case "!":
3611
- return "tag";
3612
- case "'":
3613
- return "single-quoted-scalar";
3614
- case '"':
3615
- return "double-quoted-scalar";
3616
- case "|":
3617
- case ">":
3618
- return "block-scalar-header";
3619
- }
3620
- return null;
3621
- }
3622
- const Pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3623
- __proto__: null,
3624
- BOM: ze,
3625
- DOCUMENT: Ze,
3626
- FLOW_END: xe,
3627
- SCALAR: Oe,
3628
- createScalarToken: Ln,
3629
- isCollection: Bn,
3630
- isScalar: Mn,
3631
- prettyToken: Kn,
3632
- resolveAsScalar: Tn,
3633
- setScalarValue: $n,
3634
- stringify: Cn,
3635
- tokenType: Is,
3636
- visit: Z
3637
- }, Symbol.toStringTag, { value: "Module" }));
3638
- function D(s) {
3639
- switch (s) {
3640
- case void 0:
3641
- case " ":
3642
- case `
3643
- `:
3644
- case "\r":
3645
- case " ":
3646
- return !0;
3647
- default:
3648
- return !1;
3649
- }
3650
- }
3651
- const Pt = new Set("0123456789ABCDEFabcdef"), jn = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"), _e = new Set(",[]{}"), Dn = new Set(` ,[]{}
3652
- \r `), ot = (s) => !s || Dn.has(s);
3653
- class Ts {
3654
- constructor() {
3655
- 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;
3656
- }
3657
- /**
3658
- * Generate YAML tokens from the `source` string. If `incomplete`,
3659
- * a part of the last line may be left as a buffer for the next call.
3660
- *
3661
- * @returns A generator of lexical tokens
3662
- */
3663
- *lex(e, t = !1) {
3664
- if (e) {
3665
- if (typeof e != "string")
3666
- throw TypeError("source is not a string");
3667
- this.buffer = this.buffer ? this.buffer + e : e, this.lineEndPos = null;
3668
- }
3669
- this.atEnd = !t;
3670
- let n = this.next ?? "stream";
3671
- for (; n && (t || this.hasChars(1)); )
3672
- n = yield* this.parseNext(n);
3673
- }
3674
- atLineEnd() {
3675
- let e = this.pos, t = this.buffer[e];
3676
- for (; t === " " || t === " "; )
3677
- t = this.buffer[++e];
3678
- return !t || t === "#" || t === `
3679
- ` ? !0 : t === "\r" ? this.buffer[e + 1] === `
3680
- ` : !1;
3681
- }
3682
- charAt(e) {
3683
- return this.buffer[this.pos + e];
3684
- }
3685
- continueScalar(e) {
3686
- let t = this.buffer[e];
3687
- if (this.indentNext > 0) {
3688
- let n = 0;
3689
- for (; t === " "; )
3690
- t = this.buffer[++n + e];
3691
- if (t === "\r") {
3692
- const i = this.buffer[n + e + 1];
3693
- if (i === `
3694
- ` || !i && !this.atEnd)
3695
- return e + n + 1;
3696
- }
3697
- return t === `
3698
- ` || n >= this.indentNext || !t && !this.atEnd ? e + n : -1;
3699
- }
3700
- if (t === "-" || t === ".") {
3701
- const n = this.buffer.substr(e, 3);
3702
- if ((n === "---" || n === "...") && D(this.buffer[e + 3]))
3703
- return -1;
3704
- }
3705
- return e;
3706
- }
3707
- getLine() {
3708
- let e = this.lineEndPos;
3709
- return (typeof e != "number" || e !== -1 && e < this.pos) && (e = this.buffer.indexOf(`
3710
- `, 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));
3711
- }
3712
- hasChars(e) {
3713
- return this.pos + e <= this.buffer.length;
3714
- }
3715
- setNext(e) {
3716
- return this.buffer = this.buffer.substring(this.pos), this.pos = 0, this.lineEndPos = null, this.next = e, null;
3717
- }
3718
- peek(e) {
3719
- return this.buffer.substr(this.pos, e);
3720
- }
3721
- *parseNext(e) {
3722
- switch (e) {
3723
- case "stream":
3724
- return yield* this.parseStream();
3725
- case "line-start":
3726
- return yield* this.parseLineStart();
3727
- case "block-start":
3728
- return yield* this.parseBlockStart();
3729
- case "doc":
3730
- return yield* this.parseDocument();
3731
- case "flow":
3732
- return yield* this.parseFlowCollection();
3733
- case "quoted-scalar":
3734
- return yield* this.parseQuotedScalar();
3735
- case "block-scalar":
3736
- return yield* this.parseBlockScalar();
3737
- case "plain-scalar":
3738
- return yield* this.parsePlainScalar();
3739
- }
3740
- }
3741
- *parseStream() {
3742
- let e = this.getLine();
3743
- if (e === null)
3744
- return this.setNext("stream");
3745
- if (e[0] === ze && (yield* this.pushCount(1), e = e.substring(1)), e[0] === "%") {
3746
- let t = e.length, n = e.indexOf("#");
3747
- for (; n !== -1; ) {
3748
- const r = e[n - 1];
3749
- if (r === " " || r === " ") {
3750
- t = n - 1;
3751
- break;
3752
- } else
3753
- n = e.indexOf("#", n + 1);
3754
- }
3755
- for (; ; ) {
3756
- const r = e[t - 1];
3757
- if (r === " " || r === " ")
3758
- t -= 1;
3759
- else
3760
- break;
3761
- }
3762
- const i = (yield* this.pushCount(t)) + (yield* this.pushSpaces(!0));
3763
- return yield* this.pushCount(e.length - i), this.pushNewline(), "stream";
3764
- }
3765
- if (this.atLineEnd()) {
3766
- const t = yield* this.pushSpaces(!0);
3767
- return yield* this.pushCount(e.length - t), yield* this.pushNewline(), "stream";
3768
- }
3769
- return yield Ze, yield* this.parseLineStart();
3770
- }
3771
- *parseLineStart() {
3772
- const e = this.charAt(0);
3773
- if (!e && !this.atEnd)
3774
- return this.setNext("line-start");
3775
- if (e === "-" || e === ".") {
3776
- if (!this.atEnd && !this.hasChars(4))
3777
- return this.setNext("line-start");
3778
- const t = this.peek(3);
3779
- if ((t === "---" || t === "...") && D(this.charAt(3)))
3780
- return yield* this.pushCount(3), this.indentValue = 0, this.indentNext = 0, t === "---" ? "doc" : "stream";
3781
- }
3782
- return this.indentValue = yield* this.pushSpaces(!1), this.indentNext > this.indentValue && !D(this.charAt(1)) && (this.indentNext = this.indentValue), yield* this.parseBlockStart();
3783
- }
3784
- *parseBlockStart() {
3785
- const [e, t] = this.peek(2);
3786
- if (!t && !this.atEnd)
3787
- return this.setNext("block-start");
3788
- if ((e === "-" || e === "?" || e === ":") && D(t)) {
3789
- const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0));
3790
- return this.indentNext = this.indentValue + 1, this.indentValue += n, yield* this.parseBlockStart();
3791
- }
3792
- return "doc";
3793
- }
3794
- *parseDocument() {
3795
- yield* this.pushSpaces(!0);
3796
- const e = this.getLine();
3797
- if (e === null)
3798
- return this.setNext("doc");
3799
- let t = yield* this.pushIndicators();
3800
- switch (e[t]) {
3801
- case "#":
3802
- yield* this.pushCount(e.length - t);
3803
- // fallthrough
3804
- case void 0:
3805
- return yield* this.pushNewline(), yield* this.parseLineStart();
3806
- case "{":
3807
- case "[":
3808
- return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel = 1, "flow";
3809
- case "}":
3810
- case "]":
3811
- return yield* this.pushCount(1), "doc";
3812
- case "*":
3813
- return yield* this.pushUntil(ot), "doc";
3814
- case '"':
3815
- case "'":
3816
- return yield* this.parseQuotedScalar();
3817
- case "|":
3818
- case ">":
3819
- return t += yield* this.parseBlockScalarHeader(), t += yield* this.pushSpaces(!0), yield* this.pushCount(e.length - t), yield* this.pushNewline(), yield* this.parseBlockScalar();
3820
- default:
3821
- return yield* this.parsePlainScalar();
3822
- }
3823
- }
3824
- *parseFlowCollection() {
3825
- let e, t, n = -1;
3826
- do
3827
- e = yield* this.pushNewline(), e > 0 ? (t = yield* this.pushSpaces(!1), this.indentValue = n = t) : t = 0, t += yield* this.pushSpaces(!0);
3828
- while (e + t > 0);
3829
- const i = this.getLine();
3830
- if (i === null)
3831
- return this.setNext("flow");
3832
- 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] === "}")))
3833
- return this.flowLevel = 0, yield xe, yield* this.parseLineStart();
3834
- let r = 0;
3835
- for (; i[r] === ","; )
3836
- r += yield* this.pushCount(1), r += yield* this.pushSpaces(!0), this.flowKey = !1;
3837
- switch (r += yield* this.pushIndicators(), i[r]) {
3838
- case void 0:
3839
- return "flow";
3840
- case "#":
3841
- return yield* this.pushCount(i.length - r), "flow";
3842
- case "{":
3843
- case "[":
3844
- return yield* this.pushCount(1), this.flowKey = !1, this.flowLevel += 1, "flow";
3845
- case "}":
3846
- case "]":
3847
- return yield* this.pushCount(1), this.flowKey = !0, this.flowLevel -= 1, this.flowLevel ? "flow" : "doc";
3848
- case "*":
3849
- return yield* this.pushUntil(ot), "flow";
3850
- case '"':
3851
- case "'":
3852
- return this.flowKey = !0, yield* this.parseQuotedScalar();
3853
- case ":": {
3854
- const o = this.charAt(1);
3855
- if (this.flowKey || D(o) || o === ",")
3856
- return this.flowKey = !1, yield* this.pushCount(1), yield* this.pushSpaces(!0), "flow";
3857
- }
3858
- // fallthrough
3859
- default:
3860
- return this.flowKey = !1, yield* this.parsePlainScalar();
3861
- }
3862
- }
3863
- *parseQuotedScalar() {
3864
- const e = this.charAt(0);
3865
- let t = this.buffer.indexOf(e, this.pos + 1);
3866
- if (e === "'")
3867
- for (; t !== -1 && this.buffer[t + 1] === "'"; )
3868
- t = this.buffer.indexOf("'", t + 2);
3869
- else
3870
- for (; t !== -1; ) {
3871
- let r = 0;
3872
- for (; this.buffer[t - 1 - r] === "\\"; )
3873
- r += 1;
3874
- if (r % 2 === 0)
3875
- break;
3876
- t = this.buffer.indexOf('"', t + 1);
3877
- }
3878
- const n = this.buffer.substring(0, t);
3879
- let i = n.indexOf(`
3880
- `, this.pos);
3881
- if (i !== -1) {
3882
- for (; i !== -1; ) {
3883
- const r = this.continueScalar(i + 1);
3884
- if (r === -1)
3885
- break;
3886
- i = n.indexOf(`
3887
- `, r);
3888
- }
3889
- i !== -1 && (t = i - (n[i - 1] === "\r" ? 2 : 1));
3890
- }
3891
- if (t === -1) {
3892
- if (!this.atEnd)
3893
- return this.setNext("quoted-scalar");
3894
- t = this.buffer.length;
3895
- }
3896
- return yield* this.pushToIndex(t + 1, !1), this.flowLevel ? "flow" : "doc";
3897
- }
3898
- *parseBlockScalarHeader() {
3899
- this.blockScalarIndent = -1, this.blockScalarKeep = !1;
3900
- let e = this.pos;
3901
- for (; ; ) {
3902
- const t = this.buffer[++e];
3903
- if (t === "+")
3904
- this.blockScalarKeep = !0;
3905
- else if (t > "0" && t <= "9")
3906
- this.blockScalarIndent = Number(t) - 1;
3907
- else if (t !== "-")
3908
- break;
3909
- }
3910
- return yield* this.pushUntil((t) => D(t) || t === "#");
3911
- }
3912
- *parseBlockScalar() {
3913
- let e = this.pos - 1, t = 0, n;
3914
- e: for (let r = this.pos; n = this.buffer[r]; ++r)
3915
- switch (n) {
3916
- case " ":
3917
- t += 1;
3918
- break;
3919
- case `
3920
- `:
3921
- e = r, t = 0;
3922
- break;
3923
- case "\r": {
3924
- const o = this.buffer[r + 1];
3925
- if (!o && !this.atEnd)
3926
- return this.setNext("block-scalar");
3927
- if (o === `
3928
- `)
3929
- break;
3930
- }
3931
- // fallthrough
3932
- default:
3933
- break e;
3934
- }
3935
- if (!n && !this.atEnd)
3936
- return this.setNext("block-scalar");
3937
- if (t >= this.indentNext) {
3938
- this.blockScalarIndent === -1 ? this.indentNext = t : this.indentNext = this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext);
3939
- do {
3940
- const r = this.continueScalar(e + 1);
3941
- if (r === -1)
3942
- break;
3943
- e = this.buffer.indexOf(`
3944
- `, r);
3945
- } while (e !== -1);
3946
- if (e === -1) {
3947
- if (!this.atEnd)
3948
- return this.setNext("block-scalar");
3949
- e = this.buffer.length;
3950
- }
3951
- }
3952
- let i = e + 1;
3953
- for (n = this.buffer[i]; n === " "; )
3954
- n = this.buffer[++i];
3955
- if (n === " ") {
3956
- for (; n === " " || n === " " || n === "\r" || n === `
3957
- `; )
3958
- n = this.buffer[++i];
3959
- e = i - 1;
3960
- } else if (!this.blockScalarKeep)
3961
- do {
3962
- let r = e - 1, o = this.buffer[r];
3963
- o === "\r" && (o = this.buffer[--r]);
3964
- const l = r;
3965
- for (; o === " "; )
3966
- o = this.buffer[--r];
3967
- if (o === `
3968
- ` && r >= this.pos && r + 1 + t > l)
3969
- e = r;
3970
- else
3971
- break;
3972
- } while (!0);
3973
- return yield Oe, yield* this.pushToIndex(e + 1, !0), yield* this.parseLineStart();
3974
- }
3975
- *parsePlainScalar() {
3976
- const e = this.flowLevel > 0;
3977
- let t = this.pos - 1, n = this.pos - 1, i;
3978
- for (; i = this.buffer[++n]; )
3979
- if (i === ":") {
3980
- const r = this.buffer[n + 1];
3981
- if (D(r) || e && _e.has(r))
3982
- break;
3983
- t = n;
3984
- } else if (D(i)) {
3985
- let r = this.buffer[n + 1];
3986
- if (i === "\r" && (r === `
3987
- ` ? (n += 1, i = `
3988
- `, r = this.buffer[n + 1]) : t = n), r === "#" || e && _e.has(r))
3989
- break;
3990
- if (i === `
3991
- `) {
3992
- const o = this.continueScalar(n + 1);
3993
- if (o === -1)
3994
- break;
3995
- n = Math.max(n, o - 2);
3996
- }
3997
- } else {
3998
- if (e && _e.has(i))
3999
- break;
4000
- t = n;
4001
- }
4002
- return !i && !this.atEnd ? this.setNext("plain-scalar") : (yield Oe, yield* this.pushToIndex(t + 1, !0), e ? "flow" : "doc");
4003
- }
4004
- *pushCount(e) {
4005
- return e > 0 ? (yield this.buffer.substr(this.pos, e), this.pos += e, e) : 0;
4006
- }
4007
- *pushToIndex(e, t) {
4008
- const n = this.buffer.slice(this.pos, e);
4009
- return n ? (yield n, this.pos += n.length, n.length) : (t && (yield ""), 0);
4010
- }
4011
- *pushIndicators() {
4012
- switch (this.charAt(0)) {
4013
- case "!":
4014
- return (yield* this.pushTag()) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
4015
- case "&":
4016
- return (yield* this.pushUntil(ot)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
4017
- case "-":
4018
- // this is an error
4019
- case "?":
4020
- // this is an error outside flow collections
4021
- case ":": {
4022
- const e = this.flowLevel > 0, t = this.charAt(1);
4023
- if (D(t) || e && _e.has(t))
4024
- return e ? this.flowKey && (this.flowKey = !1) : this.indentNext = this.indentValue + 1, (yield* this.pushCount(1)) + (yield* this.pushSpaces(!0)) + (yield* this.pushIndicators());
4025
- }
4026
- }
4027
- return 0;
4028
- }
4029
- *pushTag() {
4030
- if (this.charAt(1) === "<") {
4031
- let e = this.pos + 2, t = this.buffer[e];
4032
- for (; !D(t) && t !== ">"; )
4033
- t = this.buffer[++e];
4034
- return yield* this.pushToIndex(t === ">" ? e + 1 : e, !1);
4035
- } else {
4036
- let e = this.pos + 1, t = this.buffer[e];
4037
- for (; t; )
4038
- if (jn.has(t))
4039
- t = this.buffer[++e];
4040
- else if (t === "%" && Pt.has(this.buffer[e + 1]) && Pt.has(this.buffer[e + 2]))
4041
- t = this.buffer[e += 3];
4042
- else
4043
- break;
4044
- return yield* this.pushToIndex(e, !1);
4045
- }
4046
- }
4047
- *pushNewline() {
4048
- const e = this.buffer[this.pos];
4049
- return e === `
4050
- ` ? yield* this.pushCount(1) : e === "\r" && this.charAt(1) === `
4051
- ` ? yield* this.pushCount(2) : 0;
4052
- }
4053
- *pushSpaces(e) {
4054
- let t = this.pos - 1, n;
4055
- do
4056
- n = this.buffer[++t];
4057
- while (n === " " || e && n === " ");
4058
- const i = t - this.pos;
4059
- return i > 0 && (yield this.buffer.substr(this.pos, i), this.pos = t), i;
4060
- }
4061
- *pushUntil(e) {
4062
- let t = this.pos, n = this.buffer[t];
4063
- for (; !e(n); )
4064
- n = this.buffer[++t];
4065
- return yield* this.pushToIndex(t, !1);
4066
- }
4067
- }
4068
- class Ls {
4069
- constructor() {
4070
- this.lineStarts = [], this.addNewLine = (e) => this.lineStarts.push(e), this.linePos = (e) => {
4071
- let t = 0, n = this.lineStarts.length;
4072
- for (; t < n; ) {
4073
- const r = t + n >> 1;
4074
- this.lineStarts[r] < e ? t = r + 1 : n = r;
4075
- }
4076
- if (this.lineStarts[t] === e)
4077
- return { line: t + 1, col: 1 };
4078
- if (t === 0)
4079
- return { line: 0, col: e };
4080
- const i = this.lineStarts[t - 1];
4081
- return { line: t, col: e - i + 1 };
4082
- };
4083
- }
4084
- }
4085
- function Y(s, e) {
4086
- for (let t = 0; t < s.length; ++t)
4087
- if (s[t].type === e)
4088
- return !0;
4089
- return !1;
4090
- }
4091
- function jt(s) {
4092
- for (let e = 0; e < s.length; ++e)
4093
- switch (s[e].type) {
4094
- case "space":
4095
- case "comment":
4096
- case "newline":
4097
- break;
4098
- default:
4099
- return e;
4100
- }
4101
- return -1;
4102
- }
4103
- function $s(s) {
4104
- switch (s == null ? void 0 : s.type) {
4105
- case "alias":
4106
- case "scalar":
4107
- case "single-quoted-scalar":
4108
- case "double-quoted-scalar":
4109
- case "flow-collection":
4110
- return !0;
4111
- default:
4112
- return !1;
4113
- }
4114
- }
4115
- function Ce(s) {
4116
- switch (s.type) {
4117
- case "document":
4118
- return s.start;
4119
- case "block-map": {
4120
- const e = s.items[s.items.length - 1];
4121
- return e.sep ?? e.start;
4122
- }
4123
- case "block-seq":
4124
- return s.items[s.items.length - 1].start;
4125
- /* istanbul ignore next should not happen */
4126
- default:
4127
- return [];
4128
- }
4129
- }
4130
- function ne(s) {
4131
- var t;
4132
- if (s.length === 0)
4133
- return [];
4134
- let e = s.length;
4135
- e: for (; --e >= 0; )
4136
- switch (s[e].type) {
4137
- case "doc-start":
4138
- case "explicit-key-ind":
4139
- case "map-value-ind":
4140
- case "seq-item-ind":
4141
- case "newline":
4142
- break e;
4143
- }
4144
- for (; ((t = s[++e]) == null ? void 0 : t.type) === "space"; )
4145
- ;
4146
- return s.splice(e, s.length);
4147
- }
4148
- function Dt(s) {
4149
- if (s.start.type === "flow-seq-start")
4150
- for (const e of s.items)
4151
- e.sep && !e.value && !Y(e.start, "explicit-key-ind") && !Y(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);
4152
- }
4153
- class Tt {
4154
- /**
4155
- * @param onNewLine - If defined, called separately with the start position of
4156
- * each new line (in `parse()`, including the start of input).
4157
- */
4158
- constructor(e) {
4159
- 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;
4160
- }
4161
- /**
4162
- * Parse `source` as a YAML stream.
4163
- * If `incomplete`, a part of the last line may be left as a buffer for the next call.
4164
- *
4165
- * Errors are not thrown, but yielded as `{ type: 'error', message }` tokens.
4166
- *
4167
- * @returns A generator of tokens representing each directive, document, and other structure.
4168
- */
4169
- *parse(e, t = !1) {
4170
- this.onNewLine && this.offset === 0 && this.onNewLine(0);
4171
- for (const n of this.lexer.lex(e, t))
4172
- yield* this.next(n);
4173
- t || (yield* this.end());
4174
- }
4175
- /**
4176
- * Advance the parser by the `source` of one lexical token.
4177
- */
4178
- *next(e) {
4179
- if (this.source = e, this.atScalar) {
4180
- this.atScalar = !1, yield* this.step(), this.offset += e.length;
4181
- return;
4182
- }
4183
- const t = Is(e);
4184
- if (t)
4185
- if (t === "scalar")
4186
- this.atNewLine = !1, this.atScalar = !0, this.type = "scalar";
4187
- else {
4188
- switch (this.type = t, yield* this.step(), t) {
4189
- case "newline":
4190
- this.atNewLine = !0, this.indent = 0, this.onNewLine && this.onNewLine(this.offset + e.length);
4191
- break;
4192
- case "space":
4193
- this.atNewLine && e[0] === " " && (this.indent += e.length);
4194
- break;
4195
- case "explicit-key-ind":
4196
- case "map-value-ind":
4197
- case "seq-item-ind":
4198
- this.atNewLine && (this.indent += e.length);
4199
- break;
4200
- case "doc-mode":
4201
- case "flow-error-end":
4202
- return;
4203
- default:
4204
- this.atNewLine = !1;
4205
- }
4206
- this.offset += e.length;
4207
- }
4208
- else {
4209
- const n = `Not a YAML token: ${e}`;
4210
- yield* this.pop({ type: "error", offset: this.offset, message: n, source: e }), this.offset += e.length;
4211
- }
4212
- }
4213
- /** Call at end of input to push out any remaining constructions */
4214
- *end() {
4215
- for (; this.stack.length > 0; )
4216
- yield* this.pop();
4217
- }
4218
- get sourceToken() {
4219
- return {
4220
- type: this.type,
4221
- offset: this.offset,
4222
- indent: this.indent,
4223
- source: this.source
4224
- };
4225
- }
4226
- *step() {
4227
- const e = this.peek(1);
4228
- if (this.type === "doc-end" && (!e || e.type !== "doc-end")) {
4229
- for (; this.stack.length > 0; )
4230
- yield* this.pop();
4231
- this.stack.push({
4232
- type: "doc-end",
4233
- offset: this.offset,
4234
- source: this.source
4235
- });
4236
- return;
4237
- }
4238
- if (!e)
4239
- return yield* this.stream();
4240
- switch (e.type) {
4241
- case "document":
4242
- return yield* this.document(e);
4243
- case "alias":
4244
- case "scalar":
4245
- case "single-quoted-scalar":
4246
- case "double-quoted-scalar":
4247
- return yield* this.scalar(e);
4248
- case "block-scalar":
4249
- return yield* this.blockScalar(e);
4250
- case "block-map":
4251
- return yield* this.blockMap(e);
4252
- case "block-seq":
4253
- return yield* this.blockSequence(e);
4254
- case "flow-collection":
4255
- return yield* this.flowCollection(e);
4256
- case "doc-end":
4257
- return yield* this.documentEnd(e);
4258
- }
4259
- yield* this.pop();
4260
- }
4261
- peek(e) {
4262
- return this.stack[this.stack.length - e];
4263
- }
4264
- *pop(e) {
4265
- const t = e ?? this.stack.pop();
4266
- if (!t)
4267
- yield { type: "error", offset: this.offset, source: "", message: "Tried to pop an empty stack" };
4268
- else if (this.stack.length === 0)
4269
- yield t;
4270
- else {
4271
- const n = this.peek(1);
4272
- 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) {
4273
- case "document":
4274
- n.value = t;
4275
- break;
4276
- case "block-scalar":
4277
- n.props.push(t);
4278
- break;
4279
- case "block-map": {
4280
- const i = n.items[n.items.length - 1];
4281
- if (i.value) {
4282
- n.items.push({ start: [], key: t, sep: [] }), this.onKeyLine = !0;
4283
- return;
4284
- } else if (i.sep)
4285
- i.value = t;
4286
- else {
4287
- Object.assign(i, { key: t, sep: [] }), this.onKeyLine = !i.explicitKey;
4288
- return;
4289
- }
4290
- break;
4291
- }
4292
- case "block-seq": {
4293
- const i = n.items[n.items.length - 1];
4294
- i.value ? n.items.push({ start: [], value: t }) : i.value = t;
4295
- break;
4296
- }
4297
- case "flow-collection": {
4298
- const i = n.items[n.items.length - 1];
4299
- !i || i.value ? n.items.push({ start: [], key: t, sep: [] }) : i.sep ? i.value = t : Object.assign(i, { key: t, sep: [] });
4300
- return;
4301
- }
4302
- /* istanbul ignore next should not happen */
4303
- default:
4304
- yield* this.pop(), yield* this.pop(t);
4305
- }
4306
- if ((n.type === "document" || n.type === "block-map" || n.type === "block-seq") && (t.type === "block-map" || t.type === "block-seq")) {
4307
- const i = t.items[t.items.length - 1];
4308
- 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));
4309
- }
4310
- }
4311
- }
4312
- *stream() {
4313
- switch (this.type) {
4314
- case "directive-line":
4315
- yield { type: "directive", offset: this.offset, source: this.source };
4316
- return;
4317
- case "byte-order-mark":
4318
- case "space":
4319
- case "comment":
4320
- case "newline":
4321
- yield this.sourceToken;
4322
- return;
4323
- case "doc-mode":
4324
- case "doc-start": {
4325
- const e = {
4326
- type: "document",
4327
- offset: this.offset,
4328
- start: []
4329
- };
4330
- this.type === "doc-start" && e.start.push(this.sourceToken), this.stack.push(e);
4331
- return;
4332
- }
4333
- }
4334
- yield {
4335
- type: "error",
4336
- offset: this.offset,
4337
- message: `Unexpected ${this.type} token in YAML stream`,
4338
- source: this.source
4339
- };
4340
- }
4341
- *document(e) {
4342
- if (e.value)
4343
- return yield* this.lineEnd(e);
4344
- switch (this.type) {
4345
- case "doc-start": {
4346
- jt(e.start) !== -1 ? (yield* this.pop(), yield* this.step()) : e.start.push(this.sourceToken);
4347
- return;
4348
- }
4349
- case "anchor":
4350
- case "tag":
4351
- case "space":
4352
- case "comment":
4353
- case "newline":
4354
- e.start.push(this.sourceToken);
4355
- return;
4356
- }
4357
- const t = this.startBlockValue(e);
4358
- t ? this.stack.push(t) : yield {
4359
- type: "error",
4360
- offset: this.offset,
4361
- message: `Unexpected ${this.type} token in YAML document`,
4362
- source: this.source
4363
- };
4364
- }
4365
- *scalar(e) {
4366
- if (this.type === "map-value-ind") {
4367
- const t = Ce(this.peek(2)), n = ne(t);
4368
- let i;
4369
- e.end ? (i = e.end, i.push(this.sourceToken), delete e.end) : i = [this.sourceToken];
4370
- const r = {
4371
- type: "block-map",
4372
- offset: e.offset,
4373
- indent: e.indent,
4374
- items: [{ start: n, key: e, sep: i }]
4375
- };
4376
- this.onKeyLine = !0, this.stack[this.stack.length - 1] = r;
4377
- } else
4378
- yield* this.lineEnd(e);
4379
- }
4380
- *blockScalar(e) {
4381
- switch (this.type) {
4382
- case "space":
4383
- case "comment":
4384
- case "newline":
4385
- e.props.push(this.sourceToken);
4386
- return;
4387
- case "scalar":
4388
- if (e.source = this.source, this.atNewLine = !0, this.indent = 0, this.onNewLine) {
4389
- let t = this.source.indexOf(`
4390
- `) + 1;
4391
- for (; t !== 0; )
4392
- this.onNewLine(this.offset + t), t = this.source.indexOf(`
4393
- `, t) + 1;
4394
- }
4395
- yield* this.pop();
4396
- break;
4397
- /* istanbul ignore next should not happen */
4398
- default:
4399
- yield* this.pop(), yield* this.step();
4400
- }
4401
- }
4402
- *blockMap(e) {
4403
- var n;
4404
- const t = e.items[e.items.length - 1];
4405
- switch (this.type) {
4406
- case "newline":
4407
- if (this.onKeyLine = !1, t.value) {
4408
- const i = "end" in t.value ? t.value.end : void 0, r = Array.isArray(i) ? i[i.length - 1] : void 0;
4409
- (r == null ? void 0 : r.type) === "comment" ? i == null || i.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4410
- } else t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4411
- return;
4412
- case "space":
4413
- case "comment":
4414
- if (t.value)
4415
- e.items.push({ start: [this.sourceToken] });
4416
- else if (t.sep)
4417
- t.sep.push(this.sourceToken);
4418
- else {
4419
- if (this.atIndentedComment(t.start, e.indent)) {
4420
- const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4421
- if (Array.isArray(r)) {
4422
- Array.prototype.push.apply(r, t.start), r.push(this.sourceToken), e.items.pop();
4423
- return;
4424
- }
4425
- }
4426
- t.start.push(this.sourceToken);
4427
- }
4428
- return;
4429
- }
4430
- if (this.indent >= e.indent) {
4431
- const i = !this.onKeyLine && this.indent === e.indent, r = i && (t.sep || t.explicitKey) && this.type !== "seq-item-ind";
4432
- let o = [];
4433
- if (r && t.sep && !t.value) {
4434
- const l = [];
4435
- for (let a = 0; a < t.sep.length; ++a) {
4436
- const c = t.sep[a];
4437
- switch (c.type) {
4438
- case "newline":
4439
- l.push(a);
4440
- break;
4441
- case "space":
4442
- break;
4443
- case "comment":
4444
- c.indent > e.indent && (l.length = 0);
4445
- break;
4446
- default:
4447
- l.length = 0;
4448
- }
4449
- }
4450
- l.length >= 2 && (o = t.sep.splice(l[1]));
4451
- }
4452
- switch (this.type) {
4453
- case "anchor":
4454
- case "tag":
4455
- 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);
4456
- return;
4457
- case "explicit-key-ind":
4458
- !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({
4459
- type: "block-map",
4460
- offset: this.offset,
4461
- indent: this.indent,
4462
- items: [{ start: [this.sourceToken], explicitKey: !0 }]
4463
- }), this.onKeyLine = !0;
4464
- return;
4465
- case "map-value-ind":
4466
- if (t.explicitKey)
4467
- if (t.sep)
4468
- if (t.value)
4469
- e.items.push({ start: [], key: null, sep: [this.sourceToken] });
4470
- else if (Y(t.sep, "map-value-ind"))
4471
- this.stack.push({
4472
- type: "block-map",
4473
- offset: this.offset,
4474
- indent: this.indent,
4475
- items: [{ start: o, key: null, sep: [this.sourceToken] }]
4476
- });
4477
- else if ($s(t.key) && !Y(t.sep, "newline")) {
4478
- const l = ne(t.start), a = t.key, c = t.sep;
4479
- c.push(this.sourceToken), delete t.key, delete t.sep, this.stack.push({
4480
- type: "block-map",
4481
- offset: this.offset,
4482
- indent: this.indent,
4483
- items: [{ start: l, key: a, sep: c }]
4484
- });
4485
- } else o.length > 0 ? t.sep = t.sep.concat(o, this.sourceToken) : t.sep.push(this.sourceToken);
4486
- else if (Y(t.start, "newline"))
4487
- Object.assign(t, { key: null, sep: [this.sourceToken] });
4488
- else {
4489
- const l = ne(t.start);
4490
- this.stack.push({
4491
- type: "block-map",
4492
- offset: this.offset,
4493
- indent: this.indent,
4494
- items: [{ start: l, key: null, sep: [this.sourceToken] }]
4495
- });
4496
- }
4497
- else
4498
- t.sep ? t.value || r ? e.items.push({ start: o, key: null, sep: [this.sourceToken] }) : Y(t.sep, "map-value-ind") ? this.stack.push({
4499
- type: "block-map",
4500
- offset: this.offset,
4501
- indent: this.indent,
4502
- items: [{ start: [], key: null, sep: [this.sourceToken] }]
4503
- }) : t.sep.push(this.sourceToken) : Object.assign(t, { key: null, sep: [this.sourceToken] });
4504
- this.onKeyLine = !0;
4505
- return;
4506
- case "alias":
4507
- case "scalar":
4508
- case "single-quoted-scalar":
4509
- case "double-quoted-scalar": {
4510
- const l = this.flowScalar(this.type);
4511
- 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);
4512
- return;
4513
- }
4514
- default: {
4515
- const l = this.startBlockValue(e);
4516
- if (l) {
4517
- if (l.type === "block-seq") {
4518
- if (!t.explicitKey && t.sep && !Y(t.sep, "newline")) {
4519
- yield* this.pop({
4520
- type: "error",
4521
- offset: this.offset,
4522
- message: "Unexpected block-seq-ind on same line with key",
4523
- source: this.source
4524
- });
4525
- return;
4526
- }
4527
- } else i && e.items.push({ start: o });
4528
- this.stack.push(l);
4529
- return;
4530
- }
4531
- }
4532
- }
4533
- }
4534
- yield* this.pop(), yield* this.step();
4535
- }
4536
- *blockSequence(e) {
4537
- var n;
4538
- const t = e.items[e.items.length - 1];
4539
- switch (this.type) {
4540
- case "newline":
4541
- if (t.value) {
4542
- const i = "end" in t.value ? t.value.end : void 0, r = Array.isArray(i) ? i[i.length - 1] : void 0;
4543
- (r == null ? void 0 : r.type) === "comment" ? i == null || i.push(this.sourceToken) : e.items.push({ start: [this.sourceToken] });
4544
- } else
4545
- t.start.push(this.sourceToken);
4546
- return;
4547
- case "space":
4548
- case "comment":
4549
- if (t.value)
4550
- e.items.push({ start: [this.sourceToken] });
4551
- else {
4552
- if (this.atIndentedComment(t.start, e.indent)) {
4553
- const i = e.items[e.items.length - 2], r = (n = i == null ? void 0 : i.value) == null ? void 0 : n.end;
4554
- if (Array.isArray(r)) {
4555
- Array.prototype.push.apply(r, t.start), r.push(this.sourceToken), e.items.pop();
4556
- return;
4557
- }
4558
- }
4559
- t.start.push(this.sourceToken);
4560
- }
4561
- return;
4562
- case "anchor":
4563
- case "tag":
4564
- if (t.value || this.indent <= e.indent)
4565
- break;
4566
- t.start.push(this.sourceToken);
4567
- return;
4568
- case "seq-item-ind":
4569
- if (this.indent !== e.indent)
4570
- break;
4571
- t.value || Y(t.start, "seq-item-ind") ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4572
- return;
4573
- }
4574
- if (this.indent > e.indent) {
4575
- const i = this.startBlockValue(e);
4576
- if (i) {
4577
- this.stack.push(i);
4578
- return;
4579
- }
4580
- }
4581
- yield* this.pop(), yield* this.step();
4582
- }
4583
- *flowCollection(e) {
4584
- const t = e.items[e.items.length - 1];
4585
- if (this.type === "flow-error-end") {
4586
- let n;
4587
- do
4588
- yield* this.pop(), n = this.peek(1);
4589
- while (n && n.type === "flow-collection");
4590
- } else if (e.end.length === 0) {
4591
- switch (this.type) {
4592
- case "comma":
4593
- case "explicit-key-ind":
4594
- !t || t.sep ? e.items.push({ start: [this.sourceToken] }) : t.start.push(this.sourceToken);
4595
- return;
4596
- case "map-value-ind":
4597
- !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] });
4598
- return;
4599
- case "space":
4600
- case "comment":
4601
- case "newline":
4602
- case "anchor":
4603
- case "tag":
4604
- !t || t.value ? e.items.push({ start: [this.sourceToken] }) : t.sep ? t.sep.push(this.sourceToken) : t.start.push(this.sourceToken);
4605
- return;
4606
- case "alias":
4607
- case "scalar":
4608
- case "single-quoted-scalar":
4609
- case "double-quoted-scalar": {
4610
- const i = this.flowScalar(this.type);
4611
- !t || t.value ? e.items.push({ start: [], key: i, sep: [] }) : t.sep ? this.stack.push(i) : Object.assign(t, { key: i, sep: [] });
4612
- return;
4613
- }
4614
- case "flow-map-end":
4615
- case "flow-seq-end":
4616
- e.end.push(this.sourceToken);
4617
- return;
4618
- }
4619
- const n = this.startBlockValue(e);
4620
- n ? this.stack.push(n) : (yield* this.pop(), yield* this.step());
4621
- } else {
4622
- const n = this.peek(2);
4623
- if (n.type === "block-map" && (this.type === "map-value-ind" && n.indent === e.indent || this.type === "newline" && !n.items[n.items.length - 1].sep))
4624
- yield* this.pop(), yield* this.step();
4625
- else if (this.type === "map-value-ind" && n.type !== "flow-collection") {
4626
- const i = Ce(n), r = ne(i);
4627
- Dt(e);
4628
- const o = e.end.splice(1, e.end.length);
4629
- o.push(this.sourceToken);
4630
- const l = {
4631
- type: "block-map",
4632
- offset: e.offset,
4633
- indent: e.indent,
4634
- items: [{ start: r, key: e, sep: o }]
4635
- };
4636
- this.onKeyLine = !0, this.stack[this.stack.length - 1] = l;
4637
- } else
4638
- yield* this.lineEnd(e);
4639
- }
4640
- }
4641
- flowScalar(e) {
4642
- if (this.onNewLine) {
4643
- let t = this.source.indexOf(`
4644
- `) + 1;
4645
- for (; t !== 0; )
4646
- this.onNewLine(this.offset + t), t = this.source.indexOf(`
4647
- `, t) + 1;
4648
- }
4649
- return {
4650
- type: e,
4651
- offset: this.offset,
4652
- indent: this.indent,
4653
- source: this.source
4654
- };
4655
- }
4656
- startBlockValue(e) {
4657
- switch (this.type) {
4658
- case "alias":
4659
- case "scalar":
4660
- case "single-quoted-scalar":
4661
- case "double-quoted-scalar":
4662
- return this.flowScalar(this.type);
4663
- case "block-scalar-header":
4664
- return {
4665
- type: "block-scalar",
4666
- offset: this.offset,
4667
- indent: this.indent,
4668
- props: [this.sourceToken],
4669
- source: ""
4670
- };
4671
- case "flow-map-start":
4672
- case "flow-seq-start":
4673
- return {
4674
- type: "flow-collection",
4675
- offset: this.offset,
4676
- indent: this.indent,
4677
- start: this.sourceToken,
4678
- items: [],
4679
- end: []
4680
- };
4681
- case "seq-item-ind":
4682
- return {
4683
- type: "block-seq",
4684
- offset: this.offset,
4685
- indent: this.indent,
4686
- items: [{ start: [this.sourceToken] }]
4687
- };
4688
- case "explicit-key-ind": {
4689
- this.onKeyLine = !0;
4690
- const t = Ce(e), n = ne(t);
4691
- return n.push(this.sourceToken), {
4692
- type: "block-map",
4693
- offset: this.offset,
4694
- indent: this.indent,
4695
- items: [{ start: n, explicitKey: !0 }]
4696
- };
4697
- }
4698
- case "map-value-ind": {
4699
- this.onKeyLine = !0;
4700
- const t = Ce(e), n = ne(t);
4701
- return {
4702
- type: "block-map",
4703
- offset: this.offset,
4704
- indent: this.indent,
4705
- items: [{ start: n, key: null, sep: [this.sourceToken] }]
4706
- };
4707
- }
4708
- }
4709
- return null;
4710
- }
4711
- atIndentedComment(e, t) {
4712
- return this.type !== "comment" || this.indent <= t ? !1 : e.every((n) => n.type === "newline" || n.type === "space");
4713
- }
4714
- *documentEnd(e) {
4715
- this.type !== "doc-mode" && (e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop()));
4716
- }
4717
- *lineEnd(e) {
4718
- switch (this.type) {
4719
- case "comma":
4720
- case "doc-start":
4721
- case "doc-end":
4722
- case "flow-seq-end":
4723
- case "flow-map-end":
4724
- case "map-value-ind":
4725
- yield* this.pop(), yield* this.step();
4726
- break;
4727
- case "newline":
4728
- this.onKeyLine = !1;
4729
- // fallthrough
4730
- case "space":
4731
- case "comment":
4732
- default:
4733
- e.end ? e.end.push(this.sourceToken) : e.end = [this.sourceToken], this.type === "newline" && (yield* this.pop());
4734
- }
4735
- }
4736
- }
4737
- function _s(s) {
4738
- const e = s.prettyErrors !== !1;
4739
- return { lineCounter: s.lineCounter || e && new Ls() || null, prettyErrors: e };
4740
- }
4741
- function qn(s, e = {}) {
4742
- 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)));
4743
- if (n && t)
4744
- for (const l of o)
4745
- l.errors.forEach(De(s, t)), l.warnings.forEach(De(s, t));
4746
- return o.length > 0 ? o : Object.assign([], { empty: !0 }, r.streamInfo());
4747
- }
4748
- function Cs(s, e = {}) {
4749
- const { lineCounter: t, prettyErrors: n } = _s(e), i = new Tt(t == null ? void 0 : t.addNewLine), r = new It(e);
4750
- let o = null;
4751
- for (const l of r.compose(i.parse(s), !0, s.length))
4752
- if (!o)
4753
- o = l;
4754
- else if (o.options.logLevel !== "silent") {
4755
- o.errors.push(new z(l.range.slice(0, 2), "MULTIPLE_DOCS", "Source contains multiple documents; please use YAML.parseAllDocuments()"));
4756
- break;
4757
- }
4758
- return n && t && (o.errors.forEach(De(s, t)), o.warnings.forEach(De(s, t))), o;
4759
- }
4760
- function Fn(s, e, t) {
4761
- let n;
4762
- typeof e == "function" ? n = e : t === void 0 && e && typeof e == "object" && (t = e);
4763
- const i = Cs(s, t);
4764
- if (!i)
4765
- return null;
4766
- if (i.warnings.forEach((r) => zt(i.options.logLevel, r)), i.errors.length > 0) {
4767
- if (i.options.logLevel !== "silent")
4768
- throw i.errors[0];
4769
- i.errors = [];
4770
- }
4771
- return i.toJS(Object.assign({ reviver: n }, t));
4772
- }
4773
- function Rn(s, e, t) {
4774
- let n = null;
4775
- if (typeof e == "function" || Array.isArray(e) ? n = e : t === void 0 && e && (t = e), typeof t == "string" && (t = t.length), typeof t == "number") {
4776
- const i = Math.round(t);
4777
- t = i < 1 ? void 0 : i > 8 ? { indent: 8 } : { indent: i };
4778
- }
4779
- if (s === void 0) {
4780
- const { keepUndefined: i } = t ?? e ?? {};
4781
- if (!i)
4782
- return;
4783
- }
4784
- return ee(s) && !n ? s.toString(t) : new ge(s, n, t).toString(t);
4785
- }
4786
- const Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4787
- __proto__: null,
4788
- Alias: Re,
4789
- CST: Pn,
4790
- Composer: It,
4791
- Document: ge,
4792
- Lexer: Ts,
4793
- LineCounter: Ls,
4794
- Pair: v,
4795
- Parser: Tt,
4796
- Scalar: A,
4797
- Schema: Xe,
4798
- YAMLError: At,
4799
- YAMLMap: K,
4800
- YAMLParseError: z,
4801
- YAMLSeq: W,
4802
- YAMLWarning: ys,
4803
- isAlias: x,
4804
- isCollection: L,
4805
- isDocument: ee,
4806
- isMap: de,
4807
- isNode: $,
4808
- isPair: T,
4809
- isScalar: E,
4810
- isSeq: pe,
4811
- parse: Fn,
4812
- parseAllDocuments: qn,
4813
- parseDocument: Cs,
4814
- stringify: Rn,
4815
- visit: Q,
4816
- visitAsync: Fe
4817
- }, Symbol.toStringTag, { value: "Module" }));
4818
- export {
4819
- Re as Alias,
4820
- Pn as CST,
4821
- It as Composer,
4822
- ge as Document,
4823
- Ts as Lexer,
4824
- Ls as LineCounter,
4825
- v as Pair,
4826
- Tt as Parser,
4827
- A as Scalar,
4828
- Xe as Schema,
4829
- At as YAMLError,
4830
- K as YAMLMap,
4831
- z as YAMLParseError,
4832
- W as YAMLSeq,
4833
- ys as YAMLWarning,
4834
- Un as default,
4835
- x as isAlias,
4836
- L as isCollection,
4837
- ee as isDocument,
4838
- de as isMap,
4839
- $ as isNode,
4840
- T as isPair,
4841
- E as isScalar,
4842
- pe as isSeq,
4843
- Fn as parse,
4844
- qn as parseAllDocuments,
4845
- Cs as parseDocument,
4846
- Rn as stringify,
4847
- Q as visit,
4848
- Fe as visitAsync
4849
- };
4850
- //# sourceMappingURL=index-DcHeSvkE.js.map