@redocly/reference-docs 2.13.1 → 2.13.4

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 (330) hide show
  1. package/bin/cli/commands/redocly-docs-cli.min.js +29 -29
  2. package/bin/cli/commands/redocly-docs-cli.min.js.LICENSE.txt +1 -1
  3. package/dist/console.redocly-reference-docs.min.js +1 -1
  4. package/dist/oauth2-redirect.js +1 -1
  5. package/dist/redocly-reference-docs.min.js +514 -514
  6. package/lib/components/Endpoint/Endpoint.d.ts +2 -2
  7. package/lib/components/Endpoint/ServerList.d.ts +2 -2
  8. package/lib/components/Endpoint/Summary.d.ts +3 -3
  9. package/lib/components/NextSectionButton.d.ts +2 -2
  10. package/lib/components/Overlay.d.ts +1 -1
  11. package/lib/components/Panel/PanelComponent.d.ts +2 -1
  12. package/lib/components/ProProviders.d.ts +2 -2
  13. package/lib/components/RedoclyReferenceDocs.d.ts +3 -3
  14. package/lib/components/Samples/ExampleSwitch.d.ts +1 -1
  15. package/lib/components/Samples/SamplesTabs.d.ts +1 -1
  16. package/lib/components/Samples/use-example-key.d.ts +1 -1
  17. package/lib/components/Search/MenuItemProSearch.d.ts +2 -2
  18. package/lib/components/Search/MenuItemProSearch.js +1 -1
  19. package/lib/components/Search/ProSearchBox.d.ts +5 -5
  20. package/lib/components/Search/SearchField.d.ts +1 -1
  21. package/lib/components/StoreProvider.d.ts +3 -2
  22. package/lib/components/Tabs/CollapsingTabs/CollapsingTabs.d.ts +1 -1
  23. package/lib/components/Tabs/CollapsingTabs/CollapsingTabsBase.d.ts +2 -2
  24. package/lib/components/VersionSwitcher.d.ts +2 -2
  25. package/lib/components/common/CheckboxList.d.ts +3 -2
  26. package/lib/components/common/Dropdown/Dropdown.d.ts +1 -1
  27. package/lib/components/common/Dropdown/types.d.ts +1 -1
  28. package/lib/components/common/FileUpload/helper.d.ts +1 -1
  29. package/lib/components/common/TextField.d.ts +1 -1
  30. package/lib/components/console/ActionPanel.d.ts +2 -2
  31. package/lib/components/console/AuthPanel.d.ts +4 -4
  32. package/lib/components/console/CodemirrorInput.d.ts +1 -1
  33. package/lib/components/console/Console.d.ts +6 -6
  34. package/lib/components/console/OAuth2Flow.d.ts +4 -4
  35. package/lib/components/console/OAuth2TokenInput.d.ts +1 -1
  36. package/lib/components/console/OpenIDConnect.d.ts +3 -3
  37. package/lib/components/console/OperationParameters.d.ts +1 -1
  38. package/lib/components/console/RequestBody.d.ts +2 -2
  39. package/lib/components/console/RequestBodyForm.d.ts +1 -1
  40. package/lib/components/console/ResponseBody.d.ts +1 -1
  41. package/lib/components/console/ResponsePanel.d.ts +1 -1
  42. package/lib/components/console/ServerDropdown.d.ts +1 -1
  43. package/lib/components/console/utils.d.ts +1 -1
  44. package/lib/components/pluggable/RedocExample.d.ts +2 -2
  45. package/lib/components/pluggable/RedocRequestBody.d.ts +1 -1
  46. package/lib/components/pluggable/RedocResponse.d.ts +1 -1
  47. package/lib/components/pluggable/RedocSchema.d.ts +2 -2
  48. package/lib/components/pluggable/styled.components.d.ts +1 -1
  49. package/lib/components/styled.elements.d.ts +3 -2
  50. package/lib/models/code-sample-options.d.ts +1 -1
  51. package/lib/redoc-lib/src/common-elements/LinkToField.d.ts +2 -2
  52. package/lib/redoc-lib/src/common-elements/Tooltip.d.ts +1 -1
  53. package/lib/redoc-lib/src/common-elements/linkify.d.ts +3 -2
  54. package/lib/redoc-lib/src/common-elements/perfect-scrollbar.d.ts +3 -2
  55. package/lib/redoc-lib/src/components/ApiInfo/ApiInfo.d.ts +1 -1
  56. package/lib/redoc-lib/src/components/ApiLogo/ApiLogo.d.ts +1 -1
  57. package/lib/redoc-lib/src/components/ApiLogo/styled.elements.d.ts +1 -1
  58. package/lib/redoc-lib/src/components/CallbackSamples/CallbackReqSamples.d.ts +1 -1
  59. package/lib/redoc-lib/src/components/CallbackSamples/CallbackSamples.d.ts +2 -2
  60. package/lib/redoc-lib/src/components/Callbacks/CallbackDetails.d.ts +1 -1
  61. package/lib/redoc-lib/src/components/Callbacks/CallbackOperation.d.ts +1 -1
  62. package/lib/redoc-lib/src/components/Callbacks/CallbackSummary.d.ts +2 -2
  63. package/lib/redoc-lib/src/components/Callbacks/CallbacksList.d.ts +1 -1
  64. package/lib/redoc-lib/src/components/ContentItems/ContentItems.d.ts +3 -3
  65. package/lib/redoc-lib/src/components/DownloadButton/DownloadButton.d.ts +1 -1
  66. package/lib/redoc-lib/src/components/DownloadButton/DownloadButton.js +1 -1
  67. package/lib/redoc-lib/src/components/DropdownOrLabel/DropdownOrLabel.d.ts +1 -1
  68. package/lib/redoc-lib/src/components/ErrorBoundary.d.ts +2 -1
  69. package/lib/redoc-lib/src/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
  70. package/lib/redoc-lib/src/components/Fields/Field.d.ts +3 -3
  71. package/lib/redoc-lib/src/components/Fields/FieldDetails.d.ts +1 -1
  72. package/lib/redoc-lib/src/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +1 -1
  73. package/lib/redoc-lib/src/components/Markdown/AdvancedMarkdown.d.ts +3 -3
  74. package/lib/redoc-lib/src/components/Markdown/SanitizedMdBlock.d.ts +1 -1
  75. package/lib/redoc-lib/src/components/Markdown/styled.elements.d.ts +1 -1
  76. package/lib/redoc-lib/src/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +2 -2
  77. package/lib/redoc-lib/src/components/Operation/Operation.d.ts +1 -1
  78. package/lib/redoc-lib/src/components/OptionsProvider.d.ts +1 -1
  79. package/lib/redoc-lib/src/components/Parameters/ParametersGroup.d.ts +1 -1
  80. package/lib/redoc-lib/src/components/PayloadSamples/Example.d.ts +1 -1
  81. package/lib/redoc-lib/src/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
  82. package/lib/redoc-lib/src/components/PayloadSamples/PayloadSamples.d.ts +1 -1
  83. package/lib/redoc-lib/src/components/PayloadSamples/exernalExampleHook.d.ts +1 -1
  84. package/lib/redoc-lib/src/components/RequestSamples/CodeSample.d.ts +2 -2
  85. package/lib/redoc-lib/src/components/RequestSamples/RequestSamples.d.ts +1 -1
  86. package/lib/redoc-lib/src/components/RequestSamples/languageSwitchEvent.d.ts +3 -2
  87. package/lib/redoc-lib/src/components/RequestSamples/useCodeSamples.d.ts +1 -1
  88. package/lib/redoc-lib/src/components/Responses/Response.d.ts +1 -1
  89. package/lib/redoc-lib/src/components/Responses/ResponseDetails.d.ts +1 -1
  90. package/lib/redoc-lib/src/components/Responses/ResponseHeaders.d.ts +1 -1
  91. package/lib/redoc-lib/src/components/Responses/ResponseSummary.d.ts +2 -2
  92. package/lib/redoc-lib/src/components/Responses/ResponsesList.d.ts +1 -1
  93. package/lib/redoc-lib/src/components/Schema/ArraySchema.d.ts +1 -1
  94. package/lib/redoc-lib/src/components/Schema/DiscriminatorDropdown.d.ts +2 -2
  95. package/lib/redoc-lib/src/components/Schema/ObjectSchema.d.ts +1 -1
  96. package/lib/redoc-lib/src/components/Schema/OneOfSchema.d.ts +1 -1
  97. package/lib/redoc-lib/src/components/Schema/Schema.d.ts +1 -1
  98. package/lib/redoc-lib/src/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
  99. package/lib/redoc-lib/src/components/SearchBox/SearchBox.d.ts +3 -3
  100. package/lib/redoc-lib/src/components/SecurityRequirement/SecurityRequirement.d.ts +1 -1
  101. package/lib/redoc-lib/src/components/SecuritySchemes/SecuritySchemes.d.ts +2 -2
  102. package/lib/redoc-lib/src/components/SideMenu/MenuItem.d.ts +3 -3
  103. package/lib/redoc-lib/src/components/SideMenu/MenuItem.js +1 -1
  104. package/lib/redoc-lib/src/components/SideMenu/SideMenu.d.ts +3 -3
  105. package/lib/redoc-lib/src/components/SourceCode/SourceCode.d.ts +2 -2
  106. package/lib/redoc-lib/src/components/StickySidebar/StickyResponsiveSidebar.d.ts +3 -2
  107. package/lib/redoc-lib/src/components/StoreBuilder.d.ts +1 -1
  108. package/lib/redoc-lib/src/components/helper.d.ts +1 -1
  109. package/lib/redoc-lib/src/services/MarkdownRenderer.d.ts +3 -3
  110. package/lib/redoc-lib/src/services/MenuBuilder.d.ts +3 -3
  111. package/lib/redoc-lib/src/services/OpenAPIParser.d.ts +1 -1
  112. package/lib/redoc-lib/src/services/RedocNormalizedOptions.d.ts +7 -5
  113. package/lib/redoc-lib/src/services/RedocNormalizedOptions.js +1 -1
  114. package/lib/redoc-lib/src/services/ScrollService.d.ts +1 -1
  115. package/lib/redoc-lib/src/services/SpecStore.d.ts +3 -3
  116. package/lib/redoc-lib/src/services/models/ApiInfo.d.ts +2 -2
  117. package/lib/redoc-lib/src/services/models/Callback.d.ts +3 -3
  118. package/lib/redoc-lib/src/services/models/Example.d.ts +2 -2
  119. package/lib/redoc-lib/src/services/models/Field.d.ts +5 -4
  120. package/lib/redoc-lib/src/services/models/Group.model.d.ts +4 -4
  121. package/lib/redoc-lib/src/services/models/MediaContent.d.ts +5 -5
  122. package/lib/redoc-lib/src/services/models/MediaType.d.ts +5 -5
  123. package/lib/redoc-lib/src/services/models/Operation.d.ts +8 -8
  124. package/lib/redoc-lib/src/services/models/RequestBody.d.ts +4 -4
  125. package/lib/redoc-lib/src/services/models/Response.d.ts +4 -4
  126. package/lib/redoc-lib/src/services/models/Schema.d.ts +5 -5
  127. package/lib/redoc-lib/src/services/models/SecurityRequirement.d.ts +2 -2
  128. package/lib/redoc-lib/src/services/models/SecuritySchemes.d.ts +2 -2
  129. package/lib/redoc-lib/src/services/models/Webhook.d.ts +3 -3
  130. package/lib/redoc-lib/src/styled-components.d.ts +2 -2
  131. package/lib/redoc-lib/src/types/open-api.d.ts +2 -2
  132. package/lib/redoc-lib/src/utils/helpers.d.ts +3 -3
  133. package/lib/redoc-lib/src/utils/helpers.js +1 -1
  134. package/lib/redoc-lib/src/utils/loadAndBundleSpec.d.ts +1 -1
  135. package/lib/redoc-lib/src/utils/media-css.d.ts +1 -1
  136. package/lib/redoc-lib/src/utils/openapi.d.ts +3 -3
  137. package/lib/services/ProMenu.d.ts +2 -2
  138. package/lib/services/ProStore.d.ts +13 -26
  139. package/lib/services/ProStore.js +1 -1
  140. package/lib/services/SearchStore.d.ts +3 -2
  141. package/lib/services/VersionedSpecStore.d.ts +3 -2
  142. package/lib/services/code-samples/generator.d.ts +3 -3
  143. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
  144. package/lib/services/code-samples/httpsnippet/index.d.ts +2 -2
  145. package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +2 -2
  146. package/lib/services/code-samples/httpsnippet/targets/go/native.d.ts +2 -2
  147. package/lib/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +2 -2
  148. package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +2 -2
  149. package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +2 -2
  150. package/lib/services/code-samples/httpsnippet/targets/node/fetch.d.ts +2 -2
  151. package/lib/services/code-samples/httpsnippet/targets/php/curl.d.ts +2 -2
  152. package/lib/services/code-samples/httpsnippet/targets/php/utils.d.ts +1 -1
  153. package/lib/services/code-samples/httpsnippet/targets/python/requests.d.ts +2 -2
  154. package/lib/services/code-samples/httpsnippet/targets/ruby/native.d.ts +2 -2
  155. package/lib/services/code-samples/httpsnippet/targets/shell/curl.d.ts +2 -2
  156. package/lib/services/extendTheme.d.ts +2 -2
  157. package/lib/services/history/FakeHistoryService.d.ts +2 -2
  158. package/lib/services/history/ProHashHistoryService.d.ts +2 -2
  159. package/lib/services/history/PushStateHistoryService.d.ts +3 -2
  160. package/lib/services/history/helpers.d.ts +1 -1
  161. package/lib/services/index.d.ts +1 -0
  162. package/lib/services/index.js +1 -1
  163. package/lib/services/types.d.ts +24 -0
  164. package/lib/services/types.js +2 -0
  165. package/lib/services/utils.js +1 -1
  166. package/lib/standalone.d.ts +3 -3
  167. package/lib/utils.js +1 -1
  168. package/lib-esm/components/Endpoint/Endpoint.d.ts +2 -2
  169. package/lib-esm/components/Endpoint/ServerList.d.ts +2 -2
  170. package/lib-esm/components/Endpoint/Summary.d.ts +3 -3
  171. package/lib-esm/components/NextSectionButton.d.ts +2 -2
  172. package/lib-esm/components/Overlay.d.ts +1 -1
  173. package/lib-esm/components/Panel/PanelComponent.d.ts +2 -1
  174. package/lib-esm/components/ProProviders.d.ts +2 -2
  175. package/lib-esm/components/RedoclyReferenceDocs.d.ts +3 -3
  176. package/lib-esm/components/Samples/ExampleSwitch.d.ts +1 -1
  177. package/lib-esm/components/Samples/SamplesTabs.d.ts +1 -1
  178. package/lib-esm/components/Samples/use-example-key.d.ts +1 -1
  179. package/lib-esm/components/Search/MenuItemProSearch.d.ts +2 -2
  180. package/lib-esm/components/Search/MenuItemProSearch.js +1 -1
  181. package/lib-esm/components/Search/ProSearchBox.d.ts +5 -5
  182. package/lib-esm/components/Search/SearchField.d.ts +1 -1
  183. package/lib-esm/components/StoreProvider.d.ts +3 -2
  184. package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabs.d.ts +1 -1
  185. package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabsBase.d.ts +2 -2
  186. package/lib-esm/components/VersionSwitcher.d.ts +2 -2
  187. package/lib-esm/components/common/CheckboxList.d.ts +3 -2
  188. package/lib-esm/components/common/Dropdown/Dropdown.d.ts +1 -1
  189. package/lib-esm/components/common/Dropdown/types.d.ts +1 -1
  190. package/lib-esm/components/common/FileUpload/helper.d.ts +1 -1
  191. package/lib-esm/components/common/TextField.d.ts +1 -1
  192. package/lib-esm/components/console/ActionPanel.d.ts +2 -2
  193. package/lib-esm/components/console/AuthPanel.d.ts +4 -4
  194. package/lib-esm/components/console/CodemirrorInput.d.ts +1 -1
  195. package/lib-esm/components/console/Console.d.ts +6 -6
  196. package/lib-esm/components/console/OAuth2Flow.d.ts +4 -4
  197. package/lib-esm/components/console/OAuth2TokenInput.d.ts +1 -1
  198. package/lib-esm/components/console/OpenIDConnect.d.ts +3 -3
  199. package/lib-esm/components/console/OperationParameters.d.ts +1 -1
  200. package/lib-esm/components/console/RequestBody.d.ts +2 -2
  201. package/lib-esm/components/console/RequestBodyForm.d.ts +1 -1
  202. package/lib-esm/components/console/ResponseBody.d.ts +1 -1
  203. package/lib-esm/components/console/ResponsePanel.d.ts +1 -1
  204. package/lib-esm/components/console/ServerDropdown.d.ts +1 -1
  205. package/lib-esm/components/console/utils.d.ts +1 -1
  206. package/lib-esm/components/pluggable/RedocExample.d.ts +2 -2
  207. package/lib-esm/components/pluggable/RedocRequestBody.d.ts +1 -1
  208. package/lib-esm/components/pluggable/RedocResponse.d.ts +1 -1
  209. package/lib-esm/components/pluggable/RedocSchema.d.ts +2 -2
  210. package/lib-esm/components/pluggable/styled.components.d.ts +1 -1
  211. package/lib-esm/components/styled.elements.d.ts +3 -2
  212. package/lib-esm/models/code-sample-options.d.ts +1 -1
  213. package/lib-esm/redoc-lib/src/common-elements/LinkToField.d.ts +2 -2
  214. package/lib-esm/redoc-lib/src/common-elements/Tooltip.d.ts +1 -1
  215. package/lib-esm/redoc-lib/src/common-elements/linkify.d.ts +3 -2
  216. package/lib-esm/redoc-lib/src/common-elements/perfect-scrollbar.d.ts +3 -2
  217. package/lib-esm/redoc-lib/src/components/ApiInfo/ApiInfo.d.ts +1 -1
  218. package/lib-esm/redoc-lib/src/components/ApiLogo/ApiLogo.d.ts +1 -1
  219. package/lib-esm/redoc-lib/src/components/ApiLogo/styled.elements.d.ts +1 -1
  220. package/lib-esm/redoc-lib/src/components/CallbackSamples/CallbackReqSamples.d.ts +1 -1
  221. package/lib-esm/redoc-lib/src/components/CallbackSamples/CallbackSamples.d.ts +2 -2
  222. package/lib-esm/redoc-lib/src/components/Callbacks/CallbackDetails.d.ts +1 -1
  223. package/lib-esm/redoc-lib/src/components/Callbacks/CallbackOperation.d.ts +1 -1
  224. package/lib-esm/redoc-lib/src/components/Callbacks/CallbackSummary.d.ts +2 -2
  225. package/lib-esm/redoc-lib/src/components/Callbacks/CallbacksList.d.ts +1 -1
  226. package/lib-esm/redoc-lib/src/components/ContentItems/ContentItems.d.ts +3 -3
  227. package/lib-esm/redoc-lib/src/components/DownloadButton/DownloadButton.d.ts +1 -1
  228. package/lib-esm/redoc-lib/src/components/DownloadButton/DownloadButton.js +1 -1
  229. package/lib-esm/redoc-lib/src/components/DropdownOrLabel/DropdownOrLabel.d.ts +1 -1
  230. package/lib-esm/redoc-lib/src/components/ErrorBoundary.d.ts +2 -1
  231. package/lib-esm/redoc-lib/src/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
  232. package/lib-esm/redoc-lib/src/components/Fields/Field.d.ts +3 -3
  233. package/lib-esm/redoc-lib/src/components/Fields/FieldDetails.d.ts +1 -1
  234. package/lib-esm/redoc-lib/src/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +1 -1
  235. package/lib-esm/redoc-lib/src/components/Markdown/AdvancedMarkdown.d.ts +3 -3
  236. package/lib-esm/redoc-lib/src/components/Markdown/SanitizedMdBlock.d.ts +1 -1
  237. package/lib-esm/redoc-lib/src/components/Markdown/styled.elements.d.ts +1 -1
  238. package/lib-esm/redoc-lib/src/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +2 -2
  239. package/lib-esm/redoc-lib/src/components/Operation/Operation.d.ts +1 -1
  240. package/lib-esm/redoc-lib/src/components/OptionsProvider.d.ts +1 -1
  241. package/lib-esm/redoc-lib/src/components/Parameters/ParametersGroup.d.ts +1 -1
  242. package/lib-esm/redoc-lib/src/components/PayloadSamples/Example.d.ts +1 -1
  243. package/lib-esm/redoc-lib/src/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
  244. package/lib-esm/redoc-lib/src/components/PayloadSamples/PayloadSamples.d.ts +1 -1
  245. package/lib-esm/redoc-lib/src/components/PayloadSamples/exernalExampleHook.d.ts +1 -1
  246. package/lib-esm/redoc-lib/src/components/RequestSamples/CodeSample.d.ts +2 -2
  247. package/lib-esm/redoc-lib/src/components/RequestSamples/RequestSamples.d.ts +1 -1
  248. package/lib-esm/redoc-lib/src/components/RequestSamples/languageSwitchEvent.d.ts +3 -2
  249. package/lib-esm/redoc-lib/src/components/RequestSamples/useCodeSamples.d.ts +1 -1
  250. package/lib-esm/redoc-lib/src/components/Responses/Response.d.ts +1 -1
  251. package/lib-esm/redoc-lib/src/components/Responses/ResponseDetails.d.ts +1 -1
  252. package/lib-esm/redoc-lib/src/components/Responses/ResponseHeaders.d.ts +1 -1
  253. package/lib-esm/redoc-lib/src/components/Responses/ResponseSummary.d.ts +2 -2
  254. package/lib-esm/redoc-lib/src/components/Responses/ResponsesList.d.ts +1 -1
  255. package/lib-esm/redoc-lib/src/components/Schema/ArraySchema.d.ts +1 -1
  256. package/lib-esm/redoc-lib/src/components/Schema/DiscriminatorDropdown.d.ts +2 -2
  257. package/lib-esm/redoc-lib/src/components/Schema/ObjectSchema.d.ts +1 -1
  258. package/lib-esm/redoc-lib/src/components/Schema/OneOfSchema.d.ts +1 -1
  259. package/lib-esm/redoc-lib/src/components/Schema/Schema.d.ts +1 -1
  260. package/lib-esm/redoc-lib/src/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
  261. package/lib-esm/redoc-lib/src/components/SearchBox/SearchBox.d.ts +3 -3
  262. package/lib-esm/redoc-lib/src/components/SecurityRequirement/SecurityRequirement.d.ts +1 -1
  263. package/lib-esm/redoc-lib/src/components/SecuritySchemes/SecuritySchemes.d.ts +2 -2
  264. package/lib-esm/redoc-lib/src/components/SideMenu/MenuItem.d.ts +3 -3
  265. package/lib-esm/redoc-lib/src/components/SideMenu/MenuItem.js +1 -1
  266. package/lib-esm/redoc-lib/src/components/SideMenu/SideMenu.d.ts +3 -3
  267. package/lib-esm/redoc-lib/src/components/SourceCode/SourceCode.d.ts +2 -2
  268. package/lib-esm/redoc-lib/src/components/StickySidebar/StickyResponsiveSidebar.d.ts +3 -2
  269. package/lib-esm/redoc-lib/src/components/StoreBuilder.d.ts +1 -1
  270. package/lib-esm/redoc-lib/src/components/helper.d.ts +1 -1
  271. package/lib-esm/redoc-lib/src/services/MarkdownRenderer.d.ts +3 -3
  272. package/lib-esm/redoc-lib/src/services/MenuBuilder.d.ts +3 -3
  273. package/lib-esm/redoc-lib/src/services/OpenAPIParser.d.ts +1 -1
  274. package/lib-esm/redoc-lib/src/services/RedocNormalizedOptions.d.ts +7 -5
  275. package/lib-esm/redoc-lib/src/services/RedocNormalizedOptions.js +1 -1
  276. package/lib-esm/redoc-lib/src/services/ScrollService.d.ts +1 -1
  277. package/lib-esm/redoc-lib/src/services/SpecStore.d.ts +3 -3
  278. package/lib-esm/redoc-lib/src/services/models/ApiInfo.d.ts +2 -2
  279. package/lib-esm/redoc-lib/src/services/models/Callback.d.ts +3 -3
  280. package/lib-esm/redoc-lib/src/services/models/Example.d.ts +2 -2
  281. package/lib-esm/redoc-lib/src/services/models/Field.d.ts +5 -4
  282. package/lib-esm/redoc-lib/src/services/models/Group.model.d.ts +4 -4
  283. package/lib-esm/redoc-lib/src/services/models/MediaContent.d.ts +5 -5
  284. package/lib-esm/redoc-lib/src/services/models/MediaType.d.ts +5 -5
  285. package/lib-esm/redoc-lib/src/services/models/Operation.d.ts +8 -8
  286. package/lib-esm/redoc-lib/src/services/models/RequestBody.d.ts +4 -4
  287. package/lib-esm/redoc-lib/src/services/models/Response.d.ts +4 -4
  288. package/lib-esm/redoc-lib/src/services/models/Schema.d.ts +5 -5
  289. package/lib-esm/redoc-lib/src/services/models/SecurityRequirement.d.ts +2 -2
  290. package/lib-esm/redoc-lib/src/services/models/SecuritySchemes.d.ts +2 -2
  291. package/lib-esm/redoc-lib/src/services/models/Webhook.d.ts +3 -3
  292. package/lib-esm/redoc-lib/src/styled-components.d.ts +2 -2
  293. package/lib-esm/redoc-lib/src/types/open-api.d.ts +2 -2
  294. package/lib-esm/redoc-lib/src/utils/helpers.d.ts +3 -3
  295. package/lib-esm/redoc-lib/src/utils/helpers.js +1 -1
  296. package/lib-esm/redoc-lib/src/utils/loadAndBundleSpec.d.ts +1 -1
  297. package/lib-esm/redoc-lib/src/utils/media-css.d.ts +1 -1
  298. package/lib-esm/redoc-lib/src/utils/openapi.d.ts +3 -3
  299. package/lib-esm/services/ProMenu.d.ts +2 -2
  300. package/lib-esm/services/ProStore.d.ts +13 -26
  301. package/lib-esm/services/ProStore.js +1 -1
  302. package/lib-esm/services/SearchStore.d.ts +3 -2
  303. package/lib-esm/services/VersionedSpecStore.d.ts +3 -2
  304. package/lib-esm/services/code-samples/generator.d.ts +3 -3
  305. package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
  306. package/lib-esm/services/code-samples/httpsnippet/index.d.ts +2 -2
  307. package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +2 -2
  308. package/lib-esm/services/code-samples/httpsnippet/targets/go/native.d.ts +2 -2
  309. package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +2 -2
  310. package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +2 -2
  311. package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +2 -2
  312. package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.d.ts +2 -2
  313. package/lib-esm/services/code-samples/httpsnippet/targets/php/curl.d.ts +2 -2
  314. package/lib-esm/services/code-samples/httpsnippet/targets/php/utils.d.ts +1 -1
  315. package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.d.ts +2 -2
  316. package/lib-esm/services/code-samples/httpsnippet/targets/ruby/native.d.ts +2 -2
  317. package/lib-esm/services/code-samples/httpsnippet/targets/shell/curl.d.ts +2 -2
  318. package/lib-esm/services/extendTheme.d.ts +2 -2
  319. package/lib-esm/services/history/FakeHistoryService.d.ts +2 -2
  320. package/lib-esm/services/history/ProHashHistoryService.d.ts +2 -2
  321. package/lib-esm/services/history/PushStateHistoryService.d.ts +3 -2
  322. package/lib-esm/services/history/helpers.d.ts +1 -1
  323. package/lib-esm/services/index.d.ts +1 -0
  324. package/lib-esm/services/index.js +1 -1
  325. package/lib-esm/services/types.d.ts +24 -0
  326. package/lib-esm/services/types.js +2 -0
  327. package/lib-esm/services/utils.js +1 -1
  328. package/lib-esm/standalone.d.ts +3 -3
  329. package/lib-esm/utils.js +1 -1
  330. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import{__assign,__decorate}from"tslib";import{observable,makeObservable}from"mobx";import defaultTheme,{resolveTheme}from"../theme";import{isNumeric,mergeObjects,querySelector}from"../utils";import{setRedocLabels}from"./Labels";export function argValueToBoolean(e,a){return void 0===e?a||!1:"string"==typeof e?"false"!==e:e}function argValueToNumber(e){return"string"==typeof e?parseInt(e,10):"number"==typeof e?e:void 0}function argValueToInt(e){return"string"==typeof e?parseInt(e,10):"number"==typeof e?Math.ceil(e):void 0}function argValueToExpandLevel(e,a){return void 0===a&&(a=0),"all"===e?1/0:argValueToInt(e)||a}var RedocNormalizedOptions=function(){function e(a,t){var r,i,o,l,n,s;void 0===t&&(t={}),Object.defineProperty(this,"theme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"scrollYOffset",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideHostname",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideInfoDescription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"expandResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requiredPropsFirst",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sortPropsAlphabetically",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sortEnumValuesAlphabetically",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sortOperationsAlphabetically",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sortTagsAlphabetically",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"noAutoAuth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativeScrollbars",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathInMiddlePanel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"untrustedDefinition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideDownloadButton",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"disableSearch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showChangeLayoutButton",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onlyRequiredInSamples",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showConsole",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sendXUserAgentInTryIt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"generatedPayloadSamplesMaxDepth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showExtensions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideSingleRequestSampleTab",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideRequestPayloadSample",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"menuToggle",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"jsonSampleExpandLevel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"enumSkipQuotes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideSchemaTitles",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"simpleOneOfTypeLabel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"payloadSampleIdx",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"expandSingleSchemaField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"schemaExpansionLevel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"samplesTabsMaxCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unstable_tryItButtonOverride",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allowedMdComponents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"expandDefaultServerVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"expandDefaultRequest",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"expandDefaultResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxDisplayedEnumValues",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ignoreNamedSchemas",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unstable_ignoreMimeParameters",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unstable_externalCodeSamples",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideSchemaPattern",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideOneOfDescription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideFab",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this);var u=null===(r=(a=__assign(__assign({},t),a)).theme)||void 0===r?void 0:r.extensionsHook;(null===(i=a.theme)||void 0===i?void 0:i.menu)&&!(null===(o=a.theme)||void 0===o?void 0:o.sidebar)&&(console.warn('Theme setting "menu" is deprecated. Rename to "sidebar"'),a.theme.sidebar=a.theme.menu),(null===(l=a.theme)||void 0===l?void 0:l.codeSample)&&!(null===(n=a.theme)||void 0===n?void 0:n.codeBlock)&&(console.warn('Theme setting "codeSample" is deprecated. Rename to "codeBlock"'),a.theme.codeBlock=a.theme.codeSample),this.theme=resolveTheme(mergeObjects({},defaultTheme,__assign(__assign({},a.theme),{extensionsHook:void 0}))),this.theme.mediaQueries={print:"@media print"};for(var b=0,d=Object.entries(this.theme.breakpoints);b<d.length;b++){var c=d[b],h=c[0],p=c[1];this.theme.mediaQueries[h]="@media screen and (min-width: "+p+")"}this.theme.extensionsHook=u,setRedocLabels(a.labels),this.scrollYOffset=e.normalizeScrollYOffset(a.scrollYOffset),this.hideHostname=e.normalizeHideHostname(a.hideHostname),this.expandResponses=e.normalizeExpandResponses(a.expandResponses),this.requiredPropsFirst=argValueToBoolean(a.requiredPropsFirst),this.sortPropsAlphabetically=argValueToBoolean(a.sortPropsAlphabetically),this.sortEnumValuesAlphabetically=argValueToBoolean(a.sortEnumValuesAlphabetically),this.sortOperationsAlphabetically=argValueToBoolean(a.sortOperationsAlphabetically),this.sortTagsAlphabetically=argValueToBoolean(a.sortTagsAlphabetically),this.noAutoAuth=argValueToBoolean(a.noAutoAuth),this.nativeScrollbars=argValueToBoolean(a.nativeScrollbars),this.pathInMiddlePanel=argValueToBoolean(a.pathInMiddlePanel),this.untrustedDefinition=argValueToBoolean(a.untrustedDefinition),this.hideDownloadButton=void 0===a.hideDownloadButton?null:argValueToBoolean(a.hideDownloadButton),this.hideInfoDescription=argValueToBoolean(a.hideInfoDescription),this.disableSearch=argValueToBoolean(a.disableSearch),this.onlyRequiredInSamples=argValueToBoolean(a.onlyRequiredInSamples),this.generatedPayloadSamplesMaxDepth=argValueToInt(a.generatedPayloadSamplesMaxDepth)||8,this.sendXUserAgentInTryIt=argValueToBoolean(a.sendXUserAgentInTryIt),this.showExtensions=e.normalizeShowExtensions(a.showExtensions),this.hideSingleRequestSampleTab=argValueToBoolean(a.hideSingleRequestSampleTab),this.hideRequestPayloadSample=argValueToBoolean(a.hideRequestPayloadSample),this.menuToggle=argValueToBoolean(a.menuToggle,!0),this.jsonSampleExpandLevel=argValueToExpandLevel(a.jsonSampleExpandLevel,2),this.enumSkipQuotes=argValueToBoolean(a.enumSkipQuotes),this.hideSchemaTitles=argValueToBoolean(a.hideSchemaTitles),this.simpleOneOfTypeLabel=argValueToBoolean(a.simpleOneOfTypeLabel),this.payloadSampleIdx=e.normalizePayloadSampleIdx(a.payloadSampleIdx),this.expandSingleSchemaField=argValueToBoolean(a.expandSingleSchemaField),this.schemaExpansionLevel=argValueToExpandLevel(a.schemaExpansionLevel),this.samplesTabsMaxCount=argValueToInt(a.samplesTabsMaxCount)||5,this.unstable_tryItButtonOverride=a.unstable_tryItButtonOverride||null,this.unstable_ignoreMimeParameters=argValueToBoolean(a.unstable_ignoreMimeParameters),this.allowedMdComponents=a.allowedMdComponents||{},this.expandDefaultServerVariables=argValueToBoolean(a.expandDefaultServerVariables),this.expandDefaultRequest=argValueToBoolean(a.expandDefaultRequest,!0),this.expandDefaultResponse=argValueToBoolean(a.expandDefaultResponse,!0),this.maxDisplayedEnumValues=argValueToNumber(a.maxDisplayedEnumValues);var m=Array.isArray(a.ignoreNamedSchemas)?a.ignoreNamedSchemas:null===(s=a.ignoreNamedSchemas)||void 0===s?void 0:s.split(",").map((function(e){return e.trim()}));this.ignoreNamedSchemas=new Set(m),this.unstable_externalCodeSamples=a.unstable_externalCodeSamples||[],this.hooks=a.hooks||{},this.hooks.ReplaceTryItAuthPanel&&!this.hooks.ReplaceTryItSecurityPanel&&(console.warn("[warn] ReplaceTryItAuthPanel is deprecated, use ReplaceTryItSecurityPanel instead"),this.hooks.ReplaceTryItSecurityPanel=this.hooks.ReplaceTryItAuthPanel),this.hideSchemaPattern=argValueToBoolean(a.hideSchemaPattern),this.hideOneOfDescription=argValueToBoolean(a.hideOneOfDescription),this.hideFab=argValueToBoolean(a.hideFab)}return Object.defineProperty(e,"normalizeExpandResponses",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if("all"===e)return"all";if("string"==typeof e){var a={};return e.split(",").forEach((function(e){a[e.trim()]=!0})),a}return void 0!==e&&console.warn('expandResponses must be a string but received value "'+e+'" of type '+typeof e),{}}}),Object.defineProperty(e,"normalizeHideHostname",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return!!e}}),Object.defineProperty(e,"normalizeScrollYOffset",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if("string"==typeof e&&!isNumeric(e)){var a=querySelector(e);a||console.warn("scrollYOffset value is a selector to non-existing element. Using offset 0 by default");var t=a&&a.getBoundingClientRect().bottom||0;return function(){return t}}return"number"==typeof e||isNumeric(e)?function(){return"number"==typeof e?e:parseFloat(e)}:"function"==typeof e?function(){var a=e();return"number"!=typeof a&&console.warn('scrollYOffset should return number but returned value "'+a+'" of type '+typeof a),a}:(void 0!==e&&console.warn("Wrong value for scrollYOffset ReDoc option: should be string, number or function"),function(){return 0})}}),Object.defineProperty(e,"normalizeShowExtensions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(void 0===e)return!1;if(""===e)return!0;if("string"!=typeof e)return e;switch(e){case"true":return!0;case"false":return!1;default:return e.split(",").map((function(e){return e.trim()}))}}}),Object.defineProperty(e,"normalizePayloadSampleIdx",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return"number"==typeof e?Math.max(0,e):"string"==typeof e&&isFinite(e)?parseInt(e,10):0}}),__decorate([observable],e.prototype,"showConsole",void 0),e}();export{RedocNormalizedOptions};
1
+ import{__assign,__decorate}from"tslib";import{observable,makeObservable}from"mobx";import defaultTheme,{resolveTheme}from"../theme";import{isNumeric,mergeObjects,querySelector}from"../utils";import{setRedocLabels}from"./Labels";export function argValueToBoolean(e,a){return void 0===e?a||!1:"string"==typeof e?"false"!==e:e}function argValueToNumber(e){return"string"==typeof e?parseInt(e,10):"number"==typeof e?e:void 0}function argValueToInt(e){return"string"==typeof e?parseInt(e,10):"number"==typeof e?Math.ceil(e):void 0}function argValueToExpandLevel(e,a){return void 0===a&&(a=0),"all"===e?1/0:argValueToInt(e)||a}var RedocNormalizedOptions=function(){function e(a,t){var i,r,o,l,n,s;void 0===t&&(t={}),Object.defineProperty(this,"theme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"scrollYOffset",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideHostname",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideInfoDescription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"expandResponses",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"requiredPropsFirst",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sortPropsAlphabetically",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sortEnumValuesAlphabetically",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sortOperationsAlphabetically",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sortTagsAlphabetically",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"noAutoAuth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativeScrollbars",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathInMiddlePanel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"untrustedDefinition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideDownloadButton",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"downloadDefinitionUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"disableSearch",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showChangeLayoutButton",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onlyRequiredInSamples",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showConsole",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sendXUserAgentInTryIt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"generatedPayloadSamplesMaxDepth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showExtensions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideSingleRequestSampleTab",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideRequestPayloadSample",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"menuToggle",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"jsonSampleExpandLevel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"enumSkipQuotes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideSchemaTitles",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"simpleOneOfTypeLabel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"payloadSampleIdx",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"expandSingleSchemaField",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"schemaExpansionLevel",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"samplesTabsMaxCount",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unstable_tryItButtonOverride",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"allowedMdComponents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"expandDefaultServerVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"expandDefaultRequest",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"expandDefaultResponse",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"maxDisplayedEnumValues",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ignoreNamedSchemas",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unstable_ignoreMimeParameters",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unstable_externalCodeSamples",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideSchemaPattern",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideOneOfDescription",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"hideFab",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this);var u=null===(i=(a=__assign(__assign({},t),a)).theme)||void 0===i?void 0:i.extensionsHook;(null===(r=a.theme)||void 0===r?void 0:r.menu)&&!(null===(o=a.theme)||void 0===o?void 0:o.sidebar)&&(console.warn('Theme setting "menu" is deprecated. Rename to "sidebar"'),a.theme.sidebar=a.theme.menu),(null===(l=a.theme)||void 0===l?void 0:l.codeSample)&&!(null===(n=a.theme)||void 0===n?void 0:n.codeBlock)&&(console.warn('Theme setting "codeSample" is deprecated. Rename to "codeBlock"'),a.theme.codeBlock=a.theme.codeSample),this.theme=resolveTheme(mergeObjects({},defaultTheme,__assign(__assign({},a.theme),{extensionsHook:void 0}))),this.theme.mediaQueries={print:"@media print"};for(var d=0,b=Object.entries(this.theme.breakpoints);d<b.length;d++){var c=b[d],h=c[0],p=c[1];this.theme.mediaQueries[h]="@media screen and (min-width: "+p+")"}this.theme.extensionsHook=u,setRedocLabels(a.labels),this.scrollYOffset=e.normalizeScrollYOffset(a.scrollYOffset),this.hideHostname=e.normalizeHideHostname(a.hideHostname),this.expandResponses=e.normalizeExpandResponses(a.expandResponses),this.requiredPropsFirst=argValueToBoolean(a.requiredPropsFirst),this.sortPropsAlphabetically=argValueToBoolean(a.sortPropsAlphabetically),this.sortEnumValuesAlphabetically=argValueToBoolean(a.sortEnumValuesAlphabetically),this.sortOperationsAlphabetically=argValueToBoolean(a.sortOperationsAlphabetically),this.sortTagsAlphabetically=argValueToBoolean(a.sortTagsAlphabetically),this.noAutoAuth=argValueToBoolean(a.noAutoAuth),this.nativeScrollbars=argValueToBoolean(a.nativeScrollbars),this.pathInMiddlePanel=argValueToBoolean(a.pathInMiddlePanel),this.untrustedDefinition=argValueToBoolean(a.untrustedDefinition),this.hideDownloadButton=void 0===a.hideDownloadButton?null:argValueToBoolean(a.hideDownloadButton),this.downloadDefinitionUrl=a.downloadDefinitionUrl,this.hideInfoDescription=argValueToBoolean(a.hideInfoDescription),this.disableSearch=argValueToBoolean(a.disableSearch),this.onlyRequiredInSamples=argValueToBoolean(a.onlyRequiredInSamples),this.generatedPayloadSamplesMaxDepth=argValueToInt(a.generatedPayloadSamplesMaxDepth)||8,this.sendXUserAgentInTryIt=argValueToBoolean(a.sendXUserAgentInTryIt),this.showExtensions=e.normalizeShowExtensions(a.showExtensions),this.hideSingleRequestSampleTab=argValueToBoolean(a.hideSingleRequestSampleTab),this.hideRequestPayloadSample=argValueToBoolean(a.hideRequestPayloadSample),this.menuToggle=argValueToBoolean(a.menuToggle,!0),this.jsonSampleExpandLevel=argValueToExpandLevel(a.jsonSampleExpandLevel,2),this.enumSkipQuotes=argValueToBoolean(a.enumSkipQuotes),this.hideSchemaTitles=argValueToBoolean(a.hideSchemaTitles),this.simpleOneOfTypeLabel=argValueToBoolean(a.simpleOneOfTypeLabel),this.payloadSampleIdx=e.normalizePayloadSampleIdx(a.payloadSampleIdx),this.expandSingleSchemaField=argValueToBoolean(a.expandSingleSchemaField),this.schemaExpansionLevel=argValueToExpandLevel(a.schemaExpansionLevel),this.samplesTabsMaxCount=argValueToInt(a.samplesTabsMaxCount)||5,this.unstable_tryItButtonOverride=a.unstable_tryItButtonOverride||null,this.unstable_ignoreMimeParameters=argValueToBoolean(a.unstable_ignoreMimeParameters),this.allowedMdComponents=a.allowedMdComponents||{},this.expandDefaultServerVariables=argValueToBoolean(a.expandDefaultServerVariables),this.expandDefaultRequest=argValueToBoolean(a.expandDefaultRequest,!0),this.expandDefaultResponse=argValueToBoolean(a.expandDefaultResponse,!0),this.maxDisplayedEnumValues=argValueToNumber(a.maxDisplayedEnumValues);var m=Array.isArray(a.ignoreNamedSchemas)?a.ignoreNamedSchemas:null===(s=a.ignoreNamedSchemas)||void 0===s?void 0:s.split(",").map((function(e){return e.trim()}));this.ignoreNamedSchemas=new Set(m),this.unstable_externalCodeSamples=a.unstable_externalCodeSamples||[],this.hooks=a.hooks||{},this.hooks.ReplaceTryItAuthPanel&&!this.hooks.ReplaceTryItSecurityPanel&&(console.warn("[warn] ReplaceTryItAuthPanel is deprecated, use ReplaceTryItSecurityPanel instead"),this.hooks.ReplaceTryItSecurityPanel=this.hooks.ReplaceTryItAuthPanel),this.hideSchemaPattern=argValueToBoolean(a.hideSchemaPattern),this.hideOneOfDescription=argValueToBoolean(a.hideOneOfDescription),this.hideFab=argValueToBoolean(a.hideFab)}return Object.defineProperty(e,"normalizeExpandResponses",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if("all"===e)return"all";if("string"==typeof e){var a={};return e.split(",").forEach((function(e){a[e.trim()]=!0})),a}return void 0!==e&&console.warn('expandResponses must be a string but received value "'+e+'" of type '+typeof e),{}}}),Object.defineProperty(e,"normalizeHideHostname",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return!!e}}),Object.defineProperty(e,"normalizeScrollYOffset",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if("string"==typeof e&&!isNumeric(e)){var a=querySelector(e);a||console.warn("scrollYOffset value is a selector to non-existing element. Using offset 0 by default");var t=a&&a.getBoundingClientRect().bottom||0;return function(){return t}}return"number"==typeof e||isNumeric(e)?function(){return"number"==typeof e?e:parseFloat(e)}:"function"==typeof e?function(){var a=e();return"number"!=typeof a&&console.warn('scrollYOffset should return number but returned value "'+a+'" of type '+typeof a),a}:(void 0!==e&&console.warn("Wrong value for scrollYOffset ReDoc option: should be string, number or function"),function(){return 0})}}),Object.defineProperty(e,"normalizeShowExtensions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(void 0===e)return!1;if(""===e)return!0;if("string"!=typeof e)return e;switch(e){case"true":return!0;case"false":return!1;default:return e.split(",").map((function(e){return e.trim()}))}}}),Object.defineProperty(e,"normalizePayloadSampleIdx",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return"number"==typeof e?Math.max(0,e):"string"==typeof e&&isFinite(e)?parseInt(e,10):0}}),__decorate([observable],e.prototype,"showConsole",void 0),e}();export{RedocNormalizedOptions};
2
2
  //# sourceMappingURL=RedocNormalizedOptions.js.map
@@ -1,4 +1,4 @@
1
- import { RedocNormalizedOptions } from './RedocNormalizedOptions';
1
+ import type { RedocNormalizedOptions } from './RedocNormalizedOptions';
2
2
  export declare class ScrollService {
3
3
  private options;
4
4
  private readonly _scrollParent;
@@ -1,8 +1,8 @@
1
- import { OpenAPIExternalDocumentation, OpenAPIDefinition } from '../types';
2
- import { ContentItemModel } from './MenuBuilder';
1
+ import type { OpenAPIExternalDocumentation, OpenAPIDefinition } from '../types';
2
+ import type { ContentItemModel } from './MenuBuilder';
3
3
  import { ApiInfoModel, SecuritySchemesModel, WebhookModel } from './models';
4
4
  import { OpenAPIParser } from './OpenAPIParser';
5
- import { RedocProNormalizedOptions } from '../../../services';
5
+ import type { RedocProNormalizedOptions } from '../../../services';
6
6
  /**
7
7
  * Store that contains all the specification related information in the form of tree
8
8
  */
@@ -1,5 +1,5 @@
1
- import { OpenAPIContact, OpenAPIInfo, OpenAPILicense } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
1
+ import type { OpenAPIContact, OpenAPIInfo, OpenAPILicense } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
3
  export declare class ApiInfoModel implements OpenAPIInfo {
4
4
  private parser;
5
5
  title: string;
@@ -1,7 +1,7 @@
1
- import { OpenAPICallback, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
1
+ import type { OpenAPICallback, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
3
  import { OperationModel } from './Operation';
4
- import { RedocProNormalizedOptions } from '../../../../services/ProStore';
4
+ import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
5
5
  export declare class CallbackModel {
6
6
  expanded: boolean;
7
7
  name: string;
@@ -1,5 +1,5 @@
1
- import { OpenAPIEncoding, OpenAPIExample, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
1
+ import type { OpenAPIEncoding, OpenAPIExample, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
3
  export declare class ExampleModel {
4
4
  mime: string;
5
5
  value: any;
@@ -1,7 +1,8 @@
1
- import { OpenAPIParameter, OpenAPIParameterLocation, OpenAPIParameterStyle, Referenced } from '../../types';
2
- import { RedocProNormalizedOptions } from '../../../../services';
3
- import { OpenAPIParser } from '../OpenAPIParser';
4
- import { SchemaModel, Deps } from './Schema';
1
+ import type { OpenAPIParameter, OpenAPIParameterLocation, OpenAPIParameterStyle, Referenced } from '../../types';
2
+ import type { RedocProNormalizedOptions } from '../../../../services';
3
+ import type { OpenAPIParser } from '../OpenAPIParser';
4
+ import type { Deps } from './Schema';
5
+ import { SchemaModel } from './Schema';
5
6
  import { ExampleModel } from './Example';
6
7
  /**
7
8
  * Field or Parameter model ready to be used by components
@@ -1,7 +1,7 @@
1
- import { OpenAPIExternalDocumentation, OpenAPITag } from '../../types';
2
- import { MarkdownHeading } from '../MarkdownRenderer';
3
- import { ContentItemModel } from '../MenuBuilder';
4
- import { IMenuItem, MenuItemGroupType } from '../MenuStore';
1
+ import type { OpenAPIExternalDocumentation, OpenAPITag } from '../../types';
2
+ import type { MarkdownHeading } from '../MarkdownRenderer';
3
+ import type { ContentItemModel } from '../MenuBuilder';
4
+ import type { IMenuItem, MenuItemGroupType } from '../MenuStore';
5
5
  /**
6
6
  * Operations Group model ready to be used by components
7
7
  */
@@ -1,9 +1,9 @@
1
- import { OpenAPIMediaType } from '../../types';
1
+ import type { OpenAPIMediaType } from '../../types';
2
2
  import { MediaTypeModel } from './MediaType';
3
- import { OpenAPIParser } from '../OpenAPIParser';
4
- import { RedocProNormalizedOptions } from '../../../../services/ProStore';
5
- import { OperationModel } from './Operation';
6
- import { ResponseModel } from './Response';
3
+ import type { OpenAPIParser } from '../OpenAPIParser';
4
+ import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
5
+ import type { OperationModel } from './Operation';
6
+ import type { ResponseModel } from './Response';
7
7
  /**
8
8
  * MediaContent model ready to be sued by React components
9
9
  * Contains multiple MediaTypes and keeps track of the currently active one
@@ -1,10 +1,10 @@
1
- import { OpenAPIMediaType } from '../../types';
2
- import { RedocProNormalizedOptions } from '../../../../services/ProStore';
1
+ import type { OpenAPIMediaType } from '../../types';
2
+ import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
3
3
  import { SchemaModel } from './Schema';
4
- import { OpenAPIParser } from '../OpenAPIParser';
4
+ import type { OpenAPIParser } from '../OpenAPIParser';
5
5
  import { ExampleModel } from './Example';
6
- import { OperationModel } from './Operation';
7
- import { ResponseModel } from './Response';
6
+ import type { OperationModel } from './Operation';
7
+ import type { ResponseModel } from './Response';
8
8
  export declare class MediaTypeModel {
9
9
  options: RedocProNormalizedOptions;
10
10
  examples?: {
@@ -1,16 +1,16 @@
1
- import { IMenuItem } from '../MenuStore';
2
- import { GroupModel } from './Group.model';
1
+ import type { IMenuItem } from '../MenuStore';
2
+ import type { GroupModel } from './Group.model';
3
3
  import { SecurityRequirementModel } from './SecurityRequirement';
4
- import { OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXCodeSample, Server } from '../../types';
5
- import { ContentItemModel, ExtendedOpenAPIOperation } from '../MenuBuilder';
6
- import { OpenAPIParser } from '../OpenAPIParser';
7
- import { Unstable_ExternalCodeSample } from '../RedocNormalizedOptions';
4
+ import type { OpenAPIExternalDocumentation, OpenAPIServer, OpenAPIXCodeSample, Server } from '../../types';
5
+ import type { ContentItemModel, ExtendedOpenAPIOperation } from '../MenuBuilder';
6
+ import type { OpenAPIParser } from '../OpenAPIParser';
7
+ import type { Unstable_ExternalCodeSample } from '../RedocNormalizedOptions';
8
8
  import { CallbackModel } from './Callback';
9
9
  import { FieldModel } from './Field';
10
- import { MediaContentModel } from './MediaContent';
10
+ import type { MediaContentModel } from './MediaContent';
11
11
  import { RequestBodyModel } from './RequestBody';
12
12
  import { ResponseModel } from './Response';
13
- import { RedocProNormalizedOptions } from '../../../../services';
13
+ import type { RedocProNormalizedOptions } from '../../../../services';
14
14
  export interface Sample {
15
15
  lang: string;
16
16
  label?: string;
@@ -1,8 +1,8 @@
1
- import { OpenAPIRequestBody, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
3
- import { RedocProNormalizedOptions } from '../../../../services/ProStore';
1
+ import type { OpenAPIRequestBody, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
+ import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
4
4
  import { MediaContentModel } from './MediaContent';
5
- import { OperationModel } from './Operation';
5
+ import type { OperationModel } from './Operation';
6
6
  declare type RequestBodyProps = {
7
7
  parser: OpenAPIParser;
8
8
  infoOrRef: Referenced<OpenAPIRequestBody>;
@@ -1,9 +1,9 @@
1
- import { OpenAPIResponse, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
3
- import { RedocProNormalizedOptions } from '../../../../services/ProStore';
1
+ import type { OpenAPIResponse, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
+ import type { RedocProNormalizedOptions } from '../../../../services/ProStore';
4
4
  import { FieldModel } from './Field';
5
5
  import { MediaContentModel } from './MediaContent';
6
- import { OperationModel } from './Operation';
6
+ import type { OperationModel } from './Operation';
7
7
  declare type ResponseProps = {
8
8
  parser: OpenAPIParser;
9
9
  code: string;
@@ -1,9 +1,9 @@
1
- import { OpenAPIExternalDocumentation, OpenAPISchema, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
3
- import { RedocProNormalizedOptions } from '../../../../services';
1
+ import type { OpenAPIExternalDocumentation, OpenAPISchema, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
+ import type { RedocProNormalizedOptions } from '../../../../services';
4
4
  import { FieldModel } from './Field';
5
- import { MergedOpenAPISchema, ResponseModel } from '../';
6
- import { OperationModel } from './Operation';
5
+ import type { MergedOpenAPISchema, ResponseModel } from '../';
6
+ import type { OperationModel } from './Operation';
7
7
  export declare type Deps = {
8
8
  parentFieldFullPath?: string;
9
9
  operation?: OperationModel;
@@ -1,5 +1,5 @@
1
- import { OpenAPISecurityRequirement, OpenAPISecurityScheme } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
1
+ import type { OpenAPISecurityRequirement, OpenAPISecurityScheme } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
3
  export interface SecurityScheme extends OpenAPISecurityScheme {
4
4
  id: string;
5
5
  sectionId: string;
@@ -1,5 +1,5 @@
1
- import { OpenAPISecurityScheme, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
1
+ import type { OpenAPISecurityScheme, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
3
  export declare class SecuritySchemeModel {
4
4
  id: string;
5
5
  sectionId: string;
@@ -1,7 +1,7 @@
1
- import { OpenAPIPath, Referenced } from '../../types';
2
- import { OpenAPIParser } from '../OpenAPIParser';
1
+ import type { OpenAPIPath, Referenced } from '../../types';
2
+ import type { OpenAPIParser } from '../OpenAPIParser';
3
3
  import { OperationModel } from './Operation';
4
- import { RedocProNormalizedOptions } from '../../../../services';
4
+ import type { RedocProNormalizedOptions } from '../../../../services';
5
5
  export declare class WebhookModel {
6
6
  operations: OperationModel[];
7
7
  constructor(parser: OpenAPIParser, options: RedocProNormalizedOptions, infoOrRef?: Referenced<OpenAPIPath>);
@@ -1,6 +1,6 @@
1
1
  import * as styledComponents from 'styled-components';
2
- import { ResolvedThemeInterface, MediaValue } from './theme';
3
- import { ProTheme } from '../../services/extendTheme';
2
+ import type { ResolvedThemeInterface, MediaValue } from './theme';
3
+ import type { ProTheme } from '../../services/extendTheme';
4
4
  export type { ResolvedThemeInterface, MediaValue };
5
5
  declare const styled: styledComponents.ThemedStyledInterface<ProTheme>, css: styledComponents.ThemedCssFunction<ProTheme>, createGlobalStyle: <P extends object = {}>(first: TemplateStringsArray | styledComponents.CSSObject | styledComponents.InterpolationFunction<styledComponents.ThemedStyledProps<P, ProTheme>>, ...interpolations: styledComponents.Interpolation<styledComponents.ThemedStyledProps<P, ProTheme>>[]) => styledComponents.GlobalStyleComponent<P, ProTheme>, keyframes: (strings: TemplateStringsArray | styledComponents.CSSKeyframes, ...interpolations: styledComponents.SimpleInterpolation[]) => styledComponents.Keyframes, ThemeProvider: styledComponents.ThemeProviderComponent<ProTheme, ProTheme>;
6
6
  export { css, createGlobalStyle, keyframes, ThemeProvider };
@@ -1,5 +1,5 @@
1
- import { Omit } from './index';
2
- import { Sample } from '../services';
1
+ import type { Omit } from './index';
2
+ import type { Sample } from '../services';
3
3
  export interface OpenAPIDefinition {
4
4
  openapi: string;
5
5
  info: OpenAPIInfo;
@@ -20,9 +20,9 @@ export declare function flattenByProp<T extends GenericObject, P extends keyof T
20
20
  export declare function stripTrailingSlash(path: string): string;
21
21
  export declare function isNumeric(value: unknown): value is number;
22
22
  export declare function appendToMdHeading(md: string, heading: string, content: string): string;
23
- export declare const mergeObjects: (target: GenericObject, ...sources: GenericObject[]) => any;
24
- export declare const isObject: (item: any) => boolean;
25
- export declare const isMergebleObject: (item: any) => boolean;
23
+ export declare const mergeObjects: (target: GenericObject, ...sources: GenericObject[]) => GenericObject;
24
+ export declare const isObject: (item: unknown) => item is "object";
25
+ export declare const isMergeableObject: (item: unknown) => boolean;
26
26
  /**
27
27
  * slugify() returns empty string when failed to slugify.
28
28
  * so try to return minimum slugified-string with failed one which keeps original value
@@ -1,2 +1,2 @@
1
- import{__assign,__spreadArray}from"tslib";import slugify from"slugify";import{format,parse}from"url";import{ZERO_BREAKPOINT}from"./media-css";import{isNamedDefinition}from"./openapi";import JsonPointer from"./JsonPointer";export function mapWithLast(e,r){for(var t=[],n=0;n<e.length-1;n++)t.push(r(e[n],!1));return 0!==e.length&&t.push(r(e[e.length-1],!0)),t}export function mapValues(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=r(e[n],n,e));return t}export function flattenByProp(e,r){var t=[],n=function(e){for(var i=0,o=e;i<o.length;i++){var a=o[i];t.push(a),a[r]&&n(a[r])}};return n(e),t}export function stripTrailingSlash(e){return e.endsWith("/")?e.substring(0,e.length-1):e}export function isNumeric(e){return!isNaN(parseFloat(e))&&isFinite(e)}export function appendToMdHeading(e,r,t){var n=new RegExp("(^|\\n)#\\s?"+r+"\\s*\\n","i"),i=new RegExp("((\\n|^)#\\s*"+r+"\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)","i");if(n.test(e))return e.replace(i,"$1\n\n"+t+"\n$4");var o=""===e||e.endsWith("\n\n")?"":e.endsWith("\n")?"\n":"\n\n";return""+e+o+"# "+r+"\n\n"+t}export var mergeObjects=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if(!r.length)return e;var n=r.shift();return void 0===n?e:(isMergebleObject(e)&&isMergebleObject(n)&&Object.keys(n).forEach((function(r){var t;isMergebleObject(n[r])?(e[r]||(e[r]={}),["string","number"].includes(typeof e[r])&&(n[r][ZERO_BREAKPOINT]||0===n[r][ZERO_BREAKPOINT]||console.warn('Theme resolver: using default value of "'+e[r]+'" for "'+r+'". This is not recommended. Prefer adding default value by providing "'+ZERO_BREAKPOINT+'" property to '+JSON.stringify(n[r])+"."),e[r]=((t={})[ZERO_BREAKPOINT]=e[r],t)),mergeObjects(e[r],n[r])):e[r]=n[r]})),mergeObjects.apply(void 0,__spreadArray([e],r,!1)))};export var isObject=function(e){return null!==e&&"object"==typeof e};export var isMergebleObject=function(e){return isObject(e)&&!Array.isArray(e)};export function safeSlugify(e){return slugify(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}export function isAbsoluteUrl(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}export function resolveUrl(e,r){var t;if(r.startsWith("//"))t=""+(parse(e).protocol||"https:")+r;else if(isAbsoluteUrl(r))t=r;else if(r.startsWith("/")){var n=parse(e);t=format(__assign(__assign({},n),{pathname:r}))}else t=stripTrailingSlash(e)+"/"+r;return stripTrailingSlash(t)}export function getBasePath(e){try{return parseURL(e).pathname}catch(r){return e}}export function titleize(e){return e.charAt(0).toUpperCase()+e.slice(1)}export function removeQueryString(e){try{var r=parseURL(e);return r.search="",r.toString()}catch(r){return e}}function parseURL(e){return"undefined"==typeof URL?new(require("url").URL)(e):new URL(e)}export function unescapeHTMLChars(e){return e.replace(/&#(\d+);/g,(function(e,r){return String.fromCharCode(parseInt(r,10))})).replace(/&amp;/g,"&")}export function sanitizeItemId(e){return e&&e.replace(/#/g,"_")}export function getSchemaTitle(e,r){return r||isNamedDefinition(e)&&JsonPointer.baseName(e)||""}
1
+ import{__assign,__spreadArray}from"tslib";import slugify from"slugify";import{format,parse}from"url";import{ZERO_BREAKPOINT}from"./media-css";import{isNamedDefinition}from"./openapi";import JsonPointer from"./JsonPointer";export function mapWithLast(e,r){for(var t=[],n=0;n<e.length-1;n++)t.push(r(e[n],!1));return 0!==e.length&&t.push(r(e[e.length-1],!0)),t}export function mapValues(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=r(e[n],n,e));return t}export function flattenByProp(e,r){var t=[],n=function(e){for(var i=0,a=e;i<a.length;i++){var o=a[i];t.push(o),o[r]&&n(o[r])}};return n(e),t}export function stripTrailingSlash(e){return e.endsWith("/")?e.substring(0,e.length-1):e}export function isNumeric(e){return!isNaN(parseFloat(e))&&isFinite(e)}export function appendToMdHeading(e,r,t){var n=new RegExp("(^|\\n)#\\s?"+r+"\\s*\\n","i"),i=new RegExp("((\\n|^)#\\s*"+r+"\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)","i");if(n.test(e))return e.replace(i,"$1\n\n"+t+"\n$4");var a=""===e||e.endsWith("\n\n")?"":e.endsWith("\n")?"\n":"\n\n";return""+e+a+"# "+r+"\n\n"+t}export var mergeObjects=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if(!r.length)return e;var n=r.shift();return void 0===n?e:(isMergeableObject(e)&&isMergeableObject(n)&&Object.keys(n).forEach((function(r){var t;isMergeableObject(n[r])?(e[r]||(e[r]={}),["string","number"].includes(typeof e[r])&&(n[r][ZERO_BREAKPOINT]||0===n[r][ZERO_BREAKPOINT]||console.warn('Theme resolver: using default value of "'+e[r]+'" for "'+r+'". This is not recommended. Prefer adding default value by providing "'+ZERO_BREAKPOINT+'" property to '+JSON.stringify(n[r])+"."),e[r]=((t={})[ZERO_BREAKPOINT]=e[r],t)),mergeObjects(e[r],n[r])):e[r]=n[r]})),mergeObjects.apply(void 0,__spreadArray([e],r,!1)))};export var isObject=function(e){return null!==e&&"object"==typeof e};export var isMergeableObject=function(e){return isObject(e)&&!Array.isArray(e)};export function safeSlugify(e){return slugify(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}export function isAbsoluteUrl(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}export function resolveUrl(e,r){var t;if(r.startsWith("//"))t=""+(parse(e).protocol||"https:")+r;else if(isAbsoluteUrl(r))t=r;else if(r.startsWith("/")){var n=parse(e);t=format(__assign(__assign({},n),{pathname:r}))}else t=stripTrailingSlash(e)+"/"+r;return stripTrailingSlash(t)}export function getBasePath(e){try{return parseURL(e).pathname}catch(r){return e}}export function titleize(e){return e.charAt(0).toUpperCase()+e.slice(1)}export function removeQueryString(e){try{var r=parseURL(e);return r.search="",r.toString()}catch(r){return e}}function parseURL(e){return"undefined"==typeof URL?new(require("url").URL)(e):new URL(e)}export function unescapeHTMLChars(e){return e.replace(/&#(\d+);/g,(function(e,r){return String.fromCharCode(parseInt(r,10))})).replace(/&amp;/g,"&")}export function sanitizeItemId(e){return e&&e.replace(/#/g,"_")}export function getSchemaTitle(e,r){return r||isNamedDefinition(e)&&JsonPointer.baseName(e)||""}
2
2
  //# sourceMappingURL=helpers.js.map
@@ -1,4 +1,4 @@
1
- import { Document } from '@redocly/openapi-core';
1
+ import type { Document } from '@redocly/openapi-core';
2
2
  import type { OpenAPIDefinition } from '../types';
3
3
  export declare function loadAndBundleDefinition(specUrlOrObject: GenericObject | string): Promise<OpenAPIDefinition>;
4
4
  export declare function createParsedDocument(specUrlOrObject: GenericObject | string): Document;
@@ -1,4 +1,4 @@
1
- import { MediaValue } from '../theme';
1
+ import type { MediaValue } from '../theme';
2
2
  export declare const ZERO_BREAKPOINT = "_";
3
3
  export declare function mediaMap<T extends string | number>(breakpoints: {
4
4
  [size: string]: string;
@@ -1,6 +1,6 @@
1
- import { FieldModel } from '../services/models';
2
- import { OpenAPIParser } from '../services/OpenAPIParser';
3
- import { OpenAPIEncoding, OpenAPIMediaType, OpenAPIOperation, OpenAPIParameter, OpenAPIParameterStyle, OpenAPISchema, OpenAPIServer, Referenced, OpenAPIResponse, OpenAPIRequestBody } from '../types';
1
+ import type { FieldModel } from '../services/models';
2
+ import type { OpenAPIParser } from '../services/OpenAPIParser';
3
+ import type { OpenAPIEncoding, OpenAPIMediaType, OpenAPIOperation, OpenAPIParameter, OpenAPIParameterStyle, OpenAPISchema, OpenAPIServer, Referenced, OpenAPIResponse, OpenAPIRequestBody } from '../types';
4
4
  export declare function isStatusCode(statusCode: string): boolean;
5
5
  export declare function getStatusCodeType(statusCode: string | number, defaultAsError?: boolean): string;
6
6
  export declare function isOperationName(key: string): boolean;
@@ -1,5 +1,5 @@
1
- import { IMenuItem, ScrollService, HistoryService, MenuItemType, SchemaModel, SpecStore } from '../redoc-lib';
2
- import { RedocProNormalizedOptions } from './ProStore';
1
+ import type { IMenuItem, ScrollService, HistoryService, MenuItemType, SchemaModel, SpecStore } from '../redoc-lib';
2
+ import type { RedocProNormalizedOptions } from './ProStore';
3
3
  import { VersionedSpecStore } from './VersionedSpecStore';
4
4
  export declare type ExtendedMenuItem = Omit<IMenuItem, 'type'> & {
5
5
  type: MenuItemType | 'spec';
@@ -1,29 +1,16 @@
1
- import { IValueDidChange } from 'mobx';
2
- import { ContentItemModel, IMenuItem, MarkerService, OperationModel, RedocNormalizedOptions, RedocRawOptions, SearchStore, SpecStore, OpenAPIExternalDocumentation, OpenAPIDefinition } from '../redoc-lib';
1
+ import type { IValueDidChange } from 'mobx';
2
+ import type { ContentItemModel, IMenuItem, OpenAPIDefinition, OpenAPIExternalDocumentation, OperationModel, RedocRawOptions, SearchStore } from '../redoc-lib';
3
+ import { MarkerService, RedocNormalizedOptions, SpecStore } from '../redoc-lib';
3
4
  import { ProMenu } from './ProMenu';
4
- import { SearchResultMeta } from './SearchStore';
5
- import { ThemeExtension } from './extendTheme';
6
- import { SpecVersions, VersionedSpecStore } from './VersionedSpecStore';
7
- import { LicenseInfo } from './check';
8
- import { CodeSamplesConfig, Languages } from './code-samples/';
9
- import { Events, LayoutVariant } from './store-types';
10
- export declare type Normalized<T> = {
11
- [P in keyof T]-?: T[P];
12
- };
13
- export declare type RedocProTheme = RedocRawOptions['theme'] & ThemeExtension;
14
- export declare type MarkdownItemsPagination = 'none' | 'section';
15
- export declare type Pagination = 'none' | 'section' | 'item';
16
- export declare type ExternalLink = ExternalLinkLink | ExternalLinkSeparator;
17
- export declare type ExternalLinkLink = {
18
- label: string;
19
- link: string;
20
- target?: string;
21
- separatorLine?: boolean;
22
- };
23
- export declare type ExternalLinkSeparator = {
24
- separator?: string;
25
- separatorLine?: boolean;
26
- };
5
+ import type { SearchResultMeta } from './SearchStore';
6
+ import type { SpecVersions } from './VersionedSpecStore';
7
+ import { VersionedSpecStore } from './VersionedSpecStore';
8
+ import type { LicenseInfo } from './check';
9
+ import type { CodeSamplesConfig, Languages } from './code-samples/';
10
+ import type { Events } from './store-types';
11
+ import { LayoutVariant } from './store-types';
12
+ import type { ExternalLink, MarkdownItemsPagination, Normalized, Pagination, RedocProTheme } from './types';
13
+ import { SideNavStyle } from './types';
27
14
  export declare type RedocProUserOptionsExt = {
28
15
  licenseKey?: string;
29
16
  searchMode?: 'default' | 'path-only';
@@ -31,7 +18,7 @@ export declare type RedocProUserOptionsExt = {
31
18
  searchTagTitleBoost?: number | string;
32
19
  searchFieldLevelBoost?: number | string;
33
20
  searchAutoExpand?: boolean;
34
- sideNavStyle?: 'summary-only' | 'path-first';
21
+ sideNavStyle?: SideNavStyle;
35
22
  showConsole?: boolean;
36
23
  hideLogo?: boolean;
37
24
  whiteLabel?: boolean;
@@ -1,2 +1,2 @@
1
- var _a;import{__assign,__awaiter,__decorate,__generator}from"tslib";import{action,makeObservable,observable,observe}from"mobx";import{bundle,Config}from"@redocly/openapi-core";import{bind,debounce}from"decko";import{IS_BROWSER,MarkerService,RedocNormalizedOptions,ScrollService,SecurityDefs,SpecStore,SECURITY_DEFINITIONS_COMPONENT_NAME,SECURITY_DEFINITIONS_JSX_NAME,SCHEMA_DEFINITION_JSX_NAME,SchemaDefinition,createParsedDocument}from"../redoc-lib";import{FakeHistoryService,ProHashHistoryService,PushStateHistoryService}from"./history";import{ProMenu}from"./ProMenu";import{DeepSearchStore,RemoteSearch,DEFAULT_SEARCH_MAX_DEPTH}from"./SearchStore";import{extendTheme}from"./extendTheme";import{RedocResponse,PullRight}from"../components/pluggable";import{VersionedSpecStore}from"./VersionedSpecStore";import parseToken from"./check";import{normalizePath}from"./utils";import{fromSessionStorage,toSessionStorage,toLocalStorage,fromLocalStorage,setGlobalStore}from"../utils";import{LayoutVariant}from"./store-types";var global="undefined"==typeof window?{__REDOCLY_SEARCH_URL:void 0}:window,NestingGroup=function(){function e(e,t,i,o){var n=this;Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"absoluteIdx",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"linkable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"externalDocs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"active",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"expanded",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"depth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"level",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this),this.id="section/"+e,this.type="nesting-group",this.name=i||"",this.level=1,this.depth=1,this.description="",this.parent=void 0,this.expanded=!1,this.items=t,this.linkable=!!o,t.forEach((function(e){return e.parent=n})),increaseDepthDeep(t)}return Object.defineProperty(e.prototype,"activate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!0}}),Object.defineProperty(e.prototype,"expand",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!0,this.parent&&this.parent.expand()}}),Object.defineProperty(e.prototype,"collapse",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!1}}),Object.defineProperty(e.prototype,"deactivate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!1}}),__decorate([observable],e.prototype,"active",void 0),__decorate([observable],e.prototype,"expanded",void 0),__decorate([action],e.prototype,"activate",null),__decorate([action],e.prototype,"expand",null),__decorate([action],e.prototype,"collapse",null),__decorate([action],e.prototype,"deactivate",null),e}();export{NestingGroup};function increaseDepthDeep(e){Array.isArray(e)&&e.forEach((function(e){e.depth++,e.parent&&"group"===e.parent.type&&(e.depth=e.parent.depth),increaseDepthDeep(e.items)}))}var ProStore=function(){function e(e,t,i,o){var n=this;void 0===i&&(i={}),void 0===o&&(o=!0),Object.defineProperty(this,"rawOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"menu",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"marker",{enumerable:!0,configurable:!0,writable:!0,value:new MarkerService}),Object.defineProperty(this,"scroll",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"disposer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"search",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tryItOperation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showRightPanel",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"layout",{enumerable:!0,configurable:!0,writable:!0,value:LayoutVariant.THREE_PANEL}),Object.defineProperty(this,"activeSampleLanguage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isLoading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"l",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this),this.initProOptions(i),IS_BROWSER&&(this.l=parseToken(i.licenseKey),this.l.then((function(e){e.valid&&e.allowed&&!e.expired||e.local||(n.menu.items=[],n.menu.flatItems=n.menu.flatItems.slice(0,1),n.menu.renderItems=[])})));var r="object"==typeof e&&"versions"in e,a=this.options.disableSidebar?new FakeHistoryService(this.options):"browser"===this.options.routingStrategy?new PushStateHistoryService(this.options,r):new ProHashHistoryService(this.options,r);this.definition=r?new VersionedSpecStore(e,this.options,a.currentId.split("/")[0]):new SpecStore(e,t,this.options),i.downloadDefinitionUrl&&(this.definition.info.downloadFileName=""),this.scroll=new ScrollService(this.options),this.options.disableSidebar||ProMenu.updateOnHistory(a.currentId,this.scroll),this.menu=new ProMenu(this.definition,this.scroll,this.options,a),this.menu.initOnHistory(),this.options.disableSearch||this.initSearch(this.options,o),this.disposer=observe(this.menu,"none"===this.options.pagination?"activeItemIdx":"activeRenderItemIdx",(function(e){setTimeout((function(){return n.updateMarkOnMenu(e.newValue)}))})),setGlobalStore(this)}return Object.defineProperty(e.prototype,"initProOptions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n,r;e=deepClone(e),this.rawOptions=extendTheme(e),this.options=new RedocNormalizedOptions(this.rawOptions,DEFAULT_OPTIONS),this.options.showConsole=null===(t=this.rawOptions.showConsole)||void 0===t||t,this.options.hideRightPanel=null!==(i=this.rawOptions.hideRightPanel)&&void 0!==i&&i,this.showRightPanel=!this.options.hideRightPanel,this.options.showRightPanelToggle=null===(o=this.rawOptions.showRightPanelToggle)||void 0===o||o,this.options.showChangeLayoutButton=null===(n=this.rawOptions.showChangeLayoutButton)||void 0===n||n,this.options.layout=this.rawOptions.layout||LayoutVariant.THREE_PANEL,this.options.defaultSampleLanguage=this.rawOptions.defaultSampleLanguage||"",this.options.deepLinkSeparator=this.rawOptions.deepLinkSeparator||"/",this.options.deepLinkPrefix=this.rawOptions.deepLinkPrefix||"!",this.options.disableDeepLinks=this.rawOptions.disableDeepLinks||!1,this.options.sideNavStyle=this.rawOptions.sideNavStyle||"summary-only",this.options.whiteLabel=!!this.rawOptions.whiteLabel,this.options.hideLogo=!!this.rawOptions.hideLogo,this.options.hideInfoSection=!!this.rawOptions.hideInfoSection,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.events=this.rawOptions.events||{},this.options.corsProxyUrl=this.rawOptions.corsProxyUrl?addTrailingSlash(this.rawOptions.corsProxyUrl):null,this.options.authCorsProxyUrl=this.rawOptions.authCorsProxyUrl?addTrailingSlash(this.rawOptions.authCorsProxyUrl):null,this.options.theme.scrollYOffset=this.options.scrollYOffset,this.options.linkForId=this.rawOptions.linkForId||null,this.options.generateDeepLink=this.rawOptions.generateDeepLink||null,this.options.onDeepLinkClick=this.rawOptions.onDeepLinkClick||null,this.options.requestInterceptor=this.rawOptions.requestInterceptor||null,this.options.sidebarLinks=this.rawOptions.sidebarLinks||{};var a="object"==typeof this.rawOptions.layout?this.rawOptions.layout:null;if(this.options.pagination=this.rawOptions.pagination||"none",this.options.routingStrategy="none"===this.options.pagination?"hash":"browser",!(null===(r=this.rawOptions)||void 0===r?void 0:r.pagination)&&(null==a?void 0:a.scope))switch(console.warn('"layout.scope" and "routingStrategy" settings are deprecated. Please, use "pagination" instead.'),null==a?void 0:a.scope){case"all":default:this.options.pagination="none",this.options.routingStrategy="hash";break;case"section":this.options.pagination="section",this.options.routingStrategy="browser";break;case"item":this.options.pagination="item",this.options.routingStrategy="browser"}this.options.markdownItemsPagination="none",!1!==this.rawOptions.showNextButton&&(this.options.showNextButton=!0),this.options.disableSidebar=!!e.disableSidebar,this.options.disableSidebar&&(this.options.theme.sidebar.width="0px"),this.options.skipBundleAndConvert=!!e.skipBundleAndConvert,this.options.routingBasePath=e.routingBasePath&&normalizePath(e.routingBasePath)||"",this.options.searchAutoExpand=!1!==e.searchAutoExpand,this.options.searchMode=e.searchMode||"default",this.options.ctrlFHijack=void 0===e.ctrlFHijack||e.ctrlFHijack,this.options.disablePaginationLoadingAnimation=!!e.disablePaginationLoadingAnimation||"none"===this.options.pagination,this.options.showConsole,this.options.generateCodeSamples=e.generateCodeSamples||{languages:[]},this.options.searchMaxDepth=this.rawOptions.searchMaxDepth||DEFAULT_SEARCH_MAX_DEPTH}}),Object.defineProperty(e.prototype,"initSearch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var i=this;global.__REDOCLY_SEARCH_URL?this.search=new RemoteSearch(global.__REDOCLY_SEARCH_URL):this.search=new DeepSearchStore(e),t&&setTimeout((function(){var e;return null===(e=i.search)||void 0===e?void 0:e.indexItems(i.menu.items)}),50),this.definition instanceof VersionedSpecStore&&observe(this.definition,"activeVersionIdx",(function(t){var o,n,r=i.definition;null===(o=i.search)||void 0===o||o.dispose(),i.search=new DeepSearchStore(e);var a=r.versions[t.newValue]._searchIndexName;if(IS_BROWSER&&a){var s=r.versions[t.newValue]._searchIndexName,l=new URL(window.location.href);l.pathname=joinURLs(i.options.routingBasePath,s),null===(n=i.search)||void 0===n||n.fromExternalJS(l.toString(),__redoc_state.searchIndexExport),i.observeAllAndRemark()}else setTimeout((function(){var e;null===(e=i.search)||void 0===e||e.indexItems(i.menu.items)}),0)})),IS_BROWSER&&this.observeAllAndRemark()}}),Object.defineProperty(e.prototype,"onDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.menu.updateOnHistory(),this.updateMarkOnMenu(this.menu.activeItemIdx),this.layout=fromLocalStorage("layoutVariant")||this.options.layout||this.layout,this.activeSampleLanguage=fromLocalStorage("activeSampleLanguage")||this.options.defaultSampleLanguage,this.options.showRightPanelToggle){var e=fromSessionStorage("showRightPanelToggleState");e&&(this.showRightPanel="true"===e)}}}),Object.defineProperty(e.prototype,"toggleRightPanel",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.showRightPanel=null!=e?e:!this.showRightPanel,toSessionStorage("showRightPanelToggleState",JSON.stringify(this.showRightPanel))}}),Object.defineProperty(e.prototype,"toggleLayout",{enumerable:!1,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=LayoutVariant.THREE_PANEL),this.layout=e,toLocalStorage("layoutVariant",e)}}),Object.defineProperty(e.prototype,"disableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!1}}),Object.defineProperty(e.prototype,"enableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!0}}),Object.defineProperty(e.prototype,"tryItOut",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.tryItOperation=e}}),Object.defineProperty(e.prototype,"setActiveSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.activeSampleLanguage===e)return this.stopLoader();this.activeSampleLanguage=e,toLocalStorage("activeSampleLanguage",e)}}),Object.defineProperty(e.prototype,"activateSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.setActiveSampleLanguage(e)}}),Object.defineProperty(e.prototype,"startLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading||(this.isLoading=!0)}}),Object.defineProperty(e.prototype,"stopLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading&&(this.isLoading=!1)}}),Object.defineProperty(e.prototype,"dereferenceSpecForTryIt",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n;return __awaiter(this,void 0,void 0,(function(){var r,a,s,l,p,u,c;return __generator(this,(function(h){switch(h.label){case 0:return r=this.definition.parser.definition,a=JSON.parse(JSON.stringify(r)),s=__assign(__assign({},getSpecVersionObj(a)),{components:a.components,paths:(u={},u[e.path]=(c={},c[e.httpVerb]=null===(i=null===(t=a.paths)||void 0===t?void 0:t[e.path])||void 0===i?void 0:i[e.httpVerb],c.parameters=null===(n=null===(o=a.paths)||void 0===o?void 0:o[e.path])||void 0===n?void 0:n.parameters,c),u)}),l=new Config({}),p=createParsedDocument(s),[4,bundle({config:l,doc:p,dereference:!0})];case 1:return h.sent(),[2,a]}}))}))}}),Object.defineProperty(e.prototype,"observeAllAndRemark",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=function(i){for(var o=0,n=i;o<n.length;o++){var r=n[o];if("operation"===r.type)for(var a=0,s=r.responses;a<s.length;a++){var l=s[a];observe(l,"expanded",(function(t){return e.remark(t)}))}else"tag"===r.type&&t(r.items||[])}};t(this.menu.renderItems),"none"!==this.options.pagination&&observe(this.menu,"renderItems",(function(){return t(e.menu.renderItems)}))}}),Object.defineProperty(e.prototype,"remark",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e.newValue&&setTimeout((function(){return t.marker.mark()}),0)}}),Object.defineProperty(e,"fromJS",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var i,o=new e(t.definition.data,t.definition.url,t.options,!1);setGlobalStore(o),o.menu.activeItemIdx=void 0!==t.menu.activeItemIdx?t.menu.activeItemIdx:-1,o.definition instanceof VersionedSpecStore&&t.definition.activeVersionIdx&&(o.definition.activeVersionIdx=t.definition.activeVersionIdx||0);var n=o.menu.flatItems[o.menu.activeItemIdx];if(n&&o.menu.activate(n,!1),!o.options.disableSearch){var r=new URL(window.location.href);r.pathname=t.searchIndexPath&&t.searchIndexPath.startsWith("/")?t.searchIndexPath:r.pathname+(r.pathname.endsWith("/")?"":"/")+t.searchIndexPath,null===(i=o.search)||void 0===i||i.fromExternalJS(r.toString(),t.searchIndexExport)}return t.tryItOperationId&&(o.tryItOperation=o.menu.flatItems.find((function(e){return e.id===t.tryItOperationId}))),setTimeout((function(){return o.observeAllAndRemark()}),0),o}}),Object.defineProperty(e.prototype,"toJS",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(o){switch(o.label){case 0:return i={menu:{activeItemIdx:this.menu.activeItemIdx},definition:this.definition instanceof VersionedSpecStore?{url:void 0,data:this.definition.toJS()}:{url:this.definition.parser.definitionUrl,data:this.definition.parser.definition}},this.search?[4,this.search.toJS()]:[3,2];case 1:return t=o.sent(),[3,3];case 2:t=void 0,o.label=3;case 3:return[2,(i.searchIndex=t,i.options=this.rawOptions,i.tryItOperationId=null===(e=this.tryItOperation)||void 0===e?void 0:e.id,i)]}}))}))}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.scroll.dispose(),this.menu.dispose(),this.search&&this.search.dispose(),this.disposer()}}),Object.defineProperty(e.prototype,"updateMarkOnMenu",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=Math.max(0,e),i=Math.min(this.menu.flatItems.length,t+5),o=[],n=t;n<i;n++){(r=this.menu.getElementAt(n))&&(r&&o.push(r))}if("item"===this.options.pagination){var r,a=(this.menu.flatItems[e]||{}).parent;if(null==a?void 0:a.absoluteIdx)(r=this.menu.getElementAt(a.absoluteIdx))&&o.push(r)}this.marker.addOnly(o),this.marker.mark()}}),__decorate([observable],e.prototype,"search",void 0),__decorate([observable],e.prototype,"tryItOperation",void 0),__decorate([observable],e.prototype,"showRightPanel",void 0),__decorate([observable],e.prototype,"layout",void 0),__decorate([observable],e.prototype,"activeSampleLanguage",void 0),__decorate([observable],e.prototype,"isLoading",void 0),__decorate([action],e.prototype,"onDidMount",null),__decorate([action],e.prototype,"toggleRightPanel",null),__decorate([action],e.prototype,"toggleLayout",null),__decorate([action],e.prototype,"disableConsole",null),__decorate([action],e.prototype,"enableConsole",null),__decorate([action],e.prototype,"tryItOut",null),__decorate([action],e.prototype,"setActiveSampleLanguage",null),__decorate([bind,debounce(500)],e.prototype,"activateSampleLanguage",null),__decorate([action],e.prototype,"startLoader",null),__decorate([action],e.prototype,"stopLoader",null),e}();export{ProStore};var DEFAULT_OPTIONS={ignoreNamedSchemas:["java.io.ObjectStreamField"],allowedMdComponents:(_a={RedocResponse:{component:RedocResponse,propsSelector:function(e){return{store:e}}},PullRight:{component:PullRight,propsSelector:function(){return{}}}},_a[SECURITY_DEFINITIONS_COMPONENT_NAME]={component:SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[SECURITY_DEFINITIONS_JSX_NAME]={component:SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[SCHEMA_DEFINITION_JSX_NAME]={component:SchemaDefinition,propsSelector:function(e){return{parser:e.definition.parser,options:e.options,layout:e.layout,showRightPanel:e.showRightPanel}}},_a)};function joinURLs(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),t.startsWith("/")&&(t=t.substring(1)),e+"/"+t}function addTrailingSlash(e){return e.endsWith("/")?e:e+"/"}function getSpecVersionObj(e){return e.openapi?{openapi:e.openapi}:e.swagger?{swagger:e.swagger}:void 0}function deepClone(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e){var o=e[i];t[i]=deepClone(o)}return t}
1
+ var _a;import{__assign,__awaiter,__decorate,__generator}from"tslib";import{action,makeObservable,observable,observe}from"mobx";import{bundle,Config}from"@redocly/openapi-core";import{bind,debounce}from"decko";import{createParsedDocument,IS_BROWSER,MarkerService,RedocNormalizedOptions,SCHEMA_DEFINITION_JSX_NAME,SchemaDefinition,ScrollService,SECURITY_DEFINITIONS_COMPONENT_NAME,SECURITY_DEFINITIONS_JSX_NAME,SecurityDefs,SpecStore}from"../redoc-lib";import{FakeHistoryService,ProHashHistoryService,PushStateHistoryService}from"./history";import{ProMenu}from"./ProMenu";import{DeepSearchStore,DEFAULT_SEARCH_MAX_DEPTH,RemoteSearch}from"./SearchStore";import{extendTheme}from"./extendTheme";import{PullRight,RedocResponse}from"../components/pluggable";import{VersionedSpecStore}from"./VersionedSpecStore";import parseToken from"./check";import{normalizePath}from"./utils";import{fromLocalStorage,fromSessionStorage,setGlobalStore,toLocalStorage,toSessionStorage}from"../utils";import{LayoutVariant}from"./store-types";import{SideNavStyle}from"./types";var global="undefined"==typeof window?{__REDOCLY_SEARCH_URL:void 0}:window,NestingGroup=function(){function e(e,t,i,o){var n=this;Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"absoluteIdx",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"linkable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"externalDocs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"active",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"expanded",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"depth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"level",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this),this.id="section/"+e,this.type="nesting-group",this.name=i||"",this.level=1,this.depth=1,this.description="",this.parent=void 0,this.expanded=!1,this.items=t,this.linkable=!!o,t.forEach((function(e){return e.parent=n})),increaseDepthDeep(t)}return Object.defineProperty(e.prototype,"activate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!0}}),Object.defineProperty(e.prototype,"expand",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!0,this.parent&&this.parent.expand()}}),Object.defineProperty(e.prototype,"collapse",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!1}}),Object.defineProperty(e.prototype,"deactivate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!1}}),__decorate([observable],e.prototype,"active",void 0),__decorate([observable],e.prototype,"expanded",void 0),__decorate([action],e.prototype,"activate",null),__decorate([action],e.prototype,"expand",null),__decorate([action],e.prototype,"collapse",null),__decorate([action],e.prototype,"deactivate",null),e}();export{NestingGroup};function increaseDepthDeep(e){Array.isArray(e)&&e.forEach((function(e){e.depth++,e.parent&&"group"===e.parent.type&&(e.depth=e.parent.depth),increaseDepthDeep(e.items)}))}var ProStore=function(){function e(e,t,i,o){var n=this;void 0===i&&(i={}),void 0===o&&(o=!0),Object.defineProperty(this,"rawOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"menu",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"marker",{enumerable:!0,configurable:!0,writable:!0,value:new MarkerService}),Object.defineProperty(this,"scroll",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"disposer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"search",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tryItOperation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showRightPanel",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"layout",{enumerable:!0,configurable:!0,writable:!0,value:LayoutVariant.THREE_PANEL}),Object.defineProperty(this,"activeSampleLanguage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isLoading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"l",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this),this.initProOptions(i),IS_BROWSER&&(this.l=parseToken(i.licenseKey),this.l.then((function(e){e.valid&&e.allowed&&!e.expired||e.local||(n.menu.items=[],n.menu.flatItems=n.menu.flatItems.slice(0,1),n.menu.renderItems=[])})));var r="object"==typeof e&&"versions"in e,a=this.options.disableSidebar?new FakeHistoryService(this.options):"browser"===this.options.routingStrategy?new PushStateHistoryService(this.options,r):new ProHashHistoryService(this.options,r);this.definition=r?new VersionedSpecStore(e,this.options,a.currentId.split("/")[0]):new SpecStore(e,t,this.options),i.downloadDefinitionUrl&&(this.definition.info.downloadFileName=""),this.scroll=new ScrollService(this.options),this.options.disableSidebar||ProMenu.updateOnHistory(a.currentId,this.scroll),this.menu=new ProMenu(this.definition,this.scroll,this.options,a),this.menu.initOnHistory(),this.options.disableSearch||this.initSearch(this.options,o),this.disposer=observe(this.menu,"none"===this.options.pagination?"activeItemIdx":"activeRenderItemIdx",(function(e){setTimeout((function(){return n.updateMarkOnMenu(e.newValue)}))})),setGlobalStore(this)}return Object.defineProperty(e.prototype,"initProOptions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n,r;e=deepClone(e),this.rawOptions=extendTheme(e),this.options=new RedocNormalizedOptions(this.rawOptions,DEFAULT_OPTIONS),this.options.showConsole=null===(t=this.rawOptions.showConsole)||void 0===t||t,this.options.hideRightPanel=null!==(i=this.rawOptions.hideRightPanel)&&void 0!==i&&i,this.showRightPanel=!this.options.hideRightPanel,this.options.showRightPanelToggle=null===(o=this.rawOptions.showRightPanelToggle)||void 0===o||o,this.options.showChangeLayoutButton=null===(n=this.rawOptions.showChangeLayoutButton)||void 0===n||n,this.options.layout=this.rawOptions.layout||LayoutVariant.THREE_PANEL,this.options.defaultSampleLanguage=this.rawOptions.defaultSampleLanguage||"",this.options.deepLinkSeparator=this.rawOptions.deepLinkSeparator||"/",this.options.deepLinkPrefix=this.rawOptions.deepLinkPrefix||"!",this.options.disableDeepLinks=this.rawOptions.disableDeepLinks||!1,this.options.sideNavStyle=this.rawOptions.sideNavStyle||SideNavStyle.SummaryOnly,this.options.whiteLabel=!!this.rawOptions.whiteLabel,this.options.hideLogo=!!this.rawOptions.hideLogo,this.options.hideInfoSection=!!this.rawOptions.hideInfoSection,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.events=this.rawOptions.events||{},this.options.corsProxyUrl=this.rawOptions.corsProxyUrl?addTrailingSlash(this.rawOptions.corsProxyUrl):null,this.options.authCorsProxyUrl=this.rawOptions.authCorsProxyUrl?addTrailingSlash(this.rawOptions.authCorsProxyUrl):null,this.options.theme.scrollYOffset=this.options.scrollYOffset,this.options.linkForId=this.rawOptions.linkForId||null,this.options.generateDeepLink=this.rawOptions.generateDeepLink||null,this.options.onDeepLinkClick=this.rawOptions.onDeepLinkClick||null,this.options.requestInterceptor=this.rawOptions.requestInterceptor||null,this.options.sidebarLinks=this.rawOptions.sidebarLinks||{};var a="object"==typeof this.rawOptions.layout?this.rawOptions.layout:null;if(this.options.pagination=this.rawOptions.pagination||"none",this.options.routingStrategy="none"===this.options.pagination?"hash":"browser",!(null===(r=this.rawOptions)||void 0===r?void 0:r.pagination)&&(null==a?void 0:a.scope))switch(console.warn('"layout.scope" and "routingStrategy" settings are deprecated. Please, use "pagination" instead.'),null==a?void 0:a.scope){case"all":default:this.options.pagination="none",this.options.routingStrategy="hash";break;case"section":this.options.pagination="section",this.options.routingStrategy="browser";break;case"item":this.options.pagination="item",this.options.routingStrategy="browser"}this.options.markdownItemsPagination="none",!1!==this.rawOptions.showNextButton&&(this.options.showNextButton=!0),this.options.disableSidebar=!!e.disableSidebar,this.options.disableSidebar&&(this.options.theme.sidebar.width="0px"),this.options.skipBundleAndConvert=!!e.skipBundleAndConvert,this.options.routingBasePath=e.routingBasePath&&normalizePath(e.routingBasePath)||"",this.options.searchAutoExpand=!1!==e.searchAutoExpand,this.options.searchMode=e.searchMode||"default",this.options.ctrlFHijack=void 0===e.ctrlFHijack||e.ctrlFHijack,this.options.disablePaginationLoadingAnimation=!!e.disablePaginationLoadingAnimation||"none"===this.options.pagination,this.options.showConsole,this.options.generateCodeSamples=e.generateCodeSamples||{languages:[]},this.options.searchMaxDepth=this.rawOptions.searchMaxDepth||DEFAULT_SEARCH_MAX_DEPTH}}),Object.defineProperty(e.prototype,"initSearch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var i=this;global.__REDOCLY_SEARCH_URL?this.search=new RemoteSearch(global.__REDOCLY_SEARCH_URL):this.search=new DeepSearchStore(e),t&&setTimeout((function(){var e;return null===(e=i.search)||void 0===e?void 0:e.indexItems(i.menu.items)}),50),this.definition instanceof VersionedSpecStore&&observe(this.definition,"activeVersionIdx",(function(t){var o,n,r=i.definition;null===(o=i.search)||void 0===o||o.dispose(),i.search=new DeepSearchStore(e);var a=r.versions[t.newValue]._searchIndexName;if(IS_BROWSER&&a){var s=r.versions[t.newValue]._searchIndexName,l=new URL(window.location.href);l.pathname=joinURLs(i.options.routingBasePath,s),null===(n=i.search)||void 0===n||n.fromExternalJS(l.toString(),__redoc_state.searchIndexExport),i.observeAllAndRemark()}else setTimeout((function(){var e;null===(e=i.search)||void 0===e||e.indexItems(i.menu.items)}),0)})),IS_BROWSER&&this.observeAllAndRemark()}}),Object.defineProperty(e.prototype,"onDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.menu.updateOnHistory(),this.updateMarkOnMenu(this.menu.activeItemIdx),this.layout=fromLocalStorage("layoutVariant")||this.options.layout||this.layout,this.activeSampleLanguage=fromLocalStorage("activeSampleLanguage")||this.options.defaultSampleLanguage,this.options.showRightPanelToggle){var e=fromSessionStorage("showRightPanelToggleState");e&&(this.showRightPanel="true"===e)}}}),Object.defineProperty(e.prototype,"toggleRightPanel",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.showRightPanel=null!=e?e:!this.showRightPanel,toSessionStorage("showRightPanelToggleState",JSON.stringify(this.showRightPanel))}}),Object.defineProperty(e.prototype,"toggleLayout",{enumerable:!1,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=LayoutVariant.THREE_PANEL),this.layout=e,toLocalStorage("layoutVariant",e)}}),Object.defineProperty(e.prototype,"disableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!1}}),Object.defineProperty(e.prototype,"enableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!0}}),Object.defineProperty(e.prototype,"tryItOut",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.tryItOperation=e}}),Object.defineProperty(e.prototype,"setActiveSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.activeSampleLanguage===e)return this.stopLoader();this.activeSampleLanguage=e,toLocalStorage("activeSampleLanguage",e)}}),Object.defineProperty(e.prototype,"activateSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.setActiveSampleLanguage(e)}}),Object.defineProperty(e.prototype,"startLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading||(this.isLoading=!0)}}),Object.defineProperty(e.prototype,"stopLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading&&(this.isLoading=!1)}}),Object.defineProperty(e.prototype,"dereferenceSpecForTryIt",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n;return __awaiter(this,void 0,void 0,(function(){var r,a,s,l,p,u,c;return __generator(this,(function(h){switch(h.label){case 0:return r=this.definition.parser.definition,a=JSON.parse(JSON.stringify(r)),s=__assign(__assign({},getSpecVersionObj(a)),{components:a.components,paths:(u={},u[e.path]=(c={},c[e.httpVerb]=null===(i=null===(t=a.paths)||void 0===t?void 0:t[e.path])||void 0===i?void 0:i[e.httpVerb],c.parameters=null===(n=null===(o=a.paths)||void 0===o?void 0:o[e.path])||void 0===n?void 0:n.parameters,c),u)}),l=new Config({}),p=createParsedDocument(s),[4,bundle({config:l,doc:p,dereference:!0})];case 1:return h.sent(),[2,a]}}))}))}}),Object.defineProperty(e.prototype,"observeAllAndRemark",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=function(i){for(var o=0,n=i;o<n.length;o++){var r=n[o];if("operation"===r.type)for(var a=0,s=r.responses;a<s.length;a++){var l=s[a];observe(l,"expanded",(function(t){return e.remark(t)}))}else"tag"===r.type&&t(r.items||[])}};t(this.menu.renderItems),"none"!==this.options.pagination&&observe(this.menu,"renderItems",(function(){return t(e.menu.renderItems)}))}}),Object.defineProperty(e.prototype,"remark",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e.newValue&&setTimeout((function(){return t.marker.mark()}),0)}}),Object.defineProperty(e,"fromJS",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var i,o=new e(t.definition.data,t.definition.url,t.options,!1);setGlobalStore(o),o.menu.activeItemIdx=void 0!==t.menu.activeItemIdx?t.menu.activeItemIdx:-1,o.definition instanceof VersionedSpecStore&&t.definition.activeVersionIdx&&(o.definition.activeVersionIdx=t.definition.activeVersionIdx||0);var n=o.menu.flatItems[o.menu.activeItemIdx];if(n&&o.menu.activate(n,!1),!o.options.disableSearch){var r=new URL(window.location.href);r.pathname=t.searchIndexPath&&t.searchIndexPath.startsWith("/")?t.searchIndexPath:r.pathname+(r.pathname.endsWith("/")?"":"/")+t.searchIndexPath,null===(i=o.search)||void 0===i||i.fromExternalJS(r.toString(),t.searchIndexExport)}return t.tryItOperationId&&(o.tryItOperation=o.menu.flatItems.find((function(e){return e.id===t.tryItOperationId}))),setTimeout((function(){return o.observeAllAndRemark()}),0),o}}),Object.defineProperty(e.prototype,"toJS",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(o){switch(o.label){case 0:return i={menu:{activeItemIdx:this.menu.activeItemIdx},definition:this.definition instanceof VersionedSpecStore?{url:void 0,data:this.definition.toJS()}:{url:this.definition.parser.definitionUrl,data:this.definition.parser.definition}},this.search?[4,this.search.toJS()]:[3,2];case 1:return t=o.sent(),[3,3];case 2:t=void 0,o.label=3;case 3:return[2,(i.searchIndex=t,i.options=this.rawOptions,i.tryItOperationId=null===(e=this.tryItOperation)||void 0===e?void 0:e.id,i)]}}))}))}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.scroll.dispose(),this.menu.dispose(),this.search&&this.search.dispose(),this.disposer()}}),Object.defineProperty(e.prototype,"updateMarkOnMenu",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=Math.max(0,e),i=Math.min(this.menu.flatItems.length,t+5),o=[],n=t;n<i;n++){(r=this.menu.getElementAt(n))&&(r&&o.push(r))}if("item"===this.options.pagination){var r,a=(this.menu.flatItems[e]||{}).parent;if(null==a?void 0:a.absoluteIdx)(r=this.menu.getElementAt(a.absoluteIdx))&&o.push(r)}this.marker.addOnly(o),this.marker.mark()}}),__decorate([observable],e.prototype,"search",void 0),__decorate([observable],e.prototype,"tryItOperation",void 0),__decorate([observable],e.prototype,"showRightPanel",void 0),__decorate([observable],e.prototype,"layout",void 0),__decorate([observable],e.prototype,"activeSampleLanguage",void 0),__decorate([observable],e.prototype,"isLoading",void 0),__decorate([action],e.prototype,"onDidMount",null),__decorate([action],e.prototype,"toggleRightPanel",null),__decorate([action],e.prototype,"toggleLayout",null),__decorate([action],e.prototype,"disableConsole",null),__decorate([action],e.prototype,"enableConsole",null),__decorate([action],e.prototype,"tryItOut",null),__decorate([action],e.prototype,"setActiveSampleLanguage",null),__decorate([bind,debounce(500)],e.prototype,"activateSampleLanguage",null),__decorate([action],e.prototype,"startLoader",null),__decorate([action],e.prototype,"stopLoader",null),e}();export{ProStore};var DEFAULT_OPTIONS={ignoreNamedSchemas:["java.io.ObjectStreamField"],allowedMdComponents:(_a={RedocResponse:{component:RedocResponse,propsSelector:function(e){return{store:e}}},PullRight:{component:PullRight,propsSelector:function(){return{}}}},_a[SECURITY_DEFINITIONS_COMPONENT_NAME]={component:SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[SECURITY_DEFINITIONS_JSX_NAME]={component:SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[SCHEMA_DEFINITION_JSX_NAME]={component:SchemaDefinition,propsSelector:function(e){return{parser:e.definition.parser,options:e.options,layout:e.layout,showRightPanel:e.showRightPanel}}},_a)};function joinURLs(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),t.startsWith("/")&&(t=t.substring(1)),e+"/"+t}function addTrailingSlash(e){return e.endsWith("/")?e:e+"/"}function getSpecVersionObj(e){return e.openapi?{openapi:e.openapi}:e.swagger?{swagger:e.swagger}:void 0}function deepClone(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e){var o=e[i];t[i]=deepClone(o)}return t}
2
2
  //# sourceMappingURL=ProStore.js.map
@@ -1,5 +1,6 @@
1
- import { IMenuItem, OperationModel, RedocNormalizedOptions, SearchResult, SearchStore } from '../redoc-lib';
2
- import { RedocProUserOptionsExt } from './ProStore';
1
+ import type { IMenuItem, OperationModel, RedocNormalizedOptions, SearchResult } from '../redoc-lib';
2
+ import { SearchStore } from '../redoc-lib';
3
+ import type { RedocProUserOptionsExt } from './ProStore';
3
4
  export declare type SearchResultMeta = {
4
5
  place?: string;
5
6
  path?: string[];
@@ -1,5 +1,6 @@
1
- import { SpecStore, OpenAPIDefinition, ApiInfoModel, OpenAPIParser, OpenAPIExternalDocumentation, SecuritySchemesModel, ContentItemModel } from '../redoc-lib';
2
- import { RedocProNormalizedOptions } from './ProStore';
1
+ import type { OpenAPIDefinition, ApiInfoModel, OpenAPIParser, OpenAPIExternalDocumentation, SecuritySchemesModel, ContentItemModel } from '../redoc-lib';
2
+ import { SpecStore } from '../redoc-lib';
3
+ import type { RedocProNormalizedOptions } from './ProStore';
3
4
  interface VersionInfo {
4
5
  id: string;
5
6
  title: string;
@@ -1,6 +1,6 @@
1
- import { OperationModel, ServerVariables } from '../../redoc-lib';
2
- import * as HAR from './har';
3
- import { Languages } from './types';
1
+ import type { OperationModel, ServerVariables } from '../../redoc-lib';
2
+ import type * as HAR from './har';
3
+ import type { Languages } from './types';
4
4
  export declare type CustomHAR = HAR.Request & {
5
5
  securityOAuth2ExtraCalls?: HAR.Request[];
6
6
  basicAuth?: {
@@ -1,5 +1,5 @@
1
- import { SnippetRequest } from '../index';
2
- import { CodeBuilder } from './code-builder';
1
+ import type { SnippetRequest } from '../index';
2
+ import type { CodeBuilder } from './code-builder';
3
3
  export declare function getPreserveTransformer({ body, authorizationHeader, }: {
4
4
  body?: boolean;
5
5
  authorizationHeader?: boolean;
@@ -1,5 +1,5 @@
1
- import { CustomHAR } from '..';
2
- import { PostData } from '../har';
1
+ import type { CustomHAR } from '..';
2
+ import type { PostData } from '../har';
3
3
  interface ParsedUrlQueryInput {
4
4
  [key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null;
5
5
  }
@@ -1,5 +1,5 @@
1
- import { CSharpCodeSampleConfig } from '../../../types';
2
- import { LanguageHandler } from '../..';
1
+ import type { CSharpCodeSampleConfig } from '../../../types';
2
+ import type { LanguageHandler } from '../..';
3
3
  declare const handler: LanguageHandler<CSharpCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,5 +1,5 @@
1
- import { LanguageHandler } from '../..';
2
- import { GoCodeSampleConfig } from '../../../types';
1
+ import type { LanguageHandler } from '../..';
2
+ import type { GoCodeSampleConfig } from '../../../types';
3
3
  declare const handler: LanguageHandler<GoCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;
@@ -1,5 +1,5 @@
1
- import { JavaCodeSampleConfig } from '../../../types';
2
- import { LanguageHandler } from '../..';
1
+ import type { JavaCodeSampleConfig } from '../../../types';
2
+ import type { LanguageHandler } from '../..';
3
3
  declare const handler: LanguageHandler<JavaCodeSampleConfig['options']>;
4
4
  export declare const info: {
5
5
  key: string;