@justifi/webcomponents 5.7.2 → 5.7.3-rc-01

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 (675) hide show
  1. package/dist/cjs/{check-pkg-version-hqYwYpQq.js → Analytics-DYN4hp2b.js} +25 -24
  2. package/dist/cjs/{Api-Dp4CW5K6.js → Api-BTdkb3Zh.js} +1 -1
  3. package/dist/cjs/{Checkout-TZnRz3-3.js → Checkout-BsYZoJ0a.js} +1 -3
  4. package/dist/cjs/{ComponentError-C4MdBBMe.js → ComponentError-CEv9ltwy.js} +2 -0
  5. package/dist/cjs/Document-rXGBUaOh.js +58 -0
  6. package/dist/cjs/{Document-Qt0qiXeh.js → Payment-D5UynU2f.js} +0 -56
  7. package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
  8. package/dist/cjs/{badge-BxoJOyTJ.js → badge-sO_Hcamo.js} +1 -1
  9. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +11 -10
  10. package/dist/cjs/{bank-account-form_9.cjs.entry.js → bank-account-form_7.cjs.entry.js} +30 -200
  11. package/dist/cjs/billing-form-schema-oZ4GROWP.js +26 -0
  12. package/dist/cjs/{business-additional-questions-schema-JlysTRE3.js → business-additional-questions-schema-CHOaeZot.js} +6 -6
  13. package/dist/cjs/business-details-core.cjs.entry.js +4 -4
  14. package/dist/cjs/{business-identity-schema-BksYFWls.js → business-identity-schema-DmpEndsx.js} +10 -10
  15. package/dist/cjs/{business.service-DMIMZpx4.js → business.service-ev-3rHag.js} +5 -4
  16. package/dist/cjs/{button-BPFSRx4d.js → button-CCZd8WSY.js} +1 -1
  17. package/dist/cjs/checkout-actions-CRbQgLn0.js +61 -0
  18. package/dist/cjs/{checkout.service-DKH8NODe.js → checkout.service-D4hTYr1i.js} +5 -4
  19. package/dist/cjs/checkout.store-osqdxFMq.js +29 -0
  20. package/dist/cjs/checkouts-list-core.cjs.entry.js +13 -12
  21. package/dist/cjs/{checkouts-list-params-state-BvG5Ysrg.js → checkouts-list-params-state-fVsfZZ5G.js} +1 -1
  22. package/dist/cjs/{checkouts-table-Cj2iSB_P.js → checkouts-table-C1Jv_A7m.js} +2 -2
  23. package/dist/cjs/{config-state-D7p-XunE.js → config-state-BTfJl-LU.js} +1 -1
  24. package/dist/cjs/custom-popper_4.cjs.entry.js +8 -8
  25. package/dist/cjs/{dispute.service-8j6tLV4i.js → dispute.service-Dru9NStj.js} +5 -4
  26. package/dist/cjs/{index.esm-CVuJLXJZ.js → form-CWW8IM-X.js} +10509 -10509
  27. package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
  28. package/dist/cjs/form-control-checkbox.cjs.entry.js +5 -5
  29. package/dist/cjs/form-control-date.cjs.entry.js +4 -4
  30. package/dist/cjs/{form-control-error-text-D9XDyFoW.js → form-control-error-text-DPDsFdAT.js} +1 -1
  31. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +5 -5
  32. package/dist/cjs/{form-control-help-text-J_boqSMc.js → form-control-help-text-CT5HzEnX.js} +1 -1
  33. package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
  34. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +3 -3
  35. package/dist/cjs/form-control-monetary.cjs.entry.js +5 -5
  36. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +4 -4
  37. package/dist/cjs/form-control-number.cjs.entry.js +5 -5
  38. package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
  39. package/dist/cjs/{get-business-BJrtsomz.js → get-business-BiEc-jdH.js} +2 -2
  40. package/dist/cjs/{get-payment-details-MM1u5jMc.js → get-payment-details-AOibpML7.js} +7 -6
  41. package/dist/cjs/{get-payout-csv-CXEQkjDm.js → get-payout-csv-CdNRRH0t.js} +2 -2
  42. package/dist/cjs/{get-subaccounts-CkjWYxIU.js → get-subaccounts-Dw7CbPDi.js} +7 -6
  43. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +4 -4
  44. package/dist/cjs/{header-1-auSUfIpO.js → header-1--wdCXxjA.js} +1 -1
  45. package/dist/cjs/{header-3-B-bXHCpC.js → header-3-DxUQJ7TT.js} +1 -1
  46. package/dist/cjs/{iframe-input.cjs.entry.js → hidden-input_2.cjs.entry.js} +112 -15
  47. package/dist/cjs/{index-BYd8IvAa.js → index-2GwnTbNA.js} +22 -4
  48. package/dist/cjs/{index-B8ljHEN1.js → index-DEMVrrsF.js} +1 -1
  49. package/dist/cjs/{insurance-state-CFxbKNWH.js → insurance-state-BmAF1Sef.js} +2 -2
  50. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +21 -20
  51. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +18 -17
  52. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +43 -43
  53. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +85 -0
  54. package/dist/cjs/justifi-billing-information-form.cjs.entry.js +51 -0
  55. package/dist/cjs/justifi-business-details.cjs.entry.js +16 -15
  56. package/dist/cjs/justifi-business-form.cjs.entry.js +25 -24
  57. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +1 -1
  58. package/dist/cjs/justifi-card-form.cjs.entry.js +93 -0
  59. package/dist/cjs/justifi-checkout-core.cjs.entry.js +9 -9
  60. package/dist/cjs/justifi-checkout-summary.cjs.entry.js +21 -0
  61. package/dist/cjs/justifi-checkout.cjs.entry.js +28 -71
  62. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +10 -9
  63. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +19 -18
  64. package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
  65. package/dist/cjs/justifi-details.cjs.entry.js +2 -2
  66. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +2 -2
  67. package/dist/cjs/justifi-dispute-management.cjs.entry.js +15 -14
  68. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +20 -19
  69. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +14 -13
  70. package/dist/cjs/justifi-modular-checkout.cjs.entry.js +205 -0
  71. package/dist/cjs/justifi-order-terminals.cjs.entry.js +19 -18
  72. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +16 -15
  73. package/dist/cjs/justifi-payment-details.cjs.entry.js +16 -15
  74. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +4 -4
  75. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +15 -14
  76. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +18 -17
  77. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +6 -6
  78. package/dist/cjs/justifi-payments-list.cjs.entry.js +20 -19
  79. package/dist/cjs/justifi-payout-details.cjs.entry.js +16 -15
  80. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +18 -17
  81. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +6 -6
  82. package/dist/cjs/justifi-payouts-list.cjs.entry.js +21 -20
  83. package/dist/cjs/justifi-postal-code-form.cjs.entry.js +50 -0
  84. package/dist/cjs/justifi-refund-payment.cjs.entry.js +25 -24
  85. package/dist/cjs/justifi-saved-payment-methods.cjs.entry.js +31 -0
  86. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +5 -5
  87. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +21 -22
  88. package/dist/cjs/justifi-sezzle-payment-method.cjs.entry.js +80 -0
  89. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +11 -10
  90. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +17 -16
  91. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +10 -9
  92. package/dist/cjs/justifi-terminals-list.cjs.entry.js +19 -18
  93. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +22 -14
  94. package/dist/cjs/loader.cjs.js +3 -4
  95. package/dist/cjs/{package-BCOEGxFC.js → package-DF9mLjoQ.js} +1 -1
  96. package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
  97. package/dist/cjs/payment-details-core.cjs.entry.js +14 -14
  98. package/dist/cjs/payment-method-option-utils-imuSE7KV.js +25 -0
  99. package/dist/cjs/{payment-provisioning-actions-BkWSDJQQ.js → payment-provisioning-actions-SNMCdsyF.js} +2 -2
  100. package/dist/cjs/{payment.service-CCxGhTwZ.js → payment.service-rsnscZu7.js} +5 -4
  101. package/dist/cjs/payments-list-core.cjs.entry.js +14 -13
  102. package/dist/cjs/{payments-list-params-state-BvG5Ysrg.js → payments-list-params-state-fVsfZZ5G.js} +1 -1
  103. package/dist/cjs/{payments-status-BTykBx8i.js → payments-status-DPqU5v9h.js} +2 -2
  104. package/dist/cjs/{payments-table-BR97ybd6.js → payments-table-BM3AoAJf.js} +2 -2
  105. package/dist/cjs/payout-details-core.cjs.entry.js +10 -10
  106. package/dist/cjs/{payout.service-CtphIhUK.js → payout.service-BnmI3X4n.js} +5 -4
  107. package/dist/cjs/payouts-list-core.cjs.entry.js +14 -13
  108. package/dist/cjs/{payouts-list-params-state-BvG5Ysrg.js → payouts-list-params-state-fVsfZZ5G.js} +1 -1
  109. package/dist/cjs/{payouts-status-YCqmbd4K.js → payouts-status-CU8aqIhH.js} +2 -2
  110. package/dist/cjs/{payouts-table-DMcQiC1g.js → payouts-table-1HL4kk9B.js} +2 -2
  111. package/dist/cjs/{schema-validations-BUor-ySb.js → schema-validations-C0BNwMBi.js} +33 -33
  112. package/dist/cjs/{skeleton-aMh0RMHq.js → skeleton-ByLavxr1.js} +1 -1
  113. package/dist/cjs/{spinner-BTyIjlMM.js → spinner-DOC4Ab7M.js} +1 -1
  114. package/dist/cjs/{styled-host-udkBJV5h.js → styled-host-IMxk64cc.js} +1 -1
  115. package/dist/cjs/{table-DKVauFHc.js → table-BgQP2M2-.js} +2 -2
  116. package/dist/cjs/table-filters-menu.cjs.entry.js +3 -3
  117. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +13 -12
  118. package/dist/cjs/{terminal-orders-list-params-state-BvG5Ysrg.js → terminal-orders-list-params-state-fVsfZZ5G.js} +1 -1
  119. package/dist/cjs/{terminal-orders-table-D-CLcZws.js → terminal-orders-table-OxMHSAJ1.js} +7 -6
  120. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +2 -2
  121. package/dist/cjs/{terminal.service-Dv_WJkue.js → terminal.service--PPaq5xS.js} +5 -4
  122. package/dist/cjs/terminals-list-core.cjs.entry.js +13 -12
  123. package/dist/cjs/terminals-list-params-state-fVsfZZ5G.js +22 -0
  124. package/dist/cjs/{terminals-table-BEJ6sF7w.js → terminals-table-yRGsrfBw.js} +2 -2
  125. package/dist/cjs/{utils-l0veqT9y.js → utils-IGCnjtqc.js} +1 -1
  126. package/dist/cjs/{utils-5lco6NzU.js → utils-bn0fXuc-.js} +1 -1
  127. package/dist/cjs/webcomponents.cjs.js +4 -5
  128. package/dist/collection/api/BillingInformation.js +1 -0
  129. package/dist/collection/api/Checkout.js +1 -3
  130. package/dist/collection/api/ComponentError.js +2 -0
  131. package/dist/collection/api/PaymentMethod.js +1 -0
  132. package/dist/collection/collection-manifest.json +9 -2
  133. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  134. package/dist/collection/components/checkout/billing-form/billing-form.js +1 -1
  135. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  136. package/dist/collection/components/checkout/checkout.js +11 -2
  137. package/dist/collection/components/checkout/payment-method-options.js +3 -33
  138. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  139. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
  140. package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
  141. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  142. package/dist/collection/components/dispute-management/dispute-management.js +1 -1
  143. package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
  144. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  145. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  146. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  147. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  148. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  149. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  150. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  151. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  152. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  153. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  154. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  155. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  156. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +10 -12
  157. package/dist/collection/components/modular-checkout/modular-checkout.js +345 -0
  158. package/dist/collection/components/modular-checkout-parts/bank-account-skeleton.js +10 -0
  159. package/dist/collection/components/modular-checkout-parts/bank-account.js +119 -0
  160. package/dist/collection/components/modular-checkout-parts/billing-form-schema.js +21 -0
  161. package/dist/collection/components/modular-checkout-parts/billing-form.js +116 -0
  162. package/dist/collection/components/modular-checkout-parts/card-form-skeleton.js +10 -0
  163. package/dist/collection/components/modular-checkout-parts/card-form.js +123 -0
  164. package/dist/collection/components/modular-checkout-parts/postal-code-form.js +114 -0
  165. package/dist/collection/components/modular-checkout-parts/saved-payment-methods.js +23 -0
  166. package/dist/collection/components/modular-checkout-parts/sezzle-payment-method.js +127 -0
  167. package/dist/collection/components/modular-checkout-parts/summary.js +12 -0
  168. package/dist/collection/components/order-terminals/order-terminals.js +1 -1
  169. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  170. package/dist/collection/components/payment-details/payment-details-core.js +8 -8
  171. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
  172. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  173. package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
  174. package/dist/collection/components/payments-list/payments-list.js +1 -1
  175. package/dist/collection/components/payout-details/payout-details-core.js +3 -3
  176. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
  177. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  178. package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
  179. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  180. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  181. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
  182. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
  183. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  184. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  185. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  186. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +10 -3
  187. package/dist/collection/store/checkout.store.js +25 -0
  188. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  189. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  190. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  191. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  192. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  193. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  194. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  195. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  196. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  197. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  198. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  199. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  200. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  201. package/dist/collection/ui-components/form/iframe-input.js +10 -5
  202. package/dist/docs.json +1236 -425
  203. package/dist/esm/{check-pkg-version-BykGn7tx.js → Analytics-DR277kvb.js} +27 -26
  204. package/dist/esm/{Api-cgKcLG0y.js → Api-CqimcNgb.js} +2 -2
  205. package/dist/esm/{Checkout-B9LrTq63.js → Checkout-CV6qgU0r.js} +2 -4
  206. package/dist/esm/{ComponentError-SdntD1xf.js → ComponentError-BhrFjjAs.js} +2 -0
  207. package/dist/esm/{Dispute-BH0Xfn-F.js → Dispute-7MWRbTXI.js} +1 -1
  208. package/dist/esm/Document-Ct-uNz2r.js +55 -0
  209. package/dist/esm/{Document-DvWsQBM6.js → Payment-BEvE6jAC.js} +3 -57
  210. package/dist/esm/{Refund-zZewCvey.js → Refund-CwUn_GFj.js} +1 -1
  211. package/dist/esm/additional-questions-details_5.entry.js +4 -4
  212. package/dist/esm/{badge-Du9GTXoB.js → badge-D_Q0kAPD.js} +2 -2
  213. package/dist/esm/bank-account-document-form-inputs_4.entry.js +15 -14
  214. package/dist/esm/{bank-account-form_9.entry.js → bank-account-form_7.entry.js} +22 -190
  215. package/dist/esm/billing-form-schema-PFvYpvy4.js +24 -0
  216. package/dist/esm/{business-additional-questions-schema-CBUm3D7O.js → business-additional-questions-schema-0lssJqN7.js} +2 -2
  217. package/dist/esm/business-details-core.entry.js +5 -5
  218. package/dist/esm/{business-identity-schema-CntGz8jo.js → business-identity-schema-Bel1K5mu.js} +2 -2
  219. package/dist/esm/{business.service-BWivPbyO.js → business.service-BM8hLxHS.js} +7 -6
  220. package/dist/esm/{button-CjH5C0pG.js → button-BVAxQPpP.js} +2 -2
  221. package/dist/esm/checkout-actions-UQ6g1s7I.js +58 -0
  222. package/dist/esm/{checkout.service-Bh-Q24Cr.js → checkout.service-CuCgG9hv.js} +7 -6
  223. package/dist/esm/checkout.store-DQrlfeus.js +27 -0
  224. package/dist/esm/checkouts-list-core.entry.js +17 -16
  225. package/dist/esm/{checkouts-list-params-state-Bn7pL-8x.js → checkouts-list-params-state-DhPyCV-V.js} +1 -1
  226. package/dist/esm/{checkouts-table-DcVkD83l.js → checkouts-table-Cc6U-0md.js} +4 -4
  227. package/dist/esm/{config-state-CkKrqnpZ.js → config-state-BjXhUj2q.js} +1 -1
  228. package/dist/esm/custom-popper_4.entry.js +9 -9
  229. package/dist/esm/{dispute.service-1AYcALSg.js → dispute.service-rB4Hq6ot.js} +7 -6
  230. package/dist/esm/{index.esm-BCNUj0Dx.js → form-BjGUIqxU.js} +10509 -10509
  231. package/dist/esm/form-alert_5.entry.js +2 -2
  232. package/dist/esm/form-control-checkbox.entry.js +6 -6
  233. package/dist/esm/form-control-date.entry.js +5 -5
  234. package/dist/esm/{form-control-error-text-tGFxd6kW.js → form-control-error-text-_SAT-ts2.js} +2 -2
  235. package/dist/esm/form-control-file-v2_2.entry.js +6 -6
  236. package/dist/esm/{form-control-help-text-2DawN8-N.js → form-control-help-text-Cjeu_VrV.js} +2 -2
  237. package/dist/esm/form-control-help-text.entry.js +1 -1
  238. package/dist/esm/form-control-monetary-provisioning.entry.js +4 -4
  239. package/dist/esm/form-control-monetary.entry.js +7 -7
  240. package/dist/esm/form-control-number-masked_2.entry.js +5 -5
  241. package/dist/esm/form-control-number.entry.js +6 -6
  242. package/dist/esm/form-control-radio.entry.js +4 -4
  243. package/dist/esm/{get-business-GEPTefIj.js → get-business-BSRtbTh7.js} +2 -2
  244. package/dist/esm/{get-payment-details-DXhXxFPr.js → get-payment-details-DtkGDTwo.js} +9 -8
  245. package/dist/esm/{get-payout-csv-D7IYYqVL.js → get-payout-csv-U_pgdPpb.js} +2 -2
  246. package/dist/esm/{get-subaccounts-CtHj1UM6.js → get-subaccounts-C-ENQBmY.js} +10 -9
  247. package/dist/esm/gross-payment-chart-core.entry.js +6 -6
  248. package/dist/esm/{header-1-D2gZb3iT.js → header-1-5FIT-wD7.js} +2 -2
  249. package/dist/esm/{header-3-DAg8Vh4B.js → header-3-Ce9WLWBm.js} +2 -2
  250. package/dist/esm/{iframe-input.entry.js → hidden-input_2.entry.js} +106 -10
  251. package/dist/esm/{index-D6FDxSyt.js → index-Bta_r52Z.js} +22 -5
  252. package/dist/esm/{index-Cc3u0uDC.js → index-Cf8VXyXg.js} +1 -1
  253. package/dist/esm/{insurance-state-CsZbKSgm.js → insurance-state-BcwZy_5w.js} +3 -3
  254. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +17 -16
  255. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +17 -16
  256. package/dist/esm/justifi-additional-statement_8.entry.js +11 -11
  257. package/dist/esm/justifi-bank-account-form.entry.js +83 -0
  258. package/dist/esm/justifi-billing-information-form.entry.js +49 -0
  259. package/dist/esm/justifi-business-details.entry.js +18 -17
  260. package/dist/esm/justifi-business-form.entry.js +25 -24
  261. package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
  262. package/dist/esm/justifi-card-form.entry.js +91 -0
  263. package/dist/esm/justifi-checkout-core.entry.js +11 -11
  264. package/dist/esm/justifi-checkout-summary.entry.js +19 -0
  265. package/dist/esm/justifi-checkout.entry.js +27 -70
  266. package/dist/esm/justifi-checkouts-list-filters.entry.js +14 -13
  267. package/dist/esm/justifi-checkouts-list.entry.js +21 -20
  268. package/dist/esm/justifi-config-provider.entry.js +3 -3
  269. package/dist/esm/justifi-details.entry.js +3 -3
  270. package/dist/esm/justifi-dispute-management-core.entry.js +3 -3
  271. package/dist/esm/justifi-dispute-management.entry.js +16 -15
  272. package/dist/esm/justifi-dispute-notification_3.entry.js +22 -21
  273. package/dist/esm/justifi-gross-payment-chart.entry.js +16 -15
  274. package/dist/esm/justifi-modular-checkout.entry.js +203 -0
  275. package/dist/esm/justifi-order-terminals.entry.js +21 -20
  276. package/dist/esm/justifi-owner-form_3.entry.js +19 -18
  277. package/dist/esm/justifi-payment-details.entry.js +18 -17
  278. package/dist/esm/justifi-payment-provisioning-core.entry.js +5 -5
  279. package/dist/esm/justifi-payment-provisioning.entry.js +16 -15
  280. package/dist/esm/justifi-payment-transactions-list.entry.js +20 -19
  281. package/dist/esm/justifi-payments-list-filters.entry.js +8 -8
  282. package/dist/esm/justifi-payments-list.entry.js +21 -20
  283. package/dist/esm/justifi-payout-details.entry.js +18 -17
  284. package/dist/esm/justifi-payout-transactions-list.entry.js +20 -19
  285. package/dist/esm/justifi-payouts-list-filters.entry.js +8 -8
  286. package/dist/esm/justifi-payouts-list.entry.js +23 -22
  287. package/dist/esm/justifi-postal-code-form.entry.js +48 -0
  288. package/dist/esm/justifi-refund-payment.entry.js +21 -20
  289. package/dist/esm/justifi-saved-payment-methods.entry.js +29 -0
  290. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +7 -7
  291. package/dist/esm/justifi-season-interruption-insurance.entry.js +22 -23
  292. package/dist/esm/justifi-sezzle-payment-method.entry.js +78 -0
  293. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +15 -14
  294. package/dist/esm/justifi-terminal-orders-list.entry.js +19 -18
  295. package/dist/esm/justifi-terminals-list-filters.entry.js +14 -13
  296. package/dist/esm/justifi-terminals-list.entry.js +21 -20
  297. package/dist/esm/justifi-tokenize-payment-method.entry.js +24 -16
  298. package/dist/esm/loader.js +3 -4
  299. package/dist/esm/{package-BjMTOtI1.js → package-CyXXks-Q.js} +1 -1
  300. package/dist/esm/pagination-menu.entry.js +2 -2
  301. package/dist/esm/{parts-BrLVc_85.js → parts-_6eQgwfE.js} +1 -1
  302. package/dist/esm/payment-details-core.entry.js +16 -16
  303. package/dist/esm/payment-method-option-utils-8n_ALxec.js +23 -0
  304. package/dist/esm/{payment-provisioning-actions-BIfyW239.js → payment-provisioning-actions-2qP7AtHj.js} +2 -2
  305. package/dist/esm/{payment.service-2afJc31y.js → payment.service-DoUv1QsX.js} +7 -6
  306. package/dist/esm/payments-list-core.entry.js +18 -17
  307. package/dist/esm/{payments-list-params-state-Bn7pL-8x.js → payments-list-params-state-DhPyCV-V.js} +1 -1
  308. package/dist/esm/{payments-status-CIUXcA0w.js → payments-status-BeL2gi3P.js} +2 -2
  309. package/dist/esm/{payments-table-B8316Kqz.js → payments-table-MrDAlH2o.js} +4 -4
  310. package/dist/esm/payout-details-core.entry.js +12 -12
  311. package/dist/esm/{payout.service-Bd8Tc7-Q.js → payout.service-B_Fm08zQ.js} +7 -6
  312. package/dist/esm/payouts-list-core.entry.js +18 -17
  313. package/dist/esm/{payouts-list-params-state-Bn7pL-8x.js → payouts-list-params-state-DhPyCV-V.js} +1 -1
  314. package/dist/esm/{payouts-status-Clo03qUI.js → payouts-status-BxbhUjA3.js} +2 -2
  315. package/dist/esm/{payouts-table-Ip10eH4Q.js → payouts-table-HoX3UYIj.js} +4 -4
  316. package/dist/esm/{schema-validations-C7D5tPzq.js → schema-validations-DYV7urvw.js} +3 -3
  317. package/dist/esm/{skeleton-Dlpibtr0.js → skeleton-CPNYhX-V.js} +2 -2
  318. package/dist/esm/{spinner-onCBxbdo.js → spinner-Cl-6YJPf.js} +2 -2
  319. package/dist/esm/{styled-host-C7vaWLiB.js → styled-host-BSX_LSdk.js} +1 -1
  320. package/dist/esm/{table-p4dOlFPi.js → table-RCk8zh4L.js} +3 -3
  321. package/dist/esm/table-filters-menu.entry.js +4 -4
  322. package/dist/esm/terminal-orders-list-core.entry.js +17 -16
  323. package/dist/esm/{terminal-orders-list-params-state-Bn7pL-8x.js → terminal-orders-list-params-state-DhPyCV-V.js} +1 -1
  324. package/dist/esm/{terminal-orders-table-CCJT7oq4.js → terminal-orders-table-DxHLNkx_.js} +11 -10
  325. package/dist/esm/terminal-quantity-selector.entry.js +3 -3
  326. package/dist/esm/{terminal.service-8kwGru35.js → terminal.service-2VkdfNas.js} +7 -6
  327. package/dist/esm/terminals-list-core.entry.js +17 -16
  328. package/dist/esm/terminals-list-params-state-DhPyCV-V.js +16 -0
  329. package/dist/esm/{terminals-table-cMkKUVff.js → terminals-table-v-LOevYA.js} +4 -4
  330. package/dist/esm/{utils-BpP_VJGf.js → utils-1WrbuHVR.js} +2 -2
  331. package/dist/esm/{utils-Dccsn9BY.js → utils-BZvep88z.js} +1 -1
  332. package/dist/esm/{utils-DB5fh6Iv.js → utils-BjLkBMLe.js} +1 -1
  333. package/dist/esm/webcomponents.js +4 -5
  334. package/dist/module/{check-pkg-version.js → Analytics.js} +21 -21
  335. package/dist/module/Checkout.js +3 -3
  336. package/dist/module/additional-statement.js +1 -1
  337. package/dist/module/bank-account-form2.js +2 -2
  338. package/dist/module/billing-form-schema.js +24 -0
  339. package/dist/module/billing-form.js +3 -3
  340. package/dist/module/business-address-schema.js +1 -1
  341. package/dist/module/business-bank-account-form-step-core.js +1 -1
  342. package/dist/module/business-core-info-schema.js +1 -1
  343. package/dist/module/business-identity-schema.js +1 -1
  344. package/dist/module/button.js +1 -1
  345. package/dist/module/cancellation-policy.js +1 -1
  346. package/dist/module/card-form2.js +2 -2
  347. package/dist/module/checkout-actions.js +58 -0
  348. package/dist/module/checkout-core.js +32 -38
  349. package/dist/module/checkout.store.js +27 -0
  350. package/dist/module/checkouts-list-core2.js +2 -2
  351. package/dist/module/custom-popper2.js +2 -2
  352. package/dist/module/customer-details.js +1 -1
  353. package/dist/module/dispute-management-core.js +1 -1
  354. package/dist/module/dispute-notification.js +1 -1
  355. package/dist/module/dispute-response-core.js +1 -1
  356. package/dist/module/dispute-response.js +2 -2
  357. package/dist/module/duplicate-charge.js +1 -1
  358. package/dist/module/electronic-evidence.js +1 -1
  359. package/dist/module/form-control-checkbox2.js +2 -2
  360. package/dist/module/form-control-date2.js +2 -2
  361. package/dist/module/form-control-file-v22.js +1 -1
  362. package/dist/module/form-control-file2.js +2 -2
  363. package/dist/module/form-control-monetary2.js +2 -2
  364. package/dist/module/form-control-number-masked2.js +2 -2
  365. package/dist/module/form-control-number.js +2 -2
  366. package/dist/module/form-control-radio2.js +2 -2
  367. package/dist/module/form-control-select2.js +2 -2
  368. package/dist/module/form-control-text2.js +2 -2
  369. package/dist/module/form-control-textarea2.js +2 -2
  370. package/dist/module/gross-payment-chart-core2.js +1 -1
  371. package/dist/module/hidden-input2.js +1 -1
  372. package/dist/module/iframe-input2.js +5 -5
  373. package/dist/module/justifi-bank-account-form.d.ts +11 -0
  374. package/dist/module/justifi-bank-account-form.js +103 -0
  375. package/dist/module/justifi-billing-information-form.d.ts +11 -0
  376. package/dist/module/justifi-billing-information-form.js +94 -0
  377. package/dist/module/justifi-business-details.js +1 -1
  378. package/dist/module/justifi-business-form.js +1 -1
  379. package/dist/module/justifi-card-form.d.ts +11 -0
  380. package/dist/module/justifi-card-form.js +111 -0
  381. package/dist/module/justifi-checkout-summary.d.ts +11 -0
  382. package/dist/module/justifi-checkout-summary.js +37 -0
  383. package/dist/module/justifi-checkout.js +48 -99
  384. package/dist/module/justifi-checkouts-list-filters.js +2 -2
  385. package/dist/module/justifi-checkouts-list.js +2 -2
  386. package/dist/module/justifi-dispute-management.js +2 -2
  387. package/dist/module/justifi-gross-payment-chart.js +1 -1
  388. package/dist/module/justifi-modular-checkout.d.ts +11 -0
  389. package/dist/module/justifi-modular-checkout.js +219 -0
  390. package/dist/module/justifi-order-terminals.js +3 -3
  391. package/dist/module/justifi-payment-details.js +1 -1
  392. package/dist/module/justifi-payment-provisioning.js +1 -1
  393. package/dist/module/justifi-payment-transactions-list.js +3 -3
  394. package/dist/module/justifi-payments-list-filters.js +3 -3
  395. package/dist/module/justifi-payments-list.js +2 -2
  396. package/dist/module/justifi-payout-details.js +1 -1
  397. package/dist/module/justifi-payout-transactions-list.js +3 -3
  398. package/dist/module/justifi-payouts-list-filters.js +3 -3
  399. package/dist/module/justifi-payouts-list.js +2 -2
  400. package/dist/module/justifi-postal-code-form.d.ts +11 -0
  401. package/dist/module/justifi-postal-code-form.js +86 -0
  402. package/dist/module/justifi-refund-payment.js +1 -1
  403. package/dist/module/justifi-saved-payment-methods.d.ts +11 -0
  404. package/dist/module/justifi-saved-payment-methods.js +58 -0
  405. package/dist/module/justifi-season-interruption-insurance.js +9 -11
  406. package/dist/module/justifi-sezzle-payment-method.js +108 -1
  407. package/dist/module/justifi-terminal-orders-list-filters.js +3 -3
  408. package/dist/module/justifi-terminal-orders-list.js +2 -2
  409. package/dist/module/justifi-terminals-list-filters.js +2 -2
  410. package/dist/module/justifi-terminals-list.js +2 -2
  411. package/dist/module/justifi-tokenize-payment-method.js +41 -40
  412. package/dist/module/package.js +3 -3
  413. package/dist/module/parts.js +1 -1
  414. package/dist/module/payment-details-core2.js +8 -8
  415. package/dist/module/payment-method-option-utils.js +23 -0
  416. package/dist/module/payment-method-options.js +34 -51
  417. package/dist/module/payments-list-core2.js +2 -2
  418. package/dist/module/payout-details-core2.js +3 -3
  419. package/dist/module/payouts-list-core2.js +2 -2
  420. package/dist/module/product-or-service.js +1 -1
  421. package/dist/module/refund-policy.js +1 -1
  422. package/dist/module/saved-payment-method.js +2 -22
  423. package/dist/module/schema-validations.js +1 -1
  424. package/dist/module/shipping-details.js +1 -1
  425. package/dist/module/table-filters-menu2.js +2 -2
  426. package/dist/module/terminal-orders-list-core2.js +2 -2
  427. package/dist/module/terminal-quantity-selector2.js +1 -1
  428. package/dist/module/terminals-list-core2.js +2 -2
  429. package/dist/types/api/BillingInformation.d.ts +13 -0
  430. package/dist/types/api/Checkout.d.ts +14 -13
  431. package/dist/types/api/ComponentError.d.ts +3 -1
  432. package/dist/types/api/PaymentMethod.d.ts +21 -0
  433. package/dist/types/components/checkout/checkout.d.ts +1 -0
  434. package/dist/types/components/checkout/payment-method-options.d.ts +0 -1
  435. package/dist/types/components/insurance/season-interruption/season-interruption-insurance.d.ts +2 -2
  436. package/dist/types/components/modular-checkout/modular-checkout.d.ts +31 -0
  437. package/dist/types/components/modular-checkout-parts/bank-account-skeleton.d.ts +6 -0
  438. package/dist/types/components/modular-checkout-parts/bank-account.d.ts +18 -0
  439. package/dist/types/components/modular-checkout-parts/billing-form-schema.d.ts +23 -0
  440. package/dist/types/components/modular-checkout-parts/billing-form.d.ts +16 -0
  441. package/dist/types/components/modular-checkout-parts/card-form-skeleton.d.ts +6 -0
  442. package/dist/types/components/modular-checkout-parts/card-form.d.ts +20 -0
  443. package/dist/types/components/modular-checkout-parts/postal-code-form.d.ts +16 -0
  444. package/dist/types/components/modular-checkout-parts/saved-payment-methods.d.ts +5 -0
  445. package/dist/types/components/{checkout → modular-checkout-parts}/sezzle-payment-method.d.ts +2 -8
  446. package/dist/types/components/modular-checkout-parts/summary.d.ts +3 -0
  447. package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +2 -2
  448. package/dist/types/components.d.ts +429 -22
  449. package/dist/types/stencil-public-runtime.d.ts +1 -1
  450. package/dist/types/store/checkout.store.d.ts +19 -0
  451. package/dist/types/ui-components/form/iframe-input.d.ts +2 -1
  452. package/dist/webcomponents/p-00900e52.entry.js +1 -0
  453. package/dist/webcomponents/p-025ae692.entry.js +1 -0
  454. package/dist/webcomponents/p-02e26641.entry.js +1 -0
  455. package/dist/webcomponents/p-04c91ec1.entry.js +1 -0
  456. package/dist/webcomponents/{p-bf3e8295.entry.js → p-0c13f2da.entry.js} +1 -1
  457. package/dist/webcomponents/p-0d5e93b3.entry.js +1 -0
  458. package/dist/webcomponents/{p-90c24cda.entry.js → p-15c63931.entry.js} +1 -1
  459. package/dist/webcomponents/p-19b5f93a.entry.js +1 -0
  460. package/dist/webcomponents/p-1ac365b4.entry.js +1 -0
  461. package/dist/webcomponents/{p-b40108c0.entry.js → p-1d59c747.entry.js} +1 -1
  462. package/dist/webcomponents/p-1d64d86b.entry.js +1 -0
  463. package/dist/webcomponents/p-20d7db42.entry.js +1 -0
  464. package/dist/webcomponents/p-25b310f0.entry.js +1 -0
  465. package/dist/webcomponents/p-271b131d.entry.js +1 -0
  466. package/dist/webcomponents/p-2882b4e9.entry.js +1 -0
  467. package/dist/webcomponents/p-2a08ba01.entry.js +1 -0
  468. package/dist/webcomponents/p-2f027626.entry.js +1 -0
  469. package/dist/webcomponents/p-2fa36c0e.entry.js +1 -0
  470. package/dist/webcomponents/p-379584fb.entry.js +1 -0
  471. package/dist/webcomponents/p-39f31e23.entry.js +1 -0
  472. package/dist/webcomponents/p-3b6888c5.entry.js +1 -0
  473. package/dist/webcomponents/p-3d62f9a5.entry.js +1 -0
  474. package/dist/webcomponents/p-3edd5ebd.entry.js +1 -0
  475. package/dist/webcomponents/p-4232760b.entry.js +1 -0
  476. package/dist/webcomponents/p-4be4f7b4.entry.js +1 -0
  477. package/dist/webcomponents/p-531738ae.entry.js +1 -0
  478. package/dist/webcomponents/p-54019e68.entry.js +1 -0
  479. package/dist/webcomponents/{p-3e94cf62.entry.js → p-584ba20d.entry.js} +1 -1
  480. package/dist/webcomponents/p-5bc6f1e6.entry.js +20 -0
  481. package/dist/webcomponents/p-5bfbb0f8.entry.js +1 -0
  482. package/dist/webcomponents/{p-19b9c96a.entry.js → p-5da3ba38.entry.js} +1 -1
  483. package/dist/webcomponents/{p-bb50155f.entry.js → p-5ea3cfca.entry.js} +1 -1
  484. package/dist/webcomponents/p-5f9dbaff.entry.js +1 -0
  485. package/dist/webcomponents/p-6b229318.entry.js +1 -0
  486. package/dist/webcomponents/p-6fc1ace5.entry.js +1 -0
  487. package/dist/webcomponents/{p-7733b67b.entry.js → p-712220f9.entry.js} +1 -1
  488. package/dist/webcomponents/p-716d41f2.entry.js +1 -0
  489. package/dist/webcomponents/p-7253f1ea.entry.js +1 -0
  490. package/dist/webcomponents/{p-BH0Xfn-F.js → p-7MWRbTXI.js} +1 -1
  491. package/dist/webcomponents/p-80b662de.entry.js +1 -0
  492. package/dist/webcomponents/p-82164a5e.entry.js +1 -0
  493. package/dist/webcomponents/p-8532c68c.entry.js +1 -0
  494. package/dist/webcomponents/p-8590c5df.entry.js +1 -0
  495. package/dist/webcomponents/p-8e555a6e.entry.js +1 -0
  496. package/dist/webcomponents/p-96f89c69.entry.js +1 -0
  497. package/dist/webcomponents/p-98a39544.entry.js +1 -0
  498. package/dist/webcomponents/{p-BnE7qgLh.js → p-9REosSLu.js} +1 -1
  499. package/dist/webcomponents/{p-1678e9e3.entry.js → p-9a17fd5a.entry.js} +1 -1
  500. package/dist/webcomponents/p-9a9f9c57.entry.js +1 -0
  501. package/dist/webcomponents/{p-D5XSsLKb.js → p-B4MIwTdb.js} +1 -1
  502. package/dist/webcomponents/{p-n2YROtpe.js → p-B7VsiIW-.js} +1 -1
  503. package/dist/webcomponents/p-B8Ovjy6S.js +1 -0
  504. package/dist/webcomponents/p-BE5Nvydk.js +1 -0
  505. package/dist/webcomponents/{p-DuYlA4lj.js → p-BEDtXmpq.js} +1 -1
  506. package/dist/webcomponents/p-BGHVK-vQ.js +1 -0
  507. package/dist/webcomponents/{p-Bk4gk-f7.js → p-BPCw4WEY.js} +1 -1
  508. package/dist/webcomponents/p-BSUCBhkJ.js +1 -0
  509. package/dist/webcomponents/{p-HBDBB6lL.js → p-BhLPwu1L.js} +1 -1
  510. package/dist/webcomponents/p-BhrFjjAs.js +1 -0
  511. package/dist/webcomponents/p-BoGb-Wsw.js +1 -0
  512. package/dist/webcomponents/p-Bond4qGX.js +1 -0
  513. package/dist/webcomponents/p-BpEw7AJl.js +1 -0
  514. package/dist/webcomponents/p-Bta_r52Z.js +2 -0
  515. package/dist/webcomponents/{p-BTS3E50C.js → p-BxfUcCXo.js} +1 -1
  516. package/dist/webcomponents/p-C-WgCIei.js +1 -0
  517. package/dist/webcomponents/p-CBs671Ol.js +1 -0
  518. package/dist/webcomponents/{p-l3uWWMRW.js → p-CCpqJxzB.js} +1 -1
  519. package/dist/webcomponents/p-CDTncSrX.js +1 -0
  520. package/dist/webcomponents/p-CLpgfEbx.js +1 -0
  521. package/dist/webcomponents/p-CRYPNa2o.js +1 -0
  522. package/dist/webcomponents/p-CbGBEkk3.js +1 -0
  523. package/dist/webcomponents/p-CeNlJX4-.js +1 -0
  524. package/dist/webcomponents/p-CnnRWu7z.js +1 -0
  525. package/dist/webcomponents/{p-C0WFYqwq.js → p-CqVelcDt.js} +1 -1
  526. package/dist/webcomponents/p-Ct-uNz2r.js +1 -0
  527. package/dist/webcomponents/{p-uSM1EMk-.js → p-Ctw40vkk.js} +1 -1
  528. package/dist/webcomponents/p-CvChBLtI.js +1 -0
  529. package/dist/webcomponents/{p-D0ptm6-3.js → p-CwHYDF33.js} +1 -1
  530. package/dist/webcomponents/p-CyXXks-Q.js +1 -0
  531. package/dist/webcomponents/p-Czro_9VO.js +1 -0
  532. package/dist/webcomponents/{p-Cd06j2SL.js → p-D3BIZZrc.js} +1 -1
  533. package/dist/webcomponents/{p-DnB1x5JE.js → p-D3SYNGyb.js} +1 -1
  534. package/dist/webcomponents/{p-DzFysjCc.js → p-D7js9xfx.js} +1 -1
  535. package/dist/webcomponents/p-DKClunJd.js +1 -0
  536. package/dist/webcomponents/p-DOB09NZD.js +1 -0
  537. package/dist/webcomponents/p-DUdzWNqB.js +1 -0
  538. package/dist/webcomponents/p-D_FOQEGU.js +1 -0
  539. package/dist/webcomponents/p-DaS3t0DL.js +1 -0
  540. package/dist/webcomponents/p-DddGO-XR.js +1 -0
  541. package/dist/webcomponents/p-Dge4w7_c.js +1 -0
  542. package/dist/webcomponents/p-DkWBoLsd.js +1 -0
  543. package/dist/webcomponents/p-DknV-QPT.js +1 -0
  544. package/dist/webcomponents/p-DnX5CZFd.js +1 -0
  545. package/dist/webcomponents/p-DuiQuWNq.js +1 -0
  546. package/dist/webcomponents/p-Dw6NWKHn.js +1 -0
  547. package/dist/webcomponents/p-DzPrenCi.js +1 -0
  548. package/dist/webcomponents/p-NqdaxjDT.js +1 -0
  549. package/dist/webcomponents/p-YDuIVoos.js +1 -0
  550. package/dist/webcomponents/{p-D2ZiLcDE.js → p-Yj41tobi.js} +1 -1
  551. package/dist/webcomponents/{p-BrLVc_85.js → p-_6eQgwfE.js} +1 -1
  552. package/dist/webcomponents/p-a2db11b5.entry.js +1 -0
  553. package/dist/webcomponents/p-a31913e3.entry.js +1 -0
  554. package/dist/webcomponents/p-a4d457e9.entry.js +1 -0
  555. package/dist/webcomponents/{p-a8119fda.entry.js → p-b3e6d27c.entry.js} +1 -1
  556. package/dist/webcomponents/p-b8ee41c1.entry.js +1 -0
  557. package/dist/webcomponents/p-bde749ac.entry.js +1 -0
  558. package/dist/webcomponents/{p-a136ff22.entry.js → p-be51c7c5.entry.js} +1 -1
  559. package/dist/webcomponents/p-bf16b11c.entry.js +1 -0
  560. package/dist/webcomponents/p-ce291c6a.entry.js +1 -0
  561. package/dist/webcomponents/p-d82b509a.entry.js +1 -0
  562. package/dist/webcomponents/p-d9b06582.entry.js +1 -0
  563. package/dist/webcomponents/p-dbc02ba8.entry.js +1 -0
  564. package/dist/webcomponents/p-dcad0df5.entry.js +1 -0
  565. package/dist/webcomponents/{p-59abf1de.entry.js → p-df2ad580.entry.js} +1 -1
  566. package/dist/webcomponents/p-e03630ec.entry.js +1 -0
  567. package/dist/webcomponents/p-e07sVz4Z.js +1 -0
  568. package/dist/webcomponents/p-e563df65.entry.js +1 -0
  569. package/dist/webcomponents/{p-57c89023.entry.js → p-e8294f7e.entry.js} +1 -1
  570. package/dist/webcomponents/p-ea664ada.entry.js +1 -0
  571. package/dist/webcomponents/p-ec9bb3f6.entry.js +1 -0
  572. package/dist/webcomponents/p-ecf6a315.entry.js +1 -0
  573. package/dist/webcomponents/{p-2c7ae3ac.entry.js → p-ef9dcfe1.entry.js} +1 -1
  574. package/dist/webcomponents/{p-33b23638.entry.js → p-f71b1ff0.entry.js} +1 -1
  575. package/dist/webcomponents/{p-99b080d9.entry.js → p-f7e24a51.entry.js} +1 -1
  576. package/dist/webcomponents/{p-5e467788.entry.js → p-ff223825.entry.js} +1 -1
  577. package/dist/webcomponents/p-hDoH7hHP.js +1 -0
  578. package/dist/webcomponents/p-pGzabKc7.js +1 -0
  579. package/dist/webcomponents/p-uLUlLQpP.js +1 -0
  580. package/dist/webcomponents/p-zucQG3cz.js +1 -0
  581. package/dist/webcomponents/webcomponents.esm.js +1 -1
  582. package/package.json +1 -1
  583. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
  584. package/dist/cjs/iframe-input-styles-state-D9vhHzZQ.js +0 -26
  585. package/dist/cjs/terminals-list-params-state-BvG5Ysrg.js +0 -22
  586. package/dist/collection/components/checkout/sezzle-payment-method.js +0 -240
  587. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  588. package/dist/esm/iframe-input-styles-state-ibYqbF--.js +0 -23
  589. package/dist/esm/terminals-list-params-state-Bn7pL-8x.js +0 -16
  590. package/dist/module/sezzle-payment-method.js +0 -104
  591. package/dist/webcomponents/p-10d41e17.entry.js +0 -1
  592. package/dist/webcomponents/p-16d29d0b.entry.js +0 -1
  593. package/dist/webcomponents/p-22a0b397.entry.js +0 -1
  594. package/dist/webcomponents/p-292da2d4.entry.js +0 -1
  595. package/dist/webcomponents/p-2c8d7aa9.entry.js +0 -1
  596. package/dist/webcomponents/p-3368d3d5.entry.js +0 -1
  597. package/dist/webcomponents/p-3a979295.entry.js +0 -1
  598. package/dist/webcomponents/p-40f7e3af.entry.js +0 -1
  599. package/dist/webcomponents/p-4680f931.entry.js +0 -1
  600. package/dist/webcomponents/p-4a070b7a.entry.js +0 -1
  601. package/dist/webcomponents/p-4b51a896.entry.js +0 -1
  602. package/dist/webcomponents/p-4f8b9b99.entry.js +0 -1
  603. package/dist/webcomponents/p-57fc593a.entry.js +0 -1
  604. package/dist/webcomponents/p-5d81f36e.entry.js +0 -1
  605. package/dist/webcomponents/p-5df5aa41.entry.js +0 -1
  606. package/dist/webcomponents/p-639baa7d.entry.js +0 -1
  607. package/dist/webcomponents/p-6429afb4.entry.js +0 -1
  608. package/dist/webcomponents/p-6n7viK-J.js +0 -1
  609. package/dist/webcomponents/p-70c498d4.entry.js +0 -1
  610. package/dist/webcomponents/p-722c5e42.entry.js +0 -1
  611. package/dist/webcomponents/p-758ce5e5.entry.js +0 -20
  612. package/dist/webcomponents/p-77896e7b.entry.js +0 -1
  613. package/dist/webcomponents/p-77ac321c.entry.js +0 -1
  614. package/dist/webcomponents/p-7d3cf734.entry.js +0 -1
  615. package/dist/webcomponents/p-8183c2d1.entry.js +0 -1
  616. package/dist/webcomponents/p-8ad67f87.entry.js +0 -1
  617. package/dist/webcomponents/p-8c107267.entry.js +0 -1
  618. package/dist/webcomponents/p-935bbc62.entry.js +0 -1
  619. package/dist/webcomponents/p-93df56e1.entry.js +0 -1
  620. package/dist/webcomponents/p-B0cQ2RjH.js +0 -1
  621. package/dist/webcomponents/p-B190pN0v.js +0 -1
  622. package/dist/webcomponents/p-BR7flk4G.js +0 -1
  623. package/dist/webcomponents/p-BjMTOtI1.js +0 -1
  624. package/dist/webcomponents/p-C0IqfGFc.js +0 -1
  625. package/dist/webcomponents/p-C1sOJl-_.js +0 -1
  626. package/dist/webcomponents/p-C5RuuShs.js +0 -1
  627. package/dist/webcomponents/p-COcul8pX.js +0 -1
  628. package/dist/webcomponents/p-CQdeVKF8.js +0 -1
  629. package/dist/webcomponents/p-CaGOSFHG.js +0 -1
  630. package/dist/webcomponents/p-CgxzrbM_.js +0 -1
  631. package/dist/webcomponents/p-Cm_0sqXz.js +0 -1
  632. package/dist/webcomponents/p-Cs0cIpIm.js +0 -1
  633. package/dist/webcomponents/p-Cx60eQXT.js +0 -1
  634. package/dist/webcomponents/p-D4Mv5jCp.js +0 -1
  635. package/dist/webcomponents/p-D6FDxSyt.js +0 -2
  636. package/dist/webcomponents/p-DClC2nMO.js +0 -1
  637. package/dist/webcomponents/p-DDEz7_ad.js +0 -1
  638. package/dist/webcomponents/p-DJzjeg3x.js +0 -1
  639. package/dist/webcomponents/p-DQuL1Twl.js +0 -1
  640. package/dist/webcomponents/p-DR89sFne.js +0 -1
  641. package/dist/webcomponents/p-DVnVdicA.js +0 -1
  642. package/dist/webcomponents/p-DgfzEZny.js +0 -1
  643. package/dist/webcomponents/p-DjGTAHJM.js +0 -1
  644. package/dist/webcomponents/p-DniQ6yo6.js +0 -1
  645. package/dist/webcomponents/p-DvhDilDP.js +0 -1
  646. package/dist/webcomponents/p-SdntD1xf.js +0 -1
  647. package/dist/webcomponents/p-U30-0DaA.js +0 -1
  648. package/dist/webcomponents/p-_pH3Hg4P.js +0 -1
  649. package/dist/webcomponents/p-a0662195.entry.js +0 -1
  650. package/dist/webcomponents/p-a33cfcfe.entry.js +0 -1
  651. package/dist/webcomponents/p-a6722f44.entry.js +0 -1
  652. package/dist/webcomponents/p-a94952f6.entry.js +0 -1
  653. package/dist/webcomponents/p-abdae97a.entry.js +0 -1
  654. package/dist/webcomponents/p-af09b6ee.entry.js +0 -1
  655. package/dist/webcomponents/p-b0d3aab7.entry.js +0 -1
  656. package/dist/webcomponents/p-b1586aa2.entry.js +0 -1
  657. package/dist/webcomponents/p-c01544c3.entry.js +0 -1
  658. package/dist/webcomponents/p-c3c7be24.entry.js +0 -1
  659. package/dist/webcomponents/p-c5628e09.entry.js +0 -1
  660. package/dist/webcomponents/p-c5b6b76f.entry.js +0 -1
  661. package/dist/webcomponents/p-c6490254.entry.js +0 -1
  662. package/dist/webcomponents/p-cNABKY0P.js +0 -1
  663. package/dist/webcomponents/p-ceefc483.entry.js +0 -1
  664. package/dist/webcomponents/p-clwP6zk3.js +0 -1
  665. package/dist/webcomponents/p-d8b8b17c.entry.js +0 -1
  666. package/dist/webcomponents/p-e2bfdba5.entry.js +0 -1
  667. package/dist/webcomponents/p-e73fe424.entry.js +0 -1
  668. package/dist/webcomponents/p-eHhqPyVW.js +0 -1
  669. package/dist/webcomponents/p-f23d4fdb.entry.js +0 -1
  670. package/dist/webcomponents/p-ffd197c2.entry.js +0 -1
  671. package/dist/webcomponents/p-gZGxqQgQ.js +0 -1
  672. package/dist/webcomponents/p-l3o3Ndc0.js +0 -1
  673. package/dist/webcomponents/p-r__elyG4.js +0 -1
  674. package/dist/webcomponents/p-um3YdOwW.js +0 -1
  675. package/dist/webcomponents/p-wqUvt1PB.js +0 -1
@@ -0,0 +1,20 @@
1
+ import{r as t,c as e,h as i,H as s}from"./p-Bta_r52Z.js";import{f as n,l as r}from"./p-9REosSLu.js";import{E as o}from"./p-CnnRWu7z.js";import{S as h}from"./p-DkWBoLsd.js";import"./p-BFTU3MAI.js";import"./p-_6eQgwfE.js";
2
+ /*!
3
+ * @kurkle/color v0.3.4
4
+ * https://github.com/kurkle/color#readme
5
+ * (c) 2024 Jukka Kurkela
6
+ * Released under the MIT License
7
+ */function a(t){return t+.5|0}const c=(t,e,i)=>Math.max(Math.min(t,i),e);function l(t){return c(a(2.55*t),0,255)}function u(t){return c(a(255*t),0,255)}function f(t){return c(a(t/2.55)/100,0,1)}function d(t){return c(a(100*t),0,100)}const b={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},g=[..."0123456789ABCDEF"],p=t=>g[15&t],m=t=>g[(240&t)>>4]+g[15&t],v=t=>(240&t)>>4==(15&t);const x=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function y(t,e,i){const s=e*Math.min(i,1-i),n=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return[n(0),n(8),n(4)]}function M(t,e,i){const s=(s,n=(s+t/60)%6)=>i-i*e*Math.max(Math.min(n,4-n,1),0);return[s(5),s(3),s(1)]}function w(t,e,i){const s=y(t,1,.5);let n;for(e+i>1&&(n=1/(e+i),e*=n,i*=n),n=0;n<3;n++)s[n]*=1-e-i,s[n]+=e;return s}function _(t){const e=t.r/255,i=t.g/255,s=t.b/255,n=Math.max(e,i,s),r=Math.min(e,i,s),o=(n+r)/2;let h,a,c;return n!==r&&(c=n-r,a=o>.5?c/(2-n-r):c/(n+r),h=function(t,e,i,s,n){return t===n?(e-i)/s+(e<i?6:0):e===n?(i-t)/s+2:(t-e)/s+4}(e,i,s,c,n),h=60*h+.5),[0|h,a||0,o]}function k(t,e,i,s){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,s)).map(u)}function O(t,e,i){return k(y,t,e,i)}function S(t){return(t%360+360)%360}const A={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},D={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let j;const R=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,C=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,E=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function L(t,e,i){if(t){let s=_(t);s[e]=Math.max(0,Math.min(s[e]+s[e]*i,0===e?360:1)),s=O(s),t.r=s[0],t.g=s[1],t.b=s[2]}}function P(t,e){return t?Object.assign(e||{},t):t}function T(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=u(t[3]))):(e=P(t,{r:0,g:0,b:0,a:1})).a=u(e.a),e}function I(t){return"r"===t.charAt(0)?function(t){const e=R.exec(t);let i,s,n,r=255;if(e){if(e[7]!==i){const t=+e[7];r=e[8]?l(t):c(255*t,0,255)}return i=+e[1],s=+e[3],n=+e[5],i=255&(e[2]?l(i):c(i,0,255)),s=255&(e[4]?l(s):c(s,0,255)),n=255&(e[6]?l(n):c(n,0,255)),{r:i,g:s,b:n,a:r}}}(t):function(t){const e=x.exec(t);let i,s=255;if(!e)return;e[5]!==i&&(s=e[6]?l(+e[5]):u(+e[5]));const n=S(+e[2]),r=+e[3]/100,o=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return k(w,t,e,i)}(n,r,o):"hsv"===e[1]?function(t,e,i){return k(M,t,e,i)}(n,r,o):O(n,r,o),{r:i[0],g:i[1],b:i[2],a:s}}(t)}class F{constructor(t){if(t instanceof F)return t;const e=typeof t;let i;var s,n,r;"object"===e?i=T(t):"string"===e&&(r=(s=t).length,"#"===s[0]&&(4===r||5===r?n={r:255&17*b[s[1]],g:255&17*b[s[2]],b:255&17*b[s[3]],a:5===r?17*b[s[4]]:255}:7!==r&&9!==r||(n={r:b[s[1]]<<4|b[s[2]],g:b[s[3]]<<4|b[s[4]],b:b[s[5]]<<4|b[s[6]],a:9===r?b[s[7]]<<4|b[s[8]]:255})),i=n||function(t){j||(j=function(){const t={},e=Object.keys(D),i=Object.keys(A);let s,n,r,o,h;for(s=0;s<e.length;s++){for(o=h=e[s],n=0;n<i.length;n++)r=i[n],h=h.replace(r,A[r]);r=parseInt(D[o],16),t[h]=[r>>16&255,r>>8&255,255&r]}return t}(),j.transparent=[0,0,0,0]);const e=j[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||I(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=P(this._rgb);return t&&(t.a=f(t.a)),t}set rgb(t){this._rgb=T(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${f(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(e=(t=>v(t.r)&&v(t.g)&&v(t.b)&&v(t.a))(t=this._rgb)?p:m,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=_(t),i=e[0],s=d(e[1]),n=d(e[2]);return t.a<255?`hsla(${i}, ${s}%, ${n}%, ${f(t.a)})`:`hsl(${i}, ${s}%, ${n}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let n;const r=e===n?.5:e,o=2*r-1,h=i.a-s.a,a=((o*h==-1?o:(o+h)/(1+o*h))+1)/2;n=1-a,i.r=255&a*i.r+n*s.r+.5,i.g=255&a*i.g+n*s.g+.5,i.b=255&a*i.b+n*s.b+.5,i.a=r*i.a+(1-r)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const s=E(f(t.r)),n=E(f(t.g)),r=E(f(t.b));return{r:u(C(s+i*(E(f(e.r))-s))),g:u(C(n+i*(E(f(e.g))-n))),b:u(C(r+i*(E(f(e.b))-r))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new F(this.rgb)}alpha(t){return this._rgb.a=u(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=a(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return L(this._rgb,2,t),this}darken(t){return L(this._rgb,2,-t),this}saturate(t){return L(this._rgb,1,t),this}desaturate(t){return L(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=_(t);i[0]=S(i[0]+e),i=O(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}
8
+ /*!
9
+ * Chart.js v4.4.9
10
+ * https://www.chartjs.org
11
+ * (c) 2025 Chart.js Contributors
12
+ * Released under the MIT License
13
+ */function B(){}const W=(()=>{let t=0;return()=>t++})();function N(t){return null==t}function z(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function H(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function $(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function Y(t,e){return $(t)?t:e}function V(t,e){return void 0===t?e:t}const X=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function U(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function Z(t,e,i){let s,n,r;if(z(t))for(n=t.length,s=0;s<n;s++)e.call(i,t[s],s);else if(H(t))for(r=Object.keys(t),n=r.length,s=0;s<n;s++)e.call(i,t[r[s]],r[s])}function K(t,e){let i,s,n,r;if(!t||!e||t.length!==e.length)return!1;for(i=0,s=t.length;i<s;++i)if(n=t[i],r=e[i],n.datasetIndex!==r.datasetIndex||n.index!==r.index)return!1;return!0}function Q(t){if(z(t))return t.map(Q);if(H(t)){const e=Object.create(null),i=Object.keys(t),s=i.length;let n=0;for(;n<s;++n)e[i[n]]=Q(t[i[n]]);return e}return t}function q(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function G(t,e,i,s){if(!q(t))return;const n=e[t],r=i[t];H(n)&&H(r)?J(n,r,s):e[t]=Q(r)}function J(t,e,i){const s=z(e)?e:[e],n=s.length;if(!H(t))return t;const r=(i=i||{}).merger||G;let o;for(let e=0;e<n;++e){if(o=s[e],!H(o))continue;const n=Object.keys(o);for(let e=0,s=n.length;e<s;++e)r(n[e],t,o,i)}return t}function tt(t,e){return J(t,e,{merger:et})}function et(t,e,i){if(!q(t))return;const s=e[t],n=i[t];H(s)&&H(n)?tt(s,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Q(n))}const it={"":t=>t,x:t=>t.x,y:t=>t.y};function st(t,e){const i=it[e]||(it[e]=function(t){const e=function(t){const e=t.split("."),i=[];let s="";for(const t of e)s+=t,s.endsWith("\\")?s=s.slice(0,-1)+".":(i.push(s),s="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function nt(t){return t.charAt(0).toUpperCase()+t.slice(1)}const rt=t=>void 0!==t,ot=t=>"function"==typeof t,ht=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},at=Math.PI,ct=2*at,lt=Number.POSITIVE_INFINITY,ut=at/180,ft=at/2,dt=at/4,bt=2*at/3,gt=Math.log10,pt=Math.sign;function mt(t,e,i){return Math.abs(t-e)<i}function vt(t){const e=Math.round(t);t=mt(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(gt(t))),s=t/i;return(s<=1?1:s<=2?2:s<=5?5:10)*i}function xt(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function yt(t){return t*(at/180)}function Mt(t){if(!$(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function wt(t){return(t%ct+ct)%ct}function _t(t,e,i,s){const n=wt(t),r=wt(e),o=wt(i),h=wt(r-n),a=wt(o-n),c=wt(n-r),l=wt(n-o);return n===r||n===o||s&&r===o||h>a&&c<l}function kt(t,e,i){return Math.max(e,Math.min(i,t))}function Ot(t,e,i,s=1e-6){return t>=Math.min(e,i)-s&&t<=Math.max(e,i)+s}function St(t,e,i){i=i||(i=>t[i]<e);let s,n=t.length-1,r=0;for(;n-r>1;)s=r+n>>1,i(s)?r=s:n=s;return{lo:r,hi:n}}const At=(t,e,i,s)=>St(t,i,s?s=>{const n=t[s][e];return n<i||n===i&&t[s+1][e]===i}:s=>t[s][e]<i),Dt=(t,e,i)=>St(t,i,(s=>t[s][e]>=i)),jt=["push","pop","shift","splice","unshift"];function Rt(t,e){const i=t._chartjs;if(!i)return;const s=i.listeners,n=s.indexOf(e);-1!==n&&s.splice(n,1),s.length>0||(jt.forEach((e=>{delete t[e]})),delete t._chartjs)}const Ct="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Et(t,e){let i=[],s=!1;return function(...n){i=n,s||(s=!0,Ct.call(window,(()=>{s=!1,t.apply(e,i)})))}}const Lt=t=>"start"===t?"left":"end"===t?"right":"center",Pt=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2,Tt=t=>0===t||1===t,It=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*ct/i),Ft=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*ct/i)+1,Bt={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*ft),easeOutSine:t=>Math.sin(t*ft),easeInOutSine:t=>-.5*(Math.cos(at*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Tt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Tt(t)?t:It(t,.075,.3),easeOutElastic:t=>Tt(t)?t:Ft(t,.075,.3),easeInOutElastic(t){const e=.1125;return Tt(t)?t:t<.5?.5*It(2*t,e,.45):.5+.5*Ft(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Bt.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Bt.easeInBounce(2*t):.5*Bt.easeOutBounce(2*t-1)+.5};function Wt(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Nt(t){return Wt(t)?t:new F(t)}function zt(t){return Wt(t)?t:new F(t).saturate(.5).darken(.1).hexString()}const Ht=["x","y","borderWidth","radius","tension"],$t=["color","borderColor","backgroundColor"],Yt=new Map;function Vt(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let s=Yt.get(i);return s||(s=new Intl.NumberFormat(t,e),Yt.set(i,s)),s}(e,i).format(t)}var Xt={formatters:{values:t=>z(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const s=this.chart.options.locale;let n,r=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(n="scientific"),r=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const o=gt(Math.abs(r)),h=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:n,minimumFractionDigits:h,maximumFractionDigits:h};return Object.assign(a,this.options.ticks.format),Vt(t,s,a)}}};const Ut=Object.create(null),Zt=Object.create(null);function Kt(t,e){if(!e)return t;const i=e.split(".");for(let e=0,s=i.length;e<s;++e){const s=i[e];t=t[s]||(t[s]=Object.create(null))}return t}function Qt(t,e,i){return"string"==typeof e?J(Kt(t,e),i):J(Kt(t,""),e)}class qt{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>zt(e.backgroundColor),this.hoverBorderColor=(t,e)=>zt(e.borderColor),this.hoverColor=(t,e)=>zt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Qt(this,t,e)}get(t){return Kt(this,t)}describe(t,e){return Qt(Zt,t,e)}override(t,e){return Qt(Ut,t,e)}route(t,e,i,s){const n=Kt(this,t),r=Kt(this,i),o="_"+e;Object.defineProperties(n,{[o]:{value:n[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[o],e=r[s];return H(t)?Object.assign({},e,t):V(t,e)},set(t){this[o]=t}}})}apply(t){t.forEach((t=>t(this)))}}var Gt=new qt({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:$t},numbers:{type:"number",properties:Ht}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Xt.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Jt(t,e,i,s,n){let r=e[n];return r||(r=e[n]=t.measureText(n).width,i.push(n)),r>s&&(s=r),s}function te(t,e,i){const s=t.currentDevicePixelRatio,n=0!==i?Math.max(i/2,.5):0;return Math.round((e-n)*s)/s+n}function ee(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function ie(t,e,i,s){se(t,e,i,s,null)}function se(t,e,i,s,n){let r,o,h,a,c,l,u,f;const d=e.pointStyle,b=e.rotation,g=e.radius;let p=(b||0)*ut;if(d&&"object"==typeof d&&(r=d.toString(),"[object HTMLImageElement]"===r||"[object HTMLCanvasElement]"===r))return t.save(),t.translate(i,s),t.rotate(p),t.drawImage(d,-d.width/2,-d.height/2,d.width,d.height),void t.restore();if(!(isNaN(g)||g<=0)){switch(t.beginPath(),d){default:n?t.ellipse(i,s,n/2,g,0,0,ct):t.arc(i,s,g,0,ct),t.closePath();break;case"triangle":l=n?n/2:g,t.moveTo(i+Math.sin(p)*l,s-Math.cos(p)*g),p+=bt,t.lineTo(i+Math.sin(p)*l,s-Math.cos(p)*g),p+=bt,t.lineTo(i+Math.sin(p)*l,s-Math.cos(p)*g),t.closePath();break;case"rectRounded":c=.516*g,a=g-c,o=Math.cos(p+dt)*a,u=Math.cos(p+dt)*(n?n/2-c:a),h=Math.sin(p+dt)*a,f=Math.sin(p+dt)*(n?n/2-c:a),t.arc(i-u,s-h,c,p-at,p-ft),t.arc(i+f,s-o,c,p-ft,p),t.arc(i+u,s+h,c,p,p+ft),t.arc(i-f,s+o,c,p+ft,p+at),t.closePath();break;case"rect":if(!b){a=Math.SQRT1_2*g,l=n?n/2:a,t.rect(i-l,s-a,2*l,2*a);break}p+=dt;case"rectRot":u=Math.cos(p)*(n?n/2:g),o=Math.cos(p)*g,h=Math.sin(p)*g,f=Math.sin(p)*(n?n/2:g),t.moveTo(i-u,s-h),t.lineTo(i+f,s-o),t.lineTo(i+u,s+h),t.lineTo(i-f,s+o),t.closePath();break;case"crossRot":p+=dt;case"cross":u=Math.cos(p)*(n?n/2:g),o=Math.cos(p)*g,h=Math.sin(p)*g,f=Math.sin(p)*(n?n/2:g),t.moveTo(i-u,s-h),t.lineTo(i+u,s+h),t.moveTo(i+f,s-o),t.lineTo(i-f,s+o);break;case"star":u=Math.cos(p)*(n?n/2:g),o=Math.cos(p)*g,h=Math.sin(p)*g,f=Math.sin(p)*(n?n/2:g),t.moveTo(i-u,s-h),t.lineTo(i+u,s+h),t.moveTo(i+f,s-o),t.lineTo(i-f,s+o),p+=dt,u=Math.cos(p)*(n?n/2:g),o=Math.cos(p)*g,h=Math.sin(p)*g,f=Math.sin(p)*(n?n/2:g),t.moveTo(i-u,s-h),t.lineTo(i+u,s+h),t.moveTo(i+f,s-o),t.lineTo(i-f,s+o);break;case"line":o=n?n/2:Math.cos(p)*g,h=Math.sin(p)*g,t.moveTo(i-o,s-h),t.lineTo(i+o,s+h);break;case"dash":t.moveTo(i,s),t.lineTo(i+Math.cos(p)*(n?n/2:g),s+Math.sin(p)*g);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function ne(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function re(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function oe(t){t.restore()}function he(t,e,i,s,n){if(n.strikethrough||n.underline){const r=t.measureText(s),o=e-r.actualBoundingBoxLeft,h=e+r.actualBoundingBoxRight,a=i+r.actualBoundingBoxDescent,c=n.strikethrough?(i-r.actualBoundingBoxAscent+a)/2:a;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(o,c),t.lineTo(h,c),t.stroke()}}function ae(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function ce(t,e,i,s,n,r={}){const o=z(e)?e:[e],h=r.strokeWidth>0&&""!==r.strokeColor;let a,c;for(t.save(),t.font=n.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),N(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,r),a=0;a<o.length;++a)c=o[a],r.backdrop&&ae(t,r.backdrop),h&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),N(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(c,i,s,r.maxWidth)),t.fillText(c,i,s,r.maxWidth),he(t,i,s,c,r),s+=Number(n.lineHeight);t.restore()}function le(t,e){const{x:i,y:s,w:n,h:r,radius:o}=e;t.arc(i+o.topLeft,s+o.topLeft,o.topLeft,1.5*at,at,!0),t.lineTo(i,s+r-o.bottomLeft),t.arc(i+o.bottomLeft,s+r-o.bottomLeft,o.bottomLeft,at,ft,!0),t.lineTo(i+n-o.bottomRight,s+r),t.arc(i+n-o.bottomRight,s+r-o.bottomRight,o.bottomRight,ft,0,!0),t.lineTo(i+n,s+o.topRight),t.arc(i+n-o.topRight,s+o.topRight,o.topRight,0,-ft,!0),t.lineTo(i+o.topLeft,s)}const ue=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,fe=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function de(t,e){const i=(""+t).match(ue);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function be(t,e){const i={},s=H(e),n=s?Object.keys(e):e,r=H(t)?s?i=>V(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of n)i[t]=+r(t)||0;return i}function ge(t){return be(t,{top:"y",right:"x",bottom:"y",left:"x"})}function pe(t){return be(t,["topLeft","topRight","bottomLeft","bottomRight"])}function me(t){const e=ge(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ve(t,e){let i=V((t=t||{}).size,(e=e||Gt.font).size);"string"==typeof i&&(i=parseInt(i,10));let s=V(t.style,e.style);s&&!(""+s).match(fe)&&(console.warn('Invalid font style specified: "'+s+'"'),s=void 0);const n={family:V(t.family,e.family),lineHeight:de(V(t.lineHeight,e.lineHeight),i),size:i,style:s,weight:V(t.weight,e.weight),string:""};return n.string=function(t){return!t||N(t.size)||N(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(n),n}function xe(t){let e,i,s;for(e=0,i=t.length;e<i;++e)if(s=t[e],void 0!==s&&void 0!==s)return s}function ye(t,e){return Object.assign(Object.create(t),e)}function Me(t,e=[""],i,s,n=()=>t[0]){const r=i||t;void 0===s&&(s=Ee("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:s,_getTarget:n,override:i=>Me([i,...t],e,r,s)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,s)=>Se(i,s,(()=>function(t,e,i,s){let n;for(const r of e)if(n=Ee(ke(r,t),i),void 0!==n)return Oe(t,n)?Re(i,s,t,n):n}(s,e,t,i))),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Le(t).includes(e),ownKeys:t=>Le(t),set(t,e,i){const s=t._storage||(t._storage=n());return t[e]=s[e]=i,delete t._keys,!0}})}function we(t,e,i,s){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:_e(t,s),setContext:e=>we(t,e,i,s),override:n=>we(t.override(n),e,i,s)};return new Proxy(n,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>Se(t,e,(()=>function(t,e,i){const{_proxy:s,_context:n,_subProxy:r,_descriptors:o}=t;let h=s[e];return ot(h)&&o.isScriptable(e)&&(h=function(t,e,i,s){const{_proxy:n,_context:r,_subProxy:o,_stack:h}=i;if(h.has(t))throw new Error("Recursion detected: "+Array.from(h).join("->")+"->"+t);h.add(t);let a=e(r,o||s);return h.delete(t),Oe(t,a)&&(a=Re(n._scopes,n,t,a)),a}(e,h,t,i)),z(h)&&h.length&&(h=function(t,e,i,s){const{_proxy:n,_context:r,_subProxy:o,_descriptors:h}=i;if(void 0!==r.index&&s(t))return e[r.index%e.length];if(H(e[0])){const i=e,s=n._scopes.filter((t=>t!==i));e=[];for(const a of i){const i=Re(s,n,t,a);e.push(we(i,r,o&&o[t],h))}}return e}(e,h,t,o.isIndexable)),Oe(e,h)&&(h=we(h,n,r&&r[e],o)),h}(t,e,i))),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,s)=>(t[i]=s,delete e[i],!0)})}function _e(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:s=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:i,indexable:s,isScriptable:ot(i)?i:()=>i,isIndexable:ot(s)?s:()=>s}}const ke=(t,e)=>t?t+nt(e):e,Oe=(t,e)=>H(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function Se(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const s=i();return t[e]=s,s}function Ae(t,e,i){return ot(t)?t(e,i):t}const De=(t,e)=>!0===t?e:"string"==typeof t?st(e,t):void 0;function je(t,e,i,s,n){for(const r of e){const e=De(i,r);if(e){t.add(e);const r=Ae(e._fallback,i,n);if(void 0!==r&&r!==i&&r!==s)return r}else if(!1===e&&void 0!==s&&i!==s)return null}return!1}function Re(t,e,i,s){const n=e._rootScopes,r=Ae(e._fallback,i,s),o=[...t,...n],h=new Set;h.add(s);let a=Ce(h,o,i,r||i,s);return null!==a&&(void 0===r||r===i||(a=Ce(h,o,r,a,s),null!==a))&&Me(Array.from(h),[""],n,r,(()=>function(t,e,i){const s=t._getTarget();e in s||(s[e]={});const n=s[e];return z(n)&&H(i)?i:n||{}}(e,i,s)))}function Ce(t,e,i,s,n){for(;i;)i=je(t,e,i,s,n);return i}function Ee(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function Le(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter((t=>!t.startsWith("_"))))e.add(t);return Array.from(e)}(t._scopes)),e}function Pe(t,e,i,s){const{iScale:n}=t,{key:r="r"}=this._parsing,o=new Array(s);let h,a,c,l;for(h=0,a=s;h<a;++h)c=h+i,l=e[c],o[h]={r:n.parse(st(l,r),c)};return o}function Te(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Ie(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Fe(t,e,i){let s;return"string"==typeof t?(s=parseInt(t,10),-1!==t.indexOf("%")&&(s=s/100*e.parentNode[i])):s=t,s}const Be=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),We=["top","right","bottom","left"];function Ne(t,e,i){const s={};i=i?"-"+i:"";for(let n=0;n<4;n++){const r=We[n];s[r]=parseFloat(t[e+"-"+r+i])||0}return s.width=s.left+s.right,s.height=s.top+s.bottom,s}function ze(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:s}=e,n=Be(i),r="border-box"===n.boxSizing,o=Ne(n,"padding"),h=Ne(n,"border","width"),{x:a,y:c,box:l}=function(t,e){const i=t.touches,s=i&&i.length?i[0]:t,{offsetX:n,offsetY:r}=s;let o,h,a=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(n,r,t.target))o=n,h=r;else{const t=e.getBoundingClientRect();o=s.clientX-t.left,h=s.clientY-t.top,a=!0}return{x:o,y:h,box:a}}(t,i),u=o.left+(l&&h.left),f=o.top+(l&&h.top);let{width:d,height:b}=e;return r&&(d-=o.width+h.width,b-=o.height+h.height),{x:Math.round((a-u)/d*i.width/s),y:Math.round((c-f)/b*i.height/s)}}const He=t=>Math.round(10*t)/10;function $e(t,e,i){const s=e||1,n=Math.floor(t.height*s),r=Math.floor(t.width*s);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(i||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==s||o.height!==n||o.width!==r)&&(t.currentDevicePixelRatio=s,o.height=n,o.width=r,t.ctx.setTransform(s,0,0,s,0,0),!0)}const Ye=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Te()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Ve(t,e){const i=function(t,e){return Be(t).getPropertyValue(e)}(t,e),s=i&&i.match(/^(\d+)(\.\d+)?px$/);return s?+s[1]:void 0}function Xe(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:t=>t}}function Ue(t,e){let i,s;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,s=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=s)}function Ze(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Ke(t,e,i){return t.options.clip?t[i]:e[i]}
14
+ /*!
15
+ * Chart.js v4.4.9
16
+ * https://www.chartjs.org
17
+ * (c) 2025 Chart.js Contributors
18
+ * Released under the MIT License
19
+ */
20
+ class Qe{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const n=e.duration;e.listeners[s].forEach((s=>s({chart:t,initial:e.initial,numSteps:n,currentStep:Math.min(i-e.start,n)})))}_refresh(){this._request||(this._running=!0,this._request=Ct.call(window,(()=>{this._update(),this._request=null,this._running&&this._refresh()})))}_update(t=Date.now()){let e=0;this._charts.forEach(((i,s)=>{if(!i.running||!i.items.length)return;const n=i.items;let r,o=n.length-1,h=!1;for(;o>=0;--o)r=n[o],r._active?(r._total>i.duration&&(i.duration=r._total),r.tick(t),h=!0):(n[o]=n[n.length-1],n.pop());h&&(s.draw(),this._notify(s,i,t,"progress")),n.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=n.length})),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce(((t,e)=>Math.max(t,e._duration)),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var qe=new Qe;const Ge="transparent",Je={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const s=Nt(t||Ge),n=s.valid&&Nt(e||Ge);return n&&n.valid?n.mix(s,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class ti{constructor(t,e,i,s){const n=e[i];s=xe([t.to,s,n,t.from]);const r=xe([t.from,n,s]);this._active=!0,this._fn=t.fn||Je[t.type||typeof r],this._easing=Bt[t.easing]||Bt.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],n=i-this._start,r=this._duration-n;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=n,this._loop=!!t.loop,this._to=xe([t.to,e,s,t.from]),this._from=xe([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,n=this._from,r=this._loop,o=this._to;let h;if(this._active=n!==o&&(r||e<i),!this._active)return this._target[s]=o,void this._notify(!0);e<0?this._target[s]=n:(h=e/i%2,h=r&&h>1?2-h:h,h=this._easing(Math.min(1,Math.max(0,h))),this._target[s]=this._fn(n,o,h))}wait(){const t=this._promises||(this._promises=[]);return new Promise(((e,i)=>{t.push({res:e,rej:i})}))}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class ei{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!H(t))return;const e=Object.keys(Gt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach((s=>{const n=t[s];if(!H(n))return;const r={};for(const t of e)r[t]=n[t];(z(n.properties)&&n.properties||[s]).forEach((t=>{t!==s&&i.has(t)||i.set(t,r)}))}))}_animateOptions(t,e){const i=e.options,s=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!s)return[];const n=this._createAnimations(s,i);return i.$shared&&function(t,e){const i=[],s=Object.keys(e);for(let e=0;e<s.length;e++){const n=t[s[e]];n&&n.active()&&i.push(n.wait())}return Promise.all(i)}(t.options.$animations,i).then((()=>{t.options=i}),(()=>{})),n}_createAnimations(t,e){const i=this._properties,s=[],n=t.$animations||(t.$animations={}),r=Object.keys(e),o=Date.now();let h;for(h=r.length-1;h>=0;--h){const a=r[h];if("$"===a.charAt(0))continue;if("options"===a){s.push(...this._animateOptions(t,e));continue}const c=e[a];let l=n[a];const u=i.get(a);if(l){if(u&&l.active()){l.update(u,c,o);continue}l.cancel()}u&&u.duration?(n[a]=l=new ti(u,t,a,c),s.push(l)):t[a]=c}return s}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(qe.add(this._chart,i),!0):void 0}}function ii(t,e){const i=t&&t.options||{},s=i.reverse,n=void 0===i.min?e:0,r=void 0===i.max?e:0;return{start:s?r:n,end:s?n:r}}function si(t,e){const i=[],s=t._getSortedDatasetMetas(e);let n,r;for(n=0,r=s.length;n<r;++n)i.push(s[n].index);return i}function ni(t,e,i,s={}){const n=t.keys,r="single"===s.mode;let o,h,a,c;if(null===e)return;let l=!1;for(o=0,h=n.length;o<h;++o){if(a=+n[o],a===i){if(l=!0,s.all)continue;break}c=t.values[a],$(c)&&(r||0===e||pt(e)===pt(c))&&(e+=c)}return l||s.all?e:0}function ri(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function oi(t,e,i){const s=t[e]||(t[e]={});return s[i]||(s[i]={})}function hi(t,e,i,s){for(const n of e.getMatchingVisibleMetas(s).reverse()){const e=t[n.index];if(i&&e>0||!i&&e<0)return n.index}return null}function ai(t,e){const{chart:i,_cachedMeta:s}=t,n=i._stacks||(i._stacks={}),{iScale:r,vScale:o,index:h}=s,a=r.axis,c=o.axis,l=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(r,o,s),u=e.length;let f;for(let t=0;t<u;++t){const i=e[t],{[a]:r,[c]:u}=i;f=(i._stacks||(i._stacks={}))[c]=oi(n,l,r),f[h]=u,f._top=hi(f,o,!0,s.type),f._bottom=hi(f,o,!1,s.type),(f._visualValues||(f._visualValues={}))[h]=u}}function ci(t,e){const i=t.scales;return Object.keys(i).filter((t=>i[t].axis===e)).shift()}function li(t,e){const i=t.controller.index,s=t.vScale&&t.vScale.axis;if(s){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[s]||void 0===e[s][i])return;delete e[s][i],void 0!==e[s]._visualValues&&void 0!==e[s]._visualValues[i]&&delete e[s]._visualValues[i]}}}const ui=t=>"reset"===t||"none"===t,fi=(t,e)=>e?t:Object.assign({},t);class di{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ri(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&li(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(t,e,i,s)=>"x"===t?e:"r"===t?s:i,n=e.xAxisID=V(i.xAxisID,ci(t,"x")),r=e.yAxisID=V(i.yAxisID,ci(t,"y")),o=e.rAxisID=V(i.rAxisID,ci(t,"r")),h=e.indexAxis,a=e.iAxisID=s(h,n,r,o),c=e.vAxisID=s(h,r,n,o);e.xScale=this.getScaleForId(n),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(o),e.iScale=this.getScaleForId(a),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Rt(this._data,this),t._stacked&&li(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(H(e))this._data=function(t,e){const{iScale:i,vScale:s}=e,n="x"===i.axis?"x":"y",r="x"===s.axis?"x":"y",o=Object.keys(t),h=new Array(o.length);let a,c,l;for(a=0,c=o.length;a<c;++a)l=o[a],h[a]={[n]:l,[r]:t[l]};return h}(e,this._cachedMeta);else if(i!==e){if(i){Rt(i,this);const t=this._cachedMeta;li(t),t._parsed=[]}e&&Object.isExtensible(e)&&((s=e)._chartjs?s._chartjs.listeners.push(this):(Object.defineProperty(s,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),jt.forEach((t=>{const e="_onData"+nt(t),i=s[t];Object.defineProperty(s,t,{configurable:!0,enumerable:!1,value(...t){const n=i.apply(this,t);return s._chartjs.listeners.forEach((i=>{"function"==typeof i[e]&&i[e](...t)})),n}})})))),this._syncList=[],this._data=e}var s}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const n=e._stacked;e._stacked=ri(e.vScale,e),e.stack!==i.stack&&(s=!0,li(e),e.stack=i.stack),this._resyncElements(t),(s||n!==e._stacked)&&(ai(this,e._parsed),e._stacked=ri(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:n,_stacked:r}=i,o=n.axis;let h,a,c,l=0===t&&e===s.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=s,i._sorted=!0,c=s;else{c=z(s[t])?this.parseArrayData(i,s,t,e):H(s[t])?this.parseObjectData(i,s,t,e):this.parsePrimitiveData(i,s,t,e);const n=()=>null===a[o]||u&&a[o]<u[o];for(h=0;h<e;++h)i._parsed[h+t]=a=c[h],l&&(n()&&(l=!1),u=a);i._sorted=l}r&&ai(this,c)}parsePrimitiveData(t,e,i,s){const{iScale:n,vScale:r}=t,o=n.axis,h=r.axis,a=n.getLabels(),c=n===r,l=new Array(s);let u,f,d;for(u=0,f=s;u<f;++u)d=u+i,l[u]={[o]:c||n.parse(a[d],d),[h]:r.parse(e[d],d)};return l}parseArrayData(t,e,i,s){const{xScale:n,yScale:r}=t,o=new Array(s);let h,a,c,l;for(h=0,a=s;h<a;++h)c=h+i,l=e[c],o[h]={x:n.parse(l[0],c),y:r.parse(l[1],c)};return o}parseObjectData(t,e,i,s){const{xScale:n,yScale:r}=t,{xAxisKey:o="x",yAxisKey:h="y"}=this._parsing,a=new Array(s);let c,l,u,f;for(c=0,l=s;c<l;++c)u=c+i,f=e[u],a[c]={x:n.parse(st(f,o),u),y:r.parse(st(f,h),u)};return a}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const s=this._cachedMeta,n=e[t.axis];return ni({keys:si(this.chart,!0),values:e._stacks[t.axis]._visualValues},n,s.index,{mode:i})}updateRangeFromParsed(t,e,i,s){const n=i[e.axis];let r=null===n?NaN:n;const o=s&&i._stacks[e.axis];s&&o&&(s.values=o,r=ni(s,n,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,n=i._sorted&&t===i.iScale,r=s.length,o=this._getOtherScale(t),h=((t,e)=>t&&!e.hidden&&e._stacked&&{keys:si(this.chart,!0),values:null})(e,i),a={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:l}=function(t){const{min:e,max:i,minDefined:s,maxDefined:n}=t.getUserBounds();return{min:s?e:Number.NEGATIVE_INFINITY,max:n?i:Number.POSITIVE_INFINITY}}(o);let u,f;function d(){f=s[u];const e=f[o.axis];return!$(f[t.axis])||c>e||l<e}for(u=0;u<r&&(d()||(this.updateRangeFromParsed(a,t,f,h),!n));++u);if(n)for(u=r-1;u>=0;--u)if(!d()){this.updateRangeFromParsed(a,t,f,h);break}return a}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,n,r;for(s=0,n=e.length;s<n;++s)r=e[s][t.axis],$(r)&&i.push(r);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,n=this.getParsed(t);return{label:i?""+i.getLabelForValue(n[i.axis]):"",value:s?""+s.getLabelForValue(n[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,s,n;return H(t)?(e=t.top,i=t.right,s=t.bottom,n=t.left):e=i=s=n=t,{top:e,right:i,bottom:s,left:n,disabled:!1===t}}(V(this.options.clip,function(t,e,i){if(!1===i)return!1;const s=ii(t,i),n=ii(e,i);return{top:n.end,right:s.end,bottom:n.start,left:s.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this._cachedMeta,i=e.data||[],s=this.chart.chartArea,n=[],r=this._drawStart||0,o=this._drawCount||i.length-r,h=this.options.drawActiveElementsOnTop;let a;for(e.dataset&&e.dataset.draw(t,s,r,o),a=r;a<r+o;++a){const e=i[a];e.hidden||(e.active&&h?n.push(e):e.draw(t,s))}for(a=0;a<n.length;++a)n[a].draw(t,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let n;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];n=e.$context||(e.$context=function(t,e,i){return ye(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),n.parsed=this.getParsed(t),n.raw=s.data[t],n.index=n.dataIndex=t}else n=this.$context||(this.$context=function(t,e){return ye(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),n.dataset=s,n.index=n.datasetIndex=this.index;return n.active=!!e,n.mode=i,n}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const s="active"===e,n=this._cachedDataOpts,r=t+"-"+e,o=n[r],h=this.enableOptionSharing&&rt(i);if(o)return fi(o,h);const a=this.chart.config,c=a.datasetElementScopeKeys(this._type,t),l=s?[`${t}Hover`,"hover",t,""]:[t,""],u=a.getOptionScopes(this.getDataset(),c),f=Object.keys(Gt.elements[t]),d=a.resolveNamedOptions(u,f,(()=>this.getContext(i,s,e)),l);return d.$shared&&(d.$shared=h,n[r]=Object.freeze(fi(d,h))),d}_resolveAnimations(t,e,i){const s=this.chart,n=this._cachedDataOpts,r=`animation-${e}`,o=n[r];if(o)return o;let h;if(!1!==s.options.animation){const s=this.chart.config,n=s.datasetAnimationScopeKeys(this._type,e),r=s.getOptionScopes(this.getDataset(),n);h=s.createResolver(r,this.getContext(t,i,e))}const a=new ei(s,h&&h.animations);return h&&h._cacheable&&(n[r]=Object.freeze(a)),a}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ui(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,n=this.getSharedOptions(i),r=this.includeOptions(e,n)||n!==s;return this.updateSharedOptions(n,e,i),{sharedOptions:n,includeOptions:r}}updateElement(t,e,i,s){ui(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!ui(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const n=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(n)||n})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const s=i.length,n=e.length,r=Math.min(n,s);r&&this.parse(0,r),n>s?this._insertElements(s,n-s,t):n<s&&this._removeElements(n,s-n)}_insertElements(t,e,i=!0){const s=this._cachedMeta,n=s.data,r=t+e;let o;const h=t=>{for(t.length+=e,o=t.length-1;o>=r;o--)t[o]=t[o-e]};for(h(n),o=t;o<r;++o)n[o]=new this.dataElementType;this._parsing&&h(s._parsed),this.parse(t,e),i&&this.updateElements(n,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,e);i._stacked&&li(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function bi(t,e,i,s){return z(t)?function(t,e,i,s){const n=i.parse(t[0],s),r=i.parse(t[1],s),o=Math.min(n,r),h=Math.max(n,r);let a=o,c=h;Math.abs(o)>Math.abs(h)&&(a=h,c=o),e[i.axis]=c,e._custom={barStart:a,barEnd:c,start:n,end:r,min:o,max:h}}(t,e,i,s):e[i.axis]=i.parse(t,s),e}function gi(t,e,i,s){const n=t.iScale,r=t.vScale,o=n.getLabels(),h=n===r,a=[];let c,l,u,f;for(c=i,l=i+s;c<l;++c)f=e[c],u={},u[n.axis]=h||n.parse(o[c],c),a.push(bi(f,u,r,c));return a}function pi(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function mi(t,e,i,s){let n=e.borderSkipped;const r={};if(!n)return void(t.borderSkipped=r);if(!0===n)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:o,end:h,reverse:a,top:c,bottom:l}=function(t){let e,i,s,n,r;return t.horizontal?(e=t.base>t.x,i="left",s="right"):(e=t.base<t.y,i="bottom",s="top"),e?(n="end",r="start"):(n="start",r="end"),{start:i,end:s,reverse:e,top:n,bottom:r}}(t);"middle"===n&&i&&(t.enableBorderRadius=!0,(i._top||0)===s?n=c:(i._bottom||0)===s?n=l:(r[vi(l,o,h,a)]=!0,n=c)),r[vi(n,o,h,a)]=!0,t.borderSkipped=r}function vi(t,e,i,s){var n,r,o;return s?(o=i,t=xi(t=(n=t)===(r=e)?o:n===o?r:n,i,e)):t=xi(t,e,i),t}function xi(t,e,i){return"start"===t?e:"end"===t?i:t}function yi(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}class Mi extends di{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:s,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(!1===this._parsing)s._parsed=i;else{let n,r,o=t=>+i[t];if(H(i[t])){const{key:t="value"}=this._parsing;o=e=>+st(i[e],t)}for(n=t,r=t+e;n<r;++n)s._parsed[n]=o(n)}}_getRotation(){return yt(this.options.rotation-90)}_getCircumference(){return yt(this.options.circumference)}_getRotationExtents(){let t=ct,e=-ct;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,n=s._getRotation(),r=s._getCircumference();t=Math.min(t,n),e=Math.max(e,n+r)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,n=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(n)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-r)/2,0),h=Math.min((c=o,"string"==typeof(a=this.options.cutout)&&a.endsWith("%")?parseFloat(a)/100:+a/c),1);var a,c;const l=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:d,ratioY:b,offsetX:g,offsetY:p}=function(t,e,i){let s=1,n=1,r=0,o=0;if(e<ct){const h=t,a=h+e,c=Math.cos(h),l=Math.sin(h),u=Math.cos(a),f=Math.sin(a),d=(t,e,s)=>_t(t,h,a,!0)?1:Math.max(e,e*i,s,s*i),b=(t,e,s)=>_t(t,h,a,!0)?-1:Math.min(e,e*i,s,s*i),g=d(0,c,u),p=d(ft,l,f),m=b(at,c,u),v=b(at+ft,l,f);s=(g-m)/2,n=(p-v)/2,r=-(g+m)/2,o=-(p+v)/2}return{ratioX:s,ratioY:n,offsetX:r,offsetY:o}}(f,u,h),m=Math.max(Math.min((i.width-r)/d,(i.height-r)/b)/2,0),v=X(this.options.radius,m),x=(v-Math.max(v*h,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*v,this.offsetY=p*v,s.total=this.calculateTotal(),this.outerRadius=v-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*l,0),this.updateElements(n,0,n.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,n=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===s._parsed[t]||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*n/ct)}updateElements(t,e,i,s){const n="reset"===s,r=this.chart,o=r.chartArea,h=(o.left+o.right)/2,a=(o.top+o.bottom)/2,c=n&&r.options.animation.animateScale,l=c?0:this.innerRadius,u=c?0:this.outerRadius,{sharedOptions:f,includeOptions:d}=this._getSharedOptions(e,s);let b,g=this._getRotation();for(b=0;b<e;++b)g+=this._circumference(b,n);for(b=e;b<e+i;++b){const e=this._circumference(b,n),i=t[b],r={x:h+this.offsetX,y:a+this.offsetY,startAngle:g,endAngle:g+e,circumference:e,outerRadius:u,innerRadius:l};d&&(r.options=f||this.resolveDataElementOptions(b,i.active?"active":s)),g+=e,this.updateElement(i,b,r,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,s=0;for(i=0;i<e.length;i++){const n=t._parsed[i];null===n||isNaN(n)||!this.chart.getDataVisibility(i)||e[i].hidden||(s+=Math.abs(n))}return s}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?ct*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this.chart,i=e.data.labels||[],s=Vt(this._cachedMeta._parsed[t],e.options.locale);return{label:i[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,n,r,o,h;if(!t)for(s=0,n=i.data.datasets.length;s<n;++s)if(i.isDatasetVisible(s)){r=i.getDatasetMeta(s),t=r.data,o=r.controller;break}if(!t)return 0;for(s=0,n=t.length;s<n;++s)h=o.resolveDataElementOptions(s),"inner"!==h.borderAlign&&(e=Math.max(e,h.borderWidth||0,h.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(V(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class wi extends di{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map(((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,fontColor:s,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}}))}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this.chart,i=e.data.labels||[],s=Vt(this._cachedMeta._parsed[t].r,e.options.locale);return{label:i[t]||"",value:s}}parseObjectData(t,e,i,s){return Pe.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return this._cachedMeta.data.forEach(((e,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<t.min&&(t.min=s),s>t.max&&(t.max=s))})),t}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),n=Math.max(s/2,0),r=(n-Math.max(i.cutoutPercentage?n/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=n-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(t,e,i,s){const n="reset"===s,r=this.chart,o=r.options.animation,h=this._cachedMeta.rScale,a=h.xCenter,c=h.yCenter,l=h.getIndexAngle(0)-.5*at;let u,f=l;const d=360/this.countVisibleElements();for(u=0;u<e;++u)f+=this._computeAngle(u,s,d);for(u=e;u<e+i;u++){const e=t[u];let i=f,b=f+this._computeAngle(u,s,d),g=r.getDataVisibility(u)?h.getDistanceFromCenterForValue(this.getParsed(u).r):0;f=b,n&&(o.animateScale&&(g=0),o.animateRotate&&(i=b=l));const p={x:a,y:c,innerRadius:0,outerRadius:g,startAngle:i,endAngle:b,options:this.resolveDataElementOptions(u,e.active?"active":s)};this.updateElement(e,u,p,s)}}countVisibleElements(){let t=0;return this._cachedMeta.data.forEach(((e,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&t++})),t}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?yt(this.resolveDataElementOptions(t,e).angle||i):0}}function _i(t,e,i,s){const{controller:n,data:r,_sorted:o}=t,h=n._cachedMeta.iScale,a=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(h&&e===h.axis&&"r"!==e&&o&&r.length){const o=h._reversePixels?Dt:At;if(!s){const s=o(r,e,i);if(a){const{vScale:e}=n._cachedMeta,{_parsed:i}=t,r=i.slice(0,s.lo+1).reverse().findIndex((t=>!N(t[e.axis])));s.lo-=Math.max(0,r);const o=i.slice(s.hi).findIndex((t=>!N(t[e.axis])));s.hi+=Math.max(0,o)}return s}if(n._sharedOptions){const t=r[0],s="function"==typeof t.getRange&&t.getRange(e);if(s){const t=o(r,e,i-s),n=o(r,e,i+s);return{lo:t.lo,hi:n.hi}}}}return{lo:0,hi:r.length-1}}function ki(t,e,i,s,n){const r=t.getSortedVisibleDatasetMetas(),o=i[e];for(let t=0,i=r.length;t<i;++t){const{index:i,data:h}=r[t],{lo:a,hi:c}=_i(r[t],e,o,n);for(let t=a;t<=c;++t){const e=h[t];e.skip||s(e,i,t)}}}function Oi(t,e,i,s,n){const r=[];return n||t.isPointInArea(e)?(ki(t,i,e,(function(i,o,h){(n||ne(i,t.chartArea,0))&&i.inRange(e.x,e.y,s)&&r.push({element:i,datasetIndex:o,index:h})}),!0),r):r}function Si(t,e,i,s,n,r){return r||t.isPointInArea(e)?"r"!==i||s?function(t,e,i,s,n,r){let o=[];const h=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,s){const n=e?Math.abs(t.x-s.x):0,r=i?Math.abs(t.y-s.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}}(i);let a=Number.POSITIVE_INFINITY;return ki(t,i,e,(function(i,c,l){const u=i.inRange(e.x,e.y,n);if(s&&!u)return;const f=i.getCenterPoint(n);if(!r&&!t.isPointInArea(f)&&!u)return;const d=h(e,f);d<a?(o=[{element:i,datasetIndex:c,index:l}],a=d):d===a&&o.push({element:i,datasetIndex:c,index:l})})),o}(t,e,i,s,n,r):function(t,e,i,s){let n=[];return ki(t,i,e,(function(t,i,r){const{startAngle:o,endAngle:h}=t.getProps(["startAngle","endAngle"],s),{angle:a}=function(t,e){const i=e.x-t.x,s=e.y-t.y,n=Math.sqrt(i*i+s*s);let r=Math.atan2(s,i);return r<-.5*at&&(r+=ct),{angle:r,distance:n}}(t,{x:e.x,y:e.y});_t(a,o,h)&&n.push({element:t,datasetIndex:i,index:r})})),n}(t,e,i,n):[]}function Ai(t,e,i,s,n){const r=[],o="x"===i?"inXRange":"inYRange";let h=!1;return ki(t,i,e,((t,s,a)=>{t[o]&&t[o](e[i],n)&&(r.push({element:t,datasetIndex:s,index:a}),h=h||t.inRange(e.x,e.y,n))})),s&&!h?[]:r}var Di={modes:{index(t,e,i,s){const n=ze(e,t),r=i.axis||"x",o=i.includeInvisible||!1,h=i.intersect?Oi(t,n,r,s,o):Si(t,n,r,!1,s,o),a=[];return h.length?(t.getSortedVisibleDatasetMetas().forEach((t=>{const e=h[0].index,i=t.data[e];i&&!i.skip&&a.push({element:i,datasetIndex:t.index,index:e})})),a):[]},dataset(t,e,i,s){const n=ze(e,t),r=i.axis||"xy",o=i.includeInvisible||!1;let h=i.intersect?Oi(t,n,r,s,o):Si(t,n,r,!1,s,o);if(h.length>0){const e=h[0].datasetIndex,i=t.getDatasetMeta(e).data;h=[];for(let t=0;t<i.length;++t)h.push({element:i[t],datasetIndex:e,index:t})}return h},point:(t,e,i,s)=>Oi(t,ze(e,t),i.axis||"xy",s,i.includeInvisible||!1),nearest:(t,e,i,s)=>Si(t,ze(e,t),i.axis||"xy",i.intersect,s,i.includeInvisible||!1),x:(t,e,i,s)=>Ai(t,ze(e,t),"x",i.intersect,s),y:(t,e,i,s)=>Ai(t,ze(e,t),"y",i.intersect,s)}};const ji=["left","top","right","bottom"];function Ri(t,e){return t.filter((t=>t.pos===e))}function Ci(t,e){return t.filter((t=>-1===ji.indexOf(t.pos)&&t.box.axis===e))}function Ei(t,e){return t.sort(((t,i)=>{const s=e?i:t,n=e?t:i;return s.weight===n.weight?s.index-n.index:s.weight-n.weight}))}function Li(t,e,i,s){return Math.max(t[i],e[i])+Math.max(t[s],e[s])}function Pi(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ti(t,e,i,s){const{pos:n,box:r}=i,o=t.maxPadding;if(!H(n)){i.size&&(t[n]-=i.size);const e=s[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?r.height:r.width),i.size=e.size/e.count,t[n]+=i.size}r.getPadding&&Pi(o,r.getPadding());const h=Math.max(0,e.outerWidth-Li(o,t,"left","right")),a=Math.max(0,e.outerHeight-Li(o,t,"top","bottom")),c=h!==t.w,l=a!==t.h;return t.w=h,t.h=a,i.horizontal?{same:c,other:l}:{same:l,other:c}}function Ii(t,e){const i=e.maxPadding;return function(t){const s={left:0,top:0,right:0,bottom:0};return t.forEach((t=>{s[t]=Math.max(e[t],i[t])})),s}(t?["left","right"]:["top","bottom"])}function Fi(t,e,i,s){const n=[];let r,o,h,a,c,l;for(r=0,o=t.length,c=0;r<o;++r){h=t[r],a=h.box,a.update(h.width||e.w,h.height||e.h,Ii(h.horizontal,e));const{same:o,other:u}=Ti(e,i,h,s);c|=o&&n.length,l=l||u,a.fullSize||n.push(h)}return c&&Fi(n,e,i,s)||l}function Bi(t,e,i,s,n){t.top=i,t.left=e,t.right=e+s,t.bottom=i+n,t.width=s,t.height=n}function Wi(t,e,i,s){const n=i.padding;let{x:r,y:o}=e;for(const h of t){const t=h.box,a=s[h.stack]||{placed:0,weight:1},c=h.stackWeight/a.weight||1;if(h.horizontal){const s=e.w*c,r=a.size||t.height;rt(a.start)&&(o=a.start),t.fullSize?Bi(t,n.left,o,i.outerWidth-n.right-n.left,r):Bi(t,e.left+a.placed,o,s,r),a.start=o,a.placed+=s,o=t.bottom}else{const s=e.h*c,o=a.size||t.width;rt(a.start)&&(r=a.start),t.fullSize?Bi(t,r,n.top,o,i.outerHeight-n.bottom-n.top):Bi(t,r,e.top+a.placed,o,s),a.start=r,a.placed+=s,r=t.right}}e.x=r,e.y=o}var Ni={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,s){if(!t)return;const n=me(t.options.layout.padding),r=Math.max(e-n.width,0),o=Math.max(i-n.height,0),h=function(t){const e=function(t){const e=[];let i,s,n,r,o,h;for(i=0,s=(t||[]).length;i<s;++i)n=t[i],({position:r,options:{stack:o,stackWeight:h=1}}=n),e.push({index:i,box:n,pos:r,horizontal:n.isHorizontal(),weight:n.weight,stack:o&&r+o,stackWeight:h});return e}(t),i=Ei(e.filter((t=>t.box.fullSize)),!0),s=Ei(Ri(e,"left"),!0),n=Ei(Ri(e,"right")),r=Ei(Ri(e,"top"),!0),o=Ei(Ri(e,"bottom")),h=Ci(e,"x"),a=Ci(e,"y");return{fullSize:i,leftAndTop:s.concat(r),rightAndBottom:n.concat(a).concat(o).concat(h),chartArea:Ri(e,"chartArea"),vertical:s.concat(n).concat(a),horizontal:r.concat(o).concat(h)}}(t.boxes),a=h.vertical,c=h.horizontal;Z(t.boxes,(t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()}));const l=a.reduce(((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1),0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:n,availableWidth:r,availableHeight:o,vBoxMaxWidth:r/2/l,hBoxMaxHeight:o/2}),f=Object.assign({},n);Pi(f,me(s));const d=Object.assign({maxPadding:f,w:r,h:o,x:n.left,y:n.top},n),b=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:s,stackWeight:n}=i;if(!t||!ji.includes(s))continue;const r=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=n}return e}(t),{vBoxMaxWidth:s,hBoxMaxHeight:n}=e;let r,o,h;for(r=0,o=t.length;r<o;++r){h=t[r];const{fullSize:o}=h.box,a=i[h.stack],c=a&&h.stackWeight/a.weight;h.horizontal?(h.width=c?c*s:o&&e.availableWidth,h.height=n):(h.width=s,h.height=c?c*n:o&&e.availableHeight)}return i}(a.concat(c),u);Fi(h.fullSize,d,u,b),Fi(a,d,u,b),Fi(c,d,u,b)&&Fi(a,d,u,b),function(t){const e=t.maxPadding;function i(i){const s=Math.max(e[i]-t[i],0);return t[i]+=s,s}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(d),Wi(h.leftAndTop,d,u,b),d.x+=d.w,d.y+=d.h,Wi(h.rightAndBottom,d,u,b),t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h,height:d.h,width:d.w},Z(h.chartArea,(e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(d.w,d.h,{left:0,top:0,right:0,bottom:0})}))}};class zi{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class Hi extends zi{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const $i="$chartjs",Yi={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Vi=t=>null===t||""===t,Xi=!!Ye&&{passive:!0};function Ui(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,Xi)}function Zi(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function Ki(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Zi(i.addedNodes,s),e=e&&!Zi(i.removedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}function Qi(t,e,i){const s=t.canvas,n=new MutationObserver((t=>{let e=!1;for(const i of t)e=e||Zi(i.removedNodes,s),e=e&&!Zi(i.addedNodes,s);e&&i()}));return n.observe(document,{childList:!0,subtree:!0}),n}const qi=new Map;let Gi=0;function Ji(){const t=window.devicePixelRatio;t!==Gi&&(Gi=t,qi.forEach(((e,i)=>{i.currentDevicePixelRatio!==t&&e()})))}function ts(t,e,i){const s=t.canvas,n=s&&Ie(s);if(!n)return;const r=Et(((t,e)=>{const s=n.clientWidth;i(t,e),s<n.clientWidth&&i()}),window),o=new ResizeObserver((t=>{const e=t[0],i=e.contentRect.width,s=e.contentRect.height;0===i&&0===s||r(i,s)}));return o.observe(n),function(t,e){qi.size||window.addEventListener("resize",Ji),qi.set(t,e)}(t,r),o}function es(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){qi.delete(t),qi.size||window.removeEventListener("resize",Ji)}(t)}function is(t,e,i){const s=t.canvas,n=Et((e=>{null!==t.ctx&&i(function(t,e){const i=Yi[t.type]||t.type,{x:s,y:n}=ze(t,e);return{type:i,chart:e,native:t,x:void 0!==s?s:null,y:void 0!==n?n:null}}(e,t))}),t);return function(t,e,i){t&&t.addEventListener(e,i,Xi)}(s,e,n),n}class ss extends zi{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,s=t.getAttribute("height"),n=t.getAttribute("width");if(t[$i]={initial:{height:s,width:n,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Vi(n)){const e=Ve(t,"width");void 0!==e&&(t.width=e)}if(Vi(s))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Ve(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[$i])return!1;const i=e[$i].initial;["height","width"].forEach((t=>{const s=i[t];N(s)?e.removeAttribute(t):e.setAttribute(t,s)}));const s=i.style||{};return Object.keys(s).forEach((t=>{e.style[t]=s[t]})),e.width=e.width,delete e[$i],!0}addEventListener(t,e,i){this.removeEventListener(t,e),(t.$proxies||(t.$proxies={}))[e]=({attach:Ki,detach:Qi,resize:ts}[e]||is)(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];s&&(({attach:es,detach:es,resize:es}[e]||Ui)(t,e,s),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return function(t,e,i,s){const n=Be(t),r=Ne(n,"margin"),o=Fe(n.maxWidth,t,"clientWidth")||lt,h=Fe(n.maxHeight,t,"clientHeight")||lt,a=function(t,e,i){let s,n;if(void 0===e||void 0===i){const r=t&&Ie(t);if(r){const t=r.getBoundingClientRect(),o=Be(r),h=Ne(o,"border","width"),a=Ne(o,"padding");e=t.width-a.width-h.width,i=t.height-a.height-h.height,s=Fe(o.maxWidth,r,"clientWidth"),n=Fe(o.maxHeight,r,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:s||lt,maxHeight:n||lt}}(t,e,i);let{width:c,height:l}=a;if("content-box"===n.boxSizing){const t=Ne(n,"border","width"),e=Ne(n,"padding");c-=e.width+t.width,l-=e.height+t.height}return c=Math.max(0,c-r.width),l=Math.max(0,s?c/s:l-r.height),c=He(Math.min(c,o,a.maxWidth)),l=He(Math.min(l,h,a.maxHeight)),c&&!l&&(l=He(c/2)),(void 0!==e||void 0!==i)&&s&&a.height&&l>a.height&&(l=a.height,c=He(Math.floor(l*s))),{width:c,height:l}}(t,e,i,s)}isAttached(t){const e=t&&Ie(t);return!(!e||!e.isConnected)}}class ns{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return xt(this.x)&&xt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach((t=>{s[t]=i[t]&&i[t].active()?i[t]._to:this[t]})),s}}function rs(t,e,i,s,n){const r=V(s,0),o=Math.min(V(n,t.length),t.length);let h,a,c,l=0;for(i=Math.ceil(i),n&&(h=n-s,i=h/Math.floor(h/i)),c=r;c<0;)l++,c=Math.round(r+l*i);for(a=Math.max(r,0);a<o;a++)a===c&&(e.push(t[a]),l++,c=Math.round(r+l*i))}const os=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,hs=(t,e)=>Math.min(e||t,t);function as(t,e){const i=[],s=t.length/e,n=t.length;let r=0;for(;r<n;r+=s)i.push(t[Math.floor(r)]);return i}function cs(t,e,i){const s=t.ticks.length,n=Math.min(e,s-1),r=t._startPixel,o=t._endPixel,h=1e-6;let a,c=t.getPixelForTick(n);if(!(i&&(a=1===s?Math.max(c-r,o-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(n-1))/2,c+=n<e?a:-a,c<r-h||c>o+h)))return c}function ls(t){return t.drawTicks?t.tickLength:0}function us(t,e){if(!t.display)return 0;const i=ve(t.font,e),s=me(t.padding);return(z(t.text)?t.text.length:1)*i.lineHeight+s.height}function fs(t,e,i){let s=Lt(t);return(i&&"right"!==e||!i&&"right"===e)&&(s=(t=>"left"===t?"right":"right"===t?"left":t)(s)),s}class ds extends ns{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=Y(t,Number.POSITIVE_INFINITY),e=Y(e,Number.NEGATIVE_INFINITY),i=Y(i,Number.POSITIVE_INFINITY),s=Y(s,Number.NEGATIVE_INFINITY),{min:Y(t,i),max:Y(e,s),minDefined:$(t),maxDefined:$(e)}}getMinMax(t){let e,{min:i,max:s,minDefined:n,maxDefined:r}=this.getUserBounds();if(n&&r)return{min:i,max:s};const o=this.getMatchingVisibleMetas();for(let h=0,a=o.length;h<a;++h)e=o[h].controller.getMinMax(this,t),n||(i=Math.min(i,e.min)),r||(s=Math.max(s,e.max));return i=r&&i>s?s:i,s=n&&i>s?i:s,{min:Y(i,Y(s,i)),max:Y(s,Y(i,s))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){U(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:n,ticks:r}=this.options,o=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:s,max:n}=t,r=X(e,(n-s)/2),o=(t,e)=>i&&0===t?0:t+e;return{min:o(s,-Math.abs(r)),max:o(n,r)}}(this,n,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const h=o<this.ticks.length;this._convertTicksToLabels(h?as(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||"auto"===r.source)&&(this.ticks=function(t,e){const i=t.options.ticks,s=function(t){const e=t.options.offset,i=t._tickSize();return Math.floor(Math.min(t._length/i+(e?0:1),t._maxLength/i))}(t),n=Math.min(i.maxTicksLimit||s,s),r=i.major.enabled?function(t){const e=[];let i,s;for(i=0,s=t.length;i<s;i++)t[i].major&&e.push(i);return e}(e):[],o=r.length,h=r[0],a=r[o-1],c=[];if(o>n)return function(t,e,i,s){let n,r=0,o=i[0];for(s=Math.ceil(s),n=0;n<t.length;n++)n===o&&(e.push(t[n]),r++,o=i[r*s])}(e,c,r,o/n),c;const l=function(t,e,i){const s=function(t){const e=t.length;let i,s;if(e<2)return!1;for(s=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==s)return!1;return s}(t),n=e.length/i;if(!s)return Math.max(n,1);const r=function(t){const e=[],i=Math.sqrt(t);let s;for(s=1;s<i;s++)t%s==0&&(e.push(s),e.push(t/s));return i===(0|i)&&e.push(i),e.sort(((t,e)=>t-e)).pop(),e}(s);for(let t=0,e=r.length-1;t<e;t++){const e=r[t];if(e>n)return e}return Math.max(n,1)}(r,e,n);if(o>0){let t,i;const s=o>1?Math.round((a-h)/(o-1)):null;for(rs(e,c,l,N(s)?0:h-s,h),t=0,i=o-1;t<i;t++)rs(e,c,l,r[t],r[t+1]);return rs(e,c,l,a,N(s)?e.length:a+s),c}return rs(e,c,l),c}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),h&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){U(this.options.afterUpdate,[this])}beforeSetDimensions(){U(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){U(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),U(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){U(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,n;for(i=0,s=t.length;i<s;i++)n=t[i],n.label=U(e.callback,[n.value,i,t],this)}afterTickToLabelConversion(){U(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){U(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=hs(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,n=e.maxRotation;let r,o,h,a=s;if(!this._isVisible()||!e.display||s>=n||i<=1||!this.isHorizontal())return void(this.labelRotation=s);const c=this._getLabelSizes(),l=c.widest.width,u=c.highest.height,f=kt(this.chart.width-l,0,this.maxWidth);r=t.offset?this.maxWidth/i:f/(i-1),l+6>r&&(r=f/(i-(t.offset?.5:1)),o=this.maxHeight-ls(t.grid)-e.padding-us(t.title,this.chart.options.font),h=Math.sqrt(l*l+u*u),a=Math.min(Math.asin(kt((c.highest.height+6)/r,-1,1)),Math.asin(kt(o/h,-1,1))-Math.asin(kt(u/h,-1,1)))*(180/at),a=Math.max(s,Math.min(n,a))),this.labelRotation=a}afterCalculateLabelRotation(){U(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){U(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:n}}=this,r=this._isVisible(),o=this.isHorizontal();if(r){const r=us(s,e.options.font);if(o?(t.width=this.maxWidth,t.height=ls(n)+r):(t.height=this.maxHeight,t.width=ls(n)+r),i.display&&this.ticks.length){const{first:e,last:s,widest:n,highest:r}=this._getLabelSizes(),h=2*i.padding,a=yt(this.labelRotation),c=Math.cos(a),l=Math.sin(a);o?t.height=Math.min(this.maxHeight,t.height+(i.mirror?0:l*n.width+c*r.height)+h):t.width=Math.min(this.maxWidth,t.width+(i.mirror?0:c*n.width+l*r.height)+h),this._calculatePadding(e,s,l,c)}}this._handleMargins(),o?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:n,padding:r},position:o}=this.options,h=0!==this.labelRotation,a="top"!==o&&"x"===this.axis;if(this.isHorizontal()){const o=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let l=0,u=0;h?a?(l=s*t.width,u=i*e.height):(l=i*t.height,u=s*e.width):"start"===n?u=e.width:"end"===n?l=t.width:"inner"!==n&&(l=t.width/2,u=e.width/2),this.paddingLeft=Math.max((l-o+r)*this.width/(this.width-o),0),this.paddingRight=Math.max((u-c+r)*this.width/(this.width-c),0)}else{let i=e.height/2,s=t.height/2;"start"===n?(i=0,s=t.height):"end"===n&&(i=e.height,s=0),this.paddingTop=i+r,this.paddingBottom=s+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){U(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)N(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=as(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:s,_longestTextCache:n}=this,r=[],o=[],h=Math.floor(e/hs(e,i));let a,c,l,u,f,d,b,g,p,m,v,x=0,y=0;for(a=0;a<e;a+=h){if(u=t[a].label,f=this._resolveTickFontOptions(a),s.font=d=f.string,b=n[d]=n[d]||{data:{},gc:[]},g=f.lineHeight,p=m=0,N(u)||z(u)){if(z(u))for(c=0,l=u.length;c<l;++c)v=u[c],N(v)||z(v)||(p=Jt(s,b.data,b.gc,p,v),m+=g)}else p=Jt(s,b.data,b.gc,p,u),m=g;r.push(p),o.push(m),x=Math.max(p,x),y=Math.max(m,y)}!function(t,e){Z(t,(t=>{const i=t.gc,s=i.length/2;let n;if(s>e){for(n=0;n<s;++n)delete t.data[i[n]];i.splice(0,s)}}))}(n,e);const M=r.indexOf(x),w=o.indexOf(y),_=t=>({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(M),highest:_(w),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return kt(this._alignToPixels?te(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return ye(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=ye(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=yt(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),n=this._getLabelSizes(),r=t.autoSkipPadding||0,o=n?n.widest.width+r:0,h=n?n.highest.height+r:0;return this.isHorizontal()?h*i>o*s?o/i:h/s:h*s<o*i?h/i:o/s}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:n,position:r,border:o}=s,h=n.offset,a=this.isHorizontal(),c=this.ticks.length+(h?1:0),l=ls(n),u=[],f=o.setContext(this.getContext()),d=f.display?f.width:0,b=d/2,g=function(t){return te(i,t,d)};let p,m,v,x,y,M,w,_,k,O,S,A;if("top"===r)p=g(this.bottom),M=this.bottom-l,_=p-b,O=g(t.top)+b,A=t.bottom;else if("bottom"===r)p=g(this.top),O=t.top,A=g(t.bottom)-b,M=p+b,_=this.top+l;else if("left"===r)p=g(this.right),y=this.right-l,w=p-b,k=g(t.left)+b,S=t.right;else if("right"===r)p=g(this.left),k=t.left,S=g(t.right)-b,y=p+b,w=this.left+l;else if("x"===e){if("center"===r)p=g((t.top+t.bottom)/2+.5);else if(H(r)){const t=Object.keys(r)[0];p=g(this.chart.scales[t].getPixelForValue(r[t]))}O=t.top,A=t.bottom,M=p+b,_=M+l}else if("y"===e){if("center"===r)p=g((t.left+t.right)/2);else if(H(r)){const t=Object.keys(r)[0];p=g(this.chart.scales[t].getPixelForValue(r[t]))}y=p-b,w=y-l,k=t.left,S=t.right}const D=V(s.ticks.maxTicksLimit,c),j=Math.max(1,Math.ceil(c/D));for(m=0;m<c;m+=j){const t=this.getContext(m),e=n.setContext(t),s=o.setContext(t),r=e.lineWidth,c=e.color,l=s.dash||[],f=s.dashOffset,d=e.tickWidth,b=e.tickColor,g=e.tickBorderDash||[],p=e.tickBorderDashOffset;v=cs(this,m,h),void 0!==v&&(x=te(i,v,r),a?y=w=k=S=x:M=_=O=A=x,u.push({tx1:y,ty1:M,tx2:w,ty2:_,x1:k,y1:O,x2:S,y2:A,width:r,color:c,borderDash:l,borderDashOffset:f,tickWidth:d,tickColor:b,tickBorderDash:g,tickBorderDashOffset:p}))}return this._ticksLength=c,this._borderValue=p,u}_computeLabelItems(t){const e=this.axis,i=this.options,{position:s,ticks:n}=i,r=this.isHorizontal(),o=this.ticks,{align:h,crossAlign:a,padding:c,mirror:l}=n,u=ls(i.grid),f=u+c,d=l?-c:f,b=-yt(this.labelRotation),g=[];let p,m,v,x,y,M,w,_,k,O,S,A,D="middle";if("top"===s)M=this.bottom-d,w=this._getXAxisLabelAlignment();else if("bottom"===s)M=this.top+d,w=this._getXAxisLabelAlignment();else if("left"===s){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,y=t.x}else if("right"===s){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,y=t.x}else if("x"===e){if("center"===s)M=(t.top+t.bottom)/2+f;else if(H(s)){const t=Object.keys(s)[0];M=this.chart.scales[t].getPixelForValue(s[t])+f}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===s)y=(t.left+t.right)/2-f;else if(H(s)){const t=Object.keys(s)[0];y=this.chart.scales[t].getPixelForValue(s[t])}w=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===h?D="top":"end"===h&&(D="bottom"));const j=this._getLabelSizes();for(p=0,m=o.length;p<m;++p){v=o[p],x=v.label;const t=n.setContext(this.getContext(p));_=this.getPixelForTick(p)+n.labelOffset,k=this._resolveTickFontOptions(p),O=k.lineHeight,S=z(x)?x.length:1;const e=S/2,i=t.color,h=t.textStrokeColor,c=t.textStrokeWidth;let u,f=w;if(r?(y=_,"inner"===w&&(f=p===m-1?this.options.reverse?"left":"right":0===p?this.options.reverse?"right":"left":"center"),A="top"===s?"near"===a||0!==b?-S*O+O/2:"center"===a?-j.highest.height/2-e*O+O:O/2-j.highest.height:"near"===a||0!==b?O/2:"center"===a?j.highest.height/2-e*O:j.highest.height-S*O,l&&(A*=-1),0===b||t.showLabelBackdrop||(y+=O/2*Math.sin(b))):(M=_,A=(1-S)*O/2),t.showLabelBackdrop){const e=me(t.backdropPadding),i=j.heights[p],s=j.widths[p];let n=A-e.top,r=0-e.left;switch(D){case"middle":n-=i/2;break;case"bottom":n-=i}switch(w){case"center":r-=s/2;break;case"right":r-=s;break;case"inner":p===m-1?r-=s:p>0&&(r-=s/2)}u={left:r,top:n,width:s+e.width,height:i+e.height,color:t.backdropColor}}g.push({label:x,font:k,textOffset:A,options:{rotation:b,color:i,strokeColor:h,strokeWidth:c,textAlign:f,textBaseline:D,translation:[y,M],backdrop:u}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-yt(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:n}}=this.options,r=t+n,o=this._getLabelSizes().widest.width;let h,a;return"left"===e?s?(a=this.right+n,"near"===i?h="left":"center"===i?(h="center",a+=o/2):(h="right",a+=o)):(a=this.right-r,"near"===i?h="right":"center"===i?(h="center",a-=o/2):(h="left",a=this.left)):"right"===e?s?(a=this.left+n,"near"===i?h="right":"center"===i?(h="center",a-=o/2):(h="left",a-=o)):(a=this.left+r,"near"===i?h="left":"center"===i?(h="center",a+=o/2):(h="right",a=this.right)):h="right",{textAlign:h,x:a}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:n,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,n,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex((e=>e.value===t));return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let n,r;const o=(t,e,s)=>{s.width&&s.color&&(i.save(),i.lineWidth=s.width,i.strokeStyle=s.color,i.setLineDash(s.borderDash||[]),i.lineDashOffset=s.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(n=0,r=s.length;n<r;++n){const t=s[n];e.drawOnChartArea&&o({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&o({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:s}}=this,n=i.setContext(this.getContext()),r=i.display?n.width:0;if(!r)return;const o=s.setContext(this.getContext(0)).lineWidth,h=this._borderValue;let a,c,l,u;this.isHorizontal()?(a=te(t,this.left,r)-r/2,c=te(t,this.right,o)+o/2,l=u=h):(l=te(t,this.top,r)-r/2,u=te(t,this.bottom,o)+o/2,a=c=h),e.save(),e.lineWidth=n.width,e.strokeStyle=n.color,e.beginPath(),e.moveTo(a,l),e.lineTo(c,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&re(e,i);const s=this.getLabelItems(t);for(const t of s)ce(e,t.label,0,t.textOffset,t.font,t.options);i&&oe(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;const n=ve(i.font),r=me(i.padding),o=i.align;let h=n.lineHeight/2;"bottom"===e||"center"===e||H(e)?(h+=r.bottom,z(i.text)&&(h+=n.lineHeight*(i.text.length-1))):h+=r.top;const{titleX:a,titleY:c,maxWidth:l,rotation:u}=function(t,e,i,s){const{top:n,left:r,bottom:o,right:h,chart:a}=t,{chartArea:c,scales:l}=a;let u,f,d,b=0;const g=o-n,p=h-r;if(t.isHorizontal()){if(f=Pt(s,r,h),H(i)){const t=Object.keys(i)[0];d=l[t].getPixelForValue(i[t])+g-e}else d="center"===i?(c.bottom+c.top)/2+g-e:os(t,i,e);u=h-r}else{if(H(i)){const t=Object.keys(i)[0];f=l[t].getPixelForValue(i[t])-p+e}else f="center"===i?(c.left+c.right)/2-p+e:os(t,i,e);d=Pt(s,o,n),b="left"===i?-ft:ft}return{titleX:f,titleY:d,maxWidth:u,rotation:b}}(this,h,e,o);ce(t,i.text,0,0,n,{color:i.color,maxWidth:l,rotation:u,textAlign:fs(o,e,s),textBaseline:"middle",translation:[a,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=V(t.grid&&t.grid.z,-1),s=V(t.border&&t.border.z,0);return this._isVisible()&&this.draw===ds.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let n,r;for(n=0,r=e.length;n<r;++n){const r=e[n];r[i]!==this.id||t&&r.type!==t||s.push(r)}return s}_resolveTickFontOptions(t){return ve(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class bs{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const s=this.items,n=t.id,r=this.scope+"."+n;if(!n)throw new Error("class does not have id: "+t);return n in s||(s[n]=t,function(t,e,i){const s=J(Object.create(null),[i?Gt.get(i):{},Gt.get(e),t.defaults]);Gt.set(e,s),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((i=>{const s=i.split("."),n=s.pop(),r=[t].concat(s).join("."),o=e[i].split("."),h=o.pop(),a=o.join(".");Gt.route(r,n,a,h)}))}(e,t.defaultRoutes),t.descriptors&&Gt.describe(e,t.descriptors)}(t,r,i),this.override&&Gt.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in Gt[s]&&(delete Gt[s][i],this.override&&delete Ut[i])}}class gs{constructor(){this.controllers=new bs(di,"datasets",!0),this.elements=new bs(ns,"elements"),this.plugins=new bs(Object,"plugins"),this.scales=new bs(ds,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach((e=>{const s=i||this._getRegistryForType(e);i||s.isForType(e)||s===this.plugins&&e.id?this._exec(t,s,e):Z(e,(e=>{const s=i||this._getRegistryForType(e);this._exec(t,s,e)}))}))}_exec(t,e,i){const s=nt(t);U(i["before"+s],[],i),e[t](i),U(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const s=e.get(t);if(void 0===s)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var ps=new gs;class ms{constructor(){this._init=[]}notify(t,e,i,s){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const n=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(n,t,e,i);return"afterDestroy"===e&&(this._notify(n,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,i,s){s=s||{};for(const n of t){const t=n.plugin;if(!1===U(t[i],[e,s,n.options],t)&&s.cancelable)return!1}return!0}invalidate(){N(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=V(i.options&&i.options.plugins,{}),n=function(t){const e={},i=[],s=Object.keys(ps.plugins.items);for(let t=0;t<s.length;t++)i.push(ps.getPlugin(s[t]));const n=t.plugins||[];for(let t=0;t<n.length;t++){const s=n[t];-1===i.indexOf(s)&&(i.push(s),e[s.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==s||e?function(t,{plugins:e,localIds:i},s,n){const r=[],o=t.getContext();for(const h of e){const e=h.id,a=vs(s[e],n);null!==a&&r.push({plugin:h,options:xs(t.config,{plugin:h,local:i[e]},a,o)})}return r}(t,n,s,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,s=(t,e)=>t.filter((t=>!e.some((e=>t.plugin.id===e.plugin.id))));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function vs(t,e){return e||!1!==t?!0===t?{}:t:null}function xs(t,{plugin:e,local:i},s,n){const r=t.pluginScopeKeys(e),o=t.getOptionScopes(s,r);return i&&e.defaults&&o.push(e.defaults),t.createResolver(o,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function ys(t,e){return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||(Gt.datasets[t]||{}).indexAxis||"x"}function Ms(t){if("x"===t||"y"===t||"r"===t)return t}function ws(t,...e){if(Ms(t))return t;for(const s of e){const e=s.axis||("top"===(i=s.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.length>1&&Ms(t[0].toLowerCase());if(e)return e}var i;throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function _s(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function ks(t){const e=t.options||(t.options={});e.plugins=V(e.plugins,{}),e.scales=function(t,e){const i=Ut[t.type]||{scales:{}},s=e.scales||{},n=ys(t.type,e),r=Object.create(null);return Object.keys(s).forEach((e=>{const o=s[e];if(!H(o))return console.error(`Invalid scale configuration for scale: ${e}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const h=ws(e,o,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter((e=>e.xAxisID===t||e.yAxisID===t));if(i.length)return _s(t,"x",i[0])||_s(t,"y",i[0])}return{}}(e,t),Gt.scales[o.type]),a=function(t,e){return t===e?"_index_":"_value_"}(h,n),c=i.scales||{};r[e]=tt(Object.create(null),[{axis:h},o,c[h],c[a]])})),t.data.datasets.forEach((i=>{const n=i.type||t.type,o=i.indexAxis||ys(n,e),h=(Ut[n]||{}).scales||{};Object.keys(h).forEach((t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,o),n=i[e+"AxisID"]||e;r[n]=r[n]||Object.create(null),tt(r[n],[{axis:e},s[n],h[t]])}))})),Object.keys(r).forEach((t=>{const e=r[t];tt(e,[Gt.scales[e.type],Gt.scale])})),r}(t,e)}function Os(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Ss=new Map,As=new Set;function Ds(t,e){let i=Ss.get(t);return i||(i=e(),Ss.set(t,i),As.add(i)),i}const js=(t,e,i)=>{const s=st(e,i);void 0!==s&&t.add(s)};class Rs{constructor(t){this._config=function(t){return(t=t||{}).data=Os(t.data),ks(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Os(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),ks(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ds(t,(()=>[[`datasets.${t}`,""]]))}datasetAnimationScopeKeys(t,e){return Ds(`${t}.transition.${e}`,(()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]]))}datasetElementScopeKeys(t,e){return Ds(`${t}-${e}`,(()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]]))}pluginScopeKeys(t){const e=t.id;return Ds(`${this.type}-plugin-${e}`,(()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]]))}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return s&&!e||(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:n}=this,r=this._cachedScopes(t,i),o=r.get(e);if(o)return o;const h=new Set;e.forEach((e=>{t&&(h.add(t),e.forEach((e=>js(h,t,e)))),e.forEach((t=>js(h,s,t))),e.forEach((t=>js(h,Ut[n]||{},t))),e.forEach((t=>js(h,Gt,t))),e.forEach((t=>js(h,Zt,t)))}));const a=Array.from(h);return 0===a.length&&a.push(Object.create(null)),As.has(e)&&r.set(e,a),a}chartOptionScopes(){const{options:t,type:e}=this;return[t,Ut[e]||{},Gt.datasets[e]||{},{type:e},Gt,Zt]}resolveNamedOptions(t,e,i,s=[""]){const n={$shared:!0},{resolver:r,subPrefixes:o}=Cs(this._resolverCache,t,s);let h=r;(function(t,e){const{isScriptable:i,isIndexable:s}=_e(t);for(const n of e){const e=i(n),r=s(n),o=(r||e)&&t[n];if(e&&(ot(o)||Es(o))||r&&z(o))return!0}return!1})(r,e)&&(n.$shared=!1,h=we(r,i=ot(i)?i():i,this.createResolver(t,i,o)));for(const t of e)n[t]=h[t];return n}createResolver(t,e,i=[""],s){const{resolver:n}=Cs(this._resolverCache,t,i);return H(e)?we(n,e,void 0,s):n}}function Cs(t,e,i){let s=t.get(e);s||(s=new Map,t.set(e,s));const n=i.join();let r=s.get(n);return r||(r={resolver:Me(e,i),subPrefixes:i.filter((t=>!t.toLowerCase().includes("hover")))},s.set(n,r)),r}const Es=t=>H(t)&&Object.getOwnPropertyNames(t).some((e=>ot(t[e]))),Ls=["top","bottom","left","right","chartArea"];function Ps(t,e){return"top"===t||"bottom"===t||-1===Ls.indexOf(t)&&"x"===e}function Ts(t,e){return function(i,s){return i[t]===s[t]?i[e]-s[e]:i[t]-s[t]}}function Is(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),U(i&&i.onComplete,[t],e)}function Fs(t){const e=t.chart,i=e.options.animation;U(i&&i.onProgress,[t],e)}function Bs(t){return Te()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Ws={},Ns=t=>{const e=Bs(t);return Object.values(Ws).filter((t=>t.canvas===e)).pop()};function zs(t,e,i){const s=Object.keys(t);for(const n of s){const s=+n;if(s>=e){const r=t[n];delete t[n],(i>0||s>e)&&(t[s+i]=r)}}}class Hs{static defaults=Gt;static instances=Ws;static overrides=Ut;static registry=ps;static version="4.4.9";static getChart=Ns;static register(...t){ps.add(...t),$s()}static unregister(...t){ps.remove(...t),$s()}constructor(t,e){const i=this.config=new Rs(e),s=Bs(t),n=Ns(s);if(n)throw new Error("Canvas is already in use. Chart with ID '"+n.id+"' must be destroyed before the canvas with ID '"+n.canvas.id+"' can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Te()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Hi:ss}(s)),this.platform.updateConfig(i);const o=this.platform.acquireContext(s,r.aspectRatio),h=o&&o.canvas,a=h&&h.height,c=h&&h.width;this.id=W(),this.ctx=o,this.canvas=h,this.width=c,this.height=a,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new ms,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...s){return e?(clearTimeout(i),i=setTimeout(t,e,s)):t.apply(this,s),e}}((t=>this.update(t)),r.resizeDelay||0),this._dataChanges=[],Ws[this.id]=this,o&&h?(qe.listen(this,"complete",Is),qe.listen(this,"progress",Fs),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:n}=this;return N(t)?e&&n?n:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return ps}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():$e(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ee(this.canvas,this.ctx),this}stop(){return qe.stop(this),this}resize(t,e){qe.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.platform.getMaximumSize(this.canvas,t,e,i.maintainAspectRatio&&this.aspectRatio),n=i.devicePixelRatio||this.platform.getDevicePixelRatio(),r=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,$e(this,n,!0)&&(this.notifyPlugins("resize",{size:s}),U(i.onResize,[this,s],this),this.attached&&this._doResize(r)&&this.render())}ensureScalesHaveIDs(){Z(this.options.scales||{},((t,e)=>{t.id=e}))}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce(((t,e)=>(t[e]=!1,t)),{});let n=[];e&&(n=n.concat(Object.keys(e).map((t=>{const i=e[t],s=ws(t,i),n="r"===s,r="x"===s;return{options:i,dposition:n?"chartArea":r?"bottom":"left",dtype:n?"radialLinear":r?"category":"linear"}})))),Z(n,(e=>{const n=e.options,r=n.id,o=ws(r,n),h=V(n.type,e.dtype);void 0!==n.position&&Ps(n.position,o)===Ps(e.dposition)||(n.position=e.dposition),s[r]=!0;let a=null;r in i&&i[r].type===h?a=i[r]:(a=new(ps.getScale(h))({id:r,type:h,ctx:this.ctx,chart:this}),i[a.id]=a),a.init(n,t)})),Z(s,((t,e)=>{t||delete i[e]})),Z(i,(t=>{Ni.configure(this,t,t.options),Ni.addBox(this,t)}))}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort(((t,e)=>t.index-e.index)),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Ts("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach(((t,i)=>{0===e.filter((e=>e===t._dataset)).length&&this._destroyDatasetMeta(i)}))}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const s=e[i];let n=this.getDatasetMeta(i);const r=s.type||this.config.type;if(n.type&&n.type!==r&&(this._destroyDatasetMeta(i),n=this.getDatasetMeta(i)),n.type=r,n.indexAxis=s.indexAxis||ys(r,this.options),n.order=s.order||0,n.index=i,n.label=""+s.label,n.visible=this.isDatasetVisible(i),n.controller)n.controller.updateIndex(i),n.controller.linkScales();else{const e=ps.getController(r),{datasetElementType:s,dataElementType:o}=Gt.datasets[r];Object.assign(e,{dataElementType:ps.getElement(o),datasetElementType:s&&ps.getElement(s)}),n.controller=new e(this,i),t.push(n.controller)}}return this._updateMetasets(),t}_resetElements(){Z(this.data.datasets,((t,e)=>{this.getDatasetMeta(e).controller.reset()}),this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const n=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!s&&-1===n.indexOf(e);e.buildOrUpdateElements(i),r=Math.max(+e.getMaxOverflow(),r)}r=this._minPadding=i.layout.autoPadding?r:0,this._updateLayout(r),s||Z(n,(t=>{t.reset()})),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Ts("z","_idx"));const{_active:o,_lastEvent:h}=this;h?this._eventHandler(h,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){Z(this.scales,(t=>{Ni.removeBox(this,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);ht(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:n}of e)zs(t,s,"_removeElements"===i?-n:n)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter((t=>t[0]===e)).map(((t,e)=>e+","+t.splice(1).join(",")))),s=i(0);for(let t=1;t<e;t++)if(!ht(s,i(t)))return;return Array.from(s).map((t=>t.split(","))).map((t=>({method:t[1],start:+t[2],count:+t[3]})))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Ni.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],Z(this.boxes,(t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))}),this),this._layers.forEach(((t,e)=>{t._idx=e})),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,ot(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",s)&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(qe.has(this)?this.attached&&!qe.running(this)&&qe.start(this):(this.draw(),Is({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let s,n;for(s=0,n=e.length;s<n;++s){const n=e[s];t&&!n.visible||i.push(n)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},s=function(t,e){const i=e._clip;if(i.disabled)return!1;const s=function(t,e){const{xScale:i,yScale:s}=t;return i&&s?{left:Ke(i,e,"left"),right:Ke(i,e,"right"),top:Ke(s,e,"top"),bottom:Ke(s,e,"bottom")}:e}(e,t.chartArea);return{left:!1===i.left?0:s.left-(!0===i.left?0:i.left),right:!1===i.right?t.width:s.right+(!0===i.right?0:i.right),top:!1===i.top?0:s.top-(!0===i.top?0:i.top),bottom:!1===i.bottom?t.height:s.bottom+(!0===i.bottom?0:i.bottom)}}(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(s&&re(e,s),t.controller.draw(),s&&oe(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return ne(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const n=Di.modes[e];return"function"==typeof n?n(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter((t=>t&&t._dataset===e)).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=ye(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",n=this.getDatasetMeta(t),r=n.controller._resolveAnimations(void 0,s);rt(e)?(n.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(n,{visible:i}),this.update((e=>e.datasetIndex===t?s:void 0)))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),qe.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ee(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Ws[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};Z(this.options.events,(t=>i(t,s)))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,s)=>{e.addEventListener(this,i,s),t[i]=s},s=(i,s)=>{t[i]&&(e.removeEventListener(this,i,s),delete t[i])},n=(t,e)=>{this.canvas&&this.resize(t,e)};let r;const o=()=>{s("attach",o),this.attached=!0,this.resize(),i("resize",n),i("detach",r)};r=()=>{this.attached=!1,s("resize",n),this._stop(),this._resize(0,0),i("attach",o)},e.isAttached(this.canvas)?o():r()}unbindEvents(){Z(this._listeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._listeners={},Z(this._responsiveListeners,((t,e)=>{this.platform.removeEventListener(this,e,t)})),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let n,r,o,h;for("dataset"===e&&(n=this.getDatasetMeta(t[0].datasetIndex),n.controller["_"+s+"DatasetHoverStyle"]()),o=0,h=t.length;o<h;++o){r=t[o];const e=r&&this.getDatasetMeta(r.datasetIndex).controller;e&&e[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map((({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}));!K(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter((e=>e.plugin.id===t)).length}_updateHoverStyles(t,e,i){const s=this.options.hover,n=(t,e)=>t.filter((t=>!e.some((e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)))),r=n(e,t),o=i?t:n(t,e);r.length&&this.updateHoverStyle(r,s.mode,!1),o.length&&s.mode&&this.updateHoverStyle(o,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,s))return;const n=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(n||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:n}=this,r=this._getActiveElements(t,s,i,e),o=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),h=function(t,e,i,s){return i&&"mouseout"!==t.type?s?e:t:null}(t,this._lastEvent,i,o);i&&(this._lastEvent=null,U(n.onHover,[t,r,this],this),o&&U(n.onClick,[t,r,this],this));const a=!K(r,s);return(a||e)&&(this._active=r,this._updateHoverStyles(r,s,e)),this._lastEvent=h,a}_getActiveElements(t,e,i,s){if("mouseout"===t.type)return[];if(!i)return e;const n=this.options.hover;return this.getElementsAtEventForMode(t,n.mode,n,s)}}function $s(){return Z(Hs.instances,(t=>t._plugins.invalidate()))}function Ys(t,e){const{x:i,y:s,base:n,width:r,height:o}=t.getProps(["x","y","base","width","height"],e);let h,a,c,l,u;return t.horizontal?(u=o/2,h=Math.min(i,n),a=Math.max(i,n),c=s-u,l=s+u):(u=r/2,h=i-u,a=i+u,c=Math.min(s,n),l=Math.max(s,n)),{left:h,top:c,right:a,bottom:l}}function Vs(t,e,i,s){return t?0:kt(e,i,s)}function Xs(t,e,i,s){const n=null===e,r=null===i,o=t&&!(n&&r)&&Ys(t,s);return o&&(n||Ot(e,o.left,o.right))&&(r||Ot(i,o.top,o.bottom))}function Us(t,e){t.rect(e.x,e.y,e.w,e.h)}function Zs(t,e,i={}){const s=t.x!==i.x?-e:0,n=t.y!==i.y?-e:0;return{x:t.x+s,y:t.y+n,w:t.w+((t.x+t.w!==i.x+i.w?e:0)-s),h:t.h+((t.y+t.h!==i.y+i.h?e:0)-n),radius:t.radius}}const Ks=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Qs=Ks.map((t=>t.replace("rgb(","rgba(").replace(")",", 0.5)")));function qs(t){return Ks[t%Ks.length]}function Gs(t){return Qs[t%Qs.length]}function Js(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var tn={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:s},options:n}=t.config,{elements:r}=n,o=Js(s)||(h=n)&&(h.borderColor||h.backgroundColor)||r&&Js(r)||"rgba(0,0,0,0.1)"!==Gt.borderColor||"rgba(0,0,0,0.1)"!==Gt.backgroundColor;var h;if(!i.forceOverride&&o)return;const a=function(t){let e=0;return(i,s)=>{const n=t.getDatasetMeta(s).controller;n instanceof Mi?e=function(t,e){return t.backgroundColor=t.data.map((()=>qs(e++))),e}(i,e):n instanceof wi?e=function(t,e){return t.backgroundColor=t.data.map((()=>Gs(e++))),e}(i,e):n&&(e=function(t,e){return t.borderColor=qs(e),t.backgroundColor=Gs(e),++e}(i,e))}}(t);s.forEach(a)}};const en=(t,e)=>{let{boxHeight:i=e,boxWidth:s=e}=t;return t.usePointStyle&&(i=Math.min(i,e),s=t.pointStyleWidth||Math.min(s,e)),{boxWidth:s,boxHeight:i,itemHeight:Math.max(e,i)}};class sn extends ns{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=U(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter((e=>t.filter(e,this.chart.data)))),t.sort&&(e=e.sort(((e,i)=>t.sort(e,i,this.chart.data)))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,s=ve(i.font),n=s.size,r=this._computeTitleHeight(),{boxWidth:o,itemHeight:h}=en(i,n);let a,c;e.font=s.string,this.isHorizontal()?(a=this.maxWidth,c=this._fitRows(r,n,o,h)+10):(c=this.maxHeight,a=this._fitCols(r,s,o,h)+10),this.width=Math.min(a,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:n,maxWidth:r,options:{labels:{padding:o}}}=this,h=this.legendHitBoxes=[],a=this.lineWidths=[0],c=s+o;let l=t;n.textAlign="left",n.textBaseline="middle";let u=-1,f=-c;return this.legendItems.forEach(((t,d)=>{const b=i+e/2+n.measureText(t.text).width;(0===d||a[a.length-1]+b+2*o>r)&&(l+=c,a[a.length-(d>0?0:1)]=0,f+=c,u++),h[d]={left:0,top:f,row:u,width:b,height:s},a[a.length-1]+=b+o})),l}_fitCols(t,e,i,s){const{ctx:n,maxHeight:r,options:{labels:{padding:o}}}=this,h=this.legendHitBoxes=[],a=this.columnSizes=[],c=r-t;let l=o,u=0,f=0,d=0,b=0;return this.legendItems.forEach(((t,r)=>{const{itemWidth:g,itemHeight:p}=function(t,e,i,s,n){const r=function(t,e,i,s){let n=t.text;return n&&"string"!=typeof n&&(n=n.reduce(((t,e)=>t.length>e.length?t:e))),e+i.size/2+s.measureText(n).width}(s,t,e,i),o=function(t,e,i){let s=t;return"string"!=typeof e.text&&(s=nn(e,i)),s}(n,s,e.lineHeight);return{itemWidth:r,itemHeight:o}}(i,e,n,t,s);r>0&&f+p+2*o>c&&(l+=u+o,a.push({width:u,height:f}),d+=u+o,b++,u=f=0),h[r]={left:d,top:f,col:b,width:g,height:p},u=Math.max(u,g),f+=p+o})),l+=u,a.push({width:u,height:f}),l}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:n}}=this,r=Xe(n,this.left,this.width);if(this.isHorizontal()){let n=0,o=Pt(i,this.left+s,this.right-this.lineWidths[n]);for(const h of e)n!==h.row&&(n=h.row,o=Pt(i,this.left+s,this.right-this.lineWidths[n])),h.top+=this.top+t+s,h.left=r.leftForLtr(r.x(o),h.width),o+=h.width+s}else{let n=0,o=Pt(i,this.top+t+s,this.bottom-this.columnSizes[n].height);for(const h of e)h.col!==n&&(n=h.col,o=Pt(i,this.top+t+s,this.bottom-this.columnSizes[n].height)),h.top=o,h.left+=this.left+s,h.left=r.leftForLtr(r.x(h.left),h.width),o+=h.height+s}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;re(t,this),this._draw(),oe(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:n,labels:r}=t,o=Gt.color,h=Xe(t.rtl,this.left,this.width),a=ve(r.font),{padding:c}=r,l=a.size,u=l/2;let f;this.drawTitle(),s.textAlign=h.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=a.string;const{boxWidth:d,boxHeight:b,itemHeight:g}=en(r,l),p=this.isHorizontal(),m=this._computeTitleHeight();f=p?{x:Pt(n,this.left+c,this.right-i[0]),y:this.top+c+m,line:0}:{x:this.left+c,y:Pt(n,this.top+m+c,this.bottom-e[0].height),line:0},Ue(this.ctx,t.textDirection);const v=g+c;this.legendItems.forEach(((x,y)=>{s.strokeStyle=x.fontColor,s.fillStyle=x.fontColor;const M=s.measureText(x.text).width,w=h.textAlign(x.textAlign||(x.textAlign=r.textAlign)),_=d+u+M;let k=f.x,O=f.y;h.setWidth(this.width),p?y>0&&k+_+c>this.right&&(O=f.y+=v,f.line++,k=f.x=Pt(n,this.left+c,this.right-i[f.line])):y>0&&O+v>this.bottom&&(k=f.x=k+e[f.line].width+c,f.line++,O=f.y=Pt(n,this.top+m+c,this.bottom-e[f.line].height)),function(t,e,i){if(isNaN(d)||d<=0||isNaN(b)||b<0)return;s.save();const n=V(i.lineWidth,1);if(s.fillStyle=V(i.fillStyle,o),s.lineCap=V(i.lineCap,"butt"),s.lineDashOffset=V(i.lineDashOffset,0),s.lineJoin=V(i.lineJoin,"miter"),s.lineWidth=n,s.strokeStyle=V(i.strokeStyle,o),s.setLineDash(V(i.lineDash,[])),r.usePointStyle){const o={radius:b*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:n},a=h.xPlus(t,d/2);se(s,o,a,e+u,r.pointStyleWidth&&d)}else{const r=e+Math.max((l-b)/2,0),o=h.leftForLtr(t,d),a=pe(i.borderRadius);s.beginPath(),Object.values(a).some((t=>0!==t))?le(s,{x:o,y:r,w:d,h:b,radius:a}):s.rect(o,r,d,b),s.fill(),0!==n&&s.stroke()}s.restore()}(h.x(k),O,x),k=((t,e,i,s)=>t===(s?"left":"right")?i:"center"===t?(e+i)/2:e)(w,k+d+u,p?k+_:this.right,t.rtl),function(t,e,i){ce(s,i.text,t,e+g/2,a,{strikethrough:i.hidden,textAlign:h.textAlign(i.textAlign)})}(h.x(k),O,x),p?f.x+=_+c:f.y+="string"!=typeof x.text?nn(x,a.lineHeight)+c:v})),Ze(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=ve(e.font),s=me(e.padding);if(!e.display)return;const n=Xe(t.rtl,this.left,this.width),r=this.ctx,o=e.position,h=s.top+i.size/2;let a,c=this.left,l=this.width;if(this.isHorizontal())l=Math.max(...this.lineWidths),a=this.top+h,c=Pt(t.align,c,this.right-l);else{const e=this.columnSizes.reduce(((t,e)=>Math.max(t,e.height)),0);a=h+Pt(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const u=Pt(o,c,c+l);r.textAlign=n.textAlign(Lt(o)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=i.string,ce(r,e.text,u,a,i)}_computeTitleHeight(){const t=this.options.title,e=ve(t.font),i=me(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,n;if(Ot(t,this.left,this.right)&&Ot(e,this.top,this.bottom))for(n=this.legendHitBoxes,i=0;i<n.length;++i)if(s=n[i],Ot(t,s.left,s.left+s.width)&&Ot(e,s.top,s.top+s.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const r=this._hoveredItem,o=(n=i,null!==(s=r)&&null!==n&&s.datasetIndex===n.datasetIndex&&s.index===n.index);r&&!o&&U(e.onLeave,[t,r,this],this),this._hoveredItem=i,i&&!o&&U(e.onHover,[t,i,this],this)}else i&&U(e.onClick,[t,i,this],this);var s,n}}function nn(t,e){return e*(t.text?t.text.length:0)}var rn={id:"legend",_element:sn,start(t,e,i){const s=t.legend=new sn({ctx:t.ctx,options:i,chart:t});Ni.configure(t,s,i),Ni.addBox(t,s)},stop(t){Ni.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const s=t.legend;Ni.configure(t,s,i),s.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const s=e.datasetIndex,n=i.chart;n.isDatasetVisible(s)?(n.hide(s),e.hidden=!0):(n.show(s),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:s,textAlign:n,color:r,useBorderRadius:o,borderRadius:h}}=t.legend.options;return t._getSortedDatasetMetas().map((t=>{const a=t.controller.getStyle(i?0:void 0),c=me(a.borderWidth);return{text:e[t.index].label,fillStyle:a.backgroundColor,fontColor:r,hidden:!t.visible,lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:a.borderColor,pointStyle:s||a.pointStyle,rotation:a.rotation,textAlign:n||a.textAlign,borderRadius:o&&(h||a.borderRadius),datasetIndex:t.index}}),this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class on extends ns{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const s=z(i.text)?i.text.length:1;this._padding=me(i.padding);const n=s*ve(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=n:this.width=n}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:s,right:n,options:r}=this,o=r.align;let h,a,c,l=0;return this.isHorizontal()?(a=Pt(o,i,n),c=e+t,h=n-i):("left"===r.position?(a=i+t,c=Pt(o,s,e),l=-.5*at):(a=n-t,c=Pt(o,e,s),l=.5*at),h=s-e),{titleX:a,titleY:c,maxWidth:h,rotation:l}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=ve(e.font),s=i.lineHeight/2+this._padding.top,{titleX:n,titleY:r,maxWidth:o,rotation:h}=this._drawArgs(s);ce(t,e.text,0,0,i,{color:e.color,maxWidth:o,rotation:h,textAlign:Lt(e.align),textBaseline:"middle",translation:[n,r]})}}var hn={id:"title",_element:on,start(t,e,i){!function(t,e){const i=new on({ctx:t.ctx,options:e,chart:t});Ni.configure(t,i,e),Ni.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){Ni.removeBox(t,t.titleBlock),delete t.titleBlock},beforeUpdate(t,e,i){const s=t.titleBlock;Ni.configure(t,s,i),s.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const an={average(t){if(!t.length)return!1;let e,i,s=new Set,n=0,r=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();s.add(t.x),n+=t.y,++r}}return 0!==r&&0!==s.size&&{x:[...s].reduce(((t,e)=>t+e))/s.size,y:n/r}},nearest(t,e){if(!t.length)return!1;let i,s,n,r=e.x,o=e.y,h=Number.POSITIVE_INFINITY;for(i=0,s=t.length;i<s;++i){const s=t[i].element;if(s&&s.hasValue()){const t=(a=e,c=s.getCenterPoint(),Math.sqrt(Math.pow(c.x-a.x,2)+Math.pow(c.y-a.y,2)));t<h&&(h=t,n=s)}}var a,c;if(n){const t=n.tooltipPosition();r=t.x,o=t.y}return{x:r,y:o}}};function cn(t,e){return e&&(z(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function ln(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function un(t,e){const{element:i,datasetIndex:s,index:n}=e,r=t.getDatasetMeta(s).controller,{label:o,value:h}=r.getLabelAndValue(n);return{chart:t,label:o,parsed:r.getParsed(n),raw:t.data.datasets[s].data[n],formattedValue:h,dataset:r.getDataset(),dataIndex:n,datasetIndex:s,element:i}}function fn(t,e){const i=t.chart.ctx,{body:s,footer:n,title:r}=t,{boxWidth:o,boxHeight:h}=e,a=ve(e.bodyFont),c=ve(e.titleFont),l=ve(e.footerFont),u=r.length,f=n.length,d=s.length,b=me(e.padding);let g=b.height,p=0,m=s.reduce(((t,e)=>t+e.before.length+e.lines.length+e.after.length),0);m+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),m&&(g+=d*(e.displayColors?Math.max(h,a.lineHeight):a.lineHeight)+(m-d)*a.lineHeight+(m-1)*e.bodySpacing),f&&(g+=e.footerMarginTop+f*l.lineHeight+(f-1)*e.footerSpacing);let v=0;const x=function(t){p=Math.max(p,i.measureText(t).width+v)};return i.save(),i.font=c.string,Z(t.title,x),i.font=a.string,Z(t.beforeBody.concat(t.afterBody),x),v=e.displayColors?o+2+e.boxPadding:0,Z(s,(t=>{Z(t.before,x),Z(t.lines,x),Z(t.after,x)})),v=0,i.font=l.string,Z(t.footer,x),i.restore(),p+=b.width,{width:p,height:g}}function dn(t,e,i,s){const{x:n,width:r}=i,{width:o,chartArea:{left:h,right:a}}=t;let c="center";return"center"===s?c=n<=(h+a)/2?"left":"right":n<=r/2?c="left":n>=o-r/2&&(c="right"),function(t,e,i,s){const{x:n,width:r}=s,o=i.caretSize+i.caretPadding;return"left"===t&&n+r+o>e.width||"right"===t&&n-r-o<0||void 0}(c,t,e,i)&&(c="center"),c}function bn(t,e,i){const s=i.yAlign||e.yAlign||function(t,e){const{y:i,height:s}=e;return i<s/2?"top":i>t.height-s/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||dn(t,e,i,s),yAlign:s}}function gn(t,e,i,s){const{caretSize:n,caretPadding:r,cornerRadius:o}=t,{xAlign:h,yAlign:a}=i,c=n+r,{topLeft:l,topRight:u,bottomLeft:f,bottomRight:d}=pe(o);let b=function(t,e){let{x:i,width:s}=t;return"right"===e?i-=s:"center"===e&&(i-=s/2),i}(e,h);const g=function(t,e,i){let{y:s,height:n}=t;return"top"===e?s+=i:s-="bottom"===e?n+i:n/2,s}(e,a,c);return"center"===a?"left"===h?b+=c:"right"===h&&(b-=c):"left"===h?b-=Math.max(l,f)+n:"right"===h&&(b+=Math.max(u,d)+n),{x:kt(b,0,s.width-e.width),y:kt(g,0,s.height-e.height)}}function pn(t,e,i){const s=me(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-s.right:t.x+s.left}function mn(t){return cn([],ln(t))}function vn(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const xn={beforeTitle:B,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,s=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(s>0&&e.dataIndex<s)return i[e.dataIndex]}return""},afterTitle:B,beforeBody:B,beforeLabel:B,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return N(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:B,afterBody:B,beforeFooter:B,footer:B,afterFooter:B};function yn(t,e,i,s){const n=t[e].call(i,s);return void 0===n?xn[e].call(i,s):n}class Mn extends ns{static positioners=an;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,n=new ei(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(n)),n}getContext(){return this.$context||(this.$context=ye(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"}))}getTitle(t,e){const{callbacks:i}=e,s=yn(i,"beforeTitle",this,t),n=yn(i,"title",this,t),r=yn(i,"afterTitle",this,t);let o=[];return o=cn(o,ln(s)),o=cn(o,ln(n)),o=cn(o,ln(r)),o}getBeforeBody(t,e){return mn(yn(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,s=[];return Z(t,(t=>{const e={before:[],lines:[],after:[]},n=vn(i,t);cn(e.before,ln(yn(n,"beforeLabel",this,t))),cn(e.lines,yn(n,"label",this,t)),cn(e.after,ln(yn(n,"afterLabel",this,t))),s.push(e)})),s}getAfterBody(t,e){return mn(yn(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=yn(i,"beforeFooter",this,t),n=yn(i,"footer",this,t),r=yn(i,"afterFooter",this,t);let o=[];return o=cn(o,ln(s)),o=cn(o,ln(n)),o=cn(o,ln(r)),o}_createItems(t){const e=this._active,i=this.chart.data,s=[],n=[],r=[];let o,h,a=[];for(o=0,h=e.length;o<h;++o)a.push(un(this.chart,e[o]));return t.filter&&(a=a.filter(((e,s,n)=>t.filter(e,s,n,i)))),t.itemSort&&(a=a.sort(((e,s)=>t.itemSort(e,s,i)))),Z(a,(e=>{const i=vn(t.callbacks,e);s.push(yn(i,"labelColor",this,e)),n.push(yn(i,"labelPointStyle",this,e)),r.push(yn(i,"labelTextColor",this,e))})),this.labelColors=s,this.labelPointStyles=n,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let n,r=[];if(s.length){const t=an[i.position].call(this,s,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const e=this._size=fn(this,i),o=Object.assign({},t,e),h=bn(this.chart,i,o),a=gn(i,o,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,n={opacity:1,x:a.x,y:a.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=r,this.$context=void 0,n&&this._resolveAnimations().update(this,n),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const n=this.getCaretPosition(t,i,s);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:n}=this,{caretSize:r,cornerRadius:o}=i,{topLeft:h,topRight:a,bottomLeft:c,bottomRight:l}=pe(o),{x:u,y:f}=t,{width:d,height:b}=e;let g,p,m,v,x,y;return"center"===n?(x=f+b/2,"left"===s?(g=u,p=g-r,v=x+r,y=x-r):(g=u+d,p=g+r,v=x-r,y=x+r),m=g):(p="left"===s?u+Math.max(h,c)+r:"right"===s?u+d-Math.max(a,l)-r:this.caretX,"top"===n?(v=f,x=v-r,g=p-r,m=p+r):(v=f+b,x=v+r,g=p+r,m=p-r),y=v),{x1:g,x2:p,x3:m,y1:v,y2:x,y3:y}}drawTitle(t,e,i){const s=this.title,n=s.length;let r,o,h;if(n){const a=Xe(i.rtl,this.x,this.width);for(t.x=pn(this,i.titleAlign,i),e.textAlign=a.textAlign(i.titleAlign),e.textBaseline="middle",r=ve(i.titleFont),o=i.titleSpacing,e.fillStyle=i.titleColor,e.font=r.string,h=0;h<n;++h)e.fillText(s[h],a.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+o,h+1===n&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,e,i,s,n){const r=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:h,boxWidth:a}=n,c=ve(n.bodyFont),l=pn(this,"left",n),u=s.x(l),f=e.y+(h<c.lineHeight?(c.lineHeight-h)/2:0);if(n.usePointStyle){const e={radius:Math.min(a,h)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},i=s.leftForLtr(u,a)+a/2,c=f+h/2;t.strokeStyle=n.multiKeyBackground,t.fillStyle=n.multiKeyBackground,ie(t,e,i,c),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,ie(t,e,i,c)}else{t.lineWidth=H(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const e=s.leftForLtr(u,a),i=s.leftForLtr(s.xPlus(u,1),a-2),o=pe(r.borderRadius);Object.values(o).some((t=>0!==t))?(t.beginPath(),t.fillStyle=n.multiKeyBackground,le(t,{x:e,y:f,w:a,h,radius:o}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),le(t,{x:i,y:f+1,w:a-2,h:h-2,radius:o}),t.fill()):(t.fillStyle=n.multiKeyBackground,t.fillRect(e,f,a,h),t.strokeRect(e,f,a,h),t.fillStyle=r.backgroundColor,t.fillRect(i,f+1,a-2,h-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:n,bodyAlign:r,displayColors:o,boxHeight:h,boxWidth:a,boxPadding:c}=i,l=ve(i.bodyFont);let u=l.lineHeight,f=0;const d=Xe(i.rtl,this.x,this.width),b=function(i){e.fillText(i,d.x(t.x+f),t.y+u/2),t.y+=u+n},g=d.textAlign(r);let p,m,v,x,y,M,w;for(e.textAlign=r,e.textBaseline="middle",e.font=l.string,t.x=pn(this,g,i),e.fillStyle=i.bodyColor,Z(this.beforeBody,b),f=o&&"right"!==g?"center"===r?a/2+c:a+2+c:0,x=0,M=s.length;x<M;++x){for(p=s[x],m=this.labelTextColors[x],e.fillStyle=m,Z(p.before,b),v=p.lines,o&&v.length&&(this._drawColorBox(e,t,x,d,i),u=Math.max(l.lineHeight,h)),y=0,w=v.length;y<w;++y)b(v[y]),u=l.lineHeight;Z(p.after,b)}f=0,u=l.lineHeight,Z(this.afterBody,b),t.y-=n}drawFooter(t,e,i){const s=this.footer,n=s.length;let r,o;if(n){const h=Xe(i.rtl,this.x,this.width);for(t.x=pn(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=h.textAlign(i.footerAlign),e.textBaseline="middle",r=ve(i.footerFont),e.fillStyle=i.footerColor,e.font=r.string,o=0;o<n;++o)e.fillText(s[o],h.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:n,yAlign:r}=this,{x:o,y:h}=t,{width:a,height:c}=i,{topLeft:l,topRight:u,bottomLeft:f,bottomRight:d}=pe(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(o+l,h),"top"===r&&this.drawCaret(t,e,i,s),e.lineTo(o+a-u,h),e.quadraticCurveTo(o+a,h,o+a,h+u),"center"===r&&"right"===n&&this.drawCaret(t,e,i,s),e.lineTo(o+a,h+c-d),e.quadraticCurveTo(o+a,h+c,o+a-d,h+c),"bottom"===r&&this.drawCaret(t,e,i,s),e.lineTo(o+f,h+c),e.quadraticCurveTo(o,h+c,o,h+c-f),"center"===r&&"left"===n&&this.drawCaret(t,e,i,s),e.lineTo(o,h+l),e.quadraticCurveTo(o,h,o+l,h),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,n=i&&i.y;if(s||n){const i=an[t.position].call(this,this._active,this._eventPosition);if(!i)return;const r=this._size=fn(this,t),o=Object.assign({},i,this._size),h=bn(e,t,o),a=gn(t,o,h,e);s._to===a.x&&n._to===a.y||(this.xAlign=h.xAlign,this.yAlign=h.yAlign,this.width=r.width,this.height=r.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,a))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},n={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const r=me(e.padding);e.enabled&&(this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length)&&(t.save(),t.globalAlpha=i,this.drawBackground(n,t,s,e),Ue(t,e.textDirection),n.y+=r.top,this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),Ze(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map((({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}})),n=!K(i,s),r=this._positionChanged(s,e);(n||r)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,n=this._active||[],r=this._getActiveElements(t,n,e,i),o=this._positionChanged(r,t),h=e||!K(r,n)||o;return h&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),h}_getActiveElements(t,e,i,s){const n=this.options;if("mouseout"===t.type)return[];if(!s)return e.filter((t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index)));const r=this.chart.getElementsAtEventForMode(t,n.mode,n,i);return n.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:i,caretY:s,options:n}=this,r=an[n.position].call(this,t,e);return!1!==r&&(i!==r.x||s!==r.y)}}var wn={id:"tooltip",_element:Mn,positioners:an,afterInit(t,e,i){i&&(t.tooltip=new Mn({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){t.tooltip&&t.tooltip.handleEvent(e.event,e.replay,e.inChartArea)&&(e.changed=!0)},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:xn},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function _n(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function kn(t,e,{horizontal:i,minRotation:s}){const n=yt(s),r=(i?Math.sin(n):Math.cos(n))||.001;return Math.min(e/r,.75*e*(""+t).length)}class On extends ds{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return N(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:n}=this;const r=t=>s=e?s:t,o=t=>n=i?n:t;if(t){const t=pt(s),e=pt(n);t<0&&e<0?o(0):t>0&&e>0&&r(0)}if(s===n){let e=0===n?1:Math.abs(.05*n);o(n+e),t||r(s-e)}this.min=s,this.max=n}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:s}=t;return s?(e=Math.ceil(this.max/s)-Math.floor(this.min/s)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${s} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s=function(t,e){const i=[],{bounds:s,step:n,min:r,max:o,precision:h,count:a,maxTicks:c,maxDigits:l,includeBounds:u}=t,f=n||1,d=c-1,{min:b,max:g}=e,p=!N(r),m=!N(o),v=!N(a),x=(g-b)/(l+1);let y,M,w,_,k=vt((g-b)/d/f)*f;if(k<1e-14&&!p&&!m)return[{value:b},{value:g}];_=Math.ceil(g/k)-Math.floor(b/k),_>d&&(k=vt(_*k/d/f)*f),N(h)||(y=Math.pow(10,h),k=Math.ceil(k*y)/y),"ticks"===s?(M=Math.floor(b/k)*k,w=Math.ceil(g/k)*k):(M=b,w=g),p&&m&&n&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((o-r)/n,k/1e3)?(_=Math.round(Math.min((o-r)/k,c)),k=(o-r)/_,M=r,w=o):v?(M=p?r:M,w=m?o:w,_=a-1,k=(w-M)/_):(_=(w-M)/k,_=mt(_,Math.round(_),k/1e3)?Math.round(_):Math.ceil(_));const O=Math.max(Mt(k),Mt(M));y=Math.pow(10,N(h)?O:h),M=Math.round(M*y)/y,w=Math.round(w*y)/y;let S=0;for(p&&(u&&M!==r?(i.push({value:r}),M<r&&S++,mt(Math.round((M+S*k)*y)/y,r,kn(r,x,t))&&S++):M<r&&S++);S<_;++S){const t=Math.round((M+S*k)*y)/y;if(m&&t>o)break;i.push({value:t})}return m&&u&&w!==o?i.length&&mt(i[i.length-1].value,o,kn(o,x,t))?i[i.length-1].value=o:i.push({value:o}):m&&w!==o||i.push({value:w}),i}({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&function(t,e){let i,s,n;for(i=0,s=t.length;i<s;i++)n=t[i].value,isNaN(n)||(e.min=Math.min(e.min,n),e.max=Math.max(e.max,n))}(s,this),t.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Vt(t,this.chart.options.locale,this.options.ticks.format)}}Hs.register(tn,class extends di{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,s){return gi(t,e,i,s)}parseArrayData(t,e,i,s){return gi(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:n,vScale:r}=t,{xAxisKey:o="x",yAxisKey:h="y"}=this._parsing,a="x"===n.axis?o:h,c="x"===r.axis?o:h,l=[];let u,f,d,b;for(u=i,f=i+s;u<f;++u)b=e[u],d={},d[n.axis]=n.parse(st(b,a),u),l.push(bi(st(b,c),d,r,u));return l}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);const n=i._custom;n&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,n.min),t.max=Math.max(t.max,n.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:s}=e,n=this.getParsed(t),r=n._custom,o=pi(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(n[s.axis]);return{label:""+i.getLabelForValue(n[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){const n="reset"===s,{index:r,_cachedMeta:{vScale:o}}=this,h=o.getBasePixel(),a=o.isHorizontal(),c=this._getRuler(),{sharedOptions:l,includeOptions:u}=this._getSharedOptions(e,s);for(let f=e;f<e+i;f++){const e=this.getParsed(f),i=n||N(e[o.axis])?{base:h,head:h}:this._calculateBarValuePixels(f),d=this._calculateBarIndexPixels(f,c),b=(e._stacks||{})[o.axis],g={horizontal:a,base:i.base,enableBorderRadius:!b||pi(e._custom)||r===b._top||r===b._bottom,x:a?i.head:d.center,y:a?d.center:i.head,height:a?d.size:Math.abs(i.size),width:a?Math.abs(i.size):d.size};u&&(g.options=l||this.resolveDataElementOptions(f,t[f].active?"active":s));const p=g.options||t[f].options;mi(g,p,b,r),yi(g,p,c.ratio),this.updateElement(t[f],f,g,s)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter((t=>t.controller.options.grouped)),n=i.options.stacked,r=[],o=this._cachedMeta.controller.getParsed(e),h=o&&o[i.axis],a=t=>{const e=t._parsed.find((t=>t[i.axis]===h)),s=e&&e[t.vScale.axis];if(N(s)||isNaN(s))return!0};for(const i of s)if((void 0===e||!a(i))&&((!1===n||-1===r.indexOf(i.stack)||void 0===n&&void 0===i.stack)&&r.push(i.stack),i.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),n=void 0!==e?s.indexOf(e):-1;return-1===n?s.length-1:n}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let n,r;for(n=0,r=e.data.length;n<r;++n)s.push(i.getPixelForValue(this.getParsed(n)[i.axis],n));const o=t.barThickness,h=o||function(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let s=[];for(let e=0,n=i.length;e<n;e++)s=s.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=function(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}(s.sort(((t,e)=>t-e)))}return t._cache.$bar}(e,t.type);let s,n,r,o,h=e._length;const a=()=>{32767!==r&&-32768!==r&&(rt(o)&&(h=Math.min(h,Math.abs(r-o)||h)),o=r)};for(s=0,n=i.length;s<n;++s)r=e.getPixelForValue(i[s]),a();for(o=void 0,s=0,n=e.ticks.length;s<n;++s)r=e.getPixelForTick(s),a();return h}(e);return{min:h,pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:n,minBarLength:r}}=this,o=n||0,h=this.getParsed(t),a=h._custom,c=pi(a);let l,u,f=h[e.axis],d=0,b=i?this.applyStack(e,h,i):f;b!==f&&(d=b-f,b=f),c&&(f=a.barStart,b=a.barEnd-a.barStart,0!==f&&pt(f)!==pt(a.barEnd)&&(d=0),d+=f);const g=N(n)||c?d:n;let p=e.getPixelForValue(g);if(l=this.chart.getDataVisibility(t)?e.getPixelForValue(d+b):p,u=l-p,Math.abs(u)<r){u=function(t,e,i){return 0!==t?pt(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(u,e,o)*r,f===o&&(p-=u/2);const t=e.getPixelForDecimal(0),n=e.getPixelForDecimal(1),a=Math.min(t,n),d=Math.max(t,n);p=Math.max(Math.min(p,d),a),l=p+u,i&&!c&&(h._stacks[e.axis]._visualValues[s]=e.getValueForPixel(l)-e.getValueForPixel(p))}if(p===e.getPixelForValue(o)){const t=pt(u)*e.getLineWidthForValue(o)/2;p+=t,u-=t}return{size:u,base:p,head:l,center:l+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,n=s.skipNull,r=V(s.maxBarThickness,1/0);let o,h;if(e.grouped){const i=n?this._getStackCount(t):e.stackCount,a="flex"===s.barThickness?function(t,e,i,s){const n=e.pixels,r=n[t];let o=t>0?n[t-1]:null,h=t<n.length-1?n[t+1]:null;const a=i.categoryPercentage;null===o&&(o=r-(null===h?e.end-e.start:h-r)),null===h&&(h=r+r-o);const c=r-(r-Math.min(o,h))/2*a;return{chunk:Math.abs(h-o)/2*a/s,ratio:i.barPercentage,start:c}}(t,e,s,i):function(t,e,i,s){const n=i.barThickness;let r,o;return N(n)?(r=e.min*i.categoryPercentage,o=i.barPercentage):(r=n*s,o=1),{chunk:r/s,ratio:o,start:e.pixels[t]-r/2}}(t,e,s,i),c=this._getStackIndex(this.index,this._cachedMeta.stack,n?t:void 0);o=a.start+a.chunk*c+a.chunk/2,h=Math.min(r,a.chunk*a.ratio)}else o=i.getPixelForValue(this.getParsed(t)[i.axis],t),h=Math.min(r,e.min*e.ratio);return{base:o-h/2,head:o+h/2,center:o,size:h}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let n=0;for(;n<s;++n)null===this.getParsed(n)[e.axis]||i[n].hidden||i[n].draw(this._ctx)}},class extends ns{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:n,outer:r}=function(t){const e=Ys(t),i=e.right-e.left,s=e.bottom-e.top,n=function(t,e,i){const s=t.borderSkipped,n=ge(t.options.borderWidth);return{t:Vs(s.top,n.top,0,i),r:Vs(s.right,n.right,0,e),b:Vs(s.bottom,n.bottom,0,i),l:Vs(s.left,n.left,0,e)}}(t,i/2,s/2),r=function(t,e,i){const{enableBorderRadius:s}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,r=pe(n),o=Math.min(e,i),h=t.borderSkipped,a=s||H(n);return{topLeft:Vs(!a||h.top||h.left,r.topLeft,0,o),topRight:Vs(!a||h.top||h.right,r.topRight,0,o),bottomLeft:Vs(!a||h.bottom||h.left,r.bottomLeft,0,o),bottomRight:Vs(!a||h.bottom||h.right,r.bottomRight,0,o)}}(t,i/2,s/2);return{outer:{x:e.left,y:e.top,w:i,h:s,radius:r},inner:{x:e.left+n.l,y:e.top+n.t,w:i-n.l-n.r,h:s-n.t-n.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,r.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(n.b,n.r))}}}}(this),o=(h=r.radius).topLeft||h.topRight||h.bottomLeft||h.bottomRight?le:Us;var h;t.save(),r.w===n.w&&r.h===n.h||(t.beginPath(),o(t,Zs(r,e,n)),t.clip(),o(t,Zs(n,-e,r)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,Zs(n,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return Xs(this,t,e,i)}inXRange(t,e){return Xs(this,t,null,e)}inYRange(t,e){return Xs(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:s,horizontal:n}=this.getProps(["x","y","base","horizontal"],t);return{x:n?(e+s)/2:e,y:n?i:(i+s)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},class extends ds{static id="category";static defaults={ticks:{callback:_n}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:s}of e)t[i]===s&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(N(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:kt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,s){const n=t.indexOf(e);return-1===n?((t,e,i,s)=>("string"==typeof e?(i=t.push(e)-1,s.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,s):n!==t.lastIndexOf(e)?i:n}(i,t,V(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let n=this.getLabels();n=0===t&&e===n.length-1?n:n.slice(t,e+1),this._valueRange=Math.max(n.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)s.push({value:i});return s}getLabelForValue(t){return _n.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},class extends On{static id="linear";static defaults={ticks:{callback:Xt.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=$(t)?t:0,this.max=$(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=yt(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,n=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,n.lineHeight/s))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}},rn,wn,hn);const Sn=class{constructor(i){t(this,i),this.errorEvent=e(this,"error-event"),this.loading=!0,this.errorMessage=""}componentDidLoad(){this.getGrossPayment&&this.fetchData()}propChanged(){this.getGrossPayment&&this.fetchData()}grossVolumeReportChanged(t){t&&(this.chart?this.updateChartData(t):this.initChart(t))}async fetchData(){this.loading=!0,this.getGrossPayment({onSuccess:t=>{this.loading=!1,this.grossVolumeReport=t},onError:({error:t,code:e,severity:i})=>{this.loading=!1,this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i})}})}initChart(t){const{dates:e,total:i}=t,s=e.reverse(),o=((t,e,i)=>({type:"bar",options:{plugins:{legend:{display:!1},title:{display:!0,text:["Trailing 30 Days","Gross Payments",n(t)],position:"top",align:"start"},tooltip:{displayColors:!1,intersect:!1,callbacks:{label:t=>{let s=t.dataIndex;return[r(e[s].date,i),n(e[s].value)]}}}},scales:{x:{grid:{drawOnChartArea:!1,drawTicks:!1},ticks:{callback:t=>{if(0===t||t===e.length-1)return r(e[t].date,i)}}},y:{display:!1}}},data:{labels:e.map((()=>"")),datasets:[{label:"Gross Volume by Date",data:e.map((t=>t.value))}]}}))(i,s,s[e.length-1].date);this.chart=new Hs(this.chartRef.getContext("2d"),o)}updateChartData(t){const e=t.dates.map((t=>t.value));this.chart.data.datasets.forEach((t=>{t.data=e})),this.chart.update()}disconnectedCallback(){this.chart&&this.chart.destroy()}render(){return i(s,{key:"0201a1f9445d3eb9800aca09098b5b58a24b6923"},this.loading&&i(h,{key:"c6e39699e3bfaf3d7d0f5907d7085604e1fe5b9d"}),this.errorMessage?o(this.errorMessage):i("canvas",{id:"chart",ref:t=>this.chartRef=t}))}static get watchers(){return{getGrossPayment:["propChanged"],grossVolumeReport:["grossVolumeReportChanged"]}}};export{Sn as gross_payment_chart_core}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i}from"./p-Bta_r52Z.js";import{m as e,a as o}from"./p-hDoH7hHP.js";import{C as r}from"./p-DaS3t0DL.js";import{C as a,a as h}from"./p-BhrFjjAs.js";import{c as p,J as c}from"./p-DzPrenCi.js";import{s as n}from"./p-D_FOQEGU.js";import"./p-NqdaxjDT.js";import"./p-Yj41tobi.js";import"./p-CBs671Ol.js";import"./p-D3BIZZrc.js";import"./p-9REosSLu.js";import"./p-BFTU3MAI.js";import"./p-D7js9xfx.js";import"./p-CLHwhyvu.js";import"./p-DddGO-XR.js";import"./p-7MWRbTXI.js";import"./p-BPCw4WEY.js";import"./p-Ct-uNz2r.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-CyXXks-Q.js";const m=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.loadedEvent=s(this,"loaded"),this.errorMessage=""}connectedCallback(){this.authToken&&this.checkoutId&&(n.checkoutId=this.checkoutId,n.authToken=this.authToken)}componentWillLoad(){p(),this.analytics=new c(this),this.initializeGetCheckout()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}initializeGetCheckout(){this.authToken&&this.checkoutId?(this.getCheckout=e({authToken:this.authToken,checkoutId:this.checkoutId,service:new r}),this.complete=o({authToken:this.authToken,checkoutId:this.checkoutId,service:new r})):this.errorEvent.emit({message:"auth-token and checkout-id are required",errorCode:h.MISSING_PROPS,severity:a.ERROR})}propChanged(){n.authToken=this.authToken,n.checkoutId=this.checkoutId,this.initializeGetCheckout()}async fillBillingForm(t){this.checkoutCoreRef.fillBillingForm(t)}async validate(){const{isValid:t}=await this.checkoutCoreRef.validate();return{isValid:t}}render(){return i("justifi-checkout-core",{key:"3aaf3ff84469870995456a56ac4c2b5806a23802",getCheckout:this.getCheckout,authToken:this.authToken,complete:this.complete,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,disableBnpl:this.disableBnpl,disablePaymentMethodGroup:this.disablePaymentMethodGroup,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,ref:t=>{t&&(this.checkoutCoreRef=t)}},i("div",{key:"ce9694f701ae7123a4ee5fbae76e9bbef1f7250c",slot:"insurance"},i("slot",{key:"2049b12cfc42cc42c46be83e6305317e97ae5cba",name:"insurance"})))}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"]}}};export{m as justifi_checkout}
@@ -1 +1 @@
1
- import{r as t,c as e,h as n,H as i,g as r}from"./p-D6FDxSyt.js";import{c as o,l as a,b as s,R as f,a as c,aw as u,ax as l,ay as h}from"./p-BrLVc_85.js";import{F as d}from"./p-C0IqfGFc.js";import"./p-CZfYo5-1.js";var p="top",v="bottom",b="right",m="left",y="auto",x=[p,v,b,m],w="start",g="end",O="viewport",j="popper",k=x.reduce((function(t,e){return t.concat([e+"-"+w,e+"-"+g])}),[]),C=[].concat(x,[y]).reduce((function(t,e){return t.concat([e,e+"-"+w,e+"-"+g])}),[]),M=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function B(t){return t?(t.nodeName||"").toLowerCase():null}function D(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function q(t){return t instanceof D(t).Element||t instanceof Element}function E(t){return t instanceof D(t).HTMLElement||t instanceof HTMLElement}function L(t){return"undefined"!=typeof ShadowRoot&&(t instanceof D(t).ShadowRoot||t instanceof ShadowRoot)}function V(t){return t.split("-")[0]}var I=Math.max,T=Math.min,_=Math.round;function A(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function F(){return!/^((?!chrome|android).)*safari/i.test(A())}function P(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&E(t)&&(r=t.offsetWidth>0&&_(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&_(i.height)/t.offsetHeight||1);var a=(q(t)?D(t):window).visualViewport,s=!F()&&n,f=(i.left+(s&&a?a.offsetLeft:0))/r,c=(i.top+(s&&a?a.offsetTop:0))/o,u=i.width/r,l=i.height/o;return{width:u,height:l,top:c,right:f+u,bottom:c+l,left:f,x:f,y:c}}function R(t){var e=P(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function S(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&L(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function H(t){return D(t).getComputedStyle(t)}function W(t){return["table","td","th"].indexOf(B(t))>=0}function z(t){return((q(t)?t.ownerDocument:t.document)||window.document).documentElement}function G(t){return"html"===B(t)?t:t.assignedSlot||t.parentNode||(L(t)?t.host:null)||z(t)}function K(t){return E(t)&&"fixed"!==H(t).position?t.offsetParent:null}function U(t){for(var e=D(t),n=K(t);n&&W(n)&&"static"===H(n).position;)n=K(n);return n&&("html"===B(n)||"body"===B(n)&&"static"===H(n).position)?e:n||function(t){var e=/firefox/i.test(A());if(/Trident/i.test(A())&&E(t)&&"fixed"===H(t).position)return null;var n=G(t);for(L(n)&&(n=n.host);E(n)&&["html","body"].indexOf(B(n))<0;){var i=H(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function Y(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Z(t,e,n){return I(t,T(e,n))}function J(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function N(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function Q(t){return t.split("-")[1]}var X={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $(t){var e,n=t.popper,i=t.popperRect,r=t.placement,o=t.variation,a=t.offsets,s=t.position,f=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,l=t.isFixed,h=a.x,d=void 0===h?0:h,y=a.y,x=void 0===y?0:y,w="function"==typeof u?u({x:d,y:x}):{x:d,y:x};d=w.x,x=w.y;var O=a.hasOwnProperty("x"),j=a.hasOwnProperty("y"),k=m,C=p,M=window;if(c){var B=U(n),q="clientHeight",E="clientWidth";B===D(n)&&"static"!==H(B=z(n)).position&&"absolute"===s&&(q="scrollHeight",E="scrollWidth"),(r===p||(r===m||r===b)&&o===g)&&(C=v,x-=(l&&B===M&&M.visualViewport?M.visualViewport.height:B[q])-i.height,x*=f?1:-1),r!==m&&(r!==p&&r!==v||o!==g)||(k=b,d-=(l&&B===M&&M.visualViewport?M.visualViewport.width:B[E])-i.width,d*=f?1:-1)}var L,V=Object.assign({position:s},c&&X),I=!0===u?function(t,e){var n=t.y,i=e.devicePixelRatio||1;return{x:_(t.x*i)/i||0,y:_(n*i)/i||0}}({x:d,y:x},D(n)):{x:d,y:x};return d=I.x,x=I.y,Object.assign({},V,f?((L={})[C]=j?"0":"",L[k]=O?"0":"",L.transform=(M.devicePixelRatio||1)<=1?"translate("+d+"px, "+x+"px)":"translate3d("+d+"px, "+x+"px, 0)",L):((e={})[C]=j?x+"px":"",e[k]=O?d+"px":"",e.transform="",e))}var tt={passive:!0},et={left:"right",right:"left",bottom:"top",top:"bottom"};function nt(t){return t.replace(/left|right|bottom|top/g,(function(t){return et[t]}))}var it={start:"end",end:"start"};function rt(t){return t.replace(/start|end/g,(function(t){return it[t]}))}function ot(t){var e=D(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function at(t){return P(z(t)).left+ot(t).scrollLeft}function st(t){var e=H(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function ft(t){return["html","body","#document"].indexOf(B(t))>=0?t.ownerDocument.body:E(t)&&st(t)?t:ft(G(t))}function ct(t,e){var n;void 0===e&&(e=[]);var i=ft(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),o=D(i),a=r?[o].concat(o.visualViewport||[],st(i)?i:[]):i,s=e.concat(a);return r?s:s.concat(ct(G(a)))}function ut(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function lt(t,e,n){return e===O?ut(function(t,e){var n=D(t),i=z(t),r=n.visualViewport,o=i.clientWidth,a=i.clientHeight,s=0,f=0;if(r){o=r.width,a=r.height;var c=F();(c||!c&&"fixed"===e)&&(s=r.offsetLeft,f=r.offsetTop)}return{width:o,height:a,x:s+at(t),y:f}}(t,n)):q(e)?function(t,e){var n=P(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ut(function(t){var e,n=z(t),i=ot(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=I(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=I(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-i.scrollLeft+at(t),f=-i.scrollTop;return"rtl"===H(r||n).direction&&(s+=I(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:f}}(z(t)))}function ht(t){var e,n=t.reference,i=t.element,r=t.placement,o=r?V(r):null,a=r?Q(r):null,s=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2;switch(o){case p:e={x:s,y:n.y-i.height};break;case v:e={x:s,y:n.y+n.height};break;case b:e={x:n.x+n.width,y:f};break;case m:e={x:n.x-i.width,y:f};break;default:e={x:n.x,y:n.y}}var c=o?Y(o):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case w:e[c]=e[c]-(n[u]/2-i[u]/2);break;case g:e[c]=e[c]+(n[u]/2-i[u]/2)}}return e}function dt(t,e){void 0===e&&(e={});var n=e.placement,i=void 0===n?t.placement:n,r=e.strategy,o=void 0===r?t.strategy:r,a=e.boundary,s=void 0===a?"clippingParents":a,f=e.rootBoundary,c=void 0===f?O:f,u=e.elementContext,l=void 0===u?j:u,h=e.altBoundary,d=void 0!==h&&h,m=e.padding,y=void 0===m?0:m,w=J("number"!=typeof y?y:N(y,x)),g=t.rects.popper,k=t.elements[d?l===j?"reference":j:l],C=function(t,e,n,i){var r="clippingParents"===e?function(t){var e=ct(G(t)),n=["absolute","fixed"].indexOf(H(t).position)>=0&&E(t)?U(t):t;return q(n)?e.filter((function(t){return q(t)&&S(t,n)&&"body"!==B(t)})):[]}(t):[].concat(e),o=[].concat(r,[n]),a=o.reduce((function(e,n){var r=lt(t,n,i);return e.top=I(r.top,e.top),e.right=T(r.right,e.right),e.bottom=T(r.bottom,e.bottom),e.left=I(r.left,e.left),e}),lt(t,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(q(k)?k:k.contextElement||z(t.elements.popper),s,c,o),M=P(t.elements.reference),D=ht({reference:M,element:g,placement:i}),L=ut(Object.assign({},g,D)),V=l===j?L:M,_={top:C.top-V.top+w.top,bottom:V.bottom-C.bottom+w.bottom,left:C.left-V.left+w.left,right:V.right-C.right+w.right},A=t.modifiersData.offset;if(l===j&&A){var F=A[i];Object.keys(_).forEach((function(t){var e=[b,v].indexOf(t)>=0?1:-1,n=[p,v].indexOf(t)>=0?"y":"x";_[t]+=F[n]*e}))}return _}function pt(t,e){void 0===e&&(e={});var n=e.boundary,i=e.rootBoundary,r=e.padding,o=e.flipVariations,a=e.allowedAutoPlacements,s=void 0===a?C:a,f=Q(e.placement),c=f?o?k:k.filter((function(t){return Q(t)===f})):x,u=c.filter((function(t){return s.indexOf(t)>=0}));0===u.length&&(u=c);var l=u.reduce((function(e,o){return e[o]=dt(t,{placement:o,boundary:n,rootBoundary:i,padding:r})[V(o)],e}),{});return Object.keys(l).sort((function(t,e){return l[t]-l[e]}))}var vt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,o=void 0===r||r,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,u=n.boundary,l=n.rootBoundary,h=n.altBoundary,d=n.flipVariations,x=void 0===d||d,g=n.allowedAutoPlacements,O=e.options.placement,j=V(O),k=f||(j!==O&&x?function(t){if(V(t)===y)return[];var e=nt(t);return[rt(t),e,rt(e)]}(O):[nt(O)]),C=[O].concat(k).reduce((function(t,n){return t.concat(V(n)===y?pt(e,{placement:n,boundary:u,rootBoundary:l,padding:c,flipVariations:x,allowedAutoPlacements:g}):n)}),[]),M=e.rects.reference,B=e.rects.popper,D=new Map,q=!0,E=C[0],L=0;L<C.length;L++){var I=C[L],T=V(I),_=Q(I)===w,A=[p,v].indexOf(T)>=0,F=A?"width":"height",P=dt(e,{placement:I,boundary:u,rootBoundary:l,altBoundary:h,padding:c}),R=A?_?b:m:_?v:p;M[F]>B[F]&&(R=nt(R));var S=nt(R),H=[];if(o&&H.push(P[T]<=0),s&&H.push(P[R]<=0,P[S]<=0),H.every((function(t){return t}))){E=I,q=!1;break}D.set(I,H)}if(q)for(var W=function(t){var e=C.find((function(e){var n=D.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return E=e,"break"},z=x?3:1;z>0&&"break"!==W(z);z--);e.placement!==E&&(e.modifiersData[i]._skip=!0,e.placement=E,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function mt(t){return[p,b,v,m].some((function(e){return t[e]>=0}))}function yt(t,e,n){void 0===n&&(n=!1);var i,r,o=E(e),a=E(e)&&function(t){var e=t.getBoundingClientRect(),n=_(e.width)/t.offsetWidth||1,i=_(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),s=z(e),f=P(t,a,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==B(e)||st(s))&&(c=(i=e)!==D(i)&&E(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:ot(i)),E(e)?((u=P(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):s&&(u.x=at(s))),{x:f.left+c.scrollLeft-u.x,y:f.top+c.scrollTop-u.y,width:f.width,height:f.height}}function xt(t){var e=new Map,n=new Set,i=[];function r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||r(t)})),i}var wt={placement:"bottom",modifiers:[],strategy:"absolute"};function gt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Ot(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,i=t.defaultOptions,r=void 0===i?wt:i;return function(t,e,i){void 0===i&&(i=r);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},wt,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},f=[],c=!1,u={state:s,setOptions:function(i){var o="function"==typeof i?i(s.options):i;l(),s.options=Object.assign({},r,s.options,o),s.scrollParents={reference:q(t)?ct(t):t.contextElement?ct(t.contextElement):[],popper:ct(e)};var a,c,h=function(t){var e=xt(t);return M.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((a=[].concat(n,s.options.modifiers),c=a.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return s.orderedModifiers=h.filter((function(t){return t.enabled})),s.orderedModifiers.forEach((function(t){var e=t.options,n=t.effect;if("function"==typeof n){var i=n({state:s,name:t.name,instance:u,options:void 0===e?{}:e});f.push(i||function(){})}})),u.update()},forceUpdate:function(){if(!c){var t=s.elements,e=t.reference,n=t.popper;if(gt(e,n)){s.rects={reference:yt(e,U(n),"fixed"===s.options.strategy),popper:R(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(t){return s.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<s.orderedModifiers.length;i++)if(!0!==s.reset){var r=s.orderedModifiers[i],o=r.fn,a=r.options;"function"==typeof o&&(s=o({state:s,options:void 0===a?{}:a,name:r.name,instance:u})||s)}else s.reset=!1,i=-1}}},update:(o=function(){return new Promise((function(t){u.forceUpdate(),t(s)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){l(),c=!0}};if(!gt(t,e))return u;function l(){f.forEach((function(t){return t()})),f=[]}return u.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),u}}var jt=Ot({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,a=i.resize,s=void 0===a||a,f=D(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",n.update,tt)})),s&&f.addEventListener("resize",n.update,tt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",n.update,tt)})),s&&f.removeEventListener("resize",n.update,tt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=ht({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=void 0===i||i,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,f=void 0===s||s,c={placement:V(e.placement),variation:Q(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,$(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:f})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,$(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];E(r)&&B(r)&&(Object.assign(r.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});E(i)&&B(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.name,i=t.options.offset,r=void 0===i?[0,0]:i,o=C.reduce((function(t,n){return t[n]=function(t,e,n){var i=V(t),r=[m,p].indexOf(i)>=0?-1:1,o="function"==typeof n?n(Object.assign({},e,{placement:t})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*r,[m,b].indexOf(i)>=0?{x:s,y:a}:{x:a,y:s}}(n,e.rects,r),t}),{}),a=o[e.placement],s=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a.x,e.modifiersData.popperOffsets.y+=s),e.modifiersData[n]=o}},vt,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,o=void 0===r||r,a=n.altAxis,s=void 0!==a&&a,f=n.tether,c=void 0===f||f,u=n.tetherOffset,l=void 0===u?0:u,h=dt(e,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),d=V(e.placement),y=Q(e.placement),x=!y,g=Y(d),O="x"===g?"y":"x",j=e.modifiersData.popperOffsets,k=e.rects.reference,C=e.rects.popper,M="function"==typeof l?l(Object.assign({},e.rects,{placement:e.placement})):l,B="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,q={x:0,y:0};if(j){if(o){var E,L="y"===g?p:m,_="y"===g?v:b,A="y"===g?"height":"width",F=j[g],P=F+h[L],S=F-h[_],H=c?-C[A]/2:0,W=y===w?k[A]:C[A],z=y===w?-C[A]:-k[A],G=e.elements.arrow,K=c&&G?R(G):{width:0,height:0},J=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},N=J[L],X=J[_],$=Z(0,k[A],K[A]),tt=x?k[A]/2-H-$-N-B.mainAxis:W-$-N-B.mainAxis,et=x?-k[A]/2+H+$+X+B.mainAxis:z+$+X+B.mainAxis,nt=e.elements.arrow&&U(e.elements.arrow),it=null!=(E=null==D?void 0:D[g])?E:0,rt=F+et-it,ot=Z(c?T(P,F+tt-it-(nt?"y"===g?nt.clientTop||0:nt.clientLeft||0:0)):P,F,c?I(S,rt):S);j[g]=ot,q[g]=ot-F}if(s){var at,st=j[O],ft="y"===O?"height":"width",ct=st+h["x"===g?p:m],ut=st-h["x"===g?v:b],lt=-1!==[p,m].indexOf(d),ht=null!=(at=null==D?void 0:D[O])?at:0,pt=lt?ct:st-k[ft]-C[ft]-ht+B.altAxis,vt=lt?st+k[ft]+C[ft]-ht-B.altAxis:ut,bt=c&&lt?function(t,e,n){var i=Z(t,e,n);return i>n?n:i}(pt,st,vt):Z(c?pt:ct,st,c?vt:ut);j[O]=bt,q[O]=bt-st}e.modifiersData[i]=q}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,r=t.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=V(n.placement),f=Y(s),c=[m,b].indexOf(s)>=0?"height":"width";if(o&&a){var u=function(t,e){return J("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:N(t,x))}(r.padding,n),l=R(o),h="y"===f?p:m,d="y"===f?v:b,y=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],w=a[f]-n.rects.reference[f],g=U(o),O=g?"y"===f?g.clientHeight||0:g.clientWidth||0:0,j=O/2-l[c]/2+(y/2-w/2),k=Z(u[h],j,O-l[c]-u[d]);n.modifiersData[i]=((e={})[f]=k,e.centerOffset=k-j,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&S(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,a=dt(e,{elementContext:"reference"}),s=dt(e,{altBoundary:!0}),f=bt(a,i),c=bt(s,r,o),u=mt(f),l=mt(c);e.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:l},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":l})}}]});const kt=class{constructor(n){t(this,n),this.showEvent=e(this,"showEvent"),this.hideEvent=e(this,"hideEvent"),this.placement="bottom",this.offset=[0,10],this.strategy="absolute",this.trigger="click",this.isOpen=!1}componentDidLoad(){this.popperInstance=jt(this.anchorRef,this.popperContentRef,this.popperOptions),"click"===this.trigger?window.addEventListener("click",this.handleClick.bind(this)):"hover"===this.trigger?(this.anchorRef.addEventListener("mouseenter",this.show.bind(this)),this.anchorRef.addEventListener("mouseleave",this.hide.bind(this)),this.popperContentRef.addEventListener("mouseenter",this.show.bind(this)),this.popperContentRef.addEventListener("mouseleave",this.hide.bind(this))):"focus"===this.trigger&&(this.anchorRef.addEventListener("focus",this.show.bind(this)),this.anchorRef.addEventListener("blur",this.hide.bind(this)))}disconnectedCallback(){"click"===this.trigger?window.removeEventListener("click",this.handleClick.bind(this)):"hover"===this.trigger?(this.anchorRef.removeEventListener("mouseenter",this.show.bind(this)),this.anchorRef.removeEventListener("mouseleave",this.hide.bind(this)),this.popperContentRef.removeEventListener("mouseenter",this.show.bind(this)),this.popperContentRef.removeEventListener("mouseleave",this.hide.bind(this))):"focus"===this.trigger&&(this.anchorRef.removeEventListener("focus",this.show.bind(this)),this.anchorRef.removeEventListener("blur",this.hide.bind(this)))}handleClick(t){const e=t.composedPath(),n=e.includes(this.anchorRef),i=e.includes(this.popperContentRef);!this.isOpen&&n?this.show():(this.isOpen&&!i||this.isOpen&&n)&&this.hide()}get popperOptions(){return{placement:this.placement,modifiers:[{name:"offset",options:{offset:this.offset}}],strategy:this.strategy}}show(){this.isOpen=!0,this.popperContentRef.setAttribute("data-show",""),this.popperInstance.update(),this.showEvent.emit()}hide(){this.isOpen=!1,this.popperContentRef.removeAttribute("data-show"),this.popperInstance.update(),this.hideEvent.emit()}render(){return n("div",{key:"7ef56b941bf884c5a1416b373372748374bb204a"},n("style",{key:"ac2a710bea0939dd7f279968cfd33d789eba3a08"},"\n .popper-content {\n display: none;\n }\n .popper-content[data-show] {\n display: block;\n z-index: 1030;\n }\n "),n("div",{key:"f34a15bd8122833ed8b188cd0519588f2da78bb9",class:"popper-content",ref:t=>this.popperContentRef=t},n("slot",{key:"54d97c9be7fe9c33584156569c927e2108cab331"})))}},Ct=class{constructor(n){t(this,n),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,n=e.getAttribute("name");this.inputHandler(n,e.value),this.formControlInput.emit(e.value)},this.updateInput=t=>{this.selectElement.value=t}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){let t=o;return this.errorText&&(t=s),this.disabled&&(t=f),this.isFocused&&(t=c),t}render(){var t;return n(i,{key:"f55283c73225466b10cec78e6e5ff1c268142d1b"},n("div",{key:"48beb377ca664b867598f8e472a3bb4825aecf9b",class:"form-group d-flex flex-column"},n("div",{key:"13debfb6a725d7f247eb5601e3361a3964b826e9",class:"d-flex align-items-start gap-2"},n("label",{key:"15ac64fb03a5c1cb8f55c18bd7eb41d66328e599",part:a,class:"form-label",htmlFor:this.name},this.label),n("form-control-tooltip",{key:"3d8b43ed6e997234f7c64daf41b2286bec93340e",helpText:this.helpText})),n("select",{key:"1c3eb5699a0b76c694a02fe50e8070483b2960e6",ref:t=>this.selectElement=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-select is-invalid":"form-select",disabled:this.disabled},null===(t=this.options)||void 0===t?void 0:t.map((t=>n("option",{value:t.value},t.label)))),n(d,{key:"d223fd1fad44de99812b0e3a3429e3931b798c2c",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},Mt=class{constructor(n){t(this,n),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,n=e.getAttribute("name");this.inputHandler(n,e.value),this.formControlInput.emit({name:n,value:e.value})},this.updateInput=t=>{const e=this.el.querySelector("input");e&&(e.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.errorText?s:this.disabled?f:this.isFocused?c:o}render(){return n(i,{key:"9ceda4ac9f8bd1ab572652b1818672948ad7d66f"},n("div",{key:"da631a05be3b84ca86a91a360eb7f6a3a3468b78",class:"form-group d-flex flex-column"},n("div",{key:"d5c5b7fe29e611806c63e43aa99c9831d4e8ba35",class:"d-flex align-items-start gap-2"},n("label",{key:"327ca9d8520ba4814104667da7cd8275489431ee",part:a,class:"form-label",htmlFor:this.name},this.label),n("form-control-tooltip",{key:"32678aefb28b06734c80e1f37b5c4b546ad0770b",helpText:this.helpText})),n("input",{key:"85152fdebfa1081e84e2c8adf760e4f7f6a94ea0",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),n(d,{key:"d0d8bd801df53a377010b89167d30ded49bc2cdc",errorText:this.errorText,name:this.name})))}get el(){return r(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},Bt=class{constructor(e){t(this,e)}show(){this.tooltip.classList.add("show")}hide(){this.tooltip.classList.remove("show")}render(){return this.helpText?n("div",{class:"tooltip-container"},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-question-square tooltip-icon",viewBox:"0 0 16 16",ref:t=>this.anchorIcon=t,part:h},n("path",{d:"M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"}),n("path",{d:"M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286m1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94"})),n("custom-popper",{trigger:"hover",placement:"top",anchorRef:this.anchorIcon},n("div",{class:"tooltip bs-tooltip-top",part:u,role:"tooltip",ref:t=>this.tooltip=t},n("div",{class:"tooltip-inner",part:l},this.helpText)))):null}};export{kt as custom_popper,Ct as form_control_select,Mt as form_control_text,Bt as form_control_tooltip}
1
+ import{r as t,c as e,h as n,H as i,a as r}from"./p-Bta_r52Z.js";import{c as o,l as a,b as s,T as f,a as c,aw as u,ax as l,ay as h}from"./p-_6eQgwfE.js";import{F as d}from"./p-B8Ovjy6S.js";import"./p-CZfYo5-1.js";var p="top",v="bottom",b="right",m="left",y="auto",x=[p,v,b,m],w="start",g="end",O="viewport",j="popper",k=x.reduce((function(t,e){return t.concat([e+"-"+w,e+"-"+g])}),[]),M=[].concat(x,[y]).reduce((function(t,e){return t.concat([e,e+"-"+w,e+"-"+g])}),[]),B=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function C(t){return t?(t.nodeName||"").toLowerCase():null}function E(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function T(t){return t instanceof E(t).Element||t instanceof Element}function _(t){return t instanceof E(t).HTMLElement||t instanceof HTMLElement}function q(t){return"undefined"!=typeof ShadowRoot&&(t instanceof E(t).ShadowRoot||t instanceof ShadowRoot)}function D(t){return t.split("-")[0]}var L=Math.max,V=Math.min,A=Math.round;function I(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function P(){return!/^((?!chrome|android).)*safari/i.test(I())}function R(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&_(t)&&(r=t.offsetWidth>0&&A(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&A(i.height)/t.offsetHeight||1);var a=(T(t)?E(t):window).visualViewport,s=!P()&&n,f=(i.left+(s&&a?a.offsetLeft:0))/r,c=(i.top+(s&&a?a.offsetTop:0))/o,u=i.width/r,l=i.height/o;return{width:u,height:l,top:c,right:f+u,bottom:c+l,left:f,x:f,y:c}}function S(t){var e=R(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function F(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&q(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function H(t){return E(t).getComputedStyle(t)}function W(t){return["table","td","th"].indexOf(C(t))>=0}function z(t){return((T(t)?t.ownerDocument:t.document)||window.document).documentElement}function Z(t){return"html"===C(t)?t:t.assignedSlot||t.parentNode||(q(t)?t.host:null)||z(t)}function K(t){return _(t)&&"fixed"!==H(t).position?t.offsetParent:null}function Q(t){for(var e=E(t),n=K(t);n&&W(n)&&"static"===H(n).position;)n=K(n);return n&&("html"===C(n)||"body"===C(n)&&"static"===H(n).position)?e:n||function(t){var e=/firefox/i.test(I());if(/Trident/i.test(I())&&_(t)&&"fixed"===H(t).position)return null;var n=Z(t);for(q(n)&&(n=n.host);_(n)&&["html","body"].indexOf(C(n))<0;){var i=H(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function U(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Y(t,e,n){return L(t,V(e,n))}function G(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function J(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function N(t){return t.split("-")[1]}var X={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $(t){var e,n=t.popper,i=t.popperRect,r=t.placement,o=t.variation,a=t.offsets,s=t.position,f=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,l=t.isFixed,h=a.x,d=void 0===h?0:h,y=a.y,x=void 0===y?0:y,w="function"==typeof u?u({x:d,y:x}):{x:d,y:x};d=w.x,x=w.y;var O=a.hasOwnProperty("x"),j=a.hasOwnProperty("y"),k=m,M=p,B=window;if(c){var C=Q(n),T="clientHeight",_="clientWidth";C===E(n)&&"static"!==H(C=z(n)).position&&"absolute"===s&&(T="scrollHeight",_="scrollWidth"),(r===p||(r===m||r===b)&&o===g)&&(M=v,x-=(l&&C===B&&B.visualViewport?B.visualViewport.height:C[T])-i.height,x*=f?1:-1),r!==m&&(r!==p&&r!==v||o!==g)||(k=b,d-=(l&&C===B&&B.visualViewport?B.visualViewport.width:C[_])-i.width,d*=f?1:-1)}var q,D=Object.assign({position:s},c&&X),L=!0===u?function(t,e){var n=t.y,i=e.devicePixelRatio||1;return{x:A(t.x*i)/i||0,y:A(n*i)/i||0}}({x:d,y:x},E(n)):{x:d,y:x};return d=L.x,x=L.y,Object.assign({},D,f?((q={})[M]=j?"0":"",q[k]=O?"0":"",q.transform=(B.devicePixelRatio||1)<=1?"translate("+d+"px, "+x+"px)":"translate3d("+d+"px, "+x+"px, 0)",q):((e={})[M]=j?x+"px":"",e[k]=O?d+"px":"",e.transform="",e))}var tt={passive:!0},et={left:"right",right:"left",bottom:"top",top:"bottom"};function nt(t){return t.replace(/left|right|bottom|top/g,(function(t){return et[t]}))}var it={start:"end",end:"start"};function rt(t){return t.replace(/start|end/g,(function(t){return it[t]}))}function ot(t){var e=E(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function at(t){return R(z(t)).left+ot(t).scrollLeft}function st(t){var e=H(t);return/auto|scroll|overlay|hidden/.test(e.overflow+e.overflowY+e.overflowX)}function ft(t){return["html","body","#document"].indexOf(C(t))>=0?t.ownerDocument.body:_(t)&&st(t)?t:ft(Z(t))}function ct(t,e){var n;void 0===e&&(e=[]);var i=ft(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),o=E(i),a=r?[o].concat(o.visualViewport||[],st(i)?i:[]):i,s=e.concat(a);return r?s:s.concat(ct(Z(a)))}function ut(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function lt(t,e,n){return e===O?ut(function(t,e){var n=E(t),i=z(t),r=n.visualViewport,o=i.clientWidth,a=i.clientHeight,s=0,f=0;if(r){o=r.width,a=r.height;var c=P();(c||!c&&"fixed"===e)&&(s=r.offsetLeft,f=r.offsetTop)}return{width:o,height:a,x:s+at(t),y:f}}(t,n)):T(e)?function(t,e){var n=R(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):ut(function(t){var e,n=z(t),i=ot(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=L(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=L(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-i.scrollLeft+at(t),f=-i.scrollTop;return"rtl"===H(r||n).direction&&(s+=L(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:a,x:s,y:f}}(z(t)))}function ht(t){var e,n=t.reference,i=t.element,r=t.placement,o=r?D(r):null,a=r?N(r):null,s=n.x+n.width/2-i.width/2,f=n.y+n.height/2-i.height/2;switch(o){case p:e={x:s,y:n.y-i.height};break;case v:e={x:s,y:n.y+n.height};break;case b:e={x:n.x+n.width,y:f};break;case m:e={x:n.x-i.width,y:f};break;default:e={x:n.x,y:n.y}}var c=o?U(o):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case w:e[c]=e[c]-(n[u]/2-i[u]/2);break;case g:e[c]=e[c]+(n[u]/2-i[u]/2)}}return e}function dt(t,e){void 0===e&&(e={});var n=e.placement,i=void 0===n?t.placement:n,r=e.strategy,o=void 0===r?t.strategy:r,a=e.boundary,s=void 0===a?"clippingParents":a,f=e.rootBoundary,c=void 0===f?O:f,u=e.elementContext,l=void 0===u?j:u,h=e.altBoundary,d=void 0!==h&&h,m=e.padding,y=void 0===m?0:m,w=G("number"!=typeof y?y:J(y,x)),g=t.rects.popper,k=t.elements[d?l===j?"reference":j:l],M=function(t,e,n,i){var r="clippingParents"===e?function(t){var e=ct(Z(t)),n=["absolute","fixed"].indexOf(H(t).position)>=0&&_(t)?Q(t):t;return T(n)?e.filter((function(t){return T(t)&&F(t,n)&&"body"!==C(t)})):[]}(t):[].concat(e),o=[].concat(r,[n]),a=o.reduce((function(e,n){var r=lt(t,n,i);return e.top=L(r.top,e.top),e.right=V(r.right,e.right),e.bottom=V(r.bottom,e.bottom),e.left=L(r.left,e.left),e}),lt(t,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(T(k)?k:k.contextElement||z(t.elements.popper),s,c,o),B=R(t.elements.reference),E=ht({reference:B,element:g,placement:i}),q=ut(Object.assign({},g,E)),D=l===j?q:B,A={top:M.top-D.top+w.top,bottom:D.bottom-M.bottom+w.bottom,left:M.left-D.left+w.left,right:D.right-M.right+w.right},I=t.modifiersData.offset;if(l===j&&I){var P=I[i];Object.keys(A).forEach((function(t){var e=[b,v].indexOf(t)>=0?1:-1,n=[p,v].indexOf(t)>=0?"y":"x";A[t]+=P[n]*e}))}return A}function pt(t,e){void 0===e&&(e={});var n=e.boundary,i=e.rootBoundary,r=e.padding,o=e.flipVariations,a=e.allowedAutoPlacements,s=void 0===a?M:a,f=N(e.placement),c=f?o?k:k.filter((function(t){return N(t)===f})):x,u=c.filter((function(t){return s.indexOf(t)>=0}));0===u.length&&(u=c);var l=u.reduce((function(e,o){return e[o]=dt(t,{placement:o,boundary:n,rootBoundary:i,padding:r})[D(o)],e}),{});return Object.keys(l).sort((function(t,e){return l[t]-l[e]}))}var vt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,o=void 0===r||r,a=n.altAxis,s=void 0===a||a,f=n.fallbackPlacements,c=n.padding,u=n.boundary,l=n.rootBoundary,h=n.altBoundary,d=n.flipVariations,x=void 0===d||d,g=n.allowedAutoPlacements,O=e.options.placement,j=D(O),k=f||(j!==O&&x?function(t){if(D(t)===y)return[];var e=nt(t);return[rt(t),e,rt(e)]}(O):[nt(O)]),M=[O].concat(k).reduce((function(t,n){return t.concat(D(n)===y?pt(e,{placement:n,boundary:u,rootBoundary:l,padding:c,flipVariations:x,allowedAutoPlacements:g}):n)}),[]),B=e.rects.reference,C=e.rects.popper,E=new Map,T=!0,_=M[0],q=0;q<M.length;q++){var L=M[q],V=D(L),A=N(L)===w,I=[p,v].indexOf(V)>=0,P=I?"width":"height",R=dt(e,{placement:L,boundary:u,rootBoundary:l,altBoundary:h,padding:c}),S=I?A?b:m:A?v:p;B[P]>C[P]&&(S=nt(S));var F=nt(S),H=[];if(o&&H.push(R[V]<=0),s&&H.push(R[S]<=0,R[F]<=0),H.every((function(t){return t}))){_=L,T=!1;break}E.set(L,H)}if(T)for(var W=function(t){var e=M.find((function(e){var n=E.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return _=e,"break"},z=x?3:1;z>0&&"break"!==W(z);z--);e.placement!==_&&(e.modifiersData[i]._skip=!0,e.placement=_,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function mt(t){return[p,b,v,m].some((function(e){return t[e]>=0}))}function yt(t,e,n){void 0===n&&(n=!1);var i,r,o=_(e),a=_(e)&&function(t){var e=t.getBoundingClientRect(),n=A(e.width)/t.offsetWidth||1,i=A(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),s=z(e),f=R(t,a,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==C(e)||st(s))&&(c=(i=e)!==E(i)&&_(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:ot(i)),_(e)?((u=R(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):s&&(u.x=at(s))),{x:f.left+c.scrollLeft-u.x,y:f.top+c.scrollTop-u.y,width:f.width,height:f.height}}function xt(t){var e=new Map,n=new Set,i=[];function r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}})),i.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||r(t)})),i}var wt={placement:"bottom",modifiers:[],strategy:"absolute"};function gt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function Ot(t){void 0===t&&(t={});var e=t.defaultModifiers,n=void 0===e?[]:e,i=t.defaultOptions,r=void 0===i?wt:i;return function(t,e,i){void 0===i&&(i=r);var o,a,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},wt,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},f=[],c=!1,u={state:s,setOptions:function(i){var o="function"==typeof i?i(s.options):i;l(),s.options=Object.assign({},r,s.options,o),s.scrollParents={reference:T(t)?ct(t):t.contextElement?ct(t.contextElement):[],popper:ct(e)};var a,c,h=function(t){var e=xt(t);return B.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((a=[].concat(n,s.options.modifiers),c=a.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return s.orderedModifiers=h.filter((function(t){return t.enabled})),s.orderedModifiers.forEach((function(t){var e=t.options,n=t.effect;if("function"==typeof n){var i=n({state:s,name:t.name,instance:u,options:void 0===e?{}:e});f.push(i||function(){})}})),u.update()},forceUpdate:function(){if(!c){var t=s.elements,e=t.reference,n=t.popper;if(gt(e,n)){s.rects={reference:yt(e,Q(n),"fixed"===s.options.strategy),popper:S(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(t){return s.modifiersData[t.name]=Object.assign({},t.data)}));for(var i=0;i<s.orderedModifiers.length;i++)if(!0!==s.reset){var r=s.orderedModifiers[i],o=r.fn,a=r.options;"function"==typeof o&&(s=o({state:s,options:void 0===a?{}:a,name:r.name,instance:u})||s)}else s.reset=!1,i=-1}}},update:(o=function(){return new Promise((function(t){u.forceUpdate(),t(s)}))},function(){return a||(a=new Promise((function(t){Promise.resolve().then((function(){a=void 0,t(o())}))}))),a}),destroy:function(){l(),c=!0}};if(!gt(t,e))return u;function l(){f.forEach((function(t){return t()})),f=[]}return u.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),u}}var jt=Ot({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,o=void 0===r||r,a=i.resize,s=void 0===a||a,f=E(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",n.update,tt)})),s&&f.addEventListener("resize",n.update,tt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",n.update,tt)})),s&&f.removeEventListener("resize",n.update,tt)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state;e.modifiersData[t.name]=ht({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=void 0===i||i,o=n.adaptive,a=void 0===o||o,s=n.roundOffsets,f=void 0===s||s,c={placement:D(e.placement),variation:N(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,$(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:f})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,$(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];_(r)&&C(r)&&(Object.assign(r.style,n),Object.keys(i).forEach((function(t){var e=i[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var i=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});_(i)&&C(i)&&(Object.assign(i.style,o),Object.keys(r).forEach((function(t){i.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.name,i=t.options.offset,r=void 0===i?[0,0]:i,o=M.reduce((function(t,n){return t[n]=function(t,e,n){var i=D(t),r=[m,p].indexOf(i)>=0?-1:1,o="function"==typeof n?n(Object.assign({},e,{placement:t})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*r,[m,b].indexOf(i)>=0?{x:s,y:a}:{x:a,y:s}}(n,e.rects,r),t}),{}),a=o[e.placement],s=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=a.x,e.modifiersData.popperOffsets.y+=s),e.modifiersData[n]=o}},vt,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,o=void 0===r||r,a=n.altAxis,s=void 0!==a&&a,f=n.tether,c=void 0===f||f,u=n.tetherOffset,l=void 0===u?0:u,h=dt(e,{boundary:n.boundary,rootBoundary:n.rootBoundary,padding:n.padding,altBoundary:n.altBoundary}),d=D(e.placement),y=N(e.placement),x=!y,g=U(d),O="x"===g?"y":"x",j=e.modifiersData.popperOffsets,k=e.rects.reference,M=e.rects.popper,B="function"==typeof l?l(Object.assign({},e.rects,{placement:e.placement})):l,C="number"==typeof B?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),E=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,T={x:0,y:0};if(j){if(o){var _,q="y"===g?p:m,A="y"===g?v:b,I="y"===g?"height":"width",P=j[g],R=P+h[q],F=P-h[A],H=c?-M[I]/2:0,W=y===w?k[I]:M[I],z=y===w?-M[I]:-k[I],Z=e.elements.arrow,K=c&&Z?S(Z):{width:0,height:0},G=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},J=G[q],X=G[A],$=Y(0,k[I],K[I]),tt=x?k[I]/2-H-$-J-C.mainAxis:W-$-J-C.mainAxis,et=x?-k[I]/2+H+$+X+C.mainAxis:z+$+X+C.mainAxis,nt=e.elements.arrow&&Q(e.elements.arrow),it=null!=(_=null==E?void 0:E[g])?_:0,rt=P+et-it,ot=Y(c?V(R,P+tt-it-(nt?"y"===g?nt.clientTop||0:nt.clientLeft||0:0)):R,P,c?L(F,rt):F);j[g]=ot,T[g]=ot-P}if(s){var at,st=j[O],ft="y"===O?"height":"width",ct=st+h["x"===g?p:m],ut=st-h["x"===g?v:b],lt=-1!==[p,m].indexOf(d),ht=null!=(at=null==E?void 0:E[O])?at:0,pt=lt?ct:st-k[ft]-M[ft]-ht+C.altAxis,vt=lt?st+k[ft]+M[ft]-ht-C.altAxis:ut,bt=c&&lt?function(t,e,n){var i=Y(t,e,n);return i>n?n:i}(pt,st,vt):Y(c?pt:ct,st,c?vt:ut);j[O]=bt,T[O]=bt-st}e.modifiersData[i]=T}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,r=t.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=D(n.placement),f=U(s),c=[m,b].indexOf(s)>=0?"height":"width";if(o&&a){var u=function(t,e){return G("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:J(t,x))}(r.padding,n),l=S(o),h="y"===f?p:m,d="y"===f?v:b,y=n.rects.reference[c]+n.rects.reference[f]-a[f]-n.rects.popper[c],w=a[f]-n.rects.reference[f],g=Q(o),O=g?"y"===f?g.clientHeight||0:g.clientWidth||0:0,j=O/2-l[c]/2+(y/2-w/2),k=Y(u[h],j,O-l[c]-u[d]);n.modifiersData[i]=((e={})[f]=k,e.centerOffset=k-j,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&F(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,a=dt(e,{elementContext:"reference"}),s=dt(e,{altBoundary:!0}),f=bt(a,i),c=bt(s,r,o),u=mt(f),l=mt(c);e.modifiersData[n]={referenceClippingOffsets:f,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:l},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":l})}}]});const kt=class{constructor(n){t(this,n),this.showEvent=e(this,"showEvent"),this.hideEvent=e(this,"hideEvent"),this.placement="bottom",this.offset=[0,10],this.strategy="absolute",this.trigger="click",this.isOpen=!1}componentDidLoad(){this.popperInstance=jt(this.anchorRef,this.popperContentRef,this.popperOptions),"click"===this.trigger?window.addEventListener("click",this.handleClick.bind(this)):"hover"===this.trigger?(this.anchorRef.addEventListener("mouseenter",this.show.bind(this)),this.anchorRef.addEventListener("mouseleave",this.hide.bind(this)),this.popperContentRef.addEventListener("mouseenter",this.show.bind(this)),this.popperContentRef.addEventListener("mouseleave",this.hide.bind(this))):"focus"===this.trigger&&(this.anchorRef.addEventListener("focus",this.show.bind(this)),this.anchorRef.addEventListener("blur",this.hide.bind(this)))}disconnectedCallback(){"click"===this.trigger?window.removeEventListener("click",this.handleClick.bind(this)):"hover"===this.trigger?(this.anchorRef.removeEventListener("mouseenter",this.show.bind(this)),this.anchorRef.removeEventListener("mouseleave",this.hide.bind(this)),this.popperContentRef.removeEventListener("mouseenter",this.show.bind(this)),this.popperContentRef.removeEventListener("mouseleave",this.hide.bind(this))):"focus"===this.trigger&&(this.anchorRef.removeEventListener("focus",this.show.bind(this)),this.anchorRef.removeEventListener("blur",this.hide.bind(this)))}handleClick(t){const e=t.composedPath(),n=e.includes(this.anchorRef),i=e.includes(this.popperContentRef);!this.isOpen&&n?this.show():(this.isOpen&&!i||this.isOpen&&n)&&this.hide()}get popperOptions(){return{placement:this.placement,modifiers:[{name:"offset",options:{offset:this.offset}}],strategy:this.strategy}}show(){this.isOpen=!0,this.popperContentRef.setAttribute("data-show",""),this.popperInstance.update(),this.showEvent.emit()}hide(){this.isOpen=!1,this.popperContentRef.removeAttribute("data-show"),this.popperInstance.update(),this.hideEvent.emit()}render(){return n("div",{key:"f0fa57ab03b7b98fbf1f869ebae9410bab1b4e5f"},n("style",{key:"f8e39710d856d83d393713f0dbe42b404e60f1d8"},"\n .popper-content {\n display: none;\n }\n .popper-content[data-show] {\n display: block;\n z-index: 1030;\n }\n "),n("div",{key:"74550d809cb22ddc60ab2762c6f0ea7914b05865",class:"popper-content",ref:t=>this.popperContentRef=t},n("slot",{key:"37b78e823f0bec6ebbe7a4d3dd2f177ec96a647a"})))}},Mt=class{constructor(n){t(this,n),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,n=e.getAttribute("name");this.inputHandler(n,e.value),this.formControlInput.emit(e.value)},this.updateInput=t=>{this.selectElement.value=t}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){let t=o;return this.errorText&&(t=s),this.disabled&&(t=f),this.isFocused&&(t=c),t}render(){var t;return n(i,{key:"605b6cb9bfa7bac528ee0af9c4deb5e7b1356b93"},n("div",{key:"f8b42609971ff02c4bc147a113bb4a025d32bcd8",class:"form-group d-flex flex-column"},n("div",{key:"26c87da7b92edbb7fd41825a4e64b642778d0808",class:"d-flex align-items-start gap-2"},n("label",{key:"43ad562c323b586bf7ab0260258d8678ef3194aa",part:a,class:"form-label",htmlFor:this.name},this.label),n("form-control-tooltip",{key:"1e4b1fa0e9bae57b6e783fb873de38c49ae7a8a4",helpText:this.helpText})),n("select",{key:"bef2df140499a642ea9bf5bd3f6d7b558042e733",ref:t=>this.selectElement=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-select is-invalid":"form-select",disabled:this.disabled},null===(t=this.options)||void 0===t?void 0:t.map((t=>n("option",{value:t.value},t.label)))),n(d,{key:"99abaaa766c1270cf1cfd926320d343393b13d1d",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},Bt=class{constructor(n){t(this,n),this.formControlInput=e(this,"formControlInput"),this.formControlBlur=e(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const e=t.target,n=e.getAttribute("name");this.inputHandler(n,e.value),this.formControlInput.emit({name:n,value:e.value})},this.updateInput=t=>{const e=this.el.querySelector("input");e&&(e.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.errorText?s:this.disabled?f:this.isFocused?c:o}render(){return n(i,{key:"fab6618fdcf4d8c5f61687ecd5edfd6783754ec8"},n("div",{key:"8f5b56c46fcd890c2601dd3b79fe60438bd561ef",class:"form-group d-flex flex-column"},n("div",{key:"2226c532baa84905d8051e2222f24105b224d42b",class:"d-flex align-items-start gap-2"},n("label",{key:"7c516dce181a938168dbe4961a90a946c723fc91",part:a,class:"form-label",htmlFor:this.name},this.label),n("form-control-tooltip",{key:"f4868f88e4f3e4795e25ad505e78cf8ab212623d",helpText:this.helpText})),n("input",{key:"10f02be3c0d055089697155878fedc23aa9f31e3",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),n(d,{key:"02c21c4b071903db49e2e8b786275247d75c92f9",errorText:this.errorText,name:this.name})))}get el(){return r(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},Ct=class{constructor(e){t(this,e)}show(){this.tooltip.classList.add("show")}hide(){this.tooltip.classList.remove("show")}render(){return this.helpText?n("div",{class:"tooltip-container"},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-question-square tooltip-icon",viewBox:"0 0 16 16",ref:t=>this.anchorIcon=t,part:h},n("path",{d:"M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"}),n("path",{d:"M5.255 5.786a.237.237 0 0 0 .241.247h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286m1.557 5.763c0 .533.425.927 1.01.927.609 0 1.028-.394 1.028-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94"})),n("custom-popper",{trigger:"hover",placement:"top",anchorRef:this.anchorIcon},n("div",{class:"tooltip bs-tooltip-top",part:u,role:"tooltip",ref:t=>this.tooltip=t},n("div",{class:"tooltip-inner",part:l},this.helpText)))):null}};export{kt as custom_popper,Mt as form_control_select,Bt as form_control_text,Ct as form_control_tooltip}
@@ -1 +1 @@
1
- import{r as s,c as t,h as e}from"./p-D6FDxSyt.js";import{C as i,a as r}from"./p-SdntD1xf.js";import{c as o}from"./p-Dt-vy9Le.js";import{A as h}from"./p-BrLVc_85.js";import{S as n}from"./p-DuYlA4lj.js";import{H as a}from"./p-B190pN0v.js";import"./p-CZfYo5-1.js";import{B as p}from"./p-XYgDHrVL.js";import"./p-BX8GieXu.js";const c=class{constructor(e){s(this,e),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.submitEvent=t(this,"submit-event"),this.loading=!1,this.businessProvisioned=!1,this.currentStep=0,this.allowOptionalFields=!1,this.setBusinessProvisioned=()=>{this.getBusiness({onSuccess:s=>{this.businessProvisioned=o(s.data),this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:r.PROVISIONING_REQUESTED,severity:i.INFO})},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})}})},this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:e})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:e})}})},this.refs=[],this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>this.currentStep--,this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:p.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}handleFormCompleted(){this.postProvisioningData()}componentWillLoad(){this.getBusiness&&this.setBusinessProvisioned(),this.refs=[this.coreInfoRef,this.legalAddressRef,this.additionalQuestionsRef,this.representativeRef,this.ownersRef,this.bankAccountRef,this.termsRef]}get businessEndpoint(){return`entities/business/${this.businessId}`}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`${this.currentStep+1} of ${this.totalSteps+1}`}handleFormLoading(s){this.loading=s.detail}render(){return e(n,{key:"e195b19df4d1061ecf8b305005faf0ffce68221e"},e("div",{key:"17d42ba0a22567dce6760e2047478eb1bc36a794",class:"row gap-3"},e(a,{key:"507788c4af5572cbb09037443ae51b505567d825",text:this.formTitle}),e("justifi-payment-provisioning-form-steps",{key:"4b7e73217ff8230756542c3b0c069e18b7f23356",businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,handleFormLoading:this.handleFormLoading}),e("div",{key:"2ae1e8386114181cbd6f7999ac047b7709daa4fb",class:"d-flex justify-content-between align-items-center"},e("div",{key:"a126b618a3028c4c7a9c12145ab63e222a17e51f",class:"d-flex align-items-center",part:h},this.stepCounter),e("justifi-payment-provisioning-form-buttons",{key:"a66e1ac554e0dffa78be59df6a74d8175ba0376c",currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}};export{c as justifi_payment_provisioning_core}
1
+ import{r as s,c as t,h as e}from"./p-Bta_r52Z.js";import{C as i,a as r}from"./p-BhrFjjAs.js";import{c as o}from"./p-Dt-vy9Le.js";import{t as h}from"./p-_6eQgwfE.js";import{S as a}from"./p-BEDtXmpq.js";import{H as n}from"./p-e07sVz4Z.js";import"./p-CZfYo5-1.js";import{B as p}from"./p-XYgDHrVL.js";import"./p-BX8GieXu.js";const c=class{constructor(e){s(this,e),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.submitEvent=t(this,"submit-event"),this.loading=!1,this.businessProvisioned=!1,this.currentStep=0,this.allowOptionalFields=!1,this.setBusinessProvisioned=()=>{this.getBusiness({onSuccess:s=>{this.businessProvisioned=o(s.data),this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:r.PROVISIONING_REQUESTED,severity:i.INFO})},onError:({error:s,code:t,severity:e})=>{this.errorEvent.emit({message:s,errorCode:t,severity:e})}})},this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:e})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:e})}})},this.refs=[],this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>this.currentStep--,this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:p.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}handleFormCompleted(){this.postProvisioningData()}componentWillLoad(){this.getBusiness&&this.setBusinessProvisioned(),this.refs=[this.coreInfoRef,this.legalAddressRef,this.additionalQuestionsRef,this.representativeRef,this.ownersRef,this.bankAccountRef,this.termsRef]}get businessEndpoint(){return`entities/business/${this.businessId}`}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`${this.currentStep+1} of ${this.totalSteps+1}`}handleFormLoading(s){this.loading=s.detail}render(){return e(a,{key:"e195b19df4d1061ecf8b305005faf0ffce68221e"},e("div",{key:"17d42ba0a22567dce6760e2047478eb1bc36a794",class:"row gap-3"},e(n,{key:"507788c4af5572cbb09037443ae51b505567d825",text:this.formTitle}),e("justifi-payment-provisioning-form-steps",{key:"4b7e73217ff8230756542c3b0c069e18b7f23356",businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,handleFormLoading:this.handleFormLoading}),e("div",{key:"2ae1e8386114181cbd6f7999ac047b7709daa4fb",class:"d-flex justify-content-between align-items-center"},e("div",{key:"a126b618a3028c4c7a9c12145ab63e222a17e51f",class:"d-flex align-items-center",part:h},this.stepCounter),e("justifi-payment-provisioning-form-buttons",{key:"a66e1ac554e0dffa78be59df6a74d8175ba0376c",currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}};export{c as justifi_payment_provisioning_core}
@@ -0,0 +1 @@
1
+ import{r as s,c as i,h as t}from"./p-Bta_r52Z.js";import{c as o,J as r}from"./p-DzPrenCi.js";import{C as e,a as p}from"./p-BhrFjjAs.js";import{m as n,a}from"./p-BxfUcCXo.js";import{B as h}from"./p-BpEw7AJl.js";import{A as m}from"./p-Yj41tobi.js";import"./p-D7js9xfx.js";import"./p-CLHwhyvu.js";import"./p-DddGO-XR.js";import"./p-BPCw4WEY.js";import"./p-Ct-uNz2r.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import"./p-CyXXks-Q.js";import"./p-NqdaxjDT.js";import"./p-CBs671Ol.js";import"./p-D3BIZZrc.js";import"./p-9REosSLu.js";import"./p-BFTU3MAI.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const j=m();class u{async postProvisioning(s,i,t){return j.post({endpoint:"entities/provisioning",body:{business_id:i,product_category:t},authToken:s})}}const d=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event"),this.allowOptionalFields=!1,this.formTitle="Business Information"}propChanged(){this.initializeApi()}componentWillLoad(){o(),this.analytics=new r(this),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new h}),this.postProvisioning=a({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new u})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:p.MISSING_PROPS,severity:e.ERROR})}render(){return t("justifi-payment-provisioning-core",{key:"11871305b4b4974787a9278195ea0b314be250b0",businessId:this.businessId,authToken:this.authToken,allowOptionalFields:this.allowOptionalFields,formTitle:this.formTitle,getBusiness:this.getBusiness,postProvisioning:this.postProvisioning})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{d as justifi_payment_provisioning}