@charde/core 0.0.3 → 0.0.5

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 (1075) hide show
  1. package/dist/charde/charde.css +1775 -0
  2. package/dist/charde/charde.esm.js +1 -0
  3. package/dist/charde/index.esm.js +2 -0
  4. package/dist/charde/p-0194d6e2.entry.js +1 -0
  5. package/dist/charde/p-0268cd80.entry.js +1 -0
  6. package/dist/charde/p-03cd8b15.entry.js +1 -0
  7. package/dist/charde/p-04566ad1.entry.js +1 -0
  8. package/dist/charde/p-04d6bfd5.entry.js +1 -0
  9. package/dist/charde/p-066b15c3.entry.js +1 -0
  10. package/dist/charde/p-067ef228.entry.js +1 -0
  11. package/dist/charde/p-09424a11.entry.js +1 -0
  12. package/dist/charde/p-09aa135c.entry.js +1 -0
  13. package/dist/charde/p-09ebd779.entry.js +1 -0
  14. package/dist/charde/p-0d3074a3.entry.js +1 -0
  15. package/dist/charde/p-139e543c.entry.js +1 -0
  16. package/dist/charde/p-15afafb1.entry.js +1 -0
  17. package/dist/charde/p-17511150.entry.js +1 -0
  18. package/dist/charde/p-184bed27.entry.js +1 -0
  19. package/dist/charde/p-1e2849e0.entry.js +1 -0
  20. package/dist/charde/p-1f3760d6.entry.js +1 -0
  21. package/dist/charde/p-1f600e6b.entry.js +1 -0
  22. package/dist/charde/p-20670731.entry.js +1 -0
  23. package/dist/charde/p-222b8212.entry.js +1 -0
  24. package/dist/charde/p-224f260a.entry.js +1 -0
  25. package/dist/charde/p-22af325f.entry.js +1 -0
  26. package/dist/charde/p-24686bd8.entry.js +1 -0
  27. package/dist/charde/p-24da97c4.entry.js +1 -0
  28. package/dist/charde/p-24f49f2d.entry.js +1 -0
  29. package/dist/charde/p-2c612ca4.entry.js +1 -0
  30. package/dist/charde/p-2dbf1cb7.entry.js +1 -0
  31. package/dist/charde/p-2e41c51d.entry.js +1 -0
  32. package/dist/charde/p-3182d80c.entry.js +1 -0
  33. package/dist/charde/p-335c0fd8.entry.js +1 -0
  34. package/dist/charde/p-365e8679.entry.js +1 -0
  35. package/dist/charde/p-36b00f23.entry.js +1 -0
  36. package/dist/charde/p-36b25b8f.entry.js +1 -0
  37. package/dist/charde/p-3b08f29c.entry.js +1 -0
  38. package/dist/charde/p-3b5b48f3.entry.js +1 -0
  39. package/dist/charde/p-3bfba656.entry.js +1 -0
  40. package/dist/charde/p-3f2bd134.entry.js +1 -0
  41. package/dist/charde/p-40542282.entry.js +1 -0
  42. package/dist/charde/p-411df8a1.entry.js +1 -0
  43. package/dist/charde/p-41f93738.entry.js +1 -0
  44. package/dist/charde/p-480ca83c.entry.js +1 -0
  45. package/dist/charde/p-491913d3.entry.js +1 -0
  46. package/dist/charde/p-4b1f1b78.entry.js +1 -0
  47. package/dist/charde/p-4bfeda7f.entry.js +1 -0
  48. package/dist/charde/p-4c54d9ad.entry.js +1 -0
  49. package/dist/charde/p-4e177b89.entry.js +1 -0
  50. package/dist/charde/p-5261a835.entry.js +1 -0
  51. package/dist/charde/p-55d378a3.entry.js +1 -0
  52. package/dist/charde/p-6094c178.entry.js +1 -0
  53. package/dist/charde/p-60ca72dc.entry.js +1 -0
  54. package/dist/charde/p-62185de3.entry.js +1 -0
  55. package/dist/charde/p-62ee5694.entry.js +1 -0
  56. package/dist/charde/p-6340d5c0.entry.js +1 -0
  57. package/dist/charde/p-6429b7eb.entry.js +1 -0
  58. package/dist/charde/p-64338c8f.entry.js +1 -0
  59. package/dist/charde/p-6697ac70.entry.js +1 -0
  60. package/dist/charde/p-669bc008.entry.js +1 -0
  61. package/dist/charde/p-66dcfd9f.entry.js +1 -0
  62. package/dist/charde/p-69925849.entry.js +1 -0
  63. package/dist/charde/p-6b98dcdf.entry.js +1 -0
  64. package/dist/charde/p-6c6e0415.entry.js +1 -0
  65. package/dist/charde/p-6f253925.entry.js +1 -0
  66. package/dist/charde/p-6f53f078.entry.js +1 -0
  67. package/dist/charde/p-729e42e1.entry.js +1 -0
  68. package/dist/charde/p-74748c9a.entry.js +1 -0
  69. package/dist/charde/p-74e572a1.entry.js +1 -0
  70. package/dist/charde/p-76e192bf.entry.js +1 -0
  71. package/dist/charde/p-77841ee4.entry.js +1 -0
  72. package/dist/charde/p-780e7264.entry.js +1 -0
  73. package/dist/charde/p-791ff255.entry.js +1 -0
  74. package/dist/charde/p-7b3e7e84.entry.js +1 -0
  75. package/dist/charde/p-7b68153c.entry.js +1 -0
  76. package/dist/charde/p-7c759df9.entry.js +1 -0
  77. package/dist/charde/p-83dc677c.entry.js +1 -0
  78. package/dist/charde/p-85d001e2.entry.js +1 -0
  79. package/dist/charde/p-8eb2c3aa.entry.js +1 -0
  80. package/dist/charde/p-8ecb0f5b.entry.js +1 -0
  81. package/dist/charde/p-8f55275a.entry.js +1 -0
  82. package/dist/charde/p-91209ae9.entry.js +1 -0
  83. package/dist/charde/p-9680ffb6.entry.js +1 -0
  84. package/dist/charde/p-9695ef45.entry.js +1 -0
  85. package/dist/charde/p-996342d2.entry.js +1 -0
  86. package/dist/charde/p-9b4de166.entry.js +1 -0
  87. package/dist/charde/p-9e61fe0e.entry.js +1 -0
  88. package/dist/charde/p-DhW431pq.js +1 -0
  89. package/dist/charde/p-a23c8d7c.entry.js +1 -0
  90. package/dist/charde/p-a2cd0e39.entry.js +1 -0
  91. package/dist/charde/p-a36f9ca5.entry.js +1 -0
  92. package/dist/charde/p-a4bba299.entry.js +1 -0
  93. package/dist/charde/p-a7b721ba.entry.js +1 -0
  94. package/dist/charde/p-ae7bd699.entry.js +1 -0
  95. package/dist/charde/p-b4f6e083.entry.js +1 -0
  96. package/dist/charde/p-bc28f8f2.entry.js +1 -0
  97. package/dist/charde/p-bee2ade3.entry.js +1 -0
  98. package/dist/charde/p-bf1328b7.entry.js +1 -0
  99. package/dist/charde/p-c30125e4.entry.js +1 -0
  100. package/dist/charde/p-c4276924.entry.js +1 -0
  101. package/dist/charde/p-c7f679f7.entry.js +1 -0
  102. package/dist/charde/p-cb0a18c5.entry.js +1 -0
  103. package/dist/charde/p-cb75e2f2.entry.js +1 -0
  104. package/dist/charde/p-cd12f7a1.entry.js +1 -0
  105. package/dist/charde/p-ceb31adb.entry.js +1 -0
  106. package/dist/charde/p-cf7b84e1.entry.js +1 -0
  107. package/dist/charde/p-d11bbf41.entry.js +1 -0
  108. package/dist/charde/p-d33c2219.entry.js +1 -0
  109. package/dist/charde/p-d343b42e.entry.js +1 -0
  110. package/dist/charde/p-d38f5f34.entry.js +1 -0
  111. package/dist/charde/p-d87c8b54.entry.js +1 -0
  112. package/dist/charde/p-d922b748.entry.js +1 -0
  113. package/dist/charde/p-d9297726.entry.js +1 -0
  114. package/dist/charde/p-d97a17e5.entry.js +1 -0
  115. package/dist/charde/p-da780497.entry.js +1 -0
  116. package/dist/charde/p-dddaa989.entry.js +1 -0
  117. package/dist/charde/p-e0f3571b.entry.js +1 -0
  118. package/dist/charde/p-e1272c1d.entry.js +1 -0
  119. package/dist/charde/p-e2bb7798.entry.js +1 -0
  120. package/dist/charde/p-e5ce0025.entry.js +1 -0
  121. package/dist/charde/p-e637c524.entry.js +1 -0
  122. package/dist/charde/p-e86ed169.entry.js +1 -0
  123. package/dist/charde/p-eaf9bff6.entry.js +1 -0
  124. package/dist/charde/p-ecb5e2bc.entry.js +1 -0
  125. package/dist/charde/p-ed21e36a.entry.js +1 -0
  126. package/dist/charde/p-edfc4008.entry.js +1 -0
  127. package/dist/charde/p-eea31a17.entry.js +1 -0
  128. package/dist/charde/p-f073a6fd.entry.js +1 -0
  129. package/dist/charde/p-f3be7834.entry.js +1 -0
  130. package/dist/charde/p-fd5d233d.entry.js +1 -0
  131. package/dist/charde/p-fed01765.entry.js +1 -0
  132. package/dist/charde/p-ff14a778.entry.js +1 -0
  133. package/dist/charde/p-jZlebn0H.js +2 -0
  134. package/dist/cjs/charde.cjs.js +24 -0
  135. package/dist/cjs/chardes-alert-close-button.cjs.entry.js +23 -0
  136. package/dist/cjs/chardes-alert-content.cjs.entry.js +22 -0
  137. package/dist/cjs/chardes-alert-error.cjs.entry.js +21 -0
  138. package/dist/cjs/chardes-alert-header.cjs.entry.js +21 -0
  139. package/dist/cjs/chardes-alert-icon.cjs.entry.js +22 -0
  140. package/dist/cjs/chardes-alert-success.cjs.entry.js +21 -0
  141. package/dist/cjs/chardes-alert-title-container.cjs.entry.js +21 -0
  142. package/dist/cjs/chardes-alert-title.cjs.entry.js +22 -0
  143. package/dist/cjs/chardes-alert-warning.cjs.entry.js +21 -0
  144. package/dist/cjs/chardes-alerts.cjs.entry.js +21 -0
  145. package/dist/cjs/chardes-badge-close-button.cjs.entry.js +23 -0
  146. package/dist/cjs/chardes-badge-error.cjs.entry.js +22 -0
  147. package/dist/cjs/chardes-badge-group.cjs.entry.js +21 -0
  148. package/dist/cjs/chardes-badge-icon.cjs.entry.js +22 -0
  149. package/dist/cjs/chardes-badge-interactive-text.cjs.entry.js +22 -0
  150. package/dist/cjs/chardes-badge-interactive.cjs.entry.js +21 -0
  151. package/dist/cjs/chardes-badge-outline.cjs.entry.js +22 -0
  152. package/dist/cjs/chardes-badge-primary.cjs.entry.js +22 -0
  153. package/dist/cjs/chardes-badge-secondary.cjs.entry.js +22 -0
  154. package/dist/cjs/chardes-badge-success.cjs.entry.js +22 -0
  155. package/dist/cjs/chardes-badge-text.cjs.entry.js +22 -0
  156. package/dist/cjs/chardes-badge-warning.cjs.entry.js +22 -0
  157. package/dist/cjs/chardes-badge-with-icon.cjs.entry.js +21 -0
  158. package/dist/cjs/chardes-badge.cjs.entry.js +21 -0
  159. package/dist/cjs/chardes-button_4.cjs.entry.js +76 -0
  160. package/dist/cjs/chardes-card-body-action-button-1.cjs.entry.js +23 -0
  161. package/dist/cjs/chardes-card-body-action-button-2.cjs.entry.js +23 -0
  162. package/dist/cjs/chardes-card-body-action-icon-1.cjs.entry.js +22 -0
  163. package/dist/cjs/chardes-card-body-action-icon-2.cjs.entry.js +22 -0
  164. package/dist/cjs/chardes-card-body-actions.cjs.entry.js +21 -0
  165. package/dist/cjs/chardes-card-body-driver.cjs.entry.js +21 -0
  166. package/dist/cjs/chardes-card-body-img.cjs.entry.js +23 -0
  167. package/dist/cjs/chardes-card-body-info.cjs.entry.js +21 -0
  168. package/dist/cjs/chardes-card-body-name.cjs.entry.js +22 -0
  169. package/dist/cjs/chardes-card-body-span.cjs.entry.js +22 -0
  170. package/dist/cjs/chardes-card-body.cjs.entry.js +21 -0
  171. package/dist/cjs/chardes-card-container.cjs.entry.js +21 -0
  172. package/dist/cjs/chardes-card-header-content.cjs.entry.js +21 -0
  173. package/dist/cjs/chardes-card-header-timer.cjs.entry.js +22 -0
  174. package/dist/cjs/chardes-card-header-title.cjs.entry.js +22 -0
  175. package/dist/cjs/chardes-card-header.cjs.entry.js +21 -0
  176. package/dist/cjs/chardes-card-icon-container.cjs.entry.js +21 -0
  177. package/dist/cjs/chardes-card-number.cjs.entry.js +22 -0
  178. package/dist/cjs/chardes-card-payment-container.cjs.entry.js +21 -0
  179. package/dist/cjs/chardes-card-payment-content.cjs.entry.js +21 -0
  180. package/dist/cjs/chardes-card-payment-details.cjs.entry.js +21 -0
  181. package/dist/cjs/chardes-card-payment-icon-container.cjs.entry.js +21 -0
  182. package/dist/cjs/chardes-card-payment.cjs.entry.js +21 -0
  183. package/dist/cjs/chardes-card-route-container.cjs.entry.js +21 -0
  184. package/dist/cjs/chardes-card-route-destination-address.cjs.entry.js +22 -0
  185. package/dist/cjs/chardes-card-route-destination-details.cjs.entry.js +21 -0
  186. package/dist/cjs/chardes-card-route-destination-icon-container.cjs.entry.js +21 -0
  187. package/dist/cjs/chardes-card-route-destination-icon.cjs.entry.js +21 -0
  188. package/dist/cjs/chardes-card-route-destination-label.cjs.entry.js +22 -0
  189. package/dist/cjs/chardes-card-route-destination.cjs.entry.js +21 -0
  190. package/dist/cjs/chardes-card-route-pickup-address.cjs.entry.js +22 -0
  191. package/dist/cjs/chardes-card-route-pickup-details.cjs.entry.js +21 -0
  192. package/dist/cjs/chardes-card-route-pickup-icon.cjs.entry.js +21 -0
  193. package/dist/cjs/chardes-card-route-pickup-label.cjs.entry.js +22 -0
  194. package/dist/cjs/chardes-card-route-pickup.cjs.entry.js +21 -0
  195. package/dist/cjs/chardes-card-route.cjs.entry.js +21 -0
  196. package/dist/cjs/chardes-card-total-amount.cjs.entry.js +22 -0
  197. package/dist/cjs/chardes-card-total-content.cjs.entry.js +21 -0
  198. package/dist/cjs/chardes-card-total-label.cjs.entry.js +22 -0
  199. package/dist/cjs/chardes-card-total-section.cjs.entry.js +21 -0
  200. package/dist/cjs/chardes-card-type.cjs.entry.js +22 -0
  201. package/dist/cjs/chardes-checkbox-checkmark.cjs.entry.js +21 -0
  202. package/dist/cjs/chardes-checkbox-input-wrapper.cjs.entry.js +21 -0
  203. package/dist/cjs/chardes-checkbox-input.cjs.entry.js +25 -0
  204. package/dist/cjs/chardes-checkbox-label.cjs.entry.js +22 -0
  205. package/dist/cjs/chardes-checkmark-svg.cjs.entry.js +21 -0
  206. package/dist/cjs/chardes-close-icon.cjs.entry.js +22 -0
  207. package/dist/cjs/chardes-error-icon-svg.cjs.entry.js +22 -0
  208. package/dist/cjs/chardes-error-input-icon.cjs.entry.js +21 -0
  209. package/dist/cjs/chardes-error-input-wrapper.cjs.entry.js +21 -0
  210. package/dist/cjs/chardes-error-input.cjs.entry.js +26 -0
  211. package/dist/cjs/chardes-error-label.cjs.entry.js +23 -0
  212. package/dist/cjs/chardes-error-message.cjs.entry.js +22 -0
  213. package/dist/cjs/chardes-error-state.cjs.entry.js +21 -0
  214. package/dist/cjs/chardes-form-group.cjs.entry.js +21 -0
  215. package/dist/cjs/chardes-form-input.cjs.entry.js +25 -0
  216. package/dist/cjs/chardes-form-label.cjs.entry.js +23 -0
  217. package/dist/cjs/chardes-group-badge-1.cjs.entry.js +22 -0
  218. package/dist/cjs/chardes-group-badge-2.cjs.entry.js +22 -0
  219. package/dist/cjs/chardes-group-badge-3.cjs.entry.js +22 -0
  220. package/dist/cjs/chardes-group-badge-4.cjs.entry.js +22 -0
  221. package/dist/cjs/chardes-icon-svg-destination.cjs.entry.js +22 -0
  222. package/dist/cjs/chardes-icon-svg-pickup.cjs.entry.js +22 -0
  223. package/dist/cjs/chardes-icon-svg.cjs.entry.js +22 -0
  224. package/dist/cjs/chardes-input-element.cjs.entry.js +26 -0
  225. package/dist/cjs/chardes-input-field-wrapper.cjs.entry.js +21 -0
  226. package/dist/cjs/chardes-input-helper.cjs.entry.js +22 -0
  227. package/dist/cjs/chardes-input-icon.cjs.entry.js +21 -0
  228. package/dist/cjs/chardes-input-label.cjs.entry.js +23 -0
  229. package/dist/cjs/chardes-input-states.cjs.entry.js +21 -0
  230. package/dist/cjs/chardes-input-wrapper.cjs.entry.js +21 -0
  231. package/dist/cjs/chardes-modal-body.cjs.entry.js +21 -0
  232. package/dist/cjs/chardes-modal-cancel-button.cjs.entry.js +24 -0
  233. package/dist/cjs/chardes-modal-close-button.cjs.entry.js +23 -0
  234. package/dist/cjs/chardes-modal-confirm-button.cjs.entry.js +24 -0
  235. package/dist/cjs/chardes-modal-container.cjs.entry.js +21 -0
  236. package/dist/cjs/chardes-modal-content.cjs.entry.js +22 -0
  237. package/dist/cjs/chardes-modal-footer.cjs.entry.js +21 -0
  238. package/dist/cjs/chardes-modal-form.cjs.entry.js +21 -0
  239. package/dist/cjs/chardes-modal-header.cjs.entry.js +21 -0
  240. package/dist/cjs/chardes-modal-title.cjs.entry.js +22 -0
  241. package/dist/cjs/chardes-modal.cjs.entry.js +21 -0
  242. package/dist/cjs/chardes-muzingo-primary-button.cjs.entry.js +21 -0
  243. package/dist/cjs/chardes-muzingo.cjs.entry.js +25 -0
  244. package/dist/cjs/chardes-notification-toast.cjs.entry.js +21 -0
  245. package/dist/cjs/chardes-payment-icon.cjs.entry.js +22 -0
  246. package/dist/cjs/chardes-success-icon-svg.cjs.entry.js +22 -0
  247. package/dist/cjs/chardes-success-input-icon.cjs.entry.js +21 -0
  248. package/dist/cjs/chardes-success-input-wrapper.cjs.entry.js +21 -0
  249. package/dist/cjs/chardes-success-input.cjs.entry.js +26 -0
  250. package/dist/cjs/chardes-success-label.cjs.entry.js +23 -0
  251. package/dist/cjs/chardes-success-message.cjs.entry.js +22 -0
  252. package/dist/cjs/chardes-success-state.cjs.entry.js +21 -0
  253. package/dist/cjs/chardes-toast-action-button.cjs.entry.js +24 -0
  254. package/dist/cjs/chardes-toast-actions.cjs.entry.js +21 -0
  255. package/dist/cjs/chardes-toast-content.cjs.entry.js +22 -0
  256. package/dist/cjs/chardes-toast-dismiss-button.cjs.entry.js +24 -0
  257. package/dist/cjs/chardes-toast-header.cjs.entry.js +21 -0
  258. package/dist/cjs/chardes-toast-icon.cjs.entry.js +22 -0
  259. package/dist/cjs/chardes-toast-timestamp.cjs.entry.js +22 -0
  260. package/dist/cjs/chardes-toast-title-container.cjs.entry.js +21 -0
  261. package/dist/cjs/chardes-toast-title.cjs.entry.js +22 -0
  262. package/dist/cjs/index-Buq98cwc.js +1426 -0
  263. package/dist/cjs/index.cjs.js +4880 -0
  264. package/dist/cjs/loader.cjs.js +12 -0
  265. package/dist/cjs/my-component.cjs.entry.js +33 -0
  266. package/dist/cjs/utils-v2Yks-1k.js +7 -0
  267. package/dist/collection/collection-manifest.json +143 -0
  268. package/dist/collection/components/generated/chardes-alert-close-button.css +1 -0
  269. package/dist/collection/components/generated/chardes-alert-close-button.js +108 -0
  270. package/dist/collection/components/generated/chardes-alert-content.css +1 -0
  271. package/dist/collection/components/generated/chardes-alert-content.js +88 -0
  272. package/dist/collection/components/generated/chardes-alert-error.css +1 -0
  273. package/dist/collection/components/generated/chardes-alert-error.js +68 -0
  274. package/dist/collection/components/generated/chardes-alert-header.css +1 -0
  275. package/dist/collection/components/generated/chardes-alert-header.js +68 -0
  276. package/dist/collection/components/generated/chardes-alert-icon.css +1 -0
  277. package/dist/collection/components/generated/chardes-alert-icon.js +88 -0
  278. package/dist/collection/components/generated/chardes-alert-success.css +1 -0
  279. package/dist/collection/components/generated/chardes-alert-success.js +68 -0
  280. package/dist/collection/components/generated/chardes-alert-title-container.css +1 -0
  281. package/dist/collection/components/generated/chardes-alert-title-container.js +68 -0
  282. package/dist/collection/components/generated/chardes-alert-title.css +1 -0
  283. package/dist/collection/components/generated/chardes-alert-title.js +88 -0
  284. package/dist/collection/components/generated/chardes-alert-warning.css +1 -0
  285. package/dist/collection/components/generated/chardes-alert-warning.js +68 -0
  286. package/dist/collection/components/generated/chardes-alerts.css +1 -0
  287. package/dist/collection/components/generated/chardes-alerts.js +68 -0
  288. package/dist/collection/components/generated/chardes-badge-close-button.css +1 -0
  289. package/dist/collection/components/generated/chardes-badge-close-button.js +108 -0
  290. package/dist/collection/components/generated/chardes-badge-error.css +1 -0
  291. package/dist/collection/components/generated/chardes-badge-error.js +88 -0
  292. package/dist/collection/components/generated/chardes-badge-group.css +1 -0
  293. package/dist/collection/components/generated/chardes-badge-group.js +68 -0
  294. package/dist/collection/components/generated/chardes-badge-icon.css +1 -0
  295. package/dist/collection/components/generated/chardes-badge-icon.js +88 -0
  296. package/dist/collection/components/generated/chardes-badge-interactive-text.css +1 -0
  297. package/dist/collection/components/generated/chardes-badge-interactive-text.js +88 -0
  298. package/dist/collection/components/generated/chardes-badge-interactive.css +1 -0
  299. package/dist/collection/components/generated/chardes-badge-interactive.js +68 -0
  300. package/dist/collection/components/generated/chardes-badge-outline.css +1 -0
  301. package/dist/collection/components/generated/chardes-badge-outline.js +88 -0
  302. package/dist/collection/components/generated/chardes-badge-primary.css +1 -0
  303. package/dist/collection/components/generated/chardes-badge-primary.js +88 -0
  304. package/dist/collection/components/generated/chardes-badge-secondary.css +1 -0
  305. package/dist/collection/components/generated/chardes-badge-secondary.js +88 -0
  306. package/dist/collection/components/generated/chardes-badge-success.css +1 -0
  307. package/dist/collection/components/generated/chardes-badge-success.js +88 -0
  308. package/dist/collection/components/generated/chardes-badge-text.css +1 -0
  309. package/dist/collection/components/generated/chardes-badge-text.js +88 -0
  310. package/dist/collection/components/generated/chardes-badge-warning.css +1 -0
  311. package/dist/collection/components/generated/chardes-badge-warning.js +88 -0
  312. package/dist/collection/components/generated/chardes-badge-with-icon.css +1 -0
  313. package/dist/collection/components/generated/chardes-badge-with-icon.js +68 -0
  314. package/dist/collection/components/generated/chardes-badge.css +1 -0
  315. package/dist/collection/components/generated/chardes-badge.js +68 -0
  316. package/dist/collection/components/generated/chardes-button.css +1 -0
  317. package/dist/collection/components/generated/chardes-button.js +128 -0
  318. package/dist/collection/components/generated/chardes-card-body-action-button-1.css +1 -0
  319. package/dist/collection/components/generated/chardes-card-body-action-button-1.js +108 -0
  320. package/dist/collection/components/generated/chardes-card-body-action-button-2.css +1 -0
  321. package/dist/collection/components/generated/chardes-card-body-action-button-2.js +108 -0
  322. package/dist/collection/components/generated/chardes-card-body-action-icon-1.css +1 -0
  323. package/dist/collection/components/generated/chardes-card-body-action-icon-1.js +88 -0
  324. package/dist/collection/components/generated/chardes-card-body-action-icon-2.css +1 -0
  325. package/dist/collection/components/generated/chardes-card-body-action-icon-2.js +88 -0
  326. package/dist/collection/components/generated/chardes-card-body-actions.css +1 -0
  327. package/dist/collection/components/generated/chardes-card-body-actions.js +68 -0
  328. package/dist/collection/components/generated/chardes-card-body-driver.css +1 -0
  329. package/dist/collection/components/generated/chardes-card-body-driver.js +68 -0
  330. package/dist/collection/components/generated/chardes-card-body-img.css +1 -0
  331. package/dist/collection/components/generated/chardes-card-body-img.js +108 -0
  332. package/dist/collection/components/generated/chardes-card-body-info.css +1 -0
  333. package/dist/collection/components/generated/chardes-card-body-info.js +68 -0
  334. package/dist/collection/components/generated/chardes-card-body-name.css +1 -0
  335. package/dist/collection/components/generated/chardes-card-body-name.js +88 -0
  336. package/dist/collection/components/generated/chardes-card-body-span.css +1 -0
  337. package/dist/collection/components/generated/chardes-card-body-span.js +88 -0
  338. package/dist/collection/components/generated/chardes-card-body.css +1 -0
  339. package/dist/collection/components/generated/chardes-card-body.js +68 -0
  340. package/dist/collection/components/generated/chardes-card-container.css +1 -0
  341. package/dist/collection/components/generated/chardes-card-container.js +68 -0
  342. package/dist/collection/components/generated/chardes-card-header-content.css +1 -0
  343. package/dist/collection/components/generated/chardes-card-header-content.js +68 -0
  344. package/dist/collection/components/generated/chardes-card-header-timer.css +1 -0
  345. package/dist/collection/components/generated/chardes-card-header-timer.js +88 -0
  346. package/dist/collection/components/generated/chardes-card-header-title.css +1 -0
  347. package/dist/collection/components/generated/chardes-card-header-title.js +88 -0
  348. package/dist/collection/components/generated/chardes-card-header.css +1 -0
  349. package/dist/collection/components/generated/chardes-card-header.js +68 -0
  350. package/dist/collection/components/generated/chardes-card-icon-container.css +1 -0
  351. package/dist/collection/components/generated/chardes-card-icon-container.js +68 -0
  352. package/dist/collection/components/generated/chardes-card-number.css +1 -0
  353. package/dist/collection/components/generated/chardes-card-number.js +88 -0
  354. package/dist/collection/components/generated/chardes-card-payment-container.css +1 -0
  355. package/dist/collection/components/generated/chardes-card-payment-container.js +68 -0
  356. package/dist/collection/components/generated/chardes-card-payment-content.css +1 -0
  357. package/dist/collection/components/generated/chardes-card-payment-content.js +68 -0
  358. package/dist/collection/components/generated/chardes-card-payment-details.css +1 -0
  359. package/dist/collection/components/generated/chardes-card-payment-details.js +68 -0
  360. package/dist/collection/components/generated/chardes-card-payment-icon-container.css +1 -0
  361. package/dist/collection/components/generated/chardes-card-payment-icon-container.js +68 -0
  362. package/dist/collection/components/generated/chardes-card-payment.css +1 -0
  363. package/dist/collection/components/generated/chardes-card-payment.js +68 -0
  364. package/dist/collection/components/generated/chardes-card-route-container.css +1 -0
  365. package/dist/collection/components/generated/chardes-card-route-container.js +68 -0
  366. package/dist/collection/components/generated/chardes-card-route-destination-address.css +1 -0
  367. package/dist/collection/components/generated/chardes-card-route-destination-address.js +88 -0
  368. package/dist/collection/components/generated/chardes-card-route-destination-details.css +1 -0
  369. package/dist/collection/components/generated/chardes-card-route-destination-details.js +68 -0
  370. package/dist/collection/components/generated/chardes-card-route-destination-icon-container.css +1 -0
  371. package/dist/collection/components/generated/chardes-card-route-destination-icon-container.js +68 -0
  372. package/dist/collection/components/generated/chardes-card-route-destination-icon.css +1 -0
  373. package/dist/collection/components/generated/chardes-card-route-destination-icon.js +68 -0
  374. package/dist/collection/components/generated/chardes-card-route-destination-label.css +1 -0
  375. package/dist/collection/components/generated/chardes-card-route-destination-label.js +88 -0
  376. package/dist/collection/components/generated/chardes-card-route-destination.css +1 -0
  377. package/dist/collection/components/generated/chardes-card-route-destination.js +68 -0
  378. package/dist/collection/components/generated/chardes-card-route-pickup-address.css +1 -0
  379. package/dist/collection/components/generated/chardes-card-route-pickup-address.js +88 -0
  380. package/dist/collection/components/generated/chardes-card-route-pickup-details.css +1 -0
  381. package/dist/collection/components/generated/chardes-card-route-pickup-details.js +68 -0
  382. package/dist/collection/components/generated/chardes-card-route-pickup-icon.css +1 -0
  383. package/dist/collection/components/generated/chardes-card-route-pickup-icon.js +68 -0
  384. package/dist/collection/components/generated/chardes-card-route-pickup-label.css +1 -0
  385. package/dist/collection/components/generated/chardes-card-route-pickup-label.js +88 -0
  386. package/dist/collection/components/generated/chardes-card-route-pickup.css +1 -0
  387. package/dist/collection/components/generated/chardes-card-route-pickup.js +68 -0
  388. package/dist/collection/components/generated/chardes-card-route.css +1 -0
  389. package/dist/collection/components/generated/chardes-card-route.js +68 -0
  390. package/dist/collection/components/generated/chardes-card-total-amount.css +1 -0
  391. package/dist/collection/components/generated/chardes-card-total-amount.js +88 -0
  392. package/dist/collection/components/generated/chardes-card-total-content.css +1 -0
  393. package/dist/collection/components/generated/chardes-card-total-content.js +68 -0
  394. package/dist/collection/components/generated/chardes-card-total-label.css +1 -0
  395. package/dist/collection/components/generated/chardes-card-total-label.js +88 -0
  396. package/dist/collection/components/generated/chardes-card-total-section.css +1 -0
  397. package/dist/collection/components/generated/chardes-card-total-section.js +68 -0
  398. package/dist/collection/components/generated/chardes-card-type.css +1 -0
  399. package/dist/collection/components/generated/chardes-card-type.js +88 -0
  400. package/dist/collection/components/generated/chardes-card.css +1 -0
  401. package/dist/collection/components/generated/chardes-card.js +68 -0
  402. package/dist/collection/components/generated/chardes-checkbox-checkmark.css +1 -0
  403. package/dist/collection/components/generated/chardes-checkbox-checkmark.js +68 -0
  404. package/dist/collection/components/generated/chardes-checkbox-input-wrapper.css +1 -0
  405. package/dist/collection/components/generated/chardes-checkbox-input-wrapper.js +68 -0
  406. package/dist/collection/components/generated/chardes-checkbox-input.css +1 -0
  407. package/dist/collection/components/generated/chardes-checkbox-input.js +148 -0
  408. package/dist/collection/components/generated/chardes-checkbox-label.css +1 -0
  409. package/dist/collection/components/generated/chardes-checkbox-label.js +88 -0
  410. package/dist/collection/components/generated/chardes-checkbox.css +1 -0
  411. package/dist/collection/components/generated/chardes-checkbox.js +88 -0
  412. package/dist/collection/components/generated/chardes-checkmark-svg.css +1 -0
  413. package/dist/collection/components/generated/chardes-checkmark-svg.js +68 -0
  414. package/dist/collection/components/generated/chardes-close-icon.css +1 -0
  415. package/dist/collection/components/generated/chardes-close-icon.js +88 -0
  416. package/dist/collection/components/generated/chardes-error-icon-svg.css +1 -0
  417. package/dist/collection/components/generated/chardes-error-icon-svg.js +88 -0
  418. package/dist/collection/components/generated/chardes-error-input-icon.css +1 -0
  419. package/dist/collection/components/generated/chardes-error-input-icon.js +68 -0
  420. package/dist/collection/components/generated/chardes-error-input-wrapper.css +1 -0
  421. package/dist/collection/components/generated/chardes-error-input-wrapper.js +68 -0
  422. package/dist/collection/components/generated/chardes-error-input.css +1 -0
  423. package/dist/collection/components/generated/chardes-error-input.js +168 -0
  424. package/dist/collection/components/generated/chardes-error-label.css +1 -0
  425. package/dist/collection/components/generated/chardes-error-label.js +108 -0
  426. package/dist/collection/components/generated/chardes-error-message.css +1 -0
  427. package/dist/collection/components/generated/chardes-error-message.js +88 -0
  428. package/dist/collection/components/generated/chardes-error-state.css +1 -0
  429. package/dist/collection/components/generated/chardes-error-state.js +68 -0
  430. package/dist/collection/components/generated/chardes-form-group.css +1 -0
  431. package/dist/collection/components/generated/chardes-form-group.js +68 -0
  432. package/dist/collection/components/generated/chardes-form-input.css +1 -0
  433. package/dist/collection/components/generated/chardes-form-input.js +148 -0
  434. package/dist/collection/components/generated/chardes-form-label.css +1 -0
  435. package/dist/collection/components/generated/chardes-form-label.js +108 -0
  436. package/dist/collection/components/generated/chardes-group-badge-1.css +1 -0
  437. package/dist/collection/components/generated/chardes-group-badge-1.js +88 -0
  438. package/dist/collection/components/generated/chardes-group-badge-2.css +1 -0
  439. package/dist/collection/components/generated/chardes-group-badge-2.js +88 -0
  440. package/dist/collection/components/generated/chardes-group-badge-3.css +1 -0
  441. package/dist/collection/components/generated/chardes-group-badge-3.js +88 -0
  442. package/dist/collection/components/generated/chardes-group-badge-4.css +1 -0
  443. package/dist/collection/components/generated/chardes-group-badge-4.js +88 -0
  444. package/dist/collection/components/generated/chardes-icon-svg-destination.css +1 -0
  445. package/dist/collection/components/generated/chardes-icon-svg-destination.js +88 -0
  446. package/dist/collection/components/generated/chardes-icon-svg-pickup.css +1 -0
  447. package/dist/collection/components/generated/chardes-icon-svg-pickup.js +88 -0
  448. package/dist/collection/components/generated/chardes-icon-svg.css +1 -0
  449. package/dist/collection/components/generated/chardes-icon-svg.js +88 -0
  450. package/dist/collection/components/generated/chardes-input-element.css +1 -0
  451. package/dist/collection/components/generated/chardes-input-element.js +168 -0
  452. package/dist/collection/components/generated/chardes-input-field-wrapper.css +1 -0
  453. package/dist/collection/components/generated/chardes-input-field-wrapper.js +68 -0
  454. package/dist/collection/components/generated/chardes-input-helper.css +1 -0
  455. package/dist/collection/components/generated/chardes-input-helper.js +88 -0
  456. package/dist/collection/components/generated/chardes-input-icon.css +1 -0
  457. package/dist/collection/components/generated/chardes-input-icon.js +68 -0
  458. package/dist/collection/components/generated/chardes-input-label.css +1 -0
  459. package/dist/collection/components/generated/chardes-input-label.js +108 -0
  460. package/dist/collection/components/generated/chardes-input-states.css +1 -0
  461. package/dist/collection/components/generated/chardes-input-states.js +68 -0
  462. package/dist/collection/components/generated/chardes-input-wrapper.css +1 -0
  463. package/dist/collection/components/generated/chardes-input-wrapper.js +68 -0
  464. package/dist/collection/components/generated/chardes-input.css +1 -0
  465. package/dist/collection/components/generated/chardes-input.js +68 -0
  466. package/dist/collection/components/generated/chardes-modal-body.css +1 -0
  467. package/dist/collection/components/generated/chardes-modal-body.js +68 -0
  468. package/dist/collection/components/generated/chardes-modal-cancel-button.css +1 -0
  469. package/dist/collection/components/generated/chardes-modal-cancel-button.js +128 -0
  470. package/dist/collection/components/generated/chardes-modal-close-button.css +1 -0
  471. package/dist/collection/components/generated/chardes-modal-close-button.js +108 -0
  472. package/dist/collection/components/generated/chardes-modal-confirm-button.css +1 -0
  473. package/dist/collection/components/generated/chardes-modal-confirm-button.js +128 -0
  474. package/dist/collection/components/generated/chardes-modal-container.css +1 -0
  475. package/dist/collection/components/generated/chardes-modal-container.js +68 -0
  476. package/dist/collection/components/generated/chardes-modal-content.css +1 -0
  477. package/dist/collection/components/generated/chardes-modal-content.js +88 -0
  478. package/dist/collection/components/generated/chardes-modal-footer.css +1 -0
  479. package/dist/collection/components/generated/chardes-modal-footer.js +68 -0
  480. package/dist/collection/components/generated/chardes-modal-form.css +1 -0
  481. package/dist/collection/components/generated/chardes-modal-form.js +68 -0
  482. package/dist/collection/components/generated/chardes-modal-header.css +1 -0
  483. package/dist/collection/components/generated/chardes-modal-header.js +68 -0
  484. package/dist/collection/components/generated/chardes-modal-title.css +1 -0
  485. package/dist/collection/components/generated/chardes-modal-title.js +88 -0
  486. package/dist/collection/components/generated/chardes-modal.css +1 -0
  487. package/dist/collection/components/generated/chardes-modal.js +68 -0
  488. package/dist/collection/components/generated/chardes-muzingo-primary-button.css +1 -0
  489. package/dist/collection/components/generated/chardes-muzingo-primary-button.js +68 -0
  490. package/dist/collection/components/generated/chardes-muzingo.css +1 -0
  491. package/dist/collection/components/generated/chardes-muzingo.js +148 -0
  492. package/dist/collection/components/generated/chardes-notification-toast.css +1 -0
  493. package/dist/collection/components/generated/chardes-notification-toast.js +68 -0
  494. package/dist/collection/components/generated/chardes-payment-icon.css +1 -0
  495. package/dist/collection/components/generated/chardes-payment-icon.js +88 -0
  496. package/dist/collection/components/generated/chardes-success-icon-svg.css +1 -0
  497. package/dist/collection/components/generated/chardes-success-icon-svg.js +88 -0
  498. package/dist/collection/components/generated/chardes-success-input-icon.css +1 -0
  499. package/dist/collection/components/generated/chardes-success-input-icon.js +68 -0
  500. package/dist/collection/components/generated/chardes-success-input-wrapper.css +1 -0
  501. package/dist/collection/components/generated/chardes-success-input-wrapper.js +68 -0
  502. package/dist/collection/components/generated/chardes-success-input.css +1 -0
  503. package/dist/collection/components/generated/chardes-success-input.js +168 -0
  504. package/dist/collection/components/generated/chardes-success-label.css +1 -0
  505. package/dist/collection/components/generated/chardes-success-label.js +108 -0
  506. package/dist/collection/components/generated/chardes-success-message.css +1 -0
  507. package/dist/collection/components/generated/chardes-success-message.js +88 -0
  508. package/dist/collection/components/generated/chardes-success-state.css +1 -0
  509. package/dist/collection/components/generated/chardes-success-state.js +68 -0
  510. package/dist/collection/components/generated/chardes-toast-action-button.css +1 -0
  511. package/dist/collection/components/generated/chardes-toast-action-button.js +128 -0
  512. package/dist/collection/components/generated/chardes-toast-actions.css +1 -0
  513. package/dist/collection/components/generated/chardes-toast-actions.js +68 -0
  514. package/dist/collection/components/generated/chardes-toast-content.css +1 -0
  515. package/dist/collection/components/generated/chardes-toast-content.js +88 -0
  516. package/dist/collection/components/generated/chardes-toast-dismiss-button.css +1 -0
  517. package/dist/collection/components/generated/chardes-toast-dismiss-button.js +128 -0
  518. package/dist/collection/components/generated/chardes-toast-header.css +1 -0
  519. package/dist/collection/components/generated/chardes-toast-header.js +68 -0
  520. package/dist/collection/components/generated/chardes-toast-icon.css +1 -0
  521. package/dist/collection/components/generated/chardes-toast-icon.js +88 -0
  522. package/dist/collection/components/generated/chardes-toast-timestamp.css +1 -0
  523. package/dist/collection/components/generated/chardes-toast-timestamp.js +88 -0
  524. package/dist/collection/components/generated/chardes-toast-title-container.css +1 -0
  525. package/dist/collection/components/generated/chardes-toast-title-container.js +68 -0
  526. package/dist/collection/components/generated/chardes-toast-title.css +1 -0
  527. package/dist/collection/components/generated/chardes-toast-title.js +88 -0
  528. package/dist/collection/components/generated/index.js +130 -0
  529. package/dist/collection/components/index.js +2 -0
  530. package/dist/collection/components/my-component/my-component.css +3 -0
  531. package/dist/collection/components/my-component/my-component.js +95 -0
  532. package/dist/collection/index.js +15 -0
  533. package/dist/collection/types/index.js +1 -0
  534. package/dist/collection/types/types.js +1 -0
  535. package/dist/collection/utils/api-client.js +84 -0
  536. package/dist/collection/utils/utils.js +3 -0
  537. package/dist/components/chardes-alert-close-button.js +1 -0
  538. package/dist/components/chardes-alert-content.js +1 -0
  539. package/dist/components/chardes-alert-error.js +1 -0
  540. package/dist/components/chardes-alert-header.js +1 -0
  541. package/dist/components/chardes-alert-icon.js +1 -0
  542. package/dist/components/chardes-alert-success.js +1 -0
  543. package/dist/components/chardes-alert-title-container.js +1 -0
  544. package/dist/components/chardes-alert-title.js +1 -0
  545. package/dist/components/chardes-alert-warning.js +1 -0
  546. package/dist/components/chardes-alerts.js +1 -0
  547. package/dist/components/chardes-badge-close-button.js +1 -0
  548. package/dist/components/chardes-badge-error.js +1 -0
  549. package/dist/components/chardes-badge-group.js +1 -0
  550. package/dist/components/chardes-badge-icon.js +1 -0
  551. package/dist/components/chardes-badge-interactive-text.js +1 -0
  552. package/dist/components/chardes-badge-interactive.js +1 -0
  553. package/dist/components/chardes-badge-outline.js +1 -0
  554. package/dist/components/chardes-badge-primary.js +1 -0
  555. package/dist/components/chardes-badge-secondary.js +1 -0
  556. package/dist/components/chardes-badge-success.js +1 -0
  557. package/dist/components/chardes-badge-text.js +1 -0
  558. package/dist/components/chardes-badge-warning.js +1 -0
  559. package/dist/components/chardes-badge-with-icon.js +1 -0
  560. package/dist/components/chardes-badge.js +1 -0
  561. package/dist/components/chardes-button.js +1 -0
  562. package/dist/components/chardes-card-body-action-button-1.js +1 -0
  563. package/dist/components/chardes-card-body-action-button-2.js +1 -0
  564. package/dist/components/chardes-card-body-action-icon-1.js +1 -0
  565. package/dist/components/chardes-card-body-action-icon-2.js +1 -0
  566. package/dist/components/chardes-card-body-actions.js +1 -0
  567. package/dist/components/chardes-card-body-driver.js +1 -0
  568. package/dist/components/chardes-card-body-img.js +1 -0
  569. package/dist/components/chardes-card-body-info.js +1 -0
  570. package/dist/components/chardes-card-body-name.js +1 -0
  571. package/dist/components/chardes-card-body-span.js +1 -0
  572. package/dist/components/chardes-card-body.js +1 -0
  573. package/dist/components/chardes-card-container.js +1 -0
  574. package/dist/components/chardes-card-header-content.js +1 -0
  575. package/dist/components/chardes-card-header-timer.js +1 -0
  576. package/dist/components/chardes-card-header-title.js +1 -0
  577. package/dist/components/chardes-card-header.js +1 -0
  578. package/dist/components/chardes-card-icon-container.js +1 -0
  579. package/dist/components/chardes-card-number.js +1 -0
  580. package/dist/components/chardes-card-payment-container.js +1 -0
  581. package/dist/components/chardes-card-payment-content.js +1 -0
  582. package/dist/components/chardes-card-payment-details.js +1 -0
  583. package/dist/components/chardes-card-payment-icon-container.js +1 -0
  584. package/dist/components/chardes-card-payment.js +1 -0
  585. package/dist/components/chardes-card-route-container.js +1 -0
  586. package/dist/components/chardes-card-route-destination-address.js +1 -0
  587. package/dist/components/chardes-card-route-destination-details.js +1 -0
  588. package/dist/components/chardes-card-route-destination-icon-container.js +1 -0
  589. package/dist/components/chardes-card-route-destination-icon.js +1 -0
  590. package/dist/components/chardes-card-route-destination-label.js +1 -0
  591. package/dist/components/chardes-card-route-destination.js +1 -0
  592. package/dist/components/chardes-card-route-pickup-address.js +1 -0
  593. package/dist/components/chardes-card-route-pickup-details.js +1 -0
  594. package/dist/components/chardes-card-route-pickup-icon.js +1 -0
  595. package/dist/components/chardes-card-route-pickup-label.js +1 -0
  596. package/dist/components/chardes-card-route-pickup.js +1 -0
  597. package/dist/components/chardes-card-route.js +1 -0
  598. package/dist/components/chardes-card-total-amount.js +1 -0
  599. package/dist/components/chardes-card-total-content.js +1 -0
  600. package/dist/components/chardes-card-total-label.js +1 -0
  601. package/dist/components/chardes-card-total-section.js +1 -0
  602. package/dist/components/chardes-card-type.js +1 -0
  603. package/dist/components/chardes-card.js +1 -0
  604. package/dist/components/chardes-checkbox-checkmark.js +1 -0
  605. package/dist/components/chardes-checkbox-input-wrapper.js +1 -0
  606. package/dist/components/chardes-checkbox-input.js +1 -0
  607. package/dist/components/chardes-checkbox-label.js +1 -0
  608. package/dist/components/chardes-checkbox.js +1 -0
  609. package/dist/components/chardes-checkmark-svg.js +1 -0
  610. package/dist/components/chardes-close-icon.js +1 -0
  611. package/dist/components/chardes-error-icon-svg.js +1 -0
  612. package/dist/components/chardes-error-input-icon.js +1 -0
  613. package/dist/components/chardes-error-input-wrapper.js +1 -0
  614. package/dist/components/chardes-error-input.js +1 -0
  615. package/dist/components/chardes-error-label.js +1 -0
  616. package/dist/components/chardes-error-message.js +1 -0
  617. package/dist/components/chardes-error-state.js +1 -0
  618. package/dist/components/chardes-form-group.js +1 -0
  619. package/dist/components/chardes-form-input.js +1 -0
  620. package/dist/components/chardes-form-label.js +1 -0
  621. package/dist/components/chardes-group-badge-1.js +1 -0
  622. package/dist/components/chardes-group-badge-2.js +1 -0
  623. package/dist/components/chardes-group-badge-3.js +1 -0
  624. package/dist/components/chardes-group-badge-4.js +1 -0
  625. package/dist/components/chardes-icon-svg-destination.js +1 -0
  626. package/dist/components/chardes-icon-svg-pickup.js +1 -0
  627. package/dist/components/chardes-icon-svg.js +1 -0
  628. package/dist/components/chardes-input-element.js +1 -0
  629. package/dist/components/chardes-input-field-wrapper.js +1 -0
  630. package/dist/components/chardes-input-helper.js +1 -0
  631. package/dist/components/chardes-input-icon.js +1 -0
  632. package/dist/components/chardes-input-label.js +1 -0
  633. package/dist/components/chardes-input-states.js +1 -0
  634. package/dist/components/chardes-input-wrapper.js +1 -0
  635. package/dist/components/chardes-input.js +1 -0
  636. package/dist/components/chardes-modal-body.js +1 -0
  637. package/dist/components/chardes-modal-cancel-button.js +1 -0
  638. package/dist/components/chardes-modal-close-button.js +1 -0
  639. package/dist/components/chardes-modal-confirm-button.js +1 -0
  640. package/dist/components/chardes-modal-container.js +1 -0
  641. package/dist/components/chardes-modal-content.js +1 -0
  642. package/dist/components/chardes-modal-footer.js +1 -0
  643. package/dist/components/chardes-modal-form.js +1 -0
  644. package/dist/components/chardes-modal-header.js +1 -0
  645. package/dist/components/chardes-modal-title.js +1 -0
  646. package/dist/components/chardes-modal.js +1 -0
  647. package/dist/components/chardes-muzingo-primary-button.js +1 -0
  648. package/dist/components/chardes-muzingo.js +1 -0
  649. package/dist/components/chardes-notification-toast.js +1 -0
  650. package/dist/components/chardes-payment-icon.js +1 -0
  651. package/dist/components/chardes-success-icon-svg.js +1 -0
  652. package/dist/components/chardes-success-input-icon.js +1 -0
  653. package/dist/components/chardes-success-input-wrapper.js +1 -0
  654. package/dist/components/chardes-success-input.js +1 -0
  655. package/dist/components/chardes-success-label.js +1 -0
  656. package/dist/components/chardes-success-message.js +1 -0
  657. package/dist/components/chardes-success-state.js +1 -0
  658. package/dist/components/chardes-toast-action-button.js +1 -0
  659. package/dist/components/chardes-toast-actions.js +1 -0
  660. package/dist/components/chardes-toast-content.js +1 -0
  661. package/dist/components/chardes-toast-dismiss-button.js +1 -0
  662. package/dist/components/chardes-toast-header.js +1 -0
  663. package/dist/components/chardes-toast-icon.js +1 -0
  664. package/dist/components/chardes-toast-timestamp.js +1 -0
  665. package/dist/components/chardes-toast-title-container.js +1 -0
  666. package/dist/components/chardes-toast-title.js +1 -0
  667. package/dist/components/index.js +2 -0
  668. package/dist/components/my-component.js +1 -0
  669. package/dist/components/utils.js +1 -0
  670. package/dist/esm/charde.js +20 -0
  671. package/dist/esm/chardes-alert-close-button.entry.js +21 -0
  672. package/dist/esm/chardes-alert-content.entry.js +20 -0
  673. package/dist/esm/chardes-alert-error.entry.js +19 -0
  674. package/dist/esm/chardes-alert-header.entry.js +19 -0
  675. package/dist/esm/chardes-alert-icon.entry.js +20 -0
  676. package/dist/esm/chardes-alert-success.entry.js +19 -0
  677. package/dist/esm/chardes-alert-title-container.entry.js +19 -0
  678. package/dist/esm/chardes-alert-title.entry.js +20 -0
  679. package/dist/esm/chardes-alert-warning.entry.js +19 -0
  680. package/dist/esm/chardes-alerts.entry.js +19 -0
  681. package/dist/esm/chardes-badge-close-button.entry.js +21 -0
  682. package/dist/esm/chardes-badge-error.entry.js +20 -0
  683. package/dist/esm/chardes-badge-group.entry.js +19 -0
  684. package/dist/esm/chardes-badge-icon.entry.js +20 -0
  685. package/dist/esm/chardes-badge-interactive-text.entry.js +20 -0
  686. package/dist/esm/chardes-badge-interactive.entry.js +19 -0
  687. package/dist/esm/chardes-badge-outline.entry.js +20 -0
  688. package/dist/esm/chardes-badge-primary.entry.js +20 -0
  689. package/dist/esm/chardes-badge-secondary.entry.js +20 -0
  690. package/dist/esm/chardes-badge-success.entry.js +20 -0
  691. package/dist/esm/chardes-badge-text.entry.js +20 -0
  692. package/dist/esm/chardes-badge-warning.entry.js +20 -0
  693. package/dist/esm/chardes-badge-with-icon.entry.js +19 -0
  694. package/dist/esm/chardes-badge.entry.js +19 -0
  695. package/dist/esm/chardes-button_4.entry.js +71 -0
  696. package/dist/esm/chardes-card-body-action-button-1.entry.js +21 -0
  697. package/dist/esm/chardes-card-body-action-button-2.entry.js +21 -0
  698. package/dist/esm/chardes-card-body-action-icon-1.entry.js +20 -0
  699. package/dist/esm/chardes-card-body-action-icon-2.entry.js +20 -0
  700. package/dist/esm/chardes-card-body-actions.entry.js +19 -0
  701. package/dist/esm/chardes-card-body-driver.entry.js +19 -0
  702. package/dist/esm/chardes-card-body-img.entry.js +21 -0
  703. package/dist/esm/chardes-card-body-info.entry.js +19 -0
  704. package/dist/esm/chardes-card-body-name.entry.js +20 -0
  705. package/dist/esm/chardes-card-body-span.entry.js +20 -0
  706. package/dist/esm/chardes-card-body.entry.js +19 -0
  707. package/dist/esm/chardes-card-container.entry.js +19 -0
  708. package/dist/esm/chardes-card-header-content.entry.js +19 -0
  709. package/dist/esm/chardes-card-header-timer.entry.js +20 -0
  710. package/dist/esm/chardes-card-header-title.entry.js +20 -0
  711. package/dist/esm/chardes-card-header.entry.js +19 -0
  712. package/dist/esm/chardes-card-icon-container.entry.js +19 -0
  713. package/dist/esm/chardes-card-number.entry.js +20 -0
  714. package/dist/esm/chardes-card-payment-container.entry.js +19 -0
  715. package/dist/esm/chardes-card-payment-content.entry.js +19 -0
  716. package/dist/esm/chardes-card-payment-details.entry.js +19 -0
  717. package/dist/esm/chardes-card-payment-icon-container.entry.js +19 -0
  718. package/dist/esm/chardes-card-payment.entry.js +19 -0
  719. package/dist/esm/chardes-card-route-container.entry.js +19 -0
  720. package/dist/esm/chardes-card-route-destination-address.entry.js +20 -0
  721. package/dist/esm/chardes-card-route-destination-details.entry.js +19 -0
  722. package/dist/esm/chardes-card-route-destination-icon-container.entry.js +19 -0
  723. package/dist/esm/chardes-card-route-destination-icon.entry.js +19 -0
  724. package/dist/esm/chardes-card-route-destination-label.entry.js +20 -0
  725. package/dist/esm/chardes-card-route-destination.entry.js +19 -0
  726. package/dist/esm/chardes-card-route-pickup-address.entry.js +20 -0
  727. package/dist/esm/chardes-card-route-pickup-details.entry.js +19 -0
  728. package/dist/esm/chardes-card-route-pickup-icon.entry.js +19 -0
  729. package/dist/esm/chardes-card-route-pickup-label.entry.js +20 -0
  730. package/dist/esm/chardes-card-route-pickup.entry.js +19 -0
  731. package/dist/esm/chardes-card-route.entry.js +19 -0
  732. package/dist/esm/chardes-card-total-amount.entry.js +20 -0
  733. package/dist/esm/chardes-card-total-content.entry.js +19 -0
  734. package/dist/esm/chardes-card-total-label.entry.js +20 -0
  735. package/dist/esm/chardes-card-total-section.entry.js +19 -0
  736. package/dist/esm/chardes-card-type.entry.js +20 -0
  737. package/dist/esm/chardes-checkbox-checkmark.entry.js +19 -0
  738. package/dist/esm/chardes-checkbox-input-wrapper.entry.js +19 -0
  739. package/dist/esm/chardes-checkbox-input.entry.js +23 -0
  740. package/dist/esm/chardes-checkbox-label.entry.js +20 -0
  741. package/dist/esm/chardes-checkmark-svg.entry.js +19 -0
  742. package/dist/esm/chardes-close-icon.entry.js +20 -0
  743. package/dist/esm/chardes-error-icon-svg.entry.js +20 -0
  744. package/dist/esm/chardes-error-input-icon.entry.js +19 -0
  745. package/dist/esm/chardes-error-input-wrapper.entry.js +19 -0
  746. package/dist/esm/chardes-error-input.entry.js +24 -0
  747. package/dist/esm/chardes-error-label.entry.js +21 -0
  748. package/dist/esm/chardes-error-message.entry.js +20 -0
  749. package/dist/esm/chardes-error-state.entry.js +19 -0
  750. package/dist/esm/chardes-form-group.entry.js +19 -0
  751. package/dist/esm/chardes-form-input.entry.js +23 -0
  752. package/dist/esm/chardes-form-label.entry.js +21 -0
  753. package/dist/esm/chardes-group-badge-1.entry.js +20 -0
  754. package/dist/esm/chardes-group-badge-2.entry.js +20 -0
  755. package/dist/esm/chardes-group-badge-3.entry.js +20 -0
  756. package/dist/esm/chardes-group-badge-4.entry.js +20 -0
  757. package/dist/esm/chardes-icon-svg-destination.entry.js +20 -0
  758. package/dist/esm/chardes-icon-svg-pickup.entry.js +20 -0
  759. package/dist/esm/chardes-icon-svg.entry.js +20 -0
  760. package/dist/esm/chardes-input-element.entry.js +24 -0
  761. package/dist/esm/chardes-input-field-wrapper.entry.js +19 -0
  762. package/dist/esm/chardes-input-helper.entry.js +20 -0
  763. package/dist/esm/chardes-input-icon.entry.js +19 -0
  764. package/dist/esm/chardes-input-label.entry.js +21 -0
  765. package/dist/esm/chardes-input-states.entry.js +19 -0
  766. package/dist/esm/chardes-input-wrapper.entry.js +19 -0
  767. package/dist/esm/chardes-modal-body.entry.js +19 -0
  768. package/dist/esm/chardes-modal-cancel-button.entry.js +22 -0
  769. package/dist/esm/chardes-modal-close-button.entry.js +21 -0
  770. package/dist/esm/chardes-modal-confirm-button.entry.js +22 -0
  771. package/dist/esm/chardes-modal-container.entry.js +19 -0
  772. package/dist/esm/chardes-modal-content.entry.js +20 -0
  773. package/dist/esm/chardes-modal-footer.entry.js +19 -0
  774. package/dist/esm/chardes-modal-form.entry.js +19 -0
  775. package/dist/esm/chardes-modal-header.entry.js +19 -0
  776. package/dist/esm/chardes-modal-title.entry.js +20 -0
  777. package/dist/esm/chardes-modal.entry.js +19 -0
  778. package/dist/esm/chardes-muzingo-primary-button.entry.js +19 -0
  779. package/dist/esm/chardes-muzingo.entry.js +23 -0
  780. package/dist/esm/chardes-notification-toast.entry.js +19 -0
  781. package/dist/esm/chardes-payment-icon.entry.js +20 -0
  782. package/dist/esm/chardes-success-icon-svg.entry.js +20 -0
  783. package/dist/esm/chardes-success-input-icon.entry.js +19 -0
  784. package/dist/esm/chardes-success-input-wrapper.entry.js +19 -0
  785. package/dist/esm/chardes-success-input.entry.js +24 -0
  786. package/dist/esm/chardes-success-label.entry.js +21 -0
  787. package/dist/esm/chardes-success-message.entry.js +20 -0
  788. package/dist/esm/chardes-success-state.entry.js +19 -0
  789. package/dist/esm/chardes-toast-action-button.entry.js +22 -0
  790. package/dist/esm/chardes-toast-actions.entry.js +19 -0
  791. package/dist/esm/chardes-toast-content.entry.js +20 -0
  792. package/dist/esm/chardes-toast-dismiss-button.entry.js +22 -0
  793. package/dist/esm/chardes-toast-header.entry.js +19 -0
  794. package/dist/esm/chardes-toast-icon.entry.js +20 -0
  795. package/dist/esm/chardes-toast-timestamp.entry.js +20 -0
  796. package/dist/esm/chardes-toast-title-container.entry.js +19 -0
  797. package/dist/esm/chardes-toast-title.entry.js +20 -0
  798. package/dist/esm/index-jZlebn0H.js +1419 -0
  799. package/dist/esm/index.js +4856 -0
  800. package/dist/esm/loader.js +10 -0
  801. package/dist/esm/my-component.entry.js +31 -0
  802. package/dist/esm/utils-DhW431pq.js +5 -0
  803. package/dist/index.cjs.js +1 -0
  804. package/dist/index.js +1 -0
  805. package/dist/scripts/generate-components.js +744 -0
  806. package/dist/scripts/utils.js +32 -0
  807. package/dist/types/components.d.ts +2097 -7237
  808. package/dist/types/stencil-public-runtime.d.ts +3 -1
  809. package/loader/cdn.js +1 -0
  810. package/loader/index.cjs.js +1 -0
  811. package/loader/index.d.ts +24 -0
  812. package/loader/index.es2017.js +1 -0
  813. package/loader/index.js +2 -0
  814. package/package.json +50 -55
  815. package/readme.md +12 -9
  816. package/dist/components/charisol-alert-close-button.d.ts +0 -11
  817. package/dist/components/charisol-alert-content.d.ts +0 -11
  818. package/dist/components/charisol-alert-error.d.ts +0 -11
  819. package/dist/components/charisol-alert-header.d.ts +0 -11
  820. package/dist/components/charisol-alert-icon.d.ts +0 -11
  821. package/dist/components/charisol-alert-success.d.ts +0 -11
  822. package/dist/components/charisol-alert-title-container.d.ts +0 -11
  823. package/dist/components/charisol-alert-title.d.ts +0 -11
  824. package/dist/components/charisol-alert-warning.d.ts +0 -11
  825. package/dist/components/charisol-alerts.d.ts +0 -11
  826. package/dist/components/charisol-badge-close-button.d.ts +0 -11
  827. package/dist/components/charisol-badge-error.d.ts +0 -11
  828. package/dist/components/charisol-badge-group.d.ts +0 -11
  829. package/dist/components/charisol-badge-icon.d.ts +0 -11
  830. package/dist/components/charisol-badge-interactive-text.d.ts +0 -11
  831. package/dist/components/charisol-badge-interactive.d.ts +0 -11
  832. package/dist/components/charisol-badge-outline.d.ts +0 -11
  833. package/dist/components/charisol-badge-primary.d.ts +0 -11
  834. package/dist/components/charisol-badge-secondary.d.ts +0 -11
  835. package/dist/components/charisol-badge-success.d.ts +0 -11
  836. package/dist/components/charisol-badge-text.d.ts +0 -11
  837. package/dist/components/charisol-badge-warning.d.ts +0 -11
  838. package/dist/components/charisol-badge-with-icon.d.ts +0 -11
  839. package/dist/components/charisol-badge.d.ts +0 -11
  840. package/dist/components/charisol-button.d.ts +0 -11
  841. package/dist/components/charisol-card-body-action-button-1.d.ts +0 -11
  842. package/dist/components/charisol-card-body-action-button-2.d.ts +0 -11
  843. package/dist/components/charisol-card-body-action-icon-1.d.ts +0 -11
  844. package/dist/components/charisol-card-body-action-icon-2.d.ts +0 -11
  845. package/dist/components/charisol-card-body-actions.d.ts +0 -11
  846. package/dist/components/charisol-card-body-driver.d.ts +0 -11
  847. package/dist/components/charisol-card-body-img.d.ts +0 -11
  848. package/dist/components/charisol-card-body-info.d.ts +0 -11
  849. package/dist/components/charisol-card-body-name.d.ts +0 -11
  850. package/dist/components/charisol-card-body-span.d.ts +0 -11
  851. package/dist/components/charisol-card-body.d.ts +0 -11
  852. package/dist/components/charisol-card-container.d.ts +0 -11
  853. package/dist/components/charisol-card-header-content.d.ts +0 -11
  854. package/dist/components/charisol-card-header-timer.d.ts +0 -11
  855. package/dist/components/charisol-card-header-title.d.ts +0 -11
  856. package/dist/components/charisol-card-header.d.ts +0 -11
  857. package/dist/components/charisol-card-icon-container.d.ts +0 -11
  858. package/dist/components/charisol-card-number.d.ts +0 -11
  859. package/dist/components/charisol-card-payment-container.d.ts +0 -11
  860. package/dist/components/charisol-card-payment-content.d.ts +0 -11
  861. package/dist/components/charisol-card-payment-details.d.ts +0 -11
  862. package/dist/components/charisol-card-payment-icon-container.d.ts +0 -11
  863. package/dist/components/charisol-card-payment.d.ts +0 -11
  864. package/dist/components/charisol-card-route-container.d.ts +0 -11
  865. package/dist/components/charisol-card-route-destination-address.d.ts +0 -11
  866. package/dist/components/charisol-card-route-destination-details.d.ts +0 -11
  867. package/dist/components/charisol-card-route-destination-icon-container.d.ts +0 -11
  868. package/dist/components/charisol-card-route-destination-icon.d.ts +0 -11
  869. package/dist/components/charisol-card-route-destination-label.d.ts +0 -11
  870. package/dist/components/charisol-card-route-destination.d.ts +0 -11
  871. package/dist/components/charisol-card-route-pickup-address.d.ts +0 -11
  872. package/dist/components/charisol-card-route-pickup-details.d.ts +0 -11
  873. package/dist/components/charisol-card-route-pickup-icon.d.ts +0 -11
  874. package/dist/components/charisol-card-route-pickup-label.d.ts +0 -11
  875. package/dist/components/charisol-card-route-pickup.d.ts +0 -11
  876. package/dist/components/charisol-card-route.d.ts +0 -11
  877. package/dist/components/charisol-card-total-amount.d.ts +0 -11
  878. package/dist/components/charisol-card-total-content.d.ts +0 -11
  879. package/dist/components/charisol-card-total-label.d.ts +0 -11
  880. package/dist/components/charisol-card-total-section.d.ts +0 -11
  881. package/dist/components/charisol-card-type.d.ts +0 -11
  882. package/dist/components/charisol-card.d.ts +0 -11
  883. package/dist/components/charisol-checkbox-checkmark.d.ts +0 -11
  884. package/dist/components/charisol-checkbox-input-wrapper.d.ts +0 -11
  885. package/dist/components/charisol-checkbox-input.d.ts +0 -11
  886. package/dist/components/charisol-checkbox-label.d.ts +0 -11
  887. package/dist/components/charisol-checkbox.d.ts +0 -11
  888. package/dist/components/charisol-checkmark-svg.d.ts +0 -11
  889. package/dist/components/charisol-close-icon.d.ts +0 -11
  890. package/dist/components/charisol-error-icon-svg.d.ts +0 -11
  891. package/dist/components/charisol-error-input-icon.d.ts +0 -11
  892. package/dist/components/charisol-error-input-wrapper.d.ts +0 -11
  893. package/dist/components/charisol-error-input.d.ts +0 -11
  894. package/dist/components/charisol-error-label.d.ts +0 -11
  895. package/dist/components/charisol-error-message.d.ts +0 -11
  896. package/dist/components/charisol-error-state.d.ts +0 -11
  897. package/dist/components/charisol-form-group.d.ts +0 -11
  898. package/dist/components/charisol-form-input.d.ts +0 -11
  899. package/dist/components/charisol-form-label.d.ts +0 -11
  900. package/dist/components/charisol-group-badge-1.d.ts +0 -11
  901. package/dist/components/charisol-group-badge-2.d.ts +0 -11
  902. package/dist/components/charisol-group-badge-3.d.ts +0 -11
  903. package/dist/components/charisol-group-badge-4.d.ts +0 -11
  904. package/dist/components/charisol-icon-svg-destination.d.ts +0 -11
  905. package/dist/components/charisol-icon-svg-pickup.d.ts +0 -11
  906. package/dist/components/charisol-icon-svg.d.ts +0 -11
  907. package/dist/components/charisol-input-element.d.ts +0 -11
  908. package/dist/components/charisol-input-field-wrapper.d.ts +0 -11
  909. package/dist/components/charisol-input-helper.d.ts +0 -11
  910. package/dist/components/charisol-input-icon.d.ts +0 -11
  911. package/dist/components/charisol-input-label.d.ts +0 -11
  912. package/dist/components/charisol-input-states.d.ts +0 -11
  913. package/dist/components/charisol-input-wrapper.d.ts +0 -11
  914. package/dist/components/charisol-input.d.ts +0 -11
  915. package/dist/components/charisol-modal-body.d.ts +0 -11
  916. package/dist/components/charisol-modal-cancel-button.d.ts +0 -11
  917. package/dist/components/charisol-modal-close-button.d.ts +0 -11
  918. package/dist/components/charisol-modal-confirm-button.d.ts +0 -11
  919. package/dist/components/charisol-modal-container.d.ts +0 -11
  920. package/dist/components/charisol-modal-content.d.ts +0 -11
  921. package/dist/components/charisol-modal-footer.d.ts +0 -11
  922. package/dist/components/charisol-modal-form.d.ts +0 -11
  923. package/dist/components/charisol-modal-header.d.ts +0 -11
  924. package/dist/components/charisol-modal-title.d.ts +0 -11
  925. package/dist/components/charisol-modal.d.ts +0 -11
  926. package/dist/components/charisol-muzingo-primary-button.d.ts +0 -11
  927. package/dist/components/charisol-muzingo.d.ts +0 -11
  928. package/dist/components/charisol-notification-toast.d.ts +0 -11
  929. package/dist/components/charisol-payment-icon.d.ts +0 -11
  930. package/dist/components/charisol-success-icon-svg.d.ts +0 -11
  931. package/dist/components/charisol-success-input-icon.d.ts +0 -11
  932. package/dist/components/charisol-success-input-wrapper.d.ts +0 -11
  933. package/dist/components/charisol-success-input.d.ts +0 -11
  934. package/dist/components/charisol-success-label.d.ts +0 -11
  935. package/dist/components/charisol-success-message.d.ts +0 -11
  936. package/dist/components/charisol-success-state.d.ts +0 -11
  937. package/dist/components/charisol-toast-action-button.d.ts +0 -11
  938. package/dist/components/charisol-toast-actions.d.ts +0 -11
  939. package/dist/components/charisol-toast-content.d.ts +0 -11
  940. package/dist/components/charisol-toast-dismiss-button.d.ts +0 -11
  941. package/dist/components/charisol-toast-header.d.ts +0 -11
  942. package/dist/components/charisol-toast-icon.d.ts +0 -11
  943. package/dist/components/charisol-toast-timestamp.d.ts +0 -11
  944. package/dist/components/charisol-toast-title-container.d.ts +0 -11
  945. package/dist/components/charisol-toast-title.d.ts +0 -11
  946. package/dist/types/components/generated/charisol-alert-close-button.d.ts +0 -11
  947. package/dist/types/components/generated/charisol-alert-content.d.ts +0 -10
  948. package/dist/types/components/generated/charisol-alert-error.d.ts +0 -9
  949. package/dist/types/components/generated/charisol-alert-header.d.ts +0 -9
  950. package/dist/types/components/generated/charisol-alert-icon.d.ts +0 -10
  951. package/dist/types/components/generated/charisol-alert-success.d.ts +0 -9
  952. package/dist/types/components/generated/charisol-alert-title-container.d.ts +0 -9
  953. package/dist/types/components/generated/charisol-alert-title.d.ts +0 -10
  954. package/dist/types/components/generated/charisol-alert-warning.d.ts +0 -9
  955. package/dist/types/components/generated/charisol-alerts.d.ts +0 -9
  956. package/dist/types/components/generated/charisol-badge-close-button.d.ts +0 -11
  957. package/dist/types/components/generated/charisol-badge-error.d.ts +0 -10
  958. package/dist/types/components/generated/charisol-badge-group.d.ts +0 -9
  959. package/dist/types/components/generated/charisol-badge-icon.d.ts +0 -10
  960. package/dist/types/components/generated/charisol-badge-interactive-text.d.ts +0 -10
  961. package/dist/types/components/generated/charisol-badge-interactive.d.ts +0 -9
  962. package/dist/types/components/generated/charisol-badge-outline.d.ts +0 -10
  963. package/dist/types/components/generated/charisol-badge-primary.d.ts +0 -10
  964. package/dist/types/components/generated/charisol-badge-secondary.d.ts +0 -10
  965. package/dist/types/components/generated/charisol-badge-success.d.ts +0 -10
  966. package/dist/types/components/generated/charisol-badge-text.d.ts +0 -10
  967. package/dist/types/components/generated/charisol-badge-warning.d.ts +0 -10
  968. package/dist/types/components/generated/charisol-badge-with-icon.d.ts +0 -9
  969. package/dist/types/components/generated/charisol-badge.d.ts +0 -9
  970. package/dist/types/components/generated/charisol-button.d.ts +0 -12
  971. package/dist/types/components/generated/charisol-card-body-action-button-1.d.ts +0 -11
  972. package/dist/types/components/generated/charisol-card-body-action-button-2.d.ts +0 -11
  973. package/dist/types/components/generated/charisol-card-body-action-icon-1.d.ts +0 -10
  974. package/dist/types/components/generated/charisol-card-body-action-icon-2.d.ts +0 -10
  975. package/dist/types/components/generated/charisol-card-body-actions.d.ts +0 -9
  976. package/dist/types/components/generated/charisol-card-body-driver.d.ts +0 -9
  977. package/dist/types/components/generated/charisol-card-body-img.d.ts +0 -11
  978. package/dist/types/components/generated/charisol-card-body-info.d.ts +0 -9
  979. package/dist/types/components/generated/charisol-card-body-name.d.ts +0 -10
  980. package/dist/types/components/generated/charisol-card-body-span.d.ts +0 -10
  981. package/dist/types/components/generated/charisol-card-body.d.ts +0 -9
  982. package/dist/types/components/generated/charisol-card-container.d.ts +0 -9
  983. package/dist/types/components/generated/charisol-card-header-content.d.ts +0 -9
  984. package/dist/types/components/generated/charisol-card-header-timer.d.ts +0 -10
  985. package/dist/types/components/generated/charisol-card-header-title.d.ts +0 -10
  986. package/dist/types/components/generated/charisol-card-header.d.ts +0 -9
  987. package/dist/types/components/generated/charisol-card-icon-container.d.ts +0 -9
  988. package/dist/types/components/generated/charisol-card-number.d.ts +0 -10
  989. package/dist/types/components/generated/charisol-card-payment-container.d.ts +0 -9
  990. package/dist/types/components/generated/charisol-card-payment-content.d.ts +0 -9
  991. package/dist/types/components/generated/charisol-card-payment-details.d.ts +0 -9
  992. package/dist/types/components/generated/charisol-card-payment-icon-container.d.ts +0 -9
  993. package/dist/types/components/generated/charisol-card-payment.d.ts +0 -9
  994. package/dist/types/components/generated/charisol-card-route-container.d.ts +0 -9
  995. package/dist/types/components/generated/charisol-card-route-destination-address.d.ts +0 -10
  996. package/dist/types/components/generated/charisol-card-route-destination-details.d.ts +0 -9
  997. package/dist/types/components/generated/charisol-card-route-destination-icon-container.d.ts +0 -9
  998. package/dist/types/components/generated/charisol-card-route-destination-icon.d.ts +0 -9
  999. package/dist/types/components/generated/charisol-card-route-destination-label.d.ts +0 -10
  1000. package/dist/types/components/generated/charisol-card-route-destination.d.ts +0 -9
  1001. package/dist/types/components/generated/charisol-card-route-pickup-address.d.ts +0 -10
  1002. package/dist/types/components/generated/charisol-card-route-pickup-details.d.ts +0 -9
  1003. package/dist/types/components/generated/charisol-card-route-pickup-icon.d.ts +0 -9
  1004. package/dist/types/components/generated/charisol-card-route-pickup-label.d.ts +0 -10
  1005. package/dist/types/components/generated/charisol-card-route-pickup.d.ts +0 -9
  1006. package/dist/types/components/generated/charisol-card-route.d.ts +0 -9
  1007. package/dist/types/components/generated/charisol-card-total-amount.d.ts +0 -10
  1008. package/dist/types/components/generated/charisol-card-total-content.d.ts +0 -9
  1009. package/dist/types/components/generated/charisol-card-total-label.d.ts +0 -10
  1010. package/dist/types/components/generated/charisol-card-total-section.d.ts +0 -9
  1011. package/dist/types/components/generated/charisol-card-type.d.ts +0 -10
  1012. package/dist/types/components/generated/charisol-card.d.ts +0 -9
  1013. package/dist/types/components/generated/charisol-checkbox-checkmark.d.ts +0 -9
  1014. package/dist/types/components/generated/charisol-checkbox-input-wrapper.d.ts +0 -9
  1015. package/dist/types/components/generated/charisol-checkbox-input.d.ts +0 -13
  1016. package/dist/types/components/generated/charisol-checkbox-label.d.ts +0 -10
  1017. package/dist/types/components/generated/charisol-checkbox.d.ts +0 -10
  1018. package/dist/types/components/generated/charisol-checkmark-svg.d.ts +0 -9
  1019. package/dist/types/components/generated/charisol-close-icon.d.ts +0 -10
  1020. package/dist/types/components/generated/charisol-error-icon-svg.d.ts +0 -10
  1021. package/dist/types/components/generated/charisol-error-input-icon.d.ts +0 -9
  1022. package/dist/types/components/generated/charisol-error-input-wrapper.d.ts +0 -9
  1023. package/dist/types/components/generated/charisol-error-input.d.ts +0 -14
  1024. package/dist/types/components/generated/charisol-error-label.d.ts +0 -11
  1025. package/dist/types/components/generated/charisol-error-message.d.ts +0 -10
  1026. package/dist/types/components/generated/charisol-error-state.d.ts +0 -9
  1027. package/dist/types/components/generated/charisol-form-group.d.ts +0 -9
  1028. package/dist/types/components/generated/charisol-form-input.d.ts +0 -13
  1029. package/dist/types/components/generated/charisol-form-label.d.ts +0 -11
  1030. package/dist/types/components/generated/charisol-group-badge-1.d.ts +0 -10
  1031. package/dist/types/components/generated/charisol-group-badge-2.d.ts +0 -10
  1032. package/dist/types/components/generated/charisol-group-badge-3.d.ts +0 -10
  1033. package/dist/types/components/generated/charisol-group-badge-4.d.ts +0 -10
  1034. package/dist/types/components/generated/charisol-icon-svg-destination.d.ts +0 -10
  1035. package/dist/types/components/generated/charisol-icon-svg-pickup.d.ts +0 -10
  1036. package/dist/types/components/generated/charisol-icon-svg.d.ts +0 -10
  1037. package/dist/types/components/generated/charisol-input-element.d.ts +0 -14
  1038. package/dist/types/components/generated/charisol-input-field-wrapper.d.ts +0 -9
  1039. package/dist/types/components/generated/charisol-input-helper.d.ts +0 -10
  1040. package/dist/types/components/generated/charisol-input-icon.d.ts +0 -9
  1041. package/dist/types/components/generated/charisol-input-label.d.ts +0 -11
  1042. package/dist/types/components/generated/charisol-input-states.d.ts +0 -9
  1043. package/dist/types/components/generated/charisol-input-wrapper.d.ts +0 -9
  1044. package/dist/types/components/generated/charisol-input.d.ts +0 -9
  1045. package/dist/types/components/generated/charisol-modal-body.d.ts +0 -9
  1046. package/dist/types/components/generated/charisol-modal-cancel-button.d.ts +0 -12
  1047. package/dist/types/components/generated/charisol-modal-close-button.d.ts +0 -11
  1048. package/dist/types/components/generated/charisol-modal-confirm-button.d.ts +0 -12
  1049. package/dist/types/components/generated/charisol-modal-container.d.ts +0 -9
  1050. package/dist/types/components/generated/charisol-modal-content.d.ts +0 -10
  1051. package/dist/types/components/generated/charisol-modal-footer.d.ts +0 -9
  1052. package/dist/types/components/generated/charisol-modal-form.d.ts +0 -9
  1053. package/dist/types/components/generated/charisol-modal-header.d.ts +0 -9
  1054. package/dist/types/components/generated/charisol-modal-title.d.ts +0 -10
  1055. package/dist/types/components/generated/charisol-modal.d.ts +0 -9
  1056. package/dist/types/components/generated/charisol-muzingo-primary-button.d.ts +0 -9
  1057. package/dist/types/components/generated/charisol-muzingo.d.ts +0 -13
  1058. package/dist/types/components/generated/charisol-notification-toast.d.ts +0 -9
  1059. package/dist/types/components/generated/charisol-payment-icon.d.ts +0 -10
  1060. package/dist/types/components/generated/charisol-success-icon-svg.d.ts +0 -10
  1061. package/dist/types/components/generated/charisol-success-input-icon.d.ts +0 -9
  1062. package/dist/types/components/generated/charisol-success-input-wrapper.d.ts +0 -9
  1063. package/dist/types/components/generated/charisol-success-input.d.ts +0 -14
  1064. package/dist/types/components/generated/charisol-success-label.d.ts +0 -11
  1065. package/dist/types/components/generated/charisol-success-message.d.ts +0 -10
  1066. package/dist/types/components/generated/charisol-success-state.d.ts +0 -9
  1067. package/dist/types/components/generated/charisol-toast-action-button.d.ts +0 -12
  1068. package/dist/types/components/generated/charisol-toast-actions.d.ts +0 -9
  1069. package/dist/types/components/generated/charisol-toast-content.d.ts +0 -10
  1070. package/dist/types/components/generated/charisol-toast-dismiss-button.d.ts +0 -12
  1071. package/dist/types/components/generated/charisol-toast-header.d.ts +0 -9
  1072. package/dist/types/components/generated/charisol-toast-icon.d.ts +0 -10
  1073. package/dist/types/components/generated/charisol-toast-timestamp.d.ts +0 -10
  1074. package/dist/types/components/generated/charisol-toast-title-container.d.ts +0 -9
  1075. package/dist/types/components/generated/charisol-toast-title.d.ts +0 -10
@@ -0,0 +1,4880 @@
1
+ 'use strict';
2
+
3
+ var utils = require('./utils-v2Yks-1k.js');
4
+ var fs = require('fs');
5
+ var path = require('path');
6
+
7
+ function _interopNamespaceDefault(e) {
8
+ var n = Object.create(null);
9
+ if (e) {
10
+ Object.keys(e).forEach(function (k) {
11
+ if (k !== 'default') {
12
+ var d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: function () { return e[k]; }
16
+ });
17
+ }
18
+ });
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
23
+
24
+ var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
25
+ var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
26
+
27
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
28
+
29
+ function getDefaultExportFromCjs (x) {
30
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
31
+ }
32
+
33
+ /*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors */
34
+
35
+ var axios_1;
36
+ var hasRequiredAxios;
37
+
38
+ function requireAxios () {
39
+ if (hasRequiredAxios) return axios_1;
40
+ hasRequiredAxios = 1;
41
+
42
+ /**
43
+ * Create a bound version of a function with a specified `this` context
44
+ *
45
+ * @param {Function} fn - The function to bind
46
+ * @param {*} thisArg - The value to be passed as the `this` parameter
47
+ * @returns {Function} A new function that will call the original function with the specified `this` context
48
+ */
49
+ function bind(fn, thisArg) {
50
+ return function wrap() {
51
+ return fn.apply(thisArg, arguments);
52
+ };
53
+ }
54
+
55
+ // utils is a library of generic helper functions non-specific to axios
56
+
57
+ const { toString } = Object.prototype;
58
+ const { getPrototypeOf } = Object;
59
+ const { iterator, toStringTag } = Symbol;
60
+
61
+ const kindOf = ((cache) => (thing) => {
62
+ const str = toString.call(thing);
63
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
64
+ })(Object.create(null));
65
+
66
+ const kindOfTest = (type) => {
67
+ type = type.toLowerCase();
68
+ return (thing) => kindOf(thing) === type;
69
+ };
70
+
71
+ const typeOfTest = (type) => (thing) => typeof thing === type;
72
+
73
+ /**
74
+ * Determine if a value is a non-null object
75
+ *
76
+ * @param {Object} val The value to test
77
+ *
78
+ * @returns {boolean} True if value is an Array, otherwise false
79
+ */
80
+ const { isArray } = Array;
81
+
82
+ /**
83
+ * Determine if a value is undefined
84
+ *
85
+ * @param {*} val The value to test
86
+ *
87
+ * @returns {boolean} True if the value is undefined, otherwise false
88
+ */
89
+ const isUndefined = typeOfTest("undefined");
90
+
91
+ /**
92
+ * Determine if a value is a Buffer
93
+ *
94
+ * @param {*} val The value to test
95
+ *
96
+ * @returns {boolean} True if value is a Buffer, otherwise false
97
+ */
98
+ function isBuffer(val) {
99
+ return (
100
+ val !== null &&
101
+ !isUndefined(val) &&
102
+ val.constructor !== null &&
103
+ !isUndefined(val.constructor) &&
104
+ isFunction$1(val.constructor.isBuffer) &&
105
+ val.constructor.isBuffer(val)
106
+ );
107
+ }
108
+
109
+ /**
110
+ * Determine if a value is an ArrayBuffer
111
+ *
112
+ * @param {*} val The value to test
113
+ *
114
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
115
+ */
116
+ const isArrayBuffer = kindOfTest("ArrayBuffer");
117
+
118
+ /**
119
+ * Determine if a value is a view on an ArrayBuffer
120
+ *
121
+ * @param {*} val The value to test
122
+ *
123
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
124
+ */
125
+ function isArrayBufferView(val) {
126
+ let result;
127
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
128
+ result = ArrayBuffer.isView(val);
129
+ } else {
130
+ result = val && val.buffer && isArrayBuffer(val.buffer);
131
+ }
132
+ return result;
133
+ }
134
+
135
+ /**
136
+ * Determine if a value is a String
137
+ *
138
+ * @param {*} val The value to test
139
+ *
140
+ * @returns {boolean} True if value is a String, otherwise false
141
+ */
142
+ const isString = typeOfTest("string");
143
+
144
+ /**
145
+ * Determine if a value is a Function
146
+ *
147
+ * @param {*} val The value to test
148
+ * @returns {boolean} True if value is a Function, otherwise false
149
+ */
150
+ const isFunction$1 = typeOfTest("function");
151
+
152
+ /**
153
+ * Determine if a value is a Number
154
+ *
155
+ * @param {*} val The value to test
156
+ *
157
+ * @returns {boolean} True if value is a Number, otherwise false
158
+ */
159
+ const isNumber = typeOfTest("number");
160
+
161
+ /**
162
+ * Determine if a value is an Object
163
+ *
164
+ * @param {*} thing The value to test
165
+ *
166
+ * @returns {boolean} True if value is an Object, otherwise false
167
+ */
168
+ const isObject = (thing) => thing !== null && typeof thing === "object";
169
+
170
+ /**
171
+ * Determine if a value is a Boolean
172
+ *
173
+ * @param {*} thing The value to test
174
+ * @returns {boolean} True if value is a Boolean, otherwise false
175
+ */
176
+ const isBoolean = (thing) => thing === true || thing === false;
177
+
178
+ /**
179
+ * Determine if a value is a plain Object
180
+ *
181
+ * @param {*} val The value to test
182
+ *
183
+ * @returns {boolean} True if value is a plain Object, otherwise false
184
+ */
185
+ const isPlainObject = (val) => {
186
+ if (kindOf(val) !== "object") {
187
+ return false;
188
+ }
189
+
190
+ const prototype = getPrototypeOf(val);
191
+ return (
192
+ (prototype === null ||
193
+ prototype === Object.prototype ||
194
+ Object.getPrototypeOf(prototype) === null) &&
195
+ !(toStringTag in val) &&
196
+ !(iterator in val)
197
+ );
198
+ };
199
+
200
+ /**
201
+ * Determine if a value is an empty object (safely handles Buffers)
202
+ *
203
+ * @param {*} val The value to test
204
+ *
205
+ * @returns {boolean} True if value is an empty object, otherwise false
206
+ */
207
+ const isEmptyObject = (val) => {
208
+ // Early return for non-objects or Buffers to prevent RangeError
209
+ if (!isObject(val) || isBuffer(val)) {
210
+ return false;
211
+ }
212
+
213
+ try {
214
+ return (
215
+ Object.keys(val).length === 0 &&
216
+ Object.getPrototypeOf(val) === Object.prototype
217
+ );
218
+ } catch (e) {
219
+ // Fallback for any other objects that might cause RangeError with Object.keys()
220
+ return false;
221
+ }
222
+ };
223
+
224
+ /**
225
+ * Determine if a value is a Date
226
+ *
227
+ * @param {*} val The value to test
228
+ *
229
+ * @returns {boolean} True if value is a Date, otherwise false
230
+ */
231
+ const isDate = kindOfTest("Date");
232
+
233
+ /**
234
+ * Determine if a value is a File
235
+ *
236
+ * @param {*} val The value to test
237
+ *
238
+ * @returns {boolean} True if value is a File, otherwise false
239
+ */
240
+ const isFile = kindOfTest("File");
241
+
242
+ /**
243
+ * Determine if a value is a Blob
244
+ *
245
+ * @param {*} val The value to test
246
+ *
247
+ * @returns {boolean} True if value is a Blob, otherwise false
248
+ */
249
+ const isBlob = kindOfTest("Blob");
250
+
251
+ /**
252
+ * Determine if a value is a FileList
253
+ *
254
+ * @param {*} val The value to test
255
+ *
256
+ * @returns {boolean} True if value is a File, otherwise false
257
+ */
258
+ const isFileList = kindOfTest("FileList");
259
+
260
+ /**
261
+ * Determine if a value is a Stream
262
+ *
263
+ * @param {*} val The value to test
264
+ *
265
+ * @returns {boolean} True if value is a Stream, otherwise false
266
+ */
267
+ const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
268
+
269
+ /**
270
+ * Determine if a value is a FormData
271
+ *
272
+ * @param {*} thing The value to test
273
+ *
274
+ * @returns {boolean} True if value is an FormData, otherwise false
275
+ */
276
+ const isFormData = (thing) => {
277
+ let kind;
278
+ return (
279
+ thing &&
280
+ ((typeof FormData === "function" && thing instanceof FormData) ||
281
+ (isFunction$1(thing.append) &&
282
+ ((kind = kindOf(thing)) === "formdata" ||
283
+ // detect form-data instance
284
+ (kind === "object" &&
285
+ isFunction$1(thing.toString) &&
286
+ thing.toString() === "[object FormData]"))))
287
+ );
288
+ };
289
+
290
+ /**
291
+ * Determine if a value is a URLSearchParams object
292
+ *
293
+ * @param {*} val The value to test
294
+ *
295
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
296
+ */
297
+ const isURLSearchParams = kindOfTest("URLSearchParams");
298
+
299
+ const [isReadableStream, isRequest, isResponse, isHeaders] = [
300
+ "ReadableStream",
301
+ "Request",
302
+ "Response",
303
+ "Headers",
304
+ ].map(kindOfTest);
305
+
306
+ /**
307
+ * Trim excess whitespace off the beginning and end of a string
308
+ *
309
+ * @param {String} str The String to trim
310
+ *
311
+ * @returns {String} The String freed of excess whitespace
312
+ */
313
+ const trim = (str) =>
314
+ str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
315
+
316
+ /**
317
+ * Iterate over an Array or an Object invoking a function for each item.
318
+ *
319
+ * If `obj` is an Array callback will be called passing
320
+ * the value, index, and complete array for each item.
321
+ *
322
+ * If 'obj' is an Object callback will be called passing
323
+ * the value, key, and complete object for each property.
324
+ *
325
+ * @param {Object|Array<unknown>} obj The object to iterate
326
+ * @param {Function} fn The callback to invoke for each item
327
+ *
328
+ * @param {Object} [options]
329
+ * @param {Boolean} [options.allOwnKeys = false]
330
+ * @returns {any}
331
+ */
332
+ function forEach(obj, fn, { allOwnKeys = false } = {}) {
333
+ // Don't bother if no value provided
334
+ if (obj === null || typeof obj === "undefined") {
335
+ return;
336
+ }
337
+
338
+ let i;
339
+ let l;
340
+
341
+ // Force an array if not already something iterable
342
+ if (typeof obj !== "object") {
343
+ /*eslint no-param-reassign:0*/
344
+ obj = [obj];
345
+ }
346
+
347
+ if (isArray(obj)) {
348
+ // Iterate over array values
349
+ for (i = 0, l = obj.length; i < l; i++) {
350
+ fn.call(null, obj[i], i, obj);
351
+ }
352
+ } else {
353
+ // Buffer check
354
+ if (isBuffer(obj)) {
355
+ return;
356
+ }
357
+
358
+ // Iterate over object keys
359
+ const keys = allOwnKeys
360
+ ? Object.getOwnPropertyNames(obj)
361
+ : Object.keys(obj);
362
+ const len = keys.length;
363
+ let key;
364
+
365
+ for (i = 0; i < len; i++) {
366
+ key = keys[i];
367
+ fn.call(null, obj[key], key, obj);
368
+ }
369
+ }
370
+ }
371
+
372
+ function findKey(obj, key) {
373
+ if (isBuffer(obj)) {
374
+ return null;
375
+ }
376
+
377
+ key = key.toLowerCase();
378
+ const keys = Object.keys(obj);
379
+ let i = keys.length;
380
+ let _key;
381
+ while (i-- > 0) {
382
+ _key = keys[i];
383
+ if (key === _key.toLowerCase()) {
384
+ return _key;
385
+ }
386
+ }
387
+ return null;
388
+ }
389
+
390
+ const _global = (() => {
391
+ /*eslint no-undef:0*/
392
+ if (typeof globalThis !== "undefined") return globalThis;
393
+ return typeof self !== "undefined"
394
+ ? self
395
+ : typeof window !== "undefined"
396
+ ? window
397
+ : commonjsGlobal;
398
+ })();
399
+
400
+ const isContextDefined = (context) =>
401
+ !isUndefined(context) && context !== _global;
402
+
403
+ /**
404
+ * Accepts varargs expecting each argument to be an object, then
405
+ * immutably merges the properties of each object and returns result.
406
+ *
407
+ * When multiple objects contain the same key the later object in
408
+ * the arguments list will take precedence.
409
+ *
410
+ * Example:
411
+ *
412
+ * ```js
413
+ * const result = merge({foo: 123}, {foo: 456});
414
+ * console.log(result.foo); // outputs 456
415
+ * ```
416
+ *
417
+ * @param {Object} obj1 Object to merge
418
+ *
419
+ * @returns {Object} Result of all merge properties
420
+ */
421
+ function merge(/* obj1, obj2, obj3, ... */) {
422
+ const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};
423
+ const result = {};
424
+ const assignValue = (val, key) => {
425
+ // Skip dangerous property names to prevent prototype pollution
426
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
427
+ return;
428
+ }
429
+
430
+ const targetKey = (caseless && findKey(result, key)) || key;
431
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
432
+ result[targetKey] = merge(result[targetKey], val);
433
+ } else if (isPlainObject(val)) {
434
+ result[targetKey] = merge({}, val);
435
+ } else if (isArray(val)) {
436
+ result[targetKey] = val.slice();
437
+ } else if (!skipUndefined || !isUndefined(val)) {
438
+ result[targetKey] = val;
439
+ }
440
+ };
441
+
442
+ for (let i = 0, l = arguments.length; i < l; i++) {
443
+ arguments[i] && forEach(arguments[i], assignValue);
444
+ }
445
+ return result;
446
+ }
447
+
448
+ /**
449
+ * Extends object a by mutably adding to it the properties of object b.
450
+ *
451
+ * @param {Object} a The object to be extended
452
+ * @param {Object} b The object to copy properties from
453
+ * @param {Object} thisArg The object to bind function to
454
+ *
455
+ * @param {Object} [options]
456
+ * @param {Boolean} [options.allOwnKeys]
457
+ * @returns {Object} The resulting value of object a
458
+ */
459
+ const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
460
+ forEach(
461
+ b,
462
+ (val, key) => {
463
+ if (thisArg && isFunction$1(val)) {
464
+ Object.defineProperty(a, key, {
465
+ value: bind(val, thisArg),
466
+ writable: true,
467
+ enumerable: true,
468
+ configurable: true,
469
+ });
470
+ } else {
471
+ Object.defineProperty(a, key, {
472
+ value: val,
473
+ writable: true,
474
+ enumerable: true,
475
+ configurable: true,
476
+ });
477
+ }
478
+ },
479
+ { allOwnKeys },
480
+ );
481
+ return a;
482
+ };
483
+
484
+ /**
485
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
486
+ *
487
+ * @param {string} content with BOM
488
+ *
489
+ * @returns {string} content value without BOM
490
+ */
491
+ const stripBOM = (content) => {
492
+ if (content.charCodeAt(0) === 0xfeff) {
493
+ content = content.slice(1);
494
+ }
495
+ return content;
496
+ };
497
+
498
+ /**
499
+ * Inherit the prototype methods from one constructor into another
500
+ * @param {function} constructor
501
+ * @param {function} superConstructor
502
+ * @param {object} [props]
503
+ * @param {object} [descriptors]
504
+ *
505
+ * @returns {void}
506
+ */
507
+ const inherits = (constructor, superConstructor, props, descriptors) => {
508
+ constructor.prototype = Object.create(
509
+ superConstructor.prototype,
510
+ descriptors,
511
+ );
512
+ Object.defineProperty(constructor.prototype, "constructor", {
513
+ value: constructor,
514
+ writable: true,
515
+ enumerable: false,
516
+ configurable: true,
517
+ });
518
+ Object.defineProperty(constructor, "super", {
519
+ value: superConstructor.prototype,
520
+ });
521
+ props && Object.assign(constructor.prototype, props);
522
+ };
523
+
524
+ /**
525
+ * Resolve object with deep prototype chain to a flat object
526
+ * @param {Object} sourceObj source object
527
+ * @param {Object} [destObj]
528
+ * @param {Function|Boolean} [filter]
529
+ * @param {Function} [propFilter]
530
+ *
531
+ * @returns {Object}
532
+ */
533
+ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
534
+ let props;
535
+ let i;
536
+ let prop;
537
+ const merged = {};
538
+
539
+ destObj = destObj || {};
540
+ // eslint-disable-next-line no-eq-null,eqeqeq
541
+ if (sourceObj == null) return destObj;
542
+
543
+ do {
544
+ props = Object.getOwnPropertyNames(sourceObj);
545
+ i = props.length;
546
+ while (i-- > 0) {
547
+ prop = props[i];
548
+ if (
549
+ (!propFilter || propFilter(prop, sourceObj, destObj)) &&
550
+ !merged[prop]
551
+ ) {
552
+ destObj[prop] = sourceObj[prop];
553
+ merged[prop] = true;
554
+ }
555
+ }
556
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
557
+ } while (
558
+ sourceObj &&
559
+ (!filter || filter(sourceObj, destObj)) &&
560
+ sourceObj !== Object.prototype
561
+ );
562
+
563
+ return destObj;
564
+ };
565
+
566
+ /**
567
+ * Determines whether a string ends with the characters of a specified string
568
+ *
569
+ * @param {String} str
570
+ * @param {String} searchString
571
+ * @param {Number} [position= 0]
572
+ *
573
+ * @returns {boolean}
574
+ */
575
+ const endsWith = (str, searchString, position) => {
576
+ str = String(str);
577
+ if (position === undefined || position > str.length) {
578
+ position = str.length;
579
+ }
580
+ position -= searchString.length;
581
+ const lastIndex = str.indexOf(searchString, position);
582
+ return lastIndex !== -1 && lastIndex === position;
583
+ };
584
+
585
+ /**
586
+ * Returns new array from array like object or null if failed
587
+ *
588
+ * @param {*} [thing]
589
+ *
590
+ * @returns {?Array}
591
+ */
592
+ const toArray = (thing) => {
593
+ if (!thing) return null;
594
+ if (isArray(thing)) return thing;
595
+ let i = thing.length;
596
+ if (!isNumber(i)) return null;
597
+ const arr = new Array(i);
598
+ while (i-- > 0) {
599
+ arr[i] = thing[i];
600
+ }
601
+ return arr;
602
+ };
603
+
604
+ /**
605
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
606
+ * thing passed in is an instance of Uint8Array
607
+ *
608
+ * @param {TypedArray}
609
+ *
610
+ * @returns {Array}
611
+ */
612
+ // eslint-disable-next-line func-names
613
+ const isTypedArray = ((TypedArray) => {
614
+ // eslint-disable-next-line func-names
615
+ return (thing) => {
616
+ return TypedArray && thing instanceof TypedArray;
617
+ };
618
+ })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
619
+
620
+ /**
621
+ * For each entry in the object, call the function with the key and value.
622
+ *
623
+ * @param {Object<any, any>} obj - The object to iterate over.
624
+ * @param {Function} fn - The function to call for each entry.
625
+ *
626
+ * @returns {void}
627
+ */
628
+ const forEachEntry = (obj, fn) => {
629
+ const generator = obj && obj[iterator];
630
+
631
+ const _iterator = generator.call(obj);
632
+
633
+ let result;
634
+
635
+ while ((result = _iterator.next()) && !result.done) {
636
+ const pair = result.value;
637
+ fn.call(obj, pair[0], pair[1]);
638
+ }
639
+ };
640
+
641
+ /**
642
+ * It takes a regular expression and a string, and returns an array of all the matches
643
+ *
644
+ * @param {string} regExp - The regular expression to match against.
645
+ * @param {string} str - The string to search.
646
+ *
647
+ * @returns {Array<boolean>}
648
+ */
649
+ const matchAll = (regExp, str) => {
650
+ let matches;
651
+ const arr = [];
652
+
653
+ while ((matches = regExp.exec(str)) !== null) {
654
+ arr.push(matches);
655
+ }
656
+
657
+ return arr;
658
+ };
659
+
660
+ /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
661
+ const isHTMLForm = kindOfTest("HTMLFormElement");
662
+
663
+ const toCamelCase = (str) => {
664
+ return str
665
+ .toLowerCase()
666
+ .replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
667
+ return p1.toUpperCase() + p2;
668
+ });
669
+ };
670
+
671
+ /* Creating a function that will check if an object has a property. */
672
+ const hasOwnProperty = (
673
+ ({ hasOwnProperty }) =>
674
+ (obj, prop) =>
675
+ hasOwnProperty.call(obj, prop)
676
+ )(Object.prototype);
677
+
678
+ /**
679
+ * Determine if a value is a RegExp object
680
+ *
681
+ * @param {*} val The value to test
682
+ *
683
+ * @returns {boolean} True if value is a RegExp object, otherwise false
684
+ */
685
+ const isRegExp = kindOfTest("RegExp");
686
+
687
+ const reduceDescriptors = (obj, reducer) => {
688
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
689
+ const reducedDescriptors = {};
690
+
691
+ forEach(descriptors, (descriptor, name) => {
692
+ let ret;
693
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
694
+ reducedDescriptors[name] = ret || descriptor;
695
+ }
696
+ });
697
+
698
+ Object.defineProperties(obj, reducedDescriptors);
699
+ };
700
+
701
+ /**
702
+ * Makes all methods read-only
703
+ * @param {Object} obj
704
+ */
705
+
706
+ const freezeMethods = (obj) => {
707
+ reduceDescriptors(obj, (descriptor, name) => {
708
+ // skip restricted props in strict mode
709
+ if (
710
+ isFunction$1(obj) &&
711
+ ["arguments", "caller", "callee"].indexOf(name) !== -1
712
+ ) {
713
+ return false;
714
+ }
715
+
716
+ const value = obj[name];
717
+
718
+ if (!isFunction$1(value)) return;
719
+
720
+ descriptor.enumerable = false;
721
+
722
+ if ("writable" in descriptor) {
723
+ descriptor.writable = false;
724
+ return;
725
+ }
726
+
727
+ if (!descriptor.set) {
728
+ descriptor.set = () => {
729
+ throw Error("Can not rewrite read-only method '" + name + "'");
730
+ };
731
+ }
732
+ });
733
+ };
734
+
735
+ const toObjectSet = (arrayOrString, delimiter) => {
736
+ const obj = {};
737
+
738
+ const define = (arr) => {
739
+ arr.forEach((value) => {
740
+ obj[value] = true;
741
+ });
742
+ };
743
+
744
+ isArray(arrayOrString)
745
+ ? define(arrayOrString)
746
+ : define(String(arrayOrString).split(delimiter));
747
+
748
+ return obj;
749
+ };
750
+
751
+ const noop = () => {};
752
+
753
+ const toFiniteNumber = (value, defaultValue) => {
754
+ return value != null && Number.isFinite((value = +value))
755
+ ? value
756
+ : defaultValue;
757
+ };
758
+
759
+ /**
760
+ * If the thing is a FormData object, return true, otherwise return false.
761
+ *
762
+ * @param {unknown} thing - The thing to check.
763
+ *
764
+ * @returns {boolean}
765
+ */
766
+ function isSpecCompliantForm(thing) {
767
+ return !!(
768
+ thing &&
769
+ isFunction$1(thing.append) &&
770
+ thing[toStringTag] === "FormData" &&
771
+ thing[iterator]
772
+ );
773
+ }
774
+
775
+ const toJSONObject = (obj) => {
776
+ const stack = new Array(10);
777
+
778
+ const visit = (source, i) => {
779
+ if (isObject(source)) {
780
+ if (stack.indexOf(source) >= 0) {
781
+ return;
782
+ }
783
+
784
+ //Buffer check
785
+ if (isBuffer(source)) {
786
+ return source;
787
+ }
788
+
789
+ if (!("toJSON" in source)) {
790
+ stack[i] = source;
791
+ const target = isArray(source) ? [] : {};
792
+
793
+ forEach(source, (value, key) => {
794
+ const reducedValue = visit(value, i + 1);
795
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
796
+ });
797
+
798
+ stack[i] = undefined;
799
+
800
+ return target;
801
+ }
802
+ }
803
+
804
+ return source;
805
+ };
806
+
807
+ return visit(obj, 0);
808
+ };
809
+
810
+ const isAsyncFn = kindOfTest("AsyncFunction");
811
+
812
+ const isThenable = (thing) =>
813
+ thing &&
814
+ (isObject(thing) || isFunction$1(thing)) &&
815
+ isFunction$1(thing.then) &&
816
+ isFunction$1(thing.catch);
817
+
818
+ // original code
819
+ // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
820
+
821
+ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
822
+ if (setImmediateSupported) {
823
+ return setImmediate;
824
+ }
825
+
826
+ return postMessageSupported
827
+ ? ((token, callbacks) => {
828
+ _global.addEventListener(
829
+ "message",
830
+ ({ source, data }) => {
831
+ if (source === _global && data === token) {
832
+ callbacks.length && callbacks.shift()();
833
+ }
834
+ },
835
+ false,
836
+ );
837
+
838
+ return (cb) => {
839
+ callbacks.push(cb);
840
+ _global.postMessage(token, "*");
841
+ };
842
+ })(`axios@${Math.random()}`, [])
843
+ : (cb) => setTimeout(cb);
844
+ })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
845
+
846
+ const asap =
847
+ typeof queueMicrotask !== "undefined"
848
+ ? queueMicrotask.bind(_global)
849
+ : (typeof process !== "undefined" && process.nextTick) || _setImmediate;
850
+
851
+ // *********************
852
+
853
+ const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
854
+
855
+ var utils$1 = {
856
+ isArray,
857
+ isArrayBuffer,
858
+ isBuffer,
859
+ isFormData,
860
+ isArrayBufferView,
861
+ isString,
862
+ isNumber,
863
+ isBoolean,
864
+ isObject,
865
+ isPlainObject,
866
+ isEmptyObject,
867
+ isReadableStream,
868
+ isRequest,
869
+ isResponse,
870
+ isHeaders,
871
+ isUndefined,
872
+ isDate,
873
+ isFile,
874
+ isBlob,
875
+ isRegExp,
876
+ isFunction: isFunction$1,
877
+ isStream,
878
+ isURLSearchParams,
879
+ isTypedArray,
880
+ isFileList,
881
+ forEach,
882
+ merge,
883
+ extend,
884
+ trim,
885
+ stripBOM,
886
+ inherits,
887
+ toFlatObject,
888
+ kindOf,
889
+ kindOfTest,
890
+ endsWith,
891
+ toArray,
892
+ forEachEntry,
893
+ matchAll,
894
+ isHTMLForm,
895
+ hasOwnProperty,
896
+ hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
897
+ reduceDescriptors,
898
+ freezeMethods,
899
+ toObjectSet,
900
+ toCamelCase,
901
+ noop,
902
+ toFiniteNumber,
903
+ findKey,
904
+ global: _global,
905
+ isContextDefined,
906
+ isSpecCompliantForm,
907
+ toJSONObject,
908
+ isAsyncFn,
909
+ isThenable,
910
+ setImmediate: _setImmediate,
911
+ asap,
912
+ isIterable,
913
+ };
914
+
915
+ class AxiosError extends Error {
916
+ static from(error, code, config, request, response, customProps) {
917
+ const axiosError = new AxiosError(error.message, code || error.code, config, request, response);
918
+ axiosError.cause = error;
919
+ axiosError.name = error.name;
920
+ customProps && Object.assign(axiosError, customProps);
921
+ return axiosError;
922
+ }
923
+
924
+ /**
925
+ * Create an Error with the specified message, config, error code, request and response.
926
+ *
927
+ * @param {string} message The error message.
928
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
929
+ * @param {Object} [config] The config.
930
+ * @param {Object} [request] The request.
931
+ * @param {Object} [response] The response.
932
+ *
933
+ * @returns {Error} The created error.
934
+ */
935
+ constructor(message, code, config, request, response) {
936
+ super(message);
937
+ this.name = 'AxiosError';
938
+ this.isAxiosError = true;
939
+ code && (this.code = code);
940
+ config && (this.config = config);
941
+ request && (this.request = request);
942
+ if (response) {
943
+ this.response = response;
944
+ this.status = response.status;
945
+ }
946
+ }
947
+
948
+ toJSON() {
949
+ return {
950
+ // Standard
951
+ message: this.message,
952
+ name: this.name,
953
+ // Microsoft
954
+ description: this.description,
955
+ number: this.number,
956
+ // Mozilla
957
+ fileName: this.fileName,
958
+ lineNumber: this.lineNumber,
959
+ columnNumber: this.columnNumber,
960
+ stack: this.stack,
961
+ // Axios
962
+ config: utils$1.toJSONObject(this.config),
963
+ code: this.code,
964
+ status: this.status,
965
+ };
966
+ }
967
+ }
968
+
969
+ // This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
970
+ AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
971
+ AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
972
+ AxiosError.ECONNABORTED = 'ECONNABORTED';
973
+ AxiosError.ETIMEDOUT = 'ETIMEDOUT';
974
+ AxiosError.ERR_NETWORK = 'ERR_NETWORK';
975
+ AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
976
+ AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
977
+ AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
978
+ AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
979
+ AxiosError.ERR_CANCELED = 'ERR_CANCELED';
980
+ AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
981
+ AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
982
+
983
+ var AxiosError$1 = AxiosError;
984
+
985
+ // eslint-disable-next-line strict
986
+ var httpAdapter = null;
987
+
988
+ /**
989
+ * Determines if the given thing is a array or js object.
990
+ *
991
+ * @param {string} thing - The object or array to be visited.
992
+ *
993
+ * @returns {boolean}
994
+ */
995
+ function isVisitable(thing) {
996
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
997
+ }
998
+
999
+ /**
1000
+ * It removes the brackets from the end of a string
1001
+ *
1002
+ * @param {string} key - The key of the parameter.
1003
+ *
1004
+ * @returns {string} the key without the brackets.
1005
+ */
1006
+ function removeBrackets(key) {
1007
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
1008
+ }
1009
+
1010
+ /**
1011
+ * It takes a path, a key, and a boolean, and returns a string
1012
+ *
1013
+ * @param {string} path - The path to the current key.
1014
+ * @param {string} key - The key of the current object being iterated over.
1015
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
1016
+ *
1017
+ * @returns {string} The path to the current key.
1018
+ */
1019
+ function renderKey(path, key, dots) {
1020
+ if (!path) return key;
1021
+ return path.concat(key).map(function each(token, i) {
1022
+ // eslint-disable-next-line no-param-reassign
1023
+ token = removeBrackets(token);
1024
+ return !dots && i ? '[' + token + ']' : token;
1025
+ }).join(dots ? '.' : '');
1026
+ }
1027
+
1028
+ /**
1029
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
1030
+ *
1031
+ * @param {Array<any>} arr - The array to check
1032
+ *
1033
+ * @returns {boolean}
1034
+ */
1035
+ function isFlatArray(arr) {
1036
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
1037
+ }
1038
+
1039
+ const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
1040
+ return /^is[A-Z]/.test(prop);
1041
+ });
1042
+
1043
+ /**
1044
+ * Convert a data object to FormData
1045
+ *
1046
+ * @param {Object} obj
1047
+ * @param {?Object} [formData]
1048
+ * @param {?Object} [options]
1049
+ * @param {Function} [options.visitor]
1050
+ * @param {Boolean} [options.metaTokens = true]
1051
+ * @param {Boolean} [options.dots = false]
1052
+ * @param {?Boolean} [options.indexes = false]
1053
+ *
1054
+ * @returns {Object}
1055
+ **/
1056
+
1057
+ /**
1058
+ * It converts an object into a FormData object
1059
+ *
1060
+ * @param {Object<any, any>} obj - The object to convert to form data.
1061
+ * @param {string} formData - The FormData object to append to.
1062
+ * @param {Object<string, any>} options
1063
+ *
1064
+ * @returns
1065
+ */
1066
+ function toFormData(obj, formData, options) {
1067
+ if (!utils$1.isObject(obj)) {
1068
+ throw new TypeError('target must be an object');
1069
+ }
1070
+
1071
+ // eslint-disable-next-line no-param-reassign
1072
+ formData = formData || new (FormData)();
1073
+
1074
+ // eslint-disable-next-line no-param-reassign
1075
+ options = utils$1.toFlatObject(options, {
1076
+ metaTokens: true,
1077
+ dots: false,
1078
+ indexes: false
1079
+ }, false, function defined(option, source) {
1080
+ // eslint-disable-next-line no-eq-null,eqeqeq
1081
+ return !utils$1.isUndefined(source[option]);
1082
+ });
1083
+
1084
+ const metaTokens = options.metaTokens;
1085
+ // eslint-disable-next-line no-use-before-define
1086
+ const visitor = options.visitor || defaultVisitor;
1087
+ const dots = options.dots;
1088
+ const indexes = options.indexes;
1089
+ const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
1090
+ const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
1091
+
1092
+ if (!utils$1.isFunction(visitor)) {
1093
+ throw new TypeError('visitor must be a function');
1094
+ }
1095
+
1096
+ function convertValue(value) {
1097
+ if (value === null) return '';
1098
+
1099
+ if (utils$1.isDate(value)) {
1100
+ return value.toISOString();
1101
+ }
1102
+
1103
+ if (utils$1.isBoolean(value)) {
1104
+ return value.toString();
1105
+ }
1106
+
1107
+ if (!useBlob && utils$1.isBlob(value)) {
1108
+ throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
1109
+ }
1110
+
1111
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
1112
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
1113
+ }
1114
+
1115
+ return value;
1116
+ }
1117
+
1118
+ /**
1119
+ * Default visitor.
1120
+ *
1121
+ * @param {*} value
1122
+ * @param {String|Number} key
1123
+ * @param {Array<String|Number>} path
1124
+ * @this {FormData}
1125
+ *
1126
+ * @returns {boolean} return true to visit the each prop of the value recursively
1127
+ */
1128
+ function defaultVisitor(value, key, path) {
1129
+ let arr = value;
1130
+
1131
+ if (value && !path && typeof value === 'object') {
1132
+ if (utils$1.endsWith(key, '{}')) {
1133
+ // eslint-disable-next-line no-param-reassign
1134
+ key = metaTokens ? key : key.slice(0, -2);
1135
+ // eslint-disable-next-line no-param-reassign
1136
+ value = JSON.stringify(value);
1137
+ } else if (
1138
+ (utils$1.isArray(value) && isFlatArray(value)) ||
1139
+ ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
1140
+ )) {
1141
+ // eslint-disable-next-line no-param-reassign
1142
+ key = removeBrackets(key);
1143
+
1144
+ arr.forEach(function each(el, index) {
1145
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
1146
+ // eslint-disable-next-line no-nested-ternary
1147
+ indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
1148
+ convertValue(el)
1149
+ );
1150
+ });
1151
+ return false;
1152
+ }
1153
+ }
1154
+
1155
+ if (isVisitable(value)) {
1156
+ return true;
1157
+ }
1158
+
1159
+ formData.append(renderKey(path, key, dots), convertValue(value));
1160
+
1161
+ return false;
1162
+ }
1163
+
1164
+ const stack = [];
1165
+
1166
+ const exposedHelpers = Object.assign(predicates, {
1167
+ defaultVisitor,
1168
+ convertValue,
1169
+ isVisitable
1170
+ });
1171
+
1172
+ function build(value, path) {
1173
+ if (utils$1.isUndefined(value)) return;
1174
+
1175
+ if (stack.indexOf(value) !== -1) {
1176
+ throw Error('Circular reference detected in ' + path.join('.'));
1177
+ }
1178
+
1179
+ stack.push(value);
1180
+
1181
+ utils$1.forEach(value, function each(el, key) {
1182
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
1183
+ formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
1184
+ );
1185
+
1186
+ if (result === true) {
1187
+ build(el, path ? path.concat(key) : [key]);
1188
+ }
1189
+ });
1190
+
1191
+ stack.pop();
1192
+ }
1193
+
1194
+ if (!utils$1.isObject(obj)) {
1195
+ throw new TypeError('data must be an object');
1196
+ }
1197
+
1198
+ build(obj);
1199
+
1200
+ return formData;
1201
+ }
1202
+
1203
+ /**
1204
+ * It encodes a string by replacing all characters that are not in the unreserved set with
1205
+ * their percent-encoded equivalents
1206
+ *
1207
+ * @param {string} str - The string to encode.
1208
+ *
1209
+ * @returns {string} The encoded string.
1210
+ */
1211
+ function encode$1(str) {
1212
+ const charMap = {
1213
+ '!': '%21',
1214
+ "'": '%27',
1215
+ '(': '%28',
1216
+ ')': '%29',
1217
+ '~': '%7E',
1218
+ '%20': '+',
1219
+ '%00': '\x00'
1220
+ };
1221
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
1222
+ return charMap[match];
1223
+ });
1224
+ }
1225
+
1226
+ /**
1227
+ * It takes a params object and converts it to a FormData object
1228
+ *
1229
+ * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
1230
+ * @param {Object<string, any>} options - The options object passed to the Axios constructor.
1231
+ *
1232
+ * @returns {void}
1233
+ */
1234
+ function AxiosURLSearchParams(params, options) {
1235
+ this._pairs = [];
1236
+
1237
+ params && toFormData(params, this, options);
1238
+ }
1239
+
1240
+ const prototype = AxiosURLSearchParams.prototype;
1241
+
1242
+ prototype.append = function append(name, value) {
1243
+ this._pairs.push([name, value]);
1244
+ };
1245
+
1246
+ prototype.toString = function toString(encoder) {
1247
+ const _encode = encoder ? function(value) {
1248
+ return encoder.call(this, value, encode$1);
1249
+ } : encode$1;
1250
+
1251
+ return this._pairs.map(function each(pair) {
1252
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
1253
+ }, '').join('&');
1254
+ };
1255
+
1256
+ /**
1257
+ * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
1258
+ * URI encoded counterparts
1259
+ *
1260
+ * @param {string} val The value to be encoded.
1261
+ *
1262
+ * @returns {string} The encoded value.
1263
+ */
1264
+ function encode(val) {
1265
+ return encodeURIComponent(val).
1266
+ replace(/%3A/gi, ':').
1267
+ replace(/%24/g, '$').
1268
+ replace(/%2C/gi, ',').
1269
+ replace(/%20/g, '+');
1270
+ }
1271
+
1272
+ /**
1273
+ * Build a URL by appending params to the end
1274
+ *
1275
+ * @param {string} url The base of the url (e.g., http://www.google.com)
1276
+ * @param {object} [params] The params to be appended
1277
+ * @param {?(object|Function)} options
1278
+ *
1279
+ * @returns {string} The formatted url
1280
+ */
1281
+ function buildURL(url, params, options) {
1282
+ if (!params) {
1283
+ return url;
1284
+ }
1285
+
1286
+ const _encode = options && options.encode || encode;
1287
+
1288
+ const _options = utils$1.isFunction(options) ? {
1289
+ serialize: options
1290
+ } : options;
1291
+
1292
+ const serializeFn = _options && _options.serialize;
1293
+
1294
+ let serializedParams;
1295
+
1296
+ if (serializeFn) {
1297
+ serializedParams = serializeFn(params, _options);
1298
+ } else {
1299
+ serializedParams = utils$1.isURLSearchParams(params) ?
1300
+ params.toString() :
1301
+ new AxiosURLSearchParams(params, _options).toString(_encode);
1302
+ }
1303
+
1304
+ if (serializedParams) {
1305
+ const hashmarkIndex = url.indexOf("#");
1306
+
1307
+ if (hashmarkIndex !== -1) {
1308
+ url = url.slice(0, hashmarkIndex);
1309
+ }
1310
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1311
+ }
1312
+
1313
+ return url;
1314
+ }
1315
+
1316
+ class InterceptorManager {
1317
+ constructor() {
1318
+ this.handlers = [];
1319
+ }
1320
+
1321
+ /**
1322
+ * Add a new interceptor to the stack
1323
+ *
1324
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
1325
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
1326
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
1327
+ *
1328
+ * @return {Number} An ID used to remove interceptor later
1329
+ */
1330
+ use(fulfilled, rejected, options) {
1331
+ this.handlers.push({
1332
+ fulfilled,
1333
+ rejected,
1334
+ synchronous: options ? options.synchronous : false,
1335
+ runWhen: options ? options.runWhen : null
1336
+ });
1337
+ return this.handlers.length - 1;
1338
+ }
1339
+
1340
+ /**
1341
+ * Remove an interceptor from the stack
1342
+ *
1343
+ * @param {Number} id The ID that was returned by `use`
1344
+ *
1345
+ * @returns {void}
1346
+ */
1347
+ eject(id) {
1348
+ if (this.handlers[id]) {
1349
+ this.handlers[id] = null;
1350
+ }
1351
+ }
1352
+
1353
+ /**
1354
+ * Clear all interceptors from the stack
1355
+ *
1356
+ * @returns {void}
1357
+ */
1358
+ clear() {
1359
+ if (this.handlers) {
1360
+ this.handlers = [];
1361
+ }
1362
+ }
1363
+
1364
+ /**
1365
+ * Iterate over all the registered interceptors
1366
+ *
1367
+ * This method is particularly useful for skipping over any
1368
+ * interceptors that may have become `null` calling `eject`.
1369
+ *
1370
+ * @param {Function} fn The function to call for each interceptor
1371
+ *
1372
+ * @returns {void}
1373
+ */
1374
+ forEach(fn) {
1375
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
1376
+ if (h !== null) {
1377
+ fn(h);
1378
+ }
1379
+ });
1380
+ }
1381
+ }
1382
+
1383
+ var InterceptorManager$1 = InterceptorManager;
1384
+
1385
+ var transitionalDefaults = {
1386
+ silentJSONParsing: true,
1387
+ forcedJSONParsing: true,
1388
+ clarifyTimeoutError: false,
1389
+ legacyInterceptorReqResOrdering: true
1390
+ };
1391
+
1392
+ var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
1393
+
1394
+ var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1395
+
1396
+ var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1397
+
1398
+ var platform$1 = {
1399
+ isBrowser: true,
1400
+ classes: {
1401
+ URLSearchParams: URLSearchParams$1,
1402
+ FormData: FormData$1,
1403
+ Blob: Blob$1
1404
+ },
1405
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1406
+ };
1407
+
1408
+ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
1409
+
1410
+ const _navigator = typeof navigator === 'object' && navigator || undefined;
1411
+
1412
+ /**
1413
+ * Determine if we're running in a standard browser environment
1414
+ *
1415
+ * This allows axios to run in a web worker, and react-native.
1416
+ * Both environments support XMLHttpRequest, but not fully standard globals.
1417
+ *
1418
+ * web workers:
1419
+ * typeof window -> undefined
1420
+ * typeof document -> undefined
1421
+ *
1422
+ * react-native:
1423
+ * navigator.product -> 'ReactNative'
1424
+ * nativescript
1425
+ * navigator.product -> 'NativeScript' or 'NS'
1426
+ *
1427
+ * @returns {boolean}
1428
+ */
1429
+ const hasStandardBrowserEnv = hasBrowserEnv &&
1430
+ (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
1431
+
1432
+ /**
1433
+ * Determine if we're running in a standard browser webWorker environment
1434
+ *
1435
+ * Although the `isStandardBrowserEnv` method indicates that
1436
+ * `allows axios to run in a web worker`, the WebWorker will still be
1437
+ * filtered out due to its judgment standard
1438
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1439
+ * This leads to a problem when axios post `FormData` in webWorker
1440
+ */
1441
+ const hasStandardBrowserWebWorkerEnv = (() => {
1442
+ return (
1443
+ typeof WorkerGlobalScope !== 'undefined' &&
1444
+ // eslint-disable-next-line no-undef
1445
+ self instanceof WorkerGlobalScope &&
1446
+ typeof self.importScripts === 'function'
1447
+ );
1448
+ })();
1449
+
1450
+ const origin = hasBrowserEnv && window.location.href || 'http://localhost';
1451
+
1452
+ var utils = /*#__PURE__*/Object.freeze({
1453
+ __proto__: null,
1454
+ hasBrowserEnv: hasBrowserEnv,
1455
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1456
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
1457
+ navigator: _navigator,
1458
+ origin: origin
1459
+ });
1460
+
1461
+ var platform = {
1462
+ ...utils,
1463
+ ...platform$1
1464
+ };
1465
+
1466
+ function toURLEncodedForm(data, options) {
1467
+ return toFormData(data, new platform.classes.URLSearchParams(), {
1468
+ visitor: function(value, key, path, helpers) {
1469
+ if (platform.isNode && utils$1.isBuffer(value)) {
1470
+ this.append(key, value.toString('base64'));
1471
+ return false;
1472
+ }
1473
+
1474
+ return helpers.defaultVisitor.apply(this, arguments);
1475
+ },
1476
+ ...options
1477
+ });
1478
+ }
1479
+
1480
+ /**
1481
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
1482
+ *
1483
+ * @param {string} name - The name of the property to get.
1484
+ *
1485
+ * @returns An array of strings.
1486
+ */
1487
+ function parsePropPath(name) {
1488
+ // foo[x][y][z]
1489
+ // foo.x.y.z
1490
+ // foo-x-y-z
1491
+ // foo x y z
1492
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
1493
+ return match[0] === '[]' ? '' : match[1] || match[0];
1494
+ });
1495
+ }
1496
+
1497
+ /**
1498
+ * Convert an array to an object.
1499
+ *
1500
+ * @param {Array<any>} arr - The array to convert to an object.
1501
+ *
1502
+ * @returns An object with the same keys and values as the array.
1503
+ */
1504
+ function arrayToObject(arr) {
1505
+ const obj = {};
1506
+ const keys = Object.keys(arr);
1507
+ let i;
1508
+ const len = keys.length;
1509
+ let key;
1510
+ for (i = 0; i < len; i++) {
1511
+ key = keys[i];
1512
+ obj[key] = arr[key];
1513
+ }
1514
+ return obj;
1515
+ }
1516
+
1517
+ /**
1518
+ * It takes a FormData object and returns a JavaScript object
1519
+ *
1520
+ * @param {string} formData The FormData object to convert to JSON.
1521
+ *
1522
+ * @returns {Object<string, any> | null} The converted object.
1523
+ */
1524
+ function formDataToJSON(formData) {
1525
+ function buildPath(path, value, target, index) {
1526
+ let name = path[index++];
1527
+
1528
+ if (name === '__proto__') return true;
1529
+
1530
+ const isNumericKey = Number.isFinite(+name);
1531
+ const isLast = index >= path.length;
1532
+ name = !name && utils$1.isArray(target) ? target.length : name;
1533
+
1534
+ if (isLast) {
1535
+ if (utils$1.hasOwnProp(target, name)) {
1536
+ target[name] = [target[name], value];
1537
+ } else {
1538
+ target[name] = value;
1539
+ }
1540
+
1541
+ return !isNumericKey;
1542
+ }
1543
+
1544
+ if (!target[name] || !utils$1.isObject(target[name])) {
1545
+ target[name] = [];
1546
+ }
1547
+
1548
+ const result = buildPath(path, value, target[name], index);
1549
+
1550
+ if (result && utils$1.isArray(target[name])) {
1551
+ target[name] = arrayToObject(target[name]);
1552
+ }
1553
+
1554
+ return !isNumericKey;
1555
+ }
1556
+
1557
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
1558
+ const obj = {};
1559
+
1560
+ utils$1.forEachEntry(formData, (name, value) => {
1561
+ buildPath(parsePropPath(name), value, obj, 0);
1562
+ });
1563
+
1564
+ return obj;
1565
+ }
1566
+
1567
+ return null;
1568
+ }
1569
+
1570
+ /**
1571
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
1572
+ * of the input
1573
+ *
1574
+ * @param {any} rawValue - The value to be stringified.
1575
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
1576
+ * @param {Function} encoder - A function that takes a value and returns a string.
1577
+ *
1578
+ * @returns {string} A stringified version of the rawValue.
1579
+ */
1580
+ function stringifySafely(rawValue, parser, encoder) {
1581
+ if (utils$1.isString(rawValue)) {
1582
+ try {
1583
+ (0, JSON.parse)(rawValue);
1584
+ return utils$1.trim(rawValue);
1585
+ } catch (e) {
1586
+ if (e.name !== 'SyntaxError') {
1587
+ throw e;
1588
+ }
1589
+ }
1590
+ }
1591
+
1592
+ return (encoder || JSON.stringify)(rawValue);
1593
+ }
1594
+
1595
+ const defaults = {
1596
+
1597
+ transitional: transitionalDefaults,
1598
+
1599
+ adapter: ['xhr', 'http', 'fetch'],
1600
+
1601
+ transformRequest: [function transformRequest(data, headers) {
1602
+ const contentType = headers.getContentType() || '';
1603
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
1604
+ const isObjectPayload = utils$1.isObject(data);
1605
+
1606
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
1607
+ data = new FormData(data);
1608
+ }
1609
+
1610
+ const isFormData = utils$1.isFormData(data);
1611
+
1612
+ if (isFormData) {
1613
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
1614
+ }
1615
+
1616
+ if (utils$1.isArrayBuffer(data) ||
1617
+ utils$1.isBuffer(data) ||
1618
+ utils$1.isStream(data) ||
1619
+ utils$1.isFile(data) ||
1620
+ utils$1.isBlob(data) ||
1621
+ utils$1.isReadableStream(data)
1622
+ ) {
1623
+ return data;
1624
+ }
1625
+ if (utils$1.isArrayBufferView(data)) {
1626
+ return data.buffer;
1627
+ }
1628
+ if (utils$1.isURLSearchParams(data)) {
1629
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
1630
+ return data.toString();
1631
+ }
1632
+
1633
+ let isFileList;
1634
+
1635
+ if (isObjectPayload) {
1636
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
1637
+ return toURLEncodedForm(data, this.formSerializer).toString();
1638
+ }
1639
+
1640
+ if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
1641
+ const _FormData = this.env && this.env.FormData;
1642
+
1643
+ return toFormData(
1644
+ isFileList ? {'files[]': data} : data,
1645
+ _FormData && new _FormData(),
1646
+ this.formSerializer
1647
+ );
1648
+ }
1649
+ }
1650
+
1651
+ if (isObjectPayload || hasJSONContentType ) {
1652
+ headers.setContentType('application/json', false);
1653
+ return stringifySafely(data);
1654
+ }
1655
+
1656
+ return data;
1657
+ }],
1658
+
1659
+ transformResponse: [function transformResponse(data) {
1660
+ const transitional = this.transitional || defaults.transitional;
1661
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1662
+ const JSONRequested = this.responseType === 'json';
1663
+
1664
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
1665
+ return data;
1666
+ }
1667
+
1668
+ if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
1669
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
1670
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
1671
+
1672
+ try {
1673
+ return JSON.parse(data, this.parseReviver);
1674
+ } catch (e) {
1675
+ if (strictJSONParsing) {
1676
+ if (e.name === 'SyntaxError') {
1677
+ throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
1678
+ }
1679
+ throw e;
1680
+ }
1681
+ }
1682
+ }
1683
+
1684
+ return data;
1685
+ }],
1686
+
1687
+ /**
1688
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1689
+ * timeout is not created.
1690
+ */
1691
+ timeout: 0,
1692
+
1693
+ xsrfCookieName: 'XSRF-TOKEN',
1694
+ xsrfHeaderName: 'X-XSRF-TOKEN',
1695
+
1696
+ maxContentLength: -1,
1697
+ maxBodyLength: -1,
1698
+
1699
+ env: {
1700
+ FormData: platform.classes.FormData,
1701
+ Blob: platform.classes.Blob
1702
+ },
1703
+
1704
+ validateStatus: function validateStatus(status) {
1705
+ return status >= 200 && status < 300;
1706
+ },
1707
+
1708
+ headers: {
1709
+ common: {
1710
+ 'Accept': 'application/json, text/plain, */*',
1711
+ 'Content-Type': undefined
1712
+ }
1713
+ }
1714
+ };
1715
+
1716
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
1717
+ defaults.headers[method] = {};
1718
+ });
1719
+
1720
+ var defaults$1 = defaults;
1721
+
1722
+ // RawAxiosHeaders whose duplicates are ignored by node
1723
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
1724
+ const ignoreDuplicateOf = utils$1.toObjectSet([
1725
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
1726
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1727
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1728
+ 'referer', 'retry-after', 'user-agent'
1729
+ ]);
1730
+
1731
+ /**
1732
+ * Parse headers into an object
1733
+ *
1734
+ * ```
1735
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
1736
+ * Content-Type: application/json
1737
+ * Connection: keep-alive
1738
+ * Transfer-Encoding: chunked
1739
+ * ```
1740
+ *
1741
+ * @param {String} rawHeaders Headers needing to be parsed
1742
+ *
1743
+ * @returns {Object} Headers parsed into an object
1744
+ */
1745
+ var parseHeaders = rawHeaders => {
1746
+ const parsed = {};
1747
+ let key;
1748
+ let val;
1749
+ let i;
1750
+
1751
+ rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
1752
+ i = line.indexOf(':');
1753
+ key = line.substring(0, i).trim().toLowerCase();
1754
+ val = line.substring(i + 1).trim();
1755
+
1756
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
1757
+ return;
1758
+ }
1759
+
1760
+ if (key === 'set-cookie') {
1761
+ if (parsed[key]) {
1762
+ parsed[key].push(val);
1763
+ } else {
1764
+ parsed[key] = [val];
1765
+ }
1766
+ } else {
1767
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1768
+ }
1769
+ });
1770
+
1771
+ return parsed;
1772
+ };
1773
+
1774
+ const $internals = Symbol('internals');
1775
+
1776
+ function normalizeHeader(header) {
1777
+ return header && String(header).trim().toLowerCase();
1778
+ }
1779
+
1780
+ function normalizeValue(value) {
1781
+ if (value === false || value == null) {
1782
+ return value;
1783
+ }
1784
+
1785
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
1786
+ }
1787
+
1788
+ function parseTokens(str) {
1789
+ const tokens = Object.create(null);
1790
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1791
+ let match;
1792
+
1793
+ while ((match = tokensRE.exec(str))) {
1794
+ tokens[match[1]] = match[2];
1795
+ }
1796
+
1797
+ return tokens;
1798
+ }
1799
+
1800
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1801
+
1802
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1803
+ if (utils$1.isFunction(filter)) {
1804
+ return filter.call(this, value, header);
1805
+ }
1806
+
1807
+ if (isHeaderNameFilter) {
1808
+ value = header;
1809
+ }
1810
+
1811
+ if (!utils$1.isString(value)) return;
1812
+
1813
+ if (utils$1.isString(filter)) {
1814
+ return value.indexOf(filter) !== -1;
1815
+ }
1816
+
1817
+ if (utils$1.isRegExp(filter)) {
1818
+ return filter.test(value);
1819
+ }
1820
+ }
1821
+
1822
+ function formatHeader(header) {
1823
+ return header.trim()
1824
+ .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
1825
+ return char.toUpperCase() + str;
1826
+ });
1827
+ }
1828
+
1829
+ function buildAccessors(obj, header) {
1830
+ const accessorName = utils$1.toCamelCase(' ' + header);
1831
+
1832
+ ['get', 'set', 'has'].forEach(methodName => {
1833
+ Object.defineProperty(obj, methodName + accessorName, {
1834
+ value: function(arg1, arg2, arg3) {
1835
+ return this[methodName].call(this, header, arg1, arg2, arg3);
1836
+ },
1837
+ configurable: true
1838
+ });
1839
+ });
1840
+ }
1841
+
1842
+ class AxiosHeaders {
1843
+ constructor(headers) {
1844
+ headers && this.set(headers);
1845
+ }
1846
+
1847
+ set(header, valueOrRewrite, rewrite) {
1848
+ const self = this;
1849
+
1850
+ function setHeader(_value, _header, _rewrite) {
1851
+ const lHeader = normalizeHeader(_header);
1852
+
1853
+ if (!lHeader) {
1854
+ throw new Error('header name must be a non-empty string');
1855
+ }
1856
+
1857
+ const key = utils$1.findKey(self, lHeader);
1858
+
1859
+ if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
1860
+ self[key || _header] = normalizeValue(_value);
1861
+ }
1862
+ }
1863
+
1864
+ const setHeaders = (headers, _rewrite) =>
1865
+ utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
1866
+
1867
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
1868
+ setHeaders(header, valueOrRewrite);
1869
+ } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1870
+ setHeaders(parseHeaders(header), valueOrRewrite);
1871
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
1872
+ let obj = {}, dest, key;
1873
+ for (const entry of header) {
1874
+ if (!utils$1.isArray(entry)) {
1875
+ throw TypeError('Object iterator must return a key-value pair');
1876
+ }
1877
+
1878
+ obj[key = entry[0]] = (dest = obj[key]) ?
1879
+ (utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
1880
+ }
1881
+
1882
+ setHeaders(obj, valueOrRewrite);
1883
+ } else {
1884
+ header != null && setHeader(valueOrRewrite, header, rewrite);
1885
+ }
1886
+
1887
+ return this;
1888
+ }
1889
+
1890
+ get(header, parser) {
1891
+ header = normalizeHeader(header);
1892
+
1893
+ if (header) {
1894
+ const key = utils$1.findKey(this, header);
1895
+
1896
+ if (key) {
1897
+ const value = this[key];
1898
+
1899
+ if (!parser) {
1900
+ return value;
1901
+ }
1902
+
1903
+ if (parser === true) {
1904
+ return parseTokens(value);
1905
+ }
1906
+
1907
+ if (utils$1.isFunction(parser)) {
1908
+ return parser.call(this, value, key);
1909
+ }
1910
+
1911
+ if (utils$1.isRegExp(parser)) {
1912
+ return parser.exec(value);
1913
+ }
1914
+
1915
+ throw new TypeError('parser must be boolean|regexp|function');
1916
+ }
1917
+ }
1918
+ }
1919
+
1920
+ has(header, matcher) {
1921
+ header = normalizeHeader(header);
1922
+
1923
+ if (header) {
1924
+ const key = utils$1.findKey(this, header);
1925
+
1926
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
1927
+ }
1928
+
1929
+ return false;
1930
+ }
1931
+
1932
+ delete(header, matcher) {
1933
+ const self = this;
1934
+ let deleted = false;
1935
+
1936
+ function deleteHeader(_header) {
1937
+ _header = normalizeHeader(_header);
1938
+
1939
+ if (_header) {
1940
+ const key = utils$1.findKey(self, _header);
1941
+
1942
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
1943
+ delete self[key];
1944
+
1945
+ deleted = true;
1946
+ }
1947
+ }
1948
+ }
1949
+
1950
+ if (utils$1.isArray(header)) {
1951
+ header.forEach(deleteHeader);
1952
+ } else {
1953
+ deleteHeader(header);
1954
+ }
1955
+
1956
+ return deleted;
1957
+ }
1958
+
1959
+ clear(matcher) {
1960
+ const keys = Object.keys(this);
1961
+ let i = keys.length;
1962
+ let deleted = false;
1963
+
1964
+ while (i--) {
1965
+ const key = keys[i];
1966
+ if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1967
+ delete this[key];
1968
+ deleted = true;
1969
+ }
1970
+ }
1971
+
1972
+ return deleted;
1973
+ }
1974
+
1975
+ normalize(format) {
1976
+ const self = this;
1977
+ const headers = {};
1978
+
1979
+ utils$1.forEach(this, (value, header) => {
1980
+ const key = utils$1.findKey(headers, header);
1981
+
1982
+ if (key) {
1983
+ self[key] = normalizeValue(value);
1984
+ delete self[header];
1985
+ return;
1986
+ }
1987
+
1988
+ const normalized = format ? formatHeader(header) : String(header).trim();
1989
+
1990
+ if (normalized !== header) {
1991
+ delete self[header];
1992
+ }
1993
+
1994
+ self[normalized] = normalizeValue(value);
1995
+
1996
+ headers[normalized] = true;
1997
+ });
1998
+
1999
+ return this;
2000
+ }
2001
+
2002
+ concat(...targets) {
2003
+ return this.constructor.concat(this, ...targets);
2004
+ }
2005
+
2006
+ toJSON(asStrings) {
2007
+ const obj = Object.create(null);
2008
+
2009
+ utils$1.forEach(this, (value, header) => {
2010
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
2011
+ });
2012
+
2013
+ return obj;
2014
+ }
2015
+
2016
+ [Symbol.iterator]() {
2017
+ return Object.entries(this.toJSON())[Symbol.iterator]();
2018
+ }
2019
+
2020
+ toString() {
2021
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
2022
+ }
2023
+
2024
+ getSetCookie() {
2025
+ return this.get("set-cookie") || [];
2026
+ }
2027
+
2028
+ get [Symbol.toStringTag]() {
2029
+ return 'AxiosHeaders';
2030
+ }
2031
+
2032
+ static from(thing) {
2033
+ return thing instanceof this ? thing : new this(thing);
2034
+ }
2035
+
2036
+ static concat(first, ...targets) {
2037
+ const computed = new this(first);
2038
+
2039
+ targets.forEach((target) => computed.set(target));
2040
+
2041
+ return computed;
2042
+ }
2043
+
2044
+ static accessor(header) {
2045
+ const internals = this[$internals] = (this[$internals] = {
2046
+ accessors: {}
2047
+ });
2048
+
2049
+ const accessors = internals.accessors;
2050
+ const prototype = this.prototype;
2051
+
2052
+ function defineAccessor(_header) {
2053
+ const lHeader = normalizeHeader(_header);
2054
+
2055
+ if (!accessors[lHeader]) {
2056
+ buildAccessors(prototype, _header);
2057
+ accessors[lHeader] = true;
2058
+ }
2059
+ }
2060
+
2061
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
2062
+
2063
+ return this;
2064
+ }
2065
+ }
2066
+
2067
+ AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
2068
+
2069
+ // reserved names hotfix
2070
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
2071
+ let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
2072
+ return {
2073
+ get: () => value,
2074
+ set(headerValue) {
2075
+ this[mapped] = headerValue;
2076
+ }
2077
+ }
2078
+ });
2079
+
2080
+ utils$1.freezeMethods(AxiosHeaders);
2081
+
2082
+ var AxiosHeaders$1 = AxiosHeaders;
2083
+
2084
+ /**
2085
+ * Transform the data for a request or a response
2086
+ *
2087
+ * @param {Array|Function} fns A single function or Array of functions
2088
+ * @param {?Object} response The response object
2089
+ *
2090
+ * @returns {*} The resulting transformed data
2091
+ */
2092
+ function transformData(fns, response) {
2093
+ const config = this || defaults$1;
2094
+ const context = response || config;
2095
+ const headers = AxiosHeaders$1.from(context.headers);
2096
+ let data = context.data;
2097
+
2098
+ utils$1.forEach(fns, function transform(fn) {
2099
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
2100
+ });
2101
+
2102
+ headers.normalize();
2103
+
2104
+ return data;
2105
+ }
2106
+
2107
+ function isCancel(value) {
2108
+ return !!(value && value.__CANCEL__);
2109
+ }
2110
+
2111
+ class CanceledError extends AxiosError$1 {
2112
+ /**
2113
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
2114
+ *
2115
+ * @param {string=} message The message.
2116
+ * @param {Object=} config The config.
2117
+ * @param {Object=} request The request.
2118
+ *
2119
+ * @returns {CanceledError} The created error.
2120
+ */
2121
+ constructor(message, config, request) {
2122
+ super(message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request);
2123
+ this.name = 'CanceledError';
2124
+ this.__CANCEL__ = true;
2125
+ }
2126
+ }
2127
+
2128
+ var CanceledError$1 = CanceledError;
2129
+
2130
+ /**
2131
+ * Resolve or reject a Promise based on response status.
2132
+ *
2133
+ * @param {Function} resolve A function that resolves the promise.
2134
+ * @param {Function} reject A function that rejects the promise.
2135
+ * @param {object} response The response.
2136
+ *
2137
+ * @returns {object} The response.
2138
+ */
2139
+ function settle(resolve, reject, response) {
2140
+ const validateStatus = response.config.validateStatus;
2141
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
2142
+ resolve(response);
2143
+ } else {
2144
+ reject(new AxiosError$1(
2145
+ 'Request failed with status code ' + response.status,
2146
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
2147
+ response.config,
2148
+ response.request,
2149
+ response
2150
+ ));
2151
+ }
2152
+ }
2153
+
2154
+ function parseProtocol(url) {
2155
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
2156
+ return match && match[1] || '';
2157
+ }
2158
+
2159
+ /**
2160
+ * Calculate data maxRate
2161
+ * @param {Number} [samplesCount= 10]
2162
+ * @param {Number} [min= 1000]
2163
+ * @returns {Function}
2164
+ */
2165
+ function speedometer(samplesCount, min) {
2166
+ samplesCount = samplesCount || 10;
2167
+ const bytes = new Array(samplesCount);
2168
+ const timestamps = new Array(samplesCount);
2169
+ let head = 0;
2170
+ let tail = 0;
2171
+ let firstSampleTS;
2172
+
2173
+ min = min !== undefined ? min : 1000;
2174
+
2175
+ return function push(chunkLength) {
2176
+ const now = Date.now();
2177
+
2178
+ const startedAt = timestamps[tail];
2179
+
2180
+ if (!firstSampleTS) {
2181
+ firstSampleTS = now;
2182
+ }
2183
+
2184
+ bytes[head] = chunkLength;
2185
+ timestamps[head] = now;
2186
+
2187
+ let i = tail;
2188
+ let bytesCount = 0;
2189
+
2190
+ while (i !== head) {
2191
+ bytesCount += bytes[i++];
2192
+ i = i % samplesCount;
2193
+ }
2194
+
2195
+ head = (head + 1) % samplesCount;
2196
+
2197
+ if (head === tail) {
2198
+ tail = (tail + 1) % samplesCount;
2199
+ }
2200
+
2201
+ if (now - firstSampleTS < min) {
2202
+ return;
2203
+ }
2204
+
2205
+ const passed = startedAt && now - startedAt;
2206
+
2207
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
2208
+ };
2209
+ }
2210
+
2211
+ /**
2212
+ * Throttle decorator
2213
+ * @param {Function} fn
2214
+ * @param {Number} freq
2215
+ * @return {Function}
2216
+ */
2217
+ function throttle(fn, freq) {
2218
+ let timestamp = 0;
2219
+ let threshold = 1000 / freq;
2220
+ let lastArgs;
2221
+ let timer;
2222
+
2223
+ const invoke = (args, now = Date.now()) => {
2224
+ timestamp = now;
2225
+ lastArgs = null;
2226
+ if (timer) {
2227
+ clearTimeout(timer);
2228
+ timer = null;
2229
+ }
2230
+ fn(...args);
2231
+ };
2232
+
2233
+ const throttled = (...args) => {
2234
+ const now = Date.now();
2235
+ const passed = now - timestamp;
2236
+ if ( passed >= threshold) {
2237
+ invoke(args, now);
2238
+ } else {
2239
+ lastArgs = args;
2240
+ if (!timer) {
2241
+ timer = setTimeout(() => {
2242
+ timer = null;
2243
+ invoke(lastArgs);
2244
+ }, threshold - passed);
2245
+ }
2246
+ }
2247
+ };
2248
+
2249
+ const flush = () => lastArgs && invoke(lastArgs);
2250
+
2251
+ return [throttled, flush];
2252
+ }
2253
+
2254
+ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
2255
+ let bytesNotified = 0;
2256
+ const _speedometer = speedometer(50, 250);
2257
+
2258
+ return throttle(e => {
2259
+ const loaded = e.loaded;
2260
+ const total = e.lengthComputable ? e.total : undefined;
2261
+ const progressBytes = loaded - bytesNotified;
2262
+ const rate = _speedometer(progressBytes);
2263
+ const inRange = loaded <= total;
2264
+
2265
+ bytesNotified = loaded;
2266
+
2267
+ const data = {
2268
+ loaded,
2269
+ total,
2270
+ progress: total ? (loaded / total) : undefined,
2271
+ bytes: progressBytes,
2272
+ rate: rate ? rate : undefined,
2273
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2274
+ event: e,
2275
+ lengthComputable: total != null,
2276
+ [isDownloadStream ? 'download' : 'upload']: true
2277
+ };
2278
+
2279
+ listener(data);
2280
+ }, freq);
2281
+ };
2282
+
2283
+ const progressEventDecorator = (total, throttled) => {
2284
+ const lengthComputable = total != null;
2285
+
2286
+ return [(loaded) => throttled[0]({
2287
+ lengthComputable,
2288
+ total,
2289
+ loaded
2290
+ }), throttled[1]];
2291
+ };
2292
+
2293
+ const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
2294
+
2295
+ var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
2296
+ url = new URL(url, platform.origin);
2297
+
2298
+ return (
2299
+ origin.protocol === url.protocol &&
2300
+ origin.host === url.host &&
2301
+ (isMSIE || origin.port === url.port)
2302
+ );
2303
+ })(
2304
+ new URL(platform.origin),
2305
+ platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
2306
+ ) : () => true;
2307
+
2308
+ var cookies = platform.hasStandardBrowserEnv ?
2309
+
2310
+ // Standard browser envs support document.cookie
2311
+ {
2312
+ write(name, value, expires, path, domain, secure, sameSite) {
2313
+ if (typeof document === 'undefined') return;
2314
+
2315
+ const cookie = [`${name}=${encodeURIComponent(value)}`];
2316
+
2317
+ if (utils$1.isNumber(expires)) {
2318
+ cookie.push(`expires=${new Date(expires).toUTCString()}`);
2319
+ }
2320
+ if (utils$1.isString(path)) {
2321
+ cookie.push(`path=${path}`);
2322
+ }
2323
+ if (utils$1.isString(domain)) {
2324
+ cookie.push(`domain=${domain}`);
2325
+ }
2326
+ if (secure === true) {
2327
+ cookie.push('secure');
2328
+ }
2329
+ if (utils$1.isString(sameSite)) {
2330
+ cookie.push(`SameSite=${sameSite}`);
2331
+ }
2332
+
2333
+ document.cookie = cookie.join('; ');
2334
+ },
2335
+
2336
+ read(name) {
2337
+ if (typeof document === 'undefined') return null;
2338
+ const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
2339
+ return match ? decodeURIComponent(match[1]) : null;
2340
+ },
2341
+
2342
+ remove(name) {
2343
+ this.write(name, '', Date.now() - 86400000, '/');
2344
+ }
2345
+ }
2346
+
2347
+ :
2348
+
2349
+ // Non-standard browser env (web workers, react-native) lack needed support.
2350
+ {
2351
+ write() {},
2352
+ read() {
2353
+ return null;
2354
+ },
2355
+ remove() {}
2356
+ };
2357
+
2358
+ /**
2359
+ * Determines whether the specified URL is absolute
2360
+ *
2361
+ * @param {string} url The URL to test
2362
+ *
2363
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
2364
+ */
2365
+ function isAbsoluteURL(url) {
2366
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
2367
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
2368
+ // by any combination of letters, digits, plus, period, or hyphen.
2369
+ if (typeof url !== 'string') {
2370
+ return false;
2371
+ }
2372
+
2373
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
2374
+ }
2375
+
2376
+ /**
2377
+ * Creates a new URL by combining the specified URLs
2378
+ *
2379
+ * @param {string} baseURL The base URL
2380
+ * @param {string} relativeURL The relative URL
2381
+ *
2382
+ * @returns {string} The combined URL
2383
+ */
2384
+ function combineURLs(baseURL, relativeURL) {
2385
+ return relativeURL
2386
+ ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
2387
+ : baseURL;
2388
+ }
2389
+
2390
+ /**
2391
+ * Creates a new URL by combining the baseURL with the requestedURL,
2392
+ * only when the requestedURL is not already an absolute URL.
2393
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
2394
+ *
2395
+ * @param {string} baseURL The base URL
2396
+ * @param {string} requestedURL Absolute or relative URL to combine
2397
+ *
2398
+ * @returns {string} The combined full path
2399
+ */
2400
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
2401
+ let isRelativeUrl = !isAbsoluteURL(requestedURL);
2402
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
2403
+ return combineURLs(baseURL, requestedURL);
2404
+ }
2405
+ return requestedURL;
2406
+ }
2407
+
2408
+ const headersToObject = (thing) =>
2409
+ thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
2410
+
2411
+ /**
2412
+ * Config-specific merge-function which creates a new config-object
2413
+ * by merging two configuration objects together.
2414
+ *
2415
+ * @param {Object} config1
2416
+ * @param {Object} config2
2417
+ *
2418
+ * @returns {Object} New object resulting from merging config2 to config1
2419
+ */
2420
+ function mergeConfig(config1, config2) {
2421
+ // eslint-disable-next-line no-param-reassign
2422
+ config2 = config2 || {};
2423
+ const config = {};
2424
+
2425
+ function getMergedValue(target, source, prop, caseless) {
2426
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
2427
+ return utils$1.merge.call({ caseless }, target, source);
2428
+ } else if (utils$1.isPlainObject(source)) {
2429
+ return utils$1.merge({}, source);
2430
+ } else if (utils$1.isArray(source)) {
2431
+ return source.slice();
2432
+ }
2433
+ return source;
2434
+ }
2435
+
2436
+ function mergeDeepProperties(a, b, prop, caseless) {
2437
+ if (!utils$1.isUndefined(b)) {
2438
+ return getMergedValue(a, b, prop, caseless);
2439
+ } else if (!utils$1.isUndefined(a)) {
2440
+ return getMergedValue(undefined, a, prop, caseless);
2441
+ }
2442
+ }
2443
+
2444
+ // eslint-disable-next-line consistent-return
2445
+ function valueFromConfig2(a, b) {
2446
+ if (!utils$1.isUndefined(b)) {
2447
+ return getMergedValue(undefined, b);
2448
+ }
2449
+ }
2450
+
2451
+ // eslint-disable-next-line consistent-return
2452
+ function defaultToConfig2(a, b) {
2453
+ if (!utils$1.isUndefined(b)) {
2454
+ return getMergedValue(undefined, b);
2455
+ } else if (!utils$1.isUndefined(a)) {
2456
+ return getMergedValue(undefined, a);
2457
+ }
2458
+ }
2459
+
2460
+ // eslint-disable-next-line consistent-return
2461
+ function mergeDirectKeys(a, b, prop) {
2462
+ if (prop in config2) {
2463
+ return getMergedValue(a, b);
2464
+ } else if (prop in config1) {
2465
+ return getMergedValue(undefined, a);
2466
+ }
2467
+ }
2468
+
2469
+ const mergeMap = {
2470
+ url: valueFromConfig2,
2471
+ method: valueFromConfig2,
2472
+ data: valueFromConfig2,
2473
+ baseURL: defaultToConfig2,
2474
+ transformRequest: defaultToConfig2,
2475
+ transformResponse: defaultToConfig2,
2476
+ paramsSerializer: defaultToConfig2,
2477
+ timeout: defaultToConfig2,
2478
+ timeoutMessage: defaultToConfig2,
2479
+ withCredentials: defaultToConfig2,
2480
+ withXSRFToken: defaultToConfig2,
2481
+ adapter: defaultToConfig2,
2482
+ responseType: defaultToConfig2,
2483
+ xsrfCookieName: defaultToConfig2,
2484
+ xsrfHeaderName: defaultToConfig2,
2485
+ onUploadProgress: defaultToConfig2,
2486
+ onDownloadProgress: defaultToConfig2,
2487
+ decompress: defaultToConfig2,
2488
+ maxContentLength: defaultToConfig2,
2489
+ maxBodyLength: defaultToConfig2,
2490
+ beforeRedirect: defaultToConfig2,
2491
+ transport: defaultToConfig2,
2492
+ httpAgent: defaultToConfig2,
2493
+ httpsAgent: defaultToConfig2,
2494
+ cancelToken: defaultToConfig2,
2495
+ socketPath: defaultToConfig2,
2496
+ responseEncoding: defaultToConfig2,
2497
+ validateStatus: mergeDirectKeys,
2498
+ headers: (a, b, prop) =>
2499
+ mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true),
2500
+ };
2501
+
2502
+ utils$1.forEach(
2503
+ Object.keys({ ...config1, ...config2 }),
2504
+ function computeConfigValue(prop) {
2505
+ if (
2506
+ prop === "__proto__" ||
2507
+ prop === "constructor" ||
2508
+ prop === "prototype"
2509
+ )
2510
+ return;
2511
+ const merge = utils$1.hasOwnProp(mergeMap, prop)
2512
+ ? mergeMap[prop]
2513
+ : mergeDeepProperties;
2514
+ const configValue = merge(config1[prop], config2[prop], prop);
2515
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) ||
2516
+ (config[prop] = configValue);
2517
+ },
2518
+ );
2519
+
2520
+ return config;
2521
+ }
2522
+
2523
+ var resolveConfig = (config) => {
2524
+ const newConfig = mergeConfig({}, config);
2525
+
2526
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
2527
+
2528
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
2529
+
2530
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
2531
+
2532
+ // HTTP basic authentication
2533
+ if (auth) {
2534
+ headers.set('Authorization', 'Basic ' +
2535
+ btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
2536
+ );
2537
+ }
2538
+
2539
+ if (utils$1.isFormData(data)) {
2540
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2541
+ headers.setContentType(undefined); // browser handles it
2542
+ } else if (utils$1.isFunction(data.getHeaders)) {
2543
+ // Node.js FormData (like form-data package)
2544
+ const formHeaders = data.getHeaders();
2545
+ // Only set safe headers to avoid overwriting security headers
2546
+ const allowedHeaders = ['content-type', 'content-length'];
2547
+ Object.entries(formHeaders).forEach(([key, val]) => {
2548
+ if (allowedHeaders.includes(key.toLowerCase())) {
2549
+ headers.set(key, val);
2550
+ }
2551
+ });
2552
+ }
2553
+ }
2554
+
2555
+ // Add xsrf header
2556
+ // This is only done if running in a standard browser environment.
2557
+ // Specifically not if we're in a web worker, or react-native.
2558
+
2559
+ if (platform.hasStandardBrowserEnv) {
2560
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
2561
+
2562
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
2563
+ // Add xsrf header
2564
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
2565
+
2566
+ if (xsrfValue) {
2567
+ headers.set(xsrfHeaderName, xsrfValue);
2568
+ }
2569
+ }
2570
+ }
2571
+
2572
+ return newConfig;
2573
+ };
2574
+
2575
+ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2576
+
2577
+ var xhrAdapter = isXHRAdapterSupported && function (config) {
2578
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
2579
+ const _config = resolveConfig(config);
2580
+ let requestData = _config.data;
2581
+ const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
2582
+ let {responseType, onUploadProgress, onDownloadProgress} = _config;
2583
+ let onCanceled;
2584
+ let uploadThrottled, downloadThrottled;
2585
+ let flushUpload, flushDownload;
2586
+
2587
+ function done() {
2588
+ flushUpload && flushUpload(); // flush events
2589
+ flushDownload && flushDownload(); // flush events
2590
+
2591
+ _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
2592
+
2593
+ _config.signal && _config.signal.removeEventListener('abort', onCanceled);
2594
+ }
2595
+
2596
+ let request = new XMLHttpRequest();
2597
+
2598
+ request.open(_config.method.toUpperCase(), _config.url, true);
2599
+
2600
+ // Set the request timeout in MS
2601
+ request.timeout = _config.timeout;
2602
+
2603
+ function onloadend() {
2604
+ if (!request) {
2605
+ return;
2606
+ }
2607
+ // Prepare the response
2608
+ const responseHeaders = AxiosHeaders$1.from(
2609
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
2610
+ );
2611
+ const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
2612
+ request.responseText : request.response;
2613
+ const response = {
2614
+ data: responseData,
2615
+ status: request.status,
2616
+ statusText: request.statusText,
2617
+ headers: responseHeaders,
2618
+ config,
2619
+ request
2620
+ };
2621
+
2622
+ settle(function _resolve(value) {
2623
+ resolve(value);
2624
+ done();
2625
+ }, function _reject(err) {
2626
+ reject(err);
2627
+ done();
2628
+ }, response);
2629
+
2630
+ // Clean up request
2631
+ request = null;
2632
+ }
2633
+
2634
+ if ('onloadend' in request) {
2635
+ // Use onloadend if available
2636
+ request.onloadend = onloadend;
2637
+ } else {
2638
+ // Listen for ready state to emulate onloadend
2639
+ request.onreadystatechange = function handleLoad() {
2640
+ if (!request || request.readyState !== 4) {
2641
+ return;
2642
+ }
2643
+
2644
+ // The request errored out and we didn't get a response, this will be
2645
+ // handled by onerror instead
2646
+ // With one exception: request that using file: protocol, most browsers
2647
+ // will return status as 0 even though it's a successful request
2648
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
2649
+ return;
2650
+ }
2651
+ // readystate handler is calling before onerror or ontimeout handlers,
2652
+ // so we should call onloadend on the next 'tick'
2653
+ setTimeout(onloadend);
2654
+ };
2655
+ }
2656
+
2657
+ // Handle browser request cancellation (as opposed to a manual cancellation)
2658
+ request.onabort = function handleAbort() {
2659
+ if (!request) {
2660
+ return;
2661
+ }
2662
+
2663
+ reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
2664
+
2665
+ // Clean up request
2666
+ request = null;
2667
+ };
2668
+
2669
+ // Handle low level network errors
2670
+ request.onerror = function handleError(event) {
2671
+ // Browsers deliver a ProgressEvent in XHR onerror
2672
+ // (message may be empty; when present, surface it)
2673
+ // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
2674
+ const msg = event && event.message ? event.message : 'Network Error';
2675
+ const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
2676
+ // attach the underlying event for consumers who want details
2677
+ err.event = event || null;
2678
+ reject(err);
2679
+ request = null;
2680
+ };
2681
+
2682
+ // Handle timeout
2683
+ request.ontimeout = function handleTimeout() {
2684
+ let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
2685
+ const transitional = _config.transitional || transitionalDefaults;
2686
+ if (_config.timeoutErrorMessage) {
2687
+ timeoutErrorMessage = _config.timeoutErrorMessage;
2688
+ }
2689
+ reject(new AxiosError$1(
2690
+ timeoutErrorMessage,
2691
+ transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
2692
+ config,
2693
+ request));
2694
+
2695
+ // Clean up request
2696
+ request = null;
2697
+ };
2698
+
2699
+ // Remove Content-Type if data is undefined
2700
+ requestData === undefined && requestHeaders.setContentType(null);
2701
+
2702
+ // Add headers to the request
2703
+ if ('setRequestHeader' in request) {
2704
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
2705
+ request.setRequestHeader(key, val);
2706
+ });
2707
+ }
2708
+
2709
+ // Add withCredentials to request if needed
2710
+ if (!utils$1.isUndefined(_config.withCredentials)) {
2711
+ request.withCredentials = !!_config.withCredentials;
2712
+ }
2713
+
2714
+ // Add responseType to request if needed
2715
+ if (responseType && responseType !== 'json') {
2716
+ request.responseType = _config.responseType;
2717
+ }
2718
+
2719
+ // Handle progress if needed
2720
+ if (onDownloadProgress) {
2721
+ ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));
2722
+ request.addEventListener('progress', downloadThrottled);
2723
+ }
2724
+
2725
+ // Not all browsers support upload events
2726
+ if (onUploadProgress && request.upload) {
2727
+ ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));
2728
+
2729
+ request.upload.addEventListener('progress', uploadThrottled);
2730
+
2731
+ request.upload.addEventListener('loadend', flushUpload);
2732
+ }
2733
+
2734
+ if (_config.cancelToken || _config.signal) {
2735
+ // Handle cancellation
2736
+ // eslint-disable-next-line func-names
2737
+ onCanceled = cancel => {
2738
+ if (!request) {
2739
+ return;
2740
+ }
2741
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
2742
+ request.abort();
2743
+ request = null;
2744
+ };
2745
+
2746
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
2747
+ if (_config.signal) {
2748
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
2749
+ }
2750
+ }
2751
+
2752
+ const protocol = parseProtocol(_config.url);
2753
+
2754
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
2755
+ reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
2756
+ return;
2757
+ }
2758
+
2759
+
2760
+ // Send the request
2761
+ request.send(requestData || null);
2762
+ });
2763
+ };
2764
+
2765
+ const composeSignals = (signals, timeout) => {
2766
+ const {length} = (signals = signals ? signals.filter(Boolean) : []);
2767
+
2768
+ if (timeout || length) {
2769
+ let controller = new AbortController();
2770
+
2771
+ let aborted;
2772
+
2773
+ const onabort = function (reason) {
2774
+ if (!aborted) {
2775
+ aborted = true;
2776
+ unsubscribe();
2777
+ const err = reason instanceof Error ? reason : this.reason;
2778
+ controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
2779
+ }
2780
+ };
2781
+
2782
+ let timer = timeout && setTimeout(() => {
2783
+ timer = null;
2784
+ onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
2785
+ }, timeout);
2786
+
2787
+ const unsubscribe = () => {
2788
+ if (signals) {
2789
+ timer && clearTimeout(timer);
2790
+ timer = null;
2791
+ signals.forEach(signal => {
2792
+ signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
2793
+ });
2794
+ signals = null;
2795
+ }
2796
+ };
2797
+
2798
+ signals.forEach((signal) => signal.addEventListener('abort', onabort));
2799
+
2800
+ const {signal} = controller;
2801
+
2802
+ signal.unsubscribe = () => utils$1.asap(unsubscribe);
2803
+
2804
+ return signal;
2805
+ }
2806
+ };
2807
+
2808
+ var composeSignals$1 = composeSignals;
2809
+
2810
+ const streamChunk = function* (chunk, chunkSize) {
2811
+ let len = chunk.byteLength;
2812
+
2813
+ if (len < chunkSize) {
2814
+ yield chunk;
2815
+ return;
2816
+ }
2817
+
2818
+ let pos = 0;
2819
+ let end;
2820
+
2821
+ while (pos < len) {
2822
+ end = pos + chunkSize;
2823
+ yield chunk.slice(pos, end);
2824
+ pos = end;
2825
+ }
2826
+ };
2827
+
2828
+ const readBytes = async function* (iterable, chunkSize) {
2829
+ for await (const chunk of readStream(iterable)) {
2830
+ yield* streamChunk(chunk, chunkSize);
2831
+ }
2832
+ };
2833
+
2834
+ const readStream = async function* (stream) {
2835
+ if (stream[Symbol.asyncIterator]) {
2836
+ yield* stream;
2837
+ return;
2838
+ }
2839
+
2840
+ const reader = stream.getReader();
2841
+ try {
2842
+ for (;;) {
2843
+ const {done, value} = await reader.read();
2844
+ if (done) {
2845
+ break;
2846
+ }
2847
+ yield value;
2848
+ }
2849
+ } finally {
2850
+ await reader.cancel();
2851
+ }
2852
+ };
2853
+
2854
+ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
2855
+ const iterator = readBytes(stream, chunkSize);
2856
+
2857
+ let bytes = 0;
2858
+ let done;
2859
+ let _onFinish = (e) => {
2860
+ if (!done) {
2861
+ done = true;
2862
+ onFinish && onFinish(e);
2863
+ }
2864
+ };
2865
+
2866
+ return new ReadableStream({
2867
+ async pull(controller) {
2868
+ try {
2869
+ const {done, value} = await iterator.next();
2870
+
2871
+ if (done) {
2872
+ _onFinish();
2873
+ controller.close();
2874
+ return;
2875
+ }
2876
+
2877
+ let len = value.byteLength;
2878
+ if (onProgress) {
2879
+ let loadedBytes = bytes += len;
2880
+ onProgress(loadedBytes);
2881
+ }
2882
+ controller.enqueue(new Uint8Array(value));
2883
+ } catch (err) {
2884
+ _onFinish(err);
2885
+ throw err;
2886
+ }
2887
+ },
2888
+ cancel(reason) {
2889
+ _onFinish(reason);
2890
+ return iterator.return();
2891
+ }
2892
+ }, {
2893
+ highWaterMark: 2
2894
+ })
2895
+ };
2896
+
2897
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
2898
+
2899
+ const {isFunction} = utils$1;
2900
+
2901
+ const globalFetchAPI = (({Request, Response}) => ({
2902
+ Request, Response
2903
+ }))(utils$1.global);
2904
+
2905
+ const {
2906
+ ReadableStream: ReadableStream$1, TextEncoder
2907
+ } = utils$1.global;
2908
+
2909
+
2910
+ const test = (fn, ...args) => {
2911
+ try {
2912
+ return !!fn(...args);
2913
+ } catch (e) {
2914
+ return false
2915
+ }
2916
+ };
2917
+
2918
+ const factory = (env) => {
2919
+ env = utils$1.merge.call({
2920
+ skipUndefined: true
2921
+ }, globalFetchAPI, env);
2922
+
2923
+ const {fetch: envFetch, Request, Response} = env;
2924
+ const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
2925
+ const isRequestSupported = isFunction(Request);
2926
+ const isResponseSupported = isFunction(Response);
2927
+
2928
+ if (!isFetchSupported) {
2929
+ return false;
2930
+ }
2931
+
2932
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
2933
+
2934
+ const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
2935
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
2936
+ async (str) => new Uint8Array(await new Request(str).arrayBuffer())
2937
+ );
2938
+
2939
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
2940
+ let duplexAccessed = false;
2941
+
2942
+ const hasContentType = new Request(platform.origin, {
2943
+ body: new ReadableStream$1(),
2944
+ method: 'POST',
2945
+ get duplex() {
2946
+ duplexAccessed = true;
2947
+ return 'half';
2948
+ },
2949
+ }).headers.has('Content-Type');
2950
+
2951
+ return duplexAccessed && !hasContentType;
2952
+ });
2953
+
2954
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
2955
+ test(() => utils$1.isReadableStream(new Response('').body));
2956
+
2957
+ const resolvers = {
2958
+ stream: supportsResponseStream && ((res) => res.body)
2959
+ };
2960
+
2961
+ isFetchSupported && ((() => {
2962
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
2963
+ !resolvers[type] && (resolvers[type] = (res, config) => {
2964
+ let method = res && res[type];
2965
+
2966
+ if (method) {
2967
+ return method.call(res);
2968
+ }
2969
+
2970
+ throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
2971
+ });
2972
+ });
2973
+ })());
2974
+
2975
+ const getBodyLength = async (body) => {
2976
+ if (body == null) {
2977
+ return 0;
2978
+ }
2979
+
2980
+ if (utils$1.isBlob(body)) {
2981
+ return body.size;
2982
+ }
2983
+
2984
+ if (utils$1.isSpecCompliantForm(body)) {
2985
+ const _request = new Request(platform.origin, {
2986
+ method: 'POST',
2987
+ body,
2988
+ });
2989
+ return (await _request.arrayBuffer()).byteLength;
2990
+ }
2991
+
2992
+ if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
2993
+ return body.byteLength;
2994
+ }
2995
+
2996
+ if (utils$1.isURLSearchParams(body)) {
2997
+ body = body + '';
2998
+ }
2999
+
3000
+ if (utils$1.isString(body)) {
3001
+ return (await encodeText(body)).byteLength;
3002
+ }
3003
+ };
3004
+
3005
+ const resolveBodyLength = async (headers, body) => {
3006
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
3007
+
3008
+ return length == null ? getBodyLength(body) : length;
3009
+ };
3010
+
3011
+ return async (config) => {
3012
+ let {
3013
+ url,
3014
+ method,
3015
+ data,
3016
+ signal,
3017
+ cancelToken,
3018
+ timeout,
3019
+ onDownloadProgress,
3020
+ onUploadProgress,
3021
+ responseType,
3022
+ headers,
3023
+ withCredentials = 'same-origin',
3024
+ fetchOptions
3025
+ } = resolveConfig(config);
3026
+
3027
+ let _fetch = envFetch || fetch;
3028
+
3029
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
3030
+
3031
+ let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
3032
+
3033
+ let request = null;
3034
+
3035
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
3036
+ composedSignal.unsubscribe();
3037
+ });
3038
+
3039
+ let requestContentLength;
3040
+
3041
+ try {
3042
+ if (
3043
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
3044
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
3045
+ ) {
3046
+ let _request = new Request(url, {
3047
+ method: 'POST',
3048
+ body: data,
3049
+ duplex: "half"
3050
+ });
3051
+
3052
+ let contentTypeHeader;
3053
+
3054
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
3055
+ headers.setContentType(contentTypeHeader);
3056
+ }
3057
+
3058
+ if (_request.body) {
3059
+ const [onProgress, flush] = progressEventDecorator(
3060
+ requestContentLength,
3061
+ progressEventReducer(asyncDecorator(onUploadProgress))
3062
+ );
3063
+
3064
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
3065
+ }
3066
+ }
3067
+
3068
+ if (!utils$1.isString(withCredentials)) {
3069
+ withCredentials = withCredentials ? 'include' : 'omit';
3070
+ }
3071
+
3072
+ // Cloudflare Workers throws when credentials are defined
3073
+ // see https://github.com/cloudflare/workerd/issues/902
3074
+ const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
3075
+
3076
+ const resolvedOptions = {
3077
+ ...fetchOptions,
3078
+ signal: composedSignal,
3079
+ method: method.toUpperCase(),
3080
+ headers: headers.normalize().toJSON(),
3081
+ body: data,
3082
+ duplex: "half",
3083
+ credentials: isCredentialsSupported ? withCredentials : undefined
3084
+ };
3085
+
3086
+ request = isRequestSupported && new Request(url, resolvedOptions);
3087
+
3088
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
3089
+
3090
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
3091
+
3092
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
3093
+ const options = {};
3094
+
3095
+ ['status', 'statusText', 'headers'].forEach(prop => {
3096
+ options[prop] = response[prop];
3097
+ });
3098
+
3099
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
3100
+
3101
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
3102
+ responseContentLength,
3103
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
3104
+ ) || [];
3105
+
3106
+ response = new Response(
3107
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
3108
+ flush && flush();
3109
+ unsubscribe && unsubscribe();
3110
+ }),
3111
+ options
3112
+ );
3113
+ }
3114
+
3115
+ responseType = responseType || 'text';
3116
+
3117
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
3118
+
3119
+ !isStreamResponse && unsubscribe && unsubscribe();
3120
+
3121
+ return await new Promise((resolve, reject) => {
3122
+ settle(resolve, reject, {
3123
+ data: responseData,
3124
+ headers: AxiosHeaders$1.from(response.headers),
3125
+ status: response.status,
3126
+ statusText: response.statusText,
3127
+ config,
3128
+ request
3129
+ });
3130
+ })
3131
+ } catch (err) {
3132
+ unsubscribe && unsubscribe();
3133
+
3134
+ if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
3135
+ throw Object.assign(
3136
+ new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request, err && err.response),
3137
+ {
3138
+ cause: err.cause || err
3139
+ }
3140
+ )
3141
+ }
3142
+
3143
+ throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
3144
+ }
3145
+ }
3146
+ };
3147
+
3148
+ const seedCache = new Map();
3149
+
3150
+ const getFetch = (config) => {
3151
+ let env = (config && config.env) || {};
3152
+ const {fetch, Request, Response} = env;
3153
+ const seeds = [
3154
+ Request, Response, fetch
3155
+ ];
3156
+
3157
+ let len = seeds.length, i = len,
3158
+ seed, target, map = seedCache;
3159
+
3160
+ while (i--) {
3161
+ seed = seeds[i];
3162
+ target = map.get(seed);
3163
+
3164
+ target === undefined && map.set(seed, target = (i ? new Map() : factory(env)));
3165
+
3166
+ map = target;
3167
+ }
3168
+
3169
+ return target;
3170
+ };
3171
+
3172
+ getFetch();
3173
+
3174
+ /**
3175
+ * Known adapters mapping.
3176
+ * Provides environment-specific adapters for Axios:
3177
+ * - `http` for Node.js
3178
+ * - `xhr` for browsers
3179
+ * - `fetch` for fetch API-based requests
3180
+ *
3181
+ * @type {Object<string, Function|Object>}
3182
+ */
3183
+ const knownAdapters = {
3184
+ http: httpAdapter,
3185
+ xhr: xhrAdapter,
3186
+ fetch: {
3187
+ get: getFetch,
3188
+ }
3189
+ };
3190
+
3191
+ // Assign adapter names for easier debugging and identification
3192
+ utils$1.forEach(knownAdapters, (fn, value) => {
3193
+ if (fn) {
3194
+ try {
3195
+ Object.defineProperty(fn, 'name', { value });
3196
+ } catch (e) {
3197
+ // eslint-disable-next-line no-empty
3198
+ }
3199
+ Object.defineProperty(fn, 'adapterName', { value });
3200
+ }
3201
+ });
3202
+
3203
+ /**
3204
+ * Render a rejection reason string for unknown or unsupported adapters
3205
+ *
3206
+ * @param {string} reason
3207
+ * @returns {string}
3208
+ */
3209
+ const renderReason = (reason) => `- ${reason}`;
3210
+
3211
+ /**
3212
+ * Check if the adapter is resolved (function, null, or false)
3213
+ *
3214
+ * @param {Function|null|false} adapter
3215
+ * @returns {boolean}
3216
+ */
3217
+ const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
3218
+
3219
+ /**
3220
+ * Get the first suitable adapter from the provided list.
3221
+ * Tries each adapter in order until a supported one is found.
3222
+ * Throws an AxiosError if no adapter is suitable.
3223
+ *
3224
+ * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
3225
+ * @param {Object} config - Axios request configuration
3226
+ * @throws {AxiosError} If no suitable adapter is available
3227
+ * @returns {Function} The resolved adapter function
3228
+ */
3229
+ function getAdapter(adapters, config) {
3230
+ adapters = utils$1.isArray(adapters) ? adapters : [adapters];
3231
+
3232
+ const { length } = adapters;
3233
+ let nameOrAdapter;
3234
+ let adapter;
3235
+
3236
+ const rejectedReasons = {};
3237
+
3238
+ for (let i = 0; i < length; i++) {
3239
+ nameOrAdapter = adapters[i];
3240
+ let id;
3241
+
3242
+ adapter = nameOrAdapter;
3243
+
3244
+ if (!isResolvedHandle(nameOrAdapter)) {
3245
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
3246
+
3247
+ if (adapter === undefined) {
3248
+ throw new AxiosError$1(`Unknown adapter '${id}'`);
3249
+ }
3250
+ }
3251
+
3252
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
3253
+ break;
3254
+ }
3255
+
3256
+ rejectedReasons[id || '#' + i] = adapter;
3257
+ }
3258
+
3259
+ if (!adapter) {
3260
+ const reasons = Object.entries(rejectedReasons)
3261
+ .map(([id, state]) => `adapter ${id} ` +
3262
+ (state === false ? 'is not supported by the environment' : 'is not available in the build')
3263
+ );
3264
+
3265
+ let s = length ?
3266
+ (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
3267
+ 'as no adapter specified';
3268
+
3269
+ throw new AxiosError$1(
3270
+ `There is no suitable adapter to dispatch the request ` + s,
3271
+ 'ERR_NOT_SUPPORT'
3272
+ );
3273
+ }
3274
+
3275
+ return adapter;
3276
+ }
3277
+
3278
+ /**
3279
+ * Exports Axios adapters and utility to resolve an adapter
3280
+ */
3281
+ var adapters = {
3282
+ /**
3283
+ * Resolve an adapter from a list of adapter names or functions.
3284
+ * @type {Function}
3285
+ */
3286
+ getAdapter,
3287
+
3288
+ /**
3289
+ * Exposes all known adapters
3290
+ * @type {Object<string, Function|Object>}
3291
+ */
3292
+ adapters: knownAdapters
3293
+ };
3294
+
3295
+ /**
3296
+ * Throws a `CanceledError` if cancellation has been requested.
3297
+ *
3298
+ * @param {Object} config The config that is to be used for the request
3299
+ *
3300
+ * @returns {void}
3301
+ */
3302
+ function throwIfCancellationRequested(config) {
3303
+ if (config.cancelToken) {
3304
+ config.cancelToken.throwIfRequested();
3305
+ }
3306
+
3307
+ if (config.signal && config.signal.aborted) {
3308
+ throw new CanceledError$1(null, config);
3309
+ }
3310
+ }
3311
+
3312
+ /**
3313
+ * Dispatch a request to the server using the configured adapter.
3314
+ *
3315
+ * @param {object} config The config that is to be used for the request
3316
+ *
3317
+ * @returns {Promise} The Promise to be fulfilled
3318
+ */
3319
+ function dispatchRequest(config) {
3320
+ throwIfCancellationRequested(config);
3321
+
3322
+ config.headers = AxiosHeaders$1.from(config.headers);
3323
+
3324
+ // Transform request data
3325
+ config.data = transformData.call(
3326
+ config,
3327
+ config.transformRequest
3328
+ );
3329
+
3330
+ if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
3331
+ config.headers.setContentType('application/x-www-form-urlencoded', false);
3332
+ }
3333
+
3334
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
3335
+
3336
+ return adapter(config).then(function onAdapterResolution(response) {
3337
+ throwIfCancellationRequested(config);
3338
+
3339
+ // Transform response data
3340
+ response.data = transformData.call(
3341
+ config,
3342
+ config.transformResponse,
3343
+ response
3344
+ );
3345
+
3346
+ response.headers = AxiosHeaders$1.from(response.headers);
3347
+
3348
+ return response;
3349
+ }, function onAdapterRejection(reason) {
3350
+ if (!isCancel(reason)) {
3351
+ throwIfCancellationRequested(config);
3352
+
3353
+ // Transform response data
3354
+ if (reason && reason.response) {
3355
+ reason.response.data = transformData.call(
3356
+ config,
3357
+ config.transformResponse,
3358
+ reason.response
3359
+ );
3360
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
3361
+ }
3362
+ }
3363
+
3364
+ return Promise.reject(reason);
3365
+ });
3366
+ }
3367
+
3368
+ const VERSION = "1.13.5";
3369
+
3370
+ const validators$1 = {};
3371
+
3372
+ // eslint-disable-next-line func-names
3373
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
3374
+ validators$1[type] = function validator(thing) {
3375
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
3376
+ };
3377
+ });
3378
+
3379
+ const deprecatedWarnings = {};
3380
+
3381
+ /**
3382
+ * Transitional option validator
3383
+ *
3384
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
3385
+ * @param {string?} version - deprecated version / removed since version
3386
+ * @param {string?} message - some message with additional info
3387
+ *
3388
+ * @returns {function}
3389
+ */
3390
+ validators$1.transitional = function transitional(validator, version, message) {
3391
+ function formatMessage(opt, desc) {
3392
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
3393
+ }
3394
+
3395
+ // eslint-disable-next-line func-names
3396
+ return (value, opt, opts) => {
3397
+ if (validator === false) {
3398
+ throw new AxiosError$1(
3399
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
3400
+ AxiosError$1.ERR_DEPRECATED
3401
+ );
3402
+ }
3403
+
3404
+ if (version && !deprecatedWarnings[opt]) {
3405
+ deprecatedWarnings[opt] = true;
3406
+ // eslint-disable-next-line no-console
3407
+ console.warn(
3408
+ formatMessage(
3409
+ opt,
3410
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
3411
+ )
3412
+ );
3413
+ }
3414
+
3415
+ return validator ? validator(value, opt, opts) : true;
3416
+ };
3417
+ };
3418
+
3419
+ validators$1.spelling = function spelling(correctSpelling) {
3420
+ return (value, opt) => {
3421
+ // eslint-disable-next-line no-console
3422
+ console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
3423
+ return true;
3424
+ }
3425
+ };
3426
+
3427
+ /**
3428
+ * Assert object's properties type
3429
+ *
3430
+ * @param {object} options
3431
+ * @param {object} schema
3432
+ * @param {boolean?} allowUnknown
3433
+ *
3434
+ * @returns {object}
3435
+ */
3436
+
3437
+ function assertOptions(options, schema, allowUnknown) {
3438
+ if (typeof options !== 'object') {
3439
+ throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
3440
+ }
3441
+ const keys = Object.keys(options);
3442
+ let i = keys.length;
3443
+ while (i-- > 0) {
3444
+ const opt = keys[i];
3445
+ const validator = schema[opt];
3446
+ if (validator) {
3447
+ const value = options[opt];
3448
+ const result = value === undefined || validator(value, opt, options);
3449
+ if (result !== true) {
3450
+ throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
3451
+ }
3452
+ continue;
3453
+ }
3454
+ if (allowUnknown !== true) {
3455
+ throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
3456
+ }
3457
+ }
3458
+ }
3459
+
3460
+ var validator = {
3461
+ assertOptions,
3462
+ validators: validators$1
3463
+ };
3464
+
3465
+ const validators = validator.validators;
3466
+
3467
+ /**
3468
+ * Create a new instance of Axios
3469
+ *
3470
+ * @param {Object} instanceConfig The default config for the instance
3471
+ *
3472
+ * @return {Axios} A new instance of Axios
3473
+ */
3474
+ class Axios {
3475
+ constructor(instanceConfig) {
3476
+ this.defaults = instanceConfig || {};
3477
+ this.interceptors = {
3478
+ request: new InterceptorManager$1(),
3479
+ response: new InterceptorManager$1()
3480
+ };
3481
+ }
3482
+
3483
+ /**
3484
+ * Dispatch a request
3485
+ *
3486
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
3487
+ * @param {?Object} config
3488
+ *
3489
+ * @returns {Promise} The Promise to be fulfilled
3490
+ */
3491
+ async request(configOrUrl, config) {
3492
+ try {
3493
+ return await this._request(configOrUrl, config);
3494
+ } catch (err) {
3495
+ if (err instanceof Error) {
3496
+ let dummy = {};
3497
+
3498
+ Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
3499
+
3500
+ // slice off the Error: ... line
3501
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
3502
+ try {
3503
+ if (!err.stack) {
3504
+ err.stack = stack;
3505
+ // match without the 2 top stack lines
3506
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
3507
+ err.stack += '\n' + stack;
3508
+ }
3509
+ } catch (e) {
3510
+ // ignore the case where "stack" is an un-writable property
3511
+ }
3512
+ }
3513
+
3514
+ throw err;
3515
+ }
3516
+ }
3517
+
3518
+ _request(configOrUrl, config) {
3519
+ /*eslint no-param-reassign:0*/
3520
+ // Allow for axios('example/url'[, config]) a la fetch API
3521
+ if (typeof configOrUrl === 'string') {
3522
+ config = config || {};
3523
+ config.url = configOrUrl;
3524
+ } else {
3525
+ config = configOrUrl || {};
3526
+ }
3527
+
3528
+ config = mergeConfig(this.defaults, config);
3529
+
3530
+ const {transitional, paramsSerializer, headers} = config;
3531
+
3532
+ if (transitional !== undefined) {
3533
+ validator.assertOptions(transitional, {
3534
+ silentJSONParsing: validators.transitional(validators.boolean),
3535
+ forcedJSONParsing: validators.transitional(validators.boolean),
3536
+ clarifyTimeoutError: validators.transitional(validators.boolean),
3537
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
3538
+ }, false);
3539
+ }
3540
+
3541
+ if (paramsSerializer != null) {
3542
+ if (utils$1.isFunction(paramsSerializer)) {
3543
+ config.paramsSerializer = {
3544
+ serialize: paramsSerializer
3545
+ };
3546
+ } else {
3547
+ validator.assertOptions(paramsSerializer, {
3548
+ encode: validators.function,
3549
+ serialize: validators.function
3550
+ }, true);
3551
+ }
3552
+ }
3553
+
3554
+ // Set config.allowAbsoluteUrls
3555
+ if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
3556
+ config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
3557
+ } else {
3558
+ config.allowAbsoluteUrls = true;
3559
+ }
3560
+
3561
+ validator.assertOptions(config, {
3562
+ baseUrl: validators.spelling('baseURL'),
3563
+ withXsrfToken: validators.spelling('withXSRFToken')
3564
+ }, true);
3565
+
3566
+ // Set config.method
3567
+ config.method = (config.method || this.defaults.method || 'get').toLowerCase();
3568
+
3569
+ // Flatten headers
3570
+ let contextHeaders = headers && utils$1.merge(
3571
+ headers.common,
3572
+ headers[config.method]
3573
+ );
3574
+
3575
+ headers && utils$1.forEach(
3576
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
3577
+ (method) => {
3578
+ delete headers[method];
3579
+ }
3580
+ );
3581
+
3582
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
3583
+
3584
+ // filter out skipped interceptors
3585
+ const requestInterceptorChain = [];
3586
+ let synchronousRequestInterceptors = true;
3587
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
3588
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
3589
+ return;
3590
+ }
3591
+
3592
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
3593
+
3594
+ const transitional = config.transitional || transitionalDefaults;
3595
+ const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
3596
+
3597
+ if (legacyInterceptorReqResOrdering) {
3598
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
3599
+ } else {
3600
+ requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
3601
+ }
3602
+ });
3603
+
3604
+ const responseInterceptorChain = [];
3605
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
3606
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
3607
+ });
3608
+
3609
+ let promise;
3610
+ let i = 0;
3611
+ let len;
3612
+
3613
+ if (!synchronousRequestInterceptors) {
3614
+ const chain = [dispatchRequest.bind(this), undefined];
3615
+ chain.unshift(...requestInterceptorChain);
3616
+ chain.push(...responseInterceptorChain);
3617
+ len = chain.length;
3618
+
3619
+ promise = Promise.resolve(config);
3620
+
3621
+ while (i < len) {
3622
+ promise = promise.then(chain[i++], chain[i++]);
3623
+ }
3624
+
3625
+ return promise;
3626
+ }
3627
+
3628
+ len = requestInterceptorChain.length;
3629
+
3630
+ let newConfig = config;
3631
+
3632
+ while (i < len) {
3633
+ const onFulfilled = requestInterceptorChain[i++];
3634
+ const onRejected = requestInterceptorChain[i++];
3635
+ try {
3636
+ newConfig = onFulfilled(newConfig);
3637
+ } catch (error) {
3638
+ onRejected.call(this, error);
3639
+ break;
3640
+ }
3641
+ }
3642
+
3643
+ try {
3644
+ promise = dispatchRequest.call(this, newConfig);
3645
+ } catch (error) {
3646
+ return Promise.reject(error);
3647
+ }
3648
+
3649
+ i = 0;
3650
+ len = responseInterceptorChain.length;
3651
+
3652
+ while (i < len) {
3653
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
3654
+ }
3655
+
3656
+ return promise;
3657
+ }
3658
+
3659
+ getUri(config) {
3660
+ config = mergeConfig(this.defaults, config);
3661
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
3662
+ return buildURL(fullPath, config.params, config.paramsSerializer);
3663
+ }
3664
+ }
3665
+
3666
+ // Provide aliases for supported request methods
3667
+ utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3668
+ /*eslint func-names:0*/
3669
+ Axios.prototype[method] = function(url, config) {
3670
+ return this.request(mergeConfig(config || {}, {
3671
+ method,
3672
+ url,
3673
+ data: (config || {}).data
3674
+ }));
3675
+ };
3676
+ });
3677
+
3678
+ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3679
+ /*eslint func-names:0*/
3680
+
3681
+ function generateHTTPMethod(isForm) {
3682
+ return function httpMethod(url, data, config) {
3683
+ return this.request(mergeConfig(config || {}, {
3684
+ method,
3685
+ headers: isForm ? {
3686
+ 'Content-Type': 'multipart/form-data'
3687
+ } : {},
3688
+ url,
3689
+ data
3690
+ }));
3691
+ };
3692
+ }
3693
+
3694
+ Axios.prototype[method] = generateHTTPMethod();
3695
+
3696
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
3697
+ });
3698
+
3699
+ var Axios$1 = Axios;
3700
+
3701
+ /**
3702
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
3703
+ *
3704
+ * @param {Function} executor The executor function.
3705
+ *
3706
+ * @returns {CancelToken}
3707
+ */
3708
+ class CancelToken {
3709
+ constructor(executor) {
3710
+ if (typeof executor !== 'function') {
3711
+ throw new TypeError('executor must be a function.');
3712
+ }
3713
+
3714
+ let resolvePromise;
3715
+
3716
+ this.promise = new Promise(function promiseExecutor(resolve) {
3717
+ resolvePromise = resolve;
3718
+ });
3719
+
3720
+ const token = this;
3721
+
3722
+ // eslint-disable-next-line func-names
3723
+ this.promise.then(cancel => {
3724
+ if (!token._listeners) return;
3725
+
3726
+ let i = token._listeners.length;
3727
+
3728
+ while (i-- > 0) {
3729
+ token._listeners[i](cancel);
3730
+ }
3731
+ token._listeners = null;
3732
+ });
3733
+
3734
+ // eslint-disable-next-line func-names
3735
+ this.promise.then = onfulfilled => {
3736
+ let _resolve;
3737
+ // eslint-disable-next-line func-names
3738
+ const promise = new Promise(resolve => {
3739
+ token.subscribe(resolve);
3740
+ _resolve = resolve;
3741
+ }).then(onfulfilled);
3742
+
3743
+ promise.cancel = function reject() {
3744
+ token.unsubscribe(_resolve);
3745
+ };
3746
+
3747
+ return promise;
3748
+ };
3749
+
3750
+ executor(function cancel(message, config, request) {
3751
+ if (token.reason) {
3752
+ // Cancellation has already been requested
3753
+ return;
3754
+ }
3755
+
3756
+ token.reason = new CanceledError$1(message, config, request);
3757
+ resolvePromise(token.reason);
3758
+ });
3759
+ }
3760
+
3761
+ /**
3762
+ * Throws a `CanceledError` if cancellation has been requested.
3763
+ */
3764
+ throwIfRequested() {
3765
+ if (this.reason) {
3766
+ throw this.reason;
3767
+ }
3768
+ }
3769
+
3770
+ /**
3771
+ * Subscribe to the cancel signal
3772
+ */
3773
+
3774
+ subscribe(listener) {
3775
+ if (this.reason) {
3776
+ listener(this.reason);
3777
+ return;
3778
+ }
3779
+
3780
+ if (this._listeners) {
3781
+ this._listeners.push(listener);
3782
+ } else {
3783
+ this._listeners = [listener];
3784
+ }
3785
+ }
3786
+
3787
+ /**
3788
+ * Unsubscribe from the cancel signal
3789
+ */
3790
+
3791
+ unsubscribe(listener) {
3792
+ if (!this._listeners) {
3793
+ return;
3794
+ }
3795
+ const index = this._listeners.indexOf(listener);
3796
+ if (index !== -1) {
3797
+ this._listeners.splice(index, 1);
3798
+ }
3799
+ }
3800
+
3801
+ toAbortSignal() {
3802
+ const controller = new AbortController();
3803
+
3804
+ const abort = (err) => {
3805
+ controller.abort(err);
3806
+ };
3807
+
3808
+ this.subscribe(abort);
3809
+
3810
+ controller.signal.unsubscribe = () => this.unsubscribe(abort);
3811
+
3812
+ return controller.signal;
3813
+ }
3814
+
3815
+ /**
3816
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
3817
+ * cancels the `CancelToken`.
3818
+ */
3819
+ static source() {
3820
+ let cancel;
3821
+ const token = new CancelToken(function executor(c) {
3822
+ cancel = c;
3823
+ });
3824
+ return {
3825
+ token,
3826
+ cancel
3827
+ };
3828
+ }
3829
+ }
3830
+
3831
+ var CancelToken$1 = CancelToken;
3832
+
3833
+ /**
3834
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
3835
+ *
3836
+ * Common use case would be to use `Function.prototype.apply`.
3837
+ *
3838
+ * ```js
3839
+ * function f(x, y, z) {}
3840
+ * const args = [1, 2, 3];
3841
+ * f.apply(null, args);
3842
+ * ```
3843
+ *
3844
+ * With `spread` this example can be re-written.
3845
+ *
3846
+ * ```js
3847
+ * spread(function(x, y, z) {})([1, 2, 3]);
3848
+ * ```
3849
+ *
3850
+ * @param {Function} callback
3851
+ *
3852
+ * @returns {Function}
3853
+ */
3854
+ function spread(callback) {
3855
+ return function wrap(arr) {
3856
+ return callback.apply(null, arr);
3857
+ };
3858
+ }
3859
+
3860
+ /**
3861
+ * Determines whether the payload is an error thrown by Axios
3862
+ *
3863
+ * @param {*} payload The value to test
3864
+ *
3865
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
3866
+ */
3867
+ function isAxiosError(payload) {
3868
+ return utils$1.isObject(payload) && (payload.isAxiosError === true);
3869
+ }
3870
+
3871
+ const HttpStatusCode = {
3872
+ Continue: 100,
3873
+ SwitchingProtocols: 101,
3874
+ Processing: 102,
3875
+ EarlyHints: 103,
3876
+ Ok: 200,
3877
+ Created: 201,
3878
+ Accepted: 202,
3879
+ NonAuthoritativeInformation: 203,
3880
+ NoContent: 204,
3881
+ ResetContent: 205,
3882
+ PartialContent: 206,
3883
+ MultiStatus: 207,
3884
+ AlreadyReported: 208,
3885
+ ImUsed: 226,
3886
+ MultipleChoices: 300,
3887
+ MovedPermanently: 301,
3888
+ Found: 302,
3889
+ SeeOther: 303,
3890
+ NotModified: 304,
3891
+ UseProxy: 305,
3892
+ Unused: 306,
3893
+ TemporaryRedirect: 307,
3894
+ PermanentRedirect: 308,
3895
+ BadRequest: 400,
3896
+ Unauthorized: 401,
3897
+ PaymentRequired: 402,
3898
+ Forbidden: 403,
3899
+ NotFound: 404,
3900
+ MethodNotAllowed: 405,
3901
+ NotAcceptable: 406,
3902
+ ProxyAuthenticationRequired: 407,
3903
+ RequestTimeout: 408,
3904
+ Conflict: 409,
3905
+ Gone: 410,
3906
+ LengthRequired: 411,
3907
+ PreconditionFailed: 412,
3908
+ PayloadTooLarge: 413,
3909
+ UriTooLong: 414,
3910
+ UnsupportedMediaType: 415,
3911
+ RangeNotSatisfiable: 416,
3912
+ ExpectationFailed: 417,
3913
+ ImATeapot: 418,
3914
+ MisdirectedRequest: 421,
3915
+ UnprocessableEntity: 422,
3916
+ Locked: 423,
3917
+ FailedDependency: 424,
3918
+ TooEarly: 425,
3919
+ UpgradeRequired: 426,
3920
+ PreconditionRequired: 428,
3921
+ TooManyRequests: 429,
3922
+ RequestHeaderFieldsTooLarge: 431,
3923
+ UnavailableForLegalReasons: 451,
3924
+ InternalServerError: 500,
3925
+ NotImplemented: 501,
3926
+ BadGateway: 502,
3927
+ ServiceUnavailable: 503,
3928
+ GatewayTimeout: 504,
3929
+ HttpVersionNotSupported: 505,
3930
+ VariantAlsoNegotiates: 506,
3931
+ InsufficientStorage: 507,
3932
+ LoopDetected: 508,
3933
+ NotExtended: 510,
3934
+ NetworkAuthenticationRequired: 511,
3935
+ WebServerIsDown: 521,
3936
+ ConnectionTimedOut: 522,
3937
+ OriginIsUnreachable: 523,
3938
+ TimeoutOccurred: 524,
3939
+ SslHandshakeFailed: 525,
3940
+ InvalidSslCertificate: 526,
3941
+ };
3942
+
3943
+ Object.entries(HttpStatusCode).forEach(([key, value]) => {
3944
+ HttpStatusCode[value] = key;
3945
+ });
3946
+
3947
+ var HttpStatusCode$1 = HttpStatusCode;
3948
+
3949
+ /**
3950
+ * Create an instance of Axios
3951
+ *
3952
+ * @param {Object} defaultConfig The default config for the instance
3953
+ *
3954
+ * @returns {Axios} A new instance of Axios
3955
+ */
3956
+ function createInstance(defaultConfig) {
3957
+ const context = new Axios$1(defaultConfig);
3958
+ const instance = bind(Axios$1.prototype.request, context);
3959
+
3960
+ // Copy axios.prototype to instance
3961
+ utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
3962
+
3963
+ // Copy context to instance
3964
+ utils$1.extend(instance, context, null, {allOwnKeys: true});
3965
+
3966
+ // Factory for creating new instances
3967
+ instance.create = function create(instanceConfig) {
3968
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
3969
+ };
3970
+
3971
+ return instance;
3972
+ }
3973
+
3974
+ // Create the default instance to be exported
3975
+ const axios = createInstance(defaults$1);
3976
+
3977
+ // Expose Axios class to allow class inheritance
3978
+ axios.Axios = Axios$1;
3979
+
3980
+ // Expose Cancel & CancelToken
3981
+ axios.CanceledError = CanceledError$1;
3982
+ axios.CancelToken = CancelToken$1;
3983
+ axios.isCancel = isCancel;
3984
+ axios.VERSION = VERSION;
3985
+ axios.toFormData = toFormData;
3986
+
3987
+ // Expose AxiosError class
3988
+ axios.AxiosError = AxiosError$1;
3989
+
3990
+ // alias for CanceledError for backward compatibility
3991
+ axios.Cancel = axios.CanceledError;
3992
+
3993
+ // Expose all/spread
3994
+ axios.all = function all(promises) {
3995
+ return Promise.all(promises);
3996
+ };
3997
+
3998
+ axios.spread = spread;
3999
+
4000
+ // Expose isAxiosError
4001
+ axios.isAxiosError = isAxiosError;
4002
+
4003
+ // Expose mergeConfig
4004
+ axios.mergeConfig = mergeConfig;
4005
+
4006
+ axios.AxiosHeaders = AxiosHeaders$1;
4007
+
4008
+ axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
4009
+
4010
+ axios.getAdapter = adapters.getAdapter;
4011
+
4012
+ axios.HttpStatusCode = HttpStatusCode$1;
4013
+
4014
+ axios.default = axios;
4015
+
4016
+ axios_1 = axios;
4017
+
4018
+ return axios_1;
4019
+ }
4020
+
4021
+ var axiosExports = /*@__PURE__*/ requireAxios();
4022
+ var axios = /*@__PURE__*/getDefaultExportFromCjs(axiosExports);
4023
+
4024
+ // import axios from 'axios';
4025
+ // const API_BASE_URL = 'http://localhost:4000';
4026
+ // export interface FetchDesignSystemResponse {
4027
+ // variables: Record<string, any>;
4028
+ // components: Record<string, any>;
4029
+ // metadata?: {
4030
+ // name?: string;
4031
+ // version?: string;
4032
+ // lastUpdated?: string;
4033
+ // };
4034
+ // }
4035
+ // export class DesignSystemApiClient {
4036
+ // async fetchVariables(): Promise<Record<string, any>> {
4037
+ // try {
4038
+ // const response = await axios.get(`${API_BASE_URL}/variables`);
4039
+ // return response.data;
4040
+ // } catch (error) {
4041
+ // console.error('Error fetching variables:', error);
4042
+ // return {};
4043
+ // }
4044
+ // }
4045
+ // async fetchComponents(): Promise<Record<string, any>> {
4046
+ // try {
4047
+ // const response = await axios.get(`${API_BASE_URL}/components`);
4048
+ // return response.data;
4049
+ // } catch (error) {
4050
+ // console.error('Error fetching components:', error);
4051
+ // return {};
4052
+ // }
4053
+ // }
4054
+ // async fetchDesignSystem(): Promise<FetchDesignSystemResponse> {
4055
+ // const [variables, components] = await Promise.all([
4056
+ // this.fetchVariables(),
4057
+ // this.fetchComponents()
4058
+ // ]);
4059
+ // return {
4060
+ // variables,
4061
+ // components,
4062
+ // metadata: {
4063
+ // name: 'Charisol Design System',
4064
+ // lastUpdated: new Date().toISOString()
4065
+ // }
4066
+ // };
4067
+ // }
4068
+ // }
4069
+ //// new from dataaaaa
4070
+ const API_BASE_URL = 'http://localhost:4000';
4071
+ class DesignSystemApiClient {
4072
+ async fetchVariables() {
4073
+ try {
4074
+ const response = await axios.get(`${API_BASE_URL}/variables`);
4075
+ return response.data;
4076
+ }
4077
+ catch (error) {
4078
+ console.error('Error fetching variables:', error);
4079
+ return {};
4080
+ }
4081
+ }
4082
+ async fetchComponents() {
4083
+ try {
4084
+ const response = await axios.get(`${API_BASE_URL}/components`);
4085
+ return response.data;
4086
+ }
4087
+ catch (error) {
4088
+ console.error('Error fetching components:', error);
4089
+ return {};
4090
+ }
4091
+ }
4092
+ async fetchDesignSystem() {
4093
+ const [variables, components] = await Promise.all([
4094
+ this.fetchVariables(),
4095
+ this.fetchComponents()
4096
+ ]);
4097
+ return {
4098
+ variables,
4099
+ components,
4100
+ metadata: {
4101
+ name: 'Charisol Design System',
4102
+ lastUpdated: new Date().toISOString()
4103
+ }
4104
+ };
4105
+ }
4106
+ }
4107
+
4108
+ class ComponentGeneratorUtils {
4109
+ static toKebabCase(str) {
4110
+ return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
4111
+ }
4112
+ static isSVGContent(content) {
4113
+ if (!content)
4114
+ return false;
4115
+ return content.includes('<svg') && content.includes('</svg>');
4116
+ }
4117
+ static toCamelCase(str) {
4118
+ return str.replace(/-([a-z])/g, (g) => g[1].toUpperCase());
4119
+ }
4120
+ static toPascalCase(str) {
4121
+ return str
4122
+ .replace(/(?:^\w|[A-Z]|\b\w)/g, (word) => word.toUpperCase())
4123
+ .replace(/[-_]/g, '');
4124
+ }
4125
+ static resolveTokenValue(value, variables) {
4126
+ if (!value)
4127
+ return '';
4128
+ if (value.startsWith('var(--')) {
4129
+ return value;
4130
+ }
4131
+ if (value.startsWith('--') && variables && variables[value]) {
4132
+ return `var(${value})`;
4133
+ }
4134
+ return value;
4135
+ }
4136
+ static extractPropsFromProperties(properties = {}) {
4137
+ return Object.keys(properties).map(key => this.toCamelCase(key));
4138
+ }
4139
+ }
4140
+
4141
+ class StencilComponentGenerator {
4142
+ apiClient;
4143
+ outputDir;
4144
+ stylesDir;
4145
+ componentPrefix = 'chardes';
4146
+ variables = {};
4147
+ // tagName -> className for the index
4148
+ generatedComponents = new Map();
4149
+ constructor() {
4150
+ this.apiClient = new DesignSystemApiClient();
4151
+ this.outputDir = path__namespace.join(process.cwd(), 'src', 'components', 'generated');
4152
+ this.stylesDir = path__namespace.join(process.cwd(), 'src', 'styles');
4153
+ }
4154
+ async generateAllComponents() {
4155
+ try {
4156
+ console.log('Fetching design system data...');
4157
+ const designSystem = await this.apiClient.fetchDesignSystem();
4158
+ this.variables = designSystem.variables;
4159
+ console.log('Generating design tokens CSS...');
4160
+ await this.generateDesignTokensCSS(designSystem.variables);
4161
+ console.log('Generating utility classes CSS...');
4162
+ await this.generateUtilityClassesCSS(designSystem.components, designSystem.variables);
4163
+ console.log('Generating Stencil components...');
4164
+ await this.generateComponents(designSystem.components, designSystem.variables);
4165
+ console.log('Updating component index...');
4166
+ await this.updateComponentIndex();
4167
+ console.log('All components generated successfully!');
4168
+ }
4169
+ catch (error) {
4170
+ console.error('Error generating components:', error);
4171
+ process.exit(1);
4172
+ }
4173
+ }
4174
+ // ─── Design Tokens CSS ──────────────────────────────────────────────────────
4175
+ async generateDesignTokensCSS(variables) {
4176
+ const cssLines = [':root {'];
4177
+ for (const [varName, token] of Object.entries(variables)) {
4178
+ const value = this.resolveTokenValue(token.value, variables);
4179
+ const comment = token.comment ? `\n /* ${token.comment} */` : '';
4180
+ cssLines.push(`${comment}\n ${varName}: ${value};`);
4181
+ }
4182
+ cssLines.push('}');
4183
+ if (!fs__namespace.existsSync(this.stylesDir)) {
4184
+ fs__namespace.mkdirSync(this.stylesDir, { recursive: true });
4185
+ }
4186
+ fs__namespace.writeFileSync(path__namespace.join(this.stylesDir, 'design-tokens.css'), cssLines.join('\n'));
4187
+ }
4188
+ resolveTokenValue(value, variables) {
4189
+ if (!value)
4190
+ return '';
4191
+ const varMatch = value.match(/var\(--([^)]+)\)/);
4192
+ if (varMatch) {
4193
+ const tokenName = `--${varMatch[1]}`;
4194
+ const token = variables[tokenName];
4195
+ if (token)
4196
+ return this.resolveTokenValue(token.value, variables);
4197
+ return value;
4198
+ }
4199
+ if (value.startsWith('--')) {
4200
+ const token = variables[value];
4201
+ if (token)
4202
+ return this.resolveTokenValue(token.value, variables);
4203
+ }
4204
+ const token = Object.values(variables).find(t => t.value === value);
4205
+ if (token?.unit && token.type === 'dimension' && !value.includes(token.unit)) {
4206
+ return `${value}${token.unit}`;
4207
+ }
4208
+ return value;
4209
+ }
4210
+ // ─── Utility Classes CSS ────────────────────────────────────────────────────
4211
+ async generateUtilityClassesCSS(components, variables) {
4212
+ const allUtilityClasses = this.extractAllUtilityClassesFromComponents(components);
4213
+ const cssLines = [
4214
+ '/* Auto-generated Utility Classes from Design System */',
4215
+ '/* DO NOT EDIT - Generated from your design system API */',
4216
+ '',
4217
+ ':host, :root {',
4218
+ ' display: block;',
4219
+ ' box-sizing: border-box;',
4220
+ '}',
4221
+ '',
4222
+ '*, *::before, *::after {',
4223
+ ' box-sizing: inherit;',
4224
+ '}',
4225
+ ''
4226
+ ];
4227
+ const escapeClassName = (className) => {
4228
+ if (!className)
4229
+ return className;
4230
+ let escaped = className.replace(/\//g, '\\/');
4231
+ escaped = escaped.replace(/[!#$%&()*+,.<=>?@[\]^`{|}~]/g, (match) => {
4232
+ if (match === '-' || match === '_')
4233
+ return match;
4234
+ return '\\' + match;
4235
+ });
4236
+ return escaped;
4237
+ };
4238
+ const getTokenValue = (tokenName, defaultValue) => {
4239
+ const token = variables[tokenName];
4240
+ if (!token)
4241
+ return defaultValue;
4242
+ let value = token.value;
4243
+ if (value.startsWith('--'))
4244
+ return `var(${value})`;
4245
+ if (token.unit && token.type === 'dimension' && !value.includes(token.unit))
4246
+ value = `${value}${token.unit}`;
4247
+ return `var(${tokenName}, ${value})`;
4248
+ };
4249
+ allUtilityClasses.forEach(className => {
4250
+ if (!className || className.includes(':'))
4251
+ return;
4252
+ const cssProperties = this.getUtilityClassProperties(className, variables, getTokenValue);
4253
+ if (cssProperties.length > 0) {
4254
+ const escapedClassName = escapeClassName(className);
4255
+ cssLines.push(`.${escapedClassName} {`);
4256
+ cssProperties.forEach(prop => cssLines.push(` ${prop};`));
4257
+ cssLines.push('}');
4258
+ cssLines.push('');
4259
+ }
4260
+ });
4261
+ const stateClasses = this.extractStateClassesFromComponents(components);
4262
+ stateClasses.forEach(stateClass => {
4263
+ const [state, baseClass] = stateClass.split(':');
4264
+ const cssProperties = this.getUtilityClassProperties(baseClass, variables, getTokenValue);
4265
+ if (cssProperties.length > 0) {
4266
+ const escapedBaseClass = escapeClassName(baseClass);
4267
+ cssLines.push(`.${escapedBaseClass}:${state} {`);
4268
+ cssProperties.forEach(prop => cssLines.push(` ${prop};`));
4269
+ cssLines.push('}');
4270
+ cssLines.push('');
4271
+ }
4272
+ });
4273
+ fs__namespace.writeFileSync(path__namespace.join(this.stylesDir, 'utilities.css'), cssLines.join('\n'));
4274
+ }
4275
+ extractAllUtilityClassesFromComponents(components) {
4276
+ const classes = new Set();
4277
+ const walk = (node) => {
4278
+ if (node.linkedElement?.attributes?.class) {
4279
+ this.resolveClassReferences(node.linkedElement.attributes.class)
4280
+ .split(' ')
4281
+ .forEach(cls => {
4282
+ if (cls && !cls.includes(':'))
4283
+ classes.add(cls);
4284
+ });
4285
+ }
4286
+ if (node.children)
4287
+ Object.values(node.children).forEach(child => walk(child));
4288
+ };
4289
+ Object.values(components).forEach(component => walk(component));
4290
+ return classes;
4291
+ }
4292
+ extractStateClassesFromComponents(components) {
4293
+ const stateClasses = new Set();
4294
+ const walk = (node) => {
4295
+ if (node.linkedElement?.attributes?.class) {
4296
+ this.resolveClassReferences(node.linkedElement.attributes.class)
4297
+ .split(' ')
4298
+ .forEach(cls => {
4299
+ if (cls.includes(':'))
4300
+ stateClasses.add(cls);
4301
+ });
4302
+ }
4303
+ if (node.children)
4304
+ Object.values(node.children).forEach(child => walk(child));
4305
+ };
4306
+ Object.values(components).forEach(component => walk(component));
4307
+ return stateClasses;
4308
+ }
4309
+ resolveClassReferences(classString) {
4310
+ if (!classString)
4311
+ return '';
4312
+ const parts = classString.split(' ').filter(p => p.trim());
4313
+ const resolvedParts = parts.map(part => {
4314
+ const varMatch = part.match(/var\(--([^)]+)\)/);
4315
+ if (varMatch) {
4316
+ const tokenName = `--${varMatch[1]}`;
4317
+ const token = this.variables[tokenName];
4318
+ if (token) {
4319
+ if (token.value.startsWith('var(--') || token.value.startsWith('--'))
4320
+ return this.resolveClassReferences(token.value);
4321
+ return token.value;
4322
+ }
4323
+ return varMatch[1].replace(/^--/, '');
4324
+ }
4325
+ if (part.startsWith('--')) {
4326
+ const token = this.variables[part];
4327
+ if (token) {
4328
+ if (token.value.startsWith('var(--') || token.value.startsWith('--'))
4329
+ return this.resolveClassReferences(token.value);
4330
+ return token.value;
4331
+ }
4332
+ return part.replace(/^--/, '');
4333
+ }
4334
+ return part;
4335
+ });
4336
+ return resolvedParts.filter(p => p && p.trim()).join(' ');
4337
+ }
4338
+ getUtilityClassProperties(className, variables, getTokenValue) {
4339
+ const utilityMap = {
4340
+ 'flex': () => ['display: flex'],
4341
+ 'flex-1': () => ['flex: 1 1 0%'],
4342
+ 'flex-shrink-0': () => ['flex-shrink: 0'],
4343
+ 'flex-col': () => ['flex-direction: column'],
4344
+ 'items-center': () => ['align-items: center'],
4345
+ 'items-start': () => ['align-items: flex-start'],
4346
+ 'justify-between': () => ['justify-content: space-between'],
4347
+ 'justify-center': () => ['justify-content: center'],
4348
+ 'w-full': () => [`width: ${getTokenValue('--width', '100%')}`],
4349
+ 'h-full': () => [`height: ${getTokenValue('--height', '100%')}`],
4350
+ 'max-w-md': () => [`max-width: ${getTokenValue('--max-width', '300rem')}`],
4351
+ 'mx-auto': () => ['margin-left: auto', 'margin-right: auto'],
4352
+ 'overflow-hidden': () => ['overflow: hidden'],
4353
+ 'object-cover': () => ['object-fit: cover'],
4354
+ 'relative': () => ['position: relative'],
4355
+ 'absolute': () => ['position: absolute'],
4356
+ 'fixed': () => ['position: fixed'],
4357
+ 'inset-0': () => ['top: 0', 'right: 0', 'bottom: 0', 'left: 0'],
4358
+ 'top-0': () => ['top: 0'],
4359
+ 'left-0': () => ['left: 0'],
4360
+ 'top-1/2': () => ['top: 50%'],
4361
+ 'left-1/2': () => ['left: 50%'],
4362
+ '-translate-x-1/2': () => ['transform: translateX(-50%)'],
4363
+ '-translate-y-1/2': () => ['transform: translateY(-50%)'],
4364
+ 'grid': () => ['display: grid'],
4365
+ 'grid-cols-2': () => ['grid-template-columns: repeat(2, minmax(0, 1fr))'],
4366
+ 'p-1': () => [`padding: ${getTokenValue('--spacing-1', '0.25rem')}`],
4367
+ 'p-2': () => [`padding: ${getTokenValue('--spacing-2', '0.5rem')}`],
4368
+ 'p-4': () => [`padding: ${getTokenValue('--spacing-4', '1rem')}`],
4369
+ 'p-6': () => [`padding: ${getTokenValue('--spacing-6', '2.5rem')}`],
4370
+ 'px-2': () => [`padding-left: ${getTokenValue('--spacing-2', '0.5rem')}`, `padding-right: ${getTokenValue('--spacing-2', '0.5rem')}`],
4371
+ 'px-3': () => [`padding-left: ${getTokenValue('--spacing-3', '0.75rem')}`, `padding-right: ${getTokenValue('--spacing-3', '0.75rem')}`],
4372
+ 'px-4': () => [`padding-left: ${getTokenValue('--spacing-4', '1rem')}`, `padding-right: ${getTokenValue('--spacing-4', '1rem')}`],
4373
+ 'px-6': () => [`padding-left: ${getTokenValue('--spacing-6', '2.5rem')}`, `padding-right: ${getTokenValue('--spacing-6', '2.5rem')}`],
4374
+ 'py-1': () => [`padding-top: ${getTokenValue('--spacing-1', '0.25rem')}`, `padding-bottom: ${getTokenValue('--spacing-1', '0.25rem')}`],
4375
+ 'py-2': () => [`padding-top: ${getTokenValue('--spacing-2', '0.5rem')}`, `padding-bottom: ${getTokenValue('--spacing-2', '0.5rem')}`],
4376
+ 'py-3': () => [`padding-top: ${getTokenValue('--spacing-3', '0.75rem')}`, `padding-bottom: ${getTokenValue('--spacing-3', '0.75rem')}`],
4377
+ 'py-4': () => [`padding-top: ${getTokenValue('--spacing-4', '1rem')}`, `padding-bottom: ${getTokenValue('--spacing-4', '1rem')}`],
4378
+ 'py-6': () => [`padding-top: ${getTokenValue('--spacing-6', '2.5rem')}`, `padding-bottom: ${getTokenValue('--spacing-6', '2.5rem')}`],
4379
+ 'pb-6': () => [`padding-bottom: ${getTokenValue('--spacing-6', '2.5rem')}`],
4380
+ 'mt-1': () => [`margin-top: ${getTokenValue('--spacing-1', '0.25rem')}`],
4381
+ 'mt-6': () => [`margin-top: ${getTokenValue('--spacing-6', '2.5rem')}`],
4382
+ 'mb-1': () => [`margin-bottom: ${getTokenValue('--spacing-1', '0.25rem')}`],
4383
+ 'mb-2': () => [`margin-bottom: ${getTokenValue('--spacing-2', '0.5rem')}`],
4384
+ 'mb-3': () => [`margin-bottom: ${getTokenValue('--spacing-3', '0.75rem')}`],
4385
+ 'ml-3': () => [`margin-left: ${getTokenValue('--spacing-3', '0.75rem')}`],
4386
+ 'pl-12': () => ['padding-left: 3rem'],
4387
+ 'space-x-2': () => [`> * + * { margin-left: ${getTokenValue('--spacing-2', '0.5rem')}; }`],
4388
+ 'space-x-3': () => [`> * + * { margin-left: ${getTokenValue('--spacing-3', '0.75rem')}; }`],
4389
+ 'space-x-4': () => [`> * + * { margin-left: ${getTokenValue('--spacing-4', '1rem')}; }`],
4390
+ 'space-y-2': () => [`> * + * { margin-top: ${getTokenValue('--spacing-2', '0.5rem')}; }`],
4391
+ 'space-y-4': () => [`> * + * { margin-top: ${getTokenValue('--spacing-4', '1rem')}; }`],
4392
+ 'space-y-6': () => [`> * + * { margin-top: ${getTokenValue('--spacing-6', '2.5rem')}; }`],
4393
+ 'w-3': () => ['width: 0.75rem'],
4394
+ 'h-3': () => ['height: 0.75rem'],
4395
+ 'w-4': () => ['width: 1rem'],
4396
+ 'h-4': () => ['height: 1rem'],
4397
+ 'w-5': () => ['width: 1.25rem'],
4398
+ 'h-5': () => ['height: 1.25rem'],
4399
+ 'w-6': () => ['width: 1.5rem'],
4400
+ 'h-6': () => ['height: 1.5rem'],
4401
+ 'w-8': () => [`width: ${getTokenValue('--spacing-8', '2rem')}`],
4402
+ 'h-8': () => [`height: ${getTokenValue('--spacing-8', '2rem')}`],
4403
+ 'w-12': () => [`width: ${getTokenValue('--spacing-12', '3rem')}`],
4404
+ 'h-12': () => [`height: ${getTokenValue('--spacing-12', '3rem')}`],
4405
+ 'w-14': () => [`width: ${getTokenValue('--spacing-14', '3.5rem')}`],
4406
+ 'h-14': () => [`height: ${getTokenValue('--spacing-14', '3.5rem')}`],
4407
+ 'bg-white': () => [`background-color: ${getTokenValue('--white', '#ffffff')}`],
4408
+ 'bg-black': () => [`background-color: ${getTokenValue('--black', '#000000')}`],
4409
+ 'bg-gray-50': () => [`background-color: ${getTokenValue('--gray-50', '#f9f9f9')}`],
4410
+ 'bg-gray-100': () => [`background-color: ${getTokenValue('--gray-100', '#f3f4f6')}`],
4411
+ 'bg-gray-300': () => [`background-color: ${getTokenValue('--gray-300', '#d5d8dc')}`],
4412
+ 'bg-gray-800': () => [`background-color: ${getTokenValue('--gray-800', '#122be2')}`],
4413
+ 'bg-gray-900': () => [`background-color: ${getTokenValue('--gray-900', '#f976f5')}`],
4414
+ 'bg-blue-50': () => [`background-color: ${getTokenValue('--blue-50', '#eff6ff')}`],
4415
+ 'bg-blue-600': () => [`background-color: ${getTokenValue('--blue-600', '#2563eb')}`],
4416
+ 'bg-blue-700': () => ['background-color: #1d4ed8'],
4417
+ 'bg-green-600': () => ['background-color: #16a34a'],
4418
+ 'bg-red-600': () => ['background-color: #dc2626'],
4419
+ 'bg-success-50': () => [`background-color: ${getTokenValue('--success-50', '#f0fdf4')}`],
4420
+ 'bg-warning-50': () => [`background-color: ${getTokenValue('--warning-50', '#fffbeb')}`],
4421
+ 'bg-error-50': () => [`background-color: ${getTokenValue('--error-50', '#fef2f2')}`],
4422
+ 'bg-info-50': () => [`background-color: ${getTokenValue('--info-50', '#eff6ff')}`],
4423
+ 'bg-transparent': () => ['background-color: transparent'],
4424
+ 'text-white': () => [`color: ${getTokenValue('--white', '#ffffff')}`],
4425
+ 'text-black': () => [`color: ${getTokenValue('--black', '#000000')}`],
4426
+ 'text-gray-300': () => [`color: ${getTokenValue('--gray-300', '#d5d8dc')}`],
4427
+ 'text-gray-500': () => [`color: ${getTokenValue('--gray-500', '#7af202')}`],
4428
+ 'text-gray-600': () => [`color: ${getTokenValue('--gray-600', '#4b5563')}`],
4429
+ 'text-gray-700': () => [`color: ${getTokenValue('--gray-700', '#374151')}`],
4430
+ 'text-gray-800': () => [`color: ${getTokenValue('--gray-800', '#122be2')}`],
4431
+ 'text-gray-900': () => [`color: ${getTokenValue('--gray-900', '#f976f5')}`],
4432
+ 'text-blue-600': () => [`color: ${getTokenValue('--blue-600', '#2563eb')}`],
4433
+ 'text-red-600': () => ['color: #dc2626'],
4434
+ 'text-green-600': () => ['color: #16a34a'],
4435
+ 'text-success-700': () => [`color: ${getTokenValue('--success-700', '#15803d')}`],
4436
+ 'text-warning-700': () => [`color: ${getTokenValue('--warning-700', '#b45309')}`],
4437
+ 'text-error-700': () => [`color: ${getTokenValue('--error-700', '#b91c1c')}`],
4438
+ 'text-info-700': () => [`color: ${getTokenValue('--info-700', '#1d4ed8')}`],
4439
+ 'rounded': () => [`border-radius: ${getTokenValue('--border-radius-md', '0.25rem')}`],
4440
+ 'rounded-md': () => [`border-radius: ${getTokenValue('--border-radius-md', '0.375rem')}`],
4441
+ 'rounded-lg': () => [`border-radius: ${getTokenValue('--border-radius-lg', '8px')}`],
4442
+ 'rounded-xl': () => [`border-radius: ${getTokenValue('--border-radius-xl', '2px')}`],
4443
+ 'rounded-2xl': () => [`border-radius: ${getTokenValue('--border-radius-2xl', '16px')}`],
4444
+ 'rounded-3xl': () => [`border-radius: ${getTokenValue('--border-radius-3xl', '20px')}`],
4445
+ 'rounded-full': () => [`border-radius: ${getTokenValue('--border-radius-full', '50%')}`],
4446
+ 'border': () => [`border-width: ${getTokenValue('--border-width-1', '1px')}`, `border-style: ${getTokenValue('--border-style-solid', 'solid')}`, `border-color: ${getTokenValue('--gray-200', '#e5e7eb')}`],
4447
+ 'border-2': () => ['border-width: 2px', 'border-style: solid', 'border-color: inherit'],
4448
+ 'border-b': () => [`border-bottom-width: ${getTokenValue('--border-width-1', '1px')}`, `border-bottom-style: ${getTokenValue('--border-style-solid', 'solid')}`, `border-bottom-color: ${getTokenValue('--gray-200', '#e5e7eb')}`],
4449
+ 'border-t': () => [`border-top-width: ${getTokenValue('--border-width-1', '1px')}`, `border-top-style: ${getTokenValue('--border-style-solid', 'solid')}`, `border-top-color: ${getTokenValue('--gray-200', '#e5e7eb')}`],
4450
+ 'border-solid': () => ['border-style: solid'],
4451
+ 'border-gray-200': () => [`border-color: ${getTokenValue('--gray-200', '#e5e7eb')}`],
4452
+ 'border-gray-300': () => [`border-color: ${getTokenValue('--gray-300', '#d1d5db')}`],
4453
+ 'border-gray-400': () => [`border-color: ${getTokenValue('--gray-400', '#9ca3af')}`],
4454
+ 'border-blue-600': () => [`border-color: ${getTokenValue('--blue-600', '#2563eb')}`],
4455
+ 'border-blue-700': () => ['border-color: #1d4ed8'],
4456
+ 'border-red-500': () => ['border-color: #ef4444'],
4457
+ 'border-green-600': () => ['border-color: #16a34a'],
4458
+ 'border-success-200': () => [`border-color: ${getTokenValue('--success-200', '#bbf7d0')}`],
4459
+ 'border-warning-200': () => [`border-color: ${getTokenValue('--warning-200', '#fed7aa')}`],
4460
+ 'border-error-200': () => [`border-color: ${getTokenValue('--error-200', '#fecaca')}`],
4461
+ 'border-info-200': () => [`border-color: ${getTokenValue('--info-200', '#bfdbfe')}`],
4462
+ 'font-sans': () => [`font-family: ${getTokenValue('--font-family-sans', 'Inter, system-ui, sans-serif')}`],
4463
+ 'font-mono': () => [`font-family: ${getTokenValue('--font-family-mono', 'ui-monospace, monospace')}`],
4464
+ 'font-medium': () => ['font-weight: 500'],
4465
+ 'font-semibold': () => [`font-weight: ${getTokenValue('--font-weight-semibold', '600')}`],
4466
+ 'font-bold': () => ['font-weight: 700'],
4467
+ 'text-xs': () => [`font-size: ${getTokenValue('--font-size-xs', '0.75rem')}`, 'line-height: 1rem'],
4468
+ 'text-sm': () => [`font-size: ${getTokenValue('--font-size-sm', '0.875rem')}`, 'line-height: 1.25rem'],
4469
+ 'text-base': () => [`font-size: ${getTokenValue('--font-size-base', '1rem')}`, 'line-height: 1.5rem'],
4470
+ 'text-lg': () => [`font-size: ${getTokenValue('--font-size-lg', '1.125rem')}`, 'line-height: 1.75rem'],
4471
+ 'text-xl': () => ['font-size: 1.25rem', 'line-height: 1.75rem'],
4472
+ 'leading-relaxed': () => ['line-height: 1.625'],
4473
+ 'shadow-lg': () => [`box-shadow: ${getTokenValue('--shadow-lg', '0 10px 15px -3px rgba(0,0,0,0.1)')}`],
4474
+ 'shadow-sm': () => [`box-shadow: ${getTokenValue('--shadow-sm', '0 1px 2px 0 rgba(0,0,0,0.05)')}`],
4475
+ 'shadow-soft': () => [`box-shadow: ${getTokenValue('--shadow-soft', '0 4px 20px rgba(0,0,0,0.08)')}`],
4476
+ 'shadow-subtle': () => [`box-shadow: ${getTokenValue('--shadow-subtle', '0 2px 10px rgba(0,0,0,0.04)')}`],
4477
+ 'transition-colors': () => [`transition-property: color, background-color, border-color, box-shadow`, `transition-duration: ${getTokenValue('--duration-200', '0.2s')}`, `transition-timing-function: ease-in-out`],
4478
+ 'transition-all': () => ['transition-property: all', `transition-duration: ${getTokenValue('--duration-200', '0.2s')}`, 'transition-timing-function: ease-in-out'],
4479
+ 'transition-opacity': () => ['transition-property: opacity', `transition-duration: ${getTokenValue('--duration-200', '0.2s')}`, 'transition-timing-function: ease-in-out'],
4480
+ 'duration-200': () => [`transition-duration: ${getTokenValue('--duration-200', '0.2s')}`],
4481
+ 'duration-300': () => ['transition-duration: 0.3s'],
4482
+ 'ease-out': () => ['transition-timing-function: cubic-bezier(0, 0, 0.2, 1)'],
4483
+ 'transform': () => ['transform: translateX(0) translateY(0) rotate(0) scale(1)'],
4484
+ 'cursor-pointer': () => ['cursor: pointer'],
4485
+ 'cursor-not-allowed': () => ['cursor: not-allowed'],
4486
+ 'pointer-events-none': () => ['pointer-events: none'],
4487
+ 'opacity-0': () => ['opacity: 0'],
4488
+ 'opacity-100': () => ['opacity: 1'],
4489
+ 'outline-none': () => ['outline: 2px solid transparent', 'outline-offset: 2px'],
4490
+ 'appearance-none': () => ['appearance: none'],
4491
+ 'select-none': () => ['user-select: none'],
4492
+ };
4493
+ const generator = utilityMap[className];
4494
+ return generator ? generator() : [];
4495
+ }
4496
+ // ─── Component Generation ───────────────────────────────────────────────────
4497
+ async generateComponents(components, variables) {
4498
+ if (!fs__namespace.existsSync(this.outputDir)) {
4499
+ fs__namespace.mkdirSync(this.outputDir, { recursive: true });
4500
+ }
4501
+ for (const [componentName, componentData] of Object.entries(components)) {
4502
+ await this.generateCompoundComponents(componentName, componentData, variables);
4503
+ }
4504
+ }
4505
+ async generateCompoundComponents(componentName, componentData, variables) {
4506
+ // Root: charisol-card, charisol-button, charisol-input …
4507
+ await this.generateSingleComponent(componentName, componentData, variables, true);
4508
+ // Children: tag is simply charisol-{childNodeKey}
4509
+ // e.g. child key "card-container" → charisol-card-container
4510
+ // child key "card-header" → charisol-card-header
4511
+ // No double-prefixing of the parent name.
4512
+ if (componentData.children) {
4513
+ for (const [childName, childNode] of Object.entries(componentData.children)) {
4514
+ await this.generateSubComponentsRecursive(childName, childNode, variables);
4515
+ }
4516
+ }
4517
+ }
4518
+ /**
4519
+ * Recursively generate one Stencil component per named node.
4520
+ *
4521
+ * TAG NAMING:
4522
+ * The child node key already carries its full descriptive name, e.g.
4523
+ * "card-container", "card-header", "card-header-title".
4524
+ * We just prepend the library prefix: charisol-{nodeName}.
4525
+ * This prevents the double-name bug (charisol-card-card-container).
4526
+ */
4527
+ async generateSubComponentsRecursive(nodeName, node, variables) {
4528
+ await this.generateSingleComponent(nodeName, node, variables, false);
4529
+ if (node.children) {
4530
+ for (const [childName, childNode] of Object.entries(node.children)) {
4531
+ await this.generateSubComponentsRecursive(childName, childNode, variables);
4532
+ }
4533
+ }
4534
+ }
4535
+ /**
4536
+ * Core component writer.
4537
+ *
4538
+ * PURE HTML — every component renders its subtree as real HTML elements.
4539
+ * No <charisol-*> tags anywhere in the output TSX.
4540
+ *
4541
+ * Props exposed on the root element only (text, svgIcon, src, alt, etc.)
4542
+ * so users can override defaults. Child nodes always use their design-system
4543
+ * defaults since they are rendered inline — users customise via props on the
4544
+ * parent or via customStyle/customClass on the parent.
4545
+ *
4546
+ * TEXT SAFETY — JSON.stringify handles apostrophes and quotes.
4547
+ */
4548
+ async generateSingleComponent(nodeName, node, variables, isRoot) {
4549
+ const kebabTag = `${this.componentPrefix}-${ComponentGeneratorUtils.toKebabCase(nodeName)}`;
4550
+ const pascalName = ComponentGeneratorUtils.toPascalCase(nodeName);
4551
+ const filePath = path__namespace.join(this.outputDir, `${kebabTag}.tsx`);
4552
+ const cssPath = path__namespace.join(this.outputDir, `${kebabTag}.css`);
4553
+ const tag = node.linkedElement?.htmlTag || 'div';
4554
+ const attrs = this.processAttributes(node.linkedElement?.attributes || {}, variables);
4555
+ const resolvedCls = attrs['class'] || '';
4556
+ const SELF_CLOSING = ['img', 'input', 'br', 'hr', 'meta', 'link'];
4557
+ const isSelfClosing = SELF_CLOSING.includes(tag);
4558
+ const hasChildren = !!(node.children && Object.keys(node.children).length > 0);
4559
+ const rawText = node.textContent || '';
4560
+ const hasSvg = rawText.includes('<svg');
4561
+ const hasText = !!rawText && !hasSvg;
4562
+ // Safe strings
4563
+ const safeDefaultText = hasText ? JSON.stringify(rawText) : '""';
4564
+ const safeSvgLiteral = hasSvg
4565
+ ? rawText.replace(/\\/g, '\\\\').replace(/`/g, '\\`').replace(/\$\{/g, '\\${')
4566
+ : '';
4567
+ // ── Props (on the root element of this component only) ───────────────────
4568
+ const propLines = [
4569
+ ` @Prop() customClass?: string;`,
4570
+ ` @Prop() customStyle?: string;`,
4571
+ ];
4572
+ if (hasText)
4573
+ propLines.push(` @Prop() text?: string;`);
4574
+ if (hasSvg)
4575
+ propLines.push(` @Prop() svgIcon?: string;`);
4576
+ if (tag === 'img') {
4577
+ propLines.push(` @Prop() src?: string;`);
4578
+ propLines.push(` @Prop() alt?: string;`);
4579
+ }
4580
+ if (tag === 'input') {
4581
+ propLines.push(` @Prop() type?: string;`);
4582
+ propLines.push(` @Prop() placeholder?: string;`);
4583
+ propLines.push(` @Prop() value?: string;`);
4584
+ propLines.push(` @Prop() inputId?: string;`);
4585
+ }
4586
+ if (tag === 'label')
4587
+ propLines.push(` @Prop() htmlFor?: string;`);
4588
+ if (tag === 'button') {
4589
+ propLines.push(` @Prop() btnType?: string;`);
4590
+ propLines.push(` @Prop() ariaLabel?: string;`);
4591
+ }
4592
+ // ── Children rendered as pure HTML ───────────────────────────────────────
4593
+ // Indented at level 4 (inside render → return → root element)
4594
+ const childrenHtml = hasChildren
4595
+ ? this.buildChildrenJsx(node.children, 4)
4596
+ : '';
4597
+ // ── Render body ──────────────────────────────────────────────────────────
4598
+ const classLine = ` const cls = [${JSON.stringify(resolvedCls)}, this.customClass].filter(Boolean).join(' ');`;
4599
+ const styleLine = ` const sty = this.customStyle as any || undefined;`;
4600
+ let renderReturn = '';
4601
+ if (isSelfClosing) {
4602
+ if (tag === 'img') {
4603
+ const defSrc = this.safeJsString(attrs['src'] || '');
4604
+ const defAlt = this.safeJsString(attrs['alt'] || '');
4605
+ renderReturn =
4606
+ ` <img
4607
+ class={cls}
4608
+ src={this.src || ${defSrc}}
4609
+ alt={this.alt || ${defAlt}}
4610
+ style={sty}
4611
+ />`;
4612
+ }
4613
+ else if (tag === 'input') {
4614
+ const defType = this.safeJsString(attrs['type'] || 'text');
4615
+ const defPh = this.safeJsString(attrs['placeholder'] || '');
4616
+ const defId = this.safeJsString(attrs['id'] || '');
4617
+ renderReturn =
4618
+ ` <input
4619
+ class={cls}
4620
+ type={this.type || ${defType}}
4621
+ id={this.inputId || ${defId}}
4622
+ placeholder={this.placeholder || ${defPh}}
4623
+ value={this.value}
4624
+ style={sty}
4625
+ />`;
4626
+ }
4627
+ else {
4628
+ renderReturn = ` <${tag} class={cls} style={sty} />`;
4629
+ }
4630
+ }
4631
+ else if (hasSvg) {
4632
+ // SVG holder — uses innerHTML; user overrides via svgIcon prop
4633
+ renderReturn =
4634
+ ` <${tag}
4635
+ class={cls}
4636
+ style={sty}
4637
+ innerHTML={this.svgIcon || \`${safeSvgLiteral}\`}
4638
+ />`;
4639
+ }
4640
+ else if (tag === 'label') {
4641
+ const defFor = this.safeJsString(attrs['htmlFor'] || attrs['for'] || '');
4642
+ const inner = hasText
4643
+ ? `{this.text || ${safeDefaultText}}`
4644
+ : childrenHtml;
4645
+ renderReturn =
4646
+ ` <label
4647
+ class={cls}
4648
+ htmlFor={this.htmlFor || ${defFor}}
4649
+ style={sty}
4650
+ >
4651
+ ${inner}
4652
+ </label>`;
4653
+ }
4654
+ else if (tag === 'button') {
4655
+ const defBtnType = this.safeJsString(attrs['type'] || 'button');
4656
+ const defAria = this.safeJsString(attrs['aria-label'] || '');
4657
+ const inner = hasText
4658
+ ? `{this.text || ${safeDefaultText}}`
4659
+ : childrenHtml;
4660
+ renderReturn =
4661
+ ` <button
4662
+ class={cls}
4663
+ type={this.btnType || ${defBtnType}}
4664
+ aria-label={this.ariaLabel || ${defAria}}
4665
+ style={sty}
4666
+ >
4667
+ ${inner}
4668
+ </button>`;
4669
+ }
4670
+ else {
4671
+ // div, h1, h2, h3, p, span, section, etc.
4672
+ const inner = hasText
4673
+ ? `{this.text || ${safeDefaultText}}`
4674
+ : childrenHtml;
4675
+ renderReturn =
4676
+ ` <${tag}
4677
+ class={cls}
4678
+ style={sty}
4679
+ >
4680
+ ${inner}
4681
+ </${tag}>`;
4682
+ }
4683
+ // ── Emit file ────────────────────────────────────────────────────────────
4684
+ const componentCode = `import { Component, Prop, h } from '@stencil/core';
4685
+
4686
+ /**
4687
+ * ${node.displayName || nodeName}
4688
+ * Auto-generated from Charisol Design System
4689
+ */
4690
+ @Component({
4691
+ tag: '${kebabTag}',
4692
+ styleUrl: '${kebabTag}.css',
4693
+ shadow: true,
4694
+ })
4695
+ export class ${pascalName} {
4696
+ ${propLines.join('\n')}
4697
+
4698
+ render() {
4699
+ ${classLine}
4700
+ ${styleLine}
4701
+ return (
4702
+ ${renderReturn}
4703
+ );
4704
+ }
4705
+ }
4706
+ `;
4707
+ fs__namespace.writeFileSync(cssPath, '/* Styles from global utilities.css */\n');
4708
+ fs__namespace.writeFileSync(filePath, componentCode);
4709
+ this.generatedComponents.set(kebabTag, pascalName);
4710
+ console.log(`✅ Generated: ${kebabTag}.tsx`);
4711
+ }
4712
+ /**
4713
+ * Recursively render a node tree as PURE HTML JSX.
4714
+ * No <charisol-*> tags — only real HTML elements: <div>, <span>, <button>, <img>, etc.
4715
+ *
4716
+ * Each node is rendered using its own htmlTag and resolved CSS classes.
4717
+ * SVG content is emitted via innerHTML. Text is emitted as a JSX expression.
4718
+ * Children are recursed inline.
4719
+ */
4720
+ renderNodeAsHtml(node, indentLevel) {
4721
+ const pad = ' '.repeat(indentLevel);
4722
+ const tag = node.linkedElement?.htmlTag || 'div';
4723
+ const attrs = this.processAttributes(node.linkedElement?.attributes || {}, this.variables);
4724
+ const cls = attrs['class'] || '';
4725
+ const SELF_CLOSING = ['img', 'input', 'br', 'hr', 'meta', 'link'];
4726
+ const isSC = SELF_CLOSING.includes(tag);
4727
+ const rawText = node.textContent || '';
4728
+ const hasSvg = rawText.includes('<svg');
4729
+ const hasText = !!rawText && !hasSvg;
4730
+ const hasChildren = !!(node.children && Object.keys(node.children).length > 0);
4731
+ // Build attribute string for this node's HTML tag
4732
+ const attrParts = [];
4733
+ if (cls)
4734
+ attrParts.push(`class="${cls}"`);
4735
+ if (tag === 'img') {
4736
+ if (attrs['src'])
4737
+ attrParts.push(`src="${this.escapeAttrVal(attrs['src'])}"`);
4738
+ if (attrs['alt'])
4739
+ attrParts.push(`alt="${this.escapeAttrVal(attrs['alt'])}"`);
4740
+ }
4741
+ if (tag === 'input') {
4742
+ if (attrs['type'])
4743
+ attrParts.push(`type="${this.escapeAttrVal(attrs['type'])}"`);
4744
+ if (attrs['placeholder'])
4745
+ attrParts.push(`placeholder="${this.escapeAttrVal(attrs['placeholder'])}"`);
4746
+ if (attrs['id'])
4747
+ attrParts.push(`id="${this.escapeAttrVal(attrs['id'])}"`);
4748
+ }
4749
+ if (tag === 'label') {
4750
+ const forVal = attrs['htmlFor'] || attrs['for'];
4751
+ if (forVal)
4752
+ attrParts.push(`htmlFor="${this.escapeAttrVal(forVal)}"`);
4753
+ }
4754
+ if (tag === 'button') {
4755
+ attrParts.push(`type="${this.escapeAttrVal(attrs['type'] || 'button')}"`);
4756
+ if (attrs['aria-label'])
4757
+ attrParts.push(`aria-label="${this.escapeAttrVal(attrs['aria-label'])}"`);
4758
+ }
4759
+ const attrStr = attrParts.length > 0 ? ' ' + attrParts.join(' ') : '';
4760
+ // ── Self-closing ──────────────────────────────────────────────────────────
4761
+ if (isSC) {
4762
+ return `${pad}<${tag}${attrStr} />`;
4763
+ }
4764
+ // ── SVG holder — use innerHTML ────────────────────────────────────────────
4765
+ if (hasSvg) {
4766
+ const safeSvg = rawText.replace(/\\/g, '\\\\').replace(/`/g, '\\`').replace(/\$\{/g, '\\${');
4767
+ return `${pad}<${tag}${attrStr} innerHTML={\`${safeSvg}\`} />`;
4768
+ }
4769
+ // ── Open tag ──────────────────────────────────────────────────────────────
4770
+ const lines = [];
4771
+ lines.push(`${pad}<${tag}${attrStr}>`);
4772
+ // ── Text content ──────────────────────────────────────────────────────────
4773
+ if (hasText) {
4774
+ lines.push(`${pad} {${JSON.stringify(rawText)}}`);
4775
+ }
4776
+ // ── Children ──────────────────────────────────────────────────────────────
4777
+ if (hasChildren) {
4778
+ for (const childNode of Object.values(node.children)) {
4779
+ lines.push(this.renderNodeAsHtml(childNode, indentLevel + 1));
4780
+ }
4781
+ }
4782
+ lines.push(`${pad}</${tag}>`);
4783
+ return lines.join('\n');
4784
+ }
4785
+ /**
4786
+ * Build children JSX by rendering each child node as pure HTML.
4787
+ * Called from generateSingleComponent for container nodes.
4788
+ */
4789
+ buildChildrenJsx(children, indentLevel) {
4790
+ return Object.values(children)
4791
+ .map(child => this.renderNodeAsHtml(child, indentLevel))
4792
+ .join('\n');
4793
+ }
4794
+ // ─── String helpers ──────────────────────────────────────────────────────────
4795
+ /**
4796
+ * Produce a safe JS string literal using JSON.stringify.
4797
+ * Used inside JSX expressions: src={this.src || "default"}
4798
+ */
4799
+ safeJsString(value) {
4800
+ return JSON.stringify(value);
4801
+ }
4802
+ /**
4803
+ * Escape a value for embedding inside a JSX attribute double-quoted string.
4804
+ * e.g. class="foo &amp; bar"
4805
+ */
4806
+ escapeAttrVal(value) {
4807
+ return (value || '')
4808
+ .replace(/&/g, '&amp;')
4809
+ .replace(/"/g, '&quot;');
4810
+ }
4811
+ processAttributes(attributes = {}, variables) {
4812
+ const processed = {};
4813
+ for (const [key, value] of Object.entries(attributes)) {
4814
+ if (key === 'class') {
4815
+ processed[key] = this.resolveClassReferences(value);
4816
+ }
4817
+ else if (key === 'style') {
4818
+ processed[key] = this.resolveStyleValue(value, variables);
4819
+ }
4820
+ else {
4821
+ processed[key] = this.resolveAttributeValue(value, variables);
4822
+ }
4823
+ }
4824
+ return processed;
4825
+ }
4826
+ resolveStyleValue(value, variables) {
4827
+ if (!value)
4828
+ return '';
4829
+ const varMatch = value.match(/var\(--([^)]+)\)/);
4830
+ if (varMatch) {
4831
+ const tokenName = `--${varMatch[1]}`;
4832
+ const token = variables[tokenName];
4833
+ if (token) {
4834
+ let v = token.value;
4835
+ if (token.unit && token.type === 'dimension' && !v.includes(token.unit))
4836
+ v = `${v}${token.unit}`;
4837
+ return v;
4838
+ }
4839
+ }
4840
+ return value;
4841
+ }
4842
+ resolveAttributeValue(value, variables) {
4843
+ if (!value)
4844
+ return '';
4845
+ const varMatch = value.match(/var\(--([^)]+)\)/);
4846
+ if (varMatch) {
4847
+ const tokenName = `--${varMatch[1]}`;
4848
+ const token = variables[tokenName];
4849
+ if (token)
4850
+ return token.value;
4851
+ }
4852
+ return value;
4853
+ }
4854
+ buildAttributeString(attributes) {
4855
+ return Object.entries(attributes)
4856
+ .filter(([, v]) => v && v.trim() !== '')
4857
+ .map(([k, v]) => ` ${k}="${v}"`)
4858
+ .join('');
4859
+ }
4860
+ // ─── Index ───────────────────────────────────────────────────────────────────
4861
+ async updateComponentIndex() {
4862
+ const exportLines = [];
4863
+ for (const [tagName, className] of this.generatedComponents.entries()) {
4864
+ exportLines.push(`export { ${className} } from './${tagName}';`);
4865
+ }
4866
+ const generatedIndexPath = path__namespace.join(this.outputDir, 'index.ts');
4867
+ fs__namespace.writeFileSync(generatedIndexPath, exportLines.join('\n') + '\n');
4868
+ const mainIndexPath = path__namespace.join(process.cwd(), 'src', 'components', 'index.ts');
4869
+ fs__namespace.mkdirSync(path__namespace.dirname(mainIndexPath), { recursive: true });
4870
+ fs__namespace.writeFileSync(mainIndexPath, `// Auto-generated component index\nexport * from './generated/index';\n`);
4871
+ }
4872
+ }
4873
+ if (require.main === module) {
4874
+ const generator = new StencilComponentGenerator();
4875
+ generator.generateAllComponents().catch(console.error);
4876
+ }
4877
+
4878
+ exports.format = utils.format;
4879
+ exports.DesignSystemApiClient = DesignSystemApiClient;
4880
+ exports.StencilComponentGenerator = StencilComponentGenerator;