@verdocs/web-sdk 5.0.33 → 5.0.35

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 (500) hide show
  1. package/dist/cjs/index-ccac8641.js +6 -2
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +3 -3
  4. package/dist/cjs/verdocs-button_2.cjs.entry.js +2 -2
  5. package/dist/cjs/verdocs-checkbox_6.cjs.entry.js +9 -9
  6. package/dist/cjs/verdocs-checkbox_6.cjs.entry.js.map +1 -1
  7. package/dist/cjs/verdocs-contact-picker.cjs.entry.js +3920 -0
  8. package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -0
  9. package/dist/cjs/verdocs-dialog.cjs.entry.js +1 -1
  10. package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -1
  11. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +6 -6
  13. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +3 -3
  14. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +2 -2
  15. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +2 -2
  16. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js.map +1 -1
  17. package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +8 -8
  18. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-organization-card_2.cjs.entry.js +2 -2
  20. package/dist/cjs/verdocs-pagination_2.cjs.entry.js +2 -2
  21. package/dist/cjs/verdocs-preview_7.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-preview_7.cjs.entry.js.map +1 -1
  23. package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
  24. package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
  25. package/dist/cjs/verdocs-search-box.cjs.entry.js +1 -1
  26. package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
  27. package/dist/cjs/verdocs-spinner.cjs.entry.js +1 -1
  28. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +2 -2
  29. package/dist/cjs/verdocs-switch.cjs.entry.js +2 -2
  30. package/dist/cjs/verdocs-table.cjs.entry.js +2 -2
  31. package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
  32. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  33. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  34. package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
  35. package/dist/cjs/verdocs-templates-list.cjs.entry.js +7 -7
  36. package/dist/cjs/verdocs-toggle-button.cjs.entry.js +38 -0
  37. package/dist/cjs/verdocs-toggle-button.cjs.entry.js.map +1 -0
  38. package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
  39. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  40. package/dist/collection/components/controls/verdocs-button/verdocs-button.js +1 -1
  41. package/dist/collection/components/controls/verdocs-button-panel/verdocs-button-panel.js +2 -2
  42. package/dist/collection/components/controls/verdocs-checkbox/verdocs-checkbox.js +1 -1
  43. package/dist/collection/components/controls/verdocs-component-error/verdocs-component-error.js +1 -1
  44. package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.js +1 -1
  45. package/dist/collection/components/controls/verdocs-file-chooser/verdocs-file-chooser.js +1 -1
  46. package/dist/collection/components/controls/verdocs-help-icon/verdocs-help-icon.js +1 -1
  47. package/dist/collection/components/controls/verdocs-loader/verdocs-loader.js +1 -1
  48. package/dist/collection/components/controls/verdocs-menu-panel/verdocs-menu-panel.js +1 -1
  49. package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.js +1 -1
  50. package/dist/collection/components/controls/verdocs-pagination/verdocs-pagination.js +1 -1
  51. package/dist/collection/components/controls/verdocs-portal/verdocs-portal.js +1 -1
  52. package/dist/collection/components/controls/verdocs-progress-bar/verdocs-progress-bar.js +1 -1
  53. package/dist/collection/components/controls/verdocs-quick-filter/verdocs-quick-filter.js +1 -1
  54. package/dist/collection/components/controls/verdocs-radio-button/verdocs-radio-button.js +1 -1
  55. package/dist/collection/components/controls/verdocs-select-input/verdocs-select-input.css +2 -2
  56. package/dist/collection/components/controls/verdocs-select-input/verdocs-select-input.js +1 -1
  57. package/dist/collection/components/controls/verdocs-spinner/verdocs-spinner.js +1 -1
  58. package/dist/collection/components/controls/verdocs-switch/verdocs-switch.js +2 -2
  59. package/dist/collection/components/controls/verdocs-table/verdocs-table.js +2 -2
  60. package/dist/collection/components/controls/verdocs-tabs/verdocs-tabs.js +1 -1
  61. package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.js +4 -4
  62. package/dist/collection/components/controls/verdocs-toggle/verdocs-toggle.js +1 -1
  63. package/dist/collection/components/controls/verdocs-toggle-button/verdocs-toggle-button.js +1 -1
  64. package/dist/collection/components/controls/verdocs-toolbar-icon/verdocs-toolbar-icon.js +1 -1
  65. package/dist/collection/components/dialogs/verdocs-dialog/verdocs-dialog.js +1 -1
  66. package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +1 -1
  67. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.css +2 -2
  68. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.js +1 -1
  69. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.js.map +1 -1
  70. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +1 -1
  71. package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +1 -1
  72. package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +1 -1
  73. package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +1 -1
  74. package/dist/collection/components/elements/verdocs-search-box/verdocs-search-box.js +1 -1
  75. package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +1 -1
  76. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +8 -3
  77. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
  78. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.css +6 -10
  79. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +59 -28
  80. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
  81. package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -1
  82. package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +6 -6
  83. package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.js +2 -2
  84. package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.js +1 -1
  85. package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +7 -7
  86. package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
  87. package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
  88. package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +7 -7
  89. package/dist/collection/utils/Unleash.js +18 -0
  90. package/dist/collection/utils/Unleash.js.map +1 -0
  91. package/dist/components/{p-6719b0d7.js → p-0fc88b2b.js} +2 -2
  92. package/dist/components/{p-6719b0d7.js.map → p-0fc88b2b.js.map} +1 -1
  93. package/dist/components/{p-84ae0283.js → p-168f7836.js} +2 -2
  94. package/dist/components/{p-84ae0283.js.map → p-168f7836.js.map} +1 -1
  95. package/dist/components/{p-e39c327c.js → p-170315e3.js} +5 -5
  96. package/dist/components/{p-e39c327c.js.map → p-170315e3.js.map} +1 -1
  97. package/dist/components/{p-0e332769.js → p-1af1f96c.js} +2 -2
  98. package/dist/components/{p-0e332769.js.map → p-1af1f96c.js.map} +1 -1
  99. package/dist/components/{p-3201d529.js → p-1cfa5639.js} +2 -2
  100. package/dist/components/{p-3201d529.js.map → p-1cfa5639.js.map} +1 -1
  101. package/dist/components/{p-f238b25b.js → p-21f25179.js} +8 -8
  102. package/dist/components/{p-f238b25b.js.map → p-21f25179.js.map} +1 -1
  103. package/dist/components/{p-a2f6d2c6.js → p-24e030f3.js} +2 -2
  104. package/dist/components/{p-a2f6d2c6.js.map → p-24e030f3.js.map} +1 -1
  105. package/dist/components/{p-9fb98ea2.js → p-2d483ec9.js} +3 -3
  106. package/dist/components/{p-9fb98ea2.js.map → p-2d483ec9.js.map} +1 -1
  107. package/dist/components/{p-41a75ad6.js → p-32264ece.js} +2 -2
  108. package/dist/components/{p-41a75ad6.js.map → p-32264ece.js.map} +1 -1
  109. package/dist/components/{p-62743fd3.js → p-36a65545.js} +3 -3
  110. package/dist/components/{p-62743fd3.js.map → p-36a65545.js.map} +1 -1
  111. package/dist/components/{p-cce871bf.js → p-378b03dd.js} +5 -5
  112. package/dist/components/{p-cce871bf.js.map → p-378b03dd.js.map} +1 -1
  113. package/dist/components/{p-f7cf2401.js → p-39fd7850.js} +7 -7
  114. package/dist/components/{p-f7cf2401.js.map → p-39fd7850.js.map} +1 -1
  115. package/dist/components/{p-631808d5.js → p-428af527.js} +26 -26
  116. package/dist/components/{p-631808d5.js.map → p-428af527.js.map} +1 -1
  117. package/dist/components/{p-f0f6e862.js → p-4fab924d.js} +3 -3
  118. package/dist/components/{p-f0f6e862.js.map → p-4fab924d.js.map} +1 -1
  119. package/dist/components/{p-b7d080eb.js → p-5044943a.js} +3 -3
  120. package/dist/components/{p-b7d080eb.js.map → p-5044943a.js.map} +1 -1
  121. package/dist/components/{p-2ef2d490.js → p-61ca8465.js} +4 -4
  122. package/dist/components/{p-2ef2d490.js.map → p-61ca8465.js.map} +1 -1
  123. package/dist/components/{p-9cfd8022.js → p-647807a0.js} +2 -2
  124. package/dist/components/{p-9cfd8022.js.map → p-647807a0.js.map} +1 -1
  125. package/dist/components/{p-4d3b9ee9.js → p-6a3a1267.js} +2 -2
  126. package/dist/components/{p-4d3b9ee9.js.map → p-6a3a1267.js.map} +1 -1
  127. package/dist/components/{p-c422d9a0.js → p-6c7dc2a2.js} +11 -11
  128. package/dist/components/{p-c422d9a0.js.map → p-6c7dc2a2.js.map} +1 -1
  129. package/dist/components/{p-c5045788.js → p-78afa71b.js} +10 -10
  130. package/dist/components/{p-c5045788.js.map → p-78afa71b.js.map} +1 -1
  131. package/dist/components/{p-813ed998.js → p-79422c16.js} +10 -10
  132. package/dist/components/{p-813ed998.js.map → p-79422c16.js.map} +1 -1
  133. package/dist/components/{p-be261487.js → p-79a725df.js} +2 -2
  134. package/dist/components/{p-be261487.js.map → p-79a725df.js.map} +1 -1
  135. package/dist/components/{p-16b073b8.js → p-7d4dfd74.js} +7 -7
  136. package/dist/components/{p-16b073b8.js.map → p-7d4dfd74.js.map} +1 -1
  137. package/dist/components/p-7e4a867c.js +3962 -0
  138. package/dist/components/p-7e4a867c.js.map +1 -0
  139. package/dist/components/{p-99128b47.js → p-822b79ac.js} +11 -11
  140. package/dist/components/{p-99128b47.js.map → p-822b79ac.js.map} +1 -1
  141. package/dist/components/{p-ac7694c0.js → p-828b14f5.js} +12 -12
  142. package/dist/components/{p-ac7694c0.js.map → p-828b14f5.js.map} +1 -1
  143. package/dist/components/{p-1d4829fb.js → p-846abf3b.js} +10 -10
  144. package/dist/components/{p-1d4829fb.js.map → p-846abf3b.js.map} +1 -1
  145. package/dist/components/{p-9c0b30f8.js → p-8b4d6e58.js} +5 -5
  146. package/dist/components/{p-9c0b30f8.js.map → p-8b4d6e58.js.map} +1 -1
  147. package/dist/components/{p-38e1fed8.js → p-8b6923f0.js} +3 -3
  148. package/dist/components/{p-38e1fed8.js.map → p-8b6923f0.js.map} +1 -1
  149. package/dist/components/{p-22da6d14.js → p-8de0afbb.js} +3 -3
  150. package/dist/components/{p-22da6d14.js.map → p-8de0afbb.js.map} +1 -1
  151. package/dist/components/{p-44ae3c75.js → p-91bd08b8.js} +2 -2
  152. package/dist/components/{p-44ae3c75.js.map → p-91bd08b8.js.map} +1 -1
  153. package/dist/components/{p-070bebd7.js → p-92f5e735.js} +3 -3
  154. package/dist/components/{p-070bebd7.js.map → p-92f5e735.js.map} +1 -1
  155. package/dist/components/{p-7ad22da6.js → p-9dfa65d0.js} +8 -8
  156. package/dist/components/{p-7ad22da6.js.map → p-9dfa65d0.js.map} +1 -1
  157. package/dist/components/{p-143a763f.js → p-9ec9e533.js} +10 -10
  158. package/dist/components/{p-143a763f.js.map → p-9ec9e533.js.map} +1 -1
  159. package/dist/components/{p-b99b485b.js → p-a7426706.js} +2 -2
  160. package/dist/components/{p-b99b485b.js.map → p-a7426706.js.map} +1 -1
  161. package/dist/components/{p-619747d7.js → p-aaf30d6b.js} +2 -2
  162. package/dist/components/{p-619747d7.js.map → p-aaf30d6b.js.map} +1 -1
  163. package/dist/components/{p-adf1586f.js → p-ab8caff4.js} +2 -2
  164. package/dist/components/{p-adf1586f.js.map → p-ab8caff4.js.map} +1 -1
  165. package/dist/components/{p-8c965486.js → p-b01fdf77.js} +10 -10
  166. package/dist/components/{p-8c965486.js.map → p-b01fdf77.js.map} +1 -1
  167. package/dist/components/{p-7f32e087.js → p-b685f6ab.js} +2 -2
  168. package/dist/components/{p-7f32e087.js.map → p-b685f6ab.js.map} +1 -1
  169. package/dist/components/{p-b5e479db.js → p-b7ea4baa.js} +10 -10
  170. package/dist/components/{p-b5e479db.js.map → p-b7ea4baa.js.map} +1 -1
  171. package/dist/components/{p-cecfbe2f.js → p-c2c4ad57.js} +9 -9
  172. package/dist/components/{p-cecfbe2f.js.map → p-c2c4ad57.js.map} +1 -1
  173. package/dist/components/{p-4dd750e9.js → p-c3a349cf.js} +2 -2
  174. package/dist/components/{p-4dd750e9.js.map → p-c3a349cf.js.map} +1 -1
  175. package/dist/components/{p-c4310332.js → p-c6b9ad1a.js} +10 -10
  176. package/dist/components/{p-c4310332.js.map → p-c6b9ad1a.js.map} +1 -1
  177. package/dist/components/{p-4c5164d0.js → p-ca1c6fc1.js} +16 -28
  178. package/dist/components/p-ca1c6fc1.js.map +1 -0
  179. package/dist/components/{p-d54466ed.js → p-cd6bd3f1.js} +25 -25
  180. package/dist/components/{p-d54466ed.js.map → p-cd6bd3f1.js.map} +1 -1
  181. package/dist/components/{p-6fcd99d1.js → p-e071b78d.js} +4 -4
  182. package/dist/components/p-e071b78d.js.map +1 -0
  183. package/dist/components/{p-550377ba.js → p-e2da5bff.js} +24 -24
  184. package/dist/components/{p-550377ba.js.map → p-e2da5bff.js.map} +1 -1
  185. package/dist/components/{p-1ae5d7e0.js → p-e97100c4.js} +2 -2
  186. package/dist/components/{p-1ae5d7e0.js.map → p-e97100c4.js.map} +1 -1
  187. package/dist/components/{p-325b3828.js → p-ec039160.js} +6 -6
  188. package/dist/components/{p-325b3828.js.map → p-ec039160.js.map} +1 -1
  189. package/dist/components/{p-7bd7baa6.js → p-fdafdf2c.js} +12 -12
  190. package/dist/components/{p-7bd7baa6.js.map → p-fdafdf2c.js.map} +1 -1
  191. package/dist/components/verdocs-auth.js +3 -3
  192. package/dist/components/verdocs-build.js +80 -86
  193. package/dist/components/verdocs-build.js.map +1 -1
  194. package/dist/components/verdocs-button-panel.js +1 -1
  195. package/dist/components/verdocs-button.js +1 -1
  196. package/dist/components/verdocs-checkbox.js +1 -1
  197. package/dist/components/verdocs-component-error.js +1 -1
  198. package/dist/components/verdocs-contact-picker.js +1 -1
  199. package/dist/components/verdocs-dialog.js +1 -1
  200. package/dist/components/verdocs-dropdown.js +1 -1
  201. package/dist/components/verdocs-envelope-document-page.js +1 -1
  202. package/dist/components/verdocs-envelope-recipient-link.js +1 -1
  203. package/dist/components/verdocs-envelope-recipient-summary.js +1 -1
  204. package/dist/components/verdocs-envelope-sidebar.js +8 -8
  205. package/dist/components/verdocs-envelopes-list.js +16 -16
  206. package/dist/components/verdocs-field-attachment.js +1 -1
  207. package/dist/components/verdocs-field-checkbox.js +1 -1
  208. package/dist/components/verdocs-field-date.js +1 -1
  209. package/dist/components/verdocs-field-dropdown.js +1 -1
  210. package/dist/components/verdocs-field-initial.js +1 -1
  211. package/dist/components/verdocs-field-payment.js +9 -9
  212. package/dist/components/verdocs-field-radio.js +1 -1
  213. package/dist/components/verdocs-field-signature.js +1 -1
  214. package/dist/components/verdocs-field-textarea.js +1 -1
  215. package/dist/components/verdocs-field-textbox.js +1 -1
  216. package/dist/components/verdocs-field-timestamp.js +1 -1
  217. package/dist/components/verdocs-file-chooser.js +1 -1
  218. package/dist/components/verdocs-help-icon.js +1 -1
  219. package/dist/components/verdocs-initial-dialog.js +1 -1
  220. package/dist/components/verdocs-kba-dialog.js +1 -1
  221. package/dist/components/verdocs-loader.js +1 -1
  222. package/dist/components/verdocs-menu-panel.js +1 -1
  223. package/dist/components/verdocs-ok-dialog.js +1 -1
  224. package/dist/components/verdocs-organization-card.js +2 -2
  225. package/dist/components/verdocs-pagination.js +1 -1
  226. package/dist/components/verdocs-portal.js +1 -1
  227. package/dist/components/verdocs-preview.js +1 -1
  228. package/dist/components/verdocs-progress-bar.js +1 -1
  229. package/dist/components/verdocs-quick-filter.js +1 -1
  230. package/dist/components/verdocs-quick-functions.js +1 -1
  231. package/dist/components/verdocs-radio-button.js +1 -1
  232. package/dist/components/verdocs-search-box.js +1 -1
  233. package/dist/components/verdocs-search-tabs.js +1 -1
  234. package/dist/components/verdocs-select-input.js +1 -1
  235. package/dist/components/verdocs-send.js +1 -1
  236. package/dist/components/verdocs-sign.js +10 -10
  237. package/dist/components/verdocs-signature-dialog.js +1 -1
  238. package/dist/components/verdocs-spinner.js +1 -1
  239. package/dist/components/verdocs-status-indicator.js +1 -1
  240. package/dist/components/verdocs-switch.js +1 -1
  241. package/dist/components/verdocs-table.js +2 -2
  242. package/dist/components/verdocs-tabs.js +1 -1
  243. package/dist/components/verdocs-template-attachments.js +1 -1
  244. package/dist/components/verdocs-template-build-tabs.js +1 -1
  245. package/dist/components/verdocs-template-card.js +1 -1
  246. package/dist/components/verdocs-template-create.js +4 -4
  247. package/dist/components/verdocs-template-document-page.js +1 -1
  248. package/dist/components/verdocs-template-field-properties.js +1 -1
  249. package/dist/components/verdocs-template-fields.js +1 -1
  250. package/dist/components/verdocs-template-role-properties.js +1 -1
  251. package/dist/components/verdocs-template-roles.js +1 -1
  252. package/dist/components/verdocs-template-settings.js +1 -1
  253. package/dist/components/verdocs-template-star.js +1 -1
  254. package/dist/components/verdocs-template-tags.js +1 -1
  255. package/dist/components/verdocs-templates-list.js +17 -17
  256. package/dist/components/verdocs-text-input.js +1 -1
  257. package/dist/components/verdocs-toggle-button.js +50 -1
  258. package/dist/components/verdocs-toggle-button.js.map +1 -1
  259. package/dist/components/verdocs-toggle.js +1 -1
  260. package/dist/components/verdocs-toolbar-icon.js +1 -1
  261. package/dist/components/verdocs-upload-dialog.js +1 -1
  262. package/dist/components/verdocs-view.js +1 -1
  263. package/dist/esm/index-272d51a4.js +6 -2
  264. package/dist/esm/loader.js +1 -1
  265. package/dist/esm/verdocs-button-panel_2.entry.js +3 -3
  266. package/dist/esm/verdocs-button_2.entry.js +2 -2
  267. package/dist/esm/verdocs-checkbox_6.entry.js +9 -9
  268. package/dist/esm/verdocs-checkbox_6.entry.js.map +1 -1
  269. package/dist/esm/verdocs-contact-picker.entry.js +3916 -0
  270. package/dist/esm/verdocs-contact-picker.entry.js.map +1 -0
  271. package/dist/esm/verdocs-dialog.entry.js +1 -1
  272. package/dist/esm/verdocs-dropdown.entry.js +1 -1
  273. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  274. package/dist/esm/verdocs-envelopes-list.entry.js +6 -6
  275. package/dist/esm/verdocs-field-attachment_13.entry.js +3 -3
  276. package/dist/esm/verdocs-file-chooser_2.entry.js +2 -2
  277. package/dist/esm/verdocs-kba-dialog_2.entry.js +2 -2
  278. package/dist/esm/verdocs-kba-dialog_2.entry.js.map +1 -1
  279. package/dist/esm/verdocs-menu-panel_2.entry.js +8 -8
  280. package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
  281. package/dist/esm/verdocs-organization-card_2.entry.js +2 -2
  282. package/dist/esm/verdocs-pagination_2.entry.js +2 -2
  283. package/dist/esm/verdocs-preview_7.entry.js +1 -1
  284. package/dist/esm/verdocs-preview_7.entry.js.map +1 -1
  285. package/dist/esm/verdocs-quick-functions.entry.js +1 -1
  286. package/dist/esm/verdocs-radio-button.entry.js +1 -1
  287. package/dist/esm/verdocs-search-box.entry.js +1 -1
  288. package/dist/esm/verdocs-search-tabs.entry.js +1 -1
  289. package/dist/esm/verdocs-spinner.entry.js +1 -1
  290. package/dist/esm/verdocs-status-indicator.entry.js +2 -2
  291. package/dist/esm/verdocs-switch.entry.js +2 -2
  292. package/dist/esm/verdocs-table.entry.js +2 -2
  293. package/dist/esm/verdocs-template-card.entry.js +1 -1
  294. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  295. package/dist/esm/verdocs-template-star.entry.js +1 -1
  296. package/dist/esm/verdocs-template-tags.entry.js +1 -1
  297. package/dist/esm/verdocs-templates-list.entry.js +7 -7
  298. package/dist/{components/p-c00770e6.js → esm/verdocs-toggle-button.entry.js} +9 -29
  299. package/dist/esm/verdocs-toggle-button.entry.js.map +1 -0
  300. package/dist/esm/verdocs-toggle.entry.js +1 -1
  301. package/dist/esm/verdocs-web-sdk.js +1 -1
  302. package/dist/esm-es5/index-272d51a4.js +1 -1
  303. package/dist/esm-es5/index-272d51a4.js.map +1 -1
  304. package/dist/esm-es5/loader.js +1 -1
  305. package/dist/esm-es5/loader.js.map +1 -1
  306. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  307. package/dist/esm-es5/verdocs-button_2.entry.js +1 -1
  308. package/dist/esm-es5/verdocs-checkbox_6.entry.js +1 -1
  309. package/dist/esm-es5/verdocs-checkbox_6.entry.js.map +1 -1
  310. package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -0
  311. package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -0
  312. package/dist/esm-es5/verdocs-dialog.entry.js +1 -1
  313. package/dist/esm-es5/verdocs-dropdown.entry.js +1 -1
  314. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  315. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  316. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  317. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  318. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
  319. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js.map +1 -1
  320. package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
  321. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  322. package/dist/esm-es5/verdocs-organization-card_2.entry.js +1 -1
  323. package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
  324. package/dist/esm-es5/verdocs-preview_7.entry.js +1 -1
  325. package/dist/esm-es5/verdocs-preview_7.entry.js.map +1 -1
  326. package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
  327. package/dist/esm-es5/verdocs-radio-button.entry.js +1 -1
  328. package/dist/esm-es5/verdocs-search-box.entry.js +1 -1
  329. package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
  330. package/dist/esm-es5/verdocs-spinner.entry.js +1 -1
  331. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  332. package/dist/esm-es5/verdocs-switch.entry.js +1 -1
  333. package/dist/esm-es5/verdocs-table.entry.js +1 -1
  334. package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
  335. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  336. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  337. package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
  338. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  339. package/dist/esm-es5/verdocs-toggle-button.entry.js +2 -0
  340. package/dist/esm-es5/verdocs-toggle-button.entry.js.map +1 -0
  341. package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
  342. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  343. package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
  344. package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +1 -0
  345. package/dist/types/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.d.ts +4 -2
  346. package/dist/types/components.d.ts +2 -2
  347. package/dist/types/utils/Unleash.d.ts +14 -0
  348. package/dist/verdocs-web-sdk/{p-c53701b7.entry.js → p-0015c1dd.entry.js} +2 -2
  349. package/dist/verdocs-web-sdk/{p-1794d2fa.entry.js → p-03844e04.entry.js} +2 -2
  350. package/dist/verdocs-web-sdk/{p-3fd9d933.entry.js → p-03c38f54.entry.js} +2 -2
  351. package/dist/verdocs-web-sdk/{p-a168645d.entry.js → p-05e596a7.entry.js} +2 -2
  352. package/dist/verdocs-web-sdk/p-0785efc0.system.entry.js +2 -0
  353. package/dist/verdocs-web-sdk/p-0785efc0.system.entry.js.map +1 -0
  354. package/dist/verdocs-web-sdk/{p-00063a35.entry.js → p-08dc443e.entry.js} +2 -2
  355. package/dist/verdocs-web-sdk/{p-060dbde7.entry.js → p-09460960.entry.js} +2 -2
  356. package/dist/verdocs-web-sdk/p-09460960.entry.js.map +1 -0
  357. package/dist/verdocs-web-sdk/{p-417f71da.system.entry.js → p-0ec98936.system.entry.js} +2 -2
  358. package/dist/verdocs-web-sdk/{p-761f6656.system.entry.js → p-1219148a.system.entry.js} +2 -2
  359. package/dist/verdocs-web-sdk/{p-dddd328d.entry.js → p-138b3d6e.entry.js} +2 -2
  360. package/dist/verdocs-web-sdk/{p-ac6ecfad.system.entry.js → p-17d195ea.system.entry.js} +2 -2
  361. package/dist/verdocs-web-sdk/{p-578e65d4.system.entry.js → p-191795a8.system.entry.js} +2 -2
  362. package/dist/verdocs-web-sdk/{p-83e567cb.entry.js → p-1abf08e1.entry.js} +2 -2
  363. package/dist/verdocs-web-sdk/{p-3649ddc2.entry.js → p-23e49134.entry.js} +2 -2
  364. package/dist/verdocs-web-sdk/{p-ca8aef1d.entry.js → p-29362ed9.entry.js} +2 -2
  365. package/dist/verdocs-web-sdk/{p-76c044c8.entry.js → p-299bf390.entry.js} +2 -2
  366. package/dist/verdocs-web-sdk/{p-f84932fd.system.entry.js → p-2a10d748.system.entry.js} +2 -2
  367. package/dist/verdocs-web-sdk/{p-3834fa6a.entry.js → p-2d0e06f1.entry.js} +2 -2
  368. package/dist/verdocs-web-sdk/{p-b8945173.entry.js → p-3102c576.entry.js} +2 -2
  369. package/dist/verdocs-web-sdk/{p-90bc3ad0.system.entry.js → p-316bb216.system.entry.js} +2 -2
  370. package/dist/verdocs-web-sdk/{p-94fe5817.system.entry.js → p-33973ca4.system.entry.js} +2 -2
  371. package/dist/verdocs-web-sdk/{p-7b1e00e5.system.entry.js → p-37259eec.system.entry.js} +2 -2
  372. package/dist/verdocs-web-sdk/{p-e6d711e0.system.entry.js → p-3783416b.system.entry.js} +2 -2
  373. package/dist/verdocs-web-sdk/p-3874cd69.entry.js +2 -0
  374. package/dist/verdocs-web-sdk/p-3874cd69.entry.js.map +1 -0
  375. package/dist/verdocs-web-sdk/{p-49cc9ac5.entry.js → p-392736f4.entry.js} +2 -2
  376. package/dist/verdocs-web-sdk/{p-f12b428b.entry.js → p-39b58a23.entry.js} +2 -2
  377. package/dist/verdocs-web-sdk/{p-aca6553d.system.entry.js → p-5df005a9.system.entry.js} +2 -2
  378. package/dist/verdocs-web-sdk/p-5df005a9.system.entry.js.map +1 -0
  379. package/dist/verdocs-web-sdk/{p-ca15a050.entry.js → p-61f9b68d.entry.js} +2 -2
  380. package/dist/verdocs-web-sdk/p-6d4d7a0c.entry.js +2 -0
  381. package/dist/verdocs-web-sdk/p-6d4d7a0c.entry.js.map +1 -0
  382. package/dist/verdocs-web-sdk/{p-6b4de004.system.entry.js → p-6e9b34c6.system.entry.js} +2 -2
  383. package/dist/verdocs-web-sdk/{p-24f2d2e2.entry.js → p-706a7514.entry.js} +2 -2
  384. package/dist/verdocs-web-sdk/{p-ad3d07a6.system.entry.js → p-722a48b1.system.entry.js} +2 -2
  385. package/dist/verdocs-web-sdk/{p-21e9abff.system.entry.js → p-751c314b.system.entry.js} +2 -2
  386. package/dist/verdocs-web-sdk/{p-2eae32d9.system.entry.js → p-7ffbd7cb.system.entry.js} +2 -2
  387. package/dist/verdocs-web-sdk/{p-0c5b881a.entry.js → p-8246e75e.entry.js} +2 -2
  388. package/dist/verdocs-web-sdk/{p-5824962b.system.entry.js → p-8a6c23fd.system.entry.js} +2 -2
  389. package/dist/verdocs-web-sdk/{p-e438bd02.system.entry.js → p-8b2772f0.system.entry.js} +2 -2
  390. package/dist/verdocs-web-sdk/{p-d1d95df4.system.entry.js → p-8ee1f062.system.entry.js} +2 -2
  391. package/dist/verdocs-web-sdk/{p-d5870e33.system.entry.js → p-8f2f67cd.system.entry.js} +2 -2
  392. package/dist/verdocs-web-sdk/p-a584cd70.entry.js +2 -0
  393. package/dist/verdocs-web-sdk/{p-5ebfe76c.entry.js.map → p-a584cd70.entry.js.map} +1 -1
  394. package/dist/verdocs-web-sdk/{p-1d5b9103.system.entry.js → p-a6e9c5de.system.entry.js} +2 -2
  395. package/dist/verdocs-web-sdk/{p-306bde40.system.entry.js → p-ac6b32f6.system.entry.js} +2 -2
  396. package/dist/verdocs-web-sdk/{p-1e191c20.system.entry.js → p-ae771b54.system.entry.js} +2 -2
  397. package/dist/verdocs-web-sdk/p-b2f263e0.system.entry.js +2 -0
  398. package/dist/verdocs-web-sdk/p-b2f263e0.system.entry.js.map +1 -0
  399. package/dist/verdocs-web-sdk/{p-53f4c7c3.system.entry.js → p-b46c2149.system.entry.js} +2 -2
  400. package/dist/verdocs-web-sdk/{p-8369273d.entry.js → p-b57123f8.entry.js} +2 -2
  401. package/dist/verdocs-web-sdk/{p-8369273d.entry.js.map → p-b57123f8.entry.js.map} +1 -1
  402. package/dist/verdocs-web-sdk/{p-df3f235d.entry.js → p-b5e6a34f.entry.js} +2 -2
  403. package/dist/verdocs-web-sdk/{p-d8dae4e9.system.entry.js → p-bc99a3ef.system.entry.js} +2 -2
  404. package/dist/verdocs-web-sdk/{p-e83d06d4.system.entry.js → p-be3d919c.system.entry.js} +2 -2
  405. package/dist/verdocs-web-sdk/{p-ecfe8987.system.entry.js → p-c3d93320.system.entry.js} +2 -2
  406. package/dist/verdocs-web-sdk/{p-ecfe8987.system.entry.js.map → p-c3d93320.system.entry.js.map} +1 -1
  407. package/dist/verdocs-web-sdk/{p-ab473697.entry.js → p-c6ebd157.entry.js} +2 -2
  408. package/dist/verdocs-web-sdk/p-c9bfd8a6.entry.js +2 -0
  409. package/dist/verdocs-web-sdk/{p-bfc815d0.entry.js.map → p-c9bfd8a6.entry.js.map} +1 -1
  410. package/dist/verdocs-web-sdk/{p-123c5de2.entry.js → p-ce27233f.entry.js} +2 -2
  411. package/dist/verdocs-web-sdk/p-cf648e46.entry.js +2 -0
  412. package/dist/verdocs-web-sdk/p-e2b70dfb.system.js +1 -1
  413. package/dist/verdocs-web-sdk/p-e2b70dfb.system.js.map +1 -1
  414. package/dist/verdocs-web-sdk/{p-b0fbfc24.system.entry.js → p-e8e5403a.system.entry.js} +2 -2
  415. package/dist/verdocs-web-sdk/p-e9f2bf0d.entry.js +2 -0
  416. package/dist/verdocs-web-sdk/p-e9f2bf0d.entry.js.map +1 -0
  417. package/dist/verdocs-web-sdk/{p-6237ce51.system.entry.js → p-ee959c5d.system.entry.js} +2 -2
  418. package/dist/verdocs-web-sdk/{p-a6113c3f.entry.js → p-f714c6b4.entry.js} +2 -2
  419. package/dist/verdocs-web-sdk/{p-5bcf921b.system.entry.js → p-f873e6df.system.entry.js} +2 -2
  420. package/dist/verdocs-web-sdk/p-f873e6df.system.entry.js.map +1 -0
  421. package/dist/verdocs-web-sdk/p-fb85475b.system.entry.js +2 -0
  422. package/dist/verdocs-web-sdk/{p-c0cd186e.entry.js → p-fdc80a21.entry.js} +2 -2
  423. package/dist/verdocs-web-sdk/{p-8f5c17b6.entry.js → p-fe3ff042.entry.js} +2 -2
  424. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  425. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
  426. package/package.json +2 -2
  427. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +0 -184
  428. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js.map +0 -1
  429. package/dist/components/p-27548ebd.js +0 -207
  430. package/dist/components/p-27548ebd.js.map +0 -1
  431. package/dist/components/p-4c5164d0.js.map +0 -1
  432. package/dist/components/p-6fcd99d1.js.map +0 -1
  433. package/dist/components/p-c00770e6.js.map +0 -1
  434. package/dist/esm/verdocs-contact-picker_2.entry.js +0 -179
  435. package/dist/esm/verdocs-contact-picker_2.entry.js.map +0 -1
  436. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +0 -2
  437. package/dist/esm-es5/verdocs-contact-picker_2.entry.js.map +0 -1
  438. package/dist/verdocs-web-sdk/p-060dbde7.entry.js.map +0 -1
  439. package/dist/verdocs-web-sdk/p-25aa3bd3.entry.js +0 -2
  440. package/dist/verdocs-web-sdk/p-25aa3bd3.entry.js.map +0 -1
  441. package/dist/verdocs-web-sdk/p-5bcf921b.system.entry.js.map +0 -1
  442. package/dist/verdocs-web-sdk/p-5ebfe76c.entry.js +0 -2
  443. package/dist/verdocs-web-sdk/p-8d7d61ee.system.entry.js +0 -2
  444. package/dist/verdocs-web-sdk/p-8d7d61ee.system.entry.js.map +0 -1
  445. package/dist/verdocs-web-sdk/p-9227d400.system.entry.js +0 -2
  446. package/dist/verdocs-web-sdk/p-9750edd6.entry.js +0 -2
  447. package/dist/verdocs-web-sdk/p-aca6553d.system.entry.js.map +0 -1
  448. package/dist/verdocs-web-sdk/p-bfc815d0.entry.js +0 -2
  449. package/dist/verdocs-web-sdk/p-d58010a4.entry.js +0 -2
  450. package/dist/verdocs-web-sdk/p-d58010a4.entry.js.map +0 -1
  451. /package/dist/verdocs-web-sdk/{p-c53701b7.entry.js.map → p-0015c1dd.entry.js.map} +0 -0
  452. /package/dist/verdocs-web-sdk/{p-1794d2fa.entry.js.map → p-03844e04.entry.js.map} +0 -0
  453. /package/dist/verdocs-web-sdk/{p-3fd9d933.entry.js.map → p-03c38f54.entry.js.map} +0 -0
  454. /package/dist/verdocs-web-sdk/{p-a168645d.entry.js.map → p-05e596a7.entry.js.map} +0 -0
  455. /package/dist/verdocs-web-sdk/{p-00063a35.entry.js.map → p-08dc443e.entry.js.map} +0 -0
  456. /package/dist/verdocs-web-sdk/{p-417f71da.system.entry.js.map → p-0ec98936.system.entry.js.map} +0 -0
  457. /package/dist/verdocs-web-sdk/{p-761f6656.system.entry.js.map → p-1219148a.system.entry.js.map} +0 -0
  458. /package/dist/verdocs-web-sdk/{p-dddd328d.entry.js.map → p-138b3d6e.entry.js.map} +0 -0
  459. /package/dist/verdocs-web-sdk/{p-ac6ecfad.system.entry.js.map → p-17d195ea.system.entry.js.map} +0 -0
  460. /package/dist/verdocs-web-sdk/{p-578e65d4.system.entry.js.map → p-191795a8.system.entry.js.map} +0 -0
  461. /package/dist/verdocs-web-sdk/{p-83e567cb.entry.js.map → p-1abf08e1.entry.js.map} +0 -0
  462. /package/dist/verdocs-web-sdk/{p-3649ddc2.entry.js.map → p-23e49134.entry.js.map} +0 -0
  463. /package/dist/verdocs-web-sdk/{p-ca8aef1d.entry.js.map → p-29362ed9.entry.js.map} +0 -0
  464. /package/dist/verdocs-web-sdk/{p-76c044c8.entry.js.map → p-299bf390.entry.js.map} +0 -0
  465. /package/dist/verdocs-web-sdk/{p-f84932fd.system.entry.js.map → p-2a10d748.system.entry.js.map} +0 -0
  466. /package/dist/verdocs-web-sdk/{p-3834fa6a.entry.js.map → p-2d0e06f1.entry.js.map} +0 -0
  467. /package/dist/verdocs-web-sdk/{p-b8945173.entry.js.map → p-3102c576.entry.js.map} +0 -0
  468. /package/dist/verdocs-web-sdk/{p-90bc3ad0.system.entry.js.map → p-316bb216.system.entry.js.map} +0 -0
  469. /package/dist/verdocs-web-sdk/{p-94fe5817.system.entry.js.map → p-33973ca4.system.entry.js.map} +0 -0
  470. /package/dist/verdocs-web-sdk/{p-7b1e00e5.system.entry.js.map → p-37259eec.system.entry.js.map} +0 -0
  471. /package/dist/verdocs-web-sdk/{p-e6d711e0.system.entry.js.map → p-3783416b.system.entry.js.map} +0 -0
  472. /package/dist/verdocs-web-sdk/{p-49cc9ac5.entry.js.map → p-392736f4.entry.js.map} +0 -0
  473. /package/dist/verdocs-web-sdk/{p-f12b428b.entry.js.map → p-39b58a23.entry.js.map} +0 -0
  474. /package/dist/verdocs-web-sdk/{p-ca15a050.entry.js.map → p-61f9b68d.entry.js.map} +0 -0
  475. /package/dist/verdocs-web-sdk/{p-6b4de004.system.entry.js.map → p-6e9b34c6.system.entry.js.map} +0 -0
  476. /package/dist/verdocs-web-sdk/{p-24f2d2e2.entry.js.map → p-706a7514.entry.js.map} +0 -0
  477. /package/dist/verdocs-web-sdk/{p-ad3d07a6.system.entry.js.map → p-722a48b1.system.entry.js.map} +0 -0
  478. /package/dist/verdocs-web-sdk/{p-21e9abff.system.entry.js.map → p-751c314b.system.entry.js.map} +0 -0
  479. /package/dist/verdocs-web-sdk/{p-2eae32d9.system.entry.js.map → p-7ffbd7cb.system.entry.js.map} +0 -0
  480. /package/dist/verdocs-web-sdk/{p-0c5b881a.entry.js.map → p-8246e75e.entry.js.map} +0 -0
  481. /package/dist/verdocs-web-sdk/{p-5824962b.system.entry.js.map → p-8a6c23fd.system.entry.js.map} +0 -0
  482. /package/dist/verdocs-web-sdk/{p-e438bd02.system.entry.js.map → p-8b2772f0.system.entry.js.map} +0 -0
  483. /package/dist/verdocs-web-sdk/{p-d1d95df4.system.entry.js.map → p-8ee1f062.system.entry.js.map} +0 -0
  484. /package/dist/verdocs-web-sdk/{p-d5870e33.system.entry.js.map → p-8f2f67cd.system.entry.js.map} +0 -0
  485. /package/dist/verdocs-web-sdk/{p-1d5b9103.system.entry.js.map → p-a6e9c5de.system.entry.js.map} +0 -0
  486. /package/dist/verdocs-web-sdk/{p-306bde40.system.entry.js.map → p-ac6b32f6.system.entry.js.map} +0 -0
  487. /package/dist/verdocs-web-sdk/{p-1e191c20.system.entry.js.map → p-ae771b54.system.entry.js.map} +0 -0
  488. /package/dist/verdocs-web-sdk/{p-53f4c7c3.system.entry.js.map → p-b46c2149.system.entry.js.map} +0 -0
  489. /package/dist/verdocs-web-sdk/{p-df3f235d.entry.js.map → p-b5e6a34f.entry.js.map} +0 -0
  490. /package/dist/verdocs-web-sdk/{p-d8dae4e9.system.entry.js.map → p-bc99a3ef.system.entry.js.map} +0 -0
  491. /package/dist/verdocs-web-sdk/{p-e83d06d4.system.entry.js.map → p-be3d919c.system.entry.js.map} +0 -0
  492. /package/dist/verdocs-web-sdk/{p-ab473697.entry.js.map → p-c6ebd157.entry.js.map} +0 -0
  493. /package/dist/verdocs-web-sdk/{p-123c5de2.entry.js.map → p-ce27233f.entry.js.map} +0 -0
  494. /package/dist/verdocs-web-sdk/{p-9750edd6.entry.js.map → p-cf648e46.entry.js.map} +0 -0
  495. /package/dist/verdocs-web-sdk/{p-b0fbfc24.system.entry.js.map → p-e8e5403a.system.entry.js.map} +0 -0
  496. /package/dist/verdocs-web-sdk/{p-6237ce51.system.entry.js.map → p-ee959c5d.system.entry.js.map} +0 -0
  497. /package/dist/verdocs-web-sdk/{p-a6113c3f.entry.js.map → p-f714c6b4.entry.js.map} +0 -0
  498. /package/dist/verdocs-web-sdk/{p-9227d400.system.entry.js.map → p-fb85475b.system.entry.js.map} +0 -0
  499. /package/dist/verdocs-web-sdk/{p-c0cd186e.entry.js.map → p-fdc80a21.entry.js.map} +0 -0
  500. /package/dist/verdocs-web-sdk/{p-8f5c17b6.entry.js.map → p-fe3ff042.entry.js.map} +0 -0
@@ -0,0 +1,3920 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-ccac8641.js');
6
+ const jsSdk = require('@verdocs/js-sdk');
7
+ const utils$2 = require('./utils-746daf30.js');
8
+ require('./_commonjsHelpers-e6ff1d6e.js');
9
+ require('./Types-7a726ff3.js');
10
+ require('./format-dc0f3757.js');
11
+
12
+ function bind(fn, thisArg) {
13
+ return function wrap() {
14
+ return fn.apply(thisArg, arguments);
15
+ };
16
+ }
17
+
18
+ // utils is a library of generic helper functions non-specific to axios
19
+
20
+ const {toString} = Object.prototype;
21
+ const {getPrototypeOf} = Object;
22
+
23
+ const kindOf = (cache => thing => {
24
+ const str = toString.call(thing);
25
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
26
+ })(Object.create(null));
27
+
28
+ const kindOfTest = (type) => {
29
+ type = type.toLowerCase();
30
+ return (thing) => kindOf(thing) === type
31
+ };
32
+
33
+ const typeOfTest = type => thing => typeof thing === type;
34
+
35
+ /**
36
+ * Determine if a value is an Array
37
+ *
38
+ * @param {Object} val The value to test
39
+ *
40
+ * @returns {boolean} True if value is an Array, otherwise false
41
+ */
42
+ const {isArray} = Array;
43
+
44
+ /**
45
+ * Determine if a value is undefined
46
+ *
47
+ * @param {*} val The value to test
48
+ *
49
+ * @returns {boolean} True if the value is undefined, otherwise false
50
+ */
51
+ const isUndefined = typeOfTest('undefined');
52
+
53
+ /**
54
+ * Determine if a value is a Buffer
55
+ *
56
+ * @param {*} val The value to test
57
+ *
58
+ * @returns {boolean} True if value is a Buffer, otherwise false
59
+ */
60
+ function isBuffer(val) {
61
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
62
+ && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
63
+ }
64
+
65
+ /**
66
+ * Determine if a value is an ArrayBuffer
67
+ *
68
+ * @param {*} val The value to test
69
+ *
70
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
71
+ */
72
+ const isArrayBuffer = kindOfTest('ArrayBuffer');
73
+
74
+
75
+ /**
76
+ * Determine if a value is a view on an ArrayBuffer
77
+ *
78
+ * @param {*} val The value to test
79
+ *
80
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
81
+ */
82
+ function isArrayBufferView(val) {
83
+ let result;
84
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
85
+ result = ArrayBuffer.isView(val);
86
+ } else {
87
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
88
+ }
89
+ return result;
90
+ }
91
+
92
+ /**
93
+ * Determine if a value is a String
94
+ *
95
+ * @param {*} val The value to test
96
+ *
97
+ * @returns {boolean} True if value is a String, otherwise false
98
+ */
99
+ const isString = typeOfTest('string');
100
+
101
+ /**
102
+ * Determine if a value is a Function
103
+ *
104
+ * @param {*} val The value to test
105
+ * @returns {boolean} True if value is a Function, otherwise false
106
+ */
107
+ const isFunction = typeOfTest('function');
108
+
109
+ /**
110
+ * Determine if a value is a Number
111
+ *
112
+ * @param {*} val The value to test
113
+ *
114
+ * @returns {boolean} True if value is a Number, otherwise false
115
+ */
116
+ const isNumber = typeOfTest('number');
117
+
118
+ /**
119
+ * Determine if a value is an Object
120
+ *
121
+ * @param {*} thing The value to test
122
+ *
123
+ * @returns {boolean} True if value is an Object, otherwise false
124
+ */
125
+ const isObject = (thing) => thing !== null && typeof thing === 'object';
126
+
127
+ /**
128
+ * Determine if a value is a Boolean
129
+ *
130
+ * @param {*} thing The value to test
131
+ * @returns {boolean} True if value is a Boolean, otherwise false
132
+ */
133
+ const isBoolean = thing => thing === true || thing === false;
134
+
135
+ /**
136
+ * Determine if a value is a plain Object
137
+ *
138
+ * @param {*} val The value to test
139
+ *
140
+ * @returns {boolean} True if value is a plain Object, otherwise false
141
+ */
142
+ const isPlainObject = (val) => {
143
+ if (kindOf(val) !== 'object') {
144
+ return false;
145
+ }
146
+
147
+ const prototype = getPrototypeOf(val);
148
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
149
+ };
150
+
151
+ /**
152
+ * Determine if a value is a Date
153
+ *
154
+ * @param {*} val The value to test
155
+ *
156
+ * @returns {boolean} True if value is a Date, otherwise false
157
+ */
158
+ const isDate = kindOfTest('Date');
159
+
160
+ /**
161
+ * Determine if a value is a File
162
+ *
163
+ * @param {*} val The value to test
164
+ *
165
+ * @returns {boolean} True if value is a File, otherwise false
166
+ */
167
+ const isFile = kindOfTest('File');
168
+
169
+ /**
170
+ * Determine if a value is a Blob
171
+ *
172
+ * @param {*} val The value to test
173
+ *
174
+ * @returns {boolean} True if value is a Blob, otherwise false
175
+ */
176
+ const isBlob = kindOfTest('Blob');
177
+
178
+ /**
179
+ * Determine if a value is a FileList
180
+ *
181
+ * @param {*} val The value to test
182
+ *
183
+ * @returns {boolean} True if value is a File, otherwise false
184
+ */
185
+ const isFileList = kindOfTest('FileList');
186
+
187
+ /**
188
+ * Determine if a value is a Stream
189
+ *
190
+ * @param {*} val The value to test
191
+ *
192
+ * @returns {boolean} True if value is a Stream, otherwise false
193
+ */
194
+ const isStream = (val) => isObject(val) && isFunction(val.pipe);
195
+
196
+ /**
197
+ * Determine if a value is a FormData
198
+ *
199
+ * @param {*} thing The value to test
200
+ *
201
+ * @returns {boolean} True if value is an FormData, otherwise false
202
+ */
203
+ const isFormData = (thing) => {
204
+ let kind;
205
+ return thing && (
206
+ (typeof FormData === 'function' && thing instanceof FormData) || (
207
+ isFunction(thing.append) && (
208
+ (kind = kindOf(thing)) === 'formdata' ||
209
+ // detect form-data instance
210
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
211
+ )
212
+ )
213
+ )
214
+ };
215
+
216
+ /**
217
+ * Determine if a value is a URLSearchParams object
218
+ *
219
+ * @param {*} val The value to test
220
+ *
221
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
222
+ */
223
+ const isURLSearchParams = kindOfTest('URLSearchParams');
224
+
225
+ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
226
+
227
+ /**
228
+ * Trim excess whitespace off the beginning and end of a string
229
+ *
230
+ * @param {String} str The String to trim
231
+ *
232
+ * @returns {String} The String freed of excess whitespace
233
+ */
234
+ const trim = (str) => str.trim ?
235
+ str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
236
+
237
+ /**
238
+ * Iterate over an Array or an Object invoking a function for each item.
239
+ *
240
+ * If `obj` is an Array callback will be called passing
241
+ * the value, index, and complete array for each item.
242
+ *
243
+ * If 'obj' is an Object callback will be called passing
244
+ * the value, key, and complete object for each property.
245
+ *
246
+ * @param {Object|Array} obj The object to iterate
247
+ * @param {Function} fn The callback to invoke for each item
248
+ *
249
+ * @param {Boolean} [allOwnKeys = false]
250
+ * @returns {any}
251
+ */
252
+ function forEach(obj, fn, {allOwnKeys = false} = {}) {
253
+ // Don't bother if no value provided
254
+ if (obj === null || typeof obj === 'undefined') {
255
+ return;
256
+ }
257
+
258
+ let i;
259
+ let l;
260
+
261
+ // Force an array if not already something iterable
262
+ if (typeof obj !== 'object') {
263
+ /*eslint no-param-reassign:0*/
264
+ obj = [obj];
265
+ }
266
+
267
+ if (isArray(obj)) {
268
+ // Iterate over array values
269
+ for (i = 0, l = obj.length; i < l; i++) {
270
+ fn.call(null, obj[i], i, obj);
271
+ }
272
+ } else {
273
+ // Iterate over object keys
274
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
275
+ const len = keys.length;
276
+ let key;
277
+
278
+ for (i = 0; i < len; i++) {
279
+ key = keys[i];
280
+ fn.call(null, obj[key], key, obj);
281
+ }
282
+ }
283
+ }
284
+
285
+ function findKey(obj, key) {
286
+ key = key.toLowerCase();
287
+ const keys = Object.keys(obj);
288
+ let i = keys.length;
289
+ let _key;
290
+ while (i-- > 0) {
291
+ _key = keys[i];
292
+ if (key === _key.toLowerCase()) {
293
+ return _key;
294
+ }
295
+ }
296
+ return null;
297
+ }
298
+
299
+ const _global = (() => {
300
+ /*eslint no-undef:0*/
301
+ if (typeof globalThis !== "undefined") return globalThis;
302
+ return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
303
+ })();
304
+
305
+ const isContextDefined = (context) => !isUndefined(context) && context !== _global;
306
+
307
+ /**
308
+ * Accepts varargs expecting each argument to be an object, then
309
+ * immutably merges the properties of each object and returns result.
310
+ *
311
+ * When multiple objects contain the same key the later object in
312
+ * the arguments list will take precedence.
313
+ *
314
+ * Example:
315
+ *
316
+ * ```js
317
+ * var result = merge({foo: 123}, {foo: 456});
318
+ * console.log(result.foo); // outputs 456
319
+ * ```
320
+ *
321
+ * @param {Object} obj1 Object to merge
322
+ *
323
+ * @returns {Object} Result of all merge properties
324
+ */
325
+ function merge(/* obj1, obj2, obj3, ... */) {
326
+ const {caseless} = isContextDefined(this) && this || {};
327
+ const result = {};
328
+ const assignValue = (val, key) => {
329
+ const targetKey = caseless && findKey(result, key) || key;
330
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
331
+ result[targetKey] = merge(result[targetKey], val);
332
+ } else if (isPlainObject(val)) {
333
+ result[targetKey] = merge({}, val);
334
+ } else if (isArray(val)) {
335
+ result[targetKey] = val.slice();
336
+ } else {
337
+ result[targetKey] = val;
338
+ }
339
+ };
340
+
341
+ for (let i = 0, l = arguments.length; i < l; i++) {
342
+ arguments[i] && forEach(arguments[i], assignValue);
343
+ }
344
+ return result;
345
+ }
346
+
347
+ /**
348
+ * Extends object a by mutably adding to it the properties of object b.
349
+ *
350
+ * @param {Object} a The object to be extended
351
+ * @param {Object} b The object to copy properties from
352
+ * @param {Object} thisArg The object to bind function to
353
+ *
354
+ * @param {Boolean} [allOwnKeys]
355
+ * @returns {Object} The resulting value of object a
356
+ */
357
+ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
358
+ forEach(b, (val, key) => {
359
+ if (thisArg && isFunction(val)) {
360
+ a[key] = bind(val, thisArg);
361
+ } else {
362
+ a[key] = val;
363
+ }
364
+ }, {allOwnKeys});
365
+ return a;
366
+ };
367
+
368
+ /**
369
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
370
+ *
371
+ * @param {string} content with BOM
372
+ *
373
+ * @returns {string} content value without BOM
374
+ */
375
+ const stripBOM = (content) => {
376
+ if (content.charCodeAt(0) === 0xFEFF) {
377
+ content = content.slice(1);
378
+ }
379
+ return content;
380
+ };
381
+
382
+ /**
383
+ * Inherit the prototype methods from one constructor into another
384
+ * @param {function} constructor
385
+ * @param {function} superConstructor
386
+ * @param {object} [props]
387
+ * @param {object} [descriptors]
388
+ *
389
+ * @returns {void}
390
+ */
391
+ const inherits = (constructor, superConstructor, props, descriptors) => {
392
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
393
+ constructor.prototype.constructor = constructor;
394
+ Object.defineProperty(constructor, 'super', {
395
+ value: superConstructor.prototype
396
+ });
397
+ props && Object.assign(constructor.prototype, props);
398
+ };
399
+
400
+ /**
401
+ * Resolve object with deep prototype chain to a flat object
402
+ * @param {Object} sourceObj source object
403
+ * @param {Object} [destObj]
404
+ * @param {Function|Boolean} [filter]
405
+ * @param {Function} [propFilter]
406
+ *
407
+ * @returns {Object}
408
+ */
409
+ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
410
+ let props;
411
+ let i;
412
+ let prop;
413
+ const merged = {};
414
+
415
+ destObj = destObj || {};
416
+ // eslint-disable-next-line no-eq-null,eqeqeq
417
+ if (sourceObj == null) return destObj;
418
+
419
+ do {
420
+ props = Object.getOwnPropertyNames(sourceObj);
421
+ i = props.length;
422
+ while (i-- > 0) {
423
+ prop = props[i];
424
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
425
+ destObj[prop] = sourceObj[prop];
426
+ merged[prop] = true;
427
+ }
428
+ }
429
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
430
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
431
+
432
+ return destObj;
433
+ };
434
+
435
+ /**
436
+ * Determines whether a string ends with the characters of a specified string
437
+ *
438
+ * @param {String} str
439
+ * @param {String} searchString
440
+ * @param {Number} [position= 0]
441
+ *
442
+ * @returns {boolean}
443
+ */
444
+ const endsWith = (str, searchString, position) => {
445
+ str = String(str);
446
+ if (position === undefined || position > str.length) {
447
+ position = str.length;
448
+ }
449
+ position -= searchString.length;
450
+ const lastIndex = str.indexOf(searchString, position);
451
+ return lastIndex !== -1 && lastIndex === position;
452
+ };
453
+
454
+
455
+ /**
456
+ * Returns new array from array like object or null if failed
457
+ *
458
+ * @param {*} [thing]
459
+ *
460
+ * @returns {?Array}
461
+ */
462
+ const toArray = (thing) => {
463
+ if (!thing) return null;
464
+ if (isArray(thing)) return thing;
465
+ let i = thing.length;
466
+ if (!isNumber(i)) return null;
467
+ const arr = new Array(i);
468
+ while (i-- > 0) {
469
+ arr[i] = thing[i];
470
+ }
471
+ return arr;
472
+ };
473
+
474
+ /**
475
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
476
+ * thing passed in is an instance of Uint8Array
477
+ *
478
+ * @param {TypedArray}
479
+ *
480
+ * @returns {Array}
481
+ */
482
+ // eslint-disable-next-line func-names
483
+ const isTypedArray = (TypedArray => {
484
+ // eslint-disable-next-line func-names
485
+ return thing => {
486
+ return TypedArray && thing instanceof TypedArray;
487
+ };
488
+ })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
489
+
490
+ /**
491
+ * For each entry in the object, call the function with the key and value.
492
+ *
493
+ * @param {Object<any, any>} obj - The object to iterate over.
494
+ * @param {Function} fn - The function to call for each entry.
495
+ *
496
+ * @returns {void}
497
+ */
498
+ const forEachEntry = (obj, fn) => {
499
+ const generator = obj && obj[Symbol.iterator];
500
+
501
+ const iterator = generator.call(obj);
502
+
503
+ let result;
504
+
505
+ while ((result = iterator.next()) && !result.done) {
506
+ const pair = result.value;
507
+ fn.call(obj, pair[0], pair[1]);
508
+ }
509
+ };
510
+
511
+ /**
512
+ * It takes a regular expression and a string, and returns an array of all the matches
513
+ *
514
+ * @param {string} regExp - The regular expression to match against.
515
+ * @param {string} str - The string to search.
516
+ *
517
+ * @returns {Array<boolean>}
518
+ */
519
+ const matchAll = (regExp, str) => {
520
+ let matches;
521
+ const arr = [];
522
+
523
+ while ((matches = regExp.exec(str)) !== null) {
524
+ arr.push(matches);
525
+ }
526
+
527
+ return arr;
528
+ };
529
+
530
+ /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
531
+ const isHTMLForm = kindOfTest('HTMLFormElement');
532
+
533
+ const toCamelCase = str => {
534
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
535
+ function replacer(m, p1, p2) {
536
+ return p1.toUpperCase() + p2;
537
+ }
538
+ );
539
+ };
540
+
541
+ /* Creating a function that will check if an object has a property. */
542
+ const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
543
+
544
+ /**
545
+ * Determine if a value is a RegExp object
546
+ *
547
+ * @param {*} val The value to test
548
+ *
549
+ * @returns {boolean} True if value is a RegExp object, otherwise false
550
+ */
551
+ const isRegExp = kindOfTest('RegExp');
552
+
553
+ const reduceDescriptors = (obj, reducer) => {
554
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
555
+ const reducedDescriptors = {};
556
+
557
+ forEach(descriptors, (descriptor, name) => {
558
+ let ret;
559
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
560
+ reducedDescriptors[name] = ret || descriptor;
561
+ }
562
+ });
563
+
564
+ Object.defineProperties(obj, reducedDescriptors);
565
+ };
566
+
567
+ /**
568
+ * Makes all methods read-only
569
+ * @param {Object} obj
570
+ */
571
+
572
+ const freezeMethods = (obj) => {
573
+ reduceDescriptors(obj, (descriptor, name) => {
574
+ // skip restricted props in strict mode
575
+ if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
576
+ return false;
577
+ }
578
+
579
+ const value = obj[name];
580
+
581
+ if (!isFunction(value)) return;
582
+
583
+ descriptor.enumerable = false;
584
+
585
+ if ('writable' in descriptor) {
586
+ descriptor.writable = false;
587
+ return;
588
+ }
589
+
590
+ if (!descriptor.set) {
591
+ descriptor.set = () => {
592
+ throw Error('Can not rewrite read-only method \'' + name + '\'');
593
+ };
594
+ }
595
+ });
596
+ };
597
+
598
+ const toObjectSet = (arrayOrString, delimiter) => {
599
+ const obj = {};
600
+
601
+ const define = (arr) => {
602
+ arr.forEach(value => {
603
+ obj[value] = true;
604
+ });
605
+ };
606
+
607
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
608
+
609
+ return obj;
610
+ };
611
+
612
+ const noop = () => {};
613
+
614
+ const toFiniteNumber = (value, defaultValue) => {
615
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
616
+ };
617
+
618
+ const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
619
+
620
+ const DIGIT = '0123456789';
621
+
622
+ const ALPHABET = {
623
+ DIGIT,
624
+ ALPHA,
625
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
626
+ };
627
+
628
+ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
629
+ let str = '';
630
+ const {length} = alphabet;
631
+ while (size--) {
632
+ str += alphabet[Math.random() * length|0];
633
+ }
634
+
635
+ return str;
636
+ };
637
+
638
+ /**
639
+ * If the thing is a FormData object, return true, otherwise return false.
640
+ *
641
+ * @param {unknown} thing - The thing to check.
642
+ *
643
+ * @returns {boolean}
644
+ */
645
+ function isSpecCompliantForm(thing) {
646
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
647
+ }
648
+
649
+ const toJSONObject = (obj) => {
650
+ const stack = new Array(10);
651
+
652
+ const visit = (source, i) => {
653
+
654
+ if (isObject(source)) {
655
+ if (stack.indexOf(source) >= 0) {
656
+ return;
657
+ }
658
+
659
+ if(!('toJSON' in source)) {
660
+ stack[i] = source;
661
+ const target = isArray(source) ? [] : {};
662
+
663
+ forEach(source, (value, key) => {
664
+ const reducedValue = visit(value, i + 1);
665
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
666
+ });
667
+
668
+ stack[i] = undefined;
669
+
670
+ return target;
671
+ }
672
+ }
673
+
674
+ return source;
675
+ };
676
+
677
+ return visit(obj, 0);
678
+ };
679
+
680
+ const isAsyncFn = kindOfTest('AsyncFunction');
681
+
682
+ const isThenable = (thing) =>
683
+ thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
684
+
685
+ // original code
686
+ // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
687
+
688
+ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
689
+ if (setImmediateSupported) {
690
+ return setImmediate;
691
+ }
692
+
693
+ return postMessageSupported ? ((token, callbacks) => {
694
+ _global.addEventListener("message", ({source, data}) => {
695
+ if (source === _global && data === token) {
696
+ callbacks.length && callbacks.shift()();
697
+ }
698
+ }, false);
699
+
700
+ return (cb) => {
701
+ callbacks.push(cb);
702
+ _global.postMessage(token, "*");
703
+ }
704
+ })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
705
+ })(
706
+ typeof setImmediate === 'function',
707
+ isFunction(_global.postMessage)
708
+ );
709
+
710
+ const asap = typeof queueMicrotask !== 'undefined' ?
711
+ queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);
712
+
713
+ // *********************
714
+
715
+ const utils$1 = {
716
+ isArray,
717
+ isArrayBuffer,
718
+ isBuffer,
719
+ isFormData,
720
+ isArrayBufferView,
721
+ isString,
722
+ isNumber,
723
+ isBoolean,
724
+ isObject,
725
+ isPlainObject,
726
+ isReadableStream,
727
+ isRequest,
728
+ isResponse,
729
+ isHeaders,
730
+ isUndefined,
731
+ isDate,
732
+ isFile,
733
+ isBlob,
734
+ isRegExp,
735
+ isFunction,
736
+ isStream,
737
+ isURLSearchParams,
738
+ isTypedArray,
739
+ isFileList,
740
+ forEach,
741
+ merge,
742
+ extend,
743
+ trim,
744
+ stripBOM,
745
+ inherits,
746
+ toFlatObject,
747
+ kindOf,
748
+ kindOfTest,
749
+ endsWith,
750
+ toArray,
751
+ forEachEntry,
752
+ matchAll,
753
+ isHTMLForm,
754
+ hasOwnProperty,
755
+ hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
756
+ reduceDescriptors,
757
+ freezeMethods,
758
+ toObjectSet,
759
+ toCamelCase,
760
+ noop,
761
+ toFiniteNumber,
762
+ findKey,
763
+ global: _global,
764
+ isContextDefined,
765
+ ALPHABET,
766
+ generateString,
767
+ isSpecCompliantForm,
768
+ toJSONObject,
769
+ isAsyncFn,
770
+ isThenable,
771
+ setImmediate: _setImmediate,
772
+ asap
773
+ };
774
+
775
+ /**
776
+ * Create an Error with the specified message, config, error code, request and response.
777
+ *
778
+ * @param {string} message The error message.
779
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
780
+ * @param {Object} [config] The config.
781
+ * @param {Object} [request] The request.
782
+ * @param {Object} [response] The response.
783
+ *
784
+ * @returns {Error} The created error.
785
+ */
786
+ function AxiosError(message, code, config, request, response) {
787
+ Error.call(this);
788
+
789
+ if (Error.captureStackTrace) {
790
+ Error.captureStackTrace(this, this.constructor);
791
+ } else {
792
+ this.stack = (new Error()).stack;
793
+ }
794
+
795
+ this.message = message;
796
+ this.name = 'AxiosError';
797
+ code && (this.code = code);
798
+ config && (this.config = config);
799
+ request && (this.request = request);
800
+ if (response) {
801
+ this.response = response;
802
+ this.status = response.status ? response.status : null;
803
+ }
804
+ }
805
+
806
+ utils$1.inherits(AxiosError, Error, {
807
+ toJSON: function toJSON() {
808
+ return {
809
+ // Standard
810
+ message: this.message,
811
+ name: this.name,
812
+ // Microsoft
813
+ description: this.description,
814
+ number: this.number,
815
+ // Mozilla
816
+ fileName: this.fileName,
817
+ lineNumber: this.lineNumber,
818
+ columnNumber: this.columnNumber,
819
+ stack: this.stack,
820
+ // Axios
821
+ config: utils$1.toJSONObject(this.config),
822
+ code: this.code,
823
+ status: this.status
824
+ };
825
+ }
826
+ });
827
+
828
+ const prototype$1 = AxiosError.prototype;
829
+ const descriptors = {};
830
+
831
+ [
832
+ 'ERR_BAD_OPTION_VALUE',
833
+ 'ERR_BAD_OPTION',
834
+ 'ECONNABORTED',
835
+ 'ETIMEDOUT',
836
+ 'ERR_NETWORK',
837
+ 'ERR_FR_TOO_MANY_REDIRECTS',
838
+ 'ERR_DEPRECATED',
839
+ 'ERR_BAD_RESPONSE',
840
+ 'ERR_BAD_REQUEST',
841
+ 'ERR_CANCELED',
842
+ 'ERR_NOT_SUPPORT',
843
+ 'ERR_INVALID_URL'
844
+ // eslint-disable-next-line func-names
845
+ ].forEach(code => {
846
+ descriptors[code] = {value: code};
847
+ });
848
+
849
+ Object.defineProperties(AxiosError, descriptors);
850
+ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
851
+
852
+ // eslint-disable-next-line func-names
853
+ AxiosError.from = (error, code, config, request, response, customProps) => {
854
+ const axiosError = Object.create(prototype$1);
855
+
856
+ utils$1.toFlatObject(error, axiosError, function filter(obj) {
857
+ return obj !== Error.prototype;
858
+ }, prop => {
859
+ return prop !== 'isAxiosError';
860
+ });
861
+
862
+ AxiosError.call(axiosError, error.message, code, config, request, response);
863
+
864
+ axiosError.cause = error;
865
+
866
+ axiosError.name = error.name;
867
+
868
+ customProps && Object.assign(axiosError, customProps);
869
+
870
+ return axiosError;
871
+ };
872
+
873
+ // eslint-disable-next-line strict
874
+ const httpAdapter = null;
875
+
876
+ /**
877
+ * Determines if the given thing is a array or js object.
878
+ *
879
+ * @param {string} thing - The object or array to be visited.
880
+ *
881
+ * @returns {boolean}
882
+ */
883
+ function isVisitable(thing) {
884
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
885
+ }
886
+
887
+ /**
888
+ * It removes the brackets from the end of a string
889
+ *
890
+ * @param {string} key - The key of the parameter.
891
+ *
892
+ * @returns {string} the key without the brackets.
893
+ */
894
+ function removeBrackets(key) {
895
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
896
+ }
897
+
898
+ /**
899
+ * It takes a path, a key, and a boolean, and returns a string
900
+ *
901
+ * @param {string} path - The path to the current key.
902
+ * @param {string} key - The key of the current object being iterated over.
903
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
904
+ *
905
+ * @returns {string} The path to the current key.
906
+ */
907
+ function renderKey(path, key, dots) {
908
+ if (!path) return key;
909
+ return path.concat(key).map(function each(token, i) {
910
+ // eslint-disable-next-line no-param-reassign
911
+ token = removeBrackets(token);
912
+ return !dots && i ? '[' + token + ']' : token;
913
+ }).join(dots ? '.' : '');
914
+ }
915
+
916
+ /**
917
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
918
+ *
919
+ * @param {Array<any>} arr - The array to check
920
+ *
921
+ * @returns {boolean}
922
+ */
923
+ function isFlatArray(arr) {
924
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
925
+ }
926
+
927
+ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
928
+ return /^is[A-Z]/.test(prop);
929
+ });
930
+
931
+ /**
932
+ * Convert a data object to FormData
933
+ *
934
+ * @param {Object} obj
935
+ * @param {?Object} [formData]
936
+ * @param {?Object} [options]
937
+ * @param {Function} [options.visitor]
938
+ * @param {Boolean} [options.metaTokens = true]
939
+ * @param {Boolean} [options.dots = false]
940
+ * @param {?Boolean} [options.indexes = false]
941
+ *
942
+ * @returns {Object}
943
+ **/
944
+
945
+ /**
946
+ * It converts an object into a FormData object
947
+ *
948
+ * @param {Object<any, any>} obj - The object to convert to form data.
949
+ * @param {string} formData - The FormData object to append to.
950
+ * @param {Object<string, any>} options
951
+ *
952
+ * @returns
953
+ */
954
+ function toFormData(obj, formData, options) {
955
+ if (!utils$1.isObject(obj)) {
956
+ throw new TypeError('target must be an object');
957
+ }
958
+
959
+ // eslint-disable-next-line no-param-reassign
960
+ formData = formData || new (FormData)();
961
+
962
+ // eslint-disable-next-line no-param-reassign
963
+ options = utils$1.toFlatObject(options, {
964
+ metaTokens: true,
965
+ dots: false,
966
+ indexes: false
967
+ }, false, function defined(option, source) {
968
+ // eslint-disable-next-line no-eq-null,eqeqeq
969
+ return !utils$1.isUndefined(source[option]);
970
+ });
971
+
972
+ const metaTokens = options.metaTokens;
973
+ // eslint-disable-next-line no-use-before-define
974
+ const visitor = options.visitor || defaultVisitor;
975
+ const dots = options.dots;
976
+ const indexes = options.indexes;
977
+ const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
978
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
979
+
980
+ if (!utils$1.isFunction(visitor)) {
981
+ throw new TypeError('visitor must be a function');
982
+ }
983
+
984
+ function convertValue(value) {
985
+ if (value === null) return '';
986
+
987
+ if (utils$1.isDate(value)) {
988
+ return value.toISOString();
989
+ }
990
+
991
+ if (!useBlob && utils$1.isBlob(value)) {
992
+ throw new AxiosError('Blob is not supported. Use a Buffer instead.');
993
+ }
994
+
995
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
996
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
997
+ }
998
+
999
+ return value;
1000
+ }
1001
+
1002
+ /**
1003
+ * Default visitor.
1004
+ *
1005
+ * @param {*} value
1006
+ * @param {String|Number} key
1007
+ * @param {Array<String|Number>} path
1008
+ * @this {FormData}
1009
+ *
1010
+ * @returns {boolean} return true to visit the each prop of the value recursively
1011
+ */
1012
+ function defaultVisitor(value, key, path) {
1013
+ let arr = value;
1014
+
1015
+ if (value && !path && typeof value === 'object') {
1016
+ if (utils$1.endsWith(key, '{}')) {
1017
+ // eslint-disable-next-line no-param-reassign
1018
+ key = metaTokens ? key : key.slice(0, -2);
1019
+ // eslint-disable-next-line no-param-reassign
1020
+ value = JSON.stringify(value);
1021
+ } else if (
1022
+ (utils$1.isArray(value) && isFlatArray(value)) ||
1023
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
1024
+ )) {
1025
+ // eslint-disable-next-line no-param-reassign
1026
+ key = removeBrackets(key);
1027
+
1028
+ arr.forEach(function each(el, index) {
1029
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
1030
+ // eslint-disable-next-line no-nested-ternary
1031
+ indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
1032
+ convertValue(el)
1033
+ );
1034
+ });
1035
+ return false;
1036
+ }
1037
+ }
1038
+
1039
+ if (isVisitable(value)) {
1040
+ return true;
1041
+ }
1042
+
1043
+ formData.append(renderKey(path, key, dots), convertValue(value));
1044
+
1045
+ return false;
1046
+ }
1047
+
1048
+ const stack = [];
1049
+
1050
+ const exposedHelpers = Object.assign(predicates, {
1051
+ defaultVisitor,
1052
+ convertValue,
1053
+ isVisitable
1054
+ });
1055
+
1056
+ function build(value, path) {
1057
+ if (utils$1.isUndefined(value)) return;
1058
+
1059
+ if (stack.indexOf(value) !== -1) {
1060
+ throw Error('Circular reference detected in ' + path.join('.'));
1061
+ }
1062
+
1063
+ stack.push(value);
1064
+
1065
+ utils$1.forEach(value, function each(el, key) {
1066
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
1067
+ formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
1068
+ );
1069
+
1070
+ if (result === true) {
1071
+ build(el, path ? path.concat(key) : [key]);
1072
+ }
1073
+ });
1074
+
1075
+ stack.pop();
1076
+ }
1077
+
1078
+ if (!utils$1.isObject(obj)) {
1079
+ throw new TypeError('data must be an object');
1080
+ }
1081
+
1082
+ build(obj);
1083
+
1084
+ return formData;
1085
+ }
1086
+
1087
+ /**
1088
+ * It encodes a string by replacing all characters that are not in the unreserved set with
1089
+ * their percent-encoded equivalents
1090
+ *
1091
+ * @param {string} str - The string to encode.
1092
+ *
1093
+ * @returns {string} The encoded string.
1094
+ */
1095
+ function encode$1(str) {
1096
+ const charMap = {
1097
+ '!': '%21',
1098
+ "'": '%27',
1099
+ '(': '%28',
1100
+ ')': '%29',
1101
+ '~': '%7E',
1102
+ '%20': '+',
1103
+ '%00': '\x00'
1104
+ };
1105
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
1106
+ return charMap[match];
1107
+ });
1108
+ }
1109
+
1110
+ /**
1111
+ * It takes a params object and converts it to a FormData object
1112
+ *
1113
+ * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
1114
+ * @param {Object<string, any>} options - The options object passed to the Axios constructor.
1115
+ *
1116
+ * @returns {void}
1117
+ */
1118
+ function AxiosURLSearchParams(params, options) {
1119
+ this._pairs = [];
1120
+
1121
+ params && toFormData(params, this, options);
1122
+ }
1123
+
1124
+ const prototype = AxiosURLSearchParams.prototype;
1125
+
1126
+ prototype.append = function append(name, value) {
1127
+ this._pairs.push([name, value]);
1128
+ };
1129
+
1130
+ prototype.toString = function toString(encoder) {
1131
+ const _encode = encoder ? function(value) {
1132
+ return encoder.call(this, value, encode$1);
1133
+ } : encode$1;
1134
+
1135
+ return this._pairs.map(function each(pair) {
1136
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
1137
+ }, '').join('&');
1138
+ };
1139
+
1140
+ /**
1141
+ * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
1142
+ * URI encoded counterparts
1143
+ *
1144
+ * @param {string} val The value to be encoded.
1145
+ *
1146
+ * @returns {string} The encoded value.
1147
+ */
1148
+ function encode(val) {
1149
+ return encodeURIComponent(val).
1150
+ replace(/%3A/gi, ':').
1151
+ replace(/%24/g, '$').
1152
+ replace(/%2C/gi, ',').
1153
+ replace(/%20/g, '+').
1154
+ replace(/%5B/gi, '[').
1155
+ replace(/%5D/gi, ']');
1156
+ }
1157
+
1158
+ /**
1159
+ * Build a URL by appending params to the end
1160
+ *
1161
+ * @param {string} url The base of the url (e.g., http://www.google.com)
1162
+ * @param {object} [params] The params to be appended
1163
+ * @param {?(object|Function)} options
1164
+ *
1165
+ * @returns {string} The formatted url
1166
+ */
1167
+ function buildURL(url, params, options) {
1168
+ /*eslint no-param-reassign:0*/
1169
+ if (!params) {
1170
+ return url;
1171
+ }
1172
+
1173
+ const _encode = options && options.encode || encode;
1174
+
1175
+ if (utils$1.isFunction(options)) {
1176
+ options = {
1177
+ serialize: options
1178
+ };
1179
+ }
1180
+
1181
+ const serializeFn = options && options.serialize;
1182
+
1183
+ let serializedParams;
1184
+
1185
+ if (serializeFn) {
1186
+ serializedParams = serializeFn(params, options);
1187
+ } else {
1188
+ serializedParams = utils$1.isURLSearchParams(params) ?
1189
+ params.toString() :
1190
+ new AxiosURLSearchParams(params, options).toString(_encode);
1191
+ }
1192
+
1193
+ if (serializedParams) {
1194
+ const hashmarkIndex = url.indexOf("#");
1195
+
1196
+ if (hashmarkIndex !== -1) {
1197
+ url = url.slice(0, hashmarkIndex);
1198
+ }
1199
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1200
+ }
1201
+
1202
+ return url;
1203
+ }
1204
+
1205
+ class InterceptorManager {
1206
+ constructor() {
1207
+ this.handlers = [];
1208
+ }
1209
+
1210
+ /**
1211
+ * Add a new interceptor to the stack
1212
+ *
1213
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
1214
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
1215
+ *
1216
+ * @return {Number} An ID used to remove interceptor later
1217
+ */
1218
+ use(fulfilled, rejected, options) {
1219
+ this.handlers.push({
1220
+ fulfilled,
1221
+ rejected,
1222
+ synchronous: options ? options.synchronous : false,
1223
+ runWhen: options ? options.runWhen : null
1224
+ });
1225
+ return this.handlers.length - 1;
1226
+ }
1227
+
1228
+ /**
1229
+ * Remove an interceptor from the stack
1230
+ *
1231
+ * @param {Number} id The ID that was returned by `use`
1232
+ *
1233
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
1234
+ */
1235
+ eject(id) {
1236
+ if (this.handlers[id]) {
1237
+ this.handlers[id] = null;
1238
+ }
1239
+ }
1240
+
1241
+ /**
1242
+ * Clear all interceptors from the stack
1243
+ *
1244
+ * @returns {void}
1245
+ */
1246
+ clear() {
1247
+ if (this.handlers) {
1248
+ this.handlers = [];
1249
+ }
1250
+ }
1251
+
1252
+ /**
1253
+ * Iterate over all the registered interceptors
1254
+ *
1255
+ * This method is particularly useful for skipping over any
1256
+ * interceptors that may have become `null` calling `eject`.
1257
+ *
1258
+ * @param {Function} fn The function to call for each interceptor
1259
+ *
1260
+ * @returns {void}
1261
+ */
1262
+ forEach(fn) {
1263
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
1264
+ if (h !== null) {
1265
+ fn(h);
1266
+ }
1267
+ });
1268
+ }
1269
+ }
1270
+
1271
+ const InterceptorManager$1 = InterceptorManager;
1272
+
1273
+ const transitionalDefaults = {
1274
+ silentJSONParsing: true,
1275
+ forcedJSONParsing: true,
1276
+ clarifyTimeoutError: false
1277
+ };
1278
+
1279
+ const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
1280
+
1281
+ const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1282
+
1283
+ const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1284
+
1285
+ const platform$1 = {
1286
+ isBrowser: true,
1287
+ classes: {
1288
+ URLSearchParams: URLSearchParams$1,
1289
+ FormData: FormData$1,
1290
+ Blob: Blob$1
1291
+ },
1292
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1293
+ };
1294
+
1295
+ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
1296
+
1297
+ const _navigator = typeof navigator === 'object' && navigator || undefined;
1298
+
1299
+ /**
1300
+ * Determine if we're running in a standard browser environment
1301
+ *
1302
+ * This allows axios to run in a web worker, and react-native.
1303
+ * Both environments support XMLHttpRequest, but not fully standard globals.
1304
+ *
1305
+ * web workers:
1306
+ * typeof window -> undefined
1307
+ * typeof document -> undefined
1308
+ *
1309
+ * react-native:
1310
+ * navigator.product -> 'ReactNative'
1311
+ * nativescript
1312
+ * navigator.product -> 'NativeScript' or 'NS'
1313
+ *
1314
+ * @returns {boolean}
1315
+ */
1316
+ const hasStandardBrowserEnv = hasBrowserEnv &&
1317
+ (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
1318
+
1319
+ /**
1320
+ * Determine if we're running in a standard browser webWorker environment
1321
+ *
1322
+ * Although the `isStandardBrowserEnv` method indicates that
1323
+ * `allows axios to run in a web worker`, the WebWorker will still be
1324
+ * filtered out due to its judgment standard
1325
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1326
+ * This leads to a problem when axios post `FormData` in webWorker
1327
+ */
1328
+ const hasStandardBrowserWebWorkerEnv = (() => {
1329
+ return (
1330
+ typeof WorkerGlobalScope !== 'undefined' &&
1331
+ // eslint-disable-next-line no-undef
1332
+ self instanceof WorkerGlobalScope &&
1333
+ typeof self.importScripts === 'function'
1334
+ );
1335
+ })();
1336
+
1337
+ const origin = hasBrowserEnv && window.location.href || 'http://localhost';
1338
+
1339
+ const utils = /*#__PURE__*/Object.freeze({
1340
+ __proto__: null,
1341
+ hasBrowserEnv: hasBrowserEnv,
1342
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1343
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
1344
+ navigator: _navigator,
1345
+ origin: origin
1346
+ });
1347
+
1348
+ const platform = {
1349
+ ...utils,
1350
+ ...platform$1
1351
+ };
1352
+
1353
+ function toURLEncodedForm(data, options) {
1354
+ return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
1355
+ visitor: function(value, key, path, helpers) {
1356
+ if (platform.isNode && utils$1.isBuffer(value)) {
1357
+ this.append(key, value.toString('base64'));
1358
+ return false;
1359
+ }
1360
+
1361
+ return helpers.defaultVisitor.apply(this, arguments);
1362
+ }
1363
+ }, options));
1364
+ }
1365
+
1366
+ /**
1367
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
1368
+ *
1369
+ * @param {string} name - The name of the property to get.
1370
+ *
1371
+ * @returns An array of strings.
1372
+ */
1373
+ function parsePropPath(name) {
1374
+ // foo[x][y][z]
1375
+ // foo.x.y.z
1376
+ // foo-x-y-z
1377
+ // foo x y z
1378
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
1379
+ return match[0] === '[]' ? '' : match[1] || match[0];
1380
+ });
1381
+ }
1382
+
1383
+ /**
1384
+ * Convert an array to an object.
1385
+ *
1386
+ * @param {Array<any>} arr - The array to convert to an object.
1387
+ *
1388
+ * @returns An object with the same keys and values as the array.
1389
+ */
1390
+ function arrayToObject(arr) {
1391
+ const obj = {};
1392
+ const keys = Object.keys(arr);
1393
+ let i;
1394
+ const len = keys.length;
1395
+ let key;
1396
+ for (i = 0; i < len; i++) {
1397
+ key = keys[i];
1398
+ obj[key] = arr[key];
1399
+ }
1400
+ return obj;
1401
+ }
1402
+
1403
+ /**
1404
+ * It takes a FormData object and returns a JavaScript object
1405
+ *
1406
+ * @param {string} formData The FormData object to convert to JSON.
1407
+ *
1408
+ * @returns {Object<string, any> | null} The converted object.
1409
+ */
1410
+ function formDataToJSON(formData) {
1411
+ function buildPath(path, value, target, index) {
1412
+ let name = path[index++];
1413
+
1414
+ if (name === '__proto__') return true;
1415
+
1416
+ const isNumericKey = Number.isFinite(+name);
1417
+ const isLast = index >= path.length;
1418
+ name = !name && utils$1.isArray(target) ? target.length : name;
1419
+
1420
+ if (isLast) {
1421
+ if (utils$1.hasOwnProp(target, name)) {
1422
+ target[name] = [target[name], value];
1423
+ } else {
1424
+ target[name] = value;
1425
+ }
1426
+
1427
+ return !isNumericKey;
1428
+ }
1429
+
1430
+ if (!target[name] || !utils$1.isObject(target[name])) {
1431
+ target[name] = [];
1432
+ }
1433
+
1434
+ const result = buildPath(path, value, target[name], index);
1435
+
1436
+ if (result && utils$1.isArray(target[name])) {
1437
+ target[name] = arrayToObject(target[name]);
1438
+ }
1439
+
1440
+ return !isNumericKey;
1441
+ }
1442
+
1443
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
1444
+ const obj = {};
1445
+
1446
+ utils$1.forEachEntry(formData, (name, value) => {
1447
+ buildPath(parsePropPath(name), value, obj, 0);
1448
+ });
1449
+
1450
+ return obj;
1451
+ }
1452
+
1453
+ return null;
1454
+ }
1455
+
1456
+ /**
1457
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
1458
+ * of the input
1459
+ *
1460
+ * @param {any} rawValue - The value to be stringified.
1461
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
1462
+ * @param {Function} encoder - A function that takes a value and returns a string.
1463
+ *
1464
+ * @returns {string} A stringified version of the rawValue.
1465
+ */
1466
+ function stringifySafely(rawValue, parser, encoder) {
1467
+ if (utils$1.isString(rawValue)) {
1468
+ try {
1469
+ (parser || JSON.parse)(rawValue);
1470
+ return utils$1.trim(rawValue);
1471
+ } catch (e) {
1472
+ if (e.name !== 'SyntaxError') {
1473
+ throw e;
1474
+ }
1475
+ }
1476
+ }
1477
+
1478
+ return (encoder || JSON.stringify)(rawValue);
1479
+ }
1480
+
1481
+ const defaults = {
1482
+
1483
+ transitional: transitionalDefaults,
1484
+
1485
+ adapter: ['xhr', 'http', 'fetch'],
1486
+
1487
+ transformRequest: [function transformRequest(data, headers) {
1488
+ const contentType = headers.getContentType() || '';
1489
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
1490
+ const isObjectPayload = utils$1.isObject(data);
1491
+
1492
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
1493
+ data = new FormData(data);
1494
+ }
1495
+
1496
+ const isFormData = utils$1.isFormData(data);
1497
+
1498
+ if (isFormData) {
1499
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
1500
+ }
1501
+
1502
+ if (utils$1.isArrayBuffer(data) ||
1503
+ utils$1.isBuffer(data) ||
1504
+ utils$1.isStream(data) ||
1505
+ utils$1.isFile(data) ||
1506
+ utils$1.isBlob(data) ||
1507
+ utils$1.isReadableStream(data)
1508
+ ) {
1509
+ return data;
1510
+ }
1511
+ if (utils$1.isArrayBufferView(data)) {
1512
+ return data.buffer;
1513
+ }
1514
+ if (utils$1.isURLSearchParams(data)) {
1515
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
1516
+ return data.toString();
1517
+ }
1518
+
1519
+ let isFileList;
1520
+
1521
+ if (isObjectPayload) {
1522
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
1523
+ return toURLEncodedForm(data, this.formSerializer).toString();
1524
+ }
1525
+
1526
+ if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
1527
+ const _FormData = this.env && this.env.FormData;
1528
+
1529
+ return toFormData(
1530
+ isFileList ? {'files[]': data} : data,
1531
+ _FormData && new _FormData(),
1532
+ this.formSerializer
1533
+ );
1534
+ }
1535
+ }
1536
+
1537
+ if (isObjectPayload || hasJSONContentType ) {
1538
+ headers.setContentType('application/json', false);
1539
+ return stringifySafely(data);
1540
+ }
1541
+
1542
+ return data;
1543
+ }],
1544
+
1545
+ transformResponse: [function transformResponse(data) {
1546
+ const transitional = this.transitional || defaults.transitional;
1547
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1548
+ const JSONRequested = this.responseType === 'json';
1549
+
1550
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
1551
+ return data;
1552
+ }
1553
+
1554
+ if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
1555
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
1556
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
1557
+
1558
+ try {
1559
+ return JSON.parse(data);
1560
+ } catch (e) {
1561
+ if (strictJSONParsing) {
1562
+ if (e.name === 'SyntaxError') {
1563
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
1564
+ }
1565
+ throw e;
1566
+ }
1567
+ }
1568
+ }
1569
+
1570
+ return data;
1571
+ }],
1572
+
1573
+ /**
1574
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1575
+ * timeout is not created.
1576
+ */
1577
+ timeout: 0,
1578
+
1579
+ xsrfCookieName: 'XSRF-TOKEN',
1580
+ xsrfHeaderName: 'X-XSRF-TOKEN',
1581
+
1582
+ maxContentLength: -1,
1583
+ maxBodyLength: -1,
1584
+
1585
+ env: {
1586
+ FormData: platform.classes.FormData,
1587
+ Blob: platform.classes.Blob
1588
+ },
1589
+
1590
+ validateStatus: function validateStatus(status) {
1591
+ return status >= 200 && status < 300;
1592
+ },
1593
+
1594
+ headers: {
1595
+ common: {
1596
+ 'Accept': 'application/json, text/plain, */*',
1597
+ 'Content-Type': undefined
1598
+ }
1599
+ }
1600
+ };
1601
+
1602
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
1603
+ defaults.headers[method] = {};
1604
+ });
1605
+
1606
+ const defaults$1 = defaults;
1607
+
1608
+ // RawAxiosHeaders whose duplicates are ignored by node
1609
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
1610
+ const ignoreDuplicateOf = utils$1.toObjectSet([
1611
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
1612
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1613
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1614
+ 'referer', 'retry-after', 'user-agent'
1615
+ ]);
1616
+
1617
+ /**
1618
+ * Parse headers into an object
1619
+ *
1620
+ * ```
1621
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
1622
+ * Content-Type: application/json
1623
+ * Connection: keep-alive
1624
+ * Transfer-Encoding: chunked
1625
+ * ```
1626
+ *
1627
+ * @param {String} rawHeaders Headers needing to be parsed
1628
+ *
1629
+ * @returns {Object} Headers parsed into an object
1630
+ */
1631
+ const parseHeaders = rawHeaders => {
1632
+ const parsed = {};
1633
+ let key;
1634
+ let val;
1635
+ let i;
1636
+
1637
+ rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
1638
+ i = line.indexOf(':');
1639
+ key = line.substring(0, i).trim().toLowerCase();
1640
+ val = line.substring(i + 1).trim();
1641
+
1642
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
1643
+ return;
1644
+ }
1645
+
1646
+ if (key === 'set-cookie') {
1647
+ if (parsed[key]) {
1648
+ parsed[key].push(val);
1649
+ } else {
1650
+ parsed[key] = [val];
1651
+ }
1652
+ } else {
1653
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1654
+ }
1655
+ });
1656
+
1657
+ return parsed;
1658
+ };
1659
+
1660
+ const $internals = Symbol('internals');
1661
+
1662
+ function normalizeHeader(header) {
1663
+ return header && String(header).trim().toLowerCase();
1664
+ }
1665
+
1666
+ function normalizeValue(value) {
1667
+ if (value === false || value == null) {
1668
+ return value;
1669
+ }
1670
+
1671
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
1672
+ }
1673
+
1674
+ function parseTokens(str) {
1675
+ const tokens = Object.create(null);
1676
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1677
+ let match;
1678
+
1679
+ while ((match = tokensRE.exec(str))) {
1680
+ tokens[match[1]] = match[2];
1681
+ }
1682
+
1683
+ return tokens;
1684
+ }
1685
+
1686
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1687
+
1688
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1689
+ if (utils$1.isFunction(filter)) {
1690
+ return filter.call(this, value, header);
1691
+ }
1692
+
1693
+ if (isHeaderNameFilter) {
1694
+ value = header;
1695
+ }
1696
+
1697
+ if (!utils$1.isString(value)) return;
1698
+
1699
+ if (utils$1.isString(filter)) {
1700
+ return value.indexOf(filter) !== -1;
1701
+ }
1702
+
1703
+ if (utils$1.isRegExp(filter)) {
1704
+ return filter.test(value);
1705
+ }
1706
+ }
1707
+
1708
+ function formatHeader(header) {
1709
+ return header.trim()
1710
+ .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
1711
+ return char.toUpperCase() + str;
1712
+ });
1713
+ }
1714
+
1715
+ function buildAccessors(obj, header) {
1716
+ const accessorName = utils$1.toCamelCase(' ' + header);
1717
+
1718
+ ['get', 'set', 'has'].forEach(methodName => {
1719
+ Object.defineProperty(obj, methodName + accessorName, {
1720
+ value: function(arg1, arg2, arg3) {
1721
+ return this[methodName].call(this, header, arg1, arg2, arg3);
1722
+ },
1723
+ configurable: true
1724
+ });
1725
+ });
1726
+ }
1727
+
1728
+ class AxiosHeaders {
1729
+ constructor(headers) {
1730
+ headers && this.set(headers);
1731
+ }
1732
+
1733
+ set(header, valueOrRewrite, rewrite) {
1734
+ const self = this;
1735
+
1736
+ function setHeader(_value, _header, _rewrite) {
1737
+ const lHeader = normalizeHeader(_header);
1738
+
1739
+ if (!lHeader) {
1740
+ throw new Error('header name must be a non-empty string');
1741
+ }
1742
+
1743
+ const key = utils$1.findKey(self, lHeader);
1744
+
1745
+ if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
1746
+ self[key || _header] = normalizeValue(_value);
1747
+ }
1748
+ }
1749
+
1750
+ const setHeaders = (headers, _rewrite) =>
1751
+ utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
1752
+
1753
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
1754
+ setHeaders(header, valueOrRewrite);
1755
+ } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1756
+ setHeaders(parseHeaders(header), valueOrRewrite);
1757
+ } else if (utils$1.isHeaders(header)) {
1758
+ for (const [key, value] of header.entries()) {
1759
+ setHeader(value, key, rewrite);
1760
+ }
1761
+ } else {
1762
+ header != null && setHeader(valueOrRewrite, header, rewrite);
1763
+ }
1764
+
1765
+ return this;
1766
+ }
1767
+
1768
+ get(header, parser) {
1769
+ header = normalizeHeader(header);
1770
+
1771
+ if (header) {
1772
+ const key = utils$1.findKey(this, header);
1773
+
1774
+ if (key) {
1775
+ const value = this[key];
1776
+
1777
+ if (!parser) {
1778
+ return value;
1779
+ }
1780
+
1781
+ if (parser === true) {
1782
+ return parseTokens(value);
1783
+ }
1784
+
1785
+ if (utils$1.isFunction(parser)) {
1786
+ return parser.call(this, value, key);
1787
+ }
1788
+
1789
+ if (utils$1.isRegExp(parser)) {
1790
+ return parser.exec(value);
1791
+ }
1792
+
1793
+ throw new TypeError('parser must be boolean|regexp|function');
1794
+ }
1795
+ }
1796
+ }
1797
+
1798
+ has(header, matcher) {
1799
+ header = normalizeHeader(header);
1800
+
1801
+ if (header) {
1802
+ const key = utils$1.findKey(this, header);
1803
+
1804
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
1805
+ }
1806
+
1807
+ return false;
1808
+ }
1809
+
1810
+ delete(header, matcher) {
1811
+ const self = this;
1812
+ let deleted = false;
1813
+
1814
+ function deleteHeader(_header) {
1815
+ _header = normalizeHeader(_header);
1816
+
1817
+ if (_header) {
1818
+ const key = utils$1.findKey(self, _header);
1819
+
1820
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
1821
+ delete self[key];
1822
+
1823
+ deleted = true;
1824
+ }
1825
+ }
1826
+ }
1827
+
1828
+ if (utils$1.isArray(header)) {
1829
+ header.forEach(deleteHeader);
1830
+ } else {
1831
+ deleteHeader(header);
1832
+ }
1833
+
1834
+ return deleted;
1835
+ }
1836
+
1837
+ clear(matcher) {
1838
+ const keys = Object.keys(this);
1839
+ let i = keys.length;
1840
+ let deleted = false;
1841
+
1842
+ while (i--) {
1843
+ const key = keys[i];
1844
+ if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1845
+ delete this[key];
1846
+ deleted = true;
1847
+ }
1848
+ }
1849
+
1850
+ return deleted;
1851
+ }
1852
+
1853
+ normalize(format) {
1854
+ const self = this;
1855
+ const headers = {};
1856
+
1857
+ utils$1.forEach(this, (value, header) => {
1858
+ const key = utils$1.findKey(headers, header);
1859
+
1860
+ if (key) {
1861
+ self[key] = normalizeValue(value);
1862
+ delete self[header];
1863
+ return;
1864
+ }
1865
+
1866
+ const normalized = format ? formatHeader(header) : String(header).trim();
1867
+
1868
+ if (normalized !== header) {
1869
+ delete self[header];
1870
+ }
1871
+
1872
+ self[normalized] = normalizeValue(value);
1873
+
1874
+ headers[normalized] = true;
1875
+ });
1876
+
1877
+ return this;
1878
+ }
1879
+
1880
+ concat(...targets) {
1881
+ return this.constructor.concat(this, ...targets);
1882
+ }
1883
+
1884
+ toJSON(asStrings) {
1885
+ const obj = Object.create(null);
1886
+
1887
+ utils$1.forEach(this, (value, header) => {
1888
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
1889
+ });
1890
+
1891
+ return obj;
1892
+ }
1893
+
1894
+ [Symbol.iterator]() {
1895
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1896
+ }
1897
+
1898
+ toString() {
1899
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
1900
+ }
1901
+
1902
+ get [Symbol.toStringTag]() {
1903
+ return 'AxiosHeaders';
1904
+ }
1905
+
1906
+ static from(thing) {
1907
+ return thing instanceof this ? thing : new this(thing);
1908
+ }
1909
+
1910
+ static concat(first, ...targets) {
1911
+ const computed = new this(first);
1912
+
1913
+ targets.forEach((target) => computed.set(target));
1914
+
1915
+ return computed;
1916
+ }
1917
+
1918
+ static accessor(header) {
1919
+ const internals = this[$internals] = (this[$internals] = {
1920
+ accessors: {}
1921
+ });
1922
+
1923
+ const accessors = internals.accessors;
1924
+ const prototype = this.prototype;
1925
+
1926
+ function defineAccessor(_header) {
1927
+ const lHeader = normalizeHeader(_header);
1928
+
1929
+ if (!accessors[lHeader]) {
1930
+ buildAccessors(prototype, _header);
1931
+ accessors[lHeader] = true;
1932
+ }
1933
+ }
1934
+
1935
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1936
+
1937
+ return this;
1938
+ }
1939
+ }
1940
+
1941
+ AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
1942
+
1943
+ // reserved names hotfix
1944
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
1945
+ let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
1946
+ return {
1947
+ get: () => value,
1948
+ set(headerValue) {
1949
+ this[mapped] = headerValue;
1950
+ }
1951
+ }
1952
+ });
1953
+
1954
+ utils$1.freezeMethods(AxiosHeaders);
1955
+
1956
+ const AxiosHeaders$1 = AxiosHeaders;
1957
+
1958
+ /**
1959
+ * Transform the data for a request or a response
1960
+ *
1961
+ * @param {Array|Function} fns A single function or Array of functions
1962
+ * @param {?Object} response The response object
1963
+ *
1964
+ * @returns {*} The resulting transformed data
1965
+ */
1966
+ function transformData(fns, response) {
1967
+ const config = this || defaults$1;
1968
+ const context = response || config;
1969
+ const headers = AxiosHeaders$1.from(context.headers);
1970
+ let data = context.data;
1971
+
1972
+ utils$1.forEach(fns, function transform(fn) {
1973
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
1974
+ });
1975
+
1976
+ headers.normalize();
1977
+
1978
+ return data;
1979
+ }
1980
+
1981
+ function isCancel(value) {
1982
+ return !!(value && value.__CANCEL__);
1983
+ }
1984
+
1985
+ /**
1986
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
1987
+ *
1988
+ * @param {string=} message The message.
1989
+ * @param {Object=} config The config.
1990
+ * @param {Object=} request The request.
1991
+ *
1992
+ * @returns {CanceledError} The created error.
1993
+ */
1994
+ function CanceledError(message, config, request) {
1995
+ // eslint-disable-next-line no-eq-null,eqeqeq
1996
+ AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
1997
+ this.name = 'CanceledError';
1998
+ }
1999
+
2000
+ utils$1.inherits(CanceledError, AxiosError, {
2001
+ __CANCEL__: true
2002
+ });
2003
+
2004
+ /**
2005
+ * Resolve or reject a Promise based on response status.
2006
+ *
2007
+ * @param {Function} resolve A function that resolves the promise.
2008
+ * @param {Function} reject A function that rejects the promise.
2009
+ * @param {object} response The response.
2010
+ *
2011
+ * @returns {object} The response.
2012
+ */
2013
+ function settle(resolve, reject, response) {
2014
+ const validateStatus = response.config.validateStatus;
2015
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
2016
+ resolve(response);
2017
+ } else {
2018
+ reject(new AxiosError(
2019
+ 'Request failed with status code ' + response.status,
2020
+ [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
2021
+ response.config,
2022
+ response.request,
2023
+ response
2024
+ ));
2025
+ }
2026
+ }
2027
+
2028
+ function parseProtocol(url) {
2029
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
2030
+ return match && match[1] || '';
2031
+ }
2032
+
2033
+ /**
2034
+ * Calculate data maxRate
2035
+ * @param {Number} [samplesCount= 10]
2036
+ * @param {Number} [min= 1000]
2037
+ * @returns {Function}
2038
+ */
2039
+ function speedometer(samplesCount, min) {
2040
+ samplesCount = samplesCount || 10;
2041
+ const bytes = new Array(samplesCount);
2042
+ const timestamps = new Array(samplesCount);
2043
+ let head = 0;
2044
+ let tail = 0;
2045
+ let firstSampleTS;
2046
+
2047
+ min = min !== undefined ? min : 1000;
2048
+
2049
+ return function push(chunkLength) {
2050
+ const now = Date.now();
2051
+
2052
+ const startedAt = timestamps[tail];
2053
+
2054
+ if (!firstSampleTS) {
2055
+ firstSampleTS = now;
2056
+ }
2057
+
2058
+ bytes[head] = chunkLength;
2059
+ timestamps[head] = now;
2060
+
2061
+ let i = tail;
2062
+ let bytesCount = 0;
2063
+
2064
+ while (i !== head) {
2065
+ bytesCount += bytes[i++];
2066
+ i = i % samplesCount;
2067
+ }
2068
+
2069
+ head = (head + 1) % samplesCount;
2070
+
2071
+ if (head === tail) {
2072
+ tail = (tail + 1) % samplesCount;
2073
+ }
2074
+
2075
+ if (now - firstSampleTS < min) {
2076
+ return;
2077
+ }
2078
+
2079
+ const passed = startedAt && now - startedAt;
2080
+
2081
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
2082
+ };
2083
+ }
2084
+
2085
+ /**
2086
+ * Throttle decorator
2087
+ * @param {Function} fn
2088
+ * @param {Number} freq
2089
+ * @return {Function}
2090
+ */
2091
+ function throttle(fn, freq) {
2092
+ let timestamp = 0;
2093
+ let threshold = 1000 / freq;
2094
+ let lastArgs;
2095
+ let timer;
2096
+
2097
+ const invoke = (args, now = Date.now()) => {
2098
+ timestamp = now;
2099
+ lastArgs = null;
2100
+ if (timer) {
2101
+ clearTimeout(timer);
2102
+ timer = null;
2103
+ }
2104
+ fn.apply(null, args);
2105
+ };
2106
+
2107
+ const throttled = (...args) => {
2108
+ const now = Date.now();
2109
+ const passed = now - timestamp;
2110
+ if ( passed >= threshold) {
2111
+ invoke(args, now);
2112
+ } else {
2113
+ lastArgs = args;
2114
+ if (!timer) {
2115
+ timer = setTimeout(() => {
2116
+ timer = null;
2117
+ invoke(lastArgs);
2118
+ }, threshold - passed);
2119
+ }
2120
+ }
2121
+ };
2122
+
2123
+ const flush = () => lastArgs && invoke(lastArgs);
2124
+
2125
+ return [throttled, flush];
2126
+ }
2127
+
2128
+ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
2129
+ let bytesNotified = 0;
2130
+ const _speedometer = speedometer(50, 250);
2131
+
2132
+ return throttle(e => {
2133
+ const loaded = e.loaded;
2134
+ const total = e.lengthComputable ? e.total : undefined;
2135
+ const progressBytes = loaded - bytesNotified;
2136
+ const rate = _speedometer(progressBytes);
2137
+ const inRange = loaded <= total;
2138
+
2139
+ bytesNotified = loaded;
2140
+
2141
+ const data = {
2142
+ loaded,
2143
+ total,
2144
+ progress: total ? (loaded / total) : undefined,
2145
+ bytes: progressBytes,
2146
+ rate: rate ? rate : undefined,
2147
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2148
+ event: e,
2149
+ lengthComputable: total != null,
2150
+ [isDownloadStream ? 'download' : 'upload']: true
2151
+ };
2152
+
2153
+ listener(data);
2154
+ }, freq);
2155
+ };
2156
+
2157
+ const progressEventDecorator = (total, throttled) => {
2158
+ const lengthComputable = total != null;
2159
+
2160
+ return [(loaded) => throttled[0]({
2161
+ lengthComputable,
2162
+ total,
2163
+ loaded
2164
+ }), throttled[1]];
2165
+ };
2166
+
2167
+ const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
2168
+
2169
+ const isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
2170
+ url = new URL(url, platform.origin);
2171
+
2172
+ return (
2173
+ origin.protocol === url.protocol &&
2174
+ origin.host === url.host &&
2175
+ (isMSIE || origin.port === url.port)
2176
+ );
2177
+ })(
2178
+ new URL(platform.origin),
2179
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
2180
+ ) : () => true;
2181
+
2182
+ const cookies = platform.hasStandardBrowserEnv ?
2183
+
2184
+ // Standard browser envs support document.cookie
2185
+ {
2186
+ write(name, value, expires, path, domain, secure) {
2187
+ const cookie = [name + '=' + encodeURIComponent(value)];
2188
+
2189
+ utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
2190
+
2191
+ utils$1.isString(path) && cookie.push('path=' + path);
2192
+
2193
+ utils$1.isString(domain) && cookie.push('domain=' + domain);
2194
+
2195
+ secure === true && cookie.push('secure');
2196
+
2197
+ document.cookie = cookie.join('; ');
2198
+ },
2199
+
2200
+ read(name) {
2201
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
2202
+ return (match ? decodeURIComponent(match[3]) : null);
2203
+ },
2204
+
2205
+ remove(name) {
2206
+ this.write(name, '', Date.now() - 86400000);
2207
+ }
2208
+ }
2209
+
2210
+ :
2211
+
2212
+ // Non-standard browser env (web workers, react-native) lack needed support.
2213
+ {
2214
+ write() {},
2215
+ read() {
2216
+ return null;
2217
+ },
2218
+ remove() {}
2219
+ };
2220
+
2221
+ /**
2222
+ * Determines whether the specified URL is absolute
2223
+ *
2224
+ * @param {string} url The URL to test
2225
+ *
2226
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
2227
+ */
2228
+ function isAbsoluteURL(url) {
2229
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
2230
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
2231
+ // by any combination of letters, digits, plus, period, or hyphen.
2232
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
2233
+ }
2234
+
2235
+ /**
2236
+ * Creates a new URL by combining the specified URLs
2237
+ *
2238
+ * @param {string} baseURL The base URL
2239
+ * @param {string} relativeURL The relative URL
2240
+ *
2241
+ * @returns {string} The combined URL
2242
+ */
2243
+ function combineURLs(baseURL, relativeURL) {
2244
+ return relativeURL
2245
+ ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
2246
+ : baseURL;
2247
+ }
2248
+
2249
+ /**
2250
+ * Creates a new URL by combining the baseURL with the requestedURL,
2251
+ * only when the requestedURL is not already an absolute URL.
2252
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
2253
+ *
2254
+ * @param {string} baseURL The base URL
2255
+ * @param {string} requestedURL Absolute or relative URL to combine
2256
+ *
2257
+ * @returns {string} The combined full path
2258
+ */
2259
+ function buildFullPath(baseURL, requestedURL) {
2260
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
2261
+ return combineURLs(baseURL, requestedURL);
2262
+ }
2263
+ return requestedURL;
2264
+ }
2265
+
2266
+ const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
2267
+
2268
+ /**
2269
+ * Config-specific merge-function which creates a new config-object
2270
+ * by merging two configuration objects together.
2271
+ *
2272
+ * @param {Object} config1
2273
+ * @param {Object} config2
2274
+ *
2275
+ * @returns {Object} New object resulting from merging config2 to config1
2276
+ */
2277
+ function mergeConfig(config1, config2) {
2278
+ // eslint-disable-next-line no-param-reassign
2279
+ config2 = config2 || {};
2280
+ const config = {};
2281
+
2282
+ function getMergedValue(target, source, prop, caseless) {
2283
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
2284
+ return utils$1.merge.call({caseless}, target, source);
2285
+ } else if (utils$1.isPlainObject(source)) {
2286
+ return utils$1.merge({}, source);
2287
+ } else if (utils$1.isArray(source)) {
2288
+ return source.slice();
2289
+ }
2290
+ return source;
2291
+ }
2292
+
2293
+ // eslint-disable-next-line consistent-return
2294
+ function mergeDeepProperties(a, b, prop , caseless) {
2295
+ if (!utils$1.isUndefined(b)) {
2296
+ return getMergedValue(a, b, prop , caseless);
2297
+ } else if (!utils$1.isUndefined(a)) {
2298
+ return getMergedValue(undefined, a, prop , caseless);
2299
+ }
2300
+ }
2301
+
2302
+ // eslint-disable-next-line consistent-return
2303
+ function valueFromConfig2(a, b) {
2304
+ if (!utils$1.isUndefined(b)) {
2305
+ return getMergedValue(undefined, b);
2306
+ }
2307
+ }
2308
+
2309
+ // eslint-disable-next-line consistent-return
2310
+ function defaultToConfig2(a, b) {
2311
+ if (!utils$1.isUndefined(b)) {
2312
+ return getMergedValue(undefined, b);
2313
+ } else if (!utils$1.isUndefined(a)) {
2314
+ return getMergedValue(undefined, a);
2315
+ }
2316
+ }
2317
+
2318
+ // eslint-disable-next-line consistent-return
2319
+ function mergeDirectKeys(a, b, prop) {
2320
+ if (prop in config2) {
2321
+ return getMergedValue(a, b);
2322
+ } else if (prop in config1) {
2323
+ return getMergedValue(undefined, a);
2324
+ }
2325
+ }
2326
+
2327
+ const mergeMap = {
2328
+ url: valueFromConfig2,
2329
+ method: valueFromConfig2,
2330
+ data: valueFromConfig2,
2331
+ baseURL: defaultToConfig2,
2332
+ transformRequest: defaultToConfig2,
2333
+ transformResponse: defaultToConfig2,
2334
+ paramsSerializer: defaultToConfig2,
2335
+ timeout: defaultToConfig2,
2336
+ timeoutMessage: defaultToConfig2,
2337
+ withCredentials: defaultToConfig2,
2338
+ withXSRFToken: defaultToConfig2,
2339
+ adapter: defaultToConfig2,
2340
+ responseType: defaultToConfig2,
2341
+ xsrfCookieName: defaultToConfig2,
2342
+ xsrfHeaderName: defaultToConfig2,
2343
+ onUploadProgress: defaultToConfig2,
2344
+ onDownloadProgress: defaultToConfig2,
2345
+ decompress: defaultToConfig2,
2346
+ maxContentLength: defaultToConfig2,
2347
+ maxBodyLength: defaultToConfig2,
2348
+ beforeRedirect: defaultToConfig2,
2349
+ transport: defaultToConfig2,
2350
+ httpAgent: defaultToConfig2,
2351
+ httpsAgent: defaultToConfig2,
2352
+ cancelToken: defaultToConfig2,
2353
+ socketPath: defaultToConfig2,
2354
+ responseEncoding: defaultToConfig2,
2355
+ validateStatus: mergeDirectKeys,
2356
+ headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
2357
+ };
2358
+
2359
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
2360
+ const merge = mergeMap[prop] || mergeDeepProperties;
2361
+ const configValue = merge(config1[prop], config2[prop], prop);
2362
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
2363
+ });
2364
+
2365
+ return config;
2366
+ }
2367
+
2368
+ const resolveConfig = (config) => {
2369
+ const newConfig = mergeConfig({}, config);
2370
+
2371
+ let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
2372
+
2373
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
2374
+
2375
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
2376
+
2377
+ // HTTP basic authentication
2378
+ if (auth) {
2379
+ headers.set('Authorization', 'Basic ' +
2380
+ btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
2381
+ );
2382
+ }
2383
+
2384
+ let contentType;
2385
+
2386
+ if (utils$1.isFormData(data)) {
2387
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2388
+ headers.setContentType(undefined); // Let the browser set it
2389
+ } else if ((contentType = headers.getContentType()) !== false) {
2390
+ // fix semicolon duplication issue for ReactNative FormData implementation
2391
+ const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
2392
+ headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
2393
+ }
2394
+ }
2395
+
2396
+ // Add xsrf header
2397
+ // This is only done if running in a standard browser environment.
2398
+ // Specifically not if we're in a web worker, or react-native.
2399
+
2400
+ if (platform.hasStandardBrowserEnv) {
2401
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
2402
+
2403
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
2404
+ // Add xsrf header
2405
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
2406
+
2407
+ if (xsrfValue) {
2408
+ headers.set(xsrfHeaderName, xsrfValue);
2409
+ }
2410
+ }
2411
+ }
2412
+
2413
+ return newConfig;
2414
+ };
2415
+
2416
+ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2417
+
2418
+ const xhrAdapter = isXHRAdapterSupported && function (config) {
2419
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
2420
+ const _config = resolveConfig(config);
2421
+ let requestData = _config.data;
2422
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
2423
+ let {responseType, onUploadProgress, onDownloadProgress} = _config;
2424
+ let onCanceled;
2425
+ let uploadThrottled, downloadThrottled;
2426
+ let flushUpload, flushDownload;
2427
+
2428
+ function done() {
2429
+ flushUpload && flushUpload(); // flush events
2430
+ flushDownload && flushDownload(); // flush events
2431
+
2432
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
2433
+
2434
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
2435
+ }
2436
+
2437
+ let request = new XMLHttpRequest();
2438
+
2439
+ request.open(_config.method.toUpperCase(), _config.url, true);
2440
+
2441
+ // Set the request timeout in MS
2442
+ request.timeout = _config.timeout;
2443
+
2444
+ function onloadend() {
2445
+ if (!request) {
2446
+ return;
2447
+ }
2448
+ // Prepare the response
2449
+ const responseHeaders = AxiosHeaders$1.from(
2450
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
2451
+ );
2452
+ const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
2453
+ request.responseText : request.response;
2454
+ const response = {
2455
+ data: responseData,
2456
+ status: request.status,
2457
+ statusText: request.statusText,
2458
+ headers: responseHeaders,
2459
+ config,
2460
+ request
2461
+ };
2462
+
2463
+ settle(function _resolve(value) {
2464
+ resolve(value);
2465
+ done();
2466
+ }, function _reject(err) {
2467
+ reject(err);
2468
+ done();
2469
+ }, response);
2470
+
2471
+ // Clean up request
2472
+ request = null;
2473
+ }
2474
+
2475
+ if ('onloadend' in request) {
2476
+ // Use onloadend if available
2477
+ request.onloadend = onloadend;
2478
+ } else {
2479
+ // Listen for ready state to emulate onloadend
2480
+ request.onreadystatechange = function handleLoad() {
2481
+ if (!request || request.readyState !== 4) {
2482
+ return;
2483
+ }
2484
+
2485
+ // The request errored out and we didn't get a response, this will be
2486
+ // handled by onerror instead
2487
+ // With one exception: request that using file: protocol, most browsers
2488
+ // will return status as 0 even though it's a successful request
2489
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
2490
+ return;
2491
+ }
2492
+ // readystate handler is calling before onerror or ontimeout handlers,
2493
+ // so we should call onloadend on the next 'tick'
2494
+ setTimeout(onloadend);
2495
+ };
2496
+ }
2497
+
2498
+ // Handle browser request cancellation (as opposed to a manual cancellation)
2499
+ request.onabort = function handleAbort() {
2500
+ if (!request) {
2501
+ return;
2502
+ }
2503
+
2504
+ reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
2505
+
2506
+ // Clean up request
2507
+ request = null;
2508
+ };
2509
+
2510
+ // Handle low level network errors
2511
+ request.onerror = function handleError() {
2512
+ // Real errors are hidden from us by the browser
2513
+ // onerror should only fire if it's a network error
2514
+ reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
2515
+
2516
+ // Clean up request
2517
+ request = null;
2518
+ };
2519
+
2520
+ // Handle timeout
2521
+ request.ontimeout = function handleTimeout() {
2522
+ let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
2523
+ const transitional = _config.transitional || transitionalDefaults;
2524
+ if (_config.timeoutErrorMessage) {
2525
+ timeoutErrorMessage = _config.timeoutErrorMessage;
2526
+ }
2527
+ reject(new AxiosError(
2528
+ timeoutErrorMessage,
2529
+ transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
2530
+ config,
2531
+ request));
2532
+
2533
+ // Clean up request
2534
+ request = null;
2535
+ };
2536
+
2537
+ // Remove Content-Type if data is undefined
2538
+ requestData === undefined && requestHeaders.setContentType(null);
2539
+
2540
+ // Add headers to the request
2541
+ if ('setRequestHeader' in request) {
2542
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
2543
+ request.setRequestHeader(key, val);
2544
+ });
2545
+ }
2546
+
2547
+ // Add withCredentials to request if needed
2548
+ if (!utils$1.isUndefined(_config.withCredentials)) {
2549
+ request.withCredentials = !!_config.withCredentials;
2550
+ }
2551
+
2552
+ // Add responseType to request if needed
2553
+ if (responseType && responseType !== 'json') {
2554
+ request.responseType = _config.responseType;
2555
+ }
2556
+
2557
+ // Handle progress if needed
2558
+ if (onDownloadProgress) {
2559
+ ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
2560
+ request.addEventListener('progress', downloadThrottled);
2561
+ }
2562
+
2563
+ // Not all browsers support upload events
2564
+ if (onUploadProgress && request.upload) {
2565
+ ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
2566
+
2567
+ request.upload.addEventListener('progress', uploadThrottled);
2568
+
2569
+ request.upload.addEventListener('loadend', flushUpload);
2570
+ }
2571
+
2572
+ if (_config.cancelToken || _config.signal) {
2573
+ // Handle cancellation
2574
+ // eslint-disable-next-line func-names
2575
+ onCanceled = cancel => {
2576
+ if (!request) {
2577
+ return;
2578
+ }
2579
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
2580
+ request.abort();
2581
+ request = null;
2582
+ };
2583
+
2584
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
2585
+ if (_config.signal) {
2586
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
2587
+ }
2588
+ }
2589
+
2590
+ const protocol = parseProtocol(_config.url);
2591
+
2592
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
2593
+ reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
2594
+ return;
2595
+ }
2596
+
2597
+
2598
+ // Send the request
2599
+ request.send(requestData || null);
2600
+ });
2601
+ };
2602
+
2603
+ const composeSignals = (signals, timeout) => {
2604
+ const {length} = (signals = signals ? signals.filter(Boolean) : []);
2605
+
2606
+ if (timeout || length) {
2607
+ let controller = new AbortController();
2608
+
2609
+ let aborted;
2610
+
2611
+ const onabort = function (reason) {
2612
+ if (!aborted) {
2613
+ aborted = true;
2614
+ unsubscribe();
2615
+ const err = reason instanceof Error ? reason : this.reason;
2616
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
2617
+ }
2618
+ };
2619
+
2620
+ let timer = timeout && setTimeout(() => {
2621
+ timer = null;
2622
+ onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
2623
+ }, timeout);
2624
+
2625
+ const unsubscribe = () => {
2626
+ if (signals) {
2627
+ timer && clearTimeout(timer);
2628
+ timer = null;
2629
+ signals.forEach(signal => {
2630
+ signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
2631
+ });
2632
+ signals = null;
2633
+ }
2634
+ };
2635
+
2636
+ signals.forEach((signal) => signal.addEventListener('abort', onabort));
2637
+
2638
+ const {signal} = controller;
2639
+
2640
+ signal.unsubscribe = () => utils$1.asap(unsubscribe);
2641
+
2642
+ return signal;
2643
+ }
2644
+ };
2645
+
2646
+ const composeSignals$1 = composeSignals;
2647
+
2648
+ const streamChunk = function* (chunk, chunkSize) {
2649
+ let len = chunk.byteLength;
2650
+
2651
+ if (!chunkSize || len < chunkSize) {
2652
+ yield chunk;
2653
+ return;
2654
+ }
2655
+
2656
+ let pos = 0;
2657
+ let end;
2658
+
2659
+ while (pos < len) {
2660
+ end = pos + chunkSize;
2661
+ yield chunk.slice(pos, end);
2662
+ pos = end;
2663
+ }
2664
+ };
2665
+
2666
+ const readBytes = async function* (iterable, chunkSize) {
2667
+ for await (const chunk of readStream(iterable)) {
2668
+ yield* streamChunk(chunk, chunkSize);
2669
+ }
2670
+ };
2671
+
2672
+ const readStream = async function* (stream) {
2673
+ if (stream[Symbol.asyncIterator]) {
2674
+ yield* stream;
2675
+ return;
2676
+ }
2677
+
2678
+ const reader = stream.getReader();
2679
+ try {
2680
+ for (;;) {
2681
+ const {done, value} = await reader.read();
2682
+ if (done) {
2683
+ break;
2684
+ }
2685
+ yield value;
2686
+ }
2687
+ } finally {
2688
+ await reader.cancel();
2689
+ }
2690
+ };
2691
+
2692
+ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
2693
+ const iterator = readBytes(stream, chunkSize);
2694
+
2695
+ let bytes = 0;
2696
+ let done;
2697
+ let _onFinish = (e) => {
2698
+ if (!done) {
2699
+ done = true;
2700
+ onFinish && onFinish(e);
2701
+ }
2702
+ };
2703
+
2704
+ return new ReadableStream({
2705
+ async pull(controller) {
2706
+ try {
2707
+ const {done, value} = await iterator.next();
2708
+
2709
+ if (done) {
2710
+ _onFinish();
2711
+ controller.close();
2712
+ return;
2713
+ }
2714
+
2715
+ let len = value.byteLength;
2716
+ if (onProgress) {
2717
+ let loadedBytes = bytes += len;
2718
+ onProgress(loadedBytes);
2719
+ }
2720
+ controller.enqueue(new Uint8Array(value));
2721
+ } catch (err) {
2722
+ _onFinish(err);
2723
+ throw err;
2724
+ }
2725
+ },
2726
+ cancel(reason) {
2727
+ _onFinish(reason);
2728
+ return iterator.return();
2729
+ }
2730
+ }, {
2731
+ highWaterMark: 2
2732
+ })
2733
+ };
2734
+
2735
+ const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
2736
+ const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
2737
+
2738
+ // used only inside the fetch adapter
2739
+ const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
2740
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
2741
+ async (str) => new Uint8Array(await new Response(str).arrayBuffer())
2742
+ );
2743
+
2744
+ const test = (fn, ...args) => {
2745
+ try {
2746
+ return !!fn(...args);
2747
+ } catch (e) {
2748
+ return false
2749
+ }
2750
+ };
2751
+
2752
+ const supportsRequestStream = isReadableStreamSupported && test(() => {
2753
+ let duplexAccessed = false;
2754
+
2755
+ const hasContentType = new Request(platform.origin, {
2756
+ body: new ReadableStream(),
2757
+ method: 'POST',
2758
+ get duplex() {
2759
+ duplexAccessed = true;
2760
+ return 'half';
2761
+ },
2762
+ }).headers.has('Content-Type');
2763
+
2764
+ return duplexAccessed && !hasContentType;
2765
+ });
2766
+
2767
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
2768
+
2769
+ const supportsResponseStream = isReadableStreamSupported &&
2770
+ test(() => utils$1.isReadableStream(new Response('').body));
2771
+
2772
+
2773
+ const resolvers = {
2774
+ stream: supportsResponseStream && ((res) => res.body)
2775
+ };
2776
+
2777
+ isFetchSupported && (((res) => {
2778
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
2779
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
2780
+ (_, config) => {
2781
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
2782
+ });
2783
+ });
2784
+ })(new Response));
2785
+
2786
+ const getBodyLength = async (body) => {
2787
+ if (body == null) {
2788
+ return 0;
2789
+ }
2790
+
2791
+ if(utils$1.isBlob(body)) {
2792
+ return body.size;
2793
+ }
2794
+
2795
+ if(utils$1.isSpecCompliantForm(body)) {
2796
+ const _request = new Request(platform.origin, {
2797
+ method: 'POST',
2798
+ body,
2799
+ });
2800
+ return (await _request.arrayBuffer()).byteLength;
2801
+ }
2802
+
2803
+ if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
2804
+ return body.byteLength;
2805
+ }
2806
+
2807
+ if(utils$1.isURLSearchParams(body)) {
2808
+ body = body + '';
2809
+ }
2810
+
2811
+ if(utils$1.isString(body)) {
2812
+ return (await encodeText(body)).byteLength;
2813
+ }
2814
+ };
2815
+
2816
+ const resolveBodyLength = async (headers, body) => {
2817
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
2818
+
2819
+ return length == null ? getBodyLength(body) : length;
2820
+ };
2821
+
2822
+ const fetchAdapter = isFetchSupported && (async (config) => {
2823
+ let {
2824
+ url,
2825
+ method,
2826
+ data,
2827
+ signal,
2828
+ cancelToken,
2829
+ timeout,
2830
+ onDownloadProgress,
2831
+ onUploadProgress,
2832
+ responseType,
2833
+ headers,
2834
+ withCredentials = 'same-origin',
2835
+ fetchOptions
2836
+ } = resolveConfig(config);
2837
+
2838
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
2839
+
2840
+ let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
2841
+
2842
+ let request;
2843
+
2844
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
2845
+ composedSignal.unsubscribe();
2846
+ });
2847
+
2848
+ let requestContentLength;
2849
+
2850
+ try {
2851
+ if (
2852
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
2853
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
2854
+ ) {
2855
+ let _request = new Request(url, {
2856
+ method: 'POST',
2857
+ body: data,
2858
+ duplex: "half"
2859
+ });
2860
+
2861
+ let contentTypeHeader;
2862
+
2863
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
2864
+ headers.setContentType(contentTypeHeader);
2865
+ }
2866
+
2867
+ if (_request.body) {
2868
+ const [onProgress, flush] = progressEventDecorator(
2869
+ requestContentLength,
2870
+ progressEventReducer(asyncDecorator(onUploadProgress))
2871
+ );
2872
+
2873
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
2874
+ }
2875
+ }
2876
+
2877
+ if (!utils$1.isString(withCredentials)) {
2878
+ withCredentials = withCredentials ? 'include' : 'omit';
2879
+ }
2880
+
2881
+ // Cloudflare Workers throws when credentials are defined
2882
+ // see https://github.com/cloudflare/workerd/issues/902
2883
+ const isCredentialsSupported = "credentials" in Request.prototype;
2884
+ request = new Request(url, {
2885
+ ...fetchOptions,
2886
+ signal: composedSignal,
2887
+ method: method.toUpperCase(),
2888
+ headers: headers.normalize().toJSON(),
2889
+ body: data,
2890
+ duplex: "half",
2891
+ credentials: isCredentialsSupported ? withCredentials : undefined
2892
+ });
2893
+
2894
+ let response = await fetch(request);
2895
+
2896
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
2897
+
2898
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
2899
+ const options = {};
2900
+
2901
+ ['status', 'statusText', 'headers'].forEach(prop => {
2902
+ options[prop] = response[prop];
2903
+ });
2904
+
2905
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
2906
+
2907
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
2908
+ responseContentLength,
2909
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
2910
+ ) || [];
2911
+
2912
+ response = new Response(
2913
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
2914
+ flush && flush();
2915
+ unsubscribe && unsubscribe();
2916
+ }),
2917
+ options
2918
+ );
2919
+ }
2920
+
2921
+ responseType = responseType || 'text';
2922
+
2923
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
2924
+
2925
+ !isStreamResponse && unsubscribe && unsubscribe();
2926
+
2927
+ return await new Promise((resolve, reject) => {
2928
+ settle(resolve, reject, {
2929
+ data: responseData,
2930
+ headers: AxiosHeaders$1.from(response.headers),
2931
+ status: response.status,
2932
+ statusText: response.statusText,
2933
+ config,
2934
+ request
2935
+ });
2936
+ })
2937
+ } catch (err) {
2938
+ unsubscribe && unsubscribe();
2939
+
2940
+ if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
2941
+ throw Object.assign(
2942
+ new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
2943
+ {
2944
+ cause: err.cause || err
2945
+ }
2946
+ )
2947
+ }
2948
+
2949
+ throw AxiosError.from(err, err && err.code, config, request);
2950
+ }
2951
+ });
2952
+
2953
+ const knownAdapters = {
2954
+ http: httpAdapter,
2955
+ xhr: xhrAdapter,
2956
+ fetch: fetchAdapter
2957
+ };
2958
+
2959
+ utils$1.forEach(knownAdapters, (fn, value) => {
2960
+ if (fn) {
2961
+ try {
2962
+ Object.defineProperty(fn, 'name', {value});
2963
+ } catch (e) {
2964
+ // eslint-disable-next-line no-empty
2965
+ }
2966
+ Object.defineProperty(fn, 'adapterName', {value});
2967
+ }
2968
+ });
2969
+
2970
+ const renderReason = (reason) => `- ${reason}`;
2971
+
2972
+ const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
2973
+
2974
+ const adapters = {
2975
+ getAdapter: (adapters) => {
2976
+ adapters = utils$1.isArray(adapters) ? adapters : [adapters];
2977
+
2978
+ const {length} = adapters;
2979
+ let nameOrAdapter;
2980
+ let adapter;
2981
+
2982
+ const rejectedReasons = {};
2983
+
2984
+ for (let i = 0; i < length; i++) {
2985
+ nameOrAdapter = adapters[i];
2986
+ let id;
2987
+
2988
+ adapter = nameOrAdapter;
2989
+
2990
+ if (!isResolvedHandle(nameOrAdapter)) {
2991
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
2992
+
2993
+ if (adapter === undefined) {
2994
+ throw new AxiosError(`Unknown adapter '${id}'`);
2995
+ }
2996
+ }
2997
+
2998
+ if (adapter) {
2999
+ break;
3000
+ }
3001
+
3002
+ rejectedReasons[id || '#' + i] = adapter;
3003
+ }
3004
+
3005
+ if (!adapter) {
3006
+
3007
+ const reasons = Object.entries(rejectedReasons)
3008
+ .map(([id, state]) => `adapter ${id} ` +
3009
+ (state === false ? 'is not supported by the environment' : 'is not available in the build')
3010
+ );
3011
+
3012
+ let s = length ?
3013
+ (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
3014
+ 'as no adapter specified';
3015
+
3016
+ throw new AxiosError(
3017
+ `There is no suitable adapter to dispatch the request ` + s,
3018
+ 'ERR_NOT_SUPPORT'
3019
+ );
3020
+ }
3021
+
3022
+ return adapter;
3023
+ },
3024
+ adapters: knownAdapters
3025
+ };
3026
+
3027
+ /**
3028
+ * Throws a `CanceledError` if cancellation has been requested.
3029
+ *
3030
+ * @param {Object} config The config that is to be used for the request
3031
+ *
3032
+ * @returns {void}
3033
+ */
3034
+ function throwIfCancellationRequested(config) {
3035
+ if (config.cancelToken) {
3036
+ config.cancelToken.throwIfRequested();
3037
+ }
3038
+
3039
+ if (config.signal && config.signal.aborted) {
3040
+ throw new CanceledError(null, config);
3041
+ }
3042
+ }
3043
+
3044
+ /**
3045
+ * Dispatch a request to the server using the configured adapter.
3046
+ *
3047
+ * @param {object} config The config that is to be used for the request
3048
+ *
3049
+ * @returns {Promise} The Promise to be fulfilled
3050
+ */
3051
+ function dispatchRequest(config) {
3052
+ throwIfCancellationRequested(config);
3053
+
3054
+ config.headers = AxiosHeaders$1.from(config.headers);
3055
+
3056
+ // Transform request data
3057
+ config.data = transformData.call(
3058
+ config,
3059
+ config.transformRequest
3060
+ );
3061
+
3062
+ if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
3063
+ config.headers.setContentType('application/x-www-form-urlencoded', false);
3064
+ }
3065
+
3066
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
3067
+
3068
+ return adapter(config).then(function onAdapterResolution(response) {
3069
+ throwIfCancellationRequested(config);
3070
+
3071
+ // Transform response data
3072
+ response.data = transformData.call(
3073
+ config,
3074
+ config.transformResponse,
3075
+ response
3076
+ );
3077
+
3078
+ response.headers = AxiosHeaders$1.from(response.headers);
3079
+
3080
+ return response;
3081
+ }, function onAdapterRejection(reason) {
3082
+ if (!isCancel(reason)) {
3083
+ throwIfCancellationRequested(config);
3084
+
3085
+ // Transform response data
3086
+ if (reason && reason.response) {
3087
+ reason.response.data = transformData.call(
3088
+ config,
3089
+ config.transformResponse,
3090
+ reason.response
3091
+ );
3092
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
3093
+ }
3094
+ }
3095
+
3096
+ return Promise.reject(reason);
3097
+ });
3098
+ }
3099
+
3100
+ const VERSION = "1.7.9";
3101
+
3102
+ const validators$1 = {};
3103
+
3104
+ // eslint-disable-next-line func-names
3105
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
3106
+ validators$1[type] = function validator(thing) {
3107
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
3108
+ };
3109
+ });
3110
+
3111
+ const deprecatedWarnings = {};
3112
+
3113
+ /**
3114
+ * Transitional option validator
3115
+ *
3116
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
3117
+ * @param {string?} version - deprecated version / removed since version
3118
+ * @param {string?} message - some message with additional info
3119
+ *
3120
+ * @returns {function}
3121
+ */
3122
+ validators$1.transitional = function transitional(validator, version, message) {
3123
+ function formatMessage(opt, desc) {
3124
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
3125
+ }
3126
+
3127
+ // eslint-disable-next-line func-names
3128
+ return (value, opt, opts) => {
3129
+ if (validator === false) {
3130
+ throw new AxiosError(
3131
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
3132
+ AxiosError.ERR_DEPRECATED
3133
+ );
3134
+ }
3135
+
3136
+ if (version && !deprecatedWarnings[opt]) {
3137
+ deprecatedWarnings[opt] = true;
3138
+ // eslint-disable-next-line no-console
3139
+ console.warn(
3140
+ formatMessage(
3141
+ opt,
3142
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
3143
+ )
3144
+ );
3145
+ }
3146
+
3147
+ return validator ? validator(value, opt, opts) : true;
3148
+ };
3149
+ };
3150
+
3151
+ validators$1.spelling = function spelling(correctSpelling) {
3152
+ return (value, opt) => {
3153
+ // eslint-disable-next-line no-console
3154
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
3155
+ return true;
3156
+ }
3157
+ };
3158
+
3159
+ /**
3160
+ * Assert object's properties type
3161
+ *
3162
+ * @param {object} options
3163
+ * @param {object} schema
3164
+ * @param {boolean?} allowUnknown
3165
+ *
3166
+ * @returns {object}
3167
+ */
3168
+
3169
+ function assertOptions(options, schema, allowUnknown) {
3170
+ if (typeof options !== 'object') {
3171
+ throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
3172
+ }
3173
+ const keys = Object.keys(options);
3174
+ let i = keys.length;
3175
+ while (i-- > 0) {
3176
+ const opt = keys[i];
3177
+ const validator = schema[opt];
3178
+ if (validator) {
3179
+ const value = options[opt];
3180
+ const result = value === undefined || validator(value, opt, options);
3181
+ if (result !== true) {
3182
+ throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
3183
+ }
3184
+ continue;
3185
+ }
3186
+ if (allowUnknown !== true) {
3187
+ throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
3188
+ }
3189
+ }
3190
+ }
3191
+
3192
+ const validator = {
3193
+ assertOptions,
3194
+ validators: validators$1
3195
+ };
3196
+
3197
+ const validators = validator.validators;
3198
+
3199
+ /**
3200
+ * Create a new instance of Axios
3201
+ *
3202
+ * @param {Object} instanceConfig The default config for the instance
3203
+ *
3204
+ * @return {Axios} A new instance of Axios
3205
+ */
3206
+ class Axios {
3207
+ constructor(instanceConfig) {
3208
+ this.defaults = instanceConfig;
3209
+ this.interceptors = {
3210
+ request: new InterceptorManager$1(),
3211
+ response: new InterceptorManager$1()
3212
+ };
3213
+ }
3214
+
3215
+ /**
3216
+ * Dispatch a request
3217
+ *
3218
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
3219
+ * @param {?Object} config
3220
+ *
3221
+ * @returns {Promise} The Promise to be fulfilled
3222
+ */
3223
+ async request(configOrUrl, config) {
3224
+ try {
3225
+ return await this._request(configOrUrl, config);
3226
+ } catch (err) {
3227
+ if (err instanceof Error) {
3228
+ let dummy = {};
3229
+
3230
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
3231
+
3232
+ // slice off the Error: ... line
3233
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
3234
+ try {
3235
+ if (!err.stack) {
3236
+ err.stack = stack;
3237
+ // match without the 2 top stack lines
3238
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
3239
+ err.stack += '\n' + stack;
3240
+ }
3241
+ } catch (e) {
3242
+ // ignore the case where "stack" is an un-writable property
3243
+ }
3244
+ }
3245
+
3246
+ throw err;
3247
+ }
3248
+ }
3249
+
3250
+ _request(configOrUrl, config) {
3251
+ /*eslint no-param-reassign:0*/
3252
+ // Allow for axios('example/url'[, config]) a la fetch API
3253
+ if (typeof configOrUrl === 'string') {
3254
+ config = config || {};
3255
+ config.url = configOrUrl;
3256
+ } else {
3257
+ config = configOrUrl || {};
3258
+ }
3259
+
3260
+ config = mergeConfig(this.defaults, config);
3261
+
3262
+ const {transitional, paramsSerializer, headers} = config;
3263
+
3264
+ if (transitional !== undefined) {
3265
+ validator.assertOptions(transitional, {
3266
+ silentJSONParsing: validators.transitional(validators.boolean),
3267
+ forcedJSONParsing: validators.transitional(validators.boolean),
3268
+ clarifyTimeoutError: validators.transitional(validators.boolean)
3269
+ }, false);
3270
+ }
3271
+
3272
+ if (paramsSerializer != null) {
3273
+ if (utils$1.isFunction(paramsSerializer)) {
3274
+ config.paramsSerializer = {
3275
+ serialize: paramsSerializer
3276
+ };
3277
+ } else {
3278
+ validator.assertOptions(paramsSerializer, {
3279
+ encode: validators.function,
3280
+ serialize: validators.function
3281
+ }, true);
3282
+ }
3283
+ }
3284
+
3285
+ validator.assertOptions(config, {
3286
+ baseUrl: validators.spelling('baseURL'),
3287
+ withXsrfToken: validators.spelling('withXSRFToken')
3288
+ }, true);
3289
+
3290
+ // Set config.method
3291
+ config.method = (config.method || this.defaults.method || 'get').toLowerCase();
3292
+
3293
+ // Flatten headers
3294
+ let contextHeaders = headers && utils$1.merge(
3295
+ headers.common,
3296
+ headers[config.method]
3297
+ );
3298
+
3299
+ headers && utils$1.forEach(
3300
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
3301
+ (method) => {
3302
+ delete headers[method];
3303
+ }
3304
+ );
3305
+
3306
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
3307
+
3308
+ // filter out skipped interceptors
3309
+ const requestInterceptorChain = [];
3310
+ let synchronousRequestInterceptors = true;
3311
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
3312
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
3313
+ return;
3314
+ }
3315
+
3316
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
3317
+
3318
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
3319
+ });
3320
+
3321
+ const responseInterceptorChain = [];
3322
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
3323
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
3324
+ });
3325
+
3326
+ let promise;
3327
+ let i = 0;
3328
+ let len;
3329
+
3330
+ if (!synchronousRequestInterceptors) {
3331
+ const chain = [dispatchRequest.bind(this), undefined];
3332
+ chain.unshift.apply(chain, requestInterceptorChain);
3333
+ chain.push.apply(chain, responseInterceptorChain);
3334
+ len = chain.length;
3335
+
3336
+ promise = Promise.resolve(config);
3337
+
3338
+ while (i < len) {
3339
+ promise = promise.then(chain[i++], chain[i++]);
3340
+ }
3341
+
3342
+ return promise;
3343
+ }
3344
+
3345
+ len = requestInterceptorChain.length;
3346
+
3347
+ let newConfig = config;
3348
+
3349
+ i = 0;
3350
+
3351
+ while (i < len) {
3352
+ const onFulfilled = requestInterceptorChain[i++];
3353
+ const onRejected = requestInterceptorChain[i++];
3354
+ try {
3355
+ newConfig = onFulfilled(newConfig);
3356
+ } catch (error) {
3357
+ onRejected.call(this, error);
3358
+ break;
3359
+ }
3360
+ }
3361
+
3362
+ try {
3363
+ promise = dispatchRequest.call(this, newConfig);
3364
+ } catch (error) {
3365
+ return Promise.reject(error);
3366
+ }
3367
+
3368
+ i = 0;
3369
+ len = responseInterceptorChain.length;
3370
+
3371
+ while (i < len) {
3372
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
3373
+ }
3374
+
3375
+ return promise;
3376
+ }
3377
+
3378
+ getUri(config) {
3379
+ config = mergeConfig(this.defaults, config);
3380
+ const fullPath = buildFullPath(config.baseURL, config.url);
3381
+ return buildURL(fullPath, config.params, config.paramsSerializer);
3382
+ }
3383
+ }
3384
+
3385
+ // Provide aliases for supported request methods
3386
+ utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3387
+ /*eslint func-names:0*/
3388
+ Axios.prototype[method] = function(url, config) {
3389
+ return this.request(mergeConfig(config || {}, {
3390
+ method,
3391
+ url,
3392
+ data: (config || {}).data
3393
+ }));
3394
+ };
3395
+ });
3396
+
3397
+ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3398
+ /*eslint func-names:0*/
3399
+
3400
+ function generateHTTPMethod(isForm) {
3401
+ return function httpMethod(url, data, config) {
3402
+ return this.request(mergeConfig(config || {}, {
3403
+ method,
3404
+ headers: isForm ? {
3405
+ 'Content-Type': 'multipart/form-data'
3406
+ } : {},
3407
+ url,
3408
+ data
3409
+ }));
3410
+ };
3411
+ }
3412
+
3413
+ Axios.prototype[method] = generateHTTPMethod();
3414
+
3415
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
3416
+ });
3417
+
3418
+ const Axios$1 = Axios;
3419
+
3420
+ /**
3421
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
3422
+ *
3423
+ * @param {Function} executor The executor function.
3424
+ *
3425
+ * @returns {CancelToken}
3426
+ */
3427
+ class CancelToken {
3428
+ constructor(executor) {
3429
+ if (typeof executor !== 'function') {
3430
+ throw new TypeError('executor must be a function.');
3431
+ }
3432
+
3433
+ let resolvePromise;
3434
+
3435
+ this.promise = new Promise(function promiseExecutor(resolve) {
3436
+ resolvePromise = resolve;
3437
+ });
3438
+
3439
+ const token = this;
3440
+
3441
+ // eslint-disable-next-line func-names
3442
+ this.promise.then(cancel => {
3443
+ if (!token._listeners) return;
3444
+
3445
+ let i = token._listeners.length;
3446
+
3447
+ while (i-- > 0) {
3448
+ token._listeners[i](cancel);
3449
+ }
3450
+ token._listeners = null;
3451
+ });
3452
+
3453
+ // eslint-disable-next-line func-names
3454
+ this.promise.then = onfulfilled => {
3455
+ let _resolve;
3456
+ // eslint-disable-next-line func-names
3457
+ const promise = new Promise(resolve => {
3458
+ token.subscribe(resolve);
3459
+ _resolve = resolve;
3460
+ }).then(onfulfilled);
3461
+
3462
+ promise.cancel = function reject() {
3463
+ token.unsubscribe(_resolve);
3464
+ };
3465
+
3466
+ return promise;
3467
+ };
3468
+
3469
+ executor(function cancel(message, config, request) {
3470
+ if (token.reason) {
3471
+ // Cancellation has already been requested
3472
+ return;
3473
+ }
3474
+
3475
+ token.reason = new CanceledError(message, config, request);
3476
+ resolvePromise(token.reason);
3477
+ });
3478
+ }
3479
+
3480
+ /**
3481
+ * Throws a `CanceledError` if cancellation has been requested.
3482
+ */
3483
+ throwIfRequested() {
3484
+ if (this.reason) {
3485
+ throw this.reason;
3486
+ }
3487
+ }
3488
+
3489
+ /**
3490
+ * Subscribe to the cancel signal
3491
+ */
3492
+
3493
+ subscribe(listener) {
3494
+ if (this.reason) {
3495
+ listener(this.reason);
3496
+ return;
3497
+ }
3498
+
3499
+ if (this._listeners) {
3500
+ this._listeners.push(listener);
3501
+ } else {
3502
+ this._listeners = [listener];
3503
+ }
3504
+ }
3505
+
3506
+ /**
3507
+ * Unsubscribe from the cancel signal
3508
+ */
3509
+
3510
+ unsubscribe(listener) {
3511
+ if (!this._listeners) {
3512
+ return;
3513
+ }
3514
+ const index = this._listeners.indexOf(listener);
3515
+ if (index !== -1) {
3516
+ this._listeners.splice(index, 1);
3517
+ }
3518
+ }
3519
+
3520
+ toAbortSignal() {
3521
+ const controller = new AbortController();
3522
+
3523
+ const abort = (err) => {
3524
+ controller.abort(err);
3525
+ };
3526
+
3527
+ this.subscribe(abort);
3528
+
3529
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
3530
+
3531
+ return controller.signal;
3532
+ }
3533
+
3534
+ /**
3535
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
3536
+ * cancels the `CancelToken`.
3537
+ */
3538
+ static source() {
3539
+ let cancel;
3540
+ const token = new CancelToken(function executor(c) {
3541
+ cancel = c;
3542
+ });
3543
+ return {
3544
+ token,
3545
+ cancel
3546
+ };
3547
+ }
3548
+ }
3549
+
3550
+ const CancelToken$1 = CancelToken;
3551
+
3552
+ /**
3553
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
3554
+ *
3555
+ * Common use case would be to use `Function.prototype.apply`.
3556
+ *
3557
+ * ```js
3558
+ * function f(x, y, z) {}
3559
+ * var args = [1, 2, 3];
3560
+ * f.apply(null, args);
3561
+ * ```
3562
+ *
3563
+ * With `spread` this example can be re-written.
3564
+ *
3565
+ * ```js
3566
+ * spread(function(x, y, z) {})([1, 2, 3]);
3567
+ * ```
3568
+ *
3569
+ * @param {Function} callback
3570
+ *
3571
+ * @returns {Function}
3572
+ */
3573
+ function spread(callback) {
3574
+ return function wrap(arr) {
3575
+ return callback.apply(null, arr);
3576
+ };
3577
+ }
3578
+
3579
+ /**
3580
+ * Determines whether the payload is an error thrown by Axios
3581
+ *
3582
+ * @param {*} payload The value to test
3583
+ *
3584
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
3585
+ */
3586
+ function isAxiosError(payload) {
3587
+ return utils$1.isObject(payload) && (payload.isAxiosError === true);
3588
+ }
3589
+
3590
+ const HttpStatusCode = {
3591
+ Continue: 100,
3592
+ SwitchingProtocols: 101,
3593
+ Processing: 102,
3594
+ EarlyHints: 103,
3595
+ Ok: 200,
3596
+ Created: 201,
3597
+ Accepted: 202,
3598
+ NonAuthoritativeInformation: 203,
3599
+ NoContent: 204,
3600
+ ResetContent: 205,
3601
+ PartialContent: 206,
3602
+ MultiStatus: 207,
3603
+ AlreadyReported: 208,
3604
+ ImUsed: 226,
3605
+ MultipleChoices: 300,
3606
+ MovedPermanently: 301,
3607
+ Found: 302,
3608
+ SeeOther: 303,
3609
+ NotModified: 304,
3610
+ UseProxy: 305,
3611
+ Unused: 306,
3612
+ TemporaryRedirect: 307,
3613
+ PermanentRedirect: 308,
3614
+ BadRequest: 400,
3615
+ Unauthorized: 401,
3616
+ PaymentRequired: 402,
3617
+ Forbidden: 403,
3618
+ NotFound: 404,
3619
+ MethodNotAllowed: 405,
3620
+ NotAcceptable: 406,
3621
+ ProxyAuthenticationRequired: 407,
3622
+ RequestTimeout: 408,
3623
+ Conflict: 409,
3624
+ Gone: 410,
3625
+ LengthRequired: 411,
3626
+ PreconditionFailed: 412,
3627
+ PayloadTooLarge: 413,
3628
+ UriTooLong: 414,
3629
+ UnsupportedMediaType: 415,
3630
+ RangeNotSatisfiable: 416,
3631
+ ExpectationFailed: 417,
3632
+ ImATeapot: 418,
3633
+ MisdirectedRequest: 421,
3634
+ UnprocessableEntity: 422,
3635
+ Locked: 423,
3636
+ FailedDependency: 424,
3637
+ TooEarly: 425,
3638
+ UpgradeRequired: 426,
3639
+ PreconditionRequired: 428,
3640
+ TooManyRequests: 429,
3641
+ RequestHeaderFieldsTooLarge: 431,
3642
+ UnavailableForLegalReasons: 451,
3643
+ InternalServerError: 500,
3644
+ NotImplemented: 501,
3645
+ BadGateway: 502,
3646
+ ServiceUnavailable: 503,
3647
+ GatewayTimeout: 504,
3648
+ HttpVersionNotSupported: 505,
3649
+ VariantAlsoNegotiates: 506,
3650
+ InsufficientStorage: 507,
3651
+ LoopDetected: 508,
3652
+ NotExtended: 510,
3653
+ NetworkAuthenticationRequired: 511,
3654
+ };
3655
+
3656
+ Object.entries(HttpStatusCode).forEach(([key, value]) => {
3657
+ HttpStatusCode[value] = key;
3658
+ });
3659
+
3660
+ const HttpStatusCode$1 = HttpStatusCode;
3661
+
3662
+ /**
3663
+ * Create an instance of Axios
3664
+ *
3665
+ * @param {Object} defaultConfig The default config for the instance
3666
+ *
3667
+ * @returns {Axios} A new instance of Axios
3668
+ */
3669
+ function createInstance(defaultConfig) {
3670
+ const context = new Axios$1(defaultConfig);
3671
+ const instance = bind(Axios$1.prototype.request, context);
3672
+
3673
+ // Copy axios.prototype to instance
3674
+ utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
3675
+
3676
+ // Copy context to instance
3677
+ utils$1.extend(instance, context, null, {allOwnKeys: true});
3678
+
3679
+ // Factory for creating new instances
3680
+ instance.create = function create(instanceConfig) {
3681
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
3682
+ };
3683
+
3684
+ return instance;
3685
+ }
3686
+
3687
+ // Create the default instance to be exported
3688
+ const axios = createInstance(defaults$1);
3689
+
3690
+ // Expose Axios class to allow class inheritance
3691
+ axios.Axios = Axios$1;
3692
+
3693
+ // Expose Cancel & CancelToken
3694
+ axios.CanceledError = CanceledError;
3695
+ axios.CancelToken = CancelToken$1;
3696
+ axios.isCancel = isCancel;
3697
+ axios.VERSION = VERSION;
3698
+ axios.toFormData = toFormData;
3699
+
3700
+ // Expose AxiosError class
3701
+ axios.AxiosError = AxiosError;
3702
+
3703
+ // alias for CanceledError for backward compatibility
3704
+ axios.Cancel = axios.CanceledError;
3705
+
3706
+ // Expose all/spread
3707
+ axios.all = function all(promises) {
3708
+ return Promise.all(promises);
3709
+ };
3710
+
3711
+ axios.spread = spread;
3712
+
3713
+ // Expose isAxiosError
3714
+ axios.isAxiosError = isAxiosError;
3715
+
3716
+ // Expose mergeConfig
3717
+ axios.mergeConfig = mergeConfig;
3718
+
3719
+ axios.AxiosHeaders = AxiosHeaders$1;
3720
+
3721
+ axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
3722
+
3723
+ axios.getAdapter = adapters.getAdapter;
3724
+
3725
+ axios.HttpStatusCode = HttpStatusCode$1;
3726
+
3727
+ axios.default = axios;
3728
+
3729
+ // this module should only have a default export
3730
+ const axios$1 = axios;
3731
+
3732
+ const BETA_ORIGINS = ['https://beta.verdocs.com', 'https://stage.verdocs.com', 'http://localhost:6006', 'http://localhost:5173'];
3733
+ const API_KEY = BETA_ORIGINS.includes(window.location.origin)
3734
+ ? 'default:development.6348f953f52485d19daf03992f2123a36e9eae59c5ca7f8736dc2b67'
3735
+ : 'default:production.4808a77b2a149e1796391b480b4fb501d73aa1e11123f60e07809ced';
3736
+ const getFeatureFlags = () => axios$1
3737
+ .get('https://unleash.verdocs.com/api/frontend', {
3738
+ headers: {
3739
+ Accept: 'application/json',
3740
+ Authorization: API_KEY,
3741
+ },
3742
+ })
3743
+ .then(r => r.data)
3744
+ .catch(e => {
3745
+ console.log('Unleash: Unable to fetch feature flags', e);
3746
+ throw e;
3747
+ });
3748
+
3749
+ const verdocsContactPickerCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{gap:12px;width:300px;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#f5f5fa}verdocs-contact-picker form .row{gap:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-contact-picker form .row.message{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}verdocs-contact-picker form .names-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .names-row>input{font-size:14px;width:88px}verdocs-contact-picker form .kba-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .kba-row verdocs-select-input{margin:0;-ms-flex:1;flex:1}verdocs-contact-picker form .pin-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .pin-code>input{-ms-flex:0 0 197px;flex:0 0 197px;font-size:14px}verdocs-contact-picker form .address{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .address>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form .zip-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .zip-code>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 80px;flex:0 0 80px;font-size:13px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message label{-ms-flex:0;flex:0}verdocs-contact-picker form .row.message input{width:96%}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:1000000;max-height:225px;overflow-y:scroll;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{width:32px;height:32px}verdocs-contact-picker form .dropdown .suggestion .avatar{width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}";
3750
+ const VerdocsContactPickerStyle0 = verdocsContactPickerCss;
3751
+
3752
+ // const messageIcon =
3753
+ // '<svg focusable="false" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>';
3754
+ // const delegateIcon =
3755
+ // '<svg focusable="false" viewBox="0 0 24 24"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>';
3756
+ // const kbaIcon =
3757
+ // '<svg focusable="false" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M4.5 3.75a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3h-15Zm4.125 3a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Zm-3.873 8.703a4.126 4.126 0 0 1 7.746 0 .75.75 0 0 1-.351.92 7.47 7.47 0 0 1-3.522.877 7.47 7.47 0 0 1-3.522-.877.75.75 0 0 1-.351-.92ZM15 8.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15ZM14.25 12a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H15a.75.75 0 0 1-.75-.75Zm.75 2.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15Z" clip-rule="evenodd" /></svg>';
3758
+ const addrBookIcon = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-user"><path d="M15 13a3 3 0 1 0-6 0"/><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20"/><circle cx="12" cy="8" r="2"/></svg>`;
3759
+ const VerdocsContactPicker = class {
3760
+ constructor(hostRef) {
3761
+ index.registerInstance(this, hostRef);
3762
+ this.searchContacts = index.createEvent(this, "searchContacts", 7);
3763
+ this.exit = index.createEvent(this, "exit", 7);
3764
+ this.next = index.createEvent(this, "next", 7);
3765
+ this.endpoint = jsSdk.VerdocsEndpoint.getDefault();
3766
+ this.templateRole = null;
3767
+ this.contactSuggestions = [];
3768
+ this.first_name = undefined;
3769
+ this.last_name = undefined;
3770
+ this.email = undefined;
3771
+ this.phone = undefined;
3772
+ this.zip = undefined;
3773
+ this.address = undefined;
3774
+ this.message = undefined;
3775
+ this.showSuggestions = false;
3776
+ this.showMessage = false;
3777
+ this.delegator = false;
3778
+ this.showKba = true;
3779
+ this.kba_method = '';
3780
+ this.kba_pin = '';
3781
+ this.nameFieldId = `verdocs-contact-picker-name-${Math.random().toString(36).substring(2, 11)}`;
3782
+ this.firstNameFieldId = `verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2, 11)}`;
3783
+ this.lastNameFieldId = `verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2, 11)}`;
3784
+ this.emailFieldId = `verdocs-contact-picker-email-${Math.random().toString(36).substring(2, 11)}`;
3785
+ this.phoneFieldId = `verdocs-contact-picker-phone-${Math.random().toString(36).substring(2, 11)}`;
3786
+ this.featureFlags = null;
3787
+ }
3788
+ componentWillLoad() {
3789
+ var _a;
3790
+ if (this.templateRole) {
3791
+ const fullName = jsSdk.formatFullName(this.templateRole);
3792
+ const nameComponents = fullName.split(' ');
3793
+ const firstName = this.templateRole.first_name || nameComponents.shift() || '';
3794
+ const lastName = this.templateRole.last_name || nameComponents.join(' ') || '';
3795
+ this.first_name = firstName;
3796
+ this.last_name = lastName;
3797
+ this.email = this.templateRole.email || '';
3798
+ this.phone = this.templateRole.phone || '';
3799
+ this.delegator = this.templateRole.delegator || false;
3800
+ this.message = this.templateRole.message || '';
3801
+ this.showMessage = this.message !== '';
3802
+ this.kba_method = this.templateRole.kba_method || '';
3803
+ this.kba_pin = this.templateRole.kba_pin || '';
3804
+ this.showKba = !!this.kba_method;
3805
+ // TODO: Allow template roles to have zip codes predefined?
3806
+ }
3807
+ this.endpoint.loadSession();
3808
+ console.log('sess', this.endpoint.getSession());
3809
+ jsSdk.getOrganization(this.endpoint, (_a = this.endpoint.getSession()) === null || _a === void 0 ? void 0 : _a['organization_id'])
3810
+ .then(r => {
3811
+ console.log('org', r);
3812
+ })
3813
+ .catch(e => console.log('Unknown Error', e));
3814
+ getFeatureFlags()
3815
+ .then(flags => {
3816
+ this.featureFlags = flags;
3817
+ console.log('[CONTACT PICKER] Feature flags', flags);
3818
+ })
3819
+ .catch(e => {
3820
+ console.log('[CONTACT PICKER] Unable to fetch feature flags, some features may be disabled.', e);
3821
+ });
3822
+ }
3823
+ handleFirstNameChange(e) {
3824
+ var _a;
3825
+ this.first_name = e.target.value;
3826
+ (_a = this.searchContacts) === null || _a === void 0 ? void 0 : _a.emit({ query: this.first_name });
3827
+ }
3828
+ handleLastNameChange(e) {
3829
+ var _a;
3830
+ this.last_name = e.target.value;
3831
+ (_a = this.searchContacts) === null || _a === void 0 ? void 0 : _a.emit({ query: this.last_name });
3832
+ }
3833
+ handleCancel(e) {
3834
+ var _a;
3835
+ e.stopPropagation();
3836
+ this.showSuggestions = false;
3837
+ (_a = this.exit) === null || _a === void 0 ? void 0 : _a.emit();
3838
+ }
3839
+ handleSubmit(e) {
3840
+ var _a;
3841
+ e.stopPropagation();
3842
+ this.showSuggestions = false;
3843
+ (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({
3844
+ first_name: this.first_name,
3845
+ last_name: this.last_name,
3846
+ email: this.email,
3847
+ phone: this.phone,
3848
+ message: this.message,
3849
+ delegator: this.delegator,
3850
+ kba_method: this.kba_method,
3851
+ kba_pin: this.kba_pin,
3852
+ address: this.address,
3853
+ zip: this.zip,
3854
+ });
3855
+ }
3856
+ handleSelectSuggestion(e, suggestion) {
3857
+ e.stopPropagation();
3858
+ this.first_name = suggestion.first_name;
3859
+ this.last_name = suggestion.last_name;
3860
+ this.email = suggestion.email;
3861
+ this.phone = suggestion.phone;
3862
+ this.showSuggestions = false;
3863
+ }
3864
+ // The reason for the random names/IDs is to disable browser autocomplete. We set the autocomplete tags but many browsers ignore them
3865
+ // and show a duplicate autocomplete picker on top of our own.
3866
+ render() {
3867
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
3868
+ const smsEnabled = ((_c = (_b = (_a = this.featureFlags) === null || _a === void 0 ? void 0 : _a.toggles) === null || _b === void 0 ? void 0 : _b.find(t => t.name === 'sms-verification')) === null || _c === void 0 ? void 0 : _c.enabled) === true;
3869
+ const idEnabled = ((_f = (_e = (_d = this.featureFlags) === null || _d === void 0 ? void 0 : _d.toggles) === null || _e === void 0 ? void 0 : _e.find(t => t.name === 'id-verification')) === null || _f === void 0 ? void 0 : _f.enabled) === true;
3870
+ const kbaEnabled = ((_j = (_h = (_g = this.featureFlags) === null || _g === void 0 ? void 0 : _g.toggles) === null || _h === void 0 ? void 0 : _h.find(t => t.name === 'kba-verification')) === null || _j === void 0 ? void 0 : _j.enabled) === true;
3871
+ // TODO: Re-activate this one SMS is re-enabled
3872
+ // sms-verification
3873
+ // const hasBasics = this.first_name && this.last_name && (isValidEmail(this.email) || isValidPhone(this.phone));
3874
+ const hasBasics = this.first_name && this.last_name && jsSdk.isValidEmail(this.email);
3875
+ const hasKbaRequirements = !this.kba_method ||
3876
+ // Passcode-based KBA requires a PIN
3877
+ (this.kba_method === 'pin' && this.kba_pin) ||
3878
+ // KBA has address/zip but they're optional
3879
+ this.kba_method === 'kba' ||
3880
+ // Fully ID-based KBA requires nothing else
3881
+ this.kba_method === 'id' ||
3882
+ // SMS requires a phone number
3883
+ (this.kba_method === 'sms' && this.phone);
3884
+ const canSubmit = hasBasics && hasKbaRequirements;
3885
+ const verificationOptions = [
3886
+ { label: 'None', value: '' },
3887
+ { label: 'Passcode', value: 'pin' },
3888
+ ];
3889
+ if (smsEnabled) {
3890
+ verificationOptions.push({ label: 'SMS (One-Time Code)', value: 'sms' });
3891
+ }
3892
+ if (kbaEnabled) {
3893
+ verificationOptions.push({ label: 'Knowledge-Based (KBA)', value: 'kba' });
3894
+ }
3895
+ if (idEnabled) {
3896
+ verificationOptions.push({ label: 'ID Check', value: 'id' });
3897
+ verificationOptions.push({ label: 'KBA + ID Check', value: 'kba_id' });
3898
+ }
3899
+ return (index.h("form", { key: '65f9991d345b6a4ab1340bf847967bd925b165de', onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, index.h("div", { key: '48d6f4025d9340201426bb79bf56f872fea062f6', class: "row" }, index.h("label", { key: 'a925376ab2e1fec71d789668cff1ea4996d67e30', htmlFor: this.nameFieldId }, "Name:"), index.h("div", { key: 'cde52c50773c1caf966ffecffe6ad1dde1e0f4e7', class: "names-row" }, index.h("input", { key: '45d5850c2417cb4434356d02f852cff56e4f97c6', id: this.firstNameFieldId, name: this.firstNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.first_name, placeholder: "First...", onFocus: () => { var _a; return (this.showSuggestions = ((_a = this.contactSuggestions) === null || _a === void 0 ? void 0 : _a.length) > 0); }, onInput: e => this.handleFirstNameChange(e) }), index.h("input", { key: '79924d63fecba3a663f63b296cfb718474623770', id: this.lastNameFieldId, name: this.lastNameFieldId, type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.last_name, placeholder: "Last...", onFocus: () => (this.showSuggestions = false), onInput: e => this.handleLastNameChange(e) })), this.showSuggestions && (index.h("div", { key: 'ec6e0fdb35688b72a0f905874ff8d4cde15c6980', class: "dropdown" }, this.contactSuggestions
3900
+ .filter(suggestion => !this.first_name || suggestion.first_name.toLowerCase().includes(this.first_name.toLowerCase()))
3901
+ .map(suggestion => {
3902
+ var _a;
3903
+ return (index.h("div", { key: (_a = suggestion.id) !== null && _a !== void 0 ? _a : suggestion.email, class: "suggestion", onClick: e => this.handleSelectSuggestion(e, suggestion) }, suggestion.picture ? index.h("img", { alt: "Avatar", class: "avatar", src: suggestion.picture }) : index.h("div", { class: "avatar", innerHTML: addrBookIcon }), index.h("div", { class: "details" }, index.h("div", { class: "name" }, jsSdk.formatFullName(suggestion)), suggestion.email && index.h("div", { class: "destination" }, suggestion.email), suggestion.phone && index.h("div", { class: "destination" }, suggestion.phone))));
3904
+ })))), index.h("div", { key: '53d284feb32fa0d05c503388f051963cf95fcfee', class: "row" }, index.h("label", { key: '174e960390a6835d30b8a31f5fb21738fbf8b41e', htmlFor: this.emailFieldId }, "Email:"), index.h("input", { key: '49a1262676f9066f7650cd7595870098e5f10059', id: this.emailFieldId, name: this.emailFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.email, placeholder: "Invite via email...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.email = e.target.value) })), index.h("div", { key: '3a81a684f962438e6ca604baad935b0c73b586e3', class: "row" }, index.h("label", { key: '3f9e2094502b65fda2be48fad7e596cabf4a4bff', htmlFor: this.phoneFieldId }, "Phone:"), index.h("input", { key: 'f98ad573709a2334025780978291f360bd0f320e', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.phone, placeholder: "Invite via SMS...", onFocus: () => (this.showSuggestions = false), onInput: (e) => {
3905
+ this.phone = utils$2.convertToE164(e.target.value);
3906
+ } })), index.h(index.Fragment, { key: '57f3f486e0b9f93f8fae5174ced046d0b9e37d56' }, index.h("div", { key: '1318b56bb69b149e516c3790fce934604622a662', class: "kba-row" }, index.h("label", { key: 'a70c58f5e377f0513f5221cd63cb8d48cee390aa' }, "Recipient Verification:"), index.h("verdocs-select-input", { key: '3e5315ff2f2dd7adc14acc7b0065a3f16d10033f', value: this.kba_method, onInput: (e) => {
3907
+ this.kba_method = e.target.value;
3908
+ this.zip = '';
3909
+ this.address = '';
3910
+ this.kba_pin = '';
3911
+ }, options: verificationOptions })), smsEnabled && this.kba_method === 'sms' && (index.h("div", { key: 'dca5c463ac17bae0a7bc1b0b0b27494319e40e7b', class: "row" }, index.h("label", { key: '4b373e3b774c55a79f3a69c6b5d55dd595e0fdc1', htmlFor: this.phoneFieldId }, "Phone:"), index.h("input", { key: 'c00dc065f26d96917ea388964387e81a337dd9da', id: this.phoneFieldId, name: this.phoneFieldId, type: "text", "data-lpignore": "true", autoComplete: "blocked", value: this.phone, placeholder: "Verify via SMS one-time code...", onFocus: () => (this.showSuggestions = false), onInput: (e) => {
3912
+ this.phone = utils$2.convertToE164(e.target.value);
3913
+ } }))), this.kba_method === 'pin' && (index.h("div", { key: 'c62e3ba1cd7c616f78f609e100bd6d7a71625636', class: "row pin-code" }, index.h("label", { key: '10892834361428a810faf32e507b3c44f89f3877', htmlFor: this.phoneFieldId }, "Passcode:"), index.h("input", { key: 'd2f4ccb892b4fee74d0a6d7dff282f6eaaa6f4af', id: "verdocs-pin-code", name: "verdocs-pin-code", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.kba_pin, placeholder: "4-8 digits recommended...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.kba_pin = e.target.value) })))), index.h("div", { key: '772bc6a6ae5363ffd07c44a0cb7b6dcdf372e548', class: "row message" }, index.h("label", { key: '9da8fcb1352558461bb2d22118d2f9350e9e5225', htmlFor: "verdocs-contact-picker-message" }, "Message:"), index.h("input", { key: 'e171ea9ccf9d214a08068a2b41318f2731789f97', id: "verdocs-contact-picker-message", name: "verdocs-contact-picker-message", type: "text", "data-lpignore": "true", autocomplete: "blocked", value: this.message, placeholder: "Optional message to include in invitation...", onFocus: () => (this.showSuggestions = false), onInput: (e) => (this.message = e.target.value) })), index.h("div", { key: '05028161d6b3f8d8459d96e96bbda49e58d99313', class: "buttons" }, index.h("div", { key: 'ab6291ed174b778098f1a9793e9249e280f1e16b', class: "flex-fill" }), index.h("verdocs-button", { key: 'e33b43d75e8e49cd3775c99c6aa21c5b7c11d12d', variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), index.h("verdocs-button", { key: 'c89e9e3ad151184d2a00e1b20ed599d1aea66982', label: "OK", size: "small", disabled: !canSubmit, onClick: !canSubmit ? () => { } : e => this.handleSubmit(e) }))));
3914
+ }
3915
+ };
3916
+ VerdocsContactPicker.style = VerdocsContactPickerStyle0;
3917
+
3918
+ exports.verdocs_contact_picker = VerdocsContactPicker;
3919
+
3920
+ //# sourceMappingURL=verdocs-contact-picker.cjs.entry.js.map