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