@salla.sa/twilight-components 2.14.393 → 2.14.394

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