@verdocs/web-sdk 2.2.46 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/dist/cjs/{TemplateStore-d9936a68.js → TemplateStore-6110ad1f.js} +1 -1
  2. package/dist/cjs/{Types-ee5afdf8.js → Types-fb95ed6b.js} +2 -1
  3. package/dist/cjs/{VerdocsEndpoint-2d85658d.js → VerdocsEndpoint-6441c5c0.js} +286 -425
  4. package/dist/cjs/{_commonjsHelpers-0c557e26.js → _commonjsHelpers-1fbbf0eb.js} +0 -5
  5. package/dist/cjs/interact.min-7c05ff8a.js +12 -0
  6. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  7. package/dist/cjs/{utils-2ddfdf9e.js → utils-a3f0b70a.js} +2 -2
  8. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  9. package/dist/cjs/verdocs-auth.cjs.entry.js +5 -8
  10. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  11. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +3 -3
  12. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +4 -4
  13. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +4 -4
  14. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +2 -2
  16. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +4 -4
  17. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +3 -3
  18. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -3
  19. package/dist/cjs/verdocs-field-date.cjs.entry.js +4 -4
  20. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -3
  21. package/dist/cjs/verdocs-field-initial.cjs.entry.js +5 -5
  22. package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -3
  23. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -3
  24. package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -3
  25. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +7 -7
  26. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +7 -7
  27. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +4 -4
  28. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  29. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +3 -3
  30. package/dist/cjs/verdocs-preview_8.cjs.entry.js +5 -5
  31. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
  32. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  33. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +44 -33
  34. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  35. package/dist/cjs/verdocs-sign.cjs.entry.js +4 -4
  36. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +4 -4
  37. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +11 -11
  38. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  39. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  40. package/dist/cjs/verdocs-view.cjs.entry.js +4 -4
  41. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +4 -7
  42. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.css +1 -0
  43. package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +2 -2
  44. package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.css +1 -0
  45. package/dist/collection/utils/Types.js +2 -1
  46. package/dist/components/Types2.js +2 -1
  47. package/dist/components/VerdocsEndpoint.js +286 -425
  48. package/dist/components/_commonjsHelpers.js +1 -5
  49. package/dist/components/index3.js +40 -29
  50. package/dist/components/interact.min.js +5 -6
  51. package/dist/components/verdocs-auth.js +4 -7
  52. package/dist/components/verdocs-field-date.js +1 -1
  53. package/dist/components/verdocs-field-initial.js +2 -2
  54. package/dist/components/verdocs-field-textarea.js +3 -3
  55. package/dist/components/verdocs-field-textbox.js +3 -3
  56. package/dist/components/verdocs-field-timestamp.js +1 -1
  57. package/dist/components/verdocs-template-fields2.js +3 -3
  58. package/dist/components/verdocs-template-roles2.js +4 -4
  59. package/dist/custom-elements.json +2059 -0
  60. package/dist/docs.json +1 -1
  61. package/dist/esm/{TemplateStore-018fc1db.js → TemplateStore-03608883.js} +1 -1
  62. package/dist/esm/Types-1628dc71.js +5 -0
  63. package/dist/esm/{VerdocsEndpoint-b011af25.js → VerdocsEndpoint-6f42e6a8.js} +286 -425
  64. package/dist/esm/{_commonjsHelpers-5ec8f9b7.js → _commonjsHelpers-8a9f3b18.js} +1 -5
  65. package/dist/esm/interact.min-ef5402f3.js +10 -0
  66. package/dist/esm/ipc-test.entry.js +2 -2
  67. package/dist/esm/{utils-d269cea3.js → utils-e0ce2c22.js} +2 -2
  68. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  69. package/dist/esm/verdocs-auth.entry.js +5 -8
  70. package/dist/esm/verdocs-build.entry.js +2 -2
  71. package/dist/esm/verdocs-button-panel_2.entry.js +3 -3
  72. package/dist/esm/verdocs-contact-picker_2.entry.js +4 -4
  73. package/dist/esm/verdocs-envelope-document-page.entry.js +4 -4
  74. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  75. package/dist/esm/verdocs-envelope-sidebar.entry.js +2 -2
  76. package/dist/esm/verdocs-envelopes-list.entry.js +4 -4
  77. package/dist/esm/verdocs-field-attachment.entry.js +3 -3
  78. package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
  79. package/dist/esm/verdocs-field-date.entry.js +4 -4
  80. package/dist/esm/verdocs-field-dropdown.entry.js +3 -3
  81. package/dist/esm/verdocs-field-initial.entry.js +5 -5
  82. package/dist/esm/verdocs-field-payment.entry.js +3 -3
  83. package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
  84. package/dist/esm/verdocs-field-signature.entry.js +3 -3
  85. package/dist/esm/verdocs-field-textarea.entry.js +7 -7
  86. package/dist/esm/verdocs-field-textbox.entry.js +7 -7
  87. package/dist/esm/verdocs-field-timestamp.entry.js +4 -4
  88. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  89. package/dist/esm/verdocs-pagination_2.entry.js +3 -3
  90. package/dist/esm/verdocs-preview_8.entry.js +5 -5
  91. package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
  92. package/dist/esm/verdocs-search.entry.js +1 -1
  93. package/dist/esm/verdocs-settings-api-keys_4.entry.js +44 -33
  94. package/dist/esm/verdocs-settings.entry.js +1 -1
  95. package/dist/esm/verdocs-sign.entry.js +4 -4
  96. package/dist/esm/verdocs-template-document-page_2.entry.js +4 -4
  97. package/dist/esm/verdocs-template-fields_4.entry.js +11 -11
  98. package/dist/esm/verdocs-template-star.entry.js +1 -1
  99. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  100. package/dist/esm/verdocs-view.entry.js +4 -4
  101. package/dist/esm-es5/{TemplateStore-018fc1db.js → TemplateStore-03608883.js} +1 -1
  102. package/dist/esm-es5/Types-1628dc71.js +1 -0
  103. package/dist/esm-es5/VerdocsEndpoint-6f42e6a8.js +1 -0
  104. package/dist/esm-es5/_commonjsHelpers-8a9f3b18.js +1 -0
  105. package/dist/esm-es5/interact.min-ef5402f3.js +1 -0
  106. package/dist/esm-es5/ipc-test.entry.js +1 -1
  107. package/dist/esm-es5/{utils-d269cea3.js → utils-e0ce2c22.js} +1 -1
  108. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  109. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  110. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  111. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  112. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  113. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  114. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  115. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  116. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  117. package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
  118. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  119. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  120. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  121. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  122. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  123. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  124. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  125. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  126. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  127. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  128. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  129. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  130. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  131. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
  132. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  133. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  134. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  135. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  136. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  137. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  138. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  139. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  140. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  141. package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +1 -1
  142. package/dist/types/utils/Types.d.ts +1 -1
  143. package/dist/types/utils/utils.d.ts +1 -1
  144. package/dist/verdocs-web-sdk/{p-35769d0c.system.entry.js → p-026eb575.system.entry.js} +1 -1
  145. package/dist/verdocs-web-sdk/{p-89aa696c.system.entry.js → p-0494ee4f.system.entry.js} +1 -1
  146. package/dist/verdocs-web-sdk/{p-eb595245.system.js → p-0ffb2c57.system.js} +1 -1
  147. package/dist/verdocs-web-sdk/{p-7805f0e0.entry.js → p-112cd2f5.entry.js} +1 -1
  148. package/dist/verdocs-web-sdk/{p-af3e9624.entry.js → p-120f75b1.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-aa51514f.system.entry.js → p-16849f44.system.entry.js} +1 -1
  150. package/dist/verdocs-web-sdk/{p-76907130.entry.js → p-1831cb38.entry.js} +1 -1
  151. package/dist/verdocs-web-sdk/{p-343672f5.system.entry.js → p-1983855b.system.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-126ba5d2.system.entry.js → p-19f8d4eb.system.entry.js} +1 -1
  153. package/dist/verdocs-web-sdk/p-1ba9f457.system.js +1 -0
  154. package/dist/verdocs-web-sdk/{p-77abc3ce.entry.js → p-1eb38c2e.entry.js} +1 -1
  155. package/dist/verdocs-web-sdk/p-208fd2e2.js +1 -0
  156. package/dist/verdocs-web-sdk/{p-10af7aec.system.entry.js → p-262d513f.system.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/{p-409e992a.entry.js → p-2979d6eb.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-0df58c57.entry.js → p-2ec8a9be.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/p-32b26f8f.system.entry.js +1 -0
  160. package/dist/verdocs-web-sdk/{p-b73415c3.system.entry.js → p-393a9a2a.system.entry.js} +1 -1
  161. package/dist/verdocs-web-sdk/p-3a7fa389.js +1 -0
  162. package/dist/verdocs-web-sdk/{p-23be436b.entry.js → p-3b96b2c9.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/{p-5c50a778.system.entry.js → p-3eb191fd.system.entry.js} +1 -1
  164. package/dist/verdocs-web-sdk/{p-0e5449d1.system.entry.js → p-43d14a05.system.entry.js} +1 -1
  165. package/dist/verdocs-web-sdk/p-4f08ceaf.system.js +1 -0
  166. package/dist/verdocs-web-sdk/{p-3abfff14.entry.js → p-5b70ff97.entry.js} +1 -1
  167. package/dist/verdocs-web-sdk/{p-79dc4f76.entry.js → p-5c38d5cc.entry.js} +1 -1
  168. package/dist/verdocs-web-sdk/{p-6307e6ae.entry.js → p-5dfefab6.entry.js} +1 -1
  169. package/dist/verdocs-web-sdk/{p-e3a9d167.system.entry.js → p-5f736f85.system.entry.js} +1 -1
  170. package/dist/verdocs-web-sdk/{p-04d7d759.system.entry.js → p-6653aa42.system.entry.js} +1 -1
  171. package/dist/verdocs-web-sdk/{p-0f94d635.entry.js → p-686139a0.entry.js} +1 -1
  172. package/dist/verdocs-web-sdk/{p-a310f65b.entry.js → p-75541556.entry.js} +1 -1
  173. package/dist/verdocs-web-sdk/{p-3a702f79.entry.js → p-7b3fed68.entry.js} +1 -1
  174. package/dist/verdocs-web-sdk/{p-a0b02d83.system.entry.js → p-7c3a05f6.system.entry.js} +1 -1
  175. package/dist/verdocs-web-sdk/p-7cbd2c3a.system.entry.js +1 -0
  176. package/dist/verdocs-web-sdk/p-7d5dbd9a.js +1 -0
  177. package/dist/verdocs-web-sdk/{p-2f04fb38.system.entry.js → p-7d6f7f4b.system.entry.js} +1 -1
  178. package/dist/verdocs-web-sdk/p-80540240.entry.js +1 -0
  179. package/dist/verdocs-web-sdk/{p-17d0e5f4.entry.js → p-82b74dc0.entry.js} +1 -1
  180. package/dist/verdocs-web-sdk/{p-ace35be6.entry.js → p-83225bcb.entry.js} +1 -1
  181. package/dist/verdocs-web-sdk/p-839f6f0d.js +1 -0
  182. package/dist/verdocs-web-sdk/p-8439bf7b.entry.js +1 -0
  183. package/dist/verdocs-web-sdk/{p-df6a373e.system.entry.js → p-87008226.system.entry.js} +1 -1
  184. package/dist/verdocs-web-sdk/{p-f1257cd0.system.entry.js → p-8a80d243.system.entry.js} +1 -1
  185. package/dist/verdocs-web-sdk/{p-609c7fab.system.entry.js → p-8b1b3ffd.system.entry.js} +1 -1
  186. package/dist/verdocs-web-sdk/{p-14aefeb2.system.entry.js → p-8e0d6152.system.entry.js} +1 -1
  187. package/dist/verdocs-web-sdk/{p-1406ffd2.entry.js → p-8f8504e2.entry.js} +1 -1
  188. package/dist/verdocs-web-sdk/{p-01166179.system.entry.js → p-947d60dc.system.entry.js} +1 -1
  189. package/dist/verdocs-web-sdk/{p-ee195e5e.entry.js → p-965ec85a.entry.js} +1 -1
  190. package/dist/verdocs-web-sdk/p-999fbe79.js +1 -0
  191. package/dist/verdocs-web-sdk/{p-bd0bc3dd.system.entry.js → p-99c10bba.system.entry.js} +1 -1
  192. package/dist/verdocs-web-sdk/{p-cf765153.entry.js → p-9aff3ff0.entry.js} +1 -1
  193. package/dist/verdocs-web-sdk/{p-a171983b.system.entry.js → p-9b66a84a.system.entry.js} +1 -1
  194. package/dist/verdocs-web-sdk/{p-4f439363.entry.js → p-a2531ddc.entry.js} +1 -1
  195. package/dist/verdocs-web-sdk/p-a5ce0030.entry.js +1 -0
  196. package/dist/verdocs-web-sdk/{p-3f9fbf94.entry.js → p-a7134b10.entry.js} +1 -1
  197. package/dist/verdocs-web-sdk/{p-261d376e.system.entry.js → p-a75490f4.system.entry.js} +1 -1
  198. package/dist/verdocs-web-sdk/p-aaf87ce4.system.entry.js +1 -0
  199. package/dist/verdocs-web-sdk/{p-62f090c7.system.entry.js → p-ad0805b6.system.entry.js} +1 -1
  200. package/dist/verdocs-web-sdk/{p-c694cf93.system.js → p-b0bf091c.system.js} +1 -1
  201. package/dist/verdocs-web-sdk/{p-7b40bf68.system.entry.js → p-b4238a4c.system.entry.js} +1 -1
  202. package/dist/verdocs-web-sdk/{p-5df0fa7a.system.entry.js → p-b8732502.system.entry.js} +1 -1
  203. package/dist/verdocs-web-sdk/{p-4a94ee00.system.entry.js → p-b88f9ff5.system.entry.js} +1 -1
  204. package/dist/verdocs-web-sdk/{p-39cbfe15.entry.js → p-c37f1a93.entry.js} +1 -1
  205. package/dist/verdocs-web-sdk/{p-d735df79.system.entry.js → p-c58916d2.system.entry.js} +1 -1
  206. package/dist/verdocs-web-sdk/{p-6bda7dce.entry.js → p-c89bf71d.entry.js} +1 -1
  207. package/dist/verdocs-web-sdk/{p-a5425a9b.entry.js → p-cdf1efe7.entry.js} +1 -1
  208. package/dist/verdocs-web-sdk/{p-0ad1fd33.entry.js → p-d01e5b64.entry.js} +1 -1
  209. package/dist/verdocs-web-sdk/{p-37187046.system.entry.js → p-d5e28045.system.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/{p-eef694e8.entry.js → p-d841fd4b.entry.js} +1 -1
  211. package/dist/verdocs-web-sdk/p-d8cd6b59.system.js +1 -0
  212. package/dist/verdocs-web-sdk/{p-fde6b724.entry.js → p-dab1e29a.entry.js} +1 -1
  213. package/dist/verdocs-web-sdk/{p-ecf04564.system.entry.js → p-dceba864.system.entry.js} +1 -1
  214. package/dist/verdocs-web-sdk/{p-b17a20b8.entry.js → p-de82e80e.entry.js} +1 -1
  215. package/dist/verdocs-web-sdk/{p-50ac71f3.system.entry.js → p-e1dc1460.system.entry.js} +1 -1
  216. package/dist/verdocs-web-sdk/p-ed639a7c.entry.js +1 -0
  217. package/dist/verdocs-web-sdk/{p-a35314fe.js → p-ee159b14.js} +1 -1
  218. package/dist/verdocs-web-sdk/{p-9b07a2a7.entry.js → p-eea1dd87.entry.js} +1 -1
  219. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  220. package/dist/verdocs-web-sdk/{p-bb2c866b.system.entry.js → p-f6c3da25.system.entry.js} +1 -1
  221. package/dist/verdocs-web-sdk/{p-961708ac.entry.js → p-f80b83e7.entry.js} +1 -1
  222. package/dist/verdocs-web-sdk/{p-dd8845d4.system.entry.js → p-f83a0c6e.system.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/{p-8da1555a.entry.js → p-fa0d27b1.entry.js} +1 -1
  224. package/dist/verdocs-web-sdk/p-fcd0a40a.system.js +1 -0
  225. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  226. package/package.json +7 -6
  227. package/dist/cjs/interact.min-ba5cc513.js +0 -13
  228. package/dist/esm/Types-de18e225.js +0 -4
  229. package/dist/esm/interact.min-cf83fa88.js +0 -11
  230. package/dist/esm-es5/Types-de18e225.js +0 -1
  231. package/dist/esm-es5/VerdocsEndpoint-b011af25.js +0 -1
  232. package/dist/esm-es5/_commonjsHelpers-5ec8f9b7.js +0 -1
  233. package/dist/esm-es5/interact.min-cf83fa88.js +0 -1
  234. package/dist/verdocs-web-sdk/p-0d28cf05.js +0 -1
  235. package/dist/verdocs-web-sdk/p-15cb963a.system.entry.js +0 -1
  236. package/dist/verdocs-web-sdk/p-30b4bd45.js +0 -1
  237. package/dist/verdocs-web-sdk/p-3305a941.system.js +0 -1
  238. package/dist/verdocs-web-sdk/p-66d66e2b.entry.js +0 -1
  239. package/dist/verdocs-web-sdk/p-70a3a6c1.entry.js +0 -1
  240. package/dist/verdocs-web-sdk/p-7b63017c.js +0 -1
  241. package/dist/verdocs-web-sdk/p-7fd7152d.system.js +0 -1
  242. package/dist/verdocs-web-sdk/p-9934f3ec.system.entry.js +0 -1
  243. package/dist/verdocs-web-sdk/p-b2d698f7.system.entry.js +0 -1
  244. package/dist/verdocs-web-sdk/p-bbee73c8.system.js +0 -1
  245. package/dist/verdocs-web-sdk/p-bfcf8ad2.entry.js +0 -1
  246. package/dist/verdocs-web-sdk/p-ca807155.entry.js +0 -1
  247. package/dist/verdocs-web-sdk/p-cbbf849f.system.js +0 -1
  248. package/dist/verdocs-web-sdk/p-de60d3a8.js +0 -1
  249. package/dist/verdocs-web-sdk/p-eab67c09.js +0 -1
@@ -420,277 +420,137 @@ const denyList = new Set([
420
420
  // TODO: Use `error?.code` when targeting Node.js 14
421
421
  var isRetryAllowed = error => !denyList.has(error && error.code);
422
422
 
423
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
424
-
425
- function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
426
-
427
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
428
-
429
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
430
-
431
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
432
- var namespace = 'axios-retry';
433
- /**
434
- * @param {Error} error
435
- * @return {boolean}
436
- */
437
-
423
+ const namespace = 'axios-retry';
438
424
  function isNetworkError(error) {
439
- return !error.response && Boolean(error.code) && // Prevents retrying cancelled requests
440
- error.code !== 'ECONNABORTED' && // Prevents retrying timed out requests
441
- isRetryAllowed(error); // Prevents retrying unsafe errors
425
+ const CODE_EXCLUDE_LIST = ['ERR_CANCELED', 'ECONNABORTED'];
426
+ if (error.response) {
427
+ return false;
428
+ }
429
+ if (!error.code) {
430
+ return false;
431
+ }
432
+ // Prevents retrying timed out & cancelled requests
433
+ if (CODE_EXCLUDE_LIST.includes(error.code)) {
434
+ return false;
435
+ }
436
+ // Prevents retrying unsafe errors
437
+ return isRetryAllowed(error);
442
438
  }
443
- var SAFE_HTTP_METHODS = ['get', 'head', 'options'];
444
- var IDEMPOTENT_HTTP_METHODS = SAFE_HTTP_METHODS.concat(['put', 'delete']);
445
- /**
446
- * @param {Error} error
447
- * @return {boolean}
448
- */
449
-
439
+ const SAFE_HTTP_METHODS = ['get', 'head', 'options'];
440
+ const IDEMPOTENT_HTTP_METHODS = SAFE_HTTP_METHODS.concat(['put', 'delete']);
450
441
  function isRetryableError(error) {
451
- return error.code !== 'ECONNABORTED' && (!error.response || error.response.status >= 500 && error.response.status <= 599);
442
+ return (error.code !== 'ECONNABORTED' &&
443
+ (!error.response || (error.response.status >= 500 && error.response.status <= 599)));
452
444
  }
453
- /**
454
- * @param {Error} error
455
- * @return {boolean}
456
- */
457
-
458
445
  function isSafeRequestError(error) {
459
- if (!error.config) {
460
- // Cannot determine if the request can be retried
461
- return false;
462
- }
463
-
464
- return isRetryableError(error) && SAFE_HTTP_METHODS.indexOf(error.config.method) !== -1;
446
+ if (!error.config?.method) {
447
+ // Cannot determine if the request can be retried
448
+ return false;
449
+ }
450
+ return isRetryableError(error) && SAFE_HTTP_METHODS.indexOf(error.config.method) !== -1;
465
451
  }
466
- /**
467
- * @param {Error} error
468
- * @return {boolean}
469
- */
470
-
471
452
  function isIdempotentRequestError(error) {
472
- if (!error.config) {
473
- // Cannot determine if the request can be retried
474
- return false;
475
- }
476
-
477
- return isRetryableError(error) && IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method) !== -1;
453
+ if (!error.config?.method) {
454
+ // Cannot determine if the request can be retried
455
+ return false;
456
+ }
457
+ return isRetryableError(error) && IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method) !== -1;
478
458
  }
479
- /**
480
- * @param {Error} error
481
- * @return {boolean}
482
- */
483
-
484
459
  function isNetworkOrIdempotentRequestError(error) {
485
- return isNetworkError(error) || isIdempotentRequestError(error);
460
+ return isNetworkError(error) || isIdempotentRequestError(error);
486
461
  }
487
- /**
488
- * @return {number} - delay in milliseconds, always 0
489
- */
490
-
491
462
  function noDelay() {
492
- return 0;
463
+ return 0;
493
464
  }
494
- /**
495
- * @param {number} [retryNumber=0]
496
- * @return {number} - delay in milliseconds
497
- */
498
-
499
-
500
- function exponentialDelay() {
501
- var retryNumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
502
- var delay = Math.pow(2, retryNumber) * 100;
503
- var randomSum = delay * 0.2 * Math.random(); // 0-20% of the delay
504
-
505
- return delay + randomSum;
465
+ function exponentialDelay(retryNumber = 0, _error = undefined, delayFactor = 100) {
466
+ const delay = 2 ** retryNumber * delayFactor;
467
+ const randomSum = delay * 0.2 * Math.random(); // 0-20% of the delay
468
+ return delay + randomSum;
506
469
  }
507
- /**
508
- * Initializes and returns the retry state for the given request/config
509
- * @param {AxiosRequestConfig} config
510
- * @return {Object}
511
- */
512
-
513
- function getCurrentState(config) {
514
- var currentState = config[namespace] || {};
515
- currentState.retryCount = currentState.retryCount || 0;
516
- config[namespace] = currentState;
517
- return currentState;
518
- }
519
- /**
520
- * Returns the axios-retry options for the current request
521
- * @param {AxiosRequestConfig} config
522
- * @param {AxiosRetryConfig} defaultOptions
523
- * @return {AxiosRetryConfig}
524
- */
525
-
526
-
470
+ const DEFAULT_OPTIONS = {
471
+ retries: 3,
472
+ retryCondition: isNetworkOrIdempotentRequestError,
473
+ retryDelay: noDelay,
474
+ shouldResetTimeout: false,
475
+ onRetry: () => { }
476
+ };
527
477
  function getRequestOptions(config, defaultOptions) {
528
- return _objectSpread(_objectSpread({}, defaultOptions), config[namespace]);
478
+ return { ...DEFAULT_OPTIONS, ...defaultOptions, ...config[namespace] };
529
479
  }
530
- /**
531
- * @param {Axios} axios
532
- * @param {AxiosRequestConfig} config
533
- */
534
-
535
-
536
- function fixConfig(axios, config) {
537
- if (axios.defaults.agent === config.agent) {
538
- delete config.agent;
539
- }
540
-
541
- if (axios.defaults.httpAgent === config.httpAgent) {
542
- delete config.httpAgent;
543
- }
544
-
545
- if (axios.defaults.httpsAgent === config.httpsAgent) {
546
- delete config.httpsAgent;
547
- }
480
+ function setCurrentState(config, defaultOptions) {
481
+ const currentState = getRequestOptions(config, defaultOptions || {});
482
+ currentState.retryCount = currentState.retryCount || 0;
483
+ currentState.lastRequestTime = currentState.lastRequestTime || Date.now();
484
+ config[namespace] = currentState;
485
+ return currentState;
548
486
  }
549
- /**
550
- * Checks retryCondition if request can be retried. Handles it's retruning value or Promise.
551
- * @param {number} retries
552
- * @param {Function} retryCondition
553
- * @param {Object} currentState
554
- * @param {Error} error
555
- * @return {boolean}
556
- */
557
-
558
-
559
- function shouldRetry(_x, _x2, _x3, _x4) {
560
- return _shouldRetry.apply(this, arguments);
487
+ function fixConfig(axiosInstance, config) {
488
+ // @ts-ignore
489
+ if (axiosInstance.defaults.agent === config.agent) {
490
+ // @ts-ignore
491
+ delete config.agent;
492
+ }
493
+ if (axiosInstance.defaults.httpAgent === config.httpAgent) {
494
+ delete config.httpAgent;
495
+ }
496
+ if (axiosInstance.defaults.httpsAgent === config.httpsAgent) {
497
+ delete config.httpsAgent;
498
+ }
561
499
  }
562
- /**
563
- * Adds response interceptors to an axios instance to retry requests failed due to network issues
564
- *
565
- * @example
566
- *
567
- * import axios from 'axios';
568
- *
569
- * axiosRetry(axios, { retries: 3 });
570
- *
571
- * axios.get('http://example.com/test') // The first request fails and the second returns 'ok'
572
- * .then(result => {
573
- * result.data; // 'ok'
574
- * });
575
- *
576
- * // Exponential back-off retry delay between requests
577
- * axiosRetry(axios, { retryDelay : axiosRetry.exponentialDelay});
578
- *
579
- * // Custom retry delay
580
- * axiosRetry(axios, { retryDelay : (retryCount) => {
581
- * return retryCount * 1000;
582
- * }});
583
- *
584
- * // Also works with custom axios instances
585
- * const client = axios.create({ baseURL: 'http://example.com' });
586
- * axiosRetry(client, { retries: 3 });
587
- *
588
- * client.get('/test') // The first request fails and the second returns 'ok'
589
- * .then(result => {
590
- * result.data; // 'ok'
591
- * });
592
- *
593
- * // Allows request-specific configuration
594
- * client
595
- * .get('/test', {
596
- * 'axios-retry': {
597
- * retries: 0
598
- * }
599
- * })
600
- * .catch(error => { // The first request fails
601
- * error !== undefined
602
- * });
603
- *
604
- * @param {Axios} axios An axios instance (the axios object or one created from axios.create)
605
- * @param {Object} [defaultOptions]
606
- * @param {number} [defaultOptions.retries=3] Number of retries
607
- * @param {boolean} [defaultOptions.shouldResetTimeout=false]
608
- * Defines if the timeout should be reset between retries
609
- * @param {Function} [defaultOptions.retryCondition=isNetworkOrIdempotentRequestError]
610
- * A function to determine if the error can be retried
611
- * @param {Function} [defaultOptions.retryDelay=noDelay]
612
- * A function to determine the delay between retry requests
613
- * @param {Function} [defaultOptions.onRetry=()=>{}]
614
- * A function to get notified when a retry occurs
615
- */
616
-
617
-
618
- function _shouldRetry() {
619
- _shouldRetry = _asyncToGenerator(function* (retries, retryCondition, currentState, error) {
620
- var shouldRetryOrPromise = currentState.retryCount < retries && retryCondition(error); // This could be a promise
621
-
500
+ async function shouldRetry(currentState, error) {
501
+ const { retries, retryCondition } = currentState;
502
+ const shouldRetryOrPromise = (currentState.retryCount || 0) < retries && retryCondition(error);
503
+ // This could be a promise
622
504
  if (typeof shouldRetryOrPromise === 'object') {
623
- try {
624
- var shouldRetryPromiseResult = yield shouldRetryOrPromise; // keep return true unless shouldRetryPromiseResult return false for compatibility
625
-
626
- return shouldRetryPromiseResult !== false;
627
- } catch (_err) {
628
- return false;
629
- }
505
+ try {
506
+ const shouldRetryPromiseResult = await shouldRetryOrPromise;
507
+ // keep return true unless shouldRetryPromiseResult return false for compatibility
508
+ return shouldRetryPromiseResult !== false;
509
+ }
510
+ catch (_err) {
511
+ return false;
512
+ }
630
513
  }
631
-
632
514
  return shouldRetryOrPromise;
633
- });
634
- return _shouldRetry.apply(this, arguments);
635
515
  }
636
-
637
- function axiosRetry(axios, defaultOptions) {
638
- axios.interceptors.request.use(config => {
639
- var currentState = getCurrentState(config);
640
- currentState.lastRequestTime = Date.now();
641
- return config;
642
- });
643
- axios.interceptors.response.use(null, /*#__PURE__*/function () {
644
- var _ref = _asyncToGenerator(function* (error) {
645
- var {
646
- config
647
- } = error; // If we have no information to retry the request
648
-
649
- if (!config) {
650
- return Promise.reject(error);
651
- }
652
-
653
- var {
654
- retries = 3,
655
- retryCondition = isNetworkOrIdempotentRequestError,
656
- retryDelay = noDelay,
657
- shouldResetTimeout = false,
658
- onRetry = () => {}
659
- } = getRequestOptions(config, defaultOptions);
660
- var currentState = getCurrentState(config);
661
-
662
- if (yield shouldRetry(retries, retryCondition, currentState, error)) {
663
- currentState.retryCount += 1;
664
- var delay = retryDelay(currentState.retryCount, error); // Axios fails merging this configuration to the default configuration because it has an issue
665
- // with circular structures: https://github.com/mzabriskie/axios/issues/370
666
-
667
- fixConfig(axios, config);
668
-
669
- if (!shouldResetTimeout && config.timeout && currentState.lastRequestTime) {
670
- var lastRequestDuration = Date.now() - currentState.lastRequestTime;
671
- var timeout = config.timeout - lastRequestDuration - delay;
672
-
673
- if (timeout <= 0) {
516
+ const axiosRetry = (axiosInstance, defaultOptions) => {
517
+ const requestInterceptorId = axiosInstance.interceptors.request.use((config) => {
518
+ setCurrentState(config, defaultOptions);
519
+ return config;
520
+ });
521
+ const responseInterceptorId = axiosInstance.interceptors.response.use(null, async (error) => {
522
+ const { config } = error;
523
+ // If we have no information to retry the request
524
+ if (!config) {
674
525
  return Promise.reject(error);
675
- }
676
-
677
- config.timeout = timeout;
678
526
  }
679
-
680
- config.transformRequest = [data => data];
681
- onRetry(currentState.retryCount, error, config);
682
- return new Promise(resolve => setTimeout(() => resolve(axios(config)), delay));
683
- }
684
-
685
- return Promise.reject(error);
527
+ const currentState = setCurrentState(config, defaultOptions);
528
+ if (await shouldRetry(currentState, error)) {
529
+ currentState.retryCount += 1;
530
+ const { retryDelay, shouldResetTimeout, onRetry } = currentState;
531
+ const delay = retryDelay(currentState.retryCount, error);
532
+ // Axios fails merging this configuration to the default configuration because it has an issue
533
+ // with circular structures: https://github.com/mzabriskie/axios/issues/370
534
+ fixConfig(axiosInstance, config);
535
+ if (!shouldResetTimeout && config.timeout && currentState.lastRequestTime) {
536
+ const lastRequestDuration = Date.now() - currentState.lastRequestTime;
537
+ const timeout = config.timeout - lastRequestDuration - delay;
538
+ if (timeout <= 0) {
539
+ return Promise.reject(error);
540
+ }
541
+ config.timeout = timeout;
542
+ }
543
+ config.transformRequest = [(data) => data];
544
+ await onRetry(currentState.retryCount, error, config);
545
+ return new Promise((resolve) => {
546
+ setTimeout(() => resolve(axiosInstance(config)), delay);
547
+ });
548
+ }
549
+ return Promise.reject(error);
686
550
  });
687
-
688
- return function (_x5) {
689
- return _ref.apply(this, arguments);
690
- };
691
- }());
692
- } // Compatibility with CommonJS
693
-
551
+ return { requestInterceptorId, responseInterceptorId };
552
+ };
553
+ // Compatibility with CommonJS
694
554
  axiosRetry.isNetworkError = isNetworkError;
695
555
  axiosRetry.isSafeRequestError = isSafeRequestError;
696
556
  axiosRetry.isIdempotentRequestError = isIdempotentRequestError;
@@ -1370,7 +1230,7 @@ const isAsyncFn = kindOfTest('AsyncFunction');
1370
1230
  const isThenable = (thing) =>
1371
1231
  thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
1372
1232
 
1373
- const utils = {
1233
+ const utils$1 = {
1374
1234
  isArray,
1375
1235
  isArrayBuffer,
1376
1236
  isBuffer,
@@ -1452,7 +1312,7 @@ function AxiosError(message, code, config, request, response) {
1452
1312
  response && (this.response = response);
1453
1313
  }
1454
1314
 
1455
- utils.inherits(AxiosError, Error, {
1315
+ utils$1.inherits(AxiosError, Error, {
1456
1316
  toJSON: function toJSON() {
1457
1317
  return {
1458
1318
  // Standard
@@ -1467,7 +1327,7 @@ utils.inherits(AxiosError, Error, {
1467
1327
  columnNumber: this.columnNumber,
1468
1328
  stack: this.stack,
1469
1329
  // Axios
1470
- config: utils.toJSONObject(this.config),
1330
+ config: utils$1.toJSONObject(this.config),
1471
1331
  code: this.code,
1472
1332
  status: this.response && this.response.status ? this.response.status : null
1473
1333
  };
@@ -1502,7 +1362,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
1502
1362
  AxiosError.from = (error, code, config, request, response, customProps) => {
1503
1363
  const axiosError = Object.create(prototype$1);
1504
1364
 
1505
- utils.toFlatObject(error, axiosError, function filter(obj) {
1365
+ utils$1.toFlatObject(error, axiosError, function filter(obj) {
1506
1366
  return obj !== Error.prototype;
1507
1367
  }, prop => {
1508
1368
  return prop !== 'isAxiosError';
@@ -1530,7 +1390,7 @@ const httpAdapter = null;
1530
1390
  * @returns {boolean}
1531
1391
  */
1532
1392
  function isVisitable(thing) {
1533
- return utils.isPlainObject(thing) || utils.isArray(thing);
1393
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
1534
1394
  }
1535
1395
 
1536
1396
  /**
@@ -1541,7 +1401,7 @@ function isVisitable(thing) {
1541
1401
  * @returns {string} the key without the brackets.
1542
1402
  */
1543
1403
  function removeBrackets(key) {
1544
- return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
1404
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
1545
1405
  }
1546
1406
 
1547
1407
  /**
@@ -1570,10 +1430,10 @@ function renderKey(path, key, dots) {
1570
1430
  * @returns {boolean}
1571
1431
  */
1572
1432
  function isFlatArray(arr) {
1573
- return utils.isArray(arr) && !arr.some(isVisitable);
1433
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
1574
1434
  }
1575
1435
 
1576
- const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
1436
+ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
1577
1437
  return /^is[A-Z]/.test(prop);
1578
1438
  });
1579
1439
 
@@ -1601,7 +1461,7 @@ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
1601
1461
  * @returns
1602
1462
  */
1603
1463
  function toFormData(obj, formData, options) {
1604
- if (!utils.isObject(obj)) {
1464
+ if (!utils$1.isObject(obj)) {
1605
1465
  throw new TypeError('target must be an object');
1606
1466
  }
1607
1467
 
@@ -1609,13 +1469,13 @@ function toFormData(obj, formData, options) {
1609
1469
  formData = formData || new (FormData)();
1610
1470
 
1611
1471
  // eslint-disable-next-line no-param-reassign
1612
- options = utils.toFlatObject(options, {
1472
+ options = utils$1.toFlatObject(options, {
1613
1473
  metaTokens: true,
1614
1474
  dots: false,
1615
1475
  indexes: false
1616
1476
  }, false, function defined(option, source) {
1617
1477
  // eslint-disable-next-line no-eq-null,eqeqeq
1618
- return !utils.isUndefined(source[option]);
1478
+ return !utils$1.isUndefined(source[option]);
1619
1479
  });
1620
1480
 
1621
1481
  const metaTokens = options.metaTokens;
@@ -1624,24 +1484,24 @@ function toFormData(obj, formData, options) {
1624
1484
  const dots = options.dots;
1625
1485
  const indexes = options.indexes;
1626
1486
  const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
1627
- const useBlob = _Blob && utils.isSpecCompliantForm(formData);
1487
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
1628
1488
 
1629
- if (!utils.isFunction(visitor)) {
1489
+ if (!utils$1.isFunction(visitor)) {
1630
1490
  throw new TypeError('visitor must be a function');
1631
1491
  }
1632
1492
 
1633
1493
  function convertValue(value) {
1634
1494
  if (value === null) return '';
1635
1495
 
1636
- if (utils.isDate(value)) {
1496
+ if (utils$1.isDate(value)) {
1637
1497
  return value.toISOString();
1638
1498
  }
1639
1499
 
1640
- if (!useBlob && utils.isBlob(value)) {
1500
+ if (!useBlob && utils$1.isBlob(value)) {
1641
1501
  throw new AxiosError('Blob is not supported. Use a Buffer instead.');
1642
1502
  }
1643
1503
 
1644
- if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
1504
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
1645
1505
  return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
1646
1506
  }
1647
1507
 
@@ -1662,20 +1522,20 @@ function toFormData(obj, formData, options) {
1662
1522
  let arr = value;
1663
1523
 
1664
1524
  if (value && !path && typeof value === 'object') {
1665
- if (utils.endsWith(key, '{}')) {
1525
+ if (utils$1.endsWith(key, '{}')) {
1666
1526
  // eslint-disable-next-line no-param-reassign
1667
1527
  key = metaTokens ? key : key.slice(0, -2);
1668
1528
  // eslint-disable-next-line no-param-reassign
1669
1529
  value = JSON.stringify(value);
1670
1530
  } else if (
1671
- (utils.isArray(value) && isFlatArray(value)) ||
1672
- ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
1531
+ (utils$1.isArray(value) && isFlatArray(value)) ||
1532
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
1673
1533
  )) {
1674
1534
  // eslint-disable-next-line no-param-reassign
1675
1535
  key = removeBrackets(key);
1676
1536
 
1677
1537
  arr.forEach(function each(el, index) {
1678
- !(utils.isUndefined(el) || el === null) && formData.append(
1538
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
1679
1539
  // eslint-disable-next-line no-nested-ternary
1680
1540
  indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
1681
1541
  convertValue(el)
@@ -1703,7 +1563,7 @@ function toFormData(obj, formData, options) {
1703
1563
  });
1704
1564
 
1705
1565
  function build(value, path) {
1706
- if (utils.isUndefined(value)) return;
1566
+ if (utils$1.isUndefined(value)) return;
1707
1567
 
1708
1568
  if (stack.indexOf(value) !== -1) {
1709
1569
  throw Error('Circular reference detected in ' + path.join('.'));
@@ -1711,9 +1571,9 @@ function toFormData(obj, formData, options) {
1711
1571
 
1712
1572
  stack.push(value);
1713
1573
 
1714
- utils.forEach(value, function each(el, key) {
1715
- const result = !(utils.isUndefined(el) || el === null) && visitor.call(
1716
- formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
1574
+ utils$1.forEach(value, function each(el, key) {
1575
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
1576
+ formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
1717
1577
  );
1718
1578
 
1719
1579
  if (result === true) {
@@ -1724,7 +1584,7 @@ function toFormData(obj, formData, options) {
1724
1584
  stack.pop();
1725
1585
  }
1726
1586
 
1727
- if (!utils.isObject(obj)) {
1587
+ if (!utils$1.isObject(obj)) {
1728
1588
  throw new TypeError('data must be an object');
1729
1589
  }
1730
1590
 
@@ -1828,7 +1688,7 @@ function buildURL(url, params, options) {
1828
1688
  if (serializeFn) {
1829
1689
  serializedParams = serializeFn(params, options);
1830
1690
  } else {
1831
- serializedParams = utils.isURLSearchParams(params) ?
1691
+ serializedParams = utils$1.isURLSearchParams(params) ?
1832
1692
  params.toString() :
1833
1693
  new AxiosURLSearchParams(params, options).toString(_encode);
1834
1694
  }
@@ -1903,7 +1763,7 @@ class InterceptorManager {
1903
1763
  * @returns {void}
1904
1764
  */
1905
1765
  forEach(fn) {
1906
- utils.forEach(this.handlers, function forEachHandler(h) {
1766
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
1907
1767
  if (h !== null) {
1908
1768
  fn(h);
1909
1769
  }
@@ -1923,6 +1783,18 @@ const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1923
1783
 
1924
1784
  const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1925
1785
 
1786
+ const platform$1 = {
1787
+ isBrowser: true,
1788
+ classes: {
1789
+ URLSearchParams: URLSearchParams$1,
1790
+ FormData: FormData$1,
1791
+ Blob: Blob$1
1792
+ },
1793
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1794
+ };
1795
+
1796
+ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
1797
+
1926
1798
  /**
1927
1799
  * Determine if we're running in a standard browser environment
1928
1800
  *
@@ -1940,18 +1812,10 @@ const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1940
1812
  *
1941
1813
  * @returns {boolean}
1942
1814
  */
1943
- const isStandardBrowserEnv = (() => {
1944
- let product;
1945
- if (typeof navigator !== 'undefined' && (
1946
- (product = navigator.product) === 'ReactNative' ||
1947
- product === 'NativeScript' ||
1948
- product === 'NS')
1949
- ) {
1950
- return false;
1951
- }
1952
-
1953
- return typeof window !== 'undefined' && typeof document !== 'undefined';
1954
- })();
1815
+ const hasStandardBrowserEnv = (
1816
+ (product) => {
1817
+ return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
1818
+ })(typeof navigator !== 'undefined' && navigator.product);
1955
1819
 
1956
1820
  /**
1957
1821
  * Determine if we're running in a standard browser webWorker environment
@@ -1962,7 +1826,7 @@ const isStandardBrowserEnv = (() => {
1962
1826
  * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1963
1827
  * This leads to a problem when axios post `FormData` in webWorker
1964
1828
  */
1965
- const isStandardBrowserWebWorkerEnv = (() => {
1829
+ const hasStandardBrowserWebWorkerEnv = (() => {
1966
1830
  return (
1967
1831
  typeof WorkerGlobalScope !== 'undefined' &&
1968
1832
  // eslint-disable-next-line no-undef
@@ -1971,22 +1835,25 @@ const isStandardBrowserEnv = (() => {
1971
1835
  );
1972
1836
  })();
1973
1837
 
1838
+ const utils = /*#__PURE__*/Object.freeze({
1839
+ __proto__: null,
1840
+ hasBrowserEnv: hasBrowserEnv,
1841
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1842
+ hasStandardBrowserEnv: hasStandardBrowserEnv
1843
+ });
1974
1844
 
1975
1845
  const platform = {
1976
- isBrowser: true,
1977
- classes: {
1978
- URLSearchParams: URLSearchParams$1,
1979
- FormData: FormData$1,
1980
- Blob: Blob$1
1981
- },
1982
- isStandardBrowserEnv,
1983
- isStandardBrowserWebWorkerEnv,
1984
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1846
+ ...utils,
1847
+ ...platform$1
1985
1848
  };
1986
1849
 
1987
1850
  function toURLEncodedForm(data, options) {
1988
1851
  return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
1989
1852
  visitor: function(value, key, path, helpers) {
1853
+ if (platform.isNode && utils$1.isBuffer(value)) {
1854
+ this.append(key, value.toString('base64'));
1855
+ return false;
1856
+ }
1990
1857
 
1991
1858
  return helpers.defaultVisitor.apply(this, arguments);
1992
1859
  }
@@ -2005,7 +1872,7 @@ function parsePropPath(name) {
2005
1872
  // foo.x.y.z
2006
1873
  // foo-x-y-z
2007
1874
  // foo x y z
2008
- return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
1875
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
2009
1876
  return match[0] === '[]' ? '' : match[1] || match[0];
2010
1877
  });
2011
1878
  }
@@ -2042,10 +1909,10 @@ function formDataToJSON(formData) {
2042
1909
  let name = path[index++];
2043
1910
  const isNumericKey = Number.isFinite(+name);
2044
1911
  const isLast = index >= path.length;
2045
- name = !name && utils.isArray(target) ? target.length : name;
1912
+ name = !name && utils$1.isArray(target) ? target.length : name;
2046
1913
 
2047
1914
  if (isLast) {
2048
- if (utils.hasOwnProp(target, name)) {
1915
+ if (utils$1.hasOwnProp(target, name)) {
2049
1916
  target[name] = [target[name], value];
2050
1917
  } else {
2051
1918
  target[name] = value;
@@ -2054,23 +1921,23 @@ function formDataToJSON(formData) {
2054
1921
  return !isNumericKey;
2055
1922
  }
2056
1923
 
2057
- if (!target[name] || !utils.isObject(target[name])) {
1924
+ if (!target[name] || !utils$1.isObject(target[name])) {
2058
1925
  target[name] = [];
2059
1926
  }
2060
1927
 
2061
1928
  const result = buildPath(path, value, target[name], index);
2062
1929
 
2063
- if (result && utils.isArray(target[name])) {
1930
+ if (result && utils$1.isArray(target[name])) {
2064
1931
  target[name] = arrayToObject(target[name]);
2065
1932
  }
2066
1933
 
2067
1934
  return !isNumericKey;
2068
1935
  }
2069
1936
 
2070
- if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
1937
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
2071
1938
  const obj = {};
2072
1939
 
2073
- utils.forEachEntry(formData, (name, value) => {
1940
+ utils$1.forEachEntry(formData, (name, value) => {
2074
1941
  buildPath(parsePropPath(name), value, obj, 0);
2075
1942
  });
2076
1943
 
@@ -2091,10 +1958,10 @@ function formDataToJSON(formData) {
2091
1958
  * @returns {string} A stringified version of the rawValue.
2092
1959
  */
2093
1960
  function stringifySafely(rawValue, parser, encoder) {
2094
- if (utils.isString(rawValue)) {
1961
+ if (utils$1.isString(rawValue)) {
2095
1962
  try {
2096
1963
  (parser || JSON.parse)(rawValue);
2097
- return utils.trim(rawValue);
1964
+ return utils$1.trim(rawValue);
2098
1965
  } catch (e) {
2099
1966
  if (e.name !== 'SyntaxError') {
2100
1967
  throw e;
@@ -2114,13 +1981,13 @@ const defaults = {
2114
1981
  transformRequest: [function transformRequest(data, headers) {
2115
1982
  const contentType = headers.getContentType() || '';
2116
1983
  const hasJSONContentType = contentType.indexOf('application/json') > -1;
2117
- const isObjectPayload = utils.isObject(data);
1984
+ const isObjectPayload = utils$1.isObject(data);
2118
1985
 
2119
- if (isObjectPayload && utils.isHTMLForm(data)) {
1986
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
2120
1987
  data = new FormData(data);
2121
1988
  }
2122
1989
 
2123
- const isFormData = utils.isFormData(data);
1990
+ const isFormData = utils$1.isFormData(data);
2124
1991
 
2125
1992
  if (isFormData) {
2126
1993
  if (!hasJSONContentType) {
@@ -2129,18 +1996,18 @@ const defaults = {
2129
1996
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
2130
1997
  }
2131
1998
 
2132
- if (utils.isArrayBuffer(data) ||
2133
- utils.isBuffer(data) ||
2134
- utils.isStream(data) ||
2135
- utils.isFile(data) ||
2136
- utils.isBlob(data)
1999
+ if (utils$1.isArrayBuffer(data) ||
2000
+ utils$1.isBuffer(data) ||
2001
+ utils$1.isStream(data) ||
2002
+ utils$1.isFile(data) ||
2003
+ utils$1.isBlob(data)
2137
2004
  ) {
2138
2005
  return data;
2139
2006
  }
2140
- if (utils.isArrayBufferView(data)) {
2007
+ if (utils$1.isArrayBufferView(data)) {
2141
2008
  return data.buffer;
2142
2009
  }
2143
- if (utils.isURLSearchParams(data)) {
2010
+ if (utils$1.isURLSearchParams(data)) {
2144
2011
  headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
2145
2012
  return data.toString();
2146
2013
  }
@@ -2152,7 +2019,7 @@ const defaults = {
2152
2019
  return toURLEncodedForm(data, this.formSerializer).toString();
2153
2020
  }
2154
2021
 
2155
- if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
2022
+ if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
2156
2023
  const _FormData = this.env && this.env.FormData;
2157
2024
 
2158
2025
  return toFormData(
@@ -2176,7 +2043,7 @@ const defaults = {
2176
2043
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
2177
2044
  const JSONRequested = this.responseType === 'json';
2178
2045
 
2179
- if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
2046
+ if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
2180
2047
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
2181
2048
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
2182
2049
 
@@ -2224,13 +2091,13 @@ const defaults = {
2224
2091
  }
2225
2092
  };
2226
2093
 
2227
- utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
2094
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
2228
2095
  defaults.headers[method] = {};
2229
2096
  });
2230
2097
 
2231
2098
  // RawAxiosHeaders whose duplicates are ignored by node
2232
2099
  // c.f. https://nodejs.org/api/http.html#http_message_headers
2233
- const ignoreDuplicateOf = utils.toObjectSet([
2100
+ const ignoreDuplicateOf = utils$1.toObjectSet([
2234
2101
  'age', 'authorization', 'content-length', 'content-type', 'etag',
2235
2102
  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
2236
2103
  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
@@ -2291,7 +2158,7 @@ function normalizeValue(value) {
2291
2158
  return value;
2292
2159
  }
2293
2160
 
2294
- return utils.isArray(value) ? value.map(normalizeValue) : String(value);
2161
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
2295
2162
  }
2296
2163
 
2297
2164
  function parseTokens(str) {
@@ -2309,7 +2176,7 @@ function parseTokens(str) {
2309
2176
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
2310
2177
 
2311
2178
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
2312
- if (utils.isFunction(filter)) {
2179
+ if (utils$1.isFunction(filter)) {
2313
2180
  return filter.call(this, value, header);
2314
2181
  }
2315
2182
 
@@ -2317,13 +2184,13 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
2317
2184
  value = header;
2318
2185
  }
2319
2186
 
2320
- if (!utils.isString(value)) return;
2187
+ if (!utils$1.isString(value)) return;
2321
2188
 
2322
- if (utils.isString(filter)) {
2189
+ if (utils$1.isString(filter)) {
2323
2190
  return value.indexOf(filter) !== -1;
2324
2191
  }
2325
2192
 
2326
- if (utils.isRegExp(filter)) {
2193
+ if (utils$1.isRegExp(filter)) {
2327
2194
  return filter.test(value);
2328
2195
  }
2329
2196
  }
@@ -2336,7 +2203,7 @@ function formatHeader(header) {
2336
2203
  }
2337
2204
 
2338
2205
  function buildAccessors(obj, header) {
2339
- const accessorName = utils.toCamelCase(' ' + header);
2206
+ const accessorName = utils$1.toCamelCase(' ' + header);
2340
2207
 
2341
2208
  ['get', 'set', 'has'].forEach(methodName => {
2342
2209
  Object.defineProperty(obj, methodName + accessorName, {
@@ -2363,7 +2230,7 @@ class AxiosHeaders {
2363
2230
  throw new Error('header name must be a non-empty string');
2364
2231
  }
2365
2232
 
2366
- const key = utils.findKey(self, lHeader);
2233
+ const key = utils$1.findKey(self, lHeader);
2367
2234
 
2368
2235
  if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
2369
2236
  self[key || _header] = normalizeValue(_value);
@@ -2371,11 +2238,11 @@ class AxiosHeaders {
2371
2238
  }
2372
2239
 
2373
2240
  const setHeaders = (headers, _rewrite) =>
2374
- utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
2241
+ utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
2375
2242
 
2376
- if (utils.isPlainObject(header) || header instanceof this.constructor) {
2243
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
2377
2244
  setHeaders(header, valueOrRewrite);
2378
- } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
2245
+ } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
2379
2246
  setHeaders(parseHeaders(header), valueOrRewrite);
2380
2247
  } else {
2381
2248
  header != null && setHeader(valueOrRewrite, header, rewrite);
@@ -2388,7 +2255,7 @@ class AxiosHeaders {
2388
2255
  header = normalizeHeader(header);
2389
2256
 
2390
2257
  if (header) {
2391
- const key = utils.findKey(this, header);
2258
+ const key = utils$1.findKey(this, header);
2392
2259
 
2393
2260
  if (key) {
2394
2261
  const value = this[key];
@@ -2401,11 +2268,11 @@ class AxiosHeaders {
2401
2268
  return parseTokens(value);
2402
2269
  }
2403
2270
 
2404
- if (utils.isFunction(parser)) {
2271
+ if (utils$1.isFunction(parser)) {
2405
2272
  return parser.call(this, value, key);
2406
2273
  }
2407
2274
 
2408
- if (utils.isRegExp(parser)) {
2275
+ if (utils$1.isRegExp(parser)) {
2409
2276
  return parser.exec(value);
2410
2277
  }
2411
2278
 
@@ -2418,7 +2285,7 @@ class AxiosHeaders {
2418
2285
  header = normalizeHeader(header);
2419
2286
 
2420
2287
  if (header) {
2421
- const key = utils.findKey(this, header);
2288
+ const key = utils$1.findKey(this, header);
2422
2289
 
2423
2290
  return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
2424
2291
  }
@@ -2434,7 +2301,7 @@ class AxiosHeaders {
2434
2301
  _header = normalizeHeader(_header);
2435
2302
 
2436
2303
  if (_header) {
2437
- const key = utils.findKey(self, _header);
2304
+ const key = utils$1.findKey(self, _header);
2438
2305
 
2439
2306
  if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
2440
2307
  delete self[key];
@@ -2444,7 +2311,7 @@ class AxiosHeaders {
2444
2311
  }
2445
2312
  }
2446
2313
 
2447
- if (utils.isArray(header)) {
2314
+ if (utils$1.isArray(header)) {
2448
2315
  header.forEach(deleteHeader);
2449
2316
  } else {
2450
2317
  deleteHeader(header);
@@ -2473,8 +2340,8 @@ class AxiosHeaders {
2473
2340
  const self = this;
2474
2341
  const headers = {};
2475
2342
 
2476
- utils.forEach(this, (value, header) => {
2477
- const key = utils.findKey(headers, header);
2343
+ utils$1.forEach(this, (value, header) => {
2344
+ const key = utils$1.findKey(headers, header);
2478
2345
 
2479
2346
  if (key) {
2480
2347
  self[key] = normalizeValue(value);
@@ -2503,8 +2370,8 @@ class AxiosHeaders {
2503
2370
  toJSON(asStrings) {
2504
2371
  const obj = Object.create(null);
2505
2372
 
2506
- utils.forEach(this, (value, header) => {
2507
- value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
2373
+ utils$1.forEach(this, (value, header) => {
2374
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
2508
2375
  });
2509
2376
 
2510
2377
  return obj;
@@ -2551,7 +2418,7 @@ class AxiosHeaders {
2551
2418
  }
2552
2419
  }
2553
2420
 
2554
- utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
2421
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
2555
2422
 
2556
2423
  return this;
2557
2424
  }
@@ -2560,7 +2427,7 @@ class AxiosHeaders {
2560
2427
  AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
2561
2428
 
2562
2429
  // reserved names hotfix
2563
- utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
2430
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
2564
2431
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
2565
2432
  return {
2566
2433
  get: () => value,
@@ -2570,7 +2437,7 @@ utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
2570
2437
  }
2571
2438
  });
2572
2439
 
2573
- utils.freezeMethods(AxiosHeaders);
2440
+ utils$1.freezeMethods(AxiosHeaders);
2574
2441
 
2575
2442
  /**
2576
2443
  * Transform the data for a request or a response
@@ -2586,7 +2453,7 @@ function transformData(fns, response) {
2586
2453
  const headers = AxiosHeaders.from(context.headers);
2587
2454
  let data = context.data;
2588
2455
 
2589
- utils.forEach(fns, function transform(fn) {
2456
+ utils$1.forEach(fns, function transform(fn) {
2590
2457
  data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
2591
2458
  });
2592
2459
 
@@ -2614,7 +2481,7 @@ function CanceledError(message, config, request) {
2614
2481
  this.name = 'CanceledError';
2615
2482
  }
2616
2483
 
2617
- utils.inherits(CanceledError, AxiosError, {
2484
+ utils$1.inherits(CanceledError, AxiosError, {
2618
2485
  __CANCEL__: true
2619
2486
  });
2620
2487
 
@@ -2642,53 +2509,44 @@ function settle(resolve, reject, response) {
2642
2509
  }
2643
2510
  }
2644
2511
 
2645
- const cookies = platform.isStandardBrowserEnv ?
2512
+ const cookies = platform.hasStandardBrowserEnv ?
2646
2513
 
2647
- // Standard browser envs support document.cookie
2648
- (function standardBrowserEnv() {
2649
- return {
2650
- write: function write(name, value, expires, path, domain, secure) {
2651
- const cookie = [];
2652
- cookie.push(name + '=' + encodeURIComponent(value));
2514
+ // Standard browser envs support document.cookie
2515
+ {
2516
+ write(name, value, expires, path, domain, secure) {
2517
+ const cookie = [name + '=' + encodeURIComponent(value)];
2653
2518
 
2654
- if (utils.isNumber(expires)) {
2655
- cookie.push('expires=' + new Date(expires).toGMTString());
2656
- }
2519
+ utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
2657
2520
 
2658
- if (utils.isString(path)) {
2659
- cookie.push('path=' + path);
2660
- }
2521
+ utils$1.isString(path) && cookie.push('path=' + path);
2661
2522
 
2662
- if (utils.isString(domain)) {
2663
- cookie.push('domain=' + domain);
2664
- }
2523
+ utils$1.isString(domain) && cookie.push('domain=' + domain);
2665
2524
 
2666
- if (secure === true) {
2667
- cookie.push('secure');
2668
- }
2525
+ secure === true && cookie.push('secure');
2669
2526
 
2670
- document.cookie = cookie.join('; ');
2671
- },
2527
+ document.cookie = cookie.join('; ');
2528
+ },
2672
2529
 
2673
- read: function read(name) {
2674
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
2675
- return (match ? decodeURIComponent(match[3]) : null);
2676
- },
2530
+ read(name) {
2531
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
2532
+ return (match ? decodeURIComponent(match[3]) : null);
2533
+ },
2677
2534
 
2678
- remove: function remove(name) {
2679
- this.write(name, '', Date.now() - 86400000);
2680
- }
2681
- };
2682
- })() :
2535
+ remove(name) {
2536
+ this.write(name, '', Date.now() - 86400000);
2537
+ }
2538
+ }
2683
2539
 
2684
- // Non standard browser env (web workers, react-native) lack needed support.
2685
- (function nonStandardBrowserEnv() {
2686
- return {
2687
- write: function write() {},
2688
- read: function read() { return null; },
2689
- remove: function remove() {}
2690
- };
2691
- })();
2540
+ :
2541
+
2542
+ // Non-standard browser env (web workers, react-native) lack needed support.
2543
+ {
2544
+ write() {},
2545
+ read() {
2546
+ return null;
2547
+ },
2548
+ remove() {}
2549
+ };
2692
2550
 
2693
2551
  /**
2694
2552
  * Determines whether the specified URL is absolute
@@ -2735,7 +2593,7 @@ function buildFullPath(baseURL, requestedURL) {
2735
2593
  return requestedURL;
2736
2594
  }
2737
2595
 
2738
- const isURLSameOrigin = platform.isStandardBrowserEnv ?
2596
+ const isURLSameOrigin = platform.hasStandardBrowserEnv ?
2739
2597
 
2740
2598
  // Standard browser envs have full support of the APIs needed to test
2741
2599
  // whether the request URL is of the same origin as current location.
@@ -2745,7 +2603,7 @@ const isURLSameOrigin = platform.isStandardBrowserEnv ?
2745
2603
  let originURL;
2746
2604
 
2747
2605
  /**
2748
- * Parse a URL to discover it's components
2606
+ * Parse a URL to discover its components
2749
2607
  *
2750
2608
  * @param {String} url The URL to be parsed
2751
2609
  * @returns {Object}
@@ -2785,7 +2643,7 @@ const isURLSameOrigin = platform.isStandardBrowserEnv ?
2785
2643
  * @returns {boolean} True if URL shares the same origin, otherwise false
2786
2644
  */
2787
2645
  return function isURLSameOrigin(requestURL) {
2788
- const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
2646
+ const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
2789
2647
  return (parsed.protocol === originURL.protocol &&
2790
2648
  parsed.host === originURL.host);
2791
2649
  };
@@ -2890,7 +2748,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2890
2748
  return new Promise(function dispatchXhrRequest(resolve, reject) {
2891
2749
  let requestData = config.data;
2892
2750
  const requestHeaders = AxiosHeaders.from(config.headers).normalize();
2893
- const responseType = config.responseType;
2751
+ let {responseType, withXSRFToken} = config;
2894
2752
  let onCanceled;
2895
2753
  function done() {
2896
2754
  if (config.cancelToken) {
@@ -2904,14 +2762,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2904
2762
 
2905
2763
  let contentType;
2906
2764
 
2907
- if (utils.isFormData(requestData)) {
2908
- if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
2765
+ if (utils$1.isFormData(requestData)) {
2766
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2909
2767
  requestHeaders.setContentType(false); // Let the browser set it
2910
- } else if(!requestHeaders.getContentType(/^\s*multipart\/form-data/)){
2911
- requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks
2912
- } else if(utils.isString(contentType = requestHeaders.getContentType())){
2768
+ } else if ((contentType = requestHeaders.getContentType()) !== false) {
2913
2769
  // fix semicolon duplication issue for ReactNative FormData implementation
2914
- requestHeaders.setContentType(contentType.replace(/^\s*(multipart\/form-data);+/, '$1'));
2770
+ const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
2771
+ requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
2915
2772
  }
2916
2773
  }
2917
2774
 
@@ -3027,13 +2884,16 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
3027
2884
  // Add xsrf header
3028
2885
  // This is only done if running in a standard browser environment.
3029
2886
  // Specifically not if we're in a web worker, or react-native.
3030
- if (platform.isStandardBrowserEnv) {
3031
- // Add xsrf header
3032
- const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
3033
- && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
2887
+ if(platform.hasStandardBrowserEnv) {
2888
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
3034
2889
 
3035
- if (xsrfValue) {
3036
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
2890
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
2891
+ // Add xsrf header
2892
+ const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
2893
+
2894
+ if (xsrfValue) {
2895
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
2896
+ }
3037
2897
  }
3038
2898
  }
3039
2899
 
@@ -3042,13 +2902,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
3042
2902
 
3043
2903
  // Add headers to the request
3044
2904
  if ('setRequestHeader' in request) {
3045
- utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
2905
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
3046
2906
  request.setRequestHeader(key, val);
3047
2907
  });
3048
2908
  }
3049
2909
 
3050
2910
  // Add withCredentials to request if needed
3051
- if (!utils.isUndefined(config.withCredentials)) {
2911
+ if (!utils$1.isUndefined(config.withCredentials)) {
3052
2912
  request.withCredentials = !!config.withCredentials;
3053
2913
  }
3054
2914
 
@@ -3103,7 +2963,7 @@ const knownAdapters = {
3103
2963
  xhr: xhrAdapter
3104
2964
  };
3105
2965
 
3106
- utils.forEach(knownAdapters, (fn, value) => {
2966
+ utils$1.forEach(knownAdapters, (fn, value) => {
3107
2967
  if (fn) {
3108
2968
  try {
3109
2969
  Object.defineProperty(fn, 'name', {value});
@@ -3116,11 +2976,11 @@ utils.forEach(knownAdapters, (fn, value) => {
3116
2976
 
3117
2977
  const renderReason = (reason) => `- ${reason}`;
3118
2978
 
3119
- const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
2979
+ const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
3120
2980
 
3121
2981
  const adapters = {
3122
2982
  getAdapter: (adapters) => {
3123
- adapters = utils.isArray(adapters) ? adapters : [adapters];
2983
+ adapters = utils$1.isArray(adapters) ? adapters : [adapters];
3124
2984
 
3125
2985
  const {length} = adapters;
3126
2986
  let nameOrAdapter;
@@ -3261,11 +3121,11 @@ function mergeConfig(config1, config2) {
3261
3121
  const config = {};
3262
3122
 
3263
3123
  function getMergedValue(target, source, caseless) {
3264
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
3265
- return utils.merge.call({caseless}, target, source);
3266
- } else if (utils.isPlainObject(source)) {
3267
- return utils.merge({}, source);
3268
- } else if (utils.isArray(source)) {
3124
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
3125
+ return utils$1.merge.call({caseless}, target, source);
3126
+ } else if (utils$1.isPlainObject(source)) {
3127
+ return utils$1.merge({}, source);
3128
+ } else if (utils$1.isArray(source)) {
3269
3129
  return source.slice();
3270
3130
  }
3271
3131
  return source;
@@ -3273,25 +3133,25 @@ function mergeConfig(config1, config2) {
3273
3133
 
3274
3134
  // eslint-disable-next-line consistent-return
3275
3135
  function mergeDeepProperties(a, b, caseless) {
3276
- if (!utils.isUndefined(b)) {
3136
+ if (!utils$1.isUndefined(b)) {
3277
3137
  return getMergedValue(a, b, caseless);
3278
- } else if (!utils.isUndefined(a)) {
3138
+ } else if (!utils$1.isUndefined(a)) {
3279
3139
  return getMergedValue(undefined, a, caseless);
3280
3140
  }
3281
3141
  }
3282
3142
 
3283
3143
  // eslint-disable-next-line consistent-return
3284
3144
  function valueFromConfig2(a, b) {
3285
- if (!utils.isUndefined(b)) {
3145
+ if (!utils$1.isUndefined(b)) {
3286
3146
  return getMergedValue(undefined, b);
3287
3147
  }
3288
3148
  }
3289
3149
 
3290
3150
  // eslint-disable-next-line consistent-return
3291
3151
  function defaultToConfig2(a, b) {
3292
- if (!utils.isUndefined(b)) {
3152
+ if (!utils$1.isUndefined(b)) {
3293
3153
  return getMergedValue(undefined, b);
3294
- } else if (!utils.isUndefined(a)) {
3154
+ } else if (!utils$1.isUndefined(a)) {
3295
3155
  return getMergedValue(undefined, a);
3296
3156
  }
3297
3157
  }
@@ -3316,6 +3176,7 @@ function mergeConfig(config1, config2) {
3316
3176
  timeout: defaultToConfig2,
3317
3177
  timeoutMessage: defaultToConfig2,
3318
3178
  withCredentials: defaultToConfig2,
3179
+ withXSRFToken: defaultToConfig2,
3319
3180
  adapter: defaultToConfig2,
3320
3181
  responseType: defaultToConfig2,
3321
3182
  xsrfCookieName: defaultToConfig2,
@@ -3336,16 +3197,16 @@ function mergeConfig(config1, config2) {
3336
3197
  headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
3337
3198
  };
3338
3199
 
3339
- utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
3200
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
3340
3201
  const merge = mergeMap[prop] || mergeDeepProperties;
3341
3202
  const configValue = merge(config1[prop], config2[prop], prop);
3342
- (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
3203
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
3343
3204
  });
3344
3205
 
3345
3206
  return config;
3346
3207
  }
3347
3208
 
3348
- const VERSION = "1.5.1";
3209
+ const VERSION = "1.6.2";
3349
3210
 
3350
3211
  const validators$1 = {};
3351
3212
 
@@ -3483,7 +3344,7 @@ class Axios {
3483
3344
  }
3484
3345
 
3485
3346
  if (paramsSerializer != null) {
3486
- if (utils.isFunction(paramsSerializer)) {
3347
+ if (utils$1.isFunction(paramsSerializer)) {
3487
3348
  config.paramsSerializer = {
3488
3349
  serialize: paramsSerializer
3489
3350
  };
@@ -3499,12 +3360,12 @@ class Axios {
3499
3360
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
3500
3361
 
3501
3362
  // Flatten headers
3502
- let contextHeaders = headers && utils.merge(
3363
+ let contextHeaders = headers && utils$1.merge(
3503
3364
  headers.common,
3504
3365
  headers[config.method]
3505
3366
  );
3506
3367
 
3507
- headers && utils.forEach(
3368
+ headers && utils$1.forEach(
3508
3369
  ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
3509
3370
  (method) => {
3510
3371
  delete headers[method];
@@ -3591,7 +3452,7 @@ class Axios {
3591
3452
  }
3592
3453
 
3593
3454
  // Provide aliases for supported request methods
3594
- utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3455
+ utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3595
3456
  /*eslint func-names:0*/
3596
3457
  Axios.prototype[method] = function(url, config) {
3597
3458
  return this.request(mergeConfig(config || {}, {
@@ -3602,7 +3463,7 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
3602
3463
  };
3603
3464
  });
3604
3465
 
3605
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3466
+ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3606
3467
  /*eslint func-names:0*/
3607
3468
 
3608
3469
  function generateHTTPMethod(isForm) {
@@ -3774,7 +3635,7 @@ function spread(callback) {
3774
3635
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
3775
3636
  */
3776
3637
  function isAxiosError(payload) {
3777
- return utils.isObject(payload) && (payload.isAxiosError === true);
3638
+ return utils$1.isObject(payload) && (payload.isAxiosError === true);
3778
3639
  }
3779
3640
 
3780
3641
  const HttpStatusCode = {
@@ -3859,10 +3720,10 @@ function createInstance(defaultConfig) {
3859
3720
  const instance = bind(Axios.prototype.request, context);
3860
3721
 
3861
3722
  // Copy axios.prototype to instance
3862
- utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});
3723
+ utils$1.extend(instance, Axios.prototype, context, {allOwnKeys: true});
3863
3724
 
3864
3725
  // Copy context to instance
3865
- utils.extend(instance, context, null, {allOwnKeys: true});
3726
+ utils$1.extend(instance, context, null, {allOwnKeys: true});
3866
3727
 
3867
3728
  // Factory for creating new instances
3868
3729
  instance.create = function create(instanceConfig) {
@@ -3906,7 +3767,7 @@ axios.mergeConfig = mergeConfig;
3906
3767
 
3907
3768
  axios.AxiosHeaders = AxiosHeaders;
3908
3769
 
3909
- axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
3770
+ axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
3910
3771
 
3911
3772
  axios.getAdapter = adapters.getAdapter;
3912
3773