@vritti/quantum-ui 0.2.10 → 0.3.0

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 (939) hide show
  1. package/dist/Alert.js +4 -32
  2. package/dist/Alert.js.map +1 -1
  3. package/dist/AppSelector.js +37 -0
  4. package/dist/AppSelector.js.map +1 -0
  5. package/dist/Avatar.js +6 -6
  6. package/dist/Avatar.js.map +1 -1
  7. package/dist/Badge2.js +3 -3
  8. package/dist/Breadcrumb.js +125 -0
  9. package/dist/Breadcrumb.js.map +1 -0
  10. package/dist/Button.js +9 -5
  11. package/dist/Button.js.map +1 -1
  12. package/dist/Button2.js +4 -4
  13. package/dist/Button2.js.map +1 -1
  14. package/dist/Card.js +1 -1
  15. package/dist/CardSkeleton.js +17 -0
  16. package/dist/CardSkeleton.js.map +1 -0
  17. package/dist/Chart.js +6196 -6402
  18. package/dist/Chart.js.map +1 -1
  19. package/dist/Checkbox2.js +7 -6
  20. package/dist/Checkbox2.js.map +1 -1
  21. package/dist/CheckboxGroup.js +74 -0
  22. package/dist/CheckboxGroup.js.map +1 -0
  23. package/dist/CloudProviderSelector.js +37 -0
  24. package/dist/CloudProviderSelector.js.map +1 -0
  25. package/dist/Collapsible.js +8 -0
  26. package/dist/Collapsible.js.map +1 -0
  27. package/dist/Combination.js +10 -2509
  28. package/dist/Combination.js.map +1 -1
  29. package/dist/ConfirmContext.js +75 -0
  30. package/dist/ConfirmContext.js.map +1 -0
  31. package/dist/CurrencySelector.js +194 -0
  32. package/dist/CurrencySelector.js.map +1 -0
  33. package/dist/DangerZoneSkeleton.js +52 -0
  34. package/dist/DangerZoneSkeleton.js.map +1 -0
  35. package/dist/DatePicker.js +36 -18
  36. package/dist/DatePicker.js.map +1 -1
  37. package/dist/DeploymentSelector.js +37 -0
  38. package/dist/DeploymentSelector.js.map +1 -0
  39. package/dist/Dialog.js +159 -0
  40. package/dist/Dialog.js.map +1 -0
  41. package/dist/DropdownMenu.js +66 -1493
  42. package/dist/DropdownMenu.js.map +1 -1
  43. package/dist/Empty.js +49 -0
  44. package/dist/Empty.js.map +1 -0
  45. package/dist/ErrorBoundary.js +255 -0
  46. package/dist/ErrorBoundary.js.map +1 -0
  47. package/dist/FeatureSelector.js +37 -0
  48. package/dist/FeatureSelector.js.map +1 -0
  49. package/dist/FilePreview.js +194 -0
  50. package/dist/FilePreview.js.map +1 -0
  51. package/dist/Form.js +1922 -20
  52. package/dist/Form.js.map +1 -1
  53. package/dist/HierarchyGraph.js +10729 -0
  54. package/dist/HierarchyGraph.js.map +1 -0
  55. package/dist/IndustrySelector.js +37 -0
  56. package/dist/IndustrySelector.js.map +1 -0
  57. package/dist/Input.js +22 -0
  58. package/dist/Input.js.map +1 -0
  59. package/dist/Label.js +2 -22
  60. package/dist/Label.js.map +1 -1
  61. package/dist/LocaleSelector.js +111 -0
  62. package/dist/LocaleSelector.js.map +1 -0
  63. package/dist/MicrofrontendSelector.js +19 -0
  64. package/dist/MicrofrontendSelector.js.map +1 -0
  65. package/dist/OTPField.js +29 -27
  66. package/dist/OTPField.js.map +1 -1
  67. package/dist/PageHeaderSkeleton.js +35 -0
  68. package/dist/PageHeaderSkeleton.js.map +1 -0
  69. package/dist/PasswordField.js +2 -50
  70. package/dist/PasswordField.js.map +1 -1
  71. package/dist/PhoneField.js +9 -14
  72. package/dist/PhoneField.js.map +1 -1
  73. package/dist/PlanSelector.js +37 -0
  74. package/dist/PlanSelector.js.map +1 -0
  75. package/dist/Progress.js +5 -4
  76. package/dist/Progress.js.map +1 -1
  77. package/dist/RadioGroup.js +392 -0
  78. package/dist/RadioGroup.js.map +1 -0
  79. package/dist/RegionSelector.js +37 -0
  80. package/dist/RegionSelector.js.map +1 -0
  81. package/dist/Select.js +780 -0
  82. package/dist/Select.js.map +1 -0
  83. package/dist/SelectFilter.js +387 -0
  84. package/dist/SelectFilter.js.map +1 -0
  85. package/dist/Sidebar.js +616 -0
  86. package/dist/Sidebar.js.map +1 -0
  87. package/dist/SingleSelect.js +429 -0
  88. package/dist/SingleSelect.js.map +1 -0
  89. package/dist/Skeleton.js +1 -1
  90. package/dist/Sonner.js +2 -1134
  91. package/dist/Sonner.js.map +1 -1
  92. package/dist/Sortable.js +4517 -0
  93. package/dist/Sortable.js.map +1 -0
  94. package/dist/Spinner.js +1 -1
  95. package/dist/StepProgressIndicator.js +42 -0
  96. package/dist/StepProgressIndicator.js.map +1 -0
  97. package/dist/Switch.js +16 -16
  98. package/dist/Switch.js.map +1 -1
  99. package/dist/TabsSkeleton.js +188 -0
  100. package/dist/TabsSkeleton.js.map +1 -0
  101. package/dist/TextArea.js +17 -20
  102. package/dist/TextArea.js.map +1 -1
  103. package/dist/TextField.js +3 -19
  104. package/dist/TextField.js.map +1 -1
  105. package/dist/TimezoneSelector.js +144 -0
  106. package/dist/TimezoneSelector.js.map +1 -0
  107. package/dist/Toggle.js +3 -33
  108. package/dist/Toggle.js.map +1 -1
  109. package/dist/Typography.js +1 -1
  110. package/dist/UploadFile.js +232 -0
  111. package/dist/UploadFile.js.map +1 -0
  112. package/dist/ValueFilter.js +123 -0
  113. package/dist/ValueFilter.js.map +1 -0
  114. package/dist/ViewTabs.js +218 -0
  115. package/dist/ViewTabs.js.map +1 -0
  116. package/dist/_commonjsHelpers.js +3 -1
  117. package/dist/_commonjsHelpers.js.map +1 -1
  118. package/dist/assets/quantum-ui.css +808 -38
  119. package/dist/axios.js +4575 -0
  120. package/dist/axios.js.map +1 -0
  121. package/dist/circle-alert.js +19 -0
  122. package/dist/circle-alert.js.map +1 -0
  123. package/dist/circle-check.js +18 -0
  124. package/dist/circle-check.js.map +1 -0
  125. package/dist/collapsible2.js +154 -0
  126. package/dist/collapsible2.js.map +1 -0
  127. package/dist/components/Breadcrumb.js +2 -0
  128. package/dist/components/Breadcrumb.js.map +1 -0
  129. package/dist/components/Card.js +1 -0
  130. package/dist/components/Card.js.map +1 -1
  131. package/dist/components/CheckboxGroup.js +2 -0
  132. package/dist/components/CheckboxGroup.js.map +1 -0
  133. package/dist/components/Collapsible.js +2 -0
  134. package/dist/components/Collapsible.js.map +1 -0
  135. package/dist/components/DangerZone.js +2 -0
  136. package/dist/components/DangerZone.js.map +1 -0
  137. package/dist/components/DataTable.js +1 -1
  138. package/dist/components/Dialog.js +2 -0
  139. package/dist/components/Dialog.js.map +1 -0
  140. package/dist/components/DropdownMenu.js +1 -1
  141. package/dist/components/Empty.js +2 -0
  142. package/dist/components/Empty.js.map +1 -0
  143. package/dist/components/ErrorBoundary.js +2 -0
  144. package/dist/components/ErrorBoundary.js.map +1 -0
  145. package/dist/components/FilePreview.js +2 -0
  146. package/dist/components/FilePreview.js.map +1 -0
  147. package/dist/components/HierarchyGraph.js +2 -0
  148. package/dist/components/HierarchyGraph.js.map +1 -0
  149. package/dist/components/PageHeader.js +2 -0
  150. package/dist/components/PageHeader.js.map +1 -0
  151. package/dist/components/RadioGroup.js +2 -0
  152. package/dist/components/RadioGroup.js.map +1 -0
  153. package/dist/components/RichTextEditor.js +4 -0
  154. package/dist/components/RichTextEditor.js.map +1 -0
  155. package/dist/components/Select.js +6 -1356
  156. package/dist/components/Select.js.map +1 -1
  157. package/dist/components/Sidebar.js +2 -0
  158. package/dist/components/Sidebar.js.map +1 -0
  159. package/dist/components/Sortable.js +2 -0
  160. package/dist/components/Sortable.js.map +1 -0
  161. package/dist/components/StepProgressIndicator.js +2 -0
  162. package/dist/components/StepProgressIndicator.js.map +1 -0
  163. package/dist/components/Tabs.js +2 -0
  164. package/dist/components/Tabs.js.map +1 -0
  165. package/dist/components/UploadFile.js +2 -0
  166. package/dist/components/UploadFile.js.map +1 -0
  167. package/dist/components/ValueFilter.js +2 -0
  168. package/dist/components/ValueFilter.js.map +1 -0
  169. package/dist/components/ViewTabs.js +2 -0
  170. package/dist/components/ViewTabs.js.map +1 -0
  171. package/dist/context/index.js +1 -0
  172. package/dist/context/index.js.map +1 -1
  173. package/dist/dropdown-menu.js +1209 -0
  174. package/dist/dropdown-menu.js.map +1 -0
  175. package/dist/ellipsis.js +19 -0
  176. package/dist/ellipsis.js.map +1 -0
  177. package/dist/eye.js +52 -0
  178. package/dist/eye.js.map +1 -0
  179. package/dist/field.js +2 -2
  180. package/dist/file-text.js +27 -0
  181. package/dist/file-text.js.map +1 -0
  182. package/dist/grip-vertical.js +22 -0
  183. package/dist/grip-vertical.js.map +1 -0
  184. package/dist/hooks/index.js +3 -1
  185. package/dist/hooks/index.js.map +1 -1
  186. package/dist/image-component.js +614 -0
  187. package/dist/image-component.js.map +1 -0
  188. package/dist/index.js +48 -12
  189. package/dist/index.js.map +1 -1
  190. package/dist/index10.js +181 -11
  191. package/dist/index10.js.map +1 -1
  192. package/dist/index11.js +177 -4
  193. package/dist/index11.js.map +1 -1
  194. package/dist/index12.js +17 -38
  195. package/dist/index12.js.map +1 -1
  196. package/dist/index13.js +204 -188
  197. package/dist/index13.js.map +1 -1
  198. package/dist/index14.js +124 -192
  199. package/dist/index14.js.map +1 -1
  200. package/dist/index15.js +79 -0
  201. package/dist/index15.js.map +1 -0
  202. package/dist/index16.js +16 -0
  203. package/dist/index16.js.map +1 -0
  204. package/dist/index17.js +1137 -0
  205. package/dist/index17.js.map +1 -0
  206. package/dist/index18.js +41 -0
  207. package/dist/index18.js.map +1 -0
  208. package/dist/index19.js +314 -0
  209. package/dist/index19.js.map +1 -0
  210. package/dist/index2.js +54030 -59
  211. package/dist/index2.js.map +1 -1
  212. package/dist/index20.js +488 -0
  213. package/dist/index20.js.map +1 -0
  214. package/dist/index21.js +2540 -0
  215. package/dist/index21.js.map +1 -0
  216. package/dist/index22.js +36 -0
  217. package/dist/index22.js.map +1 -0
  218. package/dist/index23.js +13 -0
  219. package/dist/index23.js.map +1 -0
  220. package/dist/index24.js +8 -0
  221. package/dist/index24.js.map +1 -0
  222. package/dist/index25.js +35 -0
  223. package/dist/index25.js.map +1 -0
  224. package/dist/index26.js +65 -0
  225. package/dist/index26.js.map +1 -0
  226. package/dist/index27.js +16 -0
  227. package/dist/index27.js.map +1 -0
  228. package/dist/index28.js +41 -0
  229. package/dist/index28.js.map +1 -0
  230. package/dist/index29.js +84 -0
  231. package/dist/index29.js.map +1 -0
  232. package/dist/index3.js +41 -61
  233. package/dist/index3.js.map +1 -1
  234. package/dist/index30.js +199 -0
  235. package/dist/index30.js.map +1 -0
  236. package/dist/index4.js +290 -92
  237. package/dist/index4.js.map +1 -1
  238. package/dist/index5.js +102 -42
  239. package/dist/index5.js.map +1 -1
  240. package/dist/index6.js +35 -8
  241. package/dist/index6.js.map +1 -1
  242. package/dist/index7.js +1141 -110
  243. package/dist/index7.js.map +1 -1
  244. package/dist/index8.js +19 -34
  245. package/dist/index8.js.map +1 -1
  246. package/dist/index9.js +27 -4
  247. package/dist/index9.js.map +1 -1
  248. package/dist/lib/components/Breadcrumb/Breadcrumb.d.ts +17 -0
  249. package/dist/lib/components/Breadcrumb/Breadcrumb.d.ts.map +1 -0
  250. package/dist/lib/components/Breadcrumb/index.d.ts +4 -0
  251. package/dist/lib/components/Breadcrumb/index.d.ts.map +1 -0
  252. package/dist/lib/components/Button/Button.d.ts +3 -1
  253. package/dist/lib/components/Button/Button.d.ts.map +1 -1
  254. package/dist/lib/components/Card/CardSkeleton.d.ts +9 -0
  255. package/dist/lib/components/Card/CardSkeleton.d.ts.map +1 -0
  256. package/dist/lib/components/Card/index.d.ts +1 -0
  257. package/dist/lib/components/Card/index.d.ts.map +1 -1
  258. package/dist/lib/components/Chart/Chart.d.ts +1 -1
  259. package/dist/lib/components/Chart/Chart.d.ts.map +1 -1
  260. package/dist/lib/components/CheckboxGroup/CheckboxGroup.d.ts +24 -0
  261. package/dist/lib/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -0
  262. package/dist/lib/components/CheckboxGroup/index.d.ts +3 -0
  263. package/dist/lib/components/CheckboxGroup/index.d.ts.map +1 -0
  264. package/dist/lib/components/Collapsible/Collapsible.d.ts +5 -0
  265. package/dist/lib/components/Collapsible/Collapsible.d.ts.map +1 -0
  266. package/dist/lib/components/Collapsible/index.d.ts +2 -0
  267. package/dist/lib/components/Collapsible/index.d.ts.map +1 -0
  268. package/dist/lib/components/DangerZone/DangerZone.d.ts +13 -0
  269. package/dist/lib/components/DangerZone/DangerZone.d.ts.map +1 -0
  270. package/dist/lib/components/DangerZone/DangerZoneSkeleton.d.ts +9 -0
  271. package/dist/lib/components/DangerZone/DangerZoneSkeleton.d.ts.map +1 -0
  272. package/dist/lib/components/DangerZone/index.d.ts +4 -0
  273. package/dist/lib/components/DangerZone/index.d.ts.map +1 -0
  274. package/dist/lib/components/DataTable/DataTable.d.ts +2 -11
  275. package/dist/lib/components/DataTable/DataTable.d.ts.map +1 -1
  276. package/dist/lib/components/DataTable/components/DataTableColumnHeader.d.ts.map +1 -1
  277. package/dist/lib/components/DataTable/components/DataTableEmpty.d.ts.map +1 -1
  278. package/dist/lib/components/DataTable/components/DataTableFilters.d.ts +11 -0
  279. package/dist/lib/components/DataTable/components/DataTableFilters.d.ts.map +1 -0
  280. package/dist/lib/components/DataTable/components/DataTableImportDialog.d.ts +16 -0
  281. package/dist/lib/components/DataTable/components/DataTableImportDialog.d.ts.map +1 -0
  282. package/dist/lib/components/DataTable/components/DataTablePagination.d.ts +1 -2
  283. package/dist/lib/components/DataTable/components/DataTablePagination.d.ts.map +1 -1
  284. package/dist/lib/components/DataTable/components/DataTableRowDensity.d.ts +11 -0
  285. package/dist/lib/components/DataTable/components/DataTableRowDensity.d.ts.map +1 -0
  286. package/dist/lib/components/DataTable/components/DataTableSearch.d.ts +14 -0
  287. package/dist/lib/components/DataTable/components/DataTableSearch.d.ts.map +1 -0
  288. package/dist/lib/components/DataTable/components/DataTableSelectionBar.d.ts +14 -0
  289. package/dist/lib/components/DataTable/components/DataTableSelectionBar.d.ts.map +1 -0
  290. package/dist/lib/components/DataTable/components/DataTableViewOptions.d.ts.map +1 -1
  291. package/dist/lib/components/DataTable/components/DataTableViewTabs.d.ts +7 -0
  292. package/dist/lib/components/DataTable/components/DataTableViewTabs.d.ts.map +1 -0
  293. package/dist/lib/components/DataTable/components/DataTableViewsMenu.d.ts +14 -0
  294. package/dist/lib/components/DataTable/components/DataTableViewsMenu.d.ts.map +1 -0
  295. package/dist/lib/components/DataTable/components/FilterWrapper.d.ts +21 -0
  296. package/dist/lib/components/DataTable/components/FilterWrapper.d.ts.map +1 -0
  297. package/dist/lib/components/DataTable/components/RowActions.d.ts +20 -0
  298. package/dist/lib/components/DataTable/components/RowActions.d.ts.map +1 -0
  299. package/dist/lib/components/DataTable/hooks/useAutoUpsert.d.ts +3 -0
  300. package/dist/lib/components/DataTable/hooks/useAutoUpsert.d.ts.map +1 -0
  301. package/dist/lib/components/DataTable/hooks/useDataTable.d.ts +24 -2
  302. package/dist/lib/components/DataTable/hooks/useDataTable.d.ts.map +1 -1
  303. package/dist/lib/components/DataTable/index.d.ts +11 -3
  304. package/dist/lib/components/DataTable/index.d.ts.map +1 -1
  305. package/dist/lib/components/DataTable/store/store.d.ts +28 -0
  306. package/dist/lib/components/DataTable/store/store.d.ts.map +1 -0
  307. package/dist/lib/components/DataTable/store/useTableSlice.d.ts +18 -0
  308. package/dist/lib/components/DataTable/store/useTableSlice.d.ts.map +1 -0
  309. package/dist/lib/components/DataTable/types.d.ts +55 -56
  310. package/dist/lib/components/DataTable/types.d.ts.map +1 -1
  311. package/dist/lib/components/DataTable/utils.d.ts +8 -1
  312. package/dist/lib/components/DataTable/utils.d.ts.map +1 -1
  313. package/dist/lib/components/DatePicker/DatePicker.d.ts +1 -1
  314. package/dist/lib/components/DatePicker/DatePicker.d.ts.map +1 -1
  315. package/dist/lib/components/Dialog/Dialog.d.ts +31 -0
  316. package/dist/lib/components/Dialog/Dialog.d.ts.map +1 -0
  317. package/dist/lib/components/Dialog/index.d.ts +3 -0
  318. package/dist/lib/components/Dialog/index.d.ts.map +1 -0
  319. package/dist/lib/components/DropdownMenu/DropdownMenu.d.ts +1 -1
  320. package/dist/lib/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  321. package/dist/lib/components/DropdownMenu/types.d.ts +10 -1
  322. package/dist/lib/components/DropdownMenu/types.d.ts.map +1 -1
  323. package/dist/lib/components/Editor/context/editor-config-context.d.ts +9 -0
  324. package/dist/lib/components/Editor/context/editor-config-context.d.ts.map +1 -0
  325. package/dist/lib/components/Editor/context/toolbar-context.d.ts +18 -0
  326. package/dist/lib/components/Editor/context/toolbar-context.d.ts.map +1 -0
  327. package/dist/lib/components/Editor/editor-hooks/use-debounce.d.ts +2 -0
  328. package/dist/lib/components/Editor/editor-hooks/use-debounce.d.ts.map +1 -0
  329. package/dist/lib/components/Editor/editor-hooks/use-modal.d.ts +6 -0
  330. package/dist/lib/components/Editor/editor-hooks/use-modal.d.ts.map +1 -0
  331. package/dist/lib/components/Editor/editor-hooks/use-report.d.ts +2 -0
  332. package/dist/lib/components/Editor/editor-hooks/use-report.d.ts.map +1 -0
  333. package/dist/lib/components/Editor/editor-hooks/use-update-toolbar.d.ts +3 -0
  334. package/dist/lib/components/Editor/editor-hooks/use-update-toolbar.d.ts.map +1 -0
  335. package/dist/lib/components/Editor/editor-ui/button-group.d.ts +12 -0
  336. package/dist/lib/components/Editor/editor-ui/button-group.d.ts.map +1 -0
  337. package/dist/lib/components/Editor/editor-ui/button.d.ts +11 -0
  338. package/dist/lib/components/Editor/editor-ui/button.d.ts.map +1 -0
  339. package/dist/lib/components/Editor/editor-ui/code-button.d.ts +8 -0
  340. package/dist/lib/components/Editor/editor-ui/code-button.d.ts.map +1 -0
  341. package/dist/lib/components/Editor/editor-ui/color-picker.d.ts +92 -0
  342. package/dist/lib/components/Editor/editor-ui/color-picker.d.ts.map +1 -0
  343. package/dist/lib/components/Editor/editor-ui/command.d.ts +19 -0
  344. package/dist/lib/components/Editor/editor-ui/command.d.ts.map +1 -0
  345. package/dist/lib/components/Editor/editor-ui/content-editable.d.ts +9 -0
  346. package/dist/lib/components/Editor/editor-ui/content-editable.d.ts.map +1 -0
  347. package/dist/lib/components/Editor/editor-ui/dialog.d.ts +16 -0
  348. package/dist/lib/components/Editor/editor-ui/dialog.d.ts.map +1 -0
  349. package/dist/lib/components/Editor/editor-ui/image-component.d.ts +16 -0
  350. package/dist/lib/components/Editor/editor-ui/image-component.d.ts.map +1 -0
  351. package/dist/lib/components/Editor/editor-ui/image-resizer.d.ts +18 -0
  352. package/dist/lib/components/Editor/editor-ui/image-resizer.d.ts.map +1 -0
  353. package/dist/lib/components/Editor/editor-ui/input.d.ts +4 -0
  354. package/dist/lib/components/Editor/editor-ui/input.d.ts.map +1 -0
  355. package/dist/lib/components/Editor/editor-ui/label.d.ts +5 -0
  356. package/dist/lib/components/Editor/editor-ui/label.d.ts.map +1 -0
  357. package/dist/lib/components/Editor/editor-ui/popover.d.ts +8 -0
  358. package/dist/lib/components/Editor/editor-ui/popover.d.ts.map +1 -0
  359. package/dist/lib/components/Editor/editor-ui/scroll-area.d.ts +6 -0
  360. package/dist/lib/components/Editor/editor-ui/scroll-area.d.ts.map +1 -0
  361. package/dist/lib/components/Editor/editor-ui/select.d.ts +16 -0
  362. package/dist/lib/components/Editor/editor-ui/select.d.ts.map +1 -0
  363. package/dist/lib/components/Editor/editor-ui/separator.d.ts +5 -0
  364. package/dist/lib/components/Editor/editor-ui/separator.d.ts.map +1 -0
  365. package/dist/lib/components/Editor/editor-ui/tabs.d.ts +8 -0
  366. package/dist/lib/components/Editor/editor-ui/tabs.d.ts.map +1 -0
  367. package/dist/lib/components/Editor/editor-ui/toggle-group.d.ts +8 -0
  368. package/dist/lib/components/Editor/editor-ui/toggle-group.d.ts.map +1 -0
  369. package/dist/lib/components/Editor/editor-ui/toggle.d.ts +10 -0
  370. package/dist/lib/components/Editor/editor-ui/toggle.d.ts.map +1 -0
  371. package/dist/lib/components/Editor/editor-ui/tooltip.d.ts +8 -0
  372. package/dist/lib/components/Editor/editor-ui/tooltip.d.ts.map +1 -0
  373. package/dist/lib/components/Editor/index.d.ts +4 -0
  374. package/dist/lib/components/Editor/index.d.ts.map +1 -0
  375. package/dist/lib/components/Editor/nodes/autocomplete-node.d.ts +19 -0
  376. package/dist/lib/components/Editor/nodes/autocomplete-node.d.ts.map +1 -0
  377. package/dist/lib/components/Editor/nodes/embeds/tweet-node.d.ts +22 -0
  378. package/dist/lib/components/Editor/nodes/embeds/tweet-node.d.ts.map +1 -0
  379. package/dist/lib/components/Editor/nodes/embeds/youtube-node.d.ts +23 -0
  380. package/dist/lib/components/Editor/nodes/embeds/youtube-node.d.ts.map +1 -0
  381. package/dist/lib/components/Editor/nodes/emoji-node.d.ts +18 -0
  382. package/dist/lib/components/Editor/nodes/emoji-node.d.ts.map +1 -0
  383. package/dist/lib/components/Editor/nodes/image-node.d.ts +49 -0
  384. package/dist/lib/components/Editor/nodes/image-node.d.ts.map +1 -0
  385. package/dist/lib/components/Editor/nodes/keyword-node.d.ts +15 -0
  386. package/dist/lib/components/Editor/nodes/keyword-node.d.ts.map +1 -0
  387. package/dist/lib/components/Editor/nodes/layout-container-node.d.ts +23 -0
  388. package/dist/lib/components/Editor/nodes/layout-container-node.d.ts.map +1 -0
  389. package/dist/lib/components/Editor/nodes/layout-item-node.d.ts +15 -0
  390. package/dist/lib/components/Editor/nodes/layout-item-node.d.ts.map +1 -0
  391. package/dist/lib/components/Editor/nodes/mention-node.d.ts +21 -0
  392. package/dist/lib/components/Editor/nodes/mention-node.d.ts.map +1 -0
  393. package/dist/lib/components/Editor/nodes/nodes.d.ts +3 -0
  394. package/dist/lib/components/Editor/nodes/nodes.d.ts.map +1 -0
  395. package/dist/lib/components/Editor/nodes.d.ts +2 -0
  396. package/dist/lib/components/Editor/nodes.d.ts.map +1 -0
  397. package/dist/lib/components/Editor/plugins/actions/actions-plugin.d.ts +4 -0
  398. package/dist/lib/components/Editor/plugins/actions/actions-plugin.d.ts.map +1 -0
  399. package/dist/lib/components/Editor/plugins/actions/character-limit-plugin.d.ts +5 -0
  400. package/dist/lib/components/Editor/plugins/actions/character-limit-plugin.d.ts.map +1 -0
  401. package/dist/lib/components/Editor/plugins/actions/clear-editor-plugin.d.ts +2 -0
  402. package/dist/lib/components/Editor/plugins/actions/clear-editor-plugin.d.ts.map +1 -0
  403. package/dist/lib/components/Editor/plugins/actions/counter-character-plugin.d.ts +6 -0
  404. package/dist/lib/components/Editor/plugins/actions/counter-character-plugin.d.ts.map +1 -0
  405. package/dist/lib/components/Editor/plugins/actions/edit-mode-toggle-plugin.d.ts +2 -0
  406. package/dist/lib/components/Editor/plugins/actions/edit-mode-toggle-plugin.d.ts.map +1 -0
  407. package/dist/lib/components/Editor/plugins/actions/import-export-plugin.d.ts +2 -0
  408. package/dist/lib/components/Editor/plugins/actions/import-export-plugin.d.ts.map +1 -0
  409. package/dist/lib/components/Editor/plugins/actions/markdown-toggle-plugin.d.ts +6 -0
  410. package/dist/lib/components/Editor/plugins/actions/markdown-toggle-plugin.d.ts.map +1 -0
  411. package/dist/lib/components/Editor/plugins/actions/max-length-plugin.d.ts +4 -0
  412. package/dist/lib/components/Editor/plugins/actions/max-length-plugin.d.ts.map +1 -0
  413. package/dist/lib/components/Editor/plugins/actions/share-content-plugin.d.ts +2 -0
  414. package/dist/lib/components/Editor/plugins/actions/share-content-plugin.d.ts.map +1 -0
  415. package/dist/lib/components/Editor/plugins/actions/speech-to-text-plugin.d.ts +7 -0
  416. package/dist/lib/components/Editor/plugins/actions/speech-to-text-plugin.d.ts.map +1 -0
  417. package/dist/lib/components/Editor/plugins/actions/tree-view-plugin.d.ts +3 -0
  418. package/dist/lib/components/Editor/plugins/actions/tree-view-plugin.d.ts.map +1 -0
  419. package/dist/lib/components/Editor/plugins/auto-link-plugin.d.ts +3 -0
  420. package/dist/lib/components/Editor/plugins/auto-link-plugin.d.ts.map +1 -0
  421. package/dist/lib/components/Editor/plugins/autocomplete-plugin.d.ts +11 -0
  422. package/dist/lib/components/Editor/plugins/autocomplete-plugin.d.ts.map +1 -0
  423. package/dist/lib/components/Editor/plugins/code-action-menu-plugin.d.ts +4 -0
  424. package/dist/lib/components/Editor/plugins/code-action-menu-plugin.d.ts.map +1 -0
  425. package/dist/lib/components/Editor/plugins/code-highlight-plugin.d.ts +3 -0
  426. package/dist/lib/components/Editor/plugins/code-highlight-plugin.d.ts.map +1 -0
  427. package/dist/lib/components/Editor/plugins/component-picker-menu-plugin.d.ts +9 -0
  428. package/dist/lib/components/Editor/plugins/component-picker-menu-plugin.d.ts.map +1 -0
  429. package/dist/lib/components/Editor/plugins/context-menu-plugin.d.ts +3 -0
  430. package/dist/lib/components/Editor/plugins/context-menu-plugin.d.ts.map +1 -0
  431. package/dist/lib/components/Editor/plugins/drag-drop-paste-plugin.d.ts +2 -0
  432. package/dist/lib/components/Editor/plugins/drag-drop-paste-plugin.d.ts.map +1 -0
  433. package/dist/lib/components/Editor/plugins/draggable-block-plugin.d.ts +5 -0
  434. package/dist/lib/components/Editor/plugins/draggable-block-plugin.d.ts.map +1 -0
  435. package/dist/lib/components/Editor/plugins/embeds/auto-embed-plugin.d.ts +18 -0
  436. package/dist/lib/components/Editor/plugins/embeds/auto-embed-plugin.d.ts.map +1 -0
  437. package/dist/lib/components/Editor/plugins/embeds/twitter-plugin.d.ts +5 -0
  438. package/dist/lib/components/Editor/plugins/embeds/twitter-plugin.d.ts.map +1 -0
  439. package/dist/lib/components/Editor/plugins/embeds/youtube-plugin.d.ts +5 -0
  440. package/dist/lib/components/Editor/plugins/embeds/youtube-plugin.d.ts.map +1 -0
  441. package/dist/lib/components/Editor/plugins/emoji-picker-plugin.d.ts +2 -0
  442. package/dist/lib/components/Editor/plugins/emoji-picker-plugin.d.ts.map +1 -0
  443. package/dist/lib/components/Editor/plugins/emojis-plugin.d.ts +3 -0
  444. package/dist/lib/components/Editor/plugins/emojis-plugin.d.ts.map +1 -0
  445. package/dist/lib/components/Editor/plugins/floating-link-editor-plugin.d.ts +7 -0
  446. package/dist/lib/components/Editor/plugins/floating-link-editor-plugin.d.ts.map +1 -0
  447. package/dist/lib/components/Editor/plugins/floating-text-format-plugin.d.ts +7 -0
  448. package/dist/lib/components/Editor/plugins/floating-text-format-plugin.d.ts.map +1 -0
  449. package/dist/lib/components/Editor/plugins/images-plugin.d.ts +25 -0
  450. package/dist/lib/components/Editor/plugins/images-plugin.d.ts.map +1 -0
  451. package/dist/lib/components/Editor/plugins/keywords-plugin.d.ts +3 -0
  452. package/dist/lib/components/Editor/plugins/keywords-plugin.d.ts.map +1 -0
  453. package/dist/lib/components/Editor/plugins/layout-plugin.d.ts +13 -0
  454. package/dist/lib/components/Editor/plugins/layout-plugin.d.ts.map +1 -0
  455. package/dist/lib/components/Editor/plugins/link-plugin.d.ts +3 -0
  456. package/dist/lib/components/Editor/plugins/link-plugin.d.ts.map +1 -0
  457. package/dist/lib/components/Editor/plugins/list-max-indent-level-plugin.d.ts +4 -0
  458. package/dist/lib/components/Editor/plugins/list-max-indent-level-plugin.d.ts.map +1 -0
  459. package/dist/lib/components/Editor/plugins/mentions-plugin.d.ts +3 -0
  460. package/dist/lib/components/Editor/plugins/mentions-plugin.d.ts.map +1 -0
  461. package/dist/lib/components/Editor/plugins/picker/alignment-picker-plugin.d.ts +5 -0
  462. package/dist/lib/components/Editor/plugins/picker/alignment-picker-plugin.d.ts.map +1 -0
  463. package/dist/lib/components/Editor/plugins/picker/bulleted-list-picker-plugin.d.ts +3 -0
  464. package/dist/lib/components/Editor/plugins/picker/bulleted-list-picker-plugin.d.ts.map +1 -0
  465. package/dist/lib/components/Editor/plugins/picker/check-list-picker-plugin.d.ts +3 -0
  466. package/dist/lib/components/Editor/plugins/picker/check-list-picker-plugin.d.ts.map +1 -0
  467. package/dist/lib/components/Editor/plugins/picker/code-picker-plugin.d.ts +3 -0
  468. package/dist/lib/components/Editor/plugins/picker/code-picker-plugin.d.ts.map +1 -0
  469. package/dist/lib/components/Editor/plugins/picker/columns-layout-picker-plugin.d.ts +3 -0
  470. package/dist/lib/components/Editor/plugins/picker/columns-layout-picker-plugin.d.ts.map +1 -0
  471. package/dist/lib/components/Editor/plugins/picker/component-picker-menu-plugin.d.ts +2 -0
  472. package/dist/lib/components/Editor/plugins/picker/component-picker-menu-plugin.d.ts.map +1 -0
  473. package/dist/lib/components/Editor/plugins/picker/component-picker-option.d.ts +17 -0
  474. package/dist/lib/components/Editor/plugins/picker/component-picker-option.d.ts.map +1 -0
  475. package/dist/lib/components/Editor/plugins/picker/divider-picker-plugin.d.ts +3 -0
  476. package/dist/lib/components/Editor/plugins/picker/divider-picker-plugin.d.ts.map +1 -0
  477. package/dist/lib/components/Editor/plugins/picker/embeds-picker-plugin.d.ts +5 -0
  478. package/dist/lib/components/Editor/plugins/picker/embeds-picker-plugin.d.ts.map +1 -0
  479. package/dist/lib/components/Editor/plugins/picker/heading-picker-plugin.d.ts +5 -0
  480. package/dist/lib/components/Editor/plugins/picker/heading-picker-plugin.d.ts.map +1 -0
  481. package/dist/lib/components/Editor/plugins/picker/image-picker-plugin.d.ts +3 -0
  482. package/dist/lib/components/Editor/plugins/picker/image-picker-plugin.d.ts.map +1 -0
  483. package/dist/lib/components/Editor/plugins/picker/numbered-list-picker-plugin.d.ts +3 -0
  484. package/dist/lib/components/Editor/plugins/picker/numbered-list-picker-plugin.d.ts.map +1 -0
  485. package/dist/lib/components/Editor/plugins/picker/paragraph-picker-plugin.d.ts +3 -0
  486. package/dist/lib/components/Editor/plugins/picker/paragraph-picker-plugin.d.ts.map +1 -0
  487. package/dist/lib/components/Editor/plugins/picker/quote-picker-plugin.d.ts +3 -0
  488. package/dist/lib/components/Editor/plugins/picker/quote-picker-plugin.d.ts.map +1 -0
  489. package/dist/lib/components/Editor/plugins/picker/table-picker-plugin.d.ts +6 -0
  490. package/dist/lib/components/Editor/plugins/picker/table-picker-plugin.d.ts.map +1 -0
  491. package/dist/lib/components/Editor/plugins/plugins.d.ts +2 -0
  492. package/dist/lib/components/Editor/plugins/plugins.d.ts.map +1 -0
  493. package/dist/lib/components/Editor/plugins/tab-focus-plugin.d.ts +2 -0
  494. package/dist/lib/components/Editor/plugins/tab-focus-plugin.d.ts.map +1 -0
  495. package/dist/lib/components/Editor/plugins/table-plugin.d.ts +34 -0
  496. package/dist/lib/components/Editor/plugins/table-plugin.d.ts.map +1 -0
  497. package/dist/lib/components/Editor/plugins/toolbar/block-format/block-format-data.d.ts +5 -0
  498. package/dist/lib/components/Editor/plugins/toolbar/block-format/block-format-data.d.ts.map +1 -0
  499. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-bulleted-list.d.ts +2 -0
  500. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-bulleted-list.d.ts.map +1 -0
  501. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-check-list.d.ts +2 -0
  502. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-check-list.d.ts.map +1 -0
  503. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-code-block.d.ts +2 -0
  504. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-code-block.d.ts.map +1 -0
  505. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-heading.d.ts +5 -0
  506. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-heading.d.ts.map +1 -0
  507. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-numbered-list.d.ts +2 -0
  508. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-numbered-list.d.ts.map +1 -0
  509. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-paragraph.d.ts +2 -0
  510. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-paragraph.d.ts.map +1 -0
  511. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-quote.d.ts +2 -0
  512. package/dist/lib/components/Editor/plugins/toolbar/block-format/format-quote.d.ts.map +1 -0
  513. package/dist/lib/components/Editor/plugins/toolbar/block-format-toolbar-plugin.d.ts +4 -0
  514. package/dist/lib/components/Editor/plugins/toolbar/block-format-toolbar-plugin.d.ts.map +1 -0
  515. package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-columns-layout.d.ts +2 -0
  516. package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-columns-layout.d.ts.map +1 -0
  517. package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-embeds.d.ts +2 -0
  518. package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-embeds.d.ts.map +1 -0
  519. package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-horizontal-rule.d.ts +2 -0
  520. package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-horizontal-rule.d.ts.map +1 -0
  521. package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-image.d.ts +2 -0
  522. package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-image.d.ts.map +1 -0
  523. package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-table.d.ts +2 -0
  524. package/dist/lib/components/Editor/plugins/toolbar/block-insert/insert-table.d.ts.map +1 -0
  525. package/dist/lib/components/Editor/plugins/toolbar/block-insert-plugin.d.ts +4 -0
  526. package/dist/lib/components/Editor/plugins/toolbar/block-insert-plugin.d.ts.map +1 -0
  527. package/dist/lib/components/Editor/plugins/toolbar/clear-formatting-toolbar-plugin.d.ts +2 -0
  528. package/dist/lib/components/Editor/plugins/toolbar/clear-formatting-toolbar-plugin.d.ts.map +1 -0
  529. package/dist/lib/components/Editor/plugins/toolbar/code-language-toolbar-plugin.d.ts +2 -0
  530. package/dist/lib/components/Editor/plugins/toolbar/code-language-toolbar-plugin.d.ts.map +1 -0
  531. package/dist/lib/components/Editor/plugins/toolbar/element-format-toolbar-plugin.d.ts +4 -0
  532. package/dist/lib/components/Editor/plugins/toolbar/element-format-toolbar-plugin.d.ts.map +1 -0
  533. package/dist/lib/components/Editor/plugins/toolbar/font-background-toolbar-plugin.d.ts +2 -0
  534. package/dist/lib/components/Editor/plugins/toolbar/font-background-toolbar-plugin.d.ts.map +1 -0
  535. package/dist/lib/components/Editor/plugins/toolbar/font-color-toolbar-plugin.d.ts +2 -0
  536. package/dist/lib/components/Editor/plugins/toolbar/font-color-toolbar-plugin.d.ts.map +1 -0
  537. package/dist/lib/components/Editor/plugins/toolbar/font-family-toolbar-plugin.d.ts +2 -0
  538. package/dist/lib/components/Editor/plugins/toolbar/font-family-toolbar-plugin.d.ts.map +1 -0
  539. package/dist/lib/components/Editor/plugins/toolbar/font-format-toolbar-plugin.d.ts +2 -0
  540. package/dist/lib/components/Editor/plugins/toolbar/font-format-toolbar-plugin.d.ts.map +1 -0
  541. package/dist/lib/components/Editor/plugins/toolbar/font-size-toolbar-plugin.d.ts +2 -0
  542. package/dist/lib/components/Editor/plugins/toolbar/font-size-toolbar-plugin.d.ts.map +1 -0
  543. package/dist/lib/components/Editor/plugins/toolbar/history-toolbar-plugin.d.ts +2 -0
  544. package/dist/lib/components/Editor/plugins/toolbar/history-toolbar-plugin.d.ts.map +1 -0
  545. package/dist/lib/components/Editor/plugins/toolbar/horizontal-rule-toolbar-plugin.d.ts +2 -0
  546. package/dist/lib/components/Editor/plugins/toolbar/horizontal-rule-toolbar-plugin.d.ts.map +1 -0
  547. package/dist/lib/components/Editor/plugins/toolbar/image-toolbar-plugin.d.ts +2 -0
  548. package/dist/lib/components/Editor/plugins/toolbar/image-toolbar-plugin.d.ts.map +1 -0
  549. package/dist/lib/components/Editor/plugins/toolbar/link-toolbar-plugin.d.ts +4 -0
  550. package/dist/lib/components/Editor/plugins/toolbar/link-toolbar-plugin.d.ts.map +1 -0
  551. package/dist/lib/components/Editor/plugins/toolbar/subsuper-toolbar-plugin.d.ts +2 -0
  552. package/dist/lib/components/Editor/plugins/toolbar/subsuper-toolbar-plugin.d.ts.map +1 -0
  553. package/dist/lib/components/Editor/plugins/toolbar/table-toolbar-plugin.d.ts +2 -0
  554. package/dist/lib/components/Editor/plugins/toolbar/table-toolbar-plugin.d.ts.map +1 -0
  555. package/dist/lib/components/Editor/plugins/toolbar/toolbar-plugin.d.ts +6 -0
  556. package/dist/lib/components/Editor/plugins/toolbar/toolbar-plugin.d.ts.map +1 -0
  557. package/dist/lib/components/Editor/plugins/typing-pref-plugin.d.ts +4 -0
  558. package/dist/lib/components/Editor/plugins/typing-pref-plugin.d.ts.map +1 -0
  559. package/dist/lib/components/Editor/plugins.d.ts +2 -0
  560. package/dist/lib/components/Editor/plugins.d.ts.map +1 -0
  561. package/dist/lib/components/Editor/shared/can-use-dom.d.ts +2 -0
  562. package/dist/lib/components/Editor/shared/can-use-dom.d.ts.map +1 -0
  563. package/dist/lib/components/Editor/shared/caret-from-point.d.ts +5 -0
  564. package/dist/lib/components/Editor/shared/caret-from-point.d.ts.map +1 -0
  565. package/dist/lib/components/Editor/shared/environment.d.ts +18 -0
  566. package/dist/lib/components/Editor/shared/environment.d.ts.map +1 -0
  567. package/dist/lib/components/Editor/shared/invariant.d.ts +2 -0
  568. package/dist/lib/components/Editor/shared/invariant.d.ts.map +1 -0
  569. package/dist/lib/components/Editor/shared/normalize-class-names.d.ts +2 -0
  570. package/dist/lib/components/Editor/shared/normalize-class-names.d.ts.map +1 -0
  571. package/dist/lib/components/Editor/shared/react-patches.d.ts +2 -0
  572. package/dist/lib/components/Editor/shared/react-patches.d.ts.map +1 -0
  573. package/dist/lib/components/Editor/shared/react-test-utils.d.ts +3 -0
  574. package/dist/lib/components/Editor/shared/react-test-utils.d.ts.map +1 -0
  575. package/dist/lib/components/Editor/shared/simple-diff-with-cursor.d.ts +6 -0
  576. package/dist/lib/components/Editor/shared/simple-diff-with-cursor.d.ts.map +1 -0
  577. package/dist/lib/components/Editor/shared/use-layout-effect.d.ts +4 -0
  578. package/dist/lib/components/Editor/shared/use-layout-effect.d.ts.map +1 -0
  579. package/dist/lib/components/Editor/shared/warn-only-once.d.ts +2 -0
  580. package/dist/lib/components/Editor/shared/warn-only-once.d.ts.map +1 -0
  581. package/dist/lib/components/Editor/themes/editor-theme.d.ts +3 -0
  582. package/dist/lib/components/Editor/themes/editor-theme.d.ts.map +1 -0
  583. package/dist/lib/components/Editor/transformers/index.d.ts +16 -0
  584. package/dist/lib/components/Editor/transformers/index.d.ts.map +1 -0
  585. package/dist/lib/components/Editor/transformers/markdown-emoji-transformer.d.ts +3 -0
  586. package/dist/lib/components/Editor/transformers/markdown-emoji-transformer.d.ts.map +1 -0
  587. package/dist/lib/components/Editor/transformers/markdown-hr-transformer.d.ts +3 -0
  588. package/dist/lib/components/Editor/transformers/markdown-hr-transformer.d.ts.map +1 -0
  589. package/dist/lib/components/Editor/transformers/markdown-image-transformer.d.ts +3 -0
  590. package/dist/lib/components/Editor/transformers/markdown-image-transformer.d.ts.map +1 -0
  591. package/dist/lib/components/Editor/transformers/markdown-table-transformer.d.ts +3 -0
  592. package/dist/lib/components/Editor/transformers/markdown-table-transformer.d.ts.map +1 -0
  593. package/dist/lib/components/Editor/transformers/markdown-tweet-transformer.d.ts +3 -0
  594. package/dist/lib/components/Editor/transformers/markdown-tweet-transformer.d.ts.map +1 -0
  595. package/dist/lib/components/Editor/types.d.ts +23 -0
  596. package/dist/lib/components/Editor/types.d.ts.map +1 -0
  597. package/dist/lib/components/Editor/utils/can-use-dom.d.ts +2 -0
  598. package/dist/lib/components/Editor/utils/can-use-dom.d.ts.map +1 -0
  599. package/dist/lib/components/Editor/utils/collapsible.d.ts +3 -0
  600. package/dist/lib/components/Editor/utils/collapsible.d.ts.map +1 -0
  601. package/dist/lib/components/Editor/utils/doc-serialization.d.ts +4 -0
  602. package/dist/lib/components/Editor/utils/doc-serialization.d.ts.map +1 -0
  603. package/dist/lib/components/Editor/utils/emoji-list.d.ts +21 -0
  604. package/dist/lib/components/Editor/utils/emoji-list.d.ts.map +1 -0
  605. package/dist/lib/components/Editor/utils/get-dom-range-rect.d.ts +2 -0
  606. package/dist/lib/components/Editor/utils/get-dom-range-rect.d.ts.map +1 -0
  607. package/dist/lib/components/Editor/utils/get-selected-node.d.ts +3 -0
  608. package/dist/lib/components/Editor/utils/get-selected-node.d.ts.map +1 -0
  609. package/dist/lib/components/Editor/utils/guard.d.ts +2 -0
  610. package/dist/lib/components/Editor/utils/guard.d.ts.map +1 -0
  611. package/dist/lib/components/Editor/utils/is-mobile-width.d.ts +2 -0
  612. package/dist/lib/components/Editor/utils/is-mobile-width.d.ts.map +1 -0
  613. package/dist/lib/components/Editor/utils/set-floating-elem-position-for-link-editor.d.ts +2 -0
  614. package/dist/lib/components/Editor/utils/set-floating-elem-position-for-link-editor.d.ts.map +1 -0
  615. package/dist/lib/components/Editor/utils/set-floating-elem-position.d.ts +2 -0
  616. package/dist/lib/components/Editor/utils/set-floating-elem-position.d.ts.map +1 -0
  617. package/dist/lib/components/Editor/utils/swipe.d.ts +5 -0
  618. package/dist/lib/components/Editor/utils/swipe.d.ts.map +1 -0
  619. package/dist/lib/components/Editor/utils/url.d.ts +3 -0
  620. package/dist/lib/components/Editor/utils/url.d.ts.map +1 -0
  621. package/dist/lib/components/Empty/Empty.d.ts +12 -0
  622. package/dist/lib/components/Empty/Empty.d.ts.map +1 -0
  623. package/dist/lib/components/Empty/index.d.ts +3 -0
  624. package/dist/lib/components/Empty/index.d.ts.map +1 -0
  625. package/dist/lib/components/ErrorBoundary/ErrorBoundary.d.ts +7 -0
  626. package/dist/lib/components/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
  627. package/dist/lib/components/ErrorBoundary/ErrorPage.d.ts +38 -0
  628. package/dist/lib/components/ErrorBoundary/ErrorPage.d.ts.map +1 -0
  629. package/dist/lib/components/ErrorBoundary/index.d.ts +3 -0
  630. package/dist/lib/components/ErrorBoundary/index.d.ts.map +1 -0
  631. package/dist/lib/components/FilePreview/FilePreview.d.ts +8 -0
  632. package/dist/lib/components/FilePreview/FilePreview.d.ts.map +1 -0
  633. package/dist/lib/components/FilePreview/index.d.ts +2 -0
  634. package/dist/lib/components/FilePreview/index.d.ts.map +1 -0
  635. package/dist/lib/components/Form/Form.d.ts +5 -3
  636. package/dist/lib/components/Form/Form.d.ts.map +1 -1
  637. package/dist/lib/components/HierarchyGraph/HierarchyGraph.d.ts +24 -0
  638. package/dist/lib/components/HierarchyGraph/HierarchyGraph.d.ts.map +1 -0
  639. package/dist/lib/components/HierarchyGraph/index.d.ts +5 -0
  640. package/dist/lib/components/HierarchyGraph/index.d.ts.map +1 -0
  641. package/dist/lib/components/PageHeader/PageHeader.d.ts +8 -0
  642. package/dist/lib/components/PageHeader/PageHeader.d.ts.map +1 -0
  643. package/dist/lib/components/PageHeader/PageHeaderSkeleton.d.ts +10 -0
  644. package/dist/lib/components/PageHeader/PageHeaderSkeleton.d.ts.map +1 -0
  645. package/dist/lib/components/PageHeader/index.d.ts +3 -0
  646. package/dist/lib/components/PageHeader/index.d.ts.map +1 -0
  647. package/dist/lib/components/PhoneField/PhoneField.d.ts.map +1 -1
  648. package/dist/lib/components/RadioGroup/RadioGroup.d.ts +23 -0
  649. package/dist/lib/components/RadioGroup/RadioGroup.d.ts.map +1 -0
  650. package/dist/lib/components/RadioGroup/index.d.ts +3 -0
  651. package/dist/lib/components/RadioGroup/index.d.ts.map +1 -0
  652. package/dist/lib/components/Select/Select.d.ts +8 -10
  653. package/dist/lib/components/Select/Select.d.ts.map +1 -1
  654. package/dist/lib/components/Select/SelectFilter.d.ts +20 -0
  655. package/dist/lib/components/Select/SelectFilter.d.ts.map +1 -0
  656. package/dist/lib/components/Select/components/MultiSelect/MultiSelect.d.ts +3 -1
  657. package/dist/lib/components/Select/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  658. package/dist/lib/components/Select/components/MultiSelect/MultiSelectFilter.d.ts +13 -6
  659. package/dist/lib/components/Select/components/MultiSelect/MultiSelectFilter.d.ts.map +1 -1
  660. package/dist/lib/components/Select/components/SingleSelect/SingleSelect.d.ts +17 -1
  661. package/dist/lib/components/Select/components/SingleSelect/SingleSelect.d.ts.map +1 -1
  662. package/dist/lib/components/Select/components/SingleSelect/SingleSelectFilter.d.ts +9 -2
  663. package/dist/lib/components/Select/components/SingleSelect/SingleSelectFilter.d.ts.map +1 -1
  664. package/dist/lib/components/Select/hooks/useMultiSelect.d.ts +2 -1
  665. package/dist/lib/components/Select/hooks/useMultiSelect.d.ts.map +1 -1
  666. package/dist/lib/components/Select/hooks/useSelect.d.ts +3 -1
  667. package/dist/lib/components/Select/hooks/useSelect.d.ts.map +1 -1
  668. package/dist/lib/components/Select/hooks/useSingleSelect.d.ts +2 -1
  669. package/dist/lib/components/Select/hooks/useSingleSelect.d.ts.map +1 -1
  670. package/dist/lib/components/Select/index.d.ts +4 -2
  671. package/dist/lib/components/Select/index.d.ts.map +1 -1
  672. package/dist/lib/components/Select/types.d.ts +8 -1
  673. package/dist/lib/components/Select/types.d.ts.map +1 -1
  674. package/dist/lib/components/Sidebar/Sidebar.d.ts +24 -0
  675. package/dist/lib/components/Sidebar/Sidebar.d.ts.map +1 -0
  676. package/dist/lib/components/Sidebar/index.d.ts +2 -0
  677. package/dist/lib/components/Sidebar/index.d.ts.map +1 -0
  678. package/dist/lib/components/Sortable/Sortable.d.ts +39 -0
  679. package/dist/lib/components/Sortable/Sortable.d.ts.map +1 -0
  680. package/dist/lib/components/Sortable/index.d.ts +3 -0
  681. package/dist/lib/components/Sortable/index.d.ts.map +1 -0
  682. package/dist/lib/components/StepProgressIndicator/StepProgressIndicator.d.ts +12 -0
  683. package/dist/lib/components/StepProgressIndicator/StepProgressIndicator.d.ts.map +1 -0
  684. package/dist/lib/components/StepProgressIndicator/index.d.ts +3 -0
  685. package/dist/lib/components/StepProgressIndicator/index.d.ts.map +1 -0
  686. package/dist/lib/components/Switch/Switch.d.ts.map +1 -1
  687. package/dist/lib/components/Tabs/Tabs.d.ts +27 -0
  688. package/dist/lib/components/Tabs/Tabs.d.ts.map +1 -0
  689. package/dist/lib/components/Tabs/TabsSkeleton.d.ts +11 -0
  690. package/dist/lib/components/Tabs/TabsSkeleton.d.ts.map +1 -0
  691. package/dist/lib/components/Tabs/index.d.ts +3 -0
  692. package/dist/lib/components/Tabs/index.d.ts.map +1 -0
  693. package/dist/lib/components/TextArea/TextArea.d.ts.map +1 -1
  694. package/dist/lib/components/UploadFile/UploadFile.d.ts +26 -0
  695. package/dist/lib/components/UploadFile/UploadFile.d.ts.map +1 -0
  696. package/dist/lib/components/UploadFile/index.d.ts +2 -0
  697. package/dist/lib/components/UploadFile/index.d.ts.map +1 -0
  698. package/dist/lib/components/ValueFilter/ValueFilter.d.ts +11 -0
  699. package/dist/lib/components/ValueFilter/ValueFilter.d.ts.map +1 -0
  700. package/dist/lib/components/ValueFilter/index.d.ts +3 -0
  701. package/dist/lib/components/ValueFilter/index.d.ts.map +1 -0
  702. package/dist/lib/components/ViewTabs/ViewTabs.d.ts +23 -0
  703. package/dist/lib/components/ViewTabs/ViewTabs.d.ts.map +1 -0
  704. package/dist/lib/components/ViewTabs/index.d.ts +3 -0
  705. package/dist/lib/components/ViewTabs/index.d.ts.map +1 -0
  706. package/dist/lib/components/index.d.ts +19 -0
  707. package/dist/lib/components/index.d.ts.map +1 -1
  708. package/dist/lib/config/index.d.ts +6 -0
  709. package/dist/lib/config/index.d.ts.map +1 -1
  710. package/dist/lib/context/ConfirmContext.d.ts +21 -0
  711. package/dist/lib/context/ConfirmContext.d.ts.map +1 -0
  712. package/dist/lib/context/index.d.ts +1 -0
  713. package/dist/lib/context/index.d.ts.map +1 -1
  714. package/dist/lib/hooks/index.d.ts +5 -0
  715. package/dist/lib/hooks/index.d.ts.map +1 -1
  716. package/dist/lib/hooks/useConfirm.d.ts +4 -0
  717. package/dist/lib/hooks/useConfirm.d.ts.map +1 -0
  718. package/dist/lib/hooks/useDialog.d.ts +11 -0
  719. package/dist/lib/hooks/useDialog.d.ts.map +1 -0
  720. package/dist/lib/hooks/useIsMobile.d.ts +2 -0
  721. package/dist/lib/hooks/useIsMobile.d.ts.map +1 -0
  722. package/dist/lib/hooks/useSlugParams.d.ts +12 -0
  723. package/dist/lib/hooks/useSlugParams.d.ts.map +1 -0
  724. package/dist/lib/hooks/useTimer.d.ts +6 -0
  725. package/dist/lib/hooks/useTimer.d.ts.map +1 -0
  726. package/dist/lib/index.d.ts +1 -0
  727. package/dist/lib/index.d.ts.map +1 -1
  728. package/dist/lib/selects/app/AppFilter.d.ts +11 -0
  729. package/dist/lib/selects/app/AppFilter.d.ts.map +1 -0
  730. package/dist/lib/selects/app/AppSelector.d.ts +4 -0
  731. package/dist/lib/selects/app/AppSelector.d.ts.map +1 -0
  732. package/dist/lib/selects/app/index.d.ts +3 -0
  733. package/dist/lib/selects/app/index.d.ts.map +1 -0
  734. package/dist/lib/selects/app-code/AppCodeFilter.d.ts +11 -0
  735. package/dist/lib/selects/app-code/AppCodeFilter.d.ts.map +1 -0
  736. package/dist/lib/selects/app-code/AppCodeSelector.d.ts +4 -0
  737. package/dist/lib/selects/app-code/AppCodeSelector.d.ts.map +1 -0
  738. package/dist/lib/selects/app-code/index.d.ts +3 -0
  739. package/dist/lib/selects/app-code/index.d.ts.map +1 -0
  740. package/dist/lib/selects/cloud-provider/CloudProviderFilter.d.ts +11 -0
  741. package/dist/lib/selects/cloud-provider/CloudProviderFilter.d.ts.map +1 -0
  742. package/dist/lib/selects/cloud-provider/CloudProviderSelector.d.ts +4 -0
  743. package/dist/lib/selects/cloud-provider/CloudProviderSelector.d.ts.map +1 -0
  744. package/dist/lib/selects/cloud-provider/index.d.ts +3 -0
  745. package/dist/lib/selects/cloud-provider/index.d.ts.map +1 -0
  746. package/dist/lib/selects/currency/CurrencyFilter.d.ts +11 -0
  747. package/dist/lib/selects/currency/CurrencyFilter.d.ts.map +1 -0
  748. package/dist/lib/selects/currency/CurrencySelector.d.ts +4 -0
  749. package/dist/lib/selects/currency/CurrencySelector.d.ts.map +1 -0
  750. package/dist/lib/selects/currency/currencies.d.ts +3 -0
  751. package/dist/lib/selects/currency/currencies.d.ts.map +1 -0
  752. package/dist/lib/selects/currency/index.d.ts +3 -0
  753. package/dist/lib/selects/currency/index.d.ts.map +1 -0
  754. package/dist/lib/selects/deployment/DeploymentFilter.d.ts +11 -0
  755. package/dist/lib/selects/deployment/DeploymentFilter.d.ts.map +1 -0
  756. package/dist/lib/selects/deployment/DeploymentSelector.d.ts +4 -0
  757. package/dist/lib/selects/deployment/DeploymentSelector.d.ts.map +1 -0
  758. package/dist/lib/selects/deployment/index.d.ts +3 -0
  759. package/dist/lib/selects/deployment/index.d.ts.map +1 -0
  760. package/dist/lib/selects/feature/FeatureFilter.d.ts +11 -0
  761. package/dist/lib/selects/feature/FeatureFilter.d.ts.map +1 -0
  762. package/dist/lib/selects/feature/FeatureSelector.d.ts +4 -0
  763. package/dist/lib/selects/feature/FeatureSelector.d.ts.map +1 -0
  764. package/dist/lib/selects/feature/index.d.ts +3 -0
  765. package/dist/lib/selects/feature/index.d.ts.map +1 -0
  766. package/dist/lib/selects/index.d.ts +12 -0
  767. package/dist/lib/selects/index.d.ts.map +1 -0
  768. package/dist/lib/selects/industry/IndustryFilter.d.ts +11 -0
  769. package/dist/lib/selects/industry/IndustryFilter.d.ts.map +1 -0
  770. package/dist/lib/selects/industry/IndustrySelector.d.ts +4 -0
  771. package/dist/lib/selects/industry/IndustrySelector.d.ts.map +1 -0
  772. package/dist/lib/selects/industry/index.d.ts +3 -0
  773. package/dist/lib/selects/industry/index.d.ts.map +1 -0
  774. package/dist/lib/selects/locale/LocaleFilter.d.ts +11 -0
  775. package/dist/lib/selects/locale/LocaleFilter.d.ts.map +1 -0
  776. package/dist/lib/selects/locale/LocaleSelector.d.ts +4 -0
  777. package/dist/lib/selects/locale/LocaleSelector.d.ts.map +1 -0
  778. package/dist/lib/selects/locale/index.d.ts +3 -0
  779. package/dist/lib/selects/locale/index.d.ts.map +1 -0
  780. package/dist/lib/selects/locale/locales.d.ts +3 -0
  781. package/dist/lib/selects/locale/locales.d.ts.map +1 -0
  782. package/dist/lib/selects/microfrontend/MicrofrontendSelector.d.ts +4 -0
  783. package/dist/lib/selects/microfrontend/MicrofrontendSelector.d.ts.map +1 -0
  784. package/dist/lib/selects/microfrontend/index.d.ts +2 -0
  785. package/dist/lib/selects/microfrontend/index.d.ts.map +1 -0
  786. package/dist/lib/selects/plan/PlanFilter.d.ts +11 -0
  787. package/dist/lib/selects/plan/PlanFilter.d.ts.map +1 -0
  788. package/dist/lib/selects/plan/PlanSelector.d.ts +4 -0
  789. package/dist/lib/selects/plan/PlanSelector.d.ts.map +1 -0
  790. package/dist/lib/selects/plan/index.d.ts +3 -0
  791. package/dist/lib/selects/plan/index.d.ts.map +1 -0
  792. package/dist/lib/selects/region/RegionFilter.d.ts +11 -0
  793. package/dist/lib/selects/region/RegionFilter.d.ts.map +1 -0
  794. package/dist/lib/selects/region/RegionSelector.d.ts +4 -0
  795. package/dist/lib/selects/region/RegionSelector.d.ts.map +1 -0
  796. package/dist/lib/selects/region/index.d.ts +3 -0
  797. package/dist/lib/selects/region/index.d.ts.map +1 -0
  798. package/dist/lib/selects/timezone/TimezoneFilter.d.ts +11 -0
  799. package/dist/lib/selects/timezone/TimezoneFilter.d.ts.map +1 -0
  800. package/dist/lib/selects/timezone/TimezoneSelector.d.ts +4 -0
  801. package/dist/lib/selects/timezone/TimezoneSelector.d.ts.map +1 -0
  802. package/dist/lib/selects/timezone/index.d.ts +3 -0
  803. package/dist/lib/selects/timezone/index.d.ts.map +1 -0
  804. package/dist/lib/selects/timezone/timezones.d.ts +3 -0
  805. package/dist/lib/selects/timezone/timezones.d.ts.map +1 -0
  806. package/dist/lib/services/table-views.service.d.ts +25 -0
  807. package/dist/lib/services/table-views.service.d.ts.map +1 -0
  808. package/dist/lib/types/api-response.d.ts +21 -0
  809. package/dist/lib/types/api-response.d.ts.map +1 -0
  810. package/dist/lib/types/table-filter.d.ts +41 -0
  811. package/dist/lib/types/table-filter.d.ts.map +1 -0
  812. package/dist/lib/utils/axios.d.ts.map +1 -1
  813. package/dist/lib/utils/index.d.ts +1 -0
  814. package/dist/lib/utils/index.d.ts.map +1 -1
  815. package/dist/lib/utils/motion.d.ts +2 -0
  816. package/dist/lib/utils/motion.d.ts.map +1 -0
  817. package/dist/lib/utils/slug.d.ts +7 -0
  818. package/dist/lib/utils/slug.d.ts.map +1 -0
  819. package/dist/plus.js +18 -0
  820. package/dist/plus.js.map +1 -0
  821. package/dist/popover.js +3 -299
  822. package/dist/popover.js.map +1 -1
  823. package/dist/proxy.js +11392 -0
  824. package/dist/proxy.js.map +1 -0
  825. package/dist/react-error-boundary.js +67 -0
  826. package/dist/react-error-boundary.js.map +1 -0
  827. package/dist/select2.js +116 -0
  828. package/dist/select2.js.map +1 -0
  829. package/dist/selects/app-code.js +37 -0
  830. package/dist/selects/app-code.js.map +1 -0
  831. package/dist/selects/app.js +2 -0
  832. package/dist/selects/app.js.map +1 -0
  833. package/dist/selects/cloud-provider.js +2 -0
  834. package/dist/selects/cloud-provider.js.map +1 -0
  835. package/dist/selects/currency.js +2 -0
  836. package/dist/selects/currency.js.map +1 -0
  837. package/dist/selects/deployment.js +2 -0
  838. package/dist/selects/deployment.js.map +1 -0
  839. package/dist/selects/feature.js +2 -0
  840. package/dist/selects/feature.js.map +1 -0
  841. package/dist/selects/industry.js +2 -0
  842. package/dist/selects/industry.js.map +1 -0
  843. package/dist/selects/locale.js +2 -0
  844. package/dist/selects/locale.js.map +1 -0
  845. package/dist/selects/microfrontend.js +2 -0
  846. package/dist/selects/microfrontend.js.map +1 -0
  847. package/dist/selects/plan.js +2 -0
  848. package/dist/selects/plan.js.map +1 -0
  849. package/dist/selects/region.js +2 -0
  850. package/dist/selects/region.js.map +1 -0
  851. package/dist/selects/timezone.js +2 -0
  852. package/dist/selects/timezone.js.map +1 -0
  853. package/dist/separator2.js +2 -28
  854. package/dist/separator2.js.map +1 -1
  855. package/dist/shadcn/index.d.ts +2 -0
  856. package/dist/shadcn/index.d.ts.map +1 -1
  857. package/dist/shadcn/shadcnBreadcrumb/breadcrumb.d.ts +18 -0
  858. package/dist/shadcn/shadcnBreadcrumb/breadcrumb.d.ts.map +1 -0
  859. package/dist/shadcn/shadcnBreadcrumb/index.d.ts +2 -0
  860. package/dist/shadcn/shadcnBreadcrumb/index.d.ts.map +1 -0
  861. package/dist/shadcn/shadcnCalendar/calendar.d.ts +1 -1
  862. package/dist/shadcn/shadcnCalendar/calendar.d.ts.map +1 -1
  863. package/dist/shadcn/shadcnChart/Chart.d.ts +2 -2
  864. package/dist/shadcn/shadcnChart/Chart.d.ts.map +1 -1
  865. package/dist/shadcn/shadcnCollapsible/collapsible.d.ts +7 -0
  866. package/dist/shadcn/shadcnCollapsible/collapsible.d.ts.map +1 -0
  867. package/dist/shadcn/shadcnCollapsible/index.d.ts +2 -0
  868. package/dist/shadcn/shadcnCollapsible/index.d.ts.map +1 -0
  869. package/dist/shadcn/shadcnDialog/dialog.d.ts +20 -0
  870. package/dist/shadcn/shadcnDialog/dialog.d.ts.map +1 -0
  871. package/dist/shadcn/shadcnDialog/index.d.ts +2 -0
  872. package/dist/shadcn/shadcnDialog/index.d.ts.map +1 -0
  873. package/dist/shadcn/shadcnDropdownMenu/dropdown-menu.d.ts +1 -1
  874. package/dist/shadcn/shadcnDropdownMenu/dropdown-menu.d.ts.map +1 -1
  875. package/dist/shadcn/shadcnForm/form.d.ts +1 -1
  876. package/dist/shadcn/shadcnForm/form.d.ts.map +1 -1
  877. package/dist/shadcn/shadcnInputOTP/InputOTP.d.ts +1 -1
  878. package/dist/shadcn/shadcnInputOTP/InputOTP.d.ts.map +1 -1
  879. package/dist/shadcn/shadcnMultiSelect/multi-select.d.ts +1 -1
  880. package/dist/shadcn/shadcnMultiSelect/multi-select.d.ts.map +1 -1
  881. package/dist/shadcn/shadcnProgress/Progress.d.ts +1 -1
  882. package/dist/shadcn/shadcnProgress/Progress.d.ts.map +1 -1
  883. package/dist/shadcn/shadcnRadioGroup/RadioGroup.d.ts +6 -0
  884. package/dist/shadcn/shadcnRadioGroup/RadioGroup.d.ts.map +1 -0
  885. package/dist/shadcn/shadcnRadioGroup/index.d.ts +2 -0
  886. package/dist/shadcn/shadcnRadioGroup/index.d.ts.map +1 -0
  887. package/dist/shadcn/shadcnSheet/sheet.d.ts +1 -1
  888. package/dist/shadcn/shadcnSheet/sheet.d.ts.map +1 -1
  889. package/dist/shadcn/shadcnSidebar/index.d.ts +2 -0
  890. package/dist/shadcn/shadcnSidebar/index.d.ts.map +1 -0
  891. package/dist/shadcn/shadcnSidebar/sidebar.d.ts +86 -0
  892. package/dist/shadcn/shadcnSidebar/sidebar.d.ts.map +1 -0
  893. package/dist/shadcn/shadcnSingleSelect/single-select.d.ts +2 -1
  894. package/dist/shadcn/shadcnSingleSelect/single-select.d.ts.map +1 -1
  895. package/dist/shadcn/shadcnSwitch/Switch.d.ts.map +1 -1
  896. package/dist/shadcn/shadcnTable/table.d.ts +1 -1
  897. package/dist/shadcn/shadcnTable/table.d.ts.map +1 -1
  898. package/dist/shadcn/shadcnTabs/index.d.ts +2 -0
  899. package/dist/shadcn/shadcnTabs/index.d.ts.map +1 -0
  900. package/dist/shadcn/shadcnTabs/tabs.d.ts +8 -0
  901. package/dist/shadcn/shadcnTabs/tabs.d.ts.map +1 -0
  902. package/dist/shadcn/shadcnTooltip/tooltip.d.ts +1 -1
  903. package/dist/shadcn/shadcnTooltip/tooltip.d.ts.map +1 -1
  904. package/dist/share-2.js +42 -0
  905. package/dist/share-2.js.map +1 -0
  906. package/dist/text-align-justify.js +34 -0
  907. package/dist/text-align-justify.js.map +1 -0
  908. package/dist/trash-2.js +55 -0
  909. package/dist/trash-2.js.map +1 -0
  910. package/dist/types/api-response.js +2 -0
  911. package/dist/types/api-response.js.map +1 -0
  912. package/dist/types/table-filter.js +17 -0
  913. package/dist/types/table-filter.js.map +1 -0
  914. package/dist/upload.js +19 -0
  915. package/dist/upload.js.map +1 -0
  916. package/dist/useConfirm.js +37 -0
  917. package/dist/useConfirm.js.map +1 -0
  918. package/dist/useDataTable.js +26545 -0
  919. package/dist/useDataTable.js.map +1 -0
  920. package/dist/useIsMobile.js +19 -0
  921. package/dist/useIsMobile.js.map +1 -0
  922. package/dist/{useSSE.js → useTimer.js} +33 -3
  923. package/dist/useTimer.js.map +1 -0
  924. package/dist/utils/axios.js +2 -4167
  925. package/dist/utils/axios.js.map +1 -1
  926. package/dist/utils/motion.js +4425 -0
  927. package/dist/utils/motion.js.map +1 -0
  928. package/dist/utils/slug.js +15 -0
  929. package/dist/utils/slug.js.map +1 -0
  930. package/dist/utils.js +3137 -3750
  931. package/dist/utils.js.map +1 -1
  932. package/dist/value.js +820 -0
  933. package/dist/value.js.map +1 -0
  934. package/package.json +186 -3
  935. package/dist/lib/components/DataTable/components/DataTableToolbar.d.ts +0 -15
  936. package/dist/lib/components/DataTable/components/DataTableToolbar.d.ts.map +0 -1
  937. package/dist/useSSE.js.map +0 -1
  938. package/dist/utils2.js +0 -3042
  939. package/dist/utils2.js.map +0 -1
package/dist/axios.js ADDED
@@ -0,0 +1,4575 @@
1
+ import { t as toast, g as generateToastId } from './toast.js';
2
+
3
+ /**
4
+ * Create a bound version of a function with a specified `this` context
5
+ *
6
+ * @param {Function} fn - The function to bind
7
+ * @param {*} thisArg - The value to be passed as the `this` parameter
8
+ * @returns {Function} A new function that will call the original function with the specified `this` context
9
+ */
10
+ function bind(fn, thisArg) {
11
+ return function wrap() {
12
+ return fn.apply(thisArg, arguments);
13
+ };
14
+ }
15
+
16
+ // utils is a library of generic helper functions non-specific to axios
17
+
18
+ const { toString } = Object.prototype;
19
+ const { getPrototypeOf } = Object;
20
+ const { iterator, toStringTag } = Symbol;
21
+
22
+ const kindOf = ((cache) => (thing) => {
23
+ const str = toString.call(thing);
24
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
25
+ })(Object.create(null));
26
+
27
+ const kindOfTest = (type) => {
28
+ type = type.toLowerCase();
29
+ return (thing) => kindOf(thing) === type;
30
+ };
31
+
32
+ const typeOfTest = (type) => (thing) => typeof thing === type;
33
+
34
+ /**
35
+ * Determine if a value is a non-null object
36
+ *
37
+ * @param {Object} val The value to test
38
+ *
39
+ * @returns {boolean} True if value is an Array, otherwise false
40
+ */
41
+ const { isArray } = Array;
42
+
43
+ /**
44
+ * Determine if a value is undefined
45
+ *
46
+ * @param {*} val The value to test
47
+ *
48
+ * @returns {boolean} True if the value is undefined, otherwise false
49
+ */
50
+ const isUndefined = typeOfTest('undefined');
51
+
52
+ /**
53
+ * Determine if a value is a Buffer
54
+ *
55
+ * @param {*} val The value to test
56
+ *
57
+ * @returns {boolean} True if value is a Buffer, otherwise false
58
+ */
59
+ function isBuffer(val) {
60
+ return (
61
+ val !== null &&
62
+ !isUndefined(val) &&
63
+ val.constructor !== null &&
64
+ !isUndefined(val.constructor) &&
65
+ isFunction$1(val.constructor.isBuffer) &&
66
+ val.constructor.isBuffer(val)
67
+ );
68
+ }
69
+
70
+ /**
71
+ * Determine if a value is an ArrayBuffer
72
+ *
73
+ * @param {*} val The value to test
74
+ *
75
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
76
+ */
77
+ const isArrayBuffer = kindOfTest('ArrayBuffer');
78
+
79
+ /**
80
+ * Determine if a value is a view on an ArrayBuffer
81
+ *
82
+ * @param {*} val The value to test
83
+ *
84
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
85
+ */
86
+ function isArrayBufferView(val) {
87
+ let result;
88
+ if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
89
+ result = ArrayBuffer.isView(val);
90
+ } else {
91
+ result = val && val.buffer && isArrayBuffer(val.buffer);
92
+ }
93
+ return result;
94
+ }
95
+
96
+ /**
97
+ * Determine if a value is a String
98
+ *
99
+ * @param {*} val The value to test
100
+ *
101
+ * @returns {boolean} True if value is a String, otherwise false
102
+ */
103
+ const isString = typeOfTest('string');
104
+
105
+ /**
106
+ * Determine if a value is a Function
107
+ *
108
+ * @param {*} val The value to test
109
+ * @returns {boolean} True if value is a Function, otherwise false
110
+ */
111
+ const isFunction$1 = typeOfTest('function');
112
+
113
+ /**
114
+ * Determine if a value is a Number
115
+ *
116
+ * @param {*} val The value to test
117
+ *
118
+ * @returns {boolean} True if value is a Number, otherwise false
119
+ */
120
+ const isNumber = typeOfTest('number');
121
+
122
+ /**
123
+ * Determine if a value is an Object
124
+ *
125
+ * @param {*} thing The value to test
126
+ *
127
+ * @returns {boolean} True if value is an Object, otherwise false
128
+ */
129
+ const isObject = (thing) => thing !== null && typeof thing === 'object';
130
+
131
+ /**
132
+ * Determine if a value is a Boolean
133
+ *
134
+ * @param {*} thing The value to test
135
+ * @returns {boolean} True if value is a Boolean, otherwise false
136
+ */
137
+ const isBoolean = (thing) => thing === true || thing === false;
138
+
139
+ /**
140
+ * Determine if a value is a plain Object
141
+ *
142
+ * @param {*} val The value to test
143
+ *
144
+ * @returns {boolean} True if value is a plain Object, otherwise false
145
+ */
146
+ const isPlainObject = (val) => {
147
+ if (kindOf(val) !== 'object') {
148
+ return false;
149
+ }
150
+
151
+ const prototype = getPrototypeOf(val);
152
+ return (
153
+ (prototype === null ||
154
+ prototype === Object.prototype ||
155
+ Object.getPrototypeOf(prototype) === null) &&
156
+ !(toStringTag in val) &&
157
+ !(iterator in val)
158
+ );
159
+ };
160
+
161
+ /**
162
+ * Determine if a value is an empty object (safely handles Buffers)
163
+ *
164
+ * @param {*} val The value to test
165
+ *
166
+ * @returns {boolean} True if value is an empty object, otherwise false
167
+ */
168
+ const isEmptyObject = (val) => {
169
+ // Early return for non-objects or Buffers to prevent RangeError
170
+ if (!isObject(val) || isBuffer(val)) {
171
+ return false;
172
+ }
173
+
174
+ try {
175
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
176
+ } catch (e) {
177
+ // Fallback for any other objects that might cause RangeError with Object.keys()
178
+ return false;
179
+ }
180
+ };
181
+
182
+ /**
183
+ * Determine if a value is a Date
184
+ *
185
+ * @param {*} val The value to test
186
+ *
187
+ * @returns {boolean} True if value is a Date, otherwise false
188
+ */
189
+ const isDate = kindOfTest('Date');
190
+
191
+ /**
192
+ * Determine if a value is a File
193
+ *
194
+ * @param {*} val The value to test
195
+ *
196
+ * @returns {boolean} True if value is a File, otherwise false
197
+ */
198
+ const isFile = kindOfTest('File');
199
+
200
+ /**
201
+ * Determine if a value is a React Native Blob
202
+ * React Native "blob": an object with a `uri` attribute. Optionally, it can
203
+ * also have a `name` and `type` attribute to specify filename and content type
204
+ *
205
+ * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
206
+ *
207
+ * @param {*} value The value to test
208
+ *
209
+ * @returns {boolean} True if value is a React Native Blob, otherwise false
210
+ */
211
+ const isReactNativeBlob = (value) => {
212
+ return !!(value && typeof value.uri !== 'undefined');
213
+ };
214
+
215
+ /**
216
+ * Determine if environment is React Native
217
+ * ReactNative `FormData` has a non-standard `getParts()` method
218
+ *
219
+ * @param {*} formData The formData to test
220
+ *
221
+ * @returns {boolean} True if environment is React Native, otherwise false
222
+ */
223
+ const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';
224
+
225
+ /**
226
+ * Determine if a value is a Blob
227
+ *
228
+ * @param {*} val The value to test
229
+ *
230
+ * @returns {boolean} True if value is a Blob, otherwise false
231
+ */
232
+ const isBlob = kindOfTest('Blob');
233
+
234
+ /**
235
+ * Determine if a value is a FileList
236
+ *
237
+ * @param {*} val The value to test
238
+ *
239
+ * @returns {boolean} True if value is a File, otherwise false
240
+ */
241
+ const isFileList = kindOfTest('FileList');
242
+
243
+ /**
244
+ * Determine if a value is a Stream
245
+ *
246
+ * @param {*} val The value to test
247
+ *
248
+ * @returns {boolean} True if value is a Stream, otherwise false
249
+ */
250
+ const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
251
+
252
+ /**
253
+ * Determine if a value is a FormData
254
+ *
255
+ * @param {*} thing The value to test
256
+ *
257
+ * @returns {boolean} True if value is an FormData, otherwise false
258
+ */
259
+ function getGlobal() {
260
+ if (typeof globalThis !== 'undefined') return globalThis;
261
+ if (typeof self !== 'undefined') return self;
262
+ if (typeof window !== 'undefined') return window;
263
+ if (typeof global !== 'undefined') return global;
264
+ return {};
265
+ }
266
+
267
+ const G = getGlobal();
268
+ const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
269
+
270
+ const isFormData = (thing) => {
271
+ let kind;
272
+ return thing && (
273
+ (FormDataCtor && thing instanceof FormDataCtor) || (
274
+ isFunction$1(thing.append) && (
275
+ (kind = kindOf(thing)) === 'formdata' ||
276
+ // detect form-data instance
277
+ (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
278
+ )
279
+ )
280
+ );
281
+ };
282
+
283
+ /**
284
+ * Determine if a value is a URLSearchParams object
285
+ *
286
+ * @param {*} val The value to test
287
+ *
288
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
289
+ */
290
+ const isURLSearchParams = kindOfTest('URLSearchParams');
291
+
292
+ const [isReadableStream, isRequest, isResponse, isHeaders] = [
293
+ 'ReadableStream',
294
+ 'Request',
295
+ 'Response',
296
+ 'Headers',
297
+ ].map(kindOfTest);
298
+
299
+ /**
300
+ * Trim excess whitespace off the beginning and end of a string
301
+ *
302
+ * @param {String} str The String to trim
303
+ *
304
+ * @returns {String} The String freed of excess whitespace
305
+ */
306
+ const trim = (str) => {
307
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
308
+ };
309
+ /**
310
+ * Iterate over an Array or an Object invoking a function for each item.
311
+ *
312
+ * If `obj` is an Array callback will be called passing
313
+ * the value, index, and complete array for each item.
314
+ *
315
+ * If 'obj' is an Object callback will be called passing
316
+ * the value, key, and complete object for each property.
317
+ *
318
+ * @param {Object|Array<unknown>} obj The object to iterate
319
+ * @param {Function} fn The callback to invoke for each item
320
+ *
321
+ * @param {Object} [options]
322
+ * @param {Boolean} [options.allOwnKeys = false]
323
+ * @returns {any}
324
+ */
325
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
326
+ // Don't bother if no value provided
327
+ if (obj === null || typeof obj === 'undefined') {
328
+ return;
329
+ }
330
+
331
+ let i;
332
+ let l;
333
+
334
+ // Force an array if not already something iterable
335
+ if (typeof obj !== 'object') {
336
+ /*eslint no-param-reassign:0*/
337
+ obj = [obj];
338
+ }
339
+
340
+ if (isArray(obj)) {
341
+ // Iterate over array values
342
+ for (i = 0, l = obj.length; i < l; i++) {
343
+ fn.call(null, obj[i], i, obj);
344
+ }
345
+ } else {
346
+ // Buffer check
347
+ if (isBuffer(obj)) {
348
+ return;
349
+ }
350
+
351
+ // Iterate over object keys
352
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
353
+ const len = keys.length;
354
+ let key;
355
+
356
+ for (i = 0; i < len; i++) {
357
+ key = keys[i];
358
+ fn.call(null, obj[key], key, obj);
359
+ }
360
+ }
361
+ }
362
+
363
+ /**
364
+ * Finds a key in an object, case-insensitive, returning the actual key name.
365
+ * Returns null if the object is a Buffer or if no match is found.
366
+ *
367
+ * @param {Object} obj - The object to search.
368
+ * @param {string} key - The key to find (case-insensitive).
369
+ * @returns {?string} The actual key name if found, otherwise null.
370
+ */
371
+ function findKey(obj, key) {
372
+ if (isBuffer(obj)) {
373
+ return null;
374
+ }
375
+
376
+ key = key.toLowerCase();
377
+ const keys = Object.keys(obj);
378
+ let i = keys.length;
379
+ let _key;
380
+ while (i-- > 0) {
381
+ _key = keys[i];
382
+ if (key === _key.toLowerCase()) {
383
+ return _key;
384
+ }
385
+ }
386
+ return null;
387
+ }
388
+
389
+ const _global = (() => {
390
+ /*eslint no-undef:0*/
391
+ if (typeof globalThis !== 'undefined') return globalThis;
392
+ return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
393
+ })();
394
+
395
+ const isContextDefined = (context) => !isUndefined(context) && context !== _global;
396
+
397
+ /**
398
+ * Accepts varargs expecting each argument to be an object, then
399
+ * immutably merges the properties of each object and returns result.
400
+ *
401
+ * When multiple objects contain the same key the later object in
402
+ * the arguments list will take precedence.
403
+ *
404
+ * Example:
405
+ *
406
+ * ```js
407
+ * const result = merge({foo: 123}, {foo: 456});
408
+ * console.log(result.foo); // outputs 456
409
+ * ```
410
+ *
411
+ * @param {Object} obj1 Object to merge
412
+ *
413
+ * @returns {Object} Result of all merge properties
414
+ */
415
+ function merge(/* obj1, obj2, obj3, ... */) {
416
+ const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
417
+ const result = {};
418
+ const assignValue = (val, key) => {
419
+ // Skip dangerous property names to prevent prototype pollution
420
+ if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
421
+ return;
422
+ }
423
+
424
+ const targetKey = (caseless && findKey(result, key)) || key;
425
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
426
+ result[targetKey] = merge(result[targetKey], val);
427
+ } else if (isPlainObject(val)) {
428
+ result[targetKey] = merge({}, val);
429
+ } else if (isArray(val)) {
430
+ result[targetKey] = val.slice();
431
+ } else if (!skipUndefined || !isUndefined(val)) {
432
+ result[targetKey] = val;
433
+ }
434
+ };
435
+
436
+ for (let i = 0, l = arguments.length; i < l; i++) {
437
+ arguments[i] && forEach(arguments[i], assignValue);
438
+ }
439
+ return result;
440
+ }
441
+
442
+ /**
443
+ * Extends object a by mutably adding to it the properties of object b.
444
+ *
445
+ * @param {Object} a The object to be extended
446
+ * @param {Object} b The object to copy properties from
447
+ * @param {Object} thisArg The object to bind function to
448
+ *
449
+ * @param {Object} [options]
450
+ * @param {Boolean} [options.allOwnKeys]
451
+ * @returns {Object} The resulting value of object a
452
+ */
453
+ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
454
+ forEach(
455
+ b,
456
+ (val, key) => {
457
+ if (thisArg && isFunction$1(val)) {
458
+ Object.defineProperty(a, key, {
459
+ value: bind(val, thisArg),
460
+ writable: true,
461
+ enumerable: true,
462
+ configurable: true,
463
+ });
464
+ } else {
465
+ Object.defineProperty(a, key, {
466
+ value: val,
467
+ writable: true,
468
+ enumerable: true,
469
+ configurable: true,
470
+ });
471
+ }
472
+ },
473
+ { allOwnKeys }
474
+ );
475
+ return a;
476
+ };
477
+
478
+ /**
479
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
480
+ *
481
+ * @param {string} content with BOM
482
+ *
483
+ * @returns {string} content value without BOM
484
+ */
485
+ const stripBOM = (content) => {
486
+ if (content.charCodeAt(0) === 0xfeff) {
487
+ content = content.slice(1);
488
+ }
489
+ return content;
490
+ };
491
+
492
+ /**
493
+ * Inherit the prototype methods from one constructor into another
494
+ * @param {function} constructor
495
+ * @param {function} superConstructor
496
+ * @param {object} [props]
497
+ * @param {object} [descriptors]
498
+ *
499
+ * @returns {void}
500
+ */
501
+ const inherits = (constructor, superConstructor, props, descriptors) => {
502
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
503
+ Object.defineProperty(constructor.prototype, 'constructor', {
504
+ value: constructor,
505
+ writable: true,
506
+ enumerable: false,
507
+ configurable: true,
508
+ });
509
+ Object.defineProperty(constructor, 'super', {
510
+ value: superConstructor.prototype,
511
+ });
512
+ props && Object.assign(constructor.prototype, props);
513
+ };
514
+
515
+ /**
516
+ * Resolve object with deep prototype chain to a flat object
517
+ * @param {Object} sourceObj source object
518
+ * @param {Object} [destObj]
519
+ * @param {Function|Boolean} [filter]
520
+ * @param {Function} [propFilter]
521
+ *
522
+ * @returns {Object}
523
+ */
524
+ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
525
+ let props;
526
+ let i;
527
+ let prop;
528
+ const merged = {};
529
+
530
+ destObj = destObj || {};
531
+ // eslint-disable-next-line no-eq-null,eqeqeq
532
+ if (sourceObj == null) return destObj;
533
+
534
+ do {
535
+ props = Object.getOwnPropertyNames(sourceObj);
536
+ i = props.length;
537
+ while (i-- > 0) {
538
+ prop = props[i];
539
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
540
+ destObj[prop] = sourceObj[prop];
541
+ merged[prop] = true;
542
+ }
543
+ }
544
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
545
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
546
+
547
+ return destObj;
548
+ };
549
+
550
+ /**
551
+ * Determines whether a string ends with the characters of a specified string
552
+ *
553
+ * @param {String} str
554
+ * @param {String} searchString
555
+ * @param {Number} [position= 0]
556
+ *
557
+ * @returns {boolean}
558
+ */
559
+ const endsWith = (str, searchString, position) => {
560
+ str = String(str);
561
+ if (position === undefined || position > str.length) {
562
+ position = str.length;
563
+ }
564
+ position -= searchString.length;
565
+ const lastIndex = str.indexOf(searchString, position);
566
+ return lastIndex !== -1 && lastIndex === position;
567
+ };
568
+
569
+ /**
570
+ * Returns new array from array like object or null if failed
571
+ *
572
+ * @param {*} [thing]
573
+ *
574
+ * @returns {?Array}
575
+ */
576
+ const toArray = (thing) => {
577
+ if (!thing) return null;
578
+ if (isArray(thing)) return thing;
579
+ let i = thing.length;
580
+ if (!isNumber(i)) return null;
581
+ const arr = new Array(i);
582
+ while (i-- > 0) {
583
+ arr[i] = thing[i];
584
+ }
585
+ return arr;
586
+ };
587
+
588
+ /**
589
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
590
+ * thing passed in is an instance of Uint8Array
591
+ *
592
+ * @param {TypedArray}
593
+ *
594
+ * @returns {Array}
595
+ */
596
+ // eslint-disable-next-line func-names
597
+ const isTypedArray = ((TypedArray) => {
598
+ // eslint-disable-next-line func-names
599
+ return (thing) => {
600
+ return TypedArray && thing instanceof TypedArray;
601
+ };
602
+ })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
603
+
604
+ /**
605
+ * For each entry in the object, call the function with the key and value.
606
+ *
607
+ * @param {Object<any, any>} obj - The object to iterate over.
608
+ * @param {Function} fn - The function to call for each entry.
609
+ *
610
+ * @returns {void}
611
+ */
612
+ const forEachEntry = (obj, fn) => {
613
+ const generator = obj && obj[iterator];
614
+
615
+ const _iterator = generator.call(obj);
616
+
617
+ let result;
618
+
619
+ while ((result = _iterator.next()) && !result.done) {
620
+ const pair = result.value;
621
+ fn.call(obj, pair[0], pair[1]);
622
+ }
623
+ };
624
+
625
+ /**
626
+ * It takes a regular expression and a string, and returns an array of all the matches
627
+ *
628
+ * @param {string} regExp - The regular expression to match against.
629
+ * @param {string} str - The string to search.
630
+ *
631
+ * @returns {Array<boolean>}
632
+ */
633
+ const matchAll = (regExp, str) => {
634
+ let matches;
635
+ const arr = [];
636
+
637
+ while ((matches = regExp.exec(str)) !== null) {
638
+ arr.push(matches);
639
+ }
640
+
641
+ return arr;
642
+ };
643
+
644
+ /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
645
+ const isHTMLForm = kindOfTest('HTMLFormElement');
646
+
647
+ const toCamelCase = (str) => {
648
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
649
+ return p1.toUpperCase() + p2;
650
+ });
651
+ };
652
+
653
+ /* Creating a function that will check if an object has a property. */
654
+ const hasOwnProperty = (
655
+ ({ hasOwnProperty }) =>
656
+ (obj, prop) =>
657
+ hasOwnProperty.call(obj, prop)
658
+ )(Object.prototype);
659
+
660
+ /**
661
+ * Determine if a value is a RegExp object
662
+ *
663
+ * @param {*} val The value to test
664
+ *
665
+ * @returns {boolean} True if value is a RegExp object, otherwise false
666
+ */
667
+ const isRegExp = kindOfTest('RegExp');
668
+
669
+ const reduceDescriptors = (obj, reducer) => {
670
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
671
+ const reducedDescriptors = {};
672
+
673
+ forEach(descriptors, (descriptor, name) => {
674
+ let ret;
675
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
676
+ reducedDescriptors[name] = ret || descriptor;
677
+ }
678
+ });
679
+
680
+ Object.defineProperties(obj, reducedDescriptors);
681
+ };
682
+
683
+ /**
684
+ * Makes all methods read-only
685
+ * @param {Object} obj
686
+ */
687
+
688
+ const freezeMethods = (obj) => {
689
+ reduceDescriptors(obj, (descriptor, name) => {
690
+ // skip restricted props in strict mode
691
+ if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
692
+ return false;
693
+ }
694
+
695
+ const value = obj[name];
696
+
697
+ if (!isFunction$1(value)) return;
698
+
699
+ descriptor.enumerable = false;
700
+
701
+ if ('writable' in descriptor) {
702
+ descriptor.writable = false;
703
+ return;
704
+ }
705
+
706
+ if (!descriptor.set) {
707
+ descriptor.set = () => {
708
+ throw Error("Can not rewrite read-only method '" + name + "'");
709
+ };
710
+ }
711
+ });
712
+ };
713
+
714
+ /**
715
+ * Converts an array or a delimited string into an object set with values as keys and true as values.
716
+ * Useful for fast membership checks.
717
+ *
718
+ * @param {Array|string} arrayOrString - The array or string to convert.
719
+ * @param {string} delimiter - The delimiter to use if input is a string.
720
+ * @returns {Object} An object with keys from the array or string, values set to true.
721
+ */
722
+ const toObjectSet = (arrayOrString, delimiter) => {
723
+ const obj = {};
724
+
725
+ const define = (arr) => {
726
+ arr.forEach((value) => {
727
+ obj[value] = true;
728
+ });
729
+ };
730
+
731
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
732
+
733
+ return obj;
734
+ };
735
+
736
+ const noop = () => {};
737
+
738
+ const toFiniteNumber = (value, defaultValue) => {
739
+ return value != null && Number.isFinite((value = +value)) ? value : defaultValue;
740
+ };
741
+
742
+ /**
743
+ * If the thing is a FormData object, return true, otherwise return false.
744
+ *
745
+ * @param {unknown} thing - The thing to check.
746
+ *
747
+ * @returns {boolean}
748
+ */
749
+ function isSpecCompliantForm(thing) {
750
+ return !!(
751
+ thing &&
752
+ isFunction$1(thing.append) &&
753
+ thing[toStringTag] === 'FormData' &&
754
+ thing[iterator]
755
+ );
756
+ }
757
+
758
+ /**
759
+ * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
760
+ *
761
+ * @param {Object} obj - The object to convert.
762
+ * @returns {Object} The JSON-compatible object.
763
+ */
764
+ const toJSONObject = (obj) => {
765
+ const stack = new Array(10);
766
+
767
+ const visit = (source, i) => {
768
+ if (isObject(source)) {
769
+ if (stack.indexOf(source) >= 0) {
770
+ return;
771
+ }
772
+
773
+ //Buffer check
774
+ if (isBuffer(source)) {
775
+ return source;
776
+ }
777
+
778
+ if (!('toJSON' in source)) {
779
+ stack[i] = source;
780
+ const target = isArray(source) ? [] : {};
781
+
782
+ forEach(source, (value, key) => {
783
+ const reducedValue = visit(value, i + 1);
784
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
785
+ });
786
+
787
+ stack[i] = undefined;
788
+
789
+ return target;
790
+ }
791
+ }
792
+
793
+ return source;
794
+ };
795
+
796
+ return visit(obj, 0);
797
+ };
798
+
799
+ /**
800
+ * Determines if a value is an async function.
801
+ *
802
+ * @param {*} thing - The value to test.
803
+ * @returns {boolean} True if value is an async function, otherwise false.
804
+ */
805
+ const isAsyncFn = kindOfTest('AsyncFunction');
806
+
807
+ /**
808
+ * Determines if a value is thenable (has then and catch methods).
809
+ *
810
+ * @param {*} thing - The value to test.
811
+ * @returns {boolean} True if value is thenable, otherwise false.
812
+ */
813
+ const isThenable = (thing) =>
814
+ thing &&
815
+ (isObject(thing) || isFunction$1(thing)) &&
816
+ isFunction$1(thing.then) &&
817
+ isFunction$1(thing.catch);
818
+
819
+ // original code
820
+ // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
821
+
822
+ /**
823
+ * Provides a cross-platform setImmediate implementation.
824
+ * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
825
+ *
826
+ * @param {boolean} setImmediateSupported - Whether setImmediate is supported.
827
+ * @param {boolean} postMessageSupported - Whether postMessage is supported.
828
+ * @returns {Function} A function to schedule a callback asynchronously.
829
+ */
830
+ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
831
+ if (setImmediateSupported) {
832
+ return setImmediate;
833
+ }
834
+
835
+ return postMessageSupported
836
+ ? ((token, callbacks) => {
837
+ _global.addEventListener(
838
+ 'message',
839
+ ({ source, data }) => {
840
+ if (source === _global && data === token) {
841
+ callbacks.length && callbacks.shift()();
842
+ }
843
+ },
844
+ false
845
+ );
846
+
847
+ return (cb) => {
848
+ callbacks.push(cb);
849
+ _global.postMessage(token, '*');
850
+ };
851
+ })(`axios@${Math.random()}`, [])
852
+ : (cb) => setTimeout(cb);
853
+ })(typeof setImmediate === 'function', isFunction$1(_global.postMessage));
854
+
855
+ /**
856
+ * Schedules a microtask or asynchronous callback as soon as possible.
857
+ * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
858
+ *
859
+ * @type {Function}
860
+ */
861
+ const asap =
862
+ typeof queueMicrotask !== 'undefined'
863
+ ? queueMicrotask.bind(_global)
864
+ : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;
865
+
866
+ // *********************
867
+
868
+ const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
869
+
870
+ const utils$1 = {
871
+ isArray,
872
+ isArrayBuffer,
873
+ isBuffer,
874
+ isFormData,
875
+ isArrayBufferView,
876
+ isString,
877
+ isNumber,
878
+ isBoolean,
879
+ isObject,
880
+ isPlainObject,
881
+ isEmptyObject,
882
+ isReadableStream,
883
+ isRequest,
884
+ isResponse,
885
+ isHeaders,
886
+ isUndefined,
887
+ isDate,
888
+ isFile,
889
+ isReactNativeBlob,
890
+ isReactNative,
891
+ isBlob,
892
+ isRegExp,
893
+ isFunction: isFunction$1,
894
+ isStream,
895
+ isURLSearchParams,
896
+ isTypedArray,
897
+ isFileList,
898
+ forEach,
899
+ merge,
900
+ extend,
901
+ trim,
902
+ stripBOM,
903
+ inherits,
904
+ toFlatObject,
905
+ kindOf,
906
+ kindOfTest,
907
+ endsWith,
908
+ toArray,
909
+ forEachEntry,
910
+ matchAll,
911
+ isHTMLForm,
912
+ hasOwnProperty,
913
+ hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
914
+ reduceDescriptors,
915
+ freezeMethods,
916
+ toObjectSet,
917
+ toCamelCase,
918
+ noop,
919
+ toFiniteNumber,
920
+ findKey,
921
+ global: _global,
922
+ isContextDefined,
923
+ isSpecCompliantForm,
924
+ toJSONObject,
925
+ isAsyncFn,
926
+ isThenable,
927
+ setImmediate: _setImmediate,
928
+ asap,
929
+ isIterable,
930
+ };
931
+
932
+ let AxiosError$1 = class AxiosError extends Error {
933
+ static from(error, code, config, request, response, customProps) {
934
+ const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
935
+ axiosError.cause = error;
936
+ axiosError.name = error.name;
937
+
938
+ // Preserve status from the original error if not already set from response
939
+ if (error.status != null && axiosError.status == null) {
940
+ axiosError.status = error.status;
941
+ }
942
+
943
+ customProps && Object.assign(axiosError, customProps);
944
+ return axiosError;
945
+ }
946
+
947
+ /**
948
+ * Create an Error with the specified message, config, error code, request and response.
949
+ *
950
+ * @param {string} message The error message.
951
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
952
+ * @param {Object} [config] The config.
953
+ * @param {Object} [request] The request.
954
+ * @param {Object} [response] The response.
955
+ *
956
+ * @returns {Error} The created error.
957
+ */
958
+ constructor(message, code, config, request, response) {
959
+ super(message);
960
+
961
+ // Make message enumerable to maintain backward compatibility
962
+ // The native Error constructor sets message as non-enumerable,
963
+ // but axios < v1.13.3 had it as enumerable
964
+ Object.defineProperty(this, 'message', {
965
+ value: message,
966
+ enumerable: true,
967
+ writable: true,
968
+ configurable: true
969
+ });
970
+
971
+ this.name = 'AxiosError';
972
+ this.isAxiosError = true;
973
+ code && (this.code = code);
974
+ config && (this.config = config);
975
+ request && (this.request = request);
976
+ if (response) {
977
+ this.response = response;
978
+ this.status = response.status;
979
+ }
980
+ }
981
+
982
+ toJSON() {
983
+ return {
984
+ // Standard
985
+ message: this.message,
986
+ name: this.name,
987
+ // Microsoft
988
+ description: this.description,
989
+ number: this.number,
990
+ // Mozilla
991
+ fileName: this.fileName,
992
+ lineNumber: this.lineNumber,
993
+ columnNumber: this.columnNumber,
994
+ stack: this.stack,
995
+ // Axios
996
+ config: utils$1.toJSONObject(this.config),
997
+ code: this.code,
998
+ status: this.status,
999
+ };
1000
+ }
1001
+ };
1002
+
1003
+ // This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
1004
+ AxiosError$1.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
1005
+ AxiosError$1.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
1006
+ AxiosError$1.ECONNABORTED = 'ECONNABORTED';
1007
+ AxiosError$1.ETIMEDOUT = 'ETIMEDOUT';
1008
+ AxiosError$1.ERR_NETWORK = 'ERR_NETWORK';
1009
+ AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
1010
+ AxiosError$1.ERR_DEPRECATED = 'ERR_DEPRECATED';
1011
+ AxiosError$1.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
1012
+ AxiosError$1.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
1013
+ AxiosError$1.ERR_CANCELED = 'ERR_CANCELED';
1014
+ AxiosError$1.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
1015
+ AxiosError$1.ERR_INVALID_URL = 'ERR_INVALID_URL';
1016
+
1017
+ // eslint-disable-next-line strict
1018
+ const httpAdapter = null;
1019
+
1020
+ /**
1021
+ * Determines if the given thing is a array or js object.
1022
+ *
1023
+ * @param {string} thing - The object or array to be visited.
1024
+ *
1025
+ * @returns {boolean}
1026
+ */
1027
+ function isVisitable(thing) {
1028
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
1029
+ }
1030
+
1031
+ /**
1032
+ * It removes the brackets from the end of a string
1033
+ *
1034
+ * @param {string} key - The key of the parameter.
1035
+ *
1036
+ * @returns {string} the key without the brackets.
1037
+ */
1038
+ function removeBrackets(key) {
1039
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
1040
+ }
1041
+
1042
+ /**
1043
+ * It takes a path, a key, and a boolean, and returns a string
1044
+ *
1045
+ * @param {string} path - The path to the current key.
1046
+ * @param {string} key - The key of the current object being iterated over.
1047
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
1048
+ *
1049
+ * @returns {string} The path to the current key.
1050
+ */
1051
+ function renderKey(path, key, dots) {
1052
+ if (!path) return key;
1053
+ return path
1054
+ .concat(key)
1055
+ .map(function each(token, i) {
1056
+ // eslint-disable-next-line no-param-reassign
1057
+ token = removeBrackets(token);
1058
+ return !dots && i ? '[' + token + ']' : token;
1059
+ })
1060
+ .join(dots ? '.' : '');
1061
+ }
1062
+
1063
+ /**
1064
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
1065
+ *
1066
+ * @param {Array<any>} arr - The array to check
1067
+ *
1068
+ * @returns {boolean}
1069
+ */
1070
+ function isFlatArray(arr) {
1071
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
1072
+ }
1073
+
1074
+ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
1075
+ return /^is[A-Z]/.test(prop);
1076
+ });
1077
+
1078
+ /**
1079
+ * Convert a data object to FormData
1080
+ *
1081
+ * @param {Object} obj
1082
+ * @param {?Object} [formData]
1083
+ * @param {?Object} [options]
1084
+ * @param {Function} [options.visitor]
1085
+ * @param {Boolean} [options.metaTokens = true]
1086
+ * @param {Boolean} [options.dots = false]
1087
+ * @param {?Boolean} [options.indexes = false]
1088
+ *
1089
+ * @returns {Object}
1090
+ **/
1091
+
1092
+ /**
1093
+ * It converts an object into a FormData object
1094
+ *
1095
+ * @param {Object<any, any>} obj - The object to convert to form data.
1096
+ * @param {string} formData - The FormData object to append to.
1097
+ * @param {Object<string, any>} options
1098
+ *
1099
+ * @returns
1100
+ */
1101
+ function toFormData$1(obj, formData, options) {
1102
+ if (!utils$1.isObject(obj)) {
1103
+ throw new TypeError('target must be an object');
1104
+ }
1105
+
1106
+ // eslint-disable-next-line no-param-reassign
1107
+ formData = formData || new (FormData)();
1108
+
1109
+ // eslint-disable-next-line no-param-reassign
1110
+ options = utils$1.toFlatObject(
1111
+ options,
1112
+ {
1113
+ metaTokens: true,
1114
+ dots: false,
1115
+ indexes: false,
1116
+ },
1117
+ false,
1118
+ function defined(option, source) {
1119
+ // eslint-disable-next-line no-eq-null,eqeqeq
1120
+ return !utils$1.isUndefined(source[option]);
1121
+ }
1122
+ );
1123
+
1124
+ const metaTokens = options.metaTokens;
1125
+ // eslint-disable-next-line no-use-before-define
1126
+ const visitor = options.visitor || defaultVisitor;
1127
+ const dots = options.dots;
1128
+ const indexes = options.indexes;
1129
+ const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
1130
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
1131
+
1132
+ if (!utils$1.isFunction(visitor)) {
1133
+ throw new TypeError('visitor must be a function');
1134
+ }
1135
+
1136
+ function convertValue(value) {
1137
+ if (value === null) return '';
1138
+
1139
+ if (utils$1.isDate(value)) {
1140
+ return value.toISOString();
1141
+ }
1142
+
1143
+ if (utils$1.isBoolean(value)) {
1144
+ return value.toString();
1145
+ }
1146
+
1147
+ if (!useBlob && utils$1.isBlob(value)) {
1148
+ throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
1149
+ }
1150
+
1151
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
1152
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
1153
+ }
1154
+
1155
+ return value;
1156
+ }
1157
+
1158
+ /**
1159
+ * Default visitor.
1160
+ *
1161
+ * @param {*} value
1162
+ * @param {String|Number} key
1163
+ * @param {Array<String|Number>} path
1164
+ * @this {FormData}
1165
+ *
1166
+ * @returns {boolean} return true to visit the each prop of the value recursively
1167
+ */
1168
+ function defaultVisitor(value, key, path) {
1169
+ let arr = value;
1170
+
1171
+ if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
1172
+ formData.append(renderKey(path, key, dots), convertValue(value));
1173
+ return false;
1174
+ }
1175
+
1176
+ if (value && !path && typeof value === 'object') {
1177
+ if (utils$1.endsWith(key, '{}')) {
1178
+ // eslint-disable-next-line no-param-reassign
1179
+ key = metaTokens ? key : key.slice(0, -2);
1180
+ // eslint-disable-next-line no-param-reassign
1181
+ value = JSON.stringify(value);
1182
+ } else if (
1183
+ (utils$1.isArray(value) && isFlatArray(value)) ||
1184
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value)))
1185
+ ) {
1186
+ // eslint-disable-next-line no-param-reassign
1187
+ key = removeBrackets(key);
1188
+
1189
+ arr.forEach(function each(el, index) {
1190
+ !(utils$1.isUndefined(el) || el === null) &&
1191
+ formData.append(
1192
+ // eslint-disable-next-line no-nested-ternary
1193
+ indexes === true
1194
+ ? renderKey([key], index, dots)
1195
+ : indexes === null
1196
+ ? key
1197
+ : key + '[]',
1198
+ convertValue(el)
1199
+ );
1200
+ });
1201
+ return false;
1202
+ }
1203
+ }
1204
+
1205
+ if (isVisitable(value)) {
1206
+ return true;
1207
+ }
1208
+
1209
+ formData.append(renderKey(path, key, dots), convertValue(value));
1210
+
1211
+ return false;
1212
+ }
1213
+
1214
+ const stack = [];
1215
+
1216
+ const exposedHelpers = Object.assign(predicates, {
1217
+ defaultVisitor,
1218
+ convertValue,
1219
+ isVisitable,
1220
+ });
1221
+
1222
+ function build(value, path) {
1223
+ if (utils$1.isUndefined(value)) return;
1224
+
1225
+ if (stack.indexOf(value) !== -1) {
1226
+ throw Error('Circular reference detected in ' + path.join('.'));
1227
+ }
1228
+
1229
+ stack.push(value);
1230
+
1231
+ utils$1.forEach(value, function each(el, key) {
1232
+ const result =
1233
+ !(utils$1.isUndefined(el) || el === null) &&
1234
+ visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
1235
+
1236
+ if (result === true) {
1237
+ build(el, path ? path.concat(key) : [key]);
1238
+ }
1239
+ });
1240
+
1241
+ stack.pop();
1242
+ }
1243
+
1244
+ if (!utils$1.isObject(obj)) {
1245
+ throw new TypeError('data must be an object');
1246
+ }
1247
+
1248
+ build(obj);
1249
+
1250
+ return formData;
1251
+ }
1252
+
1253
+ /**
1254
+ * It encodes a string by replacing all characters that are not in the unreserved set with
1255
+ * their percent-encoded equivalents
1256
+ *
1257
+ * @param {string} str - The string to encode.
1258
+ *
1259
+ * @returns {string} The encoded string.
1260
+ */
1261
+ function encode$1(str) {
1262
+ const charMap = {
1263
+ '!': '%21',
1264
+ "'": '%27',
1265
+ '(': '%28',
1266
+ ')': '%29',
1267
+ '~': '%7E',
1268
+ '%20': '+',
1269
+ '%00': '\x00',
1270
+ };
1271
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
1272
+ return charMap[match];
1273
+ });
1274
+ }
1275
+
1276
+ /**
1277
+ * It takes a params object and converts it to a FormData object
1278
+ *
1279
+ * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
1280
+ * @param {Object<string, any>} options - The options object passed to the Axios constructor.
1281
+ *
1282
+ * @returns {void}
1283
+ */
1284
+ function AxiosURLSearchParams(params, options) {
1285
+ this._pairs = [];
1286
+
1287
+ params && toFormData$1(params, this, options);
1288
+ }
1289
+
1290
+ const prototype = AxiosURLSearchParams.prototype;
1291
+
1292
+ prototype.append = function append(name, value) {
1293
+ this._pairs.push([name, value]);
1294
+ };
1295
+
1296
+ prototype.toString = function toString(encoder) {
1297
+ const _encode = encoder
1298
+ ? function (value) {
1299
+ return encoder.call(this, value, encode$1);
1300
+ }
1301
+ : encode$1;
1302
+
1303
+ return this._pairs
1304
+ .map(function each(pair) {
1305
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
1306
+ }, '')
1307
+ .join('&');
1308
+ };
1309
+
1310
+ /**
1311
+ * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
1312
+ * URI encoded counterparts
1313
+ *
1314
+ * @param {string} val The value to be encoded.
1315
+ *
1316
+ * @returns {string} The encoded value.
1317
+ */
1318
+ function encode(val) {
1319
+ return encodeURIComponent(val)
1320
+ .replace(/%3A/gi, ':')
1321
+ .replace(/%24/g, '$')
1322
+ .replace(/%2C/gi, ',')
1323
+ .replace(/%20/g, '+');
1324
+ }
1325
+
1326
+ /**
1327
+ * Build a URL by appending params to the end
1328
+ *
1329
+ * @param {string} url The base of the url (e.g., http://www.google.com)
1330
+ * @param {object} [params] The params to be appended
1331
+ * @param {?(object|Function)} options
1332
+ *
1333
+ * @returns {string} The formatted url
1334
+ */
1335
+ function buildURL(url, params, options) {
1336
+ if (!params) {
1337
+ return url;
1338
+ }
1339
+
1340
+ const _encode = (options && options.encode) || encode;
1341
+
1342
+ const _options = utils$1.isFunction(options)
1343
+ ? {
1344
+ serialize: options,
1345
+ }
1346
+ : options;
1347
+
1348
+ const serializeFn = _options && _options.serialize;
1349
+
1350
+ let serializedParams;
1351
+
1352
+ if (serializeFn) {
1353
+ serializedParams = serializeFn(params, _options);
1354
+ } else {
1355
+ serializedParams = utils$1.isURLSearchParams(params)
1356
+ ? params.toString()
1357
+ : new AxiosURLSearchParams(params, _options).toString(_encode);
1358
+ }
1359
+
1360
+ if (serializedParams) {
1361
+ const hashmarkIndex = url.indexOf('#');
1362
+
1363
+ if (hashmarkIndex !== -1) {
1364
+ url = url.slice(0, hashmarkIndex);
1365
+ }
1366
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1367
+ }
1368
+
1369
+ return url;
1370
+ }
1371
+
1372
+ class InterceptorManager {
1373
+ constructor() {
1374
+ this.handlers = [];
1375
+ }
1376
+
1377
+ /**
1378
+ * Add a new interceptor to the stack
1379
+ *
1380
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
1381
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
1382
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
1383
+ *
1384
+ * @return {Number} An ID used to remove interceptor later
1385
+ */
1386
+ use(fulfilled, rejected, options) {
1387
+ this.handlers.push({
1388
+ fulfilled,
1389
+ rejected,
1390
+ synchronous: options ? options.synchronous : false,
1391
+ runWhen: options ? options.runWhen : null,
1392
+ });
1393
+ return this.handlers.length - 1;
1394
+ }
1395
+
1396
+ /**
1397
+ * Remove an interceptor from the stack
1398
+ *
1399
+ * @param {Number} id The ID that was returned by `use`
1400
+ *
1401
+ * @returns {void}
1402
+ */
1403
+ eject(id) {
1404
+ if (this.handlers[id]) {
1405
+ this.handlers[id] = null;
1406
+ }
1407
+ }
1408
+
1409
+ /**
1410
+ * Clear all interceptors from the stack
1411
+ *
1412
+ * @returns {void}
1413
+ */
1414
+ clear() {
1415
+ if (this.handlers) {
1416
+ this.handlers = [];
1417
+ }
1418
+ }
1419
+
1420
+ /**
1421
+ * Iterate over all the registered interceptors
1422
+ *
1423
+ * This method is particularly useful for skipping over any
1424
+ * interceptors that may have become `null` calling `eject`.
1425
+ *
1426
+ * @param {Function} fn The function to call for each interceptor
1427
+ *
1428
+ * @returns {void}
1429
+ */
1430
+ forEach(fn) {
1431
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
1432
+ if (h !== null) {
1433
+ fn(h);
1434
+ }
1435
+ });
1436
+ }
1437
+ }
1438
+
1439
+ const transitionalDefaults = {
1440
+ silentJSONParsing: true,
1441
+ forcedJSONParsing: true,
1442
+ clarifyTimeoutError: false,
1443
+ legacyInterceptorReqResOrdering: true,
1444
+ };
1445
+
1446
+ const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
1447
+
1448
+ const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1449
+
1450
+ const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1451
+
1452
+ const platform$1 = {
1453
+ isBrowser: true,
1454
+ classes: {
1455
+ URLSearchParams: URLSearchParams$1,
1456
+ FormData: FormData$1,
1457
+ Blob: Blob$1,
1458
+ },
1459
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],
1460
+ };
1461
+
1462
+ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
1463
+
1464
+ const _navigator = (typeof navigator === 'object' && navigator) || undefined;
1465
+
1466
+ /**
1467
+ * Determine if we're running in a standard browser environment
1468
+ *
1469
+ * This allows axios to run in a web worker, and react-native.
1470
+ * Both environments support XMLHttpRequest, but not fully standard globals.
1471
+ *
1472
+ * web workers:
1473
+ * typeof window -> undefined
1474
+ * typeof document -> undefined
1475
+ *
1476
+ * react-native:
1477
+ * navigator.product -> 'ReactNative'
1478
+ * nativescript
1479
+ * navigator.product -> 'NativeScript' or 'NS'
1480
+ *
1481
+ * @returns {boolean}
1482
+ */
1483
+ const hasStandardBrowserEnv =
1484
+ hasBrowserEnv &&
1485
+ (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
1486
+
1487
+ /**
1488
+ * Determine if we're running in a standard browser webWorker environment
1489
+ *
1490
+ * Although the `isStandardBrowserEnv` method indicates that
1491
+ * `allows axios to run in a web worker`, the WebWorker will still be
1492
+ * filtered out due to its judgment standard
1493
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1494
+ * This leads to a problem when axios post `FormData` in webWorker
1495
+ */
1496
+ const hasStandardBrowserWebWorkerEnv = (() => {
1497
+ return (
1498
+ typeof WorkerGlobalScope !== 'undefined' &&
1499
+ // eslint-disable-next-line no-undef
1500
+ self instanceof WorkerGlobalScope &&
1501
+ typeof self.importScripts === 'function'
1502
+ );
1503
+ })();
1504
+
1505
+ const origin = (hasBrowserEnv && window.location.href) || 'http://localhost';
1506
+
1507
+ const utils = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
1508
+ __proto__: null,
1509
+ hasBrowserEnv,
1510
+ hasStandardBrowserEnv,
1511
+ hasStandardBrowserWebWorkerEnv,
1512
+ navigator: _navigator,
1513
+ origin
1514
+ }, Symbol.toStringTag, { value: 'Module' }));
1515
+
1516
+ const platform = {
1517
+ ...utils,
1518
+ ...platform$1,
1519
+ };
1520
+
1521
+ function toURLEncodedForm(data, options) {
1522
+ return toFormData$1(data, new platform.classes.URLSearchParams(), {
1523
+ visitor: function (value, key, path, helpers) {
1524
+ if (platform.isNode && utils$1.isBuffer(value)) {
1525
+ this.append(key, value.toString('base64'));
1526
+ return false;
1527
+ }
1528
+
1529
+ return helpers.defaultVisitor.apply(this, arguments);
1530
+ },
1531
+ ...options,
1532
+ });
1533
+ }
1534
+
1535
+ /**
1536
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
1537
+ *
1538
+ * @param {string} name - The name of the property to get.
1539
+ *
1540
+ * @returns An array of strings.
1541
+ */
1542
+ function parsePropPath(name) {
1543
+ // foo[x][y][z]
1544
+ // foo.x.y.z
1545
+ // foo-x-y-z
1546
+ // foo x y z
1547
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
1548
+ return match[0] === '[]' ? '' : match[1] || match[0];
1549
+ });
1550
+ }
1551
+
1552
+ /**
1553
+ * Convert an array to an object.
1554
+ *
1555
+ * @param {Array<any>} arr - The array to convert to an object.
1556
+ *
1557
+ * @returns An object with the same keys and values as the array.
1558
+ */
1559
+ function arrayToObject(arr) {
1560
+ const obj = {};
1561
+ const keys = Object.keys(arr);
1562
+ let i;
1563
+ const len = keys.length;
1564
+ let key;
1565
+ for (i = 0; i < len; i++) {
1566
+ key = keys[i];
1567
+ obj[key] = arr[key];
1568
+ }
1569
+ return obj;
1570
+ }
1571
+
1572
+ /**
1573
+ * It takes a FormData object and returns a JavaScript object
1574
+ *
1575
+ * @param {string} formData The FormData object to convert to JSON.
1576
+ *
1577
+ * @returns {Object<string, any> | null} The converted object.
1578
+ */
1579
+ function formDataToJSON(formData) {
1580
+ function buildPath(path, value, target, index) {
1581
+ let name = path[index++];
1582
+
1583
+ if (name === '__proto__') return true;
1584
+
1585
+ const isNumericKey = Number.isFinite(+name);
1586
+ const isLast = index >= path.length;
1587
+ name = !name && utils$1.isArray(target) ? target.length : name;
1588
+
1589
+ if (isLast) {
1590
+ if (utils$1.hasOwnProp(target, name)) {
1591
+ target[name] = [target[name], value];
1592
+ } else {
1593
+ target[name] = value;
1594
+ }
1595
+
1596
+ return !isNumericKey;
1597
+ }
1598
+
1599
+ if (!target[name] || !utils$1.isObject(target[name])) {
1600
+ target[name] = [];
1601
+ }
1602
+
1603
+ const result = buildPath(path, value, target[name], index);
1604
+
1605
+ if (result && utils$1.isArray(target[name])) {
1606
+ target[name] = arrayToObject(target[name]);
1607
+ }
1608
+
1609
+ return !isNumericKey;
1610
+ }
1611
+
1612
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
1613
+ const obj = {};
1614
+
1615
+ utils$1.forEachEntry(formData, (name, value) => {
1616
+ buildPath(parsePropPath(name), value, obj, 0);
1617
+ });
1618
+
1619
+ return obj;
1620
+ }
1621
+
1622
+ return null;
1623
+ }
1624
+
1625
+ /**
1626
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
1627
+ * of the input
1628
+ *
1629
+ * @param {any} rawValue - The value to be stringified.
1630
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
1631
+ * @param {Function} encoder - A function that takes a value and returns a string.
1632
+ *
1633
+ * @returns {string} A stringified version of the rawValue.
1634
+ */
1635
+ function stringifySafely(rawValue, parser, encoder) {
1636
+ if (utils$1.isString(rawValue)) {
1637
+ try {
1638
+ (parser || JSON.parse)(rawValue);
1639
+ return utils$1.trim(rawValue);
1640
+ } catch (e) {
1641
+ if (e.name !== 'SyntaxError') {
1642
+ throw e;
1643
+ }
1644
+ }
1645
+ }
1646
+
1647
+ return (encoder || JSON.stringify)(rawValue);
1648
+ }
1649
+
1650
+ const defaults = {
1651
+ transitional: transitionalDefaults,
1652
+
1653
+ adapter: ['xhr', 'http', 'fetch'],
1654
+
1655
+ transformRequest: [
1656
+ function transformRequest(data, headers) {
1657
+ const contentType = headers.getContentType() || '';
1658
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
1659
+ const isObjectPayload = utils$1.isObject(data);
1660
+
1661
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
1662
+ data = new FormData(data);
1663
+ }
1664
+
1665
+ const isFormData = utils$1.isFormData(data);
1666
+
1667
+ if (isFormData) {
1668
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
1669
+ }
1670
+
1671
+ if (
1672
+ utils$1.isArrayBuffer(data) ||
1673
+ utils$1.isBuffer(data) ||
1674
+ utils$1.isStream(data) ||
1675
+ utils$1.isFile(data) ||
1676
+ utils$1.isBlob(data) ||
1677
+ utils$1.isReadableStream(data)
1678
+ ) {
1679
+ return data;
1680
+ }
1681
+ if (utils$1.isArrayBufferView(data)) {
1682
+ return data.buffer;
1683
+ }
1684
+ if (utils$1.isURLSearchParams(data)) {
1685
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
1686
+ return data.toString();
1687
+ }
1688
+
1689
+ let isFileList;
1690
+
1691
+ if (isObjectPayload) {
1692
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
1693
+ return toURLEncodedForm(data, this.formSerializer).toString();
1694
+ }
1695
+
1696
+ if (
1697
+ (isFileList = utils$1.isFileList(data)) ||
1698
+ contentType.indexOf('multipart/form-data') > -1
1699
+ ) {
1700
+ const _FormData = this.env && this.env.FormData;
1701
+
1702
+ return toFormData$1(
1703
+ isFileList ? { 'files[]': data } : data,
1704
+ _FormData && new _FormData(),
1705
+ this.formSerializer
1706
+ );
1707
+ }
1708
+ }
1709
+
1710
+ if (isObjectPayload || hasJSONContentType) {
1711
+ headers.setContentType('application/json', false);
1712
+ return stringifySafely(data);
1713
+ }
1714
+
1715
+ return data;
1716
+ },
1717
+ ],
1718
+
1719
+ transformResponse: [
1720
+ function transformResponse(data) {
1721
+ const transitional = this.transitional || defaults.transitional;
1722
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1723
+ const JSONRequested = this.responseType === 'json';
1724
+
1725
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
1726
+ return data;
1727
+ }
1728
+
1729
+ if (
1730
+ data &&
1731
+ utils$1.isString(data) &&
1732
+ ((forcedJSONParsing && !this.responseType) || JSONRequested)
1733
+ ) {
1734
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
1735
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
1736
+
1737
+ try {
1738
+ return JSON.parse(data, this.parseReviver);
1739
+ } catch (e) {
1740
+ if (strictJSONParsing) {
1741
+ if (e.name === 'SyntaxError') {
1742
+ throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
1743
+ }
1744
+ throw e;
1745
+ }
1746
+ }
1747
+ }
1748
+
1749
+ return data;
1750
+ },
1751
+ ],
1752
+
1753
+ /**
1754
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1755
+ * timeout is not created.
1756
+ */
1757
+ timeout: 0,
1758
+
1759
+ xsrfCookieName: 'XSRF-TOKEN',
1760
+ xsrfHeaderName: 'X-XSRF-TOKEN',
1761
+
1762
+ maxContentLength: -1,
1763
+ maxBodyLength: -1,
1764
+
1765
+ env: {
1766
+ FormData: platform.classes.FormData,
1767
+ Blob: platform.classes.Blob,
1768
+ },
1769
+
1770
+ validateStatus: function validateStatus(status) {
1771
+ return status >= 200 && status < 300;
1772
+ },
1773
+
1774
+ headers: {
1775
+ common: {
1776
+ Accept: 'application/json, text/plain, */*',
1777
+ 'Content-Type': undefined,
1778
+ },
1779
+ },
1780
+ };
1781
+
1782
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
1783
+ defaults.headers[method] = {};
1784
+ });
1785
+
1786
+ // RawAxiosHeaders whose duplicates are ignored by node
1787
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
1788
+ const ignoreDuplicateOf = utils$1.toObjectSet([
1789
+ 'age',
1790
+ 'authorization',
1791
+ 'content-length',
1792
+ 'content-type',
1793
+ 'etag',
1794
+ 'expires',
1795
+ 'from',
1796
+ 'host',
1797
+ 'if-modified-since',
1798
+ 'if-unmodified-since',
1799
+ 'last-modified',
1800
+ 'location',
1801
+ 'max-forwards',
1802
+ 'proxy-authorization',
1803
+ 'referer',
1804
+ 'retry-after',
1805
+ 'user-agent',
1806
+ ]);
1807
+
1808
+ /**
1809
+ * Parse headers into an object
1810
+ *
1811
+ * ```
1812
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
1813
+ * Content-Type: application/json
1814
+ * Connection: keep-alive
1815
+ * Transfer-Encoding: chunked
1816
+ * ```
1817
+ *
1818
+ * @param {String} rawHeaders Headers needing to be parsed
1819
+ *
1820
+ * @returns {Object} Headers parsed into an object
1821
+ */
1822
+ const parseHeaders = (rawHeaders) => {
1823
+ const parsed = {};
1824
+ let key;
1825
+ let val;
1826
+ let i;
1827
+
1828
+ rawHeaders &&
1829
+ rawHeaders.split('\n').forEach(function parser(line) {
1830
+ i = line.indexOf(':');
1831
+ key = line.substring(0, i).trim().toLowerCase();
1832
+ val = line.substring(i + 1).trim();
1833
+
1834
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
1835
+ return;
1836
+ }
1837
+
1838
+ if (key === 'set-cookie') {
1839
+ if (parsed[key]) {
1840
+ parsed[key].push(val);
1841
+ } else {
1842
+ parsed[key] = [val];
1843
+ }
1844
+ } else {
1845
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1846
+ }
1847
+ });
1848
+
1849
+ return parsed;
1850
+ };
1851
+
1852
+ const $internals = Symbol('internals');
1853
+
1854
+ function normalizeHeader(header) {
1855
+ return header && String(header).trim().toLowerCase();
1856
+ }
1857
+
1858
+ function normalizeValue(value) {
1859
+ if (value === false || value == null) {
1860
+ return value;
1861
+ }
1862
+
1863
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
1864
+ }
1865
+
1866
+ function parseTokens(str) {
1867
+ const tokens = Object.create(null);
1868
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1869
+ let match;
1870
+
1871
+ while ((match = tokensRE.exec(str))) {
1872
+ tokens[match[1]] = match[2];
1873
+ }
1874
+
1875
+ return tokens;
1876
+ }
1877
+
1878
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1879
+
1880
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1881
+ if (utils$1.isFunction(filter)) {
1882
+ return filter.call(this, value, header);
1883
+ }
1884
+
1885
+ if (isHeaderNameFilter) {
1886
+ value = header;
1887
+ }
1888
+
1889
+ if (!utils$1.isString(value)) return;
1890
+
1891
+ if (utils$1.isString(filter)) {
1892
+ return value.indexOf(filter) !== -1;
1893
+ }
1894
+
1895
+ if (utils$1.isRegExp(filter)) {
1896
+ return filter.test(value);
1897
+ }
1898
+ }
1899
+
1900
+ function formatHeader(header) {
1901
+ return header
1902
+ .trim()
1903
+ .toLowerCase()
1904
+ .replace(/([a-z\d])(\w*)/g, (w, char, str) => {
1905
+ return char.toUpperCase() + str;
1906
+ });
1907
+ }
1908
+
1909
+ function buildAccessors(obj, header) {
1910
+ const accessorName = utils$1.toCamelCase(' ' + header);
1911
+
1912
+ ['get', 'set', 'has'].forEach((methodName) => {
1913
+ Object.defineProperty(obj, methodName + accessorName, {
1914
+ value: function (arg1, arg2, arg3) {
1915
+ return this[methodName].call(this, header, arg1, arg2, arg3);
1916
+ },
1917
+ configurable: true,
1918
+ });
1919
+ });
1920
+ }
1921
+
1922
+ let AxiosHeaders$1 = class AxiosHeaders {
1923
+ constructor(headers) {
1924
+ headers && this.set(headers);
1925
+ }
1926
+
1927
+ set(header, valueOrRewrite, rewrite) {
1928
+ const self = this;
1929
+
1930
+ function setHeader(_value, _header, _rewrite) {
1931
+ const lHeader = normalizeHeader(_header);
1932
+
1933
+ if (!lHeader) {
1934
+ throw new Error('header name must be a non-empty string');
1935
+ }
1936
+
1937
+ const key = utils$1.findKey(self, lHeader);
1938
+
1939
+ if (
1940
+ !key ||
1941
+ self[key] === undefined ||
1942
+ _rewrite === true ||
1943
+ (_rewrite === undefined && self[key] !== false)
1944
+ ) {
1945
+ self[key || _header] = normalizeValue(_value);
1946
+ }
1947
+ }
1948
+
1949
+ const setHeaders = (headers, _rewrite) =>
1950
+ utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
1951
+
1952
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
1953
+ setHeaders(header, valueOrRewrite);
1954
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1955
+ setHeaders(parseHeaders(header), valueOrRewrite);
1956
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
1957
+ let obj = {},
1958
+ dest,
1959
+ key;
1960
+ for (const entry of header) {
1961
+ if (!utils$1.isArray(entry)) {
1962
+ throw TypeError('Object iterator must return a key-value pair');
1963
+ }
1964
+
1965
+ obj[(key = entry[0])] = (dest = obj[key])
1966
+ ? utils$1.isArray(dest)
1967
+ ? [...dest, entry[1]]
1968
+ : [dest, entry[1]]
1969
+ : entry[1];
1970
+ }
1971
+
1972
+ setHeaders(obj, valueOrRewrite);
1973
+ } else {
1974
+ header != null && setHeader(valueOrRewrite, header, rewrite);
1975
+ }
1976
+
1977
+ return this;
1978
+ }
1979
+
1980
+ get(header, parser) {
1981
+ header = normalizeHeader(header);
1982
+
1983
+ if (header) {
1984
+ const key = utils$1.findKey(this, header);
1985
+
1986
+ if (key) {
1987
+ const value = this[key];
1988
+
1989
+ if (!parser) {
1990
+ return value;
1991
+ }
1992
+
1993
+ if (parser === true) {
1994
+ return parseTokens(value);
1995
+ }
1996
+
1997
+ if (utils$1.isFunction(parser)) {
1998
+ return parser.call(this, value, key);
1999
+ }
2000
+
2001
+ if (utils$1.isRegExp(parser)) {
2002
+ return parser.exec(value);
2003
+ }
2004
+
2005
+ throw new TypeError('parser must be boolean|regexp|function');
2006
+ }
2007
+ }
2008
+ }
2009
+
2010
+ has(header, matcher) {
2011
+ header = normalizeHeader(header);
2012
+
2013
+ if (header) {
2014
+ const key = utils$1.findKey(this, header);
2015
+
2016
+ return !!(
2017
+ key &&
2018
+ this[key] !== undefined &&
2019
+ (!matcher || matchHeaderValue(this, this[key], key, matcher))
2020
+ );
2021
+ }
2022
+
2023
+ return false;
2024
+ }
2025
+
2026
+ delete(header, matcher) {
2027
+ const self = this;
2028
+ let deleted = false;
2029
+
2030
+ function deleteHeader(_header) {
2031
+ _header = normalizeHeader(_header);
2032
+
2033
+ if (_header) {
2034
+ const key = utils$1.findKey(self, _header);
2035
+
2036
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
2037
+ delete self[key];
2038
+
2039
+ deleted = true;
2040
+ }
2041
+ }
2042
+ }
2043
+
2044
+ if (utils$1.isArray(header)) {
2045
+ header.forEach(deleteHeader);
2046
+ } else {
2047
+ deleteHeader(header);
2048
+ }
2049
+
2050
+ return deleted;
2051
+ }
2052
+
2053
+ clear(matcher) {
2054
+ const keys = Object.keys(this);
2055
+ let i = keys.length;
2056
+ let deleted = false;
2057
+
2058
+ while (i--) {
2059
+ const key = keys[i];
2060
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
2061
+ delete this[key];
2062
+ deleted = true;
2063
+ }
2064
+ }
2065
+
2066
+ return deleted;
2067
+ }
2068
+
2069
+ normalize(format) {
2070
+ const self = this;
2071
+ const headers = {};
2072
+
2073
+ utils$1.forEach(this, (value, header) => {
2074
+ const key = utils$1.findKey(headers, header);
2075
+
2076
+ if (key) {
2077
+ self[key] = normalizeValue(value);
2078
+ delete self[header];
2079
+ return;
2080
+ }
2081
+
2082
+ const normalized = format ? formatHeader(header) : String(header).trim();
2083
+
2084
+ if (normalized !== header) {
2085
+ delete self[header];
2086
+ }
2087
+
2088
+ self[normalized] = normalizeValue(value);
2089
+
2090
+ headers[normalized] = true;
2091
+ });
2092
+
2093
+ return this;
2094
+ }
2095
+
2096
+ concat(...targets) {
2097
+ return this.constructor.concat(this, ...targets);
2098
+ }
2099
+
2100
+ toJSON(asStrings) {
2101
+ const obj = Object.create(null);
2102
+
2103
+ utils$1.forEach(this, (value, header) => {
2104
+ value != null &&
2105
+ value !== false &&
2106
+ (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
2107
+ });
2108
+
2109
+ return obj;
2110
+ }
2111
+
2112
+ [Symbol.iterator]() {
2113
+ return Object.entries(this.toJSON())[Symbol.iterator]();
2114
+ }
2115
+
2116
+ toString() {
2117
+ return Object.entries(this.toJSON())
2118
+ .map(([header, value]) => header + ': ' + value)
2119
+ .join('\n');
2120
+ }
2121
+
2122
+ getSetCookie() {
2123
+ return this.get('set-cookie') || [];
2124
+ }
2125
+
2126
+ get [Symbol.toStringTag]() {
2127
+ return 'AxiosHeaders';
2128
+ }
2129
+
2130
+ static from(thing) {
2131
+ return thing instanceof this ? thing : new this(thing);
2132
+ }
2133
+
2134
+ static concat(first, ...targets) {
2135
+ const computed = new this(first);
2136
+
2137
+ targets.forEach((target) => computed.set(target));
2138
+
2139
+ return computed;
2140
+ }
2141
+
2142
+ static accessor(header) {
2143
+ const internals =
2144
+ (this[$internals] =
2145
+ this[$internals] =
2146
+ {
2147
+ accessors: {},
2148
+ });
2149
+
2150
+ const accessors = internals.accessors;
2151
+ const prototype = this.prototype;
2152
+
2153
+ function defineAccessor(_header) {
2154
+ const lHeader = normalizeHeader(_header);
2155
+
2156
+ if (!accessors[lHeader]) {
2157
+ buildAccessors(prototype, _header);
2158
+ accessors[lHeader] = true;
2159
+ }
2160
+ }
2161
+
2162
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
2163
+
2164
+ return this;
2165
+ }
2166
+ };
2167
+
2168
+ AxiosHeaders$1.accessor([
2169
+ 'Content-Type',
2170
+ 'Content-Length',
2171
+ 'Accept',
2172
+ 'Accept-Encoding',
2173
+ 'User-Agent',
2174
+ 'Authorization',
2175
+ ]);
2176
+
2177
+ // reserved names hotfix
2178
+ utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
2179
+ let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
2180
+ return {
2181
+ get: () => value,
2182
+ set(headerValue) {
2183
+ this[mapped] = headerValue;
2184
+ },
2185
+ };
2186
+ });
2187
+
2188
+ utils$1.freezeMethods(AxiosHeaders$1);
2189
+
2190
+ /**
2191
+ * Transform the data for a request or a response
2192
+ *
2193
+ * @param {Array|Function} fns A single function or Array of functions
2194
+ * @param {?Object} response The response object
2195
+ *
2196
+ * @returns {*} The resulting transformed data
2197
+ */
2198
+ function transformData(fns, response) {
2199
+ const config = this || defaults;
2200
+ const context = response || config;
2201
+ const headers = AxiosHeaders$1.from(context.headers);
2202
+ let data = context.data;
2203
+
2204
+ utils$1.forEach(fns, function transform(fn) {
2205
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
2206
+ });
2207
+
2208
+ headers.normalize();
2209
+
2210
+ return data;
2211
+ }
2212
+
2213
+ function isCancel$1(value) {
2214
+ return !!(value && value.__CANCEL__);
2215
+ }
2216
+
2217
+ let CanceledError$1 = class CanceledError extends AxiosError$1 {
2218
+ /**
2219
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
2220
+ *
2221
+ * @param {string=} message The message.
2222
+ * @param {Object=} config The config.
2223
+ * @param {Object=} request The request.
2224
+ *
2225
+ * @returns {CanceledError} The created error.
2226
+ */
2227
+ constructor(message, config, request) {
2228
+ super(message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request);
2229
+ this.name = 'CanceledError';
2230
+ this.__CANCEL__ = true;
2231
+ }
2232
+ };
2233
+
2234
+ /**
2235
+ * Resolve or reject a Promise based on response status.
2236
+ *
2237
+ * @param {Function} resolve A function that resolves the promise.
2238
+ * @param {Function} reject A function that rejects the promise.
2239
+ * @param {object} response The response.
2240
+ *
2241
+ * @returns {object} The response.
2242
+ */
2243
+ function settle(resolve, reject, response) {
2244
+ const validateStatus = response.config.validateStatus;
2245
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
2246
+ resolve(response);
2247
+ } else {
2248
+ reject(
2249
+ new AxiosError$1(
2250
+ 'Request failed with status code ' + response.status,
2251
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][
2252
+ Math.floor(response.status / 100) - 4
2253
+ ],
2254
+ response.config,
2255
+ response.request,
2256
+ response
2257
+ )
2258
+ );
2259
+ }
2260
+ }
2261
+
2262
+ function parseProtocol(url) {
2263
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
2264
+ return (match && match[1]) || '';
2265
+ }
2266
+
2267
+ /**
2268
+ * Calculate data maxRate
2269
+ * @param {Number} [samplesCount= 10]
2270
+ * @param {Number} [min= 1000]
2271
+ * @returns {Function}
2272
+ */
2273
+ function speedometer(samplesCount, min) {
2274
+ samplesCount = samplesCount || 10;
2275
+ const bytes = new Array(samplesCount);
2276
+ const timestamps = new Array(samplesCount);
2277
+ let head = 0;
2278
+ let tail = 0;
2279
+ let firstSampleTS;
2280
+
2281
+ min = min !== undefined ? min : 1000;
2282
+
2283
+ return function push(chunkLength) {
2284
+ const now = Date.now();
2285
+
2286
+ const startedAt = timestamps[tail];
2287
+
2288
+ if (!firstSampleTS) {
2289
+ firstSampleTS = now;
2290
+ }
2291
+
2292
+ bytes[head] = chunkLength;
2293
+ timestamps[head] = now;
2294
+
2295
+ let i = tail;
2296
+ let bytesCount = 0;
2297
+
2298
+ while (i !== head) {
2299
+ bytesCount += bytes[i++];
2300
+ i = i % samplesCount;
2301
+ }
2302
+
2303
+ head = (head + 1) % samplesCount;
2304
+
2305
+ if (head === tail) {
2306
+ tail = (tail + 1) % samplesCount;
2307
+ }
2308
+
2309
+ if (now - firstSampleTS < min) {
2310
+ return;
2311
+ }
2312
+
2313
+ const passed = startedAt && now - startedAt;
2314
+
2315
+ return passed ? Math.round((bytesCount * 1000) / passed) : undefined;
2316
+ };
2317
+ }
2318
+
2319
+ /**
2320
+ * Throttle decorator
2321
+ * @param {Function} fn
2322
+ * @param {Number} freq
2323
+ * @return {Function}
2324
+ */
2325
+ function throttle(fn, freq) {
2326
+ let timestamp = 0;
2327
+ let threshold = 1000 / freq;
2328
+ let lastArgs;
2329
+ let timer;
2330
+
2331
+ const invoke = (args, now = Date.now()) => {
2332
+ timestamp = now;
2333
+ lastArgs = null;
2334
+ if (timer) {
2335
+ clearTimeout(timer);
2336
+ timer = null;
2337
+ }
2338
+ fn(...args);
2339
+ };
2340
+
2341
+ const throttled = (...args) => {
2342
+ const now = Date.now();
2343
+ const passed = now - timestamp;
2344
+ if (passed >= threshold) {
2345
+ invoke(args, now);
2346
+ } else {
2347
+ lastArgs = args;
2348
+ if (!timer) {
2349
+ timer = setTimeout(() => {
2350
+ timer = null;
2351
+ invoke(lastArgs);
2352
+ }, threshold - passed);
2353
+ }
2354
+ }
2355
+ };
2356
+
2357
+ const flush = () => lastArgs && invoke(lastArgs);
2358
+
2359
+ return [throttled, flush];
2360
+ }
2361
+
2362
+ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
2363
+ let bytesNotified = 0;
2364
+ const _speedometer = speedometer(50, 250);
2365
+
2366
+ return throttle((e) => {
2367
+ const loaded = e.loaded;
2368
+ const total = e.lengthComputable ? e.total : undefined;
2369
+ const progressBytes = loaded - bytesNotified;
2370
+ const rate = _speedometer(progressBytes);
2371
+ const inRange = loaded <= total;
2372
+
2373
+ bytesNotified = loaded;
2374
+
2375
+ const data = {
2376
+ loaded,
2377
+ total,
2378
+ progress: total ? loaded / total : undefined,
2379
+ bytes: progressBytes,
2380
+ rate: rate ? rate : undefined,
2381
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2382
+ event: e,
2383
+ lengthComputable: total != null,
2384
+ [isDownloadStream ? 'download' : 'upload']: true,
2385
+ };
2386
+
2387
+ listener(data);
2388
+ }, freq);
2389
+ };
2390
+
2391
+ const progressEventDecorator = (total, throttled) => {
2392
+ const lengthComputable = total != null;
2393
+
2394
+ return [
2395
+ (loaded) =>
2396
+ throttled[0]({
2397
+ lengthComputable,
2398
+ total,
2399
+ loaded,
2400
+ }),
2401
+ throttled[1],
2402
+ ];
2403
+ };
2404
+
2405
+ const asyncDecorator =
2406
+ (fn) =>
2407
+ (...args) =>
2408
+ utils$1.asap(() => fn(...args));
2409
+
2410
+ const isURLSameOrigin = platform.hasStandardBrowserEnv
2411
+ ? ((origin, isMSIE) => (url) => {
2412
+ url = new URL(url, platform.origin);
2413
+
2414
+ return (
2415
+ origin.protocol === url.protocol &&
2416
+ origin.host === url.host &&
2417
+ (isMSIE || origin.port === url.port)
2418
+ );
2419
+ })(
2420
+ new URL(platform.origin),
2421
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
2422
+ )
2423
+ : () => true;
2424
+
2425
+ const cookies = platform.hasStandardBrowserEnv
2426
+ ? // Standard browser envs support document.cookie
2427
+ {
2428
+ write(name, value, expires, path, domain, secure, sameSite) {
2429
+ if (typeof document === 'undefined') return;
2430
+
2431
+ const cookie = [`${name}=${encodeURIComponent(value)}`];
2432
+
2433
+ if (utils$1.isNumber(expires)) {
2434
+ cookie.push(`expires=${new Date(expires).toUTCString()}`);
2435
+ }
2436
+ if (utils$1.isString(path)) {
2437
+ cookie.push(`path=${path}`);
2438
+ }
2439
+ if (utils$1.isString(domain)) {
2440
+ cookie.push(`domain=${domain}`);
2441
+ }
2442
+ if (secure === true) {
2443
+ cookie.push('secure');
2444
+ }
2445
+ if (utils$1.isString(sameSite)) {
2446
+ cookie.push(`SameSite=${sameSite}`);
2447
+ }
2448
+
2449
+ document.cookie = cookie.join('; ');
2450
+ },
2451
+
2452
+ read(name) {
2453
+ if (typeof document === 'undefined') return null;
2454
+ const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
2455
+ return match ? decodeURIComponent(match[1]) : null;
2456
+ },
2457
+
2458
+ remove(name) {
2459
+ this.write(name, '', Date.now() - 86400000, '/');
2460
+ },
2461
+ }
2462
+ : // Non-standard browser env (web workers, react-native) lack needed support.
2463
+ {
2464
+ write() {},
2465
+ read() {
2466
+ return null;
2467
+ },
2468
+ remove() {},
2469
+ };
2470
+
2471
+ /**
2472
+ * Determines whether the specified URL is absolute
2473
+ *
2474
+ * @param {string} url The URL to test
2475
+ *
2476
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
2477
+ */
2478
+ function isAbsoluteURL(url) {
2479
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
2480
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
2481
+ // by any combination of letters, digits, plus, period, or hyphen.
2482
+ if (typeof url !== 'string') {
2483
+ return false;
2484
+ }
2485
+
2486
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
2487
+ }
2488
+
2489
+ /**
2490
+ * Creates a new URL by combining the specified URLs
2491
+ *
2492
+ * @param {string} baseURL The base URL
2493
+ * @param {string} relativeURL The relative URL
2494
+ *
2495
+ * @returns {string} The combined URL
2496
+ */
2497
+ function combineURLs(baseURL, relativeURL) {
2498
+ return relativeURL
2499
+ ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
2500
+ : baseURL;
2501
+ }
2502
+
2503
+ /**
2504
+ * Creates a new URL by combining the baseURL with the requestedURL,
2505
+ * only when the requestedURL is not already an absolute URL.
2506
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
2507
+ *
2508
+ * @param {string} baseURL The base URL
2509
+ * @param {string} requestedURL Absolute or relative URL to combine
2510
+ *
2511
+ * @returns {string} The combined full path
2512
+ */
2513
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
2514
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
2515
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
2516
+ return combineURLs(baseURL, requestedURL);
2517
+ }
2518
+ return requestedURL;
2519
+ }
2520
+
2521
+ const headersToObject = (thing) => (thing instanceof AxiosHeaders$1 ? { ...thing } : thing);
2522
+
2523
+ /**
2524
+ * Config-specific merge-function which creates a new config-object
2525
+ * by merging two configuration objects together.
2526
+ *
2527
+ * @param {Object} config1
2528
+ * @param {Object} config2
2529
+ *
2530
+ * @returns {Object} New object resulting from merging config2 to config1
2531
+ */
2532
+ function mergeConfig$1(config1, config2) {
2533
+ // eslint-disable-next-line no-param-reassign
2534
+ config2 = config2 || {};
2535
+ const config = {};
2536
+
2537
+ function getMergedValue(target, source, prop, caseless) {
2538
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
2539
+ return utils$1.merge.call({ caseless }, target, source);
2540
+ } else if (utils$1.isPlainObject(source)) {
2541
+ return utils$1.merge({}, source);
2542
+ } else if (utils$1.isArray(source)) {
2543
+ return source.slice();
2544
+ }
2545
+ return source;
2546
+ }
2547
+
2548
+ function mergeDeepProperties(a, b, prop, caseless) {
2549
+ if (!utils$1.isUndefined(b)) {
2550
+ return getMergedValue(a, b, prop, caseless);
2551
+ } else if (!utils$1.isUndefined(a)) {
2552
+ return getMergedValue(undefined, a, prop, caseless);
2553
+ }
2554
+ }
2555
+
2556
+ // eslint-disable-next-line consistent-return
2557
+ function valueFromConfig2(a, b) {
2558
+ if (!utils$1.isUndefined(b)) {
2559
+ return getMergedValue(undefined, b);
2560
+ }
2561
+ }
2562
+
2563
+ // eslint-disable-next-line consistent-return
2564
+ function defaultToConfig2(a, b) {
2565
+ if (!utils$1.isUndefined(b)) {
2566
+ return getMergedValue(undefined, b);
2567
+ } else if (!utils$1.isUndefined(a)) {
2568
+ return getMergedValue(undefined, a);
2569
+ }
2570
+ }
2571
+
2572
+ // eslint-disable-next-line consistent-return
2573
+ function mergeDirectKeys(a, b, prop) {
2574
+ if (prop in config2) {
2575
+ return getMergedValue(a, b);
2576
+ } else if (prop in config1) {
2577
+ return getMergedValue(undefined, a);
2578
+ }
2579
+ }
2580
+
2581
+ const mergeMap = {
2582
+ url: valueFromConfig2,
2583
+ method: valueFromConfig2,
2584
+ data: valueFromConfig2,
2585
+ baseURL: defaultToConfig2,
2586
+ transformRequest: defaultToConfig2,
2587
+ transformResponse: defaultToConfig2,
2588
+ paramsSerializer: defaultToConfig2,
2589
+ timeout: defaultToConfig2,
2590
+ timeoutMessage: defaultToConfig2,
2591
+ withCredentials: defaultToConfig2,
2592
+ withXSRFToken: defaultToConfig2,
2593
+ adapter: defaultToConfig2,
2594
+ responseType: defaultToConfig2,
2595
+ xsrfCookieName: defaultToConfig2,
2596
+ xsrfHeaderName: defaultToConfig2,
2597
+ onUploadProgress: defaultToConfig2,
2598
+ onDownloadProgress: defaultToConfig2,
2599
+ decompress: defaultToConfig2,
2600
+ maxContentLength: defaultToConfig2,
2601
+ maxBodyLength: defaultToConfig2,
2602
+ beforeRedirect: defaultToConfig2,
2603
+ transport: defaultToConfig2,
2604
+ httpAgent: defaultToConfig2,
2605
+ httpsAgent: defaultToConfig2,
2606
+ cancelToken: defaultToConfig2,
2607
+ socketPath: defaultToConfig2,
2608
+ responseEncoding: defaultToConfig2,
2609
+ validateStatus: mergeDirectKeys,
2610
+ headers: (a, b, prop) =>
2611
+ mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
2612
+ };
2613
+
2614
+ utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
2615
+ if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
2616
+ const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
2617
+ const configValue = merge(config1[prop], config2[prop], prop);
2618
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
2619
+ });
2620
+
2621
+ return config;
2622
+ }
2623
+
2624
+ const resolveConfig = (config) => {
2625
+ const newConfig = mergeConfig$1({}, config);
2626
+
2627
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
2628
+
2629
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
2630
+
2631
+ newConfig.url = buildURL(
2632
+ buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
2633
+ config.params,
2634
+ config.paramsSerializer
2635
+ );
2636
+
2637
+ // HTTP basic authentication
2638
+ if (auth) {
2639
+ headers.set(
2640
+ 'Authorization',
2641
+ 'Basic ' +
2642
+ btoa(
2643
+ (auth.username || '') +
2644
+ ':' +
2645
+ (auth.password ? unescape(encodeURIComponent(auth.password)) : '')
2646
+ )
2647
+ );
2648
+ }
2649
+
2650
+ if (utils$1.isFormData(data)) {
2651
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2652
+ headers.setContentType(undefined); // browser handles it
2653
+ } else if (utils$1.isFunction(data.getHeaders)) {
2654
+ // Node.js FormData (like form-data package)
2655
+ const formHeaders = data.getHeaders();
2656
+ // Only set safe headers to avoid overwriting security headers
2657
+ const allowedHeaders = ['content-type', 'content-length'];
2658
+ Object.entries(formHeaders).forEach(([key, val]) => {
2659
+ if (allowedHeaders.includes(key.toLowerCase())) {
2660
+ headers.set(key, val);
2661
+ }
2662
+ });
2663
+ }
2664
+ }
2665
+
2666
+ // Add xsrf header
2667
+ // This is only done if running in a standard browser environment.
2668
+ // Specifically not if we're in a web worker, or react-native.
2669
+
2670
+ if (platform.hasStandardBrowserEnv) {
2671
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
2672
+
2673
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
2674
+ // Add xsrf header
2675
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
2676
+
2677
+ if (xsrfValue) {
2678
+ headers.set(xsrfHeaderName, xsrfValue);
2679
+ }
2680
+ }
2681
+ }
2682
+
2683
+ return newConfig;
2684
+ };
2685
+
2686
+ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2687
+
2688
+ const xhrAdapter = isXHRAdapterSupported &&
2689
+ function (config) {
2690
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
2691
+ const _config = resolveConfig(config);
2692
+ let requestData = _config.data;
2693
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
2694
+ let { responseType, onUploadProgress, onDownloadProgress } = _config;
2695
+ let onCanceled;
2696
+ let uploadThrottled, downloadThrottled;
2697
+ let flushUpload, flushDownload;
2698
+
2699
+ function done() {
2700
+ flushUpload && flushUpload(); // flush events
2701
+ flushDownload && flushDownload(); // flush events
2702
+
2703
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
2704
+
2705
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
2706
+ }
2707
+
2708
+ let request = new XMLHttpRequest();
2709
+
2710
+ request.open(_config.method.toUpperCase(), _config.url, true);
2711
+
2712
+ // Set the request timeout in MS
2713
+ request.timeout = _config.timeout;
2714
+
2715
+ function onloadend() {
2716
+ if (!request) {
2717
+ return;
2718
+ }
2719
+ // Prepare the response
2720
+ const responseHeaders = AxiosHeaders$1.from(
2721
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
2722
+ );
2723
+ const responseData =
2724
+ !responseType || responseType === 'text' || responseType === 'json'
2725
+ ? request.responseText
2726
+ : request.response;
2727
+ const response = {
2728
+ data: responseData,
2729
+ status: request.status,
2730
+ statusText: request.statusText,
2731
+ headers: responseHeaders,
2732
+ config,
2733
+ request,
2734
+ };
2735
+
2736
+ settle(
2737
+ function _resolve(value) {
2738
+ resolve(value);
2739
+ done();
2740
+ },
2741
+ function _reject(err) {
2742
+ reject(err);
2743
+ done();
2744
+ },
2745
+ response
2746
+ );
2747
+
2748
+ // Clean up request
2749
+ request = null;
2750
+ }
2751
+
2752
+ if ('onloadend' in request) {
2753
+ // Use onloadend if available
2754
+ request.onloadend = onloadend;
2755
+ } else {
2756
+ // Listen for ready state to emulate onloadend
2757
+ request.onreadystatechange = function handleLoad() {
2758
+ if (!request || request.readyState !== 4) {
2759
+ return;
2760
+ }
2761
+
2762
+ // The request errored out and we didn't get a response, this will be
2763
+ // handled by onerror instead
2764
+ // With one exception: request that using file: protocol, most browsers
2765
+ // will return status as 0 even though it's a successful request
2766
+ if (
2767
+ request.status === 0 &&
2768
+ !(request.responseURL && request.responseURL.indexOf('file:') === 0)
2769
+ ) {
2770
+ return;
2771
+ }
2772
+ // readystate handler is calling before onerror or ontimeout handlers,
2773
+ // so we should call onloadend on the next 'tick'
2774
+ setTimeout(onloadend);
2775
+ };
2776
+ }
2777
+
2778
+ // Handle browser request cancellation (as opposed to a manual cancellation)
2779
+ request.onabort = function handleAbort() {
2780
+ if (!request) {
2781
+ return;
2782
+ }
2783
+
2784
+ reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
2785
+
2786
+ // Clean up request
2787
+ request = null;
2788
+ };
2789
+
2790
+ // Handle low level network errors
2791
+ request.onerror = function handleError(event) {
2792
+ // Browsers deliver a ProgressEvent in XHR onerror
2793
+ // (message may be empty; when present, surface it)
2794
+ // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
2795
+ const msg = event && event.message ? event.message : 'Network Error';
2796
+ const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
2797
+ // attach the underlying event for consumers who want details
2798
+ err.event = event || null;
2799
+ reject(err);
2800
+ request = null;
2801
+ };
2802
+
2803
+ // Handle timeout
2804
+ request.ontimeout = function handleTimeout() {
2805
+ let timeoutErrorMessage = _config.timeout
2806
+ ? 'timeout of ' + _config.timeout + 'ms exceeded'
2807
+ : 'timeout exceeded';
2808
+ const transitional = _config.transitional || transitionalDefaults;
2809
+ if (_config.timeoutErrorMessage) {
2810
+ timeoutErrorMessage = _config.timeoutErrorMessage;
2811
+ }
2812
+ reject(
2813
+ new AxiosError$1(
2814
+ timeoutErrorMessage,
2815
+ transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
2816
+ config,
2817
+ request
2818
+ )
2819
+ );
2820
+
2821
+ // Clean up request
2822
+ request = null;
2823
+ };
2824
+
2825
+ // Remove Content-Type if data is undefined
2826
+ requestData === undefined && requestHeaders.setContentType(null);
2827
+
2828
+ // Add headers to the request
2829
+ if ('setRequestHeader' in request) {
2830
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
2831
+ request.setRequestHeader(key, val);
2832
+ });
2833
+ }
2834
+
2835
+ // Add withCredentials to request if needed
2836
+ if (!utils$1.isUndefined(_config.withCredentials)) {
2837
+ request.withCredentials = !!_config.withCredentials;
2838
+ }
2839
+
2840
+ // Add responseType to request if needed
2841
+ if (responseType && responseType !== 'json') {
2842
+ request.responseType = _config.responseType;
2843
+ }
2844
+
2845
+ // Handle progress if needed
2846
+ if (onDownloadProgress) {
2847
+ [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
2848
+ request.addEventListener('progress', downloadThrottled);
2849
+ }
2850
+
2851
+ // Not all browsers support upload events
2852
+ if (onUploadProgress && request.upload) {
2853
+ [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
2854
+
2855
+ request.upload.addEventListener('progress', uploadThrottled);
2856
+
2857
+ request.upload.addEventListener('loadend', flushUpload);
2858
+ }
2859
+
2860
+ if (_config.cancelToken || _config.signal) {
2861
+ // Handle cancellation
2862
+ // eslint-disable-next-line func-names
2863
+ onCanceled = (cancel) => {
2864
+ if (!request) {
2865
+ return;
2866
+ }
2867
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
2868
+ request.abort();
2869
+ request = null;
2870
+ };
2871
+
2872
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
2873
+ if (_config.signal) {
2874
+ _config.signal.aborted
2875
+ ? onCanceled()
2876
+ : _config.signal.addEventListener('abort', onCanceled);
2877
+ }
2878
+ }
2879
+
2880
+ const protocol = parseProtocol(_config.url);
2881
+
2882
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
2883
+ reject(
2884
+ new AxiosError$1(
2885
+ 'Unsupported protocol ' + protocol + ':',
2886
+ AxiosError$1.ERR_BAD_REQUEST,
2887
+ config
2888
+ )
2889
+ );
2890
+ return;
2891
+ }
2892
+
2893
+ // Send the request
2894
+ request.send(requestData || null);
2895
+ });
2896
+ };
2897
+
2898
+ const composeSignals = (signals, timeout) => {
2899
+ const { length } = (signals = signals ? signals.filter(Boolean) : []);
2900
+
2901
+ if (timeout || length) {
2902
+ let controller = new AbortController();
2903
+
2904
+ let aborted;
2905
+
2906
+ const onabort = function (reason) {
2907
+ if (!aborted) {
2908
+ aborted = true;
2909
+ unsubscribe();
2910
+ const err = reason instanceof Error ? reason : this.reason;
2911
+ controller.abort(
2912
+ err instanceof AxiosError$1
2913
+ ? err
2914
+ : new CanceledError$1(err instanceof Error ? err.message : err)
2915
+ );
2916
+ }
2917
+ };
2918
+
2919
+ let timer =
2920
+ timeout &&
2921
+ setTimeout(() => {
2922
+ timer = null;
2923
+ onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
2924
+ }, timeout);
2925
+
2926
+ const unsubscribe = () => {
2927
+ if (signals) {
2928
+ timer && clearTimeout(timer);
2929
+ timer = null;
2930
+ signals.forEach((signal) => {
2931
+ signal.unsubscribe
2932
+ ? signal.unsubscribe(onabort)
2933
+ : signal.removeEventListener('abort', onabort);
2934
+ });
2935
+ signals = null;
2936
+ }
2937
+ };
2938
+
2939
+ signals.forEach((signal) => signal.addEventListener('abort', onabort));
2940
+
2941
+ const { signal } = controller;
2942
+
2943
+ signal.unsubscribe = () => utils$1.asap(unsubscribe);
2944
+
2945
+ return signal;
2946
+ }
2947
+ };
2948
+
2949
+ const streamChunk = function* (chunk, chunkSize) {
2950
+ let len = chunk.byteLength;
2951
+
2952
+ if (len < chunkSize) {
2953
+ yield chunk;
2954
+ return;
2955
+ }
2956
+
2957
+ let pos = 0;
2958
+ let end;
2959
+
2960
+ while (pos < len) {
2961
+ end = pos + chunkSize;
2962
+ yield chunk.slice(pos, end);
2963
+ pos = end;
2964
+ }
2965
+ };
2966
+
2967
+ const readBytes = async function* (iterable, chunkSize) {
2968
+ for await (const chunk of readStream(iterable)) {
2969
+ yield* streamChunk(chunk, chunkSize);
2970
+ }
2971
+ };
2972
+
2973
+ const readStream = async function* (stream) {
2974
+ if (stream[Symbol.asyncIterator]) {
2975
+ yield* stream;
2976
+ return;
2977
+ }
2978
+
2979
+ const reader = stream.getReader();
2980
+ try {
2981
+ for (;;) {
2982
+ const { done, value } = await reader.read();
2983
+ if (done) {
2984
+ break;
2985
+ }
2986
+ yield value;
2987
+ }
2988
+ } finally {
2989
+ await reader.cancel();
2990
+ }
2991
+ };
2992
+
2993
+ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
2994
+ const iterator = readBytes(stream, chunkSize);
2995
+
2996
+ let bytes = 0;
2997
+ let done;
2998
+ let _onFinish = (e) => {
2999
+ if (!done) {
3000
+ done = true;
3001
+ onFinish && onFinish(e);
3002
+ }
3003
+ };
3004
+
3005
+ return new ReadableStream(
3006
+ {
3007
+ async pull(controller) {
3008
+ try {
3009
+ const { done, value } = await iterator.next();
3010
+
3011
+ if (done) {
3012
+ _onFinish();
3013
+ controller.close();
3014
+ return;
3015
+ }
3016
+
3017
+ let len = value.byteLength;
3018
+ if (onProgress) {
3019
+ let loadedBytes = (bytes += len);
3020
+ onProgress(loadedBytes);
3021
+ }
3022
+ controller.enqueue(new Uint8Array(value));
3023
+ } catch (err) {
3024
+ _onFinish(err);
3025
+ throw err;
3026
+ }
3027
+ },
3028
+ cancel(reason) {
3029
+ _onFinish(reason);
3030
+ return iterator.return();
3031
+ },
3032
+ },
3033
+ {
3034
+ highWaterMark: 2,
3035
+ }
3036
+ );
3037
+ };
3038
+
3039
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
3040
+
3041
+ const { isFunction } = utils$1;
3042
+
3043
+ const globalFetchAPI = (({ Request, Response }) => ({
3044
+ Request,
3045
+ Response,
3046
+ }))(utils$1.global);
3047
+
3048
+ const { ReadableStream: ReadableStream$1, TextEncoder } = utils$1.global;
3049
+
3050
+ const test = (fn, ...args) => {
3051
+ try {
3052
+ return !!fn(...args);
3053
+ } catch (e) {
3054
+ return false;
3055
+ }
3056
+ };
3057
+
3058
+ const factory = (env) => {
3059
+ env = utils$1.merge.call(
3060
+ {
3061
+ skipUndefined: true,
3062
+ },
3063
+ globalFetchAPI,
3064
+ env
3065
+ );
3066
+
3067
+ const { fetch: envFetch, Request, Response } = env;
3068
+ const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
3069
+ const isRequestSupported = isFunction(Request);
3070
+ const isResponseSupported = isFunction(Response);
3071
+
3072
+ if (!isFetchSupported) {
3073
+ return false;
3074
+ }
3075
+
3076
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
3077
+
3078
+ const encodeText =
3079
+ isFetchSupported &&
3080
+ (typeof TextEncoder === 'function'
3081
+ ? (
3082
+ (encoder) => (str) =>
3083
+ encoder.encode(str)
3084
+ )(new TextEncoder())
3085
+ : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
3086
+
3087
+ const supportsRequestStream =
3088
+ isRequestSupported &&
3089
+ isReadableStreamSupported &&
3090
+ test(() => {
3091
+ let duplexAccessed = false;
3092
+
3093
+ const hasContentType = new Request(platform.origin, {
3094
+ body: new ReadableStream$1(),
3095
+ method: 'POST',
3096
+ get duplex() {
3097
+ duplexAccessed = true;
3098
+ return 'half';
3099
+ },
3100
+ }).headers.has('Content-Type');
3101
+
3102
+ return duplexAccessed && !hasContentType;
3103
+ });
3104
+
3105
+ const supportsResponseStream =
3106
+ isResponseSupported &&
3107
+ isReadableStreamSupported &&
3108
+ test(() => utils$1.isReadableStream(new Response('').body));
3109
+
3110
+ const resolvers = {
3111
+ stream: supportsResponseStream && ((res) => res.body),
3112
+ };
3113
+
3114
+ isFetchSupported &&
3115
+ (() => {
3116
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {
3117
+ !resolvers[type] &&
3118
+ (resolvers[type] = (res, config) => {
3119
+ let method = res && res[type];
3120
+
3121
+ if (method) {
3122
+ return method.call(res);
3123
+ }
3124
+
3125
+ throw new AxiosError$1(
3126
+ `Response type '${type}' is not supported`,
3127
+ AxiosError$1.ERR_NOT_SUPPORT,
3128
+ config
3129
+ );
3130
+ });
3131
+ });
3132
+ })();
3133
+
3134
+ const getBodyLength = async (body) => {
3135
+ if (body == null) {
3136
+ return 0;
3137
+ }
3138
+
3139
+ if (utils$1.isBlob(body)) {
3140
+ return body.size;
3141
+ }
3142
+
3143
+ if (utils$1.isSpecCompliantForm(body)) {
3144
+ const _request = new Request(platform.origin, {
3145
+ method: 'POST',
3146
+ body,
3147
+ });
3148
+ return (await _request.arrayBuffer()).byteLength;
3149
+ }
3150
+
3151
+ if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
3152
+ return body.byteLength;
3153
+ }
3154
+
3155
+ if (utils$1.isURLSearchParams(body)) {
3156
+ body = body + '';
3157
+ }
3158
+
3159
+ if (utils$1.isString(body)) {
3160
+ return (await encodeText(body)).byteLength;
3161
+ }
3162
+ };
3163
+
3164
+ const resolveBodyLength = async (headers, body) => {
3165
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
3166
+
3167
+ return length == null ? getBodyLength(body) : length;
3168
+ };
3169
+
3170
+ return async (config) => {
3171
+ let {
3172
+ url,
3173
+ method,
3174
+ data,
3175
+ signal,
3176
+ cancelToken,
3177
+ timeout,
3178
+ onDownloadProgress,
3179
+ onUploadProgress,
3180
+ responseType,
3181
+ headers,
3182
+ withCredentials = 'same-origin',
3183
+ fetchOptions,
3184
+ } = resolveConfig(config);
3185
+
3186
+ let _fetch = envFetch || fetch;
3187
+
3188
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
3189
+
3190
+ let composedSignal = composeSignals(
3191
+ [signal, cancelToken && cancelToken.toAbortSignal()],
3192
+ timeout
3193
+ );
3194
+
3195
+ let request = null;
3196
+
3197
+ const unsubscribe =
3198
+ composedSignal &&
3199
+ composedSignal.unsubscribe &&
3200
+ (() => {
3201
+ composedSignal.unsubscribe();
3202
+ });
3203
+
3204
+ let requestContentLength;
3205
+
3206
+ try {
3207
+ if (
3208
+ onUploadProgress &&
3209
+ supportsRequestStream &&
3210
+ method !== 'get' &&
3211
+ method !== 'head' &&
3212
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
3213
+ ) {
3214
+ let _request = new Request(url, {
3215
+ method: 'POST',
3216
+ body: data,
3217
+ duplex: 'half',
3218
+ });
3219
+
3220
+ let contentTypeHeader;
3221
+
3222
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
3223
+ headers.setContentType(contentTypeHeader);
3224
+ }
3225
+
3226
+ if (_request.body) {
3227
+ const [onProgress, flush] = progressEventDecorator(
3228
+ requestContentLength,
3229
+ progressEventReducer(asyncDecorator(onUploadProgress))
3230
+ );
3231
+
3232
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
3233
+ }
3234
+ }
3235
+
3236
+ if (!utils$1.isString(withCredentials)) {
3237
+ withCredentials = withCredentials ? 'include' : 'omit';
3238
+ }
3239
+
3240
+ // Cloudflare Workers throws when credentials are defined
3241
+ // see https://github.com/cloudflare/workerd/issues/902
3242
+ const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
3243
+
3244
+ const resolvedOptions = {
3245
+ ...fetchOptions,
3246
+ signal: composedSignal,
3247
+ method: method.toUpperCase(),
3248
+ headers: headers.normalize().toJSON(),
3249
+ body: data,
3250
+ duplex: 'half',
3251
+ credentials: isCredentialsSupported ? withCredentials : undefined,
3252
+ };
3253
+
3254
+ request = isRequestSupported && new Request(url, resolvedOptions);
3255
+
3256
+ let response = await (isRequestSupported
3257
+ ? _fetch(request, fetchOptions)
3258
+ : _fetch(url, resolvedOptions));
3259
+
3260
+ const isStreamResponse =
3261
+ supportsResponseStream && (responseType === 'stream' || responseType === 'response');
3262
+
3263
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
3264
+ const options = {};
3265
+
3266
+ ['status', 'statusText', 'headers'].forEach((prop) => {
3267
+ options[prop] = response[prop];
3268
+ });
3269
+
3270
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
3271
+
3272
+ const [onProgress, flush] =
3273
+ (onDownloadProgress &&
3274
+ progressEventDecorator(
3275
+ responseContentLength,
3276
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
3277
+ )) ||
3278
+ [];
3279
+
3280
+ response = new Response(
3281
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
3282
+ flush && flush();
3283
+ unsubscribe && unsubscribe();
3284
+ }),
3285
+ options
3286
+ );
3287
+ }
3288
+
3289
+ responseType = responseType || 'text';
3290
+
3291
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](
3292
+ response,
3293
+ config
3294
+ );
3295
+
3296
+ !isStreamResponse && unsubscribe && unsubscribe();
3297
+
3298
+ return await new Promise((resolve, reject) => {
3299
+ settle(resolve, reject, {
3300
+ data: responseData,
3301
+ headers: AxiosHeaders$1.from(response.headers),
3302
+ status: response.status,
3303
+ statusText: response.statusText,
3304
+ config,
3305
+ request,
3306
+ });
3307
+ });
3308
+ } catch (err) {
3309
+ unsubscribe && unsubscribe();
3310
+
3311
+ if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
3312
+ throw Object.assign(
3313
+ new AxiosError$1(
3314
+ 'Network Error',
3315
+ AxiosError$1.ERR_NETWORK,
3316
+ config,
3317
+ request,
3318
+ err && err.response
3319
+ ),
3320
+ {
3321
+ cause: err.cause || err,
3322
+ }
3323
+ );
3324
+ }
3325
+
3326
+ throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
3327
+ }
3328
+ };
3329
+ };
3330
+
3331
+ const seedCache = new Map();
3332
+
3333
+ const getFetch = (config) => {
3334
+ let env = (config && config.env) || {};
3335
+ const { fetch, Request, Response } = env;
3336
+ const seeds = [Request, Response, fetch];
3337
+
3338
+ let len = seeds.length,
3339
+ i = len,
3340
+ seed,
3341
+ target,
3342
+ map = seedCache;
3343
+
3344
+ while (i--) {
3345
+ seed = seeds[i];
3346
+ target = map.get(seed);
3347
+
3348
+ target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));
3349
+
3350
+ map = target;
3351
+ }
3352
+
3353
+ return target;
3354
+ };
3355
+
3356
+ getFetch();
3357
+
3358
+ /**
3359
+ * Known adapters mapping.
3360
+ * Provides environment-specific adapters for Axios:
3361
+ * - `http` for Node.js
3362
+ * - `xhr` for browsers
3363
+ * - `fetch` for fetch API-based requests
3364
+ *
3365
+ * @type {Object<string, Function|Object>}
3366
+ */
3367
+ const knownAdapters = {
3368
+ http: httpAdapter,
3369
+ xhr: xhrAdapter,
3370
+ fetch: {
3371
+ get: getFetch,
3372
+ },
3373
+ };
3374
+
3375
+ // Assign adapter names for easier debugging and identification
3376
+ utils$1.forEach(knownAdapters, (fn, value) => {
3377
+ if (fn) {
3378
+ try {
3379
+ Object.defineProperty(fn, 'name', { value });
3380
+ } catch (e) {
3381
+ // eslint-disable-next-line no-empty
3382
+ }
3383
+ Object.defineProperty(fn, 'adapterName', { value });
3384
+ }
3385
+ });
3386
+
3387
+ /**
3388
+ * Render a rejection reason string for unknown or unsupported adapters
3389
+ *
3390
+ * @param {string} reason
3391
+ * @returns {string}
3392
+ */
3393
+ const renderReason = (reason) => `- ${reason}`;
3394
+
3395
+ /**
3396
+ * Check if the adapter is resolved (function, null, or false)
3397
+ *
3398
+ * @param {Function|null|false} adapter
3399
+ * @returns {boolean}
3400
+ */
3401
+ const isResolvedHandle = (adapter) =>
3402
+ utils$1.isFunction(adapter) || adapter === null || adapter === false;
3403
+
3404
+ /**
3405
+ * Get the first suitable adapter from the provided list.
3406
+ * Tries each adapter in order until a supported one is found.
3407
+ * Throws an AxiosError if no adapter is suitable.
3408
+ *
3409
+ * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
3410
+ * @param {Object} config - Axios request configuration
3411
+ * @throws {AxiosError} If no suitable adapter is available
3412
+ * @returns {Function} The resolved adapter function
3413
+ */
3414
+ function getAdapter$1(adapters, config) {
3415
+ adapters = utils$1.isArray(adapters) ? adapters : [adapters];
3416
+
3417
+ const { length } = adapters;
3418
+ let nameOrAdapter;
3419
+ let adapter;
3420
+
3421
+ const rejectedReasons = {};
3422
+
3423
+ for (let i = 0; i < length; i++) {
3424
+ nameOrAdapter = adapters[i];
3425
+ let id;
3426
+
3427
+ adapter = nameOrAdapter;
3428
+
3429
+ if (!isResolvedHandle(nameOrAdapter)) {
3430
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
3431
+
3432
+ if (adapter === undefined) {
3433
+ throw new AxiosError$1(`Unknown adapter '${id}'`);
3434
+ }
3435
+ }
3436
+
3437
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
3438
+ break;
3439
+ }
3440
+
3441
+ rejectedReasons[id || '#' + i] = adapter;
3442
+ }
3443
+
3444
+ if (!adapter) {
3445
+ const reasons = Object.entries(rejectedReasons).map(
3446
+ ([id, state]) =>
3447
+ `adapter ${id} ` +
3448
+ (state === false ? 'is not supported by the environment' : 'is not available in the build')
3449
+ );
3450
+
3451
+ let s = length
3452
+ ? reasons.length > 1
3453
+ ? 'since :\n' + reasons.map(renderReason).join('\n')
3454
+ : ' ' + renderReason(reasons[0])
3455
+ : 'as no adapter specified';
3456
+
3457
+ throw new AxiosError$1(
3458
+ `There is no suitable adapter to dispatch the request ` + s,
3459
+ 'ERR_NOT_SUPPORT'
3460
+ );
3461
+ }
3462
+
3463
+ return adapter;
3464
+ }
3465
+
3466
+ /**
3467
+ * Exports Axios adapters and utility to resolve an adapter
3468
+ */
3469
+ const adapters = {
3470
+ /**
3471
+ * Resolve an adapter from a list of adapter names or functions.
3472
+ * @type {Function}
3473
+ */
3474
+ getAdapter: getAdapter$1,
3475
+
3476
+ /**
3477
+ * Exposes all known adapters
3478
+ * @type {Object<string, Function|Object>}
3479
+ */
3480
+ adapters: knownAdapters,
3481
+ };
3482
+
3483
+ /**
3484
+ * Throws a `CanceledError` if cancellation has been requested.
3485
+ *
3486
+ * @param {Object} config The config that is to be used for the request
3487
+ *
3488
+ * @returns {void}
3489
+ */
3490
+ function throwIfCancellationRequested(config) {
3491
+ if (config.cancelToken) {
3492
+ config.cancelToken.throwIfRequested();
3493
+ }
3494
+
3495
+ if (config.signal && config.signal.aborted) {
3496
+ throw new CanceledError$1(null, config);
3497
+ }
3498
+ }
3499
+
3500
+ /**
3501
+ * Dispatch a request to the server using the configured adapter.
3502
+ *
3503
+ * @param {object} config The config that is to be used for the request
3504
+ *
3505
+ * @returns {Promise} The Promise to be fulfilled
3506
+ */
3507
+ function dispatchRequest(config) {
3508
+ throwIfCancellationRequested(config);
3509
+
3510
+ config.headers = AxiosHeaders$1.from(config.headers);
3511
+
3512
+ // Transform request data
3513
+ config.data = transformData.call(config, config.transformRequest);
3514
+
3515
+ if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
3516
+ config.headers.setContentType('application/x-www-form-urlencoded', false);
3517
+ }
3518
+
3519
+ const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
3520
+
3521
+ return adapter(config).then(
3522
+ function onAdapterResolution(response) {
3523
+ throwIfCancellationRequested(config);
3524
+
3525
+ // Transform response data
3526
+ response.data = transformData.call(config, config.transformResponse, response);
3527
+
3528
+ response.headers = AxiosHeaders$1.from(response.headers);
3529
+
3530
+ return response;
3531
+ },
3532
+ function onAdapterRejection(reason) {
3533
+ if (!isCancel$1(reason)) {
3534
+ throwIfCancellationRequested(config);
3535
+
3536
+ // Transform response data
3537
+ if (reason && reason.response) {
3538
+ reason.response.data = transformData.call(
3539
+ config,
3540
+ config.transformResponse,
3541
+ reason.response
3542
+ );
3543
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
3544
+ }
3545
+ }
3546
+
3547
+ return Promise.reject(reason);
3548
+ }
3549
+ );
3550
+ }
3551
+
3552
+ const VERSION$1 = "1.13.6";
3553
+
3554
+ const validators$1 = {};
3555
+
3556
+ // eslint-disable-next-line func-names
3557
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
3558
+ validators$1[type] = function validator(thing) {
3559
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
3560
+ };
3561
+ });
3562
+
3563
+ const deprecatedWarnings = {};
3564
+
3565
+ /**
3566
+ * Transitional option validator
3567
+ *
3568
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
3569
+ * @param {string?} version - deprecated version / removed since version
3570
+ * @param {string?} message - some message with additional info
3571
+ *
3572
+ * @returns {function}
3573
+ */
3574
+ validators$1.transitional = function transitional(validator, version, message) {
3575
+ function formatMessage(opt, desc) {
3576
+ return (
3577
+ '[Axios v' +
3578
+ VERSION$1 +
3579
+ "] Transitional option '" +
3580
+ opt +
3581
+ "'" +
3582
+ desc +
3583
+ (message ? '. ' + message : '')
3584
+ );
3585
+ }
3586
+
3587
+ // eslint-disable-next-line func-names
3588
+ return (value, opt, opts) => {
3589
+ if (validator === false) {
3590
+ throw new AxiosError$1(
3591
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
3592
+ AxiosError$1.ERR_DEPRECATED
3593
+ );
3594
+ }
3595
+
3596
+ if (version && !deprecatedWarnings[opt]) {
3597
+ deprecatedWarnings[opt] = true;
3598
+ // eslint-disable-next-line no-console
3599
+ console.warn(
3600
+ formatMessage(
3601
+ opt,
3602
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
3603
+ )
3604
+ );
3605
+ }
3606
+
3607
+ return validator ? validator(value, opt, opts) : true;
3608
+ };
3609
+ };
3610
+
3611
+ validators$1.spelling = function spelling(correctSpelling) {
3612
+ return (value, opt) => {
3613
+ // eslint-disable-next-line no-console
3614
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
3615
+ return true;
3616
+ };
3617
+ };
3618
+
3619
+ /**
3620
+ * Assert object's properties type
3621
+ *
3622
+ * @param {object} options
3623
+ * @param {object} schema
3624
+ * @param {boolean?} allowUnknown
3625
+ *
3626
+ * @returns {object}
3627
+ */
3628
+
3629
+ function assertOptions(options, schema, allowUnknown) {
3630
+ if (typeof options !== 'object') {
3631
+ throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
3632
+ }
3633
+ const keys = Object.keys(options);
3634
+ let i = keys.length;
3635
+ while (i-- > 0) {
3636
+ const opt = keys[i];
3637
+ const validator = schema[opt];
3638
+ if (validator) {
3639
+ const value = options[opt];
3640
+ const result = value === undefined || validator(value, opt, options);
3641
+ if (result !== true) {
3642
+ throw new AxiosError$1(
3643
+ 'option ' + opt + ' must be ' + result,
3644
+ AxiosError$1.ERR_BAD_OPTION_VALUE
3645
+ );
3646
+ }
3647
+ continue;
3648
+ }
3649
+ if (allowUnknown !== true) {
3650
+ throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
3651
+ }
3652
+ }
3653
+ }
3654
+
3655
+ const validator = {
3656
+ assertOptions,
3657
+ validators: validators$1,
3658
+ };
3659
+
3660
+ const validators = validator.validators;
3661
+
3662
+ /**
3663
+ * Create a new instance of Axios
3664
+ *
3665
+ * @param {Object} instanceConfig The default config for the instance
3666
+ *
3667
+ * @return {Axios} A new instance of Axios
3668
+ */
3669
+ let Axios$1 = class Axios {
3670
+ constructor(instanceConfig) {
3671
+ this.defaults = instanceConfig || {};
3672
+ this.interceptors = {
3673
+ request: new InterceptorManager(),
3674
+ response: new InterceptorManager(),
3675
+ };
3676
+ }
3677
+
3678
+ /**
3679
+ * Dispatch a request
3680
+ *
3681
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
3682
+ * @param {?Object} config
3683
+ *
3684
+ * @returns {Promise} The Promise to be fulfilled
3685
+ */
3686
+ async request(configOrUrl, config) {
3687
+ try {
3688
+ return await this._request(configOrUrl, config);
3689
+ } catch (err) {
3690
+ if (err instanceof Error) {
3691
+ let dummy = {};
3692
+
3693
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
3694
+
3695
+ // slice off the Error: ... line
3696
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
3697
+ try {
3698
+ if (!err.stack) {
3699
+ err.stack = stack;
3700
+ // match without the 2 top stack lines
3701
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
3702
+ err.stack += '\n' + stack;
3703
+ }
3704
+ } catch (e) {
3705
+ // ignore the case where "stack" is an un-writable property
3706
+ }
3707
+ }
3708
+
3709
+ throw err;
3710
+ }
3711
+ }
3712
+
3713
+ _request(configOrUrl, config) {
3714
+ /*eslint no-param-reassign:0*/
3715
+ // Allow for axios('example/url'[, config]) a la fetch API
3716
+ if (typeof configOrUrl === 'string') {
3717
+ config = config || {};
3718
+ config.url = configOrUrl;
3719
+ } else {
3720
+ config = configOrUrl || {};
3721
+ }
3722
+
3723
+ config = mergeConfig$1(this.defaults, config);
3724
+
3725
+ const { transitional, paramsSerializer, headers } = config;
3726
+
3727
+ if (transitional !== undefined) {
3728
+ validator.assertOptions(
3729
+ transitional,
3730
+ {
3731
+ silentJSONParsing: validators.transitional(validators.boolean),
3732
+ forcedJSONParsing: validators.transitional(validators.boolean),
3733
+ clarifyTimeoutError: validators.transitional(validators.boolean),
3734
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
3735
+ },
3736
+ false
3737
+ );
3738
+ }
3739
+
3740
+ if (paramsSerializer != null) {
3741
+ if (utils$1.isFunction(paramsSerializer)) {
3742
+ config.paramsSerializer = {
3743
+ serialize: paramsSerializer,
3744
+ };
3745
+ } else {
3746
+ validator.assertOptions(
3747
+ paramsSerializer,
3748
+ {
3749
+ encode: validators.function,
3750
+ serialize: validators.function,
3751
+ },
3752
+ true
3753
+ );
3754
+ }
3755
+ }
3756
+
3757
+ // Set config.allowAbsoluteUrls
3758
+ if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
3759
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
3760
+ } else {
3761
+ config.allowAbsoluteUrls = true;
3762
+ }
3763
+
3764
+ validator.assertOptions(
3765
+ config,
3766
+ {
3767
+ baseUrl: validators.spelling('baseURL'),
3768
+ withXsrfToken: validators.spelling('withXSRFToken'),
3769
+ },
3770
+ true
3771
+ );
3772
+
3773
+ // Set config.method
3774
+ config.method = (config.method || this.defaults.method || 'get').toLowerCase();
3775
+
3776
+ // Flatten headers
3777
+ let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
3778
+
3779
+ headers &&
3780
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
3781
+ delete headers[method];
3782
+ });
3783
+
3784
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
3785
+
3786
+ // filter out skipped interceptors
3787
+ const requestInterceptorChain = [];
3788
+ let synchronousRequestInterceptors = true;
3789
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
3790
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
3791
+ return;
3792
+ }
3793
+
3794
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
3795
+
3796
+ const transitional = config.transitional || transitionalDefaults;
3797
+ const legacyInterceptorReqResOrdering =
3798
+ transitional && transitional.legacyInterceptorReqResOrdering;
3799
+
3800
+ if (legacyInterceptorReqResOrdering) {
3801
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
3802
+ } else {
3803
+ requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
3804
+ }
3805
+ });
3806
+
3807
+ const responseInterceptorChain = [];
3808
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
3809
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
3810
+ });
3811
+
3812
+ let promise;
3813
+ let i = 0;
3814
+ let len;
3815
+
3816
+ if (!synchronousRequestInterceptors) {
3817
+ const chain = [dispatchRequest.bind(this), undefined];
3818
+ chain.unshift(...requestInterceptorChain);
3819
+ chain.push(...responseInterceptorChain);
3820
+ len = chain.length;
3821
+
3822
+ promise = Promise.resolve(config);
3823
+
3824
+ while (i < len) {
3825
+ promise = promise.then(chain[i++], chain[i++]);
3826
+ }
3827
+
3828
+ return promise;
3829
+ }
3830
+
3831
+ len = requestInterceptorChain.length;
3832
+
3833
+ let newConfig = config;
3834
+
3835
+ while (i < len) {
3836
+ const onFulfilled = requestInterceptorChain[i++];
3837
+ const onRejected = requestInterceptorChain[i++];
3838
+ try {
3839
+ newConfig = onFulfilled(newConfig);
3840
+ } catch (error) {
3841
+ onRejected.call(this, error);
3842
+ break;
3843
+ }
3844
+ }
3845
+
3846
+ try {
3847
+ promise = dispatchRequest.call(this, newConfig);
3848
+ } catch (error) {
3849
+ return Promise.reject(error);
3850
+ }
3851
+
3852
+ i = 0;
3853
+ len = responseInterceptorChain.length;
3854
+
3855
+ while (i < len) {
3856
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
3857
+ }
3858
+
3859
+ return promise;
3860
+ }
3861
+
3862
+ getUri(config) {
3863
+ config = mergeConfig$1(this.defaults, config);
3864
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
3865
+ return buildURL(fullPath, config.params, config.paramsSerializer);
3866
+ }
3867
+ };
3868
+
3869
+ // Provide aliases for supported request methods
3870
+ utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3871
+ /*eslint func-names:0*/
3872
+ Axios$1.prototype[method] = function (url, config) {
3873
+ return this.request(
3874
+ mergeConfig$1(config || {}, {
3875
+ method,
3876
+ url,
3877
+ data: (config || {}).data,
3878
+ })
3879
+ );
3880
+ };
3881
+ });
3882
+
3883
+ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3884
+ /*eslint func-names:0*/
3885
+
3886
+ function generateHTTPMethod(isForm) {
3887
+ return function httpMethod(url, data, config) {
3888
+ return this.request(
3889
+ mergeConfig$1(config || {}, {
3890
+ method,
3891
+ headers: isForm
3892
+ ? {
3893
+ 'Content-Type': 'multipart/form-data',
3894
+ }
3895
+ : {},
3896
+ url,
3897
+ data,
3898
+ })
3899
+ );
3900
+ };
3901
+ }
3902
+
3903
+ Axios$1.prototype[method] = generateHTTPMethod();
3904
+
3905
+ Axios$1.prototype[method + 'Form'] = generateHTTPMethod(true);
3906
+ });
3907
+
3908
+ /**
3909
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
3910
+ *
3911
+ * @param {Function} executor The executor function.
3912
+ *
3913
+ * @returns {CancelToken}
3914
+ */
3915
+ let CancelToken$1 = class CancelToken {
3916
+ constructor(executor) {
3917
+ if (typeof executor !== 'function') {
3918
+ throw new TypeError('executor must be a function.');
3919
+ }
3920
+
3921
+ let resolvePromise;
3922
+
3923
+ this.promise = new Promise(function promiseExecutor(resolve) {
3924
+ resolvePromise = resolve;
3925
+ });
3926
+
3927
+ const token = this;
3928
+
3929
+ // eslint-disable-next-line func-names
3930
+ this.promise.then((cancel) => {
3931
+ if (!token._listeners) return;
3932
+
3933
+ let i = token._listeners.length;
3934
+
3935
+ while (i-- > 0) {
3936
+ token._listeners[i](cancel);
3937
+ }
3938
+ token._listeners = null;
3939
+ });
3940
+
3941
+ // eslint-disable-next-line func-names
3942
+ this.promise.then = (onfulfilled) => {
3943
+ let _resolve;
3944
+ // eslint-disable-next-line func-names
3945
+ const promise = new Promise((resolve) => {
3946
+ token.subscribe(resolve);
3947
+ _resolve = resolve;
3948
+ }).then(onfulfilled);
3949
+
3950
+ promise.cancel = function reject() {
3951
+ token.unsubscribe(_resolve);
3952
+ };
3953
+
3954
+ return promise;
3955
+ };
3956
+
3957
+ executor(function cancel(message, config, request) {
3958
+ if (token.reason) {
3959
+ // Cancellation has already been requested
3960
+ return;
3961
+ }
3962
+
3963
+ token.reason = new CanceledError$1(message, config, request);
3964
+ resolvePromise(token.reason);
3965
+ });
3966
+ }
3967
+
3968
+ /**
3969
+ * Throws a `CanceledError` if cancellation has been requested.
3970
+ */
3971
+ throwIfRequested() {
3972
+ if (this.reason) {
3973
+ throw this.reason;
3974
+ }
3975
+ }
3976
+
3977
+ /**
3978
+ * Subscribe to the cancel signal
3979
+ */
3980
+
3981
+ subscribe(listener) {
3982
+ if (this.reason) {
3983
+ listener(this.reason);
3984
+ return;
3985
+ }
3986
+
3987
+ if (this._listeners) {
3988
+ this._listeners.push(listener);
3989
+ } else {
3990
+ this._listeners = [listener];
3991
+ }
3992
+ }
3993
+
3994
+ /**
3995
+ * Unsubscribe from the cancel signal
3996
+ */
3997
+
3998
+ unsubscribe(listener) {
3999
+ if (!this._listeners) {
4000
+ return;
4001
+ }
4002
+ const index = this._listeners.indexOf(listener);
4003
+ if (index !== -1) {
4004
+ this._listeners.splice(index, 1);
4005
+ }
4006
+ }
4007
+
4008
+ toAbortSignal() {
4009
+ const controller = new AbortController();
4010
+
4011
+ const abort = (err) => {
4012
+ controller.abort(err);
4013
+ };
4014
+
4015
+ this.subscribe(abort);
4016
+
4017
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
4018
+
4019
+ return controller.signal;
4020
+ }
4021
+
4022
+ /**
4023
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
4024
+ * cancels the `CancelToken`.
4025
+ */
4026
+ static source() {
4027
+ let cancel;
4028
+ const token = new CancelToken(function executor(c) {
4029
+ cancel = c;
4030
+ });
4031
+ return {
4032
+ token,
4033
+ cancel,
4034
+ };
4035
+ }
4036
+ };
4037
+
4038
+ /**
4039
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
4040
+ *
4041
+ * Common use case would be to use `Function.prototype.apply`.
4042
+ *
4043
+ * ```js
4044
+ * function f(x, y, z) {}
4045
+ * const args = [1, 2, 3];
4046
+ * f.apply(null, args);
4047
+ * ```
4048
+ *
4049
+ * With `spread` this example can be re-written.
4050
+ *
4051
+ * ```js
4052
+ * spread(function(x, y, z) {})([1, 2, 3]);
4053
+ * ```
4054
+ *
4055
+ * @param {Function} callback
4056
+ *
4057
+ * @returns {Function}
4058
+ */
4059
+ function spread$1(callback) {
4060
+ return function wrap(arr) {
4061
+ return callback.apply(null, arr);
4062
+ };
4063
+ }
4064
+
4065
+ /**
4066
+ * Determines whether the payload is an error thrown by Axios
4067
+ *
4068
+ * @param {*} payload The value to test
4069
+ *
4070
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
4071
+ */
4072
+ function isAxiosError$1(payload) {
4073
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
4074
+ }
4075
+
4076
+ const HttpStatusCode$1 = {
4077
+ Continue: 100,
4078
+ SwitchingProtocols: 101,
4079
+ Processing: 102,
4080
+ EarlyHints: 103,
4081
+ Ok: 200,
4082
+ Created: 201,
4083
+ Accepted: 202,
4084
+ NonAuthoritativeInformation: 203,
4085
+ NoContent: 204,
4086
+ ResetContent: 205,
4087
+ PartialContent: 206,
4088
+ MultiStatus: 207,
4089
+ AlreadyReported: 208,
4090
+ ImUsed: 226,
4091
+ MultipleChoices: 300,
4092
+ MovedPermanently: 301,
4093
+ Found: 302,
4094
+ SeeOther: 303,
4095
+ NotModified: 304,
4096
+ UseProxy: 305,
4097
+ Unused: 306,
4098
+ TemporaryRedirect: 307,
4099
+ PermanentRedirect: 308,
4100
+ BadRequest: 400,
4101
+ Unauthorized: 401,
4102
+ PaymentRequired: 402,
4103
+ Forbidden: 403,
4104
+ NotFound: 404,
4105
+ MethodNotAllowed: 405,
4106
+ NotAcceptable: 406,
4107
+ ProxyAuthenticationRequired: 407,
4108
+ RequestTimeout: 408,
4109
+ Conflict: 409,
4110
+ Gone: 410,
4111
+ LengthRequired: 411,
4112
+ PreconditionFailed: 412,
4113
+ PayloadTooLarge: 413,
4114
+ UriTooLong: 414,
4115
+ UnsupportedMediaType: 415,
4116
+ RangeNotSatisfiable: 416,
4117
+ ExpectationFailed: 417,
4118
+ ImATeapot: 418,
4119
+ MisdirectedRequest: 421,
4120
+ UnprocessableEntity: 422,
4121
+ Locked: 423,
4122
+ FailedDependency: 424,
4123
+ TooEarly: 425,
4124
+ UpgradeRequired: 426,
4125
+ PreconditionRequired: 428,
4126
+ TooManyRequests: 429,
4127
+ RequestHeaderFieldsTooLarge: 431,
4128
+ UnavailableForLegalReasons: 451,
4129
+ InternalServerError: 500,
4130
+ NotImplemented: 501,
4131
+ BadGateway: 502,
4132
+ ServiceUnavailable: 503,
4133
+ GatewayTimeout: 504,
4134
+ HttpVersionNotSupported: 505,
4135
+ VariantAlsoNegotiates: 506,
4136
+ InsufficientStorage: 507,
4137
+ LoopDetected: 508,
4138
+ NotExtended: 510,
4139
+ NetworkAuthenticationRequired: 511,
4140
+ WebServerIsDown: 521,
4141
+ ConnectionTimedOut: 522,
4142
+ OriginIsUnreachable: 523,
4143
+ TimeoutOccurred: 524,
4144
+ SslHandshakeFailed: 525,
4145
+ InvalidSslCertificate: 526,
4146
+ };
4147
+
4148
+ Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
4149
+ HttpStatusCode$1[value] = key;
4150
+ });
4151
+
4152
+ /**
4153
+ * Create an instance of Axios
4154
+ *
4155
+ * @param {Object} defaultConfig The default config for the instance
4156
+ *
4157
+ * @returns {Axios} A new instance of Axios
4158
+ */
4159
+ function createInstance(defaultConfig) {
4160
+ const context = new Axios$1(defaultConfig);
4161
+ const instance = bind(Axios$1.prototype.request, context);
4162
+
4163
+ // Copy axios.prototype to instance
4164
+ utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
4165
+
4166
+ // Copy context to instance
4167
+ utils$1.extend(instance, context, null, { allOwnKeys: true });
4168
+
4169
+ // Factory for creating new instances
4170
+ instance.create = function create(instanceConfig) {
4171
+ return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
4172
+ };
4173
+
4174
+ return instance;
4175
+ }
4176
+
4177
+ // Create the default instance to be exported
4178
+ const axios$1 = createInstance(defaults);
4179
+
4180
+ // Expose Axios class to allow class inheritance
4181
+ axios$1.Axios = Axios$1;
4182
+
4183
+ // Expose Cancel & CancelToken
4184
+ axios$1.CanceledError = CanceledError$1;
4185
+ axios$1.CancelToken = CancelToken$1;
4186
+ axios$1.isCancel = isCancel$1;
4187
+ axios$1.VERSION = VERSION$1;
4188
+ axios$1.toFormData = toFormData$1;
4189
+
4190
+ // Expose AxiosError class
4191
+ axios$1.AxiosError = AxiosError$1;
4192
+
4193
+ // alias for CanceledError for backward compatibility
4194
+ axios$1.Cancel = axios$1.CanceledError;
4195
+
4196
+ // Expose all/spread
4197
+ axios$1.all = function all(promises) {
4198
+ return Promise.all(promises);
4199
+ };
4200
+
4201
+ axios$1.spread = spread$1;
4202
+
4203
+ // Expose isAxiosError
4204
+ axios$1.isAxiosError = isAxiosError$1;
4205
+
4206
+ // Expose mergeConfig
4207
+ axios$1.mergeConfig = mergeConfig$1;
4208
+
4209
+ axios$1.AxiosHeaders = AxiosHeaders$1;
4210
+
4211
+ axios$1.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
4212
+
4213
+ axios$1.getAdapter = adapters.getAdapter;
4214
+
4215
+ axios$1.HttpStatusCode = HttpStatusCode$1;
4216
+
4217
+ axios$1.default = axios$1;
4218
+
4219
+ // This module is intended to unwrap Axios default export as named.
4220
+ // Keep top-level export same with static properties
4221
+ // so that it can keep same with es module or cjs
4222
+ const {
4223
+ Axios,
4224
+ AxiosError,
4225
+ CanceledError,
4226
+ isCancel,
4227
+ CancelToken,
4228
+ VERSION,
4229
+ all,
4230
+ Cancel,
4231
+ isAxiosError,
4232
+ spread,
4233
+ toFormData,
4234
+ AxiosHeaders,
4235
+ HttpStatusCode,
4236
+ formToJSON,
4237
+ getAdapter,
4238
+ mergeConfig,
4239
+ } = axios$1;
4240
+
4241
+ const defaultConfig = {
4242
+ csrf: {
4243
+ endpoint: "csrf/token",
4244
+ enabled: true,
4245
+ headerName: "x-csrf-token"
4246
+ },
4247
+ axios: {
4248
+ baseURL: "/api",
4249
+ timeout: 3e4,
4250
+ withCredentials: true,
4251
+ headers: {
4252
+ "Content-Type": "application/json",
4253
+ Accept: "application/json"
4254
+ }
4255
+ },
4256
+ auth: {
4257
+ tokenHeaderName: "Authorization",
4258
+ tokenPrefix: "Bearer",
4259
+ tokenEndpoint: "auth/access-token",
4260
+ refreshEndpoint: "auth/refresh-tokens",
4261
+ sessionRecoveryEnabled: true
4262
+ },
4263
+ views: {
4264
+ viewsEndpoint: "table-views",
4265
+ statesEndpoint: "table-states"
4266
+ }
4267
+ };
4268
+ const GLOBAL_CONFIG_KEY = "__QUANTUM_UI_CONFIG__";
4269
+ function getGlobalConfig() {
4270
+ if (typeof window !== "undefined") {
4271
+ const globalWindow = window;
4272
+ if (!globalWindow[GLOBAL_CONFIG_KEY]) {
4273
+ globalWindow[GLOBAL_CONFIG_KEY] = { ...defaultConfig };
4274
+ }
4275
+ return globalWindow[GLOBAL_CONFIG_KEY] ?? { ...defaultConfig };
4276
+ }
4277
+ return { ...defaultConfig };
4278
+ }
4279
+ function setGlobalConfig(config) {
4280
+ if (typeof window !== "undefined") {
4281
+ window[GLOBAL_CONFIG_KEY] = config;
4282
+ }
4283
+ }
4284
+ function defineConfig(config) {
4285
+ return config;
4286
+ }
4287
+ function configureQuantumUI(userConfig) {
4288
+ const newConfig = {
4289
+ csrf: {
4290
+ ...defaultConfig.csrf,
4291
+ ...userConfig.csrf || {}
4292
+ },
4293
+ axios: {
4294
+ ...defaultConfig.axios,
4295
+ ...userConfig.axios || {},
4296
+ headers: {
4297
+ ...defaultConfig.axios.headers,
4298
+ ...userConfig.axios?.headers || {}
4299
+ }
4300
+ },
4301
+ auth: {
4302
+ ...defaultConfig.auth,
4303
+ ...userConfig.auth || {}
4304
+ },
4305
+ views: {
4306
+ ...defaultConfig.views,
4307
+ ...userConfig.views || {}
4308
+ }
4309
+ };
4310
+ setGlobalConfig(newConfig);
4311
+ }
4312
+ function getConfig() {
4313
+ return getGlobalConfig();
4314
+ }
4315
+ function resetConfig() {
4316
+ setGlobalConfig({ ...defaultConfig });
4317
+ }
4318
+
4319
+ let accessToken = null;
4320
+ let refreshTimer = null;
4321
+ let sessionRecoveryPromise = null;
4322
+ let csrfToken = null;
4323
+ let csrfFetchPromise = null;
4324
+ const setToken = (token) => {
4325
+ if (token && typeof token === "string") {
4326
+ accessToken = token;
4327
+ }
4328
+ };
4329
+ const getToken = () => accessToken;
4330
+ const clearToken = () => {
4331
+ accessToken = null;
4332
+ cancelTokenRefresh();
4333
+ if (typeof window !== "undefined") {
4334
+ window.dispatchEvent(new CustomEvent("auth-state-change"));
4335
+ }
4336
+ };
4337
+ const setCsrfToken = (token) => {
4338
+ if (token && typeof token === "string") {
4339
+ csrfToken = token;
4340
+ }
4341
+ };
4342
+ const getCsrfToken = () => csrfToken;
4343
+ const clearCsrfToken = () => {
4344
+ csrfToken = null;
4345
+ };
4346
+ async function recoverToken() {
4347
+ const config = getConfig();
4348
+ try {
4349
+ const response = await axios$1.get(config.auth.tokenEndpoint, {
4350
+ baseURL: config.axios.baseURL,
4351
+ withCredentials: true,
4352
+ timeout: config.axios.timeout
4353
+ });
4354
+ if (response.data.accessToken) {
4355
+ setToken(response.data.accessToken);
4356
+ return { success: true, expiresIn: response.data.expiresIn };
4357
+ }
4358
+ return { success: false, expiresIn: 0 };
4359
+ } catch (error) {
4360
+ clearToken();
4361
+ if (axios$1.isAxiosError(error) && error.response?.status === 401) {
4362
+ const data = error.response.data;
4363
+ const title = data?.label || data?.title || "Session expired";
4364
+ toast.error(title, { description: data?.detail });
4365
+ }
4366
+ return { success: false, expiresIn: 0 };
4367
+ }
4368
+ }
4369
+ async function recoverTokenIfNeeded() {
4370
+ const config = getConfig();
4371
+ if (!config.auth.sessionRecoveryEnabled) return true;
4372
+ if (accessToken) return true;
4373
+ if (sessionRecoveryPromise) {
4374
+ return sessionRecoveryPromise;
4375
+ }
4376
+ sessionRecoveryPromise = (async () => {
4377
+ try {
4378
+ const result = await recoverToken();
4379
+ if (result.success) {
4380
+ scheduleTokenRefresh(result.expiresIn);
4381
+ return true;
4382
+ }
4383
+ return false;
4384
+ } catch {
4385
+ return false;
4386
+ } finally {
4387
+ sessionRecoveryPromise = null;
4388
+ }
4389
+ })();
4390
+ return sessionRecoveryPromise;
4391
+ }
4392
+ function scheduleTokenRefresh(expiresIn) {
4393
+ cancelTokenRefresh();
4394
+ const refreshAt = expiresIn * 0.8 * 1e3;
4395
+ refreshTimer = setTimeout(async () => {
4396
+ const config = getConfig();
4397
+ try {
4398
+ const response = await axios.post(
4399
+ config.auth.refreshEndpoint,
4400
+ {},
4401
+ {
4402
+ baseURL: config.axios.baseURL,
4403
+ withCredentials: true,
4404
+ timeout: config.axios.timeout
4405
+ }
4406
+ );
4407
+ if (response.data.accessToken) {
4408
+ setToken(response.data.accessToken);
4409
+ scheduleTokenRefresh(response.data.expiresIn);
4410
+ }
4411
+ } catch {
4412
+ clearToken();
4413
+ }
4414
+ }, refreshAt);
4415
+ }
4416
+ function cancelTokenRefresh() {
4417
+ if (refreshTimer) {
4418
+ clearTimeout(refreshTimer);
4419
+ refreshTimer = null;
4420
+ }
4421
+ }
4422
+ async function fetchCsrfToken() {
4423
+ if (csrfFetchPromise) return csrfFetchPromise;
4424
+ csrfFetchPromise = (async () => {
4425
+ try {
4426
+ const config = getConfig();
4427
+ if (!config.csrf.enabled) return null;
4428
+ const response = await axios$1.get(config.csrf.endpoint, {
4429
+ baseURL: config.axios.baseURL,
4430
+ withCredentials: config.axios.withCredentials,
4431
+ timeout: config.axios.timeout
4432
+ });
4433
+ const token = response.data?.csrfToken;
4434
+ if (token && typeof token === "string") {
4435
+ setCsrfToken(token);
4436
+ return token;
4437
+ }
4438
+ return null;
4439
+ } catch {
4440
+ return null;
4441
+ } finally {
4442
+ csrfFetchPromise = null;
4443
+ }
4444
+ })();
4445
+ return csrfFetchPromise;
4446
+ }
4447
+ function getSubdomain() {
4448
+ if (typeof window === "undefined") return null;
4449
+ const parts = window.location.hostname.split(".");
4450
+ if (parts.length >= 2 && parts[parts.length - 1] === "localhost") {
4451
+ return parts[0];
4452
+ }
4453
+ if (parts.length >= 3) {
4454
+ return parts[0];
4455
+ }
4456
+ return null;
4457
+ }
4458
+ function createAxiosInstance() {
4459
+ const config = getConfig();
4460
+ return axios$1.create({
4461
+ baseURL: config.axios.baseURL,
4462
+ withCredentials: config.axios.withCredentials,
4463
+ headers: config.axios.headers,
4464
+ timeout: config.axios.timeout
4465
+ });
4466
+ }
4467
+ const axios = createAxiosInstance();
4468
+ axios.interceptors.request.use(async (config) => {
4469
+ const quantumConfig = getConfig();
4470
+ const isPublicRequest = config.public === true;
4471
+ if (!isPublicRequest) {
4472
+ const hasSession = await recoverTokenIfNeeded();
4473
+ if (!hasSession) {
4474
+ return Promise.reject(new Error("No valid session"));
4475
+ }
4476
+ }
4477
+ const token = getToken();
4478
+ if (token) {
4479
+ config.headers[quantumConfig.auth.tokenHeaderName] = `${quantumConfig.auth.tokenPrefix} ${token}`;
4480
+ }
4481
+ const subdomain = getSubdomain();
4482
+ if (subdomain) {
4483
+ config.headers["x-subdomain"] = subdomain;
4484
+ }
4485
+ const isStateChanging = ["post", "put", "patch", "delete"].includes(config.method?.toLowerCase() || "");
4486
+ if (isStateChanging && quantumConfig.csrf.enabled) {
4487
+ let csrf = getCsrfToken();
4488
+ if (!csrf) csrf = await fetchCsrfToken();
4489
+ if (csrf) config.headers[quantumConfig.csrf.headerName] = csrf;
4490
+ }
4491
+ const loadingMessage = config.loadingMessage;
4492
+ if (loadingMessage) {
4493
+ const toastId = generateToastId();
4494
+ config._toastId = toastId;
4495
+ toast.loading(loadingMessage, { id: toastId });
4496
+ }
4497
+ return config;
4498
+ });
4499
+ axios.interceptors.response.use(
4500
+ (response) => {
4501
+ const config = response.config;
4502
+ const method = config.method?.toUpperCase();
4503
+ const isMutation = ["POST", "PUT", "PATCH", "DELETE"].includes(method || "");
4504
+ const toastId = config._toastId;
4505
+ if (toastId) {
4506
+ const message = config.successMessage || response.data?.message;
4507
+ if (message) {
4508
+ toast.success(message, { id: toastId });
4509
+ } else {
4510
+ toast.success("Done", { id: toastId, duration: 1e3 });
4511
+ }
4512
+ } else {
4513
+ const showSuccess = config.showSuccessToast ?? isMutation;
4514
+ if (showSuccess) {
4515
+ const message = config.successMessage || response.data?.message;
4516
+ if (message) {
4517
+ toast.success(message);
4518
+ }
4519
+ }
4520
+ }
4521
+ return response;
4522
+ },
4523
+ (error) => {
4524
+ const config = error.config;
4525
+ const method = config?.method?.toUpperCase();
4526
+ const isGet = method === "GET";
4527
+ const showError = isGet ? false : config?.showErrorToast ?? true;
4528
+ const status = error.response?.status;
4529
+ const errorData = error.response?.data;
4530
+ const isPublicRequest = config?.public === true;
4531
+ const toastId = config?._toastId;
4532
+ if (status === 401 && !isPublicRequest) {
4533
+ if (showError) {
4534
+ const errorTitle = errorData?.label || errorData?.title || "Session expired";
4535
+ const errorDescription = errorData?.detail;
4536
+ if (toastId) {
4537
+ toast.error(errorTitle, { id: toastId, description: errorDescription });
4538
+ } else {
4539
+ toast.error(errorTitle, { description: errorDescription });
4540
+ }
4541
+ }
4542
+ clearToken();
4543
+ cancelTokenRefresh();
4544
+ return Promise.reject(error);
4545
+ }
4546
+ if (showError && status && status >= 500) {
4547
+ const errorMessage = errorData?.message || errorData?.detail || "Something went wrong. Please try again.";
4548
+ if (toastId) {
4549
+ toast.error("Server Error", { id: toastId, description: errorMessage });
4550
+ } else {
4551
+ toast.error("Server Error", { description: errorMessage });
4552
+ }
4553
+ }
4554
+ if (showError && !error.response && axios$1.isAxiosError(error)) {
4555
+ if (toastId) {
4556
+ toast.error("Network Error", { id: toastId, description: "Please check your internet connection." });
4557
+ } else {
4558
+ toast.error("Network Error", { description: "Please check your internet connection." });
4559
+ }
4560
+ }
4561
+ if (showError && status && status >= 400 && status < 500 && status !== 401) {
4562
+ const errorTitle = errorData?.label || errorData?.title || "Request failed";
4563
+ const errorDescription = errorData?.detail;
4564
+ if (toastId) {
4565
+ toast.error(errorTitle, { id: toastId, description: errorDescription });
4566
+ } else {
4567
+ toast.error(errorTitle, { description: errorDescription });
4568
+ }
4569
+ }
4570
+ return Promise.reject(error);
4571
+ }
4572
+ );
4573
+
4574
+ export { axios as a, clearCsrfToken as b, cancelTokenRefresh as c, clearToken as d, configureQuantumUI as e, defineConfig as f, getConfig as g, getCsrfToken as h, getToken as i, resetConfig as j, setCsrfToken as k, setToken as l, recoverToken as r, scheduleTokenRefresh as s };
4575
+ //# sourceMappingURL=axios.js.map