@verdocs/web-sdk 2.3.11 → 2.3.14

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 (330) hide show
  1. package/dist/cjs/{Profiles-1a26e4eb.js → Profiles-54271244.js} +34 -0
  2. package/dist/cjs/{TemplateStore-192c6cf1.js → TemplateStore-d9936a68.js} +1 -1
  3. package/dist/cjs/{Types-fb95ed6b.js → Types-ee5afdf8.js} +1 -2
  4. package/dist/cjs/{VerdocsEndpoint-33b643eb.js → VerdocsEndpoint-2d85658d.js} +485 -304
  5. package/dist/cjs/{_commonjsHelpers-1fbbf0eb.js → _commonjsHelpers-0c557e26.js} +5 -0
  6. package/dist/cjs/interact.min-ba5cc513.js +13 -0
  7. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/{utils-a3f0b70a.js → utils-2ddfdf9e.js} +2 -2
  10. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-auth.cjs.entry.js +34 -8
  12. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  13. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +3 -12
  14. package/dist/cjs/{verdocs-contact-picker_3.cjs.entry.js → verdocs-contact-picker_2.cjs.entry.js} +5 -77
  15. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +4 -4
  16. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  17. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +2 -3
  18. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +4 -4
  19. package/dist/cjs/verdocs-field-attachment.cjs.entry.js +3 -3
  20. package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -3
  21. package/dist/cjs/verdocs-field-date.cjs.entry.js +4 -4
  22. package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +4 -3
  23. package/dist/cjs/verdocs-field-initial.cjs.entry.js +3 -3
  24. package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -3
  25. package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -3
  26. package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -3
  27. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +8 -9
  28. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +8 -8
  29. package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +4 -4
  30. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  31. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -2
  32. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +3 -3
  33. package/dist/cjs/verdocs-preview_8.cjs.entry.js +7 -8
  34. package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +220 -0
  35. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  36. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +36 -69
  37. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  38. package/dist/cjs/verdocs-sign.cjs.entry.js +8 -11
  39. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +4 -4
  40. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +46 -54
  41. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  42. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  43. package/dist/cjs/verdocs-view.cjs.entry.js +4 -4
  44. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  45. package/dist/collection/collection-manifest.json +1 -1
  46. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +1 -20
  47. package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.css +66 -0
  48. package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.js +187 -0
  49. package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.stories.js +14 -0
  50. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +34 -6
  51. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +1 -2
  52. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +4 -8
  53. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.css +1 -4
  54. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +0 -1
  55. package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.css +0 -1
  56. package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +1 -0
  57. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +1 -2
  58. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.css +1 -1
  59. package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.css +0 -1
  60. package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +2 -2
  61. package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +0 -10
  62. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +35 -43
  63. package/dist/collection/utils/Types.js +1 -2
  64. package/dist/components/Organizations.js +32 -0
  65. package/dist/components/TemplateStore.js +1 -1
  66. package/dist/components/Types2.js +1 -2
  67. package/dist/components/VerdocsEndpoint.js +484 -304
  68. package/dist/components/_commonjsHelpers.js +5 -1
  69. package/dist/components/index.d.ts +1 -1
  70. package/dist/components/index.js +1 -1
  71. package/dist/components/index3.js +29 -40
  72. package/dist/components/interact.min.js +6 -5
  73. package/dist/components/verdocs-auth.js +46 -12
  74. package/dist/components/verdocs-build.js +16 -22
  75. package/dist/components/verdocs-contact-picker2.js +1 -1
  76. package/dist/components/verdocs-envelope-sidebar.js +0 -1
  77. package/dist/components/verdocs-field-date.js +1 -1
  78. package/dist/components/verdocs-field-dropdown.js +1 -0
  79. package/dist/components/verdocs-field-textarea.js +4 -5
  80. package/dist/components/verdocs-field-textbox.js +4 -4
  81. package/dist/components/verdocs-field-timestamp.js +1 -1
  82. package/dist/components/verdocs-ok-dialog2.js +1 -3
  83. package/dist/components/verdocs-search-activity.d.ts +11 -0
  84. package/dist/components/verdocs-search-activity.js +6 -0
  85. package/dist/components/verdocs-search-activity2.js +170 -0
  86. package/dist/components/verdocs-search.js +8 -2
  87. package/dist/components/verdocs-send2.js +5 -12
  88. package/dist/components/verdocs-settings-organization2.js +1 -22
  89. package/dist/components/verdocs-sign.js +4 -8
  90. package/dist/components/verdocs-template-create2.js +2 -2
  91. package/dist/components/verdocs-template-field-properties2.js +0 -10
  92. package/dist/components/verdocs-template-fields2.js +38 -46
  93. package/dist/components/verdocs-template-roles2.js +4 -4
  94. package/dist/docs.json +108 -139
  95. package/dist/esm/{Profiles-d4df4d1c.js → Profiles-4cc942ef.js} +32 -1
  96. package/dist/esm/{TemplateStore-7149eda0.js → TemplateStore-018fc1db.js} +1 -1
  97. package/dist/esm/Types-de18e225.js +4 -0
  98. package/dist/esm/{VerdocsEndpoint-7922d31f.js → VerdocsEndpoint-b011af25.js} +484 -304
  99. package/dist/esm/{_commonjsHelpers-8a9f3b18.js → _commonjsHelpers-5ec8f9b7.js} +5 -1
  100. package/dist/esm/interact.min-cf83fa88.js +11 -0
  101. package/dist/esm/ipc-test.entry.js +2 -2
  102. package/dist/esm/loader.js +1 -1
  103. package/dist/esm/{utils-e0ce2c22.js → utils-d269cea3.js} +2 -2
  104. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  105. package/dist/esm/verdocs-auth.entry.js +34 -8
  106. package/dist/esm/verdocs-build.entry.js +2 -2
  107. package/dist/esm/verdocs-button-panel_2.entry.js +3 -12
  108. package/dist/esm/{verdocs-contact-picker_3.entry.js → verdocs-contact-picker_2.entry.js} +6 -77
  109. package/dist/esm/verdocs-envelope-document-page.entry.js +4 -4
  110. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  111. package/dist/esm/verdocs-envelope-sidebar.entry.js +2 -3
  112. package/dist/esm/verdocs-envelopes-list.entry.js +4 -4
  113. package/dist/esm/verdocs-field-attachment.entry.js +3 -3
  114. package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
  115. package/dist/esm/verdocs-field-date.entry.js +4 -4
  116. package/dist/esm/verdocs-field-dropdown.entry.js +4 -3
  117. package/dist/esm/verdocs-field-initial.entry.js +3 -3
  118. package/dist/esm/verdocs-field-payment.entry.js +3 -3
  119. package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
  120. package/dist/esm/verdocs-field-signature.entry.js +3 -3
  121. package/dist/esm/verdocs-field-textarea.entry.js +8 -9
  122. package/dist/esm/verdocs-field-textbox.entry.js +8 -8
  123. package/dist/esm/verdocs-field-timestamp.entry.js +4 -4
  124. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  125. package/dist/esm/verdocs-ok-dialog.entry.js +1 -2
  126. package/dist/esm/verdocs-pagination_2.entry.js +3 -3
  127. package/dist/esm/verdocs-preview_8.entry.js +7 -8
  128. package/dist/esm/verdocs-quick-functions_3.entry.js +214 -0
  129. package/dist/esm/verdocs-search.entry.js +1 -1
  130. package/dist/esm/verdocs-settings-api-keys_4.entry.js +34 -67
  131. package/dist/esm/verdocs-settings.entry.js +1 -1
  132. package/dist/esm/verdocs-sign.entry.js +8 -11
  133. package/dist/esm/verdocs-template-document-page_2.entry.js +4 -4
  134. package/dist/esm/verdocs-template-fields_4.entry.js +46 -54
  135. package/dist/esm/verdocs-template-star.entry.js +1 -1
  136. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  137. package/dist/esm/verdocs-view.entry.js +4 -4
  138. package/dist/esm/verdocs-web-sdk.js +1 -1
  139. package/dist/esm-es5/Profiles-4cc942ef.js +1 -0
  140. package/dist/esm-es5/{TemplateStore-7149eda0.js → TemplateStore-018fc1db.js} +1 -1
  141. package/dist/esm-es5/Types-de18e225.js +1 -0
  142. package/dist/esm-es5/VerdocsEndpoint-b011af25.js +1 -0
  143. package/dist/esm-es5/_commonjsHelpers-5ec8f9b7.js +1 -0
  144. package/dist/esm-es5/interact.min-cf83fa88.js +1 -0
  145. package/dist/esm-es5/ipc-test.entry.js +1 -1
  146. package/dist/esm-es5/loader.js +1 -1
  147. package/dist/esm-es5/{utils-e0ce2c22.js → utils-d269cea3.js} +1 -1
  148. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  149. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  150. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  151. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  152. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -0
  153. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  154. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  155. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  156. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  157. package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
  158. package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
  159. package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
  160. package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
  161. package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
  162. package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
  163. package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
  164. package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
  165. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  166. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  167. package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
  168. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  169. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  170. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  171. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  172. package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -0
  173. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  174. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  175. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  176. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  177. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  178. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  179. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  180. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  181. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  182. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  183. package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +0 -4
  184. package/dist/types/components/elements/verdocs-search-activity/verdocs-search-activity.d.ts +33 -0
  185. package/dist/types/components/{controls/verdocs-portal/verdocs-portal.stories.d.ts → elements/verdocs-search-activity/verdocs-search-activity.stories.d.ts} +6 -3
  186. package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +2 -0
  187. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +0 -1
  188. package/dist/types/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.d.ts +0 -1
  189. package/dist/types/components.d.ts +34 -50
  190. package/dist/types/utils/Types.d.ts +1 -1
  191. package/dist/types/utils/utils.d.ts +2 -2
  192. package/dist/verdocs-web-sdk/p-01166179.system.entry.js +1 -0
  193. package/dist/verdocs-web-sdk/{p-d1ea580b.system.entry.js → p-013d1556.system.entry.js} +1 -1
  194. package/dist/verdocs-web-sdk/p-04580be0.entry.js +1 -0
  195. package/dist/verdocs-web-sdk/{p-3f837e30.system.entry.js → p-04d7d759.system.entry.js} +1 -1
  196. package/dist/verdocs-web-sdk/{p-05b3034f.entry.js → p-0ad1fd33.entry.js} +1 -1
  197. package/dist/verdocs-web-sdk/p-0d28cf05.js +1 -0
  198. package/dist/verdocs-web-sdk/{p-2ec8a9be.entry.js → p-0df58c57.entry.js} +1 -1
  199. package/dist/verdocs-web-sdk/{p-da1c0295.system.entry.js → p-0e5449d1.system.entry.js} +1 -1
  200. package/dist/verdocs-web-sdk/{p-686139a0.entry.js → p-0f94d635.entry.js} +1 -1
  201. package/dist/verdocs-web-sdk/{p-0419a39f.system.entry.js → p-10af7aec.system.entry.js} +1 -1
  202. package/dist/verdocs-web-sdk/{p-39f3f620.system.entry.js → p-126ba5d2.system.entry.js} +1 -1
  203. package/dist/verdocs-web-sdk/{p-ed639a7c.entry.js → p-137cedc8.entry.js} +1 -1
  204. package/dist/verdocs-web-sdk/{p-8f8504e2.entry.js → p-1406ffd2.entry.js} +1 -1
  205. package/dist/verdocs-web-sdk/{p-8e0d6152.system.entry.js → p-14aefeb2.system.entry.js} +1 -1
  206. package/dist/verdocs-web-sdk/p-15cb963a.system.entry.js +1 -0
  207. package/dist/verdocs-web-sdk/p-17d0e5f4.entry.js +1 -0
  208. package/dist/verdocs-web-sdk/p-23be436b.entry.js +1 -0
  209. package/dist/verdocs-web-sdk/{p-6d70fc87.system.entry.js → p-261d376e.system.entry.js} +1 -1
  210. package/dist/verdocs-web-sdk/{p-7144ab8e.system.entry.js → p-2f04fb38.system.entry.js} +1 -1
  211. package/dist/verdocs-web-sdk/p-30b4bd45.js +1 -0
  212. package/dist/verdocs-web-sdk/p-3305a941.system.js +1 -0
  213. package/dist/verdocs-web-sdk/{p-401a49cb.system.entry.js → p-343672f5.system.entry.js} +1 -1
  214. package/dist/verdocs-web-sdk/{p-026eb575.system.entry.js → p-35769d0c.system.entry.js} +1 -1
  215. package/dist/verdocs-web-sdk/{p-d2cee107.system.entry.js → p-37187046.system.entry.js} +1 -1
  216. package/dist/verdocs-web-sdk/{p-083bdbc6.entry.js → p-39cbfe15.entry.js} +1 -1
  217. package/dist/verdocs-web-sdk/{p-7b3fed68.entry.js → p-3a702f79.entry.js} +1 -1
  218. package/dist/verdocs-web-sdk/{p-f3a1060a.entry.js → p-3abfff14.entry.js} +1 -1
  219. package/dist/verdocs-web-sdk/{p-a7134b10.entry.js → p-3f9fbf94.entry.js} +1 -1
  220. package/dist/verdocs-web-sdk/p-409e992a.entry.js +1 -0
  221. package/dist/verdocs-web-sdk/p-4a94ee00.system.entry.js +1 -0
  222. package/dist/verdocs-web-sdk/{p-73b9ef06.entry.js → p-4f439363.entry.js} +1 -1
  223. package/dist/verdocs-web-sdk/{p-7cbe51d8.system.entry.js → p-50ac71f3.system.entry.js} +1 -1
  224. package/dist/verdocs-web-sdk/p-51756c1b.system.entry.js +1 -0
  225. package/dist/verdocs-web-sdk/{p-345f88a3.system.entry.js → p-5c50a778.system.entry.js} +1 -1
  226. package/dist/verdocs-web-sdk/{p-9c2bec77.system.entry.js → p-5df0fa7a.system.entry.js} +1 -1
  227. package/dist/verdocs-web-sdk/{p-06fb711b.system.entry.js → p-609c7fab.system.entry.js} +1 -1
  228. package/dist/verdocs-web-sdk/{p-0d4739c4.system.entry.js → p-62f090c7.system.entry.js} +1 -1
  229. package/dist/verdocs-web-sdk/p-6307e6ae.entry.js +1 -0
  230. package/dist/verdocs-web-sdk/p-66d66e2b.entry.js +1 -0
  231. package/dist/verdocs-web-sdk/{p-599fa850.entry.js → p-6bda7dce.entry.js} +1 -1
  232. package/dist/verdocs-web-sdk/p-76907130.entry.js +1 -0
  233. package/dist/verdocs-web-sdk/{p-1eb38c2e.entry.js → p-77abc3ce.entry.js} +1 -1
  234. package/dist/verdocs-web-sdk/{p-f49cb84b.entry.js → p-7805f0e0.entry.js} +1 -1
  235. package/dist/verdocs-web-sdk/{p-47460aa0.entry.js → p-79dc4f76.entry.js} +1 -1
  236. package/dist/verdocs-web-sdk/p-7b63017c.js +1 -0
  237. package/dist/verdocs-web-sdk/p-7fd7152d.system.js +1 -0
  238. package/dist/verdocs-web-sdk/p-89aa696c.system.entry.js +1 -0
  239. package/dist/verdocs-web-sdk/{p-1efd342e.entry.js → p-8da1555a.entry.js} +1 -1
  240. package/dist/verdocs-web-sdk/p-961708ac.entry.js +1 -0
  241. package/dist/verdocs-web-sdk/p-983da2f6.js +1 -0
  242. package/dist/verdocs-web-sdk/p-9934f3ec.system.entry.js +1 -0
  243. package/dist/verdocs-web-sdk/{p-2c47b92e.entry.js → p-9b07a2a7.entry.js} +1 -1
  244. package/dist/verdocs-web-sdk/{p-a59064f7.system.entry.js → p-a0b02d83.system.entry.js} +1 -1
  245. package/dist/verdocs-web-sdk/{p-9b66a84a.system.entry.js → p-a171983b.system.entry.js} +1 -1
  246. package/dist/verdocs-web-sdk/{p-e6b68ad5.entry.js → p-a310f65b.entry.js} +1 -1
  247. package/dist/verdocs-web-sdk/{p-ee159b14.js → p-a35314fe.js} +1 -1
  248. package/dist/verdocs-web-sdk/{p-c58916d2.system.entry.js → p-a52a832b.system.entry.js} +1 -1
  249. package/dist/verdocs-web-sdk/p-a5425a9b.entry.js +1 -0
  250. package/dist/verdocs-web-sdk/{p-16849f44.system.entry.js → p-aa51514f.system.entry.js} +1 -1
  251. package/dist/verdocs-web-sdk/{p-7be5cb8c.entry.js → p-ace35be6.entry.js} +1 -1
  252. package/dist/verdocs-web-sdk/{p-120f75b1.entry.js → p-af3e9624.entry.js} +1 -1
  253. package/dist/verdocs-web-sdk/{p-ecb7ea02.entry.js → p-b17a20b8.entry.js} +1 -1
  254. package/dist/verdocs-web-sdk/p-b2d698f7.system.entry.js +1 -0
  255. package/dist/verdocs-web-sdk/{p-393a9a2a.system.entry.js → p-b73415c3.system.entry.js} +1 -1
  256. package/dist/verdocs-web-sdk/p-bb2c866b.system.entry.js +1 -0
  257. package/dist/verdocs-web-sdk/p-bbee73c8.system.js +1 -0
  258. package/dist/verdocs-web-sdk/{p-38679b8e.system.entry.js → p-bd0bc3dd.system.entry.js} +1 -1
  259. package/dist/verdocs-web-sdk/p-bfcf8ad2.entry.js +1 -0
  260. package/dist/verdocs-web-sdk/{p-b0bf091c.system.js → p-c694cf93.system.js} +1 -1
  261. package/dist/verdocs-web-sdk/p-cbbf849f.system.js +1 -0
  262. package/dist/verdocs-web-sdk/p-cbd0802f.entry.js +1 -0
  263. package/dist/verdocs-web-sdk/{p-9aff3ff0.entry.js → p-cf765153.entry.js} +1 -1
  264. package/dist/verdocs-web-sdk/{p-f83a0c6e.system.entry.js → p-dd8845d4.system.entry.js} +1 -1
  265. package/dist/verdocs-web-sdk/p-de60d3a8.js +1 -0
  266. package/dist/verdocs-web-sdk/{p-4a1bc6e3.system.entry.js → p-df6a373e.system.entry.js} +1 -1
  267. package/dist/verdocs-web-sdk/{p-5f736f85.system.entry.js → p-e3a9d167.system.entry.js} +1 -1
  268. package/dist/verdocs-web-sdk/p-eab67c09.js +1 -0
  269. package/dist/verdocs-web-sdk/{p-1fdb236c.system.js → p-eb595245.system.js} +1 -1
  270. package/dist/verdocs-web-sdk/p-ecf04564.system.entry.js +1 -0
  271. package/dist/verdocs-web-sdk/p-ee195e5e.entry.js +1 -0
  272. package/dist/verdocs-web-sdk/{p-ce00ee85.entry.js → p-eef694e8.entry.js} +1 -1
  273. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  274. package/dist/verdocs-web-sdk/{p-d7dbeec3.system.entry.js → p-f1257cd0.system.entry.js} +1 -1
  275. package/dist/verdocs-web-sdk/p-f65a1b9e.system.js +1 -0
  276. package/dist/verdocs-web-sdk/{p-0549358c.entry.js → p-fde6b724.entry.js} +1 -1
  277. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  278. package/package.json +7 -8
  279. package/dist/cjs/interact.min-a61b43b3.js +0 -12
  280. package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +0 -79
  281. package/dist/collection/components/controls/verdocs-portal/verdocs-portal.css +0 -0
  282. package/dist/collection/components/controls/verdocs-portal/verdocs-portal.js +0 -181
  283. package/dist/collection/components/controls/verdocs-portal/verdocs-portal.stories.js +0 -20
  284. package/dist/components/verdocs-portal.d.ts +0 -11
  285. package/dist/components/verdocs-portal.js +0 -6
  286. package/dist/components/verdocs-portal2.js +0 -93
  287. package/dist/custom-elements.json +0 -2067
  288. package/dist/esm/Types-1628dc71.js +0 -5
  289. package/dist/esm/interact.min-6a7b19a1.js +0 -10
  290. package/dist/esm/verdocs-quick-functions_2.entry.js +0 -74
  291. package/dist/esm-es5/Profiles-d4df4d1c.js +0 -1
  292. package/dist/esm-es5/Types-1628dc71.js +0 -1
  293. package/dist/esm-es5/VerdocsEndpoint-7922d31f.js +0 -1
  294. package/dist/esm-es5/_commonjsHelpers-8a9f3b18.js +0 -1
  295. package/dist/esm-es5/interact.min-6a7b19a1.js +0 -1
  296. package/dist/esm-es5/verdocs-contact-picker_3.entry.js +0 -1
  297. package/dist/esm-es5/verdocs-quick-functions_2.entry.js +0 -1
  298. package/dist/types/components/controls/verdocs-portal/verdocs-portal.d.ts +0 -37
  299. package/dist/verdocs-web-sdk/p-0c157d55.system.entry.js +0 -1
  300. package/dist/verdocs-web-sdk/p-14b08edd.system.entry.js +0 -1
  301. package/dist/verdocs-web-sdk/p-19ff8f86.system.js +0 -1
  302. package/dist/verdocs-web-sdk/p-1a3168af.system.entry.js +0 -1
  303. package/dist/verdocs-web-sdk/p-1ba9f457.system.js +0 -1
  304. package/dist/verdocs-web-sdk/p-2fe75327.entry.js +0 -1
  305. package/dist/verdocs-web-sdk/p-3019b350.entry.js +0 -1
  306. package/dist/verdocs-web-sdk/p-32b26f8f.system.entry.js +0 -1
  307. package/dist/verdocs-web-sdk/p-3e607686.js +0 -1
  308. package/dist/verdocs-web-sdk/p-3f5fb65b.entry.js +0 -1
  309. package/dist/verdocs-web-sdk/p-4a3238f6.entry.js +0 -1
  310. package/dist/verdocs-web-sdk/p-59c44eee.system.entry.js +0 -1
  311. package/dist/verdocs-web-sdk/p-5aee3e25.js +0 -1
  312. package/dist/verdocs-web-sdk/p-5f434764.system.entry.js +0 -1
  313. package/dist/verdocs-web-sdk/p-6827df7b.entry.js +0 -1
  314. package/dist/verdocs-web-sdk/p-6a13105b.entry.js +0 -1
  315. package/dist/verdocs-web-sdk/p-6b1735f4.entry.js +0 -1
  316. package/dist/verdocs-web-sdk/p-7d5dbd9a.js +0 -1
  317. package/dist/verdocs-web-sdk/p-839f6f0d.js +0 -1
  318. package/dist/verdocs-web-sdk/p-90d54d8a.system.entry.js +0 -1
  319. package/dist/verdocs-web-sdk/p-915883e6.js +0 -1
  320. package/dist/verdocs-web-sdk/p-974b4c02.entry.js +0 -1
  321. package/dist/verdocs-web-sdk/p-992f92f4.entry.js +0 -1
  322. package/dist/verdocs-web-sdk/p-9dcb8b6c.system.entry.js +0 -1
  323. package/dist/verdocs-web-sdk/p-b101fae2.js +0 -1
  324. package/dist/verdocs-web-sdk/p-cd20fb77.system.js +0 -1
  325. package/dist/verdocs-web-sdk/p-d8cd6b59.system.js +0 -1
  326. package/dist/verdocs-web-sdk/p-dd277e69.entry.js +0 -1
  327. package/dist/verdocs-web-sdk/p-e2ae3679.entry.js +0 -1
  328. package/dist/verdocs-web-sdk/p-e2ff37fb.system.js +0 -1
  329. package/dist/verdocs-web-sdk/p-fa1621c8.system.entry.js +0 -1
  330. package/dist/verdocs-web-sdk/p-fdf0a9de.entry.js +0 -1
@@ -147,6 +147,23 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
147
147
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
148
148
  }
149
149
  };
150
+ /**
151
+ * Get all templates accessible by the caller, with optional filters.
152
+ *
153
+ * ```typescript
154
+ * import {Templates} from '@verdocs/js-sdk/Templates';
155
+ *
156
+ * await Templates.getTemplates((VerdocsEndpoint.getDefault());
157
+ * await Templates.getTemplates((VerdocsEndpoint.getDefault(), { is_starred: true });
158
+ * await Templates.getTemplates((VerdocsEndpoint.getDefault(), { is_creator: true });
159
+ * await Templates.getTemplates((VerdocsEndpoint.getDefault(), { is_organization: true });
160
+ * ```
161
+ */
162
+ var getTemplates = function (endpoint, params) {
163
+ return endpoint.api //
164
+ .post('/templates', { params: params })
165
+ .then(function (r) { return r.data; });
166
+ };
150
167
  // export interface IListTemplatesParams {
151
168
  // name?: string;
152
169
  // sharing?: 'all' | 'personal' | 'shared' | 'public';
@@ -198,10 +215,10 @@ var ALLOWED_CREATE_FIELDS = [
198
215
  * ```typescript
199
216
  * import {Templates} from '@verdocs/js-sdk/Templates';
200
217
  *
201
- * const newTemplate = await Templates.createTemplatev2((VerdocsEndpoint.getDefault(), {...});
218
+ * const newTemplate = await Templates.createTemplate((VerdocsEndpoint.getDefault(), {...});
202
219
  * ```
203
220
  */
204
- var createTemplatev2 = function (endpoint, params, onUploadProgress) {
221
+ var createTemplate = function (endpoint, params, onUploadProgress) {
205
222
  var options = {
206
223
  timeout: 120000,
207
224
  onUploadProgress: function (event) {
@@ -211,19 +228,22 @@ var createTemplatev2 = function (endpoint, params, onUploadProgress) {
211
228
  },
212
229
  };
213
230
  if (params.documents && params.documents[0] instanceof File) {
214
- var formData_2 = new FormData();
231
+ if (params.documents.length > 10) {
232
+ throw new Error('createTemplate() has a maximum of 10 documents that can be attached.');
233
+ }
234
+ var formData_1 = new FormData();
215
235
  ALLOWED_CREATE_FIELDS.forEach(function (allowedKey) {
216
236
  if (params[allowedKey] !== undefined) {
217
- formData_2.append(allowedKey, params[allowedKey]);
237
+ formData_1.append(allowedKey, params[allowedKey]);
218
238
  }
219
239
  });
220
240
  params.documents.forEach(function (file) {
221
- formData_2.append('documents', file, file.name);
241
+ formData_1.append('documents', file, file.name);
222
242
  });
223
- return endpoint.api.post('/v2/templates', formData_2, options).then(function (r) { return r.data; });
243
+ return endpoint.api.post('/templates', formData_1, options).then(function (r) { return r.data; });
224
244
  }
225
245
  else {
226
- return endpoint.api.post('/v2/templates', params, options).then(function (r) { return r.data; });
246
+ return endpoint.api.post('/templates', params, options).then(function (r) { return r.data; });
227
247
  }
228
248
  };
229
249
  /**
@@ -398,137 +418,277 @@ const denyList = new Set([
398
418
  // TODO: Use `error?.code` when targeting Node.js 14
399
419
  var isRetryAllowed = error => !denyList.has(error && error.code);
400
420
 
401
- const namespace = 'axios-retry';
421
+ 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); } }
422
+
423
+ 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); }); }; }
424
+
425
+ 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; }
426
+
427
+ 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; }
428
+
429
+ 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; }
430
+ var namespace = 'axios-retry';
431
+ /**
432
+ * @param {Error} error
433
+ * @return {boolean}
434
+ */
435
+
402
436
  function isNetworkError(error) {
403
- const CODE_EXCLUDE_LIST = ['ERR_CANCELED', 'ECONNABORTED'];
404
- if (error.response) {
405
- return false;
406
- }
407
- if (!error.code) {
408
- return false;
409
- }
410
- // Prevents retrying timed out & cancelled requests
411
- if (CODE_EXCLUDE_LIST.includes(error.code)) {
412
- return false;
413
- }
414
- // Prevents retrying unsafe errors
415
- return isRetryAllowed(error);
437
+ return !error.response && Boolean(error.code) && // Prevents retrying cancelled requests
438
+ error.code !== 'ECONNABORTED' && // Prevents retrying timed out requests
439
+ isRetryAllowed(error); // Prevents retrying unsafe errors
416
440
  }
417
- const SAFE_HTTP_METHODS = ['get', 'head', 'options'];
418
- const IDEMPOTENT_HTTP_METHODS = SAFE_HTTP_METHODS.concat(['put', 'delete']);
441
+ var SAFE_HTTP_METHODS = ['get', 'head', 'options'];
442
+ var IDEMPOTENT_HTTP_METHODS = SAFE_HTTP_METHODS.concat(['put', 'delete']);
443
+ /**
444
+ * @param {Error} error
445
+ * @return {boolean}
446
+ */
447
+
419
448
  function isRetryableError(error) {
420
- return (error.code !== 'ECONNABORTED' &&
421
- (!error.response || (error.response.status >= 500 && error.response.status <= 599)));
449
+ return error.code !== 'ECONNABORTED' && (!error.response || error.response.status >= 500 && error.response.status <= 599);
422
450
  }
451
+ /**
452
+ * @param {Error} error
453
+ * @return {boolean}
454
+ */
455
+
423
456
  function isSafeRequestError(error) {
424
- if (!error.config?.method) {
425
- // Cannot determine if the request can be retried
426
- return false;
427
- }
428
- return isRetryableError(error) && SAFE_HTTP_METHODS.indexOf(error.config.method) !== -1;
457
+ if (!error.config) {
458
+ // Cannot determine if the request can be retried
459
+ return false;
460
+ }
461
+
462
+ return isRetryableError(error) && SAFE_HTTP_METHODS.indexOf(error.config.method) !== -1;
429
463
  }
464
+ /**
465
+ * @param {Error} error
466
+ * @return {boolean}
467
+ */
468
+
430
469
  function isIdempotentRequestError(error) {
431
- if (!error.config?.method) {
432
- // Cannot determine if the request can be retried
433
- return false;
434
- }
435
- return isRetryableError(error) && IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method) !== -1;
470
+ if (!error.config) {
471
+ // Cannot determine if the request can be retried
472
+ return false;
473
+ }
474
+
475
+ return isRetryableError(error) && IDEMPOTENT_HTTP_METHODS.indexOf(error.config.method) !== -1;
436
476
  }
477
+ /**
478
+ * @param {Error} error
479
+ * @return {boolean}
480
+ */
481
+
437
482
  function isNetworkOrIdempotentRequestError(error) {
438
- return isNetworkError(error) || isIdempotentRequestError(error);
483
+ return isNetworkError(error) || isIdempotentRequestError(error);
439
484
  }
485
+ /**
486
+ * @return {number} - delay in milliseconds, always 0
487
+ */
488
+
440
489
  function noDelay() {
441
- return 0;
490
+ return 0;
442
491
  }
443
- function exponentialDelay(retryNumber = 0, _error = undefined, delayFactor = 100) {
444
- const delay = 2 ** retryNumber * delayFactor;
445
- const randomSum = delay * 0.2 * Math.random(); // 0-20% of the delay
446
- return delay + randomSum;
492
+ /**
493
+ * @param {number} [retryNumber=0]
494
+ * @return {number} - delay in milliseconds
495
+ */
496
+
497
+
498
+ function exponentialDelay() {
499
+ var retryNumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
500
+ var delay = Math.pow(2, retryNumber) * 100;
501
+ var randomSum = delay * 0.2 * Math.random(); // 0-20% of the delay
502
+
503
+ return delay + randomSum;
447
504
  }
448
- const DEFAULT_OPTIONS = {
449
- retries: 3,
450
- retryCondition: isNetworkOrIdempotentRequestError,
451
- retryDelay: noDelay,
452
- shouldResetTimeout: false,
453
- onRetry: () => { }
454
- };
505
+ /**
506
+ * Initializes and returns the retry state for the given request/config
507
+ * @param {AxiosRequestConfig} config
508
+ * @return {Object}
509
+ */
510
+
511
+ function getCurrentState(config) {
512
+ var currentState = config[namespace] || {};
513
+ currentState.retryCount = currentState.retryCount || 0;
514
+ config[namespace] = currentState;
515
+ return currentState;
516
+ }
517
+ /**
518
+ * Returns the axios-retry options for the current request
519
+ * @param {AxiosRequestConfig} config
520
+ * @param {AxiosRetryConfig} defaultOptions
521
+ * @return {AxiosRetryConfig}
522
+ */
523
+
524
+
455
525
  function getRequestOptions(config, defaultOptions) {
456
- return { ...DEFAULT_OPTIONS, ...defaultOptions, ...config[namespace] };
526
+ return _objectSpread(_objectSpread({}, defaultOptions), config[namespace]);
457
527
  }
458
- function setCurrentState(config, defaultOptions) {
459
- const currentState = getRequestOptions(config, defaultOptions || {});
460
- currentState.retryCount = currentState.retryCount || 0;
461
- currentState.lastRequestTime = currentState.lastRequestTime || Date.now();
462
- config[namespace] = currentState;
463
- return currentState;
528
+ /**
529
+ * @param {Axios} axios
530
+ * @param {AxiosRequestConfig} config
531
+ */
532
+
533
+
534
+ function fixConfig(axios, config) {
535
+ if (axios.defaults.agent === config.agent) {
536
+ delete config.agent;
537
+ }
538
+
539
+ if (axios.defaults.httpAgent === config.httpAgent) {
540
+ delete config.httpAgent;
541
+ }
542
+
543
+ if (axios.defaults.httpsAgent === config.httpsAgent) {
544
+ delete config.httpsAgent;
545
+ }
464
546
  }
465
- function fixConfig(axiosInstance, config) {
466
- // @ts-ignore
467
- if (axiosInstance.defaults.agent === config.agent) {
468
- // @ts-ignore
469
- delete config.agent;
470
- }
471
- if (axiosInstance.defaults.httpAgent === config.httpAgent) {
472
- delete config.httpAgent;
473
- }
474
- if (axiosInstance.defaults.httpsAgent === config.httpsAgent) {
475
- delete config.httpsAgent;
476
- }
547
+ /**
548
+ * Checks retryCondition if request can be retried. Handles it's retruning value or Promise.
549
+ * @param {number} retries
550
+ * @param {Function} retryCondition
551
+ * @param {Object} currentState
552
+ * @param {Error} error
553
+ * @return {boolean}
554
+ */
555
+
556
+
557
+ function shouldRetry(_x, _x2, _x3, _x4) {
558
+ return _shouldRetry.apply(this, arguments);
477
559
  }
478
- async function shouldRetry(currentState, error) {
479
- const { retries, retryCondition } = currentState;
480
- const shouldRetryOrPromise = (currentState.retryCount || 0) < retries && retryCondition(error);
481
- // This could be a promise
560
+ /**
561
+ * Adds response interceptors to an axios instance to retry requests failed due to network issues
562
+ *
563
+ * @example
564
+ *
565
+ * import axios from 'axios';
566
+ *
567
+ * axiosRetry(axios, { retries: 3 });
568
+ *
569
+ * axios.get('http://example.com/test') // The first request fails and the second returns 'ok'
570
+ * .then(result => {
571
+ * result.data; // 'ok'
572
+ * });
573
+ *
574
+ * // Exponential back-off retry delay between requests
575
+ * axiosRetry(axios, { retryDelay : axiosRetry.exponentialDelay});
576
+ *
577
+ * // Custom retry delay
578
+ * axiosRetry(axios, { retryDelay : (retryCount) => {
579
+ * return retryCount * 1000;
580
+ * }});
581
+ *
582
+ * // Also works with custom axios instances
583
+ * const client = axios.create({ baseURL: 'http://example.com' });
584
+ * axiosRetry(client, { retries: 3 });
585
+ *
586
+ * client.get('/test') // The first request fails and the second returns 'ok'
587
+ * .then(result => {
588
+ * result.data; // 'ok'
589
+ * });
590
+ *
591
+ * // Allows request-specific configuration
592
+ * client
593
+ * .get('/test', {
594
+ * 'axios-retry': {
595
+ * retries: 0
596
+ * }
597
+ * })
598
+ * .catch(error => { // The first request fails
599
+ * error !== undefined
600
+ * });
601
+ *
602
+ * @param {Axios} axios An axios instance (the axios object or one created from axios.create)
603
+ * @param {Object} [defaultOptions]
604
+ * @param {number} [defaultOptions.retries=3] Number of retries
605
+ * @param {boolean} [defaultOptions.shouldResetTimeout=false]
606
+ * Defines if the timeout should be reset between retries
607
+ * @param {Function} [defaultOptions.retryCondition=isNetworkOrIdempotentRequestError]
608
+ * A function to determine if the error can be retried
609
+ * @param {Function} [defaultOptions.retryDelay=noDelay]
610
+ * A function to determine the delay between retry requests
611
+ * @param {Function} [defaultOptions.onRetry=()=>{}]
612
+ * A function to get notified when a retry occurs
613
+ */
614
+
615
+
616
+ function _shouldRetry() {
617
+ _shouldRetry = _asyncToGenerator(function* (retries, retryCondition, currentState, error) {
618
+ var shouldRetryOrPromise = currentState.retryCount < retries && retryCondition(error); // This could be a promise
619
+
482
620
  if (typeof shouldRetryOrPromise === 'object') {
483
- try {
484
- const shouldRetryPromiseResult = await shouldRetryOrPromise;
485
- // keep return true unless shouldRetryPromiseResult return false for compatibility
486
- return shouldRetryPromiseResult !== false;
487
- }
488
- catch (_err) {
489
- return false;
490
- }
621
+ try {
622
+ var shouldRetryPromiseResult = yield shouldRetryOrPromise; // keep return true unless shouldRetryPromiseResult return false for compatibility
623
+
624
+ return shouldRetryPromiseResult !== false;
625
+ } catch (_err) {
626
+ return false;
627
+ }
491
628
  }
629
+
492
630
  return shouldRetryOrPromise;
631
+ });
632
+ return _shouldRetry.apply(this, arguments);
493
633
  }
494
- const axiosRetry = (axiosInstance, defaultOptions) => {
495
- const requestInterceptorId = axiosInstance.interceptors.request.use((config) => {
496
- setCurrentState(config, defaultOptions);
497
- return config;
498
- });
499
- const responseInterceptorId = axiosInstance.interceptors.response.use(null, async (error) => {
500
- const { config } = error;
501
- // If we have no information to retry the request
502
- if (!config) {
634
+
635
+ function axiosRetry(axios, defaultOptions) {
636
+ axios.interceptors.request.use(config => {
637
+ var currentState = getCurrentState(config);
638
+ currentState.lastRequestTime = Date.now();
639
+ return config;
640
+ });
641
+ axios.interceptors.response.use(null, /*#__PURE__*/function () {
642
+ var _ref = _asyncToGenerator(function* (error) {
643
+ var {
644
+ config
645
+ } = error; // If we have no information to retry the request
646
+
647
+ if (!config) {
648
+ return Promise.reject(error);
649
+ }
650
+
651
+ var {
652
+ retries = 3,
653
+ retryCondition = isNetworkOrIdempotentRequestError,
654
+ retryDelay = noDelay,
655
+ shouldResetTimeout = false,
656
+ onRetry = () => {}
657
+ } = getRequestOptions(config, defaultOptions);
658
+ var currentState = getCurrentState(config);
659
+
660
+ if (yield shouldRetry(retries, retryCondition, currentState, error)) {
661
+ currentState.retryCount += 1;
662
+ var delay = retryDelay(currentState.retryCount, error); // Axios fails merging this configuration to the default configuration because it has an issue
663
+ // with circular structures: https://github.com/mzabriskie/axios/issues/370
664
+
665
+ fixConfig(axios, config);
666
+
667
+ if (!shouldResetTimeout && config.timeout && currentState.lastRequestTime) {
668
+ var lastRequestDuration = Date.now() - currentState.lastRequestTime;
669
+ var timeout = config.timeout - lastRequestDuration - delay;
670
+
671
+ if (timeout <= 0) {
503
672
  return Promise.reject(error);
673
+ }
674
+
675
+ config.timeout = timeout;
504
676
  }
505
- const currentState = setCurrentState(config, defaultOptions);
506
- if (await shouldRetry(currentState, error)) {
507
- currentState.retryCount += 1;
508
- const { retryDelay, shouldResetTimeout, onRetry } = currentState;
509
- const delay = retryDelay(currentState.retryCount, error);
510
- // Axios fails merging this configuration to the default configuration because it has an issue
511
- // with circular structures: https://github.com/mzabriskie/axios/issues/370
512
- fixConfig(axiosInstance, config);
513
- if (!shouldResetTimeout && config.timeout && currentState.lastRequestTime) {
514
- const lastRequestDuration = Date.now() - currentState.lastRequestTime;
515
- const timeout = config.timeout - lastRequestDuration - delay;
516
- if (timeout <= 0) {
517
- return Promise.reject(error);
518
- }
519
- config.timeout = timeout;
520
- }
521
- config.transformRequest = [(data) => data];
522
- await onRetry(currentState.retryCount, error, config);
523
- return new Promise((resolve) => {
524
- setTimeout(() => resolve(axiosInstance(config)), delay);
525
- });
526
- }
527
- return Promise.reject(error);
677
+
678
+ config.transformRequest = [data => data];
679
+ onRetry(currentState.retryCount, error, config);
680
+ return new Promise(resolve => setTimeout(() => resolve(axios(config)), delay));
681
+ }
682
+
683
+ return Promise.reject(error);
528
684
  });
529
- return { requestInterceptorId, responseInterceptorId };
530
- };
531
- // Compatibility with CommonJS
685
+
686
+ return function (_x5) {
687
+ return _ref.apply(this, arguments);
688
+ };
689
+ }());
690
+ } // Compatibility with CommonJS
691
+
532
692
  axiosRetry.isNetworkError = isNetworkError;
533
693
  axiosRetry.isSafeRequestError = isSafeRequestError;
534
694
  axiosRetry.isIdempotentRequestError = isIdempotentRequestError;
@@ -1208,7 +1368,7 @@ const isAsyncFn = kindOfTest('AsyncFunction');
1208
1368
  const isThenable = (thing) =>
1209
1369
  thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
1210
1370
 
1211
- const utils$1 = {
1371
+ const utils = {
1212
1372
  isArray,
1213
1373
  isArrayBuffer,
1214
1374
  isBuffer,
@@ -1290,7 +1450,7 @@ function AxiosError(message, code, config, request, response) {
1290
1450
  response && (this.response = response);
1291
1451
  }
1292
1452
 
1293
- utils$1.inherits(AxiosError, Error, {
1453
+ utils.inherits(AxiosError, Error, {
1294
1454
  toJSON: function toJSON() {
1295
1455
  return {
1296
1456
  // Standard
@@ -1305,7 +1465,7 @@ utils$1.inherits(AxiosError, Error, {
1305
1465
  columnNumber: this.columnNumber,
1306
1466
  stack: this.stack,
1307
1467
  // Axios
1308
- config: utils$1.toJSONObject(this.config),
1468
+ config: utils.toJSONObject(this.config),
1309
1469
  code: this.code,
1310
1470
  status: this.response && this.response.status ? this.response.status : null
1311
1471
  };
@@ -1340,7 +1500,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
1340
1500
  AxiosError.from = (error, code, config, request, response, customProps) => {
1341
1501
  const axiosError = Object.create(prototype$1);
1342
1502
 
1343
- utils$1.toFlatObject(error, axiosError, function filter(obj) {
1503
+ utils.toFlatObject(error, axiosError, function filter(obj) {
1344
1504
  return obj !== Error.prototype;
1345
1505
  }, prop => {
1346
1506
  return prop !== 'isAxiosError';
@@ -1368,7 +1528,7 @@ const httpAdapter = null;
1368
1528
  * @returns {boolean}
1369
1529
  */
1370
1530
  function isVisitable(thing) {
1371
- return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
1531
+ return utils.isPlainObject(thing) || utils.isArray(thing);
1372
1532
  }
1373
1533
 
1374
1534
  /**
@@ -1379,7 +1539,7 @@ function isVisitable(thing) {
1379
1539
  * @returns {string} the key without the brackets.
1380
1540
  */
1381
1541
  function removeBrackets(key) {
1382
- return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
1542
+ return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
1383
1543
  }
1384
1544
 
1385
1545
  /**
@@ -1408,10 +1568,10 @@ function renderKey(path, key, dots) {
1408
1568
  * @returns {boolean}
1409
1569
  */
1410
1570
  function isFlatArray(arr) {
1411
- return utils$1.isArray(arr) && !arr.some(isVisitable);
1571
+ return utils.isArray(arr) && !arr.some(isVisitable);
1412
1572
  }
1413
1573
 
1414
- const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
1574
+ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
1415
1575
  return /^is[A-Z]/.test(prop);
1416
1576
  });
1417
1577
 
@@ -1439,7 +1599,7 @@ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop)
1439
1599
  * @returns
1440
1600
  */
1441
1601
  function toFormData(obj, formData, options) {
1442
- if (!utils$1.isObject(obj)) {
1602
+ if (!utils.isObject(obj)) {
1443
1603
  throw new TypeError('target must be an object');
1444
1604
  }
1445
1605
 
@@ -1447,13 +1607,13 @@ function toFormData(obj, formData, options) {
1447
1607
  formData = formData || new (FormData)();
1448
1608
 
1449
1609
  // eslint-disable-next-line no-param-reassign
1450
- options = utils$1.toFlatObject(options, {
1610
+ options = utils.toFlatObject(options, {
1451
1611
  metaTokens: true,
1452
1612
  dots: false,
1453
1613
  indexes: false
1454
1614
  }, false, function defined(option, source) {
1455
1615
  // eslint-disable-next-line no-eq-null,eqeqeq
1456
- return !utils$1.isUndefined(source[option]);
1616
+ return !utils.isUndefined(source[option]);
1457
1617
  });
1458
1618
 
1459
1619
  const metaTokens = options.metaTokens;
@@ -1462,24 +1622,24 @@ function toFormData(obj, formData, options) {
1462
1622
  const dots = options.dots;
1463
1623
  const indexes = options.indexes;
1464
1624
  const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
1465
- const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
1625
+ const useBlob = _Blob && utils.isSpecCompliantForm(formData);
1466
1626
 
1467
- if (!utils$1.isFunction(visitor)) {
1627
+ if (!utils.isFunction(visitor)) {
1468
1628
  throw new TypeError('visitor must be a function');
1469
1629
  }
1470
1630
 
1471
1631
  function convertValue(value) {
1472
1632
  if (value === null) return '';
1473
1633
 
1474
- if (utils$1.isDate(value)) {
1634
+ if (utils.isDate(value)) {
1475
1635
  return value.toISOString();
1476
1636
  }
1477
1637
 
1478
- if (!useBlob && utils$1.isBlob(value)) {
1638
+ if (!useBlob && utils.isBlob(value)) {
1479
1639
  throw new AxiosError('Blob is not supported. Use a Buffer instead.');
1480
1640
  }
1481
1641
 
1482
- if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
1642
+ if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
1483
1643
  return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
1484
1644
  }
1485
1645
 
@@ -1500,20 +1660,20 @@ function toFormData(obj, formData, options) {
1500
1660
  let arr = value;
1501
1661
 
1502
1662
  if (value && !path && typeof value === 'object') {
1503
- if (utils$1.endsWith(key, '{}')) {
1663
+ if (utils.endsWith(key, '{}')) {
1504
1664
  // eslint-disable-next-line no-param-reassign
1505
1665
  key = metaTokens ? key : key.slice(0, -2);
1506
1666
  // eslint-disable-next-line no-param-reassign
1507
1667
  value = JSON.stringify(value);
1508
1668
  } else if (
1509
- (utils$1.isArray(value) && isFlatArray(value)) ||
1510
- ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
1669
+ (utils.isArray(value) && isFlatArray(value)) ||
1670
+ ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
1511
1671
  )) {
1512
1672
  // eslint-disable-next-line no-param-reassign
1513
1673
  key = removeBrackets(key);
1514
1674
 
1515
1675
  arr.forEach(function each(el, index) {
1516
- !(utils$1.isUndefined(el) || el === null) && formData.append(
1676
+ !(utils.isUndefined(el) || el === null) && formData.append(
1517
1677
  // eslint-disable-next-line no-nested-ternary
1518
1678
  indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
1519
1679
  convertValue(el)
@@ -1541,7 +1701,7 @@ function toFormData(obj, formData, options) {
1541
1701
  });
1542
1702
 
1543
1703
  function build(value, path) {
1544
- if (utils$1.isUndefined(value)) return;
1704
+ if (utils.isUndefined(value)) return;
1545
1705
 
1546
1706
  if (stack.indexOf(value) !== -1) {
1547
1707
  throw Error('Circular reference detected in ' + path.join('.'));
@@ -1549,9 +1709,9 @@ function toFormData(obj, formData, options) {
1549
1709
 
1550
1710
  stack.push(value);
1551
1711
 
1552
- utils$1.forEach(value, function each(el, key) {
1553
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
1554
- formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
1712
+ utils.forEach(value, function each(el, key) {
1713
+ const result = !(utils.isUndefined(el) || el === null) && visitor.call(
1714
+ formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
1555
1715
  );
1556
1716
 
1557
1717
  if (result === true) {
@@ -1562,7 +1722,7 @@ function toFormData(obj, formData, options) {
1562
1722
  stack.pop();
1563
1723
  }
1564
1724
 
1565
- if (!utils$1.isObject(obj)) {
1725
+ if (!utils.isObject(obj)) {
1566
1726
  throw new TypeError('data must be an object');
1567
1727
  }
1568
1728
 
@@ -1666,7 +1826,7 @@ function buildURL(url, params, options) {
1666
1826
  if (serializeFn) {
1667
1827
  serializedParams = serializeFn(params, options);
1668
1828
  } else {
1669
- serializedParams = utils$1.isURLSearchParams(params) ?
1829
+ serializedParams = utils.isURLSearchParams(params) ?
1670
1830
  params.toString() :
1671
1831
  new AxiosURLSearchParams(params, options).toString(_encode);
1672
1832
  }
@@ -1741,7 +1901,7 @@ class InterceptorManager {
1741
1901
  * @returns {void}
1742
1902
  */
1743
1903
  forEach(fn) {
1744
- utils$1.forEach(this.handlers, function forEachHandler(h) {
1904
+ utils.forEach(this.handlers, function forEachHandler(h) {
1745
1905
  if (h !== null) {
1746
1906
  fn(h);
1747
1907
  }
@@ -1761,18 +1921,6 @@ const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1761
1921
 
1762
1922
  const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1763
1923
 
1764
- const platform$1 = {
1765
- isBrowser: true,
1766
- classes: {
1767
- URLSearchParams: URLSearchParams$1,
1768
- FormData: FormData$1,
1769
- Blob: Blob$1
1770
- },
1771
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1772
- };
1773
-
1774
- const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
1775
-
1776
1924
  /**
1777
1925
  * Determine if we're running in a standard browser environment
1778
1926
  *
@@ -1790,10 +1938,18 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde
1790
1938
  *
1791
1939
  * @returns {boolean}
1792
1940
  */
1793
- const hasStandardBrowserEnv = (
1794
- (product) => {
1795
- return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
1796
- })(typeof navigator !== 'undefined' && navigator.product);
1941
+ const isStandardBrowserEnv = (() => {
1942
+ let product;
1943
+ if (typeof navigator !== 'undefined' && (
1944
+ (product = navigator.product) === 'ReactNative' ||
1945
+ product === 'NativeScript' ||
1946
+ product === 'NS')
1947
+ ) {
1948
+ return false;
1949
+ }
1950
+
1951
+ return typeof window !== 'undefined' && typeof document !== 'undefined';
1952
+ })();
1797
1953
 
1798
1954
  /**
1799
1955
  * Determine if we're running in a standard browser webWorker environment
@@ -1804,7 +1960,7 @@ const hasStandardBrowserEnv = (
1804
1960
  * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1805
1961
  * This leads to a problem when axios post `FormData` in webWorker
1806
1962
  */
1807
- const hasStandardBrowserWebWorkerEnv = (() => {
1963
+ const isStandardBrowserWebWorkerEnv = (() => {
1808
1964
  return (
1809
1965
  typeof WorkerGlobalScope !== 'undefined' &&
1810
1966
  // eslint-disable-next-line no-undef
@@ -1813,25 +1969,22 @@ const hasStandardBrowserWebWorkerEnv = (() => {
1813
1969
  );
1814
1970
  })();
1815
1971
 
1816
- const utils = /*#__PURE__*/Object.freeze({
1817
- __proto__: null,
1818
- hasBrowserEnv: hasBrowserEnv,
1819
- hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1820
- hasStandardBrowserEnv: hasStandardBrowserEnv
1821
- });
1822
1972
 
1823
1973
  const platform = {
1824
- ...utils,
1825
- ...platform$1
1974
+ isBrowser: true,
1975
+ classes: {
1976
+ URLSearchParams: URLSearchParams$1,
1977
+ FormData: FormData$1,
1978
+ Blob: Blob$1
1979
+ },
1980
+ isStandardBrowserEnv,
1981
+ isStandardBrowserWebWorkerEnv,
1982
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1826
1983
  };
1827
1984
 
1828
1985
  function toURLEncodedForm(data, options) {
1829
1986
  return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
1830
1987
  visitor: function(value, key, path, helpers) {
1831
- if (platform.isNode && utils$1.isBuffer(value)) {
1832
- this.append(key, value.toString('base64'));
1833
- return false;
1834
- }
1835
1988
 
1836
1989
  return helpers.defaultVisitor.apply(this, arguments);
1837
1990
  }
@@ -1850,7 +2003,7 @@ function parsePropPath(name) {
1850
2003
  // foo.x.y.z
1851
2004
  // foo-x-y-z
1852
2005
  // foo x y z
1853
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
2006
+ return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
1854
2007
  return match[0] === '[]' ? '' : match[1] || match[0];
1855
2008
  });
1856
2009
  }
@@ -1887,10 +2040,10 @@ function formDataToJSON(formData) {
1887
2040
  let name = path[index++];
1888
2041
  const isNumericKey = Number.isFinite(+name);
1889
2042
  const isLast = index >= path.length;
1890
- name = !name && utils$1.isArray(target) ? target.length : name;
2043
+ name = !name && utils.isArray(target) ? target.length : name;
1891
2044
 
1892
2045
  if (isLast) {
1893
- if (utils$1.hasOwnProp(target, name)) {
2046
+ if (utils.hasOwnProp(target, name)) {
1894
2047
  target[name] = [target[name], value];
1895
2048
  } else {
1896
2049
  target[name] = value;
@@ -1899,23 +2052,23 @@ function formDataToJSON(formData) {
1899
2052
  return !isNumericKey;
1900
2053
  }
1901
2054
 
1902
- if (!target[name] || !utils$1.isObject(target[name])) {
2055
+ if (!target[name] || !utils.isObject(target[name])) {
1903
2056
  target[name] = [];
1904
2057
  }
1905
2058
 
1906
2059
  const result = buildPath(path, value, target[name], index);
1907
2060
 
1908
- if (result && utils$1.isArray(target[name])) {
2061
+ if (result && utils.isArray(target[name])) {
1909
2062
  target[name] = arrayToObject(target[name]);
1910
2063
  }
1911
2064
 
1912
2065
  return !isNumericKey;
1913
2066
  }
1914
2067
 
1915
- if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
2068
+ if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
1916
2069
  const obj = {};
1917
2070
 
1918
- utils$1.forEachEntry(formData, (name, value) => {
2071
+ utils.forEachEntry(formData, (name, value) => {
1919
2072
  buildPath(parsePropPath(name), value, obj, 0);
1920
2073
  });
1921
2074
 
@@ -1936,10 +2089,10 @@ function formDataToJSON(formData) {
1936
2089
  * @returns {string} A stringified version of the rawValue.
1937
2090
  */
1938
2091
  function stringifySafely(rawValue, parser, encoder) {
1939
- if (utils$1.isString(rawValue)) {
2092
+ if (utils.isString(rawValue)) {
1940
2093
  try {
1941
2094
  (parser || JSON.parse)(rawValue);
1942
- return utils$1.trim(rawValue);
2095
+ return utils.trim(rawValue);
1943
2096
  } catch (e) {
1944
2097
  if (e.name !== 'SyntaxError') {
1945
2098
  throw e;
@@ -1959,13 +2112,13 @@ const defaults = {
1959
2112
  transformRequest: [function transformRequest(data, headers) {
1960
2113
  const contentType = headers.getContentType() || '';
1961
2114
  const hasJSONContentType = contentType.indexOf('application/json') > -1;
1962
- const isObjectPayload = utils$1.isObject(data);
2115
+ const isObjectPayload = utils.isObject(data);
1963
2116
 
1964
- if (isObjectPayload && utils$1.isHTMLForm(data)) {
2117
+ if (isObjectPayload && utils.isHTMLForm(data)) {
1965
2118
  data = new FormData(data);
1966
2119
  }
1967
2120
 
1968
- const isFormData = utils$1.isFormData(data);
2121
+ const isFormData = utils.isFormData(data);
1969
2122
 
1970
2123
  if (isFormData) {
1971
2124
  if (!hasJSONContentType) {
@@ -1974,18 +2127,18 @@ const defaults = {
1974
2127
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
1975
2128
  }
1976
2129
 
1977
- if (utils$1.isArrayBuffer(data) ||
1978
- utils$1.isBuffer(data) ||
1979
- utils$1.isStream(data) ||
1980
- utils$1.isFile(data) ||
1981
- utils$1.isBlob(data)
2130
+ if (utils.isArrayBuffer(data) ||
2131
+ utils.isBuffer(data) ||
2132
+ utils.isStream(data) ||
2133
+ utils.isFile(data) ||
2134
+ utils.isBlob(data)
1982
2135
  ) {
1983
2136
  return data;
1984
2137
  }
1985
- if (utils$1.isArrayBufferView(data)) {
2138
+ if (utils.isArrayBufferView(data)) {
1986
2139
  return data.buffer;
1987
2140
  }
1988
- if (utils$1.isURLSearchParams(data)) {
2141
+ if (utils.isURLSearchParams(data)) {
1989
2142
  headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
1990
2143
  return data.toString();
1991
2144
  }
@@ -1997,7 +2150,7 @@ const defaults = {
1997
2150
  return toURLEncodedForm(data, this.formSerializer).toString();
1998
2151
  }
1999
2152
 
2000
- if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
2153
+ if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
2001
2154
  const _FormData = this.env && this.env.FormData;
2002
2155
 
2003
2156
  return toFormData(
@@ -2021,7 +2174,7 @@ const defaults = {
2021
2174
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
2022
2175
  const JSONRequested = this.responseType === 'json';
2023
2176
 
2024
- if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
2177
+ if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
2025
2178
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
2026
2179
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
2027
2180
 
@@ -2069,13 +2222,13 @@ const defaults = {
2069
2222
  }
2070
2223
  };
2071
2224
 
2072
- utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
2225
+ utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
2073
2226
  defaults.headers[method] = {};
2074
2227
  });
2075
2228
 
2076
2229
  // RawAxiosHeaders whose duplicates are ignored by node
2077
2230
  // c.f. https://nodejs.org/api/http.html#http_message_headers
2078
- const ignoreDuplicateOf = utils$1.toObjectSet([
2231
+ const ignoreDuplicateOf = utils.toObjectSet([
2079
2232
  'age', 'authorization', 'content-length', 'content-type', 'etag',
2080
2233
  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
2081
2234
  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
@@ -2136,7 +2289,7 @@ function normalizeValue(value) {
2136
2289
  return value;
2137
2290
  }
2138
2291
 
2139
- return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
2292
+ return utils.isArray(value) ? value.map(normalizeValue) : String(value);
2140
2293
  }
2141
2294
 
2142
2295
  function parseTokens(str) {
@@ -2154,7 +2307,7 @@ function parseTokens(str) {
2154
2307
  const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
2155
2308
 
2156
2309
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
2157
- if (utils$1.isFunction(filter)) {
2310
+ if (utils.isFunction(filter)) {
2158
2311
  return filter.call(this, value, header);
2159
2312
  }
2160
2313
 
@@ -2162,13 +2315,13 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
2162
2315
  value = header;
2163
2316
  }
2164
2317
 
2165
- if (!utils$1.isString(value)) return;
2318
+ if (!utils.isString(value)) return;
2166
2319
 
2167
- if (utils$1.isString(filter)) {
2320
+ if (utils.isString(filter)) {
2168
2321
  return value.indexOf(filter) !== -1;
2169
2322
  }
2170
2323
 
2171
- if (utils$1.isRegExp(filter)) {
2324
+ if (utils.isRegExp(filter)) {
2172
2325
  return filter.test(value);
2173
2326
  }
2174
2327
  }
@@ -2181,7 +2334,7 @@ function formatHeader(header) {
2181
2334
  }
2182
2335
 
2183
2336
  function buildAccessors(obj, header) {
2184
- const accessorName = utils$1.toCamelCase(' ' + header);
2337
+ const accessorName = utils.toCamelCase(' ' + header);
2185
2338
 
2186
2339
  ['get', 'set', 'has'].forEach(methodName => {
2187
2340
  Object.defineProperty(obj, methodName + accessorName, {
@@ -2208,7 +2361,7 @@ class AxiosHeaders {
2208
2361
  throw new Error('header name must be a non-empty string');
2209
2362
  }
2210
2363
 
2211
- const key = utils$1.findKey(self, lHeader);
2364
+ const key = utils.findKey(self, lHeader);
2212
2365
 
2213
2366
  if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
2214
2367
  self[key || _header] = normalizeValue(_value);
@@ -2216,11 +2369,11 @@ class AxiosHeaders {
2216
2369
  }
2217
2370
 
2218
2371
  const setHeaders = (headers, _rewrite) =>
2219
- utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
2372
+ utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
2220
2373
 
2221
- if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
2374
+ if (utils.isPlainObject(header) || header instanceof this.constructor) {
2222
2375
  setHeaders(header, valueOrRewrite);
2223
- } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
2376
+ } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
2224
2377
  setHeaders(parseHeaders(header), valueOrRewrite);
2225
2378
  } else {
2226
2379
  header != null && setHeader(valueOrRewrite, header, rewrite);
@@ -2233,7 +2386,7 @@ class AxiosHeaders {
2233
2386
  header = normalizeHeader(header);
2234
2387
 
2235
2388
  if (header) {
2236
- const key = utils$1.findKey(this, header);
2389
+ const key = utils.findKey(this, header);
2237
2390
 
2238
2391
  if (key) {
2239
2392
  const value = this[key];
@@ -2246,11 +2399,11 @@ class AxiosHeaders {
2246
2399
  return parseTokens(value);
2247
2400
  }
2248
2401
 
2249
- if (utils$1.isFunction(parser)) {
2402
+ if (utils.isFunction(parser)) {
2250
2403
  return parser.call(this, value, key);
2251
2404
  }
2252
2405
 
2253
- if (utils$1.isRegExp(parser)) {
2406
+ if (utils.isRegExp(parser)) {
2254
2407
  return parser.exec(value);
2255
2408
  }
2256
2409
 
@@ -2263,7 +2416,7 @@ class AxiosHeaders {
2263
2416
  header = normalizeHeader(header);
2264
2417
 
2265
2418
  if (header) {
2266
- const key = utils$1.findKey(this, header);
2419
+ const key = utils.findKey(this, header);
2267
2420
 
2268
2421
  return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
2269
2422
  }
@@ -2279,7 +2432,7 @@ class AxiosHeaders {
2279
2432
  _header = normalizeHeader(_header);
2280
2433
 
2281
2434
  if (_header) {
2282
- const key = utils$1.findKey(self, _header);
2435
+ const key = utils.findKey(self, _header);
2283
2436
 
2284
2437
  if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
2285
2438
  delete self[key];
@@ -2289,7 +2442,7 @@ class AxiosHeaders {
2289
2442
  }
2290
2443
  }
2291
2444
 
2292
- if (utils$1.isArray(header)) {
2445
+ if (utils.isArray(header)) {
2293
2446
  header.forEach(deleteHeader);
2294
2447
  } else {
2295
2448
  deleteHeader(header);
@@ -2318,8 +2471,8 @@ class AxiosHeaders {
2318
2471
  const self = this;
2319
2472
  const headers = {};
2320
2473
 
2321
- utils$1.forEach(this, (value, header) => {
2322
- const key = utils$1.findKey(headers, header);
2474
+ utils.forEach(this, (value, header) => {
2475
+ const key = utils.findKey(headers, header);
2323
2476
 
2324
2477
  if (key) {
2325
2478
  self[key] = normalizeValue(value);
@@ -2348,8 +2501,8 @@ class AxiosHeaders {
2348
2501
  toJSON(asStrings) {
2349
2502
  const obj = Object.create(null);
2350
2503
 
2351
- utils$1.forEach(this, (value, header) => {
2352
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
2504
+ utils.forEach(this, (value, header) => {
2505
+ value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
2353
2506
  });
2354
2507
 
2355
2508
  return obj;
@@ -2396,7 +2549,7 @@ class AxiosHeaders {
2396
2549
  }
2397
2550
  }
2398
2551
 
2399
- utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
2552
+ utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
2400
2553
 
2401
2554
  return this;
2402
2555
  }
@@ -2405,7 +2558,7 @@ class AxiosHeaders {
2405
2558
  AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
2406
2559
 
2407
2560
  // reserved names hotfix
2408
- utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
2561
+ utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
2409
2562
  let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
2410
2563
  return {
2411
2564
  get: () => value,
@@ -2415,7 +2568,7 @@ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
2415
2568
  }
2416
2569
  });
2417
2570
 
2418
- utils$1.freezeMethods(AxiosHeaders);
2571
+ utils.freezeMethods(AxiosHeaders);
2419
2572
 
2420
2573
  /**
2421
2574
  * Transform the data for a request or a response
@@ -2431,7 +2584,7 @@ function transformData(fns, response) {
2431
2584
  const headers = AxiosHeaders.from(context.headers);
2432
2585
  let data = context.data;
2433
2586
 
2434
- utils$1.forEach(fns, function transform(fn) {
2587
+ utils.forEach(fns, function transform(fn) {
2435
2588
  data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
2436
2589
  });
2437
2590
 
@@ -2459,7 +2612,7 @@ function CanceledError(message, config, request) {
2459
2612
  this.name = 'CanceledError';
2460
2613
  }
2461
2614
 
2462
- utils$1.inherits(CanceledError, AxiosError, {
2615
+ utils.inherits(CanceledError, AxiosError, {
2463
2616
  __CANCEL__: true
2464
2617
  });
2465
2618
 
@@ -2487,44 +2640,53 @@ function settle(resolve, reject, response) {
2487
2640
  }
2488
2641
  }
2489
2642
 
2490
- const cookies = platform.hasStandardBrowserEnv ?
2491
-
2492
- // Standard browser envs support document.cookie
2493
- {
2494
- write(name, value, expires, path, domain, secure) {
2495
- const cookie = [name + '=' + encodeURIComponent(value)];
2643
+ const cookies = platform.isStandardBrowserEnv ?
2496
2644
 
2497
- utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
2645
+ // Standard browser envs support document.cookie
2646
+ (function standardBrowserEnv() {
2647
+ return {
2648
+ write: function write(name, value, expires, path, domain, secure) {
2649
+ const cookie = [];
2650
+ cookie.push(name + '=' + encodeURIComponent(value));
2498
2651
 
2499
- utils$1.isString(path) && cookie.push('path=' + path);
2652
+ if (utils.isNumber(expires)) {
2653
+ cookie.push('expires=' + new Date(expires).toGMTString());
2654
+ }
2500
2655
 
2501
- utils$1.isString(domain) && cookie.push('domain=' + domain);
2656
+ if (utils.isString(path)) {
2657
+ cookie.push('path=' + path);
2658
+ }
2502
2659
 
2503
- secure === true && cookie.push('secure');
2660
+ if (utils.isString(domain)) {
2661
+ cookie.push('domain=' + domain);
2662
+ }
2504
2663
 
2505
- document.cookie = cookie.join('; ');
2506
- },
2664
+ if (secure === true) {
2665
+ cookie.push('secure');
2666
+ }
2507
2667
 
2508
- read(name) {
2509
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
2510
- return (match ? decodeURIComponent(match[3]) : null);
2511
- },
2668
+ document.cookie = cookie.join('; ');
2669
+ },
2512
2670
 
2513
- remove(name) {
2514
- this.write(name, '', Date.now() - 86400000);
2515
- }
2516
- }
2671
+ read: function read(name) {
2672
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
2673
+ return (match ? decodeURIComponent(match[3]) : null);
2674
+ },
2517
2675
 
2518
- :
2676
+ remove: function remove(name) {
2677
+ this.write(name, '', Date.now() - 86400000);
2678
+ }
2679
+ };
2680
+ })() :
2519
2681
 
2520
- // Non-standard browser env (web workers, react-native) lack needed support.
2521
- {
2522
- write() {},
2523
- read() {
2524
- return null;
2525
- },
2526
- remove() {}
2527
- };
2682
+ // Non standard browser env (web workers, react-native) lack needed support.
2683
+ (function nonStandardBrowserEnv() {
2684
+ return {
2685
+ write: function write() {},
2686
+ read: function read() { return null; },
2687
+ remove: function remove() {}
2688
+ };
2689
+ })();
2528
2690
 
2529
2691
  /**
2530
2692
  * Determines whether the specified URL is absolute
@@ -2571,7 +2733,7 @@ function buildFullPath(baseURL, requestedURL) {
2571
2733
  return requestedURL;
2572
2734
  }
2573
2735
 
2574
- const isURLSameOrigin = platform.hasStandardBrowserEnv ?
2736
+ const isURLSameOrigin = platform.isStandardBrowserEnv ?
2575
2737
 
2576
2738
  // Standard browser envs have full support of the APIs needed to test
2577
2739
  // whether the request URL is of the same origin as current location.
@@ -2581,7 +2743,7 @@ const isURLSameOrigin = platform.hasStandardBrowserEnv ?
2581
2743
  let originURL;
2582
2744
 
2583
2745
  /**
2584
- * Parse a URL to discover its components
2746
+ * Parse a URL to discover it's components
2585
2747
  *
2586
2748
  * @param {String} url The URL to be parsed
2587
2749
  * @returns {Object}
@@ -2621,7 +2783,7 @@ const isURLSameOrigin = platform.hasStandardBrowserEnv ?
2621
2783
  * @returns {boolean} True if URL shares the same origin, otherwise false
2622
2784
  */
2623
2785
  return function isURLSameOrigin(requestURL) {
2624
- const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
2786
+ const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
2625
2787
  return (parsed.protocol === originURL.protocol &&
2626
2788
  parsed.host === originURL.host);
2627
2789
  };
@@ -2726,7 +2888,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2726
2888
  return new Promise(function dispatchXhrRequest(resolve, reject) {
2727
2889
  let requestData = config.data;
2728
2890
  const requestHeaders = AxiosHeaders.from(config.headers).normalize();
2729
- let {responseType, withXSRFToken} = config;
2891
+ const responseType = config.responseType;
2730
2892
  let onCanceled;
2731
2893
  function done() {
2732
2894
  if (config.cancelToken) {
@@ -2740,13 +2902,14 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2740
2902
 
2741
2903
  let contentType;
2742
2904
 
2743
- if (utils$1.isFormData(requestData)) {
2744
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2905
+ if (utils.isFormData(requestData)) {
2906
+ if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
2745
2907
  requestHeaders.setContentType(false); // Let the browser set it
2746
- } else if ((contentType = requestHeaders.getContentType()) !== false) {
2908
+ } else if(!requestHeaders.getContentType(/^\s*multipart\/form-data/)){
2909
+ requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks
2910
+ } else if(utils.isString(contentType = requestHeaders.getContentType())){
2747
2911
  // fix semicolon duplication issue for ReactNative FormData implementation
2748
- const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
2749
- requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
2912
+ requestHeaders.setContentType(contentType.replace(/^\s*(multipart\/form-data);+/, '$1'));
2750
2913
  }
2751
2914
  }
2752
2915
 
@@ -2862,16 +3025,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2862
3025
  // Add xsrf header
2863
3026
  // This is only done if running in a standard browser environment.
2864
3027
  // Specifically not if we're in a web worker, or react-native.
2865
- if(platform.hasStandardBrowserEnv) {
2866
- withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
2867
-
2868
- if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
2869
- // Add xsrf header
2870
- const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
3028
+ if (platform.isStandardBrowserEnv) {
3029
+ // Add xsrf header
3030
+ const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
3031
+ && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
2871
3032
 
2872
- if (xsrfValue) {
2873
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
2874
- }
3033
+ if (xsrfValue) {
3034
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
2875
3035
  }
2876
3036
  }
2877
3037
 
@@ -2880,13 +3040,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2880
3040
 
2881
3041
  // Add headers to the request
2882
3042
  if ('setRequestHeader' in request) {
2883
- utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
3043
+ utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
2884
3044
  request.setRequestHeader(key, val);
2885
3045
  });
2886
3046
  }
2887
3047
 
2888
3048
  // Add withCredentials to request if needed
2889
- if (!utils$1.isUndefined(config.withCredentials)) {
3049
+ if (!utils.isUndefined(config.withCredentials)) {
2890
3050
  request.withCredentials = !!config.withCredentials;
2891
3051
  }
2892
3052
 
@@ -2941,7 +3101,7 @@ const knownAdapters = {
2941
3101
  xhr: xhrAdapter
2942
3102
  };
2943
3103
 
2944
- utils$1.forEach(knownAdapters, (fn, value) => {
3104
+ utils.forEach(knownAdapters, (fn, value) => {
2945
3105
  if (fn) {
2946
3106
  try {
2947
3107
  Object.defineProperty(fn, 'name', {value});
@@ -2954,11 +3114,11 @@ utils$1.forEach(knownAdapters, (fn, value) => {
2954
3114
 
2955
3115
  const renderReason = (reason) => `- ${reason}`;
2956
3116
 
2957
- const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
3117
+ const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;
2958
3118
 
2959
3119
  const adapters = {
2960
3120
  getAdapter: (adapters) => {
2961
- adapters = utils$1.isArray(adapters) ? adapters : [adapters];
3121
+ adapters = utils.isArray(adapters) ? adapters : [adapters];
2962
3122
 
2963
3123
  const {length} = adapters;
2964
3124
  let nameOrAdapter;
@@ -3099,11 +3259,11 @@ function mergeConfig(config1, config2) {
3099
3259
  const config = {};
3100
3260
 
3101
3261
  function getMergedValue(target, source, caseless) {
3102
- if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
3103
- return utils$1.merge.call({caseless}, target, source);
3104
- } else if (utils$1.isPlainObject(source)) {
3105
- return utils$1.merge({}, source);
3106
- } else if (utils$1.isArray(source)) {
3262
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
3263
+ return utils.merge.call({caseless}, target, source);
3264
+ } else if (utils.isPlainObject(source)) {
3265
+ return utils.merge({}, source);
3266
+ } else if (utils.isArray(source)) {
3107
3267
  return source.slice();
3108
3268
  }
3109
3269
  return source;
@@ -3111,25 +3271,25 @@ function mergeConfig(config1, config2) {
3111
3271
 
3112
3272
  // eslint-disable-next-line consistent-return
3113
3273
  function mergeDeepProperties(a, b, caseless) {
3114
- if (!utils$1.isUndefined(b)) {
3274
+ if (!utils.isUndefined(b)) {
3115
3275
  return getMergedValue(a, b, caseless);
3116
- } else if (!utils$1.isUndefined(a)) {
3276
+ } else if (!utils.isUndefined(a)) {
3117
3277
  return getMergedValue(undefined, a, caseless);
3118
3278
  }
3119
3279
  }
3120
3280
 
3121
3281
  // eslint-disable-next-line consistent-return
3122
3282
  function valueFromConfig2(a, b) {
3123
- if (!utils$1.isUndefined(b)) {
3283
+ if (!utils.isUndefined(b)) {
3124
3284
  return getMergedValue(undefined, b);
3125
3285
  }
3126
3286
  }
3127
3287
 
3128
3288
  // eslint-disable-next-line consistent-return
3129
3289
  function defaultToConfig2(a, b) {
3130
- if (!utils$1.isUndefined(b)) {
3290
+ if (!utils.isUndefined(b)) {
3131
3291
  return getMergedValue(undefined, b);
3132
- } else if (!utils$1.isUndefined(a)) {
3292
+ } else if (!utils.isUndefined(a)) {
3133
3293
  return getMergedValue(undefined, a);
3134
3294
  }
3135
3295
  }
@@ -3154,7 +3314,6 @@ function mergeConfig(config1, config2) {
3154
3314
  timeout: defaultToConfig2,
3155
3315
  timeoutMessage: defaultToConfig2,
3156
3316
  withCredentials: defaultToConfig2,
3157
- withXSRFToken: defaultToConfig2,
3158
3317
  adapter: defaultToConfig2,
3159
3318
  responseType: defaultToConfig2,
3160
3319
  xsrfCookieName: defaultToConfig2,
@@ -3175,16 +3334,16 @@ function mergeConfig(config1, config2) {
3175
3334
  headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
3176
3335
  };
3177
3336
 
3178
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
3337
+ utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
3179
3338
  const merge = mergeMap[prop] || mergeDeepProperties;
3180
3339
  const configValue = merge(config1[prop], config2[prop], prop);
3181
- (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
3340
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
3182
3341
  });
3183
3342
 
3184
3343
  return config;
3185
3344
  }
3186
3345
 
3187
- const VERSION = "1.6.2";
3346
+ const VERSION = "1.5.1";
3188
3347
 
3189
3348
  const validators$1 = {};
3190
3349
 
@@ -3322,7 +3481,7 @@ class Axios {
3322
3481
  }
3323
3482
 
3324
3483
  if (paramsSerializer != null) {
3325
- if (utils$1.isFunction(paramsSerializer)) {
3484
+ if (utils.isFunction(paramsSerializer)) {
3326
3485
  config.paramsSerializer = {
3327
3486
  serialize: paramsSerializer
3328
3487
  };
@@ -3338,12 +3497,12 @@ class Axios {
3338
3497
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
3339
3498
 
3340
3499
  // Flatten headers
3341
- let contextHeaders = headers && utils$1.merge(
3500
+ let contextHeaders = headers && utils.merge(
3342
3501
  headers.common,
3343
3502
  headers[config.method]
3344
3503
  );
3345
3504
 
3346
- headers && utils$1.forEach(
3505
+ headers && utils.forEach(
3347
3506
  ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
3348
3507
  (method) => {
3349
3508
  delete headers[method];
@@ -3430,7 +3589,7 @@ class Axios {
3430
3589
  }
3431
3590
 
3432
3591
  // Provide aliases for supported request methods
3433
- utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3592
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3434
3593
  /*eslint func-names:0*/
3435
3594
  Axios.prototype[method] = function(url, config) {
3436
3595
  return this.request(mergeConfig(config || {}, {
@@ -3441,7 +3600,7 @@ utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoDa
3441
3600
  };
3442
3601
  });
3443
3602
 
3444
- utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3603
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3445
3604
  /*eslint func-names:0*/
3446
3605
 
3447
3606
  function generateHTTPMethod(isForm) {
@@ -3613,7 +3772,7 @@ function spread(callback) {
3613
3772
  * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
3614
3773
  */
3615
3774
  function isAxiosError(payload) {
3616
- return utils$1.isObject(payload) && (payload.isAxiosError === true);
3775
+ return utils.isObject(payload) && (payload.isAxiosError === true);
3617
3776
  }
3618
3777
 
3619
3778
  const HttpStatusCode = {
@@ -3698,10 +3857,10 @@ function createInstance(defaultConfig) {
3698
3857
  const instance = bind(Axios.prototype.request, context);
3699
3858
 
3700
3859
  // Copy axios.prototype to instance
3701
- utils$1.extend(instance, Axios.prototype, context, {allOwnKeys: true});
3860
+ utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});
3702
3861
 
3703
3862
  // Copy context to instance
3704
- utils$1.extend(instance, context, null, {allOwnKeys: true});
3863
+ utils.extend(instance, context, null, {allOwnKeys: true});
3705
3864
 
3706
3865
  // Factory for creating new instances
3707
3866
  instance.create = function create(instanceConfig) {
@@ -3745,7 +3904,7 @@ axios.mergeConfig = mergeConfig;
3745
3904
 
3746
3905
  axios.AxiosHeaders = AxiosHeaders;
3747
3906
 
3748
- axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
3907
+ axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
3749
3908
 
3750
3909
  axios.getAdapter = adapters.getAdapter;
3751
3910
 
@@ -3846,9 +4005,8 @@ var VerdocsEndpoint = /** @class */ (function () {
3846
4005
  function VerdocsEndpoint(options) {
3847
4006
  this.environment = 'verdocs';
3848
4007
  this.sessionType = 'user';
3849
- this.baseURL = (window.location.origin === 'https://beta.verdocs.com'
3850
- ? 'https://stage-api.verdocs.com'
3851
- : 'https://api.verdocs.com');
4008
+ this.baseURL = 'https://api.verdocs.com';
4009
+ this.baseURLv2 = 'https://api-v2.verdocs.com';
3852
4010
  this.clientID = 'not-set';
3853
4011
  this.timeout = 60000;
3854
4012
  this.token = null;
@@ -3861,13 +4019,13 @@ var VerdocsEndpoint = /** @class */ (function () {
3861
4019
  * with Envelopes.
3862
4020
  */
3863
4021
  this.session = null;
3864
- this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) || this.baseURL;
3865
- this.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || this.timeout;
3866
- this.environment = (options === null || options === void 0 ? void 0 : options.environment) || this.environment;
3867
- this.sessionType = (options === null || options === void 0 ? void 0 : options.sessionType) || this.sessionType;
3868
- this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || this.clientID;
4022
+ this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) || 'https://api.verdocs.com';
4023
+ this.baseURLv2 = (options === null || options === void 0 ? void 0 : options.baseURLv2) || 'https://api-v2.verdocs.com';
4024
+ this.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || 60000;
4025
+ this.environment = (options === null || options === void 0 ? void 0 : options.environment) || 'verdocs';
4026
+ this.sessionType = (options === null || options === void 0 ? void 0 : options.sessionType) || 'user';
4027
+ this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || 'not-set';
3869
4028
  this.api = axios.create({ baseURL: this.baseURL, timeout: this.timeout });
3870
- window.console.log('[JS_SDK] Initializing', this.baseURL, window.location.origin);
3871
4029
  // We set the default retries to zero because we only actually want this feature on certain calls for now
3872
4030
  axiosRetry(this.api, {
3873
4031
  retries: 0,
@@ -3883,7 +4041,7 @@ var VerdocsEndpoint = /** @class */ (function () {
3883
4041
  VerdocsEndpoint.getDefault = function () {
3884
4042
  if (!globalThis_1[ENDPOINT_KEY]) {
3885
4043
  globalThis_1[ENDPOINT_KEY] = new VerdocsEndpoint();
3886
- window.console.debug('[JS_SDK] Created default endpoint', globalThis_1[ENDPOINT_KEY].baseURL);
4044
+ window.console.debug('[JS_SDK] Created default endpoint', globalThis_1[ENDPOINT_KEY]);
3887
4045
  }
3888
4046
  return globalThis_1[ENDPOINT_KEY];
3889
4047
  };
@@ -3905,6 +4063,13 @@ var VerdocsEndpoint = /** @class */ (function () {
3905
4063
  VerdocsEndpoint.prototype.getBaseURL = function () {
3906
4064
  return this.baseURL;
3907
4065
  };
4066
+ /**
4067
+ * Get the current base URL for the v2 APIs.
4068
+ * This should rarely be anything other than 'https://api-v2.verdocs.com'.
4069
+ */
4070
+ VerdocsEndpoint.prototype.getBaseURLv2 = function () {
4071
+ return this.baseURLv2;
4072
+ };
3908
4073
  /**
3909
4074
  * Get the current client ID, if set.
3910
4075
  */
@@ -3972,6 +4137,21 @@ var VerdocsEndpoint = /** @class */ (function () {
3972
4137
  this.api.defaults.baseURL = url;
3973
4138
  return this;
3974
4139
  };
4140
+ /**
4141
+ * Set the base URL for API calls. Should be called only upon direction from Verdocs Customer Solutions Engineering.
4142
+ *
4143
+ * ```typescript
4144
+ * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
4145
+ *
4146
+ * const endpoint = new VerdocsEndpoint();
4147
+ * endpoint.setBaseURL('https://api.verdocs.com');
4148
+ * ```
4149
+ */
4150
+ VerdocsEndpoint.prototype.setBaseURLv2 = function (url) {
4151
+ this.baseURLv2 = url;
4152
+ // NOTE: We do not set this on the Axios instance because v1 is still the standard.
4153
+ return this;
4154
+ };
3975
4155
  /**
3976
4156
  * Set the Client ID for Verdocs API calls.
3977
4157
  *
@@ -4130,4 +4310,4 @@ var VerdocsEndpoint = /** @class */ (function () {
4130
4310
  return VerdocsEndpoint;
4131
4311
  }());
4132
4312
 
4133
- export { TemplateActions as T, VerdocsEndpoint as V, createTemplatev2 as a, TemplateSenderTypes as b, canPerformTemplateAction as c, deleteTemplate as d, getTemplate as g, listTemplates as l, updateTemplate as u };
4313
+ export { TemplateActions as T, VerdocsEndpoint as V, createTemplate as a, TemplateSenderTypes as b, canPerformTemplateAction as c, deleteTemplate as d, getTemplate as e, getTemplates as g, listTemplates as l, updateTemplate as u };