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