@scalar/api-client 2.38.1 → 2.38.3

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 (1179) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/AddressBar-CX8xiYoe.js +302 -0
  3. package/dist/AddressBar-CX8xiYoe.js.map +1 -0
  4. package/dist/App-BpNPKHmM.js +533 -0
  5. package/dist/App-BpNPKHmM.js.map +1 -0
  6. package/dist/App-Ckirvnv1.js +2510 -0
  7. package/dist/App-Ckirvnv1.js.map +1 -0
  8. package/dist/CodeInput-BN7uw3Bh.js +694 -0
  9. package/dist/CodeInput-BN7uw3Bh.js.map +1 -0
  10. package/dist/CodeSnippet-D7Heh1nd.js +218 -0
  11. package/dist/CodeSnippet-D7Heh1nd.js.map +1 -0
  12. package/dist/Collection-ChAxs3rz.js +219 -0
  13. package/dist/Collection-ChAxs3rz.js.map +1 -0
  14. package/dist/CollectionAuthentication-BDpvv8cA.js +56 -0
  15. package/dist/CollectionAuthentication-BDpvv8cA.js.map +1 -0
  16. package/dist/CollectionCookies-DyjPPMdt.js +19 -0
  17. package/dist/CollectionCookies-DyjPPMdt.js.map +1 -0
  18. package/dist/CollectionEnvironment-dwisJ-h5.js +514 -0
  19. package/dist/CollectionEnvironment-dwisJ-h5.js.map +1 -0
  20. package/dist/CollectionOverview-CJ9-Vmei.js +131 -0
  21. package/dist/CollectionOverview-CJ9-Vmei.js.map +1 -0
  22. package/dist/CollectionScripts-CMNlBlby.js +19 -0
  23. package/dist/CollectionScripts-CMNlBlby.js.map +1 -0
  24. package/dist/CollectionServers-BWkIGwz4.js +168 -0
  25. package/dist/CollectionServers-BWkIGwz4.js.map +1 -0
  26. package/dist/CollectionSettings-CqUUYOym.js +87 -0
  27. package/dist/CollectionSettings-CqUUYOym.js.map +1 -0
  28. package/dist/CollectionSync-CAflc5yW.js +19 -0
  29. package/dist/CollectionSync-CAflc5yW.js.map +1 -0
  30. package/dist/CommandActionInput-TkcAx6E8.js +97 -0
  31. package/dist/CommandActionInput-TkcAx6E8.js.map +1 -0
  32. package/dist/CommandPalette-BiA0IgO8.js +964 -0
  33. package/dist/CommandPalette-BiA0IgO8.js.map +1 -0
  34. package/dist/CommandPaletteImport-Diu5dDIY.js +622 -0
  35. package/dist/CommandPaletteImport-Diu5dDIY.js.map +1 -0
  36. package/dist/Cookies-CNRSxP8J.js +284 -0
  37. package/dist/Cookies-CNRSxP8J.js.map +1 -0
  38. package/dist/DataTable-BqbZKW3K.js +62 -0
  39. package/dist/DataTable-BqbZKW3K.js.map +1 -0
  40. package/dist/DataTableHeader-DJVB0jCZ.js +21 -0
  41. package/dist/DataTableHeader-DJVB0jCZ.js.map +1 -0
  42. package/dist/DataTableInput-SkIUPlrB.js +166 -0
  43. package/dist/DataTableInput-SkIUPlrB.js.map +1 -0
  44. package/dist/DataTableRow-c3XveEUO.js +57 -0
  45. package/dist/DataTableRow-c3XveEUO.js.map +1 -0
  46. package/dist/DeleteSidebarListElement-C-p87d03.js +78 -0
  47. package/dist/DeleteSidebarListElement-C-p87d03.js.map +1 -0
  48. package/dist/EditSidebarListElement-CodWPnM6.js +32 -0
  49. package/dist/EditSidebarListElement-CodWPnM6.js.map +1 -0
  50. package/dist/Editor-BomsGWHx.js +909 -0
  51. package/dist/Editor-BomsGWHx.js.map +1 -0
  52. package/dist/EmptyState-Cnm7hGW5.js +46 -0
  53. package/dist/EmptyState-Cnm7hGW5.js.map +1 -0
  54. package/dist/Environment-D_CbZk0A.js +416 -0
  55. package/dist/Environment-D_CbZk0A.js.map +1 -0
  56. package/dist/EnvironmentModal-CcyqnPc2.js +288 -0
  57. package/dist/EnvironmentModal-CcyqnPc2.js.map +1 -0
  58. package/dist/Form-bA4bV_oA.js +83 -0
  59. package/dist/Form-bA4bV_oA.js.map +1 -0
  60. package/dist/HttpMethod-rnWEgC3T.js +78 -0
  61. package/dist/HttpMethod-rnWEgC3T.js.map +1 -0
  62. package/dist/IconSelector-BDC_GQXv.js +67 -0
  63. package/dist/IconSelector-BDC_GQXv.js.map +1 -0
  64. package/dist/ImportCollection-BIYMxB9Q.js +804 -0
  65. package/dist/ImportCollection-BIYMxB9Q.js.map +1 -0
  66. package/dist/IntegrationLogo-B9EDW8db.js +51 -0
  67. package/dist/IntegrationLogo-B9EDW8db.js.map +1 -0
  68. package/dist/MainLayout-oMIJ5QXF.js +281 -0
  69. package/dist/MainLayout-oMIJ5QXF.js.map +1 -0
  70. package/dist/Modal-DkOa_KK0.js +67 -0
  71. package/dist/Modal-DkOa_KK0.js.map +1 -0
  72. package/dist/ModalClientContainer-qHsZi4wQ.js +65 -0
  73. package/dist/ModalClientContainer-qHsZi4wQ.js.map +1 -0
  74. package/dist/Request-BWfYWyBa.js +212 -0
  75. package/dist/Request-BWfYWyBa.js.map +1 -0
  76. package/dist/RequestAuth-BU6ubH-c.js +989 -0
  77. package/dist/RequestAuth-BU6ubH-c.js.map +1 -0
  78. package/dist/RequestRoot-7xhK5_qr.js +1611 -0
  79. package/dist/RequestRoot-7xhK5_qr.js.map +1 -0
  80. package/dist/RequestSection-Bx8UHW-k.js +1582 -0
  81. package/dist/RequestSection-Bx8UHW-k.js.map +1 -0
  82. package/dist/ResponseSection-CLrgLMN_.js +949 -0
  83. package/dist/ResponseSection-CLrgLMN_.js.map +1 -0
  84. package/dist/ScalarAsciiArt-BjuSnj8e.js +45 -0
  85. package/dist/ScalarAsciiArt-BjuSnj8e.js.map +1 -0
  86. package/dist/SectionFilter-hrtoRLwj.js +99 -0
  87. package/dist/SectionFilter-hrtoRLwj.js.map +1 -0
  88. package/dist/Server-BS4zjUdO.js +303 -0
  89. package/dist/Server-BS4zjUdO.js.map +1 -0
  90. package/dist/ServerVariablesForm-BRZ9XC8o.js +145 -0
  91. package/dist/ServerVariablesForm-BRZ9XC8o.js.map +1 -0
  92. package/dist/Settings-BuLKHzRY.js +347 -0
  93. package/dist/Settings-BuLKHzRY.js.map +1 -0
  94. package/dist/Sidebar-Xl9_nFXX.js +73 -0
  95. package/dist/Sidebar-Xl9_nFXX.js.map +1 -0
  96. package/dist/SidebarButton-BAagdMDe.js +37 -0
  97. package/dist/SidebarButton-BAagdMDe.js.map +1 -0
  98. package/dist/SidebarListElement-BfTPiihc.js +232 -0
  99. package/dist/SidebarListElement-BfTPiihc.js.map +1 -0
  100. package/dist/TheCommandPalette-Dl9TAeke.js +204 -0
  101. package/dist/TheCommandPalette-Dl9TAeke.js.map +1 -0
  102. package/dist/ValueEmitter-QYkZ9Hdc.js +20 -0
  103. package/dist/ValueEmitter-QYkZ9Hdc.js.map +1 -0
  104. package/dist/ViewLayout-BOXN0IYo.js +17 -0
  105. package/dist/ViewLayout-BOXN0IYo.js.map +1 -0
  106. package/dist/ViewLayoutCollapse-CiTb-Uml.js +86 -0
  107. package/dist/ViewLayoutCollapse-CiTb-Uml.js.map +1 -0
  108. package/dist/ViewLayoutContent-CvMoJYPF.js +13 -0
  109. package/dist/ViewLayoutContent-CvMoJYPF.js.map +1 -0
  110. package/dist/ViewLayoutSection-mUqKbQry.js +23 -0
  111. package/dist/ViewLayoutSection-mUqKbQry.js.map +1 -0
  112. package/dist/WatchModeToggle-D_eAiTWJ.js +41 -0
  113. package/dist/WatchModeToggle-D_eAiTWJ.js.map +1 -0
  114. package/dist/_plugin-vue_export-helper-BmmBcIzD.js +8 -0
  115. package/dist/analytics-BZimCWcw.js +7 -0
  116. package/dist/analytics-BZimCWcw.js.map +1 -0
  117. package/dist/build-request-security-BQjNr2MD.js +41 -0
  118. package/dist/build-request-security-BQjNr2MD.js.map +1 -0
  119. package/dist/code-input-iq-moLxi.js +775 -0
  120. package/dist/code-input-iq-moLxi.js.map +1 -0
  121. package/dist/components/AddressBar/AddressBar.vue.d.ts +1 -1
  122. package/dist/components/AddressBar/index.d.ts +1 -1
  123. package/dist/components/AddressBar/index.js +5 -4
  124. package/dist/components/CodeInput/CodeInput.vue.d.ts +1 -1
  125. package/dist/components/CodeInput/codeVariableWidget.d.ts +1 -1
  126. package/dist/components/CodeInput/index.d.ts +1 -1
  127. package/dist/components/CodeInput/index.js +2 -4
  128. package/dist/components/CommandPalette/index.d.ts +1 -1
  129. package/dist/components/CommandPalette/index.js +3 -4
  130. package/dist/components/DataTable/DataTableInput.vue.d.ts +2 -2
  131. package/dist/components/DataTable/index.d.ts +8 -8
  132. package/dist/components/DataTable/index.js +6 -18
  133. package/dist/components/Form/LabelInput.vue.d.ts +1 -1
  134. package/dist/components/HttpMethod/index.d.ts +1 -1
  135. package/dist/components/HttpMethod/index.js +2 -4
  136. package/dist/components/ImportCollection/index.d.ts +1 -1
  137. package/dist/components/ImportCollection/index.js +2 -4
  138. package/dist/components/ImportCollection/utils/import-collection.d.ts +1 -1
  139. package/dist/components/ImportCollection/utils/workspace-store-is-empty.d.ts +1 -1
  140. package/dist/components/Server/ServerVariablesForm.vue.d.ts +1 -1
  141. package/dist/components/Server/index.d.ts +3 -3
  142. package/dist/components/Server/index.js +3 -8
  143. package/dist/components/Sidebar/index.d.ts +1 -1
  144. package/dist/components/Sidebar/index.js +2 -4
  145. package/dist/components/ViewLayout/index.d.ts +1 -1
  146. package/dist/components/ViewLayout/index.js +2 -4
  147. package/dist/components/index.d.ts +3 -3
  148. package/dist/components/index.js +7 -8
  149. package/dist/components-ChixwQhN.js +61 -0
  150. package/dist/components-ChixwQhN.js.map +1 -0
  151. package/dist/components-DfJHvSLM.js +183 -0
  152. package/dist/components-DfJHvSLM.js.map +1 -0
  153. package/dist/computer-D7VW3Ruy.js +562 -0
  154. package/dist/computer-D7VW3Ruy.js.map +1 -0
  155. package/dist/consts-CyGRb9dl.js +318 -0
  156. package/dist/consts-CyGRb9dl.js.map +1 -0
  157. package/dist/curl-nbw1OxbV.js +54 -0
  158. package/dist/curl-nbw1OxbV.js.map +1 -0
  159. package/dist/data-table-PL7e8NRO.js +282 -0
  160. package/dist/data-table-PL7e8NRO.js.map +1 -0
  161. package/dist/editor-BZ_J0eze.js +466 -0
  162. package/dist/editor-BZ_J0eze.js.map +1 -0
  163. package/dist/environments-ByLK9lnC.js +592 -0
  164. package/dist/environments-ByLK9lnC.js.map +1 -0
  165. package/dist/formatters-DOGXZq9R.js +36 -0
  166. package/dist/formatters-DOGXZq9R.js.map +1 -0
  167. package/dist/forms-CZX6cFDS.js +42 -0
  168. package/dist/forms-CZX6cFDS.js.map +1 -0
  169. package/dist/get-active-environment-CkxyQ1dM.js +19 -0
  170. package/dist/get-active-environment-CkxyQ1dM.js.map +1 -0
  171. package/dist/get-resolved-url-SybDPV0U.js +85 -0
  172. package/dist/get-resolved-url-SybDPV0U.js.map +1 -0
  173. package/dist/get-server-url-UVN-dx79.js +32 -0
  174. package/dist/get-server-url-UVN-dx79.js.map +1 -0
  175. package/dist/get-servers-B_WNlQWB.js +106 -0
  176. package/dist/get-servers-B_WNlQWB.js.map +1 -0
  177. package/dist/get-snippet-DBRUSfZ2.js +39 -0
  178. package/dist/get-snippet-DBRUSfZ2.js.map +1 -0
  179. package/dist/global-cookies-D3ZS9ON3.js +184 -0
  180. package/dist/global-cookies-D3ZS9ON3.js.map +1 -0
  181. package/dist/hooks/index.d.ts +4 -4
  182. package/dist/hooks/index.js +3 -11
  183. package/dist/hooks/useSidebar.d.ts +1 -1
  184. package/dist/hooks-BvZxH4XB.js +80 -0
  185. package/dist/hooks-BvZxH4XB.js.map +1 -0
  186. package/dist/index.d.ts +3 -3
  187. package/dist/index.js +8 -12
  188. package/dist/layout-BWiL7dfb.js +81 -0
  189. package/dist/layout-BWiL7dfb.js.map +1 -0
  190. package/dist/layouts/App/create-api-client-app.d.ts +9 -9
  191. package/dist/layouts/App/index.d.ts +2 -2
  192. package/dist/layouts/App/index.js +5 -7
  193. package/dist/layouts/Modal/create-api-client-modal.d.ts +1 -1
  194. package/dist/layouts/Modal/index.d.ts +2 -2
  195. package/dist/layouts/Modal/index.js +3 -4
  196. package/dist/layouts/Web/create-api-client-web.d.ts +9 -9
  197. package/dist/layouts/Web/index.d.ts +2 -2
  198. package/dist/layouts/Web/index.js +101 -6
  199. package/dist/layouts/Web/index.js.map +1 -0
  200. package/dist/libs/create-client.d.ts +9 -9
  201. package/dist/libs/create-client.d.ts.map +1 -1
  202. package/dist/libs/environment-parser.d.ts +1 -1
  203. package/dist/libs/get-request-uid-by-path-method.d.ts +1 -1
  204. package/dist/libs/hot-keys.d.ts +1 -1
  205. package/dist/libs/importers/index.d.ts +1 -1
  206. package/dist/libs/importers/index.js +2 -4
  207. package/dist/libs/index.d.ts +15 -15
  208. package/dist/libs/index.js +6 -45
  209. package/dist/libs/local-storage.d.ts +1 -1
  210. package/dist/libs/send-request/create-request-operation.d.ts +3 -3
  211. package/dist/libs/send-request/index.d.ts +3 -3
  212. package/dist/libs/send-request/index.js +3 -8
  213. package/dist/libs-spbv4P0g.js +249 -0
  214. package/dist/libs-spbv4P0g.js.map +1 -0
  215. package/dist/monacoeditorwork/json.worker.bundle.js +8 -8
  216. package/dist/monacoeditorwork/yaml.worker.bundle.js +151 -151
  217. package/dist/operation-block-DE-hoO03.js +1674 -0
  218. package/dist/operation-block-DE-hoO03.js.map +1 -0
  219. package/dist/operation-code-sample-xgx4qi2H.js +1738 -0
  220. package/dist/operation-code-sample-xgx4qi2H.js.map +1 -0
  221. package/dist/parse-curl-BtypQT3D.js +106 -0
  222. package/dist/parse-curl-BtypQT3D.js.map +1 -0
  223. package/dist/plugins/hooks/usePluginManager.d.ts +1 -1
  224. package/dist/plugins/index.d.ts +2 -2
  225. package/dist/plugins/index.js +2 -7
  226. package/dist/plugins/plugin-manager.d.ts +10 -4
  227. package/dist/plugins/plugin-manager.d.ts.map +1 -1
  228. package/dist/plugins-B52hCIyZ.js +50 -0
  229. package/dist/plugins-B52hCIyZ.js.map +1 -0
  230. package/dist/rabbitjump-CMZXAR6d.js +9 -0
  231. package/dist/rabbitjump-CMZXAR6d.js.map +1 -0
  232. package/dist/request-block-N7dPFyrG.js +1466 -0
  233. package/dist/request-block-N7dPFyrG.js.map +1 -0
  234. package/dist/resize-D2IYvVdh.js +114 -0
  235. package/dist/resize-D2IYvVdh.js.map +1 -0
  236. package/dist/response-block-DmkaDZYs.js +1188 -0
  237. package/dist/response-block-DmkaDZYs.js.map +1 -0
  238. package/dist/scalar-address-bar-block-BbysOhkE.js +425 -0
  239. package/dist/scalar-address-bar-block-BbysOhkE.js.map +1 -0
  240. package/dist/scalar-auth-selector-block-Bs79QOMA.js +1889 -0
  241. package/dist/scalar-auth-selector-block-Bs79QOMA.js.map +1 -0
  242. package/dist/search-CmsQQkjn.js +151 -0
  243. package/dist/search-CmsQQkjn.js.map +1 -0
  244. package/dist/send-request-BsTfRiBC.js +348 -0
  245. package/dist/send-request-BsTfRiBC.js.map +1 -0
  246. package/dist/server-tcI-OCyx.js +140 -0
  247. package/dist/server-tcI-OCyx.js.map +1 -0
  248. package/dist/set-request-cookies-BJJhsU4A.js +88 -0
  249. package/dist/set-request-cookies-BJJhsU4A.js.map +1 -0
  250. package/dist/settings-BKk_1lcH.js +455 -0
  251. package/dist/settings-BKk_1lcH.js.map +1 -0
  252. package/dist/sidebar-ceSbYmnt.js +217 -0
  253. package/dist/sidebar-ceSbYmnt.js.map +1 -0
  254. package/dist/store/collections.d.ts +1 -1
  255. package/dist/store/environment.d.ts +1 -1
  256. package/dist/store/events.d.ts +8 -8
  257. package/dist/store/import-spec.d.ts +2 -2
  258. package/dist/store/index.d.ts +2 -2
  259. package/dist/store/index.js +2 -10
  260. package/dist/store/request-example.d.ts +1 -1
  261. package/dist/store/requests.d.ts +1 -1
  262. package/dist/store/security-schemes.d.ts +1 -1
  263. package/dist/store/servers.d.ts +1 -1
  264. package/dist/store/store.d.ts +7 -7
  265. package/dist/store/tags.d.ts +1 -1
  266. package/dist/store/workspace.d.ts +1 -1
  267. package/dist/store-DaPoVtIS.js +1512 -0
  268. package/dist/store-DaPoVtIS.js.map +1 -0
  269. package/dist/string-template-sS5PtY6T.js +64 -0
  270. package/dist/string-template-sS5PtY6T.js.map +1 -0
  271. package/dist/style.css +10372 -1
  272. package/dist/types/index.js +0 -1
  273. package/dist/use-global-hot-keys-D8Ai8Qbm.js +274 -0
  274. package/dist/use-global-hot-keys-D8Ai8Qbm.js.map +1 -0
  275. package/dist/useSidebar-DLTwHDI-.js +45 -0
  276. package/dist/useSidebar-DLTwHDI-.js.map +1 -0
  277. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts +3 -3
  278. package/dist/v2/blocks/operation-block/OperationBlock.vue.d.ts.map +1 -1
  279. package/dist/v2/blocks/operation-block/components/Header.vue.d.ts +2 -2
  280. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts +6 -0
  281. package/dist/v2/blocks/operation-block/helpers/apply-allow-reserved-to-url.d.ts.map +1 -0
  282. package/dist/v2/blocks/operation-block/helpers/build-request-body.d.ts.map +1 -1
  283. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts +1 -0
  284. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.d.ts.map +1 -1
  285. package/dist/v2/blocks/operation-block/helpers/build-request-security.d.ts +2 -2
  286. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts +2 -2
  287. package/dist/v2/blocks/operation-block/helpers/build-request.d.ts.map +1 -1
  288. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts +2 -1
  289. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.d.ts.map +1 -1
  290. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.d.ts +1 -1
  291. package/dist/v2/blocks/operation-block/helpers/send-request.d.ts +1 -1
  292. package/dist/v2/blocks/operation-block/index.d.ts +4 -4
  293. package/dist/v2/blocks/operation-block/index.js +20 -11
  294. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.d.ts +2 -2
  295. package/dist/v2/blocks/operation-code-sample/helpers/find-client.d.ts +1 -1
  296. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.d.ts +1 -1
  297. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.d.ts +2 -2
  298. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.d.ts +2 -2
  299. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.d.ts +1 -1
  300. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.d.ts +1 -1
  301. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts +1 -1
  302. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.d.ts.map +1 -1
  303. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.d.ts +1 -1
  304. package/dist/v2/blocks/operation-code-sample/index.d.ts +6 -6
  305. package/dist/v2/blocks/operation-code-sample/index.js +2 -16
  306. package/dist/v2/blocks/request-block/RequestBlock.vue.d.ts +4 -4
  307. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.d.ts +1 -1
  308. package/dist/v2/blocks/request-block/components/RequestParams.vue.d.ts +1 -1
  309. package/dist/v2/blocks/request-block/components/RequestTable.vue.d.ts +1 -1
  310. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.d.ts +1 -1
  311. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts +3 -2
  312. package/dist/v2/blocks/request-block/helpers/get-default-headers.d.ts.map +1 -1
  313. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.d.ts +1 -1
  314. package/dist/v2/blocks/request-block/index.d.ts +1 -1
  315. package/dist/v2/blocks/request-block/index.js +9 -4
  316. package/dist/v2/blocks/response-block/ResponseBlock.vue.d.ts +1 -1
  317. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.d.ts +1 -1
  318. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.d.ts +1 -1
  319. package/dist/v2/blocks/response-block/index.d.ts +1 -1
  320. package/dist/v2/blocks/response-block/index.js +6 -4
  321. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.d.ts +2 -2
  322. package/dist/v2/blocks/scalar-address-bar-block/index.d.ts +2 -2
  323. package/dist/v2/blocks/scalar-address-bar-block/index.js +5 -4
  324. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.d.ts +3 -3
  325. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.d.ts +1 -1
  326. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.d.ts +2 -2
  327. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.d.ts +1 -1
  328. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.d.ts +1 -1
  329. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.d.ts.map +1 -1
  330. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.d.ts +1 -1
  331. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.d.ts +2 -2
  332. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.d.ts +1 -1
  333. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.d.ts.map +1 -1
  334. package/dist/v2/blocks/scalar-auth-selector-block/index.d.ts +4 -4
  335. package/dist/v2/blocks/scalar-auth-selector-block/index.js +6 -8
  336. package/dist/v2/components/code-input/CodeInput.vue.d.ts +1 -1
  337. package/dist/v2/components/code-input/index.d.ts +1 -1
  338. package/dist/v2/components/code-input/index.js +2 -4
  339. package/dist/v2/components/data-table/DataTableInput.vue.d.ts +1 -1
  340. package/dist/v2/components/data-table/DataTableInputSelect.vue.d.ts +1 -1
  341. package/dist/v2/components/data-table/index.d.ts +8 -8
  342. package/dist/v2/components/data-table/index.js +3 -18
  343. package/dist/v2/components/forms/index.d.ts +1 -1
  344. package/dist/v2/components/forms/index.js +2 -4
  345. package/dist/v2/components/layout/index.d.ts +1 -1
  346. package/dist/v2/components/layout/index.js +2 -4
  347. package/dist/v2/components/modals/index.d.ts +1 -1
  348. package/dist/v2/components/modals/index.js +37 -3
  349. package/dist/v2/components/modals/index.js.map +1 -0
  350. package/dist/v2/components/resize/index.d.ts +2 -2
  351. package/dist/v2/components/resize/index.js +2 -6
  352. package/dist/v2/components/server/ServerDropdown.vue.d.ts +1 -1
  353. package/dist/v2/components/server/index.d.ts +1 -1
  354. package/dist/v2/components/server/index.js +2 -4
  355. package/dist/v2/components/sidebar/Sidebar.vue.d.ts +1 -1
  356. package/dist/v2/components/sidebar/index.d.ts +3 -3
  357. package/dist/v2/components/sidebar/index.js +3 -8
  358. package/dist/v2/constants.d.ts +3 -0
  359. package/dist/v2/constants.d.ts.map +1 -0
  360. package/dist/v2/features/app/App.vue.d.ts +4 -4
  361. package/dist/v2/features/app/components/AppSidebar.vue.d.ts +1 -1
  362. package/dist/v2/features/app/components/index.d.ts +1 -1
  363. package/dist/v2/features/app/components/index.js +10 -5
  364. package/dist/v2/features/app/helpers/create-api-client-app.d.ts +3 -3
  365. package/dist/v2/features/app/helpers/get-route-param.d.ts +1 -1
  366. package/dist/v2/features/app/helpers/routes.d.ts +5 -5
  367. package/dist/v2/features/app/hooks/use-theme.d.ts +1 -1
  368. package/dist/v2/features/app/index.d.ts +8 -8
  369. package/dist/v2/features/app/index.js +3161 -19
  370. package/dist/v2/features/app/index.js.map +1 -0
  371. package/dist/v2/features/collection/DocumentCollection.vue.d.ts +1 -1
  372. package/dist/v2/features/collection/OperationCollection.vue.d.ts +1 -1
  373. package/dist/v2/features/collection/WorkspaceCollection.vue.d.ts +1 -1
  374. package/dist/v2/features/collection/components/Authentication.vue.d.ts +4 -4
  375. package/dist/v2/features/collection/components/Authentication.vue.d.ts.map +1 -1
  376. package/dist/v2/features/collection/components/Cookies.vue.d.ts +4 -4
  377. package/dist/v2/features/collection/components/Editor/Editor.vue.d.ts +4 -4
  378. package/dist/v2/features/collection/components/Editor/index.d.ts +1 -1
  379. package/dist/v2/features/collection/components/Editor/index.js +2 -4
  380. package/dist/v2/features/collection/components/Environment.vue.d.ts +4 -4
  381. package/dist/v2/features/collection/components/Overview.vue.d.ts +4 -4
  382. package/dist/v2/features/collection/components/Servers.vue.d.ts +4 -4
  383. package/dist/v2/features/collection/components/Settings.vue.d.ts +4 -4
  384. package/dist/v2/features/collection/components/Tabs.vue.d.ts +1 -1
  385. package/dist/v2/features/command-palette/TheCommandPalette.vue.d.ts +1 -1
  386. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts +10 -45
  387. package/dist/v2/features/command-palette/hooks/use-command-palette-state.d.ts.map +1 -1
  388. package/dist/v2/features/command-palette/index.d.ts +2 -2
  389. package/dist/v2/features/command-palette/index.js +3 -6
  390. package/dist/v2/features/editor/helpers/json/create-json-model.d.ts +1 -1
  391. package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.d.ts +1 -1
  392. package/dist/v2/features/editor/helpers/json/json-pointer-path.d.ts +1 -1
  393. package/dist/v2/features/editor/helpers/yaml/create-yaml-model.d.ts +1 -1
  394. package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.d.ts +1 -1
  395. package/dist/v2/features/editor/hooks/use-editor.d.ts +1 -1
  396. package/dist/v2/features/editor/hooks/use-json-pointer-link-support.d.ts +1 -1
  397. package/dist/v2/features/editor/index.d.ts +4 -4
  398. package/dist/v2/features/editor/index.js +2 -10
  399. package/dist/v2/features/environments/index.d.ts +1 -1
  400. package/dist/v2/features/environments/index.js +4 -4
  401. package/dist/v2/features/global-cookies/index.d.ts +1 -1
  402. package/dist/v2/features/global-cookies/index.js +4 -4
  403. package/dist/v2/features/modal/Modal.vue.d.ts +1 -1
  404. package/dist/v2/features/modal/helpers/create-api-client-modal.d.ts +2 -2
  405. package/dist/v2/features/modal/hooks/use-modal-sidebar.d.ts +1 -1
  406. package/dist/v2/features/modal/index.d.ts +3 -3
  407. package/dist/v2/features/modal/index.js +639 -7
  408. package/dist/v2/features/modal/index.js.map +1 -0
  409. package/dist/v2/features/modal/modal-events.d.ts +1 -1
  410. package/dist/v2/features/operation/Operation.vue.d.ts +2 -2
  411. package/dist/v2/features/operation/Operation.vue.d.ts.map +1 -1
  412. package/dist/v2/features/operation/helpers/get-selected-security.d.ts +6 -1
  413. package/dist/v2/features/operation/helpers/get-selected-security.d.ts.map +1 -1
  414. package/dist/v2/features/operation/index.d.ts +5 -5
  415. package/dist/v2/features/operation/index.js +19 -12
  416. package/dist/v2/features/search/helpers/create-fuse-instance.d.ts +1 -1
  417. package/dist/v2/features/search/helpers/create-search-index.d.ts +1 -1
  418. package/dist/v2/features/search/index.d.ts +1 -1
  419. package/dist/v2/features/search/index.js +2 -4
  420. package/dist/v2/features/settings/index.d.ts +2 -2
  421. package/dist/v2/features/settings/index.js +2 -6
  422. package/dist/v2/helpers/get-active-proxy-url.d.ts +1 -1
  423. package/dist/v2/helpers/get-tab-details.d.ts +1 -1
  424. package/dist/v2/helpers/handle-hotkeys.d.ts +1 -1
  425. package/dist/v2/helpers/index.d.ts +2 -2
  426. package/dist/v2/helpers/index.js +3 -6
  427. package/dist/v2/hooks/use-global-hot-keys.d.ts +1 -1
  428. package/dist/views/Collection/components/EnvironmentForm.vue.d.ts +1 -1
  429. package/dist/views/Collection/components/MarkdownInput.vue.d.ts +1 -1
  430. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.d.ts +1 -1
  431. package/dist/views/Components/CodeSnippet/helpers/get-har-request.d.ts +1 -1
  432. package/dist/views/Components/CodeSnippet/helpers/get-snippet.d.ts +1 -1
  433. package/dist/views/Components/CodeSnippet/index.d.ts +4 -4
  434. package/dist/views/Components/CodeSnippet/index.js +3 -10
  435. package/dist/views/Environment/EnvironmentVariableDropdown.vue.d.ts +1 -1
  436. package/dist/views/Environment/handle-drag.d.ts +1 -1
  437. package/dist/views/Request/Request.vue.d.ts +1 -1
  438. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.d.ts +1 -1
  439. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.d.ts +1 -1
  440. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.d.ts +1 -1
  441. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.d.ts +1 -1
  442. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.d.ts +2 -2
  443. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.d.ts +1 -1
  444. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.d.ts +1 -1
  445. package/dist/views/Request/RequestSection/RequestAuth/index.d.ts +3 -3
  446. package/dist/views/Request/RequestSection/RequestAuth/index.js +4 -8
  447. package/dist/views/Request/RequestSection/RequestBody.vue.d.ts +1 -1
  448. package/dist/views/Request/RequestSection/RequestCodeExample.vue.d.ts +1 -1
  449. package/dist/views/Request/RequestSection/RequestParams.vue.d.ts +1 -1
  450. package/dist/views/Request/RequestSection/RequestPathParams.vue.d.ts +1 -1
  451. package/dist/views/Request/RequestSection/RequestSection.vue.d.ts +1 -1
  452. package/dist/views/Request/RequestSection/RequestTable.vue.d.ts +1 -1
  453. package/dist/views/Request/RequestSection/helpers/update-scheme.d.ts +1 -1
  454. package/dist/views/Request/RequestSection/index.d.ts +2 -2
  455. package/dist/views/Request/RequestSection/index.js +42 -5
  456. package/dist/views/Request/RequestSection/index.js.map +1 -0
  457. package/dist/views/Request/RequestSidebarItem.vue.d.ts +1 -1
  458. package/dist/views/Request/RequestSidebarItemMenu.vue.d.ts +3 -3
  459. package/dist/views/Request/RequestSubpageHeader.vue.d.ts +1 -1
  460. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.d.ts +1 -1
  461. package/dist/views/Request/ResponseSection/ResponseSection.vue.d.ts +1 -1
  462. package/dist/views/Request/ResponseSection/index.d.ts +2 -2
  463. package/dist/views/Request/ResponseSection/index.js +7 -6
  464. package/dist/views/Request/components/index.d.ts +1 -1
  465. package/dist/views/Request/components/index.js +2 -4
  466. package/dist/views/Request/consts/index.d.ts +2 -2
  467. package/dist/views/Request/consts/index.js +2 -10
  468. package/dist/views/Request/handle-drag.d.ts +2 -2
  469. package/dist/views/Request/libs/auth.d.ts +1 -1
  470. package/dist/views/Request/libs/index.d.ts +3 -3
  471. package/dist/views/Request/libs/index.js +3 -22
  472. package/dist/views/Request/libs/oauth2.d.ts +1 -1
  473. package/dist/views/Request/libs/watch-mode.d.ts +2 -2
  474. package/dist/views/Request/types/index.js +0 -1
  475. package/dist/watch-mode-Dbaqd9bG.js +375 -0
  476. package/dist/watch-mode-Dbaqd9bG.js.map +1 -0
  477. package/package.json +29 -33
  478. package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
  479. package/dist/analytics.js +0 -9
  480. package/dist/assets/computer.ascii.js +0 -34
  481. package/dist/assets/keycap.ascii.js +0 -25
  482. package/dist/assets/rabbit.ascii.js +0 -11
  483. package/dist/assets/rabbitjump.ascii.js +0 -11
  484. package/dist/components/AddressBar/AddressBar.vue.js +0 -7
  485. package/dist/components/AddressBar/AddressBar.vue2.js +0 -160
  486. package/dist/components/AddressBar/AddressBarHistory.vue.js +0 -7
  487. package/dist/components/AddressBar/AddressBarHistory.vue2.js +0 -98
  488. package/dist/components/AddressBar/httpStatusCodeColors.js +0 -38
  489. package/dist/components/CodeInput/CodeInput.vue.js +0 -8
  490. package/dist/components/CodeInput/CodeInput.vue2.js +0 -209
  491. package/dist/components/CodeInput/codeVariableWidget.js +0 -111
  492. package/dist/components/CommandPalette/CommandActionForm.vue.js +0 -44
  493. package/dist/components/CommandPalette/CommandActionForm.vue2.js +0 -4
  494. package/dist/components/CommandPalette/CommandActionInput.vue.js +0 -52
  495. package/dist/components/CommandPalette/CommandActionInput.vue2.js +0 -4
  496. package/dist/components/CommandPalette/CommandPaletteCollection.vue.js +0 -80
  497. package/dist/components/CommandPalette/CommandPaletteCollection.vue2.js +0 -4
  498. package/dist/components/CommandPalette/CommandPaletteExample.vue.js +0 -116
  499. package/dist/components/CommandPalette/CommandPaletteExample.vue2.js +0 -4
  500. package/dist/components/CommandPalette/CommandPaletteImport.vue.js +0 -217
  501. package/dist/components/CommandPalette/CommandPaletteImport.vue2.js +0 -4
  502. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue.js +0 -7
  503. package/dist/components/CommandPalette/CommandPaletteImportCurl.vue2.js +0 -136
  504. package/dist/components/CommandPalette/CommandPaletteServer.vue.js +0 -123
  505. package/dist/components/CommandPalette/CommandPaletteServer.vue2.js +0 -4
  506. package/dist/components/CommandPalette/CommandPaletteTag.vue.js +0 -84
  507. package/dist/components/CommandPalette/CommandPaletteTag.vue2.js +0 -4
  508. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue.js +0 -48
  509. package/dist/components/CommandPalette/CommandPaletteWorkspace.vue2.js +0 -4
  510. package/dist/components/CommandPalette/TheCommandPalette.vue.js +0 -7
  511. package/dist/components/CommandPalette/TheCommandPalette.vue2.js +0 -305
  512. package/dist/components/CommandPalette/WatchModeToggle.vue.js +0 -39
  513. package/dist/components/CommandPalette/WatchModeToggle.vue2.js +0 -4
  514. package/dist/components/DataTable/DataTable.vue.js +0 -38
  515. package/dist/components/DataTable/DataTable.vue2.js +0 -4
  516. package/dist/components/DataTable/DataTableCell.vue.js +0 -26
  517. package/dist/components/DataTable/DataTableCell.vue2.js +0 -4
  518. package/dist/components/DataTable/DataTableCheckbox.vue.js +0 -53
  519. package/dist/components/DataTable/DataTableCheckbox.vue2.js +0 -4
  520. package/dist/components/DataTable/DataTableHeader.vue.js +0 -18
  521. package/dist/components/DataTable/DataTableHeader.vue2.js +0 -4
  522. package/dist/components/DataTable/DataTableInput.vue.js +0 -7
  523. package/dist/components/DataTable/DataTableInput.vue2.js +0 -124
  524. package/dist/components/DataTable/DataTableInputSelect.vue.js +0 -146
  525. package/dist/components/DataTable/DataTableInputSelect.vue2.js +0 -4
  526. package/dist/components/DataTable/DataTableRow.vue.js +0 -12
  527. package/dist/components/DataTable/DataTableText.vue.js +0 -23
  528. package/dist/components/DataTable/DataTableText.vue2.js +0 -4
  529. package/dist/components/EmptyState.vue.js +0 -7
  530. package/dist/components/EmptyState.vue2.js +0 -42
  531. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue.js +0 -113
  532. package/dist/components/EnvironmentSelector/EnvironmentSelector.vue2.js +0 -4
  533. package/dist/components/Form/Form.vue.js +0 -83
  534. package/dist/components/Form/Form.vue2.js +0 -4
  535. package/dist/components/Form/LabelInput.vue.js +0 -7
  536. package/dist/components/Form/LabelInput.vue2.js +0 -42
  537. package/dist/components/HelpfulLink.vue.js +0 -20
  538. package/dist/components/HelpfulLink.vue2.js +0 -4
  539. package/dist/components/HttpMethod/HttpMethod.vue.js +0 -7
  540. package/dist/components/HttpMethod/HttpMethod.vue2.js +0 -62
  541. package/dist/components/IconSelector.vue.js +0 -75
  542. package/dist/components/IconSelector.vue2.js +0 -4
  543. package/dist/components/ImportCollection/DropEventListener.vue.js +0 -81
  544. package/dist/components/ImportCollection/DropEventListener.vue2.js +0 -4
  545. package/dist/components/ImportCollection/ImportCollectionListener.vue.js +0 -77
  546. package/dist/components/ImportCollection/ImportCollectionListener.vue2.js +0 -4
  547. package/dist/components/ImportCollection/ImportCollectionModal.vue.js +0 -208
  548. package/dist/components/ImportCollection/ImportCollectionModal.vue3.js +0 -5
  549. package/dist/components/ImportCollection/ImportNowButton.vue.js +0 -73
  550. package/dist/components/ImportCollection/ImportNowButton.vue2.js +0 -4
  551. package/dist/components/ImportCollection/IntegrationLogo.vue.js +0 -44
  552. package/dist/components/ImportCollection/IntegrationLogo.vue2.js +0 -4
  553. package/dist/components/ImportCollection/PasteEventListener.vue.js +0 -24
  554. package/dist/components/ImportCollection/PasteEventListener.vue2.js +0 -4
  555. package/dist/components/ImportCollection/PrefetchError.vue.js +0 -27
  556. package/dist/components/ImportCollection/PrefetchError.vue2.js +0 -4
  557. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue.js +0 -20
  558. package/dist/components/ImportCollection/UrlQueryParameterChecker.vue2.js +0 -4
  559. package/dist/components/ImportCollection/WorkspaceSelector.vue.js +0 -134
  560. package/dist/components/ImportCollection/WorkspaceSelector.vue2.js +0 -4
  561. package/dist/components/ImportCollection/hooks/useUrlPrefetcher.js +0 -106
  562. package/dist/components/ImportCollection/utils/get-openapi-version.js +0 -20
  563. package/dist/components/ImportCollection/utils/import-collection.js +0 -29
  564. package/dist/components/ImportCollection/utils/is-document.js +0 -9
  565. package/dist/components/ImportCollection/utils/is-url.js +0 -9
  566. package/dist/components/ImportCollection/utils/workspace-store-is-empty.js +0 -7
  567. package/dist/components/OpenApiClientButton.vue.js +0 -7
  568. package/dist/components/OpenApiClientButton.vue2.js +0 -48
  569. package/dist/components/ScalarAsciiArt.vue.js +0 -7
  570. package/dist/components/ScalarAsciiArt.vue2.js +0 -37
  571. package/dist/components/Search/useSearch.js +0 -78
  572. package/dist/components/SectionFilter.vue.js +0 -7
  573. package/dist/components/SectionFilter.vue2.js +0 -64
  574. package/dist/components/SectionFilterButton.vue.js +0 -23
  575. package/dist/components/SectionFilterButton.vue2.js +0 -4
  576. package/dist/components/Server/ServerDropdown.vue.js +0 -132
  577. package/dist/components/Server/ServerDropdown.vue2.js +0 -4
  578. package/dist/components/Server/ServerDropdownItem.vue.js +0 -7
  579. package/dist/components/Server/ServerDropdownItem.vue2.js +0 -84
  580. package/dist/components/Server/ServerSelector.vue.js +0 -82
  581. package/dist/components/Server/ServerSelector.vue2.js +0 -4
  582. package/dist/components/Server/ServerVariablesForm.vue.js +0 -49
  583. package/dist/components/Server/ServerVariablesForm.vue2.js +0 -4
  584. package/dist/components/Server/ServerVariablesSelect.vue.js +0 -54
  585. package/dist/components/Server/ServerVariablesSelect.vue2.js +0 -4
  586. package/dist/components/Server/ServerVariablesTextbox.vue.js +0 -29
  587. package/dist/components/Server/ServerVariablesTextbox.vue2.js +0 -4
  588. package/dist/components/SideNav/DownloadAppButton.vue.js +0 -7
  589. package/dist/components/SideNav/DownloadAppButton.vue2.js +0 -33
  590. package/dist/components/SideNav/SideHelp.vue.js +0 -127
  591. package/dist/components/SideNav/SideHelp.vue2.js +0 -4
  592. package/dist/components/SideNav/SideNav.vue.js +0 -96
  593. package/dist/components/SideNav/SideNav.vue2.js +0 -4
  594. package/dist/components/SideNav/SideNavGroup.vue.js +0 -16
  595. package/dist/components/SideNav/SideNavGroup.vue2.js +0 -4
  596. package/dist/components/SideNav/SideNavLink.vue.js +0 -39
  597. package/dist/components/SideNav/SideNavLink.vue2.js +0 -4
  598. package/dist/components/SideNav/SideNavRouterLink.vue.js +0 -27
  599. package/dist/components/SideNav/SideNavRouterLink.vue2.js +0 -4
  600. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue.js +0 -30
  601. package/dist/components/Sidebar/Actions/DeleteSidebarListElement.vue2.js +0 -4
  602. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue.js +0 -58
  603. package/dist/components/Sidebar/Actions/EditSidebarListCollection.vue2.js +0 -4
  604. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue.js +0 -29
  605. package/dist/components/Sidebar/Actions/EditSidebarListElement.vue2.js +0 -4
  606. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue.js +0 -46
  607. package/dist/components/Sidebar/Actions/SidebarListElementForm.vue2.js +0 -4
  608. package/dist/components/Sidebar/Sidebar.vue.js +0 -7
  609. package/dist/components/Sidebar/Sidebar.vue2.js +0 -63
  610. package/dist/components/Sidebar/SidebarButton.vue.js +0 -33
  611. package/dist/components/Sidebar/SidebarButton.vue2.js +0 -4
  612. package/dist/components/Sidebar/SidebarList.vue.js +0 -12
  613. package/dist/components/Sidebar/SidebarListElement.vue.js +0 -8
  614. package/dist/components/Sidebar/SidebarListElement.vue2.js +0 -94
  615. package/dist/components/Sidebar/SidebarListElementActions.vue.js +0 -86
  616. package/dist/components/Sidebar/SidebarListElementActions.vue2.js +0 -4
  617. package/dist/components/Sidebar/SidebarToggle.vue.js +0 -49
  618. package/dist/components/Sidebar/SidebarToggle.vue2.js +0 -4
  619. package/dist/components/TopNav/TopNav.vue.js +0 -210
  620. package/dist/components/TopNav/TopNav.vue2.js +0 -4
  621. package/dist/components/TopNav/TopNavItem.vue.js +0 -7
  622. package/dist/components/TopNav/TopNavItem.vue2.js +0 -138
  623. package/dist/components/ViewLayout/ViewLayout.vue.js +0 -18
  624. package/dist/components/ViewLayout/ViewLayout.vue2.js +0 -4
  625. package/dist/components/ViewLayout/ViewLayoutCollapse.vue.js +0 -92
  626. package/dist/components/ViewLayout/ViewLayoutCollapse.vue2.js +0 -4
  627. package/dist/components/ViewLayout/ViewLayoutContent.vue.js +0 -12
  628. package/dist/components/ViewLayout/ViewLayoutSection.vue.js +0 -23
  629. package/dist/components/ViewLayout/ViewLayoutSection.vue2.js +0 -4
  630. package/dist/constants.js +0 -40
  631. package/dist/data/httpHeaders.js +0 -537
  632. package/dist/hooks/useAnalytics.js +0 -11
  633. package/dist/hooks/useClientConfig.js +0 -7
  634. package/dist/hooks/useFileDialog.js +0 -21
  635. package/dist/hooks/useLayout.js +0 -8
  636. package/dist/hooks/useResponseBody.js +0 -20
  637. package/dist/hooks/useSidebar.js +0 -28
  638. package/dist/layouts/App/ApiClientApp.vue.js +0 -70
  639. package/dist/layouts/App/ApiClientApp.vue3.js +0 -5
  640. package/dist/layouts/App/MainLayout.vue.js +0 -26
  641. package/dist/layouts/App/MainLayout.vue2.js +0 -4
  642. package/dist/layouts/App/create-api-client-app.js +0 -35
  643. package/dist/layouts/App/hotkeys.js +0 -21
  644. package/dist/layouts/Modal/ApiClientModal.vue.js +0 -30
  645. package/dist/layouts/Modal/ApiClientModal.vue2.js +0 -4
  646. package/dist/layouts/Modal/create-api-client-modal.js +0 -32
  647. package/dist/layouts/Web/ApiClientWeb.vue.js +0 -64
  648. package/dist/layouts/Web/ApiClientWeb.vue3.js +0 -5
  649. package/dist/layouts/Web/create-api-client-web.js +0 -32
  650. package/dist/libs/create-client.js +0 -189
  651. package/dist/libs/electron.js +0 -4
  652. package/dist/libs/env-helpers.js +0 -6
  653. package/dist/libs/environment-parser.js +0 -18
  654. package/dist/libs/errors.js +0 -16
  655. package/dist/libs/event-bus.js +0 -32
  656. package/dist/libs/extractAttachmentFilename.js +0 -18
  657. package/dist/libs/find-request.js +0 -23
  658. package/dist/libs/formatters.js +0 -10
  659. package/dist/libs/get-request-uid-by-path-method.js +0 -18
  660. package/dist/libs/getOpenApiDocumentDetails.js +0 -40
  661. package/dist/libs/hot-keys.js +0 -44
  662. package/dist/libs/importers/curl.js +0 -53
  663. package/dist/libs/isUrl.js +0 -7
  664. package/dist/libs/local-storage.js +0 -41
  665. package/dist/libs/normalize-headers.js +0 -27
  666. package/dist/libs/parse-curl.js +0 -59
  667. package/dist/libs/postman.js +0 -37
  668. package/dist/libs/send-request/build-request-security.js +0 -35
  669. package/dist/libs/send-request/create-fetch-body.js +0 -25
  670. package/dist/libs/send-request/create-fetch-headers.js +0 -11
  671. package/dist/libs/send-request/create-fetch-query-params.js +0 -33
  672. package/dist/libs/send-request/create-request-operation.js +0 -140
  673. package/dist/libs/send-request/decode-buffer.js +0 -9
  674. package/dist/libs/send-request/set-request-cookies.js +0 -58
  675. package/dist/libs/string-template.js +0 -42
  676. package/dist/libs/validate-parameters.js +0 -16
  677. package/dist/plugins/hooks/usePluginManager.js +0 -10
  678. package/dist/plugins/plugin-manager.js +0 -26
  679. package/dist/routes.js +0 -210
  680. package/dist/store/active-entities.js +0 -118
  681. package/dist/store/collections.js +0 -73
  682. package/dist/store/cookies.js +0 -13
  683. package/dist/store/environment.js +0 -32
  684. package/dist/store/events.js +0 -35
  685. package/dist/store/import-spec.js +0 -55
  686. package/dist/store/request-example.js +0 -43
  687. package/dist/store/requests.js +0 -97
  688. package/dist/store/router-params.js +0 -22
  689. package/dist/store/security-schemes.js +0 -55
  690. package/dist/store/servers.js +0 -39
  691. package/dist/store/store.js +0 -144
  692. package/dist/store/tags.js +0 -45
  693. package/dist/store/workspace.js +0 -52
  694. package/dist/v2/blocks/operation-block/OperationBlock.vue.js +0 -242
  695. package/dist/v2/blocks/operation-block/OperationBlock.vue2.js +0 -4
  696. package/dist/v2/blocks/operation-block/components/Header.vue.js +0 -7
  697. package/dist/v2/blocks/operation-block/components/Header.vue2.js +0 -100
  698. package/dist/v2/blocks/operation-block/helpers/build-request-body.js +0 -40
  699. package/dist/v2/blocks/operation-block/helpers/build-request-cookie-header.js +0 -31
  700. package/dist/v2/blocks/operation-block/helpers/build-request-parameters.js +0 -107
  701. package/dist/v2/blocks/operation-block/helpers/build-request-security.js +0 -46
  702. package/dist/v2/blocks/operation-block/helpers/build-request.js +0 -70
  703. package/dist/v2/blocks/operation-block/helpers/de-serialize-parameter.js +0 -25
  704. package/dist/v2/blocks/operation-block/helpers/decode-buffer.js +0 -9
  705. package/dist/v2/blocks/operation-block/helpers/filter-global-cookies.js +0 -14
  706. package/dist/v2/blocks/operation-block/helpers/get-cookie-header-keys.js +0 -4
  707. package/dist/v2/blocks/operation-block/helpers/get-environment-variables.js +0 -7
  708. package/dist/v2/blocks/operation-block/helpers/get-example.js +0 -36
  709. package/dist/v2/blocks/operation-block/helpers/get-resolved-url.js +0 -17
  710. package/dist/v2/blocks/operation-block/helpers/get-selected-body-content-type.js +0 -4
  711. package/dist/v2/blocks/operation-block/helpers/get-server-url.js +0 -12
  712. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-request.js +0 -31
  713. package/dist/v2/blocks/operation-block/helpers/har-to-fetch-response.js +0 -43
  714. package/dist/v2/blocks/operation-block/helpers/response-cache.js +0 -12
  715. package/dist/v2/blocks/operation-block/helpers/send-request.js +0 -122
  716. package/dist/v2/blocks/operation-block/helpers/serialize-parameter.js +0 -49
  717. package/dist/v2/blocks/operation-block/helpers/validate-path-parameters.js +0 -17
  718. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue.js +0 -56
  719. package/dist/v2/blocks/operation-code-sample/components/ExamplePicker.vue2.js +0 -4
  720. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue.js +0 -30
  721. package/dist/v2/blocks/operation-code-sample/components/HttpMethod.vue2.js +0 -4
  722. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue.js +0 -7
  723. package/dist/v2/blocks/operation-code-sample/components/OperationCodeSample.vue2.js +0 -227
  724. package/dist/v2/blocks/operation-code-sample/helpers/find-client.js +0 -22
  725. package/dist/v2/blocks/operation-code-sample/helpers/generate-client-options.js +0 -27
  726. package/dist/v2/blocks/operation-code-sample/helpers/generate-code-snippet.js +0 -40
  727. package/dist/v2/blocks/operation-code-sample/helpers/get-clients.js +0 -20
  728. package/dist/v2/blocks/operation-code-sample/helpers/get-custom-code-samples.js +0 -4
  729. package/dist/v2/blocks/operation-code-sample/helpers/get-example-from-schema.js +0 -302
  730. package/dist/v2/blocks/operation-code-sample/helpers/get-resolved-ref-deep.js +0 -28
  731. package/dist/v2/blocks/operation-code-sample/helpers/get-secrets.js +0 -10
  732. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/operation-to-har.js +0 -67
  733. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-body.js +0 -66
  734. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-parameters.js +0 -172
  735. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-security-schemes.js +0 -55
  736. package/dist/v2/blocks/operation-code-sample/helpers/operation-to-har/process-server-url.js +0 -18
  737. package/dist/v2/blocks/request-block/RequestBlock.vue.js +0 -7
  738. package/dist/v2/blocks/request-block/RequestBlock.vue2.js +0 -347
  739. package/dist/v2/blocks/request-block/components/RequestBody.vue.js +0 -7
  740. package/dist/v2/blocks/request-block/components/RequestBody.vue2.js +0 -191
  741. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue.js +0 -84
  742. package/dist/v2/blocks/request-block/components/RequestBodyForm.vue2.js +0 -4
  743. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue.js +0 -135
  744. package/dist/v2/blocks/request-block/components/RequestCodeSnippet.vue2.js +0 -4
  745. package/dist/v2/blocks/request-block/components/RequestParams.vue.js +0 -78
  746. package/dist/v2/blocks/request-block/components/RequestParams.vue2.js +0 -4
  747. package/dist/v2/blocks/request-block/components/RequestTable.vue.js +0 -7
  748. package/dist/v2/blocks/request-block/components/RequestTable.vue2.js +0 -74
  749. package/dist/v2/blocks/request-block/components/RequestTableRow.vue.js +0 -204
  750. package/dist/v2/blocks/request-block/components/RequestTableRow.vue2.js +0 -4
  751. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue.js +0 -7
  752. package/dist/v2/blocks/request-block/components/RequestTableTooltip.vue2.js +0 -63
  753. package/dist/v2/blocks/request-block/helpers/create-parameter-handlers.js +0 -55
  754. package/dist/v2/blocks/request-block/helpers/files.js +0 -7
  755. package/dist/v2/blocks/request-block/helpers/get-default-headers.js +0 -26
  756. package/dist/v2/blocks/request-block/helpers/get-form-body-rows.js +0 -29
  757. package/dist/v2/blocks/request-block/helpers/get-parameter-content.js +0 -9
  758. package/dist/v2/blocks/request-block/helpers/get-parameter-schema.js +0 -6
  759. package/dist/v2/blocks/request-block/helpers/get-request-body-example.js +0 -16
  760. package/dist/v2/blocks/request-block/helpers/group-by.js +0 -10
  761. package/dist/v2/blocks/request-block/helpers/is-param-disabled.js +0 -7
  762. package/dist/v2/blocks/request-block/helpers/validate-parameter.js +0 -32
  763. package/dist/v2/blocks/response-block/ResponseBlock.vue.js +0 -7
  764. package/dist/v2/blocks/response-block/ResponseBlock.vue2.js +0 -180
  765. package/dist/v2/blocks/response-block/components/Headers.vue.js +0 -96
  766. package/dist/v2/blocks/response-block/components/Headers.vue2.js +0 -4
  767. package/dist/v2/blocks/response-block/components/ResponseBody.vue.js +0 -7
  768. package/dist/v2/blocks/response-block/components/ResponseBody.vue2.js +0 -87
  769. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue.js +0 -36
  770. package/dist/v2/blocks/response-block/components/ResponseBodyDownload.vue2.js +0 -4
  771. package/dist/v2/blocks/response-block/components/ResponseBodyInfo.vue.js +0 -14
  772. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue.js +0 -7
  773. package/dist/v2/blocks/response-block/components/ResponseBodyPreview.vue2.js +0 -63
  774. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue.js +0 -7
  775. package/dist/v2/blocks/response-block/components/ResponseBodyRaw.vue2.js +0 -41
  776. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue.js +0 -94
  777. package/dist/v2/blocks/response-block/components/ResponseBodyStreaming.vue2.js +0 -4
  778. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue.js +0 -25
  779. package/dist/v2/blocks/response-block/components/ResponseBodyToggle.vue2.js +0 -4
  780. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue.js +0 -52
  781. package/dist/v2/blocks/response-block/components/ResponseBodyVirtual.vue3.js +0 -5
  782. package/dist/v2/blocks/response-block/components/ResponseCookies.vue.js +0 -54
  783. package/dist/v2/blocks/response-block/components/ResponseCookies.vue2.js +0 -4
  784. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue.js +0 -7
  785. package/dist/v2/blocks/response-block/components/ResponseEmpty.vue2.js +0 -79
  786. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue.js +0 -7
  787. package/dist/v2/blocks/response-block/components/ResponseLoadingOverlay.vue2.js +0 -46
  788. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue.js +0 -67
  789. package/dist/v2/blocks/response-block/components/ResponseMetaInformation.vue2.js +0 -4
  790. package/dist/v2/blocks/response-block/helpers/extract-filename.js +0 -18
  791. package/dist/v2/blocks/response-block/helpers/get-content-length.js +0 -12
  792. package/dist/v2/blocks/response-block/helpers/media-types.js +0 -126
  793. package/dist/v2/blocks/response-block/helpers/parse-set-cookie.js +0 -12
  794. package/dist/v2/blocks/response-block/helpers/process-response-body.js +0 -16
  795. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue.js +0 -7
  796. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBar.vue2.js +0 -208
  797. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue.js +0 -7
  798. package/dist/v2/blocks/scalar-address-bar-block/components/AddressBarHistory.vue2.js +0 -95
  799. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue.js +0 -145
  800. package/dist/v2/blocks/scalar-address-bar-block/components/EnvironmentSelector.vue2.js +0 -4
  801. package/dist/v2/blocks/scalar-address-bar-block/components/httpStatusCodeColors.js +0 -38
  802. package/dist/v2/blocks/scalar-address-bar-block/hooks/use-loading-animation.js +0 -25
  803. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue.js +0 -184
  804. package/dist/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue2.js +0 -4
  805. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue.js +0 -51
  806. package/dist/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue2.js +0 -4
  807. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue.js +0 -330
  808. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue2.js +0 -4
  809. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue.js +0 -7
  810. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue2.js +0 -76
  811. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue.js +0 -165
  812. package/dist/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue3.js +0 -5
  813. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue.js +0 -91
  814. package/dist/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue2.js +0 -4
  815. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue.js +0 -83
  816. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue2.js +0 -4
  817. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue.js +0 -46
  818. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue2.js +0 -4
  819. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue.js +0 -244
  820. package/dist/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue2.js +0 -4
  821. package/dist/v2/blocks/scalar-auth-selector-block/helpers/auth-options.js +0 -97
  822. package/dist/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.js +0 -135
  823. package/dist/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.js +0 -35
  824. package/dist/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.js +0 -7
  825. package/dist/v2/blocks/scalar-auth-selector-block/helpers/merge-security.js +0 -23
  826. package/dist/v2/blocks/scalar-auth-selector-block/helpers/oauth.js +0 -139
  827. package/dist/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.js +0 -27
  828. package/dist/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.js +0 -64
  829. package/dist/v2/components/callout/Callout.vue.js +0 -7
  830. package/dist/v2/components/callout/Callout.vue2.js +0 -43
  831. package/dist/v2/components/code-input/CodeInput.vue.js +0 -8
  832. package/dist/v2/components/code-input/CodeInput.vue2.js +0 -213
  833. package/dist/v2/components/code-input/code-variable-widget.js +0 -106
  834. package/dist/v2/components/data-table/DataTable.vue.js +0 -38
  835. package/dist/v2/components/data-table/DataTable.vue2.js +0 -4
  836. package/dist/v2/components/data-table/DataTableCell.vue.js +0 -26
  837. package/dist/v2/components/data-table/DataTableCell.vue2.js +0 -4
  838. package/dist/v2/components/data-table/DataTableCheckbox.vue.js +0 -53
  839. package/dist/v2/components/data-table/DataTableCheckbox.vue2.js +0 -4
  840. package/dist/v2/components/data-table/DataTableHeader.vue.js +0 -18
  841. package/dist/v2/components/data-table/DataTableHeader.vue2.js +0 -4
  842. package/dist/v2/components/data-table/DataTableInput.vue.js +0 -7
  843. package/dist/v2/components/data-table/DataTableInput.vue2.js +0 -121
  844. package/dist/v2/components/data-table/DataTableInputSelect.vue.js +0 -149
  845. package/dist/v2/components/data-table/DataTableInputSelect.vue2.js +0 -4
  846. package/dist/v2/components/data-table/DataTableRow.vue.js +0 -12
  847. package/dist/v2/components/data-table/DataTableText.vue.js +0 -23
  848. package/dist/v2/components/data-table/DataTableText.vue2.js +0 -4
  849. package/dist/v2/components/forms/ConfirmationForm.vue.js +0 -45
  850. package/dist/v2/components/forms/ConfirmationForm.vue2.js +0 -4
  851. package/dist/v2/components/layout/CollapsibleSection.vue.js +0 -89
  852. package/dist/v2/components/layout/CollapsibleSection.vue2.js +0 -4
  853. package/dist/v2/components/layout/ValueEmitter.vue.js +0 -21
  854. package/dist/v2/components/layout/ValueEmitter.vue2.js +0 -4
  855. package/dist/v2/components/modals/DeleteModal.vue.js +0 -31
  856. package/dist/v2/components/modals/DeleteModal.vue2.js +0 -4
  857. package/dist/v2/components/modals/ModalClientContainer.vue.js +0 -7
  858. package/dist/v2/components/modals/ModalClientContainer.vue2.js +0 -60
  859. package/dist/v2/components/resize/Resize.vue.js +0 -8
  860. package/dist/v2/components/resize/Resize.vue2.js +0 -36
  861. package/dist/v2/components/resize/use-split-resize.js +0 -57
  862. package/dist/v2/components/server/ServerDropdown.vue.js +0 -91
  863. package/dist/v2/components/server/ServerDropdown.vue2.js +0 -4
  864. package/dist/v2/components/server/ServerDropdownItem.vue.js +0 -7
  865. package/dist/v2/components/server/ServerDropdownItem.vue2.js +0 -49
  866. package/dist/v2/components/sidebar/Sidebar.vue.js +0 -115
  867. package/dist/v2/components/sidebar/Sidebar.vue2.js +0 -4
  868. package/dist/v2/components/sidebar/SidebarMenu.vue.js +0 -52
  869. package/dist/v2/components/sidebar/SidebarMenu.vue2.js +0 -4
  870. package/dist/v2/components/sidebar/SidebarToggle.vue.js +0 -52
  871. package/dist/v2/components/sidebar/SidebarToggle.vue2.js +0 -4
  872. package/dist/v2/features/app/App.vue.js +0 -152
  873. package/dist/v2/features/app/App.vue3.js +0 -5
  874. package/dist/v2/features/app/app-events.js +0 -251
  875. package/dist/v2/features/app/app-state.js +0 -415
  876. package/dist/v2/features/app/components/AppSidebar.vue.js +0 -7
  877. package/dist/v2/features/app/components/AppSidebar.vue2.js +0 -304
  878. package/dist/v2/features/app/components/CreateWorkspaceModal.vue.js +0 -56
  879. package/dist/v2/features/app/components/CreateWorkspaceModal.vue2.js +0 -4
  880. package/dist/v2/features/app/components/DesktopTab.vue.js +0 -7
  881. package/dist/v2/features/app/components/DesktopTab.vue2.js +0 -134
  882. package/dist/v2/features/app/components/DesktopTabs.vue.js +0 -56
  883. package/dist/v2/features/app/components/DesktopTabs.vue2.js +0 -4
  884. package/dist/v2/features/app/components/DownloadAppButton.vue.js +0 -7
  885. package/dist/v2/features/app/components/DownloadAppButton.vue2.js +0 -19
  886. package/dist/v2/features/app/components/SidebarItemMenu.vue.js +0 -185
  887. package/dist/v2/features/app/components/SidebarItemMenu.vue2.js +0 -4
  888. package/dist/v2/features/app/components/SplashScreen.vue.js +0 -7
  889. package/dist/v2/features/app/components/SplashScreen.vue2.js +0 -18
  890. package/dist/v2/features/app/helpers/create-api-client-app.js +0 -36
  891. package/dist/v2/features/app/helpers/filter-workspaces.js +0 -5
  892. package/dist/v2/features/app/helpers/get-route-param.js +0 -9
  893. package/dist/v2/features/app/helpers/group-workspaces.js +0 -23
  894. package/dist/v2/features/app/helpers/routes.js +0 -157
  895. package/dist/v2/features/app/hooks/use-document-watcher.js +0 -66
  896. package/dist/v2/features/app/hooks/use-theme.js +0 -48
  897. package/dist/v2/features/collection/DocumentCollection.vue.js +0 -336
  898. package/dist/v2/features/collection/DocumentCollection.vue3.js +0 -5
  899. package/dist/v2/features/collection/OperationCollection.vue.js +0 -86
  900. package/dist/v2/features/collection/OperationCollection.vue2.js +0 -4
  901. package/dist/v2/features/collection/WorkspaceCollection.vue.js +0 -68
  902. package/dist/v2/features/collection/WorkspaceCollection.vue2.js +0 -4
  903. package/dist/v2/features/collection/components/Authentication.vue.js +0 -7
  904. package/dist/v2/features/collection/components/Authentication.vue2.js +0 -154
  905. package/dist/v2/features/collection/components/Cookies.vue.js +0 -52
  906. package/dist/v2/features/collection/components/Cookies.vue2.js +0 -4
  907. package/dist/v2/features/collection/components/Editor/Editor.vue.js +0 -7
  908. package/dist/v2/features/collection/components/Editor/Editor.vue2.js +0 -344
  909. package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue.js +0 -78
  910. package/dist/v2/features/collection/components/Editor/components/EditorDiagnosticsPanel.vue2.js +0 -4
  911. package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue.js +0 -83
  912. package/dist/v2/features/collection/components/Editor/components/EditorSavePanel.vue2.js +0 -4
  913. package/dist/v2/features/collection/components/Editor/helpers/get-diagnostic-counts.js +0 -10
  914. package/dist/v2/features/collection/components/Editor/helpers/get-operation-context.js +0 -5
  915. package/dist/v2/features/collection/components/Editor/helpers/get-visible-diagnostics.js +0 -5
  916. package/dist/v2/features/collection/components/Editor/helpers/parse-editor-object.js +0 -21
  917. package/dist/v2/features/collection/components/Editor/helpers/stringify-document.js +0 -5
  918. package/dist/v2/features/collection/components/Editor/hooks/use-editor-state.js +0 -25
  919. package/dist/v2/features/collection/components/Environment.vue.js +0 -54
  920. package/dist/v2/features/collection/components/Environment.vue2.js +0 -4
  921. package/dist/v2/features/collection/components/Form.vue.js +0 -78
  922. package/dist/v2/features/collection/components/Form.vue2.js +0 -4
  923. package/dist/v2/features/collection/components/LabelInput.vue.js +0 -7
  924. package/dist/v2/features/collection/components/LabelInput.vue2.js +0 -35
  925. package/dist/v2/features/collection/components/Overview.vue.js +0 -7
  926. package/dist/v2/features/collection/components/Overview.vue2.js +0 -208
  927. package/dist/v2/features/collection/components/Servers.vue.js +0 -210
  928. package/dist/v2/features/collection/components/Servers.vue2.js +0 -4
  929. package/dist/v2/features/collection/components/Settings.vue.js +0 -61
  930. package/dist/v2/features/collection/components/Settings.vue2.js +0 -4
  931. package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue.js +0 -7
  932. package/dist/v2/features/collection/components/SyncConflictResolutionEditor.vue2.js +0 -136
  933. package/dist/v2/features/collection/components/Tabs.vue.js +0 -44
  934. package/dist/v2/features/collection/components/Tabs.vue2.js +0 -4
  935. package/dist/v2/features/collection/helpers/get-default-operation-security-toggle.js +0 -13
  936. package/dist/v2/features/command-palette/TheCommandPalette.vue.js +0 -7
  937. package/dist/v2/features/command-palette/TheCommandPalette.vue2.js +0 -152
  938. package/dist/v2/features/command-palette/components/CommandActionForm.vue.js +0 -48
  939. package/dist/v2/features/command-palette/components/CommandActionForm.vue2.js +0 -4
  940. package/dist/v2/features/command-palette/components/CommandActionInput.vue.js +0 -52
  941. package/dist/v2/features/command-palette/components/CommandActionInput.vue2.js +0 -4
  942. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue.js +0 -211
  943. package/dist/v2/features/command-palette/components/CommandPaletteExample.vue2.js +0 -4
  944. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue.js +0 -182
  945. package/dist/v2/features/command-palette/components/CommandPaletteImport.vue2.js +0 -4
  946. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue.js +0 -7
  947. package/dist/v2/features/command-palette/components/CommandPaletteImportCurl.vue2.js +0 -115
  948. package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue.js +0 -78
  949. package/dist/v2/features/command-palette/components/CommandPaletteOpenApiDocument.vue2.js +0 -4
  950. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue.js +0 -221
  951. package/dist/v2/features/command-palette/components/CommandPaletteRequest.vue2.js +0 -4
  952. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue.js +0 -114
  953. package/dist/v2/features/command-palette/components/CommandPaletteTag.vue2.js +0 -4
  954. package/dist/v2/features/command-palette/components/WatchModeToggle.vue.js +0 -40
  955. package/dist/v2/features/command-palette/components/WatchModeToggle.vue2.js +0 -4
  956. package/dist/v2/features/command-palette/helpers/generate-unique-slug.js +0 -11
  957. package/dist/v2/features/command-palette/helpers/get-openapi-document-details.js +0 -31
  958. package/dist/v2/features/command-palette/helpers/get-openapi-from-postman.js +0 -11
  959. package/dist/v2/features/command-palette/helpers/get-operation-from-curl.js +0 -76
  960. package/dist/v2/features/command-palette/helpers/get-postman-document-details.js +0 -18
  961. package/dist/v2/features/command-palette/helpers/import-document-to-workspace.js +0 -33
  962. package/dist/v2/features/command-palette/helpers/is-postman-collection.js +0 -11
  963. package/dist/v2/features/command-palette/helpers/load-document-from-source.js +0 -52
  964. package/dist/v2/features/command-palette/hooks/use-command-palette-state.js +0 -139
  965. package/dist/v2/features/editor/config.js +0 -16
  966. package/dist/v2/features/editor/helpers/configure-language-support.js +0 -39
  967. package/dist/v2/features/editor/helpers/ensure-monaco-environment.js +0 -20
  968. package/dist/v2/features/editor/helpers/json/create-json-model.js +0 -19
  969. package/dist/v2/features/editor/helpers/json/get-json-ast-node-from-path.js +0 -9
  970. package/dist/v2/features/editor/helpers/json/json-ast.js +0 -24
  971. package/dist/v2/features/editor/helpers/json/json-pointer-links.js +0 -72
  972. package/dist/v2/features/editor/helpers/json/json-pointer-path.js +0 -21
  973. package/dist/v2/features/editor/helpers/range-to-whole-line.js +0 -8
  974. package/dist/v2/features/editor/helpers/theme/apply-scalar-theme.js +0 -56
  975. package/dist/v2/features/editor/helpers/theme/load-css-variables.js +0 -21
  976. package/dist/v2/features/editor/helpers/yaml/create-yaml-model.js +0 -19
  977. package/dist/v2/features/editor/helpers/yaml/get-yaml-node-range-from-path.js +0 -50
  978. package/dist/v2/features/editor/hooks/use-editor-markers.js +0 -34
  979. package/dist/v2/features/editor/hooks/use-editor.js +0 -107
  980. package/dist/v2/features/editor/hooks/use-json-pointer-link-support.js +0 -27
  981. package/dist/v2/features/editor/hooks/use-three-way-merge-editor.js +0 -316
  982. package/dist/v2/features/editor/schemas/openapi-3.1-schema.json.js +0 -25
  983. package/dist/v2/features/environments/EnvironmentsList.vue.js +0 -68
  984. package/dist/v2/features/environments/EnvironmentsList.vue2.js +0 -4
  985. package/dist/v2/features/environments/components/Environment.vue.js +0 -66
  986. package/dist/v2/features/environments/components/Environment.vue2.js +0 -4
  987. package/dist/v2/features/environments/components/EnvironmentColors.vue.js +0 -121
  988. package/dist/v2/features/environments/components/EnvironmentColors.vue2.js +0 -4
  989. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue.js +0 -85
  990. package/dist/v2/features/environments/components/EnvironmentCreateModal.vue2.js +0 -4
  991. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue.js +0 -53
  992. package/dist/v2/features/environments/components/EnvironmentDeleteModal.vue2.js +0 -4
  993. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue.js +0 -109
  994. package/dist/v2/features/environments/components/EnvironmentVariablesDropdown.vue2.js +0 -4
  995. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue.js +0 -7
  996. package/dist/v2/features/environments/components/EnvironmentVariablesTable.vue2.js +0 -136
  997. package/dist/v2/features/global-cookies/components/CookiesTable.vue.js +0 -7
  998. package/dist/v2/features/global-cookies/components/CookiesTable.vue2.js +0 -189
  999. package/dist/v2/features/modal/Modal.vue.js +0 -122
  1000. package/dist/v2/features/modal/Modal.vue2.js +0 -4
  1001. package/dist/v2/features/modal/helpers/create-api-client-modal.js +0 -89
  1002. package/dist/v2/features/modal/helpers/map-hidden-clients-config.js +0 -36
  1003. package/dist/v2/features/modal/helpers/resolve-route-parameters.js +0 -29
  1004. package/dist/v2/features/modal/helpers/restore-workspace-state.js +0 -36
  1005. package/dist/v2/features/modal/hooks/use-modal-sidebar.js +0 -93
  1006. package/dist/v2/features/modal/modal-events.js +0 -44
  1007. package/dist/v2/features/operation/Operation.vue.js +0 -126
  1008. package/dist/v2/features/operation/Operation.vue2.js +0 -4
  1009. package/dist/v2/features/operation/helpers/combine-params.js +0 -14
  1010. package/dist/v2/features/operation/helpers/get-security-requirements.js +0 -4
  1011. package/dist/v2/features/operation/helpers/get-selected-security.js +0 -18
  1012. package/dist/v2/features/operation/helpers/get-selected-server.js +0 -4
  1013. package/dist/v2/features/search/helpers/create-fuse-instance.js +0 -43
  1014. package/dist/v2/features/search/helpers/create-search-index.js +0 -63
  1015. package/dist/v2/features/search/hooks/use-search-index.js +0 -18
  1016. package/dist/v2/features/settings/CollectionSettings.vue.js +0 -275
  1017. package/dist/v2/features/settings/CollectionSettings.vue2.js +0 -4
  1018. package/dist/v2/features/settings/DocumentSettings.vue.js +0 -115
  1019. package/dist/v2/features/settings/DocumentSettings.vue2.js +0 -4
  1020. package/dist/v2/features/settings/components/Appearance.vue.js +0 -88
  1021. package/dist/v2/features/settings/components/Appearance.vue2.js +0 -4
  1022. package/dist/v2/features/settings/components/Section.vue.js +0 -35
  1023. package/dist/v2/features/settings/components/Section.vue2.js +0 -4
  1024. package/dist/v2/features/settings/helpers/get-theme-colors.js +0 -16
  1025. package/dist/v2/helpers/drag-handle-factory.js +0 -120
  1026. package/dist/v2/helpers/generate-location-id.js +0 -10
  1027. package/dist/v2/helpers/get-active-environment.js +0 -22
  1028. package/dist/v2/helpers/get-active-proxy-url.js +0 -5
  1029. package/dist/v2/helpers/get-servers.js +0 -66
  1030. package/dist/v2/helpers/get-tab-details.js +0 -34
  1031. package/dist/v2/helpers/handle-hotkeys.js +0 -54
  1032. package/dist/v2/helpers/is-url.js +0 -5
  1033. package/dist/v2/helpers/slugify.js +0 -4
  1034. package/dist/v2/helpers/storage.js +0 -16
  1035. package/dist/v2/hooks/use-color-mode.js +0 -24
  1036. package/dist/v2/hooks/use-global-hot-keys.js +0 -11
  1037. package/dist/v2/hooks/use-scroll-lock.js +0 -21
  1038. package/dist/v2/workspace-events.js +0 -252
  1039. package/dist/views/Collection/Collection.vue.js +0 -4
  1040. package/dist/views/Collection/Collection.vue2.js +0 -49
  1041. package/dist/views/Collection/CollectionAuthentication.vue.js +0 -7
  1042. package/dist/views/Collection/CollectionAuthentication.vue2.js +0 -56
  1043. package/dist/views/Collection/CollectionCookies.vue.js +0 -4
  1044. package/dist/views/Collection/CollectionCookies.vue2.js +0 -16
  1045. package/dist/views/Collection/CollectionEnvironment.vue.js +0 -5
  1046. package/dist/views/Collection/CollectionEnvironment.vue2.js +0 -229
  1047. package/dist/views/Collection/CollectionInfoForm.vue.js +0 -7
  1048. package/dist/views/Collection/CollectionInfoForm.vue2.js +0 -63
  1049. package/dist/views/Collection/CollectionNavigation.vue.js +0 -133
  1050. package/dist/views/Collection/CollectionNavigation.vue2.js +0 -4
  1051. package/dist/views/Collection/CollectionOverview.vue.js +0 -4
  1052. package/dist/views/Collection/CollectionOverview.vue2.js +0 -34
  1053. package/dist/views/Collection/CollectionScripts.vue.js +0 -4
  1054. package/dist/views/Collection/CollectionScripts.vue2.js +0 -16
  1055. package/dist/views/Collection/CollectionServerForm.vue.js +0 -75
  1056. package/dist/views/Collection/CollectionServerForm.vue2.js +0 -4
  1057. package/dist/views/Collection/CollectionServers.vue.js +0 -4
  1058. package/dist/views/Collection/CollectionServers.vue2.js +0 -94
  1059. package/dist/views/Collection/CollectionSettings.vue.js +0 -4
  1060. package/dist/views/Collection/CollectionSettings.vue2.js +0 -118
  1061. package/dist/views/Collection/CollectionSync.vue.js +0 -4
  1062. package/dist/views/Collection/CollectionSync.vue2.js +0 -16
  1063. package/dist/views/Collection/components/EnvironmentForm.vue.js +0 -7
  1064. package/dist/views/Collection/components/EnvironmentForm.vue2.js +0 -270
  1065. package/dist/views/Collection/components/MarkdownInput.vue.js +0 -7
  1066. package/dist/views/Collection/components/MarkdownInput.vue2.js +0 -100
  1067. package/dist/views/Components/CodeSnippet/CodeSnippet.vue.js +0 -50
  1068. package/dist/views/Components/CodeSnippet/CodeSnippet.vue2.js +0 -4
  1069. package/dist/views/Components/CodeSnippet/helpers/convert-to-har-request.js +0 -62
  1070. package/dist/views/Components/CodeSnippet/helpers/get-har-request.js +0 -82
  1071. package/dist/views/Components/CodeSnippet/helpers/get-snippet.js +0 -30
  1072. package/dist/views/Cookies/CookieForm.vue.js +0 -34
  1073. package/dist/views/Cookies/CookieForm.vue2.js +0 -4
  1074. package/dist/views/Cookies/CookieModal.vue.js +0 -7
  1075. package/dist/views/Cookies/CookieModal.vue2.js +0 -88
  1076. package/dist/views/Cookies/Cookies.vue.js +0 -4
  1077. package/dist/views/Cookies/Cookies.vue2.js +0 -162
  1078. package/dist/views/Environment/Environment.vue.js +0 -4
  1079. package/dist/views/Environment/Environment.vue2.js +0 -402
  1080. package/dist/views/Environment/EnvironmentColorModal.vue.js +0 -42
  1081. package/dist/views/Environment/EnvironmentColorModal.vue2.js +0 -4
  1082. package/dist/views/Environment/EnvironmentColors.vue.js +0 -118
  1083. package/dist/views/Environment/EnvironmentColors.vue2.js +0 -4
  1084. package/dist/views/Environment/EnvironmentModal.vue.js +0 -131
  1085. package/dist/views/Environment/EnvironmentModal.vue2.js +0 -4
  1086. package/dist/views/Environment/EnvironmentVariableDropdown.vue.js +0 -129
  1087. package/dist/views/Environment/EnvironmentVariableDropdown.vue2.js +0 -4
  1088. package/dist/views/Environment/handle-drag.js +0 -32
  1089. package/dist/views/Request/Request.vue.js +0 -7
  1090. package/dist/views/Request/Request.vue2.js +0 -105
  1091. package/dist/views/Request/RequestRoot.vue.js +0 -7
  1092. package/dist/views/Request/RequestRoot.vue2.js +0 -123
  1093. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue.js +0 -52
  1094. package/dist/views/Request/RequestSection/RequestAuth/DeleteRequestAuthModal.vue2.js +0 -4
  1095. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue.js +0 -246
  1096. package/dist/views/Request/RequestSection/RequestAuth/OAuth2.vue2.js +0 -4
  1097. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue.js +0 -135
  1098. package/dist/views/Request/RequestSection/RequestAuth/OAuthScopesInput.vue2.js +0 -4
  1099. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue.js +0 -7
  1100. package/dist/views/Request/RequestSection/RequestAuth/RequestAuth.vue2.js +0 -209
  1101. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue.js +0 -7
  1102. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTable.vue2.js +0 -116
  1103. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue.js +0 -50
  1104. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthDataTableInput.vue2.js +0 -4
  1105. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue.js +0 -219
  1106. package/dist/views/Request/RequestSection/RequestAuth/RequestAuthTab.vue2.js +0 -4
  1107. package/dist/views/Request/RequestSection/RequestAuth/helpers/restore-auth-from-local-storage.js +0 -28
  1108. package/dist/views/Request/RequestSection/RequestBody.vue.js +0 -7
  1109. package/dist/views/Request/RequestSection/RequestBody.vue2.js +0 -451
  1110. package/dist/views/Request/RequestSection/RequestCodeExample.vue.js +0 -7
  1111. package/dist/views/Request/RequestSection/RequestCodeExample.vue2.js +0 -170
  1112. package/dist/views/Request/RequestSection/RequestParams.vue.js +0 -162
  1113. package/dist/views/Request/RequestSection/RequestParams.vue2.js +0 -4
  1114. package/dist/views/Request/RequestSection/RequestPathParams.vue.js +0 -96
  1115. package/dist/views/Request/RequestSection/RequestPathParams.vue2.js +0 -4
  1116. package/dist/views/Request/RequestSection/RequestSection.vue.js +0 -7
  1117. package/dist/views/Request/RequestSection/RequestSection.vue2.js +0 -247
  1118. package/dist/views/Request/RequestSection/RequestTable.vue.js +0 -7
  1119. package/dist/views/Request/RequestSection/RequestTable.vue2.js +0 -227
  1120. package/dist/views/Request/RequestSection/RequestTableTooltip.vue.js +0 -7
  1121. package/dist/views/Request/RequestSection/RequestTableTooltip.vue2.js +0 -61
  1122. package/dist/views/Request/RequestSection/helpers/filter-security-requirements.js +0 -29
  1123. package/dist/views/Request/RequestSection/helpers/getting-started.js +0 -13
  1124. package/dist/views/Request/RequestSection/helpers/update-scheme.js +0 -16
  1125. package/dist/views/Request/RequestSidebar.vue.js +0 -7
  1126. package/dist/views/Request/RequestSidebar.vue2.js +0 -341
  1127. package/dist/views/Request/RequestSidebarItem.vue.js +0 -8
  1128. package/dist/views/Request/RequestSidebarItem.vue2.js +0 -464
  1129. package/dist/views/Request/RequestSidebarItemMenu.vue.js +0 -7
  1130. package/dist/views/Request/RequestSidebarItemMenu.vue2.js +0 -236
  1131. package/dist/views/Request/RequestSubpageHeader.vue.js +0 -7
  1132. package/dist/views/Request/RequestSubpageHeader.vue2.js +0 -79
  1133. package/dist/views/Request/ResponseSection/RequestHeaders.vue.js +0 -96
  1134. package/dist/views/Request/ResponseSection/RequestHeaders.vue2.js +0 -4
  1135. package/dist/views/Request/ResponseSection/ResponseBody.vue.js +0 -7
  1136. package/dist/views/Request/ResponseSection/ResponseBody.vue2.js +0 -83
  1137. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue.js +0 -36
  1138. package/dist/views/Request/ResponseSection/ResponseBodyDownload.vue2.js +0 -4
  1139. package/dist/views/Request/ResponseSection/ResponseBodyInfo.vue.js +0 -14
  1140. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue.js +0 -7
  1141. package/dist/views/Request/ResponseSection/ResponseBodyPreview.vue2.js +0 -63
  1142. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue.js +0 -7
  1143. package/dist/views/Request/ResponseSection/ResponseBodyRaw.vue2.js +0 -42
  1144. package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue.js +0 -74
  1145. package/dist/views/Request/ResponseSection/ResponseBodyStreaming.vue2.js +0 -4
  1146. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue.js +0 -25
  1147. package/dist/views/Request/ResponseSection/ResponseBodyToggle.vue2.js +0 -4
  1148. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue.js +0 -50
  1149. package/dist/views/Request/ResponseSection/ResponseBodyVirtual.vue3.js +0 -5
  1150. package/dist/views/Request/ResponseSection/ResponseCookies.vue.js +0 -51
  1151. package/dist/views/Request/ResponseSection/ResponseCookies.vue2.js +0 -4
  1152. package/dist/views/Request/ResponseSection/ResponseEmpty.vue.js +0 -7
  1153. package/dist/views/Request/ResponseSection/ResponseEmpty.vue2.js +0 -103
  1154. package/dist/views/Request/ResponseSection/ResponseHeaders.vue.js +0 -96
  1155. package/dist/views/Request/ResponseSection/ResponseHeaders.vue2.js +0 -4
  1156. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue.js +0 -7
  1157. package/dist/views/Request/ResponseSection/ResponseLoadingOverlay.vue2.js +0 -38
  1158. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue.js +0 -67
  1159. package/dist/views/Request/ResponseSection/ResponseMetaInformation.vue2.js +0 -4
  1160. package/dist/views/Request/ResponseSection/ResponseSection.vue.js +0 -7
  1161. package/dist/views/Request/ResponseSection/ResponseSection.vue2.js +0 -189
  1162. package/dist/views/Request/components/WorkspaceDropdown.vue.js +0 -182
  1163. package/dist/views/Request/components/WorkspaceDropdown.vue2.js +0 -4
  1164. package/dist/views/Request/consts/mediaTypes.js +0 -131
  1165. package/dist/views/Request/consts/new-auth-options.js +0 -100
  1166. package/dist/views/Request/handle-drag.js +0 -42
  1167. package/dist/views/Request/hooks/useOpenApiWatcher.js +0 -57
  1168. package/dist/views/Request/libs/auth.js +0 -52
  1169. package/dist/views/Request/libs/oauth2.js +0 -127
  1170. package/dist/views/Request/libs/request.js +0 -40
  1171. package/dist/views/Request/libs/watch-mode.js +0 -337
  1172. package/dist/views/Settings/Settings.vue.js +0 -4
  1173. package/dist/views/Settings/Settings.vue2.js +0 -29
  1174. package/dist/views/Settings/SettingsGeneral.vue.js +0 -286
  1175. package/dist/views/Settings/SettingsGeneral.vue2.js +0 -4
  1176. package/dist/views/Settings/components/SettingsAppearance.vue.js +0 -85
  1177. package/dist/views/Settings/components/SettingsAppearance.vue2.js +0 -4
  1178. package/dist/views/Settings/components/SettingsSection.vue.js +0 -24
  1179. package/dist/views/Settings/components/SettingsSection.vue2.js +0 -4
@@ -0,0 +1,1889 @@
1
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BmmBcIzD.js";
2
+ import { n as CommandActionForm_default, t as CommandActionInput_default } from "./CommandActionInput-TkcAx6E8.js";
3
+ import { n as DataTableCell_default, t as DataTableRow_default } from "./DataTableRow-c3XveEUO.js";
4
+ import { n as DataTableCheckbox_default } from "./DataTable-BqbZKW3K.js";
5
+ import { n as getEnvironmentVariables, t as getServerUrl } from "./get-server-url-UVN-dx79.js";
6
+ import { n as DataTableRow_default$1, o as DataTableCell_default$1, r as DataTableInput_default, s as DataTable_default } from "./data-table-PL7e8NRO.js";
7
+ import { t as CollapsibleSection_default } from "./layout-BWiL7dfb.js";
8
+ import { Fragment, capitalize, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, normalizeClass, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, useModel, watch, withCtx, withModifiers } from "vue";
9
+ import { ScalarButton, ScalarComboboxMultiselect, ScalarIcon, ScalarIconButton, ScalarListboxCheckbox, ScalarMarkdownSummary, ScalarModal, ScalarSearchInput, useLoadingState, useModal } from "@scalar/components";
10
+ import { useToasts } from "@scalar/use-toasts";
11
+ import { pkceOptions } from "@scalar/oas-utils/entities/spec";
12
+ import { encode, fromUint8Array } from "js-base64";
13
+ import { redirectToProxy, shouldUseProxy } from "@scalar/helpers/url/redirect-to-proxy";
14
+ import { Disclosure, DisclosureButton, DisclosurePanel } from "@headlessui/vue";
15
+ import { ScalarIconCaretDown, ScalarIconTrash } from "@scalar/icons";
16
+ import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
17
+ import { coerceValue } from "@scalar/workspace-store/schemas/typebox-coerce";
18
+ import { isObject } from "@scalar/helpers/object/is-object";
19
+ import { unpackProxyObject } from "@scalar/workspace-store/helpers/unpack-proxy";
20
+ import { objectEntries } from "@scalar/helpers/object/object-entries";
21
+ import { generateHash } from "@scalar/helpers/string/generate-hash";
22
+ import { isRelativePath } from "@scalar/helpers/url/is-relative-path";
23
+ import { makeUrlAbsolute } from "@scalar/helpers/url/make-url-absolute";
24
+ import { SecuritySchemeObjectSchema } from "@scalar/workspace-store/schemas/v3.1/strict/openapi-document";
25
+ import { Type } from "@scalar/typebox";
26
+ import { OpenIDConnectSchema } from "@scalar/workspace-store/entities/auth";
27
+ import { deepClone } from "@scalar/workspace-store/helpers/deep-clone";
28
+ import { mergeObjects } from "@scalar/workspace-store/helpers/merge-object";
29
+ //#region src/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue?vue&type=script&setup=true&lang.ts
30
+ var _hoisted_1$8 = { class: "text-c-2 mb-4 text-sm leading-normal" };
31
+ var _hoisted_2$6 = { class: "flex justify-between gap-2" };
32
+ //#endregion
33
+ //#region src/v2/blocks/scalar-auth-selector-block/components/DeleteRequestAuthModal.vue
34
+ var DeleteRequestAuthModal_default = /* @__PURE__ */ defineComponent({
35
+ __name: "DeleteRequestAuthModal",
36
+ props: {
37
+ state: {},
38
+ label: {}
39
+ },
40
+ emits: ["close", "delete"],
41
+ setup(__props, { emit: __emit }) {
42
+ const emit = __emit;
43
+ const deleteScheme = () => {
44
+ emit("delete");
45
+ };
46
+ return (_ctx, _cache) => {
47
+ return openBlock(), createBlock(unref(ScalarModal), {
48
+ size: "xxs",
49
+ state: __props.state,
50
+ title: "Delete Security Scheme"
51
+ }, {
52
+ default: withCtx(() => [createElementVNode("p", _hoisted_1$8, " This cannot be undone. You're about to delete the " + toDisplayString(__props.label) + " security scheme from the collection. ", 1), createElementVNode("div", _hoisted_2$6, [createVNode(unref(ScalarButton), {
53
+ class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",
54
+ type: "button",
55
+ variant: "outlined",
56
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("close"))
57
+ }, {
58
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Cancel ", -1)])]),
59
+ _: 1
60
+ }), createVNode(unref(ScalarButton), {
61
+ class: "flex h-8 cursor-pointer items-center gap-1.5 px-3 shadow-none focus:outline-none",
62
+ type: "submit",
63
+ onClick: deleteScheme
64
+ }, {
65
+ default: withCtx(() => [createTextVNode(" Delete " + toDisplayString(__props.label), 1)]),
66
+ _: 1
67
+ })])]),
68
+ _: 1
69
+ }, 8, ["state"]);
70
+ };
71
+ }
72
+ });
73
+ //#endregion
74
+ //#region src/v2/blocks/scalar-auth-selector-block/helpers/is-auth-optional.ts
75
+ /** Determines if the authentication is optional */
76
+ var isAuthOptional = (securityRequirements) => {
77
+ const hasComplexRequirement = securityRequirements.some((requirement) => Object.keys(requirement).length > 1);
78
+ return securityRequirements.some((requirement) => Object.keys(requirement).length === 0) && !hasComplexRequirement;
79
+ };
80
+ //#endregion
81
+ //#region src/v2/blocks/scalar-auth-selector-block/helpers/auth-options.ts
82
+ /** Predefined authentication options */
83
+ var authOptions = {
84
+ apiKeyCookie: {
85
+ label: "API Key in Cookies",
86
+ payload: {
87
+ type: "apiKey",
88
+ in: "cookie",
89
+ name: "apiKeyCookie"
90
+ }
91
+ },
92
+ apiKeyHeader: {
93
+ label: "API Key in Headers",
94
+ payload: {
95
+ type: "apiKey",
96
+ in: "header",
97
+ name: "apiKeyHeader"
98
+ }
99
+ },
100
+ apiKeyQuery: {
101
+ label: "API Key in Query Params",
102
+ payload: {
103
+ type: "apiKey",
104
+ in: "query",
105
+ name: "apiKeyQuery"
106
+ }
107
+ },
108
+ httpBasic: {
109
+ label: "HTTP Basic",
110
+ payload: {
111
+ type: "http",
112
+ scheme: "basic"
113
+ }
114
+ },
115
+ httpBearer: {
116
+ label: "HTTP Bearer",
117
+ payload: {
118
+ type: "http",
119
+ scheme: "bearer"
120
+ }
121
+ },
122
+ oauth2Implicit: {
123
+ label: "Oauth2 Implicit Flow",
124
+ payload: {
125
+ type: "oauth2",
126
+ flows: { implicit: {
127
+ authorizationUrl: "",
128
+ refreshUrl: "",
129
+ scopes: {}
130
+ } }
131
+ }
132
+ },
133
+ oauth2Password: {
134
+ label: "Oauth2 Password Flow",
135
+ payload: {
136
+ type: "oauth2",
137
+ flows: { password: {
138
+ tokenUrl: "",
139
+ refreshUrl: "",
140
+ scopes: {}
141
+ } }
142
+ }
143
+ },
144
+ oauth2ClientCredentials: {
145
+ label: "Oauth2 Client Credentials",
146
+ payload: {
147
+ type: "oauth2",
148
+ flows: { clientCredentials: {
149
+ tokenUrl: "",
150
+ refreshUrl: "",
151
+ scopes: {}
152
+ } }
153
+ }
154
+ },
155
+ oauth2AuthorizationFlow: {
156
+ label: "Oauth2 Authorization Code",
157
+ payload: {
158
+ type: "oauth2",
159
+ flows: { authorizationCode: {
160
+ authorizationUrl: "",
161
+ tokenUrl: "",
162
+ refreshUrl: "",
163
+ "x-usePkce": "no",
164
+ scopes: {}
165
+ } }
166
+ }
167
+ }
168
+ };
169
+ //#endregion
170
+ //#region src/v2/blocks/scalar-auth-selector-block/helpers/security-scheme.ts
171
+ var requirementSignature = (requirement) => JSON.stringify(Object.keys(requirement));
172
+ /**
173
+ * Format a scheme object into a display object
174
+ *
175
+ * We also add a hash to the id to ensure it is unique across
176
+ * multiple requirements of the same scheme with different scopes
177
+ */
178
+ var formatScheme = ({ name, value }) => ({
179
+ id: generateHash(JSON.stringify(value)),
180
+ label: name,
181
+ value,
182
+ isDeletable: true
183
+ });
184
+ /** Formats complex security schemes */
185
+ var formatComplexScheme = (scheme) => formatScheme({
186
+ name: Object.keys(scheme).join(" & "),
187
+ value: scheme
188
+ });
189
+ /**
190
+ * Formats a security requirement into a SecuritySchemeOption.
191
+ * Handles both simple (single key) and complex (multiple keys) auth schemes.
192
+ */
193
+ var formatSecurityRequirement = (requirement, securitySchemes) => {
194
+ const keys = Object.keys(requirement);
195
+ if (keys.length > 1) return formatComplexScheme(requirement);
196
+ if (keys[0]) {
197
+ if (!getResolvedRef(securitySchemes[keys[0]])) return;
198
+ return formatScheme({
199
+ name: keys[0],
200
+ value: requirement
201
+ });
202
+ }
203
+ };
204
+ /**
205
+ * Generates the options for the security scheme combobox
206
+ *
207
+ * Contains either a flat list, or different groups of required, available, and add new
208
+ */
209
+ var getSecuritySchemeOptions = (security, securitySchemes, selectedSchemes, canAddNewAuth = false) => {
210
+ const selectedByRequirement = new Map(selectedSchemes.map((selectedScheme) => [requirementSignature(selectedScheme), selectedScheme]));
211
+ /**
212
+ * Build required schemes formatted as options and track scheme names in a single pass.
213
+ * We use names (not full IDs) because we want to exclude any scheme that is already
214
+ * required, regardless of its specific scopes or hash.
215
+ */
216
+ const { requiredFormatted, requiredSchemeNames, existingIds } = security.reduce((acc, requirement) => {
217
+ const formatted = formatSecurityRequirement(selectedByRequirement.get(requirementSignature(requirement)) ?? requirement, securitySchemes);
218
+ if (formatted) {
219
+ acc.requiredFormatted.push(formatted);
220
+ acc.existingIds.add(formatted.id);
221
+ }
222
+ for (const name of Object.keys(requirement)) acc.requiredSchemeNames.add(name);
223
+ return acc;
224
+ }, {
225
+ requiredFormatted: [],
226
+ requiredSchemeNames: /* @__PURE__ */ new Set(),
227
+ existingIds: /* @__PURE__ */ new Set()
228
+ });
229
+ const availableFormatted = [];
230
+ for (const [name, schemeRef] of Object.entries(securitySchemes)) {
231
+ if (requiredSchemeNames.has(name)) continue;
232
+ if (getResolvedRef(schemeRef)) {
233
+ const formatted = formatScheme({
234
+ name,
235
+ value: { [name]: [] }
236
+ });
237
+ availableFormatted.push(formatted);
238
+ existingIds.add(formatted.id);
239
+ }
240
+ }
241
+ /**
242
+ * Add selected schemes to available if they do not already exist
243
+ * This ensures that selected schemes with specific scopes are always available as options
244
+ */
245
+ for (const selectedScheme of selectedSchemes) {
246
+ const formatted = formatSecurityRequirement(selectedScheme, securitySchemes);
247
+ if (formatted && !existingIds.has(formatted.id)) {
248
+ availableFormatted.push(formatted);
249
+ existingIds.add(formatted.id);
250
+ }
251
+ }
252
+ const options = [{
253
+ label: "Required authentication",
254
+ options: requiredFormatted
255
+ }, {
256
+ label: "Available authentication",
257
+ options: availableFormatted
258
+ }];
259
+ if (!canAddNewAuth) return requiredFormatted.length ? options : availableFormatted;
260
+ options.push({
261
+ label: "Add new authentication",
262
+ options: Object.entries(authOptions).map(([key, value]) => ({
263
+ id: key,
264
+ label: value.label,
265
+ value: { [key]: [] },
266
+ payload: value.payload,
267
+ isDeletable: false
268
+ }))
269
+ });
270
+ return options;
271
+ };
272
+ //#endregion
273
+ //#region src/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue?vue&type=script&setup=true&lang.ts
274
+ var _hoisted_1$7 = { class: "flex h-8 items-start gap-2 text-sm" };
275
+ var _hoisted_2$5 = { class: "flex h-8 items-start gap-2 text-sm" };
276
+ //#endregion
277
+ //#region src/v2/blocks/scalar-auth-selector-block/components/OAuthScopesAddModal.vue
278
+ var OAuthScopesAddModal_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
279
+ __name: "OAuthScopesAddModal",
280
+ props: {
281
+ state: {},
282
+ scopes: {}
283
+ },
284
+ emits: ["cancel", "submit"],
285
+ setup(__props, { emit: __emit }) {
286
+ const emit = __emit;
287
+ const scopeData = ref({
288
+ name: "",
289
+ description: ""
290
+ });
291
+ const { toast } = useToasts();
292
+ const handleSubmit = () => {
293
+ if (!scopeData.value.name) {
294
+ toast("Please fill in the name before adding a scope.", "error");
295
+ return;
296
+ }
297
+ emit("submit", scopeData.value);
298
+ __props.state.hide();
299
+ };
300
+ watch(() => __props.state.open, (isOpen) => {
301
+ if (isOpen) scopeData.value = {
302
+ name: "",
303
+ description: ""
304
+ };
305
+ });
306
+ return (_ctx, _cache) => {
307
+ return openBlock(), createBlock(unref(ScalarModal), {
308
+ size: "xs",
309
+ state: __props.state,
310
+ title: "Add Scope"
311
+ }, {
312
+ default: withCtx(() => [createVNode(CommandActionForm_default, {
313
+ disabled: !scopeData.value.name || __props.scopes.includes(scopeData.value.name),
314
+ onCancel: _cache[2] || (_cache[2] = ($event) => emit("cancel")),
315
+ onSubmit: handleSubmit
316
+ }, {
317
+ submit: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode("Add Scope", -1)])]),
318
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$7, [_cache[3] || (_cache[3] = createTextVNode(" Name: ", -1)), createVNode(CommandActionInput_default, {
319
+ modelValue: scopeData.value.name,
320
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => scopeData.value.name = $event),
321
+ autofocus: "",
322
+ class: "!p-0",
323
+ placeholder: "read:user"
324
+ }, null, 8, ["modelValue"])]), createElementVNode("div", _hoisted_2$5, [_cache[4] || (_cache[4] = createTextVNode(" Description: ", -1)), createVNode(CommandActionInput_default, {
325
+ modelValue: scopeData.value.description,
326
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => scopeData.value.description = $event),
327
+ class: "!p-0",
328
+ placeholder: "Read user data"
329
+ }, null, 8, ["modelValue"])])]),
330
+ _: 1
331
+ }, 8, ["disabled"])]),
332
+ _: 1
333
+ }, 8, ["state"]);
334
+ };
335
+ }
336
+ }), [["__scopeId", "data-v-43df1726"]]);
337
+ //#endregion
338
+ //#region src/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue?vue&type=script&setup=true&lang.ts
339
+ var _hoisted_1$6 = { class: "flex h-fit w-full" };
340
+ var _hoisted_2$4 = { class: "flex-1" };
341
+ var _hoisted_3$2 = { class: "flex items-center gap-1.75" };
342
+ var _hoisted_4$1 = {
343
+ class: "grid max-h-40 auto-rows-auto overflow-x-hidden overflow-y-scroll",
344
+ style: { gridTemplateColumns: "1fr auto" }
345
+ };
346
+ var _hoisted_5$1 = { class: "font-code text-xs" };
347
+ var _hoisted_6$1 = { key: 0 };
348
+ //#endregion
349
+ //#region src/v2/blocks/scalar-auth-selector-block/components/OAuthScopesInput.vue
350
+ var OAuthScopesInput_default = /* @__PURE__ */ defineComponent({
351
+ __name: "OAuthScopesInput",
352
+ props: {
353
+ flowType: {},
354
+ flow: {},
355
+ selectedScopes: {}
356
+ },
357
+ emits: ["update:selectedScopes"],
358
+ setup(__props, { emit: __emit }) {
359
+ const emits = __emit;
360
+ const searchQuery = ref("");
361
+ /** List of all available scopes */
362
+ const scopes = computed(() => Object.entries(__props.flow?.scopes ?? {}).map(([key, val]) => ({
363
+ id: key,
364
+ label: key,
365
+ description: val
366
+ })));
367
+ const filteredScopes = computed(() => {
368
+ if (!searchQuery.value) return scopes.value;
369
+ const regex = new RegExp(searchQuery.value.split("").map((c) => c.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join(".*"), "i");
370
+ return scopes.value.filter(({ label, description }) => regex.test(`${label} ${description}`));
371
+ });
372
+ const allScopesSelected = computed(() => __props.selectedScopes.length === Object.keys(__props.flow?.scopes ?? {}).length);
373
+ function setScope(scopeKey, checked) {
374
+ if (checked) return emits("update:selectedScopes", { scopes: Array.from(new Set([...__props.selectedScopes, scopeKey])) });
375
+ emits("update:selectedScopes", { scopes: __props.selectedScopes.filter((scope) => scope !== scopeKey) });
376
+ }
377
+ /** Select all scopes */
378
+ const selectAllScopes = () => emits("update:selectedScopes", { scopes: Object.keys(__props.flow?.scopes ?? {}) });
379
+ /** Deselect all scopes */
380
+ const deselectAllScopes = () => emits("update:selectedScopes", { scopes: [] });
381
+ const addNewScopeModal = useModal();
382
+ return (_ctx, _cache) => {
383
+ return openBlock(), createBlock(unref(DataTableCell_default), { class: "h-auto !max-h-[initial] min-h-8 items-center" }, {
384
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$6, [_cache[7] || (_cache[7] = createElementVNode("div", { class: "text-c-1 h-full items-center" }, null, -1)), createVNode(unref(Disclosure), {
385
+ as: "div",
386
+ class: "bl flex w-full flex-col"
387
+ }, {
388
+ default: withCtx(() => [createVNode(unref(DisclosureButton), { class: normalizeClass(["group/scopes-accordion hover:text-c-1 flex h-auto min-h-8 cursor-pointer items-center gap-1.5 pr-2.25 pl-3 text-left", (__props.selectedScopes.length || 0) > 0 ? "text-c-1" : "text-c-3"]) }, {
389
+ default: withCtx(({ open }) => [createElementVNode("div", _hoisted_2$4, " Scopes Selected " + toDisplayString(__props.selectedScopes.length || 0) + " / " + toDisplayString(Object.keys(__props.flow?.scopes ?? {}).length || 0), 1), createElementVNode("div", _hoisted_3$2, [
390
+ createVNode(unref(ScalarButton), {
391
+ class: "pr-0.75 pl-1 transition-none",
392
+ size: "sm",
393
+ variant: "ghost",
394
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => unref(addNewScopeModal).show(), ["stop"]))
395
+ }, {
396
+ default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" Add Scope ", -1)])]),
397
+ _: 1
398
+ }),
399
+ allScopesSelected.value ? (openBlock(), createBlock(unref(ScalarButton), {
400
+ key: 0,
401
+ class: "pr-0.75 pl-1 transition-none",
402
+ size: "sm",
403
+ variant: "ghost",
404
+ onClick: withModifiers(deselectAllScopes, ["stop"])
405
+ }, {
406
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode(" Deselect All ", -1)])]),
407
+ _: 1
408
+ })) : createCommentVNode("", true),
409
+ !allScopesSelected.value ? (openBlock(), createBlock(unref(ScalarButton), {
410
+ key: 1,
411
+ class: "pr-0.75 pl-1 transition-none",
412
+ size: "sm",
413
+ variant: "ghost",
414
+ onClick: withModifiers(selectAllScopes, ["stop"])
415
+ }, {
416
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" Select All ", -1)])]),
417
+ _: 1
418
+ })) : createCommentVNode("", true),
419
+ createVNode(unref(ScalarIcon), {
420
+ class: "text-c-3 group-hover/scopes-accordion:text-c-2",
421
+ icon: open ? "ChevronDown" : "ChevronRight",
422
+ size: "md"
423
+ }, null, 8, ["icon"])
424
+ ])]),
425
+ _: 1
426
+ }, 8, ["class"]), createVNode(unref(DisclosurePanel), { as: "template" }, {
427
+ default: withCtx(() => [createElementVNode("div", null, [createVNode(unref(ScalarSearchInput), {
428
+ modelValue: searchQuery.value,
429
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => searchQuery.value = $event),
430
+ class: "flex items-center text-xs"
431
+ }, null, 8, ["modelValue"]), createElementVNode("table", _hoisted_4$1, [(openBlock(true), createElementBlock(Fragment, null, renderList(filteredScopes.value, ({ id, label, description }) => {
432
+ return openBlock(), createBlock(unref(DataTableRow_default), {
433
+ key: id,
434
+ class: "text-c-2",
435
+ onClick: ($event) => setScope(id, !__props.selectedScopes.includes(id))
436
+ }, {
437
+ default: withCtx(() => [createVNode(unref(DataTableCell_default), { class: "no-scrollbar hover:text-c-1 box-border flex !max-h-[initial] w-full cursor-pointer items-center gap-1 overflow-x-scroll px-3 py-1.5 text-nowrap" }, {
438
+ default: withCtx(() => [
439
+ createElementVNode("span", _hoisted_5$1, toDisplayString(label), 1),
440
+ _cache[6] || (_cache[6] = createElementVNode("span", null, "–", -1)),
441
+ description ? (openBlock(), createElementBlock("span", _hoisted_6$1, toDisplayString(description), 1)) : createCommentVNode("", true)
442
+ ]),
443
+ _: 2
444
+ }, 1024), createVNode(unref(DataTableCheckbox_default), {
445
+ modelValue: __props.selectedScopes.includes(id),
446
+ "onUpdate:modelValue": ($event) => setScope(id, $event)
447
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])]),
448
+ _: 2
449
+ }, 1032, ["onClick"]);
450
+ }), 128))])])]),
451
+ _: 1
452
+ })]),
453
+ _: 1
454
+ })]), createVNode(OAuthScopesAddModal_default, {
455
+ scopes: Object.keys(__props.flow.scopes ?? {}),
456
+ state: unref(addNewScopeModal),
457
+ onSubmit: _cache[2] || (_cache[2] = (payload) => emits("update:selectedScopes", {
458
+ scopes: __props.selectedScopes,
459
+ newScopePayload: {
460
+ ...payload,
461
+ flowType: __props.flowType
462
+ }
463
+ }))
464
+ }, null, 8, ["scopes", "state"])]),
465
+ _: 1
466
+ });
467
+ };
468
+ }
469
+ });
470
+ //#endregion
471
+ //#region src/v2/blocks/scalar-auth-selector-block/helpers/oauth.ts
472
+ var getActiveServerBase = (activeServer, environmentVariables = {}) => {
473
+ const serverUrl = getServerUrl(activeServer, environmentVariables);
474
+ if (!serverUrl) return {};
475
+ if (isRelativePath(serverUrl)) return typeof window === "undefined" ? {} : { basePath: serverUrl };
476
+ return { baseUrl: serverUrl };
477
+ };
478
+ /**
479
+ * Generates a random string for PKCE code verifier
480
+ *
481
+ * @see https://www.rfc-editor.org/rfc/rfc7636#page-8
482
+ */
483
+ var generateCodeVerifier = () => {
484
+ const buffer = new Uint8Array(32);
485
+ crypto.getRandomValues(buffer);
486
+ return fromUint8Array(buffer, true);
487
+ };
488
+ /**
489
+ * Creates a code challenge from the code verifier
490
+ */
491
+ var generateCodeChallenge = async (verifier, encoding) => {
492
+ if (encoding === "plain") return verifier;
493
+ if (typeof crypto?.subtle?.digest !== "function") {
494
+ console.warn("SHA-256 is only supported when using https, using a plain text code challenge instead.");
495
+ return verifier;
496
+ }
497
+ const data = new TextEncoder().encode(verifier);
498
+ const digest = await crypto.subtle.digest("SHA-256", data);
499
+ return fromUint8Array(new Uint8Array(digest), true);
500
+ };
501
+ /**
502
+ * Authorize oauth2 flow
503
+ *
504
+ * @returns the resolved oauth2 tokens
505
+ */
506
+ var authorizeOauth2 = async (flows, type, selectedScopes, activeServer, proxyUrl, environmentVariables = {}) => {
507
+ const flow = flows[type];
508
+ try {
509
+ if (!flow) return [/* @__PURE__ */ new Error("Flow not found"), null];
510
+ const scopes = selectedScopes.join(" ");
511
+ if (type === "clientCredentials" || type === "password") return authorizeServers(flows, type, scopes, { proxyUrl }, activeServer, environmentVariables);
512
+ const state = (Math.random() + 1).toString(36).substring(2, 10);
513
+ const authorizationUrl = makeUrlAbsolute(flows[type]["x-scalar-secret-auth-url"] ?? flows[type].authorizationUrl, getActiveServerBase(activeServer, environmentVariables));
514
+ const url = new URL(authorizationUrl);
515
+ /** Special PKCE state */
516
+ let pkce = null;
517
+ if (type === "implicit") url.searchParams.set("response_type", "token");
518
+ else if (type === "authorizationCode") {
519
+ const typedFlow = flows[type];
520
+ url.searchParams.set("response_type", "code");
521
+ if (typedFlow["x-usePkce"] !== "no") {
522
+ const codeVerifier = generateCodeVerifier();
523
+ const codeChallenge = await generateCodeChallenge(codeVerifier, typedFlow["x-usePkce"]);
524
+ pkce = {
525
+ codeVerifier,
526
+ codeChallenge,
527
+ codeChallengeMethod: typedFlow["x-usePkce"] === "SHA-256" ? "S256" : "plain"
528
+ };
529
+ url.searchParams.set("code_challenge", codeChallenge);
530
+ url.searchParams.set("code_challenge_method", pkce.codeChallengeMethod);
531
+ }
532
+ }
533
+ const typedFlow = flows[type];
534
+ if (typedFlow["x-scalar-secret-redirect-uri"].startsWith("/")) {
535
+ const baseUrl = getServerUrl(activeServer, environmentVariables) || window.location.origin + window.location.pathname;
536
+ const redirectUri = new URL(typedFlow["x-scalar-secret-redirect-uri"], baseUrl).toString();
537
+ url.searchParams.set("redirect_uri", redirectUri);
538
+ } else url.searchParams.set("redirect_uri", typedFlow["x-scalar-secret-redirect-uri"]);
539
+ if (flow["x-scalar-security-query"]) Object.keys(flow["x-scalar-security-query"]).forEach((key) => {
540
+ const value = flow["x-scalar-security-query"]?.[key];
541
+ if (!value) return;
542
+ url.searchParams.set(key, value);
543
+ });
544
+ url.searchParams.set("client_id", flow["x-scalar-secret-client-id"]);
545
+ url.searchParams.set("state", state);
546
+ if (scopes) url.searchParams.set("scope", scopes);
547
+ const authWindow = window.open(url, "openAuth2Window", "left=100,top=100,width=800,height=600");
548
+ if (authWindow) return new Promise((resolve) => {
549
+ const checkWindowClosed = setInterval(() => {
550
+ let accessToken = null;
551
+ let refreshToken = null;
552
+ let code = null;
553
+ let error = null;
554
+ let errorDescription = null;
555
+ try {
556
+ const urlParams = new URL(authWindow.location.href).searchParams;
557
+ const tokenName = flow["x-tokenName"] || "access_token";
558
+ accessToken = urlParams.get(tokenName);
559
+ refreshToken = urlParams.get("refresh_token");
560
+ code = urlParams.get("code");
561
+ error = urlParams.get("error");
562
+ errorDescription = urlParams.get("error_description");
563
+ const hashParams = new URLSearchParams(authWindow.location.href.split("#")[1]);
564
+ accessToken ||= hashParams.get(tokenName);
565
+ refreshToken ||= hashParams.get("refresh_token");
566
+ code ||= hashParams.get("code");
567
+ error ||= hashParams.get("error");
568
+ errorDescription ||= hashParams.get("error_description");
569
+ } catch (_e) {}
570
+ if (authWindow.closed || accessToken || code || error) {
571
+ clearInterval(checkWindowClosed);
572
+ authWindow.close();
573
+ if (error) resolve([/* @__PURE__ */ new Error(`OAuth error: ${error}${errorDescription ? ` (${errorDescription})` : ""}`), null]);
574
+ else if (accessToken) if (authWindow.location.href.match(/state=([^&]*)/)?.[1] === state) resolve([null, {
575
+ accessToken,
576
+ ...refreshToken ? { refreshToken } : {}
577
+ }]);
578
+ else resolve([/* @__PURE__ */ new Error("State mismatch"), null]);
579
+ else if (code && type === "authorizationCode") if (new URL(authWindow.location.href).searchParams.get("state") === state) authorizeServers(flows, type, scopes, {
580
+ code,
581
+ pkce,
582
+ proxyUrl
583
+ }, activeServer, environmentVariables).then(resolve);
584
+ else resolve([/* @__PURE__ */ new Error("State mismatch"), null]);
585
+ else {
586
+ clearInterval(checkWindowClosed);
587
+ resolve([/* @__PURE__ */ new Error("Window was closed without granting authorization"), null]);
588
+ }
589
+ }
590
+ }, 200);
591
+ });
592
+ return [/* @__PURE__ */ new Error("Failed to open auth window"), null];
593
+ } catch (_) {
594
+ return [/* @__PURE__ */ new Error("Failed to authorize oauth2 flow"), null];
595
+ }
596
+ };
597
+ /**
598
+ * Makes the BE authorization call to grab the token server to server
599
+ * Used for clientCredentials and authorizationCode
600
+ */
601
+ var authorizeServers = async (flows, type, scopes, { code, pkce, proxyUrl } = {}, activeServer, environmentVariables = {}) => {
602
+ const flow = flows[type];
603
+ if (!flow) return [/* @__PURE__ */ new Error("OAuth2 flow was not defined"), null];
604
+ const formData = new URLSearchParams();
605
+ if (scopes && (type === "clientCredentials" || type === "password")) formData.set("scope", scopes);
606
+ /** Where to add the credentials */
607
+ const addCredentialsToBody = flow["x-scalar-credentials-location"] === "body";
608
+ const hasClientSecret = Boolean(flow["x-scalar-secret-client-secret"]);
609
+ if (addCredentialsToBody || type === "authorizationCode" && !hasClientSecret) formData.set("client_id", flow["x-scalar-secret-client-id"]);
610
+ if (addCredentialsToBody && hasClientSecret) formData.set("client_secret", flow["x-scalar-secret-client-secret"]);
611
+ if ("x-scalar-secret-redirect-uri" in flow && flow["x-scalar-secret-redirect-uri"]) formData.set("redirect_uri", flow["x-scalar-secret-redirect-uri"]);
612
+ if (code) {
613
+ formData.set("code", code);
614
+ formData.set("grant_type", "authorization_code");
615
+ if (pkce) formData.set("code_verifier", pkce.codeVerifier);
616
+ } else if (type === "password") {
617
+ const typedFlow = flows[type];
618
+ formData.set("grant_type", "password");
619
+ formData.set("username", typedFlow["x-scalar-secret-username"]);
620
+ formData.set("password", typedFlow["x-scalar-secret-password"]);
621
+ } else formData.set("grant_type", "client_credentials");
622
+ if (flow["x-scalar-security-body"]) Object.entries(flow["x-scalar-security-body"]).forEach(([key, value]) => {
623
+ if (value) formData.set(key, String(value));
624
+ });
625
+ try {
626
+ const headers = { "Content-Type": "application/x-www-form-urlencoded" };
627
+ if (!addCredentialsToBody && hasClientSecret) headers.Authorization = `Basic ${encode(`${flow["x-scalar-secret-client-id"]}:${flow["x-scalar-secret-client-secret"]}`)}`;
628
+ const tokenUrl = makeUrlAbsolute(flow["x-scalar-secret-token-url"] ?? flow.tokenUrl, getActiveServerBase(activeServer, environmentVariables));
629
+ const url = shouldUseProxy(proxyUrl, tokenUrl) ? `${proxyUrl}?${new URLSearchParams([["scalar_url", tokenUrl]]).toString()}` : tokenUrl;
630
+ const responseData = await (await fetch(url, {
631
+ method: "POST",
632
+ headers,
633
+ body: formData
634
+ })).json();
635
+ const accessToken = responseData[flow["x-tokenName"] || "access_token"];
636
+ const refreshToken = responseData.refresh_token;
637
+ return [null, {
638
+ accessToken,
639
+ ...typeof refreshToken === "string" ? { refreshToken } : {}
640
+ }];
641
+ } catch {
642
+ return [/* @__PURE__ */ new Error("Failed to get an access token. Please check your credentials."), null];
643
+ }
644
+ };
645
+ //#endregion
646
+ //#region src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue?vue&type=script&setup=true&lang.ts
647
+ var _hoisted_1$5 = ["for"];
648
+ //#endregion
649
+ //#region src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTableInput.vue
650
+ var RequestAuthDataTableInput_default = /* @__PURE__ */ defineComponent({
651
+ __name: "RequestAuthDataTableInput",
652
+ props: /* @__PURE__ */ mergeModels({
653
+ containerClass: {},
654
+ environment: {},
655
+ readOnly: {
656
+ type: Boolean,
657
+ default: false
658
+ },
659
+ required: {
660
+ type: Boolean,
661
+ default: false
662
+ },
663
+ type: {}
664
+ }, {
665
+ "modelValue": {
666
+ default: "",
667
+ required: true
668
+ },
669
+ "modelModifiers": {}
670
+ }),
671
+ emits: /* @__PURE__ */ mergeModels([
672
+ "inputFocus",
673
+ "inputBlur",
674
+ "selectVariable"
675
+ ], ["update:modelValue"]),
676
+ setup(__props, { emit: __emit }) {
677
+ const emit = __emit;
678
+ const modelValue = useModel(__props, "modelValue");
679
+ const id = useId();
680
+ return (_ctx, _cache) => {
681
+ return openBlock(), createBlock(unref(DataTableInput_default), mergeProps({ id: unref(id) }, _ctx.$attrs, {
682
+ modelValue: modelValue.value,
683
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
684
+ canAddCustomEnumValue: !__props.readOnly,
685
+ containerClass: __props.containerClass,
686
+ environment: __props.environment,
687
+ lineWrapping: "",
688
+ readOnly: __props.readOnly,
689
+ required: __props.required,
690
+ type: __props.type,
691
+ onInputBlur: _cache[1] || (_cache[1] = ($event) => emit("inputBlur")),
692
+ onInputFocus: _cache[2] || (_cache[2] = ($event) => emit("inputFocus")),
693
+ onSelectVariable: _cache[3] || (_cache[3] = ($event) => emit("selectVariable", $event))
694
+ }), {
695
+ default: withCtx(() => [createElementVNode("label", { for: unref(id) }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$5)]),
696
+ icon: withCtx(() => [renderSlot(_ctx.$slots, "icon")]),
697
+ _: 3
698
+ }, 16, [
699
+ "id",
700
+ "modelValue",
701
+ "canAddCustomEnumValue",
702
+ "containerClass",
703
+ "environment",
704
+ "readOnly",
705
+ "required",
706
+ "type"
707
+ ]);
708
+ };
709
+ }
710
+ });
711
+ //#endregion
712
+ //#region src/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue?vue&type=script&setup=true&lang.ts
713
+ var _hoisted_1$4 = { class: "flex h-8 items-center justify-end gap-2 border-t" };
714
+ var _hoisted_2$3 = { class: "flex h-8 w-full items-center justify-end border-t" };
715
+ //#endregion
716
+ //#region src/v2/blocks/scalar-auth-selector-block/components/OAuth2.vue
717
+ var OAuth2_default = /* @__PURE__ */ defineComponent({
718
+ __name: "OAuth2",
719
+ props: {
720
+ environment: {},
721
+ flows: {},
722
+ type: {},
723
+ selectedScopes: {},
724
+ scheme: {},
725
+ server: {},
726
+ proxyUrl: {},
727
+ name: {},
728
+ eventBus: {}
729
+ },
730
+ emits: ["update:selectedScopes"],
731
+ setup(__props, { emit: __emit }) {
732
+ const emits = __emit;
733
+ const loader = useLoadingState();
734
+ const { toast } = useToasts();
735
+ /** The current OAuth flow based on the selected type */
736
+ const flow = computed(() => __props.flows[__props.type]);
737
+ const selectedScopes = computed(() => __props.selectedScopes.filter((scope) => scope in (flow.value.scopes ?? {})));
738
+ /** Updates the security scheme base */
739
+ const handleOauth2Update = (payload) => {
740
+ if (__props.scheme.type === "openIdConnect") return handleOauth2SecretsUpdate(payload);
741
+ __props.eventBus.emit("auth:update:security-scheme", {
742
+ payload: {
743
+ type: __props.scheme.type,
744
+ flows: { [__props.type]: payload }
745
+ },
746
+ name: __props.name
747
+ });
748
+ };
749
+ /** Updates the flow secrets */
750
+ const handleOauth2SecretsUpdate = (payload) => __props.eventBus.emit("auth:update:security-scheme-secrets", {
751
+ payload: {
752
+ type: __props.scheme.type,
753
+ [__props.type]: payload
754
+ },
755
+ name: __props.name
756
+ });
757
+ /** Clears the flow secrets */
758
+ const clearOauth2Secrets = () => __props.eventBus.emit("auth:clear:security-scheme-secrets", { name: __props.name });
759
+ /** Track if we have set the redirect uri */
760
+ const hasPrefilledRedirectUri = ref(false);
761
+ /** Default the redirect-uri to the current origin if we have access to window */
762
+ watch(() => flow.value["x-scalar-secret-redirect-uri"], (newRedirectUri) => {
763
+ if (hasPrefilledRedirectUri.value || newRedirectUri || typeof window === "undefined" || !("x-scalar-secret-redirect-uri" in flow.value)) return;
764
+ hasPrefilledRedirectUri.value = true;
765
+ handleOauth2SecretsUpdate({ "x-scalar-secret-redirect-uri": window.location.origin + window.location.pathname });
766
+ }, { immediate: true });
767
+ /**
768
+ * Authorizes the user using the specified OAuth flow.
769
+ * Opens the appropriate OAuth dialog and/or performs the token exchange.
770
+ */
771
+ const handleAuthorize = async () => {
772
+ if (loader.isLoading) return;
773
+ loader.start();
774
+ const [error, tokens] = await authorizeOauth2(__props.flows, __props.type, selectedScopes.value, __props.server, __props.proxyUrl, getEnvironmentVariables(__props.environment));
775
+ await loader.clear();
776
+ if (tokens?.accessToken) handleOauth2SecretsUpdate({
777
+ "x-scalar-secret-token": tokens.accessToken,
778
+ ...tokens.refreshToken ? { "x-scalar-secret-refresh-token": tokens.refreshToken } : {}
779
+ });
780
+ else {
781
+ console.error(error);
782
+ toast(error?.message ?? "Failed to authorize", "error");
783
+ }
784
+ };
785
+ /** Updates the secret location */
786
+ const handleSecretLocationUpdate = (value) => {
787
+ const credentialsLocation = value === "body" ? "body" : "header";
788
+ if (__props.scheme.type !== "openIdConnect") handleOauth2Update({ "x-scalar-credentials-location": credentialsLocation });
789
+ handleOauth2SecretsUpdate({ "x-scalar-credentials-location": credentialsLocation });
790
+ };
791
+ return (_ctx, _cache) => {
792
+ return Boolean(flow.value["x-scalar-secret-token"]) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(DataTableRow_default), null, {
793
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
794
+ class: "border-r-transparent",
795
+ environment: __props.environment,
796
+ modelValue: flow.value["x-scalar-secret-token"],
797
+ placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
798
+ type: "password",
799
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = (v) => handleOauth2SecretsUpdate({ "x-scalar-secret-token": v }))
800
+ }, {
801
+ default: withCtx(() => [..._cache[12] || (_cache[12] = [createTextVNode(" Access Token ", -1)])]),
802
+ _: 1
803
+ }, 8, ["environment", "modelValue"])]),
804
+ _: 1
805
+ }), createVNode(unref(DataTableRow_default), { class: "min-w-full" }, {
806
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$4, [createVNode(unref(ScalarButton), {
807
+ class: "mr-1 p-0 px-2 py-0.5",
808
+ loader: unref(loader),
809
+ size: "sm",
810
+ variant: "outlined",
811
+ onClick: _cache[1] || (_cache[1] = () => handleOauth2SecretsUpdate({
812
+ "x-scalar-secret-token": "",
813
+ "x-scalar-secret-refresh-token": ""
814
+ }))
815
+ }, {
816
+ default: withCtx(() => [..._cache[13] || (_cache[13] = [createTextVNode(" Clear ", -1)])]),
817
+ _: 1
818
+ }, 8, ["loader"])])]),
819
+ _: 1
820
+ })], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
821
+ createVNode(unref(DataTableRow_default), null, {
822
+ default: withCtx(() => ["authorizationUrl" in flow.value ? (openBlock(), createBlock(RequestAuthDataTableInput_default, {
823
+ key: 0,
824
+ containerClass: "border-r-0",
825
+ environment: __props.environment,
826
+ modelValue: flow.value["x-scalar-secret-auth-url"] ?? "",
827
+ placeholder: "https://galaxy.scalar.com/authorize",
828
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = (v) => {
829
+ handleOauth2SecretsUpdate({ "x-scalar-secret-auth-url": v });
830
+ handleOauth2Update({ authorizationUrl: v });
831
+ })
832
+ }, {
833
+ default: withCtx(() => [..._cache[14] || (_cache[14] = [createTextVNode(" Auth URL ", -1)])]),
834
+ _: 1
835
+ }, 8, ["environment", "modelValue"])) : createCommentVNode("", true), "tokenUrl" in flow.value ? (openBlock(), createBlock(RequestAuthDataTableInput_default, {
836
+ key: 1,
837
+ environment: __props.environment,
838
+ modelValue: flow.value["x-scalar-secret-token-url"] ?? "",
839
+ placeholder: "https://galaxy.scalar.com/token",
840
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = (v) => {
841
+ handleOauth2SecretsUpdate({ "x-scalar-secret-token-url": v });
842
+ handleOauth2Update({ tokenUrl: v });
843
+ })
844
+ }, {
845
+ default: withCtx(() => [..._cache[15] || (_cache[15] = [createTextVNode(" Token URL ", -1)])]),
846
+ _: 1
847
+ }, 8, ["environment", "modelValue"])) : createCommentVNode("", true)]),
848
+ _: 1
849
+ }),
850
+ "x-scalar-secret-redirect-uri" in flow.value ? (openBlock(), createBlock(unref(DataTableRow_default), { key: 0 }, {
851
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
852
+ environment: __props.environment,
853
+ modelValue: flow.value["x-scalar-secret-redirect-uri"],
854
+ placeholder: "https://galaxy.scalar.com/callback",
855
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = (v) => {
856
+ handleOauth2SecretsUpdate({ "x-scalar-secret-redirect-uri": v });
857
+ })
858
+ }, {
859
+ default: withCtx(() => [..._cache[16] || (_cache[16] = [createTextVNode(" Redirect URL ", -1)])]),
860
+ _: 1
861
+ }, 8, ["environment", "modelValue"])]),
862
+ _: 1
863
+ })) : createCommentVNode("", true),
864
+ "x-scalar-secret-username" in flow.value && "x-scalar-secret-password" in flow.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createVNode(unref(DataTableRow_default), null, {
865
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
866
+ class: "text-c-2",
867
+ environment: __props.environment,
868
+ modelValue: flow.value["x-scalar-secret-username"],
869
+ placeholder: "janedoe",
870
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = (v) => handleOauth2SecretsUpdate({ "x-scalar-secret-username": v }))
871
+ }, {
872
+ default: withCtx(() => [..._cache[17] || (_cache[17] = [createTextVNode(" Username ", -1)])]),
873
+ _: 1
874
+ }, 8, ["environment", "modelValue"])]),
875
+ _: 1
876
+ }), createVNode(unref(DataTableRow_default), null, {
877
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
878
+ environment: __props.environment,
879
+ modelValue: flow.value["x-scalar-secret-password"],
880
+ placeholder: "********",
881
+ type: "password",
882
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = (v) => handleOauth2SecretsUpdate({ "x-scalar-secret-password": v }))
883
+ }, {
884
+ default: withCtx(() => [..._cache[18] || (_cache[18] = [createTextVNode(" Password ", -1)])]),
885
+ _: 1
886
+ }, 8, ["environment", "modelValue"])]),
887
+ _: 1
888
+ })], 64)) : createCommentVNode("", true),
889
+ createVNode(unref(DataTableRow_default), null, {
890
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
891
+ environment: __props.environment,
892
+ modelValue: flow.value["x-scalar-secret-client-id"],
893
+ placeholder: "12345",
894
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = (v) => handleOauth2SecretsUpdate({ "x-scalar-secret-client-id": v }))
895
+ }, {
896
+ default: withCtx(() => [..._cache[19] || (_cache[19] = [createTextVNode(" Client ID ", -1)])]),
897
+ _: 1
898
+ }, 8, ["environment", "modelValue"])]),
899
+ _: 1
900
+ }),
901
+ "x-scalar-secret-client-secret" in flow.value ? (openBlock(), createBlock(unref(DataTableRow_default), { key: 2 }, {
902
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
903
+ environment: __props.environment,
904
+ modelValue: flow.value["x-scalar-secret-client-secret"],
905
+ placeholder: "XYZ123",
906
+ type: "password",
907
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = (v) => handleOauth2SecretsUpdate({ "x-scalar-secret-client-secret": v }))
908
+ }, {
909
+ default: withCtx(() => [..._cache[20] || (_cache[20] = [createTextVNode(" Client Secret ", -1)])]),
910
+ _: 1
911
+ }, 8, ["environment", "modelValue"])]),
912
+ _: 1
913
+ })) : createCommentVNode("", true),
914
+ "x-usePkce" in flow.value ? (openBlock(), createBlock(unref(DataTableRow_default), { key: 3 }, {
915
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
916
+ enum: unref(pkceOptions),
917
+ environment: __props.environment,
918
+ modelValue: flow.value["x-usePkce"],
919
+ readOnly: "",
920
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = (v) => handleOauth2Update({ "x-usePkce": v }))
921
+ }, {
922
+ default: withCtx(() => [..._cache[21] || (_cache[21] = [createTextVNode(" Use PKCE ", -1)])]),
923
+ _: 1
924
+ }, 8, [
925
+ "enum",
926
+ "environment",
927
+ "modelValue"
928
+ ])]),
929
+ _: 1
930
+ })) : createCommentVNode("", true),
931
+ __props.type !== "implicit" ? (openBlock(), createBlock(unref(DataTableRow_default), { key: 4 }, {
932
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
933
+ enum: ["header", "body"],
934
+ environment: __props.environment,
935
+ modelValue: flow.value["x-scalar-credentials-location"] || "header",
936
+ placeholder: "header",
937
+ readOnly: "",
938
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = (v) => handleSecretLocationUpdate(v))
939
+ }, {
940
+ default: withCtx(() => [..._cache[22] || (_cache[22] = [createTextVNode(" Credentials Location ", -1)])]),
941
+ _: 1
942
+ }, 8, ["environment", "modelValue"])]),
943
+ _: 1
944
+ })) : createCommentVNode("", true),
945
+ createVNode(unref(DataTableRow_default), null, {
946
+ default: withCtx(() => [createVNode(OAuthScopesInput_default, {
947
+ flow: flow.value,
948
+ flowType: __props.type,
949
+ selectedScopes: selectedScopes.value,
950
+ "onUpdate:selectedScopes": _cache[11] || (_cache[11] = (v) => emits("update:selectedScopes", v))
951
+ }, null, 8, [
952
+ "flow",
953
+ "flowType",
954
+ "selectedScopes"
955
+ ])]),
956
+ _: 1
957
+ }),
958
+ createVNode(unref(DataTableRow_default), { class: "min-w-full" }, {
959
+ default: withCtx(() => [createElementVNode("div", _hoisted_2$3, [__props.scheme.type === "openIdConnect" ? (openBlock(), createBlock(unref(ScalarButton), {
960
+ key: 0,
961
+ class: "mr-1 p-0 px-2 py-0.5",
962
+ loader: unref(loader),
963
+ size: "sm",
964
+ variant: "outlined",
965
+ onClick: clearOauth2Secrets
966
+ }, {
967
+ default: withCtx(() => [..._cache[23] || (_cache[23] = [createTextVNode(" Clear ", -1)])]),
968
+ _: 1
969
+ }, 8, ["loader"])) : createCommentVNode("", true), createVNode(unref(ScalarButton), {
970
+ class: "mr-0.75 p-0 px-2 py-0.5",
971
+ loader: unref(loader),
972
+ size: "sm",
973
+ variant: "outlined",
974
+ onClick: handleAuthorize
975
+ }, {
976
+ default: withCtx(() => [..._cache[24] || (_cache[24] = [createTextVNode(" Authorize ", -1)])]),
977
+ _: 1
978
+ }, 8, ["loader"])])]),
979
+ _: 1
980
+ })
981
+ ], 64));
982
+ };
983
+ }
984
+ });
985
+ //#endregion
986
+ //#region src/v2/blocks/scalar-auth-selector-block/helpers/fetch-openid-connect-discovery.ts
987
+ /**
988
+ * OpenID Connect Discovery Document (subset)
989
+ * Represents the metadata fields consumed by the auth selector flow conversion.
990
+ *
991
+ * @see https://openid.net/specs/openid-connect-discovery-1_0.html
992
+ */
993
+ var OpenIDConnectDiscoverySchema = Type.Object({
994
+ authorization_endpoint: Type.Optional(Type.String()),
995
+ token_endpoint: Type.Optional(Type.String()),
996
+ scopes_supported: Type.Optional(Type.Array(Type.String())),
997
+ grant_types_supported: Type.Optional(Type.Array(Type.String())),
998
+ code_challenge_methods_supported: Type.Optional(Type.Array(Type.String()))
999
+ });
1000
+ /**
1001
+ * Fetches the OpenID Connect discovery document from the specified URL.
1002
+ * Supports both full discovery URLs and issuer URLs.
1003
+ *
1004
+ * @param url - The OpenID Connect discovery URL or issuer URL
1005
+ * @returns The discovery document or an error
1006
+ */
1007
+ var fetchOpenIDConnectDiscovery = async (url, proxyUrl) => {
1008
+ try {
1009
+ let discoveryUrl = url.trim();
1010
+ if (!discoveryUrl) return [/* @__PURE__ */ new Error("URL cannot be empty"), null];
1011
+ if (discoveryUrl.endsWith("/")) discoveryUrl = discoveryUrl.slice(0, -1);
1012
+ if (!discoveryUrl.includes("/.well-known/openid-configuration")) discoveryUrl = `${discoveryUrl}/.well-known/openid-configuration`;
1013
+ const proxiedUrl = redirectToProxy(proxyUrl, discoveryUrl);
1014
+ const response = await fetch(proxiedUrl);
1015
+ if (!response.ok) return [/* @__PURE__ */ new Error(`Failed to fetch OpenID Connect discovery document: ${response.status} ${response.statusText}`), null];
1016
+ const data = coerceValue(OpenIDConnectDiscoverySchema, await response.json());
1017
+ if (!data.authorization_endpoint && !data.token_endpoint) return [/* @__PURE__ */ new Error("Invalid OpenID Connect discovery document: missing required endpoints"), null];
1018
+ return [null, data];
1019
+ } catch (error) {
1020
+ if (error instanceof Error) return [error, null];
1021
+ return [/* @__PURE__ */ new Error("Failed to fetch OpenID Connect discovery document"), null];
1022
+ }
1023
+ };
1024
+ //#endregion
1025
+ //#region src/v2/blocks/scalar-auth-selector-block/helpers/openid-discovery-to-flows.ts
1026
+ /** Takes in an open ID Connect discovery response and converts it into an oauth flow to be used for authorization */
1027
+ var openIDDiscoveryToFlows = (discovery) => {
1028
+ const scopes = Object.fromEntries((discovery.scopes_supported ?? []).map((scope) => [scope, ""]));
1029
+ const grantTypes = new Set(discovery.grant_types_supported ?? ["authorization_code", "implicit"]);
1030
+ const authorizationUrl = discovery.authorization_endpoint;
1031
+ const tokenUrl = discovery.token_endpoint;
1032
+ const usePkce = discovery.code_challenge_methods_supported?.includes("S256") ? "SHA-256" : discovery.code_challenge_methods_supported?.includes("plain") ? "plain" : "no";
1033
+ const flows = {};
1034
+ if (grantTypes.has("implicit") && authorizationUrl) flows.implicit = {
1035
+ authorizationUrl,
1036
+ refreshUrl: authorizationUrl,
1037
+ scopes
1038
+ };
1039
+ if (grantTypes.has("password") && tokenUrl) flows.password = {
1040
+ tokenUrl,
1041
+ refreshUrl: tokenUrl,
1042
+ scopes
1043
+ };
1044
+ if (grantTypes.has("client_credentials") && tokenUrl) flows.clientCredentials = {
1045
+ tokenUrl,
1046
+ refreshUrl: tokenUrl,
1047
+ scopes
1048
+ };
1049
+ if (grantTypes.has("authorization_code") && authorizationUrl && tokenUrl) flows.authorizationCode = {
1050
+ authorizationUrl,
1051
+ tokenUrl,
1052
+ refreshUrl: tokenUrl,
1053
+ "x-usePkce": usePkce,
1054
+ scopes
1055
+ };
1056
+ return coerceValue(OpenIDConnectSchema, flows);
1057
+ };
1058
+ //#endregion
1059
+ //#region src/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue?vue&type=script&setup=true&lang.ts
1060
+ var _hoisted_1$3 = { class: "flex h-8 w-full items-center justify-end border-t" };
1061
+ //#endregion
1062
+ //#region src/v2/blocks/scalar-auth-selector-block/components/OpenIDConnect.vue
1063
+ var OpenIDConnect_default = /* @__PURE__ */ defineComponent({
1064
+ __name: "OpenIDConnect",
1065
+ props: {
1066
+ environment: {},
1067
+ eventBus: {},
1068
+ getStaticBorderClass: { type: Function },
1069
+ name: {},
1070
+ proxyUrl: {},
1071
+ scheme: {}
1072
+ },
1073
+ setup(__props) {
1074
+ const loader = useLoadingState();
1075
+ const { toast } = useToasts();
1076
+ /**
1077
+ * Fetches the OpenID Connect discovery document and triggers authorization
1078
+ */
1079
+ const handleOpenIdConnect = async () => {
1080
+ if (loader.isLoading || !__props.scheme.openIdConnectUrl) return;
1081
+ loader.start();
1082
+ const [error, _discovery] = await fetchOpenIDConnectDiscovery(__props.scheme.openIdConnectUrl, __props.proxyUrl);
1083
+ await loader.clear();
1084
+ if (error) {
1085
+ console.error(error);
1086
+ toast(error?.message ?? "Failed to fetch OpenID Connect configuration", "error");
1087
+ return;
1088
+ }
1089
+ /** Set the newly discovered params in the secret store */
1090
+ const openIdConnect = openIDDiscoveryToFlows(_discovery);
1091
+ __props.eventBus.emit("auth:update:security-scheme-secrets", {
1092
+ payload: openIdConnect,
1093
+ name: __props.name,
1094
+ overwrite: true
1095
+ });
1096
+ };
1097
+ const handleUpdateOpenIdConnectUrl = (value) => __props.eventBus.emit("auth:update:security-scheme", {
1098
+ payload: {
1099
+ type: "openIdConnect",
1100
+ openIdConnectUrl: value
1101
+ },
1102
+ name: __props.name
1103
+ });
1104
+ return (_ctx, _cache) => {
1105
+ return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(DataTableRow_default), null, {
1106
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
1107
+ containerClass: __props.getStaticBorderClass(),
1108
+ environment: __props.environment,
1109
+ modelValue: __props.scheme.openIdConnectUrl,
1110
+ placeholder: "https://example.com/.well-known/openid-configuration",
1111
+ required: "",
1112
+ "onUpdate:modelValue": handleUpdateOpenIdConnectUrl
1113
+ }, {
1114
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" Discovery URL ", -1)])]),
1115
+ _: 1
1116
+ }, 8, [
1117
+ "containerClass",
1118
+ "environment",
1119
+ "modelValue"
1120
+ ])]),
1121
+ _: 1
1122
+ }), createVNode(unref(DataTableRow_default), { class: "min-w-full" }, {
1123
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$3, [createVNode(unref(ScalarButton), {
1124
+ class: "mr-0.75 p-0 px-2 py-0.5",
1125
+ disabled: !__props.scheme.openIdConnectUrl,
1126
+ loader: unref(loader),
1127
+ size: "sm",
1128
+ variant: "outlined",
1129
+ onClick: handleOpenIdConnect
1130
+ }, {
1131
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Fetch Configuration ", -1)])]),
1132
+ _: 1
1133
+ }, 8, ["disabled", "loader"])])]),
1134
+ _: 1
1135
+ })], 64);
1136
+ };
1137
+ }
1138
+ });
1139
+ //#endregion
1140
+ //#region src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue?vue&type=script&setup=true&lang.ts
1141
+ var _hoisted_1$2 = { class: "bg-b-1 min-w-0 flex-1 px-3 py-1.25" };
1142
+ var _hoisted_2$2 = { class: "text-c-1 leading-5.5 font-medium" };
1143
+ var _hoisted_3$1 = { class: "flex min-h-8 border-t text-base" };
1144
+ var _hoisted_4 = { class: "flex h-8 max-w-full gap-2.5 overflow-x-auto px-3" };
1145
+ var _hoisted_5 = ["onClick"];
1146
+ var _hoisted_6 = { class: "relative z-10" };
1147
+ var _hoisted_7 = {
1148
+ key: 5,
1149
+ class: "text-c-3 flex items-center justify-center border-t p-4 px-4 text-center text-xs text-balance"
1150
+ };
1151
+ //#endregion
1152
+ //#region src/v2/blocks/scalar-auth-selector-block/components/RequestAuthTab.vue
1153
+ var RequestAuthTab_default = /* @__PURE__ */ defineComponent({
1154
+ __name: "RequestAuthTab",
1155
+ props: {
1156
+ environment: {},
1157
+ isStatic: { type: Boolean },
1158
+ proxyUrl: {},
1159
+ selectedSecuritySchemas: {},
1160
+ securitySchemes: {},
1161
+ server: {},
1162
+ eventBus: {}
1163
+ },
1164
+ emits: ["update:selectedScopes"],
1165
+ setup(__props, { emit: __emit }) {
1166
+ const emits = __emit;
1167
+ /**
1168
+ * Resolves security schemes from the OpenAPI document and combines them with their selected scopes.
1169
+ * Each item includes the scheme definition, name, and associated scopes.
1170
+ */
1171
+ const security = computed(() => Object.entries(__props.selectedSecuritySchemas).map(([name, scopes = []]) => ({
1172
+ scheme: getResolvedRef(__props.securitySchemes[name]),
1173
+ name,
1174
+ scopes
1175
+ })));
1176
+ /** Tracks which OAuth2 flow is currently active when multiple flows are available. */
1177
+ const activeFlow = ref("");
1178
+ /** Keeps the selected flow in sync with currently available flow keys. */
1179
+ const selectedFlow = computed(() => {
1180
+ return security.value.flatMap(({ scheme }) => {
1181
+ if (scheme?.type !== "oauth2" && scheme?.type !== "openIdConnect") return [];
1182
+ return Object.keys(scheme.flows ?? {});
1183
+ }).includes(activeFlow.value) ? activeFlow.value : "";
1184
+ });
1185
+ const setActiveFlow = (flow) => {
1186
+ activeFlow.value = flow;
1187
+ };
1188
+ /** Determines if multiple auth schemes are configured, which affects the UI layout. */
1189
+ const hasMultipleSchemes = computed(() => security.value.length > 1);
1190
+ /**
1191
+ * Generates a human-readable label for the security scheme.
1192
+ * Intentionally omits the description here — it is rendered separately as
1193
+ * rich text via ScalarMarkdownSummary so markdown formatting is preserved.
1194
+ */
1195
+ const generateLabel = (name, scheme) => {
1196
+ const capitalizedName = capitalize(name);
1197
+ switch (scheme.type) {
1198
+ case "apiKey": return `${capitalizedName}: ${scheme.in}`;
1199
+ case "openIdConnect":
1200
+ case "oauth2": {
1201
+ const firstFlow = Object.keys(scheme.flows ?? {})[0];
1202
+ const currentFlow = selectedFlow.value || firstFlow;
1203
+ if (!currentFlow) return capitalizedName;
1204
+ return `${capitalizedName}: ${currentFlow}`;
1205
+ }
1206
+ case "http": return `${capitalizedName}: ${scheme.scheme}`;
1207
+ default: return capitalizedName;
1208
+ }
1209
+ };
1210
+ /**
1211
+ * Determines if an OAuth2 flow tab should be active.
1212
+ * The first flow is active by default if no flow is explicitly selected.
1213
+ */
1214
+ const isFlowActive = (flowKey, index) => selectedFlow.value === flowKey || index === 0 && !selectedFlow.value;
1215
+ /** Computes the container class for static display mode. */
1216
+ const getStaticBorderClass = () => __props.isStatic && "border-t";
1217
+ const handleHttpSecretsUpdate = (payload, name) => __props.eventBus.emit("auth:update:security-scheme-secrets", {
1218
+ payload: {
1219
+ type: "http",
1220
+ ...payload
1221
+ },
1222
+ name
1223
+ });
1224
+ const handleApiKeySecretsUpdate = (payload, name) => __props.eventBus.emit("auth:update:security-scheme-secrets", {
1225
+ payload: {
1226
+ type: "apiKey",
1227
+ ...payload
1228
+ },
1229
+ name
1230
+ });
1231
+ const handleApiKeySecuritySchemeUpdate = (payload, name) => __props.eventBus.emit("auth:update:security-scheme", {
1232
+ payload: {
1233
+ type: "apiKey",
1234
+ ...payload
1235
+ },
1236
+ name
1237
+ });
1238
+ /** Handles scope selection updates for OAuth2 */
1239
+ const handleScopesUpdate = (name, event) => {
1240
+ emits("update:selectedScopes", {
1241
+ id: Object.keys(__props.selectedSecuritySchemas),
1242
+ name,
1243
+ ...event
1244
+ });
1245
+ };
1246
+ /**
1247
+ * Computes dynamic classes for OAuth2 flow tabs based on active state.
1248
+ */
1249
+ const getFlowTabClasses = (flowKey, index) => {
1250
+ const baseClasses = "floating-bg text-c-3 relative cursor-pointer border-b border-transparent py-1 text-base font-medium";
1251
+ return isFlowActive(flowKey, index) ? `${baseClasses} !text-c-1 !rounded-none border-b !border-current ${__props.isStatic ? "opacity-100" : ""}` : baseClasses;
1252
+ };
1253
+ return (_ctx, _cache) => {
1254
+ return openBlock(true), createElementBlock(Fragment, null, renderList(security.value, ({ scheme, name, scopes }) => {
1255
+ return openBlock(), createElementBlock(Fragment, { key: name }, [
1256
+ hasMultipleSchemes.value && scheme ? (openBlock(), createBlock(unref(DataTableRow_default$1), { key: 0 }, {
1257
+ default: withCtx(() => [createVNode(unref(DataTableCell_default$1), {
1258
+ "aria-label": generateLabel(name, scheme),
1259
+ class: "max-h-[auto]"
1260
+ }, {
1261
+ default: withCtx(() => [createElementVNode("div", _hoisted_1$2, [createElementVNode("p", _hoisted_2$2, toDisplayString(generateLabel(name, scheme)), 1), scheme.description ? (openBlock(), createBlock(unref(ScalarMarkdownSummary), {
1262
+ key: 0,
1263
+ class: "auth-description text-c-2 w-full",
1264
+ value: scheme.description
1265
+ }, null, 8, ["value"])) : createCommentVNode("", true)])]),
1266
+ _: 2
1267
+ }, 1032, ["aria-label"])]),
1268
+ _: 2
1269
+ }, 1024)) : createCommentVNode("", true),
1270
+ scheme?.description && !hasMultipleSchemes.value ? (openBlock(), createBlock(unref(DataTableRow_default$1), { key: 1 }, {
1271
+ default: withCtx(() => [createVNode(unref(DataTableCell_default$1), {
1272
+ "aria-label": scheme.description,
1273
+ class: "max-h-[auto]"
1274
+ }, {
1275
+ default: withCtx(() => [createVNode(unref(ScalarMarkdownSummary), {
1276
+ class: "auth-description bg-b-1 text-c-2 min-w-0 flex-1 px-3 py-1.25",
1277
+ value: scheme.description
1278
+ }, null, 8, ["value"])]),
1279
+ _: 2
1280
+ }, 1032, ["aria-label"])]),
1281
+ _: 2
1282
+ }, 1024)) : createCommentVNode("", true),
1283
+ scheme?.type === "http" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [scheme.scheme === "bearer" ? (openBlock(), createBlock(unref(DataTableRow_default$1), { key: 0 }, {
1284
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
1285
+ containerClass: getStaticBorderClass(),
1286
+ environment: __props.environment,
1287
+ modelValue: scheme["x-scalar-secret-token"],
1288
+ placeholder: "Token",
1289
+ type: "password",
1290
+ "onUpdate:modelValue": (v) => handleHttpSecretsUpdate({ "x-scalar-secret-token": v }, name)
1291
+ }, {
1292
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" Bearer Token ", -1)])]),
1293
+ _: 1
1294
+ }, 8, [
1295
+ "containerClass",
1296
+ "environment",
1297
+ "modelValue",
1298
+ "onUpdate:modelValue"
1299
+ ])]),
1300
+ _: 2
1301
+ }, 1024)) : scheme?.scheme === "basic" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createVNode(unref(DataTableRow_default$1), null, {
1302
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
1303
+ class: "text-c-2",
1304
+ environment: __props.environment,
1305
+ modelValue: scheme["x-scalar-secret-username"],
1306
+ placeholder: "janedoe",
1307
+ required: "",
1308
+ "onUpdate:modelValue": (v) => handleHttpSecretsUpdate({ "x-scalar-secret-username": v }, name)
1309
+ }, {
1310
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" Username ", -1)])]),
1311
+ _: 1
1312
+ }, 8, [
1313
+ "environment",
1314
+ "modelValue",
1315
+ "onUpdate:modelValue"
1316
+ ])]),
1317
+ _: 2
1318
+ }, 1024), createVNode(unref(DataTableRow_default$1), null, {
1319
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
1320
+ environment: __props.environment,
1321
+ modelValue: scheme["x-scalar-secret-password"],
1322
+ placeholder: "********",
1323
+ type: "password",
1324
+ "onUpdate:modelValue": (v) => handleHttpSecretsUpdate({ "x-scalar-secret-password": v }, name)
1325
+ }, {
1326
+ default: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode(" Password ", -1)])]),
1327
+ _: 1
1328
+ }, 8, [
1329
+ "environment",
1330
+ "modelValue",
1331
+ "onUpdate:modelValue"
1332
+ ])]),
1333
+ _: 2
1334
+ }, 1024)], 64)) : createCommentVNode("", true)], 64)) : scheme?.type === "apiKey" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [createVNode(unref(DataTableRow_default$1), null, {
1335
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
1336
+ containerClass: getStaticBorderClass(),
1337
+ environment: __props.environment,
1338
+ modelValue: scheme.name,
1339
+ placeholder: "api-key",
1340
+ "onUpdate:modelValue": (v) => handleApiKeySecuritySchemeUpdate({ name: v }, name)
1341
+ }, {
1342
+ default: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" Name ", -1)])]),
1343
+ _: 1
1344
+ }, 8, [
1345
+ "containerClass",
1346
+ "environment",
1347
+ "modelValue",
1348
+ "onUpdate:modelValue"
1349
+ ])]),
1350
+ _: 2
1351
+ }, 1024), createVNode(unref(DataTableRow_default$1), null, {
1352
+ default: withCtx(() => [createVNode(RequestAuthDataTableInput_default, {
1353
+ environment: __props.environment,
1354
+ modelValue: scheme["x-scalar-secret-token"],
1355
+ placeholder: "QUxMIFlPVVIgQkFTRSBBUkUgQkVMT05HIFRPIFVT",
1356
+ type: "password",
1357
+ "onUpdate:modelValue": (v) => handleApiKeySecretsUpdate({ "x-scalar-secret-token": v }, name)
1358
+ }, {
1359
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode(" Value ", -1)])]),
1360
+ _: 1
1361
+ }, 8, [
1362
+ "environment",
1363
+ "modelValue",
1364
+ "onUpdate:modelValue"
1365
+ ])]),
1366
+ _: 2
1367
+ }, 1024)], 64)) : scheme?.type === "oauth2" || scheme?.type === "openIdConnect" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
1368
+ scheme?.type === "openIdConnect" && !Object.keys(scheme.flows ?? {}).length ? (openBlock(), createBlock(OpenIDConnect_default, {
1369
+ key: 0,
1370
+ environment: __props.environment,
1371
+ eventBus: __props.eventBus,
1372
+ getStaticBorderClass,
1373
+ name,
1374
+ proxyUrl: __props.proxyUrl,
1375
+ scheme
1376
+ }, null, 8, [
1377
+ "environment",
1378
+ "eventBus",
1379
+ "name",
1380
+ "proxyUrl",
1381
+ "scheme"
1382
+ ])) : createCommentVNode("", true),
1383
+ Object.keys(scheme.flows ?? {}).length > 1 ? (openBlock(), createBlock(unref(DataTableRow_default$1), { key: 1 }, {
1384
+ default: withCtx(() => [createElementVNode("div", _hoisted_3$1, [createElementVNode("div", _hoisted_4, [(openBlock(true), createElementBlock(Fragment, null, renderList(scheme.flows, (_, key, ind) => {
1385
+ return openBlock(), createElementBlock("button", {
1386
+ key,
1387
+ class: normalizeClass(getFlowTabClasses(key, ind)),
1388
+ type: "button",
1389
+ onClick: ($event) => setActiveFlow(key)
1390
+ }, [createElementVNode("span", _hoisted_6, toDisplayString(key), 1)], 10, _hoisted_5);
1391
+ }), 128))])])]),
1392
+ _: 2
1393
+ }, 1024)) : createCommentVNode("", true),
1394
+ (openBlock(true), createElementBlock(Fragment, null, renderList(scheme.flows, (_flow, key, ind) => {
1395
+ return openBlock(), createElementBlock(Fragment, { key }, [scheme.flows && isFlowActive(key, ind) ? (openBlock(), createBlock(OAuth2_default, {
1396
+ key: 0,
1397
+ environment: __props.environment,
1398
+ eventBus: __props.eventBus,
1399
+ flows: scheme.flows,
1400
+ name,
1401
+ proxyUrl: __props.proxyUrl,
1402
+ scheme,
1403
+ selectedScopes: scopes,
1404
+ server: __props.server,
1405
+ type: key,
1406
+ "onUpdate:selectedScopes": (event) => handleScopesUpdate(name, event)
1407
+ }, null, 8, [
1408
+ "environment",
1409
+ "eventBus",
1410
+ "flows",
1411
+ "name",
1412
+ "proxyUrl",
1413
+ "scheme",
1414
+ "selectedScopes",
1415
+ "server",
1416
+ "type",
1417
+ "onUpdate:selectedScopes"
1418
+ ])) : createCommentVNode("", true)], 64);
1419
+ }), 128))
1420
+ ], 64)) : (openBlock(), createElementBlock("div", _hoisted_7, " The security scheme is missing a type, please double check your OpenAPI document or Authentication Configuration "))
1421
+ ], 64);
1422
+ }), 128);
1423
+ };
1424
+ }
1425
+ });
1426
+ //#endregion
1427
+ //#region src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue?vue&type=script&setup=true&lang.ts
1428
+ var _hoisted_1$1 = ["onClick"];
1429
+ var _hoisted_2$1 = { class: "relative z-10 font-medium whitespace-nowrap" };
1430
+ var _hoisted_3 = {
1431
+ key: 0,
1432
+ class: "absolute inset-x-1 bottom-[var(--scalar-border-width)] left-1/2 z-1 h-px w-full -translate-x-1/2 bg-current"
1433
+ };
1434
+ //#endregion
1435
+ //#region src/v2/blocks/scalar-auth-selector-block/components/RequestAuthDataTable.vue
1436
+ var RequestAuthDataTable_default = /* @__PURE__ */ defineComponent({
1437
+ __name: "RequestAuthDataTable",
1438
+ props: {
1439
+ environment: {},
1440
+ isStatic: { type: Boolean },
1441
+ selectedSchemeOptions: {},
1442
+ activeAuthIndex: {},
1443
+ proxyUrl: {},
1444
+ securitySchemes: { default: () => ({}) },
1445
+ server: {},
1446
+ eventBus: {},
1447
+ meta: {}
1448
+ },
1449
+ setup(__props, { expose: __expose }) {
1450
+ /** Currently selected authentication scheme based on the active tab index */
1451
+ const activeScheme = computed(() => __props.selectedSchemeOptions[__props.activeAuthIndex]);
1452
+ /**
1453
+ * Whether to display multiple authentication tabs.
1454
+ * Only shows tabs when there are 2 or more schemes available.
1455
+ */
1456
+ const shouldShowTabs = computed(() => __props.selectedSchemeOptions.length > 1);
1457
+ /** Handles authentication tab selection */
1458
+ const handleTabChange = (index) => __props.eventBus.emit("auth:update:active-index", {
1459
+ index,
1460
+ meta: __props.meta
1461
+ });
1462
+ /** Handles updates to OAuth scope selection */
1463
+ const handleScopesUpdate = (params) => __props.eventBus.emit("auth:update:selected-scopes", {
1464
+ ...params,
1465
+ meta: __props.meta
1466
+ });
1467
+ /** Determines if a tab is currently active */
1468
+ const isTabActive = (index) => __props.activeAuthIndex === index;
1469
+ /** Expose the active scheme for parent component access */
1470
+ __expose({ activeScheme });
1471
+ return (_ctx, _cache) => {
1472
+ return openBlock(), createElementBlock("form", { onSubmit: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"])) }, [shouldShowTabs.value ? (openBlock(), createElementBlock("div", {
1473
+ key: 0,
1474
+ class: normalizeClass(["box-content flex flex-wrap gap-x-2.5 overflow-hidden border border-b-0 px-3", { "border-x-0": !__props.isStatic }]),
1475
+ "data-testid": "auth-tabs"
1476
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.selectedSchemeOptions, (option, index) => {
1477
+ return openBlock(), createElementBlock("div", {
1478
+ key: option.id,
1479
+ class: "relative z-1 -mb-[var(--scalar-border-width)] flex h-8"
1480
+ }, [createElementVNode("button", {
1481
+ class: normalizeClass(["floating-bg relative cursor-pointer border-b border-transparent py-1 text-sm font-medium transition-colors", isTabActive(index) ? "text-c-1" : "text-c-3"]),
1482
+ type: "button",
1483
+ onClick: ($event) => handleTabChange(index)
1484
+ }, [createElementVNode("span", _hoisted_2$1, toDisplayString(option.label), 1)], 10, _hoisted_1$1), isTabActive(index) ? (openBlock(), createElementBlock("div", _hoisted_3)) : createCommentVNode("", true)]);
1485
+ }), 128))], 2)) : createCommentVNode("", true), activeScheme.value ? (openBlock(), createBlock(unref(DataTable_default), {
1486
+ key: 1,
1487
+ class: normalizeClass(["flex-1", { "bg-b-1 rounded-b-lg border border-t-0": __props.isStatic }]),
1488
+ columns: [""],
1489
+ presentational: ""
1490
+ }, {
1491
+ default: withCtx(() => [createVNode(RequestAuthTab_default, {
1492
+ environment: __props.environment,
1493
+ eventBus: __props.eventBus,
1494
+ isStatic: __props.isStatic,
1495
+ proxyUrl: __props.proxyUrl,
1496
+ securitySchemes: __props.securitySchemes,
1497
+ selectedSecuritySchemas: activeScheme.value.value,
1498
+ server: __props.server,
1499
+ "onUpdate:selectedScopes": handleScopesUpdate
1500
+ }, null, 8, [
1501
+ "environment",
1502
+ "eventBus",
1503
+ "isStatic",
1504
+ "proxyUrl",
1505
+ "securitySchemes",
1506
+ "selectedSecuritySchemas",
1507
+ "server"
1508
+ ])]),
1509
+ _: 1
1510
+ }, 8, ["class"])) : (openBlock(), createElementBlock("div", {
1511
+ key: 2,
1512
+ class: normalizeClass(["bg-b-1 text-c-3 flex min-h-16 items-center justify-center border-t px-4 text-sm", { "min-h-[calc(4rem+0.5px)] rounded-b-lg border": __props.isStatic }])
1513
+ }, " No authentication selected ", 2))], 32);
1514
+ };
1515
+ }
1516
+ });
1517
+ //#endregion
1518
+ //#region src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue?vue&type=script&setup=true&lang.ts
1519
+ var _hoisted_1 = ["id"];
1520
+ var _hoisted_2 = { class: "min-w-0 flex-1 truncate" };
1521
+ //#endregion
1522
+ //#region src/v2/blocks/scalar-auth-selector-block/components/AuthSelector.vue
1523
+ var AuthSelector_default = /* @__PURE__ */ defineComponent({
1524
+ __name: "AuthSelector",
1525
+ props: {
1526
+ environment: {},
1527
+ eventBus: {},
1528
+ createAnySecurityScheme: {
1529
+ type: Boolean,
1530
+ default: false
1531
+ },
1532
+ defaultOpen: {
1533
+ type: Boolean,
1534
+ default: true
1535
+ },
1536
+ isStatic: {
1537
+ type: Boolean,
1538
+ default: false
1539
+ },
1540
+ meta: {},
1541
+ proxyUrl: {},
1542
+ securityRequirements: {},
1543
+ securitySchemes: {},
1544
+ selectedSecurity: {},
1545
+ server: {},
1546
+ title: {}
1547
+ },
1548
+ setup(__props, { expose: __expose }) {
1549
+ const titleId = useId();
1550
+ const comboboxButtonRef = ref(null);
1551
+ const isDisclosureOpen = ref(false);
1552
+ const deleteModal = useModal();
1553
+ const schemeToDelete = ref(null);
1554
+ /**
1555
+ * Determines if authentication is required or optional
1556
+ *
1557
+ * Auth is optional when there is an empty security requirement and no complex requirements.
1558
+ * Complex requirements have multiple auth schemes combined (e.g., API key + OAuth).
1559
+ */
1560
+ const authIndicator = computed(() => {
1561
+ if (!__props.securityRequirements?.length) return null;
1562
+ const isOptional = isAuthOptional(__props.securityRequirements);
1563
+ return {
1564
+ icon: isOptional ? "Unlock" : "Lock",
1565
+ text: isOptional ? "Optional" : "Required"
1566
+ };
1567
+ });
1568
+ /** All available auth scheme options for the dropdown */
1569
+ const availableSchemeOptions = computed(() => getSecuritySchemeOptions(__props.securityRequirements ?? [], __props.securitySchemes ?? {}, __props.selectedSecurity?.selectedSchemes ?? [], __props.createAnySecurityScheme));
1570
+ /** Currently active auth schemes selected for this operation or collection */
1571
+ const activeSchemeOptions = computed(() => {
1572
+ const schemes = __props.selectedSecurity?.selectedSchemes;
1573
+ if (!schemes?.length) return [];
1574
+ return schemes.flatMap((requirement) => {
1575
+ const schemeNames = Object.keys(requirement);
1576
+ if (schemeNames.length === 0) return [];
1577
+ if (schemeNames.length > 1) return formatComplexScheme(requirement);
1578
+ const schemeName = schemeNames[0];
1579
+ if (!schemeName) return [];
1580
+ if (!getResolvedRef(__props.securitySchemes?.[schemeName])) return [];
1581
+ return formatScheme({
1582
+ name: schemeName,
1583
+ value: requirement
1584
+ });
1585
+ });
1586
+ });
1587
+ /**
1588
+ * Opens the combobox dropdown when clicking the auth indicator badge.
1589
+ * Prevents the disclosure from toggling if it is already open.
1590
+ */
1591
+ const handleAuthIndicatorClick = (event) => {
1592
+ if (isDisclosureOpen.value) event.stopPropagation();
1593
+ comboboxButtonRef.value?.$el.click();
1594
+ };
1595
+ /**
1596
+ * Updates the selected auth schemes.
1597
+ * Separates existing schemes from newly created ones for the event payload.
1598
+ */
1599
+ const handleSchemeSelection = (selected) => {
1600
+ const existingSchemes = selected.filter((option) => option.payload === void 0).map((option) => unpackProxyObject(option.value, { depth: 2 }));
1601
+ const newSchemes = selected.filter((option) => option.payload !== void 0).map((option) => ({
1602
+ name: option.label,
1603
+ scheme: option.payload
1604
+ }));
1605
+ __props.eventBus.emit("auth:update:selected-security-schemes", {
1606
+ selectedRequirements: existingSchemes,
1607
+ newSchemes,
1608
+ meta: __props.meta
1609
+ });
1610
+ };
1611
+ /** Shows the delete confirmation modal for the selected scheme */
1612
+ const handleDeleteRequest = (option) => {
1613
+ schemeToDelete.value = {
1614
+ label: option.label,
1615
+ payload: option.value
1616
+ };
1617
+ deleteModal.show();
1618
+ };
1619
+ /** Deletes the selected auth scheme after confirmation */
1620
+ const handleDeleteConfirm = () => {
1621
+ if (!schemeToDelete.value) return;
1622
+ __props.eventBus.emit("auth:delete:security-scheme", { names: Object.keys(schemeToDelete.value.payload) });
1623
+ schemeToDelete.value = null;
1624
+ deleteModal.hide();
1625
+ };
1626
+ __expose({
1627
+ authIndicator,
1628
+ selectedSchemeOptions: activeSchemeOptions,
1629
+ schemeOptions: availableSchemeOptions
1630
+ });
1631
+ return (_ctx, _cache) => {
1632
+ return openBlock(), createBlock(unref(CollapsibleSection_default), {
1633
+ class: "group/params relative",
1634
+ defaultOpen: __props.defaultOpen,
1635
+ isStatic: __props.isStatic,
1636
+ itemCount: activeSchemeOptions.value.length,
1637
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = (open) => isDisclosureOpen.value = open)
1638
+ }, {
1639
+ title: withCtx(() => [createElementVNode("div", {
1640
+ id: unref(titleId),
1641
+ class: "inline-flex items-center gap-0.5 leading-[20px]"
1642
+ }, [createElementVNode("span", null, toDisplayString(__props.title), 1), authIndicator.value ? (openBlock(), createElementBlock("span", {
1643
+ key: 0,
1644
+ class: normalizeClass(["text-c-3 hover:bg-b-3 hover:text-c-1 -my-0.5 -mr-1 cursor-pointer rounded px-1 py-0.5 leading-[normal] font-normal", { "text-c-1": authIndicator.value.text === "Required" }]),
1645
+ "data-testid": "auth-indicator",
1646
+ onClick: handleAuthIndicatorClick
1647
+ }, toDisplayString(authIndicator.value.text), 3)) : createCommentVNode("", true)], 8, _hoisted_1)]),
1648
+ actions: withCtx(() => [createVNode(unref(ScalarComboboxMultiselect), {
1649
+ class: "w-72 text-xs",
1650
+ modelValue: activeSchemeOptions.value,
1651
+ multiple: "",
1652
+ options: availableSchemeOptions.value,
1653
+ placement: "bottom-end",
1654
+ teleport: "",
1655
+ onDelete: handleDeleteRequest,
1656
+ "onUpdate:modelValue": handleSchemeSelection
1657
+ }, {
1658
+ option: withCtx(({ option, selected }) => [
1659
+ createVNode(unref(ScalarListboxCheckbox), {
1660
+ multiselect: "",
1661
+ selected
1662
+ }, null, 8, ["selected"]),
1663
+ createElementVNode("div", _hoisted_2, toDisplayString(option.label), 1),
1664
+ option.isDeletable ? (openBlock(), createBlock(unref(ScalarIconButton), {
1665
+ key: 0,
1666
+ class: "-m-0.5 shrink-0 p-0.5 opacity-0 group-hover/item:opacity-100",
1667
+ icon: unref(ScalarIconTrash),
1668
+ label: `Delete ${option.label}`,
1669
+ size: "xs",
1670
+ onClick: withModifiers(($event) => handleDeleteRequest(option), ["stop"])
1671
+ }, null, 8, [
1672
+ "icon",
1673
+ "label",
1674
+ "onClick"
1675
+ ])) : createCommentVNode("", true)
1676
+ ]),
1677
+ default: withCtx(() => [createVNode(unref(ScalarButton), {
1678
+ ref_key: "comboboxButtonRef",
1679
+ ref: comboboxButtonRef,
1680
+ "aria-describedby": unref(titleId),
1681
+ class: "group/combobox-button hover:text-c-1 text-c-2 flex h-fit w-full items-center gap-1 px-0.75 py-0.25 text-base font-normal",
1682
+ variant: "ghost"
1683
+ }, {
1684
+ default: withCtx(() => [activeSchemeOptions.value.length === 1 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "sr-only" }, "Selected Auth Type:", -1)), createTextVNode(" " + toDisplayString(activeSchemeOptions.value[0]?.label), 1)], 64)) : activeSchemeOptions.value.length > 1 ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [_cache[3] || (_cache[3] = createTextVNode(" Multiple ", -1)), _cache[4] || (_cache[4] = createElementVNode("span", { class: "sr-only" }, "Auth Types Selected", -1))], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [_cache[5] || (_cache[5] = createElementVNode("span", { class: "sr-only" }, "Select", -1)), _cache[6] || (_cache[6] = createTextVNode(" Auth Type ", -1))], 64)), createVNode(unref(ScalarIconCaretDown), {
1685
+ class: "size-3 shrink-0 transition-transform duration-100 group-aria-expanded/combobox-button:rotate-180",
1686
+ weight: "bold"
1687
+ })]),
1688
+ _: 1
1689
+ }, 8, ["aria-describedby"])]),
1690
+ _: 1
1691
+ }, 8, ["modelValue", "options"])]),
1692
+ default: withCtx(() => [createVNode(RequestAuthDataTable_default, {
1693
+ activeAuthIndex: __props.selectedSecurity?.selectedIndex ?? 0,
1694
+ environment: __props.environment,
1695
+ eventBus: __props.eventBus,
1696
+ isStatic: __props.isStatic,
1697
+ meta: __props.meta,
1698
+ proxyUrl: __props.proxyUrl,
1699
+ securitySchemes: __props.securitySchemes,
1700
+ selectedSchemeOptions: activeSchemeOptions.value,
1701
+ server: __props.server
1702
+ }, null, 8, [
1703
+ "activeAuthIndex",
1704
+ "environment",
1705
+ "eventBus",
1706
+ "isStatic",
1707
+ "meta",
1708
+ "proxyUrl",
1709
+ "securitySchemes",
1710
+ "selectedSchemeOptions",
1711
+ "server"
1712
+ ]), schemeToDelete.value ? (openBlock(), createBlock(DeleteRequestAuthModal_default, {
1713
+ key: 0,
1714
+ label: schemeToDelete.value.label,
1715
+ scheme: schemeToDelete.value,
1716
+ state: unref(deleteModal),
1717
+ onClose: _cache[0] || (_cache[0] = ($event) => unref(deleteModal).hide()),
1718
+ onDelete: handleDeleteConfirm
1719
+ }, null, 8, [
1720
+ "label",
1721
+ "scheme",
1722
+ "state"
1723
+ ])) : createCommentVNode("", true)]),
1724
+ _: 1
1725
+ }, 8, [
1726
+ "defaultOpen",
1727
+ "isStatic",
1728
+ "itemCount"
1729
+ ]);
1730
+ };
1731
+ }
1732
+ });
1733
+ //#endregion
1734
+ //#region src/v2/blocks/scalar-auth-selector-block/helpers/extract-security-scheme-secrets.ts
1735
+ /**
1736
+ * Maps x-scalar-secret fields to their corresponding input field names.
1737
+ * This allows us to fall back to config values when auth store secrets are not available.
1738
+ */
1739
+ var SECRET_TO_INPUT_FIELD_MAP = {
1740
+ "x-scalar-secret-client-id": "x-scalar-client-id",
1741
+ "x-scalar-secret-client-secret": "clientSecret",
1742
+ "x-scalar-secret-password": "password",
1743
+ "x-scalar-secret-redirect-uri": "x-scalar-redirect-uri",
1744
+ "x-scalar-secret-token": "token",
1745
+ "x-scalar-secret-username": "username",
1746
+ "x-scalar-secret-auth-url": "authorizationUrl",
1747
+ "x-scalar-secret-token-url": "tokenUrl"
1748
+ };
1749
+ var mergeFlowSecrets = (properties, configSecrets, authStoreSecrets = {}) => Object.fromEntries(properties.map((property) => {
1750
+ return [property, authStoreSecrets[property] || configSecrets[property] || configSecrets[SECRET_TO_INPUT_FIELD_MAP[property]] || ""];
1751
+ }));
1752
+ var extractRefreshTokenSecret = (authStoreSecrets = {}) => {
1753
+ const refreshToken = authStoreSecrets["x-scalar-secret-refresh-token"];
1754
+ if (typeof refreshToken === "string") return { "x-scalar-secret-refresh-token": refreshToken };
1755
+ return {};
1756
+ };
1757
+ var extractCredentialsLocation = (configSecrets, authStoreSecrets = {}) => {
1758
+ const credentialsLocation = authStoreSecrets["x-scalar-credentials-location"] ?? configSecrets["x-scalar-credentials-location"];
1759
+ return credentialsLocation ? { "x-scalar-credentials-location": credentialsLocation } : {};
1760
+ };
1761
+ /**
1762
+ * Extract flow secrets and selected scopes for OAuth-like flows.
1763
+ * Reused by both oauth2 and openIdConnect security schemes.
1764
+ */
1765
+ var extractOAuthFlowSecrets = (flows, storeSecrets) => {
1766
+ const selectedScopes = /* @__PURE__ */ new Set();
1767
+ return {
1768
+ flows: objectEntries(flows ?? {}).reduce((acc, [key, flow]) => {
1769
+ if (!isObject(flow)) return acc;
1770
+ const flowSelectedScopes = flow["selectedScopes"];
1771
+ if (Array.isArray(flowSelectedScopes)) flowSelectedScopes.forEach((scope) => typeof scope === "string" && selectedScopes.add(scope));
1772
+ if (key === "implicit") acc.implicit = {
1773
+ ...flow,
1774
+ ...mergeFlowSecrets([
1775
+ "x-scalar-secret-client-id",
1776
+ "x-scalar-secret-redirect-uri",
1777
+ "x-scalar-secret-token",
1778
+ "x-scalar-secret-auth-url"
1779
+ ], flow, storeSecrets?.implicit),
1780
+ ...extractRefreshTokenSecret(storeSecrets?.implicit)
1781
+ };
1782
+ if (key === "password") acc[key] = {
1783
+ ...flow,
1784
+ ...mergeFlowSecrets([
1785
+ "x-scalar-secret-client-id",
1786
+ "x-scalar-secret-client-secret",
1787
+ "x-scalar-secret-username",
1788
+ "x-scalar-secret-password",
1789
+ "x-scalar-secret-token",
1790
+ "x-scalar-secret-token-url"
1791
+ ], flow, storeSecrets?.password),
1792
+ ...extractCredentialsLocation(flow, storeSecrets?.password),
1793
+ ...extractRefreshTokenSecret(storeSecrets?.password)
1794
+ };
1795
+ if (key === "clientCredentials") acc[key] = {
1796
+ ...flow,
1797
+ ...mergeFlowSecrets([
1798
+ "x-scalar-secret-client-id",
1799
+ "x-scalar-secret-client-secret",
1800
+ "x-scalar-secret-token",
1801
+ "x-scalar-secret-token-url"
1802
+ ], flow, storeSecrets?.clientCredentials),
1803
+ ...extractCredentialsLocation(flow, storeSecrets?.clientCredentials),
1804
+ ...extractRefreshTokenSecret(storeSecrets?.clientCredentials)
1805
+ };
1806
+ if (key === "authorizationCode") acc[key] = {
1807
+ ...flow,
1808
+ ...mergeFlowSecrets([
1809
+ "x-scalar-secret-client-id",
1810
+ "x-scalar-secret-client-secret",
1811
+ "x-scalar-secret-redirect-uri",
1812
+ "x-scalar-secret-token",
1813
+ "x-scalar-secret-auth-url",
1814
+ "x-scalar-secret-token-url"
1815
+ ], flow, storeSecrets?.authorizationCode),
1816
+ ...extractCredentialsLocation(flow, storeSecrets?.authorizationCode),
1817
+ ...extractRefreshTokenSecret(storeSecrets?.authorizationCode)
1818
+ };
1819
+ return acc;
1820
+ }, {}),
1821
+ selectedScopes: Array.from(selectedScopes)
1822
+ };
1823
+ };
1824
+ /** Extract the secrets from the config and the auth store */
1825
+ var extractSecuritySchemeSecrets = (scheme, authStore, name, documentSlug) => {
1826
+ const secrets = authStore.getAuthSecrets(documentSlug, name);
1827
+ if (scheme.type === "apiKey") {
1828
+ const storeSecrets = secrets?.type === "apiKey" ? secrets : void 0;
1829
+ return {
1830
+ ...scheme,
1831
+ "x-scalar-secret-token": storeSecrets?.["x-scalar-secret-token"] || scheme.value || ""
1832
+ };
1833
+ }
1834
+ if (scheme.type === "http") {
1835
+ const storeSecrets = secrets?.type === "http" ? secrets : void 0;
1836
+ return {
1837
+ ...scheme,
1838
+ "x-scalar-secret-token": storeSecrets?.["x-scalar-secret-token"] || scheme.token || "",
1839
+ "x-scalar-secret-username": storeSecrets?.["x-scalar-secret-username"] || scheme.username || "",
1840
+ "x-scalar-secret-password": storeSecrets?.["x-scalar-secret-password"] || scheme.password || ""
1841
+ };
1842
+ }
1843
+ if (scheme.type === "oauth2") {
1844
+ const storeSecrets = secrets?.type === "oauth2" ? secrets : void 0;
1845
+ const extracted = extractOAuthFlowSecrets(scheme.flows, storeSecrets);
1846
+ const configuredDefaultScopes = Array.isArray(scheme["x-default-scopes"]) ? scheme["x-default-scopes"].filter((scope) => typeof scope === "string") : [];
1847
+ const mergedDefaultScopes = Array.from(new Set([...configuredDefaultScopes, ...extracted.selectedScopes]));
1848
+ return {
1849
+ ...scheme,
1850
+ flows: extracted.flows,
1851
+ "x-default-scopes": mergedDefaultScopes
1852
+ };
1853
+ }
1854
+ if (scheme.type === "openIdConnect") {
1855
+ const storeSecrets = secrets?.type === "openIdConnect" ? secrets : void 0;
1856
+ const extracted = extractOAuthFlowSecrets({
1857
+ implicit: storeSecrets?.implicit,
1858
+ password: storeSecrets?.password,
1859
+ clientCredentials: storeSecrets?.clientCredentials,
1860
+ authorizationCode: storeSecrets?.authorizationCode
1861
+ }, storeSecrets);
1862
+ return {
1863
+ ...scheme,
1864
+ ...objectEntries(extracted.flows).length ? { flows: extracted.flows } : {}
1865
+ };
1866
+ }
1867
+ return scheme;
1868
+ };
1869
+ //#endregion
1870
+ //#region src/v2/blocks/scalar-auth-selector-block/helpers/merge-security.ts
1871
+ /** Merge the authentication config with the document security schemes + the auth store secrets */
1872
+ var mergeSecurity = (documentSecuritySchemes = {}, configSecuritySchemes = {}, authStore, documentSlug) => {
1873
+ /** Convert the config secrets to the new secret extensions */
1874
+ return objectEntries(mergeObjects(objectEntries(documentSecuritySchemes).reduce((acc, [key, value]) => {
1875
+ const resolved = deepClone(getResolvedRef(value));
1876
+ if (resolved) acc[key] = resolved;
1877
+ return acc;
1878
+ }, {}), configSecuritySchemes) ?? {}).reduce((acc, [name, value]) => {
1879
+ acc[name] = extractSecuritySchemeSecrets({
1880
+ ...coerceValue(SecuritySchemeObjectSchema, value),
1881
+ ...value
1882
+ }, authStore, name, documentSlug);
1883
+ return acc;
1884
+ }, {});
1885
+ };
1886
+ //#endregion
1887
+ export { AuthSelector_default as n, isAuthOptional as r, mergeSecurity as t };
1888
+
1889
+ //# sourceMappingURL=scalar-auth-selector-block-Bs79QOMA.js.map