node-red-contrib-tak-registration 0.3.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (412) hide show
  1. package/README.md +1 -1
  2. package/node_modules/@turf/along/package.json +41 -69
  3. package/node_modules/@turf/angle/package.json +44 -75
  4. package/node_modules/@turf/area/package.json +38 -68
  5. package/node_modules/@turf/bbox/package.json +37 -81
  6. package/node_modules/@turf/bbox-clip/package.json +44 -81
  7. package/node_modules/@turf/bbox-polygon/package.json +36 -66
  8. package/node_modules/@turf/bearing/package.json +36 -70
  9. package/node_modules/@turf/bezier-spline/package.json +39 -67
  10. package/node_modules/@turf/boolean-clockwise/package.json +42 -83
  11. package/node_modules/@turf/boolean-contains/package.json +46 -80
  12. package/node_modules/@turf/boolean-crosses/package.json +45 -79
  13. package/node_modules/@turf/boolean-disjoint/package.json +44 -79
  14. package/node_modules/@turf/boolean-equal/package.json +47 -84
  15. package/node_modules/@turf/boolean-intersects/package.json +42 -77
  16. package/node_modules/@turf/boolean-overlap/package.json +48 -82
  17. package/node_modules/@turf/boolean-parallel/package.json +42 -73
  18. package/node_modules/@turf/boolean-point-in-polygon/package.json +37 -77
  19. package/node_modules/@turf/boolean-point-on-line/package.json +39 -73
  20. package/node_modules/@turf/boolean-within/package.json +46 -79
  21. package/node_modules/@turf/buffer/package.json +47 -84
  22. package/node_modules/@turf/center/package.json +42 -73
  23. package/node_modules/@turf/center-mean/package.json +45 -78
  24. package/node_modules/@turf/center-median/package.json +45 -76
  25. package/node_modules/@turf/center-of-mass/package.json +40 -68
  26. package/node_modules/@turf/centroid/package.json +40 -74
  27. package/node_modules/@turf/circle/package.json +41 -71
  28. package/node_modules/@turf/clean-coords/package.json +40 -75
  29. package/node_modules/@turf/clone/package.json +36 -81
  30. package/node_modules/@turf/clusters/package.json +39 -70
  31. package/node_modules/@turf/clusters-dbscan/package.json +51 -88
  32. package/node_modules/@turf/clusters-kmeans/package.json +53 -90
  33. package/node_modules/@turf/collect/package.json +42 -73
  34. package/node_modules/@turf/combine/package.json +37 -65
  35. package/node_modules/@turf/concave/package.json +56 -111
  36. package/node_modules/@turf/convex/package.json +39 -68
  37. package/node_modules/@turf/destination/package.json +41 -75
  38. package/node_modules/@turf/difference/package.json +35 -63
  39. package/node_modules/@turf/dissolve/package.json +38 -66
  40. package/node_modules/@turf/distance/package.json +38 -83
  41. package/node_modules/@turf/distance-weight/package.json +40 -72
  42. package/node_modules/@turf/ellipse/package.json +43 -75
  43. package/node_modules/@turf/envelope/package.json +36 -65
  44. package/node_modules/@turf/explode/package.json +36 -67
  45. package/node_modules/@turf/flatten/package.json +39 -73
  46. package/node_modules/@turf/flip/package.json +36 -64
  47. package/node_modules/@turf/great-circle/package.json +41 -78
  48. package/node_modules/@turf/helpers/package.json +38 -184
  49. package/node_modules/@turf/hex-grid/package.json +50 -97
  50. package/node_modules/@turf/interpolate/package.json +47 -78
  51. package/node_modules/@turf/intersect/package.json +39 -69
  52. package/node_modules/@turf/invariant/package.json +36 -126
  53. package/node_modules/@turf/isobands/package.json +52 -83
  54. package/node_modules/@turf/isolines/package.json +48 -79
  55. package/node_modules/@turf/kinks/package.json +35 -63
  56. package/node_modules/@turf/length/package.json +43 -78
  57. package/node_modules/@turf/line-arc/package.json +36 -65
  58. package/node_modules/@turf/line-chunk/package.json +44 -84
  59. package/node_modules/@turf/line-intersect/package.json +46 -85
  60. package/node_modules/@turf/line-offset/package.json +41 -78
  61. package/node_modules/@turf/line-overlap/package.json +48 -80
  62. package/node_modules/@turf/line-segment/package.json +38 -70
  63. package/node_modules/@turf/line-slice/package.json +39 -67
  64. package/node_modules/@turf/line-slice-along/package.json +36 -65
  65. package/node_modules/@turf/line-split/package.json +46 -77
  66. package/node_modules/@turf/line-to-polygon/package.json +43 -74
  67. package/node_modules/@turf/mask/package.json +35 -63
  68. package/node_modules/@turf/meta/package.json +39 -128
  69. package/node_modules/@turf/midpoint/package.json +36 -64
  70. package/node_modules/@turf/moran-index/package.json +39 -70
  71. package/node_modules/@turf/nearest-point/package.json +39 -69
  72. package/node_modules/@turf/nearest-point-on-line/package.json +40 -71
  73. package/node_modules/@turf/nearest-point-to-line/package.json +47 -78
  74. package/node_modules/@turf/planepoint/package.json +34 -62
  75. package/node_modules/@turf/point-grid/package.json +45 -80
  76. package/node_modules/@turf/point-on-feature/package.json +40 -68
  77. package/node_modules/@turf/point-to-line-distance/package.json +46 -78
  78. package/node_modules/@turf/points-within-polygon/package.json +35 -64
  79. package/node_modules/@turf/polygon-smooth/package.json +37 -68
  80. package/node_modules/@turf/polygon-tangents/package.json +43 -77
  81. package/node_modules/@turf/polygon-to-line/package.json +39 -69
  82. package/node_modules/@turf/polygonize/package.json +43 -77
  83. package/node_modules/@turf/projection/package.json +44 -77
  84. package/node_modules/@turf/random/package.json +34 -62
  85. package/node_modules/@turf/rectangle-grid/package.json +43 -77
  86. package/node_modules/@turf/rewind/package.json +43 -83
  87. package/node_modules/@turf/rhumb-bearing/package.json +43 -85
  88. package/node_modules/@turf/rhumb-destination/package.json +44 -85
  89. package/node_modules/@turf/rhumb-distance/package.json +44 -84
  90. package/node_modules/@turf/sample/package.json +32 -60
  91. package/node_modules/@turf/sector/package.json +37 -65
  92. package/node_modules/@turf/shortest-path/package.json +45 -79
  93. package/node_modules/@turf/simplify/package.json +43 -77
  94. package/node_modules/@turf/square/package.json +33 -62
  95. package/node_modules/@turf/square-grid/package.json +40 -69
  96. package/node_modules/@turf/standard-deviational-ellipse/package.json +43 -74
  97. package/node_modules/@turf/tag/package.json +38 -66
  98. package/node_modules/@turf/tesselate/package.json +40 -80
  99. package/node_modules/@turf/tin/package.json +34 -63
  100. package/node_modules/@turf/transform-rotate/package.json +45 -80
  101. package/node_modules/@turf/transform-scale/package.json +51 -86
  102. package/node_modules/@turf/transform-translate/package.json +44 -78
  103. package/node_modules/@turf/triangle-grid/package.json +42 -71
  104. package/node_modules/@turf/truncate/package.json +40 -72
  105. package/node_modules/@turf/turf/package.json +74 -102
  106. package/node_modules/@turf/union/package.json +39 -67
  107. package/node_modules/@turf/unkink-polygon/package.json +40 -68
  108. package/node_modules/@turf/voronoi/package.json +43 -83
  109. package/node_modules/@types/geojson/package.json +42 -66
  110. package/node_modules/adm-zip/LICENSE +21 -21
  111. package/node_modules/adm-zip/adm-zip.js +25 -22
  112. package/node_modules/adm-zip/headers/mainHeader.js +2 -1
  113. package/node_modules/adm-zip/package.json +28 -57
  114. package/node_modules/adm-zip/util/utils.js +1 -0
  115. package/node_modules/asynckit/package.json +40 -68
  116. package/node_modules/axios/CHANGELOG.md +473 -837
  117. package/node_modules/axios/LICENSE +4 -16
  118. package/node_modules/axios/MIGRATION_GUIDE.md +3 -0
  119. package/node_modules/axios/README.md +518 -114
  120. package/node_modules/axios/SECURITY.md +4 -3
  121. package/node_modules/axios/dist/axios.js +2759 -2070
  122. package/node_modules/axios/dist/axios.js.map +1 -0
  123. package/node_modules/axios/dist/axios.min.js +2 -2
  124. package/node_modules/axios/dist/axios.min.js.map +1 -0
  125. package/node_modules/axios/dist/browser/axios.cjs +3210 -0
  126. package/node_modules/axios/dist/browser/axios.cjs.map +1 -0
  127. package/node_modules/axios/dist/esm/axios.js +3232 -0
  128. package/node_modules/axios/dist/esm/axios.js.map +1 -0
  129. package/node_modules/axios/dist/esm/axios.min.js +2 -0
  130. package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  131. package/node_modules/axios/dist/node/axios.cjs +4237 -0
  132. package/node_modules/axios/dist/node/axios.cjs.map +1 -0
  133. package/node_modules/axios/index.d.cts +532 -0
  134. package/node_modules/axios/index.d.ts +398 -72
  135. package/node_modules/axios/index.js +41 -1
  136. package/node_modules/axios/lib/adapters/adapters.js +59 -0
  137. package/node_modules/axios/lib/adapters/http.js +479 -217
  138. package/node_modules/axios/lib/adapters/xhr.js +95 -54
  139. package/node_modules/axios/lib/axios.js +49 -20
  140. package/node_modules/axios/lib/cancel/CancelToken.js +91 -89
  141. package/node_modules/axios/lib/cancel/CanceledError.js +25 -0
  142. package/node_modules/axios/lib/cancel/isCancel.js +2 -2
  143. package/node_modules/axios/lib/core/Axios.js +155 -100
  144. package/node_modules/axios/lib/core/AxiosError.js +100 -0
  145. package/node_modules/axios/lib/core/AxiosHeaders.js +288 -0
  146. package/node_modules/axios/lib/core/InterceptorManager.js +62 -45
  147. package/node_modules/axios/lib/core/buildFullPath.js +5 -4
  148. package/node_modules/axios/lib/core/dispatchRequest.js +27 -33
  149. package/node_modules/axios/lib/core/mergeConfig.js +58 -52
  150. package/node_modules/axios/lib/core/settle.js +8 -6
  151. package/node_modules/axios/lib/core/transformData.js +15 -9
  152. package/node_modules/axios/lib/defaults/index.js +76 -41
  153. package/node_modules/axios/lib/defaults/transitional.js +1 -1
  154. package/node_modules/axios/lib/env/classes/FormData.js +2 -0
  155. package/node_modules/axios/lib/env/data.js +1 -3
  156. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +191 -0
  157. package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +58 -0
  158. package/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
  159. package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +28 -0
  160. package/node_modules/axios/lib/helpers/bind.js +3 -7
  161. package/node_modules/axios/lib/helpers/buildURL.js +26 -33
  162. package/node_modules/axios/lib/helpers/callbackify.js +16 -0
  163. package/node_modules/axios/lib/helpers/combineURLs.js +3 -2
  164. package/node_modules/axios/lib/helpers/cookies.js +43 -44
  165. package/node_modules/axios/lib/helpers/deprecatedMethod.js +4 -2
  166. package/node_modules/axios/lib/helpers/formDataToJSON.js +92 -0
  167. package/node_modules/axios/lib/helpers/formDataToStream.js +111 -0
  168. package/node_modules/axios/lib/helpers/fromDataURI.js +53 -0
  169. package/node_modules/axios/lib/helpers/isAbsoluteURL.js +3 -2
  170. package/node_modules/axios/lib/helpers/isAxiosError.js +4 -3
  171. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +44 -45
  172. package/node_modules/axios/lib/helpers/null.js +2 -0
  173. package/node_modules/axios/lib/helpers/parseHeaders.js +24 -22
  174. package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  175. package/node_modules/axios/lib/helpers/readBlob.js +15 -0
  176. package/node_modules/axios/lib/helpers/speedometer.js +55 -0
  177. package/node_modules/axios/lib/helpers/spread.js +3 -2
  178. package/node_modules/axios/lib/helpers/throttle.js +33 -0
  179. package/node_modules/axios/lib/helpers/toFormData.js +203 -39
  180. package/node_modules/axios/lib/helpers/toURLEncodedForm.js +18 -0
  181. package/node_modules/axios/lib/helpers/validator.js +27 -18
  182. package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  183. package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  184. package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  185. package/node_modules/axios/lib/platform/browser/index.js +64 -0
  186. package/node_modules/axios/lib/platform/index.js +3 -0
  187. package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  188. package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  189. package/node_modules/axios/lib/platform/node/index.js +12 -0
  190. package/node_modules/axios/lib/utils.js +517 -144
  191. package/node_modules/axios/package.json +194 -93
  192. package/node_modules/call-bind/package.json +78 -109
  193. package/node_modules/combined-stream/package.json +14 -46
  194. package/node_modules/commander/package.json +20 -53
  195. package/node_modules/concaveman/node_modules/quickselect/package.json +43 -0
  196. package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/README.md +22 -95
  197. package/node_modules/{@turf/unkink-polygon → concaveman}/node_modules/rbush/index.js +131 -181
  198. package/node_modules/concaveman/node_modules/rbush/package.json +56 -0
  199. package/node_modules/concaveman/node_modules/rbush/rbush.js +574 -0
  200. package/node_modules/concaveman/node_modules/rbush/rbush.min.js +1 -0
  201. package/node_modules/concaveman/package.json +15 -46
  202. package/node_modules/d3-array/package.json +19 -47
  203. package/node_modules/d3-geo/package.json +24 -52
  204. package/node_modules/d3-voronoi/package.json +19 -47
  205. package/node_modules/deep-equal/package.json +34 -64
  206. package/node_modules/define-properties/.eslintrc +10 -3
  207. package/node_modules/define-properties/.github/FUNDING.yml +12 -0
  208. package/node_modules/define-properties/.nycrc +9 -0
  209. package/node_modules/define-properties/CHANGELOG.md +39 -0
  210. package/node_modules/define-properties/README.md +11 -13
  211. package/node_modules/define-properties/index.js +12 -17
  212. package/node_modules/define-properties/package.json +85 -95
  213. package/node_modules/delayed-stream/package.json +14 -49
  214. package/node_modules/density-clustering/package.json +46 -70
  215. package/node_modules/earcut/README.md +12 -3
  216. package/node_modules/earcut/dist/earcut.dev.js +47 -50
  217. package/node_modules/earcut/dist/earcut.min.js +1 -1
  218. package/node_modules/earcut/package.json +26 -60
  219. package/node_modules/earcut/src/earcut.js +46 -49
  220. package/node_modules/follow-redirects/README.md +8 -1
  221. package/node_modules/follow-redirects/index.js +83 -36
  222. package/node_modules/follow-redirects/package.json +38 -74
  223. package/node_modules/form-data/package.json +37 -70
  224. package/node_modules/function-bind/package.json +23 -56
  225. package/node_modules/functions-have-names/.editorconfig +20 -0
  226. package/node_modules/functions-have-names/.eslintrc +19 -0
  227. package/node_modules/functions-have-names/.github/FUNDING.yml +12 -0
  228. package/node_modules/functions-have-names/.nycrc +9 -0
  229. package/node_modules/functions-have-names/CHANGELOG.md +89 -0
  230. package/node_modules/functions-have-names/LICENSE +21 -0
  231. package/node_modules/functions-have-names/README.md +40 -0
  232. package/node_modules/functions-have-names/index.js +31 -0
  233. package/node_modules/functions-have-names/package.json +55 -0
  234. package/node_modules/functions-have-names/test/index.js +65 -0
  235. package/node_modules/geojson-equality/package.json +23 -55
  236. package/node_modules/geojson-rbush/node_modules/quickselect/package.json +43 -0
  237. package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/README.md +22 -95
  238. package/node_modules/{@turf/collect → geojson-rbush}/node_modules/rbush/index.js +131 -181
  239. package/node_modules/geojson-rbush/node_modules/rbush/package.json +56 -0
  240. package/node_modules/geojson-rbush/node_modules/rbush/rbush.js +574 -0
  241. package/node_modules/geojson-rbush/node_modules/rbush/rbush.min.js +1 -0
  242. package/node_modules/geojson-rbush/package.json +32 -71
  243. package/node_modules/get-intrinsic/.eslintrc +3 -8
  244. package/node_modules/get-intrinsic/.nycrc +0 -4
  245. package/node_modules/get-intrinsic/CHANGELOG.md +53 -0
  246. package/node_modules/get-intrinsic/README.md +7 -1
  247. package/node_modules/get-intrinsic/index.js +29 -8
  248. package/node_modules/get-intrinsic/package.json +91 -104
  249. package/node_modules/get-intrinsic/test/GetIntrinsic.js +26 -12
  250. package/node_modules/has/package.json +21 -46
  251. package/node_modules/has-property-descriptors/.eslintrc +13 -0
  252. package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
  253. package/node_modules/has-property-descriptors/.nycrc +9 -0
  254. package/node_modules/has-property-descriptors/CHANGELOG.md +16 -0
  255. package/node_modules/has-property-descriptors/LICENSE +21 -0
  256. package/node_modules/has-property-descriptors/README.md +43 -0
  257. package/node_modules/has-property-descriptors/index.js +33 -0
  258. package/node_modules/has-property-descriptors/package.json +70 -0
  259. package/node_modules/has-property-descriptors/test/index.js +57 -0
  260. package/node_modules/has-proto/.eslintrc +5 -0
  261. package/node_modules/has-proto/.github/FUNDING.yml +12 -0
  262. package/node_modules/has-proto/CHANGELOG.md +23 -0
  263. package/node_modules/has-proto/LICENSE +21 -0
  264. package/node_modules/has-proto/README.md +38 -0
  265. package/node_modules/has-proto/index.js +11 -0
  266. package/node_modules/has-proto/package.json +74 -0
  267. package/node_modules/has-proto/test/index.js +19 -0
  268. package/node_modules/has-symbols/package.json +99 -125
  269. package/node_modules/has-tostringtag/package.json +82 -109
  270. package/node_modules/is-arguments/package.json +89 -114
  271. package/node_modules/is-date-object/package.json +77 -108
  272. package/node_modules/is-regex/package.json +84 -112
  273. package/node_modules/mime-db/HISTORY.md +8 -0
  274. package/node_modules/mime-db/LICENSE +19 -18
  275. package/node_modules/mime-db/README.md +1 -1
  276. package/node_modules/mime-db/db.json +54 -6
  277. package/node_modules/mime-db/index.js +1 -0
  278. package/node_modules/mime-db/package.json +24 -66
  279. package/node_modules/mime-types/HISTORY.md +9 -0
  280. package/node_modules/mime-types/README.md +1 -1
  281. package/node_modules/mime-types/package.json +19 -62
  282. package/node_modules/object-assign/package.json +15 -49
  283. package/node_modules/object-is/package.json +85 -112
  284. package/node_modules/object-keys/package.json +86 -116
  285. package/node_modules/point-in-polygon/package.json +19 -48
  286. package/node_modules/polygon-clipping/package.json +41 -80
  287. package/node_modules/proxy-from-env/.eslintrc +29 -0
  288. package/node_modules/proxy-from-env/.travis.yml +10 -0
  289. package/node_modules/proxy-from-env/LICENSE +20 -0
  290. package/node_modules/proxy-from-env/README.md +131 -0
  291. package/node_modules/proxy-from-env/index.js +108 -0
  292. package/node_modules/proxy-from-env/package.json +34 -0
  293. package/node_modules/proxy-from-env/test.js +483 -0
  294. package/node_modules/quickselect/package.json +13 -41
  295. package/node_modules/rbush/README.md +95 -22
  296. package/node_modules/rbush/index.js +181 -131
  297. package/node_modules/rbush/package.json +39 -71
  298. package/node_modules/rbush/rbush.js +412 -360
  299. package/node_modules/rbush/rbush.min.js +1 -1
  300. package/node_modules/regexp.prototype.flags/.eslintrc +1 -0
  301. package/node_modules/regexp.prototype.flags/CHANGELOG.md +19 -0
  302. package/node_modules/regexp.prototype.flags/implementation.js +9 -0
  303. package/node_modules/regexp.prototype.flags/package.json +98 -122
  304. package/node_modules/regexp.prototype.flags/test/shimmed.js +2 -1
  305. package/node_modules/regexp.prototype.flags/test/tests.js +7 -5
  306. package/node_modules/robust-predicates/package.json +25 -52
  307. package/node_modules/skmeans/package.json +18 -53
  308. package/node_modules/splaytree/Readme.md +58 -57
  309. package/node_modules/splaytree/dist/splay.esm.js +21 -8
  310. package/node_modules/splaytree/dist/splay.esm.js.map +1 -1
  311. package/node_modules/splaytree/dist/splay.js +21 -8
  312. package/node_modules/splaytree/dist/splay.js.map +1 -1
  313. package/node_modules/splaytree/package.json +36 -68
  314. package/node_modules/splaytree/src/index.ts +16 -4
  315. package/node_modules/tinyqueue/package.json +34 -59
  316. package/node_modules/topojson-client/package.json +28 -56
  317. package/node_modules/topojson-server/package.json +27 -55
  318. package/node_modules/turf-jsts/package.json +33 -68
  319. package/node_modules/uuid/CHANGELOG.md +39 -0
  320. package/node_modules/uuid/README.md +30 -73
  321. package/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
  322. package/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
  323. package/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
  324. package/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
  325. package/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
  326. package/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
  327. package/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
  328. package/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
  329. package/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
  330. package/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
  331. package/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
  332. package/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
  333. package/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
  334. package/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
  335. package/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
  336. package/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
  337. package/node_modules/uuid/dist/esm-browser/md5.js +23 -23
  338. package/node_modules/uuid/dist/esm-browser/native.js +4 -0
  339. package/node_modules/uuid/dist/esm-browser/parse.js +2 -2
  340. package/node_modules/uuid/dist/esm-browser/rng.js +4 -5
  341. package/node_modules/uuid/dist/esm-browser/sha1.js +26 -26
  342. package/node_modules/uuid/dist/esm-browser/stringify.js +9 -6
  343. package/node_modules/uuid/dist/esm-browser/v1.js +17 -17
  344. package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
  345. package/node_modules/uuid/dist/esm-browser/v35.js +12 -10
  346. package/node_modules/uuid/dist/esm-browser/v4.js +9 -4
  347. package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
  348. package/node_modules/uuid/dist/esm-browser/version.js +1 -1
  349. package/node_modules/uuid/dist/esm-node/native.js +4 -0
  350. package/node_modules/uuid/dist/esm-node/stringify.js +7 -3
  351. package/node_modules/uuid/dist/esm-node/v1.js +2 -2
  352. package/node_modules/uuid/dist/esm-node/v35.js +6 -4
  353. package/node_modules/uuid/dist/esm-node/v4.js +7 -2
  354. package/node_modules/uuid/dist/esm-node/version.js +1 -1
  355. package/node_modules/uuid/dist/index.js +18 -18
  356. package/node_modules/uuid/dist/native-browser.js +11 -0
  357. package/node_modules/uuid/dist/native.js +15 -0
  358. package/node_modules/uuid/dist/rng-browser.js +2 -3
  359. package/node_modules/uuid/dist/stringify.js +8 -3
  360. package/node_modules/uuid/dist/v1.js +2 -2
  361. package/node_modules/uuid/dist/v35.js +7 -5
  362. package/node_modules/uuid/dist/v4.js +8 -2
  363. package/node_modules/uuid/dist/version.js +1 -1
  364. package/node_modules/uuid/package.json +87 -120
  365. package/package.json +12 -8
  366. package/tak-ingest.html +40 -0
  367. package/tak-ingest.js +48 -0
  368. package/tak-registration.html +13 -2
  369. package/tak-registration.js +55 -7
  370. package/node_modules/@turf/collect/node_modules/quickselect/package.json +0 -69
  371. package/node_modules/@turf/collect/node_modules/rbush/package.json +0 -85
  372. package/node_modules/@turf/collect/node_modules/rbush/rbush.js +0 -626
  373. package/node_modules/@turf/collect/node_modules/rbush/rbush.min.js +0 -1
  374. package/node_modules/@turf/unkink-polygon/node_modules/quickselect/package.json +0 -69
  375. package/node_modules/@turf/unkink-polygon/node_modules/rbush/package.json +0 -85
  376. package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.js +0 -626
  377. package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.min.js +0 -1
  378. package/node_modules/axios/UPGRADE_GUIDE.md +0 -168
  379. package/node_modules/axios/dist/axios.map +0 -1
  380. package/node_modules/axios/dist/axios.min.map +0 -1
  381. package/node_modules/axios/lib/cancel/Cancel.js +0 -19
  382. package/node_modules/axios/lib/core/createError.js +0 -18
  383. package/node_modules/axios/lib/core/enhanceError.js +0 -43
  384. package/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
  385. package/node_modules/axios/tsconfig.json +0 -14
  386. package/node_modules/axios/tslint.json +0 -6
  387. package/node_modules/combined-stream/yarn.lock +0 -17
  388. package/node_modules/d3-array/yarn.lock +0 -939
  389. package/node_modules/define-properties/.jscs.json +0 -175
  390. package/node_modules/define-properties/.travis.yml +0 -233
  391. package/node_modules/define-properties/test/index.js +0 -125
  392. package/node_modules/get-intrinsic/.eslintignore +0 -1
  393. package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
  394. package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
  395. package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
  396. package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
  397. package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
  398. package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
  399. package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
  400. package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
  401. package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
  402. package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
  403. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/LICENSE +0 -0
  404. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/README.md +0 -0
  405. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/index.js +0 -0
  406. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/quickselect.js +0 -0
  407. /package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/LICENSE +0 -0
  408. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/LICENSE +0 -0
  409. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/README.md +0 -0
  410. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/index.js +0 -0
  411. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/quickselect.js +0 -0
  412. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/LICENSE +0 -0
@@ -0,0 +1,3210 @@
1
+ // Axios v1.4.0 Copyright (c) 2023 Matt Zabriskie and contributors
2
+ 'use strict';
3
+
4
+ function bind(fn, thisArg) {
5
+ return function wrap() {
6
+ return fn.apply(thisArg, arguments);
7
+ };
8
+ }
9
+
10
+ // utils is a library of generic helper functions non-specific to axios
11
+
12
+ const {toString} = Object.prototype;
13
+ const {getPrototypeOf} = Object;
14
+
15
+ const kindOf = (cache => thing => {
16
+ const str = toString.call(thing);
17
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
18
+ })(Object.create(null));
19
+
20
+ const kindOfTest = (type) => {
21
+ type = type.toLowerCase();
22
+ return (thing) => kindOf(thing) === type
23
+ };
24
+
25
+ const typeOfTest = type => thing => typeof thing === type;
26
+
27
+ /**
28
+ * Determine if a value is an Array
29
+ *
30
+ * @param {Object} val The value to test
31
+ *
32
+ * @returns {boolean} True if value is an Array, otherwise false
33
+ */
34
+ const {isArray} = Array;
35
+
36
+ /**
37
+ * Determine if a value is undefined
38
+ *
39
+ * @param {*} val The value to test
40
+ *
41
+ * @returns {boolean} True if the value is undefined, otherwise false
42
+ */
43
+ const isUndefined = typeOfTest('undefined');
44
+
45
+ /**
46
+ * Determine if a value is a Buffer
47
+ *
48
+ * @param {*} val The value to test
49
+ *
50
+ * @returns {boolean} True if value is a Buffer, otherwise false
51
+ */
52
+ function isBuffer(val) {
53
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
54
+ && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
55
+ }
56
+
57
+ /**
58
+ * Determine if a value is an ArrayBuffer
59
+ *
60
+ * @param {*} val The value to test
61
+ *
62
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
63
+ */
64
+ const isArrayBuffer = kindOfTest('ArrayBuffer');
65
+
66
+
67
+ /**
68
+ * Determine if a value is a view on an ArrayBuffer
69
+ *
70
+ * @param {*} val The value to test
71
+ *
72
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
73
+ */
74
+ function isArrayBufferView(val) {
75
+ let result;
76
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
77
+ result = ArrayBuffer.isView(val);
78
+ } else {
79
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
80
+ }
81
+ return result;
82
+ }
83
+
84
+ /**
85
+ * Determine if a value is a String
86
+ *
87
+ * @param {*} val The value to test
88
+ *
89
+ * @returns {boolean} True if value is a String, otherwise false
90
+ */
91
+ const isString = typeOfTest('string');
92
+
93
+ /**
94
+ * Determine if a value is a Function
95
+ *
96
+ * @param {*} val The value to test
97
+ * @returns {boolean} True if value is a Function, otherwise false
98
+ */
99
+ const isFunction = typeOfTest('function');
100
+
101
+ /**
102
+ * Determine if a value is a Number
103
+ *
104
+ * @param {*} val The value to test
105
+ *
106
+ * @returns {boolean} True if value is a Number, otherwise false
107
+ */
108
+ const isNumber = typeOfTest('number');
109
+
110
+ /**
111
+ * Determine if a value is an Object
112
+ *
113
+ * @param {*} thing The value to test
114
+ *
115
+ * @returns {boolean} True if value is an Object, otherwise false
116
+ */
117
+ const isObject = (thing) => thing !== null && typeof thing === 'object';
118
+
119
+ /**
120
+ * Determine if a value is a Boolean
121
+ *
122
+ * @param {*} thing The value to test
123
+ * @returns {boolean} True if value is a Boolean, otherwise false
124
+ */
125
+ const isBoolean = thing => thing === true || thing === false;
126
+
127
+ /**
128
+ * Determine if a value is a plain Object
129
+ *
130
+ * @param {*} val The value to test
131
+ *
132
+ * @returns {boolean} True if value is a plain Object, otherwise false
133
+ */
134
+ const isPlainObject = (val) => {
135
+ if (kindOf(val) !== 'object') {
136
+ return false;
137
+ }
138
+
139
+ const prototype = getPrototypeOf(val);
140
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
141
+ };
142
+
143
+ /**
144
+ * Determine if a value is a Date
145
+ *
146
+ * @param {*} val The value to test
147
+ *
148
+ * @returns {boolean} True if value is a Date, otherwise false
149
+ */
150
+ const isDate = kindOfTest('Date');
151
+
152
+ /**
153
+ * Determine if a value is a File
154
+ *
155
+ * @param {*} val The value to test
156
+ *
157
+ * @returns {boolean} True if value is a File, otherwise false
158
+ */
159
+ const isFile = kindOfTest('File');
160
+
161
+ /**
162
+ * Determine if a value is a Blob
163
+ *
164
+ * @param {*} val The value to test
165
+ *
166
+ * @returns {boolean} True if value is a Blob, otherwise false
167
+ */
168
+ const isBlob = kindOfTest('Blob');
169
+
170
+ /**
171
+ * Determine if a value is a FileList
172
+ *
173
+ * @param {*} val The value to test
174
+ *
175
+ * @returns {boolean} True if value is a File, otherwise false
176
+ */
177
+ const isFileList = kindOfTest('FileList');
178
+
179
+ /**
180
+ * Determine if a value is a Stream
181
+ *
182
+ * @param {*} val The value to test
183
+ *
184
+ * @returns {boolean} True if value is a Stream, otherwise false
185
+ */
186
+ const isStream = (val) => isObject(val) && isFunction(val.pipe);
187
+
188
+ /**
189
+ * Determine if a value is a FormData
190
+ *
191
+ * @param {*} thing The value to test
192
+ *
193
+ * @returns {boolean} True if value is an FormData, otherwise false
194
+ */
195
+ const isFormData = (thing) => {
196
+ let kind;
197
+ return thing && (
198
+ (typeof FormData === 'function' && thing instanceof FormData) || (
199
+ isFunction(thing.append) && (
200
+ (kind = kindOf(thing)) === 'formdata' ||
201
+ // detect form-data instance
202
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
203
+ )
204
+ )
205
+ )
206
+ };
207
+
208
+ /**
209
+ * Determine if a value is a URLSearchParams object
210
+ *
211
+ * @param {*} val The value to test
212
+ *
213
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
214
+ */
215
+ const isURLSearchParams = kindOfTest('URLSearchParams');
216
+
217
+ /**
218
+ * Trim excess whitespace off the beginning and end of a string
219
+ *
220
+ * @param {String} str The String to trim
221
+ *
222
+ * @returns {String} The String freed of excess whitespace
223
+ */
224
+ const trim = (str) => str.trim ?
225
+ str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
226
+
227
+ /**
228
+ * Iterate over an Array or an Object invoking a function for each item.
229
+ *
230
+ * If `obj` is an Array callback will be called passing
231
+ * the value, index, and complete array for each item.
232
+ *
233
+ * If 'obj' is an Object callback will be called passing
234
+ * the value, key, and complete object for each property.
235
+ *
236
+ * @param {Object|Array} obj The object to iterate
237
+ * @param {Function} fn The callback to invoke for each item
238
+ *
239
+ * @param {Boolean} [allOwnKeys = false]
240
+ * @returns {any}
241
+ */
242
+ function forEach(obj, fn, {allOwnKeys = false} = {}) {
243
+ // Don't bother if no value provided
244
+ if (obj === null || typeof obj === 'undefined') {
245
+ return;
246
+ }
247
+
248
+ let i;
249
+ let l;
250
+
251
+ // Force an array if not already something iterable
252
+ if (typeof obj !== 'object') {
253
+ /*eslint no-param-reassign:0*/
254
+ obj = [obj];
255
+ }
256
+
257
+ if (isArray(obj)) {
258
+ // Iterate over array values
259
+ for (i = 0, l = obj.length; i < l; i++) {
260
+ fn.call(null, obj[i], i, obj);
261
+ }
262
+ } else {
263
+ // Iterate over object keys
264
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
265
+ const len = keys.length;
266
+ let key;
267
+
268
+ for (i = 0; i < len; i++) {
269
+ key = keys[i];
270
+ fn.call(null, obj[key], key, obj);
271
+ }
272
+ }
273
+ }
274
+
275
+ function findKey(obj, key) {
276
+ key = key.toLowerCase();
277
+ const keys = Object.keys(obj);
278
+ let i = keys.length;
279
+ let _key;
280
+ while (i-- > 0) {
281
+ _key = keys[i];
282
+ if (key === _key.toLowerCase()) {
283
+ return _key;
284
+ }
285
+ }
286
+ return null;
287
+ }
288
+
289
+ const _global = (() => {
290
+ /*eslint no-undef:0*/
291
+ if (typeof globalThis !== "undefined") return globalThis;
292
+ return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
293
+ })();
294
+
295
+ const isContextDefined = (context) => !isUndefined(context) && context !== _global;
296
+
297
+ /**
298
+ * Accepts varargs expecting each argument to be an object, then
299
+ * immutably merges the properties of each object and returns result.
300
+ *
301
+ * When multiple objects contain the same key the later object in
302
+ * the arguments list will take precedence.
303
+ *
304
+ * Example:
305
+ *
306
+ * ```js
307
+ * var result = merge({foo: 123}, {foo: 456});
308
+ * console.log(result.foo); // outputs 456
309
+ * ```
310
+ *
311
+ * @param {Object} obj1 Object to merge
312
+ *
313
+ * @returns {Object} Result of all merge properties
314
+ */
315
+ function merge(/* obj1, obj2, obj3, ... */) {
316
+ const {caseless} = isContextDefined(this) && this || {};
317
+ const result = {};
318
+ const assignValue = (val, key) => {
319
+ const targetKey = caseless && findKey(result, key) || key;
320
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
321
+ result[targetKey] = merge(result[targetKey], val);
322
+ } else if (isPlainObject(val)) {
323
+ result[targetKey] = merge({}, val);
324
+ } else if (isArray(val)) {
325
+ result[targetKey] = val.slice();
326
+ } else {
327
+ result[targetKey] = val;
328
+ }
329
+ };
330
+
331
+ for (let i = 0, l = arguments.length; i < l; i++) {
332
+ arguments[i] && forEach(arguments[i], assignValue);
333
+ }
334
+ return result;
335
+ }
336
+
337
+ /**
338
+ * Extends object a by mutably adding to it the properties of object b.
339
+ *
340
+ * @param {Object} a The object to be extended
341
+ * @param {Object} b The object to copy properties from
342
+ * @param {Object} thisArg The object to bind function to
343
+ *
344
+ * @param {Boolean} [allOwnKeys]
345
+ * @returns {Object} The resulting value of object a
346
+ */
347
+ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
348
+ forEach(b, (val, key) => {
349
+ if (thisArg && isFunction(val)) {
350
+ a[key] = bind(val, thisArg);
351
+ } else {
352
+ a[key] = val;
353
+ }
354
+ }, {allOwnKeys});
355
+ return a;
356
+ };
357
+
358
+ /**
359
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
360
+ *
361
+ * @param {string} content with BOM
362
+ *
363
+ * @returns {string} content value without BOM
364
+ */
365
+ const stripBOM = (content) => {
366
+ if (content.charCodeAt(0) === 0xFEFF) {
367
+ content = content.slice(1);
368
+ }
369
+ return content;
370
+ };
371
+
372
+ /**
373
+ * Inherit the prototype methods from one constructor into another
374
+ * @param {function} constructor
375
+ * @param {function} superConstructor
376
+ * @param {object} [props]
377
+ * @param {object} [descriptors]
378
+ *
379
+ * @returns {void}
380
+ */
381
+ const inherits = (constructor, superConstructor, props, descriptors) => {
382
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
383
+ constructor.prototype.constructor = constructor;
384
+ Object.defineProperty(constructor, 'super', {
385
+ value: superConstructor.prototype
386
+ });
387
+ props && Object.assign(constructor.prototype, props);
388
+ };
389
+
390
+ /**
391
+ * Resolve object with deep prototype chain to a flat object
392
+ * @param {Object} sourceObj source object
393
+ * @param {Object} [destObj]
394
+ * @param {Function|Boolean} [filter]
395
+ * @param {Function} [propFilter]
396
+ *
397
+ * @returns {Object}
398
+ */
399
+ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
400
+ let props;
401
+ let i;
402
+ let prop;
403
+ const merged = {};
404
+
405
+ destObj = destObj || {};
406
+ // eslint-disable-next-line no-eq-null,eqeqeq
407
+ if (sourceObj == null) return destObj;
408
+
409
+ do {
410
+ props = Object.getOwnPropertyNames(sourceObj);
411
+ i = props.length;
412
+ while (i-- > 0) {
413
+ prop = props[i];
414
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
415
+ destObj[prop] = sourceObj[prop];
416
+ merged[prop] = true;
417
+ }
418
+ }
419
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
420
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
421
+
422
+ return destObj;
423
+ };
424
+
425
+ /**
426
+ * Determines whether a string ends with the characters of a specified string
427
+ *
428
+ * @param {String} str
429
+ * @param {String} searchString
430
+ * @param {Number} [position= 0]
431
+ *
432
+ * @returns {boolean}
433
+ */
434
+ const endsWith = (str, searchString, position) => {
435
+ str = String(str);
436
+ if (position === undefined || position > str.length) {
437
+ position = str.length;
438
+ }
439
+ position -= searchString.length;
440
+ const lastIndex = str.indexOf(searchString, position);
441
+ return lastIndex !== -1 && lastIndex === position;
442
+ };
443
+
444
+
445
+ /**
446
+ * Returns new array from array like object or null if failed
447
+ *
448
+ * @param {*} [thing]
449
+ *
450
+ * @returns {?Array}
451
+ */
452
+ const toArray = (thing) => {
453
+ if (!thing) return null;
454
+ if (isArray(thing)) return thing;
455
+ let i = thing.length;
456
+ if (!isNumber(i)) return null;
457
+ const arr = new Array(i);
458
+ while (i-- > 0) {
459
+ arr[i] = thing[i];
460
+ }
461
+ return arr;
462
+ };
463
+
464
+ /**
465
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
466
+ * thing passed in is an instance of Uint8Array
467
+ *
468
+ * @param {TypedArray}
469
+ *
470
+ * @returns {Array}
471
+ */
472
+ // eslint-disable-next-line func-names
473
+ const isTypedArray = (TypedArray => {
474
+ // eslint-disable-next-line func-names
475
+ return thing => {
476
+ return TypedArray && thing instanceof TypedArray;
477
+ };
478
+ })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
479
+
480
+ /**
481
+ * For each entry in the object, call the function with the key and value.
482
+ *
483
+ * @param {Object<any, any>} obj - The object to iterate over.
484
+ * @param {Function} fn - The function to call for each entry.
485
+ *
486
+ * @returns {void}
487
+ */
488
+ const forEachEntry = (obj, fn) => {
489
+ const generator = obj && obj[Symbol.iterator];
490
+
491
+ const iterator = generator.call(obj);
492
+
493
+ let result;
494
+
495
+ while ((result = iterator.next()) && !result.done) {
496
+ const pair = result.value;
497
+ fn.call(obj, pair[0], pair[1]);
498
+ }
499
+ };
500
+
501
+ /**
502
+ * It takes a regular expression and a string, and returns an array of all the matches
503
+ *
504
+ * @param {string} regExp - The regular expression to match against.
505
+ * @param {string} str - The string to search.
506
+ *
507
+ * @returns {Array<boolean>}
508
+ */
509
+ const matchAll = (regExp, str) => {
510
+ let matches;
511
+ const arr = [];
512
+
513
+ while ((matches = regExp.exec(str)) !== null) {
514
+ arr.push(matches);
515
+ }
516
+
517
+ return arr;
518
+ };
519
+
520
+ /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
521
+ const isHTMLForm = kindOfTest('HTMLFormElement');
522
+
523
+ const toCamelCase = str => {
524
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
525
+ function replacer(m, p1, p2) {
526
+ return p1.toUpperCase() + p2;
527
+ }
528
+ );
529
+ };
530
+
531
+ /* Creating a function that will check if an object has a property. */
532
+ const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
533
+
534
+ /**
535
+ * Determine if a value is a RegExp object
536
+ *
537
+ * @param {*} val The value to test
538
+ *
539
+ * @returns {boolean} True if value is a RegExp object, otherwise false
540
+ */
541
+ const isRegExp = kindOfTest('RegExp');
542
+
543
+ const reduceDescriptors = (obj, reducer) => {
544
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
545
+ const reducedDescriptors = {};
546
+
547
+ forEach(descriptors, (descriptor, name) => {
548
+ if (reducer(descriptor, name, obj) !== false) {
549
+ reducedDescriptors[name] = descriptor;
550
+ }
551
+ });
552
+
553
+ Object.defineProperties(obj, reducedDescriptors);
554
+ };
555
+
556
+ /**
557
+ * Makes all methods read-only
558
+ * @param {Object} obj
559
+ */
560
+
561
+ const freezeMethods = (obj) => {
562
+ reduceDescriptors(obj, (descriptor, name) => {
563
+ // skip restricted props in strict mode
564
+ if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
565
+ return false;
566
+ }
567
+
568
+ const value = obj[name];
569
+
570
+ if (!isFunction(value)) return;
571
+
572
+ descriptor.enumerable = false;
573
+
574
+ if ('writable' in descriptor) {
575
+ descriptor.writable = false;
576
+ return;
577
+ }
578
+
579
+ if (!descriptor.set) {
580
+ descriptor.set = () => {
581
+ throw Error('Can not rewrite read-only method \'' + name + '\'');
582
+ };
583
+ }
584
+ });
585
+ };
586
+
587
+ const toObjectSet = (arrayOrString, delimiter) => {
588
+ const obj = {};
589
+
590
+ const define = (arr) => {
591
+ arr.forEach(value => {
592
+ obj[value] = true;
593
+ });
594
+ };
595
+
596
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
597
+
598
+ return obj;
599
+ };
600
+
601
+ const noop = () => {};
602
+
603
+ const toFiniteNumber = (value, defaultValue) => {
604
+ value = +value;
605
+ return Number.isFinite(value) ? value : defaultValue;
606
+ };
607
+
608
+ const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
609
+
610
+ const DIGIT = '0123456789';
611
+
612
+ const ALPHABET = {
613
+ DIGIT,
614
+ ALPHA,
615
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
616
+ };
617
+
618
+ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
619
+ let str = '';
620
+ const {length} = alphabet;
621
+ while (size--) {
622
+ str += alphabet[Math.random() * length|0];
623
+ }
624
+
625
+ return str;
626
+ };
627
+
628
+ /**
629
+ * If the thing is a FormData object, return true, otherwise return false.
630
+ *
631
+ * @param {unknown} thing - The thing to check.
632
+ *
633
+ * @returns {boolean}
634
+ */
635
+ function isSpecCompliantForm(thing) {
636
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
637
+ }
638
+
639
+ const toJSONObject = (obj) => {
640
+ const stack = new Array(10);
641
+
642
+ const visit = (source, i) => {
643
+
644
+ if (isObject(source)) {
645
+ if (stack.indexOf(source) >= 0) {
646
+ return;
647
+ }
648
+
649
+ if(!('toJSON' in source)) {
650
+ stack[i] = source;
651
+ const target = isArray(source) ? [] : {};
652
+
653
+ forEach(source, (value, key) => {
654
+ const reducedValue = visit(value, i + 1);
655
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
656
+ });
657
+
658
+ stack[i] = undefined;
659
+
660
+ return target;
661
+ }
662
+ }
663
+
664
+ return source;
665
+ };
666
+
667
+ return visit(obj, 0);
668
+ };
669
+
670
+ const isAsyncFn = kindOfTest('AsyncFunction');
671
+
672
+ const isThenable = (thing) =>
673
+ thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
674
+
675
+ var utils = {
676
+ isArray,
677
+ isArrayBuffer,
678
+ isBuffer,
679
+ isFormData,
680
+ isArrayBufferView,
681
+ isString,
682
+ isNumber,
683
+ isBoolean,
684
+ isObject,
685
+ isPlainObject,
686
+ isUndefined,
687
+ isDate,
688
+ isFile,
689
+ isBlob,
690
+ isRegExp,
691
+ isFunction,
692
+ isStream,
693
+ isURLSearchParams,
694
+ isTypedArray,
695
+ isFileList,
696
+ forEach,
697
+ merge,
698
+ extend,
699
+ trim,
700
+ stripBOM,
701
+ inherits,
702
+ toFlatObject,
703
+ kindOf,
704
+ kindOfTest,
705
+ endsWith,
706
+ toArray,
707
+ forEachEntry,
708
+ matchAll,
709
+ isHTMLForm,
710
+ hasOwnProperty,
711
+ hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
712
+ reduceDescriptors,
713
+ freezeMethods,
714
+ toObjectSet,
715
+ toCamelCase,
716
+ noop,
717
+ toFiniteNumber,
718
+ findKey,
719
+ global: _global,
720
+ isContextDefined,
721
+ ALPHABET,
722
+ generateString,
723
+ isSpecCompliantForm,
724
+ toJSONObject,
725
+ isAsyncFn,
726
+ isThenable
727
+ };
728
+
729
+ /**
730
+ * Create an Error with the specified message, config, error code, request and response.
731
+ *
732
+ * @param {string} message The error message.
733
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
734
+ * @param {Object} [config] The config.
735
+ * @param {Object} [request] The request.
736
+ * @param {Object} [response] The response.
737
+ *
738
+ * @returns {Error} The created error.
739
+ */
740
+ function AxiosError(message, code, config, request, response) {
741
+ Error.call(this);
742
+
743
+ if (Error.captureStackTrace) {
744
+ Error.captureStackTrace(this, this.constructor);
745
+ } else {
746
+ this.stack = (new Error()).stack;
747
+ }
748
+
749
+ this.message = message;
750
+ this.name = 'AxiosError';
751
+ code && (this.code = code);
752
+ config && (this.config = config);
753
+ request && (this.request = request);
754
+ response && (this.response = response);
755
+ }
756
+
757
+ utils.inherits(AxiosError, Error, {
758
+ toJSON: function toJSON() {
759
+ return {
760
+ // Standard
761
+ message: this.message,
762
+ name: this.name,
763
+ // Microsoft
764
+ description: this.description,
765
+ number: this.number,
766
+ // Mozilla
767
+ fileName: this.fileName,
768
+ lineNumber: this.lineNumber,
769
+ columnNumber: this.columnNumber,
770
+ stack: this.stack,
771
+ // Axios
772
+ config: utils.toJSONObject(this.config),
773
+ code: this.code,
774
+ status: this.response && this.response.status ? this.response.status : null
775
+ };
776
+ }
777
+ });
778
+
779
+ const prototype$1 = AxiosError.prototype;
780
+ const descriptors = {};
781
+
782
+ [
783
+ 'ERR_BAD_OPTION_VALUE',
784
+ 'ERR_BAD_OPTION',
785
+ 'ECONNABORTED',
786
+ 'ETIMEDOUT',
787
+ 'ERR_NETWORK',
788
+ 'ERR_FR_TOO_MANY_REDIRECTS',
789
+ 'ERR_DEPRECATED',
790
+ 'ERR_BAD_RESPONSE',
791
+ 'ERR_BAD_REQUEST',
792
+ 'ERR_CANCELED',
793
+ 'ERR_NOT_SUPPORT',
794
+ 'ERR_INVALID_URL'
795
+ // eslint-disable-next-line func-names
796
+ ].forEach(code => {
797
+ descriptors[code] = {value: code};
798
+ });
799
+
800
+ Object.defineProperties(AxiosError, descriptors);
801
+ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
802
+
803
+ // eslint-disable-next-line func-names
804
+ AxiosError.from = (error, code, config, request, response, customProps) => {
805
+ const axiosError = Object.create(prototype$1);
806
+
807
+ utils.toFlatObject(error, axiosError, function filter(obj) {
808
+ return obj !== Error.prototype;
809
+ }, prop => {
810
+ return prop !== 'isAxiosError';
811
+ });
812
+
813
+ AxiosError.call(axiosError, error.message, code, config, request, response);
814
+
815
+ axiosError.cause = error;
816
+
817
+ axiosError.name = error.name;
818
+
819
+ customProps && Object.assign(axiosError, customProps);
820
+
821
+ return axiosError;
822
+ };
823
+
824
+ // eslint-disable-next-line strict
825
+ var httpAdapter = null;
826
+
827
+ /**
828
+ * Determines if the given thing is a array or js object.
829
+ *
830
+ * @param {string} thing - The object or array to be visited.
831
+ *
832
+ * @returns {boolean}
833
+ */
834
+ function isVisitable(thing) {
835
+ return utils.isPlainObject(thing) || utils.isArray(thing);
836
+ }
837
+
838
+ /**
839
+ * It removes the brackets from the end of a string
840
+ *
841
+ * @param {string} key - The key of the parameter.
842
+ *
843
+ * @returns {string} the key without the brackets.
844
+ */
845
+ function removeBrackets(key) {
846
+ return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
847
+ }
848
+
849
+ /**
850
+ * It takes a path, a key, and a boolean, and returns a string
851
+ *
852
+ * @param {string} path - The path to the current key.
853
+ * @param {string} key - The key of the current object being iterated over.
854
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
855
+ *
856
+ * @returns {string} The path to the current key.
857
+ */
858
+ function renderKey(path, key, dots) {
859
+ if (!path) return key;
860
+ return path.concat(key).map(function each(token, i) {
861
+ // eslint-disable-next-line no-param-reassign
862
+ token = removeBrackets(token);
863
+ return !dots && i ? '[' + token + ']' : token;
864
+ }).join(dots ? '.' : '');
865
+ }
866
+
867
+ /**
868
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
869
+ *
870
+ * @param {Array<any>} arr - The array to check
871
+ *
872
+ * @returns {boolean}
873
+ */
874
+ function isFlatArray(arr) {
875
+ return utils.isArray(arr) && !arr.some(isVisitable);
876
+ }
877
+
878
+ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
879
+ return /^is[A-Z]/.test(prop);
880
+ });
881
+
882
+ /**
883
+ * Convert a data object to FormData
884
+ *
885
+ * @param {Object} obj
886
+ * @param {?Object} [formData]
887
+ * @param {?Object} [options]
888
+ * @param {Function} [options.visitor]
889
+ * @param {Boolean} [options.metaTokens = true]
890
+ * @param {Boolean} [options.dots = false]
891
+ * @param {?Boolean} [options.indexes = false]
892
+ *
893
+ * @returns {Object}
894
+ **/
895
+
896
+ /**
897
+ * It converts an object into a FormData object
898
+ *
899
+ * @param {Object<any, any>} obj - The object to convert to form data.
900
+ * @param {string} formData - The FormData object to append to.
901
+ * @param {Object<string, any>} options
902
+ *
903
+ * @returns
904
+ */
905
+ function toFormData(obj, formData, options) {
906
+ if (!utils.isObject(obj)) {
907
+ throw new TypeError('target must be an object');
908
+ }
909
+
910
+ // eslint-disable-next-line no-param-reassign
911
+ formData = formData || new (FormData)();
912
+
913
+ // eslint-disable-next-line no-param-reassign
914
+ options = utils.toFlatObject(options, {
915
+ metaTokens: true,
916
+ dots: false,
917
+ indexes: false
918
+ }, false, function defined(option, source) {
919
+ // eslint-disable-next-line no-eq-null,eqeqeq
920
+ return !utils.isUndefined(source[option]);
921
+ });
922
+
923
+ const metaTokens = options.metaTokens;
924
+ // eslint-disable-next-line no-use-before-define
925
+ const visitor = options.visitor || defaultVisitor;
926
+ const dots = options.dots;
927
+ const indexes = options.indexes;
928
+ const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
929
+ const useBlob = _Blob && utils.isSpecCompliantForm(formData);
930
+
931
+ if (!utils.isFunction(visitor)) {
932
+ throw new TypeError('visitor must be a function');
933
+ }
934
+
935
+ function convertValue(value) {
936
+ if (value === null) return '';
937
+
938
+ if (utils.isDate(value)) {
939
+ return value.toISOString();
940
+ }
941
+
942
+ if (!useBlob && utils.isBlob(value)) {
943
+ throw new AxiosError('Blob is not supported. Use a Buffer instead.');
944
+ }
945
+
946
+ if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
947
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
948
+ }
949
+
950
+ return value;
951
+ }
952
+
953
+ /**
954
+ * Default visitor.
955
+ *
956
+ * @param {*} value
957
+ * @param {String|Number} key
958
+ * @param {Array<String|Number>} path
959
+ * @this {FormData}
960
+ *
961
+ * @returns {boolean} return true to visit the each prop of the value recursively
962
+ */
963
+ function defaultVisitor(value, key, path) {
964
+ let arr = value;
965
+
966
+ if (value && !path && typeof value === 'object') {
967
+ if (utils.endsWith(key, '{}')) {
968
+ // eslint-disable-next-line no-param-reassign
969
+ key = metaTokens ? key : key.slice(0, -2);
970
+ // eslint-disable-next-line no-param-reassign
971
+ value = JSON.stringify(value);
972
+ } else if (
973
+ (utils.isArray(value) && isFlatArray(value)) ||
974
+ ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
975
+ )) {
976
+ // eslint-disable-next-line no-param-reassign
977
+ key = removeBrackets(key);
978
+
979
+ arr.forEach(function each(el, index) {
980
+ !(utils.isUndefined(el) || el === null) && formData.append(
981
+ // eslint-disable-next-line no-nested-ternary
982
+ indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
983
+ convertValue(el)
984
+ );
985
+ });
986
+ return false;
987
+ }
988
+ }
989
+
990
+ if (isVisitable(value)) {
991
+ return true;
992
+ }
993
+
994
+ formData.append(renderKey(path, key, dots), convertValue(value));
995
+
996
+ return false;
997
+ }
998
+
999
+ const stack = [];
1000
+
1001
+ const exposedHelpers = Object.assign(predicates, {
1002
+ defaultVisitor,
1003
+ convertValue,
1004
+ isVisitable
1005
+ });
1006
+
1007
+ function build(value, path) {
1008
+ if (utils.isUndefined(value)) return;
1009
+
1010
+ if (stack.indexOf(value) !== -1) {
1011
+ throw Error('Circular reference detected in ' + path.join('.'));
1012
+ }
1013
+
1014
+ stack.push(value);
1015
+
1016
+ utils.forEach(value, function each(el, key) {
1017
+ const result = !(utils.isUndefined(el) || el === null) && visitor.call(
1018
+ formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
1019
+ );
1020
+
1021
+ if (result === true) {
1022
+ build(el, path ? path.concat(key) : [key]);
1023
+ }
1024
+ });
1025
+
1026
+ stack.pop();
1027
+ }
1028
+
1029
+ if (!utils.isObject(obj)) {
1030
+ throw new TypeError('data must be an object');
1031
+ }
1032
+
1033
+ build(obj);
1034
+
1035
+ return formData;
1036
+ }
1037
+
1038
+ /**
1039
+ * It encodes a string by replacing all characters that are not in the unreserved set with
1040
+ * their percent-encoded equivalents
1041
+ *
1042
+ * @param {string} str - The string to encode.
1043
+ *
1044
+ * @returns {string} The encoded string.
1045
+ */
1046
+ function encode$1(str) {
1047
+ const charMap = {
1048
+ '!': '%21',
1049
+ "'": '%27',
1050
+ '(': '%28',
1051
+ ')': '%29',
1052
+ '~': '%7E',
1053
+ '%20': '+',
1054
+ '%00': '\x00'
1055
+ };
1056
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
1057
+ return charMap[match];
1058
+ });
1059
+ }
1060
+
1061
+ /**
1062
+ * It takes a params object and converts it to a FormData object
1063
+ *
1064
+ * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
1065
+ * @param {Object<string, any>} options - The options object passed to the Axios constructor.
1066
+ *
1067
+ * @returns {void}
1068
+ */
1069
+ function AxiosURLSearchParams(params, options) {
1070
+ this._pairs = [];
1071
+
1072
+ params && toFormData(params, this, options);
1073
+ }
1074
+
1075
+ const prototype = AxiosURLSearchParams.prototype;
1076
+
1077
+ prototype.append = function append(name, value) {
1078
+ this._pairs.push([name, value]);
1079
+ };
1080
+
1081
+ prototype.toString = function toString(encoder) {
1082
+ const _encode = encoder ? function(value) {
1083
+ return encoder.call(this, value, encode$1);
1084
+ } : encode$1;
1085
+
1086
+ return this._pairs.map(function each(pair) {
1087
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
1088
+ }, '').join('&');
1089
+ };
1090
+
1091
+ /**
1092
+ * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
1093
+ * URI encoded counterparts
1094
+ *
1095
+ * @param {string} val The value to be encoded.
1096
+ *
1097
+ * @returns {string} The encoded value.
1098
+ */
1099
+ function encode(val) {
1100
+ return encodeURIComponent(val).
1101
+ replace(/%3A/gi, ':').
1102
+ replace(/%24/g, '$').
1103
+ replace(/%2C/gi, ',').
1104
+ replace(/%20/g, '+').
1105
+ replace(/%5B/gi, '[').
1106
+ replace(/%5D/gi, ']');
1107
+ }
1108
+
1109
+ /**
1110
+ * Build a URL by appending params to the end
1111
+ *
1112
+ * @param {string} url The base of the url (e.g., http://www.google.com)
1113
+ * @param {object} [params] The params to be appended
1114
+ * @param {?object} options
1115
+ *
1116
+ * @returns {string} The formatted url
1117
+ */
1118
+ function buildURL(url, params, options) {
1119
+ /*eslint no-param-reassign:0*/
1120
+ if (!params) {
1121
+ return url;
1122
+ }
1123
+
1124
+ const _encode = options && options.encode || encode;
1125
+
1126
+ const serializeFn = options && options.serialize;
1127
+
1128
+ let serializedParams;
1129
+
1130
+ if (serializeFn) {
1131
+ serializedParams = serializeFn(params, options);
1132
+ } else {
1133
+ serializedParams = utils.isURLSearchParams(params) ?
1134
+ params.toString() :
1135
+ new AxiosURLSearchParams(params, options).toString(_encode);
1136
+ }
1137
+
1138
+ if (serializedParams) {
1139
+ const hashmarkIndex = url.indexOf("#");
1140
+
1141
+ if (hashmarkIndex !== -1) {
1142
+ url = url.slice(0, hashmarkIndex);
1143
+ }
1144
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1145
+ }
1146
+
1147
+ return url;
1148
+ }
1149
+
1150
+ class InterceptorManager {
1151
+ constructor() {
1152
+ this.handlers = [];
1153
+ }
1154
+
1155
+ /**
1156
+ * Add a new interceptor to the stack
1157
+ *
1158
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
1159
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
1160
+ *
1161
+ * @return {Number} An ID used to remove interceptor later
1162
+ */
1163
+ use(fulfilled, rejected, options) {
1164
+ this.handlers.push({
1165
+ fulfilled,
1166
+ rejected,
1167
+ synchronous: options ? options.synchronous : false,
1168
+ runWhen: options ? options.runWhen : null
1169
+ });
1170
+ return this.handlers.length - 1;
1171
+ }
1172
+
1173
+ /**
1174
+ * Remove an interceptor from the stack
1175
+ *
1176
+ * @param {Number} id The ID that was returned by `use`
1177
+ *
1178
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
1179
+ */
1180
+ eject(id) {
1181
+ if (this.handlers[id]) {
1182
+ this.handlers[id] = null;
1183
+ }
1184
+ }
1185
+
1186
+ /**
1187
+ * Clear all interceptors from the stack
1188
+ *
1189
+ * @returns {void}
1190
+ */
1191
+ clear() {
1192
+ if (this.handlers) {
1193
+ this.handlers = [];
1194
+ }
1195
+ }
1196
+
1197
+ /**
1198
+ * Iterate over all the registered interceptors
1199
+ *
1200
+ * This method is particularly useful for skipping over any
1201
+ * interceptors that may have become `null` calling `eject`.
1202
+ *
1203
+ * @param {Function} fn The function to call for each interceptor
1204
+ *
1205
+ * @returns {void}
1206
+ */
1207
+ forEach(fn) {
1208
+ utils.forEach(this.handlers, function forEachHandler(h) {
1209
+ if (h !== null) {
1210
+ fn(h);
1211
+ }
1212
+ });
1213
+ }
1214
+ }
1215
+
1216
+ var InterceptorManager$1 = InterceptorManager;
1217
+
1218
+ var transitionalDefaults = {
1219
+ silentJSONParsing: true,
1220
+ forcedJSONParsing: true,
1221
+ clarifyTimeoutError: false
1222
+ };
1223
+
1224
+ var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
1225
+
1226
+ var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1227
+
1228
+ var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1229
+
1230
+ /**
1231
+ * Determine if we're running in a standard browser environment
1232
+ *
1233
+ * This allows axios to run in a web worker, and react-native.
1234
+ * Both environments support XMLHttpRequest, but not fully standard globals.
1235
+ *
1236
+ * web workers:
1237
+ * typeof window -> undefined
1238
+ * typeof document -> undefined
1239
+ *
1240
+ * react-native:
1241
+ * navigator.product -> 'ReactNative'
1242
+ * nativescript
1243
+ * navigator.product -> 'NativeScript' or 'NS'
1244
+ *
1245
+ * @returns {boolean}
1246
+ */
1247
+ const isStandardBrowserEnv = (() => {
1248
+ let product;
1249
+ if (typeof navigator !== 'undefined' && (
1250
+ (product = navigator.product) === 'ReactNative' ||
1251
+ product === 'NativeScript' ||
1252
+ product === 'NS')
1253
+ ) {
1254
+ return false;
1255
+ }
1256
+
1257
+ return typeof window !== 'undefined' && typeof document !== 'undefined';
1258
+ })();
1259
+
1260
+ /**
1261
+ * Determine if we're running in a standard browser webWorker environment
1262
+ *
1263
+ * Although the `isStandardBrowserEnv` method indicates that
1264
+ * `allows axios to run in a web worker`, the WebWorker will still be
1265
+ * filtered out due to its judgment standard
1266
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1267
+ * This leads to a problem when axios post `FormData` in webWorker
1268
+ */
1269
+ const isStandardBrowserWebWorkerEnv = (() => {
1270
+ return (
1271
+ typeof WorkerGlobalScope !== 'undefined' &&
1272
+ // eslint-disable-next-line no-undef
1273
+ self instanceof WorkerGlobalScope &&
1274
+ typeof self.importScripts === 'function'
1275
+ );
1276
+ })();
1277
+
1278
+
1279
+ var platform = {
1280
+ isBrowser: true,
1281
+ classes: {
1282
+ URLSearchParams: URLSearchParams$1,
1283
+ FormData: FormData$1,
1284
+ Blob: Blob$1
1285
+ },
1286
+ isStandardBrowserEnv,
1287
+ isStandardBrowserWebWorkerEnv,
1288
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1289
+ };
1290
+
1291
+ function toURLEncodedForm(data, options) {
1292
+ return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
1293
+ visitor: function(value, key, path, helpers) {
1294
+ if (platform.isNode && utils.isBuffer(value)) {
1295
+ this.append(key, value.toString('base64'));
1296
+ return false;
1297
+ }
1298
+
1299
+ return helpers.defaultVisitor.apply(this, arguments);
1300
+ }
1301
+ }, options));
1302
+ }
1303
+
1304
+ /**
1305
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
1306
+ *
1307
+ * @param {string} name - The name of the property to get.
1308
+ *
1309
+ * @returns An array of strings.
1310
+ */
1311
+ function parsePropPath(name) {
1312
+ // foo[x][y][z]
1313
+ // foo.x.y.z
1314
+ // foo-x-y-z
1315
+ // foo x y z
1316
+ return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
1317
+ return match[0] === '[]' ? '' : match[1] || match[0];
1318
+ });
1319
+ }
1320
+
1321
+ /**
1322
+ * Convert an array to an object.
1323
+ *
1324
+ * @param {Array<any>} arr - The array to convert to an object.
1325
+ *
1326
+ * @returns An object with the same keys and values as the array.
1327
+ */
1328
+ function arrayToObject(arr) {
1329
+ const obj = {};
1330
+ const keys = Object.keys(arr);
1331
+ let i;
1332
+ const len = keys.length;
1333
+ let key;
1334
+ for (i = 0; i < len; i++) {
1335
+ key = keys[i];
1336
+ obj[key] = arr[key];
1337
+ }
1338
+ return obj;
1339
+ }
1340
+
1341
+ /**
1342
+ * It takes a FormData object and returns a JavaScript object
1343
+ *
1344
+ * @param {string} formData The FormData object to convert to JSON.
1345
+ *
1346
+ * @returns {Object<string, any> | null} The converted object.
1347
+ */
1348
+ function formDataToJSON(formData) {
1349
+ function buildPath(path, value, target, index) {
1350
+ let name = path[index++];
1351
+ const isNumericKey = Number.isFinite(+name);
1352
+ const isLast = index >= path.length;
1353
+ name = !name && utils.isArray(target) ? target.length : name;
1354
+
1355
+ if (isLast) {
1356
+ if (utils.hasOwnProp(target, name)) {
1357
+ target[name] = [target[name], value];
1358
+ } else {
1359
+ target[name] = value;
1360
+ }
1361
+
1362
+ return !isNumericKey;
1363
+ }
1364
+
1365
+ if (!target[name] || !utils.isObject(target[name])) {
1366
+ target[name] = [];
1367
+ }
1368
+
1369
+ const result = buildPath(path, value, target[name], index);
1370
+
1371
+ if (result && utils.isArray(target[name])) {
1372
+ target[name] = arrayToObject(target[name]);
1373
+ }
1374
+
1375
+ return !isNumericKey;
1376
+ }
1377
+
1378
+ if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
1379
+ const obj = {};
1380
+
1381
+ utils.forEachEntry(formData, (name, value) => {
1382
+ buildPath(parsePropPath(name), value, obj, 0);
1383
+ });
1384
+
1385
+ return obj;
1386
+ }
1387
+
1388
+ return null;
1389
+ }
1390
+
1391
+ const DEFAULT_CONTENT_TYPE = {
1392
+ 'Content-Type': undefined
1393
+ };
1394
+
1395
+ /**
1396
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
1397
+ * of the input
1398
+ *
1399
+ * @param {any} rawValue - The value to be stringified.
1400
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
1401
+ * @param {Function} encoder - A function that takes a value and returns a string.
1402
+ *
1403
+ * @returns {string} A stringified version of the rawValue.
1404
+ */
1405
+ function stringifySafely(rawValue, parser, encoder) {
1406
+ if (utils.isString(rawValue)) {
1407
+ try {
1408
+ (parser || JSON.parse)(rawValue);
1409
+ return utils.trim(rawValue);
1410
+ } catch (e) {
1411
+ if (e.name !== 'SyntaxError') {
1412
+ throw e;
1413
+ }
1414
+ }
1415
+ }
1416
+
1417
+ return (encoder || JSON.stringify)(rawValue);
1418
+ }
1419
+
1420
+ const defaults = {
1421
+
1422
+ transitional: transitionalDefaults,
1423
+
1424
+ adapter: ['xhr', 'http'],
1425
+
1426
+ transformRequest: [function transformRequest(data, headers) {
1427
+ const contentType = headers.getContentType() || '';
1428
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
1429
+ const isObjectPayload = utils.isObject(data);
1430
+
1431
+ if (isObjectPayload && utils.isHTMLForm(data)) {
1432
+ data = new FormData(data);
1433
+ }
1434
+
1435
+ const isFormData = utils.isFormData(data);
1436
+
1437
+ if (isFormData) {
1438
+ if (!hasJSONContentType) {
1439
+ return data;
1440
+ }
1441
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
1442
+ }
1443
+
1444
+ if (utils.isArrayBuffer(data) ||
1445
+ utils.isBuffer(data) ||
1446
+ utils.isStream(data) ||
1447
+ utils.isFile(data) ||
1448
+ utils.isBlob(data)
1449
+ ) {
1450
+ return data;
1451
+ }
1452
+ if (utils.isArrayBufferView(data)) {
1453
+ return data.buffer;
1454
+ }
1455
+ if (utils.isURLSearchParams(data)) {
1456
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
1457
+ return data.toString();
1458
+ }
1459
+
1460
+ let isFileList;
1461
+
1462
+ if (isObjectPayload) {
1463
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
1464
+ return toURLEncodedForm(data, this.formSerializer).toString();
1465
+ }
1466
+
1467
+ if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
1468
+ const _FormData = this.env && this.env.FormData;
1469
+
1470
+ return toFormData(
1471
+ isFileList ? {'files[]': data} : data,
1472
+ _FormData && new _FormData(),
1473
+ this.formSerializer
1474
+ );
1475
+ }
1476
+ }
1477
+
1478
+ if (isObjectPayload || hasJSONContentType ) {
1479
+ headers.setContentType('application/json', false);
1480
+ return stringifySafely(data);
1481
+ }
1482
+
1483
+ return data;
1484
+ }],
1485
+
1486
+ transformResponse: [function transformResponse(data) {
1487
+ const transitional = this.transitional || defaults.transitional;
1488
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1489
+ const JSONRequested = this.responseType === 'json';
1490
+
1491
+ if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
1492
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
1493
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
1494
+
1495
+ try {
1496
+ return JSON.parse(data);
1497
+ } catch (e) {
1498
+ if (strictJSONParsing) {
1499
+ if (e.name === 'SyntaxError') {
1500
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
1501
+ }
1502
+ throw e;
1503
+ }
1504
+ }
1505
+ }
1506
+
1507
+ return data;
1508
+ }],
1509
+
1510
+ /**
1511
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1512
+ * timeout is not created.
1513
+ */
1514
+ timeout: 0,
1515
+
1516
+ xsrfCookieName: 'XSRF-TOKEN',
1517
+ xsrfHeaderName: 'X-XSRF-TOKEN',
1518
+
1519
+ maxContentLength: -1,
1520
+ maxBodyLength: -1,
1521
+
1522
+ env: {
1523
+ FormData: platform.classes.FormData,
1524
+ Blob: platform.classes.Blob
1525
+ },
1526
+
1527
+ validateStatus: function validateStatus(status) {
1528
+ return status >= 200 && status < 300;
1529
+ },
1530
+
1531
+ headers: {
1532
+ common: {
1533
+ 'Accept': 'application/json, text/plain, */*'
1534
+ }
1535
+ }
1536
+ };
1537
+
1538
+ utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
1539
+ defaults.headers[method] = {};
1540
+ });
1541
+
1542
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1543
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
1544
+ });
1545
+
1546
+ var defaults$1 = defaults;
1547
+
1548
+ // RawAxiosHeaders whose duplicates are ignored by node
1549
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
1550
+ const ignoreDuplicateOf = utils.toObjectSet([
1551
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
1552
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1553
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1554
+ 'referer', 'retry-after', 'user-agent'
1555
+ ]);
1556
+
1557
+ /**
1558
+ * Parse headers into an object
1559
+ *
1560
+ * ```
1561
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
1562
+ * Content-Type: application/json
1563
+ * Connection: keep-alive
1564
+ * Transfer-Encoding: chunked
1565
+ * ```
1566
+ *
1567
+ * @param {String} rawHeaders Headers needing to be parsed
1568
+ *
1569
+ * @returns {Object} Headers parsed into an object
1570
+ */
1571
+ var parseHeaders = rawHeaders => {
1572
+ const parsed = {};
1573
+ let key;
1574
+ let val;
1575
+ let i;
1576
+
1577
+ rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
1578
+ i = line.indexOf(':');
1579
+ key = line.substring(0, i).trim().toLowerCase();
1580
+ val = line.substring(i + 1).trim();
1581
+
1582
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
1583
+ return;
1584
+ }
1585
+
1586
+ if (key === 'set-cookie') {
1587
+ if (parsed[key]) {
1588
+ parsed[key].push(val);
1589
+ } else {
1590
+ parsed[key] = [val];
1591
+ }
1592
+ } else {
1593
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1594
+ }
1595
+ });
1596
+
1597
+ return parsed;
1598
+ };
1599
+
1600
+ const $internals = Symbol('internals');
1601
+
1602
+ function normalizeHeader(header) {
1603
+ return header && String(header).trim().toLowerCase();
1604
+ }
1605
+
1606
+ function normalizeValue(value) {
1607
+ if (value === false || value == null) {
1608
+ return value;
1609
+ }
1610
+
1611
+ return utils.isArray(value) ? value.map(normalizeValue) : String(value);
1612
+ }
1613
+
1614
+ function parseTokens(str) {
1615
+ const tokens = Object.create(null);
1616
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1617
+ let match;
1618
+
1619
+ while ((match = tokensRE.exec(str))) {
1620
+ tokens[match[1]] = match[2];
1621
+ }
1622
+
1623
+ return tokens;
1624
+ }
1625
+
1626
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1627
+
1628
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1629
+ if (utils.isFunction(filter)) {
1630
+ return filter.call(this, value, header);
1631
+ }
1632
+
1633
+ if (isHeaderNameFilter) {
1634
+ value = header;
1635
+ }
1636
+
1637
+ if (!utils.isString(value)) return;
1638
+
1639
+ if (utils.isString(filter)) {
1640
+ return value.indexOf(filter) !== -1;
1641
+ }
1642
+
1643
+ if (utils.isRegExp(filter)) {
1644
+ return filter.test(value);
1645
+ }
1646
+ }
1647
+
1648
+ function formatHeader(header) {
1649
+ return header.trim()
1650
+ .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
1651
+ return char.toUpperCase() + str;
1652
+ });
1653
+ }
1654
+
1655
+ function buildAccessors(obj, header) {
1656
+ const accessorName = utils.toCamelCase(' ' + header);
1657
+
1658
+ ['get', 'set', 'has'].forEach(methodName => {
1659
+ Object.defineProperty(obj, methodName + accessorName, {
1660
+ value: function(arg1, arg2, arg3) {
1661
+ return this[methodName].call(this, header, arg1, arg2, arg3);
1662
+ },
1663
+ configurable: true
1664
+ });
1665
+ });
1666
+ }
1667
+
1668
+ class AxiosHeaders {
1669
+ constructor(headers) {
1670
+ headers && this.set(headers);
1671
+ }
1672
+
1673
+ set(header, valueOrRewrite, rewrite) {
1674
+ const self = this;
1675
+
1676
+ function setHeader(_value, _header, _rewrite) {
1677
+ const lHeader = normalizeHeader(_header);
1678
+
1679
+ if (!lHeader) {
1680
+ throw new Error('header name must be a non-empty string');
1681
+ }
1682
+
1683
+ const key = utils.findKey(self, lHeader);
1684
+
1685
+ if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
1686
+ self[key || _header] = normalizeValue(_value);
1687
+ }
1688
+ }
1689
+
1690
+ const setHeaders = (headers, _rewrite) =>
1691
+ utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
1692
+
1693
+ if (utils.isPlainObject(header) || header instanceof this.constructor) {
1694
+ setHeaders(header, valueOrRewrite);
1695
+ } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1696
+ setHeaders(parseHeaders(header), valueOrRewrite);
1697
+ } else {
1698
+ header != null && setHeader(valueOrRewrite, header, rewrite);
1699
+ }
1700
+
1701
+ return this;
1702
+ }
1703
+
1704
+ get(header, parser) {
1705
+ header = normalizeHeader(header);
1706
+
1707
+ if (header) {
1708
+ const key = utils.findKey(this, header);
1709
+
1710
+ if (key) {
1711
+ const value = this[key];
1712
+
1713
+ if (!parser) {
1714
+ return value;
1715
+ }
1716
+
1717
+ if (parser === true) {
1718
+ return parseTokens(value);
1719
+ }
1720
+
1721
+ if (utils.isFunction(parser)) {
1722
+ return parser.call(this, value, key);
1723
+ }
1724
+
1725
+ if (utils.isRegExp(parser)) {
1726
+ return parser.exec(value);
1727
+ }
1728
+
1729
+ throw new TypeError('parser must be boolean|regexp|function');
1730
+ }
1731
+ }
1732
+ }
1733
+
1734
+ has(header, matcher) {
1735
+ header = normalizeHeader(header);
1736
+
1737
+ if (header) {
1738
+ const key = utils.findKey(this, header);
1739
+
1740
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
1741
+ }
1742
+
1743
+ return false;
1744
+ }
1745
+
1746
+ delete(header, matcher) {
1747
+ const self = this;
1748
+ let deleted = false;
1749
+
1750
+ function deleteHeader(_header) {
1751
+ _header = normalizeHeader(_header);
1752
+
1753
+ if (_header) {
1754
+ const key = utils.findKey(self, _header);
1755
+
1756
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
1757
+ delete self[key];
1758
+
1759
+ deleted = true;
1760
+ }
1761
+ }
1762
+ }
1763
+
1764
+ if (utils.isArray(header)) {
1765
+ header.forEach(deleteHeader);
1766
+ } else {
1767
+ deleteHeader(header);
1768
+ }
1769
+
1770
+ return deleted;
1771
+ }
1772
+
1773
+ clear(matcher) {
1774
+ const keys = Object.keys(this);
1775
+ let i = keys.length;
1776
+ let deleted = false;
1777
+
1778
+ while (i--) {
1779
+ const key = keys[i];
1780
+ if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1781
+ delete this[key];
1782
+ deleted = true;
1783
+ }
1784
+ }
1785
+
1786
+ return deleted;
1787
+ }
1788
+
1789
+ normalize(format) {
1790
+ const self = this;
1791
+ const headers = {};
1792
+
1793
+ utils.forEach(this, (value, header) => {
1794
+ const key = utils.findKey(headers, header);
1795
+
1796
+ if (key) {
1797
+ self[key] = normalizeValue(value);
1798
+ delete self[header];
1799
+ return;
1800
+ }
1801
+
1802
+ const normalized = format ? formatHeader(header) : String(header).trim();
1803
+
1804
+ if (normalized !== header) {
1805
+ delete self[header];
1806
+ }
1807
+
1808
+ self[normalized] = normalizeValue(value);
1809
+
1810
+ headers[normalized] = true;
1811
+ });
1812
+
1813
+ return this;
1814
+ }
1815
+
1816
+ concat(...targets) {
1817
+ return this.constructor.concat(this, ...targets);
1818
+ }
1819
+
1820
+ toJSON(asStrings) {
1821
+ const obj = Object.create(null);
1822
+
1823
+ utils.forEach(this, (value, header) => {
1824
+ value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
1825
+ });
1826
+
1827
+ return obj;
1828
+ }
1829
+
1830
+ [Symbol.iterator]() {
1831
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1832
+ }
1833
+
1834
+ toString() {
1835
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
1836
+ }
1837
+
1838
+ get [Symbol.toStringTag]() {
1839
+ return 'AxiosHeaders';
1840
+ }
1841
+
1842
+ static from(thing) {
1843
+ return thing instanceof this ? thing : new this(thing);
1844
+ }
1845
+
1846
+ static concat(first, ...targets) {
1847
+ const computed = new this(first);
1848
+
1849
+ targets.forEach((target) => computed.set(target));
1850
+
1851
+ return computed;
1852
+ }
1853
+
1854
+ static accessor(header) {
1855
+ const internals = this[$internals] = (this[$internals] = {
1856
+ accessors: {}
1857
+ });
1858
+
1859
+ const accessors = internals.accessors;
1860
+ const prototype = this.prototype;
1861
+
1862
+ function defineAccessor(_header) {
1863
+ const lHeader = normalizeHeader(_header);
1864
+
1865
+ if (!accessors[lHeader]) {
1866
+ buildAccessors(prototype, _header);
1867
+ accessors[lHeader] = true;
1868
+ }
1869
+ }
1870
+
1871
+ utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1872
+
1873
+ return this;
1874
+ }
1875
+ }
1876
+
1877
+ AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
1878
+
1879
+ utils.freezeMethods(AxiosHeaders.prototype);
1880
+ utils.freezeMethods(AxiosHeaders);
1881
+
1882
+ var AxiosHeaders$1 = AxiosHeaders;
1883
+
1884
+ /**
1885
+ * Transform the data for a request or a response
1886
+ *
1887
+ * @param {Array|Function} fns A single function or Array of functions
1888
+ * @param {?Object} response The response object
1889
+ *
1890
+ * @returns {*} The resulting transformed data
1891
+ */
1892
+ function transformData(fns, response) {
1893
+ const config = this || defaults$1;
1894
+ const context = response || config;
1895
+ const headers = AxiosHeaders$1.from(context.headers);
1896
+ let data = context.data;
1897
+
1898
+ utils.forEach(fns, function transform(fn) {
1899
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
1900
+ });
1901
+
1902
+ headers.normalize();
1903
+
1904
+ return data;
1905
+ }
1906
+
1907
+ function isCancel(value) {
1908
+ return !!(value && value.__CANCEL__);
1909
+ }
1910
+
1911
+ /**
1912
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
1913
+ *
1914
+ * @param {string=} message The message.
1915
+ * @param {Object=} config The config.
1916
+ * @param {Object=} request The request.
1917
+ *
1918
+ * @returns {CanceledError} The created error.
1919
+ */
1920
+ function CanceledError(message, config, request) {
1921
+ // eslint-disable-next-line no-eq-null,eqeqeq
1922
+ AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
1923
+ this.name = 'CanceledError';
1924
+ }
1925
+
1926
+ utils.inherits(CanceledError, AxiosError, {
1927
+ __CANCEL__: true
1928
+ });
1929
+
1930
+ /**
1931
+ * Resolve or reject a Promise based on response status.
1932
+ *
1933
+ * @param {Function} resolve A function that resolves the promise.
1934
+ * @param {Function} reject A function that rejects the promise.
1935
+ * @param {object} response The response.
1936
+ *
1937
+ * @returns {object} The response.
1938
+ */
1939
+ function settle(resolve, reject, response) {
1940
+ const validateStatus = response.config.validateStatus;
1941
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
1942
+ resolve(response);
1943
+ } else {
1944
+ reject(new AxiosError(
1945
+ 'Request failed with status code ' + response.status,
1946
+ [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
1947
+ response.config,
1948
+ response.request,
1949
+ response
1950
+ ));
1951
+ }
1952
+ }
1953
+
1954
+ var cookies = platform.isStandardBrowserEnv ?
1955
+
1956
+ // Standard browser envs support document.cookie
1957
+ (function standardBrowserEnv() {
1958
+ return {
1959
+ write: function write(name, value, expires, path, domain, secure) {
1960
+ const cookie = [];
1961
+ cookie.push(name + '=' + encodeURIComponent(value));
1962
+
1963
+ if (utils.isNumber(expires)) {
1964
+ cookie.push('expires=' + new Date(expires).toGMTString());
1965
+ }
1966
+
1967
+ if (utils.isString(path)) {
1968
+ cookie.push('path=' + path);
1969
+ }
1970
+
1971
+ if (utils.isString(domain)) {
1972
+ cookie.push('domain=' + domain);
1973
+ }
1974
+
1975
+ if (secure === true) {
1976
+ cookie.push('secure');
1977
+ }
1978
+
1979
+ document.cookie = cookie.join('; ');
1980
+ },
1981
+
1982
+ read: function read(name) {
1983
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
1984
+ return (match ? decodeURIComponent(match[3]) : null);
1985
+ },
1986
+
1987
+ remove: function remove(name) {
1988
+ this.write(name, '', Date.now() - 86400000);
1989
+ }
1990
+ };
1991
+ })() :
1992
+
1993
+ // Non standard browser env (web workers, react-native) lack needed support.
1994
+ (function nonStandardBrowserEnv() {
1995
+ return {
1996
+ write: function write() {},
1997
+ read: function read() { return null; },
1998
+ remove: function remove() {}
1999
+ };
2000
+ })();
2001
+
2002
+ /**
2003
+ * Determines whether the specified URL is absolute
2004
+ *
2005
+ * @param {string} url The URL to test
2006
+ *
2007
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
2008
+ */
2009
+ function isAbsoluteURL(url) {
2010
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
2011
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
2012
+ // by any combination of letters, digits, plus, period, or hyphen.
2013
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
2014
+ }
2015
+
2016
+ /**
2017
+ * Creates a new URL by combining the specified URLs
2018
+ *
2019
+ * @param {string} baseURL The base URL
2020
+ * @param {string} relativeURL The relative URL
2021
+ *
2022
+ * @returns {string} The combined URL
2023
+ */
2024
+ function combineURLs(baseURL, relativeURL) {
2025
+ return relativeURL
2026
+ ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
2027
+ : baseURL;
2028
+ }
2029
+
2030
+ /**
2031
+ * Creates a new URL by combining the baseURL with the requestedURL,
2032
+ * only when the requestedURL is not already an absolute URL.
2033
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
2034
+ *
2035
+ * @param {string} baseURL The base URL
2036
+ * @param {string} requestedURL Absolute or relative URL to combine
2037
+ *
2038
+ * @returns {string} The combined full path
2039
+ */
2040
+ function buildFullPath(baseURL, requestedURL) {
2041
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
2042
+ return combineURLs(baseURL, requestedURL);
2043
+ }
2044
+ return requestedURL;
2045
+ }
2046
+
2047
+ var isURLSameOrigin = platform.isStandardBrowserEnv ?
2048
+
2049
+ // Standard browser envs have full support of the APIs needed to test
2050
+ // whether the request URL is of the same origin as current location.
2051
+ (function standardBrowserEnv() {
2052
+ const msie = /(msie|trident)/i.test(navigator.userAgent);
2053
+ const urlParsingNode = document.createElement('a');
2054
+ let originURL;
2055
+
2056
+ /**
2057
+ * Parse a URL to discover it's components
2058
+ *
2059
+ * @param {String} url The URL to be parsed
2060
+ * @returns {Object}
2061
+ */
2062
+ function resolveURL(url) {
2063
+ let href = url;
2064
+
2065
+ if (msie) {
2066
+ // IE needs attribute set twice to normalize properties
2067
+ urlParsingNode.setAttribute('href', href);
2068
+ href = urlParsingNode.href;
2069
+ }
2070
+
2071
+ urlParsingNode.setAttribute('href', href);
2072
+
2073
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
2074
+ return {
2075
+ href: urlParsingNode.href,
2076
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
2077
+ host: urlParsingNode.host,
2078
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
2079
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
2080
+ hostname: urlParsingNode.hostname,
2081
+ port: urlParsingNode.port,
2082
+ pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
2083
+ urlParsingNode.pathname :
2084
+ '/' + urlParsingNode.pathname
2085
+ };
2086
+ }
2087
+
2088
+ originURL = resolveURL(window.location.href);
2089
+
2090
+ /**
2091
+ * Determine if a URL shares the same origin as the current location
2092
+ *
2093
+ * @param {String} requestURL The URL to test
2094
+ * @returns {boolean} True if URL shares the same origin, otherwise false
2095
+ */
2096
+ return function isURLSameOrigin(requestURL) {
2097
+ const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
2098
+ return (parsed.protocol === originURL.protocol &&
2099
+ parsed.host === originURL.host);
2100
+ };
2101
+ })() :
2102
+
2103
+ // Non standard browser envs (web workers, react-native) lack needed support.
2104
+ (function nonStandardBrowserEnv() {
2105
+ return function isURLSameOrigin() {
2106
+ return true;
2107
+ };
2108
+ })();
2109
+
2110
+ function parseProtocol(url) {
2111
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
2112
+ return match && match[1] || '';
2113
+ }
2114
+
2115
+ /**
2116
+ * Calculate data maxRate
2117
+ * @param {Number} [samplesCount= 10]
2118
+ * @param {Number} [min= 1000]
2119
+ * @returns {Function}
2120
+ */
2121
+ function speedometer(samplesCount, min) {
2122
+ samplesCount = samplesCount || 10;
2123
+ const bytes = new Array(samplesCount);
2124
+ const timestamps = new Array(samplesCount);
2125
+ let head = 0;
2126
+ let tail = 0;
2127
+ let firstSampleTS;
2128
+
2129
+ min = min !== undefined ? min : 1000;
2130
+
2131
+ return function push(chunkLength) {
2132
+ const now = Date.now();
2133
+
2134
+ const startedAt = timestamps[tail];
2135
+
2136
+ if (!firstSampleTS) {
2137
+ firstSampleTS = now;
2138
+ }
2139
+
2140
+ bytes[head] = chunkLength;
2141
+ timestamps[head] = now;
2142
+
2143
+ let i = tail;
2144
+ let bytesCount = 0;
2145
+
2146
+ while (i !== head) {
2147
+ bytesCount += bytes[i++];
2148
+ i = i % samplesCount;
2149
+ }
2150
+
2151
+ head = (head + 1) % samplesCount;
2152
+
2153
+ if (head === tail) {
2154
+ tail = (tail + 1) % samplesCount;
2155
+ }
2156
+
2157
+ if (now - firstSampleTS < min) {
2158
+ return;
2159
+ }
2160
+
2161
+ const passed = startedAt && now - startedAt;
2162
+
2163
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
2164
+ };
2165
+ }
2166
+
2167
+ function progressEventReducer(listener, isDownloadStream) {
2168
+ let bytesNotified = 0;
2169
+ const _speedometer = speedometer(50, 250);
2170
+
2171
+ return e => {
2172
+ const loaded = e.loaded;
2173
+ const total = e.lengthComputable ? e.total : undefined;
2174
+ const progressBytes = loaded - bytesNotified;
2175
+ const rate = _speedometer(progressBytes);
2176
+ const inRange = loaded <= total;
2177
+
2178
+ bytesNotified = loaded;
2179
+
2180
+ const data = {
2181
+ loaded,
2182
+ total,
2183
+ progress: total ? (loaded / total) : undefined,
2184
+ bytes: progressBytes,
2185
+ rate: rate ? rate : undefined,
2186
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2187
+ event: e
2188
+ };
2189
+
2190
+ data[isDownloadStream ? 'download' : 'upload'] = true;
2191
+
2192
+ listener(data);
2193
+ };
2194
+ }
2195
+
2196
+ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2197
+
2198
+ var xhrAdapter = isXHRAdapterSupported && function (config) {
2199
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
2200
+ let requestData = config.data;
2201
+ const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
2202
+ const responseType = config.responseType;
2203
+ let onCanceled;
2204
+ function done() {
2205
+ if (config.cancelToken) {
2206
+ config.cancelToken.unsubscribe(onCanceled);
2207
+ }
2208
+
2209
+ if (config.signal) {
2210
+ config.signal.removeEventListener('abort', onCanceled);
2211
+ }
2212
+ }
2213
+
2214
+ if (utils.isFormData(requestData)) {
2215
+ if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
2216
+ requestHeaders.setContentType(false); // Let the browser set it
2217
+ } else {
2218
+ requestHeaders.setContentType('multipart/form-data;', false); // mobile/desktop app frameworks
2219
+ }
2220
+ }
2221
+
2222
+ let request = new XMLHttpRequest();
2223
+
2224
+ // HTTP basic authentication
2225
+ if (config.auth) {
2226
+ const username = config.auth.username || '';
2227
+ const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
2228
+ requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
2229
+ }
2230
+
2231
+ const fullPath = buildFullPath(config.baseURL, config.url);
2232
+
2233
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
2234
+
2235
+ // Set the request timeout in MS
2236
+ request.timeout = config.timeout;
2237
+
2238
+ function onloadend() {
2239
+ if (!request) {
2240
+ return;
2241
+ }
2242
+ // Prepare the response
2243
+ const responseHeaders = AxiosHeaders$1.from(
2244
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
2245
+ );
2246
+ const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
2247
+ request.responseText : request.response;
2248
+ const response = {
2249
+ data: responseData,
2250
+ status: request.status,
2251
+ statusText: request.statusText,
2252
+ headers: responseHeaders,
2253
+ config,
2254
+ request
2255
+ };
2256
+
2257
+ settle(function _resolve(value) {
2258
+ resolve(value);
2259
+ done();
2260
+ }, function _reject(err) {
2261
+ reject(err);
2262
+ done();
2263
+ }, response);
2264
+
2265
+ // Clean up request
2266
+ request = null;
2267
+ }
2268
+
2269
+ if ('onloadend' in request) {
2270
+ // Use onloadend if available
2271
+ request.onloadend = onloadend;
2272
+ } else {
2273
+ // Listen for ready state to emulate onloadend
2274
+ request.onreadystatechange = function handleLoad() {
2275
+ if (!request || request.readyState !== 4) {
2276
+ return;
2277
+ }
2278
+
2279
+ // The request errored out and we didn't get a response, this will be
2280
+ // handled by onerror instead
2281
+ // With one exception: request that using file: protocol, most browsers
2282
+ // will return status as 0 even though it's a successful request
2283
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
2284
+ return;
2285
+ }
2286
+ // readystate handler is calling before onerror or ontimeout handlers,
2287
+ // so we should call onloadend on the next 'tick'
2288
+ setTimeout(onloadend);
2289
+ };
2290
+ }
2291
+
2292
+ // Handle browser request cancellation (as opposed to a manual cancellation)
2293
+ request.onabort = function handleAbort() {
2294
+ if (!request) {
2295
+ return;
2296
+ }
2297
+
2298
+ reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
2299
+
2300
+ // Clean up request
2301
+ request = null;
2302
+ };
2303
+
2304
+ // Handle low level network errors
2305
+ request.onerror = function handleError() {
2306
+ // Real errors are hidden from us by the browser
2307
+ // onerror should only fire if it's a network error
2308
+ reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
2309
+
2310
+ // Clean up request
2311
+ request = null;
2312
+ };
2313
+
2314
+ // Handle timeout
2315
+ request.ontimeout = function handleTimeout() {
2316
+ let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
2317
+ const transitional = config.transitional || transitionalDefaults;
2318
+ if (config.timeoutErrorMessage) {
2319
+ timeoutErrorMessage = config.timeoutErrorMessage;
2320
+ }
2321
+ reject(new AxiosError(
2322
+ timeoutErrorMessage,
2323
+ transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
2324
+ config,
2325
+ request));
2326
+
2327
+ // Clean up request
2328
+ request = null;
2329
+ };
2330
+
2331
+ // Add xsrf header
2332
+ // This is only done if running in a standard browser environment.
2333
+ // Specifically not if we're in a web worker, or react-native.
2334
+ if (platform.isStandardBrowserEnv) {
2335
+ // Add xsrf header
2336
+ const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
2337
+ && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
2338
+
2339
+ if (xsrfValue) {
2340
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
2341
+ }
2342
+ }
2343
+
2344
+ // Remove Content-Type if data is undefined
2345
+ requestData === undefined && requestHeaders.setContentType(null);
2346
+
2347
+ // Add headers to the request
2348
+ if ('setRequestHeader' in request) {
2349
+ utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
2350
+ request.setRequestHeader(key, val);
2351
+ });
2352
+ }
2353
+
2354
+ // Add withCredentials to request if needed
2355
+ if (!utils.isUndefined(config.withCredentials)) {
2356
+ request.withCredentials = !!config.withCredentials;
2357
+ }
2358
+
2359
+ // Add responseType to request if needed
2360
+ if (responseType && responseType !== 'json') {
2361
+ request.responseType = config.responseType;
2362
+ }
2363
+
2364
+ // Handle progress if needed
2365
+ if (typeof config.onDownloadProgress === 'function') {
2366
+ request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
2367
+ }
2368
+
2369
+ // Not all browsers support upload events
2370
+ if (typeof config.onUploadProgress === 'function' && request.upload) {
2371
+ request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
2372
+ }
2373
+
2374
+ if (config.cancelToken || config.signal) {
2375
+ // Handle cancellation
2376
+ // eslint-disable-next-line func-names
2377
+ onCanceled = cancel => {
2378
+ if (!request) {
2379
+ return;
2380
+ }
2381
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
2382
+ request.abort();
2383
+ request = null;
2384
+ };
2385
+
2386
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
2387
+ if (config.signal) {
2388
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
2389
+ }
2390
+ }
2391
+
2392
+ const protocol = parseProtocol(fullPath);
2393
+
2394
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
2395
+ reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
2396
+ return;
2397
+ }
2398
+
2399
+
2400
+ // Send the request
2401
+ request.send(requestData || null);
2402
+ });
2403
+ };
2404
+
2405
+ const knownAdapters = {
2406
+ http: httpAdapter,
2407
+ xhr: xhrAdapter
2408
+ };
2409
+
2410
+ utils.forEach(knownAdapters, (fn, value) => {
2411
+ if(fn) {
2412
+ try {
2413
+ Object.defineProperty(fn, 'name', {value});
2414
+ } catch (e) {
2415
+ // eslint-disable-next-line no-empty
2416
+ }
2417
+ Object.defineProperty(fn, 'adapterName', {value});
2418
+ }
2419
+ });
2420
+
2421
+ var adapters = {
2422
+ getAdapter: (adapters) => {
2423
+ adapters = utils.isArray(adapters) ? adapters : [adapters];
2424
+
2425
+ const {length} = adapters;
2426
+ let nameOrAdapter;
2427
+ let adapter;
2428
+
2429
+ for (let i = 0; i < length; i++) {
2430
+ nameOrAdapter = adapters[i];
2431
+ if((adapter = utils.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter)) {
2432
+ break;
2433
+ }
2434
+ }
2435
+
2436
+ if (!adapter) {
2437
+ if (adapter === false) {
2438
+ throw new AxiosError(
2439
+ `Adapter ${nameOrAdapter} is not supported by the environment`,
2440
+ 'ERR_NOT_SUPPORT'
2441
+ );
2442
+ }
2443
+
2444
+ throw new Error(
2445
+ utils.hasOwnProp(knownAdapters, nameOrAdapter) ?
2446
+ `Adapter '${nameOrAdapter}' is not available in the build` :
2447
+ `Unknown adapter '${nameOrAdapter}'`
2448
+ );
2449
+ }
2450
+
2451
+ if (!utils.isFunction(adapter)) {
2452
+ throw new TypeError('adapter is not a function');
2453
+ }
2454
+
2455
+ return adapter;
2456
+ },
2457
+ adapters: knownAdapters
2458
+ };
2459
+
2460
+ /**
2461
+ * Throws a `CanceledError` if cancellation has been requested.
2462
+ *
2463
+ * @param {Object} config The config that is to be used for the request
2464
+ *
2465
+ * @returns {void}
2466
+ */
2467
+ function throwIfCancellationRequested(config) {
2468
+ if (config.cancelToken) {
2469
+ config.cancelToken.throwIfRequested();
2470
+ }
2471
+
2472
+ if (config.signal && config.signal.aborted) {
2473
+ throw new CanceledError(null, config);
2474
+ }
2475
+ }
2476
+
2477
+ /**
2478
+ * Dispatch a request to the server using the configured adapter.
2479
+ *
2480
+ * @param {object} config The config that is to be used for the request
2481
+ *
2482
+ * @returns {Promise} The Promise to be fulfilled
2483
+ */
2484
+ function dispatchRequest(config) {
2485
+ throwIfCancellationRequested(config);
2486
+
2487
+ config.headers = AxiosHeaders$1.from(config.headers);
2488
+
2489
+ // Transform request data
2490
+ config.data = transformData.call(
2491
+ config,
2492
+ config.transformRequest
2493
+ );
2494
+
2495
+ if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
2496
+ config.headers.setContentType('application/x-www-form-urlencoded', false);
2497
+ }
2498
+
2499
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
2500
+
2501
+ return adapter(config).then(function onAdapterResolution(response) {
2502
+ throwIfCancellationRequested(config);
2503
+
2504
+ // Transform response data
2505
+ response.data = transformData.call(
2506
+ config,
2507
+ config.transformResponse,
2508
+ response
2509
+ );
2510
+
2511
+ response.headers = AxiosHeaders$1.from(response.headers);
2512
+
2513
+ return response;
2514
+ }, function onAdapterRejection(reason) {
2515
+ if (!isCancel(reason)) {
2516
+ throwIfCancellationRequested(config);
2517
+
2518
+ // Transform response data
2519
+ if (reason && reason.response) {
2520
+ reason.response.data = transformData.call(
2521
+ config,
2522
+ config.transformResponse,
2523
+ reason.response
2524
+ );
2525
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
2526
+ }
2527
+ }
2528
+
2529
+ return Promise.reject(reason);
2530
+ });
2531
+ }
2532
+
2533
+ const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;
2534
+
2535
+ /**
2536
+ * Config-specific merge-function which creates a new config-object
2537
+ * by merging two configuration objects together.
2538
+ *
2539
+ * @param {Object} config1
2540
+ * @param {Object} config2
2541
+ *
2542
+ * @returns {Object} New object resulting from merging config2 to config1
2543
+ */
2544
+ function mergeConfig(config1, config2) {
2545
+ // eslint-disable-next-line no-param-reassign
2546
+ config2 = config2 || {};
2547
+ const config = {};
2548
+
2549
+ function getMergedValue(target, source, caseless) {
2550
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
2551
+ return utils.merge.call({caseless}, target, source);
2552
+ } else if (utils.isPlainObject(source)) {
2553
+ return utils.merge({}, source);
2554
+ } else if (utils.isArray(source)) {
2555
+ return source.slice();
2556
+ }
2557
+ return source;
2558
+ }
2559
+
2560
+ // eslint-disable-next-line consistent-return
2561
+ function mergeDeepProperties(a, b, caseless) {
2562
+ if (!utils.isUndefined(b)) {
2563
+ return getMergedValue(a, b, caseless);
2564
+ } else if (!utils.isUndefined(a)) {
2565
+ return getMergedValue(undefined, a, caseless);
2566
+ }
2567
+ }
2568
+
2569
+ // eslint-disable-next-line consistent-return
2570
+ function valueFromConfig2(a, b) {
2571
+ if (!utils.isUndefined(b)) {
2572
+ return getMergedValue(undefined, b);
2573
+ }
2574
+ }
2575
+
2576
+ // eslint-disable-next-line consistent-return
2577
+ function defaultToConfig2(a, b) {
2578
+ if (!utils.isUndefined(b)) {
2579
+ return getMergedValue(undefined, b);
2580
+ } else if (!utils.isUndefined(a)) {
2581
+ return getMergedValue(undefined, a);
2582
+ }
2583
+ }
2584
+
2585
+ // eslint-disable-next-line consistent-return
2586
+ function mergeDirectKeys(a, b, prop) {
2587
+ if (prop in config2) {
2588
+ return getMergedValue(a, b);
2589
+ } else if (prop in config1) {
2590
+ return getMergedValue(undefined, a);
2591
+ }
2592
+ }
2593
+
2594
+ const mergeMap = {
2595
+ url: valueFromConfig2,
2596
+ method: valueFromConfig2,
2597
+ data: valueFromConfig2,
2598
+ baseURL: defaultToConfig2,
2599
+ transformRequest: defaultToConfig2,
2600
+ transformResponse: defaultToConfig2,
2601
+ paramsSerializer: defaultToConfig2,
2602
+ timeout: defaultToConfig2,
2603
+ timeoutMessage: defaultToConfig2,
2604
+ withCredentials: defaultToConfig2,
2605
+ adapter: defaultToConfig2,
2606
+ responseType: defaultToConfig2,
2607
+ xsrfCookieName: defaultToConfig2,
2608
+ xsrfHeaderName: defaultToConfig2,
2609
+ onUploadProgress: defaultToConfig2,
2610
+ onDownloadProgress: defaultToConfig2,
2611
+ decompress: defaultToConfig2,
2612
+ maxContentLength: defaultToConfig2,
2613
+ maxBodyLength: defaultToConfig2,
2614
+ beforeRedirect: defaultToConfig2,
2615
+ transport: defaultToConfig2,
2616
+ httpAgent: defaultToConfig2,
2617
+ httpsAgent: defaultToConfig2,
2618
+ cancelToken: defaultToConfig2,
2619
+ socketPath: defaultToConfig2,
2620
+ responseEncoding: defaultToConfig2,
2621
+ validateStatus: mergeDirectKeys,
2622
+ headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
2623
+ };
2624
+
2625
+ utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
2626
+ const merge = mergeMap[prop] || mergeDeepProperties;
2627
+ const configValue = merge(config1[prop], config2[prop], prop);
2628
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
2629
+ });
2630
+
2631
+ return config;
2632
+ }
2633
+
2634
+ const VERSION = "1.4.0";
2635
+
2636
+ const validators$1 = {};
2637
+
2638
+ // eslint-disable-next-line func-names
2639
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
2640
+ validators$1[type] = function validator(thing) {
2641
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
2642
+ };
2643
+ });
2644
+
2645
+ const deprecatedWarnings = {};
2646
+
2647
+ /**
2648
+ * Transitional option validator
2649
+ *
2650
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
2651
+ * @param {string?} version - deprecated version / removed since version
2652
+ * @param {string?} message - some message with additional info
2653
+ *
2654
+ * @returns {function}
2655
+ */
2656
+ validators$1.transitional = function transitional(validator, version, message) {
2657
+ function formatMessage(opt, desc) {
2658
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
2659
+ }
2660
+
2661
+ // eslint-disable-next-line func-names
2662
+ return (value, opt, opts) => {
2663
+ if (validator === false) {
2664
+ throw new AxiosError(
2665
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
2666
+ AxiosError.ERR_DEPRECATED
2667
+ );
2668
+ }
2669
+
2670
+ if (version && !deprecatedWarnings[opt]) {
2671
+ deprecatedWarnings[opt] = true;
2672
+ // eslint-disable-next-line no-console
2673
+ console.warn(
2674
+ formatMessage(
2675
+ opt,
2676
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
2677
+ )
2678
+ );
2679
+ }
2680
+
2681
+ return validator ? validator(value, opt, opts) : true;
2682
+ };
2683
+ };
2684
+
2685
+ /**
2686
+ * Assert object's properties type
2687
+ *
2688
+ * @param {object} options
2689
+ * @param {object} schema
2690
+ * @param {boolean?} allowUnknown
2691
+ *
2692
+ * @returns {object}
2693
+ */
2694
+
2695
+ function assertOptions(options, schema, allowUnknown) {
2696
+ if (typeof options !== 'object') {
2697
+ throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
2698
+ }
2699
+ const keys = Object.keys(options);
2700
+ let i = keys.length;
2701
+ while (i-- > 0) {
2702
+ const opt = keys[i];
2703
+ const validator = schema[opt];
2704
+ if (validator) {
2705
+ const value = options[opt];
2706
+ const result = value === undefined || validator(value, opt, options);
2707
+ if (result !== true) {
2708
+ throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
2709
+ }
2710
+ continue;
2711
+ }
2712
+ if (allowUnknown !== true) {
2713
+ throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
2714
+ }
2715
+ }
2716
+ }
2717
+
2718
+ var validator = {
2719
+ assertOptions,
2720
+ validators: validators$1
2721
+ };
2722
+
2723
+ const validators = validator.validators;
2724
+
2725
+ /**
2726
+ * Create a new instance of Axios
2727
+ *
2728
+ * @param {Object} instanceConfig The default config for the instance
2729
+ *
2730
+ * @return {Axios} A new instance of Axios
2731
+ */
2732
+ class Axios {
2733
+ constructor(instanceConfig) {
2734
+ this.defaults = instanceConfig;
2735
+ this.interceptors = {
2736
+ request: new InterceptorManager$1(),
2737
+ response: new InterceptorManager$1()
2738
+ };
2739
+ }
2740
+
2741
+ /**
2742
+ * Dispatch a request
2743
+ *
2744
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
2745
+ * @param {?Object} config
2746
+ *
2747
+ * @returns {Promise} The Promise to be fulfilled
2748
+ */
2749
+ request(configOrUrl, config) {
2750
+ /*eslint no-param-reassign:0*/
2751
+ // Allow for axios('example/url'[, config]) a la fetch API
2752
+ if (typeof configOrUrl === 'string') {
2753
+ config = config || {};
2754
+ config.url = configOrUrl;
2755
+ } else {
2756
+ config = configOrUrl || {};
2757
+ }
2758
+
2759
+ config = mergeConfig(this.defaults, config);
2760
+
2761
+ const {transitional, paramsSerializer, headers} = config;
2762
+
2763
+ if (transitional !== undefined) {
2764
+ validator.assertOptions(transitional, {
2765
+ silentJSONParsing: validators.transitional(validators.boolean),
2766
+ forcedJSONParsing: validators.transitional(validators.boolean),
2767
+ clarifyTimeoutError: validators.transitional(validators.boolean)
2768
+ }, false);
2769
+ }
2770
+
2771
+ if (paramsSerializer != null) {
2772
+ if (utils.isFunction(paramsSerializer)) {
2773
+ config.paramsSerializer = {
2774
+ serialize: paramsSerializer
2775
+ };
2776
+ } else {
2777
+ validator.assertOptions(paramsSerializer, {
2778
+ encode: validators.function,
2779
+ serialize: validators.function
2780
+ }, true);
2781
+ }
2782
+ }
2783
+
2784
+ // Set config.method
2785
+ config.method = (config.method || this.defaults.method || 'get').toLowerCase();
2786
+
2787
+ let contextHeaders;
2788
+
2789
+ // Flatten headers
2790
+ contextHeaders = headers && utils.merge(
2791
+ headers.common,
2792
+ headers[config.method]
2793
+ );
2794
+
2795
+ contextHeaders && utils.forEach(
2796
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
2797
+ (method) => {
2798
+ delete headers[method];
2799
+ }
2800
+ );
2801
+
2802
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
2803
+
2804
+ // filter out skipped interceptors
2805
+ const requestInterceptorChain = [];
2806
+ let synchronousRequestInterceptors = true;
2807
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
2808
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
2809
+ return;
2810
+ }
2811
+
2812
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
2813
+
2814
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
2815
+ });
2816
+
2817
+ const responseInterceptorChain = [];
2818
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
2819
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
2820
+ });
2821
+
2822
+ let promise;
2823
+ let i = 0;
2824
+ let len;
2825
+
2826
+ if (!synchronousRequestInterceptors) {
2827
+ const chain = [dispatchRequest.bind(this), undefined];
2828
+ chain.unshift.apply(chain, requestInterceptorChain);
2829
+ chain.push.apply(chain, responseInterceptorChain);
2830
+ len = chain.length;
2831
+
2832
+ promise = Promise.resolve(config);
2833
+
2834
+ while (i < len) {
2835
+ promise = promise.then(chain[i++], chain[i++]);
2836
+ }
2837
+
2838
+ return promise;
2839
+ }
2840
+
2841
+ len = requestInterceptorChain.length;
2842
+
2843
+ let newConfig = config;
2844
+
2845
+ i = 0;
2846
+
2847
+ while (i < len) {
2848
+ const onFulfilled = requestInterceptorChain[i++];
2849
+ const onRejected = requestInterceptorChain[i++];
2850
+ try {
2851
+ newConfig = onFulfilled(newConfig);
2852
+ } catch (error) {
2853
+ onRejected.call(this, error);
2854
+ break;
2855
+ }
2856
+ }
2857
+
2858
+ try {
2859
+ promise = dispatchRequest.call(this, newConfig);
2860
+ } catch (error) {
2861
+ return Promise.reject(error);
2862
+ }
2863
+
2864
+ i = 0;
2865
+ len = responseInterceptorChain.length;
2866
+
2867
+ while (i < len) {
2868
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
2869
+ }
2870
+
2871
+ return promise;
2872
+ }
2873
+
2874
+ getUri(config) {
2875
+ config = mergeConfig(this.defaults, config);
2876
+ const fullPath = buildFullPath(config.baseURL, config.url);
2877
+ return buildURL(fullPath, config.params, config.paramsSerializer);
2878
+ }
2879
+ }
2880
+
2881
+ // Provide aliases for supported request methods
2882
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
2883
+ /*eslint func-names:0*/
2884
+ Axios.prototype[method] = function(url, config) {
2885
+ return this.request(mergeConfig(config || {}, {
2886
+ method,
2887
+ url,
2888
+ data: (config || {}).data
2889
+ }));
2890
+ };
2891
+ });
2892
+
2893
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
2894
+ /*eslint func-names:0*/
2895
+
2896
+ function generateHTTPMethod(isForm) {
2897
+ return function httpMethod(url, data, config) {
2898
+ return this.request(mergeConfig(config || {}, {
2899
+ method,
2900
+ headers: isForm ? {
2901
+ 'Content-Type': 'multipart/form-data'
2902
+ } : {},
2903
+ url,
2904
+ data
2905
+ }));
2906
+ };
2907
+ }
2908
+
2909
+ Axios.prototype[method] = generateHTTPMethod();
2910
+
2911
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
2912
+ });
2913
+
2914
+ var Axios$1 = Axios;
2915
+
2916
+ /**
2917
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
2918
+ *
2919
+ * @param {Function} executor The executor function.
2920
+ *
2921
+ * @returns {CancelToken}
2922
+ */
2923
+ class CancelToken {
2924
+ constructor(executor) {
2925
+ if (typeof executor !== 'function') {
2926
+ throw new TypeError('executor must be a function.');
2927
+ }
2928
+
2929
+ let resolvePromise;
2930
+
2931
+ this.promise = new Promise(function promiseExecutor(resolve) {
2932
+ resolvePromise = resolve;
2933
+ });
2934
+
2935
+ const token = this;
2936
+
2937
+ // eslint-disable-next-line func-names
2938
+ this.promise.then(cancel => {
2939
+ if (!token._listeners) return;
2940
+
2941
+ let i = token._listeners.length;
2942
+
2943
+ while (i-- > 0) {
2944
+ token._listeners[i](cancel);
2945
+ }
2946
+ token._listeners = null;
2947
+ });
2948
+
2949
+ // eslint-disable-next-line func-names
2950
+ this.promise.then = onfulfilled => {
2951
+ let _resolve;
2952
+ // eslint-disable-next-line func-names
2953
+ const promise = new Promise(resolve => {
2954
+ token.subscribe(resolve);
2955
+ _resolve = resolve;
2956
+ }).then(onfulfilled);
2957
+
2958
+ promise.cancel = function reject() {
2959
+ token.unsubscribe(_resolve);
2960
+ };
2961
+
2962
+ return promise;
2963
+ };
2964
+
2965
+ executor(function cancel(message, config, request) {
2966
+ if (token.reason) {
2967
+ // Cancellation has already been requested
2968
+ return;
2969
+ }
2970
+
2971
+ token.reason = new CanceledError(message, config, request);
2972
+ resolvePromise(token.reason);
2973
+ });
2974
+ }
2975
+
2976
+ /**
2977
+ * Throws a `CanceledError` if cancellation has been requested.
2978
+ */
2979
+ throwIfRequested() {
2980
+ if (this.reason) {
2981
+ throw this.reason;
2982
+ }
2983
+ }
2984
+
2985
+ /**
2986
+ * Subscribe to the cancel signal
2987
+ */
2988
+
2989
+ subscribe(listener) {
2990
+ if (this.reason) {
2991
+ listener(this.reason);
2992
+ return;
2993
+ }
2994
+
2995
+ if (this._listeners) {
2996
+ this._listeners.push(listener);
2997
+ } else {
2998
+ this._listeners = [listener];
2999
+ }
3000
+ }
3001
+
3002
+ /**
3003
+ * Unsubscribe from the cancel signal
3004
+ */
3005
+
3006
+ unsubscribe(listener) {
3007
+ if (!this._listeners) {
3008
+ return;
3009
+ }
3010
+ const index = this._listeners.indexOf(listener);
3011
+ if (index !== -1) {
3012
+ this._listeners.splice(index, 1);
3013
+ }
3014
+ }
3015
+
3016
+ /**
3017
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
3018
+ * cancels the `CancelToken`.
3019
+ */
3020
+ static source() {
3021
+ let cancel;
3022
+ const token = new CancelToken(function executor(c) {
3023
+ cancel = c;
3024
+ });
3025
+ return {
3026
+ token,
3027
+ cancel
3028
+ };
3029
+ }
3030
+ }
3031
+
3032
+ var CancelToken$1 = CancelToken;
3033
+
3034
+ /**
3035
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
3036
+ *
3037
+ * Common use case would be to use `Function.prototype.apply`.
3038
+ *
3039
+ * ```js
3040
+ * function f(x, y, z) {}
3041
+ * var args = [1, 2, 3];
3042
+ * f.apply(null, args);
3043
+ * ```
3044
+ *
3045
+ * With `spread` this example can be re-written.
3046
+ *
3047
+ * ```js
3048
+ * spread(function(x, y, z) {})([1, 2, 3]);
3049
+ * ```
3050
+ *
3051
+ * @param {Function} callback
3052
+ *
3053
+ * @returns {Function}
3054
+ */
3055
+ function spread(callback) {
3056
+ return function wrap(arr) {
3057
+ return callback.apply(null, arr);
3058
+ };
3059
+ }
3060
+
3061
+ /**
3062
+ * Determines whether the payload is an error thrown by Axios
3063
+ *
3064
+ * @param {*} payload The value to test
3065
+ *
3066
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
3067
+ */
3068
+ function isAxiosError(payload) {
3069
+ return utils.isObject(payload) && (payload.isAxiosError === true);
3070
+ }
3071
+
3072
+ const HttpStatusCode = {
3073
+ Continue: 100,
3074
+ SwitchingProtocols: 101,
3075
+ Processing: 102,
3076
+ EarlyHints: 103,
3077
+ Ok: 200,
3078
+ Created: 201,
3079
+ Accepted: 202,
3080
+ NonAuthoritativeInformation: 203,
3081
+ NoContent: 204,
3082
+ ResetContent: 205,
3083
+ PartialContent: 206,
3084
+ MultiStatus: 207,
3085
+ AlreadyReported: 208,
3086
+ ImUsed: 226,
3087
+ MultipleChoices: 300,
3088
+ MovedPermanently: 301,
3089
+ Found: 302,
3090
+ SeeOther: 303,
3091
+ NotModified: 304,
3092
+ UseProxy: 305,
3093
+ Unused: 306,
3094
+ TemporaryRedirect: 307,
3095
+ PermanentRedirect: 308,
3096
+ BadRequest: 400,
3097
+ Unauthorized: 401,
3098
+ PaymentRequired: 402,
3099
+ Forbidden: 403,
3100
+ NotFound: 404,
3101
+ MethodNotAllowed: 405,
3102
+ NotAcceptable: 406,
3103
+ ProxyAuthenticationRequired: 407,
3104
+ RequestTimeout: 408,
3105
+ Conflict: 409,
3106
+ Gone: 410,
3107
+ LengthRequired: 411,
3108
+ PreconditionFailed: 412,
3109
+ PayloadTooLarge: 413,
3110
+ UriTooLong: 414,
3111
+ UnsupportedMediaType: 415,
3112
+ RangeNotSatisfiable: 416,
3113
+ ExpectationFailed: 417,
3114
+ ImATeapot: 418,
3115
+ MisdirectedRequest: 421,
3116
+ UnprocessableEntity: 422,
3117
+ Locked: 423,
3118
+ FailedDependency: 424,
3119
+ TooEarly: 425,
3120
+ UpgradeRequired: 426,
3121
+ PreconditionRequired: 428,
3122
+ TooManyRequests: 429,
3123
+ RequestHeaderFieldsTooLarge: 431,
3124
+ UnavailableForLegalReasons: 451,
3125
+ InternalServerError: 500,
3126
+ NotImplemented: 501,
3127
+ BadGateway: 502,
3128
+ ServiceUnavailable: 503,
3129
+ GatewayTimeout: 504,
3130
+ HttpVersionNotSupported: 505,
3131
+ VariantAlsoNegotiates: 506,
3132
+ InsufficientStorage: 507,
3133
+ LoopDetected: 508,
3134
+ NotExtended: 510,
3135
+ NetworkAuthenticationRequired: 511,
3136
+ };
3137
+
3138
+ Object.entries(HttpStatusCode).forEach(([key, value]) => {
3139
+ HttpStatusCode[value] = key;
3140
+ });
3141
+
3142
+ var HttpStatusCode$1 = HttpStatusCode;
3143
+
3144
+ /**
3145
+ * Create an instance of Axios
3146
+ *
3147
+ * @param {Object} defaultConfig The default config for the instance
3148
+ *
3149
+ * @returns {Axios} A new instance of Axios
3150
+ */
3151
+ function createInstance(defaultConfig) {
3152
+ const context = new Axios$1(defaultConfig);
3153
+ const instance = bind(Axios$1.prototype.request, context);
3154
+
3155
+ // Copy axios.prototype to instance
3156
+ utils.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
3157
+
3158
+ // Copy context to instance
3159
+ utils.extend(instance, context, null, {allOwnKeys: true});
3160
+
3161
+ // Factory for creating new instances
3162
+ instance.create = function create(instanceConfig) {
3163
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
3164
+ };
3165
+
3166
+ return instance;
3167
+ }
3168
+
3169
+ // Create the default instance to be exported
3170
+ const axios = createInstance(defaults$1);
3171
+
3172
+ // Expose Axios class to allow class inheritance
3173
+ axios.Axios = Axios$1;
3174
+
3175
+ // Expose Cancel & CancelToken
3176
+ axios.CanceledError = CanceledError;
3177
+ axios.CancelToken = CancelToken$1;
3178
+ axios.isCancel = isCancel;
3179
+ axios.VERSION = VERSION;
3180
+ axios.toFormData = toFormData;
3181
+
3182
+ // Expose AxiosError class
3183
+ axios.AxiosError = AxiosError;
3184
+
3185
+ // alias for CanceledError for backward compatibility
3186
+ axios.Cancel = axios.CanceledError;
3187
+
3188
+ // Expose all/spread
3189
+ axios.all = function all(promises) {
3190
+ return Promise.all(promises);
3191
+ };
3192
+
3193
+ axios.spread = spread;
3194
+
3195
+ // Expose isAxiosError
3196
+ axios.isAxiosError = isAxiosError;
3197
+
3198
+ // Expose mergeConfig
3199
+ axios.mergeConfig = mergeConfig;
3200
+
3201
+ axios.AxiosHeaders = AxiosHeaders$1;
3202
+
3203
+ axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
3204
+
3205
+ axios.HttpStatusCode = HttpStatusCode$1;
3206
+
3207
+ axios.default = axios;
3208
+
3209
+ module.exports = axios;
3210
+ //# sourceMappingURL=axios.cjs.map