@scalar/api-reference 1.59.1 → 1.59.2

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 (100) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.d.ts +16 -7
  3. package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.d.ts.map +1 -1
  4. package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js +33 -7
  5. package/dist/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.js.map +1 -1
  6. package/dist/browser/chunks/{AgentScalarChatInterface-CPqxdcxM.js → AgentScalarChatInterface-D4DCmV5y.js} +2 -2
  7. package/dist/browser/chunks/{ScalarTextInput.vue-4iBshoVm.js → ScalarTextInput.vue-C5aaO8tA.js} +2 -2
  8. package/dist/browser/chunks/basic-shape-diamond.svg-BTEOT1FL.js +1 -1
  9. package/dist/browser/chunks/basic-shape-hexagon.svg-BSPzaCgF.js +1 -1
  10. package/dist/browser/chunks/basic-shape-primary-circle-ellipse-round.svg-DKmZ8UUU.js +1 -1
  11. package/dist/browser/chunks/basic-shape-primary-square-rectangle.svg-n2YRykHD.js +1 -1
  12. package/dist/browser/chunks/basic-shape-shield.svg-Bec9cJDA.js +1 -1
  13. package/dist/browser/chunks/browser-67K6wmG9.js +1 -1
  14. package/dist/browser/chunks/computer-device-desktop-monitor.svg-m6j893Hb.js +1 -1
  15. package/dist/browser/chunks/computer-device-desktop.svg-Dk1VVO7k.js +1 -1
  16. package/dist/browser/chunks/computer-device-laptop.svg-BNGVUCYS.js +1 -1
  17. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung-back.svg-CC4UUTFw.js +1 -1
  18. package/dist/browser/chunks/computer-device-mobile-phone-android-samsung.svg-D8ExpMpL.js +1 -1
  19. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x-back.svg-CLm7sgMM.js +1 -1
  20. package/dist/browser/chunks/computer-device-mobile-phone-iphone-x.svg-Xrttg6_7.js +1 -1
  21. package/dist/browser/chunks/computer-device-mobile-tablet-touch.svg-DQ2oTvOG.js +1 -1
  22. package/dist/browser/chunks/computer-device-mobile-tablet.svg-DCr0XlRc.js +1 -1
  23. package/dist/browser/chunks/computer-device-network-ethernet-cat6.svg-AK9l0iOl.js +1 -1
  24. package/dist/browser/chunks/computer-device-network-lan-www.svg-gUIdFBlE.js +1 -1
  25. package/dist/browser/chunks/computer-device-network-wifi-connection.svg-Be-EMm4e.js +1 -1
  26. package/dist/browser/chunks/computer-device-network-wifi-router.svg-Dc2VzyqK.js +1 -1
  27. package/dist/browser/chunks/ecology-science-erlenmeyer-flask.svg-DHgy7Jfd.js +1 -1
  28. package/dist/browser/chunks/image-flash-lightning.svg-EETR_y1q.js +1 -1
  29. package/dist/browser/chunks/image-picture-flower.svg-DN1AYzJU.js +1 -1
  30. package/dist/browser/chunks/interface-alert-exclamation-diamond.svg-C5NozMV_.js +1 -1
  31. package/dist/browser/chunks/interface-alert-exclamation-triangle-warning.svg-DaAg2fF5.js +1 -1
  32. package/dist/browser/chunks/interface-alert-information-circle.svg-ckkkt9Mv.js +1 -1
  33. package/dist/browser/chunks/interface-award-crown.svg-pjvn9hY-.js +1 -1
  34. package/dist/browser/chunks/interface-bookmark-tag.svg-r2r-lQq4.js +1 -1
  35. package/dist/browser/chunks/interface-bookmark.svg-BK9HKQBT.js +1 -1
  36. package/dist/browser/chunks/interface-calendar-date-one.svg-DNnF0M1I.js +1 -1
  37. package/dist/browser/chunks/interface-content-book-open-pages.svg-CQj_w9Vp.js +1 -1
  38. package/dist/browser/chunks/interface-content-book-page.svg-DppoeJRe.js +1 -1
  39. package/dist/browser/chunks/interface-content-file.svg-CvcD7OiY.js +1 -1
  40. package/dist/browser/chunks/interface-content-folder.svg-BmtS5I9A.js +1 -1
  41. package/dist/browser/chunks/interface-copy-clipboard.svg-Be6EI50X.js +1 -1
  42. package/dist/browser/chunks/interface-edit-attachment.svg-G5TKzpWX.js +1 -1
  43. package/dist/browser/chunks/interface-edit-binocular.svg-jzL-DvGB.js +1 -1
  44. package/dist/browser/chunks/interface-edit-magic-wand.svg-BOTlymvp.js +1 -1
  45. package/dist/browser/chunks/interface-edit-tool-paint-roller.svg-s9dwryx7.js +1 -1
  46. package/dist/browser/chunks/interface-edit-tool-pencil.svg-C7v0dbB3.js +1 -1
  47. package/dist/browser/chunks/interface-favorite-award.svg-CYHUgUG0.js +1 -1
  48. package/dist/browser/chunks/interface-favorite-flag.svg-C10zlKOb.js +1 -1
  49. package/dist/browser/chunks/interface-favorite-heart.svg-eoduXxlz.js +1 -1
  50. package/dist/browser/chunks/interface-favorite-star.svg-BSmxJetr.js +1 -1
  51. package/dist/browser/chunks/interface-favorite-stars-sparkles.svg-JTFLj3Ls.js +1 -1
  52. package/dist/browser/chunks/interface-hierarchy-flowchart.svg-Cg_Wy0kN.js +1 -1
  53. package/dist/browser/chunks/interface-home-house.svg-DytoGRnv.js +1 -1
  54. package/dist/browser/chunks/interface-hyperlink.svg-CuEfmmQI.js +1 -1
  55. package/dist/browser/chunks/interface-lighting-brightness.svg-DSK0h_Pa.js +1 -1
  56. package/dist/browser/chunks/interface-lock-closed.svg-Cn6TaLYv.js +1 -1
  57. package/dist/browser/chunks/interface-lock-open-unlock.svg-CVkG5-9W.js +1 -1
  58. package/dist/browser/chunks/interface-login-key.svg-y-cwwXjN.js +1 -1
  59. package/dist/browser/chunks/interface-search.svg-S-puVFJB.js +1 -1
  60. package/dist/browser/chunks/interface-setting-cog.svg-CTH4_lLg.js +1 -1
  61. package/dist/browser/chunks/interface-share-megaphone-bullhorn.svg-Pbp39MyC.js +1 -1
  62. package/dist/browser/chunks/interface-share-rocket.svg-BgCsIRZO.js +1 -1
  63. package/dist/browser/chunks/interface-share-satellite.svg-DAMN9d5G.js +1 -1
  64. package/dist/browser/chunks/interface-share-space-ship.svg-Dt-Mejxk.js +1 -1
  65. package/dist/browser/chunks/interface-share.svg-vFYTXSti.js +1 -1
  66. package/dist/browser/chunks/interface-signal-square.svg-DNG4LpAe.js +1 -1
  67. package/dist/browser/chunks/interface-time-clock-circle.svg-Bpz-nLxo.js +1 -1
  68. package/dist/browser/chunks/interface-time-hour-glass.svg-D7agfKsH.js +1 -1
  69. package/dist/browser/chunks/interface-users-multiple.svg-CkPJBBnG.js +1 -1
  70. package/dist/browser/chunks/interface-weather-moon.svg-CaTZFMPO.js +1 -1
  71. package/dist/browser/chunks/mail-chat-bubble-square.svg-DC8RIihp.js +1 -1
  72. package/dist/browser/chunks/mail-send-email-paper-airplane.svg-D8OLs9jz.js +1 -1
  73. package/dist/browser/chunks/mail-send-envelope.svg-CV33h5Sx.js +1 -1
  74. package/dist/browser/chunks/{modal-DuL3rNXj.js → modal-B4LeCbAi.js} +2 -2
  75. package/dist/browser/chunks/{modal-Crw1-pTJ.js → modal-CgDbMGa1.js} +2 -2
  76. package/dist/browser/chunks/money-cashier-receipt.svg-CJL8C2gs.js +1 -1
  77. package/dist/browser/chunks/money-currency-dollar-pay.svg-VdBplCTx.js +1 -1
  78. package/dist/browser/chunks/money-graph-arrow-increase.svg-DcRov3zk.js +1 -1
  79. package/dist/browser/chunks/money-graph-bar-chart-increase.svg-Cc7KxjX-.js +1 -1
  80. package/dist/browser/chunks/nature-ecology-leaf.svg-DR3cTZxt.js +1 -1
  81. package/dist/browser/chunks/phone-telephone.svg-DyY0gUlk.js +1 -1
  82. package/dist/browser/chunks/programming-bug.svg-BHLT-Qhp.js +1 -1
  83. package/dist/browser/chunks/programming-cloud.svg-B6YW33ba.js +1 -1
  84. package/dist/browser/chunks/programming-computer-database-server.svg-B6o5Sdn-.js +1 -1
  85. package/dist/browser/chunks/programming-computer-database.svg-Cl7OVtpJ.js +1 -1
  86. package/dist/browser/chunks/programming-module-four-layout.svg-BQrerL1x.js +1 -1
  87. package/dist/browser/chunks/programming-module-three.svg-B2KTQzBM.js +1 -1
  88. package/dist/browser/chunks/programming-module.svg-CiID7kPm.js +1 -1
  89. package/dist/browser/chunks/programming-script-code.svg-D1M5rtkN.js +1 -1
  90. package/dist/browser/chunks/runtime-core.esm-bundler-Byrbbu5Q.js +1 -1
  91. package/dist/browser/chunks/shopping-cart.svg-BEegiIR9.js +1 -1
  92. package/dist/browser/chunks/shopping-gift-present.svg-BUHwuLix.js +1 -1
  93. package/dist/browser/chunks/shopping-shipping-box-parcel-package.svg-D6fxWdYx.js +1 -1
  94. package/dist/browser/chunks/tag-new-circle.svg-jsg1bGs0.js +1 -1
  95. package/dist/browser/chunks/travel-map-earth-globe.svg-ClbMiU-f.js +1 -1
  96. package/dist/browser/chunks/{vendor-Dp5Q6nDX.js → vendor-BNhbieDE.js} +16 -16
  97. package/dist/browser/standalone.esm.js +6 -4
  98. package/dist/browser/standalone.js +7 -5
  99. package/dist/components/ApiReference.vue.script.js +1 -1
  100. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @scalar/api-reference
2
2
 
3
+ ## 1.59.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#9471](https://github.com/scalar/scalar/pull/9471): Restore support for the deprecated `source` install command on `x-scalar-sdk-installation`. When set, it is appended to `description` as a fenced code block (or used on its own when there is no `description`). `description` remains the promoted field.
8
+
3
9
  ## 1.59.1
4
10
 
5
11
  ### Patch Changes
@@ -1,19 +1,28 @@
1
1
  import type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation';
2
2
  /** The array shape stored under `x-scalar-sdk-installation`. */
3
3
  type SdkInstallationList = NonNullable<XScalarSdkInstallation['x-scalar-sdk-installation']>;
4
+ /** A renderable SDK entry whose `description` is the resolved Markdown to show. */
5
+ type RenderableSdk = {
6
+ lang: string;
7
+ description: string;
8
+ };
4
9
  /**
5
- * The SDK installation entries that actually have something to render.
10
+ * The SDK installation entries that actually have something to render, each
11
+ * resolved to a single Markdown `description`.
6
12
  *
7
- * Entries that only carry a `lang` (no `description`) are ignored so the UI can
8
- * fall back to the generic client selector instead of showing an empty card.
9
- * Both the gate in `Content.vue` and the tab list in the block rely on this, so
10
- * the "has instructions" rule lives in one place.
13
+ * A `description` is the promoted content, but the legacy `source` install
14
+ * command is still supported: when both are present it is appended to the
15
+ * description as a fenced code block, and when only `source` is present it
16
+ * becomes the description on its own. Entries that carry neither are ignored so
17
+ * the UI can fall back to the generic client selector instead of showing an
18
+ * empty card. Both the gate in `Content.vue` and the tab list in the block rely
19
+ * on this, so the "has instructions" rule lives in one place.
11
20
  *
12
21
  * The value comes straight from an untrusted OpenAPI document, so anything
13
22
  * malformed — a non-array extension, a non-object entry, or an entry missing a
14
- * string `lang` (the tab label and icon key) or `description` — is treated as
23
+ * string `lang` (the tab label and icon key) and any content — is treated as
15
24
  * "no instructions" rather than allowed to throw at render time.
16
25
  */
17
- export declare const getRenderableSdks: (xScalarSdkInstallation: SdkInstallationList | undefined) => SdkInstallationList;
26
+ export declare const getRenderableSdks: (xScalarSdkInstallation: SdkInstallationList | undefined) => RenderableSdk[];
18
27
  export {};
19
28
  //# sourceMappingURL=renderable-sdks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderable-sdks.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+EAA+E,CAAA;AAE3H,gEAAgE;AAChE,KAAK,mBAAmB,GAAG,WAAW,CAAC,sBAAsB,CAAC,2BAA2B,CAAC,CAAC,CAAA;AAE3F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,GAAI,wBAAwB,mBAAmB,GAAG,SAAS,KAAG,mBAKpF,CAAA"}
1
+ {"version":3,"file":"renderable-sdks.d.ts","sourceRoot":"","sources":["../../../../src/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+EAA+E,CAAA;AAE3H,gEAAgE;AAChE,KAAK,mBAAmB,GAAG,WAAW,CAAC,sBAAsB,CAAC,2BAA2B,CAAC,CAAC,CAAA;AAE3F,mFAAmF;AACnF,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAgBD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB,GAAI,wBAAwB,mBAAmB,GAAG,SAAS,KAAG,aAAa,EAqBjG,CAAA"}
@@ -1,18 +1,44 @@
1
1
  //#region src/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.ts
2
2
  /**
3
- * The SDK installation entries that actually have something to render.
3
+ * Wrap a raw install command in a fenced code block.
4
4
  *
5
- * Entries that only carry a `lang` (no `description`) are ignored so the UI can
6
- * fall back to the generic client selector instead of showing an empty card.
7
- * Both the gate in `Content.vue` and the tab list in the block rely on this, so
8
- * the "has instructions" rule lives in one place.
5
+ * The fence uses a run of backticks longer than the longest run inside the
6
+ * source, so a `source` that itself contains backticks (or a nested fence)
7
+ * still renders as a single code block instead of breaking out of it.
8
+ */
9
+ var toFencedCodeBlock = (source) => {
10
+ const longestRun = Math.max(0, ...[...source.matchAll(/`+/g)].map((match) => match[0].length));
11
+ const fence = "`".repeat(Math.max(3, longestRun + 1));
12
+ return `${fence}\n${source}\n${fence}`;
13
+ };
14
+ /**
15
+ * The SDK installation entries that actually have something to render, each
16
+ * resolved to a single Markdown `description`.
17
+ *
18
+ * A `description` is the promoted content, but the legacy `source` install
19
+ * command is still supported: when both are present it is appended to the
20
+ * description as a fenced code block, and when only `source` is present it
21
+ * becomes the description on its own. Entries that carry neither are ignored so
22
+ * the UI can fall back to the generic client selector instead of showing an
23
+ * empty card. Both the gate in `Content.vue` and the tab list in the block rely
24
+ * on this, so the "has instructions" rule lives in one place.
9
25
  *
10
26
  * The value comes straight from an untrusted OpenAPI document, so anything
11
27
  * malformed — a non-array extension, a non-object entry, or an entry missing a
12
- * string `lang` (the tab label and icon key) or `description` — is treated as
28
+ * string `lang` (the tab label and icon key) and any content — is treated as
13
29
  * "no instructions" rather than allowed to throw at render time.
14
30
  */
15
- var getRenderableSdks = (xScalarSdkInstallation) => Array.isArray(xScalarSdkInstallation) ? xScalarSdkInstallation.filter((sdk) => typeof sdk?.lang === "string" && typeof sdk.description === "string" && sdk.description.length > 0) : [];
31
+ var getRenderableSdks = (xScalarSdkInstallation) => Array.isArray(xScalarSdkInstallation) ? xScalarSdkInstallation.flatMap((sdk) => {
32
+ if (typeof sdk?.lang !== "string") return [];
33
+ const description = typeof sdk.description === "string" && sdk.description.trim() ? sdk.description : "";
34
+ const source = typeof sdk.source === "string" ? sdk.source.trim() : "";
35
+ if (!description && !source) return [];
36
+ const resolved = [description, source && toFencedCodeBlock(source)].filter(Boolean).join("\n\n");
37
+ return [{
38
+ lang: sdk.lang,
39
+ description: resolved
40
+ }];
41
+ }) : [];
16
42
  //#endregion
17
43
  export { getRenderableSdks };
18
44
 
@@ -1 +1 @@
1
- {"version":3,"file":"renderable-sdks.js","names":[],"sources":["../../../../src/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.ts"],"sourcesContent":["import type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation'\n\n/** The array shape stored under `x-scalar-sdk-installation`. */\ntype SdkInstallationList = NonNullable<XScalarSdkInstallation['x-scalar-sdk-installation']>\n\n/**\n * The SDK installation entries that actually have something to render.\n *\n * Entries that only carry a `lang` (no `description`) are ignored so the UI can\n * fall back to the generic client selector instead of showing an empty card.\n * Both the gate in `Content.vue` and the tab list in the block rely on this, so\n * the \"has instructions\" rule lives in one place.\n *\n * The value comes straight from an untrusted OpenAPI document, so anything\n * malformed — a non-array extension, a non-object entry, or an entry missing a\n * string `lang` (the tab label and icon key) or `description` — is treated as\n * \"no instructions\" rather than allowed to throw at render time.\n */\nexport const getRenderableSdks = (xScalarSdkInstallation: SdkInstallationList | undefined): SdkInstallationList =>\n Array.isArray(xScalarSdkInstallation)\n ? xScalarSdkInstallation.filter(\n (sdk) => typeof sdk?.lang === 'string' && typeof sdk.description === 'string' && sdk.description.length > 0,\n )\n : []\n"],"mappings":";;;;;;;;;;;;;;AAkBA,IAAa,qBAAqB,2BAChC,MAAM,QAAQ,uBAAuB,GACjC,uBAAuB,QACpB,QAAQ,OAAO,KAAK,SAAS,YAAY,OAAO,IAAI,gBAAgB,YAAY,IAAI,YAAY,SAAS,EAC3G,GACD,EAAE"}
1
+ {"version":3,"file":"renderable-sdks.js","names":[],"sources":["../../../../src/blocks/scalar-sdk-installation-instructions/helpers/renderable-sdks.ts"],"sourcesContent":["import type { XScalarSdkInstallation } from '@scalar/workspace-store/schemas/extensions/document/x-scalar-sdk-installation'\n\n/** The array shape stored under `x-scalar-sdk-installation`. */\ntype SdkInstallationList = NonNullable<XScalarSdkInstallation['x-scalar-sdk-installation']>\n\n/** A renderable SDK entry whose `description` is the resolved Markdown to show. */\ntype RenderableSdk = {\n lang: string\n description: string\n}\n\n/**\n * Wrap a raw install command in a fenced code block.\n *\n * The fence uses a run of backticks longer than the longest run inside the\n * source, so a `source` that itself contains backticks (or a nested fence)\n * still renders as a single code block instead of breaking out of it.\n */\nconst toFencedCodeBlock = (source: string): string => {\n const longestRun = Math.max(0, ...[...source.matchAll(/`+/g)].map((match) => match[0].length))\n const fence = '`'.repeat(Math.max(3, longestRun + 1))\n\n return `${fence}\\n${source}\\n${fence}`\n}\n\n/**\n * The SDK installation entries that actually have something to render, each\n * resolved to a single Markdown `description`.\n *\n * A `description` is the promoted content, but the legacy `source` install\n * command is still supported: when both are present it is appended to the\n * description as a fenced code block, and when only `source` is present it\n * becomes the description on its own. Entries that carry neither are ignored so\n * the UI can fall back to the generic client selector instead of showing an\n * empty card. Both the gate in `Content.vue` and the tab list in the block rely\n * on this, so the \"has instructions\" rule lives in one place.\n *\n * The value comes straight from an untrusted OpenAPI document, so anything\n * malformed — a non-array extension, a non-object entry, or an entry missing a\n * string `lang` (the tab label and icon key) and any content — is treated as\n * \"no instructions\" rather than allowed to throw at render time.\n */\nexport const getRenderableSdks = (xScalarSdkInstallation: SdkInstallationList | undefined): RenderableSdk[] =>\n Array.isArray(xScalarSdkInstallation)\n ? xScalarSdkInstallation.flatMap((sdk) => {\n if (typeof sdk?.lang !== 'string') {\n return []\n }\n\n // Keep the description verbatim so indented code blocks and other\n // significant whitespace survive; only a whitespace-only value counts\n // as \"no description\".\n const description = typeof sdk.description === 'string' && sdk.description.trim() ? sdk.description : ''\n const source = typeof sdk.source === 'string' ? sdk.source.trim() : ''\n\n if (!description && !source) {\n return []\n }\n\n const resolved = [description, source && toFencedCodeBlock(source)].filter(Boolean).join('\\n\\n')\n\n return [{ lang: sdk.lang, description: resolved }]\n })\n : []\n"],"mappings":";;;;;;;;AAkBA,IAAM,qBAAqB,WAA2B;CACpD,MAAM,aAAa,KAAK,IAAI,GAAG,GAAG,CAAC,GAAG,OAAO,SAAS,MAAM,CAAC,CAAC,KAAK,UAAU,MAAM,GAAG,OAAO,CAAC;CAC9F,MAAM,QAAQ,IAAI,OAAO,KAAK,IAAI,GAAG,aAAa,EAAE,CAAC;AAErD,QAAO,GAAG,MAAM,IAAI,OAAO,IAAI;;;;;;;;;;;;;;;;;;;AAoBjC,IAAa,qBAAqB,2BAChC,MAAM,QAAQ,uBAAuB,GACjC,uBAAuB,SAAS,QAAQ;AACtC,KAAI,OAAO,KAAK,SAAS,SACvB,QAAO,EAAE;CAMX,MAAM,cAAc,OAAO,IAAI,gBAAgB,YAAY,IAAI,YAAY,MAAM,GAAG,IAAI,cAAc;CACtG,MAAM,SAAS,OAAO,IAAI,WAAW,WAAW,IAAI,OAAO,MAAM,GAAG;AAEpE,KAAI,CAAC,eAAe,CAAC,OACnB,QAAO,EAAE;CAGX,MAAM,WAAW,CAAC,aAAa,UAAU,kBAAkB,OAAO,CAAC,CAAC,OAAO,QAAQ,CAAC,KAAK,OAAO;AAEhG,QAAO,CAAC;EAAE,MAAM,IAAI;EAAM,aAAa;EAAU,CAAC;EAClD,GACF,EAAE"}
@@ -5,14 +5,14 @@
5
5
  * ___/ / /___/ ___ |/ /___/ ___ |/ _, _/
6
6
  * /____/\____/_/ |_/_____/_/ |_/_/ |_|
7
7
  *
8
- * @scalar/api-reference 1.59.1
8
+ * @scalar/api-reference 1.59.2
9
9
  *
10
10
  * Website: https://scalar.com
11
11
  * GitHub: https://github.com/scalar/scalar
12
12
  * License: https://github.com/scalar/scalar/blob/main/LICENSE
13
13
  **/
14
14
 
15
- import{$ as e,A as t,Ao as n,Bn as r,Ca as i,Cn as a,Da as o,Dn as s,Dt as c,E as l,Ea as u,F as d,Fn as f,Fo as p,G as m,H as h,I as g,J as ee,K as _,Kt as te,L as ne,Ln as re,M as ie,Mn as ae,Mo as oe,N as se,Nn as ce,No as le,Oa as ue,On as de,P as fe,Po as v,Q as pe,R as me,Sa as he,So as ge,Tt as _e,U as ve,Ut as ye,V as be,W as y,X as xe,Y as Se,Zt as Ce,_a as we,_o as Te,at as Ee,b as De,ba as Oe,bn as ke,bo as Ae,fa as je,fi as Me,ir as Ne,j as Pe,ja as Fe,jo as Ie,kn as Le,ko as Re,n as ze,nt as Be,q as Ve,r as He,rn as Ue,rr as We,tt as Ge,vo as Ke,wt as qe,xn as Je,xt as Ye,z as b}from"./vendor-Dp5Q6nDX.js";import{c as Xe,g as Ze,h as Qe,i as $e,m as et,n as tt,o as nt,r as rt,s as it,t as at,v as ot,y as st}from"./ScalarTextInput.vue-4iBshoVm.js";import{A as ct,B as lt,C as ut,D as dt,G as ft,Gt as pt,H as x,K as mt,P as ht,R as gt,S,St as _t,Tt as C,U as vt,Yt as w,Z as yt,at as T,b as E,d as D,dt as bt,et as xt,f as O,gt as k,i as A,j as St,l as j,mt as Ct,ot as wt,p as M,tt as N,u as P,ut as Tt,v as Et,xt as Dt,y as F,yt as Ot}from"./runtime-core.esm-bundler-Byrbbu5Q.js";import{a as kt,i as At,r as jt,t as Mt}from"./modal-DuL3rNXj.js";var Nt={key:0},Pt={key:1},Ft={key:2},It={key:3},Lt={key:4},Rt={key:5},zt=S({name:`ScalarIconArrowRight`,props:{label:{},weight:{}},setup(e){let{bind:t,weight:n}=Fe(e);return(e,r)=>(x(),M(`svg`,ct({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,fill:`currentColor`},C(t)),[mt(e.$slots,`default`),C(n)===`bold`?(x(),M(`g`,Nt,[...r[0]||=[P(`path`,{d:`M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z`},null,-1)]])):C(n)===`duotone`?(x(),M(`g`,Pt,[...r[1]||=[P(`path`,{d:`M216,128l-72,72V56Z`,opacity:`0.2`},null,-1),P(`path`,{d:`M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z`},null,-1)]])):C(n)===`fill`?(x(),M(`g`,Ft,[...r[2]||=[P(`path`,{d:`M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z`},null,-1)]])):C(n)===`light`?(x(),M(`g`,It,[...r[3]||=[P(`path`,{d:`M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z`},null,-1)]])):C(n)===`regular`?(x(),M(`g`,Lt,[...r[4]||=[P(`path`,{d:`M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z`},null,-1)]])):C(n)===`thin`?(x(),M(`g`,Rt,[...r[5]||=[P(`path`,{d:`M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z`},null,-1)]])):O(``,!0)],16))}}),Bt={key:0},Vt={key:1},Ht={key:2},Ut={key:3},Wt={key:4},Gt={key:5},Kt=S({name:`ScalarIconUpload`,props:{label:{},weight:{}},setup(e){let{bind:t,weight:n}=Fe(e);return(e,r)=>(x(),M(`svg`,ct({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,fill:`currentColor`},C(t)),[mt(e.$slots,`default`),C(n)===`bold`?(x(),M(`g`,Bt,[...r[0]||=[P(`path`,{d:`M188,184a16,16,0,1,1,16-16A16,16,0,0,1,188,184Zm36-68H180a12,12,0,0,0,0,24h40v56H36V140H76a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116ZM88.49,80.49,116,53v75a12,12,0,0,0,24,0V53l27.51,27.52a12,12,0,1,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,1,0,17,17Z`},null,-1)]])):C(n)===`duotone`?(x(),M(`g`,Vt,[...r[1]||=[P(`path`,{d:`M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z`,opacity:`0.2`},null,-1),P(`path`,{d:`M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H80a8,8,0,0,1,0,16H32v64H224V136H176a8,8,0,0,1,0-16h48A16,16,0,0,1,240,136ZM85.66,77.66,120,43.31V128a8,8,0,0,0,16,0V43.31l34.34,34.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,77.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`},null,-1)]])):C(n)===`fill`?(x(),M(`g`,Ht,[...r[2]||=[P(`path`,{d:`M74.34,77.66a8,8,0,0,1,0-11.32l48-48a8,8,0,0,1,11.32,0l48,48a8,8,0,0,1-11.32,11.32L136,43.31V128a8,8,0,0,1-16,0V43.31L85.66,77.66A8,8,0,0,1,74.34,77.66ZM240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16h68a4,4,0,0,1,4,4v3.46c0,13.45,11,24.79,24.46,24.54A24,24,0,0,0,152,128v-4a4,4,0,0,1,4-4h68A16,16,0,0,1,240,136Zm-40,32a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`},null,-1)]])):C(n)===`light`?(x(),M(`g`,Ut,[...r[3]||=[P(`path`,{d:`M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H80a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H176a6,6,0,0,1,0-12h48A14,14,0,0,1,238,136ZM84.24,76.24,122,38.49V128a6,6,0,0,0,12,0V38.49l37.76,37.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z`},null,-1)]])):C(n)===`regular`?(x(),M(`g`,Wt,[...r[4]||=[P(`path`,{d:`M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H80a8,8,0,0,1,0,16H32v64H224V136H176a8,8,0,0,1,0-16h48A16,16,0,0,1,240,136ZM85.66,77.66,120,43.31V128a8,8,0,0,0,16,0V43.31l34.34,34.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,77.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`},null,-1)]])):C(n)===`thin`?(x(),M(`g`,Gt,[...r[5]||=[P(`path`,{d:`M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H80a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H176a4,4,0,0,1,0-8h48A12,12,0,0,1,236,136ZM82.83,74.83,124,33.66V128a4,4,0,0,0,8,0V33.66l41.17,41.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z`},null,-1)]])):O(``,!0)],16))}}),qt={key:0},Jt={key:1},Yt={key:2},Xt={key:3},Zt={key:4},Qt={key:5},$t=S({name:`ScalarIconXCircle`,props:{label:{},weight:{}},setup(e){let{bind:t,weight:n}=Fe(e);return(e,r)=>(x(),M(`svg`,ct({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,fill:`currentColor`},C(t)),[mt(e.$slots,`default`),C(n)===`bold`?(x(),M(`g`,qt,[...r[0]||=[P(`path`,{d:`M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`},null,-1)]])):C(n)===`duotone`?(x(),M(`g`,Jt,[...r[1]||=[P(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`},null,-1),P(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`},null,-1)]])):C(n)===`fill`?(x(),M(`g`,Yt,[...r[2]||=[P(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z`},null,-1)]])):C(n)===`light`?(x(),M(`g`,Xt,[...r[3]||=[P(`path`,{d:`M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`},null,-1)]])):C(n)===`regular`?(x(),M(`g`,Zt,[...r[4]||=[P(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`},null,-1)]])):C(n)===`thin`?(x(),M(`g`,Qt,[...r[5]||=[P(`path`,{d:`M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`},null,-1)]])):O(``,!0)],16))}});function I(e,t){return{code:e,detail:t}}var en=Ie({id:v(),title:v(),namespace:v(),currentVersion:v(),logoUrl:p([v(),Re()]),slug:v()});function tn(e,t){let n=e=>({success:!1,error:t?.(e)??null});return(...t)=>{try{let r=e(...t);return r instanceof Promise?r.catch(n):r}catch(e){return n(e)}}}function nn(e,t){let n=e=>({success:!1,error:t?.(e)??null}),r=e=>({success:!0,data:e});try{let t=e();return t instanceof Promise?t.then(r).catch(n):r(t)}catch(e){return n(e)}}function rn(e){let t=!0,n=[],r=[];for(let i of e)i.success?r.push(i.data):(t=!1,n.push(i.error));return t?{success:!0,data:r}:{success:!1,error:n}}var an={safeFn:tn,fromUnsafe:nn,resultsToResult:rn};function on({getAccessToken:e,getAgentKey:t}){let n=e?.(),r=t?.();return{...n&&{Authorization:`Bearer ${n}`},...r&&{"x-scalar-agent-key":r}}}function sn({baseUrl:e,getAccessToken:t,getAgentKey:n}){let r=Ie({message:v(),code:v()}),i=an.safeFn(async({path:i,method:a=`get`,query:o,body:s,responseSchema:c})=>{let l=`${e}${i}${o?`?${new URLSearchParams(o)}`:``}`,u=await an.fromUnsafe(async()=>fetch(l,{method:a,...s&&{body:JSON.stringify(s)},headers:{...on({getAccessToken:t,getAgentKey:n})}}),e=>I(`FAILED_TO_FETCH`,e));if(!u.success)return u;let d=await an.fromUnsafe(async()=>u.data.json(),e=>I(`FAILED_TO_FETCH_DATA`,e));if(!d.success)return{success:!1,error:I(`UNKNOWN_ERROR`,`Unknown error occurred. Please contact support.`)};if(!u.data.ok){if(!st(r,d.data))return{success:!1,error:I(`UNKNOWN_ERROR`,`Unknown error occurred. Please contact support.`)};let e=ot(r,d.data);return{success:!1,error:I(e.code,e.message)}}return st(c,d.data)?{success:!0,data:ot(c,d.data)}:{success:!1,error:I(`INVALID_RESPONSE`,`Invalid response. Please contact support`)}});return{search:async e=>i({path:`/vector/registry/search`,query:{query:e},responseSchema:Ie({results:ge(en)})}),getDocument:async e=>i({path:`/vector/registry/document/${e.namespace}/${e.slug}`,responseSchema:en}),getKeyDocuments:async()=>i({path:`/vector/registry/documents`,responseSchema:Ie({documents:ge(en)})}),getCuratedDocuments:async()=>i({path:`/vector/registry/curated`,responseSchema:Ie({results:ge(en)})})}}function cn(e,t){return`${e}/${t}`}var ln=`execute-request`;Ie({method:v(),path:v(),headers:oe(le(v(),v())),body:oe(v()),documentName:v(),documentIdentifier:v({typeComment:`Needed for legacy support for old clients`})});var un=e=>{let t=dn(e,0);if(t===void 0||!pn(e[t]))return;let n=dn(e,t+1);if(n!==void 0)return mn(e,t,n)},dn=(e,t)=>{for(let n=t;n<e.length;n+=1){let t=e[n];if(!fn(t))return n}},fn=e=>e===` `||e===` `||e===`
15
+ import{$ as e,A as t,Ao as n,Bn as r,Ca as i,Cn as a,Da as o,Dn as s,Dt as c,E as l,Ea as u,F as d,Fn as f,Fo as p,G as m,H as h,I as g,J as ee,K as _,Kt as te,L as ne,Ln as re,M as ie,Mn as ae,Mo as oe,N as se,Nn as ce,No as le,Oa as ue,On as de,P as fe,Po as v,Q as pe,R as me,Sa as he,So as ge,Tt as _e,U as ve,Ut as ye,V as be,W as y,X as xe,Y as Se,Zt as Ce,_a as we,_o as Te,at as Ee,b as De,ba as Oe,bn as ke,bo as Ae,fa as je,fi as Me,ir as Ne,j as Pe,ja as Fe,jo as Ie,kn as Le,ko as Re,n as ze,nt as Be,q as Ve,r as He,rn as Ue,rr as We,tt as Ge,vo as Ke,wt as qe,xn as Je,xt as Ye,z as b}from"./vendor-BNhbieDE.js";import{c as Xe,g as Ze,h as Qe,i as $e,m as et,n as tt,o as nt,r as rt,s as it,t as at,v as ot,y as st}from"./ScalarTextInput.vue-C5aaO8tA.js";import{A as ct,B as lt,C as ut,D as dt,G as ft,Gt as pt,H as x,K as mt,P as ht,R as gt,S,St as _t,Tt as C,U as vt,Yt as w,Z as yt,at as T,b as E,d as D,dt as bt,et as xt,f as O,gt as k,i as A,j as St,l as j,mt as Ct,ot as wt,p as M,tt as N,u as P,ut as Tt,v as Et,xt as Dt,y as F,yt as Ot}from"./runtime-core.esm-bundler-Byrbbu5Q.js";import{a as kt,i as At,r as jt,t as Mt}from"./modal-B4LeCbAi.js";var Nt={key:0},Pt={key:1},Ft={key:2},It={key:3},Lt={key:4},Rt={key:5},zt=S({name:`ScalarIconArrowRight`,props:{label:{},weight:{}},setup(e){let{bind:t,weight:n}=Fe(e);return(e,r)=>(x(),M(`svg`,ct({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,fill:`currentColor`},C(t)),[mt(e.$slots,`default`),C(n)===`bold`?(x(),M(`g`,Nt,[...r[0]||=[P(`path`,{d:`M224.49,136.49l-72,72a12,12,0,0,1-17-17L187,140H40a12,12,0,0,1,0-24H187L135.51,64.48a12,12,0,0,1,17-17l72,72A12,12,0,0,1,224.49,136.49Z`},null,-1)]])):C(n)===`duotone`?(x(),M(`g`,Pt,[...r[1]||=[P(`path`,{d:`M216,128l-72,72V56Z`,opacity:`0.2`},null,-1),P(`path`,{d:`M221.66,122.34l-72-72A8,8,0,0,0,136,56v64H40a8,8,0,0,0,0,16h96v64a8,8,0,0,0,13.66,5.66l72-72A8,8,0,0,0,221.66,122.34ZM152,180.69V75.31L204.69,128Z`},null,-1)]])):C(n)===`fill`?(x(),M(`g`,Ft,[...r[2]||=[P(`path`,{d:`M221.66,133.66l-72,72A8,8,0,0,1,136,200V136H40a8,8,0,0,1,0-16h96V56a8,8,0,0,1,13.66-5.66l72,72A8,8,0,0,1,221.66,133.66Z`},null,-1)]])):C(n)===`light`?(x(),M(`g`,It,[...r[3]||=[P(`path`,{d:`M220.24,132.24l-72,72a6,6,0,0,1-8.48-8.48L201.51,134H40a6,6,0,0,1,0-12H201.51L139.76,60.24a6,6,0,0,1,8.48-8.48l72,72A6,6,0,0,1,220.24,132.24Z`},null,-1)]])):C(n)===`regular`?(x(),M(`g`,Lt,[...r[4]||=[P(`path`,{d:`M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z`},null,-1)]])):C(n)===`thin`?(x(),M(`g`,Rt,[...r[5]||=[P(`path`,{d:`M218.83,130.83l-72,72a4,4,0,0,1-5.66-5.66L206.34,132H40a4,4,0,0,1,0-8H206.34L141.17,58.83a4,4,0,0,1,5.66-5.66l72,72A4,4,0,0,1,218.83,130.83Z`},null,-1)]])):O(``,!0)],16))}}),Bt={key:0},Vt={key:1},Ht={key:2},Ut={key:3},Wt={key:4},Gt={key:5},Kt=S({name:`ScalarIconUpload`,props:{label:{},weight:{}},setup(e){let{bind:t,weight:n}=Fe(e);return(e,r)=>(x(),M(`svg`,ct({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,fill:`currentColor`},C(t)),[mt(e.$slots,`default`),C(n)===`bold`?(x(),M(`g`,Bt,[...r[0]||=[P(`path`,{d:`M188,184a16,16,0,1,1,16-16A16,16,0,0,1,188,184Zm36-68H180a12,12,0,0,0,0,24h40v56H36V140H76a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116ZM88.49,80.49,116,53v75a12,12,0,0,0,24,0V53l27.51,27.52a12,12,0,1,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,1,0,17,17Z`},null,-1)]])):C(n)===`duotone`?(x(),M(`g`,Vt,[...r[1]||=[P(`path`,{d:`M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z`,opacity:`0.2`},null,-1),P(`path`,{d:`M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H80a8,8,0,0,1,0,16H32v64H224V136H176a8,8,0,0,1,0-16h48A16,16,0,0,1,240,136ZM85.66,77.66,120,43.31V128a8,8,0,0,0,16,0V43.31l34.34,34.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,77.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`},null,-1)]])):C(n)===`fill`?(x(),M(`g`,Ht,[...r[2]||=[P(`path`,{d:`M74.34,77.66a8,8,0,0,1,0-11.32l48-48a8,8,0,0,1,11.32,0l48,48a8,8,0,0,1-11.32,11.32L136,43.31V128a8,8,0,0,1-16,0V43.31L85.66,77.66A8,8,0,0,1,74.34,77.66ZM240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16h68a4,4,0,0,1,4,4v3.46c0,13.45,11,24.79,24.46,24.54A24,24,0,0,0,152,128v-4a4,4,0,0,1,4-4h68A16,16,0,0,1,240,136Zm-40,32a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`},null,-1)]])):C(n)===`light`?(x(),M(`g`,Ut,[...r[3]||=[P(`path`,{d:`M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H80a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H176a6,6,0,0,1,0-12h48A14,14,0,0,1,238,136ZM84.24,76.24,122,38.49V128a6,6,0,0,0,12,0V38.49l37.76,37.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z`},null,-1)]])):C(n)===`regular`?(x(),M(`g`,Wt,[...r[4]||=[P(`path`,{d:`M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H80a8,8,0,0,1,0,16H32v64H224V136H176a8,8,0,0,1,0-16h48A16,16,0,0,1,240,136ZM85.66,77.66,120,43.31V128a8,8,0,0,0,16,0V43.31l34.34,34.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,77.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z`},null,-1)]])):C(n)===`thin`?(x(),M(`g`,Gt,[...r[5]||=[P(`path`,{d:`M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H80a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H176a4,4,0,0,1,0-8h48A12,12,0,0,1,236,136ZM82.83,74.83,124,33.66V128a4,4,0,0,0,8,0V33.66l41.17,41.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z`},null,-1)]])):O(``,!0)],16))}}),qt={key:0},Jt={key:1},Yt={key:2},Xt={key:3},Zt={key:4},Qt={key:5},$t=S({name:`ScalarIconXCircle`,props:{label:{},weight:{}},setup(e){let{bind:t,weight:n}=Fe(e);return(e,r)=>(x(),M(`svg`,ct({xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 256 256`,fill:`currentColor`},C(t)),[mt(e.$slots,`default`),C(n)===`bold`?(x(),M(`g`,qt,[...r[0]||=[P(`path`,{d:`M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z`},null,-1)]])):C(n)===`duotone`?(x(),M(`g`,Jt,[...r[1]||=[P(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`},null,-1),P(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`},null,-1)]])):C(n)===`fill`?(x(),M(`g`,Yt,[...r[2]||=[P(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z`},null,-1)]])):C(n)===`light`?(x(),M(`g`,Xt,[...r[3]||=[P(`path`,{d:`M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z`},null,-1)]])):C(n)===`regular`?(x(),M(`g`,Zt,[...r[4]||=[P(`path`,{d:`M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`},null,-1)]])):C(n)===`thin`?(x(),M(`g`,Qt,[...r[5]||=[P(`path`,{d:`M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z`},null,-1)]])):O(``,!0)],16))}});function I(e,t){return{code:e,detail:t}}var en=Ie({id:v(),title:v(),namespace:v(),currentVersion:v(),logoUrl:p([v(),Re()]),slug:v()});function tn(e,t){let n=e=>({success:!1,error:t?.(e)??null});return(...t)=>{try{let r=e(...t);return r instanceof Promise?r.catch(n):r}catch(e){return n(e)}}}function nn(e,t){let n=e=>({success:!1,error:t?.(e)??null}),r=e=>({success:!0,data:e});try{let t=e();return t instanceof Promise?t.then(r).catch(n):r(t)}catch(e){return n(e)}}function rn(e){let t=!0,n=[],r=[];for(let i of e)i.success?r.push(i.data):(t=!1,n.push(i.error));return t?{success:!0,data:r}:{success:!1,error:n}}var an={safeFn:tn,fromUnsafe:nn,resultsToResult:rn};function on({getAccessToken:e,getAgentKey:t}){let n=e?.(),r=t?.();return{...n&&{Authorization:`Bearer ${n}`},...r&&{"x-scalar-agent-key":r}}}function sn({baseUrl:e,getAccessToken:t,getAgentKey:n}){let r=Ie({message:v(),code:v()}),i=an.safeFn(async({path:i,method:a=`get`,query:o,body:s,responseSchema:c})=>{let l=`${e}${i}${o?`?${new URLSearchParams(o)}`:``}`,u=await an.fromUnsafe(async()=>fetch(l,{method:a,...s&&{body:JSON.stringify(s)},headers:{...on({getAccessToken:t,getAgentKey:n})}}),e=>I(`FAILED_TO_FETCH`,e));if(!u.success)return u;let d=await an.fromUnsafe(async()=>u.data.json(),e=>I(`FAILED_TO_FETCH_DATA`,e));if(!d.success)return{success:!1,error:I(`UNKNOWN_ERROR`,`Unknown error occurred. Please contact support.`)};if(!u.data.ok){if(!st(r,d.data))return{success:!1,error:I(`UNKNOWN_ERROR`,`Unknown error occurred. Please contact support.`)};let e=ot(r,d.data);return{success:!1,error:I(e.code,e.message)}}return st(c,d.data)?{success:!0,data:ot(c,d.data)}:{success:!1,error:I(`INVALID_RESPONSE`,`Invalid response. Please contact support`)}});return{search:async e=>i({path:`/vector/registry/search`,query:{query:e},responseSchema:Ie({results:ge(en)})}),getDocument:async e=>i({path:`/vector/registry/document/${e.namespace}/${e.slug}`,responseSchema:en}),getKeyDocuments:async()=>i({path:`/vector/registry/documents`,responseSchema:Ie({documents:ge(en)})}),getCuratedDocuments:async()=>i({path:`/vector/registry/curated`,responseSchema:Ie({results:ge(en)})})}}function cn(e,t){return`${e}/${t}`}var ln=`execute-request`;Ie({method:v(),path:v(),headers:oe(le(v(),v())),body:oe(v()),documentName:v(),documentIdentifier:v({typeComment:`Needed for legacy support for old clients`})});var un=e=>{let t=dn(e,0);if(t===void 0||!pn(e[t]))return;let n=dn(e,t+1);if(n!==void 0)return mn(e,t,n)},dn=(e,t)=>{for(let n=t;n<e.length;n+=1){let t=e[n];if(!fn(t))return n}},fn=e=>e===` `||e===` `||e===`
16
16
  `||e===`\r`,pn=e=>e===`{`||e===`[`,mn=(e,t,n)=>{let r;for(let i=n-1;i>t;--i){let t=e[i];if(t===`\r`)return;if(t===`
17
17
  `)return hn(r);if(r===void 0)r=t;else if(r[0]===t)r+=t;else return}},hn=e=>e===void 0?0:e[0]===` `?e.length:e,gn=(e,t)=>{let n=_n(e,`toPrecision`,t,t);return n===void 0?_n(e,`toExponential`,t,t):n},_n=(e,t,n,r)=>{let i=e[t](r).replace(vn,`$1`).replace(yn,`$1`);return i.length<=n?i:r===1?void 0:_n(e,t,n,r-1)},vn=/(e)\+/iu,yn=/\.?0*($|e)/iu,bn=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Input must be a JSON string: ${e}`);xn(t)},xn=e=>{if(Sn(e),e<0)throw TypeError(`"maxSize" argument must be positive: ${e}`);if(e<7)throw TypeError(`"maxSize" argument must be at least 7: ${e}`)},Sn=e=>{if(e===void 0)throw TypeError(`"maxSize" argument must be defined`);if(!Number.isInteger(e))throw TypeError(`"maxSize" argument must be an integer: ${e}`)},Cn=(e,t,n)=>wn(e,t,An(t,n)),wn=(e,t,n)=>{if(n>=t)return n;let r=e[n];return r>=Fn&&r<=In?wn(e,t,n+1):n},Tn=(e,t,n)=>n===void 0?n:En(e,An(t,n)),En=(e,t)=>Dn(e,t)?t-3:On(e,t)?t-2:kn(e,t)?t-1:t,Dn=(e,t)=>t>=3&&e[t-3]>=jn&&e[t-3]<=Mn,On=(e,t)=>t>=2&&e[t-2]>=Nn,kn=(e,t)=>t>=1&&e[t-1]>=Pn,An=(e,t)=>t<0||Object.is(t,-0)?Math.max(e+t,0):t,jn=240,Mn=244,Nn=224,Pn=194,Fn=128,In=191,Ln=(e,t,n)=>{let r=globalThis.Buffer.from(e),i=Cn(r,r.length,t),a=Tn(r,r.length,n);return i===0&&a>=r.length?r.toString():r.toString(`utf8`,i,a)},Rn=55296,zn=56319,Bn=56320,Vn=57343,Hn=/[\uD800-\uDFFF]/gu,Un=e=>Wn(e)?e.replace(Hn,`�`):e,Wn=e=>{for(let t=0;t<e.length;t+=1){let n=e.codePointAt(t);if(n>=55296&&n<=57343)return!0}return!1},Gn=({input:e,targetByteCount:t,firstStartSurrogate:n,lastStartSurrogate:r,firstEndSurrogate:i,lastEndSurrogate:a,increment:o,canBacktrack:s,shift:c,charIndexInit:l})=>{let u=l,d=u,f=0;for(;f<t;u+=o){d=u;let t=e.charCodeAt(u);if(Number.isNaN(t))break;if(t<=127){f+=1;continue}if(t<=2047){f+=2;continue}if(f+=3,t<n||t>r)continue;let s=e.charCodeAt(u+o);Number.isNaN(s)||s<i||s>a||(f+=1,u+=o)}return(s&&f>t?d:u)+c},Kn=(e,t,n)=>t<0||Object.is(t,-0)?Jn(e,t,n):qn(e,t,n),qn=(e,t,n)=>Gn({input:e,targetByteCount:t,firstStartSurrogate:Rn,lastStartSurrogate:zn,firstEndSurrogate:Bn,lastEndSurrogate:Vn,increment:1,canBacktrack:n,shift:0,charIndexInit:0}),Jn=(e,t,n)=>Gn({input:e,targetByteCount:-t,firstStartSurrogate:Bn,lastStartSurrogate:Vn,firstEndSurrogate:Rn,lastEndSurrogate:zn,increment:-1,canBacktrack:!n,shift:1,charIndexInit:e.length-1}),Yn=(e,t,n)=>{let r=Kn(e,t,!1),i=Xn(e,n);return Un(r===0&&i===void 0?e:e.slice(r,i))},Xn=(e,t)=>{if(t===void 0)return t;let n=Kn(e,t,!0);return n===e.length?void 0:n},Zn=(e,t,n)=>{let{textEncoder:r,textDecoder:i}=Qn(),a=tr(e),{written:o}=r.encodeInto(e,a),s=Cn(a,o,t),c=Tn(a,o,n),l=c===void 0?o:Math.min(c,o),u=a.subarray(s,l);return i.decode(u)},Qn=()=>($n===void 0&&($n=new globalThis.TextEncoder,er=new globalThis.TextDecoder(`utf8`,{fatal:!1})),{textEncoder:$n,textDecoder:er}),$n,er,tr=e=>{let t=e.length*3;return t>1e5?new Uint8Array(t):((nr===void 0||nr.length<t)&&(nr=new Uint8Array(t)),nr)},nr,rr=(e,t)=>{if(t===void 0)return t;let n=ir(e,t);return n>=e.length*ar?void 0:n},ir=(e,t)=>t<=e.length*-ar?0:t,ar=4,or=(e,t,n)=>{if(typeof e!=`string`)throw TypeError(`First argument must be a string: ${e}`);sr(t),cr(n)},sr=e=>{if(e===void 0)throw TypeError(`Second argument is required.`);lr(`Second`,e)},cr=e=>{e!==void 0&&lr(`Third`,e)},lr=(e,t)=>{if(!Number.isInteger(t))throw TypeError(`${e} argument must be an integer: ${t}`)},ur=e=>{let t=!0,n=0;for(let r=0;r<fr;r+=1){let i=dr(e,r);i<=127||(t&&=!1,i>2047&&(n+=1))}return{asciiOnly:t,longCharsPercentage:n/fr}},dr=(e,t)=>{let n=fr-1,r=1-(n-t)/n,i=Math.round(r*(e.length-1));return e.charCodeAt(i)},fr=50,pr=(e,t,n)=>{if(or(e,t,n),e===``)return e;let r=ir(e,t),i=rr(e,n);return i===void 0&&Object.is(r,0)?Un(e):mr(e,r,i)},mr=(e,t,n)=>{if(e.length<=hr)return Yn(e,t,n);let{asciiOnly:r,longCharsPercentage:i}=ur(e);return r?_r(e,t,n):i>=gr?Yn(e,t,n):vr(e,t,n)},hr=200,gr=.4,_r=(e,t,n)=>`Buffer`in globalThis&&`from`in globalThis.Buffer?Ln(e,t,n):vr(e,t,n),vr=(e,t,n)=>`TextEncoder`in globalThis?Zn(e,t,n):Yn(e,t,n),yr=(e,t)=>Cr(`${br(pr(Sr(JSON.stringify(e)),0,t-Tr.length-wr.length*2))}${Tr}`),br=e=>e.replace(xr,``),xr=/(\\|\\u[0-9a-fA-F]{0,3})$/u,Sr=e=>e.slice(wr.length,-wr.length),Cr=e=>`${wr}${e}${wr}`,wr=`"`,Tr=`...`,Er=e=>globalThis.Buffer.byteLength(e),Dr=e=>{let t=e.length,n=t;for(let r=0;r<t;r+=1){let t=e.charCodeAt(r);if(t<=Or)continue;if(t<=kr){n+=1;continue}if(n+=2,t<Ar||t>jr)continue;let i=e.charCodeAt(r+1);i<Mr||i>Nr||(r+=1)}return n},Or=127,kr=2047,Ar=55296,jr=56319,Mr=56320,Nr=57343,Pr=()=>Fr.bind(void 0,new TextEncoder),Fr=(e,t)=>{let n=Ir(t);return e.encodeInto(t,n).written},Ir=e=>{let t=e.length*3;return t>1e5?new Uint8Array(t):((Lr===void 0||Lr.length<t)&&(Lr=new Uint8Array(t)),Lr)},Lr,Rr=()=>`Buffer`in globalThis&&`byteLength`in globalThis.Buffer?Er:`TextEncoder`in globalThis?zr.bind(void 0,Pr()):Dr,zr=(e,t)=>t.length<100?Dr(t):e(t),Br=Rr(),Vr=e=>{if(e===null)return Hr;if(e===!0)return Ur;if(e===!1)return Wr;let t=typeof e;return t===`object`?Gr:t===`number`?JSON.stringify(e).length:Kr(e)},Hr=4,Ur=4,Wr=5,Gr=2,Kr=e=>Br(JSON.stringify(e)),qr=({size:e,increment:t,maxSize:n,truncatedProps:r,path:i,value:a})=>{let o=e+t,s=o>n;return s?{size:e,stop:s,truncatedProps:[...r,{path:i,value:a}]}:{size:o,stop:s,truncatedProps:r}},Jr=e=>Vr(e),Yr=(e,t,n)=>Qr({empty:e,indent:t,depth:n,keySpaceSize:0})+ei(e),Xr=({key:e,empty:t,indent:n,depth:r})=>{let i=Qr({empty:t,indent:n,depth:r,keySpaceSize:1}),a=Kr(e),o=ei(t);return i+a+Zr+o},Zr=1,Qr=({empty:e,indent:t,depth:n,keySpaceSize:r})=>{if(t===void 0)return 0;let i=$r+t*(n+1),a=e?$r+t*n:0;return r+i+a},$r=1,ei=e=>e?0:ti,ti=1,ni=({parent:e,truncatedProps:t,path:n,increment:r,maxSize:i,key:a,empty:o,size:s,truncateValue:c,indent:l,depth:u})=>{let d=e[a],f=[...n,a],{size:p,stop:m,truncatedProps:h}=qr({size:s,increment:r,maxSize:i,truncatedProps:t,path:f,value:d});return m?{empty:o,size:p,truncatedProps:h}:ri({value:d,truncatedProps:t,path:f,maxSize:i,empty:o,size:s,newSize:p,truncateValue:c,indent:l,depth:u})},ri=({value:e,truncatedProps:t,path:n,maxSize:r,empty:i,size:a,newSize:o,truncateValue:s,indent:c,depth:l})=>{let{value:u,size:d,truncatedProps:f}=s({value:e,truncatedProps:t,path:n,size:o,maxSize:r,indent:c,depth:l+1});return u===void 0?{empty:i,size:a,truncatedProps:f}:{empty:!1,size:d,value:u,truncatedProps:f}},ii=({array:e,truncatedProps:t,path:n,size:r,maxSize:i,truncateValue:a,indent:o,depth:s})=>{let c=[],l={empty:!0,size:r,truncatedProps:t};for(let t=0;t<e.length;t+=1){let r=Yr(l.empty,o,s);l=ni({parent:e,truncatedProps:l.truncatedProps,path:n,increment:r,maxSize:i,key:t,empty:l.empty,size:l.size,truncateValue:a,indent:o,depth:s}),l.value!==void 0&&c.push(l.value)}return{value:c,size:l.size,truncatedProps:l.truncatedProps}},ai=({object:e,truncatedProps:t,path:n,size:r,maxSize:i,truncateValue:a,indent:o,depth:s})=>{let c={},l={empty:!0,size:r,truncatedProps:t};for(let t in e){let r=Xr({key:t,empty:l.empty,indent:o,depth:s});l=ni({parent:e,truncatedProps:l.truncatedProps,path:n,increment:r,maxSize:i,key:t,empty:l.empty,size:l.size,truncateValue:a,indent:o,depth:s}),l.value!==void 0&&(c[t]=l.value)}return{value:c,size:l.size,truncatedProps:l.truncatedProps}},oi=({value:e,truncatedProps:t,path:n,size:r,maxSize:i,indent:a,depth:o})=>{let{size:s,stop:c,truncatedProps:l}=qr({size:r,increment:Jr(e),maxSize:i,truncatedProps:t,path:n,value:e});return c?{value:void 0,size:s,truncatedProps:l}:si({value:e,truncatedProps:l,path:n,size:s,maxSize:i,indent:a,depth:o})},si=({value:e,truncatedProps:t,path:n,size:r,maxSize:i,indent:a,depth:o})=>typeof e!=`object`||!e?{value:e,size:r,truncatedProps:t}:Array.isArray(e)?ii({array:e,truncatedProps:t,path:n,size:r,maxSize:i,truncateValue:oi,indent:a,depth:o}):ai({object:e,truncatedProps:t,path:n,size:r,maxSize:i,truncateValue:oi,indent:a,depth:o}),ci=(e,t)=>{bn(e,t);let n=li(e),r=ui(e),{value:i,truncatedProps:a}=oi({value:r,truncatedProps:[],path:[],size:0,maxSize:t,indent:n,depth:0});return{jsonString:di({newValue:i,value:r,maxSize:t,indent:n}),truncatedProps:a}},li=e=>{let t=un(e);return typeof t==`string`?t.length:t},ui=e=>{try{return JSON.parse(e)}catch(t){throw TypeError(`Invalid JSON string: "${e}"\n${t.message}`)}},di=({newValue:e,value:t,maxSize:n,indent:r})=>e===void 0?typeof t==`number`?gn(t,n):yr(t,n):JSON.stringify(e,void 0,r),fi=5e4,pi=an.safeFn(async e=>e.headers.get(`content-type`)===`application/json`?{success:!0,data:await e.json()}:{success:!0,data:await e.text()},e=>I(`FAILED_TO_PARSE_RESPONSE_BODY`,{originalError:e})),mi=e=>JSON.parse(ci(JSON.stringify(e),fi).jsonString),hi=an.safeFn(async(e,t)=>{let n=await fetch(e,t),r=await pi(n);return n.ok?r.success?{success:!0,data:{status:n.status,responseBody:mi(r.data),headers:Object.fromEntries(n.headers.entries())}}:r:{success:!1,error:I(`REQUEST_NOT_OK`,{status:n.status,url:n.url,responseBody:mi(r.success?r.data:void 0),headers:Object.fromEntries(n.headers.entries())})}},e=>I(`FAILED_TO_FETCH`,{originalError:e}));function gi({path:e,activeServer:t,proxyUrl:n,queryParams:r}){return Ne(n,kt({path:e,server:t,urlParams:r}))}var _i=an.safeFn(async({documentSettings:e,toolCallId:t,chat:n,proxyUrl:r,input:{method:i,path:a,body:o,headers:s,documentName:c}})=>{let l=e[c];if(!l)return{success:!1,error:I(`DOCUMENT_SETTINGS_COULD_NOT_BE_DETERMINED`,{documentName:c})};let u=At(l.securitySchemes).reduce((e,t)=>{let n=t.format===`basic`?`Basic ${We(t.value)}`:t.format===`bearer`?`Bearer ${t.value}`:t.value;return t.in===`header`?e.headers[t.name]=n:t.in===`query`?e.queryParams.set(t.name,n):t.in===`cookie`&&(e.cookies[t.name]=n),e},{headers:{},queryParams:new URLSearchParams,cookies:{}}),d=Object.entries(u.cookies).map(([e,t])=>`${e}=${t}`).join(`; `),f={method:i,body:o,headers:{...s,...u.headers,Cookie:d}},p=await hi(gi({path:a,activeServer:l.activeServer,proxyUrl:r,queryParams:u.queryParams}),f);return n.addToolOutput({tool:ln,toolCallId:t,output:p,state:`output-available`}),p},e=>I(`FAILED_TO_EXECUTE_REQUEST`,e)),vi={DEFAULT_PROXY_URL:`https://proxy.scalar.com`,PRIVACY_POLICY:`https://scalar.com/legal/privacy-policy`,TERMS_AND_CONDITIONS:`https://scalar.com/legal/terms-and-conditions`,AGENT_SCALAR_DOCUMENTATION:`https://scalar.com/products/agent/getting-started`,PROXY_SOURCE_CODE:`https://github.com/scalar/scalar/tree/main/projects/proxy-scalar-com`};function yi(e){return Object.values(e.paths??{}).flatMap(e=>Object.values(e??{}))}function bi(e,t,n){let r=Le(t?.components?.securitySchemes,{},n,e),i=f(t.security),a=ae(n.getAuthSelectedSchemas({type:`document`,documentName:e}),void 0,i);return ce(r,a.selectedSchemes[a.selectedIndex]??{})}function xi(e){let t=[];for(let[n,i]of Object.entries(e.workspace.documents))r(i)&&t.push([n,i]);return Object.fromEntries(t.map(([t,n])=>[t,{activeServer:s(n,null,null,de(n.servers,{documentUrl:n[`x-scalar-original-source-url`]})),securitySchemes:bi(t,n,e.auth)}]))}var Si=rt(),Ci=()=>{let e=e=>`${tt.AUTH}-${e}`;return{getAuth:n=>Me(t,JSON.parse(Si.getItem(e(n))??`{}`)),setAuth:(t,n)=>{Si.setItem(e(t),JSON.stringify(n))}}},wi=({documentName:e,workspaceStore:t})=>{let n=Ci().getAuth(e);t.auth.load({[e]:n})};function Ti(e){try{return JSON.parse(e)}catch{return}}var Ei=`scalar/agent-terms-accepted`;function Di(){let e=k(!1);gt(()=>{e.value=localStorage.getItem(Ei)===`true`});function t(){e.value=!0,localStorage.setItem(Ei,`true`)}return{accepted:e,accept:t}}var Oi=5e3,ki=`scalar-tmp-doc`;function Ai({namespace:e,slug:t}){localStorage.setItem(ki,JSON.stringify({namespace:e,slug:t}))}var ji=Ie({namespace:v(),slug:v()});function Mi(){let e=localStorage.getItem(ki);if(e)return ot(ji,JSON.parse(e))}function Ni(){localStorage.getItem(ki)&&localStorage.removeItem(ki)}function Pi(){let e=Q(),t=k();function n(t){let n=`${e.baseUrl}${t}`;return Ne(e.platformProxyUrl,n)}async function r(r,i=!1){try{t.value={type:`uploading`};let a=await fetch(n(`/core/share/upload/apis${i?`?source=agent`:``}`),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({document:r})});if(!a.ok){t.value={type:`error`,error:`Failed to upload your OpenAPI document.`};return}let o=await a.json(),s=Ie({url:v(),namespace:v(),slug:v()});if(!st(s,o)){t.value={type:`error`,error:`Failed to process document.`};return}let c=ot(s,o);t.value={type:`processing`};let l=await fetch(n(`/vector/registry/embeddings/${c.namespace}/${c.slug}`),{method:`GET`});if(Ai({namespace:c.namespace,slug:c.slug}),await e.addDocument({namespace:c.namespace,slug:c.slug,removable:!1,tmp:!0}),!l.ok){t.value={type:`error`,error:`Failed to embed document.`};return}return t.value={type:`done`},e.uploadedTmpDocumentUrl.value=c.url,setTimeout(()=>{t.value=void 0},Oi),c}catch{t.value={type:`error`,error:`Failed to upload your OpenAPI document.`};return}}return{uploadTempDocument:r,uploadState:t}}var Fi=({debounceDelay:e=500,maxWait:t=1e4,persistAuth:n=!1})=>{let{execute:r}=He({delay:e,maxWait:t}),i=Ci(),a=()=>typeof n==`function`?n():n;return{hooks:{onWorkspaceStateChanges(e){a()&&e.type===`auth`&&r(`auth`,()=>i.setAuth(e.documentName,e.value))}}}},Ii=an.safeFn(async({namespace:e,slug:t,workspaceStore:n,registryDocuments:r,getAccessToken:i,registryUrl:a,config:o,api:s,removable:c})=>{let l=await s.getDocument({namespace:e,slug:t});if(!l.success)return l;r.value.push({...l.data,removable:c});let u=new URL(`/@${e}/apis/${t}/latest`,a),d=[],f=i?.();f&&d.push({domains:[new URL(a).host],headers:{"x-scalar-auth":f}});let p=await it(u.toString(),{plugins:[nt({headers:d})],treeShake:!1}),m=cn(e,t);return await n.addDocument({name:m,document:p},o),n.update(`x-scalar-active-document`,m),wi({documentName:m,workspaceStore:n}),{success:!0,data:l.data}},e=>I(`UNABLE_TO_LOAD_DOCUMENT`,e)),Li=`vercel.ai.error`,Ri=Symbol.for(Li),zi,Bi,Vi=class e extends (Bi=Error,zi=Ri,Bi){constructor({name:e,message:t,cause:n}){super(t),this[zi]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,Li)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}};function Hi(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.message:JSON.stringify(e)}var Ui=`AI_InvalidArgumentError`,Wi=`vercel.ai.error.${Ui}`,Gi=Symbol.for(Wi),Ki,qi,Ji=class extends (qi=Vi,Ki=Gi,qi){constructor({message:e,cause:t,argument:n}){super({name:Ui,message:e,cause:t}),this[Ki]=!0,this.argument=n}static isInstance(e){return Vi.hasMarker(e,Wi)}},Yi=`AI_JSONParseError`,Xi=`vercel.ai.error.${Yi}`,Zi=Symbol.for(Xi),Qi,$i,ea=class extends ($i=Vi,Qi=Zi,$i){constructor({text:e,cause:t}){super({name:Yi,message:`JSON parsing failed: Text: ${e}.
18
18
  Error message: ${Hi(t)}`,cause:t}),this[Qi]=!0,this.text=e}static isInstance(e){return Vi.hasMarker(e,Xi)}},ta=`AI_TypeValidationError`,na=`vercel.ai.error.${ta}`,ra=Symbol.for(na),ia,aa,oa=class e extends (aa=Vi,ia=ra,aa){constructor({value:e,cause:t}){super({name:ta,message:`Type validation failed: Value: ${JSON.stringify(e)}.