reflex-search 1.2.0 → 1.3.5

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