zudoku 0.0.0-feda542 → 0.0.0-ff27e7ea

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