@feedmepos/ui-library 1.1.2 → 1.1.4

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 (275) hide show
  1. package/dist/components/avatar/FmAvatar.vue.d.ts +1 -1
  2. package/dist/components/badge/FmBadge.vue.d.ts +3 -3
  3. package/dist/components/button/FmButton.vue.d.ts +4 -4
  4. package/dist/components/chip/FmChip.vue.d.ts +2 -2
  5. package/dist/components/dialog/FmDialog.vue.d.ts +3 -0
  6. package/dist/components/drop-field/FmDropField.vue.d.ts +1 -1
  7. package/dist/components/dynamic-dialog/FmDynamicDialog.vue.d.ts +9 -4
  8. package/dist/components/form/calendar/date-picker/FmDatePicker.vue.d.ts +18 -7
  9. package/dist/components/form/calendar/date-picker/FmDatePickerDesktop.vue.d.ts +8 -3
  10. package/dist/components/form/calendar/date-picker/FmDatePickerMobile.vue.d.ts +8 -3
  11. package/dist/components/form/calendar/date-range-picker/FmDateRangePicker.vue.d.ts +18 -6
  12. package/dist/components/form/calendar/date-range-picker/FmDateRangePickerDesktop.vue.d.ts +9 -3
  13. package/dist/components/form/calendar/date-range-picker/FmDateRangePickerField.vue.d.ts +2 -1
  14. package/dist/components/form/calendar/date-range-picker/FmDateRangePickerMobile.vue.d.ts +12 -3
  15. package/dist/components/form/checkbox/FmCheckbox.vue.d.ts +3 -3
  16. package/dist/components/form/field/FmField.vue.d.ts +5 -5
  17. package/dist/components/form/form/FmForm.vue.d.ts +38 -9
  18. package/dist/components/form/form-group/FmFormGroup.vue.d.ts +5 -5
  19. package/dist/components/form/helper-text/FmHelperText.vue.d.ts +4 -4
  20. package/dist/components/form/label/FmLabel.vue.d.ts +4 -4
  21. package/dist/components/form/phone-number/FmPhoneNumber.vue.d.ts +5 -5
  22. package/dist/components/form/radio/FmRadio.vue.d.ts +1 -1
  23. package/dist/components/form/radio-group/FmRadioGroup.vue.d.ts +6 -6
  24. package/dist/components/form/search/FmSearch.vue.d.ts +6 -6
  25. package/dist/components/form/select/FmSelect.vue.d.ts +6 -6
  26. package/dist/components/form/stepper-field/FmStepperField.vue.d.ts +7 -4
  27. package/dist/components/form/switch/FmSwitch.vue.d.ts +4 -4
  28. package/dist/components/form/text-field/FmTextField.vue.d.ts +8 -8
  29. package/dist/components/form/textarea/FmTextarea.vue.d.ts +5 -5
  30. package/dist/components/form/time-picker/FmTimePicker.vue.d.ts +9 -5
  31. package/dist/components/form/time-picker/FmTimeRangePicker.vue.d.ts +9 -5
  32. package/dist/components/icon/FmIcon.vue.d.ts +1 -1
  33. package/dist/components/list/FmListItem.vue.d.ts +1 -1
  34. package/dist/components/menu/menu-component/FmMenu.vue.d.ts +3 -1
  35. package/dist/components/menu/menu-item/FmMenuItem.vue.d.ts +6 -1
  36. package/dist/components/overlay/FmOverlay.vue.d.ts +26 -0
  37. package/dist/components/page-head/FmPageHead.vue.d.ts +11 -2
  38. package/dist/components/progress-indicator/FmCircularProgress.vue.d.ts +1 -1
  39. package/dist/components/side-sheet/FmSideSheet.vue.d.ts +4 -0
  40. package/dist/components/snackbar/FmSnackbar.vue.d.ts +1 -1
  41. package/dist/components/stepper/FmStep.vue.d.ts +1 -1
  42. package/dist/components/tab/FmCollapsibleTab.vue.d.ts +1 -1
  43. package/dist/components/tab/FmTab.vue.d.ts +1 -1
  44. package/dist/components/table/FmTable.vue.d.ts +39 -6
  45. package/dist/components/table/FmTableHeader.vue.d.ts +15 -0
  46. package/dist/components/table/FmTableToolbar.vue.d.ts +5 -4
  47. package/dist/components/tabs/FmTabs.vue.d.ts +1 -1
  48. package/dist/components/tooltip/FmTooltip.vue.d.ts +2 -2
  49. package/dist/components/tooltip/FmTooltipDirective.vue.d.ts +1 -1
  50. package/dist/components/top-sheet/FmTopSheet.vue.d.ts +1 -1
  51. package/dist/components.d.ts +1972 -1319
  52. package/dist/composables/useBreakpoints.d.ts +4 -0
  53. package/dist/composables/useInheritFormState.d.ts +5 -0
  54. package/dist/federation/FmAvatar.vue_vue_type_script_setup_true_lang-_sFa-9hQ.js +1 -0
  55. package/dist/federation/{__federation_expose_FmBarChart-DTMTpD-r.js → FmBar.vue_vue_type_script_setup_true_lang-DTGade5v.js} +1 -1
  56. package/dist/federation/FmBreadcrumb-BzBwbdBR.css +1 -0
  57. package/dist/federation/FmBreadcrumb.vue_vue_type_style_index_0_lang-Bvgq7DIj.js +1 -0
  58. package/dist/federation/{__federation_expose_FmButtonGroup-DXTOcrFC.js → FmButtonGroup.vue_vue_type_script_setup_true_lang-CJL-i4tv.js} +1 -1
  59. package/dist/federation/FmCard.vue_vue_type_style_index_0_lang-B3oOaft-.js +1 -0
  60. package/dist/federation/{__federation_expose_FmCardActionArea-CejnLfNd.js → FmCardActionArea.vue_vue_type_script_setup_true_lang-BspqtJbv.js} +1 -1
  61. package/dist/federation/FmCardActions.vue_vue_type_script_setup_true_lang-DrTn0Y5K.js +1 -0
  62. package/dist/federation/FmCardHeader.vue_vue_type_script_setup_true_lang-BgHs9dlB.js +1 -0
  63. package/dist/federation/FmCardMedia.vue_vue_type_script_setup_true_lang-Dx_ZSe5r.js +1 -0
  64. package/dist/federation/{FmCardSection.vue_vue_type_script_setup_true_lang-Cdo4OXJH.js → FmCardSection.vue_vue_type_script_setup_true_lang-Cmjd0sQD.js} +1 -1
  65. package/dist/federation/{FmCardSubtitle.vue_vue_type_script_setup_true_lang-Dqt2YFq9.js → FmCardSubtitle.vue_vue_type_script_setup_true_lang-DDZcbgjN.js} +1 -1
  66. package/dist/federation/{FmCardTitle.vue_vue_type_script_setup_true_lang-B7EaCwHp.js → FmCardTitle.vue_vue_type_script_setup_true_lang-CSCwH2nY.js} +1 -1
  67. package/dist/federation/FmCheckbox-Ba2mD5fg.css +1 -0
  68. package/dist/federation/FmCheckbox.vue_vue_type_style_index_0_lang-Ci2k9uZc.js +1 -0
  69. package/dist/federation/{FmChip.vue_vue_type_script_setup_true_lang-DhfwSjHZ.js → FmChip.vue_vue_type_script_setup_true_lang-Oi546gOp.js} +1 -1
  70. package/dist/federation/{FmChipGroup.vue_vue_type_script_setup_true_lang-cHuDp7EB.js → FmChipGroup.vue_vue_type_script_setup_true_lang-CSajAPmT.js} +1 -1
  71. package/dist/federation/{__federation_expose_FmCollapsibleTabs-DYEp7ZJ3.js → FmCollapsibleTabs.vue_vue_type_script_setup_true_lang-BDAhCnaL.js} +1 -1
  72. package/dist/federation/FmDatePicker-CfLFCA_n.css +1 -0
  73. package/dist/federation/FmDatePicker.vue_vue_type_script_setup_true_lang-BHqXjMet.js +1 -0
  74. package/dist/federation/{__federation_expose_FmDateRangePicker-WfB3JMfw.css → FmDateRangePicker-P6lLdy1W.css} +1 -1
  75. package/dist/federation/FmDateRangePicker.vue_vue_type_script_setup_true_lang-DMzOCycS.js +1 -0
  76. package/dist/federation/FmDialog.vue_vue_type_script_setup_true_lang-svDVpHAx.js +1 -0
  77. package/dist/federation/FmDialogContent.vue_vue_type_script_setup_true_lang-COjUk0DP.js +1 -0
  78. package/dist/federation/FmForm.vue_vue_type_script_setup_true_lang-CQLrKBZK.js +1 -0
  79. package/dist/federation/FmFormGroup.vue_vue_type_script_setup_true_lang-C9sT2Gd_.js +1 -0
  80. package/dist/federation/FmGlobalSearch.vue_vue_type_script_setup_true_lang-8Tcj9X68.js +1 -0
  81. package/dist/federation/FmHelperText.vue_vue_type_script_setup_true_lang-Dq_pIGPo.js +1 -0
  82. package/dist/federation/FmLabel.vue_vue_type_script_setup_true_lang-BI_h1Y06.js +1 -0
  83. package/dist/federation/{__federation_expose_FmLineChart-NspR2pMg.js → FmLine.vue_vue_type_script_setup_true_lang-CMV4X4mW.js} +1 -1
  84. package/dist/federation/{FmMenuDivider.vue_vue_type_script_setup_true_lang-B6i5aiOi.js → FmMenuDivider.vue_vue_type_script_setup_true_lang-4wjuOaml.js} +1 -1
  85. package/dist/federation/FmMenuHeader.vue_vue_type_script_setup_true_lang-D3WZLKXZ.js +1 -0
  86. package/dist/federation/FmOverlay-9v-yjWVB.js +1 -0
  87. package/dist/federation/FmOverlay-DgGvlHRr.css +1 -0
  88. package/dist/federation/FmPageHead.vue_vue_type_script_setup_true_lang-B6w3607C.js +1 -0
  89. package/dist/federation/FmPhoneNumber.vue_vue_type_script_setup_true_lang-DOKgj6xL.js +7 -0
  90. package/dist/federation/{__federation_expose_FmPieChart-DsWnMdO8.js → FmPie.vue_vue_type_script_setup_true_lang-DHl1zHt0.js} +2 -2
  91. package/dist/federation/{FmPopover-DpSU58bp.js → FmPopover-C2EjMc2Y.js} +1 -1
  92. package/dist/federation/{FmPopover-Cb1GIPLz.css → FmPopover-C4-T-L3S.css} +1 -1
  93. package/dist/federation/FmRadioGroup.vue_vue_type_script_setup_true_lang-BUgiURDq.js +1 -0
  94. package/dist/federation/FmSearch.vue_vue_type_script_setup_true_lang-C3EuC10V.js +1 -0
  95. package/dist/federation/{FmStepHeader.vue_vue_type_script_setup_true_lang-CGD6Xq9g.js → FmStepHeader.vue_vue_type_script_setup_true_lang-CjQP1V_6.js} +1 -1
  96. package/dist/federation/{__federation_expose_FmStepper-Biz0r1e6.js → FmStepper.vue_vue_type_script_setup_true_lang-CrLzHORe.js} +1 -1
  97. package/dist/federation/{__federation_expose_FmTable-CKyUxuhV.css → FmTable-Dq5Bo6nJ.css} +1 -1
  98. package/dist/federation/FmTable.vue_vue_type_script_setup_true_lang-DDV2egSk.js +4 -0
  99. package/dist/federation/{__federation_expose_FmTabs-smY9GWlw.js → FmTabs.vue_vue_type_script_setup_true_lang-CU5Carl2.js} +1 -1
  100. package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-DapiR5gD.js +1 -0
  101. package/dist/federation/{__federation_expose_FmThumbnail-D5_7_lNo.js → FmThumbnail.vue_vue_type_script_setup_true_lang-BhatCsVc.js} +1 -1
  102. package/dist/federation/{FmTimeInput.vue_vue_type_style_index_0_lang-1sSY2gIi.js → FmTimeInput.vue_vue_type_style_index_0_lang-DajEV3xb.js} +1 -1
  103. package/dist/federation/FmTimePicker.vue_vue_type_script_setup_true_lang-3W38ig_-.js +1 -0
  104. package/dist/federation/FmTimeRangePicker.vue_vue_type_script_setup_true_lang-B89RMaMD.js +1 -0
  105. package/dist/federation/{FmTooltip.vue_vue_type_script_setup_true_lang-DQEyHKMO.js → FmTooltip.vue_vue_type_script_setup_true_lang-BlcoC54F.js} +1 -1
  106. package/dist/federation/__federation_expose_FmAvatar-CvYjBW6j.js +1 -0
  107. package/dist/federation/{__federation_expose_FmBadge-B0xq1bML.js → __federation_expose_FmBadge-DpC3B38C.js} +1 -1
  108. package/dist/federation/__federation_expose_FmBarChart-C6pzvlkw.js +1 -0
  109. package/dist/federation/__federation_expose_FmBottomSheet-BEDhx9qw.js +1 -0
  110. package/dist/federation/__federation_expose_FmBottomSheet-DH8hGI-J.css +1 -0
  111. package/dist/federation/__federation_expose_FmBreadcrumb-Cwqvtvat.js +1 -0
  112. package/dist/federation/{__federation_expose_FmButton-S-_dpwSp.js → __federation_expose_FmButton-DGHmNCjw.js} +1 -1
  113. package/dist/federation/__federation_expose_FmButtonGroup-B1MenME8.js +1 -0
  114. package/dist/federation/__federation_expose_FmCard-B3B6q8jy.js +1 -0
  115. package/dist/federation/__federation_expose_FmCardActionArea-PW4uScYK.js +1 -0
  116. package/dist/federation/__federation_expose_FmCardActions-lvrCkD67.js +1 -0
  117. package/dist/federation/__federation_expose_FmCardHeader-Dy68fFHj.js +1 -0
  118. package/dist/federation/__federation_expose_FmCardMedia-oXZY_8D2.js +1 -0
  119. package/dist/federation/{__federation_expose_FmCardSection-CxAbBCEY.js → __federation_expose_FmCardSection-DXYButNX.js} +1 -1
  120. package/dist/federation/{__federation_expose_FmCardSubtitle-Bkb7Cd42.js → __federation_expose_FmCardSubtitle-DvURNm2w.js} +1 -1
  121. package/dist/federation/{__federation_expose_FmCardTitle-BMcdxuGw.js → __federation_expose_FmCardTitle-ClHjafzY.js} +1 -1
  122. package/dist/federation/{__federation_expose_FmCheckbox-C_bqcvWe.js → __federation_expose_FmCheckbox-B64NTJig.js} +1 -1
  123. package/dist/federation/{__federation_expose_FmChip-CkktniIU.js → __federation_expose_FmChip-DigY5NhM.js} +1 -1
  124. package/dist/federation/{__federation_expose_FmChipGroup-C5x4Kmrc.js → __federation_expose_FmChipGroup-CM2zYiE9.js} +1 -1
  125. package/dist/federation/{__federation_expose_FmCircularProgress-0cSHo8_I.js → __federation_expose_FmCircularProgress-CPNYzJ5q.js} +1 -1
  126. package/dist/federation/__federation_expose_FmCollapsibleTabs-BTIn4H6H.js +1 -0
  127. package/dist/federation/__federation_expose_FmDatePicker-SyuCOYrw.js +1 -0
  128. package/dist/federation/__federation_expose_FmDatePickerMobile-DdXkQo3J.js +1 -0
  129. package/dist/federation/__federation_expose_FmDatePickerMobile-DgwHwS5d.css +1 -0
  130. package/dist/federation/__federation_expose_FmDateRangePicker-OH4TaiFb.js +1 -0
  131. package/dist/federation/__federation_expose_FmDateRangePickerMobile-LRGr1Hba.js +1 -0
  132. package/dist/federation/{__federation_expose_FmDateRangePickerMobile-Dt5iutkf.css → __federation_expose_FmDateRangePickerMobile-Y74tUQj0.css} +1 -1
  133. package/dist/federation/__federation_expose_FmDialog-hwCOFVLU.js +1 -0
  134. package/dist/federation/{__federation_expose_FmDropField-CV8IXPNA.js → __federation_expose_FmDropField-BzeW3Aw-.js} +1 -1
  135. package/dist/federation/{__federation_expose_FmDynamicDialog-DHrUMI8X.js → __federation_expose_FmDynamicDialog-CdWfivtz.js} +1 -1
  136. package/dist/federation/__federation_expose_FmField-WMUKa3rp.js +1 -0
  137. package/dist/federation/{__federation_expose_FmField-CGX3i5hp.css → __federation_expose_FmField-YXRU4rU7.css} +1 -1
  138. package/dist/federation/__federation_expose_FmForm-F17EblNw.js +1 -0
  139. package/dist/federation/{__federation_expose_FmFormGroup-aEloHP68.js → __federation_expose_FmFormGroup-BkfeJIJY.js} +1 -1
  140. package/dist/federation/__federation_expose_FmGlobalSearch-D6Ts5Xbj.js +1 -0
  141. package/dist/federation/{__federation_expose_FmHelperText-D7wSV1lt.js → __federation_expose_FmHelperText-C7FiDEyV.js} +1 -1
  142. package/dist/federation/{__federation_expose_FmIcon-D3tVphOr.js → __federation_expose_FmIcon-C1XYZ-ZR.js} +1 -1
  143. package/dist/federation/{__federation_expose_FmLabel-daPC0s8l.js → __federation_expose_FmLabel-D2R21jkn.js} +1 -1
  144. package/dist/federation/__federation_expose_FmLineChart-ns6NLE52.js +1 -0
  145. package/dist/federation/{__federation_expose_FmLinearProgress-DAsa0Cfj.js → __federation_expose_FmLinearProgress-hEpIRfi_.js} +1 -1
  146. package/dist/federation/{__federation_expose_FmList-DenHCAZj.js → __federation_expose_FmList-CKz9vvXV.js} +1 -1
  147. package/dist/federation/{__federation_expose_FmListItem-DypgPTOm.js → __federation_expose_FmListItem-DmFlS5BW.js} +1 -1
  148. package/dist/federation/__federation_expose_FmMenu-DV4gru6q.css +1 -0
  149. package/dist/federation/__federation_expose_FmMenu-y6EMewCe.js +1 -0
  150. package/dist/federation/{__federation_expose_FmMenuDeprecated-urozRxUD.js → __federation_expose_FmMenuDeprecated-DG6DmT4m.js} +1 -1
  151. package/dist/federation/{__federation_expose_FmMenuDivider-DUdFL6ed.js → __federation_expose_FmMenuDivider-DAcsKgcJ.js} +1 -1
  152. package/dist/federation/__federation_expose_FmMenuHeader-Xmkjo0AB.js +1 -0
  153. package/dist/federation/__federation_expose_FmMenuItem-DXKQwhDv.js +1 -0
  154. package/dist/federation/__federation_expose_FmMenuItem-Ir1sIBRt.css +1 -0
  155. package/dist/federation/__federation_expose_FmPageHead-zQ8vBnDw.js +1 -0
  156. package/dist/federation/__federation_expose_FmPhoneNumber-CUHKSVXi.js +1 -0
  157. package/dist/federation/__federation_expose_FmPieChart-XCRZxPEM.js +1 -0
  158. package/dist/federation/{__federation_expose_FmPinField-749SqZeJ.js → __federation_expose_FmPinField-C398UNq7.js} +1 -1
  159. package/dist/federation/__federation_expose_FmRadio-BAXkGgJJ.js +1 -0
  160. package/dist/federation/__federation_expose_FmRadio-BXxUJKbM.css +1 -0
  161. package/dist/federation/__federation_expose_FmRadioGroup-DADxij7W.js +1 -0
  162. package/dist/federation/{__federation_expose_FmSearch-BNLRIKep.js → __federation_expose_FmSearch-CDvIBzo4.js} +1 -1
  163. package/dist/federation/{__federation_expose_FmSelect-BY5j0p2Z.css → __federation_expose_FmSelect-DjUHNDbf.css} +1 -1
  164. package/dist/federation/__federation_expose_FmSelect-_hWngtvo.js +1 -0
  165. package/dist/federation/__federation_expose_FmSideSheet-CTeqko0P.css +1 -0
  166. package/dist/federation/__federation_expose_FmSideSheet-KJAcATEU.js +1 -0
  167. package/dist/federation/{__federation_expose_FmSnackbar-DU-k2kbz.js → __federation_expose_FmSnackbar-t9rdPugq.js} +1 -1
  168. package/dist/federation/{__federation_expose_FmSpacer-DCKdn5f-.js → __federation_expose_FmSpacer-CBF82AiW.js} +1 -1
  169. package/dist/federation/{__federation_expose_FmStep-DLiCM8AA.js → __federation_expose_FmStep-De9X4pX4.js} +1 -1
  170. package/dist/federation/__federation_expose_FmStepper-DqpqX5NB.js +1 -0
  171. package/dist/federation/__federation_expose_FmStepperField-CT4xSy7s.js +1 -0
  172. package/dist/federation/__federation_expose_FmStepperField-Du0LmgDr.css +1 -0
  173. package/dist/federation/__federation_expose_FmSwitch-BZHiD5LL.css +1 -0
  174. package/dist/federation/__federation_expose_FmSwitch-kOoetyyz.js +1 -0
  175. package/dist/federation/{__federation_expose_FmTab-Bg_HQF-P.js → __federation_expose_FmTab-pR5YC0gP.js} +1 -1
  176. package/dist/federation/__federation_expose_FmTable-CwCrN1xw.js +1 -0
  177. package/dist/federation/__federation_expose_FmTabs-BaX1H9KF.js +1 -0
  178. package/dist/federation/{__federation_expose_FmTextField-B0HuSCpk.js → __federation_expose_FmTextField-BTg3zqP9.js} +1 -1
  179. package/dist/federation/{__federation_expose_FmTextarea-De8NMvSD.css → __federation_expose_FmTextarea-CFLiXuDT.css} +1 -1
  180. package/dist/federation/__federation_expose_FmTextarea-CXWlT_QE.js +1 -0
  181. package/dist/federation/__federation_expose_FmThumbnail-Di6dfcLV.js +1 -0
  182. package/dist/federation/{__federation_expose_FmTimeInput-DA83s1Jw.js → __federation_expose_FmTimeInput-C68lj7jT.js} +1 -1
  183. package/dist/federation/__federation_expose_FmTimePicker--rPWvCdV.js +1 -0
  184. package/dist/federation/__federation_expose_FmTimeRangePicker-WrySBkLI.js +1 -0
  185. package/dist/federation/{__federation_expose_FmTooltip-DDMYZ97U.js → __federation_expose_FmTooltip-C6Mmx5Ca.js} +1 -1
  186. package/dist/federation/__federation_expose_FmTopSheet-CdNPRQT9.js +1 -0
  187. package/dist/federation/__federation_expose_FmTopSheet-QRZv1OX-.css +1 -0
  188. package/dist/federation/__federation_fn_import-Batzb-of.js +1 -0
  189. package/dist/federation/{__federation_shared_vue-CY5dnfym.js → __federation_shared_vue-CLjJUU8C.js} +5 -5
  190. package/dist/federation/dialog-plugin-DG6yrB9P.js +1 -0
  191. package/dist/federation/feedmepos-ui-components.js +1 -7
  192. package/dist/federation/floating-ui.vue-GyBcgolp.js +1 -0
  193. package/dist/federation/helpers-JfpfGDYa.js +1 -0
  194. package/dist/federation/index-CTyJaHPq.js +1 -0
  195. package/dist/federation/index-CaLeeTxJ.css +1 -0
  196. package/dist/federation/index-RDtT6JTM.js +1 -0
  197. package/dist/federation/index-eu7iRh7i.js +2 -0
  198. package/dist/federation/preload-helper-ygWHROA3.js +1 -0
  199. package/dist/federation/provider-keys-nUDvvk3o.js +1 -0
  200. package/dist/federation/runtime-core.esm-bundler-CPJMZlQO.js +13 -0
  201. package/dist/federation/useBreakpoints-DsQFqWkI.js +1 -0
  202. package/dist/federation/useFormChild-D2y1_qQA.js +1 -0
  203. package/dist/federation/useInheritFormState-bss0yL-f.js +1 -0
  204. package/dist/federation/{useProxiedModel-CjwoaCl7.js → useProxiedModel-Cil0ZKGg.js} +1 -1
  205. package/dist/federation/useSnackbar-BHHjDBBD.js +1 -0
  206. package/dist/feedmepos-ui-library.js +10064 -9611
  207. package/dist/feedmepos-ui-library.umd.cjs +17 -17
  208. package/dist/plugin/dialog-plugin.d.ts +1 -0
  209. package/dist/plugin/snackbar-plugin.d.ts +1 -1
  210. package/dist/style.css +1 -1
  211. package/dist/utils/provider-keys.d.ts +2 -1
  212. package/package.json +3 -2
  213. package/dist/federation/FmCheckbox-_IsrJBWS.css +0 -1
  214. package/dist/federation/FmCheckbox.vue_vue_type_style_index_0_lang-TDD3_Xqr.js +0 -1
  215. package/dist/federation/FmDateRangeYearMonthPicker.vue_vue_type_script_setup_true_lang-BJCcsHZE.js +0 -1
  216. package/dist/federation/FmDialogContent.vue_vue_type_script_setup_true_lang-BDjSook0.js +0 -1
  217. package/dist/federation/FmFormGroup.vue_vue_type_script_setup_true_lang-BRpGahPB.js +0 -1
  218. package/dist/federation/FmHelperText.vue_vue_type_script_setup_true_lang-CDrRTQuS.js +0 -1
  219. package/dist/federation/FmLabel.vue_vue_type_script_setup_true_lang-CipSkuOw.js +0 -1
  220. package/dist/federation/FmSearch.vue_vue_type_script_setup_true_lang-C_0QK03q.js +0 -1
  221. package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-pbtm2cwV.js +0 -1
  222. package/dist/federation/__federation_expose_FmAvatar-DPjd-fFA.js +0 -1
  223. package/dist/federation/__federation_expose_FmBottomSheet-B2HtbWwu.css +0 -1
  224. package/dist/federation/__federation_expose_FmBottomSheet-BPiXjjSG.js +0 -1
  225. package/dist/federation/__federation_expose_FmBreadcrumb-B5T805xH.js +0 -1
  226. package/dist/federation/__federation_expose_FmBreadcrumb-Bir5T0rZ.css +0 -1
  227. package/dist/federation/__federation_expose_FmCard-BN_0p009.js +0 -1
  228. package/dist/federation/__federation_expose_FmCardActions-hiHVApx9.js +0 -1
  229. package/dist/federation/__federation_expose_FmCardHeader-C4TQPcfq.js +0 -1
  230. package/dist/federation/__federation_expose_FmCardMedia-B4k1KUxd.js +0 -1
  231. package/dist/federation/__federation_expose_FmDatePicker-D9sRhsdc.js +0 -1
  232. package/dist/federation/__federation_expose_FmDatePicker-swTB5Qat.css +0 -1
  233. package/dist/federation/__federation_expose_FmDatePickerMobile-B6kQyS65.css +0 -1
  234. package/dist/federation/__federation_expose_FmDatePickerMobile-pcghjDrp.js +0 -1
  235. package/dist/federation/__federation_expose_FmDateRangePicker-CIoo-Wlg.js +0 -1
  236. package/dist/federation/__federation_expose_FmDateRangePickerMobile-BOqQi3dz.js +0 -1
  237. package/dist/federation/__federation_expose_FmDialog-Bk_tXTVr.js +0 -1
  238. package/dist/federation/__federation_expose_FmField-UJpYkTWx.js +0 -1
  239. package/dist/federation/__federation_expose_FmForm-BfsWw4Cj.js +0 -1
  240. package/dist/federation/__federation_expose_FmGlobalSearch-DPW4aRrk.js +0 -1
  241. package/dist/federation/__federation_expose_FmMenu-DJhOcyy6.js +0 -1
  242. package/dist/federation/__federation_expose_FmMenu-DLhZPRHI.css +0 -1
  243. package/dist/federation/__federation_expose_FmMenuHeader-gOrzHpU4.js +0 -1
  244. package/dist/federation/__federation_expose_FmMenuItem-Cv8eSweg.js +0 -1
  245. package/dist/federation/__federation_expose_FmMenuItem-DgQTZBUx.css +0 -1
  246. package/dist/federation/__federation_expose_FmPageHead-DKDQb3s3.js +0 -1
  247. package/dist/federation/__federation_expose_FmPhoneNumber-D7tYTvIM.js +0 -7
  248. package/dist/federation/__federation_expose_FmRadio-CHIMarAU.js +0 -1
  249. package/dist/federation/__federation_expose_FmRadio-D_bffv1W.css +0 -1
  250. package/dist/federation/__federation_expose_FmRadioGroup-BfeQw4qz.js +0 -1
  251. package/dist/federation/__federation_expose_FmSelect-BjNSwgV4.js +0 -1
  252. package/dist/federation/__federation_expose_FmSideSheet-B-OSLzWh.css +0 -1
  253. package/dist/federation/__federation_expose_FmSideSheet-K87YRGc-.js +0 -1
  254. package/dist/federation/__federation_expose_FmStepperField-7ydJUJmA.css +0 -1
  255. package/dist/federation/__federation_expose_FmStepperField-Cvl1uynU.js +0 -1
  256. package/dist/federation/__federation_expose_FmSwitch-8xT8wppU.js +0 -1
  257. package/dist/federation/__federation_expose_FmSwitch-BrEtzzSs.css +0 -1
  258. package/dist/federation/__federation_expose_FmTable-BBbhg3iv.js +0 -4
  259. package/dist/federation/__federation_expose_FmTextarea-CabADiYM.js +0 -1
  260. package/dist/federation/__federation_expose_FmTimePicker-DfyWXmxw.js +0 -1
  261. package/dist/federation/__federation_expose_FmTimeRangePicker-DzOAJLkz.js +0 -1
  262. package/dist/federation/__federation_expose_FmTopSheet-BN1ZZ1qV.js +0 -1
  263. package/dist/federation/__federation_expose_FmTopSheet-tl7f40cN.css +0 -1
  264. package/dist/federation/__federation_fn_import-WNUmaBrc.js +0 -7
  265. package/dist/federation/dialog-plugin-Bo1Au4mw.js +0 -1
  266. package/dist/federation/floating-ui.vue-FWlJzVy1.js +0 -1
  267. package/dist/federation/helpers-BzdYoDfi.js +0 -1
  268. package/dist/federation/index-BuBjo3PF.js +0 -2
  269. package/dist/federation/index-BwTNxcqe.css +0 -1
  270. package/dist/federation/preload-helper-D7itGvJr.js +0 -1
  271. package/dist/federation/provider-keys-BzEznyeB.js +0 -1
  272. package/dist/federation/runtime-core.esm-bundler-DK1KAGd8.js +0 -13
  273. package/dist/federation/useBreakpoints-CN4qP8A3.js +0 -1
  274. package/dist/federation/vue-router-C0b2HRf2.js +0 -1
  275. /package/dist/federation/{__federation_expose_FmCard-DHu3aEvT.css → FmCard-DHu3aEvT.css} +0 -0
@@ -1,4 +1,4 @@
1
- (function(ae,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],s):(ae=typeof globalThis<"u"?globalThis:ae||self,s(ae["feedmepos-ui-library"]={},ae.Vue,ae.VueRouter))})(this,function(ae,s,ft){"use strict";var q_=Object.defineProperty;var X_=(ae,s,ft)=>s in ae?q_(ae,s,{enumerable:!0,configurable:!0,writable:!0,value:ft}):ae[s]=ft;var I=(ae,s,ft)=>(X_(ae,typeof s!="symbol"?s+"":s,ft),ft);var fi;const gr={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},Uc=t=>"config"in t&&"globalProperties"in t.config,Gc=t=>{let e;return t==="vue2"?e=!1:t==="vue3"?e=!0:e=Uc(t),e?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},yr=t=>typeof t=="string"&&t!=="auto",br=(t,e)=>{t.dataset.vWaveBoundary=yr(e)?e:"true"},qc=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:n,borderBottomRightRadius:o},i)=>{const r=document.createElement(i);return r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%",r.style.display="block",r.style.position="absolute",r.style.borderRadius=`${t} ${e} ${o} ${n}`,r.style.overflow="hidden",r.style.pointerEvents="none",r.style.webkitMaskImage="-webkit-radial-gradient(white, black)",r},Xc=(t,e,n,o)=>{const i=document.createElement("div");return i.style.position="absolute",i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.top=`${e}px`,i.style.left=`${t}px`,i.style.background=o.color,i.style.borderRadius="50%",i.style.opacity=`${o.initialOpacity}`,i.style.transform="translate(-50%,-50%) scale(0)",i.style.transition=`transform ${o.duration}s ${o.easing}, opacity ${o.duration}s ${o.easing}`,i};function Zn(t,e,n,o){const i=t-n,r=e-o;return Math.sqrt(i*i+r*r)}function Kc(t,e,{width:n,height:o}){const i=Zn(t,e,0,0),r=Zn(t,e,n,0),l=Zn(t,e,0,o),a=Zn(t,e,n,o);return Math.max(i,r,l,a)}const Zc=({x:t,y:e},{top:n,left:o})=>({x:t-o,y:e-n}),hi="vWaveCountInternal";function Jc(t){const e=pi(t);$r(t,e+1)}function Qc(t){const e=pi(t);$r(t,e-1)}function $r(t,e){t.dataset[hi]=e.toString()}function pi(t){var e;return parseInt((e=t.dataset[hi])!==null&&e!==void 0?e:"0",10)}function eu(t){delete t.dataset[hi]}const mi=(t,e,n)=>{const o=e.getBoundingClientRect(),i=window.getComputedStyle(e),{x:r,y:l}=Zc(t,o),a=2.05*Kc(r,l,o),d=qc(i,n.tagName),c=Xc(r,l,a,n);Jc(e);let u="";i.position==="static"&&(e.style.position&&(u=e.style.position),e.style.position="relative"),d.appendChild(c),e.appendChild(d);let f=!1;const h=y=>{typeof y<"u"&&(document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h)),f?p():f=!0},p=()=>{c.style.transition=`opacity ${n.dissolveDuration}s linear`,c.style.opacity="0",setTimeout(()=>{d.remove(),Qc(e),pi(e)===0&&(eu(e),e.style.position=u)},n.dissolveDuration*1e3)};document.addEventListener("pointerup",h),document.addEventListener("pointercancel",h);const m=setTimeout(()=>{document.removeEventListener("pointercancel",g),requestAnimationFrame(()=>{c.style.transform="translate(-50%,-50%) scale(1)",c.style.opacity=`${n.finalOpacity}`,setTimeout(()=>h(),n.duration*1e3)})},n.cancellationPeriod),g=()=>{clearTimeout(m),d.remove(),document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h),document.removeEventListener("pointercancel",g)};document.addEventListener("pointercancel",g)},on=new WeakMap,_r=(t={},e="vue3")=>{const n=Object.assign(Object.assign({},gr),t),o=Gc(e),i=a=>{const d=a.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${d}"]`).forEach(u=>mi(a,u,Object.assign(Object.assign({},n),on.get(u))))},r={[o.mounted](a,{value:d={}}){var c;on.set(a,d),br(a,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger),a.addEventListener("pointerdown",u=>{if(on.get(a)===!1)return;const f=Object.assign(Object.assign({},n),on.get(a));if(f.trigger===!1)return mi(u,a,f);if(yr(f.trigger))return;const h=a.querySelector('[data-v-wave-trigger="true"]');!h&&f.trigger===!0||h&&!u.composedPath().includes(h)||mi(u,a,f)})},[o.updated](a,{value:d={}}){var c;on.set(a,d),br(a,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger)}},l={[o.mounted](a,{arg:d="true"}){a.dataset.vWaveTrigger=d,d!=="true"&&a.addEventListener("pointerdown",i)},[o.updated](a,{arg:d="true"}){a.dataset.vWaveTrigger=d,d==="true"?a.removeEventListener("pointerdown",i):a.addEventListener("pointerdown",i)}};return{wave:r,vWave:r,waveTrigger:l,vWaveTrigger:l}},tu={install(t,e={}){if(this.installed)return;this.installed=!0;const n=Object.assign(Object.assign({},gr),e),{vWave:o,vWaveTrigger:i}=_r(n,t);t.directive(n.directive,o),t.directive(`${n.directive}-trigger`,i)},installed:!1,createLocalWaveDirective:_r},nu={class:"gap-8 inline-flex items-center relative select-none"},ou={key:0,class:"fm-typo-body-sm-400 justify-center"},iu=s.defineComponent({__name:"FmBadge",props:{inline:{type:Boolean,default:!1},value:{default:null},variant:{default:"neutral"},class:{default:void 0}},setup(t){const e=t,n=s.computed(()=>e.value&&e.value>99?"99+":e.value);return(o,i)=>(s.openBlock(),s.createElementBlock("div",nu,[s.renderSlot(o.$slots,"default",{},void 0,!0),s.createElementVNode("div",{class:s.normalizeClass(["fm-badge",e.class??`fm-badge--${o.variant}`,{absolute:!o.inline,"top-0 right-0 w-[6px] h-[6px]":e.value===null,"top-[-2px] right-[-4px] w-[16px] h-[16px]":e.value&&e.value<10,"top-[-2px] right-[-12px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>10&&e.value<100,"top-[-2px] right-[-20px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>99}])},[e.value!==null?(s.openBlock(),s.createElementBlock("span",ou,s.toDisplayString(n.value),1)):s.createCommentVNode("",!0)],2)]))}}),J=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},Mt=J(iu,[["__scopeId","data-v-b401ca12"]]);function su(){var t;return(t=s.getCurrentInstance())==null?void 0:t.emit}function K(t,e){const n=su(),o=s.ref(t[e]);return s.watch(()=>t[e],()=>{o.value=t[e]}),s.computed({get(){return o.value},set(r){o.value=r,n==null||n(`update:${String(e)}`,r)}})}const ru={class:"fm-bottom-sheet"},lu={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},au={key:0},du={class:"overflow-y-auto"},cu={class:"flex gap-8 items-center"},gi=J(s.defineComponent({__name:"FmBottomSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=s.ref(null),o=K(e,"modelValue"),i=r=>{e.dismissAway&&n.value&&r.target===n.value&&(o.value=!1)};return(r,l)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[s.renderSlot(r.$slots,"bottom-sheet-button",{},void 0,!0)]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.unref(o)?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-bottom-sheet--container",onClick:l[1]||(l[1]=a=>i(a))},[s.createVNode(s.Transition,{name:"slide",appear:""},{default:s.withCtx(()=>[s.createElementVNode("div",ru,[s.createElementVNode("div",lu,[s.renderSlot(r.$slots,"bottom-sheet-header",{},()=>[r.header?(s.openBlock(),s.createElementBlock("div",au,s.toDisplayString(r.header),1)):s.createCommentVNode("",!0)],!0)]),s.createElementVNode("div",du,[s.renderSlot(r.$slots,"default",{},void 0,!0)]),s.createElementVNode("div",cu,[s.renderSlot(r.$slots,"bottom-sheet-footer",{},void 0,!0)])])]),_:3})],512)):s.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-696a13ce"]]),uu={class:"content-start flex flex-wrap gap-0 items-start max-w-full p-0"},fu=["onMouseenter"],hu={key:0},pu=s.defineComponent({__name:"FmBreadcrumb",props:{items:{}},setup(t){const e=ft.useRoute(),n=ft.useRouter();s.onMounted(async()=>{await n.isReady();const m=o.items.findIndex(g=>g.route==e.path);m!=-1&&!o.items[m].disabled&&(i.value=m)});const o=t,i=s.ref(-1),r=s.ref(-1),l=s.ref(" / "),a=s.ref("... /"),d=s.ref(!1),c=m=>i.value===m?"selected":r.value===m?"hovered":o.items[m].disabled?"disabled":"default",u=m=>{o.items[m].disabled||(i.value=m)},f=m=>m!=o.items.length-1,h=m=>!d.value&&o.items.length>5&&m>=2&&m<o.items.length-2,p=()=>{d.value=!d.value};return(m,g)=>{const y=s.resolveComponent("RouterLink");return s.openBlock(),s.createElementBlock("nav",null,[s.createElementVNode("ul",uu,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(m.items,(b,$)=>(s.openBlock(),s.createElementBlock("li",{key:$,class:"empty:hidden flex gap-2 items-center justify-center pl-2 pr-0 py-1",onMouseenter:w=>r.value=$,onMouseleave:g[0]||(g[0]=w=>r.value=-1)},[h($)?$===3&&!d.value?(s.openBlock(),s.createElementBlock("a",{key:1,onClick:p},s.toDisplayString(a.value),1)):s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(y,{key:0,class:s.normalizeClass(c($)),to:b.disabled?"":b.route,onClick:w=>u($)},{default:s.withCtx(()=>[s.createElementVNode("span",null,s.toDisplayString(b.label),1),f($)?(s.openBlock(),s.createElementBlock("span",hu,s.toDisplayString(l.value),1)):s.createCommentVNode("",!0)]),_:2},1032,["class","to","onClick"]))],40,fu))),128))])])}}}),mu=/^(#)((?:[A-Fa-f0-9]{3}){1,2})$/,gu=/^rgb[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*(?:,(?![)])|(?=[)]))){3}[)]$/,yu=/^^rgba[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*,){3}\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/,bu=/^hsl[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*[)]$/,$u=/^hsla[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*,\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/;function sn(t){return[mu,gu,yu,bu,$u].some(e=>e.test(t))}function yi(t,e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(n)return`rgba(${parseInt(n[1],16)},${parseInt(n[2],16)},${parseInt(n[3],16)},${e})`;if(t.startsWith("rgb")){const o=t.split(",");if(o.length===3)return[...o.slice(0,2),o[2].replace(")",`,${e})`)].join(",");if(o.length===4)return[...o.slice(0,3),`${e})`].join(",")}return""}function rn(t){const e=getComputedStyle(document.documentElement).getPropertyValue(`--${t}`)||t;return e.startsWith("rgb")||e.startsWith("#")?e:null}const j=J(s.defineComponent({__name:"FmIcon",props:{name:{type:String,required:!0},color:{type:String,default:"black"},outline:{type:Boolean,default:!1},size:{type:String,default:"md"}},setup(t){const e=t,n=s.computed(()=>{const r=[],l={};return r.push(o()),r.push(i()),sn(e.color)?l.color=e.color:r.push(`text-fm-color-${e.color}`),{class:r.join(" "),style:l}});function o(){return`fm-icon--${e.outline?"outlined":"rounded"}`}function i(){return`fm-icon--${e.size}`}return(r,l)=>(s.openBlock(),s.createElementBlock("span",s.mergeProps({class:"fm-icon"},n.value),s.toDisplayString(e.name),17))}}),[["__scopeId","data-v-475d423b"]]);function Jn(t){return typeof t=="number"?t:typeof t=="string"&&isFinite(+t)?+t:null}const _u={class:"relative"},wu=["stroke-width"],Cu=["stroke-width","stroke-dashoffset"],xu=["stroke-width","stroke-dashoffset"],ku={key:0};var Qn=(t=>(t[t.md=2.5]="md",t[t.lg=2]="lg",t[t.xl=1.75]="xl",t[t.xxl=1.5]="xxl",t))(Qn||{});const ln=J(s.defineComponent({__name:"FmCircularProgress",props:{currentStep:{default:void 0},totalSteps:{default:void 0},indeterminate:{type:Boolean,default:void 0},size:{default:"xxl"},color:{default:"primary"}},setup(t){const e=t,n=s.computed(()=>{const r=Jn(e.currentStep),l=Jn(e.totalSteps),a=e.indeterminate??(r===null||l===null);return{currentStep:a?null:Math.min(r,l),totalSteps:l,indeterminate:a}}),o=s.computed(()=>{const r=Jn(e.currentStep),l=Jn(e.totalSteps);if(typeof r!="number"||typeof l!="number")return"10 200";const a=48,d=Math.min(1,r/l);return isNaN(d)?"0 200":`${d*a} 200`}),i=s.computed(()=>{const r=new Array,l={};return e.color?(sn(e.color)?l.color=e.color:r.push(`text-fm-color-${e.color}`),{class:r.join(" "),style:l}):{class:r.join(" "),style:l}});return(r,l)=>(s.openBlock(),s.createElementBlock("div",_u,[s.createElementVNode("div",{class:s.normalizeClass(["fm-progress fm-typo-body-sm-400 flex items-center justify-center",{"fm-progress--indeterminate":n.value.indeterminate,[`fm-progress--${r.size}`]:!0}])},[(s.openBlock(),s.createElementBlock("svg",{class:s.normalizeClass(["absolute h-full left-0 top-0 w-full",i.value.class]),style:s.normalizeStyle(i.value.style),viewBox:"0 0 18 18"},[n.value.indeterminate?(s.openBlock(),s.createElementBlock("circle",{key:0,class:"spinner","stroke-width":Qn[r.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dasharray":"10 200","stroke-dashoffset":"0"},null,8,wu)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createElementVNode("circle",{"stroke-width":Qn[r.size],fill:"none",stroke:"var(--fm-color-neutral-gray-100)",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":r.currentStep===0?"10px":"0",style:s.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:"100 200",transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,Cu),s.createElementVNode("circle",{"stroke-width":Qn[r.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":r.currentStep===0?"10px":"0",style:s.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:o.value,transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,xu)],64))],6)),!n.value.indeterminate&&r.size==="xxl"?(s.openBlock(),s.createElementBlock("div",ku,s.toDisplayString(n.value.currentStep)+" of "+s.toDisplayString(n.value.totalSteps),1)):s.createCommentVNode("",!0)],2)]))}}),[["__scopeId","data-v-c8665c2d"]]),Su=["disabled","type"],vu={class:"-translate-x-1/2 -translate-y-1/2 absolute left-1/2 top-1/2 transform"},X=J(s.defineComponent({__name:"FmButton",props:{variant:{default:"primary"},label:{default:""},icon:{default:""},size:{default:"lg"},disabled:{type:Boolean,default:!1},iconColor:{default:""},type:{default:"button"},iconPosition:{default:"prepend"},prependIcon:{default:""},appendIcon:{default:""},loading:{type:Boolean,default:!1}},setup(t){const e=t,n=s.ref(!1),o=s.computed(()=>`${i[e.variant]} ${e.disabled?"cursor-not-allowed":"cursor-pointer"}`),i={primary:"bg-fm-color-primary text-fm-color-typo-white rounded-lg",secondary:"bg-transparent rounded-lg border-1 border-fm-color-neutral-black",destructive:"bg-fm-color-system-error-300 text-fm-color-white text-fm-color-typo-white rounded-lg",tertiary:"bg-transparent text-fm-color-typo-primary rounded-lg",plain:"bg-transparent text-fm-color-primary",fab:"bg-fm-color-primary text-fm-color-white rounded-full text-fm-color-typo-white rounded-xxxl min-h-56 min-w-56 !p-16"};function r(l){n.value=l}return(l,a)=>{const d=s.resolveDirective("wave");return s.withDirectives((s.openBlock(),s.createElementBlock("button",{ref:"buttonEl",class:s.normalizeClass(`
1
+ (function(ae,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router"],r):(ae=typeof globalThis<"u"?globalThis:ae||self,r(ae["feedmepos-ui-library"]={},ae.Vue,ae.VueRouter))})(this,function(ae,r,ht){"use strict";var _w=Object.defineProperty;var ww=(ae,r,ht)=>r in ae?_w(ae,r,{enumerable:!0,configurable:!0,writable:!0,value:ht}):ae[r]=ht;var I=(ae,r,ht)=>(ww(ae,typeof r!="symbol"?r+"":r,ht),ht);var mi;const Cs={directive:"wave",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:.4,dissolveDuration:.15,easing:"ease-out",cancellationPeriod:75,trigger:"auto",tagName:"div"},Jc=t=>"config"in t&&"globalProperties"in t.config,Qc=t=>{let e;return t==="vue2"?e=!1:t==="vue3"?e=!0:e=Jc(t),e?{mounted:"mounted",updated:"updated"}:{mounted:"inserted",updated:"componentUpdated"}},ks=t=>typeof t=="string"&&t!=="auto",xs=(t,e)=>{t.dataset.vWaveBoundary=ks(e)?e:"true"},eu=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:n,borderBottomRightRadius:o},i)=>{const s=document.createElement(i);return s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%",s.style.display="block",s.style.position="absolute",s.style.borderRadius=`${t} ${e} ${o} ${n}`,s.style.overflow="hidden",s.style.pointerEvents="none",s.style.webkitMaskImage="-webkit-radial-gradient(white, black)",s},tu=(t,e,n,o)=>{const i=document.createElement("div");return i.style.position="absolute",i.style.width=`${n}px`,i.style.height=`${n}px`,i.style.top=`${e}px`,i.style.left=`${t}px`,i.style.background=o.color,i.style.borderRadius="50%",i.style.opacity=`${o.initialOpacity}`,i.style.transform="translate(-50%,-50%) scale(0)",i.style.transition=`transform ${o.duration}s ${o.easing}, opacity ${o.duration}s ${o.easing}`,i};function Qn(t,e,n,o){const i=t-n,s=e-o;return Math.sqrt(i*i+s*s)}function nu(t,e,{width:n,height:o}){const i=Qn(t,e,0,0),s=Qn(t,e,n,0),l=Qn(t,e,0,o),a=Qn(t,e,n,o);return Math.max(i,s,l,a)}const ou=({x:t,y:e},{top:n,left:o})=>({x:t-o,y:e-n}),gi="vWaveCountInternal";function iu(t){const e=yi(t);Ss(t,e+1)}function ru(t){const e=yi(t);Ss(t,e-1)}function Ss(t,e){t.dataset[gi]=e.toString()}function yi(t){var e;return parseInt((e=t.dataset[gi])!==null&&e!==void 0?e:"0",10)}function su(t){delete t.dataset[gi]}const bi=(t,e,n)=>{const o=e.getBoundingClientRect(),i=window.getComputedStyle(e),{x:s,y:l}=ou(t,o),a=2.05*nu(s,l,o),d=eu(i,n.tagName),c=tu(s,l,a,n);iu(e);let u="";i.position==="static"&&(e.style.position&&(u=e.style.position),e.style.position="relative"),d.appendChild(c),e.appendChild(d);let f=!1;const h=y=>{typeof y<"u"&&(document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h)),f?p():f=!0},p=()=>{c.style.transition=`opacity ${n.dissolveDuration}s linear`,c.style.opacity="0",setTimeout(()=>{d.remove(),ru(e),yi(e)===0&&(su(e),e.style.position=u)},n.dissolveDuration*1e3)};document.addEventListener("pointerup",h),document.addEventListener("pointercancel",h);const m=setTimeout(()=>{document.removeEventListener("pointercancel",g),requestAnimationFrame(()=>{c.style.transform="translate(-50%,-50%) scale(1)",c.style.opacity=`${n.finalOpacity}`,setTimeout(()=>h(),n.duration*1e3)})},n.cancellationPeriod),g=()=>{clearTimeout(m),d.remove(),document.removeEventListener("pointerup",h),document.removeEventListener("pointercancel",h),document.removeEventListener("pointercancel",g)};document.addEventListener("pointercancel",g)},ln=new WeakMap,vs=(t={},e="vue3")=>{const n=Object.assign(Object.assign({},Cs),t),o=Qc(e),i=a=>{const d=a.currentTarget.dataset.vWaveTrigger;document.querySelectorAll(`[data-v-wave-boundary="${d}"]`).forEach(u=>bi(a,u,Object.assign(Object.assign({},n),ln.get(u))))},s={[o.mounted](a,{value:d={}}){var c;ln.set(a,d),xs(a,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger),a.addEventListener("pointerdown",u=>{if(ln.get(a)===!1)return;const f=Object.assign(Object.assign({},n),ln.get(a));if(f.trigger===!1)return bi(u,a,f);if(ks(f.trigger))return;const h=a.querySelector('[data-v-wave-trigger="true"]');!h&&f.trigger===!0||h&&!u.composedPath().includes(h)||bi(u,a,f)})},[o.updated](a,{value:d={}}){var c;ln.set(a,d),xs(a,(c=d&&d.trigger)!==null&&c!==void 0?c:n.trigger)}},l={[o.mounted](a,{arg:d="true"}){a.dataset.vWaveTrigger=d,d!=="true"&&a.addEventListener("pointerdown",i)},[o.updated](a,{arg:d="true"}){a.dataset.vWaveTrigger=d,d==="true"?a.removeEventListener("pointerdown",i):a.addEventListener("pointerdown",i)}};return{wave:s,vWave:s,waveTrigger:l,vWaveTrigger:l}},lu={install(t,e={}){if(this.installed)return;this.installed=!0;const n=Object.assign(Object.assign({},Cs),e),{vWave:o,vWaveTrigger:i}=vs(n,t);t.directive(n.directive,o),t.directive(`${n.directive}-trigger`,i)},installed:!1,createLocalWaveDirective:vs},au={class:"gap-8 inline-flex items-center relative select-none"},du={key:0,class:"fm-typo-body-sm-400 justify-center"},cu=r.defineComponent({__name:"FmBadge",props:{inline:{type:Boolean,default:!1},value:{default:null},variant:{default:"neutral"},class:{default:void 0}},setup(t){const e=t,n=r.computed(()=>e.value&&e.value>99?"99+":e.value);return(o,i)=>(r.openBlock(),r.createElementBlock("div",au,[r.renderSlot(o.$slots,"default",{},void 0,!0),r.createElementVNode("div",{class:r.normalizeClass(["fm-badge",e.class??`fm-badge--${o.variant}`,{absolute:!o.inline,"top-0 right-0 w-[6px] h-[6px]":e.value===null,"top-[-2px] right-[-4px] w-[16px] h-[16px]":e.value&&e.value<10,"top-[-2px] right-[-12px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>10&&e.value<100,"top-[-2px] right-[-20px] px-4 h-[20px] min-w-[24px]":e.value&&e.value>99}])},[e.value!==null?(r.openBlock(),r.createElementBlock("span",du,r.toDisplayString(n.value),1)):r.createCommentVNode("",!0)],2)]))}}),Z=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},Et=Z(cu,[["__scopeId","data-v-b401ca12"]]);function uu(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function X(t,e){const n=uu(),o=r.ref(t[e]);return r.watch(()=>t[e],()=>{o.value=t[e]}),r.computed({get(){return o.value},set(s){o.value=s,n==null||n(`update:${String(e)}`,s)}})}const fu=/^(#)((?:[A-Fa-f0-9]{3}){1,2})$/,hu=/^rgb[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*(?:,(?![)])|(?=[)]))){3}[)]$/,pu=/^^rgba[(](?:\s*0*(?:\d\d?(?:\.\d+)?(?:\s*%)?|\.\d+\s*%|100(?:\.0*)?\s*%|(?:1\d\d|2[0-4]\d|25[0-5])(?:\.\d+)?)\s*,){3}\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/,mu=/^hsl[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*[)]$/,gu=/^hsla[(]\s*0*(?:[12]?\d{1,2}|3(?:[0-5]\d|60))\s*(?:\s*,\s*0*(?:\d\d?(?:\.\d+)?\s*%|\.\d+\s*%|100(?:\.0*)?\s*%)){2}\s*,\s*0*(?:\.\d+|1(?:\.0*)?)\s*[)]$/;function an(t){return[fu,hu,pu,mu,gu].some(e=>e.test(t))}function $i(t,e){const n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(n)return`rgba(${parseInt(n[1],16)},${parseInt(n[2],16)},${parseInt(n[3],16)},${e})`;if(t.startsWith("rgb")){const o=t.split(",");if(o.length===3)return[...o.slice(0,2),o[2].replace(")",`,${e})`)].join(",");if(o.length===4)return[...o.slice(0,3),`${e})`].join(",")}return""}function dn(t){const e=getComputedStyle(document.documentElement).getPropertyValue(`--${t}`)||t;return e.startsWith("rgb")||e.startsWith("#")?e:null}const j=Z(r.defineComponent({__name:"FmIcon",props:{name:{type:String,required:!0},color:{type:String,default:"black"},outline:{type:Boolean,default:!1},size:{type:String,default:"md"}},setup(t){const e=t,n=r.computed(()=>{const s=[],l={};return s.push(o()),s.push(i()),an(e.color)?l.color=e.color:s.push(`text-fm-color-${e.color}`),{class:s.join(" "),style:l}});function o(){return`fm-icon--${e.outline?"outlined":"rounded"}`}function i(){return`fm-icon--${e.size}`}return(s,l)=>(r.openBlock(),r.createElementBlock("span",r.mergeProps({class:"fm-icon"},n.value),r.toDisplayString(e.name),17))}}),[["__scopeId","data-v-475d423b"]]);function yu(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Ms(t){return typeof t=="function"?t():r.unref(t)}const bu=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $u=Object.prototype.toString,_u=t=>$u.call(t)==="[object Object]",_i=()=>{};function wu(t){var e;const n=Ms(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Ds=bu?window:void 0;function wi(...t){let e,n,o,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,o,i]=t,e=Ds):[e,n,o,i]=t,!e)return _i;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],l=()=>{s.forEach(u=>u()),s.length=0},a=(u,f,h,p)=>(u.addEventListener(f,h,p),()=>u.removeEventListener(f,h,p)),d=r.watch(()=>[wu(e),Ms(i)],([u,f])=>{if(l(),!u)return;const h=_u(f)?{...f}:f;s.push(...n.flatMap(p=>o.map(m=>a(u,p,m,h))))},{immediate:!0,flush:"post"}),c=()=>{d(),l()};return yu(c),c}function Cu(t,e={}){const{threshold:n=50,onSwipe:o,onSwipeEnd:i,onSwipeStart:s,passive:l=!0,window:a=Ds}=e,d=r.reactive({x:0,y:0}),c=r.reactive({x:0,y:0}),u=r.computed(()=>d.x-c.x),f=r.computed(()=>d.y-c.y),{max:h,abs:p}=Math,m=r.computed(()=>h(p(u.value),p(f.value))>=n),g=r.ref(!1),y=r.computed(()=>m.value?p(u.value)>p(f.value)?u.value>0?"left":"right":f.value>0?"up":"down":"none"),b=V=>[V.touches[0].clientX,V.touches[0].clientY],_=(V,B)=>{d.x=V,d.y=B},x=(V,B)=>{c.x=V,c.y=B};let $;const w=ku(a==null?void 0:a.document);l?$=w?{passive:!0}:{capture:!1}:$=w?{passive:!1,capture:!0}:{capture:!0};const P=V=>{g.value&&(i==null||i(V,y.value)),g.value=!1},M=[wi(t,"touchstart",V=>{if(V.touches.length!==1)return;$.capture&&!$.passive&&V.preventDefault();const[B,k]=b(V);_(B,k),x(B,k),s==null||s(V)},$),wi(t,"touchmove",V=>{if(V.touches.length!==1)return;const[B,k]=b(V);x(B,k),!g.value&&m.value&&(g.value=!0),g.value&&(o==null||o(V))},$),wi(t,["touchend","touchcancel"],P,$)];return{isPassiveEventSupported:w,isSwiping:g,direction:y,coordsStart:d,coordsEnd:c,lengthX:u,lengthY:f,stop:()=>M.forEach(V=>V())}}function ku(t){if(!t)return!1;let e=!1;const n={get passive(){return e=!0,!1}};return t.addEventListener("x",_i,n),t.removeEventListener("x",_i),e}const cn=Z(r.defineComponent({__name:"FmOverlay",props:{onClose:{type:Function},dismissAway:{type:Boolean},zIndex:{},preventBackdropEvent:{type:Boolean},transparent:{type:Boolean},centerContent:{type:Boolean}},setup(t){const e=t,n=r.ref(null),o=i=>{var s;e.dismissAway&&n.value&&i.target===n.value&&((s=e.onClose)==null||s.call(e))};return(i,s)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"overlayRef",ref:n,class:r.normalizeClass([[i.preventBackdropEvent?"pointer-events-none":"pointer-events-auto",i.transparent?"bg-transparent":"bg-fm-color-overlay-background",{"fm-overlay--center":e.centerContent}],"fm-overlay"]),style:r.normalizeStyle({zIndex:e.zIndex}),onClick:s[0]||(s[0]=l=>o(l))},[r.renderSlot(i.$slots,"default",{},void 0,!0)],6))}}),[["__scopeId","data-v-a4248ec5"]]),xu=[(t=>(r.pushScopeId("data-v-2cfaff46"),t=t(),r.popScopeId(),t))(()=>r.createElementVNode("div",{class:"fm-bottom-sheet--gesture--stick"},null,-1))],Su={class:"fm-bottom-sheet--header"},vu={class:"fm-bottom-sheet--header--content"},Mu={class:"flex h-24 items-center justify-center w-24"},Du={key:0},Eu={class:"overflow-y-auto"},Bu={class:"flex gap-8 items-center"},Ci=Z(r.defineComponent({__name:"FmBottomSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=r.ref(null),o=r.ref(null),i=r.ref(0),{direction:s,lengthY:l}=Cu(n,{passive:!1,threshold:0,onSwipe(){console.log(l.value),s.value==="down"&&(i.value=Math.min(l.value,0))},onSwipeEnd(){var c;const d=(c=o.value)==null?void 0:c.clientHeight;d&&i.value<-d/2?a.value=!1:i.value=0}}),a=X(e,"modelValue");return r.watch(a,d=>{d&&(i.value=0)}),(d,c)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:c[0]||(c[0]=u=>a.value=!0)},[r.renderSlot(d.$slots,"bottom-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(a)?(r.openBlock(),r.createBlock(cn,{key:0,"dismiss-away":e.dismissAway,onClose:c[1]||(c[1]=u=>a.value=!1)},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"wrapperRef",ref:o,style:r.normalizeStyle({bottom:`${i.value}px`}),class:"fm-bottom-sheet"},[r.createElementVNode("div",{ref_key:"gestureRef",ref:n,class:"fm-bottom-sheet--gesture"},xu,512),r.createElementVNode("div",Su,[r.createElementVNode("div",vu,[r.createElementVNode("div",Mu,[r.createVNode(j,{name:"arrow_back"})]),r.renderSlot(d.$slots,"bottom-sheet-header",{},()=>[d.header?(r.openBlock(),r.createElementBlock("div",Du,r.toDisplayString(d.header),1)):r.createCommentVNode("",!0)],!0)])]),r.createElementVNode("div",Eu,[r.renderSlot(d.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",Bu,[r.renderSlot(d.$slots,"bottom-sheet-footer",{},void 0,!0)])],4)]),_:3})]),_:3},8,["dismiss-away"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-2cfaff46"]]),Vu={class:"content-start flex flex-wrap gap-0 items-start max-w-full p-0"},Pu=["onMouseenter"],Fu={key:0},Ru=r.defineComponent({__name:"FmBreadcrumb",props:{items:{}},setup(t){const e=ht.useRoute(),n=ht.useRouter();r.onMounted(async()=>{await n.isReady();const m=o.items.findIndex(g=>g.route==e.path);m!=-1&&!o.items[m].disabled&&(i.value=m)});const o=t,i=r.ref(-1),s=r.ref(-1),l=r.ref(" / "),a=r.ref("... /"),d=r.ref(!1),c=m=>i.value===m?"selected":s.value===m?"hovered":o.items[m].disabled?"disabled":"default",u=m=>{o.items[m].disabled||(i.value=m)},f=m=>m!=o.items.length-1,h=m=>!d.value&&o.items.length>5&&m>=2&&m<o.items.length-2,p=()=>{d.value=!d.value};return(m,g)=>{const y=r.resolveComponent("RouterLink");return r.openBlock(),r.createElementBlock("nav",null,[r.createElementVNode("ul",Vu,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.items,(b,_)=>(r.openBlock(),r.createElementBlock("li",{key:_,class:"empty:hidden flex gap-2 items-center justify-center pl-2 pr-0 py-1",onMouseenter:x=>s.value=_,onMouseleave:g[0]||(g[0]=x=>s.value=-1)},[h(_)?_===3&&!d.value?(r.openBlock(),r.createElementBlock("a",{key:1,onClick:p},r.toDisplayString(a.value),1)):r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(y,{key:0,class:r.normalizeClass([c(_),"fm-typo-body-md-400"]),to:b.disabled?"":b.route,onClick:x=>u(_)},{default:r.withCtx(()=>[r.createElementVNode("span",null,r.toDisplayString(b.label),1),f(_)?(r.openBlock(),r.createElementBlock("span",Fu,r.toDisplayString(l.value),1)):r.createCommentVNode("",!0)]),_:2},1032,["class","to","onClick"]))],40,Pu))),128))])])}}});function eo(t){return typeof t=="number"?t:typeof t=="string"&&isFinite(+t)?+t:null}const Nu={class:"relative"},Au=["stroke-width"],Ou=["stroke-width","stroke-dashoffset"],Iu=["stroke-width","stroke-dashoffset"],Tu={key:0};var to=(t=>(t[t.md=2.5]="md",t[t.lg=2]="lg",t[t.xl=1.75]="xl",t[t.xxl=1.5]="xxl",t))(to||{});const Ut=Z(r.defineComponent({__name:"FmCircularProgress",props:{currentStep:{default:void 0},totalSteps:{default:void 0},indeterminate:{type:Boolean,default:void 0},size:{default:"xxl"},color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const s=eo(e.currentStep),l=eo(e.totalSteps),a=e.indeterminate??(s===null||l===null);return{currentStep:a?null:Math.min(s,l),totalSteps:l,indeterminate:a}}),o=r.computed(()=>{const s=eo(e.currentStep),l=eo(e.totalSteps);if(typeof s!="number"||typeof l!="number")return"10 200";const a=48,d=Math.min(1,s/l);return isNaN(d)?"0 200":`${d*a} 200`}),i=r.computed(()=>{const s=new Array,l={};return e.color?(an(e.color)?l.color=e.color:s.push(`text-fm-color-${e.color}`),{class:s.join(" "),style:l}):{class:s.join(" "),style:l}});return(s,l)=>(r.openBlock(),r.createElementBlock("div",Nu,[r.createElementVNode("div",{class:r.normalizeClass(["fm-progress fm-typo-body-sm-400 flex items-center justify-center",{"fm-progress--indeterminate":n.value.indeterminate,[`fm-progress--${s.size}`]:!0}])},[(r.openBlock(),r.createElementBlock("svg",{class:r.normalizeClass(["absolute h-full left-0 top-0 w-full",i.value.class]),style:r.normalizeStyle(i.value.style),viewBox:"0 0 18 18"},[n.value.indeterminate?(r.openBlock(),r.createElementBlock("circle",{key:0,class:"spinner","stroke-width":to[s.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dasharray":"10 200","stroke-dashoffset":"0"},null,8,Au)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createElementVNode("circle",{"stroke-width":to[s.size],fill:"none",stroke:"var(--fm-color-neutral-gray-100)",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":s.currentStep===0?"10px":"0",style:r.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:"100 200",transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,Ou),r.createElementVNode("circle",{"stroke-width":to[s.size],fill:"none",stroke:"currentColor",cx:"50%",cy:"50%",r:7.75,"stroke-linecap":"round","stroke-dashoffset":s.currentStep===0?"10px":"0",style:r.normalizeStyle({transform:"rotate(270deg)",strokeDasharray:o.value,transformOrigin:"center",transition:"stroke-dasharray ease-out 250ms"})},null,12,Iu)],64))],6)),!n.value.indeterminate&&s.size==="xxl"?(r.openBlock(),r.createElementBlock("div",Tu,r.toDisplayString(n.value.currentStep)+" of "+r.toDisplayString(n.value.totalSteps),1)):r.createCommentVNode("",!0)],2)]))}}),[["__scopeId","data-v-c8665c2d"]]),zu=["disabled","type"],Lu={class:"-translate-x-1/2 -translate-y-1/2 absolute left-1/2 top-1/2 transform"},K=Z(r.defineComponent({__name:"FmButton",props:{variant:{default:"primary"},label:{default:""},icon:{default:""},size:{default:"lg"},disabled:{type:Boolean,default:!1},iconColor:{default:""},type:{default:"button"},iconPosition:{default:"prepend"},prependIcon:{default:""},appendIcon:{default:""},loading:{type:Boolean,default:!1}},setup(t){const e=t,n=r.ref(!1),o=r.computed(()=>`${i[e.variant]} ${e.disabled?"cursor-not-allowed":"cursor-pointer"}`),i={primary:"bg-fm-color-primary text-fm-color-typo-white rounded-lg",secondary:"bg-transparent rounded-lg border-1 border-fm-color-neutral-black",destructive:"bg-fm-color-system-error-300 text-fm-color-white text-fm-color-typo-white rounded-lg",tertiary:"bg-transparent text-fm-color-typo-primary rounded-lg",plain:"bg-transparent text-fm-color-primary",fab:"bg-fm-color-primary text-fm-color-white rounded-full text-fm-color-typo-white rounded-xxxl min-h-56 min-w-56 !p-16"};function s(l){n.value=l}return(l,a)=>{const d=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("button",{ref:"buttonEl",class:r.normalizeClass(`
2
2
  fm-btn
3
3
  ${o.value}
4
4
  fm-btn--${l.size}
@@ -6,31 +6,31 @@
6
6
  fm-btn--${l.variant}
7
7
  ${l.disabled||l.loading?"fm-btn--disabled":""}
8
8
  ${n.value&&l.variant==="plain"?"!text-fm-color-system-warning-400":""}
9
- `),disabled:l.disabled,type:l.type,onMousedown:a[0]||(a[0]=()=>r(!0)),onMouseup:a[1]||(a[1]=()=>r(!1)),onMouseleave:a[2]||(a[2]=()=>r(!1))},[l.icon&&l.iconPosition==="prepend"||l.prependIcon?(s.openBlock(),s.createBlock(j,{key:0,class:s.normalizeClass({invisible:l.loading}),name:l.icon||l.prependIcon,outline:!n.value,color:l.disabled?"neutral-gray-200":l.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):s.createCommentVNode("",!0),l.label?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-lg-700 line-clamp-1",{invisible:l.loading}])},s.toDisplayString(l.label),3)):s.createCommentVNode("",!0),l.icon&&l.iconPosition==="append"||l.appendIcon?(s.openBlock(),s.createBlock(j,{key:2,class:s.normalizeClass({invisible:l.loading}),name:l.icon||l.appendIcon,outline:!n.value,color:l.disabled?"neutral-gray-200":l.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):s.createCommentVNode("",!0),s.createElementVNode("div",vu,[l.loading?(s.openBlock(),s.createBlock(ln,{key:0,size:"md",color:"neutral-gray-300"})):s.createCommentVNode("",!0)])],42,Su)),[[d,!l.disabled&&!l.loading&&l.variant!=="plain"]])}}}),[["__scopeId","data-v-30ddf314"]]),Mu={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},Du=["v-wave","disabled","onClick","onMousedown"],Eu=s.defineComponent({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=c=>{o("update:modelValue",c)},r=s.ref(null),l=c=>{r.value=c},a=c=>c.disabled||n.disabled,d=c=>JSON.stringify(c)===JSON.stringify(n.modelValue);return(c,u)=>(s.openBlock(),s.createElementBlock("div",Mu,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(c.items,(f,h)=>(s.openBlock(),s.createElementBlock("button",{key:h,type:"button","v-wave":a(f),class:s.normalizeClass(["border-r flex gap-8 grow hover:bg-fm-color-neutral-gray-200 items-center justify-center last:border-r-0 px-[11px] py-[7px]",{"bg-fm-color-system-warning-100 hover:bg-fm-color-system-warning-100":d(f),"hover:bg-fm-color-neutral-white cursor-not-allowed":a(f)}]),disabled:a(f),onClick:p=>i(f),onMousedown:p=>l(f),onMouseup:u[0]||(u[0]=p=>l(null)),onMouseleave:u[1]||(u[1]=p=>l(null))},[f.icon?(s.openBlock(),s.createBlock(j,{key:0,name:f.icon,size:"md",color:a(f)?"neutral-gray-200":d(f)?"primary":"",outline:JSON.stringify(r.value)!==JSON.stringify(f)&&!d(f)},null,8,["name","color","outline"])):s.createCommentVNode("",!0),f.label?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-lg-700",[a(f)?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},s.toDisplayString(f.label),3)):s.createCommentVNode("",!0)],42,Du))),128))]))}}),wr=Symbol.for("fm:form"),Cr=Symbol.for("fm:radio-group"),xr=Symbol.for("fm:stepper"),kr=Symbol.for("fm:dialog"),Sr=Symbol.for("fm:menu"),vr=Symbol.for("fm:menu-to-item"),bi=Symbol.for("fm:snackbar"),ht=Symbol.for("fm:card"),Bu=s.defineComponent({__name:"FmCard",props:{variant:{default:"elevated"},horizontal:{type:Boolean,default:!1},disabled:{type:Boolean}},setup(t){const e=t;return s.provide(ht,{disabled:e.disabled,horizontal:e.horizontal}),(n,o)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([`fm-card--${n.variant}`,{"fm-card--horizontal":n.horizontal}])},[s.renderSlot(n.$slots,"default",{disabled:e.disabled})],2))}}),Vu=s.defineComponent({__name:"FmCardActionArea",props:{disabled:{type:Boolean,default:!1}},setup(t){const e=s.inject(ht,null);return(n,o)=>{var r,l;const i=s.resolveDirective("wave");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass((r=s.unref(e))!=null&&r.disabled||n.disabled?"cursor-not-allowed":"cursor-pointer")},[s.renderSlot(n.$slots,"default")],2)),[[i,!((l=s.unref(e))!=null&&l.disabled)&&!n.disabled]])}}}),$i=s.defineComponent({__name:"FmCardSection",setup(t){const e=s.inject(ht,null);return(n,o)=>{var i;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-card__section",{"fm-card__subtitle--disabled":(i=s.unref(e))==null?void 0:i.disabled}])},[s.renderSlot(n.$slots,"default")],2)}}}),Pu={class:"fm-card__actions"},Ru=s.defineComponent({__name:"FmCardActions",setup(t){const e=s.inject(ht,null);return(n,o)=>(s.openBlock(),s.createBlock($i,null,{default:s.withCtx(()=>{var i;return[s.createElementVNode("div",Pu,[s.renderSlot(n.$slots,"default",{disabled:((i=s.unref(e))==null?void 0:i.disabled)??!1})])]}),_:3}))}}),Mr=s.defineComponent({__name:"FmCardTitle",setup(t){const e=s.inject(ht,null);return(n,o)=>{var i;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-card__title",{"fm-card__title--disabled":(i=s.unref(e))==null?void 0:i.disabled}])},[s.renderSlot(n.$slots,"default")],2)}}}),Dr=s.defineComponent({__name:"FmCardSubtitle",setup(t){const e=s.inject(ht,null);return(n,o)=>{var i;return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-card__subtitle",{"fm-card__subtitle--disabled":(i=s.unref(e))==null?void 0:i.disabled}])},[s.renderSlot(n.$slots,"default")],2)}}}),Fu={class:"flex flex-col gap-4"},Nu=s.defineComponent({__name:"FmCardHeader",props:{title:{default:""},subtitle:{default:""}},setup(t){const e=s.inject(ht,null);return(n,o)=>(s.openBlock(),s.createBlock($i,{class:"fm-card__header"},{default:s.withCtx(()=>{var i,r;return[s.createElementVNode("div",Fu,[n.title?(s.openBlock(),s.createBlock(Mr,{key:0,disabled:(i=s.unref(e))==null?void 0:i.disabled},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(n.title),1)]),_:1},8,["disabled"])):s.createCommentVNode("",!0),n.subtitle?(s.openBlock(),s.createBlock(Dr,{key:1,disabled:(r=s.unref(e))==null?void 0:r.disabled},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(n.subtitle),1)]),_:1},8,["disabled"])):s.createCommentVNode("",!0)])]}),_:1}))}}),Au=["src","width"],Ou=s.defineComponent({__name:"FmCardMedia",props:{src:{},width:{default:"100%"}},setup(t){const e=s.inject(ht,null);return(n,o)=>{var i,r;return s.openBlock(),s.createElementBlock("img",{src:n.src,class:s.normalizeClass(["object-cover",[{"opacity-60":((i=s.unref(e))==null?void 0:i.disabled)??!1},(r=s.unref(e))!=null&&r.horizontal?"aspect-square":"aspect-4/3"]]),width:n.width},null,10,Au)}}}),Er=s.defineComponent({__name:"FmChip",props:{label:{default:""},icon:{default:""},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},variant:{default:"plain"}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.ref(!1);function l(m){n.selectable&&(r.value=m)}const a=()=>{!n.selectable||n.disabled||(i.value=!i.value)},d=m=>{m.stopPropagation(),!n.disabled&&o("chip-closed")};s.onMounted(()=>{i.value=n.selected}),s.watch(()=>n.selected,()=>{i.value=n.selected});function c(m,g,y){if(m)return"text-fm-color-typo-disabled";switch(y){case"plain":return g?"text-fm-color-neutral-white":"";case"neutral":case"info":case"success":case"critical":return"text-fm-color-neutral-white";case"warning":return"text-fm-color-neutral-black"}}function u(m,g,y){if(m)return"bg-fm-color-neutral-gray-100 cursor-not-allowed";switch(y){case"plain":return g?"bg-fm-color-neutral-black":"bg-fm-color-neutral-gray-100";case"neutral":return"bg-fm-color-neutral-black";case"info":return"bg-fm-color-secondary-blueberry";case"success":return"bg-fm-color-secondary-mint";case"critical":return"bg-fm-color-secondary-salmon";case"warning":return"bg-fm-color-secondary-mustard"}}const f=s.ref(),h=s.ref(!1);function p(m=0){if(n.label&&!(!f.value&&m>500)){if(!f.value){s.nextTick(()=>p(m+1));return}h.value=f.value.offsetWidth<f.value.scrollWidth}}return s.onMounted(()=>{p()}),(m,g)=>{const y=s.resolveDirective("tooltip");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["inline-flex rounded-md items-center gap-4 justify-center max-w-[200px]",m.compact?"h-[22px] px-8":"h-[30px] px-8 py-4",u(m.disabled,i.value,m.variant),{"cursor-pointer":m.selectable&&!m.disabled,"hover:bg-fm-color-opacity-sm":!i.value&&!m.disabled&&m.selectable}]),onClick:a,onMousedown:g[0]||(g[0]=()=>l(!0)),onMouseleave:g[1]||(g[1]=()=>l(!1)),onMouseup:g[2]||(g[2]=()=>l(!1))},[s.renderSlot(m.$slots,"default",{},()=>[m.icon?(s.openBlock(),s.createBlock(j,{key:0,color:m.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:m.icon,outline:!r.value&&!i.value,size:"sm"},null,8,["color","name","outline"])):s.createCommentVNode("",!0),m.label?(s.openBlock(),s.createElementBlock("div",{key:1,ref_key:"labelRef",ref:f,class:s.normalizeClass(["fm-typo-body-md-700 select-none text-ellipsis overflow-hidden whitespace-nowrap",c(m.disabled,i.value,m.variant)])},s.toDisplayString(m.label),3)):s.createCommentVNode("",!0)]),m.removable?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["flex items-center justify-center rounded-xxxl",!i.value&&!m.disabled?"hover:bg-fm-color-opacity-sm":"",{"cursor-not-allowed":m.disabled,"cursor-pointer":m.selectable&&!m.disabled}]),onClick:d},[s.createVNode(j,{color:m.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:"close",size:"sm"},null,8,["color"])],2)):s.createCommentVNode("",!0)],34)),[[y,h.value?m.label:null]])}}}),_i=s.defineComponent({__name:"FmChipGroup",props:{items:{},selectable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(null),r=s.ref(0),l=s.ref(null),a=s.ref(),d=()=>{var h,p;if(!i.value)return;const u=i.value.getBoundingClientRect();r.value>0&&l.value&&((h=a.value)==null||h.splice(l.value,1)),r.value=0;let f=0;Array.from(i.value.children).forEach((m,g)=>{const y=m.getBoundingClientRect(),b=y.y-u.y;f=Math.max(y.height*2+4,f),b>f&&(r.value+=1,l.value=l.value===null?g:g-r.value)}),r.value>0&&l.value&&((p=a.value)==null||p.splice(l.value,0,{label:`+${r.value}`,removable:!1,selectable:!1,compact:n.compact}))},c=u=>{o("chip-closed",u)};return s.onMounted(()=>{a.value=n.items,d(),new ResizeObserver(()=>{d()}).observe(i.value)}),s.watch(()=>n.items,()=>{a.value=n.items,d()}),(u,f)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"chipsContainer",ref:i,class:s.normalizeClass(["flex flex-wrap gap-4 items-center overflow-y-hidden",u.compact?"max-h-48":"max-h-64"])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,(h,p)=>(s.openBlock(),s.createBlock(Er,{key:p,label:h.label,icon:h.icon,selected:h.selected,removable:h.removable!==void 0?h.removable:u.removable,selectable:h.selectable!==void 0?h.selectable:u.selectable,disabled:h.disabled!==void 0?h.disabled:u.disabled,compact:u.compact,variant:h.variant,onChipClosed:m=>c(p)},null,8,["label","icon","selected","removable","selectable","disabled","compact","variant","onChipClosed"]))),128))],2))}}),Iu={class:"flex h-48 items-center justify-center w-48"},Br=s.defineComponent({__name:"FmDialogContent",props:{modelValue:{type:Boolean,default:!1},minWidth:{default:280},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=s.ref(null),i=s.ref(!1),r=s.ref(!1),l=d=>{const c=d.scrollHeight,u=d.scrollTop+d.clientHeight;r.value=c===u,i.value=d.scrollTop===0},a=d=>{d.stopPropagation();const c=d.target;l(c)};return s.watchEffect(()=>{o.value&&l(o.value)}),(d,c)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-dialog",`min-w-[${d.minWidth}px] max-w-[560px] max-h-[600px]`])},[s.createElementVNode("div",{class:s.normalizeClass(["fm-dialog--header","flex items-center justify-between","fm-typo-title-sm-700 text-fm-color-typo-primary",!i.value&&"fm-shadow-light-300"])},[s.renderSlot(d.$slots,"dialog-header"),s.createElementVNode("div",Iu,[d.closeButton?(s.openBlock(),s.createBlock(j,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:c[0]||(c[0]=u=>n("update:modelValue",!1))})):s.createCommentVNode("",!0)])],2),s.createElementVNode("div",{ref_key:"contentRef",ref:o,class:"fm-dialog--content overflow-y-auto",onScrollPassive:a},[s.renderSlot(d.$slots,"default")],544),d.$slots["dialog-footer"]?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["fm-dialog--footer","flex gap-8 items-center sm:flex-col-reverse xs:flex-col-reverse",!r.value&&"shadow-[0_-8px_16px_0px_rgba(199,199,204,0.24)]"])},[s.renderSlot(d.$slots,"dialog-footer")],2)):s.createCommentVNode("",!0)],2))}}),Tu=s.defineComponent({__name:"FmDialog",props:{modelValue:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},minWidth:{default:280},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(null),r=a=>{n.overlay&&i.value&&a.target===i.value&&o("update:modelValue",!1)},l=document.body.style.overflow;return s.watch(()=>n.modelValue,a=>{a?document.body.style.overflow="hidden":document.body.style.overflow=l}),(a,d)=>(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,{name:"fm-dialog"},{default:s.withCtx(()=>[a.modelValue?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:i,class:s.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":a.overlay}),onClick:d[1]||(d[1]=c=>r(c))},[s.createVNode(Br,{"close-button":a.closeButton,"min-width":a.minWidth,"model-value":a.modelValue,"onUpdate:modelValue":d[0]||(d[0]=c=>o("update:modelValue",c))},{"dialog-header":s.withCtx(()=>[s.renderSlot(a.$slots,"dialog-header")]),"dialog-footer":s.withCtx(()=>[s.renderSlot(a.$slots,"dialog-footer")]),default:s.withCtx(()=>[s.renderSlot(a.$slots,"default")]),_:3},8,["close-button","min-width","model-value"])],2)):s.createCommentVNode("",!0)]),_:3})]))}}),Lu={class:"fm-drop-field"},zu=["accept","disabled"],Hu=J(s.defineComponent({__name:"FmDropField",props:{label:{default:""},disabled:{type:Boolean,default:!1},accept:{default:""},maxFileSize:{default:8e6}},emits:["file-upload","file-rejected"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.ref(),l=s.ref(),a=s.ref(),d=x=>{n.disabled||(x.stopPropagation(),x.preventDefault())},c=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!0)},u=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!1)},f=x=>{n.disabled||(x.stopPropagation(),x.preventDefault(),i.value=!1,h(x))},h=x=>{var D;a.value=((D=x.dataTransfer)==null?void 0:D.files)??x.target.files;const V=a.value;if(r.value=m(V[0]),l.value=g(V[0]),r.value&&l.value)o("file-upload",V[0]);else{const F=p();o("file-rejected",[{file:V[0],reason:F}])}},p=()=>{const x=[];return r.value||x.push("invalid-type"),l.value||x.push("invalid-size"),x},m=x=>{if(!n.accept)return!0;const V=n.accept.split(",").map(D=>D.trim());for(const D of V)if(y(D)){if($(D)===$(x.type))return!0}else if(b(x)===D||x.type===D)return!0;return!1},g=x=>x.size<=n.maxFileSize,y=x=>x.indexOf("*")!==-1,b=x=>"."+x.name.split(".").pop(),$=x=>x.substring(0,x.indexOf("/")),w=s.computed(()=>{if(i.value)return"Drop file to upload";if(r.value){if(!l.value)return`File size exceeds ${n.maxFileSize*1e-6}mb`}else return"File type is not valid";return""}),S=s.computed(()=>a.value?!r.value||!l.value:!1);return(x,V)=>(s.openBlock(),s.createElementBlock("label",Lu,[s.renderSlot(x.$slots,"label",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},s.toDisplayString(x.label),3)],!0),s.createElementVNode("div",{class:s.normalizeClass(["fm-drop-field__container",{"fm-drop-field__container--dragging":i.value,"fm-drop-field__container--invalid":S.value&&!x.disabled,"fm-drop-field__container--disabled":x.disabled}]),onDragenter:d,onDragover:c,onDragleave:u,onDrop:f},[(i.value||S.value)&&!x.disabled?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass({"fm-typo-body-lg-700":!0,"text-fm-color-primary":i.value,"text-fm-color-typo-error":S.value})},s.toDisplayString(w.value),3)):(s.openBlock(),s.createBlock(X,{key:1,label:"Add files",size:"md",variant:"secondary",disabled:x.disabled},null,8,["disabled"])),s.renderSlot(x.$slots,"accept-text",{},()=>[n.accept?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["fm-typo-body-md-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},s.toDisplayString(`Accepts ${n.accept}`),3)):s.createCommentVNode("",!0)],!0),s.createElementVNode("input",{type:"file",class:"fm-drop-field__input",accept:x.accept,disabled:x.disabled,onChange:h},null,40,zu)],34),s.renderSlot(x.$slots,"helper-text",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-sm-400",[x.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},s.toDisplayString(`Max size ${n.maxFileSize*1e-6}mb`),3)],!0)]))}}),[["__scopeId","data-v-c914dc32"]]),ju={},Wu={class:"flex-grow"};function Yu(t,e){return s.openBlock(),s.createElementBlock("div",Wu)}const Wt=J(ju,[["render",Yu]]),Uu={install:t=>{const e={currentDialog:{vNode:null,container:null},open:n=>{const o={primary:[],secondary:[],tertiary:[]},i={onPrimary:c=>(o.primary.push(c),i),onSecondary:c=>(o.secondary.push(c),i),onTertiary:c=>(o.tertiary.push(c),i)};function r(){e.close()}const l=document.createElement("div");document.body.appendChild(l);const a=s.markRaw(Vr),d=s.createVNode(a,{...n,unmount:r,storedFunctions:o});return d.appContext=t._context,s.render(d,l),e.currentDialog.vNode=d,e.currentDialog.container=l,i},close:()=>{const{vNode:n,container:o}=e.currentDialog;n===null&&o===null||(o&&s.render(null,o),e.currentDialog={vNode:null,container:null})}};t.config.globalProperties.$dialog=e,t.provide(kr,e)}},Gu={key:0,class:"block relative"},qu={key:1,class:"fm-typo-body-md-400 text-fm-color-neutral-black"},Vr=s.defineComponent({__name:"FmDynamicDialog",props:{title:{},message:{default:""},primaryActions:{default:null},secondaryActions:{default:null},tertiaryActions:{default:null},overlay:{type:Boolean,default:!0},closeButton:{type:Boolean,default:!0},minWidth:{default:280},dialogComponent:{default:null},contentComponent:{default:null},dialogComponentProps:{default:null},contentComponentProps:{default:null},unmount:{type:Function,default:()=>{}},storedFunctions:{default:null}},emits:["dialog-opened","dialog-closed"],setup(t,{emit:e}){const n=s.ref(!1),o=s.ref(),i=s.computed(()=>r.primaryActions||r.secondaryActions||r.tertiaryActions),r=t,l=e,a=s.ref(null),d=()=>{r.overlay&&(n.value=!1,setTimeout(()=>{r.unmount()},500))},c=f=>{a.value&&f.target===a.value&&d()},u=(f,h)=>{r.storedFunctions[h].forEach(p=>p(o.value)),f.close&&d()};return s.onMounted(()=>{l("dialog-opened"),n.value=!0}),s.onUnmounted(()=>{l("dialog-closed")}),(f,h)=>(s.openBlock(),s.createBlock(s.Transition,{name:"fm-dialog"},{default:s.withCtx(()=>[n.value?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:a,class:s.normalizeClass({"fm-dialog--container":!0,"fm-dialog--overlay":f.overlay,"pointer-events-none":!n.value}),onClick:c},[f.dialogComponent?(s.openBlock(),s.createElementBlock("div",Gu,[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(f.dialogComponent),s.normalizeProps(s.guardReactiveProps(f.dialogComponentProps)),null,16)),f.closeButton?(s.openBlock(),s.createBlock(j,{key:0,class:"absolute cursor-pointer right-[12px] top-[18px]",name:"close",size:"md",onClick:d})):s.createCommentVNode("",!0)])):(s.openBlock(),s.createBlock(Br,{key:1,modelValue:n.value,"onUpdate:modelValue":h[4]||(h[4]=p=>n.value=p),"close-button":f.closeButton,"min-width":f.minWidth},s.createSlots({"dialog-header":s.withCtx(()=>[s.createElementVNode("div",null,s.toDisplayString(f.title??"Notification"),1)]),default:s.withCtx(()=>[f.contentComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(f.contentComponent),s.mergeProps({key:0},f.contentComponentProps,{"onDialog:emitData":h[0]||(h[0]=p=>o.value=p)}),null,16)):(s.openBlock(),s.createElementBlock("div",qu,s.toDisplayString(f.message),1))]),_:2},[i.value?{name:"dialog-footer",fn:s.withCtx(()=>[f.tertiaryActions?(s.openBlock(),s.createBlock(X,{key:0,label:f.tertiaryActions.text,variant:f.tertiaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:h[1]||(h[1]=p=>u(f.tertiaryActions,"tertiary"))},null,8,["label","variant"])):s.createCommentVNode("",!0),s.createVNode(Wt,{class:"sm:hidden xs:hidden"}),f.secondaryActions?(s.openBlock(),s.createBlock(X,{key:1,label:f.secondaryActions.text,variant:f.secondaryActions.variant??"secondary",class:"sm:w-full xs:w-full",size:"md",onClick:h[2]||(h[2]=p=>u(f.secondaryActions,"secondary"))},null,8,["label","variant"])):s.createCommentVNode("",!0),f.primaryActions?(s.openBlock(),s.createBlock(X,{key:2,label:f.primaryActions.text,variant:f.primaryActions.variant??"primary",class:"sm:w-full xs:w-full",size:"md",onClick:h[3]||(h[3]=p=>u(f.primaryActions,"primary"))},null,8,["label","variant"])):s.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["modelValue","close-button","min-width"]))],2)):s.createCommentVNode("",!0)]),_:1}))}});/*!
9
+ `),disabled:l.disabled,type:l.type,onMousedown:a[0]||(a[0]=()=>s(!0)),onMouseup:a[1]||(a[1]=()=>s(!1)),onMouseleave:a[2]||(a[2]=()=>s(!1))},[l.icon&&l.iconPosition==="prepend"||l.prependIcon?(r.openBlock(),r.createBlock(j,{key:0,class:r.normalizeClass({invisible:l.loading}),name:l.icon||l.prependIcon,outline:!n.value,color:l.disabled?"neutral-gray-200":l.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):r.createCommentVNode("",!0),l.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-body-lg-700 line-clamp-1",{invisible:l.loading}])},r.toDisplayString(l.label),3)):r.createCommentVNode("",!0),l.icon&&l.iconPosition==="append"||l.appendIcon?(r.openBlock(),r.createBlock(j,{key:2,class:r.normalizeClass({invisible:l.loading}),name:l.icon||l.appendIcon,outline:!n.value,color:l.disabled?"neutral-gray-200":l.iconColor??"",size:"md"},null,8,["class","name","outline","color"])):r.createCommentVNode("",!0),r.createElementVNode("div",Lu,[l.loading?(r.openBlock(),r.createBlock(Ut,{key:0,size:"md",color:"neutral-gray-300"})):r.createCommentVNode("",!0)])],42,zu)),[[d,!l.disabled&&!l.loading&&l.variant!=="plain"]])}}}),[["__scopeId","data-v-30ddf314"]]),Hu={class:"bg-fm-color-neutral-white border-1 border-fm-color-neutral-gray-200 flex items-center overflow-hidden rounded-lg"},ju=["v-wave","disabled","onClick","onMousedown"],Wu=r.defineComponent({__name:"FmButtonGroup",props:{modelValue:{},disabled:{type:Boolean},items:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=c=>{o("update:modelValue",c)},s=r.ref(null),l=c=>{s.value=c},a=c=>c.disabled||n.disabled,d=c=>JSON.stringify(c)===JSON.stringify(n.modelValue);return(c,u)=>(r.openBlock(),r.createElementBlock("div",Hu,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.items,(f,h)=>(r.openBlock(),r.createElementBlock("button",{key:h,type:"button","v-wave":a(f),class:r.normalizeClass(["border-r flex gap-8 grow hover:bg-fm-color-neutral-gray-200 items-center justify-center last:border-r-0 px-[11px] py-[7px]",{"bg-fm-color-system-warning-100 hover:bg-fm-color-system-warning-100":d(f),"hover:bg-fm-color-neutral-white cursor-not-allowed":a(f)}]),disabled:a(f),onClick:p=>i(f),onMousedown:p=>l(f),onMouseup:u[0]||(u[0]=p=>l(null)),onMouseleave:u[1]||(u[1]=p=>l(null))},[f.icon?(r.openBlock(),r.createBlock(j,{key:0,name:f.icon,size:"md",color:a(f)?"neutral-gray-200":d(f)?"primary":"",outline:JSON.stringify(s.value)!==JSON.stringify(f)&&!d(f)},null,8,["name","color","outline"])):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-body-lg-700",[a(f)?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0)],42,ju))),128))]))}}),Es=Symbol.for("fm:form"),me=Symbol.for("fm:form-state"),Bs=Symbol.for("fm:radio-group"),Vs=Symbol.for("fm:stepper"),Ps=Symbol.for("fm:dialog"),Fs=Symbol.for("fm:menu"),Rs=Symbol.for("fm:menu-to-item"),ki=Symbol.for("fm:snackbar"),pt=Symbol.for("fm:card"),Yu=r.defineComponent({__name:"FmCard",props:{variant:{default:"elevated"},horizontal:{type:Boolean,default:!1},disabled:{type:Boolean}},setup(t){const e=t;return r.provide(pt,{disabled:e.disabled,horizontal:e.horizontal}),(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([`fm-card--${n.variant}`,{"fm-card--horizontal":n.horizontal}])},[r.renderSlot(n.$slots,"default",{disabled:e.disabled})],2))}}),Uu=r.defineComponent({__name:"FmCardActionArea",props:{disabled:{type:Boolean,default:!1}},setup(t){const e=r.inject(pt,null);return(n,o)=>{var s,l;const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass((s=r.unref(e))!=null&&s.disabled||n.disabled?"cursor-not-allowed":"cursor-pointer")},[r.renderSlot(n.$slots,"default")],2)),[[i,!((l=r.unref(e))!=null&&l.disabled)&&!n.disabled]])}}}),xi=r.defineComponent({__name:"FmCardSection",setup(t){const e=r.inject(pt,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__section",{"fm-card__subtitle--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),Gu={class:"fm-card__actions"},qu=r.defineComponent({__name:"FmCardActions",setup(t){const e=r.inject(pt,null);return(n,o)=>(r.openBlock(),r.createBlock(xi,null,{default:r.withCtx(()=>{var i;return[r.createElementVNode("div",Gu,[r.renderSlot(n.$slots,"default",{disabled:((i=r.unref(e))==null?void 0:i.disabled)??!1})])]}),_:3}))}}),Ns=r.defineComponent({__name:"FmCardTitle",setup(t){const e=r.inject(pt,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__title",{"fm-card__title--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),As=r.defineComponent({__name:"FmCardSubtitle",setup(t){const e=r.inject(pt,null);return(n,o)=>{var i;return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-card__subtitle",{"fm-card__subtitle--disabled":(i=r.unref(e))==null?void 0:i.disabled}])},[r.renderSlot(n.$slots,"default")],2)}}}),Xu={class:"flex flex-col gap-4"},Ku=r.defineComponent({__name:"FmCardHeader",props:{title:{default:""},subtitle:{default:""}},setup(t){const e=r.inject(pt,null);return(n,o)=>(r.openBlock(),r.createBlock(xi,{class:"fm-card__header"},{default:r.withCtx(()=>{var i,s;return[r.createElementVNode("div",Xu,[n.title?(r.openBlock(),r.createBlock(Ns,{key:0,disabled:(i=r.unref(e))==null?void 0:i.disabled},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.title),1)]),_:1},8,["disabled"])):r.createCommentVNode("",!0),n.subtitle?(r.openBlock(),r.createBlock(As,{key:1,disabled:(s=r.unref(e))==null?void 0:s.disabled},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(n.subtitle),1)]),_:1},8,["disabled"])):r.createCommentVNode("",!0)])]}),_:1}))}}),Zu=["src","width"],Ju=r.defineComponent({__name:"FmCardMedia",props:{src:{},width:{default:"100%"}},setup(t){const e=r.inject(pt,null);return(n,o)=>{var i,s;return r.openBlock(),r.createElementBlock("img",{src:n.src,class:r.normalizeClass(["object-cover",[{"opacity-60":((i=r.unref(e))==null?void 0:i.disabled)??!1},(s=r.unref(e))!=null&&s.horizontal?"aspect-square":"aspect-4/3"]]),width:n.width},null,10,Zu)}}}),Os=r.defineComponent({__name:"FmChip",props:{label:{default:""},icon:{default:""},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},variant:{default:"plain"}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.ref(!1);function l(m){n.selectable&&(s.value=m)}const a=()=>{!n.selectable||n.disabled||(i.value=!i.value)},d=m=>{m.stopPropagation(),!n.disabled&&o("chip-closed")};r.onMounted(()=>{i.value=n.selected}),r.watch(()=>n.selected,()=>{i.value=n.selected});function c(m,g,y){if(m)return"text-fm-color-typo-disabled";switch(y){case"plain":return g?"text-fm-color-neutral-white":"";case"neutral":case"info":case"success":case"critical":return"text-fm-color-neutral-white";case"warning":return"text-fm-color-neutral-black"}}function u(m,g,y){if(m)return"bg-fm-color-neutral-gray-100 cursor-not-allowed";switch(y){case"plain":return g?"bg-fm-color-neutral-black":"bg-fm-color-neutral-gray-100";case"neutral":return"bg-fm-color-neutral-black";case"info":return"bg-fm-color-secondary-blueberry";case"success":return"bg-fm-color-secondary-mint";case"critical":return"bg-fm-color-secondary-salmon";case"warning":return"bg-fm-color-secondary-mustard"}}const f=r.ref(),h=r.ref(!1);function p(m=0){if(n.label&&!(!f.value&&m>500)){if(!f.value){r.nextTick(()=>p(m+1));return}h.value=f.value.offsetWidth<f.value.scrollWidth}}return r.onMounted(()=>{p()}),(m,g)=>{const y=r.resolveDirective("tooltip");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex rounded-md items-center gap-4 justify-center max-w-[200px]",m.compact?"h-[22px] px-8":"h-[30px] px-8 py-4",u(m.disabled,i.value,m.variant),{"cursor-pointer":m.selectable&&!m.disabled,"hover:bg-fm-color-opacity-sm":!i.value&&!m.disabled&&m.selectable}]),onClick:a,onMousedown:g[0]||(g[0]=()=>l(!0)),onMouseleave:g[1]||(g[1]=()=>l(!1)),onMouseup:g[2]||(g[2]=()=>l(!1))},[r.renderSlot(m.$slots,"default",{},()=>[m.icon?(r.openBlock(),r.createBlock(j,{key:0,color:m.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:m.icon,outline:!s.value&&!i.value,size:"sm"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),m.label?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"labelRef",ref:f,class:r.normalizeClass(["fm-typo-body-md-700 select-none text-ellipsis overflow-hidden whitespace-nowrap",c(m.disabled,i.value,m.variant)])},r.toDisplayString(m.label),3)):r.createCommentVNode("",!0)]),m.removable?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["flex items-center justify-center rounded-xxxl",!i.value&&!m.disabled?"hover:bg-fm-color-opacity-sm":"",{"cursor-not-allowed":m.disabled,"cursor-pointer":m.selectable&&!m.disabled}]),onClick:d},[r.createVNode(j,{color:m.disabled?"neutral-gray-200":i.value?"neutral-white":"neutral-black",name:"close",size:"sm"},null,8,["color"])],2)):r.createCommentVNode("",!0)],34)),[[y,h.value?m.label:null]])}}}),Si=r.defineComponent({__name:"FmChipGroup",props:{items:{},selectable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["chip-closed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(null),s=r.ref(0),l=r.ref(null),a=r.ref(),d=()=>{var h,p;if(!i.value)return;const u=i.value.getBoundingClientRect();s.value>0&&l.value&&((h=a.value)==null||h.splice(l.value,1)),s.value=0;let f=0;Array.from(i.value.children).forEach((m,g)=>{const y=m.getBoundingClientRect(),b=y.y-u.y;f=Math.max(y.height*2+4,f),b>f&&(s.value+=1,l.value=l.value===null?g:g-s.value)}),s.value>0&&l.value&&((p=a.value)==null||p.splice(l.value,0,{label:`+${s.value}`,removable:!1,selectable:!1,compact:n.compact}))},c=u=>{o("chip-closed",u)};return r.onMounted(()=>{a.value=n.items,d(),new ResizeObserver(()=>{d()}).observe(i.value)}),r.watch(()=>n.items,()=>{a.value=n.items,d()}),(u,f)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"chipsContainer",ref:i,class:r.normalizeClass(["flex flex-wrap gap-4 items-center overflow-y-hidden",u.compact?"max-h-48":"max-h-64"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(h,p)=>(r.openBlock(),r.createBlock(Os,{key:p,label:h.label,icon:h.icon,selected:h.selected,removable:h.removable!==void 0?h.removable:u.removable,selectable:h.selectable!==void 0?h.selectable:u.selectable,disabled:h.disabled!==void 0?h.disabled:u.disabled,compact:u.compact,variant:h.variant,onChipClosed:m=>c(p)},null,8,["label","icon","selected","removable","selectable","disabled","compact","variant","onChipClosed"]))),128))],2))}}),Qu={class:"flex h-48 items-center justify-center w-48"},Is=r.defineComponent({__name:"FmDialogContent",props:{modelValue:{type:Boolean,default:!1},minWidth:{default:280},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=r.ref(null),i=r.ref(!1),s=r.ref(!1),l=d=>{const c=d.scrollHeight,u=d.scrollTop+d.clientHeight;s.value=c===u,i.value=d.scrollTop===0},a=d=>{d.stopPropagation();const c=d.target;l(c)};return r.watchEffect(()=>{o.value&&l(o.value)}),(d,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-dialog",`min-w-[${d.minWidth}px] max-w-[min(calc(100%-48px),560px)] max-h-[600px]`])},[r.createElementVNode("div",{class:r.normalizeClass(["fm-dialog--header","flex items-center justify-between","fm-typo-title-sm-700 text-fm-color-typo-primary",!i.value&&"fm-shadow-light-300"])},[r.renderSlot(d.$slots,"dialog-header"),r.createElementVNode("div",Qu,[d.closeButton?(r.openBlock(),r.createBlock(j,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:c[0]||(c[0]=u=>n("update:modelValue",!1))})):r.createCommentVNode("",!0)])],2),r.createElementVNode("div",{ref_key:"contentRef",ref:o,class:"fm-dialog--content overflow-y-auto",onScrollPassive:a},[r.renderSlot(d.$slots,"default")],544),d.$slots["dialog-footer"]?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-dialog--footer","flex gap-8 items-center sm:flex-col-reverse xs:flex-col-reverse",!s.value&&"shadow-[0_-8px_16px_0px_rgba(199,199,204,0.24)]"])},[r.renderSlot(d.$slots,"dialog-footer")],2)):r.createCommentVNode("",!0)],2))}});function Gt(){const t=r.ref(window.innerWidth),e=()=>{t.value=window.innerWidth};r.onMounted(()=>{window.addEventListener("resize",e)}),r.onUnmounted(()=>{window.removeEventListener("resize",e)});const n=r.computed(()=>({xs:t.value>=0&&t.value<=647,sm:t.value>=648&&t.value<=959,md:t.value>=960&&t.value<=1247,lg:t.value>=1248})),o={xs:[0,647],sm:[648,959],md:[960,1247],lg:[1248,1/0]};function i(a){return o[a]}function s(a){const d=o[a][1];return t.value<=d}function l(a){return!!o[a]}return{breakpoints:n,isAtMost:s,getBreadpointsBoundary:i,isBreakpointKeyword:l}}function ef(){const t=r.inject(Ps);if(!t)throw new Error("No provider");return t}function tf(){var t;return(t=r.getCurrentInstance())==null?void 0:t.emit}function nf(){const t=tf();return{emitData(e){t==null||t("dialog:emit-data",e)}}}function un(){const t=r.ref(!1);function e(){t.value=!0}function n(){t.value=!1}return{focus:e,blur:n,isFocused:t}}function Ts(t,e){const n=r.ref([]);function o(){const s=[];if(e.value&&e.value.length>0)for(const l of e.value){const d=(typeof l=="function"?l:()=>l)(t.value);d!==!0&&s.push(d)}return n.value=s,n.value}function i(){n.value=[]}return{validate:o,resetValidation:i,errorMessages:n}}function zs(t,e=null,n=null){let o=null;const i=X(t,"modelValue"),s=r.ref(!0),l=r.inject(Es,null),{validate:a,resetValidation:d,errorMessages:c}=Ts(i,r.toRef(()=>t.rules)),u=(f=n)=>{s.value=!0,d(),f&&typeof f=="function"&&f(),i.value=e};return r.onMounted(()=>{l&&(o=l.register({validate:a,resetValidation:d,resetValue:u}))}),r.onUnmounted(()=>{l&&l.unregister(o)}),r.watch(()=>i.value,()=>{s.value=!1,i.value!==e&&a()}),r.watch(()=>t.focused,f=>{s.value=!1,f||a()}),{validate:a,resetValidation:d,errorMessages:c,resetValue:u,isPristine:s}}function of(){return r.inject(ki)}const rf=r.defineComponent({__name:"FmDialog",props:{modelValue:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},minWidth:{default:280},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=X(n,"modelValue"),s=document.body.style.overflow;return r.watch(()=>i,l=>{l?document.body.style.overflow="hidden":document.body.style.overflow=s}),(l,a)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{onClick:a[1]||(a[1]=d=>i.value=!0)},[r.renderSlot(l.$slots,"dialog-button",{onClick:a[0]||(a[0]=d=>i.value=!0)})]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[r.unref(i)?(r.openBlock(),r.createBlock(cn,{key:0,"dismiss-away":l.overlay,"prevent-backdrop-event":!l.overlay,transparent:!l.overlay,"center-content":"",onClose:a[3]||(a[3]=d=>o("update:modelValue",!1))},{default:r.withCtx(()=>[r.createVNode(Is,{"close-button":l.closeButton,"min-width":l.minWidth,"model-value":r.unref(i),"onUpdate:modelValue":a[2]||(a[2]=d=>i.value=d)},{"dialog-header":r.withCtx(()=>[r.renderSlot(l.$slots,"dialog-header")]),"dialog-footer":r.withCtx(()=>[r.renderSlot(l.$slots,"dialog-footer")]),default:r.withCtx(()=>[r.renderSlot(l.$slots,"default")]),_:3},8,["close-button","min-width","model-value"])]),_:3},8,["dismiss-away","prevent-backdrop-event","transparent"])):r.createCommentVNode("",!0)]),_:3})]))],64))}}),sf={class:"fm-drop-field"},lf=["accept","disabled"],af=Z(r.defineComponent({__name:"FmDropField",props:{label:{default:""},disabled:{type:Boolean,default:!1},accept:{default:""},maxFileSize:{default:8e6}},emits:["file-upload","file-rejected"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.ref(),l=r.ref(),a=r.ref(),d=w=>{n.disabled||(w.stopPropagation(),w.preventDefault())},c=w=>{n.disabled||(w.stopPropagation(),w.preventDefault(),i.value=!0)},u=w=>{n.disabled||(w.stopPropagation(),w.preventDefault(),i.value=!1)},f=w=>{n.disabled||(w.stopPropagation(),w.preventDefault(),i.value=!1,h(w))},h=w=>{var M;a.value=((M=w.dataTransfer)==null?void 0:M.files)??w.target.files;const P=a.value;if(s.value=m(P[0]),l.value=g(P[0]),s.value&&l.value)o("file-upload",P[0]);else{const N=p();o("file-rejected",[{file:P[0],reason:N}])}},p=()=>{const w=[];return s.value||w.push("invalid-type"),l.value||w.push("invalid-size"),w},m=w=>{if(!n.accept)return!0;const P=n.accept.split(",").map(M=>M.trim());for(const M of P)if(y(M)){if(_(M)===_(w.type))return!0}else if(b(w)===M||w.type===M)return!0;return!1},g=w=>w.size<=n.maxFileSize,y=w=>w.indexOf("*")!==-1,b=w=>"."+w.name.split(".").pop(),_=w=>w.substring(0,w.indexOf("/")),x=r.computed(()=>{if(i.value)return"Drop file to upload";if(s.value){if(!l.value)return`File size exceeds ${n.maxFileSize*1e-6}mb`}else return"File type is not valid";return""}),$=r.computed(()=>a.value?!s.value||!l.value:!1);return(w,P)=>(r.openBlock(),r.createElementBlock("label",sf,[r.renderSlot(w.$slots,"label",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[w.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"]])},r.toDisplayString(w.label),3)],!0),r.createElementVNode("div",{class:r.normalizeClass(["fm-drop-field__container",{"fm-drop-field__container--dragging":i.value,"fm-drop-field__container--invalid":$.value&&!w.disabled,"fm-drop-field__container--disabled":w.disabled}]),onDragenter:d,onDragover:c,onDragleave:u,onDrop:f},[(i.value||$.value)&&!w.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass({"fm-typo-body-lg-700":!0,"text-fm-color-primary":i.value,"text-fm-color-typo-error":$.value})},r.toDisplayString(x.value),3)):(r.openBlock(),r.createBlock(K,{key:1,label:"Add files",size:"md",variant:"secondary",disabled:w.disabled},null,8,["disabled"])),r.renderSlot(w.$slots,"accept-text",{},()=>[n.accept?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-typo-body-md-400",[w.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},r.toDisplayString(`Accepts ${n.accept}`),3)):r.createCommentVNode("",!0)],!0),r.createElementVNode("input",{type:"file",class:"fm-drop-field__input",accept:w.accept,disabled:w.disabled,onChange:h},null,40,lf)],34),r.renderSlot(w.$slots,"helper-text",{},()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-sm-400",[w.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"]])},r.toDisplayString(`Max size ${n.maxFileSize*1e-6}mb`),3)],!0)]))}}),[["__scopeId","data-v-c914dc32"]]),df={},cf={class:"flex-grow"};function uf(t,e){return r.openBlock(),r.createElementBlock("div",cf)}const mt=Z(df,[["render",uf]]),ff={install:t=>{const e={currentDialog:{vNode:null,container:null},open:n=>{const o={primary:[],secondary:[],tertiary:[]},i=new Array,s={onPrimary:u=>(o.primary.push(u),s),onSecondary:u=>(o.secondary.push(u),s),onTertiary:u=>(o.tertiary.push(u),s),onClose:u=>(i.push(u),s)};function l(){e.close()}const a=document.createElement("div");document.body.appendChild(a);const d=r.markRaw(Ls),c=r.createVNode(d,{...n,unmount:l,storedFunctions:o,"onDialog-closed"(u){i.forEach(f=>f(u))}});return c.appContext=t._context,r.render(c,a),e.currentDialog.vNode=c,e.currentDialog.container=a,s},close:()=>{const{vNode:n,container:o}=e.currentDialog;n===null&&o===null||(o&&r.render(null,o),e.currentDialog={vNode:null,container:null})}};t.config.globalProperties.$dialog=e,t.provide(Ps,e)}},hf={key:0,class:"block relative"},pf={key:1,class:"fm-typo-body-md-400 text-fm-color-neutral-black"},Ls=r.defineComponent({__name:"FmDynamicDialog",props:{title:{},message:{default:""},primaryActions:{default:null},secondaryActions:{default:null},tertiaryActions:{default:null},overlay:{type:Boolean,default:!0},dismissAway:{type:Boolean,default:!0},closeButton:{type:Boolean,default:!0},minWidth:{default:280},dialogComponent:{default:null},contentComponent:{default:null},dialogComponentProps:{default:null},contentComponentProps:{default:null},unmount:{type:Function,default:()=>{}},storedFunctions:{default:null}},emits:["dialog-opened","dialog-closed"],setup(t,{emit:e}){const n=r.ref(!1),o=r.ref(),i=r.computed(()=>s.primaryActions||s.secondaryActions||s.tertiaryActions),s=t,l=e,a=()=>{s.overlay&&(n.value=!1,setTimeout(()=>{s.unmount()},500))},d=(c,u)=>{s.storedFunctions[u].forEach(f=>f(o.value)),c.close&&a()};return r.onMounted(()=>{l("dialog-opened"),n.value=!0}),r.onUnmounted(()=>{l("dialog-closed",o.value)}),(c,u)=>(r.openBlock(),r.createBlock(r.Transition,{name:"fm-dialog"},{default:r.withCtx(()=>[n.value?(r.openBlock(),r.createBlock(cn,{key:0,"dismiss-away":c.overlay,"prevent-backdrop-event":!c.overlay,transparent:!c.overlay,"center-content":"",onClose:a},{default:r.withCtx(()=>[c.dialogComponent?(r.openBlock(),r.createElementBlock("div",hf,[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(c.dialogComponent),r.normalizeProps(r.guardReactiveProps(c.dialogComponentProps)),null,16)),c.closeButton?(r.openBlock(),r.createBlock(j,{key:0,class:"absolute cursor-pointer right-[12px] top-[18px]",name:"close",size:"md",onClick:a})):r.createCommentVNode("",!0)])):(r.openBlock(),r.createBlock(Is,{key:1,modelValue:n.value,"onUpdate:modelValue":u[4]||(u[4]=f=>n.value=f),"close-button":c.closeButton,"min-width":c.minWidth},r.createSlots({"dialog-header":r.withCtx(()=>[r.createElementVNode("div",null,r.toDisplayString(c.title??"Notification"),1)]),default:r.withCtx(()=>[c.contentComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(c.contentComponent),r.mergeProps({key:0},c.contentComponentProps,{"onDialog:emitData":u[0]||(u[0]=f=>o.value=f)}),null,16)):(r.openBlock(),r.createElementBlock("div",pf,r.toDisplayString(c.message),1))]),_:2},[i.value?{name:"dialog-footer",fn:r.withCtx(()=>[c.tertiaryActions?(r.openBlock(),r.createBlock(K,{key:0,label:c.tertiaryActions.text,variant:c.tertiaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:u[1]||(u[1]=f=>d(c.tertiaryActions,"tertiary"))},null,8,["label","variant"])):r.createCommentVNode("",!0),r.createVNode(mt,{class:"sm:hidden xs:hidden"}),c.secondaryActions?(r.openBlock(),r.createBlock(K,{key:1,label:c.secondaryActions.text,variant:c.secondaryActions.variant??"tertiary",class:"sm:w-full xs:w-full",size:"md",onClick:u[2]||(u[2]=f=>d(c.secondaryActions,"secondary"))},null,8,["label","variant"])):r.createCommentVNode("",!0),c.primaryActions?(r.openBlock(),r.createBlock(K,{key:2,label:c.primaryActions.text,variant:c.primaryActions.variant??"primary",class:"sm:w-full xs:w-full",size:"md",onClick:u[3]||(u[3]=f=>d(c.primaryActions,"primary"))},null,8,["label","variant"])):r.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["modelValue","close-button","min-width"]))]),_:1},8,["dismiss-away","prevent-backdrop-event","transparent"])):r.createCommentVNode("",!0)]),_:1}))}});/*!
10
10
  * @kurkle/color v0.3.2
11
11
  * https://github.com/kurkle/color#readme
12
12
  * (c) 2023 Jukka Kurkela
13
13
  * Released under the MIT License
14
- */function an(t){return t+.5|0}const pt=(t,e,n)=>Math.max(Math.min(t,n),e);function dn(t){return pt(an(t*2.55),0,255)}function mt(t){return pt(an(t*255),0,255)}function Ze(t){return pt(an(t/2.55)/100,0,1)}function Pr(t){return pt(an(t*100),0,100)}const Ae={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},wi=[..."0123456789ABCDEF"],Xu=t=>wi[t&15],Ku=t=>wi[(t&240)>>4]+wi[t&15],eo=t=>(t&240)>>4===(t&15),Zu=t=>eo(t.r)&&eo(t.g)&&eo(t.b)&&eo(t.a);function Ju(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Ae[t[1]]*17,g:255&Ae[t[2]]*17,b:255&Ae[t[3]]*17,a:e===5?Ae[t[4]]*17:255}:(e===7||e===9)&&(n={r:Ae[t[1]]<<4|Ae[t[2]],g:Ae[t[3]]<<4|Ae[t[4]],b:Ae[t[5]]<<4|Ae[t[6]],a:e===9?Ae[t[7]]<<4|Ae[t[8]]:255})),n}const Qu=(t,e)=>t<255?e(t):"";function ef(t){var e=Zu(t)?Xu:Ku;return t?"#"+e(t.r)+e(t.g)+e(t.b)+Qu(t.a,e):void 0}const tf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Rr(t,e,n){const o=e*Math.min(n,1-n),i=(r,l=(r+t/30)%12)=>n-o*Math.max(Math.min(l-3,9-l,1),-1);return[i(0),i(8),i(4)]}function nf(t,e,n){const o=(i,r=(i+t/60)%6)=>n-n*e*Math.max(Math.min(r,4-r,1),0);return[o(5),o(3),o(1)]}function of(t,e,n){const o=Rr(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)o[i]*=1-e-n,o[i]+=e;return o}function sf(t,e,n,o,i){return t===i?(e-n)/o+(e<n?6:0):e===i?(n-t)/o+2:(t-e)/o+4}function Ci(t){const n=t.r/255,o=t.g/255,i=t.b/255,r=Math.max(n,o,i),l=Math.min(n,o,i),a=(r+l)/2;let d,c,u;return r!==l&&(u=r-l,c=a>.5?u/(2-r-l):u/(r+l),d=sf(n,o,i,u,r),d=d*60+.5),[d|0,c||0,a]}function xi(t,e,n,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,o)).map(mt)}function ki(t,e,n){return xi(Rr,t,e,n)}function rf(t,e,n){return xi(of,t,e,n)}function lf(t,e,n){return xi(nf,t,e,n)}function Fr(t){return(t%360+360)%360}function af(t){const e=tf.exec(t);let n=255,o;if(!e)return;e[5]!==o&&(n=e[6]?dn(+e[5]):mt(+e[5]));const i=Fr(+e[2]),r=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?o=rf(i,r,l):e[1]==="hsv"?o=lf(i,r,l):o=ki(i,r,l),{r:o[0],g:o[1],b:o[2],a:n}}function df(t,e){var n=Ci(t);n[0]=Fr(n[0]+e),n=ki(n),t.r=n[0],t.g=n[1],t.b=n[2]}function cf(t){if(!t)return;const e=Ci(t),n=e[0],o=Pr(e[1]),i=Pr(e[2]);return t.a<255?`hsla(${n}, ${o}%, ${i}%, ${Ze(t.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const Nr={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"},Ar={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"};function uf(){const t={},e=Object.keys(Ar),n=Object.keys(Nr);let o,i,r,l,a;for(o=0;o<e.length;o++){for(l=a=e[o],i=0;i<n.length;i++)r=n[i],a=a.replace(r,Nr[r]);r=parseInt(Ar[l],16),t[a]=[r>>16&255,r>>8&255,r&255]}return t}let to;function ff(t){to||(to=uf(),to.transparent=[0,0,0,0]);const e=to[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const hf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function pf(t){const e=hf.exec(t);let n=255,o,i,r;if(e){if(e[7]!==o){const l=+e[7];n=e[8]?dn(l):pt(l*255,0,255)}return o=+e[1],i=+e[3],r=+e[5],o=255&(e[2]?dn(o):pt(o,0,255)),i=255&(e[4]?dn(i):pt(i,0,255)),r=255&(e[6]?dn(r):pt(r,0,255)),{r:o,g:i,b:r,a:n}}}function mf(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Ze(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Si=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Yt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function gf(t,e,n){const o=Yt(Ze(t.r)),i=Yt(Ze(t.g)),r=Yt(Ze(t.b));return{r:mt(Si(o+n*(Yt(Ze(e.r))-o))),g:mt(Si(i+n*(Yt(Ze(e.g))-i))),b:mt(Si(r+n*(Yt(Ze(e.b))-r))),a:t.a+n*(e.a-t.a)}}function no(t,e,n){if(t){let o=Ci(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*n,e===0?360:1)),o=ki(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function Or(t,e){return t&&Object.assign(e||{},t)}function Ir(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=mt(t[3]))):(e=Or(t,{r:0,g:0,b:0,a:1}),e.a=mt(e.a)),e}function yf(t){return t.charAt(0)==="r"?pf(t):af(t)}class cn{constructor(e){if(e instanceof cn)return e;const n=typeof e;let o;n==="object"?o=Ir(e):n==="string"&&(o=Ju(e)||ff(e)||yf(e)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var e=Or(this._rgb);return e&&(e.a=Ze(e.a)),e}set rgb(e){this._rgb=Ir(e)}rgbString(){return this._valid?mf(this._rgb):void 0}hexString(){return this._valid?ef(this._rgb):void 0}hslString(){return this._valid?cf(this._rgb):void 0}mix(e,n){if(e){const o=this.rgb,i=e.rgb;let r;const l=n===r?.5:n,a=2*l-1,d=o.a-i.a,c=((a*d===-1?a:(a+d)/(1+a*d))+1)/2;r=1-c,o.r=255&c*o.r+r*i.r+.5,o.g=255&c*o.g+r*i.g+.5,o.b=255&c*o.b+r*i.b+.5,o.a=l*o.a+(1-l)*i.a,this.rgb=o}return this}interpolate(e,n){return e&&(this._rgb=gf(this._rgb,e._rgb,n)),this}clone(){return new cn(this.rgb)}alpha(e){return this._rgb.a=mt(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=an(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return no(this._rgb,2,e),this}darken(e){return no(this._rgb,2,-e),this}saturate(e){return no(this._rgb,1,e),this}desaturate(e){return no(this._rgb,1,-e),this}rotate(e){return df(this._rgb,e),this}}/*!
14
+ */function fn(t){return t+.5|0}const gt=(t,e,n)=>Math.max(Math.min(t,n),e);function hn(t){return gt(fn(t*2.55),0,255)}function yt(t){return gt(fn(t*255),0,255)}function Je(t){return gt(fn(t/2.55)/100,0,1)}function Hs(t){return gt(fn(t*100),0,100)}const Oe={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},vi=[..."0123456789ABCDEF"],mf=t=>vi[t&15],gf=t=>vi[(t&240)>>4]+vi[t&15],no=t=>(t&240)>>4===(t&15),yf=t=>no(t.r)&&no(t.g)&&no(t.b)&&no(t.a);function bf(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Oe[t[1]]*17,g:255&Oe[t[2]]*17,b:255&Oe[t[3]]*17,a:e===5?Oe[t[4]]*17:255}:(e===7||e===9)&&(n={r:Oe[t[1]]<<4|Oe[t[2]],g:Oe[t[3]]<<4|Oe[t[4]],b:Oe[t[5]]<<4|Oe[t[6]],a:e===9?Oe[t[7]]<<4|Oe[t[8]]:255})),n}const $f=(t,e)=>t<255?e(t):"";function _f(t){var e=yf(t)?mf:gf;return t?"#"+e(t.r)+e(t.g)+e(t.b)+$f(t.a,e):void 0}const wf=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function js(t,e,n){const o=e*Math.min(n,1-n),i=(s,l=(s+t/30)%12)=>n-o*Math.max(Math.min(l-3,9-l,1),-1);return[i(0),i(8),i(4)]}function Cf(t,e,n){const o=(i,s=(i+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[o(5),o(3),o(1)]}function kf(t,e,n){const o=js(t,1,.5);let i;for(e+n>1&&(i=1/(e+n),e*=i,n*=i),i=0;i<3;i++)o[i]*=1-e-n,o[i]+=e;return o}function xf(t,e,n,o,i){return t===i?(e-n)/o+(e<n?6:0):e===i?(n-t)/o+2:(t-e)/o+4}function Mi(t){const n=t.r/255,o=t.g/255,i=t.b/255,s=Math.max(n,o,i),l=Math.min(n,o,i),a=(s+l)/2;let d,c,u;return s!==l&&(u=s-l,c=a>.5?u/(2-s-l):u/(s+l),d=xf(n,o,i,u,s),d=d*60+.5),[d|0,c||0,a]}function Di(t,e,n,o){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,o)).map(yt)}function Ei(t,e,n){return Di(js,t,e,n)}function Sf(t,e,n){return Di(kf,t,e,n)}function vf(t,e,n){return Di(Cf,t,e,n)}function Ws(t){return(t%360+360)%360}function Mf(t){const e=wf.exec(t);let n=255,o;if(!e)return;e[5]!==o&&(n=e[6]?hn(+e[5]):yt(+e[5]));const i=Ws(+e[2]),s=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?o=Sf(i,s,l):e[1]==="hsv"?o=vf(i,s,l):o=Ei(i,s,l),{r:o[0],g:o[1],b:o[2],a:n}}function Df(t,e){var n=Mi(t);n[0]=Ws(n[0]+e),n=Ei(n),t.r=n[0],t.g=n[1],t.b=n[2]}function Ef(t){if(!t)return;const e=Mi(t),n=e[0],o=Hs(e[1]),i=Hs(e[2]);return t.a<255?`hsla(${n}, ${o}%, ${i}%, ${Je(t.a)})`:`hsl(${n}, ${o}%, ${i}%)`}const Ys={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"},Us={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"};function Bf(){const t={},e=Object.keys(Us),n=Object.keys(Ys);let o,i,s,l,a;for(o=0;o<e.length;o++){for(l=a=e[o],i=0;i<n.length;i++)s=n[i],a=a.replace(s,Ys[s]);s=parseInt(Us[l],16),t[a]=[s>>16&255,s>>8&255,s&255]}return t}let oo;function Vf(t){oo||(oo=Bf(),oo.transparent=[0,0,0,0]);const e=oo[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const Pf=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Ff(t){const e=Pf.exec(t);let n=255,o,i,s;if(e){if(e[7]!==o){const l=+e[7];n=e[8]?hn(l):gt(l*255,0,255)}return o=+e[1],i=+e[3],s=+e[5],o=255&(e[2]?hn(o):gt(o,0,255)),i=255&(e[4]?hn(i):gt(i,0,255)),s=255&(e[6]?hn(s):gt(s,0,255)),{r:o,g:i,b:s,a:n}}}function Rf(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Je(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const Bi=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,qt=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Nf(t,e,n){const o=qt(Je(t.r)),i=qt(Je(t.g)),s=qt(Je(t.b));return{r:yt(Bi(o+n*(qt(Je(e.r))-o))),g:yt(Bi(i+n*(qt(Je(e.g))-i))),b:yt(Bi(s+n*(qt(Je(e.b))-s))),a:t.a+n*(e.a-t.a)}}function io(t,e,n){if(t){let o=Mi(t);o[e]=Math.max(0,Math.min(o[e]+o[e]*n,e===0?360:1)),o=Ei(o),t.r=o[0],t.g=o[1],t.b=o[2]}}function Gs(t,e){return t&&Object.assign(e||{},t)}function qs(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=yt(t[3]))):(e=Gs(t,{r:0,g:0,b:0,a:1}),e.a=yt(e.a)),e}function Af(t){return t.charAt(0)==="r"?Ff(t):Mf(t)}class pn{constructor(e){if(e instanceof pn)return e;const n=typeof e;let o;n==="object"?o=qs(e):n==="string"&&(o=bf(e)||Vf(e)||Af(e)),this._rgb=o,this._valid=!!o}get valid(){return this._valid}get rgb(){var e=Gs(this._rgb);return e&&(e.a=Je(e.a)),e}set rgb(e){this._rgb=qs(e)}rgbString(){return this._valid?Rf(this._rgb):void 0}hexString(){return this._valid?_f(this._rgb):void 0}hslString(){return this._valid?Ef(this._rgb):void 0}mix(e,n){if(e){const o=this.rgb,i=e.rgb;let s;const l=n===s?.5:n,a=2*l-1,d=o.a-i.a,c=((a*d===-1?a:(a+d)/(1+a*d))+1)/2;s=1-c,o.r=255&c*o.r+s*i.r+.5,o.g=255&c*o.g+s*i.g+.5,o.b=255&c*o.b+s*i.b+.5,o.a=l*o.a+(1-l)*i.a,this.rgb=o}return this}interpolate(e,n){return e&&(this._rgb=Nf(this._rgb,e._rgb,n)),this}clone(){return new pn(this.rgb)}alpha(e){return this._rgb.a=yt(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=fn(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return io(this._rgb,2,e),this}darken(e){return io(this._rgb,2,-e),this}saturate(e){return io(this._rgb,1,e),this}desaturate(e){return io(this._rgb,1,-e),this}rotate(e){return Df(this._rgb,e),this}}/*!
15
15
  * Chart.js v4.4.2
16
16
  * https://www.chartjs.org
17
17
  * (c) 2024 Chart.js Contributors
18
18
  * Released under the MIT License
19
- */function Je(){}const bf=(()=>{let t=0;return()=>t++})();function Z(t){return t===null||typeof t>"u"}function oe(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function q(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function de(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ee(t,e){return de(t)?t:e}function Y(t,e){return typeof t>"u"?e:t}const $f=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,Tr=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ne(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function ee(t,e,n,o){let i,r,l;if(oe(t))if(r=t.length,o)for(i=r-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<r;i++)e.call(n,t[i],i);else if(q(t))for(l=Object.keys(t),r=l.length,i=0;i<r;i++)e.call(n,t[l[i]],l[i])}function oo(t,e){let n,o,i,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(i=t[n],r=e[n],i.datasetIndex!==r.datasetIndex||i.index!==r.index)return!1;return!0}function io(t){if(oe(t))return t.map(io);if(q(t)){const e=Object.create(null),n=Object.keys(t),o=n.length;let i=0;for(;i<o;++i)e[n[i]]=io(t[n[i]]);return e}return t}function Lr(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function _f(t,e,n,o){if(!Lr(t))return;const i=e[t],r=n[t];q(i)&&q(r)?un(i,r,o):e[t]=io(r)}function un(t,e,n){const o=oe(e)?e:[e],i=o.length;if(!q(t))return t;n=n||{};const r=n.merger||_f;let l;for(let a=0;a<i;++a){if(l=o[a],!q(l))continue;const d=Object.keys(l);for(let c=0,u=d.length;c<u;++c)r(d[c],t,l,n)}return t}function fn(t,e){return un(t,e,{merger:wf})}function wf(t,e,n){if(!Lr(t))return;const o=e[t],i=n[t];q(o)&&q(i)?fn(o,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=io(i))}const zr={"":t=>t,x:t=>t.x,y:t=>t.y};function Cf(t){const e=t.split("."),n=[];let o="";for(const i of e)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function xf(t){const e=Cf(t);return n=>{for(const o of e){if(o==="")break;n=n&&n[o]}return n}}function gt(t,e){return(zr[e]||(zr[e]=xf(e)))(t)}function vi(t){return t.charAt(0).toUpperCase()+t.slice(1)}const hn=t=>typeof t<"u",yt=t=>typeof t=="function",Hr=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function kf(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const ie=Math.PI,se=2*ie,Sf=se+ie,so=Number.POSITIVE_INFINITY,vf=ie/180,ue=ie/2,Dt=ie/4,jr=ie*2/3,bt=Math.log10,Ye=Math.sign;function pn(t,e,n){return Math.abs(t-e)<n}function Wr(t){const e=Math.round(t);t=pn(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(bt(t))),o=t/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function Mf(t){const e=[],n=Math.sqrt(t);let o;for(o=1;o<n;o++)t%o===0&&(e.push(o),e.push(t/o));return n===(n|0)&&e.push(n),e.sort((i,r)=>i-r).pop(),e}function Ut(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Df(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function Yr(t,e,n){let o,i,r;for(o=0,i=t.length;o<i;o++)r=t[o][n],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}function Ie(t){return t*(ie/180)}function Mi(t){return t*(180/ie)}function Ur(t){if(!de(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Gr(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o);let r=Math.atan2(o,n);return r<-.5*ie&&(r+=se),{angle:r,distance:i}}function Di(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ef(t,e){return(t-e+Sf)%se-ie}function Be(t){return(t%se+se)%se}function mn(t,e,n,o){const i=Be(t),r=Be(e),l=Be(n),a=Be(r-i),d=Be(l-i),c=Be(i-r),u=Be(i-l);return i===r||i===l||o&&r===l||a>d&&c<u}function me(t,e,n){return Math.max(e,Math.min(n,t))}function Bf(t){return me(t,-32768,32767)}function Qe(t,e,n,o=1e-6){return t>=Math.min(e,n)-o&&t<=Math.max(e,n)+o}function Ei(t,e,n){n=n||(l=>t[l]<e);let o=t.length-1,i=0,r;for(;o-i>1;)r=i+o>>1,n(r)?i=r:o=r;return{lo:i,hi:o}}const et=(t,e,n,o)=>Ei(t,n,o?i=>{const r=t[i][e];return r<n||r===n&&t[i+1][e]===n}:i=>t[i][e]<n),Vf=(t,e,n)=>Ei(t,n,o=>t[o][e]>=n);function Pf(t,e,n){let o=0,i=t.length;for(;o<i&&t[o]<e;)o++;for(;i>o&&t[i-1]>n;)i--;return o>0||i<t.length?t.slice(o,i):t}const qr=["push","pop","shift","splice","unshift"];function Rf(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),qr.forEach(n=>{const o="_onData"+vi(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...r){const l=i.apply(this,r);return t._chartjs.listeners.forEach(a=>{typeof a[o]=="function"&&a[o](...r)}),l}})})}function Xr(t,e){const n=t._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(e);i!==-1&&o.splice(i,1),!(o.length>0)&&(qr.forEach(r=>{delete t[r]}),delete t._chartjs)}function Kr(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Zr=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function Jr(t,e){let n=[],o=!1;return function(...i){n=i,o||(o=!0,Zr.call(window,()=>{o=!1,t.apply(e,n)}))}}function Ff(t,e){let n;return function(...o){return e?(clearTimeout(n),n=setTimeout(t,e,o)):t.apply(this,o),e}}const Bi=t=>t==="start"?"left":t==="end"?"right":"center",ye=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,Nf=(t,e,n,o)=>t===(o?"left":"right")?n:t==="center"?(e+n)/2:e;function Qr(t,e,n){const o=e.length;let i=0,r=o;if(t._sorted){const{iScale:l,_parsed:a}=t,d=l.axis,{min:c,max:u,minDefined:f,maxDefined:h}=l.getUserBounds();f&&(i=me(Math.min(et(a,d,c).lo,n?o:et(e,d,l.getPixelForValue(c)).lo),0,o-1)),h?r=me(Math.max(et(a,l.axis,u,!0).hi+1,n?0:et(e,d,l.getPixelForValue(u),!0).hi+1),i,o)-i:r=o-i}return{start:i,count:r}}function el(t){const{xScale:e,yScale:n,_scaleRanges:o}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!o)return t._scaleRanges=i,!0;const r=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,i),r}const ro=t=>t===0||t===1,tl=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*se/n)),nl=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*se/n)+1,gn={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=>-Math.cos(t*ue)+1,easeOutSine:t=>Math.sin(t*ue),easeInOutSine:t=>-.5*(Math.cos(ie*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>ro(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),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=>ro(t)?t:tl(t,.075,.3),easeOutElastic:t=>ro(t)?t:nl(t,.075,.3),easeInOutElastic(t){return ro(t)?t:t<.5?.5*tl(t*2,.1125,.45):.5+.5*nl(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-gn.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?gn.easeInBounce(t*2)*.5:gn.easeOutBounce(t*2-1)*.5+.5};function Vi(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function ol(t){return Vi(t)?t:new cn(t)}function Pi(t){return Vi(t)?t:new cn(t).saturate(.5).darken(.1).hexString()}const Af=["x","y","borderWidth","radius","tension"],Of=["color","borderColor","backgroundColor"];function If(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:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Of},numbers:{type:"number",properties:Af}}),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:e=>e|0}}}})}function Tf(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const il=new Map;function Lf(t,e){e=e||{};const n=t+JSON.stringify(e);let o=il.get(n);return o||(o=new Intl.NumberFormat(t,e),il.set(n,o)),o}function yn(t,e,n){return Lf(e,n).format(t)}const sl={values(t){return oe(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const o=this.chart.options.locale;let i,r=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),r=zf(t,n)}const l=bt(Math.abs(r)),a=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),d={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(d,this.options.ticks.format),yn(t,o,d)},logarithmic(t,e,n){if(t===0)return"0";const o=n[e].significand||t/Math.pow(10,Math.floor(bt(t)));return[1,2,3,5,10,15].includes(o)||e>.8*n.length?sl.numeric.call(this,t,e,n):""}};function zf(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var lo={formatters:sl};function Hf(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:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.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:lo.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:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Et=Object.create(null),Ri=Object.create(null);function bn(t,e){if(!e)return t;const n=e.split(".");for(let o=0,i=n.length;o<i;++o){const r=n[o];t=t[r]||(t[r]=Object.create(null))}return t}function Fi(t,e,n){return typeof e=="string"?un(bn(t,e),n):un(bn(t,""),e)}class jf{constructor(e,n){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=o=>o.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=(o,i)=>Pi(i.backgroundColor),this.hoverBorderColor=(o,i)=>Pi(i.borderColor),this.hoverColor=(o,i)=>Pi(i.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(e),this.apply(n)}set(e,n){return Fi(this,e,n)}get(e){return bn(this,e)}describe(e,n){return Fi(Ri,e,n)}override(e,n){return Fi(Et,e,n)}route(e,n,o,i){const r=bn(this,e),l=bn(this,o),a="_"+n;Object.defineProperties(r,{[a]:{value:r[n],writable:!0},[n]:{enumerable:!0,get(){const d=this[a],c=l[i];return q(d)?Object.assign({},c,d):Y(d,c)},set(d){this[a]=d}}})}apply(e){e.forEach(n=>n(this))}}var ce=new jf({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[If,Tf,Hf]);function Wf(t){return!t||Z(t.size)||Z(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function ao(t,e,n,o,i){let r=e[i];return r||(r=e[i]=t.measureText(i).width,n.push(i)),r>o&&(o=r),o}function Yf(t,e,n,o){o=o||{};let i=o.data=o.data||{},r=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(i=o.data={},r=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let l=0;const a=n.length;let d,c,u,f,h;for(d=0;d<a;d++)if(f=n[d],f!=null&&!oe(f))l=ao(t,i,r,l,f);else if(oe(f))for(c=0,u=f.length;c<u;c++)h=f[c],h!=null&&!oe(h)&&(l=ao(t,i,r,l,h));t.restore();const p=r.length/2;if(p>n.length){for(d=0;d<p;d++)delete i[r[d]];r.splice(0,p)}return l}function Bt(t,e,n){const o=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*o)/o+i}function rl(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function Ni(t,e,n,o){ll(t,e,n,o,null)}function ll(t,e,n,o,i){let r,l,a,d,c,u,f,h;const p=e.pointStyle,m=e.rotation,g=e.radius;let y=(m||0)*vf;if(p&&typeof p=="object"&&(r=p.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){t.save(),t.translate(n,o),t.rotate(y),t.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),t.restore();return}if(!(isNaN(g)||g<=0)){switch(t.beginPath(),p){default:i?t.ellipse(n,o,i/2,g,0,0,se):t.arc(n,o,g,0,se),t.closePath();break;case"triangle":u=i?i/2:g,t.moveTo(n+Math.sin(y)*u,o-Math.cos(y)*g),y+=jr,t.lineTo(n+Math.sin(y)*u,o-Math.cos(y)*g),y+=jr,t.lineTo(n+Math.sin(y)*u,o-Math.cos(y)*g),t.closePath();break;case"rectRounded":c=g*.516,d=g-c,l=Math.cos(y+Dt)*d,f=Math.cos(y+Dt)*(i?i/2-c:d),a=Math.sin(y+Dt)*d,h=Math.sin(y+Dt)*(i?i/2-c:d),t.arc(n-f,o-a,c,y-ie,y-ue),t.arc(n+h,o-l,c,y-ue,y),t.arc(n+f,o+a,c,y,y+ue),t.arc(n-h,o+l,c,y+ue,y+ie),t.closePath();break;case"rect":if(!m){d=Math.SQRT1_2*g,u=i?i/2:d,t.rect(n-u,o-d,2*u,2*d);break}y+=Dt;case"rectRot":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+h,o-l),t.lineTo(n+f,o+a),t.lineTo(n-h,o+l),t.closePath();break;case"crossRot":y+=Dt;case"cross":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l);break;case"star":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l),y+=Dt,f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l);break;case"line":l=i?i/2:Math.cos(y)*g,a=Math.sin(y)*g,t.moveTo(n-l,o-a),t.lineTo(n+l,o+a);break;case"dash":t.moveTo(n,o),t.lineTo(n+Math.cos(y)*(i?i/2:g),o+Math.sin(y)*g);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function tt(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function co(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function uo(t){t.restore()}function Uf(t,e,n,o,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const r=(e.x+n.x)/2;t.lineTo(r,e.y),t.lineTo(r,n.y)}else i==="after"!=!!o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function Gf(t,e,n,o){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function qf(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Z(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function Xf(t,e,n,o,i){if(i.strikethrough||i.underline){const r=t.measureText(o),l=e-r.actualBoundingBoxLeft,a=e+r.actualBoundingBoxRight,d=n-r.actualBoundingBoxAscent,c=n+r.actualBoundingBoxDescent,u=i.strikethrough?(d+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(l,u),t.lineTo(a,u),t.stroke()}}function Kf(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Vt(t,e,n,o,i,r={}){const l=oe(e)?e:[e],a=r.strokeWidth>0&&r.strokeColor!=="";let d,c;for(t.save(),t.font=i.string,qf(t,r),d=0;d<l.length;++d)c=l[d],r.backdrop&&Kf(t,r.backdrop),a&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),Z(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(c,n,o,r.maxWidth)),t.fillText(c,n,o,r.maxWidth),Xf(t,n,o,c,r),o+=Number(i.lineHeight);t.restore()}function $n(t,e){const{x:n,y:o,w:i,h:r,radius:l}=e;t.arc(n+l.topLeft,o+l.topLeft,l.topLeft,1.5*ie,ie,!0),t.lineTo(n,o+r-l.bottomLeft),t.arc(n+l.bottomLeft,o+r-l.bottomLeft,l.bottomLeft,ie,ue,!0),t.lineTo(n+i-l.bottomRight,o+r),t.arc(n+i-l.bottomRight,o+r-l.bottomRight,l.bottomRight,ue,0,!0),t.lineTo(n+i,o+l.topRight),t.arc(n+i-l.topRight,o+l.topRight,l.topRight,0,-ue,!0),t.lineTo(n+l.topLeft,o)}const Zf=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Jf=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Qf(t,e){const n=(""+t).match(Zf);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const eh=t=>+t||0;function Ai(t,e){const n={},o=q(e),i=o?Object.keys(e):e,r=q(t)?o?l=>Y(t[l],t[e[l]]):l=>t[l]:()=>t;for(const l of i)n[l]=eh(r(l));return n}function al(t){return Ai(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Pt(t){return Ai(t,["topLeft","topRight","bottomLeft","bottomRight"])}function be(t){const e=al(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function he(t,e){t=t||{},e=e||ce.font;let n=Y(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let o=Y(t.style,e.style);o&&!(""+o).match(Jf)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:Y(t.family,e.family),lineHeight:Qf(Y(t.lineHeight,e.lineHeight),n),size:n,style:o,weight:Y(t.weight,e.weight),string:""};return i.string=Wf(i),i}function _n(t,e,n,o){let i=!0,r,l,a;for(r=0,l=t.length;r<l;++r)if(a=t[r],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),i=!1),n!==void 0&&oe(a)&&(a=a[n%a.length],i=!1),a!==void 0))return o&&!i&&(o.cacheable=!1),a}function th(t,e,n){const{min:o,max:i}=t,r=Tr(e,(i-o)/2),l=(a,d)=>n&&a===0?0:a+d;return{min:l(o,-Math.abs(r)),max:l(i,r)}}function $t(t,e){return Object.assign(Object.create(t),e)}function Oi(t,e=[""],n,o,i=()=>t[0]){const r=n||t;typeof o>"u"&&(o=hl("_fallback",t));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:o,_getTarget:i,override:a=>Oi([a,...t],e,r,o)};return new Proxy(l,{deleteProperty(a,d){return delete a[d],delete a._keys,delete t[0][d],!0},get(a,d){return cl(a,d,()=>dh(d,e,t,a))},getOwnPropertyDescriptor(a,d){return Reflect.getOwnPropertyDescriptor(a._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,d){return pl(a).includes(d)},ownKeys(a){return pl(a)},set(a,d,c){const u=a._storage||(a._storage=i());return a[d]=u[d]=c,delete a._keys,!0}})}function Gt(t,e,n,o){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:dl(t,o),setContext:r=>Gt(t,r,n,o),override:r=>Gt(t.override(r),e,n,o)};return new Proxy(i,{deleteProperty(r,l){return delete r[l],delete t[l],!0},get(r,l,a){return cl(r,l,()=>oh(r,l,a))},getOwnPropertyDescriptor(r,l){return r._descriptors.allKeys?Reflect.has(t,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,l)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(r,l){return Reflect.has(t,l)},ownKeys(){return Reflect.ownKeys(t)},set(r,l,a){return t[l]=a,delete r[l],!0}})}function dl(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:o=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:o,isScriptable:yt(n)?n:()=>n,isIndexable:yt(o)?o:()=>o}}const nh=(t,e)=>t?t+vi(e):e,Ii=(t,e)=>q(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function cl(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const o=n();return t[e]=o,o}function oh(t,e,n){const{_proxy:o,_context:i,_subProxy:r,_descriptors:l}=t;let a=o[e];return yt(a)&&l.isScriptable(e)&&(a=ih(e,a,t,n)),oe(a)&&a.length&&(a=sh(e,a,t,l.isIndexable)),Ii(e,a)&&(a=Gt(a,i,r&&r[e],l)),a}function ih(t,e,n,o){const{_proxy:i,_context:r,_subProxy:l,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let d=e(r,l||o);return a.delete(t),Ii(t,d)&&(d=Ti(i._scopes,i,t,d)),d}function sh(t,e,n,o){const{_proxy:i,_context:r,_subProxy:l,_descriptors:a}=n;if(typeof r.index<"u"&&o(t))return e[r.index%e.length];if(q(e[0])){const d=e,c=i._scopes.filter(u=>u!==d);e=[];for(const u of d){const f=Ti(c,i,t,u);e.push(Gt(f,r,l&&l[t],a))}}return e}function ul(t,e,n){return yt(t)?t(e,n):t}const rh=(t,e)=>t===!0?e:typeof t=="string"?gt(e,t):void 0;function lh(t,e,n,o,i){for(const r of e){const l=rh(n,r);if(l){t.add(l);const a=ul(l._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==o)return a}else if(l===!1&&typeof o<"u"&&n!==o)return null}return!1}function Ti(t,e,n,o){const i=e._rootScopes,r=ul(e._fallback,n,o),l=[...t,...i],a=new Set;a.add(o);let d=fl(a,l,n,r||n,o);return d===null||typeof r<"u"&&r!==n&&(d=fl(a,l,r,d,o),d===null)?!1:Oi(Array.from(a),[""],i,r,()=>ah(e,n,o))}function fl(t,e,n,o,i){for(;n;)n=lh(t,e,n,o,i);return n}function ah(t,e,n){const o=t._getTarget();e in o||(o[e]={});const i=o[e];return oe(i)&&q(n)?n:i||{}}function dh(t,e,n,o){let i;for(const r of e)if(i=hl(nh(r,t),n),typeof i<"u")return Ii(t,i)?Ti(n,o,t,i):i}function hl(t,e){for(const n of e){if(!n)continue;const o=n[t];if(typeof o<"u")return o}}function pl(t){let e=t._keys;return e||(e=t._keys=ch(t._scopes)),e}function ch(t){const e=new Set;for(const n of t)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(o);return Array.from(e)}function ml(t,e,n,o){const{iScale:i}=t,{key:r="r"}=this._parsing,l=new Array(o);let a,d,c,u;for(a=0,d=o;a<d;++a)c=a+n,u=e[c],l[a]={r:i.parse(gt(u,r),c)};return l}const uh=Number.EPSILON||1e-14,qt=(t,e)=>e<t.length&&!t[e].skip&&t[e],gl=t=>t==="x"?"y":"x";function fh(t,e,n,o){const i=t.skip?e:t,r=e,l=n.skip?e:n,a=Di(r,i),d=Di(l,r);let c=a/(a+d),u=d/(a+d);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=o*c,h=o*u;return{previous:{x:r.x-f*(l.x-i.x),y:r.y-f*(l.y-i.y)},next:{x:r.x+h*(l.x-i.x),y:r.y+h*(l.y-i.y)}}}function hh(t,e,n){const o=t.length;let i,r,l,a,d,c=qt(t,0);for(let u=0;u<o-1;++u)if(d=c,c=qt(t,u+1),!(!d||!c)){if(pn(e[u],0,uh)){n[u]=n[u+1]=0;continue}i=n[u]/e[u],r=n[u+1]/e[u],a=Math.pow(i,2)+Math.pow(r,2),!(a<=9)&&(l=3/Math.sqrt(a),n[u]=i*l*e[u],n[u+1]=r*l*e[u])}}function ph(t,e,n="x"){const o=gl(n),i=t.length;let r,l,a,d=qt(t,0);for(let c=0;c<i;++c){if(l=a,a=d,d=qt(t,c+1),!a)continue;const u=a[n],f=a[o];l&&(r=(u-l[n])/3,a[`cp1${n}`]=u-r,a[`cp1${o}`]=f-r*e[c]),d&&(r=(d[n]-u)/3,a[`cp2${n}`]=u+r,a[`cp2${o}`]=f+r*e[c])}}function mh(t,e="x"){const n=gl(e),o=t.length,i=Array(o).fill(0),r=Array(o);let l,a,d,c=qt(t,0);for(l=0;l<o;++l)if(a=d,d=c,c=qt(t,l+1),!!d){if(c){const u=c[e]-d[e];i[l]=u!==0?(c[n]-d[n])/u:0}r[l]=a?c?Ye(i[l-1])!==Ye(i[l])?0:(i[l-1]+i[l])/2:i[l-1]:i[l]}hh(t,i,r),ph(t,r,e)}function fo(t,e,n){return Math.max(Math.min(t,n),e)}function gh(t,e){let n,o,i,r,l,a=tt(t[0],e);for(n=0,o=t.length;n<o;++n)l=r,r=a,a=n<o-1&&tt(t[n+1],e),r&&(i=t[n],l&&(i.cp1x=fo(i.cp1x,e.left,e.right),i.cp1y=fo(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=fo(i.cp2x,e.left,e.right),i.cp2y=fo(i.cp2y,e.top,e.bottom)))}function yh(t,e,n,o,i){let r,l,a,d;if(e.spanGaps&&(t=t.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")mh(t,i);else{let c=o?t[t.length-1]:t[0];for(r=0,l=t.length;r<l;++r)a=t[r],d=fh(c,a,t[Math.min(r+1,l-(o?0:1))%l],e.tension),a.cp1x=d.previous.x,a.cp1y=d.previous.y,a.cp2x=d.next.x,a.cp2y=d.next.y,c=a}e.capBezierPoints&&gh(t,n)}function Li(){return typeof window<"u"&&typeof document<"u"}function zi(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function ho(t,e,n){let o;return typeof t=="string"?(o=parseInt(t,10),t.indexOf("%")!==-1&&(o=o/100*e.parentNode[n])):o=t,o}const po=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function bh(t,e){return po(t).getPropertyValue(e)}const $h=["top","right","bottom","left"];function Rt(t,e,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const r=$h[i];o[r]=parseFloat(t[e+"-"+r+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const _h=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function wh(t,e){const n=t.touches,o=n&&n.length?n[0]:t,{offsetX:i,offsetY:r}=o;let l=!1,a,d;if(_h(i,r,t.target))a=i,d=r;else{const c=e.getBoundingClientRect();a=o.clientX-c.left,d=o.clientY-c.top,l=!0}return{x:a,y:d,box:l}}function Ft(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:o}=e,i=po(n),r=i.boxSizing==="border-box",l=Rt(i,"padding"),a=Rt(i,"border","width"),{x:d,y:c,box:u}=wh(t,n),f=l.left+(u&&a.left),h=l.top+(u&&a.top);let{width:p,height:m}=e;return r&&(p-=l.width+a.width,m-=l.height+a.height),{x:Math.round((d-f)/p*n.width/o),y:Math.round((c-h)/m*n.height/o)}}function Ch(t,e,n){let o,i;if(e===void 0||n===void 0){const r=zi(t);if(!r)e=t.clientWidth,n=t.clientHeight;else{const l=r.getBoundingClientRect(),a=po(r),d=Rt(a,"border","width"),c=Rt(a,"padding");e=l.width-c.width-d.width,n=l.height-c.height-d.height,o=ho(a.maxWidth,r,"clientWidth"),i=ho(a.maxHeight,r,"clientHeight")}}return{width:e,height:n,maxWidth:o||so,maxHeight:i||so}}const mo=t=>Math.round(t*10)/10;function xh(t,e,n,o){const i=po(t),r=Rt(i,"margin"),l=ho(i.maxWidth,t,"clientWidth")||so,a=ho(i.maxHeight,t,"clientHeight")||so,d=Ch(t,e,n);let{width:c,height:u}=d;if(i.boxSizing==="content-box"){const h=Rt(i,"border","width"),p=Rt(i,"padding");c-=p.width+h.width,u-=p.height+h.height}return c=Math.max(0,c-r.width),u=Math.max(0,o?c/o:u-r.height),c=mo(Math.min(c,l,d.maxWidth)),u=mo(Math.min(u,a,d.maxHeight)),c&&!u&&(u=mo(c/2)),(e!==void 0||n!==void 0)&&o&&d.height&&u>d.height&&(u=d.height,c=mo(Math.floor(u*o))),{width:c,height:u}}function yl(t,e,n){const o=e||1,i=Math.floor(t.height*o),r=Math.floor(t.width*o);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const l=t.canvas;return l.style&&(n||!l.style.height&&!l.style.width)&&(l.style.height=`${t.height}px`,l.style.width=`${t.width}px`),t.currentDevicePixelRatio!==o||l.height!==i||l.width!==r?(t.currentDevicePixelRatio=o,l.height=i,l.width=r,t.ctx.setTransform(o,0,0,o,0,0),!0):!1}const kh=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Li()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function bl(t,e){const n=bh(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Nt(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Sh(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:o==="middle"?n<.5?t.y:e.y:o==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function vh(t,e,n,o){const i={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},l=Nt(t,i,n),a=Nt(i,r,n),d=Nt(r,e,n),c=Nt(l,a,n),u=Nt(a,d,n);return Nt(c,u,n)}const Mh=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},Dh=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Xt(t,e,n){return t?Mh(e,n):Dh()}function $l(t,e){let n,o;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)}function _l(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function wl(t){return t==="angle"?{between:mn,compare:Ef,normalize:Be}:{between:Qe,compare:(e,n)=>e-n,normalize:e=>e}}function Cl({start:t,end:e,count:n,loop:o,style:i}){return{start:t%n,end:e%n,loop:o&&(e-t+1)%n===0,style:i}}function Eh(t,e,n){const{property:o,start:i,end:r}=n,{between:l,normalize:a}=wl(o),d=e.length;let{start:c,end:u,loop:f}=t,h,p;if(f){for(c+=d,u+=d,h=0,p=d;h<p&&l(a(e[c%d][o]),i,r);++h)c--,u--;c%=d,u%=d}return u<c&&(u+=d),{start:c,end:u,loop:f,style:t.style}}function xl(t,e,n){if(!n)return[t];const{property:o,start:i,end:r}=n,l=e.length,{compare:a,between:d,normalize:c}=wl(o),{start:u,end:f,loop:h,style:p}=Eh(t,e,n),m=[];let g=!1,y=null,b,$,w;const S=()=>d(i,w,b)&&a(i,w)!==0,x=()=>a(r,b)===0||d(r,w,b),V=()=>g||S(),D=()=>!g||x();for(let F=u,N=u;F<=f;++F)$=e[F%l],!$.skip&&(b=c($[o]),b!==w&&(g=d(b,i,r),y===null&&V()&&(y=a(b,i)===0?F:N),y!==null&&D()&&(m.push(Cl({start:y,end:F,loop:h,count:l,style:p})),y=null),N=F,w=b));return y!==null&&m.push(Cl({start:y,end:f,loop:h,count:l,style:p})),m}function kl(t,e){const n=[],o=t.segments;for(let i=0;i<o.length;i++){const r=xl(o[i],t.points,e);r.length&&n.push(...r)}return n}function Bh(t,e,n,o){let i=0,r=e-1;if(n&&!o)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(r+=i);r>i&&t[r%e].skip;)r--;return r%=e,{start:i,end:r}}function Vh(t,e,n,o){const i=t.length,r=[];let l=e,a=t[e],d;for(d=e+1;d<=n;++d){const c=t[d%i];c.skip||c.stop?a.skip||(o=!1,r.push({start:e%i,end:(d-1)%i,loop:o}),e=l=c.stop?d:null):(l=d,a.skip&&(e=d)),a=c}return l!==null&&r.push({start:e%i,end:l%i,loop:o}),r}function Ph(t,e){const n=t.points,o=t.options.spanGaps,i=n.length;if(!i)return[];const r=!!t._loop,{start:l,end:a}=Bh(n,i,r,o);if(o===!0)return Sl(t,[{start:l,end:a,loop:r}],n,e);const d=a<l?a+i:a,c=!!t._fullLoop&&l===0&&a===i-1;return Sl(t,Vh(n,l,d,c),n,e)}function Sl(t,e,n,o){return!o||!o.setContext||!n?e:Rh(t,e,n,o)}function Rh(t,e,n,o){const i=t._chart.getContext(),r=vl(t.options),{_datasetIndex:l,options:{spanGaps:a}}=t,d=n.length,c=[];let u=r,f=e[0].start,h=f;function p(m,g,y,b){const $=a?-1:1;if(m!==g){for(m+=d;n[m%d].skip;)m-=$;for(;n[g%d].skip;)g+=$;m%d!==g%d&&(c.push({start:m%d,end:g%d,loop:y,style:b}),u=b,f=g%d)}}for(const m of e){f=a?f:m.start;let g=n[f%d],y;for(h=f+1;h<=m.end;h++){const b=n[h%d];y=vl(o.setContext($t(i,{type:"segment",p0:g,p1:b,p0DataIndex:(h-1)%d,p1DataIndex:h%d,datasetIndex:l}))),Fh(y,u)&&p(f,h-1,m.loop,u),g=b,u=y}f<h-1&&p(f,h-1,m.loop,u)}return c}function vl(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Fh(t,e){if(!e)return!1;const n=[],o=function(i,r){return Vi(r)?(n.includes(r)||n.push(r),n.indexOf(r)):r};return JSON.stringify(t,o)!==JSON.stringify(e,o)}/*!
19
+ */function Qe(){}const Of=(()=>{let t=0;return()=>t++})();function J(t){return t===null||typeof t>"u"}function oe(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function q(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function de(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Be(t,e){return de(t)?t:e}function Y(t,e){return typeof t>"u"?e:t}const If=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,Xs=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ne(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function ee(t,e,n,o){let i,s,l;if(oe(t))if(s=t.length,o)for(i=s-1;i>=0;i--)e.call(n,t[i],i);else for(i=0;i<s;i++)e.call(n,t[i],i);else if(q(t))for(l=Object.keys(t),s=l.length,i=0;i<s;i++)e.call(n,t[l[i]],l[i])}function ro(t,e){let n,o,i,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(i=t[n],s=e[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function so(t){if(oe(t))return t.map(so);if(q(t)){const e=Object.create(null),n=Object.keys(t),o=n.length;let i=0;for(;i<o;++i)e[n[i]]=so(t[n[i]]);return e}return t}function Ks(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Tf(t,e,n,o){if(!Ks(t))return;const i=e[t],s=n[t];q(i)&&q(s)?mn(i,s,o):e[t]=so(s)}function mn(t,e,n){const o=oe(e)?e:[e],i=o.length;if(!q(t))return t;n=n||{};const s=n.merger||Tf;let l;for(let a=0;a<i;++a){if(l=o[a],!q(l))continue;const d=Object.keys(l);for(let c=0,u=d.length;c<u;++c)s(d[c],t,l,n)}return t}function gn(t,e){return mn(t,e,{merger:zf})}function zf(t,e,n){if(!Ks(t))return;const o=e[t],i=n[t];q(o)&&q(i)?gn(o,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=so(i))}const Zs={"":t=>t,x:t=>t.x,y:t=>t.y};function Lf(t){const e=t.split("."),n=[];let o="";for(const i of e)o+=i,o.endsWith("\\")?o=o.slice(0,-1)+".":(n.push(o),o="");return n}function Hf(t){const e=Lf(t);return n=>{for(const o of e){if(o==="")break;n=n&&n[o]}return n}}function bt(t,e){return(Zs[e]||(Zs[e]=Hf(e)))(t)}function Vi(t){return t.charAt(0).toUpperCase()+t.slice(1)}const yn=t=>typeof t<"u",$t=t=>typeof t=="function",Js=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function jf(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const ie=Math.PI,re=2*ie,Wf=re+ie,lo=Number.POSITIVE_INFINITY,Yf=ie/180,ue=ie/2,Bt=ie/4,Qs=ie*2/3,_t=Math.log10,Ue=Math.sign;function bn(t,e,n){return Math.abs(t-e)<n}function el(t){const e=Math.round(t);t=bn(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(_t(t))),o=t/n;return(o<=1?1:o<=2?2:o<=5?5:10)*n}function Uf(t){const e=[],n=Math.sqrt(t);let o;for(o=1;o<n;o++)t%o===0&&(e.push(o),e.push(t/o));return n===(n|0)&&e.push(n),e.sort((i,s)=>i-s).pop(),e}function Xt(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Gf(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function tl(t,e,n){let o,i,s;for(o=0,i=t.length;o<i;o++)s=t[o][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Te(t){return t*(ie/180)}function Pi(t){return t*(180/ie)}function nl(t){if(!de(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function ol(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o);let s=Math.atan2(o,n);return s<-.5*ie&&(s+=re),{angle:s,distance:i}}function Fi(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function qf(t,e){return(t-e+Wf)%re-ie}function Ve(t){return(t%re+re)%re}function $n(t,e,n,o){const i=Ve(t),s=Ve(e),l=Ve(n),a=Ve(s-i),d=Ve(l-i),c=Ve(i-s),u=Ve(i-l);return i===s||i===l||o&&s===l||a>d&&c<u}function ge(t,e,n){return Math.max(e,Math.min(n,t))}function Xf(t){return ge(t,-32768,32767)}function et(t,e,n,o=1e-6){return t>=Math.min(e,n)-o&&t<=Math.max(e,n)+o}function Ri(t,e,n){n=n||(l=>t[l]<e);let o=t.length-1,i=0,s;for(;o-i>1;)s=i+o>>1,n(s)?i=s:o=s;return{lo:i,hi:o}}const tt=(t,e,n,o)=>Ri(t,n,o?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),Kf=(t,e,n)=>Ri(t,n,o=>t[o][e]>=n);function Zf(t,e,n){let o=0,i=t.length;for(;o<i&&t[o]<e;)o++;for(;i>o&&t[i-1]>n;)i--;return o>0||i<t.length?t.slice(o,i):t}const il=["push","pop","shift","splice","unshift"];function Jf(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),il.forEach(n=>{const o="_onData"+Vi(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const l=i.apply(this,s);return t._chartjs.listeners.forEach(a=>{typeof a[o]=="function"&&a[o](...s)}),l}})})}function rl(t,e){const n=t._chartjs;if(!n)return;const o=n.listeners,i=o.indexOf(e);i!==-1&&o.splice(i,1),!(o.length>0)&&(il.forEach(s=>{delete t[s]}),delete t._chartjs)}function sl(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const ll=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function al(t,e){let n=[],o=!1;return function(...i){n=i,o||(o=!0,ll.call(window,()=>{o=!1,t.apply(e,n)}))}}function Qf(t,e){let n;return function(...o){return e?(clearTimeout(n),n=setTimeout(t,e,o)):t.apply(this,o),e}}const Ni=t=>t==="start"?"left":t==="end"?"right":"center",be=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,eh=(t,e,n,o)=>t===(o?"left":"right")?n:t==="center"?(e+n)/2:e;function dl(t,e,n){const o=e.length;let i=0,s=o;if(t._sorted){const{iScale:l,_parsed:a}=t,d=l.axis,{min:c,max:u,minDefined:f,maxDefined:h}=l.getUserBounds();f&&(i=ge(Math.min(tt(a,d,c).lo,n?o:tt(e,d,l.getPixelForValue(c)).lo),0,o-1)),h?s=ge(Math.max(tt(a,l.axis,u,!0).hi+1,n?0:tt(e,d,l.getPixelForValue(u),!0).hi+1),i,o)-i:s=o-i}return{start:i,count:s}}function cl(t){const{xScale:e,yScale:n,_scaleRanges:o}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!o)return t._scaleRanges=i,!0;const s=o.xmin!==e.min||o.xmax!==e.max||o.ymin!==n.min||o.ymax!==n.max;return Object.assign(o,i),s}const ao=t=>t===0||t===1,ul=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*re/n)),fl=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*re/n)+1,_n={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=>-Math.cos(t*ue)+1,easeOutSine:t=>Math.sin(t*ue),easeInOutSine:t=>-.5*(Math.cos(ie*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>ao(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),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=>ao(t)?t:ul(t,.075,.3),easeOutElastic:t=>ao(t)?t:fl(t,.075,.3),easeInOutElastic(t){return ao(t)?t:t<.5?.5*ul(t*2,.1125,.45):.5+.5*fl(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-_n.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?_n.easeInBounce(t*2)*.5:_n.easeOutBounce(t*2-1)*.5+.5};function Ai(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function hl(t){return Ai(t)?t:new pn(t)}function Oi(t){return Ai(t)?t:new pn(t).saturate(.5).darken(.1).hexString()}const th=["x","y","borderWidth","radius","tension"],nh=["color","borderColor","backgroundColor"];function oh(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:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:nh},numbers:{type:"number",properties:th}}),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:e=>e|0}}}})}function ih(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const pl=new Map;function rh(t,e){e=e||{};const n=t+JSON.stringify(e);let o=pl.get(n);return o||(o=new Intl.NumberFormat(t,e),pl.set(n,o)),o}function wn(t,e,n){return rh(e,n).format(t)}const ml={values(t){return oe(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const o=this.chart.options.locale;let i,s=t;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),s=sh(t,n)}const l=_t(Math.abs(s)),a=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),d={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(d,this.options.ticks.format),wn(t,o,d)},logarithmic(t,e,n){if(t===0)return"0";const o=n[e].significand||t/Math.pow(10,Math.floor(_t(t)));return[1,2,3,5,10,15].includes(o)||e>.8*n.length?ml.numeric.call(this,t,e,n):""}};function sh(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var co={formatters:ml};function lh(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:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.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:co.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:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Vt=Object.create(null),Ii=Object.create(null);function Cn(t,e){if(!e)return t;const n=e.split(".");for(let o=0,i=n.length;o<i;++o){const s=n[o];t=t[s]||(t[s]=Object.create(null))}return t}function Ti(t,e,n){return typeof e=="string"?mn(Cn(t,e),n):mn(Cn(t,""),e)}class ah{constructor(e,n){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=o=>o.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=(o,i)=>Oi(i.backgroundColor),this.hoverBorderColor=(o,i)=>Oi(i.borderColor),this.hoverColor=(o,i)=>Oi(i.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(e),this.apply(n)}set(e,n){return Ti(this,e,n)}get(e){return Cn(this,e)}describe(e,n){return Ti(Ii,e,n)}override(e,n){return Ti(Vt,e,n)}route(e,n,o,i){const s=Cn(this,e),l=Cn(this,o),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const d=this[a],c=l[i];return q(d)?Object.assign({},c,d):Y(d,c)},set(d){this[a]=d}}})}apply(e){e.forEach(n=>n(this))}}var ce=new ah({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[oh,ih,lh]);function dh(t){return!t||J(t.size)||J(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function uo(t,e,n,o,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,n.push(i)),s>o&&(o=s),o}function ch(t,e,n,o){o=o||{};let i=o.data=o.data||{},s=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(i=o.data={},s=o.garbageCollect=[],o.font=e),t.save(),t.font=e;let l=0;const a=n.length;let d,c,u,f,h;for(d=0;d<a;d++)if(f=n[d],f!=null&&!oe(f))l=uo(t,i,s,l,f);else if(oe(f))for(c=0,u=f.length;c<u;c++)h=f[c],h!=null&&!oe(h)&&(l=uo(t,i,s,l,h));t.restore();const p=s.length/2;if(p>n.length){for(d=0;d<p;d++)delete i[s[d]];s.splice(0,p)}return l}function Pt(t,e,n){const o=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*o)/o+i}function gl(t,e){e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function zi(t,e,n,o){yl(t,e,n,o,null)}function yl(t,e,n,o,i){let s,l,a,d,c,u,f,h;const p=e.pointStyle,m=e.rotation,g=e.radius;let y=(m||0)*Yf;if(p&&typeof p=="object"&&(s=p.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,o),t.rotate(y),t.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),t.restore();return}if(!(isNaN(g)||g<=0)){switch(t.beginPath(),p){default:i?t.ellipse(n,o,i/2,g,0,0,re):t.arc(n,o,g,0,re),t.closePath();break;case"triangle":u=i?i/2:g,t.moveTo(n+Math.sin(y)*u,o-Math.cos(y)*g),y+=Qs,t.lineTo(n+Math.sin(y)*u,o-Math.cos(y)*g),y+=Qs,t.lineTo(n+Math.sin(y)*u,o-Math.cos(y)*g),t.closePath();break;case"rectRounded":c=g*.516,d=g-c,l=Math.cos(y+Bt)*d,f=Math.cos(y+Bt)*(i?i/2-c:d),a=Math.sin(y+Bt)*d,h=Math.sin(y+Bt)*(i?i/2-c:d),t.arc(n-f,o-a,c,y-ie,y-ue),t.arc(n+h,o-l,c,y-ue,y),t.arc(n+f,o+a,c,y,y+ue),t.arc(n-h,o+l,c,y+ue,y+ie),t.closePath();break;case"rect":if(!m){d=Math.SQRT1_2*g,u=i?i/2:d,t.rect(n-u,o-d,2*u,2*d);break}y+=Bt;case"rectRot":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+h,o-l),t.lineTo(n+f,o+a),t.lineTo(n-h,o+l),t.closePath();break;case"crossRot":y+=Bt;case"cross":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l);break;case"star":f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l),y+=Bt,f=Math.cos(y)*(i?i/2:g),l=Math.cos(y)*g,a=Math.sin(y)*g,h=Math.sin(y)*(i?i/2:g),t.moveTo(n-f,o-a),t.lineTo(n+f,o+a),t.moveTo(n+h,o-l),t.lineTo(n-h,o+l);break;case"line":l=i?i/2:Math.cos(y)*g,a=Math.sin(y)*g,t.moveTo(n-l,o-a),t.lineTo(n+l,o+a);break;case"dash":t.moveTo(n,o),t.lineTo(n+Math.cos(y)*(i?i/2:g),o+Math.sin(y)*g);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function nt(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function fo(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ho(t){t.restore()}function uh(t,e,n,o,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else i==="after"!=!!o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function fh(t,e,n,o){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(o?e.cp1x:e.cp2x,o?e.cp1y:e.cp2y,o?n.cp2x:n.cp1x,o?n.cp2y:n.cp1y,n.x,n.y)}function hh(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),J(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function ph(t,e,n,o,i){if(i.strikethrough||i.underline){const s=t.measureText(o),l=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,d=n-s.actualBoundingBoxAscent,c=n+s.actualBoundingBoxDescent,u=i.strikethrough?(d+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(l,u),t.lineTo(a,u),t.stroke()}}function mh(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function Ft(t,e,n,o,i,s={}){const l=oe(e)?e:[e],a=s.strokeWidth>0&&s.strokeColor!=="";let d,c;for(t.save(),t.font=i.string,hh(t,s),d=0;d<l.length;++d)c=l[d],s.backdrop&&mh(t,s.backdrop),a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),J(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(c,n,o,s.maxWidth)),t.fillText(c,n,o,s.maxWidth),ph(t,n,o,c,s),o+=Number(i.lineHeight);t.restore()}function kn(t,e){const{x:n,y:o,w:i,h:s,radius:l}=e;t.arc(n+l.topLeft,o+l.topLeft,l.topLeft,1.5*ie,ie,!0),t.lineTo(n,o+s-l.bottomLeft),t.arc(n+l.bottomLeft,o+s-l.bottomLeft,l.bottomLeft,ie,ue,!0),t.lineTo(n+i-l.bottomRight,o+s),t.arc(n+i-l.bottomRight,o+s-l.bottomRight,l.bottomRight,ue,0,!0),t.lineTo(n+i,o+l.topRight),t.arc(n+i-l.topRight,o+l.topRight,l.topRight,0,-ue,!0),t.lineTo(n+l.topLeft,o)}const gh=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,yh=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function bh(t,e){const n=(""+t).match(gh);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const $h=t=>+t||0;function Li(t,e){const n={},o=q(e),i=o?Object.keys(e):e,s=q(t)?o?l=>Y(t[l],t[e[l]]):l=>t[l]:()=>t;for(const l of i)n[l]=$h(s(l));return n}function bl(t){return Li(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Rt(t){return Li(t,["topLeft","topRight","bottomLeft","bottomRight"])}function $e(t){const e=bl(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function he(t,e){t=t||{},e=e||ce.font;let n=Y(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let o=Y(t.style,e.style);o&&!(""+o).match(yh)&&(console.warn('Invalid font style specified: "'+o+'"'),o=void 0);const i={family:Y(t.family,e.family),lineHeight:bh(Y(t.lineHeight,e.lineHeight),n),size:n,style:o,weight:Y(t.weight,e.weight),string:""};return i.string=dh(i),i}function xn(t,e,n,o){let i=!0,s,l,a;for(s=0,l=t.length;s<l;++s)if(a=t[s],a!==void 0&&(e!==void 0&&typeof a=="function"&&(a=a(e),i=!1),n!==void 0&&oe(a)&&(a=a[n%a.length],i=!1),a!==void 0))return o&&!i&&(o.cacheable=!1),a}function _h(t,e,n){const{min:o,max:i}=t,s=Xs(e,(i-o)/2),l=(a,d)=>n&&a===0?0:a+d;return{min:l(o,-Math.abs(s)),max:l(i,s)}}function wt(t,e){return Object.assign(Object.create(t),e)}function Hi(t,e=[""],n,o,i=()=>t[0]){const s=n||t;typeof o>"u"&&(o=kl("_fallback",t));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:o,_getTarget:i,override:a=>Hi([a,...t],e,s,o)};return new Proxy(l,{deleteProperty(a,d){return delete a[d],delete a._keys,delete t[0][d],!0},get(a,d){return _l(a,d,()=>Dh(d,e,t,a))},getOwnPropertyDescriptor(a,d){return Reflect.getOwnPropertyDescriptor(a._scopes[0],d)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,d){return xl(a).includes(d)},ownKeys(a){return xl(a)},set(a,d,c){const u=a._storage||(a._storage=i());return a[d]=u[d]=c,delete a._keys,!0}})}function Kt(t,e,n,o){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:$l(t,o),setContext:s=>Kt(t,s,n,o),override:s=>Kt(t.override(s),e,n,o)};return new Proxy(i,{deleteProperty(s,l){return delete s[l],delete t[l],!0},get(s,l,a){return _l(s,l,()=>Ch(s,l,a))},getOwnPropertyDescriptor(s,l){return s._descriptors.allKeys?Reflect.has(t,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,l)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,l){return Reflect.has(t,l)},ownKeys(){return Reflect.ownKeys(t)},set(s,l,a){return t[l]=a,delete s[l],!0}})}function $l(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:o=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:o,isScriptable:$t(n)?n:()=>n,isIndexable:$t(o)?o:()=>o}}const wh=(t,e)=>t?t+Vi(e):e,ji=(t,e)=>q(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function _l(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const o=n();return t[e]=o,o}function Ch(t,e,n){const{_proxy:o,_context:i,_subProxy:s,_descriptors:l}=t;let a=o[e];return $t(a)&&l.isScriptable(e)&&(a=kh(e,a,t,n)),oe(a)&&a.length&&(a=xh(e,a,t,l.isIndexable)),ji(e,a)&&(a=Kt(a,i,s&&s[e],l)),a}function kh(t,e,n,o){const{_proxy:i,_context:s,_subProxy:l,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let d=e(s,l||o);return a.delete(t),ji(t,d)&&(d=Wi(i._scopes,i,t,d)),d}function xh(t,e,n,o){const{_proxy:i,_context:s,_subProxy:l,_descriptors:a}=n;if(typeof s.index<"u"&&o(t))return e[s.index%e.length];if(q(e[0])){const d=e,c=i._scopes.filter(u=>u!==d);e=[];for(const u of d){const f=Wi(c,i,t,u);e.push(Kt(f,s,l&&l[t],a))}}return e}function wl(t,e,n){return $t(t)?t(e,n):t}const Sh=(t,e)=>t===!0?e:typeof t=="string"?bt(e,t):void 0;function vh(t,e,n,o,i){for(const s of e){const l=Sh(n,s);if(l){t.add(l);const a=wl(l._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==o)return a}else if(l===!1&&typeof o<"u"&&n!==o)return null}return!1}function Wi(t,e,n,o){const i=e._rootScopes,s=wl(e._fallback,n,o),l=[...t,...i],a=new Set;a.add(o);let d=Cl(a,l,n,s||n,o);return d===null||typeof s<"u"&&s!==n&&(d=Cl(a,l,s,d,o),d===null)?!1:Hi(Array.from(a),[""],i,s,()=>Mh(e,n,o))}function Cl(t,e,n,o,i){for(;n;)n=vh(t,e,n,o,i);return n}function Mh(t,e,n){const o=t._getTarget();e in o||(o[e]={});const i=o[e];return oe(i)&&q(n)?n:i||{}}function Dh(t,e,n,o){let i;for(const s of e)if(i=kl(wh(s,t),n),typeof i<"u")return ji(t,i)?Wi(n,o,t,i):i}function kl(t,e){for(const n of e){if(!n)continue;const o=n[t];if(typeof o<"u")return o}}function xl(t){let e=t._keys;return e||(e=t._keys=Eh(t._scopes)),e}function Eh(t){const e=new Set;for(const n of t)for(const o of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(o);return Array.from(e)}function Sl(t,e,n,o){const{iScale:i}=t,{key:s="r"}=this._parsing,l=new Array(o);let a,d,c,u;for(a=0,d=o;a<d;++a)c=a+n,u=e[c],l[a]={r:i.parse(bt(u,s),c)};return l}const Bh=Number.EPSILON||1e-14,Zt=(t,e)=>e<t.length&&!t[e].skip&&t[e],vl=t=>t==="x"?"y":"x";function Vh(t,e,n,o){const i=t.skip?e:t,s=e,l=n.skip?e:n,a=Fi(s,i),d=Fi(l,s);let c=a/(a+d),u=d/(a+d);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=o*c,h=o*u;return{previous:{x:s.x-f*(l.x-i.x),y:s.y-f*(l.y-i.y)},next:{x:s.x+h*(l.x-i.x),y:s.y+h*(l.y-i.y)}}}function Ph(t,e,n){const o=t.length;let i,s,l,a,d,c=Zt(t,0);for(let u=0;u<o-1;++u)if(d=c,c=Zt(t,u+1),!(!d||!c)){if(bn(e[u],0,Bh)){n[u]=n[u+1]=0;continue}i=n[u]/e[u],s=n[u+1]/e[u],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(l=3/Math.sqrt(a),n[u]=i*l*e[u],n[u+1]=s*l*e[u])}}function Fh(t,e,n="x"){const o=vl(n),i=t.length;let s,l,a,d=Zt(t,0);for(let c=0;c<i;++c){if(l=a,a=d,d=Zt(t,c+1),!a)continue;const u=a[n],f=a[o];l&&(s=(u-l[n])/3,a[`cp1${n}`]=u-s,a[`cp1${o}`]=f-s*e[c]),d&&(s=(d[n]-u)/3,a[`cp2${n}`]=u+s,a[`cp2${o}`]=f+s*e[c])}}function Rh(t,e="x"){const n=vl(e),o=t.length,i=Array(o).fill(0),s=Array(o);let l,a,d,c=Zt(t,0);for(l=0;l<o;++l)if(a=d,d=c,c=Zt(t,l+1),!!d){if(c){const u=c[e]-d[e];i[l]=u!==0?(c[n]-d[n])/u:0}s[l]=a?c?Ue(i[l-1])!==Ue(i[l])?0:(i[l-1]+i[l])/2:i[l-1]:i[l]}Ph(t,i,s),Fh(t,s,e)}function po(t,e,n){return Math.max(Math.min(t,n),e)}function Nh(t,e){let n,o,i,s,l,a=nt(t[0],e);for(n=0,o=t.length;n<o;++n)l=s,s=a,a=n<o-1&&nt(t[n+1],e),s&&(i=t[n],l&&(i.cp1x=po(i.cp1x,e.left,e.right),i.cp1y=po(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=po(i.cp2x,e.left,e.right),i.cp2y=po(i.cp2y,e.top,e.bottom)))}function Ah(t,e,n,o,i){let s,l,a,d;if(e.spanGaps&&(t=t.filter(c=>!c.skip)),e.cubicInterpolationMode==="monotone")Rh(t,i);else{let c=o?t[t.length-1]:t[0];for(s=0,l=t.length;s<l;++s)a=t[s],d=Vh(c,a,t[Math.min(s+1,l-(o?0:1))%l],e.tension),a.cp1x=d.previous.x,a.cp1y=d.previous.y,a.cp2x=d.next.x,a.cp2y=d.next.y,c=a}e.capBezierPoints&&Nh(t,n)}function Yi(){return typeof window<"u"&&typeof document<"u"}function Ui(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function mo(t,e,n){let o;return typeof t=="string"?(o=parseInt(t,10),t.indexOf("%")!==-1&&(o=o/100*e.parentNode[n])):o=t,o}const go=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function Oh(t,e){return go(t).getPropertyValue(e)}const Ih=["top","right","bottom","left"];function Nt(t,e,n){const o={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=Ih[i];o[s]=parseFloat(t[e+"-"+s+n])||0}return o.width=o.left+o.right,o.height=o.top+o.bottom,o}const Th=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function zh(t,e){const n=t.touches,o=n&&n.length?n[0]:t,{offsetX:i,offsetY:s}=o;let l=!1,a,d;if(Th(i,s,t.target))a=i,d=s;else{const c=e.getBoundingClientRect();a=o.clientX-c.left,d=o.clientY-c.top,l=!0}return{x:a,y:d,box:l}}function At(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:o}=e,i=go(n),s=i.boxSizing==="border-box",l=Nt(i,"padding"),a=Nt(i,"border","width"),{x:d,y:c,box:u}=zh(t,n),f=l.left+(u&&a.left),h=l.top+(u&&a.top);let{width:p,height:m}=e;return s&&(p-=l.width+a.width,m-=l.height+a.height),{x:Math.round((d-f)/p*n.width/o),y:Math.round((c-h)/m*n.height/o)}}function Lh(t,e,n){let o,i;if(e===void 0||n===void 0){const s=Ui(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const l=s.getBoundingClientRect(),a=go(s),d=Nt(a,"border","width"),c=Nt(a,"padding");e=l.width-c.width-d.width,n=l.height-c.height-d.height,o=mo(a.maxWidth,s,"clientWidth"),i=mo(a.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:o||lo,maxHeight:i||lo}}const yo=t=>Math.round(t*10)/10;function Hh(t,e,n,o){const i=go(t),s=Nt(i,"margin"),l=mo(i.maxWidth,t,"clientWidth")||lo,a=mo(i.maxHeight,t,"clientHeight")||lo,d=Lh(t,e,n);let{width:c,height:u}=d;if(i.boxSizing==="content-box"){const h=Nt(i,"border","width"),p=Nt(i,"padding");c-=p.width+h.width,u-=p.height+h.height}return c=Math.max(0,c-s.width),u=Math.max(0,o?c/o:u-s.height),c=yo(Math.min(c,l,d.maxWidth)),u=yo(Math.min(u,a,d.maxHeight)),c&&!u&&(u=yo(c/2)),(e!==void 0||n!==void 0)&&o&&d.height&&u>d.height&&(u=d.height,c=yo(Math.floor(u*o))),{width:c,height:u}}function Ml(t,e,n){const o=e||1,i=Math.floor(t.height*o),s=Math.floor(t.width*o);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const l=t.canvas;return l.style&&(n||!l.style.height&&!l.style.width)&&(l.style.height=`${t.height}px`,l.style.width=`${t.width}px`),t.currentDevicePixelRatio!==o||l.height!==i||l.width!==s?(t.currentDevicePixelRatio=o,l.height=i,l.width=s,t.ctx.setTransform(o,0,0,o,0,0),!0):!1}const jh=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Yi()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Dl(t,e){const n=Oh(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?+o[1]:void 0}function Ot(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function Wh(t,e,n,o){return{x:t.x+n*(e.x-t.x),y:o==="middle"?n<.5?t.y:e.y:o==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function Yh(t,e,n,o){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},l=Ot(t,i,n),a=Ot(i,s,n),d=Ot(s,e,n),c=Ot(l,a,n),u=Ot(a,d,n);return Ot(c,u,n)}const Uh=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,o){return n-o},leftForLtr(n,o){return n-o}}},Gh=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Jt(t,e,n){return t?Uh(e,n):Gh()}function El(t,e){let n,o;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,o=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)}function Bl(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Vl(t){return t==="angle"?{between:$n,compare:qf,normalize:Ve}:{between:et,compare:(e,n)=>e-n,normalize:e=>e}}function Pl({start:t,end:e,count:n,loop:o,style:i}){return{start:t%n,end:e%n,loop:o&&(e-t+1)%n===0,style:i}}function qh(t,e,n){const{property:o,start:i,end:s}=n,{between:l,normalize:a}=Vl(o),d=e.length;let{start:c,end:u,loop:f}=t,h,p;if(f){for(c+=d,u+=d,h=0,p=d;h<p&&l(a(e[c%d][o]),i,s);++h)c--,u--;c%=d,u%=d}return u<c&&(u+=d),{start:c,end:u,loop:f,style:t.style}}function Fl(t,e,n){if(!n)return[t];const{property:o,start:i,end:s}=n,l=e.length,{compare:a,between:d,normalize:c}=Vl(o),{start:u,end:f,loop:h,style:p}=qh(t,e,n),m=[];let g=!1,y=null,b,_,x;const $=()=>d(i,x,b)&&a(i,x)!==0,w=()=>a(s,b)===0||d(s,x,b),P=()=>g||$(),M=()=>!g||w();for(let N=u,V=u;N<=f;++N)_=e[N%l],!_.skip&&(b=c(_[o]),b!==x&&(g=d(b,i,s),y===null&&P()&&(y=a(b,i)===0?N:V),y!==null&&M()&&(m.push(Pl({start:y,end:N,loop:h,count:l,style:p})),y=null),V=N,x=b));return y!==null&&m.push(Pl({start:y,end:f,loop:h,count:l,style:p})),m}function Rl(t,e){const n=[],o=t.segments;for(let i=0;i<o.length;i++){const s=Fl(o[i],t.points,e);s.length&&n.push(...s)}return n}function Xh(t,e,n,o){let i=0,s=e-1;if(n&&!o)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(s+=i);s>i&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function Kh(t,e,n,o){const i=t.length,s=[];let l=e,a=t[e],d;for(d=e+1;d<=n;++d){const c=t[d%i];c.skip||c.stop?a.skip||(o=!1,s.push({start:e%i,end:(d-1)%i,loop:o}),e=l=c.stop?d:null):(l=d,a.skip&&(e=d)),a=c}return l!==null&&s.push({start:e%i,end:l%i,loop:o}),s}function Zh(t,e){const n=t.points,o=t.options.spanGaps,i=n.length;if(!i)return[];const s=!!t._loop,{start:l,end:a}=Xh(n,i,s,o);if(o===!0)return Nl(t,[{start:l,end:a,loop:s}],n,e);const d=a<l?a+i:a,c=!!t._fullLoop&&l===0&&a===i-1;return Nl(t,Kh(n,l,d,c),n,e)}function Nl(t,e,n,o){return!o||!o.setContext||!n?e:Jh(t,e,n,o)}function Jh(t,e,n,o){const i=t._chart.getContext(),s=Al(t.options),{_datasetIndex:l,options:{spanGaps:a}}=t,d=n.length,c=[];let u=s,f=e[0].start,h=f;function p(m,g,y,b){const _=a?-1:1;if(m!==g){for(m+=d;n[m%d].skip;)m-=_;for(;n[g%d].skip;)g+=_;m%d!==g%d&&(c.push({start:m%d,end:g%d,loop:y,style:b}),u=b,f=g%d)}}for(const m of e){f=a?f:m.start;let g=n[f%d],y;for(h=f+1;h<=m.end;h++){const b=n[h%d];y=Al(o.setContext(wt(i,{type:"segment",p0:g,p1:b,p0DataIndex:(h-1)%d,p1DataIndex:h%d,datasetIndex:l}))),Qh(y,u)&&p(f,h-1,m.loop,u),g=b,u=y}f<h-1&&p(f,h-1,m.loop,u)}return c}function Al(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function Qh(t,e){if(!e)return!1;const n=[],o=function(i,s){return Ai(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,o)!==JSON.stringify(e,o)}/*!
20
20
  * Chart.js v4.4.2
21
21
  * https://www.chartjs.org
22
22
  * (c) 2024 Chart.js Contributors
23
23
  * Released under the MIT License
24
- */class Nh{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const r=n.listeners[i],l=n.duration;r.forEach(a=>a({chart:e,initial:n.initial,numSteps:l,currentStep:Math.min(o-n.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=Zr.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const r=o.items;let l=r.length-1,a=!1,d;for(;l>=0;--l)d=r[l],d._active?(d._total>o.duration&&(o.duration=d._total),d.tick(e),a=!0):(r[l]=r[r.length-1],r.pop());a&&(i.draw(),this._notify(i,o,e,"progress")),r.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=r.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var nt=new Nh;const Ml="transparent",Ah={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=ol(t||Ml),i=o.valid&&ol(e||Ml);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class Oh{constructor(e,n,o,i){const r=n[o];i=_n([e.to,i,r,e.from]);const l=_n([e.from,r,i]);this._active=!0,this._fn=e.fn||Ah[e.type||typeof l],this._easing=gn[e.easing]||gn.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=l,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],r=o-this._start,l=this._duration-r;this._start=o,this._duration=Math.floor(Math.max(l,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=_n([e.to,n,i,e.from]),this._from=_n([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,i=this._prop,r=this._from,l=this._loop,a=this._to;let d;if(this._active=r!==a&&(l||n<o),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=r;return}d=n/o%2,d=l&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[i]=this._fn(r,a,d)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class Dl{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!q(e))return;const n=Object.keys(ce.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const r=e[i];if(!q(r))return;const l={};for(const a of n)l[a]=r[a];(oe(r.properties)&&r.properties||[i]).forEach(a=>{(a===i||!o.has(a))&&o.set(a,l)})})}_animateOptions(e,n){const o=n.options,i=Th(e,o);if(!i)return[];const r=this._createAnimations(i,o);return o.$shared&&Ih(e.options.$animations,o).then(()=>{e.options=o},()=>{}),r}_createAnimations(e,n){const o=this._properties,i=[],r=e.$animations||(e.$animations={}),l=Object.keys(n),a=Date.now();let d;for(d=l.length-1;d>=0;--d){const c=l[d];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[c];let f=r[c];const h=o.get(c);if(f)if(h&&f.active()){f.update(h,u,a);continue}else f.cancel();if(!h||!h.duration){e[c]=u;continue}r[c]=f=new Oh(h,e,c,u),i.push(f)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return nt.add(this._chart,o),!0}}function Ih(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const r=t[o[i]];r&&r.active()&&n.push(r.wait())}return Promise.all(n)}function Th(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function El(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,r=n.max===void 0?e:0;return{start:o?r:i,end:o?i:r}}function Lh(t,e,n){if(n===!1)return!1;const o=El(t,n),i=El(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function zh(t){let e,n,o,i;return q(t)?(e=t.top,n=t.right,o=t.bottom,i=t.left):e=n=o=i=t,{top:e,right:n,bottom:o,left:i,disabled:t===!1}}function Bl(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,r;for(i=0,r=o.length;i<r;++i)n.push(o[i].index);return n}function Vl(t,e,n,o={}){const i=t.keys,r=o.mode==="single";let l,a,d,c;if(e!==null){for(l=0,a=i.length;l<a;++l){if(d=+i[l],d===n){if(o.all)continue;break}c=t.values[d],de(c)&&(r||e===0||Ye(e)===Ye(c))&&(e+=c)}return e}}function Hh(t){const e=Object.keys(t),n=new Array(e.length);let o,i,r;for(o=0,i=e.length;o<i;++o)r=e[o],n[o]={x:r,y:t[r]};return n}function Pl(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function jh(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function Wh(t){const{min:e,max:n,minDefined:o,maxDefined:i}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function Yh(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function Rl(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const r=t[i.index];if(n&&r>0||!n&&r<0)return i.index}return null}function Fl(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:r,vScale:l,index:a}=o,d=r.axis,c=l.axis,u=jh(r,l,o),f=e.length;let h;for(let p=0;p<f;++p){const m=e[p],{[d]:g,[c]:y}=m,b=m._stacks||(m._stacks={});h=b[c]=Yh(i,u,g),h[a]=y,h._top=Rl(h,l,!0,o.type),h._bottom=Rl(h,l,!1,o.type);const $=h._visualValues||(h._visualValues={});$[a]=y}}function Hi(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function Uh(t,e){return $t(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function Gh(t,e,n){return $t(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function wn(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const i of e){const r=i._stacks;if(!r||r[o]===void 0||r[o][n]===void 0)return;delete r[o][n],r[o]._visualValues!==void 0&&r[o]._visualValues[n]!==void 0&&delete r[o]._visualValues[n]}}}const ji=t=>t==="reset"||t==="none",Nl=(t,e)=>e?t:Object.assign({},t),qh=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Bl(n,!0),values:null};class Te{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Pl(e.vScale,e),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(e){this.index!==e&&wn(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(f,h,p,m)=>f==="x"?h:f==="r"?m:p,r=n.xAxisID=Y(o.xAxisID,Hi(e,"x")),l=n.yAxisID=Y(o.yAxisID,Hi(e,"y")),a=n.rAxisID=Y(o.rAxisID,Hi(e,"r")),d=n.indexAxis,c=n.iAxisID=i(d,r,l,a),u=n.vAxisID=i(d,l,r,a);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Xr(this._data,this),e._stacked&&wn(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(q(n))this._data=Hh(n);else if(o!==n){if(o){Xr(o,this);const i=this._cachedMeta;wn(i),i._parsed=[]}n&&Object.isExtensible(n)&&Rf(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const r=n._stacked;n._stacked=Pl(n.vScale,n),n.stack!==o.stack&&(i=!0,wn(n),n.stack=o.stack),this._resyncElements(e),(i||r!==n._stacked)&&Fl(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:i}=this,{iScale:r,_stacked:l}=o,a=r.axis;let d=e===0&&n===i.length?!0:o._sorted,c=e>0&&o._parsed[e-1],u,f,h;if(this._parsing===!1)o._parsed=i,o._sorted=!0,h=i;else{oe(i[e])?h=this.parseArrayData(o,i,e,n):q(i[e])?h=this.parseObjectData(o,i,e,n):h=this.parsePrimitiveData(o,i,e,n);const p=()=>f[a]===null||c&&f[a]<c[a];for(u=0;u<n;++u)o._parsed[u+e]=f=h[u],d&&(p()&&(d=!1),c=f);o._sorted=d}l&&Fl(this,h)}parsePrimitiveData(e,n,o,i){const{iScale:r,vScale:l}=e,a=r.axis,d=l.axis,c=r.getLabels(),u=r===l,f=new Array(i);let h,p,m;for(h=0,p=i;h<p;++h)m=h+o,f[h]={[a]:u||r.parse(c[m],m),[d]:l.parse(n[m],m)};return f}parseArrayData(e,n,o,i){const{xScale:r,yScale:l}=e,a=new Array(i);let d,c,u,f;for(d=0,c=i;d<c;++d)u=d+o,f=n[u],a[d]={x:r.parse(f[0],u),y:l.parse(f[1],u)};return a}parseObjectData(e,n,o,i){const{xScale:r,yScale:l}=e,{xAxisKey:a="x",yAxisKey:d="y"}=this._parsing,c=new Array(i);let u,f,h,p;for(u=0,f=i;u<f;++u)h=u+o,p=n[h],c[u]={x:r.parse(gt(p,a),h),y:l.parse(gt(p,d),h)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,r=this._cachedMeta,l=n[e.axis],a={keys:Bl(i,!0),values:n._stacks[e.axis]._visualValues};return Vl(a,l,r.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const r=o[n.axis];let l=r===null?NaN:r;const a=i&&o._stacks[n.axis];i&&a&&(i.values=a,l=Vl(i,r,this._cachedMeta.index)),e.min=Math.min(e.min,l),e.max=Math.max(e.max,l)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,r=o._sorted&&e===o.iScale,l=i.length,a=this._getOtherScale(e),d=qh(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=Wh(a);let h,p;function m(){p=i[h];const g=p[a.axis];return!de(p[e.axis])||u>g||f<g}for(h=0;h<l&&!(!m()&&(this.updateRangeFromParsed(c,e,p,d),r));++h);if(r){for(h=l-1;h>=0;--h)if(!m()){this.updateRangeFromParsed(c,e,p,d);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,r,l;for(i=0,r=n.length;i<r;++i)l=n[i][e.axis],de(l)&&o.push(l);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,r=this.getParsed(e);return{label:o?""+o.getLabelForValue(r[o.axis]):"",value:i?""+i.getLabelForValue(r[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=zh(Y(this.options.clip,Lh(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],r=n.chartArea,l=[],a=this._drawStart||0,d=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(e,r,a,d),u=a;u<a+d;++u){const f=i[u];f.hidden||(f.active&&c?l.push(f):f.draw(e,r))}for(u=0;u<l.length;++u)l[u].draw(e,r)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const i=this.getDataset();let r;if(e>=0&&e<this._cachedMeta.data.length){const l=this._cachedMeta.data[e];r=l.$context||(l.$context=Gh(this.getContext(),e,l)),r.parsed=this.getParsed(e),r.raw=i.data[e],r.index=r.dataIndex=e}else r=this.$context||(this.$context=Uh(this.chart.getContext(),this.index)),r.dataset=i,r.index=r.datasetIndex=this.index;return r.active=!!n,r.mode=o,r}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const i=n==="active",r=this._cachedDataOpts,l=e+"-"+n,a=r[l],d=this.enableOptionSharing&&hn(o);if(a)return Nl(a,d);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],h=c.getOptionScopes(this.getDataset(),u),p=Object.keys(ce.elements[e]),m=()=>this.getContext(o,i,n),g=c.resolveNamedOptions(h,p,m,f);return g.$shared&&(g.$shared=d,r[l]=Object.freeze(Nl(g,d))),g}_resolveAnimations(e,n,o){const i=this.chart,r=this._cachedDataOpts,l=`animation-${n}`,a=r[l];if(a)return a;let d;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),f);d=u.createResolver(h,this.getContext(e,o,n))}const c=new Dl(i,d&&d.animations);return d&&d._cacheable&&(r[l]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||ji(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,r=this.getSharedOptions(o),l=this.includeOptions(n,r)||r!==i;return this.updateSharedOptions(r,n,o),{sharedOptions:r,includeOptions:l}}updateElement(e,n,o,i){ji(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!ji(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const r=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(r)||r})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[a,d,c]of this._syncList)this[a](d,c);this._syncList=[];const i=o.length,r=n.length,l=Math.min(r,i);l&&this.parse(0,l),r>i?this._insertElements(i,r-i,e):r<i&&this._removeElements(r,i-r)}_insertElements(e,n,o=!0){const i=this._cachedMeta,r=i.data,l=e+n;let a;const d=c=>{for(c.length+=n,a=c.length-1;a>=l;a--)c[a]=c[a-n]};for(d(r),a=e;a<l;++a)r[a]=new this.dataElementType;this._parsing&&d(i._parsed),this.parse(e,n),o&&this.updateElements(r,e,n,"reset")}updateElements(e,n,o,i){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(e,n);o._stacked&&wn(o,i)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,i]=e;this[n](o,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}I(Te,"defaults",{}),I(Te,"datasetElementType",null),I(Te,"dataElementType",null);function Xh(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,r=n.length;i<r;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=Kr(o.sort((i,r)=>i-r))}return t._cache.$bar}function Kh(t){const e=t.iScale,n=Xh(e,t.type);let o=e._length,i,r,l,a;const d=()=>{l===32767||l===-32768||(hn(a)&&(o=Math.min(o,Math.abs(l-a)||o)),a=l)};for(i=0,r=n.length;i<r;++i)l=e.getPixelForValue(n[i]),d();for(a=void 0,i=0,r=e.ticks.length;i<r;++i)l=e.getPixelForTick(i),d();return o}function Zh(t,e,n,o){const i=n.barThickness;let r,l;return Z(i)?(r=e.min*n.categoryPercentage,l=n.barPercentage):(r=i*o,l=1),{chunk:r/o,ratio:l,start:e.pixels[t]-r/2}}function Jh(t,e,n,o){const i=e.pixels,r=i[t];let l=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const d=n.categoryPercentage;l===null&&(l=r-(a===null?e.end-e.start:a-r)),a===null&&(a=r+r-l);const c=r-(r-Math.min(l,a))/2*d;return{chunk:Math.abs(a-l)/2*d/o,ratio:n.barPercentage,start:c}}function Qh(t,e,n,o){const i=n.parse(t[0],o),r=n.parse(t[1],o),l=Math.min(i,r),a=Math.max(i,r);let d=l,c=a;Math.abs(l)>Math.abs(a)&&(d=a,c=l),e[n.axis]=c,e._custom={barStart:d,barEnd:c,start:i,end:r,min:l,max:a}}function Al(t,e,n,o){return oe(t)?Qh(t,e,n,o):e[n.axis]=n.parse(t,o),e}function Ol(t,e,n,o){const i=t.iScale,r=t.vScale,l=i.getLabels(),a=i===r,d=[];let c,u,f,h;for(c=n,u=n+o;c<u;++c)h=e[c],f={},f[i.axis]=a||i.parse(l[c],c),d.push(Al(h,f,r,c));return d}function Wi(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function ep(t,e,n){return t!==0?Ye(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function tp(t){let e,n,o,i,r;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",r="start"):(i="start",r="end"),{start:n,end:o,reverse:e,top:i,bottom:r}}function np(t,e,n,o){let i=e.borderSkipped;const r={};if(!i){t.borderSkipped=r;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:l,end:a,reverse:d,top:c,bottom:u}=tp(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=u:(r[Il(u,l,a,d)]=!0,i=c)),r[Il(i,l,a,d)]=!0,t.borderSkipped=r}function Il(t,e,n,o){return o?(t=op(t,e,n),t=Tl(t,n,e)):t=Tl(t,e,n),t}function op(t,e,n){return t===e?n:t===n?e:t}function Tl(t,e,n){return t==="start"?e:t==="end"?n:t}function ip(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class go extends Te{parsePrimitiveData(e,n,o,i){return Ol(e,n,o,i)}parseArrayData(e,n,o,i){return Ol(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:r,vScale:l}=e,{xAxisKey:a="x",yAxisKey:d="y"}=this._parsing,c=r.axis==="x"?a:d,u=l.axis==="x"?a:d,f=[];let h,p,m,g;for(h=o,p=o+i;h<p;++h)g=n[h],m={},m[r.axis]=r.parse(gt(g,c),h),f.push(Al(gt(g,u),m,l,h));return f}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const r=o._custom;r&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,r.min),e.max=Math.max(e.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,r=this.getParsed(e),l=r._custom,a=Wi(l)?"["+l.start+", "+l.end+"]":""+i.getLabelForValue(r[i.axis]);return{label:""+o.getLabelForValue(r[o.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,i){const r=i==="reset",{index:l,_cachedMeta:{vScale:a}}=this,d=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i);for(let p=n;p<n+o;p++){const m=this.getParsed(p),g=r||Z(m[a.axis])?{base:d,head:d}:this._calculateBarValuePixels(p),y=this._calculateBarIndexPixels(p,u),b=(m._stacks||{})[a.axis],$={horizontal:c,base:g.base,enableBorderRadius:!b||Wi(m._custom)||l===b._top||l===b._bottom,x:c?g.head:y.center,y:c?y.center:g.head,height:c?y.size:Math.abs(g.size),width:c?Math.abs(g.size):y.size};h&&($.options=f||this.resolveDataElementOptions(p,e[p].active?"active":i));const w=$.options||e[p].options;np($,w,b,l),ip($,w,u.ratio),this.updateElement(e[p],p,$,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),r=o.options.stacked,l=[],a=d=>{const c=d.controller.getParsed(n),u=c&&c[d.vScale.axis];if(Z(u)||isNaN(u))return!0};for(const d of i)if(!(n!==void 0&&a(d))&&((r===!1||l.indexOf(d.stack)===-1||r===void 0&&d.stack===void 0)&&l.push(d.stack),d.index===e))break;return l.length||l.push(void 0),l}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),r=n!==void 0?i.indexOf(n):-1;return r===-1?i.length-1:r}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let r,l;for(r=0,l=n.data.length;r<l;++r)i.push(o.getPixelForValue(this.getParsed(r)[o.axis],r));const a=e.barThickness;return{min:a||Kh(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:r,minBarLength:l}}=this,a=r||0,d=this.getParsed(e),c=d._custom,u=Wi(c);let f=d[n.axis],h=0,p=o?this.applyStack(n,d,o):f,m,g;p!==f&&(h=p-f,p=f),u&&(f=c.barStart,p=c.barEnd-c.barStart,f!==0&&Ye(f)!==Ye(c.barEnd)&&(h=0),h+=f);const y=!Z(r)&&!u?r:h;let b=n.getPixelForValue(y);if(this.chart.getDataVisibility(e)?m=n.getPixelForValue(h+p):m=b,g=m-b,Math.abs(g)<l){g=ep(g,n,a)*l,f===a&&(b-=g/2);const $=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),S=Math.min($,w),x=Math.max($,w);b=Math.max(Math.min(b,x),S),m=b+g,o&&!u&&(d._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(b))}if(b===n.getPixelForValue(a)){const $=Ye(g)*n.getLineWidthForValue(a)/2;b+=$,g-=$}return{size:g,base:b,head:m,center:m+g/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,r=i.skipNull,l=Y(i.maxBarThickness,1/0);let a,d;if(n.grouped){const c=r?this._getStackCount(e):n.stackCount,u=i.barThickness==="flex"?Jh(e,n,i,c):Zh(e,n,i,c),f=this._getStackIndex(this.index,this._cachedMeta.stack,r?e:void 0);a=u.start+u.chunk*f+u.chunk/2,d=Math.min(l,u.chunk*u.ratio)}else a=o.getPixelForValue(this.getParsed(e)[o.axis],e),d=Math.min(l,n.min*n.ratio);return{base:a-d/2,head:a+d/2,center:a,size:d}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let r=0;for(;r<i;++r)this.getParsed(r)[n.axis]!==null&&o[r].draw(this._ctx)}}I(go,"id","bar"),I(go,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),I(go,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class yo extends Te{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const r=super.parsePrimitiveData(e,n,o,i);for(let l=0;l<r.length;l++)r[l]._custom=this.resolveDataElementOptions(l+o).radius;return r}parseArrayData(e,n,o,i){const r=super.parseArrayData(e,n,o,i);for(let l=0;l<r.length;l++){const a=n[o+l];r[l]._custom=Y(a[2],this.resolveDataElementOptions(l+o).radius)}return r}parseObjectData(e,n,o,i){const r=super.parseObjectData(e,n,o,i);for(let l=0;l<r.length;l++){const a=n[o+l];r[l]._custom=Y(a&&a.r&&+a.r,this.resolveDataElementOptions(l+o).radius)}return r}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:r}=n,l=this.getParsed(e),a=i.getLabelForValue(l.x),d=r.getLabelForValue(l.y),c=l._custom;return{label:o[e]||"",value:"("+a+", "+d+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const r=i==="reset",{iScale:l,vScale:a}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(n,i),u=l.axis,f=a.axis;for(let h=n;h<n+o;h++){const p=e[h],m=!r&&this.getParsed(h),g={},y=g[u]=r?l.getPixelForDecimal(.5):l.getPixelForValue(m[u]),b=g[f]=r?a.getBasePixel():a.getPixelForValue(m[f]);g.skip=isNaN(y)||isNaN(b),c&&(g.options=d||this.resolveDataElementOptions(h,p.active?"active":i),r&&(g.options.radius=0)),this.updateElement(p,h,g,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const r=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Y(o&&o._custom,r),i}}I(yo,"id","bubble"),I(yo,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),I(yo,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function sp(t,e,n){let o=1,i=1,r=0,l=0;if(e<se){const a=t,d=a+e,c=Math.cos(a),u=Math.sin(a),f=Math.cos(d),h=Math.sin(d),p=(w,S,x)=>mn(w,a,d,!0)?1:Math.max(S,S*n,x,x*n),m=(w,S,x)=>mn(w,a,d,!0)?-1:Math.min(S,S*n,x,x*n),g=p(0,c,f),y=p(ue,u,h),b=m(ie,c,f),$=m(ie+ue,u,h);o=(g-b)/2,i=(y-$)/2,r=-(g+b)/2,l=-(y+$)/2}return{ratioX:o,ratioY:i,offsetX:r,offsetY:l}}class At extends Te{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let r=d=>+o[d];if(q(o[e])){const{key:d="value"}=this._parsing;r=c=>+gt(o[c],d)}let l,a;for(l=e,a=e+n;l<a;++l)i._parsed[l]=r(l)}}_getRotation(){return Ie(this.options.rotation-90)}_getCircumference(){return Ie(this.options.circumference)}_getRotationExtents(){let e=se,n=-se;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,r=i._getRotation(),l=i._getCircumference();e=Math.min(e,r),n=Math.max(n,r+l)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,r=i.data,l=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,a=Math.max((Math.min(o.width,o.height)-l)/2,0),d=Math.min($f(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:h,ratioY:p,offsetX:m,offsetY:g}=sp(f,u,d),y=(o.width-l)/h,b=(o.height-l)/p,$=Math.max(Math.min(y,b)/2,0),w=Tr(this.options.radius,$),S=Math.max(w*d,0),x=(w-S)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=g*w,i.total=this.calculateTotal(),this.outerRadius=w-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(r,0,r.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,r=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*r/se)}updateElements(e,n,o,i){const r=i==="reset",l=this.chart,a=l.chartArea,c=l.options.animation,u=(a.left+a.right)/2,f=(a.top+a.bottom)/2,h=r&&c.animateScale,p=h?0:this.innerRadius,m=h?0:this.outerRadius,{sharedOptions:g,includeOptions:y}=this._getSharedOptions(n,i);let b=this._getRotation(),$;for($=0;$<n;++$)b+=this._circumference($,r);for($=n;$<n+o;++$){const w=this._circumference($,r),S=e[$],x={x:u+this.offsetX,y:f+this.offsetY,startAngle:b,endAngle:b+w,circumference:w,outerRadius:m,innerRadius:p};y&&(x.options=g||this.resolveDataElementOptions($,S.active?"active":i)),b+=w,this.updateElement(S,$,x,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const r=e._parsed[i];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(r))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?se*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],r=yn(n._parsed[e],o.options.locale);return{label:i[e]||"",value:r}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,r,l,a,d;if(!e){for(i=0,r=o.data.datasets.length;i<r;++i)if(o.isDatasetVisible(i)){l=o.getDatasetMeta(i),e=l.data,a=l.controller;break}}if(!e)return 0;for(i=0,r=e.length;i<r;++i)d=a.resolveDataElementOptions(i),d.borderAlign!=="inner"&&(n=Math.max(n,d.borderWidth||0,d.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const r=this.resolveDataElementOptions(o);n=Math.max(n,r.offset||0,r.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(Y(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}I(At,"id","doughnut"),I(At,"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"}),I(At,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),I(At,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((r,l)=>{const d=e.getDatasetMeta(0).controller.getStyle(l);return{text:r,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class bo extends Te{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:r}=n,l=this.chart._animationsDisabled;let{start:a,count:d}=Qr(n,i,l);this._drawStart=a,this._drawCount=d,el(n)&&(a=0,d=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!r._decimated,o.points=i;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!l,options:c},e),this.updateElements(i,a,d,e)}updateElements(e,n,o,i){const r=i==="reset",{iScale:l,vScale:a,_stacked:d,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,i),h=l.axis,p=a.axis,{spanGaps:m,segment:g}=this.options,y=Ut(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||i==="none",$=n+o,w=e.length;let S=n>0&&this.getParsed(n-1);for(let x=0;x<w;++x){const V=e[x],D=b?V:{};if(x<n||x>=$){D.skip=!0;continue}const F=this.getParsed(x),N=Z(F[p]),P=D[h]=l.getPixelForValue(F[h],x),C=D[p]=r||N?a.getBasePixel():a.getPixelForValue(d?this.applyStack(a,F,d):F[p],x);D.skip=isNaN(P)||isNaN(C)||N,D.stop=x>0&&Math.abs(F[h]-S[h])>y,g&&(D.parsed=F,D.raw=c.data[x]),f&&(D.options=u||this.resolveDataElementOptions(x,V.active?"active":i)),b||this.updateElement(V,x,D,i),S=F}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const r=i[0].size(this.resolveDataElementOptions(0)),l=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,r,l)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}I(bo,"id","line"),I(bo,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),I(bo,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Cn extends Te{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],r=yn(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:r}}parseObjectData(e,n,o,i){return ml.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,i)=>{const r=this.getParsed(i).r;!isNaN(r)&&this.chart.getDataVisibility(i)&&(r<n.min&&(n.min=r),r>n.max&&(n.max=r))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),r=Math.max(i/2,0),l=Math.max(o.cutoutPercentage?r/100*o.cutoutPercentage:1,0),a=(r-l)/e.getVisibleDatasetCount();this.outerRadius=r-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,o,i){const r=i==="reset",l=this.chart,d=l.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,f=c.yCenter,h=c.getIndexAngle(0)-.5*ie;let p=h,m;const g=360/this.countVisibleElements();for(m=0;m<n;++m)p+=this._computeAngle(m,i,g);for(m=n;m<n+o;m++){const y=e[m];let b=p,$=p+this._computeAngle(m,i,g),w=l.getDataVisibility(m)?c.getDistanceFromCenterForValue(this.getParsed(m).r):0;p=$,r&&(d.animateScale&&(w=0),d.animateRotate&&(b=$=h));const S={x:u,y:f,innerRadius:0,outerRadius:w,startAngle:b,endAngle:$,options:this.resolveDataElementOptions(m,y.active?"active":i)};this.updateElement(y,m,S,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((o,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,o){return this.chart.getDataVisibility(e)?Ie(this.resolveDataElementOptions(e,n).angle||o):0}}I(Cn,"id","polarArea"),I(Cn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),I(Cn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((r,l)=>{const d=e.getDatasetMeta(0).controller.getStyle(l);return{text:r,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Yi extends At{}I(Yi,"id","pie"),I(Yi,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class $o extends Te{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,i){return ml.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],r=n.iScale.getLabels();if(o.points=i,e!=="resize"){const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0);const a={_loop:!0,_fullLoop:r.length===i.length,options:l};this.updateElement(o,void 0,a,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const r=this._cachedMeta.rScale,l=i==="reset";for(let a=n;a<n+o;a++){const d=e[a],c=this.resolveDataElementOptions(a,d.active?"active":i),u=r.getPointPositionForValue(a,this.getParsed(a).r),f=l?r.xCenter:u.x,h=l?r.yCenter:u.y,p={x:f,y:h,angle:u.angle,skip:isNaN(f)||isNaN(h),options:c};this.updateElement(d,a,p,i)}}}I($o,"id","radar"),I($o,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),I($o,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class _o extends Te{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:r}=n,l=this.getParsed(e),a=i.getLabelForValue(l.x),d=r.getLabelForValue(l.y);return{label:o[e]||"",value:"("+a+", "+d+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:r,count:l}=Qr(n,o,i);if(this._drawStart=r,this._drawCount=l,el(n)&&(r=0,l=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:d}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!d._decimated,a.points=o;const c=this.resolveDatasetElementOptions(e);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:c},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,r,l,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,i){const r=i==="reset",{iScale:l,vScale:a,_stacked:d,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(u),h=this.includeOptions(i,f),p=l.axis,m=a.axis,{spanGaps:g,segment:y}=this.options,b=Ut(g)?g:Number.POSITIVE_INFINITY,$=this.chart._animationsDisabled||r||i==="none";let w=n>0&&this.getParsed(n-1);for(let S=n;S<n+o;++S){const x=e[S],V=this.getParsed(S),D=$?x:{},F=Z(V[m]),N=D[p]=l.getPixelForValue(V[p],S),P=D[m]=r||F?a.getBasePixel():a.getPixelForValue(d?this.applyStack(a,V,d):V[m],S);D.skip=isNaN(N)||isNaN(P)||F,D.stop=S>0&&Math.abs(V[p]-w[p])>b,y&&(D.parsed=V,D.raw=c.data[S]),h&&(D.options=f||this.resolveDataElementOptions(S,x.active?"active":i)),$||this.updateElement(x,S,D,i),w=V}this.updateSharedOptions(f,i,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let d=n.length-1;d>=0;--d)a=Math.max(a,n[d].size(this.resolveDataElementOptions(d))/2);return a>0&&a}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,l)/2}}I(_o,"id","scatter"),I(_o,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),I(_o,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var rp=Object.freeze({__proto__:null,BarController:go,BubbleController:yo,DoughnutController:At,LineController:bo,PieController:Yi,PolarAreaController:Cn,RadarController:$o,ScatterController:_o});function Ot(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ui{constructor(e){I(this,"options");this.options=e||{}}static override(e){Object.assign(Ui.prototype,e)}init(){}formats(){return Ot()}parse(){return Ot()}format(){return Ot()}add(){return Ot()}diff(){return Ot()}startOf(){return Ot()}endOf(){return Ot()}}var lp={_date:Ui};function ap(t,e,n,o){const{controller:i,data:r,_sorted:l}=t,a=i._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&l&&r.length){const d=a._reversePixels?Vf:et;if(o){if(i._sharedOptions){const c=r[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const f=d(r,e,n-u),h=d(r,e,n+u);return{lo:f.lo,hi:h.hi}}}}else return d(r,e,n)}return{lo:0,hi:r.length-1}}function xn(t,e,n,o,i){const r=t.getSortedVisibleDatasetMetas(),l=n[e];for(let a=0,d=r.length;a<d;++a){const{index:c,data:u}=r[a],{lo:f,hi:h}=ap(r[a],e,l,i);for(let p=f;p<=h;++p){const m=u[p];m.skip||o(m,c,p)}}}function dp(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const r=e?Math.abs(o.x-i.x):0,l=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(l,2))}}function Gi(t,e,n,o,i){const r=[];return!i&&!t.isPointInArea(e)||xn(t,n,e,function(a,d,c){!i&&!tt(a,t.chartArea,0)||a.inRange(e.x,e.y,o)&&r.push({element:a,datasetIndex:d,index:c})},!0),r}function cp(t,e,n,o){let i=[];function r(l,a,d){const{startAngle:c,endAngle:u}=l.getProps(["startAngle","endAngle"],o),{angle:f}=Gr(l,{x:e.x,y:e.y});mn(f,c,u)&&i.push({element:l,datasetIndex:a,index:d})}return xn(t,n,e,r),i}function up(t,e,n,o,i,r){let l=[];const a=dp(n);let d=Number.POSITIVE_INFINITY;function c(u,f,h){const p=u.inRange(e.x,e.y,i);if(o&&!p)return;const m=u.getCenterPoint(i);if(!(!!r||t.isPointInArea(m))&&!p)return;const y=a(e,m);y<d?(l=[{element:u,datasetIndex:f,index:h}],d=y):y===d&&l.push({element:u,datasetIndex:f,index:h})}return xn(t,n,e,c),l}function qi(t,e,n,o,i,r){return!r&&!t.isPointInArea(e)?[]:n==="r"&&!o?cp(t,e,n,i):up(t,e,n,o,i,r)}function Ll(t,e,n,o,i){const r=[],l=n==="x"?"inXRange":"inYRange";let a=!1;return xn(t,n,e,(d,c,u)=>{d[l](e[n],i)&&(r.push({element:d,datasetIndex:c,index:u}),a=a||d.inRange(e.x,e.y,i))}),o&&!a?[]:r}var fp={evaluateInteractionItems:xn,modes:{index(t,e,n,o){const i=Ft(e,t),r=n.axis||"x",l=n.includeInvisible||!1,a=n.intersect?Gi(t,i,r,o,l):qi(t,i,r,!1,o,l),d=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,f=c.data[u];f&&!f.skip&&d.push({element:f,datasetIndex:c.index,index:u})}),d):[]},dataset(t,e,n,o){const i=Ft(e,t),r=n.axis||"xy",l=n.includeInvisible||!1;let a=n.intersect?Gi(t,i,r,o,l):qi(t,i,r,!1,o,l);if(a.length>0){const d=a[0].datasetIndex,c=t.getDatasetMeta(d).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:d,index:u})}return a},point(t,e,n,o){const i=Ft(e,t),r=n.axis||"xy",l=n.includeInvisible||!1;return Gi(t,i,r,o,l)},nearest(t,e,n,o){const i=Ft(e,t),r=n.axis||"xy",l=n.includeInvisible||!1;return qi(t,i,r,n.intersect,o,l)},x(t,e,n,o){const i=Ft(e,t);return Ll(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=Ft(e,t);return Ll(t,i,"y",n.intersect,o)}}};const zl=["left","top","right","bottom"];function kn(t,e){return t.filter(n=>n.pos===e)}function Hl(t,e){return t.filter(n=>zl.indexOf(n.pos)===-1&&n.box.axis===e)}function Sn(t,e){return t.sort((n,o)=>{const i=e?o:n,r=e?n:o;return i.weight===r.weight?i.index-r.index:i.weight-r.weight})}function hp(t){const e=[];let n,o,i,r,l,a;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:r,options:{stack:l,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:r,horizontal:i.isHorizontal(),weight:i.weight,stack:l&&r+l,stackWeight:a});return e}function pp(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:r}=n;if(!o||!zl.includes(i))continue;const l=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=r}return e}function mp(t,e){const n=pp(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let r,l,a;for(r=0,l=t.length;r<l;++r){a=t[r];const{fullSize:d}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*o:d&&e.availableWidth,a.height=i):(a.width=o,a.height=u?u*i:d&&e.availableHeight)}return n}function gp(t){const e=hp(t),n=Sn(e.filter(c=>c.box.fullSize),!0),o=Sn(kn(e,"left"),!0),i=Sn(kn(e,"right")),r=Sn(kn(e,"top"),!0),l=Sn(kn(e,"bottom")),a=Hl(e,"x"),d=Hl(e,"y");return{fullSize:n,leftAndTop:o.concat(r),rightAndBottom:i.concat(d).concat(l).concat(a),chartArea:kn(e,"chartArea"),vertical:o.concat(i).concat(d),horizontal:r.concat(l).concat(a)}}function jl(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function Wl(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 yp(t,e,n,o){const{pos:i,box:r}=n,l=t.maxPadding;if(!q(i)){n.size&&(t[i]-=n.size);const f=o[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?r.height:r.width),n.size=f.size/f.count,t[i]+=n.size}r.getPadding&&Wl(l,r.getPadding());const a=Math.max(0,e.outerWidth-jl(l,t,"left","right")),d=Math.max(0,e.outerHeight-jl(l,t,"top","bottom")),c=a!==t.w,u=d!==t.h;return t.w=a,t.h=d,n.horizontal?{same:c,other:u}:{same:u,other:c}}function bp(t){const e=t.maxPadding;function n(o){const i=Math.max(e[o]-t[o],0);return t[o]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function $p(t,e){const n=e.maxPadding;function o(i){const r={left:0,top:0,right:0,bottom:0};return i.forEach(l=>{r[l]=Math.max(e[l],n[l])}),r}return o(t?["left","right"]:["top","bottom"])}function vn(t,e,n,o){const i=[];let r,l,a,d,c,u;for(r=0,l=t.length,c=0;r<l;++r){a=t[r],d=a.box,d.update(a.width||e.w,a.height||e.h,$p(a.horizontal,e));const{same:f,other:h}=yp(e,n,a,o);c|=f&&i.length,u=u||h,d.fullSize||i.push(a)}return c&&vn(i,e,n,o)||u}function wo(t,e,n,o,i){t.top=n,t.left=e,t.right=e+o,t.bottom=n+i,t.width=o,t.height=i}function Yl(t,e,n,o){const i=n.padding;let{x:r,y:l}=e;for(const a of t){const d=a.box,c=o[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const f=e.w*u,h=c.size||d.height;hn(c.start)&&(l=c.start),d.fullSize?wo(d,i.left,l,n.outerWidth-i.right-i.left,h):wo(d,e.left+c.placed,l,f,h),c.start=l,c.placed+=f,l=d.bottom}else{const f=e.h*u,h=c.size||d.width;hn(c.start)&&(r=c.start),d.fullSize?wo(d,r,i.top,h,n.outerHeight-i.bottom-i.top):wo(d,r,e.top+c.placed,h,f),c.start=r,c.placed+=f,r=d.right}}e.x=r,e.y=l}var $e={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(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const i=be(t.options.layout.padding),r=Math.max(e-i.width,0),l=Math.max(n-i.height,0),a=gp(t.boxes),d=a.vertical,c=a.horizontal;ee(t.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=d.reduce((g,y)=>y.box.options&&y.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:r,availableHeight:l,vBoxMaxWidth:r/2/u,hBoxMaxHeight:l/2}),h=Object.assign({},i);Wl(h,be(o));const p=Object.assign({maxPadding:h,w:r,h:l,x:i.left,y:i.top},i),m=mp(d.concat(c),f);vn(a.fullSize,p,f,m),vn(d,p,f,m),vn(c,p,f,m)&&vn(d,p,f,m),bp(p),Yl(a.leftAndTop,p,f,m),p.x+=p.w,p.y+=p.h,Yl(a.rightAndBottom,p,f,m),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},ee(a.chartArea,g=>{const y=g.box;Object.assign(y,t.chartArea),y.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Ul{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,i){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(e){return!0}updateConfig(e){}}class _p extends Ul{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Co="$chartjs",wp={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Gl=t=>t===null||t==="";function Cp(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[Co]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Gl(i)){const r=bl(t,"width");r!==void 0&&(t.width=r)}if(Gl(o))if(t.style.height==="")t.height=t.width/(e||2);else{const r=bl(t,"height");r!==void 0&&(t.height=r)}return t}const ql=kh?{passive:!0}:!1;function xp(t,e,n){t&&t.addEventListener(e,n,ql)}function kp(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,ql)}function Sp(t,e){const n=wp[t.type]||t.type,{x:o,y:i}=Ft(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function xo(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function vp(t,e,n){const o=t.canvas,i=new MutationObserver(r=>{let l=!1;for(const a of r)l=l||xo(a.addedNodes,o),l=l&&!xo(a.removedNodes,o);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Mp(t,e,n){const o=t.canvas,i=new MutationObserver(r=>{let l=!1;for(const a of r)l=l||xo(a.removedNodes,o),l=l&&!xo(a.addedNodes,o);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Mn=new Map;let Xl=0;function Kl(){const t=window.devicePixelRatio;t!==Xl&&(Xl=t,Mn.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Dp(t,e){Mn.size||window.addEventListener("resize",Kl),Mn.set(t,e)}function Ep(t){Mn.delete(t),Mn.size||window.removeEventListener("resize",Kl)}function Bp(t,e,n){const o=t.canvas,i=o&&zi(o);if(!i)return;const r=Jr((a,d)=>{const c=i.clientWidth;n(a,d),c<i.clientWidth&&n()},window),l=new ResizeObserver(a=>{const d=a[0],c=d.contentRect.width,u=d.contentRect.height;c===0&&u===0||r(c,u)});return l.observe(i),Dp(t,r),l}function Xi(t,e,n){n&&n.disconnect(),e==="resize"&&Ep(t)}function Vp(t,e,n){const o=t.canvas,i=Jr(r=>{t.ctx!==null&&n(Sp(r,t))},t);return xp(o,e,i),i}class Pp extends Ul{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(Cp(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[Co])return!1;const o=n[Co].initial;["height","width"].forEach(r=>{const l=o[r];Z(l)?n.removeAttribute(r):n.setAttribute(r,l)});const i=o.style||{};return Object.keys(i).forEach(r=>{n.style[r]=i[r]}),n.width=n.width,delete n[Co],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),l={attach:vp,detach:Mp,resize:Bp}[n]||Vp;i[n]=l(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:Xi,detach:Xi,resize:Xi}[n]||kp)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return xh(e,n,o,i)}isAttached(e){const n=zi(e);return!!(n&&n.isConnected)}}function Rp(t){return!Li()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?_p:Pp}let ot=(fi=class{constructor(){I(this,"x");I(this,"y");I(this,"active",!1);I(this,"options");I(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return Ut(this.x)&&Ut(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(r=>{i[r]=o[r]&&o[r].active()?o[r]._to:this[r]}),i}},I(fi,"defaults",{}),I(fi,"defaultRoutes"),fi);function Fp(t,e){const n=t.options.ticks,o=Np(t),i=Math.min(n.maxTicksLimit||o,o),r=n.major.enabled?Op(e):[],l=r.length,a=r[0],d=r[l-1],c=[];if(l>i)return Ip(e,c,r,l/i),c;const u=Ap(r,e,i);if(l>0){let f,h;const p=l>1?Math.round((d-a)/(l-1)):null;for(ko(e,c,u,Z(p)?0:a-p,a),f=0,h=l-1;f<h;f++)ko(e,c,u,r[f],r[f+1]);return ko(e,c,u,d,Z(p)?e.length:d+p),c}return ko(e,c,u),c}function Np(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(o,i))}function Ap(t,e,n){const o=Tp(t),i=e.length/n;if(!o)return Math.max(i,1);const r=Mf(o);for(let l=0,a=r.length-1;l<a;l++){const d=r[l];if(d>i)return d}return Math.max(i,1)}function Op(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function Ip(t,e,n,o){let i=0,r=n[0],l;for(o=Math.ceil(o),l=0;l<t.length;l++)l===r&&(e.push(t[l]),i++,r=n[i*o])}function ko(t,e,n,o,i){const r=Y(o,0),l=Math.min(Y(i,t.length),t.length);let a=0,d,c,u;for(n=Math.ceil(n),i&&(d=i-o,n=d/Math.floor(d/n)),u=r;u<0;)a++,u=Math.round(r+a*n);for(c=Math.max(r,0);c<l;c++)c===u&&(e.push(t[c]),a++,u=Math.round(r+a*n))}function Tp(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const Lp=t=>t==="left"?"right":t==="right"?"left":t,Zl=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,Jl=(t,e)=>Math.min(e||t,t);function Ql(t,e){const n=[],o=t.length/e,i=t.length;let r=0;for(;r<i;r+=o)n.push(t[Math.floor(r)]);return n}function zp(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),r=t._startPixel,l=t._endPixel,a=1e-6;let d=t.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(d-r,l-d):e===0?c=(t.getPixelForTick(1)-d)/2:c=(d-t.getPixelForTick(i-1))/2,d+=i<e?c:-c,d<r-a||d>l+a)))return d}function Hp(t,e){ee(t,n=>{const o=n.gc,i=o.length/2;let r;if(i>e){for(r=0;r<i;++r)delete n.data[o[r]];o.splice(0,i)}})}function Dn(t){return t.drawTicks?t.tickLength:0}function ea(t,e){if(!t.display)return 0;const n=he(t.font,e),o=be(t.padding);return(oe(t.text)?t.text.length:1)*n.lineHeight+o.height}function jp(t,e){return $t(t,{scale:e,type:"scale"})}function Wp(t,e,n){return $t(t,{tick:n,index:e,type:"tick"})}function Yp(t,e,n){let o=Bi(t);return(n&&e!=="right"||!n&&e==="right")&&(o=Lp(o)),o}function Up(t,e,n,o){const{top:i,left:r,bottom:l,right:a,chart:d}=t,{chartArea:c,scales:u}=d;let f=0,h,p,m;const g=l-i,y=a-r;if(t.isHorizontal()){if(p=ye(o,r,a),q(n)){const b=Object.keys(n)[0],$=n[b];m=u[b].getPixelForValue($)+g-e}else n==="center"?m=(c.bottom+c.top)/2+g-e:m=Zl(t,n,e);h=a-r}else{if(q(n)){const b=Object.keys(n)[0],$=n[b];p=u[b].getPixelForValue($)-y+e}else n==="center"?p=(c.left+c.right)/2-y+e:p=Zl(t,n,e);m=ye(o,l,i),f=n==="left"?-ue:ue}return{titleX:p,titleY:m,maxWidth:h,rotation:f}}class It extends ot{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return e=Ee(e,Number.POSITIVE_INFINITY),n=Ee(n,Number.NEGATIVE_INFINITY),o=Ee(o,Number.POSITIVE_INFINITY),i=Ee(i,Number.NEGATIVE_INFINITY),{min:Ee(e,o),max:Ee(n,i),minDefined:de(e),maxDefined:de(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:r}=this.getUserBounds(),l;if(i&&r)return{min:n,max:o};const a=this.getMatchingVisibleMetas();for(let d=0,c=a.length;d<c;++d)l=a[d].controller.getMinMax(this,e),i||(n=Math.min(n,l.min)),r||(o=Math.max(o,l.max));return n=r&&n>o?o:n,o=i&&n>o?n:o,{min:Ee(n,Ee(o,n)),max:Ee(o,Ee(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ne(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:r,ticks:l}=this.options,a=l.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=th(this,r,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=a<this.ticks.length;this._convertTicksToLabels(d?Ql(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=Fp(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ne(this.options.afterUpdate,[this])}beforeSetDimensions(){ne(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(){ne(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ne(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ne(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,i,r;for(o=0,i=e.length;o<i;o++)r=e[o],r.label=ne(n.callback,[r.value,o,e],this)}afterTickToLabelConversion(){ne(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ne(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=Jl(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,r=n.maxRotation;let l=i,a,d,c;if(!this._isVisible()||!n.display||i>=r||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,h=u.highest.height,p=me(this.chart.width-f,0,this.maxWidth);a=e.offset?this.maxWidth/o:p/(o-1),f+6>a&&(a=p/(o-(e.offset?.5:1)),d=this.maxHeight-Dn(e.grid)-n.padding-ea(e.title,this.chart.options.font),c=Math.sqrt(f*f+h*h),l=Mi(Math.min(Math.asin(me((u.highest.height+6)/a,-1,1)),Math.asin(me(d/c,-1,1))-Math.asin(me(h/c,-1,1)))),l=Math.max(i,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){ne(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ne(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:r}}=this,l=this._isVisible(),a=this.isHorizontal();if(l){const d=ea(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=Dn(r)+d):(e.height=this.maxHeight,e.width=Dn(r)+d),o.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:h}=this._getLabelSizes(),p=o.padding*2,m=Ie(this.labelRotation),g=Math.cos(m),y=Math.sin(m);if(a){const b=o.mirror?0:y*f.width+g*h.height;e.height=Math.min(this.maxHeight,e.height+b+p)}else{const b=o.mirror?0:g*f.width+y*h.height;e.width=Math.min(this.maxWidth,e.width+b+p)}this._calculatePadding(c,u,y,g)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,i){const{ticks:{align:r,padding:l},position:a}=this.options,d=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,p=0;d?c?(h=i*e.width,p=o*n.height):(h=o*e.height,p=i*n.width):r==="start"?p=n.width:r==="end"?h=e.width:r!=="inner"&&(h=e.width/2,p=n.width/2),this.paddingLeft=Math.max((h-u+l)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-f+l)*this.width/(this.width-f),0)}else{let u=n.height/2,f=e.height/2;r==="start"?(u=0,f=e.height):r==="end"&&(u=n.height,f=0),this.paddingTop=u+l,this.paddingBottom=f+l}}_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(){ne(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)Z(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=Ql(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:r}=this,l=[],a=[],d=Math.floor(n/Jl(n,o));let c=0,u=0,f,h,p,m,g,y,b,$,w,S,x;for(f=0;f<n;f+=d){if(m=e[f].label,g=this._resolveTickFontOptions(f),i.font=y=g.string,b=r[y]=r[y]||{data:{},gc:[]},$=g.lineHeight,w=S=0,!Z(m)&&!oe(m))w=ao(i,b.data,b.gc,w,m),S=$;else if(oe(m))for(h=0,p=m.length;h<p;++h)x=m[h],!Z(x)&&!oe(x)&&(w=ao(i,b.data,b.gc,w,x),S+=$);l.push(w),a.push(S),c=Math.max(w,c),u=Math.max(S,u)}Hp(r,n);const V=l.indexOf(c),D=a.indexOf(u),F=N=>({width:l[N]||0,height:a[N]||0});return{first:F(0),last:F(n-1),widest:F(V),highest:F(D),widths:l,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Bf(this._alignToPixels?Bt(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=Wp(this.getContext(),e,o))}return this.$context||(this.$context=jp(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Ie(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),r=this._getLabelSizes(),l=e.autoSkipPadding||0,a=r?r.widest.width+l:0,d=r?r.highest.height+l:0;return this.isHorizontal()?d*o>a*i?a/o:d/i:d*i<a*o?d/o:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,i=this.options,{grid:r,position:l,border:a}=i,d=r.offset,c=this.isHorizontal(),f=this.ticks.length+(d?1:0),h=Dn(r),p=[],m=a.setContext(this.getContext()),g=m.display?m.width:0,y=g/2,b=function(k){return Bt(o,k,g)};let $,w,S,x,V,D,F,N,P,C,_,E;if(l==="top")$=b(this.bottom),D=this.bottom-h,N=$-y,C=b(e.top)+y,E=e.bottom;else if(l==="bottom")$=b(this.top),C=e.top,E=b(e.bottom)-y,D=$+y,N=this.top+h;else if(l==="left")$=b(this.right),V=this.right-h,F=$-y,P=b(e.left)+y,_=e.right;else if(l==="right")$=b(this.left),P=e.left,_=b(e.right)-y,V=$+y,F=this.left+h;else if(n==="x"){if(l==="center")$=b((e.top+e.bottom)/2+.5);else if(q(l)){const k=Object.keys(l)[0],B=l[k];$=b(this.chart.scales[k].getPixelForValue(B))}C=e.top,E=e.bottom,D=$+y,N=D+h}else if(n==="y"){if(l==="center")$=b((e.left+e.right)/2);else if(q(l)){const k=Object.keys(l)[0],B=l[k];$=b(this.chart.scales[k].getPixelForValue(B))}V=$-y,F=V-h,P=e.left,_=e.right}const v=Y(i.ticks.maxTicksLimit,f),M=Math.max(1,Math.ceil(f/v));for(w=0;w<f;w+=M){const k=this.getContext(w),B=r.setContext(k),O=a.setContext(k),L=B.lineWidth,T=B.color,W=O.dash||[],U=O.dashOffset,G=B.tickWidth,Q=B.tickColor,le=B.tickBorderDash||[],fe=B.tickBorderDashOffset;S=zp(this,w,d),S!==void 0&&(x=Bt(o,S,L),c?V=F=P=_=x:D=N=C=E=x,p.push({tx1:V,ty1:D,tx2:F,ty2:N,x1:P,y1:C,x2:_,y2:E,width:L,color:T,borderDash:W,borderDashOffset:U,tickWidth:G,tickColor:Q,tickBorderDash:le,tickBorderDashOffset:fe}))}return this._ticksLength=f,this._borderValue=$,p}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:r}=o,l=this.isHorizontal(),a=this.ticks,{align:d,crossAlign:c,padding:u,mirror:f}=r,h=Dn(o.grid),p=h+u,m=f?-u:p,g=-Ie(this.labelRotation),y=[];let b,$,w,S,x,V,D,F,N,P,C,_,E="middle";if(i==="top")V=this.bottom-m,D=this._getXAxisLabelAlignment();else if(i==="bottom")V=this.top+m,D=this._getXAxisLabelAlignment();else if(i==="left"){const M=this._getYAxisLabelAlignment(h);D=M.textAlign,x=M.x}else if(i==="right"){const M=this._getYAxisLabelAlignment(h);D=M.textAlign,x=M.x}else if(n==="x"){if(i==="center")V=(e.top+e.bottom)/2+p;else if(q(i)){const M=Object.keys(i)[0],k=i[M];V=this.chart.scales[M].getPixelForValue(k)+p}D=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")x=(e.left+e.right)/2-p;else if(q(i)){const M=Object.keys(i)[0],k=i[M];x=this.chart.scales[M].getPixelForValue(k)}D=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(d==="start"?E="top":d==="end"&&(E="bottom"));const v=this._getLabelSizes();for(b=0,$=a.length;b<$;++b){w=a[b],S=w.label;const M=r.setContext(this.getContext(b));F=this.getPixelForTick(b)+r.labelOffset,N=this._resolveTickFontOptions(b),P=N.lineHeight,C=oe(S)?S.length:1;const k=C/2,B=M.color,O=M.textStrokeColor,L=M.textStrokeWidth;let T=D;l?(x=F,D==="inner"&&(b===$-1?T=this.options.reverse?"left":"right":b===0?T=this.options.reverse?"right":"left":T="center"),i==="top"?c==="near"||g!==0?_=-C*P+P/2:c==="center"?_=-v.highest.height/2-k*P+P:_=-v.highest.height+P/2:c==="near"||g!==0?_=P/2:c==="center"?_=v.highest.height/2-k*P:_=v.highest.height-C*P,f&&(_*=-1),g!==0&&!M.showLabelBackdrop&&(x+=P/2*Math.sin(g))):(V=F,_=(1-C)*P/2);let W;if(M.showLabelBackdrop){const U=be(M.backdropPadding),G=v.heights[b],Q=v.widths[b];let le=_-U.top,fe=0-U.left;switch(E){case"middle":le-=G/2;break;case"bottom":le-=G;break}switch(D){case"center":fe-=Q/2;break;case"right":fe-=Q;break;case"inner":b===$-1?fe-=Q:b>0&&(fe-=Q/2);break}W={left:fe,top:le,width:Q+U.width,height:G+U.height,color:M.backdropColor}}y.push({label:S,font:N,textOffset:_,options:{rotation:g,color:B,strokeColor:O,strokeWidth:L,textAlign:T,textBaseline:E,translation:[x,V],backdrop:W}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Ie(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:i,padding:r}}=this.options,l=this._getLabelSizes(),a=e+r,d=l.widest.width;let c,u;return n==="left"?i?(u=this.right+r,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u+=d)):(u=this.right-a,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+r,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u-=d)):(u=this.left+a,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:i,width:r,height:l}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,r,l),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(r=>r.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,l;const a=(d,c,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(d.x,d.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(r=0,l=i.length;r<l;++r){const d=i[r];n.drawOnChartArea&&a({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),n.drawTicks&&a({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,r=o.setContext(this.getContext()),l=o.display?r.width:0;if(!l)return;const a=i.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let c,u,f,h;this.isHorizontal()?(c=Bt(e,this.left,l)-l/2,u=Bt(e,this.right,a)+a/2,f=h=d):(f=Bt(e,this.top,l)-l/2,h=Bt(e,this.bottom,a)+a/2,c=u=d),n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.beginPath(),n.moveTo(c,f),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&co(o,i);const r=this.getLabelItems(e);for(const l of r){const a=l.options,d=l.font,c=l.label,u=l.textOffset;Vt(o,c,0,u,d,a)}i&&uo(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const r=he(o.font),l=be(o.padding),a=o.align;let d=r.lineHeight/2;n==="bottom"||n==="center"||q(n)?(d+=l.bottom,oe(o.text)&&(d+=r.lineHeight*(o.text.length-1))):d+=l.top;const{titleX:c,titleY:u,maxWidth:f,rotation:h}=Up(this,d,n,a);Vt(e,o.text,0,0,r,{color:o.color,maxWidth:f,rotation:h,textAlign:Yp(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=Y(e.grid&&e.grid.z,-1),i=Y(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==It.prototype.draw?[{z:n,draw:r=>{this.draw(r)}}]:[{z:o,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let r,l;for(r=0,l=n.length;r<l;++r){const a=n[r];a[o]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return he(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class So{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;Xp(n)&&(o=this.register(n));const i=this.items,r=e.id,l=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+e);return r in i||(i[r]=e,Gp(e,l,o),this.override&&ce.override(e.id,e.overrides)),l}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,i=this.scope;o in n&&delete n[o],i&&o in ce[i]&&(delete ce[i][o],this.override&&delete Et[o])}}function Gp(t,e,n){const o=un(Object.create(null),[n?ce.get(n):{},ce.get(e),t.defaults]);ce.set(e,o),t.defaultRoutes&&qp(e,t.defaultRoutes),t.descriptors&&ce.describe(e,t.descriptors)}function qp(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),r=[t].concat(o).join("."),l=e[n].split("."),a=l.pop(),d=l.join(".");ce.route(r,i,d,a)})}function Xp(t){return"id"in t&&"defaults"in t}class Kp{constructor(){this.controllers=new So(Te,"datasets",!0),this.elements=new So(ot,"elements"),this.plugins=new So(Object,"plugins"),this.scales=new So(It,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(i=>{const r=o||this._getRegistryForType(i);o||r.isForType(i)||r===this.plugins&&i.id?this._exec(e,r,i):ee(i,l=>{const a=o||this._getRegistryForType(l);this._exec(e,a,l)})})}_exec(e,n,o){const i=vi(e);ne(o["before"+i],[],o),n[e](o),ne(o["after"+i],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return i}}var Ue=new Kp;class Zp{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const r=i?this._descriptors(e).filter(i):this._descriptors(e),l=this._notify(r,e,n,o);return n==="afterDestroy"&&(this._notify(r,e,"stop"),this._notify(this._init,e,"uninstall")),l}_notify(e,n,o,i){i=i||{};for(const r of e){const l=r.plugin,a=l[o],d=[n,i,r.options];if(ne(a,d,l)===!1&&i.cancelable)return!1}return!0}invalidate(){Z(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,i=Y(o.options&&o.options.plugins,{}),r=Jp(o);return i===!1&&!n?[]:em(e,r,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(r,l)=>r.filter(a=>!l.some(d=>a.plugin.id===d.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function Jp(t){const e={},n=[],o=Object.keys(Ue.plugins.items);for(let r=0;r<o.length;r++)n.push(Ue.getPlugin(o[r]));const i=t.plugins||[];for(let r=0;r<i.length;r++){const l=i[r];n.indexOf(l)===-1&&(n.push(l),e[l.id]=!0)}return{plugins:n,localIds:e}}function Qp(t,e){return!e&&t===!1?null:t===!0?{}:t}function em(t,{plugins:e,localIds:n},o,i){const r=[],l=t.getContext();for(const a of e){const d=a.id,c=Qp(o[d],i);c!==null&&r.push({plugin:a,options:tm(t.config,{plugin:a,local:n[d]},c,l)})}return r}function tm(t,{plugin:e,local:n},o,i){const r=t.pluginScopeKeys(e),l=t.getOptionScopes(o,r);return n&&e.defaults&&l.push(e.defaults),t.createResolver(l,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ki(t,e){const n=ce.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function nm(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function om(t,e){return t===e?"_index_":"_value_"}function ta(t){if(t==="x"||t==="y"||t==="r")return t}function im(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Zi(t,...e){if(ta(t))return t;for(const n of e){const o=n.axis||im(n.position)||t.length>1&&ta(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function na(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function sm(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return na(t,"x",n[0])||na(t,"y",n[0])}return{}}function rm(t,e){const n=Et[t.type]||{scales:{}},o=e.scales||{},i=Ki(t.type,e),r=Object.create(null);return Object.keys(o).forEach(l=>{const a=o[l];if(!q(a))return console.error(`Invalid scale configuration for scale: ${l}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);const d=Zi(l,a,sm(l,t),ce.scales[a.type]),c=om(d,i),u=n.scales||{};r[l]=fn(Object.create(null),[{axis:d},a,u[d],u[c]])}),t.data.datasets.forEach(l=>{const a=l.type||t.type,d=l.indexAxis||Ki(a,e),u=(Et[a]||{}).scales||{};Object.keys(u).forEach(f=>{const h=nm(f,d),p=l[h+"AxisID"]||h;r[p]=r[p]||Object.create(null),fn(r[p],[{axis:h},o[p],u[f]])})}),Object.keys(r).forEach(l=>{const a=r[l];fn(a,[ce.scales[a.type],ce.scale])}),r}function oa(t){const e=t.options||(t.options={});e.plugins=Y(e.plugins,{}),e.scales=rm(t,e)}function ia(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function lm(t){return t=t||{},t.data=ia(t.data),oa(t),t}const sa=new Map,ra=new Set;function vo(t,e){let n=sa.get(t);return n||(n=e(),sa.set(t,n),ra.add(n)),n}const En=(t,e,n)=>{const o=gt(e,n);o!==void 0&&t.add(o)};class am{constructor(e){this._config=lm(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=ia(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),oa(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return vo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return vo(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return vo(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return vo(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let i=o.get(e);return(!i||n)&&(i=new Map,o.set(e,i)),i}getOptionScopes(e,n,o){const{options:i,type:r}=this,l=this._cachedScopes(e,o),a=l.get(n);if(a)return a;const d=new Set;n.forEach(u=>{e&&(d.add(e),u.forEach(f=>En(d,e,f))),u.forEach(f=>En(d,i,f)),u.forEach(f=>En(d,Et[r]||{},f)),u.forEach(f=>En(d,ce,f)),u.forEach(f=>En(d,Ri,f))});const c=Array.from(d);return c.length===0&&c.push(Object.create(null)),ra.has(n)&&l.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,Et[n]||{},ce.datasets[n]||{},{type:n},ce,Ri]}resolveNamedOptions(e,n,o,i=[""]){const r={$shared:!0},{resolver:l,subPrefixes:a}=la(this._resolverCache,e,i);let d=l;if(cm(l,n)){r.$shared=!1,o=yt(o)?o():o;const c=this.createResolver(e,o,a);d=Gt(l,o,c)}for(const c of n)r[c]=d[c];return r}createResolver(e,n,o=[""],i){const{resolver:r}=la(this._resolverCache,e,o);return q(n)?Gt(r,n,void 0,i):r}}function la(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let r=o.get(i);return r||(r={resolver:Oi(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},o.set(i,r)),r}const dm=t=>q(t)&&Object.getOwnPropertyNames(t).some(e=>yt(t[e]));function cm(t,e){const{isScriptable:n,isIndexable:o}=dl(t);for(const i of e){const r=n(i),l=o(i),a=(l||r)&&t[i];if(r&&(yt(a)||dm(a))||l&&oe(a))return!0}return!1}var um="4.4.2";const fm=["top","bottom","left","right","chartArea"];function aa(t,e){return t==="top"||t==="bottom"||fm.indexOf(t)===-1&&e==="x"}function da(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function ca(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ne(n&&n.onComplete,[t],e)}function hm(t){const e=t.chart,n=e.options.animation;ne(n&&n.onProgress,[t],e)}function ua(t){return Li()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Mo={},fa=t=>{const e=ua(t);return Object.values(Mo).filter(n=>n.canvas===e).pop()};function pm(t,e,n){const o=Object.keys(t);for(const i of o){const r=+i;if(r>=e){const l=t[i];delete t[i],(n>0||r>e)&&(t[r+n]=l)}}}function mm(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function Do(t,e,n){return t.options.clip?t[n]:e[n]}function gm(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:Do(n,e,"left"),right:Do(n,e,"right"),top:Do(o,e,"top"),bottom:Do(o,e,"bottom")}:e}class Le{static register(...e){Ue.add(...e),ha()}static unregister(...e){Ue.remove(...e),ha()}constructor(e,n){const o=this.config=new am(n),i=ua(e),r=fa(i);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const l=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Rp(i)),this.platform.updateConfig(o);const a=this.platform.acquireContext(i,l.aspectRatio),d=a&&a.canvas,c=d&&d.height,u=d&&d.width;if(this.id=bf(),this.ctx=a,this.canvas=d,this.width=u,this.height=c,this._options=l,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 Zp,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Ff(f=>this.update(f),l.resizeDelay||0),this._dataChanges=[],Mo[this.id]=this,!a||!d){console.error("Failed to create chart: can't acquire context from the given item");return}nt.listen(this,"complete",ca),nt.listen(this,"progress",hm),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:r}=this;return Z(e)?n&&r?r:i?o/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Ue}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():yl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return rl(this.canvas,this.ctx),this}stop(){return nt.stop(this),this}resize(e,n){nt.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,r=o.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(i,e,n,r),a=o.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,yl(this,a,!0)&&(this.notifyPlugins("resize",{size:l}),ne(o.onResize,[this,l],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ee(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((l,a)=>(l[a]=!1,l),{});let r=[];n&&(r=r.concat(Object.keys(n).map(l=>{const a=n[l],d=Zi(l,a),c=d==="r",u=d==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),ee(r,l=>{const a=l.options,d=a.id,c=Zi(d,a),u=Y(a.type,l.dtype);(a.position===void 0||aa(a.position,c)!==aa(l.dposition))&&(a.position=l.dposition),i[d]=!0;let f=null;if(d in o&&o[d].type===u)f=o[d];else{const h=Ue.getScale(u);f=new h({id:d,type:u,ctx:this.ctx,chart:this}),o[f.id]=f}f.init(a,e)}),ee(i,(l,a)=>{l||delete o[a]}),ee(o,l=>{$e.configure(this,l,l.options),$e.addBox(this,l)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,r)=>i.index-r.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort(da("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(r=>r===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const r=n[o];let l=this.getDatasetMeta(o);const a=r.type||this.config.type;if(l.type&&l.type!==a&&(this._destroyDatasetMeta(o),l=this.getDatasetMeta(o)),l.type=a,l.indexAxis=r.indexAxis||Ki(a,this.options),l.order=r.order||0,l.index=o,l.label=""+r.label,l.visible=this.isDatasetVisible(o),l.controller)l.controller.updateIndex(o),l.controller.linkScales();else{const d=Ue.getController(a),{datasetElementType:c,dataElementType:u}=ce.datasets[a];Object.assign(d,{dataElementType:Ue.getElement(u),datasetElementType:c&&Ue.getElement(c)}),l.controller=new d(this,o),e.push(l.controller)}}return this._updateMetasets(),e}_resetElements(){ee(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),h=!i&&r.indexOf(f)===-1;f.buildOrUpdateElements(h),l=Math.max(+f.getMaxOverflow(),l)}l=this._minPadding=o.layout.autoPadding?l:0,this._updateLayout(l),i||ee(r,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(da("z","_idx"));const{_active:a,_lastEvent:d}=this;d?this._eventHandler(d,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ee(this.scales,e=>{$e.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!Hr(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:r}of n){const l=o==="_removeElements"?-r:r;pm(e,i,l)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=r=>new Set(e.filter(l=>l[0]===r).map((l,a)=>a+","+l.splice(1).join(","))),i=o(0);for(let r=1;r<n;r++)if(!Hr(i,o(r)))return;return Array.from(i).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;$e.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],ee(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,r)=>{i._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,yt(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),i={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(nt.has(this)?this.attached&&!nt.running(this)&&nt.start(this):(this.draw(),ca({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resize(o,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let i,r;for(i=0,r=n.length;i<r;++i){const l=n[i];(!e||l.visible)&&o.push(l)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o=e._clip,i=!o.disabled,r=gm(e,this.chartArea),l={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",l)!==!1&&(i&&co(n,{left:o.left===!1?0:r.left-o.left,right:o.right===!1?this.width:r.right+o.right,top:o.top===!1?0:r.top-o.top,bottom:o.bottom===!1?this.height:r.bottom+o.bottom}),e.controller.draw(),i&&uo(n),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(e){return tt(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const r=fp.modes[n];return typeof r=="function"?r(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(r=>r&&r._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=$t(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const i=o?"show":"hide",r=this.getDatasetMeta(e),l=r.controller._resolveAnimations(void 0,i);hn(n)?(r.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),l.update(r,{visible:o}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),nt.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),rl(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Mo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(r,l)=>{n.addEventListener(this,r,l),e[r]=l},i=(r,l,a)=>{r.offsetX=l,r.offsetY=a,this._eventHandler(r)};ee(this.options.events,r=>o(r,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(d,c)=>{n.addEventListener(this,d,c),e[d]=c},i=(d,c)=>{e[d]&&(n.removeEventListener(this,d,c),delete e[d])},r=(d,c)=>{this.canvas&&this.resize(d,c)};let l;const a=()=>{i("attach",a),this.attached=!0,this.resize(),o("resize",r),o("detach",l)};l=()=>{this.attached=!1,i("resize",r),this._stop(),this._resize(0,0),o("attach",a)},n.isAttached(this.canvas)?a():l()}unbindEvents(){ee(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},ee(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let r,l,a,d;for(n==="dataset"&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+i+"DatasetHoverStyle"]()),a=0,d=e.length;a<d;++a){l=e[a];const c=l&&this.getDatasetMeta(l.datasetIndex).controller;c&&c[i+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:r,index:l})=>{const a=this.getDatasetMeta(r);if(!a)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:a.data[l],index:l}});!oo(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const i=this.options.hover,r=(d,c)=>d.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),l=r(n,e),a=o?e:r(e,n);l.length&&this.updateHoverStyle(l,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=l=>(l.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const r=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(r||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:r}=this,l=n,a=this._getActiveElements(e,i,o,l),d=kf(e),c=mm(e,this._lastEvent,o,d);o&&(this._lastEvent=null,ne(r.onHover,[e,a,this],this),d&&ne(r.onClick,[e,a,this],this));const u=!oo(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,i)}}I(Le,"defaults",ce),I(Le,"instances",Mo),I(Le,"overrides",Et),I(Le,"registry",Ue),I(Le,"version",um),I(Le,"getChart",fa);function ha(){return ee(Le.instances,t=>t._plugins.invalidate())}function ym(t,e,n){const{startAngle:o,pixelMargin:i,x:r,y:l,outerRadius:a,innerRadius:d}=e;let c=i/a;t.beginPath(),t.arc(r,l,a,o-c,n+c),d>i?(c=i/d,t.arc(r,l,d,n+c,o-c,!0)):t.arc(r,l,i,n+ue,o-ue),t.closePath(),t.clip()}function bm(t){return Ai(t,["outerStart","outerEnd","innerStart","innerEnd"])}function $m(t,e,n,o){const i=bm(t.options.borderRadius),r=(n-e)/2,l=Math.min(r,o*e/2),a=d=>{const c=(n-Math.min(r,d))*o/2;return me(d,0,Math.min(r,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:me(i.innerStart,0,l),innerEnd:me(i.innerEnd,0,l)}}function Kt(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Eo(t,e,n,o,i,r){const{x:l,y:a,startAngle:d,pixelMargin:c,innerRadius:u}=e,f=Math.max(e.outerRadius+o+n-c,0),h=u>0?u+o+n+c:0;let p=0;const m=i-d;if(o){const M=u>0?u-o:0,k=f>0?f-o:0,B=(M+k)/2,O=B!==0?m*B/(B+o):m;p=(m-O)/2}const g=Math.max(.001,m*f-n/ie)/f,y=(m-g)/2,b=d+y+p,$=i-y-p,{outerStart:w,outerEnd:S,innerStart:x,innerEnd:V}=$m(e,h,f,$-b),D=f-w,F=f-S,N=b+w/D,P=$-S/F,C=h+x,_=h+V,E=b+x/C,v=$-V/_;if(t.beginPath(),r){const M=(N+P)/2;if(t.arc(l,a,f,N,M),t.arc(l,a,f,M,P),S>0){const L=Kt(F,P,l,a);t.arc(L.x,L.y,S,P,$+ue)}const k=Kt(_,$,l,a);if(t.lineTo(k.x,k.y),V>0){const L=Kt(_,v,l,a);t.arc(L.x,L.y,V,$+ue,v+Math.PI)}const B=($-V/h+(b+x/h))/2;if(t.arc(l,a,h,$-V/h,B,!0),t.arc(l,a,h,B,b+x/h,!0),x>0){const L=Kt(C,E,l,a);t.arc(L.x,L.y,x,E+Math.PI,b-ue)}const O=Kt(D,b,l,a);if(t.lineTo(O.x,O.y),w>0){const L=Kt(D,N,l,a);t.arc(L.x,L.y,w,b-ue,N)}}else{t.moveTo(l,a);const M=Math.cos(N)*f+l,k=Math.sin(N)*f+a;t.lineTo(M,k);const B=Math.cos(P)*f+l,O=Math.sin(P)*f+a;t.lineTo(B,O)}t.closePath()}function _m(t,e,n,o,i){const{fullCircles:r,startAngle:l,circumference:a}=e;let d=e.endAngle;if(r){Eo(t,e,n,o,d,i);for(let c=0;c<r;++c)t.fill();isNaN(a)||(d=l+(a%se||se))}return Eo(t,e,n,o,d,i),t.fill(),d}function wm(t,e,n,o,i){const{fullCircles:r,startAngle:l,circumference:a,options:d}=e,{borderWidth:c,borderJoinStyle:u,borderDash:f,borderDashOffset:h}=d,p=d.borderAlign==="inner";if(!c)return;t.setLineDash(f||[]),t.lineDashOffset=h,p?(t.lineWidth=c*2,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let m=e.endAngle;if(r){Eo(t,e,n,o,m,i);for(let g=0;g<r;++g)t.stroke();isNaN(a)||(m=l+(a%se||se))}p&&ym(t,e,m),r||(Eo(t,e,n,o,m,i),t.stroke())}class Bn extends ot{constructor(n){super();I(this,"circumference");I(this,"endAngle");I(this,"fullCircles");I(this,"innerRadius");I(this,"outerRadius");I(this,"pixelMargin");I(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,o,i){const r=this.getProps(["x","y"],i),{angle:l,distance:a}=Gr(r,{x:n,y:o}),{startAngle:d,endAngle:c,innerRadius:u,outerRadius:f,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,g=Y(h,c-d)>=se||mn(l,d,c),y=Qe(a,u+p,f+p);return g&&y}getCenterPoint(n){const{x:o,y:i,startAngle:r,endAngle:l,innerRadius:a,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,f=(r+l)/2,h=(a+d+u+c)/2;return{x:o+Math.cos(f)*h,y:i+Math.sin(f)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,r=(o.offset||0)/4,l=(o.spacing||0)/2,a=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>se?Math.floor(i/se):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*r,Math.sin(d)*r);const c=1-Math.sin(Math.min(ie,i||0)),u=r*c;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,_m(n,this,u,l,a),wm(n,this,u,l,a),n.restore()}}I(Bn,"id","arc"),I(Bn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),I(Bn,"defaultRoutes",{backgroundColor:"backgroundColor"}),I(Bn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function pa(t,e,n=e){t.lineCap=Y(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Y(n.borderDash,e.borderDash)),t.lineDashOffset=Y(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Y(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Y(n.borderWidth,e.borderWidth),t.strokeStyle=Y(n.borderColor,e.borderColor)}function Cm(t,e,n){t.lineTo(n.x,n.y)}function xm(t){return t.stepped?Uf:t.tension||t.cubicInterpolationMode==="monotone"?Gf:Cm}function ma(t,e,n={}){const o=t.length,{start:i=0,end:r=o-1}=n,{start:l,end:a}=e,d=Math.max(i,l),c=Math.min(r,a),u=i<l&&r<l||i>a&&r>a;return{count:o,start:d,loop:e.loop,ilen:c<d&&!u?o+c-d:c-d}}function km(t,e,n,o){const{points:i,options:r}=e,{count:l,start:a,loop:d,ilen:c}=ma(i,n,o),u=xm(r);let{move:f=!0,reverse:h}=o||{},p,m,g;for(p=0;p<=c;++p)m=i[(a+(h?c-p:p))%l],!m.skip&&(f?(t.moveTo(m.x,m.y),f=!1):u(t,g,m,h,r.stepped),g=m);return d&&(m=i[(a+(h?c:0))%l],u(t,g,m,h,r.stepped)),!!d}function Sm(t,e,n,o){const i=e.points,{count:r,start:l,ilen:a}=ma(i,n,o),{move:d=!0,reverse:c}=o||{};let u=0,f=0,h,p,m,g,y,b;const $=S=>(l+(c?a-S:S))%r,w=()=>{g!==y&&(t.lineTo(u,y),t.lineTo(u,g),t.lineTo(u,b))};for(d&&(p=i[$(0)],t.moveTo(p.x,p.y)),h=0;h<=a;++h){if(p=i[$(h)],p.skip)continue;const S=p.x,x=p.y,V=S|0;V===m?(x<g?g=x:x>y&&(y=x),u=(f*u+S)/++f):(w(),t.lineTo(S,x),m=V,f=0,g=y=x),b=x}w()}function Ji(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Sm:km}function vm(t){return t.stepped?Sh:t.tension||t.cubicInterpolationMode==="monotone"?vh:Nt}function Mm(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),pa(t,e.options),t.stroke(i)}function Dm(t,e,n,o){const{segments:i,options:r}=e,l=Ji(e);for(const a of i)pa(t,r,a.style),t.beginPath(),l(t,e,a,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const Em=typeof Path2D=="function";function Bm(t,e,n,o){Em&&!e.options.segment?Mm(t,e,n,o):Dm(t,e,n,o)}class _t extends ot{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;yh(this._points,o,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Ph(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,i=e[n],r=this.points,l=kl(this,{property:n,start:i,end:i});if(!l.length)return;const a=[],d=vm(o);let c,u;for(c=0,u=l.length;c<u;++c){const{start:f,end:h}=l[c],p=r[f],m=r[h];if(p===m){a.push(p);continue}const g=Math.abs((i-p[n])/(m[n]-p[n])),y=d(p,m,g,o.stepped);y[n]=e[n],a.push(y)}return a.length===1?a[0]:a}pathSegment(e,n,o){return Ji(this)(e,this,n,o)}path(e,n,o){const i=this.segments,r=Ji(this);let l=this._loop;n=n||0,o=o||this.points.length-n;for(const a of i)l&=r(e,this,a,{start:n,end:n+o-1});return!!l}draw(e,n,o,i){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(e.save(),Bm(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}I(_t,"id","line"),I(_t,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),I(_t,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),I(_t,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function ga(t,e,n,o){const i=t.options,{[n]:r}=t.getProps([n],o);return Math.abs(e-r)<i.radius+i.hitRadius}class Bo extends ot{constructor(n){super();I(this,"parsed");I(this,"skip");I(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,i){const r=this.options,{x:l,y:a}=this.getProps(["x","y"],i);return Math.pow(n-l,2)+Math.pow(o-a,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(n,o){return ga(this,n,"x",o)}inYRange(n,o){return ga(this,n,"y",o)}getCenterPoint(n){const{x:o,y:i}=this.getProps(["x","y"],n);return{x:o,y:i}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const i=o&&n.borderWidth||0;return(o+i)*2}draw(n,o){const i=this.options;this.skip||i.radius<.1||!tt(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,Ni(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}I(Bo,"id","point"),I(Bo,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),I(Bo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function ya(t,e){const{x:n,y:o,base:i,width:r,height:l}=t.getProps(["x","y","base","width","height"],e);let a,d,c,u,f;return t.horizontal?(f=l/2,a=Math.min(n,i),d=Math.max(n,i),c=o-f,u=o+f):(f=r/2,a=n-f,d=n+f,c=Math.min(o,i),u=Math.max(o,i)),{left:a,top:c,right:d,bottom:u}}function wt(t,e,n,o){return t?0:me(e,n,o)}function Vm(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,r=al(o);return{t:wt(i.top,r.top,0,n),r:wt(i.right,r.right,0,e),b:wt(i.bottom,r.bottom,0,n),l:wt(i.left,r.left,0,e)}}function Pm(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,r=Pt(i),l=Math.min(e,n),a=t.borderSkipped,d=o||q(i);return{topLeft:wt(!d||a.top||a.left,r.topLeft,0,l),topRight:wt(!d||a.top||a.right,r.topRight,0,l),bottomLeft:wt(!d||a.bottom||a.left,r.bottomLeft,0,l),bottomRight:wt(!d||a.bottom||a.right,r.bottomRight,0,l)}}function Rm(t){const e=ya(t),n=e.right-e.left,o=e.bottom-e.top,i=Vm(t,n/2,o/2),r=Pm(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:r},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,r.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(i.b,i.r))}}}}function Qi(t,e,n,o){const i=e===null,r=n===null,a=t&&!(i&&r)&&ya(t,o);return a&&(i||Qe(e,a.left,a.right))&&(r||Qe(n,a.top,a.bottom))}function Fm(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function Nm(t,e){t.rect(e.x,e.y,e.w,e.h)}function es(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,r=(t.x+t.w!==n.x+n.w?e:0)-o,l=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+r,h:t.h+l,radius:t.radius}}class Vo extends ot{constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:r,outer:l}=Rm(this),a=Fm(l.radius)?$n:Nm;e.save(),(l.w!==r.w||l.h!==r.h)&&(e.beginPath(),a(e,es(l,n,r)),e.clip(),a(e,es(r,-n,l)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),a(e,es(r,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return Qi(this,e,n,o)}inXRange(e,n){return Qi(this,e,null,n)}inYRange(e,n){return Qi(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:r}=this.getProps(["x","y","base","horizontal"],e);return{x:r?(n+i)/2:n,y:r?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}I(Vo,"id","bar"),I(Vo,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),I(Vo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Am=Object.freeze({__proto__:null,ArcElement:Bn,BarElement:Vo,LineElement:_t,PointElement:Bo});const ts=["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)"],ba=ts.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function $a(t){return ts[t%ts.length]}function _a(t){return ba[t%ba.length]}function Om(t,e){return t.borderColor=$a(e),t.backgroundColor=_a(e),++e}function Im(t,e){return t.backgroundColor=t.data.map(()=>$a(e++)),e}function Tm(t,e){return t.backgroundColor=t.data.map(()=>_a(e++)),e}function Lm(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof At?e=Im(n,e):i instanceof Cn?e=Tm(n,e):i&&(e=Om(n,e))}}function wa(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function zm(t){return t&&(t.borderColor||t.backgroundColor)}var Hm={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:r}=i;if(!n.forceOverride&&(wa(o)||zm(i)||r&&wa(r)))return;const l=Lm(t);o.forEach(l)}};function jm(t,e,n,o,i){const r=i.samples||o;if(r>=n)return t.slice(e,e+n);const l=[],a=(n-2)/(r-2);let d=0;const c=e+n-1;let u=e,f,h,p,m,g;for(l[d++]=t[u],f=0;f<r-2;f++){let y=0,b=0,$;const w=Math.floor((f+1)*a)+1+e,S=Math.min(Math.floor((f+2)*a)+1,n)+e,x=S-w;for($=w;$<S;$++)y+=t[$].x,b+=t[$].y;y/=x,b/=x;const V=Math.floor(f*a)+1+e,D=Math.min(Math.floor((f+1)*a)+1,n)+e,{x:F,y:N}=t[u];for(p=m=-1,$=V;$<D;$++)m=.5*Math.abs((F-y)*(t[$].y-N)-(F-t[$].x)*(b-N)),m>p&&(p=m,h=t[$],g=$);l[d++]=h,u=g}return l[d++]=t[c],l}function Wm(t,e,n,o){let i=0,r=0,l,a,d,c,u,f,h,p,m,g;const y=[],b=e+n-1,$=t[e].x,S=t[b].x-$;for(l=e;l<e+n;++l){a=t[l],d=(a.x-$)/S*o,c=a.y;const x=d|0;if(x===u)c<m?(m=c,f=l):c>g&&(g=c,h=l),i=(r*i+a.x)/++r;else{const V=l-1;if(!Z(f)&&!Z(h)){const D=Math.min(f,h),F=Math.max(f,h);D!==p&&D!==V&&y.push({...t[D],x:i}),F!==p&&F!==V&&y.push({...t[F],x:i})}l>0&&V!==p&&y.push(t[V]),y.push(a),u=x,r=0,m=g=c,f=h=p=l}}return y}function Ca(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function xa(t){t.data.datasets.forEach(e=>{Ca(e)})}function Ym(t,e){const n=e.length;let o=0,i;const{iScale:r}=t,{min:l,max:a,minDefined:d,maxDefined:c}=r.getUserBounds();return d&&(o=me(et(e,r.axis,l).lo,0,n-1)),c?i=me(et(e,r.axis,a).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var Um={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){xa(t);return}const o=t.width;t.data.datasets.forEach((i,r)=>{const{_data:l,indexAxis:a}=i,d=t.getDatasetMeta(r),c=l||i.data;if(_n([a,t.options.indexAxis])==="y"||!d.controller.supportsDecimation)return;const u=t.scales[d.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:f,count:h}=Ym(d,c);const p=n.threshold||4*o;if(h<=p){Ca(i);return}Z(l)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let m;switch(n.algorithm){case"lttb":m=jm(c,f,h,o,n);break;case"min-max":m=Wm(c,f,h,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=m})},destroy(t){xa(t)}};function Gm(t,e,n){const o=t.segments,i=t.points,r=e.points,l=[];for(const a of o){let{start:d,end:c}=a;c=os(d,c,i);const u=ns(n,i[d],i[c],a.loop);if(!e.segments){l.push({source:a,target:u,start:i[d],end:i[c]});continue}const f=kl(e,u);for(const h of f){const p=ns(n,r[h.start],r[h.end],h.loop),m=xl(a,i,p);for(const g of m)l.push({source:g,target:h,start:{[n]:ka(u,p,"start",Math.max)},end:{[n]:ka(u,p,"end",Math.min)}})}}return l}function ns(t,e,n,o){if(o)return;let i=e[t],r=n[t];return t==="angle"&&(i=Be(i),r=Be(r)),{property:t,start:i,end:r}}function qm(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,r=[];return e.segments.forEach(({start:l,end:a})=>{a=os(l,a,i);const d=i[l],c=i[a];o!==null?(r.push({x:d.x,y:o}),r.push({x:c.x,y:o})):n!==null&&(r.push({x:n,y:d.y}),r.push({x:n,y:c.y}))}),r}function os(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function ka(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function Sa(t,e){let n=[],o=!1;return oe(t)?(o=!0,n=t):n=qm(t,e),n.length?new _t({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function va(t){return t&&t.fill!==!1}function Xm(t,e,n){let i=t[e].fill;const r=[e];let l;if(!n)return i;for(;i!==!1&&r.indexOf(i)===-1;){if(!de(i))return i;if(l=t[i],!l)return!1;if(l.visible)return i;r.push(i),i=l.fill}return!1}function Km(t,e,n){const o=e0(t);if(q(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return de(i)&&Math.floor(i)===i?Zm(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function Zm(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function Jm(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:q(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function Qm(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:q(t)?o=t.value:o=e.getBaseValue(),o}function e0(t){const e=t.options,n=e.fill;let o=Y(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function t0(t){const{scale:e,index:n,line:o}=t,i=[],r=o.segments,l=o.points,a=n0(e,n);a.push(Sa({x:null,y:e.bottom},o));for(let d=0;d<r.length;d++){const c=r[d];for(let u=c.start;u<=c.end;u++)o0(i,l[u],a)}return new _t({points:i,options:{}})}function n0(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const r=o[i];if(r.index===e)break;r.hidden||n.unshift(r.dataset)}return n}function o0(t,e,n){const o=[];for(let i=0;i<n.length;i++){const r=n[i],{first:l,last:a,point:d}=i0(r,e,"x");if(!(!d||l&&a)){if(l)o.unshift(d);else if(t.push(d),!a)break}}t.push(...o)}function i0(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],r=t.segments,l=t.points;let a=!1,d=!1;for(let c=0;c<r.length;c++){const u=r[c],f=l[u.start][n],h=l[u.end][n];if(Qe(i,f,h)){a=i===f,d=i===h;break}}return{first:a,last:d,point:o}}class Ma{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:r,radius:l}=this;return n=n||{start:0,end:se},e.arc(i,r,l,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,r=e.angle;return{x:n+Math.cos(r)*i,y:o+Math.sin(r)*i,angle:r}}}function s0(t){const{chart:e,fill:n,line:o}=t;if(de(n))return r0(e,n);if(n==="stack")return t0(t);if(n==="shape")return!0;const i=l0(t);return i instanceof Ma?i:Sa(i,o)}function r0(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function l0(t){return(t.scale||{}).getPointPositionForValue?d0(t):a0(t)}function a0(t){const{scale:e={},fill:n}=t,o=Jm(n,e);if(de(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function d0(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,r=o.reverse?e.max:e.min,l=Qm(n,e,r),a=[];if(o.grid.circular){const d=e.getPointPositionForValue(0,r);return new Ma({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(l)})}for(let d=0;d<i;++d)a.push(e.getPointPositionForValue(d,l));return a}function is(t,e,n){const o=s0(e),{line:i,scale:r,axis:l}=e,a=i.options,d=a.fill,c=a.backgroundColor,{above:u=c,below:f=c}=d||{};o&&i.points.length&&(co(t,n),c0(t,{line:i,target:o,above:u,below:f,area:n,scale:r,axis:l}),uo(t))}function c0(t,e){const{line:n,target:o,above:i,below:r,area:l,scale:a}=e,d=n._loop?"angle":e.axis;t.save(),d==="x"&&r!==i&&(Da(t,o,l.top),Ea(t,{line:n,target:o,color:i,scale:a,property:d}),t.restore(),t.save(),Da(t,o,l.bottom)),Ea(t,{line:n,target:o,color:r,scale:a,property:d}),t.restore()}function Da(t,e,n){const{segments:o,points:i}=e;let r=!0,l=!1;t.beginPath();for(const a of o){const{start:d,end:c}=a,u=i[d],f=i[os(d,c,i)];r?(t.moveTo(u.x,u.y),r=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),l=!!e.pathSegment(t,a,{move:l}),l?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Ea(t,e){const{line:n,target:o,property:i,color:r,scale:l}=e,a=Gm(n,o,i);for(const{source:d,target:c,start:u,end:f}of a){const{style:{backgroundColor:h=r}={}}=d,p=o!==!0;t.save(),t.fillStyle=h,u0(t,l,p&&ns(i,u,f)),t.beginPath();const m=!!n.pathSegment(t,d);let g;if(p){m?t.closePath():Ba(t,o,f,i);const y=!!o.pathSegment(t,c,{move:m,reverse:!0});g=m&&y,g||Ba(t,o,u,i)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function u0(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:r,start:l,end:a}=n||{};r==="x"&&(t.beginPath(),t.rect(l,o,a-l,i-o),t.clip())}function Ba(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var f0={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let r,l,a,d;for(l=0;l<o;++l)r=t.getDatasetMeta(l),a=r.dataset,d=null,a&&a.options&&a instanceof _t&&(d={visible:t.isDatasetVisible(l),index:l,fill:Km(a,l,o),chart:t,axis:r.controller.options.indexAxis,scale:r.vScale,line:a}),r.$filler=d,i.push(d);for(l=0;l<o;++l)d=i[l],!(!d||d.fill===!1)&&(d.fill=Xm(i,l,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),r=t.chartArea;for(let l=i.length-1;l>=0;--l){const a=i[l].$filler;a&&(a.line.updateControlPoints(r,a.axis),o&&a.fill&&is(t.ctx,a,r))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const r=o[i].$filler;va(r)&&is(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!va(o)||n.drawTime!=="beforeDatasetDraw"||is(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Va=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},h0=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Pa extends ot{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,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 e=this.options.labels||{};let n=ne(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,i)=>e.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,i=he(o.font),r=i.size,l=this._computeTitleHeight(),{boxWidth:a,itemHeight:d}=Va(o,r);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(l,r,a,d)+10):(u=this.maxHeight,c=this._fitCols(l,i,a,d)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:r,maxWidth:l,options:{labels:{padding:a}}}=this,d=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let f=e;r.textAlign="left",r.textBaseline="middle";let h=-1,p=-u;return this.legendItems.forEach((m,g)=>{const y=o+n/2+r.measureText(m.text).width;(g===0||c[c.length-1]+y+2*a>l)&&(f+=u,c[c.length-(g>0?0:1)]=0,p+=u,h++),d[g]={left:0,top:p,row:h,width:y,height:i},c[c.length-1]+=y+a}),f}_fitCols(e,n,o,i){const{ctx:r,maxHeight:l,options:{labels:{padding:a}}}=this,d=this.legendHitBoxes=[],c=this.columnSizes=[],u=l-e;let f=a,h=0,p=0,m=0,g=0;return this.legendItems.forEach((y,b)=>{const{itemWidth:$,itemHeight:w}=p0(o,n,r,y,i);b>0&&p+w+2*a>u&&(f+=h+a,c.push({width:h,height:p}),m+=h+a,g++,h=p=0),d[b]={left:m,top:p,col:g,width:$,height:w},h=Math.max(h,$),p+=w+a}),f+=h,c.push({width:h,height:p}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:r}}=this,l=Xt(r,this.left,this.width);if(this.isHorizontal()){let a=0,d=ye(o,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,d=ye(o,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+e+i,c.left=l.leftForLtr(l.x(d),c.width),d+=c.width+i}else{let a=0,d=ye(o,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,d=ye(o,this.top+e+i,this.bottom-this.columnSizes[a].height)),c.top=d,c.left+=this.left+i,c.left=l.leftForLtr(l.x(c.left),c.width),d+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;co(e,this),this._draw(),uo(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:r,labels:l}=e,a=ce.color,d=Xt(e.rtl,this.left,this.width),c=he(l.font),{padding:u}=l,f=c.size,h=f/2;let p;this.drawTitle(),i.textAlign=d.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:g,itemHeight:y}=Va(l,f),b=function(V,D,F){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;i.save();const N=Y(F.lineWidth,1);if(i.fillStyle=Y(F.fillStyle,a),i.lineCap=Y(F.lineCap,"butt"),i.lineDashOffset=Y(F.lineDashOffset,0),i.lineJoin=Y(F.lineJoin,"miter"),i.lineWidth=N,i.strokeStyle=Y(F.strokeStyle,a),i.setLineDash(Y(F.lineDash,[])),l.usePointStyle){const P={radius:g*Math.SQRT2/2,pointStyle:F.pointStyle,rotation:F.rotation,borderWidth:N},C=d.xPlus(V,m/2),_=D+h;ll(i,P,C,_,l.pointStyleWidth&&m)}else{const P=D+Math.max((f-g)/2,0),C=d.leftForLtr(V,m),_=Pt(F.borderRadius);i.beginPath(),Object.values(_).some(E=>E!==0)?$n(i,{x:C,y:P,w:m,h:g,radius:_}):i.rect(C,P,m,g),i.fill(),N!==0&&i.stroke()}i.restore()},$=function(V,D,F){Vt(i,F.text,V,D+y/2,c,{strikethrough:F.hidden,textAlign:d.textAlign(F.textAlign)})},w=this.isHorizontal(),S=this._computeTitleHeight();w?p={x:ye(r,this.left+u,this.right-o[0]),y:this.top+u+S,line:0}:p={x:this.left+u,y:ye(r,this.top+S+u,this.bottom-n[0].height),line:0},$l(this.ctx,e.textDirection);const x=y+u;this.legendItems.forEach((V,D)=>{i.strokeStyle=V.fontColor,i.fillStyle=V.fontColor;const F=i.measureText(V.text).width,N=d.textAlign(V.textAlign||(V.textAlign=l.textAlign)),P=m+h+F;let C=p.x,_=p.y;d.setWidth(this.width),w?D>0&&C+P+u>this.right&&(_=p.y+=x,p.line++,C=p.x=ye(r,this.left+u,this.right-o[p.line])):D>0&&_+x>this.bottom&&(C=p.x=C+n[p.line].width+u,p.line++,_=p.y=ye(r,this.top+S+u,this.bottom-n[p.line].height));const E=d.x(C);if(b(E,_,V),C=Nf(N,C+m+h,w?C+P:this.right,e.rtl),$(d.x(C),_,V),w)p.x+=P+u;else if(typeof V.text!="string"){const v=c.lineHeight;p.y+=Ra(V,v)+u}else p.y+=x}),_l(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=he(n.font),i=be(n.padding);if(!n.display)return;const r=Xt(e.rtl,this.left,this.width),l=this.ctx,a=n.position,d=o.size/2,c=i.top+d;let u,f=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,f=ye(e.align,f,this.right-h);else{const m=this.columnSizes.reduce((g,y)=>Math.max(g,y.height),0);u=c+ye(e.align,this.top,this.bottom-m-e.labels.padding-this._computeTitleHeight())}const p=ye(a,f,f+h);l.textAlign=r.textAlign(Bi(a)),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=o.string,Vt(l,n.text,p,u,o)}_computeTitleHeight(){const e=this.options.title,n=he(e.font),o=be(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,r;if(Qe(e,this.left,this.right)&&Qe(n,this.top,this.bottom)){for(r=this.legendHitBoxes,o=0;o<r.length;++o)if(i=r[o],Qe(e,i.left,i.left+i.width)&&Qe(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!y0(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,r=h0(i,o);i&&!r&&ne(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!r&&ne(n.onHover,[e,o,this],this)}else o&&ne(n.onClick,[e,o,this],this)}}function p0(t,e,n,o,i){const r=m0(o,t,e,n),l=g0(i,o,e.lineHeight);return{itemWidth:r,itemHeight:l}}function m0(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((r,l)=>r.length>l.length?r:l)),e+n.size/2+o.measureText(i).width}function g0(t,e,n){let o=t;return typeof e.text!="string"&&(o=Ra(e,n)),o}function Ra(t,e){const n=t.text?t.text.length:0;return e*n}function y0(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var b0={id:"legend",_element:Pa,start(t,e,n){const o=t.legend=new Pa({ctx:t.ctx,options:n,chart:t});$e.configure(t,o,n),$e.addBox(t,o)},stop(t){$e.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;$e.configure(t,o,n),o.options=n},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,n){const o=e.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),e.hidden=!0):(i.show(o),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:n,pointStyle:o,textAlign:i,color:r,useBorderRadius:l,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(d=>{const c=d.controller.getStyle(n?0:void 0),u=be(c.borderWidth);return{text:e[d.index].label,fillStyle:c.backgroundColor,fontColor:r,hidden:!d.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:o||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:l&&(a||c.borderRadius),datasetIndex:d.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 ss extends ot{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=oe(o.text)?o.text.length:1;this._padding=be(o.padding);const r=i*he(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:r,options:l}=this,a=l.align;let d=0,c,u,f;return this.isHorizontal()?(u=ye(a,o,r),f=n+e,c=r-o):(l.position==="left"?(u=o+e,f=ye(a,i,n),d=ie*-.5):(u=r-e,f=ye(a,n,i),d=ie*.5),c=i-n),{titleX:u,titleY:f,maxWidth:c,rotation:d}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=he(n.font),r=o.lineHeight/2+this._padding.top,{titleX:l,titleY:a,maxWidth:d,rotation:c}=this._drawArgs(r);Vt(e,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:c,textAlign:Bi(n.align),textBaseline:"middle",translation:[l,a]})}}function $0(t,e){const n=new ss({ctx:t.ctx,options:e,chart:t});$e.configure(t,n,e),$e.addBox(t,n),t.titleBlock=n}var _0={id:"title",_element:ss,start(t,e,n){$0(t,n)},stop(t){const e=t.titleBlock;$e.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;$e.configure(t,o,n),o.options=n},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 Po=new WeakMap;var w0={id:"subtitle",start(t,e,n){const o=new ss({ctx:t.ctx,options:n,chart:t});$e.configure(t,o,n),$e.addBox(t,o),Po.set(t,o)},stop(t){$e.removeBox(t,Po.get(t)),Po.delete(t)},beforeUpdate(t,e,n){const o=Po.get(t);$e.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Vn={average(t){if(!t.length)return!1;let e,n,o=new Set,i=0,r=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const d=a.tooltipPosition();o.add(d.x),i+=d.y,++r}}return{x:[...o].reduce((a,d)=>a+d)/o.size,y:i/r}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,r,l,a;for(r=0,l=t.length;r<l;++r){const d=t[r].element;if(d&&d.hasValue()){const c=d.getCenterPoint(),u=Di(e,c);u<i&&(i=u,a=d)}}if(a){const d=a.tooltipPosition();n=d.x,o=d.y}return{x:n,y:o}}};function Ge(t,e){return e&&(oe(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function it(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
24
+ */class ep{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,o,i){const s=n.listeners[i],l=n.duration;s.forEach(a=>a({chart:e,initial:n.initial,numSteps:l,currentStep:Math.min(o-n.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=ll.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((o,i)=>{if(!o.running||!o.items.length)return;const s=o.items;let l=s.length-1,a=!1,d;for(;l>=0;--l)d=s[l],d._active?(d._total>o.duration&&(o.duration=d._total),d.tick(e),a=!0):(s[l]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,o,e,"progress")),s.length||(o.running=!1,this._notify(i,o,e,"complete"),o.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let o=n.get(e);return o||(o={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,o)),o}listen(e,n,o){this._getAnims(e).listeners[n].push(o)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((o,i)=>Math.max(o,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const o=n.items;let i=o.length-1;for(;i>=0;--i)o[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var ot=new ep;const Ol="transparent",tp={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const o=hl(t||Ol),i=o.valid&&hl(e||Ol);return i&&i.valid?i.mix(o,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class np{constructor(e,n,o,i){const s=n[o];i=xn([e.to,i,s,e.from]);const l=xn([e.from,s,i]);this._active=!0,this._fn=e.fn||tp[e.type||typeof l],this._easing=_n[e.easing]||_n.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=o,this._from=l,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,o){if(this._active){this._notify(!1);const i=this._target[this._prop],s=o-this._start,l=this._duration-s;this._start=o,this._duration=Math.floor(Math.max(l,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=xn([e.to,n,i,e.from]),this._from=xn([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,o=this._duration,i=this._prop,s=this._from,l=this._loop,a=this._to;let d;if(this._active=s!==a&&(l||n<o),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}d=n/o%2,d=l&&d>1?2-d:d,d=this._easing(Math.min(1,Math.max(0,d))),this._target[i]=this._fn(s,a,d)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,o)=>{e.push({res:n,rej:o})})}_notify(e){const n=e?"res":"rej",o=this._promises||[];for(let i=0;i<o.length;i++)o[i][n]()}}class Il{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!q(e))return;const n=Object.keys(ce.animation),o=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!q(s))return;const l={};for(const a of n)l[a]=s[a];(oe(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!o.has(a))&&o.set(a,l)})})}_animateOptions(e,n){const o=n.options,i=ip(e,o);if(!i)return[];const s=this._createAnimations(i,o);return o.$shared&&op(e.options.$animations,o).then(()=>{e.options=o},()=>{}),s}_createAnimations(e,n){const o=this._properties,i=[],s=e.$animations||(e.$animations={}),l=Object.keys(n),a=Date.now();let d;for(d=l.length-1;d>=0;--d){const c=l[d];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(e,n));continue}const u=n[c];let f=s[c];const h=o.get(c);if(f)if(h&&f.active()){f.update(h,u,a);continue}else f.cancel();if(!h||!h.duration){e[c]=u;continue}s[c]=f=new np(h,e,c,u),i.push(f)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const o=this._createAnimations(e,n);if(o.length)return ot.add(this._chart,o),!0}}function op(t,e){const n=[],o=Object.keys(e);for(let i=0;i<o.length;i++){const s=t[o[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function ip(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function Tl(t,e){const n=t&&t.options||{},o=n.reverse,i=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:o?s:i,end:o?i:s}}function rp(t,e,n){if(n===!1)return!1;const o=Tl(t,n),i=Tl(e,n);return{top:i.end,right:o.end,bottom:i.start,left:o.start}}function sp(t){let e,n,o,i;return q(t)?(e=t.top,n=t.right,o=t.bottom,i=t.left):e=n=o=i=t,{top:e,right:n,bottom:o,left:i,disabled:t===!1}}function zl(t,e){const n=[],o=t._getSortedDatasetMetas(e);let i,s;for(i=0,s=o.length;i<s;++i)n.push(o[i].index);return n}function Ll(t,e,n,o={}){const i=t.keys,s=o.mode==="single";let l,a,d,c;if(e!==null){for(l=0,a=i.length;l<a;++l){if(d=+i[l],d===n){if(o.all)continue;break}c=t.values[d],de(c)&&(s||e===0||Ue(e)===Ue(c))&&(e+=c)}return e}}function lp(t){const e=Object.keys(t),n=new Array(e.length);let o,i,s;for(o=0,i=e.length;o<i;++o)s=e[o],n[o]={x:s,y:t[s]};return n}function Hl(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function ap(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function dp(t){const{min:e,max:n,minDefined:o,maxDefined:i}=t.getUserBounds();return{min:o?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function cp(t,e,n){const o=t[e]||(t[e]={});return o[n]||(o[n]={})}function jl(t,e,n,o){for(const i of e.getMatchingVisibleMetas(o).reverse()){const s=t[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function Wl(t,e){const{chart:n,_cachedMeta:o}=t,i=n._stacks||(n._stacks={}),{iScale:s,vScale:l,index:a}=o,d=s.axis,c=l.axis,u=ap(s,l,o),f=e.length;let h;for(let p=0;p<f;++p){const m=e[p],{[d]:g,[c]:y}=m,b=m._stacks||(m._stacks={});h=b[c]=cp(i,u,g),h[a]=y,h._top=jl(h,l,!0,o.type),h._bottom=jl(h,l,!1,o.type);const _=h._visualValues||(h._visualValues={});_[a]=y}}function Gi(t,e){const n=t.scales;return Object.keys(n).filter(o=>n[o].axis===e).shift()}function up(t,e){return wt(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function fp(t,e,n){return wt(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Sn(t,e){const n=t.controller.index,o=t.vScale&&t.vScale.axis;if(o){e=e||t._parsed;for(const i of e){const s=i._stacks;if(!s||s[o]===void 0||s[o][n]===void 0)return;delete s[o][n],s[o]._visualValues!==void 0&&s[o]._visualValues[n]!==void 0&&delete s[o]._visualValues[n]}}}const qi=t=>t==="reset"||t==="none",Yl=(t,e)=>e?t:Object.assign({},t),hp=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:zl(n,!0),values:null};class ze{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,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 e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Hl(e.vScale,e),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(e){this.index!==e&&Sn(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,o=this.getDataset(),i=(f,h,p,m)=>f==="x"?h:f==="r"?m:p,s=n.xAxisID=Y(o.xAxisID,Gi(e,"x")),l=n.yAxisID=Y(o.yAxisID,Gi(e,"y")),a=n.rAxisID=Y(o.rAxisID,Gi(e,"r")),d=n.indexAxis,c=n.iAxisID=i(d,s,l,a),u=n.vAxisID=i(d,l,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(l),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(c),n.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&rl(this._data,this),e._stacked&&Sn(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),o=this._data;if(q(n))this._data=lp(n);else if(o!==n){if(o){rl(o,this);const i=this._cachedMeta;Sn(i),i._parsed=[]}n&&Object.isExtensible(n)&&Jf(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,o=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=Hl(n.vScale,n),n.stack!==o.stack&&(i=!0,Sn(n),n.stack=o.stack),this._resyncElements(e),(i||s!==n._stacked)&&Wl(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),o=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(o,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:o,_data:i}=this,{iScale:s,_stacked:l}=o,a=s.axis;let d=e===0&&n===i.length?!0:o._sorted,c=e>0&&o._parsed[e-1],u,f,h;if(this._parsing===!1)o._parsed=i,o._sorted=!0,h=i;else{oe(i[e])?h=this.parseArrayData(o,i,e,n):q(i[e])?h=this.parseObjectData(o,i,e,n):h=this.parsePrimitiveData(o,i,e,n);const p=()=>f[a]===null||c&&f[a]<c[a];for(u=0;u<n;++u)o._parsed[u+e]=f=h[u],d&&(p()&&(d=!1),c=f);o._sorted=d}l&&Wl(this,h)}parsePrimitiveData(e,n,o,i){const{iScale:s,vScale:l}=e,a=s.axis,d=l.axis,c=s.getLabels(),u=s===l,f=new Array(i);let h,p,m;for(h=0,p=i;h<p;++h)m=h+o,f[h]={[a]:u||s.parse(c[m],m),[d]:l.parse(n[m],m)};return f}parseArrayData(e,n,o,i){const{xScale:s,yScale:l}=e,a=new Array(i);let d,c,u,f;for(d=0,c=i;d<c;++d)u=d+o,f=n[u],a[d]={x:s.parse(f[0],u),y:l.parse(f[1],u)};return a}parseObjectData(e,n,o,i){const{xScale:s,yScale:l}=e,{xAxisKey:a="x",yAxisKey:d="y"}=this._parsing,c=new Array(i);let u,f,h,p;for(u=0,f=i;u<f;++u)h=u+o,p=n[h],c[u]={x:s.parse(bt(p,a),h),y:l.parse(bt(p,d),h)};return c}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,o){const i=this.chart,s=this._cachedMeta,l=n[e.axis],a={keys:zl(i,!0),values:n._stacks[e.axis]._visualValues};return Ll(a,l,s.index,{mode:o})}updateRangeFromParsed(e,n,o,i){const s=o[n.axis];let l=s===null?NaN:s;const a=i&&o._stacks[n.axis];i&&a&&(i.values=a,l=Ll(i,s,this._cachedMeta.index)),e.min=Math.min(e.min,l),e.max=Math.max(e.max,l)}getMinMax(e,n){const o=this._cachedMeta,i=o._parsed,s=o._sorted&&e===o.iScale,l=i.length,a=this._getOtherScale(e),d=hp(n,o,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=dp(a);let h,p;function m(){p=i[h];const g=p[a.axis];return!de(p[e.axis])||u>g||f<g}for(h=0;h<l&&!(!m()&&(this.updateRangeFromParsed(c,e,p,d),s));++h);if(s){for(h=l-1;h>=0;--h)if(!m()){this.updateRangeFromParsed(c,e,p,d);break}}return c}getAllParsedValues(e){const n=this._cachedMeta._parsed,o=[];let i,s,l;for(i=0,s=n.length;i<s;++i)l=n[i][e.axis],de(l)&&o.push(l);return o}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,o=n.iScale,i=n.vScale,s=this.getParsed(e);return{label:o?""+o.getLabelForValue(s[o.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=sp(Y(this.options.clip,rp(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,o=this._cachedMeta,i=o.data||[],s=n.chartArea,l=[],a=this._drawStart||0,d=this._drawCount||i.length-a,c=this.options.drawActiveElementsOnTop;let u;for(o.dataset&&o.dataset.draw(e,s,a,d),u=a;u<a+d;++u){const f=i[u];f.hidden||(f.active&&c?l.push(f):f.draw(e,s))}for(u=0;u<l.length;++u)l[u].draw(e,s)}getStyle(e,n){const o=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(o):this.resolveDataElementOptions(e||0,o)}getContext(e,n,o){const i=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const l=this._cachedMeta.data[e];s=l.$context||(l.$context=fp(this.getContext(),e,l)),s.parsed=this.getParsed(e),s.raw=i.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=up(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=o,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",o){const i=n==="active",s=this._cachedDataOpts,l=e+"-"+n,a=s[l],d=this.enableOptionSharing&&yn(o);if(a)return Yl(a,d);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),f=i?[`${e}Hover`,"hover",e,""]:[e,""],h=c.getOptionScopes(this.getDataset(),u),p=Object.keys(ce.elements[e]),m=()=>this.getContext(o,i,n),g=c.resolveNamedOptions(h,p,m,f);return g.$shared&&(g.$shared=d,s[l]=Object.freeze(Yl(g,d))),g}_resolveAnimations(e,n,o){const i=this.chart,s=this._cachedDataOpts,l=`animation-${n}`,a=s[l];if(a)return a;let d;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,n),h=u.getOptionScopes(this.getDataset(),f);d=u.createResolver(h,this.getContext(e,o,n))}const c=new Il(i,d&&d.animations);return d&&d._cacheable&&(s[l]=Object.freeze(c)),c}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||qi(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const o=this.resolveDataElementOptions(e,n),i=this._sharedOptions,s=this.getSharedOptions(o),l=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,o),{sharedOptions:s,includeOptions:l}}updateElement(e,n,o,i){qi(i)?Object.assign(e,o):this._resolveAnimations(n,i).update(e,o)}updateSharedOptions(e,n,o){e&&!qi(n)&&this._resolveAnimations(void 0,n).update(e,o)}_setStyle(e,n,o,i){e.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,o,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,o){this._setStyle(e,o,"active",!1)}setHoverStyle(e,n,o){this._setStyle(e,o,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,o=this._cachedMeta.data;for(const[a,d,c]of this._syncList)this[a](d,c);this._syncList=[];const i=o.length,s=n.length,l=Math.min(s,i);l&&this.parse(0,l),s>i?this._insertElements(i,s-i,e):s<i&&this._removeElements(s,i-s)}_insertElements(e,n,o=!0){const i=this._cachedMeta,s=i.data,l=e+n;let a;const d=c=>{for(c.length+=n,a=c.length-1;a>=l;a--)c[a]=c[a-n]};for(d(s),a=e;a<l;++a)s[a]=new this.dataElementType;this._parsing&&d(i._parsed),this.parse(e,n),o&&this.updateElements(s,e,n,"reset")}updateElements(e,n,o,i){}_removeElements(e,n){const o=this._cachedMeta;if(this._parsing){const i=o._parsed.splice(e,n);o._stacked&&Sn(o,i)}o.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,o,i]=e;this[n](o,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const o=arguments.length-2;o&&this._sync(["_insertElements",e,o])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}I(ze,"defaults",{}),I(ze,"datasetElementType",null),I(ze,"dataElementType",null);function pp(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let o=[];for(let i=0,s=n.length;i<s;i++)o=o.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=sl(o.sort((i,s)=>i-s))}return t._cache.$bar}function mp(t){const e=t.iScale,n=pp(e,t.type);let o=e._length,i,s,l,a;const d=()=>{l===32767||l===-32768||(yn(a)&&(o=Math.min(o,Math.abs(l-a)||o)),a=l)};for(i=0,s=n.length;i<s;++i)l=e.getPixelForValue(n[i]),d();for(a=void 0,i=0,s=e.ticks.length;i<s;++i)l=e.getPixelForTick(i),d();return o}function gp(t,e,n,o){const i=n.barThickness;let s,l;return J(i)?(s=e.min*n.categoryPercentage,l=n.barPercentage):(s=i*o,l=1),{chunk:s/o,ratio:l,start:e.pixels[t]-s/2}}function yp(t,e,n,o){const i=e.pixels,s=i[t];let l=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const d=n.categoryPercentage;l===null&&(l=s-(a===null?e.end-e.start:a-s)),a===null&&(a=s+s-l);const c=s-(s-Math.min(l,a))/2*d;return{chunk:Math.abs(a-l)/2*d/o,ratio:n.barPercentage,start:c}}function bp(t,e,n,o){const i=n.parse(t[0],o),s=n.parse(t[1],o),l=Math.min(i,s),a=Math.max(i,s);let d=l,c=a;Math.abs(l)>Math.abs(a)&&(d=a,c=l),e[n.axis]=c,e._custom={barStart:d,barEnd:c,start:i,end:s,min:l,max:a}}function Ul(t,e,n,o){return oe(t)?bp(t,e,n,o):e[n.axis]=n.parse(t,o),e}function Gl(t,e,n,o){const i=t.iScale,s=t.vScale,l=i.getLabels(),a=i===s,d=[];let c,u,f,h;for(c=n,u=n+o;c<u;++c)h=e[c],f={},f[i.axis]=a||i.parse(l[c],c),d.push(Ul(h,f,s,c));return d}function Xi(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function $p(t,e,n){return t!==0?Ue(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function _p(t){let e,n,o,i,s;return t.horizontal?(e=t.base>t.x,n="left",o="right"):(e=t.base<t.y,n="bottom",o="top"),e?(i="end",s="start"):(i="start",s="end"),{start:n,end:o,reverse:e,top:i,bottom:s}}function wp(t,e,n,o){let i=e.borderSkipped;const s={};if(!i){t.borderSkipped=s;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:l,end:a,reverse:d,top:c,bottom:u}=_p(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===o?i=c:(n._bottom||0)===o?i=u:(s[ql(u,l,a,d)]=!0,i=c)),s[ql(i,l,a,d)]=!0,t.borderSkipped=s}function ql(t,e,n,o){return o?(t=Cp(t,e,n),t=Xl(t,n,e)):t=Xl(t,e,n),t}function Cp(t,e,n){return t===e?n:t===n?e:t}function Xl(t,e,n){return t==="start"?e:t==="end"?n:t}function kp(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class bo extends ze{parsePrimitiveData(e,n,o,i){return Gl(e,n,o,i)}parseArrayData(e,n,o,i){return Gl(e,n,o,i)}parseObjectData(e,n,o,i){const{iScale:s,vScale:l}=e,{xAxisKey:a="x",yAxisKey:d="y"}=this._parsing,c=s.axis==="x"?a:d,u=l.axis==="x"?a:d,f=[];let h,p,m,g;for(h=o,p=o+i;h<p;++h)g=n[h],m={},m[s.axis]=s.parse(bt(g,c),h),f.push(Ul(bt(g,u),m,l,h));return f}updateRangeFromParsed(e,n,o,i){super.updateRangeFromParsed(e,n,o,i);const s=o._custom;s&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:o,vScale:i}=n,s=this.getParsed(e),l=s._custom,a=Xi(l)?"["+l.start+", "+l.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+o.getLabelForValue(s[o.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,o,i){const s=i==="reset",{index:l,_cachedMeta:{vScale:a}}=this,d=a.getBasePixel(),c=a.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:h}=this._getSharedOptions(n,i);for(let p=n;p<n+o;p++){const m=this.getParsed(p),g=s||J(m[a.axis])?{base:d,head:d}:this._calculateBarValuePixels(p),y=this._calculateBarIndexPixels(p,u),b=(m._stacks||{})[a.axis],_={horizontal:c,base:g.base,enableBorderRadius:!b||Xi(m._custom)||l===b._top||l===b._bottom,x:c?g.head:y.center,y:c?y.center:g.head,height:c?y.size:Math.abs(g.size),width:c?Math.abs(g.size):y.size};h&&(_.options=f||this.resolveDataElementOptions(p,e[p].active?"active":i));const x=_.options||e[p].options;wp(_,x,b,l),kp(_,x,u.ratio),this.updateElement(e[p],p,_,i)}}_getStacks(e,n){const{iScale:o}=this._cachedMeta,i=o.getMatchingVisibleMetas(this._type).filter(d=>d.controller.options.grouped),s=o.options.stacked,l=[],a=d=>{const c=d.controller.getParsed(n),u=c&&c[d.vScale.axis];if(J(u)||isNaN(u))return!0};for(const d of i)if(!(n!==void 0&&a(d))&&((s===!1||l.indexOf(d.stack)===-1||s===void 0&&d.stack===void 0)&&l.push(d.stack),d.index===e))break;return l.length||l.push(void 0),l}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,n,o){const i=this._getStacks(e,o),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,o=n.iScale,i=[];let s,l;for(s=0,l=n.data.length;s<l;++s)i.push(o.getPixelForValue(this.getParsed(s)[o.axis],s));const a=e.barThickness;return{min:a||mp(n),pixels:i,start:o._startPixel,end:o._endPixel,stackCount:this._getStackCount(),scale:o,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:o,index:i},options:{base:s,minBarLength:l}}=this,a=s||0,d=this.getParsed(e),c=d._custom,u=Xi(c);let f=d[n.axis],h=0,p=o?this.applyStack(n,d,o):f,m,g;p!==f&&(h=p-f,p=f),u&&(f=c.barStart,p=c.barEnd-c.barStart,f!==0&&Ue(f)!==Ue(c.barEnd)&&(h=0),h+=f);const y=!J(s)&&!u?s:h;let b=n.getPixelForValue(y);if(this.chart.getDataVisibility(e)?m=n.getPixelForValue(h+p):m=b,g=m-b,Math.abs(g)<l){g=$p(g,n,a)*l,f===a&&(b-=g/2);const _=n.getPixelForDecimal(0),x=n.getPixelForDecimal(1),$=Math.min(_,x),w=Math.max(_,x);b=Math.max(Math.min(b,w),$),m=b+g,o&&!u&&(d._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(b))}if(b===n.getPixelForValue(a)){const _=Ue(g)*n.getLineWidthForValue(a)/2;b+=_,g-=_}return{size:g,base:b,head:m,center:m+g/2}}_calculateBarIndexPixels(e,n){const o=n.scale,i=this.options,s=i.skipNull,l=Y(i.maxBarThickness,1/0);let a,d;if(n.grouped){const c=s?this._getStackCount(e):n.stackCount,u=i.barThickness==="flex"?yp(e,n,i,c):gp(e,n,i,c),f=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0);a=u.start+u.chunk*f+u.chunk/2,d=Math.min(l,u.chunk*u.ratio)}else a=o.getPixelForValue(this.getParsed(e)[o.axis],e),d=Math.min(l,n.min*n.ratio);return{base:a-d/2,head:a+d/2,center:a,size:d}}draw(){const e=this._cachedMeta,n=e.vScale,o=e.data,i=o.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&o[s].draw(this._ctx)}}I(bo,"id","bar"),I(bo,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),I(bo,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class $o extends ze{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(e,n,o,i){const s=super.parsePrimitiveData(e,n,o,i);for(let l=0;l<s.length;l++)s[l]._custom=this.resolveDataElementOptions(l+o).radius;return s}parseArrayData(e,n,o,i){const s=super.parseArrayData(e,n,o,i);for(let l=0;l<s.length;l++){const a=n[o+l];s[l]._custom=Y(a[2],this.resolveDataElementOptions(l+o).radius)}return s}parseObjectData(e,n,o,i){const s=super.parseObjectData(e,n,o,i);for(let l=0;l<s.length;l++){const a=n[o+l];s[l]._custom=Y(a&&a.r&&+a.r,this.resolveDataElementOptions(l+o).radius)}return s}getMaxOverflow(){const e=this._cachedMeta.data;let n=0;for(let o=e.length-1;o>=0;--o)n=Math.max(n,e[o].size(this.resolveDataElementOptions(o))/2);return n>0&&n}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:s}=n,l=this.getParsed(e),a=i.getLabelForValue(l.x),d=s.getLabelForValue(l.y),c=l._custom;return{label:o[e]||"",value:"("+a+", "+d+(c?", "+c:"")+")"}}update(e){const n=this._cachedMeta.data;this.updateElements(n,0,n.length,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:l,vScale:a}=this._cachedMeta,{sharedOptions:d,includeOptions:c}=this._getSharedOptions(n,i),u=l.axis,f=a.axis;for(let h=n;h<n+o;h++){const p=e[h],m=!s&&this.getParsed(h),g={},y=g[u]=s?l.getPixelForDecimal(.5):l.getPixelForValue(m[u]),b=g[f]=s?a.getBasePixel():a.getPixelForValue(m[f]);g.skip=isNaN(y)||isNaN(b),c&&(g.options=d||this.resolveDataElementOptions(h,p.active?"active":i),s&&(g.options.radius=0)),this.updateElement(p,h,g,i)}}resolveDataElementOptions(e,n){const o=this.getParsed(e);let i=super.resolveDataElementOptions(e,n);i.$shared&&(i=Object.assign({},i,{$shared:!1}));const s=i.radius;return n!=="active"&&(i.radius=0),i.radius+=Y(o&&o._custom,s),i}}I($o,"id","bubble"),I($o,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),I($o,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function xp(t,e,n){let o=1,i=1,s=0,l=0;if(e<re){const a=t,d=a+e,c=Math.cos(a),u=Math.sin(a),f=Math.cos(d),h=Math.sin(d),p=(x,$,w)=>$n(x,a,d,!0)?1:Math.max($,$*n,w,w*n),m=(x,$,w)=>$n(x,a,d,!0)?-1:Math.min($,$*n,w,w*n),g=p(0,c,f),y=p(ue,u,h),b=m(ie,c,f),_=m(ie+ue,u,h);o=(g-b)/2,i=(y-_)/2,s=-(g+b)/2,l=-(y+_)/2}return{ratioX:o,ratioY:i,offsetX:s,offsetY:l}}class It extends ze{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const o=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=o;else{let s=d=>+o[d];if(q(o[e])){const{key:d="value"}=this._parsing;s=c=>+bt(o[c],d)}let l,a;for(l=e,a=e+n;l<a;++l)i._parsed[l]=s(l)}}_getRotation(){return Te(this.options.rotation-90)}_getCircumference(){return Te(this.options.circumference)}_getRotationExtents(){let e=re,n=-re;for(let o=0;o<this.chart.data.datasets.length;++o)if(this.chart.isDatasetVisible(o)&&this.chart.getDatasetMeta(o).type===this._type){const i=this.chart.getDatasetMeta(o).controller,s=i._getRotation(),l=i._getCircumference();e=Math.min(e,s),n=Math.max(n,s+l)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:o}=n,i=this._cachedMeta,s=i.data,l=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,a=Math.max((Math.min(o.width,o.height)-l)/2,0),d=Math.min(If(this.options.cutout,a),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:h,ratioY:p,offsetX:m,offsetY:g}=xp(f,u,d),y=(o.width-l)/h,b=(o.height-l)/p,_=Math.max(Math.min(y,b)/2,0),x=Xs(this.options.radius,_),$=Math.max(x*d,0),w=(x-$)/this._getVisibleDatasetWeightTotal();this.offsetX=m*x,this.offsetY=g*x,i.total=this.calculateTotal(),this.outerRadius=x-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(s,0,s.length,e)}_circumference(e,n){const o=this.options,i=this._cachedMeta,s=this._getCircumference();return n&&o.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*s/re)}updateElements(e,n,o,i){const s=i==="reset",l=this.chart,a=l.chartArea,c=l.options.animation,u=(a.left+a.right)/2,f=(a.top+a.bottom)/2,h=s&&c.animateScale,p=h?0:this.innerRadius,m=h?0:this.outerRadius,{sharedOptions:g,includeOptions:y}=this._getSharedOptions(n,i);let b=this._getRotation(),_;for(_=0;_<n;++_)b+=this._circumference(_,s);for(_=n;_<n+o;++_){const x=this._circumference(_,s),$=e[_],w={x:u+this.offsetX,y:f+this.offsetY,startAngle:b,endAngle:b+x,circumference:x,outerRadius:m,innerRadius:p};y&&(w.options=g||this.resolveDataElementOptions(_,$.active?"active":i)),b+=x,this.updateElement($,_,w,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let o=0,i;for(i=0;i<n.length;i++){const s=e._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(o+=Math.abs(s))}return o}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?re*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=wn(n._parsed[e],o.options.locale);return{label:i[e]||"",value:s}}getMaxBorderWidth(e){let n=0;const o=this.chart;let i,s,l,a,d;if(!e){for(i=0,s=o.data.datasets.length;i<s;++i)if(o.isDatasetVisible(i)){l=o.getDatasetMeta(i),e=l.data,a=l.controller;break}}if(!e)return 0;for(i=0,s=e.length;i<s;++i)d=a.resolveDataElementOptions(i),d.borderAlign!=="inner"&&(n=Math.max(n,d.borderWidth||0,d.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let o=0,i=e.length;o<i;++o){const s=this.resolveDataElementOptions(o);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let o=0;o<e;++o)this.chart.isDatasetVisible(o)&&(n+=this._getRingWeight(o));return n}_getRingWeight(e){return Math.max(Y(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}I(It,"id","doughnut"),I(It,"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"}),I(It,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),I(It,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((s,l)=>{const d=e.getDatasetMeta(0).controller.getStyle(l);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}}});class _o extends ze{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:o,data:i=[],_dataset:s}=n,l=this.chart._animationsDisabled;let{start:a,count:d}=dl(n,i,l);this._drawStart=a,this._drawCount=d,cl(n)&&(a=0,d=i.length),o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!s._decimated,o.points=i;const c=this.resolveDatasetElementOptions(e);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(o,void 0,{animated:!l,options:c},e),this.updateElements(i,a,d,e)}updateElements(e,n,o,i){const s=i==="reset",{iScale:l,vScale:a,_stacked:d,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(n,i),h=l.axis,p=a.axis,{spanGaps:m,segment:g}=this.options,y=Xt(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||s||i==="none",_=n+o,x=e.length;let $=n>0&&this.getParsed(n-1);for(let w=0;w<x;++w){const P=e[w],M=b?P:{};if(w<n||w>=_){M.skip=!0;continue}const N=this.getParsed(w),V=J(N[p]),B=M[h]=l.getPixelForValue(N[h],w),k=M[p]=s||V?a.getBasePixel():a.getPixelForValue(d?this.applyStack(a,N,d):N[p],w);M.skip=isNaN(B)||isNaN(k)||V,M.stop=w>0&&Math.abs(N[h]-$[h])>y,g&&(M.parsed=N,M.raw=c.data[w]),f&&(M.options=u||this.resolveDataElementOptions(w,P.active?"active":i)),b||this.updateElement(P,w,M,i),$=N}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,o=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return o;const s=i[0].size(this.resolveDataElementOptions(0)),l=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(o,s,l)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}I(_o,"id","line"),I(_o,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),I(_o,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class vn extends ze{constructor(e,n){super(e,n),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const n=this._cachedMeta,o=this.chart,i=o.data.labels||[],s=wn(n._parsed[e].r,o.options.locale);return{label:i[e]||"",value:s}}parseObjectData(e,n,o,i){return Sl.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta.data;this._updateRadius(),this.updateElements(n,0,n.length,e)}getMinMax(){const e=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((o,i)=>{const s=this.getParsed(i).r;!isNaN(s)&&this.chart.getDataVisibility(i)&&(s<n.min&&(n.min=s),s>n.max&&(n.max=s))}),n}_updateRadius(){const e=this.chart,n=e.chartArea,o=e.options,i=Math.min(n.right-n.left,n.bottom-n.top),s=Math.max(i/2,0),l=Math.max(o.cutoutPercentage?s/100*o.cutoutPercentage:1,0),a=(s-l)/e.getVisibleDatasetCount();this.outerRadius=s-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(e,n,o,i){const s=i==="reset",l=this.chart,d=l.options.animation,c=this._cachedMeta.rScale,u=c.xCenter,f=c.yCenter,h=c.getIndexAngle(0)-.5*ie;let p=h,m;const g=360/this.countVisibleElements();for(m=0;m<n;++m)p+=this._computeAngle(m,i,g);for(m=n;m<n+o;m++){const y=e[m];let b=p,_=p+this._computeAngle(m,i,g),x=l.getDataVisibility(m)?c.getDistanceFromCenterForValue(this.getParsed(m).r):0;p=_,s&&(d.animateScale&&(x=0),d.animateRotate&&(b=_=h));const $={x:u,y:f,innerRadius:0,outerRadius:x,startAngle:b,endAngle:_,options:this.resolveDataElementOptions(m,y.active?"active":i)};this.updateElement(y,m,$,i)}}countVisibleElements(){const e=this._cachedMeta;let n=0;return e.data.forEach((o,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&n++}),n}_computeAngle(e,n,o){return this.chart.getDataVisibility(e)?Te(this.resolveDataElementOptions(e,n).angle||o):0}}I(vn,"id","polarArea"),I(vn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),I(vn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:o,color:i}}=e.legend.options;return n.labels.map((s,l)=>{const d=e.getDatasetMeta(0).controller.getStyle(l);return{text:s,fillStyle:d.backgroundColor,strokeStyle:d.borderColor,fontColor:i,lineWidth:d.borderWidth,pointStyle:o,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,n,o){o.chart.toggleDataVisibility(n.index),o.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class Ki extends It{}I(Ki,"id","pie"),I(Ki,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class wo extends ze{getLabelAndValue(e){const n=this._cachedMeta.vScale,o=this.getParsed(e);return{label:n.getLabels()[e],value:""+n.getLabelForValue(o[n.axis])}}parseObjectData(e,n,o,i){return Sl.bind(this)(e,n,o,i)}update(e){const n=this._cachedMeta,o=n.dataset,i=n.data||[],s=n.iScale.getLabels();if(o.points=i,e!=="resize"){const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0);const a={_loop:!0,_fullLoop:s.length===i.length,options:l};this.updateElement(o,void 0,a,e)}this.updateElements(i,0,i.length,e)}updateElements(e,n,o,i){const s=this._cachedMeta.rScale,l=i==="reset";for(let a=n;a<n+o;a++){const d=e[a],c=this.resolveDataElementOptions(a,d.active?"active":i),u=s.getPointPositionForValue(a,this.getParsed(a).r),f=l?s.xCenter:u.x,h=l?s.yCenter:u.y,p={x:f,y:h,angle:u.angle,skip:isNaN(f)||isNaN(h),options:c};this.updateElement(d,a,p,i)}}}I(wo,"id","radar"),I(wo,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),I(wo,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class Co extends ze{getLabelAndValue(e){const n=this._cachedMeta,o=this.chart.data.labels||[],{xScale:i,yScale:s}=n,l=this.getParsed(e),a=i.getLabelForValue(l.x),d=s.getLabelForValue(l.y);return{label:o[e]||"",value:"("+a+", "+d+")"}}update(e){const n=this._cachedMeta,{data:o=[]}=n,i=this.chart._animationsDisabled;let{start:s,count:l}=dl(n,o,i);if(this._drawStart=s,this._drawCount=l,cl(n)&&(s=0,l=o.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:d}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!d._decimated,a.points=o;const c=this.resolveDatasetElementOptions(e);c.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:c},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(o,s,l,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,o,i){const s=i==="reset",{iScale:l,vScale:a,_stacked:d,_dataset:c}=this._cachedMeta,u=this.resolveDataElementOptions(n,i),f=this.getSharedOptions(u),h=this.includeOptions(i,f),p=l.axis,m=a.axis,{spanGaps:g,segment:y}=this.options,b=Xt(g)?g:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||s||i==="none";let x=n>0&&this.getParsed(n-1);for(let $=n;$<n+o;++$){const w=e[$],P=this.getParsed($),M=_?w:{},N=J(P[m]),V=M[p]=l.getPixelForValue(P[p],$),B=M[m]=s||N?a.getBasePixel():a.getPixelForValue(d?this.applyStack(a,P,d):P[m],$);M.skip=isNaN(V)||isNaN(B)||N,M.stop=$>0&&Math.abs(P[p]-x[p])>b,y&&(M.parsed=P,M.raw=c.data[$]),h&&(M.options=f||this.resolveDataElementOptions($,w.active?"active":i)),_||this.updateElement(w,$,M,i),x=P}this.updateSharedOptions(f,i,u)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let d=n.length-1;d>=0;--d)a=Math.max(a,n[d].size(this.resolveDataElementOptions(d))/2);return a>0&&a}const o=e.dataset,i=o.options&&o.options.borderWidth||0;if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),l=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,l)/2}}I(Co,"id","scatter"),I(Co,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),I(Co,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var Sp=Object.freeze({__proto__:null,BarController:bo,BubbleController:$o,DoughnutController:It,LineController:_o,PieController:Ki,PolarAreaController:vn,RadarController:wo,ScatterController:Co});function Tt(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Zi{constructor(e){I(this,"options");this.options=e||{}}static override(e){Object.assign(Zi.prototype,e)}init(){}formats(){return Tt()}parse(){return Tt()}format(){return Tt()}add(){return Tt()}diff(){return Tt()}startOf(){return Tt()}endOf(){return Tt()}}var vp={_date:Zi};function Mp(t,e,n,o){const{controller:i,data:s,_sorted:l}=t,a=i._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&l&&s.length){const d=a._reversePixels?Kf:tt;if(o){if(i._sharedOptions){const c=s[0],u=typeof c.getRange=="function"&&c.getRange(e);if(u){const f=d(s,e,n-u),h=d(s,e,n+u);return{lo:f.lo,hi:h.hi}}}}else return d(s,e,n)}return{lo:0,hi:s.length-1}}function Mn(t,e,n,o,i){const s=t.getSortedVisibleDatasetMetas(),l=n[e];for(let a=0,d=s.length;a<d;++a){const{index:c,data:u}=s[a],{lo:f,hi:h}=Mp(s[a],e,l,i);for(let p=f;p<=h;++p){const m=u[p];m.skip||o(m,c,p)}}}function Dp(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(o,i){const s=e?Math.abs(o.x-i.x):0,l=n?Math.abs(o.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(l,2))}}function Ji(t,e,n,o,i){const s=[];return!i&&!t.isPointInArea(e)||Mn(t,n,e,function(a,d,c){!i&&!nt(a,t.chartArea,0)||a.inRange(e.x,e.y,o)&&s.push({element:a,datasetIndex:d,index:c})},!0),s}function Ep(t,e,n,o){let i=[];function s(l,a,d){const{startAngle:c,endAngle:u}=l.getProps(["startAngle","endAngle"],o),{angle:f}=ol(l,{x:e.x,y:e.y});$n(f,c,u)&&i.push({element:l,datasetIndex:a,index:d})}return Mn(t,n,e,s),i}function Bp(t,e,n,o,i,s){let l=[];const a=Dp(n);let d=Number.POSITIVE_INFINITY;function c(u,f,h){const p=u.inRange(e.x,e.y,i);if(o&&!p)return;const m=u.getCenterPoint(i);if(!(!!s||t.isPointInArea(m))&&!p)return;const y=a(e,m);y<d?(l=[{element:u,datasetIndex:f,index:h}],d=y):y===d&&l.push({element:u,datasetIndex:f,index:h})}return Mn(t,n,e,c),l}function Qi(t,e,n,o,i,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!o?Ep(t,e,n,i):Bp(t,e,n,o,i,s)}function Kl(t,e,n,o,i){const s=[],l=n==="x"?"inXRange":"inYRange";let a=!1;return Mn(t,n,e,(d,c,u)=>{d[l](e[n],i)&&(s.push({element:d,datasetIndex:c,index:u}),a=a||d.inRange(e.x,e.y,i))}),o&&!a?[]:s}var Vp={evaluateInteractionItems:Mn,modes:{index(t,e,n,o){const i=At(e,t),s=n.axis||"x",l=n.includeInvisible||!1,a=n.intersect?Ji(t,i,s,o,l):Qi(t,i,s,!1,o,l),d=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(c=>{const u=a[0].index,f=c.data[u];f&&!f.skip&&d.push({element:f,datasetIndex:c.index,index:u})}),d):[]},dataset(t,e,n,o){const i=At(e,t),s=n.axis||"xy",l=n.includeInvisible||!1;let a=n.intersect?Ji(t,i,s,o,l):Qi(t,i,s,!1,o,l);if(a.length>0){const d=a[0].datasetIndex,c=t.getDatasetMeta(d).data;a=[];for(let u=0;u<c.length;++u)a.push({element:c[u],datasetIndex:d,index:u})}return a},point(t,e,n,o){const i=At(e,t),s=n.axis||"xy",l=n.includeInvisible||!1;return Ji(t,i,s,o,l)},nearest(t,e,n,o){const i=At(e,t),s=n.axis||"xy",l=n.includeInvisible||!1;return Qi(t,i,s,n.intersect,o,l)},x(t,e,n,o){const i=At(e,t);return Kl(t,i,"x",n.intersect,o)},y(t,e,n,o){const i=At(e,t);return Kl(t,i,"y",n.intersect,o)}}};const Zl=["left","top","right","bottom"];function Dn(t,e){return t.filter(n=>n.pos===e)}function Jl(t,e){return t.filter(n=>Zl.indexOf(n.pos)===-1&&n.box.axis===e)}function En(t,e){return t.sort((n,o)=>{const i=e?o:n,s=e?n:o;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function Pp(t){const e=[];let n,o,i,s,l,a;for(n=0,o=(t||[]).length;n<o;++n)i=t[n],{position:s,options:{stack:l,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:l&&s+l,stackWeight:a});return e}function Fp(t){const e={};for(const n of t){const{stack:o,pos:i,stackWeight:s}=n;if(!o||!Zl.includes(i))continue;const l=e[o]||(e[o]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=s}return e}function Rp(t,e){const n=Fp(t),{vBoxMaxWidth:o,hBoxMaxHeight:i}=e;let s,l,a;for(s=0,l=t.length;s<l;++s){a=t[s];const{fullSize:d}=a.box,c=n[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*o:d&&e.availableWidth,a.height=i):(a.width=o,a.height=u?u*i:d&&e.availableHeight)}return n}function Np(t){const e=Pp(t),n=En(e.filter(c=>c.box.fullSize),!0),o=En(Dn(e,"left"),!0),i=En(Dn(e,"right")),s=En(Dn(e,"top"),!0),l=En(Dn(e,"bottom")),a=Jl(e,"x"),d=Jl(e,"y");return{fullSize:n,leftAndTop:o.concat(s),rightAndBottom:i.concat(d).concat(l).concat(a),chartArea:Dn(e,"chartArea"),vertical:o.concat(i).concat(d),horizontal:s.concat(l).concat(a)}}function Ql(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function ea(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 Ap(t,e,n,o){const{pos:i,box:s}=n,l=t.maxPadding;if(!q(i)){n.size&&(t[i]-=n.size);const f=o[n.stack]||{size:0,count:1};f.size=Math.max(f.size,n.horizontal?s.height:s.width),n.size=f.size/f.count,t[i]+=n.size}s.getPadding&&ea(l,s.getPadding());const a=Math.max(0,e.outerWidth-Ql(l,t,"left","right")),d=Math.max(0,e.outerHeight-Ql(l,t,"top","bottom")),c=a!==t.w,u=d!==t.h;return t.w=a,t.h=d,n.horizontal?{same:c,other:u}:{same:u,other:c}}function Op(t){const e=t.maxPadding;function n(o){const i=Math.max(e[o]-t[o],0);return t[o]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Ip(t,e){const n=e.maxPadding;function o(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(l=>{s[l]=Math.max(e[l],n[l])}),s}return o(t?["left","right"]:["top","bottom"])}function Bn(t,e,n,o){const i=[];let s,l,a,d,c,u;for(s=0,l=t.length,c=0;s<l;++s){a=t[s],d=a.box,d.update(a.width||e.w,a.height||e.h,Ip(a.horizontal,e));const{same:f,other:h}=Ap(e,n,a,o);c|=f&&i.length,u=u||h,d.fullSize||i.push(a)}return c&&Bn(i,e,n,o)||u}function ko(t,e,n,o,i){t.top=n,t.left=e,t.right=e+o,t.bottom=n+i,t.width=o,t.height=i}function ta(t,e,n,o){const i=n.padding;let{x:s,y:l}=e;for(const a of t){const d=a.box,c=o[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/c.weight||1;if(a.horizontal){const f=e.w*u,h=c.size||d.height;yn(c.start)&&(l=c.start),d.fullSize?ko(d,i.left,l,n.outerWidth-i.right-i.left,h):ko(d,e.left+c.placed,l,f,h),c.start=l,c.placed+=f,l=d.bottom}else{const f=e.h*u,h=c.size||d.width;yn(c.start)&&(s=c.start),d.fullSize?ko(d,s,i.top,h,n.outerHeight-i.bottom-i.top):ko(d,s,e.top+c.placed,h,f),c.start=s,c.placed+=f,s=d.right}}e.x=s,e.y=l}var _e={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(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,o){if(!t)return;const i=$e(t.options.layout.padding),s=Math.max(e-i.width,0),l=Math.max(n-i.height,0),a=Np(t.boxes),d=a.vertical,c=a.horizontal;ee(t.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=d.reduce((g,y)=>y.box.options&&y.box.options.display===!1?g:g+1,0)||1,f=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:s,availableHeight:l,vBoxMaxWidth:s/2/u,hBoxMaxHeight:l/2}),h=Object.assign({},i);ea(h,$e(o));const p=Object.assign({maxPadding:h,w:s,h:l,x:i.left,y:i.top},i),m=Rp(d.concat(c),f);Bn(a.fullSize,p,f,m),Bn(d,p,f,m),Bn(c,p,f,m)&&Bn(d,p,f,m),Op(p),ta(a.leftAndTop,p,f,m),p.x+=p.w,p.y+=p.h,ta(a.rightAndBottom,p,f,m),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},ee(a.chartArea,g=>{const y=g.box;Object.assign(y,t.chartArea),y.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class na{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,o){}removeEventListener(e,n,o){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,o,i){return n=Math.max(0,n||e.width),o=o||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):o)}}isAttached(e){return!0}updateConfig(e){}}class Tp extends na{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const xo="$chartjs",zp={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},oa=t=>t===null||t==="";function Lp(t,e){const n=t.style,o=t.getAttribute("height"),i=t.getAttribute("width");if(t[xo]={initial:{height:o,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",oa(i)){const s=Dl(t,"width");s!==void 0&&(t.width=s)}if(oa(o))if(t.style.height==="")t.height=t.width/(e||2);else{const s=Dl(t,"height");s!==void 0&&(t.height=s)}return t}const ia=jh?{passive:!0}:!1;function Hp(t,e,n){t&&t.addEventListener(e,n,ia)}function jp(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,ia)}function Wp(t,e){const n=zp[t.type]||t.type,{x:o,y:i}=At(t,e);return{type:n,chart:e,native:t,x:o!==void 0?o:null,y:i!==void 0?i:null}}function So(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Yp(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let l=!1;for(const a of s)l=l||So(a.addedNodes,o),l=l&&!So(a.removedNodes,o);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Up(t,e,n){const o=t.canvas,i=new MutationObserver(s=>{let l=!1;for(const a of s)l=l||So(a.removedNodes,o),l=l&&!So(a.addedNodes,o);l&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Vn=new Map;let ra=0;function sa(){const t=window.devicePixelRatio;t!==ra&&(ra=t,Vn.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function Gp(t,e){Vn.size||window.addEventListener("resize",sa),Vn.set(t,e)}function qp(t){Vn.delete(t),Vn.size||window.removeEventListener("resize",sa)}function Xp(t,e,n){const o=t.canvas,i=o&&Ui(o);if(!i)return;const s=al((a,d)=>{const c=i.clientWidth;n(a,d),c<i.clientWidth&&n()},window),l=new ResizeObserver(a=>{const d=a[0],c=d.contentRect.width,u=d.contentRect.height;c===0&&u===0||s(c,u)});return l.observe(i),Gp(t,s),l}function er(t,e,n){n&&n.disconnect(),e==="resize"&&qp(t)}function Kp(t,e,n){const o=t.canvas,i=al(s=>{t.ctx!==null&&n(Wp(s,t))},t);return Hp(o,e,i),i}class Zp extends na{acquireContext(e,n){const o=e&&e.getContext&&e.getContext("2d");return o&&o.canvas===e?(Lp(e,n),o):null}releaseContext(e){const n=e.canvas;if(!n[xo])return!1;const o=n[xo].initial;["height","width"].forEach(s=>{const l=o[s];J(l)?n.removeAttribute(s):n.setAttribute(s,l)});const i=o.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[xo],!0}addEventListener(e,n,o){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),l={attach:Yp,detach:Up,resize:Xp}[n]||Kp;i[n]=l(e,n,o)}removeEventListener(e,n){const o=e.$proxies||(e.$proxies={}),i=o[n];if(!i)return;({attach:er,detach:er,resize:er}[n]||jp)(e,n,i),o[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,o,i){return Hh(e,n,o,i)}isAttached(e){const n=Ui(e);return!!(n&&n.isConnected)}}function Jp(t){return!Yi()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Tp:Zp}let it=(mi=class{constructor(){I(this,"x");I(this,"y");I(this,"active",!1);I(this,"options");I(this,"$animations")}tooltipPosition(e){const{x:n,y:o}=this.getProps(["x","y"],e);return{x:n,y:o}}hasValue(){return Xt(this.x)&&Xt(this.y)}getProps(e,n){const o=this.$animations;if(!n||!o)return this;const i={};return e.forEach(s=>{i[s]=o[s]&&o[s].active()?o[s]._to:this[s]}),i}},I(mi,"defaults",{}),I(mi,"defaultRoutes"),mi);function Qp(t,e){const n=t.options.ticks,o=em(t),i=Math.min(n.maxTicksLimit||o,o),s=n.major.enabled?nm(e):[],l=s.length,a=s[0],d=s[l-1],c=[];if(l>i)return om(e,c,s,l/i),c;const u=tm(s,e,i);if(l>0){let f,h;const p=l>1?Math.round((d-a)/(l-1)):null;for(vo(e,c,u,J(p)?0:a-p,a),f=0,h=l-1;f<h;f++)vo(e,c,u,s[f],s[f+1]);return vo(e,c,u,d,J(p)?e.length:d+p),c}return vo(e,c,u),c}function em(t){const e=t.options.offset,n=t._tickSize(),o=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(o,i))}function tm(t,e,n){const o=im(t),i=e.length/n;if(!o)return Math.max(i,1);const s=Uf(o);for(let l=0,a=s.length-1;l<a;l++){const d=s[l];if(d>i)return d}return Math.max(i,1)}function nm(t){const e=[];let n,o;for(n=0,o=t.length;n<o;n++)t[n].major&&e.push(n);return e}function om(t,e,n,o){let i=0,s=n[0],l;for(o=Math.ceil(o),l=0;l<t.length;l++)l===s&&(e.push(t[l]),i++,s=n[i*o])}function vo(t,e,n,o,i){const s=Y(o,0),l=Math.min(Y(i,t.length),t.length);let a=0,d,c,u;for(n=Math.ceil(n),i&&(d=i-o,n=d/Math.floor(d/n)),u=s;u<0;)a++,u=Math.round(s+a*n);for(c=Math.max(s,0);c<l;c++)c===u&&(e.push(t[c]),a++,u=Math.round(s+a*n))}function im(t){const e=t.length;let n,o;if(e<2)return!1;for(o=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==o)return!1;return o}const rm=t=>t==="left"?"right":t==="right"?"left":t,la=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,aa=(t,e)=>Math.min(e||t,t);function da(t,e){const n=[],o=t.length/e,i=t.length;let s=0;for(;s<i;s+=o)n.push(t[Math.floor(s)]);return n}function sm(t,e,n){const o=t.ticks.length,i=Math.min(e,o-1),s=t._startPixel,l=t._endPixel,a=1e-6;let d=t.getPixelForTick(i),c;if(!(n&&(o===1?c=Math.max(d-s,l-d):e===0?c=(t.getPixelForTick(1)-d)/2:c=(d-t.getPixelForTick(i-1))/2,d+=i<e?c:-c,d<s-a||d>l+a)))return d}function lm(t,e){ee(t,n=>{const o=n.gc,i=o.length/2;let s;if(i>e){for(s=0;s<i;++s)delete n.data[o[s]];o.splice(0,i)}})}function Pn(t){return t.drawTicks?t.tickLength:0}function ca(t,e){if(!t.display)return 0;const n=he(t.font,e),o=$e(t.padding);return(oe(t.text)?t.text.length:1)*n.lineHeight+o.height}function am(t,e){return wt(t,{scale:e,type:"scale"})}function dm(t,e,n){return wt(t,{tick:n,index:e,type:"tick"})}function cm(t,e,n){let o=Ni(t);return(n&&e!=="right"||!n&&e==="right")&&(o=rm(o)),o}function um(t,e,n,o){const{top:i,left:s,bottom:l,right:a,chart:d}=t,{chartArea:c,scales:u}=d;let f=0,h,p,m;const g=l-i,y=a-s;if(t.isHorizontal()){if(p=be(o,s,a),q(n)){const b=Object.keys(n)[0],_=n[b];m=u[b].getPixelForValue(_)+g-e}else n==="center"?m=(c.bottom+c.top)/2+g-e:m=la(t,n,e);h=a-s}else{if(q(n)){const b=Object.keys(n)[0],_=n[b];p=u[b].getPixelForValue(_)-y+e}else n==="center"?p=(c.left+c.right)/2-y+e:p=la(t,n,e);m=be(o,l,i),f=n==="left"?-ue:ue}return{titleX:p,titleY:m,maxWidth:h,rotation:f}}class zt extends it{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.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(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:o,_suggestedMax:i}=this;return e=Be(e,Number.POSITIVE_INFINITY),n=Be(n,Number.NEGATIVE_INFINITY),o=Be(o,Number.POSITIVE_INFINITY),i=Be(i,Number.NEGATIVE_INFINITY),{min:Be(e,o),max:Be(n,i),minDefined:de(e),maxDefined:de(n)}}getMinMax(e){let{min:n,max:o,minDefined:i,maxDefined:s}=this.getUserBounds(),l;if(i&&s)return{min:n,max:o};const a=this.getMatchingVisibleMetas();for(let d=0,c=a.length;d<c;++d)l=a[d].controller.getMinMax(this,e),i||(n=Math.min(n,l.min)),s||(o=Math.max(o,l.max));return n=s&&n>o?o:n,o=i&&n>o?n:o,{min:Be(n,Be(o,n)),max:Be(o,Be(n,o))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ne(this.options.beforeUpdate,[this])}update(e,n,o){const{beginAtZero:i,grace:s,ticks:l}=this.options,a=l.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=o=Object.assign({left:0,right:0,top:0,bottom:0},o),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+o.left+o.right:this.height+o.top+o.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_h(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const d=a<this.ticks.length;this._convertTicksToLabels(d?da(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=Qp(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),d&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,o;this.isHorizontal()?(n=this.left,o=this.right):(n=this.top,o=this.bottom,e=!e),this._startPixel=n,this._endPixel=o,this._reversePixels=e,this._length=o-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ne(this.options.afterUpdate,[this])}beforeSetDimensions(){ne(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(){ne(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),ne(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ne(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let o,i,s;for(o=0,i=e.length;o<i;o++)s=e[o],s.label=ne(n.callback,[s.value,o,e],this)}afterTickToLabelConversion(){ne(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ne(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,o=aa(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let l=i,a,d,c;if(!this._isVisible()||!n.display||i>=s||o<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,h=u.highest.height,p=ge(this.chart.width-f,0,this.maxWidth);a=e.offset?this.maxWidth/o:p/(o-1),f+6>a&&(a=p/(o-(e.offset?.5:1)),d=this.maxHeight-Pn(e.grid)-n.padding-ca(e.title,this.chart.options.font),c=Math.sqrt(f*f+h*h),l=Pi(Math.min(Math.asin(ge((u.highest.height+6)/a,-1,1)),Math.asin(ge(d/c,-1,1))-Math.asin(ge(h/c,-1,1)))),l=Math.max(i,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){ne(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ne(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:o,title:i,grid:s}}=this,l=this._isVisible(),a=this.isHorizontal();if(l){const d=ca(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=Pn(s)+d):(e.height=this.maxHeight,e.width=Pn(s)+d),o.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:h}=this._getLabelSizes(),p=o.padding*2,m=Te(this.labelRotation),g=Math.cos(m),y=Math.sin(m);if(a){const b=o.mirror?0:y*f.width+g*h.height;e.height=Math.min(this.maxHeight,e.height+b+p)}else{const b=o.mirror?0:g*f.width+y*h.height;e.width=Math.min(this.maxWidth,e.width+b+p)}this._calculatePadding(c,u,y,g)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,o,i){const{ticks:{align:s,padding:l},position:a}=this.options,d=this.labelRotation!==0,c=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,p=0;d?c?(h=i*e.width,p=o*n.height):(h=o*e.height,p=i*n.width):s==="start"?p=n.width:s==="end"?h=e.width:s!=="inner"&&(h=e.width/2,p=n.width/2),this.paddingLeft=Math.max((h-u+l)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-f+l)*this.width/(this.width-f),0)}else{let u=n.height/2,f=e.height/2;s==="start"?(u=0,f=e.height):s==="end"&&(u=n.height,f=0),this.paddingTop=u+l,this.paddingBottom=f+l}}_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(){ne(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,o;for(n=0,o=e.length;n<o;n++)J(e[n].label)&&(e.splice(n,1),o--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let o=this.ticks;n<o.length&&(o=da(o,n)),this._labelSizes=e=this._computeLabelSizes(o,o.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,o){const{ctx:i,_longestTextCache:s}=this,l=[],a=[],d=Math.floor(n/aa(n,o));let c=0,u=0,f,h,p,m,g,y,b,_,x,$,w;for(f=0;f<n;f+=d){if(m=e[f].label,g=this._resolveTickFontOptions(f),i.font=y=g.string,b=s[y]=s[y]||{data:{},gc:[]},_=g.lineHeight,x=$=0,!J(m)&&!oe(m))x=uo(i,b.data,b.gc,x,m),$=_;else if(oe(m))for(h=0,p=m.length;h<p;++h)w=m[h],!J(w)&&!oe(w)&&(x=uo(i,b.data,b.gc,x,w),$+=_);l.push(x),a.push($),c=Math.max(x,c),u=Math.max($,u)}lm(s,n);const P=l.indexOf(c),M=a.indexOf(u),N=V=>({width:l[V]||0,height:a[V]||0});return{first:N(0),last:N(n-1),widest:N(P),highest:N(M),widths:l,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Xf(this._alignToPixels?Pt(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const o=n[e];return o.$context||(o.$context=dm(this.getContext(),e,o))}return this.$context||(this.$context=am(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Te(this.labelRotation),o=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),l=e.autoSkipPadding||0,a=s?s.widest.width+l:0,d=s?s.highest.height+l:0;return this.isHorizontal()?d*o>a*i?a/o:d/i:d*i<a*o?d/o:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,o=this.chart,i=this.options,{grid:s,position:l,border:a}=i,d=s.offset,c=this.isHorizontal(),f=this.ticks.length+(d?1:0),h=Pn(s),p=[],m=a.setContext(this.getContext()),g=m.display?m.width:0,y=g/2,b=function(S){return Pt(o,S,g)};let _,x,$,w,P,M,N,V,B,k,C,E;if(l==="top")_=b(this.bottom),M=this.bottom-h,V=_-y,k=b(e.top)+y,E=e.bottom;else if(l==="bottom")_=b(this.top),k=e.top,E=b(e.bottom)-y,M=_+y,V=this.top+h;else if(l==="left")_=b(this.right),P=this.right-h,N=_-y,B=b(e.left)+y,C=e.right;else if(l==="right")_=b(this.left),B=e.left,C=b(e.right)-y,P=_+y,N=this.left+h;else if(n==="x"){if(l==="center")_=b((e.top+e.bottom)/2+.5);else if(q(l)){const S=Object.keys(l)[0],F=l[S];_=b(this.chart.scales[S].getPixelForValue(F))}k=e.top,E=e.bottom,M=_+y,V=M+h}else if(n==="y"){if(l==="center")_=b((e.left+e.right)/2);else if(q(l)){const S=Object.keys(l)[0],F=l[S];_=b(this.chart.scales[S].getPixelForValue(F))}P=_-y,N=P-h,B=e.left,C=e.right}const v=Y(i.ticks.maxTicksLimit,f),D=Math.max(1,Math.ceil(f/v));for(x=0;x<f;x+=D){const S=this.getContext(x),F=s.setContext(S),O=a.setContext(S),z=F.lineWidth,T=F.color,W=O.dash||[],U=O.dashOffset,G=F.tickWidth,Q=F.tickColor,le=F.tickBorderDash||[],fe=F.tickBorderDashOffset;$=sm(this,x,d),$!==void 0&&(w=Pt(o,$,z),c?P=N=B=C=w:M=V=k=E=w,p.push({tx1:P,ty1:M,tx2:N,ty2:V,x1:B,y1:k,x2:C,y2:E,width:z,color:T,borderDash:W,borderDashOffset:U,tickWidth:G,tickColor:Q,tickBorderDash:le,tickBorderDashOffset:fe}))}return this._ticksLength=f,this._borderValue=_,p}_computeLabelItems(e){const n=this.axis,o=this.options,{position:i,ticks:s}=o,l=this.isHorizontal(),a=this.ticks,{align:d,crossAlign:c,padding:u,mirror:f}=s,h=Pn(o.grid),p=h+u,m=f?-u:p,g=-Te(this.labelRotation),y=[];let b,_,x,$,w,P,M,N,V,B,k,C,E="middle";if(i==="top")P=this.bottom-m,M=this._getXAxisLabelAlignment();else if(i==="bottom")P=this.top+m,M=this._getXAxisLabelAlignment();else if(i==="left"){const D=this._getYAxisLabelAlignment(h);M=D.textAlign,w=D.x}else if(i==="right"){const D=this._getYAxisLabelAlignment(h);M=D.textAlign,w=D.x}else if(n==="x"){if(i==="center")P=(e.top+e.bottom)/2+p;else if(q(i)){const D=Object.keys(i)[0],S=i[D];P=this.chart.scales[D].getPixelForValue(S)+p}M=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")w=(e.left+e.right)/2-p;else if(q(i)){const D=Object.keys(i)[0],S=i[D];w=this.chart.scales[D].getPixelForValue(S)}M=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(d==="start"?E="top":d==="end"&&(E="bottom"));const v=this._getLabelSizes();for(b=0,_=a.length;b<_;++b){x=a[b],$=x.label;const D=s.setContext(this.getContext(b));N=this.getPixelForTick(b)+s.labelOffset,V=this._resolveTickFontOptions(b),B=V.lineHeight,k=oe($)?$.length:1;const S=k/2,F=D.color,O=D.textStrokeColor,z=D.textStrokeWidth;let T=M;l?(w=N,M==="inner"&&(b===_-1?T=this.options.reverse?"left":"right":b===0?T=this.options.reverse?"right":"left":T="center"),i==="top"?c==="near"||g!==0?C=-k*B+B/2:c==="center"?C=-v.highest.height/2-S*B+B:C=-v.highest.height+B/2:c==="near"||g!==0?C=B/2:c==="center"?C=v.highest.height/2-S*B:C=v.highest.height-k*B,f&&(C*=-1),g!==0&&!D.showLabelBackdrop&&(w+=B/2*Math.sin(g))):(P=N,C=(1-k)*B/2);let W;if(D.showLabelBackdrop){const U=$e(D.backdropPadding),G=v.heights[b],Q=v.widths[b];let le=C-U.top,fe=0-U.left;switch(E){case"middle":le-=G/2;break;case"bottom":le-=G;break}switch(M){case"center":fe-=Q/2;break;case"right":fe-=Q;break;case"inner":b===_-1?fe-=Q:b>0&&(fe-=Q/2);break}W={left:fe,top:le,width:Q+U.width,height:G+U.height,color:D.backdropColor}}y.push({label:$,font:V,textOffset:C,options:{rotation:g,color:F,strokeColor:O,strokeWidth:z,textAlign:T,textBaseline:E,translation:[w,P],backdrop:W}})}return y}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Te(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:o,mirror:i,padding:s}}=this.options,l=this._getLabelSizes(),a=e+s,d=l.widest.width;let c,u;return n==="left"?i?(u=this.right+s,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u+=d)):(u=this.right-a,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+s,o==="near"?c="right":o==="center"?(c="center",u-=d/2):(c="left",u-=d)):(u=this.left+a,o==="near"?c="left":o==="center"?(c="center",u+=d/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:o,top:i,width:s,height:l}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(o,i,s,l),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,o=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,l;const a=(d,c,u)=>{!u.width||!u.color||(o.save(),o.lineWidth=u.width,o.strokeStyle=u.color,o.setLineDash(u.borderDash||[]),o.lineDashOffset=u.borderDashOffset,o.beginPath(),o.moveTo(d.x,d.y),o.lineTo(c.x,c.y),o.stroke(),o.restore())};if(n.display)for(s=0,l=i.length;s<l;++s){const d=i[s];n.drawOnChartArea&&a({x:d.x1,y:d.y1},{x:d.x2,y:d.y2},d),n.drawTicks&&a({x:d.tx1,y:d.ty1},{x:d.tx2,y:d.ty2},{color:d.tickColor,width:d.tickWidth,borderDash:d.tickBorderDash,borderDashOffset:d.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:o,grid:i}}=this,s=o.setContext(this.getContext()),l=o.display?s.width:0;if(!l)return;const a=i.setContext(this.getContext(0)).lineWidth,d=this._borderValue;let c,u,f,h;this.isHorizontal()?(c=Pt(e,this.left,l)-l/2,u=Pt(e,this.right,a)+a/2,f=h=d):(f=Pt(e,this.top,l)-l/2,h=Pt(e,this.bottom,a)+a/2,c=u=d),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(c,f),n.lineTo(u,h),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const o=this.ctx,i=this._computeLabelArea();i&&fo(o,i);const s=this.getLabelItems(e);for(const l of s){const a=l.options,d=l.font,c=l.label,u=l.textOffset;Ft(o,c,0,u,d,a)}i&&ho(o)}drawTitle(){const{ctx:e,options:{position:n,title:o,reverse:i}}=this;if(!o.display)return;const s=he(o.font),l=$e(o.padding),a=o.align;let d=s.lineHeight/2;n==="bottom"||n==="center"||q(n)?(d+=l.bottom,oe(o.text)&&(d+=s.lineHeight*(o.text.length-1))):d+=l.top;const{titleX:c,titleY:u,maxWidth:f,rotation:h}=um(this,d,n,a);Ft(e,o.text,0,0,s,{color:o.color,maxWidth:f,rotation:h,textAlign:cm(a,n,i),textBaseline:"middle",translation:[c,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,o=Y(e.grid&&e.grid.z,-1),i=Y(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==zt.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:o,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),o=this.axis+"AxisID",i=[];let s,l;for(s=0,l=n.length;s<l;++s){const a=n[s];a[o]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return he(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Mo{constructor(e,n,o){this.type=e,this.scope=n,this.override=o,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let o;pm(n)&&(o=this.register(n));const i=this.items,s=e.id,l=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in i||(i[s]=e,fm(e,l,o),this.override&&ce.override(e.id,e.overrides)),l}get(e){return this.items[e]}unregister(e){const n=this.items,o=e.id,i=this.scope;o in n&&delete n[o],i&&o in ce[i]&&(delete ce[i][o],this.override&&delete Vt[o])}}function fm(t,e,n){const o=mn(Object.create(null),[n?ce.get(n):{},ce.get(e),t.defaults]);ce.set(e,o),t.defaultRoutes&&hm(e,t.defaultRoutes),t.descriptors&&ce.describe(e,t.descriptors)}function hm(t,e){Object.keys(e).forEach(n=>{const o=n.split("."),i=o.pop(),s=[t].concat(o).join("."),l=e[n].split("."),a=l.pop(),d=l.join(".");ce.route(s,i,d,a)})}function pm(t){return"id"in t&&"defaults"in t}class mm{constructor(){this.controllers=new Mo(ze,"datasets",!0),this.elements=new Mo(it,"elements"),this.plugins=new Mo(Object,"plugins"),this.scales=new Mo(zt,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,o){[...n].forEach(i=>{const s=o||this._getRegistryForType(i);o||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):ee(i,l=>{const a=o||this._getRegistryForType(l);this._exec(e,a,l)})})}_exec(e,n,o){const i=Vi(e);ne(o["before"+i],[],o),n[e](o),ne(o["after"+i],[],o)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const o=this._typedRegistries[n];if(o.isForType(e))return o}return this.plugins}_get(e,n,o){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+o+".");return i}}var Ge=new mm;class gm{constructor(){this._init=[]}notify(e,n,o,i){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const s=i?this._descriptors(e).filter(i):this._descriptors(e),l=this._notify(s,e,n,o);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall")),l}_notify(e,n,o,i){i=i||{};for(const s of e){const l=s.plugin,a=l[o],d=[n,i,s.options];if(ne(a,d,l)===!1&&i.cancelable)return!1}return!0}invalidate(){J(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const o=e&&e.config,i=Y(o.options&&o.options.plugins,{}),s=ym(o);return i===!1&&!n?[]:$m(e,s,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],o=this._cache,i=(s,l)=>s.filter(a=>!l.some(d=>a.plugin.id===d.plugin.id));this._notify(i(n,o),e,"stop"),this._notify(i(o,n),e,"start")}}function ym(t){const e={},n=[],o=Object.keys(Ge.plugins.items);for(let s=0;s<o.length;s++)n.push(Ge.getPlugin(o[s]));const i=t.plugins||[];for(let s=0;s<i.length;s++){const l=i[s];n.indexOf(l)===-1&&(n.push(l),e[l.id]=!0)}return{plugins:n,localIds:e}}function bm(t,e){return!e&&t===!1?null:t===!0?{}:t}function $m(t,{plugins:e,localIds:n},o,i){const s=[],l=t.getContext();for(const a of e){const d=a.id,c=bm(o[d],i);c!==null&&s.push({plugin:a,options:_m(t.config,{plugin:a,local:n[d]},c,l)})}return s}function _m(t,{plugin:e,local:n},o,i){const s=t.pluginScopeKeys(e),l=t.getOptionScopes(o,s);return n&&e.defaults&&l.push(e.defaults),t.createResolver(l,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function tr(t,e){const n=ce.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function wm(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function Cm(t,e){return t===e?"_index_":"_value_"}function ua(t){if(t==="x"||t==="y"||t==="r")return t}function km(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function nr(t,...e){if(ua(t))return t;for(const n of e){const o=n.axis||km(n.position)||t.length>1&&ua(t[0].toLowerCase());if(o)return o}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function fa(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function xm(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(o=>o.xAxisID===t||o.yAxisID===t);if(n.length)return fa(t,"x",n[0])||fa(t,"y",n[0])}return{}}function Sm(t,e){const n=Vt[t.type]||{scales:{}},o=e.scales||{},i=tr(t.type,e),s=Object.create(null);return Object.keys(o).forEach(l=>{const a=o[l];if(!q(a))return console.error(`Invalid scale configuration for scale: ${l}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);const d=nr(l,a,xm(l,t),ce.scales[a.type]),c=Cm(d,i),u=n.scales||{};s[l]=gn(Object.create(null),[{axis:d},a,u[d],u[c]])}),t.data.datasets.forEach(l=>{const a=l.type||t.type,d=l.indexAxis||tr(a,e),u=(Vt[a]||{}).scales||{};Object.keys(u).forEach(f=>{const h=wm(f,d),p=l[h+"AxisID"]||h;s[p]=s[p]||Object.create(null),gn(s[p],[{axis:h},o[p],u[f]])})}),Object.keys(s).forEach(l=>{const a=s[l];gn(a,[ce.scales[a.type],ce.scale])}),s}function ha(t){const e=t.options||(t.options={});e.plugins=Y(e.plugins,{}),e.scales=Sm(t,e)}function pa(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function vm(t){return t=t||{},t.data=pa(t.data),ha(t),t}const ma=new Map,ga=new Set;function Do(t,e){let n=ma.get(t);return n||(n=e(),ma.set(t,n),ga.add(n)),n}const Fn=(t,e,n)=>{const o=bt(e,n);o!==void 0&&t.add(o)};class Mm{constructor(e){this._config=vm(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=pa(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),ha(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Do(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Do(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Do(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,o=this.type;return Do(`${o}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const o=this._scopeCache;let i=o.get(e);return(!i||n)&&(i=new Map,o.set(e,i)),i}getOptionScopes(e,n,o){const{options:i,type:s}=this,l=this._cachedScopes(e,o),a=l.get(n);if(a)return a;const d=new Set;n.forEach(u=>{e&&(d.add(e),u.forEach(f=>Fn(d,e,f))),u.forEach(f=>Fn(d,i,f)),u.forEach(f=>Fn(d,Vt[s]||{},f)),u.forEach(f=>Fn(d,ce,f)),u.forEach(f=>Fn(d,Ii,f))});const c=Array.from(d);return c.length===0&&c.push(Object.create(null)),ga.has(n)&&l.set(n,c),c}chartOptionScopes(){const{options:e,type:n}=this;return[e,Vt[n]||{},ce.datasets[n]||{},{type:n},ce,Ii]}resolveNamedOptions(e,n,o,i=[""]){const s={$shared:!0},{resolver:l,subPrefixes:a}=ya(this._resolverCache,e,i);let d=l;if(Em(l,n)){s.$shared=!1,o=$t(o)?o():o;const c=this.createResolver(e,o,a);d=Kt(l,o,c)}for(const c of n)s[c]=d[c];return s}createResolver(e,n,o=[""],i){const{resolver:s}=ya(this._resolverCache,e,o);return q(n)?Kt(s,n,void 0,i):s}}function ya(t,e,n){let o=t.get(e);o||(o=new Map,t.set(e,o));const i=n.join();let s=o.get(i);return s||(s={resolver:Hi(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},o.set(i,s)),s}const Dm=t=>q(t)&&Object.getOwnPropertyNames(t).some(e=>$t(t[e]));function Em(t,e){const{isScriptable:n,isIndexable:o}=$l(t);for(const i of e){const s=n(i),l=o(i),a=(l||s)&&t[i];if(s&&($t(a)||Dm(a))||l&&oe(a))return!0}return!1}var Bm="4.4.2";const Vm=["top","bottom","left","right","chartArea"];function ba(t,e){return t==="top"||t==="bottom"||Vm.indexOf(t)===-1&&e==="x"}function $a(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}function _a(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),ne(n&&n.onComplete,[t],e)}function Pm(t){const e=t.chart,n=e.options.animation;ne(n&&n.onProgress,[t],e)}function wa(t){return Yi()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Eo={},Ca=t=>{const e=wa(t);return Object.values(Eo).filter(n=>n.canvas===e).pop()};function Fm(t,e,n){const o=Object.keys(t);for(const i of o){const s=+i;if(s>=e){const l=t[i];delete t[i],(n>0||s>e)&&(t[s+n]=l)}}}function Rm(t,e,n,o){return!n||t.type==="mouseout"?null:o?e:t}function Bo(t,e,n){return t.options.clip?t[n]:e[n]}function Nm(t,e){const{xScale:n,yScale:o}=t;return n&&o?{left:Bo(n,e,"left"),right:Bo(n,e,"right"),top:Bo(o,e,"top"),bottom:Bo(o,e,"bottom")}:e}class Le{static register(...e){Ge.add(...e),ka()}static unregister(...e){Ge.remove(...e),ka()}constructor(e,n){const o=this.config=new Mm(n),i=wa(e),s=Ca(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const l=o.createResolver(o.chartOptionScopes(),this.getContext());this.platform=new(o.platform||Jp(i)),this.platform.updateConfig(o);const a=this.platform.acquireContext(i,l.aspectRatio),d=a&&a.canvas,c=d&&d.height,u=d&&d.width;if(this.id=Of(),this.ctx=a,this.canvas=d,this.width=u,this.height=c,this._options=l,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 gm,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Qf(f=>this.update(f),l.resizeDelay||0),this._dataChanges=[],Eo[this.id]=this,!a||!d){console.error("Failed to create chart: can't acquire context from the given item");return}ot.listen(this,"complete",_a),ot.listen(this,"progress",Pm),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:o,height:i,_aspectRatio:s}=this;return J(e)?n&&s?s:i?o/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Ge}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Ml(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return gl(this.canvas,this.ctx),this}stop(){return ot.stop(this),this}resize(e,n){ot.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const o=this.options,i=this.canvas,s=o.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(i,e,n,s),a=o.devicePixelRatio||this.platform.getDevicePixelRatio(),d=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,Ml(this,a,!0)&&(this.notifyPlugins("resize",{size:l}),ne(o.onResize,[this,l],this),this.attached&&this._doResize(d)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ee(n,(o,i)=>{o.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,o=this.scales,i=Object.keys(o).reduce((l,a)=>(l[a]=!1,l),{});let s=[];n&&(s=s.concat(Object.keys(n).map(l=>{const a=n[l],d=nr(l,a),c=d==="r",u=d==="x";return{options:a,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),ee(s,l=>{const a=l.options,d=a.id,c=nr(d,a),u=Y(a.type,l.dtype);(a.position===void 0||ba(a.position,c)!==ba(l.dposition))&&(a.position=l.dposition),i[d]=!0;let f=null;if(d in o&&o[d].type===u)f=o[d];else{const h=Ge.getScale(u);f=new h({id:d,type:u,ctx:this.ctx,chart:this}),o[f.id]=f}f.init(a,e)}),ee(i,(l,a)=>{l||delete o[a]}),ee(o,l=>{_e.configure(this,l,l.options),_e.addBox(this,l)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,o=e.length;if(e.sort((i,s)=>i.index-s.index),o>n){for(let i=n;i<o;++i)this._destroyDatasetMeta(i);e.splice(n,o-n)}this._sortedMetasets=e.slice(0).sort($a("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((o,i)=>{n.filter(s=>s===o._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let o,i;for(this._removeUnreferencedMetasets(),o=0,i=n.length;o<i;o++){const s=n[o];let l=this.getDatasetMeta(o);const a=s.type||this.config.type;if(l.type&&l.type!==a&&(this._destroyDatasetMeta(o),l=this.getDatasetMeta(o)),l.type=a,l.indexAxis=s.indexAxis||tr(a,this.options),l.order=s.order||0,l.index=o,l.label=""+s.label,l.visible=this.isDatasetVisible(o),l.controller)l.controller.updateIndex(o),l.controller.linkScales();else{const d=Ge.getController(a),{datasetElementType:c,dataElementType:u}=ce.datasets[a];Object.assign(d,{dataElementType:Ge.getElement(u),datasetElementType:c&&Ge.getElement(c)}),l.controller=new d(this,o),e.push(l.controller)}}return this._updateMetasets(),e}_resetElements(){ee(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const o=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!o.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),h=!i&&s.indexOf(f)===-1;f.buildOrUpdateElements(h),l=Math.max(+f.getMaxOverflow(),l)}l=this._minPadding=o.layout.autoPadding?l:0,this._updateLayout(l),i||ee(s,c=>{c.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort($a("z","_idx"));const{_active:a,_lastEvent:d}=this;d?this._eventHandler(d,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ee(this.scales,e=>{_e.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),o=new Set(e.events);(!Js(n,o)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:o,start:i,count:s}of n){const l=o==="_removeElements"?-s:s;Fm(e,i,l)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,o=s=>new Set(e.filter(l=>l[0]===s).map((l,a)=>a+","+l.splice(1).join(","))),i=o(0);for(let s=1;s<n;s++)if(!Js(i,o(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;_e.update(this,this.width,this.height,e);const n=this.chartArea,o=n.width<=0||n.height<=0;this._layers=[],ee(this.boxes,i=>{o&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,o=this.data.datasets.length;n<o;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,o=this.data.datasets.length;n<o;++n)this._updateDataset(n,$t(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const o=this.getDatasetMeta(e),i={meta:o,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(o.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ot.has(this)?this.attached&&!ot.running(this)&&ot.start(this):(this.draw(),_a({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:o,height:i}=this._resizeBeforeDraw;this._resize(o,i),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,o=[];let i,s;for(i=0,s=n.length;i<s;++i){const l=n[i];(!e||l.visible)&&o.push(l)}return o}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,o=e._clip,i=!o.disabled,s=Nm(e,this.chartArea),l={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",l)!==!1&&(i&&fo(n,{left:o.left===!1?0:s.left-o.left,right:o.right===!1?this.width:s.right+o.right,top:o.top===!1?0:s.top-o.top,bottom:o.bottom===!1?this.height:s.bottom+o.bottom}),e.controller.draw(),i&&ho(n),l.cancelable=!1,this.notifyPlugins("afterDatasetDraw",l))}isPointInArea(e){return nt(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,o,i){const s=Vp.modes[n];return typeof s=="function"?s(this,e,o,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],o=this._metasets;let i=o.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},o.push(i)),i}getContext(){return this.$context||(this.$context=wt(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const o=this.getDatasetMeta(e);return typeof o.hidden=="boolean"?!o.hidden:!n.hidden}setDatasetVisibility(e,n){const o=this.getDatasetMeta(e);o.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,o){const i=o?"show":"hide",s=this.getDatasetMeta(e),l=s.controller._resolveAnimations(void 0,i);yn(n)?(s.data[n].hidden=!o,this.update()):(this.setDatasetVisibility(e,o),l.update(s,{visible:o}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),ot.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),gl(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Eo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,o=(s,l)=>{n.addEventListener(this,s,l),e[s]=l},i=(s,l,a)=>{s.offsetX=l,s.offsetY=a,this._eventHandler(s)};ee(this.options.events,s=>o(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,o=(d,c)=>{n.addEventListener(this,d,c),e[d]=c},i=(d,c)=>{e[d]&&(n.removeEventListener(this,d,c),delete e[d])},s=(d,c)=>{this.canvas&&this.resize(d,c)};let l;const a=()=>{i("attach",a),this.attached=!0,this.resize(),o("resize",s),o("detach",l)};l=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),o("attach",a)},n.isAttached(this.canvas)?a():l()}unbindEvents(){ee(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},ee(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,o){const i=o?"set":"remove";let s,l,a,d;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,d=e.length;a<d;++a){l=e[a];const c=l&&this.getDatasetMeta(l.datasetIndex).controller;c&&c[i+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],o=e.map(({datasetIndex:s,index:l})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[l],index:l}});!ro(o,n)&&(this._active=o,this._lastEvent=null,this._updateHoverStyles(o,n))}notifyPlugins(e,n,o){return this._plugins.notify(this,e,n,o)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,o){const i=this.options.hover,s=(d,c)=>d.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),l=s(n,e),a=o?e:s(e,n);l.length&&this.updateHoverStyle(l,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const o={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=l=>(l.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",o,i)===!1)return;const s=this._handleEvent(e,n,o.inChartArea);return o.cancelable=!1,this.notifyPlugins("afterEvent",o,i),(s||o.changed)&&this.render(),this}_handleEvent(e,n,o){const{_active:i=[],options:s}=this,l=n,a=this._getActiveElements(e,i,o,l),d=jf(e),c=Rm(e,this._lastEvent,o,d);o&&(this._lastEvent=null,ne(s.onHover,[e,a,this],this),d&&ne(s.onClick,[e,a,this],this));const u=!ro(a,i);return(u||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=c,u}_getActiveElements(e,n,o,i){if(e.type==="mouseout")return[];if(!o)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}}I(Le,"defaults",ce),I(Le,"instances",Eo),I(Le,"overrides",Vt),I(Le,"registry",Ge),I(Le,"version",Bm),I(Le,"getChart",Ca);function ka(){return ee(Le.instances,t=>t._plugins.invalidate())}function Am(t,e,n){const{startAngle:o,pixelMargin:i,x:s,y:l,outerRadius:a,innerRadius:d}=e;let c=i/a;t.beginPath(),t.arc(s,l,a,o-c,n+c),d>i?(c=i/d,t.arc(s,l,d,n+c,o-c,!0)):t.arc(s,l,i,n+ue,o-ue),t.closePath(),t.clip()}function Om(t){return Li(t,["outerStart","outerEnd","innerStart","innerEnd"])}function Im(t,e,n,o){const i=Om(t.options.borderRadius),s=(n-e)/2,l=Math.min(s,o*e/2),a=d=>{const c=(n-Math.min(s,d))*o/2;return ge(d,0,Math.min(s,c))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:ge(i.innerStart,0,l),innerEnd:ge(i.innerEnd,0,l)}}function Qt(t,e,n,o){return{x:n+t*Math.cos(e),y:o+t*Math.sin(e)}}function Vo(t,e,n,o,i,s){const{x:l,y:a,startAngle:d,pixelMargin:c,innerRadius:u}=e,f=Math.max(e.outerRadius+o+n-c,0),h=u>0?u+o+n+c:0;let p=0;const m=i-d;if(o){const D=u>0?u-o:0,S=f>0?f-o:0,F=(D+S)/2,O=F!==0?m*F/(F+o):m;p=(m-O)/2}const g=Math.max(.001,m*f-n/ie)/f,y=(m-g)/2,b=d+y+p,_=i-y-p,{outerStart:x,outerEnd:$,innerStart:w,innerEnd:P}=Im(e,h,f,_-b),M=f-x,N=f-$,V=b+x/M,B=_-$/N,k=h+w,C=h+P,E=b+w/k,v=_-P/C;if(t.beginPath(),s){const D=(V+B)/2;if(t.arc(l,a,f,V,D),t.arc(l,a,f,D,B),$>0){const z=Qt(N,B,l,a);t.arc(z.x,z.y,$,B,_+ue)}const S=Qt(C,_,l,a);if(t.lineTo(S.x,S.y),P>0){const z=Qt(C,v,l,a);t.arc(z.x,z.y,P,_+ue,v+Math.PI)}const F=(_-P/h+(b+w/h))/2;if(t.arc(l,a,h,_-P/h,F,!0),t.arc(l,a,h,F,b+w/h,!0),w>0){const z=Qt(k,E,l,a);t.arc(z.x,z.y,w,E+Math.PI,b-ue)}const O=Qt(M,b,l,a);if(t.lineTo(O.x,O.y),x>0){const z=Qt(M,V,l,a);t.arc(z.x,z.y,x,b-ue,V)}}else{t.moveTo(l,a);const D=Math.cos(V)*f+l,S=Math.sin(V)*f+a;t.lineTo(D,S);const F=Math.cos(B)*f+l,O=Math.sin(B)*f+a;t.lineTo(F,O)}t.closePath()}function Tm(t,e,n,o,i){const{fullCircles:s,startAngle:l,circumference:a}=e;let d=e.endAngle;if(s){Vo(t,e,n,o,d,i);for(let c=0;c<s;++c)t.fill();isNaN(a)||(d=l+(a%re||re))}return Vo(t,e,n,o,d,i),t.fill(),d}function zm(t,e,n,o,i){const{fullCircles:s,startAngle:l,circumference:a,options:d}=e,{borderWidth:c,borderJoinStyle:u,borderDash:f,borderDashOffset:h}=d,p=d.borderAlign==="inner";if(!c)return;t.setLineDash(f||[]),t.lineDashOffset=h,p?(t.lineWidth=c*2,t.lineJoin=u||"round"):(t.lineWidth=c,t.lineJoin=u||"bevel");let m=e.endAngle;if(s){Vo(t,e,n,o,m,i);for(let g=0;g<s;++g)t.stroke();isNaN(a)||(m=l+(a%re||re))}p&&Am(t,e,m),s||(Vo(t,e,n,o,m,i),t.stroke())}class Rn extends it{constructor(n){super();I(this,"circumference");I(this,"endAngle");I(this,"fullCircles");I(this,"innerRadius");I(this,"outerRadius");I(this,"pixelMargin");I(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,o,i){const s=this.getProps(["x","y"],i),{angle:l,distance:a}=ol(s,{x:n,y:o}),{startAngle:d,endAngle:c,innerRadius:u,outerRadius:f,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),p=(this.options.spacing+this.options.borderWidth)/2,g=Y(h,c-d)>=re||$n(l,d,c),y=et(a,u+p,f+p);return g&&y}getCenterPoint(n){const{x:o,y:i,startAngle:s,endAngle:l,innerRadius:a,outerRadius:d}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:c,spacing:u}=this.options,f=(s+l)/2,h=(a+d+u+c)/2;return{x:o+Math.cos(f)*h,y:i+Math.sin(f)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:o,circumference:i}=this,s=(o.offset||0)/4,l=(o.spacing||0)/2,a=o.circular;if(this.pixelMargin=o.borderAlign==="inner"?.33:0,this.fullCircles=i>re?Math.floor(i/re):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const d=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(d)*s,Math.sin(d)*s);const c=1-Math.sin(Math.min(ie,i||0)),u=s*c;n.fillStyle=o.backgroundColor,n.strokeStyle=o.borderColor,Tm(n,this,u,l,a),zm(n,this,u,l,a),n.restore()}}I(Rn,"id","arc"),I(Rn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),I(Rn,"defaultRoutes",{backgroundColor:"backgroundColor"}),I(Rn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function xa(t,e,n=e){t.lineCap=Y(n.borderCapStyle,e.borderCapStyle),t.setLineDash(Y(n.borderDash,e.borderDash)),t.lineDashOffset=Y(n.borderDashOffset,e.borderDashOffset),t.lineJoin=Y(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Y(n.borderWidth,e.borderWidth),t.strokeStyle=Y(n.borderColor,e.borderColor)}function Lm(t,e,n){t.lineTo(n.x,n.y)}function Hm(t){return t.stepped?uh:t.tension||t.cubicInterpolationMode==="monotone"?fh:Lm}function Sa(t,e,n={}){const o=t.length,{start:i=0,end:s=o-1}=n,{start:l,end:a}=e,d=Math.max(i,l),c=Math.min(s,a),u=i<l&&s<l||i>a&&s>a;return{count:o,start:d,loop:e.loop,ilen:c<d&&!u?o+c-d:c-d}}function jm(t,e,n,o){const{points:i,options:s}=e,{count:l,start:a,loop:d,ilen:c}=Sa(i,n,o),u=Hm(s);let{move:f=!0,reverse:h}=o||{},p,m,g;for(p=0;p<=c;++p)m=i[(a+(h?c-p:p))%l],!m.skip&&(f?(t.moveTo(m.x,m.y),f=!1):u(t,g,m,h,s.stepped),g=m);return d&&(m=i[(a+(h?c:0))%l],u(t,g,m,h,s.stepped)),!!d}function Wm(t,e,n,o){const i=e.points,{count:s,start:l,ilen:a}=Sa(i,n,o),{move:d=!0,reverse:c}=o||{};let u=0,f=0,h,p,m,g,y,b;const _=$=>(l+(c?a-$:$))%s,x=()=>{g!==y&&(t.lineTo(u,y),t.lineTo(u,g),t.lineTo(u,b))};for(d&&(p=i[_(0)],t.moveTo(p.x,p.y)),h=0;h<=a;++h){if(p=i[_(h)],p.skip)continue;const $=p.x,w=p.y,P=$|0;P===m?(w<g?g=w:w>y&&(y=w),u=(f*u+$)/++f):(x(),t.lineTo($,w),m=P,f=0,g=y=w),b=w}x()}function or(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Wm:jm}function Ym(t){return t.stepped?Wh:t.tension||t.cubicInterpolationMode==="monotone"?Yh:Ot}function Um(t,e,n,o){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,o)&&i.closePath()),xa(t,e.options),t.stroke(i)}function Gm(t,e,n,o){const{segments:i,options:s}=e,l=or(e);for(const a of i)xa(t,s,a.style),t.beginPath(),l(t,e,a,{start:n,end:n+o-1})&&t.closePath(),t.stroke()}const qm=typeof Path2D=="function";function Xm(t,e,n,o){qm&&!e.options.segment?Um(t,e,n,o):Gm(t,e,n,o)}class Ct extends it{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const o=this.options;if((o.tension||o.cubicInterpolationMode==="monotone")&&!o.stepped&&!this._pointsUpdated){const i=o.spanGaps?this._loop:this._fullLoop;Ah(this._points,o,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Zh(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,o=e.length;return o&&n[e[o-1].end]}interpolate(e,n){const o=this.options,i=e[n],s=this.points,l=Rl(this,{property:n,start:i,end:i});if(!l.length)return;const a=[],d=Ym(o);let c,u;for(c=0,u=l.length;c<u;++c){const{start:f,end:h}=l[c],p=s[f],m=s[h];if(p===m){a.push(p);continue}const g=Math.abs((i-p[n])/(m[n]-p[n])),y=d(p,m,g,o.stepped);y[n]=e[n],a.push(y)}return a.length===1?a[0]:a}pathSegment(e,n,o){return or(this)(e,this,n,o)}path(e,n,o){const i=this.segments,s=or(this);let l=this._loop;n=n||0,o=o||this.points.length-n;for(const a of i)l&=s(e,this,a,{start:n,end:n+o-1});return!!l}draw(e,n,o,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),Xm(e,this,o,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}I(Ct,"id","line"),I(Ct,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),I(Ct,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),I(Ct,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function va(t,e,n,o){const i=t.options,{[n]:s}=t.getProps([n],o);return Math.abs(e-s)<i.radius+i.hitRadius}class Po extends it{constructor(n){super();I(this,"parsed");I(this,"skip");I(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,o,i){const s=this.options,{x:l,y:a}=this.getProps(["x","y"],i);return Math.pow(n-l,2)+Math.pow(o-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,o){return va(this,n,"x",o)}inYRange(n,o){return va(this,n,"y",o)}getCenterPoint(n){const{x:o,y:i}=this.getProps(["x","y"],n);return{x:o,y:i}}size(n){n=n||this.options||{};let o=n.radius||0;o=Math.max(o,o&&n.hoverRadius||0);const i=o&&n.borderWidth||0;return(o+i)*2}draw(n,o){const i=this.options;this.skip||i.radius<.1||!nt(this,o,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,zi(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}I(Po,"id","point"),I(Po,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),I(Po,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Ma(t,e){const{x:n,y:o,base:i,width:s,height:l}=t.getProps(["x","y","base","width","height"],e);let a,d,c,u,f;return t.horizontal?(f=l/2,a=Math.min(n,i),d=Math.max(n,i),c=o-f,u=o+f):(f=s/2,a=n-f,d=n+f,c=Math.min(o,i),u=Math.max(o,i)),{left:a,top:c,right:d,bottom:u}}function kt(t,e,n,o){return t?0:ge(e,n,o)}function Km(t,e,n){const o=t.options.borderWidth,i=t.borderSkipped,s=bl(o);return{t:kt(i.top,s.top,0,n),r:kt(i.right,s.right,0,e),b:kt(i.bottom,s.bottom,0,n),l:kt(i.left,s.left,0,e)}}function Zm(t,e,n){const{enableBorderRadius:o}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,s=Rt(i),l=Math.min(e,n),a=t.borderSkipped,d=o||q(i);return{topLeft:kt(!d||a.top||a.left,s.topLeft,0,l),topRight:kt(!d||a.top||a.right,s.topRight,0,l),bottomLeft:kt(!d||a.bottom||a.left,s.bottomLeft,0,l),bottomRight:kt(!d||a.bottom||a.right,s.bottomRight,0,l)}}function Jm(t){const e=Ma(t),n=e.right-e.left,o=e.bottom-e.top,i=Km(t,n/2,o/2),s=Zm(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o,radius:s},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:o-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function ir(t,e,n,o){const i=e===null,s=n===null,a=t&&!(i&&s)&&Ma(t,o);return a&&(i||et(e,a.left,a.right))&&(s||et(n,a.top,a.bottom))}function Qm(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function e0(t,e){t.rect(e.x,e.y,e.w,e.h)}function rr(t,e,n={}){const o=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-o,l=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+o,y:t.y+i,w:t.w+s,h:t.h+l,radius:t.radius}}class Fo extends it{constructor(e){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,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:o,backgroundColor:i}}=this,{inner:s,outer:l}=Jm(this),a=Qm(l.radius)?kn:e0;e.save(),(l.w!==s.w||l.h!==s.h)&&(e.beginPath(),a(e,rr(l,n,s)),e.clip(),a(e,rr(s,-n,l)),e.fillStyle=o,e.fill("evenodd")),e.beginPath(),a(e,rr(s,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,o){return ir(this,e,n,o)}inXRange(e,n){return ir(this,e,null,n)}inYRange(e,n){return ir(this,null,e,n)}getCenterPoint(e){const{x:n,y:o,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(n+i)/2:n,y:s?o:(o+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}I(Fo,"id","bar"),I(Fo,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),I(Fo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var t0=Object.freeze({__proto__:null,ArcElement:Rn,BarElement:Fo,LineElement:Ct,PointElement:Po});const sr=["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)"],Da=sr.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function Ea(t){return sr[t%sr.length]}function Ba(t){return Da[t%Da.length]}function n0(t,e){return t.borderColor=Ea(e),t.backgroundColor=Ba(e),++e}function o0(t,e){return t.backgroundColor=t.data.map(()=>Ea(e++)),e}function i0(t,e){return t.backgroundColor=t.data.map(()=>Ba(e++)),e}function r0(t){let e=0;return(n,o)=>{const i=t.getDatasetMeta(o).controller;i instanceof It?e=o0(n,e):i instanceof vn?e=i0(n,e):i&&(e=n0(n,e))}}function Va(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}function s0(t){return t&&(t.borderColor||t.backgroundColor)}var l0={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,n){if(!n.enabled)return;const{data:{datasets:o},options:i}=t.config,{elements:s}=i;if(!n.forceOverride&&(Va(o)||s0(i)||s&&Va(s)))return;const l=r0(t);o.forEach(l)}};function a0(t,e,n,o,i){const s=i.samples||o;if(s>=n)return t.slice(e,e+n);const l=[],a=(n-2)/(s-2);let d=0;const c=e+n-1;let u=e,f,h,p,m,g;for(l[d++]=t[u],f=0;f<s-2;f++){let y=0,b=0,_;const x=Math.floor((f+1)*a)+1+e,$=Math.min(Math.floor((f+2)*a)+1,n)+e,w=$-x;for(_=x;_<$;_++)y+=t[_].x,b+=t[_].y;y/=w,b/=w;const P=Math.floor(f*a)+1+e,M=Math.min(Math.floor((f+1)*a)+1,n)+e,{x:N,y:V}=t[u];for(p=m=-1,_=P;_<M;_++)m=.5*Math.abs((N-y)*(t[_].y-V)-(N-t[_].x)*(b-V)),m>p&&(p=m,h=t[_],g=_);l[d++]=h,u=g}return l[d++]=t[c],l}function d0(t,e,n,o){let i=0,s=0,l,a,d,c,u,f,h,p,m,g;const y=[],b=e+n-1,_=t[e].x,$=t[b].x-_;for(l=e;l<e+n;++l){a=t[l],d=(a.x-_)/$*o,c=a.y;const w=d|0;if(w===u)c<m?(m=c,f=l):c>g&&(g=c,h=l),i=(s*i+a.x)/++s;else{const P=l-1;if(!J(f)&&!J(h)){const M=Math.min(f,h),N=Math.max(f,h);M!==p&&M!==P&&y.push({...t[M],x:i}),N!==p&&N!==P&&y.push({...t[N],x:i})}l>0&&P!==p&&y.push(t[P]),y.push(a),u=w,s=0,m=g=c,f=h=p=l}}return y}function Pa(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function Fa(t){t.data.datasets.forEach(e=>{Pa(e)})}function c0(t,e){const n=e.length;let o=0,i;const{iScale:s}=t,{min:l,max:a,minDefined:d,maxDefined:c}=s.getUserBounds();return d&&(o=ge(tt(e,s.axis,l).lo,0,n-1)),c?i=ge(tt(e,s.axis,a).hi+1,o,n)-o:i=n-o,{start:o,count:i}}var u0={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,n)=>{if(!n.enabled){Fa(t);return}const o=t.width;t.data.datasets.forEach((i,s)=>{const{_data:l,indexAxis:a}=i,d=t.getDatasetMeta(s),c=l||i.data;if(xn([a,t.options.indexAxis])==="y"||!d.controller.supportsDecimation)return;const u=t.scales[d.xAxisID];if(u.type!=="linear"&&u.type!=="time"||t.options.parsing)return;let{start:f,count:h}=c0(d,c);const p=n.threshold||4*o;if(h<=p){Pa(i);return}J(l)&&(i._data=c,delete i.data,Object.defineProperty(i,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let m;switch(n.algorithm){case"lttb":m=a0(c,f,h,o,n);break;case"min-max":m=d0(c,f,h,o);break;default:throw new Error(`Unsupported decimation algorithm '${n.algorithm}'`)}i._decimated=m})},destroy(t){Fa(t)}};function f0(t,e,n){const o=t.segments,i=t.points,s=e.points,l=[];for(const a of o){let{start:d,end:c}=a;c=ar(d,c,i);const u=lr(n,i[d],i[c],a.loop);if(!e.segments){l.push({source:a,target:u,start:i[d],end:i[c]});continue}const f=Rl(e,u);for(const h of f){const p=lr(n,s[h.start],s[h.end],h.loop),m=Fl(a,i,p);for(const g of m)l.push({source:g,target:h,start:{[n]:Ra(u,p,"start",Math.max)},end:{[n]:Ra(u,p,"end",Math.min)}})}}return l}function lr(t,e,n,o){if(o)return;let i=e[t],s=n[t];return t==="angle"&&(i=Ve(i),s=Ve(s)),{property:t,start:i,end:s}}function h0(t,e){const{x:n=null,y:o=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:l,end:a})=>{a=ar(l,a,i);const d=i[l],c=i[a];o!==null?(s.push({x:d.x,y:o}),s.push({x:c.x,y:o})):n!==null&&(s.push({x:n,y:d.y}),s.push({x:n,y:c.y}))}),s}function ar(t,e,n){for(;e>t;e--){const o=n[e];if(!isNaN(o.x)&&!isNaN(o.y))break}return e}function Ra(t,e,n,o){return t&&e?o(t[n],e[n]):t?t[n]:e?e[n]:0}function Na(t,e){let n=[],o=!1;return oe(t)?(o=!0,n=t):n=h0(t,e),n.length?new Ct({points:n,options:{tension:0},_loop:o,_fullLoop:o}):null}function Aa(t){return t&&t.fill!==!1}function p0(t,e,n){let i=t[e].fill;const s=[e];let l;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!de(i))return i;if(l=t[i],!l)return!1;if(l.visible)return i;s.push(i),i=l.fill}return!1}function m0(t,e,n){const o=$0(t);if(q(o))return isNaN(o.value)?!1:o;let i=parseFloat(o);return de(i)&&Math.floor(i)===i?g0(o[0],e,i,n):["origin","start","end","stack","shape"].indexOf(o)>=0&&o}function g0(t,e,n,o){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=o?!1:n}function y0(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:q(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function b0(t,e,n){let o;return t==="start"?o=n:t==="end"?o=e.options.reverse?e.min:e.max:q(t)?o=t.value:o=e.getBaseValue(),o}function $0(t){const e=t.options,n=e.fill;let o=Y(n&&n.target,n);return o===void 0&&(o=!!e.backgroundColor),o===!1||o===null?!1:o===!0?"origin":o}function _0(t){const{scale:e,index:n,line:o}=t,i=[],s=o.segments,l=o.points,a=w0(e,n);a.push(Na({x:null,y:e.bottom},o));for(let d=0;d<s.length;d++){const c=s[d];for(let u=c.start;u<=c.end;u++)C0(i,l[u],a)}return new Ct({points:i,options:{}})}function w0(t,e){const n=[],o=t.getMatchingVisibleMetas("line");for(let i=0;i<o.length;i++){const s=o[i];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function C0(t,e,n){const o=[];for(let i=0;i<n.length;i++){const s=n[i],{first:l,last:a,point:d}=k0(s,e,"x");if(!(!d||l&&a)){if(l)o.unshift(d);else if(t.push(d),!a)break}}t.push(...o)}function k0(t,e,n){const o=t.interpolate(e,n);if(!o)return{};const i=o[n],s=t.segments,l=t.points;let a=!1,d=!1;for(let c=0;c<s.length;c++){const u=s[c],f=l[u.start][n],h=l[u.end][n];if(et(i,f,h)){a=i===f,d=i===h;break}}return{first:a,last:d,point:o}}class Oa{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,o){const{x:i,y:s,radius:l}=this;return n=n||{start:0,end:re},e.arc(i,s,l,n.end,n.start,!0),!o.bounds}interpolate(e){const{x:n,y:o,radius:i}=this,s=e.angle;return{x:n+Math.cos(s)*i,y:o+Math.sin(s)*i,angle:s}}}function x0(t){const{chart:e,fill:n,line:o}=t;if(de(n))return S0(e,n);if(n==="stack")return _0(t);if(n==="shape")return!0;const i=v0(t);return i instanceof Oa?i:Na(i,o)}function S0(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function v0(t){return(t.scale||{}).getPointPositionForValue?D0(t):M0(t)}function M0(t){const{scale:e={},fill:n}=t,o=y0(n,e);if(de(o)){const i=e.isHorizontal();return{x:i?o:null,y:i?null:o}}return null}function D0(t){const{scale:e,fill:n}=t,o=e.options,i=e.getLabels().length,s=o.reverse?e.max:e.min,l=b0(n,e,s),a=[];if(o.grid.circular){const d=e.getPointPositionForValue(0,s);return new Oa({x:d.x,y:d.y,radius:e.getDistanceFromCenterForValue(l)})}for(let d=0;d<i;++d)a.push(e.getPointPositionForValue(d,l));return a}function dr(t,e,n){const o=x0(e),{line:i,scale:s,axis:l}=e,a=i.options,d=a.fill,c=a.backgroundColor,{above:u=c,below:f=c}=d||{};o&&i.points.length&&(fo(t,n),E0(t,{line:i,target:o,above:u,below:f,area:n,scale:s,axis:l}),ho(t))}function E0(t,e){const{line:n,target:o,above:i,below:s,area:l,scale:a}=e,d=n._loop?"angle":e.axis;t.save(),d==="x"&&s!==i&&(Ia(t,o,l.top),Ta(t,{line:n,target:o,color:i,scale:a,property:d}),t.restore(),t.save(),Ia(t,o,l.bottom)),Ta(t,{line:n,target:o,color:s,scale:a,property:d}),t.restore()}function Ia(t,e,n){const{segments:o,points:i}=e;let s=!0,l=!1;t.beginPath();for(const a of o){const{start:d,end:c}=a,u=i[d],f=i[ar(d,c,i)];s?(t.moveTo(u.x,u.y),s=!1):(t.lineTo(u.x,n),t.lineTo(u.x,u.y)),l=!!e.pathSegment(t,a,{move:l}),l?t.closePath():t.lineTo(f.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function Ta(t,e){const{line:n,target:o,property:i,color:s,scale:l}=e,a=f0(n,o,i);for(const{source:d,target:c,start:u,end:f}of a){const{style:{backgroundColor:h=s}={}}=d,p=o!==!0;t.save(),t.fillStyle=h,B0(t,l,p&&lr(i,u,f)),t.beginPath();const m=!!n.pathSegment(t,d);let g;if(p){m?t.closePath():za(t,o,f,i);const y=!!o.pathSegment(t,c,{move:m,reverse:!0});g=m&&y,g||za(t,o,u,i)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function B0(t,e,n){const{top:o,bottom:i}=e.chart.chartArea,{property:s,start:l,end:a}=n||{};s==="x"&&(t.beginPath(),t.rect(l,o,a-l,i-o),t.clip())}function za(t,e,n,o){const i=e.interpolate(n,o);i&&t.lineTo(i.x,i.y)}var V0={id:"filler",afterDatasetsUpdate(t,e,n){const o=(t.data.datasets||[]).length,i=[];let s,l,a,d;for(l=0;l<o;++l)s=t.getDatasetMeta(l),a=s.dataset,d=null,a&&a.options&&a instanceof Ct&&(d={visible:t.isDatasetVisible(l),index:l,fill:m0(a,l,o),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=d,i.push(d);for(l=0;l<o;++l)d=i[l],!(!d||d.fill===!1)&&(d.fill=p0(i,l,n.propagate))},beforeDraw(t,e,n){const o=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let l=i.length-1;l>=0;--l){const a=i[l].$filler;a&&(a.line.updateControlPoints(s,a.axis),o&&a.fill&&dr(t.ctx,a,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const o=t.getSortedVisibleDatasetMetas();for(let i=o.length-1;i>=0;--i){const s=o[i].$filler;Aa(s)&&dr(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const o=e.meta.$filler;!Aa(o)||n.drawTime!=="beforeDatasetDraw"||dr(t.ctx,o,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const La=(t,e)=>{let{boxHeight:n=e,boxWidth:o=e}=t;return t.usePointStyle&&(n=Math.min(n,e),o=t.pointStyleWidth||Math.min(o,e)),{boxWidth:o,boxHeight:n,itemHeight:Math.max(e,n)}},P0=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Ha extends it{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n,o){this.maxWidth=e,this.maxHeight=n,this._margins=o,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 e=this.options.labels||{};let n=ne(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(o=>e.filter(o,this.chart.data))),e.sort&&(n=n.sort((o,i)=>e.sort(o,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const o=e.labels,i=he(o.font),s=i.size,l=this._computeTitleHeight(),{boxWidth:a,itemHeight:d}=La(o,s);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(l,s,a,d)+10):(u=this.maxHeight,c=this._fitCols(l,i,a,d)+10),this.width=Math.min(c,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,n,o,i){const{ctx:s,maxWidth:l,options:{labels:{padding:a}}}=this,d=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+a;let f=e;s.textAlign="left",s.textBaseline="middle";let h=-1,p=-u;return this.legendItems.forEach((m,g)=>{const y=o+n/2+s.measureText(m.text).width;(g===0||c[c.length-1]+y+2*a>l)&&(f+=u,c[c.length-(g>0?0:1)]=0,p+=u,h++),d[g]={left:0,top:p,row:h,width:y,height:i},c[c.length-1]+=y+a}),f}_fitCols(e,n,o,i){const{ctx:s,maxHeight:l,options:{labels:{padding:a}}}=this,d=this.legendHitBoxes=[],c=this.columnSizes=[],u=l-e;let f=a,h=0,p=0,m=0,g=0;return this.legendItems.forEach((y,b)=>{const{itemWidth:_,itemHeight:x}=F0(o,n,s,y,i);b>0&&p+x+2*a>u&&(f+=h+a,c.push({width:h,height:p}),m+=h+a,g++,h=p=0),d[b]={left:m,top:p,col:g,width:_,height:x},h=Math.max(h,_),p+=x+a}),f+=h,c.push({width:h,height:p}),f}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:o,labels:{padding:i},rtl:s}}=this,l=Jt(s,this.left,this.width);if(this.isHorizontal()){let a=0,d=be(o,this.left+i,this.right-this.lineWidths[a]);for(const c of n)a!==c.row&&(a=c.row,d=be(o,this.left+i,this.right-this.lineWidths[a])),c.top+=this.top+e+i,c.left=l.leftForLtr(l.x(d),c.width),d+=c.width+i}else{let a=0,d=be(o,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const c of n)c.col!==a&&(a=c.col,d=be(o,this.top+e+i,this.bottom-this.columnSizes[a].height)),c.top=d,c.left+=this.left+i,c.left=l.leftForLtr(l.x(c.left),c.width),d+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;fo(e,this),this._draw(),ho(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:o,ctx:i}=this,{align:s,labels:l}=e,a=ce.color,d=Jt(e.rtl,this.left,this.width),c=he(l.font),{padding:u}=l,f=c.size,h=f/2;let p;this.drawTitle(),i.textAlign=d.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:g,itemHeight:y}=La(l,f),b=function(P,M,N){if(isNaN(m)||m<=0||isNaN(g)||g<0)return;i.save();const V=Y(N.lineWidth,1);if(i.fillStyle=Y(N.fillStyle,a),i.lineCap=Y(N.lineCap,"butt"),i.lineDashOffset=Y(N.lineDashOffset,0),i.lineJoin=Y(N.lineJoin,"miter"),i.lineWidth=V,i.strokeStyle=Y(N.strokeStyle,a),i.setLineDash(Y(N.lineDash,[])),l.usePointStyle){const B={radius:g*Math.SQRT2/2,pointStyle:N.pointStyle,rotation:N.rotation,borderWidth:V},k=d.xPlus(P,m/2),C=M+h;yl(i,B,k,C,l.pointStyleWidth&&m)}else{const B=M+Math.max((f-g)/2,0),k=d.leftForLtr(P,m),C=Rt(N.borderRadius);i.beginPath(),Object.values(C).some(E=>E!==0)?kn(i,{x:k,y:B,w:m,h:g,radius:C}):i.rect(k,B,m,g),i.fill(),V!==0&&i.stroke()}i.restore()},_=function(P,M,N){Ft(i,N.text,P,M+y/2,c,{strikethrough:N.hidden,textAlign:d.textAlign(N.textAlign)})},x=this.isHorizontal(),$=this._computeTitleHeight();x?p={x:be(s,this.left+u,this.right-o[0]),y:this.top+u+$,line:0}:p={x:this.left+u,y:be(s,this.top+$+u,this.bottom-n[0].height),line:0},El(this.ctx,e.textDirection);const w=y+u;this.legendItems.forEach((P,M)=>{i.strokeStyle=P.fontColor,i.fillStyle=P.fontColor;const N=i.measureText(P.text).width,V=d.textAlign(P.textAlign||(P.textAlign=l.textAlign)),B=m+h+N;let k=p.x,C=p.y;d.setWidth(this.width),x?M>0&&k+B+u>this.right&&(C=p.y+=w,p.line++,k=p.x=be(s,this.left+u,this.right-o[p.line])):M>0&&C+w>this.bottom&&(k=p.x=k+n[p.line].width+u,p.line++,C=p.y=be(s,this.top+$+u,this.bottom-n[p.line].height));const E=d.x(k);if(b(E,C,P),k=eh(V,k+m+h,x?k+B:this.right,e.rtl),_(d.x(k),C,P),x)p.x+=B+u;else if(typeof P.text!="string"){const v=c.lineHeight;p.y+=ja(P,v)+u}else p.y+=w}),Bl(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,o=he(n.font),i=$e(n.padding);if(!n.display)return;const s=Jt(e.rtl,this.left,this.width),l=this.ctx,a=n.position,d=o.size/2,c=i.top+d;let u,f=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),u=this.top+c,f=be(e.align,f,this.right-h);else{const m=this.columnSizes.reduce((g,y)=>Math.max(g,y.height),0);u=c+be(e.align,this.top,this.bottom-m-e.labels.padding-this._computeTitleHeight())}const p=be(a,f,f+h);l.textAlign=s.textAlign(Ni(a)),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=o.string,Ft(l,n.text,p,u,o)}_computeTitleHeight(){const e=this.options.title,n=he(e.font),o=$e(e.padding);return e.display?n.lineHeight+o.height:0}_getLegendItemAt(e,n){let o,i,s;if(et(e,this.left,this.right)&&et(n,this.top,this.bottom)){for(s=this.legendHitBoxes,o=0;o<s.length;++o)if(i=s[o],et(e,i.left,i.left+i.width)&&et(n,i.top,i.top+i.height))return this.legendItems[o]}return null}handleEvent(e){const n=this.options;if(!A0(e.type,n))return;const o=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,s=P0(i,o);i&&!s&&ne(n.onLeave,[e,i,this],this),this._hoveredItem=o,o&&!s&&ne(n.onHover,[e,o,this],this)}else o&&ne(n.onClick,[e,o,this],this)}}function F0(t,e,n,o,i){const s=R0(o,t,e,n),l=N0(i,o,e.lineHeight);return{itemWidth:s,itemHeight:l}}function R0(t,e,n,o){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((s,l)=>s.length>l.length?s:l)),e+n.size/2+o.measureText(i).width}function N0(t,e,n){let o=t;return typeof e.text!="string"&&(o=ja(e,n)),o}function ja(t,e){const n=t.text?t.text.length:0;return e*n}function A0(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var O0={id:"legend",_element:Ha,start(t,e,n){const o=t.legend=new Ha({ctx:t.ctx,options:n,chart:t});_e.configure(t,o,n),_e.addBox(t,o)},stop(t){_e.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const o=t.legend;_e.configure(t,o,n),o.options=n},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,n){const o=e.datasetIndex,i=n.chart;i.isDatasetVisible(o)?(i.hide(o),e.hidden=!0):(i.show(o),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:n,pointStyle:o,textAlign:i,color:s,useBorderRadius:l,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(d=>{const c=d.controller.getStyle(n?0:void 0),u=$e(c.borderWidth);return{text:e[d.index].label,fillStyle:c.backgroundColor,fontColor:s,hidden:!d.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:o||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:l&&(a||c.borderRadius),datasetIndex:d.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 cr extends it{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.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(e,n){const o=this.options;if(this.left=0,this.top=0,!o.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const i=oe(o.text)?o.text.length:1;this._padding=$e(o.padding);const s=i*he(o.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:o,bottom:i,right:s,options:l}=this,a=l.align;let d=0,c,u,f;return this.isHorizontal()?(u=be(a,o,s),f=n+e,c=s-o):(l.position==="left"?(u=o+e,f=be(a,i,n),d=ie*-.5):(u=s-e,f=be(a,n,i),d=ie*.5),c=i-n),{titleX:u,titleY:f,maxWidth:c,rotation:d}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const o=he(n.font),s=o.lineHeight/2+this._padding.top,{titleX:l,titleY:a,maxWidth:d,rotation:c}=this._drawArgs(s);Ft(e,n.text,0,0,o,{color:n.color,maxWidth:d,rotation:c,textAlign:Ni(n.align),textBaseline:"middle",translation:[l,a]})}}function I0(t,e){const n=new cr({ctx:t.ctx,options:e,chart:t});_e.configure(t,n,e),_e.addBox(t,n),t.titleBlock=n}var T0={id:"title",_element:cr,start(t,e,n){I0(t,n)},stop(t){const e=t.titleBlock;_e.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const o=t.titleBlock;_e.configure(t,o,n),o.options=n},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 Ro=new WeakMap;var z0={id:"subtitle",start(t,e,n){const o=new cr({ctx:t.ctx,options:n,chart:t});_e.configure(t,o,n),_e.addBox(t,o),Ro.set(t,o)},stop(t){_e.removeBox(t,Ro.get(t)),Ro.delete(t)},beforeUpdate(t,e,n){const o=Ro.get(t);_e.configure(t,o,n),o.options=n},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Nn={average(t){if(!t.length)return!1;let e,n,o=new Set,i=0,s=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const d=a.tooltipPosition();o.add(d.x),i+=d.y,++s}}return{x:[...o].reduce((a,d)=>a+d)/o.size,y:i/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,o=e.y,i=Number.POSITIVE_INFINITY,s,l,a;for(s=0,l=t.length;s<l;++s){const d=t[s].element;if(d&&d.hasValue()){const c=d.getCenterPoint(),u=Fi(e,c);u<i&&(i=u,a=d)}}if(a){const d=a.tooltipPosition();n=d.x,o=d.y}return{x:n,y:o}}};function qe(t,e){return e&&(oe(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function rt(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
25
25
  `)>-1?t.split(`
26
- `):t}function C0(t,e){const{element:n,datasetIndex:o,index:i}=e,r=t.getDatasetMeta(o).controller,{label:l,value:a}=r.getLabelAndValue(i);return{chart:t,label:l,parsed:r.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:a,dataset:r.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function Fa(t,e){const n=t.chart.ctx,{body:o,footer:i,title:r}=t,{boxWidth:l,boxHeight:a}=e,d=he(e.bodyFont),c=he(e.titleFont),u=he(e.footerFont),f=r.length,h=i.length,p=o.length,m=be(e.padding);let g=m.height,y=0,b=o.reduce((S,x)=>S+x.before.length+x.lines.length+x.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,f&&(g+=f*c.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),b){const S=e.displayColors?Math.max(a,d.lineHeight):d.lineHeight;g+=p*S+(b-p)*d.lineHeight+(b-1)*e.bodySpacing}h&&(g+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let $=0;const w=function(S){y=Math.max(y,n.measureText(S).width+$)};return n.save(),n.font=c.string,ee(t.title,w),n.font=d.string,ee(t.beforeBody.concat(t.afterBody),w),$=e.displayColors?l+2+e.boxPadding:0,ee(o,S=>{ee(S.before,w),ee(S.lines,w),ee(S.after,w)}),$=0,n.font=u.string,ee(t.footer,w),n.restore(),y+=m.width,{width:y,height:g}}function x0(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function k0(t,e,n,o){const{x:i,width:r}=o,l=n.caretSize+n.caretPadding;if(t==="left"&&i+r+l>e.width||t==="right"&&i-r-l<0)return!0}function S0(t,e,n,o){const{x:i,width:r}=n,{width:l,chartArea:{left:a,right:d}}=t;let c="center";return o==="center"?c=i<=(a+d)/2?"left":"right":i<=r/2?c="left":i>=l-r/2&&(c="right"),k0(c,t,e,n)&&(c="center"),c}function Na(t,e,n){const o=n.yAlign||e.yAlign||x0(t,n);return{xAlign:n.xAlign||e.xAlign||S0(t,e,n,o),yAlign:o}}function v0(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function M0(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function Aa(t,e,n,o){const{caretSize:i,caretPadding:r,cornerRadius:l}=t,{xAlign:a,yAlign:d}=n,c=i+r,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:p}=Pt(l);let m=v0(e,a);const g=M0(e,d,c);return d==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(u,h)+i:a==="right"&&(m+=Math.max(f,p)+i),{x:me(m,0,o.width-e.width),y:me(g,0,o.height-e.height)}}function Ro(t,e,n){const o=be(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function Oa(t){return Ge([],it(t))}function D0(t,e,n){return $t(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Ia(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Ta={beforeTitle:Je,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:Je,beforeBody:Je,beforeLabel:Je,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return Z(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Je,afterBody:Je,beforeFooter:Je,footer:Je,afterFooter:Je};function Se(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?Ta[e].call(n,o):i}class rs extends ot{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,r=new Dl(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=D0(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=Se(o,"beforeTitle",this,e),r=Se(o,"title",this,e),l=Se(o,"afterTitle",this,e);let a=[];return a=Ge(a,it(i)),a=Ge(a,it(r)),a=Ge(a,it(l)),a}getBeforeBody(e,n){return Oa(Se(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return ee(e,r=>{const l={before:[],lines:[],after:[]},a=Ia(o,r);Ge(l.before,it(Se(a,"beforeLabel",this,r))),Ge(l.lines,Se(a,"label",this,r)),Ge(l.after,it(Se(a,"afterLabel",this,r))),i.push(l)}),i}getAfterBody(e,n){return Oa(Se(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=Se(o,"beforeFooter",this,e),r=Se(o,"footer",this,e),l=Se(o,"afterFooter",this,e);let a=[];return a=Ge(a,it(i)),a=Ge(a,it(r)),a=Ge(a,it(l)),a}_createItems(e){const n=this._active,o=this.chart.data,i=[],r=[],l=[];let a=[],d,c;for(d=0,c=n.length;d<c;++d)a.push(C0(this.chart,n[d]));return e.filter&&(a=a.filter((u,f,h)=>e.filter(u,f,h,o))),e.itemSort&&(a=a.sort((u,f)=>e.itemSort(u,f,o))),ee(a,u=>{const f=Ia(e.callbacks,u);i.push(Se(f,"labelColor",this,u)),r.push(Se(f,"labelPointStyle",this,u)),l.push(Se(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=r,this.labelTextColors=l,this.dataPoints=a,a}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let r,l=[];if(!i.length)this.opacity!==0&&(r={opacity:0});else{const a=Vn[o.position].call(this,i,this._eventPosition);l=this._createItems(o),this.title=this.getTitle(l,o),this.beforeBody=this.getBeforeBody(l,o),this.body=this.getBody(l,o),this.afterBody=this.getAfterBody(l,o),this.footer=this.getFooter(l,o);const d=this._size=Fa(this,o),c=Object.assign({},a,d),u=Na(this.chart,o,c),f=Aa(o,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:f.x,y:f.y,width:d.width,height:d.height,caretX:a.x,caretY:a.y}}this._tooltipItems=l,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const r=this.getCaretPosition(e,o,i);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:r}=this,{caretSize:l,cornerRadius:a}=o,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=Pt(a),{x:h,y:p}=e,{width:m,height:g}=n;let y,b,$,w,S,x;return r==="center"?(S=p+g/2,i==="left"?(y=h,b=y-l,w=S+l,x=S-l):(y=h+m,b=y+l,w=S-l,x=S+l),$=y):(i==="left"?b=h+Math.max(d,u)+l:i==="right"?b=h+m-Math.max(c,f)-l:b=this.caretX,r==="top"?(w=p,S=w-l,y=b-l,$=b+l):(w=p+g,S=w+l,y=b+l,$=b-l),x=w),{x1:y,x2:b,x3:$,y1:w,y2:S,y3:x}}drawTitle(e,n,o){const i=this.title,r=i.length;let l,a,d;if(r){const c=Xt(o.rtl,this.x,this.width);for(e.x=Ro(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",l=he(o.titleFont),a=o.titleSpacing,n.fillStyle=o.titleColor,n.font=l.string,d=0;d<r;++d)n.fillText(i[d],c.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+a,d+1===r&&(e.y+=o.titleMarginBottom-a)}}_drawColorBox(e,n,o,i,r){const l=this.labelColors[o],a=this.labelPointStyles[o],{boxHeight:d,boxWidth:c}=r,u=he(r.bodyFont),f=Ro(this,"left",r),h=i.x(f),p=d<u.lineHeight?(u.lineHeight-d)/2:0,m=n.y+p;if(r.usePointStyle){const g={radius:Math.min(c,d)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=i.leftForLtr(h,c)+c/2,b=m+d/2;e.strokeStyle=r.multiKeyBackground,e.fillStyle=r.multiKeyBackground,Ni(e,g,y,b),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,Ni(e,g,y,b)}else{e.lineWidth=q(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,e.strokeStyle=l.borderColor,e.setLineDash(l.borderDash||[]),e.lineDashOffset=l.borderDashOffset||0;const g=i.leftForLtr(h,c),y=i.leftForLtr(i.xPlus(h,1),c-2),b=Pt(l.borderRadius);Object.values(b).some($=>$!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,$n(e,{x:g,y:m,w:c,h:d,radius:b}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),$n(e,{x:y,y:m+1,w:c-2,h:d-2,radius:b}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(g,m,c,d),e.strokeRect(g,m,c,d),e.fillStyle=l.backgroundColor,e.fillRect(y,m+1,c-2,d-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:r,bodyAlign:l,displayColors:a,boxHeight:d,boxWidth:c,boxPadding:u}=o,f=he(o.bodyFont);let h=f.lineHeight,p=0;const m=Xt(o.rtl,this.x,this.width),g=function(F){n.fillText(F,m.x(e.x+p),e.y+h/2),e.y+=h+r},y=m.textAlign(l);let b,$,w,S,x,V,D;for(n.textAlign=l,n.textBaseline="middle",n.font=f.string,e.x=Ro(this,y,o),n.fillStyle=o.bodyColor,ee(this.beforeBody,g),p=a&&y!=="right"?l==="center"?c/2+u:c+2+u:0,S=0,V=i.length;S<V;++S){for(b=i[S],$=this.labelTextColors[S],n.fillStyle=$,ee(b.before,g),w=b.lines,a&&w.length&&(this._drawColorBox(n,e,S,m,o),h=Math.max(f.lineHeight,d)),x=0,D=w.length;x<D;++x)g(w[x]),h=f.lineHeight;ee(b.after,g)}p=0,h=f.lineHeight,ee(this.afterBody,g),e.y-=r}drawFooter(e,n,o){const i=this.footer,r=i.length;let l,a;if(r){const d=Xt(o.rtl,this.x,this.width);for(e.x=Ro(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=d.textAlign(o.footerAlign),n.textBaseline="middle",l=he(o.footerFont),n.fillStyle=o.footerColor,n.font=l.string,a=0;a<r;++a)n.fillText(i[a],d.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:r,yAlign:l}=this,{x:a,y:d}=e,{width:c,height:u}=o,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:m}=Pt(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+f,d),l==="top"&&this.drawCaret(e,n,o,i),n.lineTo(a+c-h,d),n.quadraticCurveTo(a+c,d,a+c,d+h),l==="center"&&r==="right"&&this.drawCaret(e,n,o,i),n.lineTo(a+c,d+u-m),n.quadraticCurveTo(a+c,d+u,a+c-m,d+u),l==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(a+p,d+u),n.quadraticCurveTo(a,d+u,a,d+u-p),l==="center"&&r==="left"&&this.drawCaret(e,n,o,i),n.lineTo(a,d+f),n.quadraticCurveTo(a,d,a+f,d),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,r=o&&o.y;if(i||r){const l=Vn[e.position].call(this,this._active,this._eventPosition);if(!l)return;const a=this._size=Fa(this,e),d=Object.assign({},l,this._size),c=Na(n,e,d),u=Aa(e,d,c,n);(i._to!==u.x||r._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},r={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const l=be(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=o,this.drawBackground(r,e,i,n),$l(e,n.textDirection),r.y+=l.top,this.drawTitle(r,e,n),this.drawBody(r,e,n),this.drawFooter(r,e,n),_l(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:a,index:d})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[d],index:d}}),r=!oo(o,i),l=this._positionChanged(i,n);(r||l)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,r=this._active||[],l=this._getActiveElements(e,r,n,o),a=this._positionChanged(l,e),d=n||!oo(l,r)||a;return d&&(this._active=l,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),d}_getActiveElements(e,n,o,i){const r=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const l=this.chart.getElementsAtEventForMode(e,r.mode,r,o);return r.reverse&&l.reverse(),l}_positionChanged(e,n){const{caretX:o,caretY:i,options:r}=this,l=Vn[r.position].call(this,e,n);return l!==!1&&(o!==l.x||i!==l.y)}}I(rs,"positioners",Vn);var E0={id:"tooltip",_element:rs,positioners:Vn,afterInit(t,e,n){n&&(t.tooltip=new rs({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,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:Ta},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},B0=Object.freeze({__proto__:null,Colors:Hm,Decimation:Um,Filler:f0,Legend:b0,SubTitle:w0,Title:_0,Tooltip:E0});const V0=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function P0(t,e,n,o){const i=t.indexOf(e);if(i===-1)return V0(t,e,n,o);const r=t.lastIndexOf(e);return i!==r?n:i}const R0=(t,e)=>t===null?null:me(Math.round(t),0,e);function La(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class ls extends It{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:r}of n)o[i]===r&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(Z(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:P0(o,e,Y(n,e),this._addedLabels),R0(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,i=[];let r=this.getLabels();r=e===0&&n===r.length-1?r:r.slice(e,n+1),this._valueRange=Math.max(r.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let l=e;l<=n;l++)i.push({value:l});return i}getLabelForValue(e){return La.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}I(ls,"id","category"),I(ls,"defaults",{ticks:{callback:La}});function F0(t,e){const n=[],{bounds:i,step:r,min:l,max:a,precision:d,count:c,maxTicks:u,maxDigits:f,includeBounds:h}=t,p=r||1,m=u-1,{min:g,max:y}=e,b=!Z(l),$=!Z(a),w=!Z(c),S=(y-g)/(f+1);let x=Wr((y-g)/m/p)*p,V,D,F,N;if(x<1e-14&&!b&&!$)return[{value:g},{value:y}];N=Math.ceil(y/x)-Math.floor(g/x),N>m&&(x=Wr(N*x/m/p)*p),Z(d)||(V=Math.pow(10,d),x=Math.ceil(x*V)/V),i==="ticks"?(D=Math.floor(g/x)*x,F=Math.ceil(y/x)*x):(D=g,F=y),b&&$&&r&&Df((a-l)/r,x/1e3)?(N=Math.round(Math.min((a-l)/x,u)),x=(a-l)/N,D=l,F=a):w?(D=b?l:D,F=$?a:F,N=c-1,x=(F-D)/N):(N=(F-D)/x,pn(N,Math.round(N),x/1e3)?N=Math.round(N):N=Math.ceil(N));const P=Math.max(Ur(x),Ur(D));V=Math.pow(10,Z(d)?P:d),D=Math.round(D*V)/V,F=Math.round(F*V)/V;let C=0;for(b&&(h&&D!==l?(n.push({value:l}),D<l&&C++,pn(Math.round((D+C*x)*V)/V,l,za(l,S,t))&&C++):D<l&&C++);C<N;++C){const _=Math.round((D+C*x)*V)/V;if($&&_>a)break;n.push({value:_})}return $&&h&&F!==a?n.length&&pn(n[n.length-1].value,a,za(a,S,t))?n[n.length-1].value=a:n.push({value:a}):(!$||F===a)&&n.push({value:F}),n}function za(t,e,{horizontal:n,minRotation:o}){const i=Ie(o),r=(n?Math.sin(i):Math.cos(i))||.001,l=.75*e*(""+t).length;return Math.min(e/r,l)}class Fo extends It{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return Z(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:r}=this;const l=d=>i=n?i:d,a=d=>r=o?r:d;if(e){const d=Ye(i),c=Ye(r);d<0&&c<0?a(0):d>0&&c>0&&l(0)}if(i===r){let d=r===0?1:Math.abs(r*.05);a(r+d),e||l(i-d)}this.min=i,this.max=r}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,l=F0(i,r);return e.bounds==="ticks"&&Yr(l,this,"value"),e.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const i=(o-n)/Math.max(e.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return yn(e,this.chart.options.locale,this.options.ticks.format)}}class as extends Fo{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=de(e)?e:0,this.max=de(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Ie(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}I(as,"id","linear"),I(as,"defaults",{ticks:{callback:lo.formatters.numeric}});const Pn=t=>Math.floor(bt(t)),Tt=(t,e)=>Math.pow(10,Pn(t)+e);function Ha(t){return t/Math.pow(10,Pn(t))===1}function ja(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function N0(t,e){const n=e-t;let o=Pn(n);for(;ja(t,e,o)>10;)o++;for(;ja(t,e,o)<10;)o--;return Math.min(o,Pn(t))}function A0(t,{min:e,max:n}){e=Ee(t.min,e);const o=[],i=Pn(e);let r=N0(e,n),l=r<0?Math.pow(10,Math.abs(r)):1;const a=Math.pow(10,r),d=i>r?Math.pow(10,i):0,c=Math.round((e-d)*l)/l,u=Math.floor((e-d)/a/10)*a*10;let f=Math.floor((c-u)/Math.pow(10,r)),h=Ee(t.min,Math.round((d+u+f*Math.pow(10,r))*l)/l);for(;h<n;)o.push({value:h,major:Ha(h),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(r++,f=2,l=r>=0?1:l),h=Math.round((d+u+f*Math.pow(10,r))*l)/l;const p=Ee(t.max,h);return o.push({value:p,major:Ha(p),significand:f}),o}class ds extends It{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=Fo.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return de(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=de(e)?Math.max(0,e):null,this.max=de(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!de(this._userMin)&&(this.min=e===Tt(this.min,0)?Tt(this.min,-1):Tt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const r=a=>o=e?o:a,l=a=>i=n?i:a;o===i&&(o<=0?(r(1),l(10)):(r(Tt(o,-1)),l(Tt(i,1)))),o<=0&&r(Tt(i,-1)),i<=0&&l(Tt(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=A0(n,this);return e.bounds==="ticks"&&Yr(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(e){return e===void 0?"0":yn(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=bt(e),this._valueRange=bt(this.max)-bt(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(bt(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}I(ds,"id","logarithmic"),I(ds,"defaults",{ticks:{callback:lo.formatters.logarithmic,major:{enabled:!0}}});function cs(t){const e=t.ticks;if(e.display&&t.display){const n=be(e.backdropPadding);return Y(e.font&&e.font.size,ce.font.size)+n.height}return 0}function O0(t,e,n){return n=oe(n)?n:[n],{w:Yf(t,e.string,n),h:n.length*e.lineHeight}}function Wa(t,e,n,o,i){return t===o||t===i?{start:e-n/2,end:e+n/2}:t<o||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function I0(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],i=[],r=t._pointLabels.length,l=t.options.pointLabels,a=l.centerPointLabels?ie/r:0;for(let d=0;d<r;d++){const c=l.setContext(t.getPointLabelContext(d));i[d]=c.padding;const u=t.getPointPosition(d,t.drawingArea+i[d],a),f=he(c.font),h=O0(t.ctx,f,t._pointLabels[d]);o[d]=h;const p=Be(t.getIndexAngle(d)+a),m=Math.round(Mi(p)),g=Wa(m,u.x,h.w,0,180),y=Wa(m,u.y,h.h,90,270);T0(n,e,p,g,y)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=H0(t,o,i)}function T0(t,e,n,o,i){const r=Math.abs(Math.sin(n)),l=Math.abs(Math.cos(n));let a=0,d=0;o.start<e.l?(a=(e.l-o.start)/r,t.l=Math.min(t.l,e.l-a)):o.end>e.r&&(a=(o.end-e.r)/r,t.r=Math.max(t.r,e.r+a)),i.start<e.t?(d=(e.t-i.start)/l,t.t=Math.min(t.t,e.t-d)):i.end>e.b&&(d=(i.end-e.b)/l,t.b=Math.max(t.b,e.b+d))}function L0(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:r,padding:l,size:a}=n,d=t.getPointPosition(e,o+i+l,r),c=Math.round(Mi(Be(d.angle+ue))),u=Y0(d.y,a.h,c),f=j0(c),h=W0(d.x,a.w,f);return{visible:!0,x:d.x,y:u,textAlign:f,left:h,top:u,right:h+a.w,bottom:u+a.h}}function z0(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:r}=t;return!(tt({x:n,y:o},e)||tt({x:n,y:r},e)||tt({x:i,y:o},e)||tt({x:i,y:r},e))}function H0(t,e,n){const o=[],i=t._pointLabels.length,r=t.options,{centerPointLabels:l,display:a}=r.pointLabels,d={extra:cs(r)/2,additionalAngle:l?ie/i:0};let c;for(let u=0;u<i;u++){d.padding=n[u],d.size=e[u];const f=L0(t,u,d);o.push(f),a==="auto"&&(f.visible=z0(f,c),f.visible&&(c=f))}return o}function j0(t){return t===0||t===180?"center":t<180?"left":"right"}function W0(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function Y0(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function U0(t,e,n){const{left:o,top:i,right:r,bottom:l}=n,{backdropColor:a}=e;if(!Z(a)){const d=Pt(e.borderRadius),c=be(e.backdropPadding);t.fillStyle=a;const u=o-c.left,f=i-c.top,h=r-o+c.width,p=l-i+c.height;Object.values(d).some(m=>m!==0)?(t.beginPath(),$n(t,{x:u,y:f,w:h,h:p,radius:d}),t.fill()):t.fillRect(u,f,h,p)}}function G0(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const r=t._pointLabelItems[i];if(!r.visible)continue;const l=o.setContext(t.getPointLabelContext(i));U0(n,l,r);const a=he(l.font),{x:d,y:c,textAlign:u}=r;Vt(n,t._pointLabels[i],d,c+a.lineHeight/2,a,{color:l.color,textAlign:u,textBaseline:"middle"})}}function Ya(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,se);else{let r=t.getPointPosition(0,e);i.moveTo(r.x,r.y);for(let l=1;l<o;l++)r=t.getPointPosition(l,e),i.lineTo(r.x,r.y)}}function q0(t,e,n,o,i){const r=t.ctx,l=e.circular,{color:a,lineWidth:d}=e;!l&&!o||!a||!d||n<0||(r.save(),r.strokeStyle=a,r.lineWidth=d,r.setLineDash(i.dash),r.lineDashOffset=i.dashOffset,r.beginPath(),Ya(t,n,l,o),r.closePath(),r.stroke(),r.restore())}function X0(t,e,n){return $t(t,{label:n,index:e,type:"pointLabel"})}class Rn extends Fo{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=be(cs(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=de(e)&&!isNaN(e)?e:0,this.max=de(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/cs(this.options))}generateTickLabels(e){Fo.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=ne(this.options.pointLabels.callback,[n,o],this);return i||i===0?i:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?I0(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,i))}getIndexAngle(e){const n=se/(this._pointLabels.length||1),o=this.options.startAngle||0;return Be(e*n+Ie(o))}getDistanceFromCenterForValue(e){if(Z(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(Z(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return X0(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-ue+o;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:i,bottom:r}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:r}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),Ya(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:i,border:r}=n,l=this._pointLabels.length;let a,d,c;if(n.pointLabels.display&&G0(this,l),i.display&&this.ticks.forEach((u,f)=>{if(f!==0||f===0&&this.min<0){d=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(f),p=i.setContext(h),m=r.setContext(h);q0(this,p,d,l,m)}}),o.display){for(e.save(),a=l-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:h}=u;!h||!f||(e.lineWidth=h,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,d),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const i=this.getIndexAngle(0);let r,l;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,d)=>{if(d===0&&this.min>=0&&!n.reverse)return;const c=o.setContext(this.getContext(d)),u=he(c.font);if(r=this.getDistanceFromCenterForValue(this.ticks[d].value),c.showLabelBackdrop){e.font=u.string,l=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const f=be(c.backdropPadding);e.fillRect(-l/2-f.left,-r-u.size/2-f.top,l+f.width,u.size+f.height)}Vt(e,a.label,0,-r,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}I(Rn,"id","radialLinear"),I(Rn,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:lo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),I(Rn,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),I(Rn,"descriptors",{angleLines:{_fallback:"grid"}});const No={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ve=Object.keys(No);function Ua(t,e){return t-e}function Ga(t,e){if(Z(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:r}=t._parseOpts;let l=e;return typeof o=="function"&&(l=o(l)),de(l)||(l=typeof o=="string"?n.parse(l,o):n.parse(l)),l===null?null:(i&&(l=i==="week"&&(Ut(r)||r===!0)?n.startOf(l,"isoWeek",r):n.startOf(l,i)),+l)}function qa(t,e,n,o){const i=ve.length;for(let r=ve.indexOf(t);r<i-1;++r){const l=No[ve[r]],a=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((n-e)/(a*l.size))<=o)return ve[r]}return ve[i-1]}function K0(t,e,n,o,i){for(let r=ve.length-1;r>=ve.indexOf(n);r--){const l=ve[r];if(No[l].common&&t._adapter.diff(i,o,l)>=e-1)return l}return ve[n?ve.indexOf(n):0]}function Z0(t){for(let e=ve.indexOf(t)+1,n=ve.length;e<n;++e)if(No[ve[e]].common)return ve[e]}function Xa(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=Ei(n,e),r=n[o]>=e?n[o]:n[i];t[r]=!0}}function J0(t,e,n,o){const i=t._adapter,r=+i.startOf(e[0].value,o),l=e[e.length-1].value;let a,d;for(a=r;a<=l;a=+i.add(a,1,o))d=n[a],d>=0&&(e[d].major=!0);return e}function Ka(t,e,n){const o=[],i={},r=e.length;let l,a;for(l=0;l<r;++l)a=e[l],i[a]=l,o.push({value:a,major:!1});return r===0||!n?o:J0(t,o,i,n)}class Fn extends It{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),i=this._adapter=new lp._date(e.adapters.date);i.init(n),fn(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Ga(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:i,max:r,minDefined:l,maxDefined:a}=this.getUserBounds();function d(c){!l&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(r=Math.max(r,c.max))}(!l||!a)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),i=de(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),r=de(r)&&!isNaN(r)?r:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,r-1),this.max=Math.max(i+1,r)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const r=this.min,l=this.max,a=Pf(i,r,l);return this._unit=n.unit||(o.autoSkip?qa(n.minUnit,this.min,this.max,this._getLabelCapacity(r)):K0(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:Z0(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),Ka(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,r;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,r=this.getDecimalForValue(e[e.length-1]),e.length===1?o=r:o=(r-this.getDecimalForValue(e[e.length-2]))/2);const l=e.length<3?.5:.25;n=me(n,0,l),o=me(o,0,l),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,i=this.options,r=i.time,l=r.unit||qa(r.minUnit,n,o,this._getLabelCapacity(n)),a=Y(i.ticks.stepSize,1),d=l==="week"?r.isoWeekday:!1,c=Ut(d)||d===!0,u={};let f=n,h,p;if(c&&(f=+e.startOf(f,"isoWeek",d)),f=+e.startOf(f,c?"day":l),e.diff(o,n,l)>1e5*a)throw new Error(n+" and "+o+" are too far apart with stepSize of "+a+" "+l);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(h=f,p=0;h<o;h=+e.add(h,a,l),p++)Xa(u,h,m);return(h===o||i.bounds==="ticks"||p===1)&&Xa(u,h,m),Object.keys(u).sort(Ua).map(g=>+g)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,r=this._unit,l=n||i[r];return this._adapter.format(e,l)}_tickFormatFunction(e,n,o,i){const r=this.options,l=r.ticks.callback;if(l)return ne(l,[e,n,o],this);const a=r.time.displayFormats,d=this._unit,c=this._majorUnit,u=d&&a[d],f=c&&a[c],h=o[n],p=c&&f&&h&&h.major;return this._adapter.format(e,i||(p?f:u))}generateTickLabels(e){let n,o,i;for(n=0,o=e.length;n<o;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,i=Ie(this.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(i),l=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:o*r+a*l,h:o*l+a*r}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,r=this._tickFormatFunction(e,0,Ka(this,[e],this._majorUnit),i),l=this._getLabelSize(r),a=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)e.push(Ga(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Kr(e.sort(Ua))}}I(Fn,"id","time"),I(Fn,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Ao(t,e,n){let o=0,i=t.length-1,r,l,a,d;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=et(t,"pos",e)),{pos:r,time:a}=t[o],{pos:l,time:d}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=et(t,"time",e)),{time:r,pos:a}=t[o],{time:l,pos:d}=t[i]);const c=l-r;return c?a+(d-a)*(e-r)/c:a}class us extends Fn{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Ao(n,this.min),this._tableRange=Ao(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],r=[];let l,a,d,c,u;for(l=0,a=e.length;l<a;++l)c=e[l],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(l=0,a=i.length;l<a;++l)u=i[l+1],d=i[l-1],c=i[l],Math.round((u+d)/2)!==c&&r.push({time:c,pos:l/(a-1)});return r}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,r)=>i-r)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(Ao(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return Ao(this._table,o*this._tableRange+this._minPos,!0)}}I(us,"id","timeseries"),I(us,"defaults",Fn.defaults);var Q0=Object.freeze({__proto__:null,CategoryScale:ls,LinearScale:as,LogarithmicScale:ds,RadialLinearScale:Rn,TimeScale:Fn,TimeSeriesScale:us});const eg=[rp,Am,B0,Q0];Le.register(...eg);const tg={class:"flex flex-col h-full m-24 overflow-hidden p-24"},ng={class:"flex flex-col gap-8"},og={class:"fm-color-typo-primary fm-typo-body-lg-400"},ig={class:"fm-color-typo-secondary fm-typo-body-md-400"},sg={class:"grow"},rg=s.defineComponent({__name:"FmLine",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean},maintainAspectRatio:{type:Boolean}},setup(t){const e=t,n=s.ref(null);let o=null;s.watch([()=>e.transpose,()=>e.maintainAspectRatio],()=>{o&&o.config.options&&(o.destroy(),a())});const i=s.computed(()=>e.transpose?"y":"x");function r({context:d,color:c}){const{ctx:u,chartArea:f}=d.chart;if(!f)return;const h=u==null?void 0:u.createLinearGradient(0,0,0,f.height);return h.addColorStop(0,yi(c,.5)),h.addColorStop(1,yi(c,0)),h}const l=s.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(d=>{const c=rn(d.color)??"";return{...d,backgroundColor:c?u=>r({context:u,color:c}):"",borderColor:c,borderDash:d.dash?[5,5]:void 0,tension:.1}})}));s.watch(l,()=>{o&&(o.data=l.value,o.update())},{deep:!0});function a(){n.value&&(o=new Le(n.value,{type:"line",data:l.value,options:{plugins:{legend:{display:e.datasets.length>1,position:"bottom",labels:{usePointStyle:!0,pointStyle:"line"}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{stacked:e.stacked,grid:{display:!0},position:"right",beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return s.onMounted(()=>{a()}),(d,c)=>(s.openBlock(),s.createElementBlock("div",tg,[s.createElementVNode("div",ng,[s.renderSlot(d.$slots,"title"),s.createElementVNode("div",og,s.toDisplayString(d.name),1),s.createElementVNode("div",ig,s.toDisplayString(d.paragraph),1)]),s.createElementVNode("div",sg,[s.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),lg={class:"flex flex-col h-full overflow-hidden px-24 py-16"},ag={class:"flex flex-col gap-8"},dg={class:"fm-color-typo-primary fm-typo-body-lg-400"},cg={class:"fm-color-typo-secondary fm-typo-body-md-400"},ug={class:"grow"},fg=s.defineComponent({__name:"FmPie",props:{name:{default:void 0},variant:{},paragraph:{default:void 0},datasets:{},metrics:{},legend:{type:Boolean,default:!0},text:{default:void 0},textColor:{default:"#0E1715"},textStyle:{default:"bold 30px sans-serif"},maintainAspectRatio:{type:Boolean,default:!0}},setup(t){const e=t,n=s.ref(null);let o=null;const i=s.computed(()=>e.variant==="doughnut"?"90%":"0"),r=s.computed(()=>e.text);s.watch([()=>e.metrics,()=>e.datasets,()=>e.variant,()=>e.legend,()=>e.textColor,()=>e.textStyle,()=>e.text,()=>e.maintainAspectRatio],()=>{o&&(o.destroy(),a())});const l=s.computed(()=>({labels:e.metrics,datasets:e.datasets.map(d=>{var u;const c=(u=d.backgroundColor)==null?void 0:u.map(f=>rn(f)??"");return{...d,backgroundColor:c??void 0,hoverOffset:d.hoverOffset??0}})}));function a(){n.value&&(o=new Le(n.value,{type:"doughnut",data:l.value,options:{maintainAspectRatio:e.maintainAspectRatio,responsive:!0,cutout:i.value,plugins:{legend:{display:e.legend,position:"bottom",labels:{usePointStyle:!0}}}},plugins:[{id:"doughnutlabel",beforeDatasetsDraw:d=>{if(e.variant==="doughnut"){const{ctx:c}=d;c.save();const u=d.getDatasetMeta(0).data[0].x,f=d.getDatasetMeta(0).data[0].y;if(c.font=e.textStyle,c.textAlign="center",c.textBaseline="middle",r.value&&r.value!==""){const h=r.value.split(`
27
- `);for(let p=0;p<h.length;p++){const m=p===0?1:.7;c.fillStyle=yi(rn(e.textColor)??"",m),c.fillText(h[p],u,f+p*40)}}}}}]}))}return s.onMounted(()=>{a()}),(d,c)=>(s.openBlock(),s.createElementBlock("div",lg,[s.createElementVNode("div",ag,[s.renderSlot(d.$slots,"title"),s.createElementVNode("div",dg,s.toDisplayString(d.name),1),s.createElementVNode("div",cg,s.toDisplayString(d.paragraph),1)]),s.createElementVNode("div",ug,[s.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),hg={class:"flex flex-col h-full overflow-hidden px-24 py-16"},pg={class:"flex flex-col gap-8"},mg={class:"fm-color-typo-primary fm-typo-body-lg-400"},gg={class:"fm-color-typo-secondary fm-typo-body-md-400"},yg={class:"grow"},bg=s.defineComponent({__name:"FmBar",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1},maintainAspectRatio:{type:Boolean,default:!0}},setup(t){const e=t,n=s.ref(null);let o=null;s.watch([()=>e.transpose,()=>e.maintainAspectRatio],()=>{o&&(o.destroy(),l())});const i=s.computed(()=>e.transpose?"y":"x"),r=s.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(a=>{var u;let d,c;return typeof a.backgroundColor=="string"?d=a.backgroundColor:typeof a.backgroundColor=="object"&&(d=a.backgroundColor.map(f=>rn(f)??"")),typeof a.borderColor=="string"?c=a.borderColor:typeof a.borderColor=="object"&&(c=(u=a.borderColor)==null?void 0:u.map(f=>rn(f)??"")),{...a,backgroundColor:d,borderColor:c,borderRadius:10,borderWidth:c?1:0}})}));s.watch(r,()=>{o&&(o.data=r.value,o.update())},{deep:!0});function l(){n.value&&(o=new Le(n.value,{type:"bar",data:r.value,options:{plugins:{legend:{display:e.datasets.length>1,position:"bottom"}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{stacked:e.stacked,grid:{display:!1},position:"right",beginAtZero:!0}},elements:{point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return s.onMounted(()=>{l()}),(a,d)=>(s.openBlock(),s.createElementBlock("div",hg,[s.createElementVNode("div",pg,[s.renderSlot(a.$slots,"title"),s.createElementVNode("div",mg,s.toDisplayString(a.name),1),s.createElementVNode("div",gg,s.toDisplayString(a.paragraph),1)]),s.createElementVNode("div",yg,[s.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}});function _e(t,e){return t===null||e===null||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>_e(t[n],e[n]))}const $g=t=>typeof t=="boolean",_g={class:"fm-checkbox"},wg={class:"fm-checkbox--wrapper"},Cg={class:"fm-checkbox__input--container"},xg=["checked","disabled","indeterminate"],kg={key:0,class:"fm-checkbox__label-container"},Sg={class:"fm-typo-body-lg-400"},vg={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Za=s.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:[Boolean,Array]},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},value:{}},emits:["update:modelValue","update:indeterminate"],setup(t){const e=t,n=K(e,"modelValue"),o=K(e,"indeterminate"),i=Array.isArray(n.value),r=s.ref(i?n.value.some(d=>_e(d,e.value)):n.value),l=s.computed(()=>{const d=i?n.value.some(c=>_e(c,e.value)):n.value;return o.value&&!d?"remove":n.value?"check_small":""});function a(){if(e.disabled)return;o.value=!1,r.value=!r.value;let d=n.value;i?d=r.value?d.concat(e.value):d.filter(c=>!_e(c,e.value)):d=r.value,n.value=d}return s.watch(()=>n.value,()=>{r.value=i?n.value.some(d=>_e(d,e.value)):n.value}),(d,c)=>(s.openBlock(),s.createElementBlock("div",_g,[s.createElementVNode("label",wg,[s.createElementVNode("div",Cg,[s.createElementVNode("input",{class:s.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":r.value}),type:"checkbox",checked:r.value,disabled:e.disabled,indeterminate:s.unref(o),onInput:a},null,42,xg),s.unref(o)||r.value?(s.openBlock(),s.createBlock(j,{key:0,class:"fm-checkbox__input--checkmark",name:l.value,size:"md",color:"#FFFFFF"},null,8,["name"])):s.createCommentVNode("",!0)]),e.label?(s.openBlock(),s.createElementBlock("div",kg,[s.renderSlot(d.$slots,"label"),s.createElementVNode("div",Sg,s.toDisplayString(e.label),1),e.sublabel?(s.openBlock(),s.createElementBlock("div",vg,s.toDisplayString(e.sublabel),1)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0)])]))}});function Nn(){const t=s.ref(window.innerWidth),e=()=>{t.value=window.innerWidth};return s.onMounted(()=>{window.addEventListener("resize",e)}),s.onUnmounted(()=>{window.removeEventListener("resize",e)}),{breakpoints:s.computed(()=>({xs:t.value>=0&&t.value<=647,sm:t.value>=648&&t.value<=959,md:t.value>=960&&t.value<=1247,lg:t.value>=1248}))}}var Mg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ja={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(Mg,function(){var n=1e3,o=6e4,i=36e5,r="millisecond",l="second",a="minute",d="hour",c="day",u="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(v){var M=["th","st","nd","rd"],k=v%100;return"["+v+(M[(k-20)%10]||M[k]||M[0])+"]"}},w=function(v,M,k){var B=String(v);return!B||B.length>=M?v:""+Array(M+1-B.length).join(k)+v},S={s:w,z:function(v){var M=-v.utcOffset(),k=Math.abs(M),B=Math.floor(k/60),O=k%60;return(M<=0?"+":"-")+w(B,2,"0")+":"+w(O,2,"0")},m:function v(M,k){if(M.date()<k.date())return-v(k,M);var B=12*(k.year()-M.year())+(k.month()-M.month()),O=M.clone().add(B,f),L=k-O<0,T=M.clone().add(B+(L?-1:1),f);return+(-(B+(k-O)/(L?O-T:T-O))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:f,y:p,w:u,d:c,D:m,h:d,m:a,s:l,ms:r,Q:h}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},x="en",V={};V[x]=$;var D="$isDayjsObject",F=function(v){return v instanceof _||!(!v||!v[D])},N=function v(M,k,B){var O;if(!M)return x;if(typeof M=="string"){var L=M.toLowerCase();V[L]&&(O=L),k&&(V[L]=k,O=L);var T=M.split("-");if(!O&&T.length>1)return v(T[0])}else{var W=M.name;V[W]=M,O=W}return!B&&O&&(x=O),O||!B&&x},P=function(v,M){if(F(v))return v.clone();var k=typeof M=="object"?M:{};return k.date=v,k.args=arguments,new _(k)},C=S;C.l=N,C.i=F,C.w=function(v,M){return P(v,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var _=function(){function v(k){this.$L=N(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[D]=!0}var M=v.prototype;return M.parse=function(k){this.$d=function(B){var O=B.date,L=B.utc;if(O===null)return new Date(NaN);if(C.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var T=O.match(y);if(T){var W=T[2]-1||0,U=(T[7]||"0").substring(0,3);return L?new Date(Date.UTC(T[1],W,T[3]||1,T[4]||0,T[5]||0,T[6]||0,U)):new Date(T[1],W,T[3]||1,T[4]||0,T[5]||0,T[6]||0,U)}}return new Date(O)}(k),this.init()},M.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},M.$utils=function(){return C},M.isValid=function(){return this.$d.toString()!==g},M.isSame=function(k,B){var O=P(k);return this.startOf(B)<=O&&O<=this.endOf(B)},M.isAfter=function(k,B){return P(k)<this.startOf(B)},M.isBefore=function(k,B){return this.endOf(B)<P(k)},M.$g=function(k,B,O){return C.u(k)?this[B]:this.set(O,k)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(k,B){var O=this,L=!!C.u(B)||B,T=C.p(k),W=function(Ne,te){var re=C.w(O.$u?Date.UTC(O.$y,te,Ne):new Date(O.$y,te,Ne),O);return L?re:re.endOf(c)},U=function(Ne,te){return C.w(O.toDate()[Ne].apply(O.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(te)),O)},G=this.$W,Q=this.$M,le=this.$D,fe="set"+(this.$u?"UTC":"");switch(T){case p:return L?W(1,0):W(31,11);case f:return L?W(1,Q):W(0,Q+1);case u:var Fe=this.$locale().weekStart||0,je=(G<Fe?G+7:G)-Fe;return W(L?le-je:le+(6-je),Q);case c:case m:return U(fe+"Hours",0);case d:return U(fe+"Minutes",1);case a:return U(fe+"Seconds",2);case l:return U(fe+"Milliseconds",3);default:return this.clone()}},M.endOf=function(k){return this.startOf(k,!1)},M.$set=function(k,B){var O,L=C.p(k),T="set"+(this.$u?"UTC":""),W=(O={},O[c]=T+"Date",O[m]=T+"Date",O[f]=T+"Month",O[p]=T+"FullYear",O[d]=T+"Hours",O[a]=T+"Minutes",O[l]=T+"Seconds",O[r]=T+"Milliseconds",O)[L],U=L===c?this.$D+(B-this.$W):B;if(L===f||L===p){var G=this.clone().set(m,1);G.$d[W](U),G.init(),this.$d=G.set(m,Math.min(this.$D,G.daysInMonth())).$d}else W&&this.$d[W](U);return this.init(),this},M.set=function(k,B){return this.clone().$set(k,B)},M.get=function(k){return this[C.p(k)]()},M.add=function(k,B){var O,L=this;k=Number(k);var T=C.p(B),W=function(Q){var le=P(L);return C.w(le.date(le.date()+Math.round(Q*k)),L)};if(T===f)return this.set(f,this.$M+k);if(T===p)return this.set(p,this.$y+k);if(T===c)return W(1);if(T===u)return W(7);var U=(O={},O[a]=o,O[d]=i,O[l]=n,O)[T]||1,G=this.$d.getTime()+k*U;return C.w(G,this)},M.subtract=function(k,B){return this.add(-1*k,B)},M.format=function(k){var B=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var L=k||"YYYY-MM-DDTHH:mm:ssZ",T=C.z(this),W=this.$H,U=this.$m,G=this.$M,Q=O.weekdays,le=O.months,fe=O.meridiem,Fe=function(te,re,xe,ke){return te&&(te[re]||te(B,L))||xe[re].slice(0,ke)},je=function(te){return C.s(W%12||12,te,"0")},Ne=fe||function(te,re,xe){var ke=te<12?"AM":"PM";return xe?ke.toLowerCase():ke};return L.replace(b,function(te,re){return re||function(xe){switch(xe){case"YY":return String(B.$y).slice(-2);case"YYYY":return C.s(B.$y,4,"0");case"M":return G+1;case"MM":return C.s(G+1,2,"0");case"MMM":return Fe(O.monthsShort,G,le,3);case"MMMM":return Fe(le,G);case"D":return B.$D;case"DD":return C.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return Fe(O.weekdaysMin,B.$W,Q,2);case"ddd":return Fe(O.weekdaysShort,B.$W,Q,3);case"dddd":return Q[B.$W];case"H":return String(W);case"HH":return C.s(W,2,"0");case"h":return je(1);case"hh":return je(2);case"a":return Ne(W,U,!0);case"A":return Ne(W,U,!1);case"m":return String(U);case"mm":return C.s(U,2,"0");case"s":return String(B.$s);case"ss":return C.s(B.$s,2,"0");case"SSS":return C.s(B.$ms,3,"0");case"Z":return T}return null}(te)||T.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(k,B,O){var L,T=this,W=C.p(B),U=P(k),G=(U.utcOffset()-this.utcOffset())*o,Q=this-U,le=function(){return C.m(T,U)};switch(W){case p:L=le()/12;break;case f:L=le();break;case h:L=le()/3;break;case u:L=(Q-G)/6048e5;break;case c:L=(Q-G)/864e5;break;case d:L=Q/i;break;case a:L=Q/o;break;case l:L=Q/n;break;default:L=Q}return O?L:C.a(L)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return V[this.$L]},M.locale=function(k,B){if(!k)return this.$L;var O=this.clone(),L=N(k,B,!0);return L&&(O.$L=L),O},M.clone=function(){return C.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},v}(),E=_.prototype;return P.prototype=E,[["$ms",r],["$s",l],["$m",a],["$H",d],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(v){E[v[1]]=function(M){return this.$g(M,v[0],v[1])}}),P.extend=function(v,M){return v.$i||(v(M,_,P),v.$i=!0),P},P.locale=N,P.isDayjs=F,P.unix=function(v){return P(1e3*v)},P.en=V[x],P.Ls=V,P.p={},P})})(Ja);var Dg=Ja.exports;const R=fs(Dg),Eg={class:"w-full"},ge=J(s.defineComponent({__name:"FmField",props:{tag:{default:"div"},prependIcon:{default:""},appendIcon:{default:""},invalid:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},iconOutlined:{type:Boolean,default:!1},size:{default:"sm"}},setup(t){const e=t;return(n,o)=>(s.openBlock(),s.createBlock(e.tag,{class:s.normalizeClass({"fm-field":!0,"fm-field--focused":n.focused,"fm-field--invalid":n.invalid,"fm-field--valid":n.showValidBorder&&!n.invalid,"fm-field--disabled":n.disabled,"fm-field--md":n.size==="md","fm-field--sm":n.size==="sm"})},{default:s.withCtx(()=>[s.renderSlot(n.$slots,"prepend",{},()=>[n.prependIcon?(s.openBlock(),s.createBlock(j,{key:0,color:n.disabled?"disabled":"neutral-black",name:n.prependIcon,outline:n.iconOutlined,size:"md"},null,8,["color","name","outline"])):s.createCommentVNode("",!0)],!0),s.createElementVNode("div",Eg,[s.renderSlot(n.$slots,"default",{},void 0,!0)]),s.renderSlot(n.$slots,"append",{},()=>[n.appendIcon?(s.openBlock(),s.createBlock(j,{key:0,color:n.disabled?"disabled":"neutral-black",name:n.appendIcon,outline:n.iconOutlined,size:"md"},null,8,["color","name","outline"])):s.createCommentVNode("",!0)],!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-2a7c3135"]]),Bg={class:"flex gap-4"},Qa=s.defineComponent({__name:"FmHelperText",props:{text:{default:""},disabled:{type:Boolean,default:!1},state:{default:"none"},errorMessages:{default:()=>[]}},setup(t){const e=t,n=s.computed(()=>e.state==="success"?"check_circle":e.state==="warning"?"warning":e.state==="error"?"error":""),o=s.computed(()=>e.state==="success"?"text-fm-color-system-success-300":e.state==="warning"?"text-fm-color-system-warning-300":e.state==="error"?"text-fm-color-system-error-300":"");return(i,r)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["fm-typo-body-sm-400",{"text-fm-color-typo-disabled":i.disabled,"text-fm-color-typo-secondary":i.state==="none"&&!i.disabled,"text-fm-color-typo-success":i.state==="success"&&!i.disabled,"text-fm-color-typo-warning":i.state==="warning"&&!i.disabled,"text-fm-color-typo-error":i.state==="error"&&!i.disabled}])},[i.errorMessages.length===0?s.renderSlot(i.$slots,"default",{key:0},()=>[s.createElementVNode("div",Bg,[n.value?(s.openBlock(),s.createBlock(j,{key:0,size:"sm",name:n.value,class:s.normalizeClass(["mt-[2px]",o.value])},null,8,["name","class"])):s.createCommentVNode("",!0),s.createElementVNode("span",null,s.toDisplayString(i.text),1)])]):s.renderSlot(i.$slots,"default",{key:1},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.errorMessages,l=>(s.openBlock(),s.createElementBlock("div",{key:l,class:"flex gap-4 text-fm-color-typo-error"},[s.createVNode(j,{size:"sm",name:"error",class:"mt-[2px] text-fm-color-system-error-300"}),s.createElementVNode("span",null,s.toDisplayString(l),1)]))),128))])],2))}}),Zt=Math.min,Lt=Math.max,Oo=Math.round,Io=Math.floor,Ct=t=>({x:t,y:t}),Vg={left:"right",right:"left",bottom:"top",top:"bottom"},Pg={start:"end",end:"start"};function hs(t,e,n){return Lt(t,Zt(e,n))}function An(t,e){return typeof t=="function"?t(e):t}function zt(t){return t.split("-")[0]}function On(t){return t.split("-")[1]}function ed(t){return t==="x"?"y":"x"}function ps(t){return t==="y"?"height":"width"}function To(t){return["top","bottom"].includes(zt(t))?"y":"x"}function ms(t){return ed(To(t))}function Rg(t,e,n){n===void 0&&(n=!1);const o=On(t),i=ms(t),r=ps(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(l=Lo(l)),[l,Lo(l)]}function Fg(t){const e=Lo(t);return[gs(t),e,gs(e)]}function gs(t){return t.replace(/start|end/g,e=>Pg[e])}function Ng(t,e,n){const o=["left","right"],i=["right","left"],r=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?r:l;default:return[]}}function Ag(t,e,n,o){const i=On(t);let r=Ng(zt(t),n==="start",o);return i&&(r=r.map(l=>l+"-"+i),e&&(r=r.concat(r.map(gs)))),r}function Lo(t){return t.replace(/left|right|bottom|top/g,e=>Vg[e])}function Og(t){return{top:0,right:0,bottom:0,left:0,...t}}function td(t){return typeof t!="number"?Og(t):{top:t,right:t,bottom:t,left:t}}function zo(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function nd(t,e,n){let{reference:o,floating:i}=t;const r=To(e),l=ms(e),a=ps(l),d=zt(e),c=r==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,h=o[a]/2-i[a]/2;let p;switch(d){case"top":p={x:u,y:o.y-i.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-i.width,y:f};break;default:p={x:o.x,y:o.y}}switch(On(e)){case"start":p[l]-=h*(n&&c?-1:1);break;case"end":p[l]+=h*(n&&c?-1:1);break}return p}const Ig=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:l}=n,a=r.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=nd(c,o,d),h=o,p={},m=0;for(let g=0;g<a.length;g++){const{name:y,fn:b}=a[g],{x:$,y:w,data:S,reset:x}=await b({x:u,y:f,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});u=$??u,f=w??f,p={...p,[y]:{...p[y],...S}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(c=x.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:i}):x.rects),{x:u,y:f}=nd(c,h,d)),g=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:p}};async function od(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:l,elements:a,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=An(e,t),m=td(p),y=a[h?f==="floating"?"reference":"floating":f],b=zo(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(y)))==null||n?y:y.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:d})),$=f==="floating"?{...l.floating,x:o,y:i}:l.reference,w=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),S=await(r.isElement==null?void 0:r.isElement(w))?await(r.getScale==null?void 0:r.getScale(w))||{x:1,y:1}:{x:1,y:1},x=zo(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:$,offsetParent:w,strategy:d}):$);return{top:(b.top-x.top+m.top)/S.y,bottom:(x.bottom-b.bottom+m.bottom)/S.y,left:(b.left-x.left+m.left)/S.x,right:(x.right-b.right+m.right)/S.x}}const Tg=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:l,elements:a,middlewareData:d}=e,{element:c,padding:u=0}=An(t,e)||{};if(c==null)return{};const f=td(u),h={x:n,y:o},p=ms(i),m=ps(p),g=await l.getDimensions(c),y=p==="y",b=y?"top":"left",$=y?"bottom":"right",w=y?"clientHeight":"clientWidth",S=r.reference[m]+r.reference[p]-h[p]-r.floating[m],x=h[p]-r.reference[p],V=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let D=V?V[w]:0;(!D||!await(l.isElement==null?void 0:l.isElement(V)))&&(D=a.floating[w]||r.floating[m]);const F=S/2-x/2,N=D/2-g[m]/2-1,P=Zt(f[b],N),C=Zt(f[$],N),_=P,E=D-g[m]-C,v=D/2-g[m]/2+F,M=hs(_,v,E),k=!d.arrow&&On(i)!=null&&v!==M&&r.reference[m]/2-(v<_?P:C)-g[m]/2<0,B=k?v<_?v-_:v-E:0;return{[p]:h[p]+B,data:{[p]:M,centerOffset:v-M-B,...k&&{alignmentOffset:B}},reset:k}}}),Lg=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:l,initialPlacement:a,platform:d,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=An(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const b=zt(i),$=zt(a)===a,w=await(d.isRTL==null?void 0:d.isRTL(c.floating)),S=h||($||!g?[Lo(a)]:Fg(a));!h&&m!=="none"&&S.push(...Ag(a,g,m,w));const x=[a,...S],V=await od(e,y),D=[];let F=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&D.push(V[b]),f){const _=Rg(i,l,w);D.push(V[_[0]],V[_[1]])}if(F=[...F,{placement:i,overflows:D}],!D.every(_=>_<=0)){var N,P;const _=(((N=r.flip)==null?void 0:N.index)||0)+1,E=x[_];if(E)return{data:{index:_,overflows:F},reset:{placement:E}};let v=(P=F.filter(M=>M.overflows[0]<=0).sort((M,k)=>M.overflows[1]-k.overflows[1])[0])==null?void 0:P.placement;if(!v)switch(p){case"bestFit":{var C;const M=(C=F.map(k=>[k.placement,k.overflows.filter(B=>B>0).reduce((B,O)=>B+O,0)]).sort((k,B)=>k[1]-B[1])[0])==null?void 0:C[0];M&&(v=M);break}case"initialPlacement":v=a;break}if(i!==v)return{reset:{placement:v}}}return{}}}};async function zg(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=zt(n),a=On(n),d=To(n)==="y",c=["left","top"].includes(l)?-1:1,u=r&&d?-1:1,f=An(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),d?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const In=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:l,middlewareData:a}=e,d=await zg(e,t);return l===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:r+d.y,data:{...d,placement:l}}}}},Hg=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:l=!1,limiter:a={fn:y=>{let{x:b,y:$}=y;return{x:b,y:$}}},...d}=An(t,e),c={x:n,y:o},u=await od(e,d),f=To(zt(i)),h=ed(f);let p=c[h],m=c[f];if(r){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",$=p+u[y],w=p-u[b];p=hs($,p,w)}if(l){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",$=m+u[y],w=m-u[b];m=hs($,m,w)}const g=a.fn({...e,[h]:p,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}};function st(t){return ys(t)?(t.nodeName||"").toLowerCase():"#document"}function Ve(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function rt(t){var e;return(e=(ys(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ys(t){return t instanceof Node||t instanceof Ve(t).Node}function lt(t){return t instanceof Element||t instanceof Ve(t).Element}function qe(t){return t instanceof HTMLElement||t instanceof Ve(t).HTMLElement}function id(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ve(t).ShadowRoot}function Tn(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Oe(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function jg(t){return["table","td","th"].includes(st(t))}function bs(t){const e=$s(),n=Oe(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Wg(t){let e=Jt(t);for(;qe(e)&&!Ho(e);){if(bs(e))return e;e=Jt(e)}return null}function $s(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ho(t){return["html","body","#document"].includes(st(t))}function Oe(t){return Ve(t).getComputedStyle(t)}function jo(t){return lt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Jt(t){if(st(t)==="html")return t;const e=t.assignedSlot||t.parentNode||id(t)&&t.host||rt(t);return id(e)?e.host:e}function sd(t){const e=Jt(t);return Ho(e)?t.ownerDocument?t.ownerDocument.body:t.body:qe(e)&&Tn(e)?e:sd(e)}function Ln(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=sd(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),l=Ve(i);return r?e.concat(l,l.visualViewport||[],Tn(i)?i:[],l.frameElement&&n?Ln(l.frameElement):[]):e.concat(i,Ln(i,[],n))}function rd(t){const e=Oe(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=qe(t),r=i?t.offsetWidth:n,l=i?t.offsetHeight:o,a=Oo(n)!==r||Oo(o)!==l;return a&&(n=r,o=l),{width:n,height:o,$:a}}function _s(t){return lt(t)?t:t.contextElement}function Qt(t){const e=_s(t);if(!qe(e))return Ct(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=rd(e);let l=(r?Oo(n.width):n.width)/o,a=(r?Oo(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const Yg=Ct(0);function ld(t){const e=Ve(t);return!$s()||!e.visualViewport?Yg:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ug(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ve(t)?!1:e}function Ht(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=_s(t);let l=Ct(1);e&&(o?lt(o)&&(l=Qt(o)):l=Qt(t));const a=Ug(r,n,o)?ld(r):Ct(0);let d=(i.left+a.x)/l.x,c=(i.top+a.y)/l.y,u=i.width/l.x,f=i.height/l.y;if(r){const h=Ve(r),p=o&&lt(o)?Ve(o):o;let m=h,g=m.frameElement;for(;g&&o&&p!==m;){const y=Qt(g),b=g.getBoundingClientRect(),$=Oe(g),w=b.left+(g.clientLeft+parseFloat($.paddingLeft))*y.x,S=b.top+(g.clientTop+parseFloat($.paddingTop))*y.y;d*=y.x,c*=y.y,u*=y.x,f*=y.y,d+=w,c+=S,m=Ve(g),g=m.frameElement}}return zo({width:u,height:f,x:d,y:c})}const Gg=[":popover-open",":modal"];function ad(t){return Gg.some(e=>{try{return t.matches(e)}catch{return!1}})}function qg(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",l=rt(o),a=e?ad(e.floating):!1;if(o===l||a&&r)return n;let d={scrollLeft:0,scrollTop:0},c=Ct(1);const u=Ct(0),f=qe(o);if((f||!f&&!r)&&((st(o)!=="body"||Tn(l))&&(d=jo(o)),qe(o))){const h=Ht(o);c=Qt(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x,y:n.y*c.y-d.scrollTop*c.y+u.y}}function Xg(t){return Array.from(t.getClientRects())}function dd(t){return Ht(rt(t)).left+jo(t).scrollLeft}function Kg(t){const e=rt(t),n=jo(t),o=t.ownerDocument.body,i=Lt(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=Lt(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+dd(t);const a=-n.scrollTop;return Oe(o).direction==="rtl"&&(l+=Lt(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:l,y:a}}function Zg(t,e){const n=Ve(t),o=rt(t),i=n.visualViewport;let r=o.clientWidth,l=o.clientHeight,a=0,d=0;if(i){r=i.width,l=i.height;const c=$s();(!c||c&&e==="fixed")&&(a=i.offsetLeft,d=i.offsetTop)}return{width:r,height:l,x:a,y:d}}function Jg(t,e){const n=Ht(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=qe(t)?Qt(t):Ct(1),l=t.clientWidth*r.x,a=t.clientHeight*r.y,d=i*r.x,c=o*r.y;return{width:l,height:a,x:d,y:c}}function cd(t,e,n){let o;if(e==="viewport")o=Zg(t,n);else if(e==="document")o=Kg(rt(t));else if(lt(e))o=Jg(e,n);else{const i=ld(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return zo(o)}function ud(t,e){const n=Jt(t);return n===e||!lt(n)||Ho(n)?!1:Oe(n).position==="fixed"||ud(n,e)}function Qg(t,e){const n=e.get(t);if(n)return n;let o=Ln(t,[],!1).filter(a=>lt(a)&&st(a)!=="body"),i=null;const r=Oe(t).position==="fixed";let l=r?Jt(t):t;for(;lt(l)&&!Ho(l);){const a=Oe(l),d=bs(l);!d&&a.position==="fixed"&&(i=null),(r?!d&&!i:!d&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Tn(l)&&!d&&ud(t,l))?o=o.filter(u=>u!==l):i=a,l=Jt(l)}return e.set(t,o),o}function e1(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const l=[...n==="clippingAncestors"?Qg(e,this._c):[].concat(n),o],a=l[0],d=l.reduce((c,u)=>{const f=cd(e,u,i);return c.top=Lt(f.top,c.top),c.right=Zt(f.right,c.right),c.bottom=Zt(f.bottom,c.bottom),c.left=Lt(f.left,c.left),c},cd(e,a,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function t1(t){const{width:e,height:n}=rd(t);return{width:e,height:n}}function n1(t,e,n){const o=qe(e),i=rt(e),r=n==="fixed",l=Ht(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const d=Ct(0);if(o||!o&&!r)if((st(e)!=="body"||Tn(i))&&(a=jo(e)),o){const f=Ht(e,!0,r,e);d.x=f.x+e.clientLeft,d.y=f.y+e.clientTop}else i&&(d.x=dd(i));const c=l.left+a.scrollLeft-d.x,u=l.top+a.scrollTop-d.y;return{x:c,y:u,width:l.width,height:l.height}}function fd(t,e){return!qe(t)||Oe(t).position==="fixed"?null:e?e(t):t.offsetParent}function hd(t,e){const n=Ve(t);if(!qe(t)||ad(t))return n;let o=fd(t,e);for(;o&&jg(o)&&Oe(o).position==="static";)o=fd(o,e);return o&&(st(o)==="html"||st(o)==="body"&&Oe(o).position==="static"&&!bs(o))?n:o||Wg(t)||n}const o1=async function(t){const e=this.getOffsetParent||hd,n=this.getDimensions;return{reference:n1(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}};function i1(t){return Oe(t).direction==="rtl"}const s1={convertOffsetParentRelativeRectToViewportRelativeRect:qg,getDocumentElement:rt,getClippingRect:e1,getOffsetParent:hd,getElementRects:o1,getClientRects:Xg,getDimensions:t1,getScale:Qt,isElement:lt,isRTL:i1};function r1(t,e){let n=null,o;const i=rt(t);function r(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function l(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),r();const{left:c,top:u,width:f,height:h}=t.getBoundingClientRect();if(a||e(),!f||!h)return;const p=Io(u),m=Io(i.clientWidth-(c+f)),g=Io(i.clientHeight-(u+h)),y=Io(c),$={rootMargin:-p+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Lt(0,Zt(1,d))||1};let w=!0;function S(x){const V=x[0].intersectionRatio;if(V!==d){if(!w)return l();V?l(!1,V):o=setTimeout(()=>{l(!1,1e-7)},100)}w=!1}try{n=new IntersectionObserver(S,{...$,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,$)}n.observe(t)}return l(!0),r}function zn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=_s(t),u=i||r?[...c?Ln(c):[],...Ln(e)]:[];u.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),r&&b.addEventListener("resize",n)});const f=c&&a?r1(c,n):null;let h=-1,p=null;l&&(p=new ResizeObserver(b=>{let[$]=b;$&&$.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(e)})),n()}),c&&!d&&p.observe(c),p.observe(e));let m,g=d?Ht(t):null;d&&y();function y(){const b=Ht(t);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,m=requestAnimationFrame(y)}return n(),()=>{var b;u.forEach($=>{i&&$.removeEventListener("scroll",n),r&&$.removeEventListener("resize",n)}),f==null||f(),(b=p)==null||b.disconnect(),p=null,d&&cancelAnimationFrame(m)}}const pd=Hg,Hn=Lg,l1=Tg,a1=(t,e,n)=>{const o=new Map,i={platform:s1,...n},r={...i.platform,_c:o};return Ig(t,e,{...i,platform:r})};function d1(t){return t!=null&&typeof t=="object"&&"$el"in t}function ws(t){if(d1(t)){const e=t.$el;return ys(e)&&st(e)==="#comment"?null:e}return t}function md(t){return{name:"arrow",options:t,fn(e){const n=ws(s.unref(t.element));return n==null?{}:l1({element:n,padding:t.padding}).fn(e)}}}function gd(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function yd(t,e){const n=gd(t);return Math.round(e*n)/n}function jn(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=s.computed(()=>{var D;return(D=s.unref(n.open))!=null?D:!0}),r=s.computed(()=>s.unref(n.middleware)),l=s.computed(()=>{var D;return(D=s.unref(n.placement))!=null?D:"bottom"}),a=s.computed(()=>{var D;return(D=s.unref(n.strategy))!=null?D:"absolute"}),d=s.computed(()=>{var D;return(D=s.unref(n.transform))!=null?D:!0}),c=s.computed(()=>ws(t.value)),u=s.computed(()=>ws(e.value)),f=s.ref(0),h=s.ref(0),p=s.ref(a.value),m=s.ref(l.value),g=s.shallowRef({}),y=s.ref(!1),b=s.computed(()=>{const D={position:p.value,left:"0",top:"0"};if(!u.value)return D;const F=yd(u.value,f.value),N=yd(u.value,h.value);return d.value?{...D,transform:"translate("+F+"px, "+N+"px)",...gd(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:F+"px",top:N+"px"}});let $;function w(){c.value==null||u.value==null||a1(c.value,u.value,{middleware:r.value,placement:l.value,strategy:a.value}).then(D=>{f.value=D.x,h.value=D.y,p.value=D.strategy,m.value=D.placement,g.value=D.middlewareData,y.value=!0})}function S(){typeof $=="function"&&($(),$=void 0)}function x(){if(S(),o===void 0){w();return}if(c.value!=null&&u.value!=null){$=o(c.value,u.value,w);return}}function V(){i.value||(y.value=!1)}return s.watch([r,l,a],w,{flush:"sync"}),s.watch([c,u],x,{flush:"sync"}),s.watch(i,V,{flush:"sync"}),s.getCurrentScope()&&s.onScopeDispose(S),{x:s.shallowReadonly(f),y:s.shallowReadonly(h),strategy:s.shallowReadonly(p),placement:s.shallowReadonly(m),middlewareData:s.shallowReadonly(g),isPositioned:s.shallowReadonly(y),floatingStyles:b,update:w}}const bd=s.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},placement:{default:"top"},hideArrow:{type:Boolean,default:!1},content:{default:""},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=s.ref(null),o=s.ref(null),i=s.ref(null),{floatingStyles:r,middlewareData:l,placement:a}=jn(n,o,{whileElementsMounted:zn,placement:e.placement,middleware:[Hn(),In({mainAxis:6}),md({element:i})]}),d=s.ref(!1),c=s.ref(0),u=s.ref(0),f=()=>{e.disabled||(clearTimeout(u.value),c.value=window.setTimeout(()=>{d.value=!0},250))},h=()=>{e.disabled||(clearTimeout(c.value),u.value=window.setTimeout(()=>d.value=!1,250))},p=()=>{clearTimeout(u.value),d.value=!0},m=s.computed(()=>{var y,b,$,w;const g={top:"bottom",right:"left",bottom:"top",left:"right"}[a.value];return{left:((y=l.value.arrow)==null?void 0:y.x)!=null?`${(b=l.value.arrow)==null?void 0:b.x}px`:"",top:(($=l.value.arrow)==null?void 0:$.y)!=null?`${(w=l.value.arrow)==null?void 0:w.y}px`:"",[g]:"-3px"}});return(g,y)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"referenceEl",ref:n,class:s.normalizeClass(["cursor-pointer flex items-center justify-center relative w-max",{"cursor-not-allowed pointer-events-none":g.disabled}]),onPointermove:y[0]||(y[0]=b=>{b.pointerType!=="touch"&&f()}),onPointerleave:h,onPointerdown:h,onPointerup:h},[s.renderSlot(g.$slots,"default")],34),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[d.value&&!g.disabled?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:s.normalizeClass(["fm-shadow-light-300 max-w-[240px] px-16 py-12 rounded-lg",{"bg-fm-color-neutral-black text-fm-color-typo-white fm-typo-body-sm-400":g.variant==="plain","bg-fm-color-neutral-white text-fm-color-typo-secondary fm-typo-body-md-400":g.variant==="rich"}]),style:s.normalizeStyle(s.unref(r)),onMouseenter:p,onMouseleave:h},[s.renderSlot(g.$slots,"content",{},()=>[s.createTextVNode(s.toDisplayString(g.content),1)]),s.withDirectives(s.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:s.normalizeClass(["absolute h-8 rotate-45 rounded-[2px] w-8",{"bg-fm-color-neutral-black":g.variant==="plain","bg-fm-color-neutral-white":g.variant==="rich"}]),style:s.normalizeStyle(m.value)},null,6),[[s.vShow,!g.hideArrow]])],38)):s.createCommentVNode("",!0)]))]))}}),en=s.defineComponent({__name:"FmLabel",props:{label:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""}},setup(t){return(e,n)=>e.label||e.$slots.default?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["fm-typo-body-lg-400 flex gap-4",e.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":e.info}])},[s.renderSlot(e.$slots,"default",{},()=>[s.createElementVNode("span",null,s.toDisplayString(e.label),1),e.required?(s.openBlock(),s.createElementBlock("span",{key:0,class:s.normalizeClass(["fm-typo-body-lg-700",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-error"])}," * ",2)):s.createCommentVNode("",!0),e.optional?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-md-400",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-tertiary"])}," (optional) ",2)):s.createCommentVNode("",!0),e.info?(s.openBlock(),s.createBlock(bd,{key:2,placement:"top",content:e.info,disabled:e.disabled},{default:s.withCtx(()=>[s.createVNode(j,{name:"info",size:"sm",class:s.normalizeClass(["fm-typo-body-md-400",e.disabled?"text-fm-color-typo-disabled":"text-fm-color-neutral-gray-300"])},null,8,["class"])]),_:1},8,["content","disabled"])):s.createCommentVNode("",!0)])],2)):s.createCommentVNode("",!0)}});function $d(t,e){const n=s.ref([]);function o(){const r=[];if(e.value&&e.value.length>0)for(const l of e.value){const d=(typeof l=="function"?l:()=>l)(t.value);d!==!0&&r.push(d)}return n.value=r,n.value}function i(){n.value=[]}return{validate:o,resetValidation:i,errorMessages:n}}function _d(t,e=null,n=null){let o=null;const i=K(t,"modelValue"),r=s.ref(!0),l=s.inject(wr,null),{validate:a,resetValidation:d,errorMessages:c}=$d(i,s.toRef(()=>t.rules)),u=(f=n)=>{r.value=!0,d(),f&&typeof f=="function"&&f(),i.value=e};return s.onMounted(()=>{l&&(o=l.register({validate:a,resetValidation:d,resetValue:u}))}),s.onUnmounted(()=>{l&&l.unregister(o)}),s.watch(()=>i.value,()=>{r.value=!1,i.value!==e&&a()}),s.watch(()=>t.focused,f=>{r.value=!1,f||a()}),{validate:a,resetValidation:d,errorMessages:c,resetValue:u,isPristine:r}}function Wn(){const t=s.ref(!1);function e(){t.value=!0}function n(){t.value=!1}return{focus:e,blur:n,isFocused:t}}const c1={key:1,class:"flex items-center justify-between"},Pe=s.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},focused:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},label:{default:""},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},helperText:{default:""},helperState:{default:"none"},tag:{default:"label"}},setup(t){const e=t,{errorMessages:n,isPristine:o}=_d(e),{focus:i,blur:r}=Wn(),l=s.computed(()=>({label:e.label,disabled:e.disabled,required:e.required,optional:e.optional,info:e.info})),a=s.computed(()=>({text:e.helperText,disabled:e.disabled,state:e.helperState,errorMessages:n.value})),d=s.computed(()=>({isPristine:o,invalid:n.value.length>0}));return(c,u)=>(s.openBlock(),s.createBlock(e.tag,{class:"flex flex-col gap-4",onClick:s.unref(i),onBlur:s.unref(r)},{default:s.withCtx(()=>[c.label||c.$slots.label?(s.openBlock(),s.createBlock(en,s.normalizeProps(s.mergeProps({key:0},l.value)),{default:s.withCtx(()=>[s.renderSlot(c.$slots,"label")]),_:3},16)):s.createCommentVNode("",!0),s.renderSlot(c.$slots,"default",s.normalizeProps(s.guardReactiveProps(d.value))),a.value.text||a.value.errorMessages.length>0||c.$slots["helper-text"]||c.$slots["helper-append"]?(s.openBlock(),s.createElementBlock("div",c1,[s.createVNode(Qa,s.normalizeProps(s.guardReactiveProps(a.value)),{default:s.withCtx(()=>[s.renderSlot(c.$slots,"helper-text")]),_:3},16),s.renderSlot(c.$slots,"helper-append")])):s.createCommentVNode("",!0)]),_:3},8,["onClick","onBlur"]))}}),at=J(s.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},width:{default:void 0},maxHeight:{default:408},inPopover:{type:Boolean,default:!1}},emits:["menu-changed"],setup(t,{emit:e}){const n=t,o=e,i=s.ref([]);let r;const l=s.ref(),a=s.ref(!1),d=s.ref(!1),c=s.inject(Sr,null),u=s.ref(null),f=s.ref(null),{floatingStyles:h}=jn(u,f,{middleware:[In({mainAxis:c?8:4,crossAxis:c?-12:0}),Hn(),pd()],placement:n.placement,whileElementsMounted:zn}),p=()=>{x.value==="hover"&&g()},m=()=>{if(!n.disabled){if(a.value){a.value=!1;return}x.value==="click"&&g()}},g=()=>{d.value=!0,a.value=!0,c==null||c.setChildId(r)},y=()=>{x.value==="hover"&&(d.value=!1)},b=()=>{d.value=!0},$=()=>{d.value=!1},w=()=>{n.closeOnClick&&setTimeout(()=>{a.value=!1,c==null||c.closeParent()},10)},S=s.computed(()=>({mouseInMenu:d}));s.provide(Sr,{register({injectProps:D}){return i.value=[...i.value,{injectProps:D}],i.value.length},closeParent(){c?(a.value=!1,c==null||c.closeParent()):a.value=x.value!=="click"},setChildId(D){l.value=D},mouseInChildId:l,trigger:n.trigger}),s.provide(vr,{handleContentClick:w}),s.onMounted(()=>{window.addEventListener("click",V),c&&(r=c.register({injectProps:S}))}),s.onUnmounted(()=>{window.removeEventListener("click",V)}),s.watch(()=>c==null?void 0:c.mouseInChildId.value,D=>{D!==r&&(a.value=!1)});const x=s.computed(()=>c===null?n.trigger:"hover");s.watch(()=>a.value,()=>o("menu-changed",a.value));const V=D=>{if(!a.value)return;const F=D.path||D.composedPath();for(const N of F)if(N==u.value||N==f.value)return;a.value=!1};return(D,F)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"anchorEl",ref:u,class:"fm-menu",onMouseenter:p,onMouseleave:y,onClick:m},[s.renderSlot(D.$slots,"menu-button",{},void 0,!0)],544),(s.openBlock(),s.createBlock(s.Teleport,{to:"body",disabled:!!s.unref(c)||D.inPopover},[a.value?(s.openBlock(),s.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:f,class:"block z-[99]",style:s.normalizeStyle(s.unref(h)),onMouseenter:b,onMouseleave:$},[s.renderSlot(D.$slots,"menu-wrapper",{},()=>[s.createElementVNode("div",{class:"fm-menu__wrapper",style:s.normalizeStyle({"max-height":`${D.maxHeight}px`,width:`${D.width}px`})},[s.renderSlot(D.$slots,"default",{},void 0,!0)],4)],!0)],36)):s.createCommentVNode("",!0)],8,["disabled"]))]))}}),[["__scopeId","data-v-c8a870c6"]]),u1={class:"fm-menu-item--left"},f1={key:0,class:"fm-menu-item--right"},Me=J(s.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=s.ref(!1),i=s.inject(vr,null),r=e,l=c=>{c.preventDefault(),i==null||i.handleContentClick(),!(n.disabled||!n.selectable)&&r("update:modelValue",!n.modelValue)},a=()=>{r("update:modelValue",n.modelValue)};function d(c){o.value=c}return(c,u)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{class:s.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":c.modelValue&&!c.hasCheckbox,"fm-menu-item--disabled":c.disabled,"hover:bg-fm-color-opacity-sm":!c.disabled&&!c.modelValue&&c.selectable}),onClick:l,onMousedown:u[1]||(u[1]=()=>d(!0)),onMouseleave:u[2]||(u[2]=()=>d(!1)),onMouseup:u[3]||(u[3]=()=>d(!1))},[s.createElementVNode("div",u1,[s.renderSlot(c.$slots,"prepend",{},()=>[!c.hasCheckbox&&c.icon?(s.openBlock(),s.createBlock(j,{key:0,color:c.disabled?"#C7C7CC":c.modelValue?"#FF7823":"#1C1C1E",name:c.icon,outline:!o.value&&!c.modelValue,size:"md"},null,8,["color","name","outline"])):s.createCommentVNode("",!0),c.hasCheckbox?(s.openBlock(),s.createBlock(Za,{key:1,disabled:c.disabled,indeterminate:!1,"model-value":c.modelValue,label:"",name:"something",sublabel:"",value:"",onClick:u[0]||(u[0]=f=>f.preventDefault()),"onUpdate:modelValue":a},null,8,["disabled","model-value"])):s.createCommentVNode("",!0)],!0),s.renderSlot(c.$slots,"label",{},()=>[s.createElementVNode("div",null,[s.createElementVNode("div",{class:s.normalizeClass(`fm-typo-body-md-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},s.toDisplayString(c.label),3),c.sublabel?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(`fm-typo-body-sm-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},s.toDisplayString(c.sublabel),3)):s.createCommentVNode("",!0)])],!0)]),s.renderSlot(c.$slots,"append",{},void 0,!0),c.expandable?(s.openBlock(),s.createElementBlock("div",f1,[s.createVNode(j,{color:c.disabled?"#C7C7CC":"#AEAEB2",name:"chevron_right",size:"md"},null,8,["color"])])):s.createCommentVNode("",!0)],34)]))}}),[["__scopeId","data-v-61108a11"]]),h1={class:"fm-typo-body-lg-700"},p1={class:"h-[264px] overflow-y-auto w-[160px]"},tn=s.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.computed(()=>{const d=R(n.min).startOf("year"),u=R(n.max).startOf("year").diff(d,"year"),f=[];for(let h=0;h<=u;h++)f.push(d.add(h,"year"));return f}),l=d=>{const c=R(n.min).startOf("month"),u=R(n.max).startOf("month");return d.get("year")===c.get("year")?d.startOf("month").isAfter(c)||d.get("month")===c.get("month"):d.get("year")===u.get("year")?d.startOf("month").isBefore(u)||d.get("month")===u.get("month"):!0},a=d=>{const c=R(n.min).startOf("month"),u=R(n.max).startOf("month");if(c.get("year")===d.get("year")){o("update:modelValue",c);return}if(u.get("year")===d.get("year")){o("update:modelValue",u);return}o("update:modelValue",d)};return(d,c)=>(s.openBlock(),s.createBlock(at,{trigger:"click","in-popover":"",onMenuChanged:c[0]||(c[0]=u=>i.value=u)},{"menu-button":s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex gap-4 h-24 items-center px-8 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[s.createElementVNode("div",h1,[d.picker==="month"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createTextVNode(s.toDisplayString(d.modelValue.format("MMMM")),1)],64)):s.createCommentVNode("",!0),d.picker==="year"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createTextVNode(s.toDisplayString(d.modelValue.format("YYYY")),1)],64)):s.createCommentVNode("",!0)]),s.createVNode(j,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:s.withCtx(()=>[s.createElementVNode("ul",p1,[d.picker==="month"?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(Array.from(Array(12),(u,f)=>d.modelValue.month(f)),u=>(s.openBlock(),s.createElementBlock("li",{key:u.format("MMMM")},[s.createVNode(Me,{disabled:!l(u),"model-value":d.modelValue.format("MMMM")===u.format("MMMM"),label:u.format("MMMM"),"onUpdate:modelValue":f=>o("update:modelValue",u)},null,8,["disabled","model-value","label","onUpdate:modelValue"])]))),128)):s.createCommentVNode("",!0),d.picker==="year"?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:1},s.renderList(r.value,u=>(s.openBlock(),s.createElementBlock("li",{key:u.format("YYYY")},[s.createVNode(Me,{"model-value":d.modelValue.format("YYYY")===u.format("YYYY"),label:u.format("YYYY"),"onUpdate:modelValue":f=>a(u)},null,8,["model-value","label","onUpdate:modelValue"])]))),128)):s.createCommentVNode("",!0)])]),_:1}))}}),m1={mounted:(t,e)=>{t.clickOutsideEvent=n=>{const o=e.arg?document.querySelectorAll(`#${e.arg}`):[];!(t==n.target||t.contains(n.target))&&!Array.from(o).some(i=>i&&(n.target==i||i.contains(n.target)))&&e.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:t=>{document.removeEventListener("click",t.clickOutsideEvent)}},Cs=J(s.defineComponent({__name:"FmPopover",props:{showPopover:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["popover-changed"],setup(t,{expose:e,emit:n}){const o=t,i=s.ref(o.showPopover),r=s.ref(null),l=s.ref(null),{floatingStyles:a}=jn(r,l,{middleware:[In(4),Hn(),pd({crossAxis:!0})],placement:o.placement,whileElementsMounted:zn}),d=n,c=()=>{i.value||(i.value=!0,d("popover-changed",i.value))},u=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};e({show:c,hide:u});const f=()=>{o.disabled||(i.value=!i.value,d("popover-changed",i.value))};s.watch(()=>o.showPopover,p=>i.value=p);const h=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};return(p,m)=>s.withDirectives((s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"anchorEl",ref:r,class:"fm-popover",onClick:f},[s.renderSlot(p.$slots,"popover-button",{},void 0,!0)],512),i.value?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"popoverEl",ref:l,style:s.normalizeStyle(s.unref(a)),class:"fm-popover__content"},[s.renderSlot(p.$slots,"default",{hide:u,show:c},void 0,!0)],4)):s.createCommentVNode("",!0)])),[[s.unref(m1),h]])}}),[["__scopeId","data-v-f18163e0"]]),A="YYYY-MM-DD",xs=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),r=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&r.length>0&&(e.push(r),r=[]),r.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return r.length>0&&e.push(r),e},wd=(t,e)=>{const n=R().startOf("month"),o=R(t).diff(n,"month"),i=R(e).diff(n,"month"),r=[];for(let l=o-1;l<=i;l++){const a=[],d=n.add(l,"month").startOf("month"),c=d.endOf("month"),u=d.month();let f=d.startOf("week"),h=[];for(;f.isBefore(c.endOf("week"));)f.day()===0&&h.length>0&&(a.push(h),h=[]),h.push({id:d.format("MM-YYYY"),date:f,isCurrentMonth:f.month()===u}),f=f.add(1,"day");h.length>0&&a.push(h),r.push({id:d.format("YYYY-MM-DD"),matrix:a,height:64+48*(c.endOf("week").diff(d.startOf("week"),"week")+1)})}return r},Yn=Array.from(Array(7),(t,e)=>R().day(e).format("ddd")),g1={class:"p-12 w-[360px]"},y1={class:"w-max"},b1={class:"flex h-40 justify-between px-4 py-8"},$1={class:"flex gap-4 items-center"},_1={class:"flex gap-4 items-center justify-center"},w1={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},C1=["onClick"],x1={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},k1=J(s.defineComponent({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=K(e,"modelValue"),o=s.ref(R(n.value,A)),i=s.ref(!1),r=s.ref(R().startOf("month")),l=s.ref(!1),a=s.ref(!1),d=h=>{o.value=h},c=()=>{n.value=o.value.format(A),setTimeout(()=>{i.value=!1},0)},u=()=>{o.value=n.value?R(n.value):null,i.value=!1},f=h=>{l.value=!1,a.value=!1,r.value=h};return(h,p)=>(s.openBlock(),s.createBlock(Pe,{modelValue:s.unref(n),"onUpdate:modelValue":p[5]||(p[5]=m=>s.isRef(n)?n.value=m:null),label:h.label,disabled:h.disabled,required:h.labelMark==="required",optional:h.labelMark==="optional",info:h.labelInfo,rules:h.rules,focused:i.value,"helper-text":h.helperText,"helper-state":h.helperState,tag:"div"},{label:s.withCtx(()=>[s.renderSlot(h.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:m})=>[s.createVNode(Cs,{"show-popover":i.value,disabled:h.disabled,onPopoverChanged:p[4]||(p[4]=g=>i.value=g)},{"popover-button":s.withCtx(()=>[s.createVNode(ge,{focused:i.value,invalid:m,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":!i.value},{prepend:s.withCtx(()=>[s.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(h.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.unref(n)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(s.unref(n)?s.unref(R)(s.unref(n)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","invalid","show-valid-border","icon-outlined"])]),default:s.withCtx(()=>[s.createElementVNode("div",g1,[s.createElementVNode("div",y1,[s.createElementVNode("div",b1,[s.createElementVNode("div",$1,[s.createVNode(tn,{min:h.min,max:h.max,picker:"month","model-value":r.value,"onUpdate:modelValue":p[0]||(p[0]=g=>f(g))},null,8,["min","max","model-value"]),s.createVNode(tn,{min:h.min,max:h.max,picker:"year","model-value":r.value,"onUpdate:modelValue":p[1]||(p[1]=g=>f(g))},null,8,["min","max","model-value"])]),s.createElementVNode("div",_1,[s.createVNode(j,{class:"cursor-pointer",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:p[2]||(p[2]=()=>f(r.value.subtract(1,"month")))}),s.createVNode(j,{class:"cursor-pointer",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:p[3]||(p[3]=()=>f(r.value.add(1,"month")))})])]),s.createElementVNode("div",null,[s.createElementVNode("div",w1,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Yn),g=>(s.openBlock(),s.createElementBlock("div",{key:g,class:"fm-calendar__cell"},s.toDisplayString(g),1))),128))]),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(xs)(r.value),(g,y)=>(s.openBlock(),s.createElementBlock("div",{key:y,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(g,b=>(s.openBlock(),s.createElementBlock("div",{key:b.date.date(),class:"fm-calendar__cell"},[b.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:0,class:s.normalizeClass(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":b.date.isSame(o.value)}]),type:"button",onClick:()=>d(b.date)},s.toDisplayString(b.date.date()),11,C1)):s.createCommentVNode("",!0)]))),128))]))),128))])])]),s.createElementVNode("div",x1,[s.createVNode(X,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),s.createVNode(X,{label:"Apply",size:"md",variant:"primary",disabled:!o.value,onClick:c},null,8,["disabled"])])])]),_:2},1032,["show-popover","disabled"])]),"helper-text":s.withCtx(()=>[s.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-b06e47a1"]]),Cd=t=>(s.pushScopeId("data-v-32a48831"),t=t(),s.popScopeId(),t),S1={class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},v1={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},M1={class:"flex items-center justify-center"},D1={class:"flex fm-typo-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},E1={class:"flex h-[calc(100%-208px)] justify-center relative w-full"},B1=Cd(()=>s.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),V1={id:"wrapper",class:"h-full relative w-[336px]"},P1=["id"],R1={class:"flex gap-4 items-center"},F1={class:"fm-typo-body-lg-700"},N1={class:"fm-typo-body-lg-700"},A1=["onClick"],O1={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},I1=Cd(()=>s.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),T1={class:"flex gap-8 items-center justify-end w-full"},xd=J(s.defineComponent({__name:"FmDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=wd(e.min,e.max),o=K(e,"modelValue"),i=R(),r=s.ref(R(o.value,A)),l=s.ref(!1),a=s.ref(),d=p=>{r.value=p},c=()=>{o.value=r.value.format(A),setTimeout(()=>{l.value=!1},0)},u=()=>{r.value=o.value?R(o.value):null,l.value=!1},f=()=>{l.value=!0,setTimeout(()=>{a.value.scrollToItem(h(i.startOf("month")))},0)},h=p=>n.findIndex(m=>m.id===p.startOf("month").format(A));return(p,m)=>{const g=s.resolveComponent("RecycleScroller");return s.openBlock(),s.createBlock(Pe,{modelValue:s.unref(o),"onUpdate:modelValue":m[0]||(m[0]=y=>s.isRef(o)?o.value=y:null),label:p.label,disabled:p.disabled,required:p.labelMark==="required",optional:p.labelMark==="optional",info:p.labelInfo,rules:p.rules,focused:l.value,"helper-text":p.helperText,"helper-state":p.helperState,tag:"div"},{label:s.withCtx(()=>[s.renderSlot(p.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:y})=>[s.createVNode(ge,{class:"cursor-pointer",focused:l.value,invalid:y,"show-valid-border":p.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":"",onClick:f},{prepend:s.withCtx(()=>[s.renderSlot(p.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(p.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":s.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(s.unref(o)?s.unref(R)(s.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","invalid","show-valid-border"]),l.value?(s.openBlock(),s.createBlock(s.Teleport,{key:0,to:"body"},[s.createElementVNode("div",S1,[s.createElementVNode("div",v1,[s.createVNode(ge,{focused:l.value,invalid:y,"show-valid-border":p.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:s.withCtx(()=>[s.renderSlot(p.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(p.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>{var b,$;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[e.disabled?"text-fm-color-typo-disabled":(b=r.value)!=null&&b.isValid()?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(($=r.value)!=null&&$.isValid()?s.unref(R)(r.value).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["focused","invalid","show-valid-border"]),s.createElementVNode("div",M1,[s.createElementVNode("div",D1,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Yn),b=>(s.openBlock(),s.createElementBlock("div",{key:b,class:"fm-calendar__cell"},s.toDisplayString(b),1))),128))])])]),s.createElementVNode("div",E1,[B1,s.createElementVNode("div",V1,[s.createVNode(g,{ref_key:"scroller",ref:a,class:"h-full no-scrollbar overflow-y-auto w-full",items:s.unref(n),"item-size":null,buffer:200,"key-field":"id","size-field":"height"},{default:s.withCtx(({item:b})=>[s.createElementVNode("div",{id:b.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[s.createElementVNode("div",R1,[s.createElementVNode("div",F1,s.toDisplayString(s.unref(R)(b.id).format("MMMM")),1),s.createElementVNode("div",N1,s.toDisplayString(s.unref(R)(b.id).format("YYYY")),1)])],8,P1),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(b.matrix,($,w)=>(s.openBlock(),s.createElementBlock("div",{key:w,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList($,S=>(s.openBlock(),s.createElementBlock("div",{key:S.date.date(),class:"fm-calendar__cell"},[S.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:0,class:s.normalizeClass(["fm-calendar__cell__button",{"fm-calendar__cell__button--selected":S.date.isSame(r.value),"fm-typo-body-lg-700":S.date.isSame(s.unref(i),"day")}]),type:"button",onClick:()=>d(S.date)},s.toDisplayString(S.date.date()),11,A1)):s.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),s.createElementVNode("div",O1,[I1,s.createElementVNode("div",T1,[s.createVNode(X,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),s.createVNode(X,{label:"Apply",size:"md",variant:"primary",disabled:!r.value,onClick:c},null,8,["disabled"])])])])])):s.createCommentVNode("",!0)]),"helper-text":s.withCtx(()=>[s.renderSlot(p.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"])}}}),[["__scopeId","data-v-32a48831"]]),L1=s.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=Nn(),n=t,o=K(n,"modelValue");return(i,r)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.unref(e).md||s.unref(e).lg?(s.openBlock(),s.createBlock(k1,s.mergeProps({key:0},n,{modelValue:s.unref(o),"onUpdate:modelValue":r[0]||(r[0]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0),s.unref(e).xs||s.unref(e).sm?(s.openBlock(),s.createBlock(xd,s.mergeProps({key:1},n,{modelValue:s.unref(o),"onUpdate:modelValue":r[1]||(r[1]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0)],64))}}),kd=s.defineComponent({__name:"FmMenuDivider",props:{vertical:{type:Boolean,default:!1},inset:{type:Boolean,default:!1}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["border-fm-color-neutral-gray-100 rounded-sm",[e.vertical?"border-l -my-4 mx-4":"border-t -mx-4 my-4",{"my-0":e.inset&&e.vertical,"mx-0":e.inset&&!e.vertical}]])},null,2))}}),z1={class:"cursor-pointer fm-switch__container"},H1={key:0},j1={class:"fm-typo-body-lg-400"},W1={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Y1={class:"fm-switch__input--container"},U1=["checked","value","disabled"],G1={key:1},q1={class:"fm-typo-body-lg-400"},X1={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},ks=J(s.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{default:null},disabled:{type:Boolean,default:!1},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=K(e,"modelValue"),o=()=>{e.disabled||(n.value=!n.value)};return(i,r)=>(s.openBlock(),s.createElementBlock("label",z1,[i.labelPlacement==="left"?(s.openBlock(),s.createElementBlock("div",H1,[s.renderSlot(i.$slots,"label",{},void 0,!0),s.createElementVNode("div",j1,s.toDisplayString(i.label),1),i.sublabel?(s.openBlock(),s.createElementBlock("div",W1,s.toDisplayString(i.sublabel),1)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),s.createElementVNode("div",Y1,[s.createElementVNode("input",{checked:s.unref(n),class:"fm-switch__input--btn",type:"checkbox",value:i.value,disabled:i.disabled,onClick:o},null,8,U1),s.createElementVNode("div",{class:s.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":i.showIcon})},[i.showIcon?(s.openBlock(),s.createBlock(j,{key:0,name:s.unref(n)?"check":"close",size:"sm",color:i.disabled?"#C7C7CC":s.unref(n)?"#1C1C1E":"#FFFFFF"},null,8,["name","color"])):s.createCommentVNode("",!0)],2)]),i.labelPlacement==="right"?(s.openBlock(),s.createElementBlock("div",G1,[s.createElementVNode("div",q1,s.toDisplayString(i.label),1),i.sublabel?(s.openBlock(),s.createElementBlock("div",X1,s.toDisplayString(i.sublabel),1)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-0fcef85e"]]);var pe=(t=>(t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.Custom="custom",t))(pe||{});const Sd=t=>(s.pushScopeId("data-v-85f70ca7"),t=t(),s.popScopeId(),t),K1={key:0,class:"flex gap-4 items-center relative w-full"},Z1={class:"flex flex-col gap-4 w-full"},J1=Sd(()=>s.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),Q1={class:"flex flex-col gap-4 w-full"},e2={key:1,class:"flex flex-col gap-4 w-full"},t2={class:"flex gap-4 p-12"},n2={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},o2={key:0,class:"px-8"},i2={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},s2={class:"flex flex-col gap-24"},r2={key:0,class:"flex gap-4 items-center px-12 w-full"},l2={class:"flex flex-col gap-4 w-full"},a2=Sd(()=>s.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),d2={class:"flex flex-col gap-4 w-full"},c2={class:"flex gap-24"},u2={class:"w-max"},f2={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},h2={class:"flex gap-4 items-center"},p2={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},m2={class:"h-[288px]"},g2={key:0,class:"fm-calendar__cell__button--today"},y2=["onClick","onMouseover"],b2={class:"w-max"},$2={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},_2={class:"flex gap-4 items-center"},w2={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},C2={key:0,class:"fm-calendar__cell__button--today"},x2=["onClick","onMouseover"],k2={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},S2=J(s.defineComponent({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var N,P;const e=[{id:pe.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{d.value=pe.PrecedingPeriod;const C=r.value;if(C[0].startDate&&C[0].endDate){const _=C[0].startDate.diff(C[0].endDate,"day");C[1]={startDate:C[0].startDate.subtract(+(1-_),"day"),endDate:C[0].startDate.subtract(1,"day")}}}},{id:pe.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{d.value=pe.PrecedingWeek;const C=r.value;if(C[0].startDate&&C[0].endDate){let _=C[0].endDate.diff(C[0].startDate,"week");_===0&&(_+=1),C[1]={startDate:C[0].startDate.subtract(_,"week"),endDate:C[0].endDate.subtract(_,"week")}}}},{id:pe.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{d.value=pe.PrecedingMonth;const C=r.value;if(C[0].startDate&&C[0].endDate){let _=C[0].endDate.diff(C[0].startDate,"month");_===0&&(_+=1),C[1]={startDate:C[0].startDate.subtract(_,"month"),endDate:C[0].endDate.subtract(_,"month")}}}},{id:pe.Custom,label:"Custom",sublabel:"",action:()=>{d.value=pe.Custom}}],n=t,o=R(),i=K(n,"modelValue"),r=s.ref([{startDate:(N=i.value)!=null&&N.startDate?R(i.value.startDate,A):null,endDate:(P=i.value)!=null&&P.endDate?R(i.value.endDate,A):null},{startDate:null,endDate:null}]),l=s.ref(!1),a=s.ref(!1),d=s.ref(""),c=s.ref(R().startOf("month")),u=s.ref(R().startOf("month").add(1,"month")),f=s.ref(""),h=s.ref(null);let p=0;const m=C=>{var _;if(f.value="",r.value[p].startDate&&r.value[p].endDate){p===1&&(r.value=r.value.map(()=>({startDate:null,endDate:null})),p=0),r.value[0]={startDate:C,endDate:null};return}else if(!r.value[p].startDate&&!r.value[p].endDate)r.value[p].startDate=C;else{if(C.isBefore(r.value[p].startDate)){const E=r.value[p].startDate;r.value[p]={startDate:C,endDate:E}}else r.value[p].endDate=C;a.value&&(p=1),e.find(E=>E.id===d.value)||(d.value=pe.Custom)}(_=e.find(E=>E.id===d.value))==null||_.action()},g=()=>{a.value?i.value=r.value.map(C=>({startDate:C.startDate.format(A),endDate:C.endDate.format(A)})):i.value={startDate:r.value[0].startDate.format(A),endDate:r.value[0].endDate.format(A)},setTimeout(()=>{l.value=!1})},y=()=>{var C,_;Array.isArray(i.value)?r.value=i.value:r.value[0]={startDate:(C=i.value)!=null&&C.startDate?R(i.value.startDate,A):null,endDate:(_=i.value)!=null&&_.endDate?R(i.value.endDate,A):null},l.value=!1},b=(C,_)=>{C==="left"?(c.value=_,u.value=_.add(1,"month")):C==="right"&&(u.value=_,c.value=_.subtract(1,"month"))},$=C=>{const _=r.value[0].startDate,E=r.value[0].endDate,v=r.value[1].startDate,M=r.value[1].endDate,k=h.value,B=_==null?void 0:_.isSame(C),O=E==null?void 0:E.isSame(C),L=v==null?void 0:v.isSame(C),T=M==null?void 0:M.isSame(C),W=k==null?void 0:k.isSame(C),U=B&&E&&!(B&&O)||_&&!E&&B&&(k==null?void 0:k.isAfter(_))||_&&!E&&W&&(k==null?void 0:k.isBefore(_)),G=L&&M&&!(L&&T)||v&&!M&&L&&(k==null?void 0:k.isAfter(v))||v&&!M&&W&&(k==null?void 0:k.isBefore(v)),Q=O&&_&&!(B&&O)||_&&!E&&B&&(k==null?void 0:k.isBefore(_))||_&&!E&&W&&(k==null?void 0:k.isAfter(_)),le=T&&v&&!(L&&T)||v&&!M&&L&&(k==null?void 0:k.isBefore(v))||v&&!M&&W&&(k==null?void 0:k.isAfter(v)),fe=B&&O||B&&!E,Fe=L&&T||L&&!M,je=_&&(E||k)&&E?C.isAfter(_)&&C.isBefore(E):C.isAfter(k)&&C.isBefore(_)||C.isBefore(k)&&C.isAfter(_),Ne=v&&(M||k)&&M?C.isAfter(v)&&C.isBefore(M):C.isAfter(k)&&C.isBefore(v)||C.isBefore(k)&&C.isAfter(v),te=(xe,ke,We)=>xe&&ke&&We?xe.isAfter(ke,"day")&&xe.isBefore(We,"day"):!1,re=()=>{if(r.value.filter(ke=>{var We;for(const jt in ke)if((We=ke[jt])!=null&&We.isSame(C,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(B&&O&&(te(C,v,M)||te(C,v,k)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(L&&T&&(te(C,_,E)||te(C,_,k)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(U||Q)return te(C,v,M)||te(C,v,k)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(G||le)return te(C,_,E)||te(C,_,k)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(fe)return"bg-fm-color-primary";if(Fe)return"bg-fm-color-system-info-300";if(te(C,_,E)&&(te(C,v,M)||te(C,v,k)))return"bg-fm-color-system-success-100";if(je)return"bg-fm-color-system-warning-100";if(Ne)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${re()}`]:U||G,[`fm-calendar__cell__button--selected-end ${re()}`]:Q||le,[`fm-calendar__cell__button--selected-between ${re()}`]:je||Ne,[`fm-calendar__cell__button--selected ${re()}`]:fe||Fe}},w=C=>{const _=r.value;if(_[0].startDate&&!_[0].endDate||_[1].startDate&&!_[1].endDate){h.value=C;return}h.value=null},S=C=>{f.value=C.label,r.value[0]={startDate:R(C.value.startDate,A),endDate:R(C.value.endDate,A)}},x=s.computed(()=>a.value?!r.value.every(C=>C.startDate&&C.endDate):!(r.value[0].startDate&&r.value[0].endDate)),V=C=>{d.value="",a.value=C,r.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),p=0},D=s.computed(()=>{if(!i.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const C=a.value&&Array.isArray(i.value)?i.value[0].startDate:i.value.startDate,_=a.value&&Array.isArray(i.value)?i.value[0].endDate:i.value.endDate;return{startDate:C?R(C).format("D MMM YYYY"):"DD MM YYYY",endDate:_?R(_).format("D MMM YYYY"):"DD MM YYYY"}}),F=s.computed(()=>{const C=a.value&&Array.isArray(i.value)?i.value[1].startDate:null,_=a.value&&Array.isArray(i.value)?i.value[1].endDate:null;return C&&_?`Compared: ${R(C).format("D MMM YYYY")} - ${R(_).format("D MMM YYYY")}`:""});return s.watch(()=>i.value,()=>{var C,_;a.value?r.value=i.value.map(E=>({startDate:E!=null&&E.startDate?R(E.startDate,A):null,endDate:E!=null&&E.endDate?R(E.endDate,A):null})):r.value[0]={startDate:(C=i.value)!=null&&C.startDate?R(i.value.startDate,A):null,endDate:(_=i.value)!=null&&_.endDate?R(i.value.endDate,A):null}}),(C,_)=>(s.openBlock(),s.createBlock(Pe,{modelValue:s.unref(i),"onUpdate:modelValue":_[8]||(_[8]=E=>s.isRef(i)?i.value=E:null),disabled:C.disabled,rules:C.rules,focused:l.value,"helper-text":a.value?F.value:C.helperText,"helper-state":C.helperState,tag:"div"},{default:s.withCtx(({invalid:E})=>[s.createVNode(Cs,{"show-popover":l.value,disabled:C.disabled,onPopoverChanged:_[7]||(_[7]=v=>l.value=v)},{"popover-button":s.withCtx(()=>[C.compare?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",K1,[s.createElementVNode("label",Z1,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(n.startLabel),3),s.createVNode(ge,{class:s.normalizeClass(C.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:E,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":!l.value},{prepend:s.withCtx(()=>[s.renderSlot(C.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(C.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>{var v,M;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":(v=s.unref(i))!=null&&v.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((M=s.unref(i))!=null&&M.startDate?s.unref(R)(s.unref(i).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","invalid","show-valid-border","icon-outlined"])]),J1,s.createElementVNode("label",Q1,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(n.endLabel),3),s.createVNode(ge,{class:s.normalizeClass(C.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:E,"show-valid-border":C.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":!l.value},{prepend:s.withCtx(()=>[s.renderSlot(C.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(C.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>{var v,M;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":(v=s.unref(i))!=null&&v.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((M=s.unref(i))!=null&&M.endDate?s.unref(R)(s.unref(i).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","invalid","show-valid-border","icon-outlined"])])])),C.compare?(s.openBlock(),s.createElementBlock("label",e2,[s.createVNode(en,{label:C.compareLabel},null,8,["label"]),s.createVNode(ge,{class:s.normalizeClass(C.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:E,"show-valid-border":C.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(C.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot(C.$slots,"append",{},void 0,!0)]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":D.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(D.value.startDate)+" - "+s.toDisplayString(D.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):s.createCommentVNode("",!0)]),default:s.withCtx(()=>[s.createElementVNode("div",t2,[C.showPredefinedRange?(s.openBlock(),s.createElementBlock("div",n2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(C.predefinedRange,(v,M)=>(s.openBlock(),s.createBlock(Me,{key:M,label:v.label,"model-value":f.value===v.label,selectable:"",onClick:k=>S(v)},null,8,["label","model-value","onClick"]))),128)),C.compare&&C.predefinedRange?(s.openBlock(),s.createElementBlock("div",o2,[s.createVNode(kd,{inset:""})])):s.createCommentVNode("",!0),C.compare?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode(ks,{"model-value":a.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":_[0]||(_[0]=v=>V(v))},null,8,["model-value"]),a.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},s.renderList(e,(v,M)=>s.createVNode(Me,{key:M,label:v.label,sublabel:v.sublabel,"model-value":d.value===v.id,selectable:"",onClick:k=>v.action()},null,8,["label","sublabel","model-value","onClick"])),64)):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0)])):s.createCommentVNode("",!0),C.showPredefinedRange?(s.openBlock(),s.createElementBlock("div",i2)):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass({"pl-4":C.showPredefinedRange})},[s.createElementVNode("div",s2,[a.value?(s.openBlock(),s.createElementBlock("div",r2,[s.createElementVNode("label",l2,[s.createVNode(en,{label:"Custom"}),s.createVNode(ge,{focused:!1},{default:s.withCtx(()=>{var v,M;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[(v=r.value[0])!=null&&v.startDate&&((M=r.value[0])!=null&&M.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(r.value[0].startDate!==null?r.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+s.toDisplayString(r.value[0].endDate!==null?r.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),a2,s.createElementVNode("label",d2,[s.createVNode(en,{label:"Compare"}),s.createVNode(ge,{focused:!1},{default:s.withCtx(()=>{var v,M;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[(v=r.value[1])!=null&&v.startDate&&((M=r.value[1])!=null&&M.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(r.value[1].startDate!==null?r.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+s.toDisplayString(r.value[1].endDate!==null?r.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):s.createCommentVNode("",!0),s.createElementVNode("div",c2,[s.createElementVNode("div",u2,[s.createElementVNode("div",f2,[s.createElementVNode("div",h2,[s.createVNode(j,{class:"cursor-pointer select-none",name:"chevron_left",outline:!1,color:"#1C1C1E",onClick:_[1]||(_[1]=()=>b("left",c.value.subtract(1,"month")))}),s.createVNode(tn,{min:C.min,max:C.max,picker:"month","model-value":c.value,"onUpdate:modelValue":_[2]||(_[2]=v=>b("left",v))},null,8,["min","max","model-value"]),s.createVNode(tn,{min:C.min,max:C.max,picker:"year","model-value":c.value,"onUpdate:modelValue":_[3]||(_[3]=v=>b("left",v))},null,8,["min","max","model-value"])])]),s.createElementVNode("div",null,[s.createElementVNode("div",p2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Yn),v=>(s.openBlock(),s.createElementBlock("div",{key:v,class:"fm-calendar__cell"},s.toDisplayString(v),1))),128))]),s.createElementVNode("div",m2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(xs)(c.value),(v,M)=>(s.openBlock(),s.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(v,k=>(s.openBlock(),s.createElementBlock("div",{key:k.date.date(),class:"fm-calendar__cell"},[k.date.isSame(s.unref(o),"day")&&k.isCurrentMonth?(s.openBlock(),s.createElementBlock("div",g2)):s.createCommentVNode("",!0),k.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:1,class:s.normalizeClass(["fm-calendar__cell__button",[$(k.date),{"fm-typo-body-lg-700":k.date.isSame(s.unref(o),"day")}]]),type:"button",onClick:()=>m(k.date),onMouseover:B=>w(k.date)},s.toDisplayString(k.date.date()),43,y2)):s.createCommentVNode("",!0)]))),128))]))),128))])])]),s.createElementVNode("div",b2,[s.createElementVNode("div",$2,[s.createElementVNode("div",_2,[s.createVNode(tn,{min:C.min,max:C.max,picker:"month","model-value":u.value,"onUpdate:modelValue":_[4]||(_[4]=v=>b("right",v))},null,8,["min","max","model-value"]),s.createVNode(tn,{min:C.min,max:C.max,picker:"year","model-value":u.value,"onUpdate:modelValue":_[5]||(_[5]=v=>b("right",v))},null,8,["min","max","model-value"])]),s.createVNode(j,{class:"cursor-pointer select-none",name:"chevron_right",outline:!1,color:"#1C1C1E",onClick:_[6]||(_[6]=()=>b("left",c.value.add(1,"month")))})]),s.createElementVNode("div",null,[s.createElementVNode("div",w2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Yn),v=>(s.openBlock(),s.createElementBlock("div",{key:v,class:"fm-calendar__cell"},s.toDisplayString(v),1))),128))]),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(xs)(u.value),(v,M)=>(s.openBlock(),s.createElementBlock("div",{key:M,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(v,k=>(s.openBlock(),s.createElementBlock("div",{key:k.date.date(),class:"fm-calendar__cell"},[k.date.isSame(s.unref(o),"day")&&k.isCurrentMonth?(s.openBlock(),s.createElementBlock("div",C2)):s.createCommentVNode("",!0),k.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:1,class:s.normalizeClass(["fm-calendar__cell__button",[$(k.date),{"fm-typo-body-lg-700":k.date.isSame(s.unref(o),"day")}]]),type:"button",onClick:()=>m(k.date),onMouseover:B=>w(k.date)},s.toDisplayString(k.date.date()),43,x2)):s.createCommentVNode("",!0)]))),128))]))),128))])])])])]),s.createElementVNode("div",k2,[s.createVNode(X,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),s.createVNode(X,{label:"Apply",size:"md",variant:"primary",disabled:x.value,onClick:g},null,8,["disabled"])])],2)])]),_:2},1032,["show-popover","disabled"])]),"helper-text":s.withCtx(()=>[s.renderSlot(C.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-85f70ca7"]]),v2={class:"flex flex-col gap-4"},M2={class:"flex flex-col gap-4 justify-center"},Wo=J(s.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{default:"Select item"},showValidBorder:{type:Boolean,default:!1},maxHeight:{default:408},width:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","dropdown-changed"],setup(t,{emit:e}){const n=t,o=e,i=K(n,"modelValue"),r=s.ref(!1),l=(h,p)=>{if(n.multiselect){let m=[];h?m=i.value.length===0?[p]:n.items.filter(g=>i.value.some(y=>_e(g.value,y)||_e(g.value,p.value))):m=n.items.filter(g=>i.value.some(y=>_e(g.value,y)&&!_e(g.value,p.value))),i.value=m.map(g=>g.value)}else i.value=p.value,setTimeout(()=>{r.value=!1},0)},a=h=>{const p=[...i.value].filter((m,g)=>g!==h);i.value=p},d=s.computed(()=>n.multiselect?n.items.filter(h=>s.toRaw(i.value).some(p=>_e(p,h.value))):n.items.filter(h=>_e(i.value,h.value))),c=s.computed(()=>n.items.filter(h=>i.value.some(p=>_e(h.value,p))).map(h=>({label:h.label}))),u=s.computed(()=>{var h;return n.multiselect?n.placeholder:((h=n.items.find(p=>_e(p.value,i.value)))==null?void 0:h.label)??n.placeholder}),f=s.computed(()=>n.multiselect?i.value.length!==0:n.items.some(h=>_e(h.value,i.value)));return(h,p)=>(s.openBlock(),s.createElementBlock("div",v2,[s.createVNode(Pe,{modelValue:s.unref(i),"onUpdate:modelValue":p[1]||(p[1]=m=>s.isRef(i)?i.value=m:null),label:h.label,disabled:h.disabled,required:h.labelMark==="required",optional:h.labelMark==="optional",info:h.labelInfo,rules:h.rules,focused:r.value,"helper-text":h.helperText,"helper-state":h.helperState},s.createSlots({default:s.withCtx(({invalid:m})=>[s.createVNode(at,{"show-menu":r.value,disabled:h.disabled,placement:h.placement,"close-on-click":!h.multiselect,onMenuChanged:p[0]||(p[0]=g=>{r.value=g,o("dropdown-changed",r.value)})},{"menu-button":s.withCtx(()=>[s.createVNode(ge,{class:s.normalizeClass(h.disabled?"cursor-not-allowed":"cursor-pointer"),focused:r.value,invalid:m,"show-valid-border":h.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.createVNode(j,{name:r.value?"expand_less":"expand_more",size:"md",color:h.disabled?"#C7C7CC":"black"},null,8,["name","color"])]),default:s.withCtx(()=>[s.renderSlot(h.$slots,"default",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[n.disabled?"text-fm-color-typo-disabled":f.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(u.value),3)],!0)]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":s.withCtx(()=>[s.createElementVNode("div",{class:"fm-select__menu__wrapper",style:s.normalizeStyle({"max-height":`${h.maxHeight}px`,width:`${h.width}px`})},[s.renderSlot(h.$slots,"menu-wrapper",{handleItemChange:(g,y)=>l(g,y)},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.items,g=>(s.openBlock(),s.createBlock(Me,{key:g.value,"has-checkbox":h.multiselect,label:g.label,value:g.value,"model-value":d.value.some(y=>s.unref(_e)(y.value,g.value)),"onUpdate:modelValue":y=>l(y,g)},null,8,["has-checkbox","label","value","model-value","onUpdate:modelValue"]))),128))],!0)],4)]),_:2},1032,["show-menu","disabled","placement","close-on-click"])]),_:2},[h.label||h.$slots.label?{name:"label",fn:s.withCtx(()=>[s.renderSlot(h.$slots,"label",{},void 0,!0)]),key:"0"}:void 0,h.helperText||h.$slots["helper-text"]?{name:"helper-text",fn:s.withCtx(()=>[s.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),key:"1"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]),s.createElementVNode("div",M2,[h.multiselect&&d.value.length>0?(s.openBlock(),s.createBlock(_i,{key:0,items:c.value,removable:"",disabled:h.disabled,onChipClosed:a},null,8,["items","disabled"])):s.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-3ea6d291"]]),D2={key:0,class:"flex gap-4 items-center relative w-full"},E2={class:"flex flex-col gap-4 w-full"},B2=s.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),V2={class:"flex flex-col gap-4 w-full"},P2={key:1,class:"flex flex-col gap-4 w-full"},Ss=s.defineComponent({__name:"FmDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=s.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?R(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?R(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(s.openBlock(),s.createElementBlock("div",null,[o.analytic?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("div",D2,[s.createElementVNode("label",E2,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(o.startLabel),3),s.createVNode(ge,{class:s.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:s.withCtx(()=>[s.renderSlot(o.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(o.$slots,"append")]),default:s.withCtx(()=>{var r,l;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(r=o.modelValue)!=null&&r.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((l=o.modelValue)!=null&&l.startDate?s.unref(R)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border"])]),B2,s.createElementVNode("label",V2,[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},s.toDisplayString(o.endLabel),3),s.createVNode(ge,{class:s.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:s.withCtx(()=>[s.renderSlot(o.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(o.$slots,"append")]),default:s.withCtx(()=>{var r,l;return[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(r=o.modelValue)!=null&&r.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString((l=o.modelValue)!=null&&l.endDate?s.unref(R)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border"])])])),o.analytic?(s.openBlock(),s.createElementBlock("label",P2,[s.createVNode(en,{label:o.compareLabel},null,8,["label"]),s.createVNode(ge,{class:s.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:s.withCtx(()=>[s.renderSlot(o.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(o.$slots,"append")]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},s.toDisplayString(n.value.startDate)+" - "+s.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):s.createCommentVNode("",!0)]))}}),vd=t=>(s.pushScopeId("data-v-eed99d1e"),t=t(),s.popScopeId(),t),R2={class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},F2={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},N2={class:"flex items-center justify-center"},A2={class:"flex fm-typo-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},O2={class:"flex h-[calc(100%-172px)] justify-center relative w-full"},I2=vd(()=>s.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),T2={id:"wrapper",class:"h-full relative w-[336px]"},L2=["id"],z2={class:"flex gap-4 items-center"},H2={class:"fm-typo-body-lg-700"},j2={class:"fm-typo-body-lg-700"},W2=["onClick","onMouseover"],Y2={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},U2=vd(()=>s.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),G2={class:"flex gap-8 items-center justify-end w-full"},Md=J(s.defineComponent({__name:"FmDateRangePickerMobile",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var P,C;const e=s.ref(),n=[{id:pe.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{u.value=pe.PrecedingPeriod;const _=a.value;if(_[0].startDate&&_[0].endDate){const E=_[0].startDate.diff(_[0].endDate,"day");_[1]={startDate:_[0].startDate.subtract(+(1-E),"day"),endDate:_[0].startDate.subtract(1,"day")}}}},{id:pe.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{u.value=pe.PrecedingWeek;const _=a.value;if(_[0].startDate&&_[0].endDate){let E=_[0].endDate.diff(_[0].startDate,"week");E===0&&(E+=1),_[1]={startDate:_[0].startDate.subtract(E,"week"),endDate:_[0].endDate.subtract(E,"week")}}}},{id:pe.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{u.value=pe.PrecedingMonth;const _=a.value;if(_[0].startDate&&_[0].endDate){let E=_[0].endDate.diff(_[0].startDate,"month");E===0&&(E+=1),_[1]={startDate:_[0].startDate.subtract(E,"month"),endDate:_[0].endDate.subtract(E,"month")}}}},{id:pe.Custom,label:"Custom",sublabel:"",action:()=>{u.value=pe.Custom}}],o=t,i=wd(o.min,o.max),r=R(),l=K(o,"modelValue"),a=s.ref([{startDate:(P=l.value)!=null&&P.startDate?R(l.value.startDate,A):null,endDate:(C=l.value)!=null&&C.endDate?R(l.value.endDate,A):null},{startDate:null,endDate:null}]),d=s.ref(!1),c=s.ref(!1),u=s.ref(""),f=s.ref(""),h=s.ref(null);let p=0;const m=_=>{var E;if(f.value="",a.value[p].startDate&&a.value[p].endDate){p===1&&(a.value=a.value.map(()=>({startDate:null,endDate:null})),p=0),a.value[0]={startDate:_,endDate:null};return}else if(!a.value[p].startDate&&!a.value[p].endDate)a.value[p].startDate=_;else{if(_.isBefore(a.value[p].startDate)){const v=a.value[p].startDate;a.value[p]={startDate:_,endDate:v}}else a.value[p].endDate=_;c.value&&(p=1),n.find(v=>v.id===u.value)||(u.value=pe.Custom)}(E=n.find(v=>v.id===u.value))==null||E.action()},g=()=>{c.value?l.value=a.value.map(_=>({startDate:_.startDate.format(A),endDate:_.endDate.format(A)})):l.value={startDate:a.value[0].startDate.format(A),endDate:a.value[0].endDate.format(A)},setTimeout(()=>{d.value=!1})},y=()=>{var _,E;Array.isArray(l.value)?a.value=l.value:a.value[0]={startDate:(_=l.value)!=null&&_.startDate?R(l.value.startDate,A):null,endDate:(E=l.value)!=null&&E.endDate?R(l.value.endDate,A):null},d.value=!1},b=_=>{const E=a.value[0].startDate,v=a.value[0].endDate,M=a.value[1].startDate,k=a.value[1].endDate,B=h.value,O=E==null?void 0:E.isSame(_),L=v==null?void 0:v.isSame(_),T=M==null?void 0:M.isSame(_),W=k==null?void 0:k.isSame(_),U=B==null?void 0:B.isSame(_),G=O&&v&&!(O&&L)||E&&!v&&O&&(B==null?void 0:B.isAfter(E))||E&&!v&&U&&(B==null?void 0:B.isBefore(E)),Q=T&&k&&!(T&&W)||M&&!k&&T&&(B==null?void 0:B.isAfter(M))||M&&!k&&U&&(B==null?void 0:B.isBefore(M)),le=L&&E&&!(O&&L)||E&&!v&&O&&(B==null?void 0:B.isBefore(E))||E&&!v&&U&&(B==null?void 0:B.isAfter(E)),fe=W&&M&&!(T&&W)||M&&!k&&T&&(B==null?void 0:B.isBefore(M))||M&&!k&&U&&(B==null?void 0:B.isAfter(M)),Fe=O&&L||O&&!v,je=T&&W||T&&!k,Ne=E&&(v||B)&&v?_.isAfter(E)&&_.isBefore(v):_.isAfter(B)&&_.isBefore(E)||_.isBefore(B)&&_.isAfter(E),te=M&&(k||B)&&k?_.isAfter(M)&&_.isBefore(k):_.isAfter(B)&&_.isBefore(M)||_.isBefore(B)&&_.isAfter(M),re=(ke,We,jt)=>ke&&We&&jt?ke.isAfter(We,"day")&&ke.isBefore(jt,"day"):!1,xe=()=>{if(a.value.filter(We=>{var jt;for(const G_ in We)if((jt=We[G_])!=null&&jt.isSame(_,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(O&&L&&(re(_,M,k)||re(_,M,B)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(T&&W&&(re(_,E,v)||re(_,E,B)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(G||le)return re(_,M,k)||re(_,M,B)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(Q||fe)return re(_,E,v)||re(_,E,B)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(Fe)return"bg-fm-color-primary";if(je)return"bg-fm-color-system-info-300";if(re(_,E,v)&&(re(_,M,k)||re(_,M,B)))return"bg-fm-color-system-success-100";if(Ne)return"bg-fm-color-system-warning-100";if(te)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${xe()}`]:G||Q,[`fm-calendar__cell__button--selected-end ${xe()}`]:le||fe,[`fm-calendar__cell__button--selected-between ${xe()}`]:Ne||te,[`fm-calendar__cell__button--selected ${xe()}`]:Fe||je}},$=_=>{const E=a.value;if(E[0].startDate&&!E[0].endDate||E[1].startDate&&!E[1].endDate){h.value=_;return}h.value=null},w=_=>{a.value[0]={startDate:R(_.startDate,A),endDate:R(_.endDate,A)}},S=_=>{const E=n.find(v=>v.id===_);E==null||E.action()},x=s.computed(()=>c.value?!a.value.every(_=>_.startDate&&_.endDate):!(a.value[0].startDate&&a.value[0].endDate)),V=_=>{u.value="",c.value=_,a.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),p=0},D=s.computed(()=>{const _=c.value&&Array.isArray(l.value)?l.value[1].startDate:null,E=c.value&&Array.isArray(l.value)?l.value[1].endDate:null;return _&&E?`Compared: ${R(_).format("D MMM YYYY")} - ${R(E).format("D MMM YYYY")}`:""}),F=()=>{d.value=!0,setTimeout(()=>{e.value.scrollToItem(N(r.startOf("month")))},0)},N=_=>i.findIndex(E=>E.id===_.startOf("month").format(A));return s.watch(()=>l.value,()=>{var _,E;c.value?a.value=l.value.map(v=>({startDate:v!=null&&v.startDate?R(v.startDate,A):null,endDate:v!=null&&v.endDate?R(v.endDate,A):null})):a.value[0]={startDate:(_=l.value)!=null&&_.startDate?R(l.value.startDate,A):null,endDate:(E=l.value)!=null&&E.endDate?R(l.value.endDate,A):null}}),(_,E)=>{const v=s.resolveComponent("RecycleScroller");return s.openBlock(),s.createBlock(Pe,{modelValue:s.unref(l),"onUpdate:modelValue":E[3]||(E[3]=M=>s.isRef(l)?l.value=M:null),disabled:_.disabled,rules:_.rules,focused:d.value,"helper-text":c.value?D.value:_.helperText,"helper-state":_.helperState,tag:"div"},{default:s.withCtx(({invalid:M})=>{var k,B,O,L;return[s.createVNode(Ss,{"model-value":s.unref(l),analytic:_.compare,disabled:_.disabled,invalid:M,focused:d.value,"show-valid-border":_.showValidBorder,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":_.compareLabel,onClick:F},null,8,["model-value","analytic","disabled","invalid","focused","show-valid-border","is-comparing","start-label","end-label","compare-label"]),d.value?(s.openBlock(),s.createBlock(s.Teleport,{key:0,to:"body"},[s.createElementVNode("div",R2,[s.createElementVNode("div",F2,[_.showPredefinedRange?(s.openBlock(),s.createBlock(Wo,{key:0,items:_.predefinedRange,"model-value":f.value,"onUpdate:modelValue":E[0]||(E[0]=T=>w(T))},null,8,["items","model-value"])):s.createCommentVNode("",!0),s.createVNode(Ss,{"model-value":{startDate:((k=a.value[0].startDate)==null?void 0:k.format(s.unref(A)))??null,endDate:((B=a.value[0].endDate)==null?void 0:B.format(s.unref(A)))??null},analytic:_.compare,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":_.compareLabel},null,8,["model-value","analytic","is-comparing","start-label","end-label","compare-label"]),_.compare?(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode(ks,{"model-value":c.value,"label-placement":"right",label:"Compare","onUpdate:modelValue":E[1]||(E[1]=T=>V(T))},null,8,["model-value"]),c.value&&_.compare?(s.openBlock(),s.createBlock(Wo,{key:0,items:n.map(T=>({label:T.label,sublabel:T.sublabel,value:T.id})),"model-value":u.value,"onUpdate:modelValue":E[2]||(E[2]=T=>S(T))},null,8,["items","model-value"])):s.createCommentVNode("",!0),c.value&&_.compare?(s.openBlock(),s.createBlock(Ss,{key:1,"model-value":{startDate:((O=a.value[1].startDate)==null?void 0:O.format(s.unref(A)))??null,endDate:((L=a.value[1].endDate)==null?void 0:L.format(s.unref(A)))??null},analytic:_.compare,"is-comparing":c.value,"start-label":_.startLabel,"end-label":_.endLabel,"compare-label":"Compare: Custom"},null,8,["model-value","analytic","is-comparing","start-label","end-label"])):s.createCommentVNode("",!0)],64)):s.createCommentVNode("",!0),s.createElementVNode("div",N2,[s.createElementVNode("div",A2,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Yn),T=>(s.openBlock(),s.createElementBlock("div",{key:T,class:"fm-calendar__cell"},s.toDisplayString(T),1))),128))])])]),s.createElementVNode("div",O2,[I2,s.createElementVNode("div",T2,[s.createVNode(v,{ref_key:"scroller",ref:e,class:"h-full no-scrollbar overflow-y-auto w-full",items:s.unref(i),"item-size":null,buffer:200,"key-field":"id","size-field":"height"},{default:s.withCtx(({item:T})=>[s.createElementVNode("div",{id:T.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[s.createElementVNode("div",z2,[s.createElementVNode("div",H2,s.toDisplayString(s.unref(R)(T.id).format("MMMM")),1),s.createElementVNode("div",j2,s.toDisplayString(s.unref(R)(T.id).format("YYYY")),1)])],8,L2),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(T.matrix,(W,U)=>(s.openBlock(),s.createElementBlock("div",{key:U,class:"fm-calendar__row fm-typo-body-lg-400"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(W,G=>(s.openBlock(),s.createElementBlock("div",{key:G.date.date(),class:"fm-calendar__cell"},[G.isCurrentMonth?(s.openBlock(),s.createElementBlock("button",{key:0,class:s.normalizeClass(["fm-calendar__cell__button",[b(G.date),{"fm-typo-body-lg-700":G.date.isSame(s.unref(r),"day")}]]),type:"button",onClick:()=>m(G.date),onMouseover:Q=>$(G.date)},s.toDisplayString(G.date.date()),43,W2)):s.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),s.createElementVNode("div",Y2,[U2,s.createElementVNode("div",G2,[s.createVNode(X,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),s.createVNode(X,{label:"Apply",size:"md",variant:"primary",disabled:x.value,onClick:g},null,8,["disabled"])])])])])):s.createCommentVNode("",!0)]}),"helper-text":s.withCtx(()=>[s.renderSlot(_.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","rules","focused","helper-text","helper-state"])}}}),[["__scopeId","data-v-eed99d1e"]]),q2=s.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,{breakpoints:n}=Nn(),o=K(e,"modelValue");return(i,r)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.unref(n).md||s.unref(n).lg?(s.openBlock(),s.createBlock(S2,s.mergeProps({key:0},e,{modelValue:s.unref(o),"onUpdate:modelValue":r[0]||(r[0]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0),s.unref(n).xs||s.unref(n).sm?(s.openBlock(),s.createBlock(Md,s.mergeProps({key:1},e,{modelValue:s.unref(o),"onUpdate:modelValue":r[1]||(r[1]=l=>s.isRef(o)?o.value=l:null)}),null,16,["modelValue"])):s.createCommentVNode("",!0)],64))}}),X2=s.defineComponent({__name:"FmForm",emits:["validation-reset","validation-success","validation-failed","reset"],setup(t,{expose:e,emit:n}){const o=s.ref([]),i=s.ref(0),r=n,l=()=>{let c=[];for(let u=0;u<o.value.length;u++){const f=o.value[u];c=[...c,...f.validate()]}c.length?r("validation-failed",c):r("validation-success")},a=()=>{for(let c=0;c<o.value.length;c++)o.value[c].resetValue();r("reset")};return e({validateInputs:l,resetInputsValidation:()=>{for(let c=0;c<o.value.length;c++)o.value[c].resetValidation();r("validation-reset")},resetInputs:a}),s.provide(wr,{register({validate:c,resetValidation:u,resetValue:f}){return o.value.push({componentId:i.value,validate:c,resetValidation:u,resetValue:f}),i.value++},unregister(c){o.value.filter(u=>u.componentId!==c)}}),(c,u)=>(s.openBlock(),s.createElementBlock("form",{onSubmit:s.withModifiers(l,["prevent"]),onReset:s.withModifiers(a,["prevent"])},[s.renderSlot(c.$slots,"default")],32))}}),K2={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","[27]\\d{6,7}|[34]\\d{5,7}|63\\d{6}|(?:5|8\\d\\d)\\d{7}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:[0-5]\\d\\d|69[7-9]|70[0-79])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(8-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"8 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(8-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(8-$1)",1]],"8",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:22|44|7[27]|87|99)[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-8])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[047]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","[1-6]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["6"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-3]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[237-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[149]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","[23]\\d{7,8}|(?:4\\d\\d|[89]00)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[23]"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function Dd(t,e){var n=Array.prototype.slice.call(e);return n.push(K2),t.apply(this,n)}function vs(t){"@babel/helpers - typeof";return vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vs(t)}function Ed(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Z2(t,e,n){return e&&Ed(t.prototype,e),n&&Ed(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function J2(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q2(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Un(t,e)}function ey(t){var e=Vd();return function(){var o=Gn(t),i;if(e){var r=Gn(this).constructor;i=Reflect.construct(o,arguments,r)}else i=o.apply(this,arguments);return ty(this,i)}}function ty(t,e){if(e&&(vs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bd(t)}function Bd(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ms(t){var e=typeof Map=="function"?new Map:void 0;return Ms=function(o){if(o===null||!ny(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(o))return e.get(o);e.set(o,i)}function i(){return Yo(o,arguments,Gn(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Un(i,o)},Ms(t)}function Yo(t,e,n){return Vd()?Yo=Reflect.construct:Yo=function(i,r,l){var a=[null];a.push.apply(a,r);var d=Function.bind.apply(i,a),c=new d;return l&&Un(c,l.prototype),c},Yo.apply(null,arguments)}function Vd(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ny(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Un(t,e){return Un=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},Un(t,e)}function Gn(t){return Gn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Gn(t)}var dt=function(t){Q2(n,t);var e=ey(n);function n(o){var i;return J2(this,n),i=e.call(this,o),Object.setPrototypeOf(Bd(i),n.prototype),i.name=i.constructor.name,i}return Z2(n)}(Ms(Error)),Ds=2,oy=17,iy=3,ze="0-90-9٠-٩۰-۹",sy="-‐-―−ー-",ry="//",ly="..",ay="  ­​⁠ ",dy="()()[]\\[\\]",cy="~⁓∼~",Uo="".concat(sy).concat(ry).concat(ly).concat(ay).concat(dy).concat(cy),Es="++";function Pd(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),i=0;i<3;i++){var r=Number(n[i]),l=Number(o[i]);if(r>l)return 1;if(l>r)return-1;if(!isNaN(r)&&isNaN(l))return 1;if(isNaN(r)&&!isNaN(l))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var uy={}.constructor;function Go(t){return t!=null&&t.constructor===uy}function Bs(t){"@babel/helpers - typeof";return Bs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bs(t)}function qo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Xo(t,e,n){return e&&Rd(t.prototype,e),n&&Rd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var fy="1.2.0",hy="1.7.35",Fd=" ext. ",py=/^\d+$/,Ce=function(){function t(e){qo(this,t),by(e),this.metadata=e,Od.call(this,e)}return Xo(t,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(n){return n!=="001"})}},{key:"getCountryMetadata",value:function(n){return this.metadata.countries[n]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(n){return this.getCountryMetadata(n)!==void 0}},{key:"hasCallingCode",value:function(n){if(this.getCountryCodesForCallingCode(n))return!0;if(this.nonGeographic()){if(this.nonGeographic()[n])return!0}else{var o=this.countryCallingCodes()[n];if(o&&o.length===1&&o[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(n){return this.nonGeographic()?!!this.nonGeographic()[n]:!this.getCountryCodesForCallingCode(n)}},{key:"country",value:function(n){return this.selectNumberingPlan(n)}},{key:"selectNumberingPlan",value:function(n,o){if(n&&py.test(n)&&(o=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new Nd(this.getCountryMetadata(n),this)}else if(o){if(!this.hasCallingCode(o))throw new Error("Unknown calling code: ".concat(o));this.numberingPlan=new Nd(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(n){var o=this.countryCallingCodes()[n];if(o)return o.length===1&&o[0].length===3?void 0:o}},{key:"getCountryCodeForCallingCode",value:function(n){var o=this.getCountryCodesForCallingCode(n);if(o)return o[0]}},{key:"getNumberingPlanMetadata",value:function(n){var o=this.getCountryCodeForCallingCode(n);if(o)return this.getCountryMetadata(o);if(this.nonGeographic()){var i=this.nonGeographic()[n];if(i)return i}else{var r=this.countryCallingCodes()[n];if(r&&r.length===1&&r[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(n){return this.numberingPlan.type(n)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(n){return this.selectNumberingPlan(n)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),t}(),Nd=function(){function t(e,n){qo(this,t),this.globalMetadataObject=n,this.metadata=e,Od.call(this,n.metadata)}return Xo(t,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(n){return n[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var n=this,o=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return o.map(function(i){return new my(i,n)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(n){return n[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(n){if(this.hasTypes()&&Ad(this.types(),n))return new yy(Ad(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?Fd:this.metadata[13]||Fd}}]),t}(),my=function(){function t(e,n){qo(this,t),this._format=e,this.metadata=n}return Xo(t,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!gy.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),gy=/^\(?\$1\)?$/,yy=function(){function t(e,n){qo(this,t),this.type=e,this.metadata=n}return Xo(t,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),t}();function Ad(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function by(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Go(t)||!Go(t.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(Go(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+$y(t)+": "+t,"."))}var $y=function(e){return Bs(e)};function Ko(t,e){if(e=new Ce(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function _y(t,e){return e.countries.hasOwnProperty(t)}function Od(t){var e=t.version;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?Pd(e,fy)===-1?this.v2=!0:Pd(e,hy)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var wy=";ext=",nn=function(e){return"([".concat(ze,"]{1,").concat(e,"})")};function Id(t){var e="20",n="15",o="9",i="6",r="[  \\t,]*",l="[:\\..]?[  \\t,-]*",a="#?",d="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[  \\t]*",h="(?:,{2}|;)",p=wy+nn(e),m=r+d+l+nn(e)+a,g=r+c+l+nn(o)+a,y=u+nn(i)+"#",b=f+h+l+nn(n)+a,$=f+"(?:,)+"+l+nn(o)+a;return p+"|"+m+"|"+g+"|"+y+"|"+b+"|"+$}var Cy="["+ze+"]{"+Ds+"}",xy="["+Es+"]{0,1}(?:["+Uo+"]*["+ze+"]){3,}["+Uo+ze+"]*",ky=new RegExp("^["+Es+"]{0,1}(?:["+Uo+"]*["+ze+"]){1,2}$","i"),Sy=xy+"(?:"+Id()+")?",vy=new RegExp("^"+Cy+"$|^"+Sy+"$","i");function My(t){return t.length>=Ds&&vy.test(t)}function Dy(t){return ky.test(t)}var Td=new RegExp("(?:"+Id()+")$","i");function Ey(t){var e=t.search(Td);if(e<0)return{};for(var n=t.slice(0,e),o=t.match(Td),i=1;i<o.length;){if(o[i])return{number:n,ext:o[i]};i++}}var By={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Vy(t){return By[t]}function Py(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Ry(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
28
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ry(t,e){if(t){if(typeof t=="string")return Ld(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ld(t,e)}}function Ld(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function zd(t){for(var e="",n=Py(t.split("")),o;!(o=n()).done;){var i=o.value;e+=Fy(i,e)||""}return e}function Fy(t,e,n){if(t==="+"){if(e){typeof n=="function"&&n("end");return}return"+"}return Vy(t)}function Ny(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Ay(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
29
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ay(t,e){if(t){if(typeof t=="string")return Hd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hd(t,e)}}function Hd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Oy(t,e){for(var n=t.slice(),o=Ny(e),i;!(i=o()).done;){var r=i.value;t.indexOf(r)<0&&n.push(r)}return n.sort(function(l,a){return l-a})}function Vs(t,e){return jd(t,void 0,e)}function jd(t,e,n){var o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return jd(t,"MOBILE",n);var r=n.type("MOBILE");r&&(i=Oy(i,r.possibleLengths()))}else if(e&&!o)return"INVALID_LENGTH";var l=t.length,a=i[0];return a===l?"IS_POSSIBLE":a>l?"TOO_SHORT":i[i.length-1]<l?"TOO_LONG":i.indexOf(l,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function Iy(t,e,n){if(e===void 0&&(e={}),n=new Ce(n),e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));n.country(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return Wd(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function Wd(t,e){switch(Vs(t,e)){case"IS_POSSIBLE":return!0;default:return!1}}function ct(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}function Ty(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Ly(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ly(t,e){if(t){if(typeof t=="string")return Yd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yd(t,e)}}function Yd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}var zy=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Ps(t,e,n){if(e=e||{},!(!t.country&&!t.countryCallingCode)){n=new Ce(n),n.selectNumberingPlan(t.country,t.countryCallingCode);var o=e.v2?t.nationalNumber:t.phone;if(ct(o,n.nationalNumberPattern())){if(Rs(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||Rs(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i=Ty(zy),r;!(r=i()).done;){var l=r.value;if(Rs(o,l,n))return l}}}}function Rs(t,e,n){return e=n.type(e),!e||!e.pattern()||e.possibleLengths()&&e.possibleLengths().indexOf(t.length)<0?!1:ct(t,e.pattern())}function Hy(t,e,n){if(e=e||{},n=new Ce(n),n.selectNumberingPlan(t.country,t.countryCallingCode),n.hasTypes())return Ps(t,e,n.metadata)!==void 0;var o=e.v2?t.nationalNumber:t.phone;return ct(o,n.nationalNumberPattern())}function jy(t,e,n){var o=new Ce(n),i=o.getCountryCodesForCallingCode(t);return i?i.filter(function(r){return Wy(e,r,n)}):[]}function Wy(t,e,n){var o=new Ce(n);return o.selectNumberingPlan(e),o.numberingPlan.possibleLengths().indexOf(t.length)>=0}function Yy(t){return t.replace(new RegExp("[".concat(Uo,"]+"),"g")," ").trim()}var Uy=/(\$\d)/;function Gy(t,e,n){var o=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var r=t.replace(new RegExp(e.pattern()),o?e.internationalFormat():i&&e.nationalPrefixFormattingRule()?e.format().replace(Uy,e.nationalPrefixFormattingRule()):e.format());return o?Yy(r):r}var qy=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Xy(t,e,n){var o=new Ce(n);if(o.selectNumberingPlan(t,e),o.defaultIDDPrefix())return o.defaultIDDPrefix();if(qy.test(o.IDDPrefix()))return o.IDDPrefix()}function Ky(t){var e=t.number,n=t.ext;if(!e)return"";if(e[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(e).concat(n?";ext="+n:"")}function Zy(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Jy(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
31
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jy(t,e){if(t){if(typeof t=="string")return Ud(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ud(t,e)}}function Ud(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Gd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function qd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gd(Object(n),!0).forEach(function(o){Qy(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gd(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Qy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Xd={formatExtension:function(e,n,o){return"".concat(e).concat(o.ext()).concat(n)}};function eb(t,e,n,o){if(n?n=qd(qd({},Xd),n):n=Xd,o=new Ce(o),t.country&&t.country!=="001"){if(!o.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));o.country(t.country)}else if(t.countryCallingCode)o.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";var i=o.countryCallingCode(),r=n.v2?t.nationalNumber:t.phone,l;switch(e){case"NATIONAL":return r?(l=Zo(r,t.carrierCode,"NATIONAL",o,n),Fs(l,t.ext,o,n.formatExtension)):"";case"INTERNATIONAL":return r?(l=Zo(r,null,"INTERNATIONAL",o,n),l="+".concat(i," ").concat(l),Fs(l,t.ext,o,n.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(r);case"RFC3966":return Ky({number:"+".concat(i).concat(r),ext:t.ext});case"IDD":if(!n.fromCountry)return;var a=nb(r,t.carrierCode,i,n.fromCountry,o);return Fs(a,t.ext,o,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(e,'"'))}}function Zo(t,e,n,o,i){var r=tb(o.formats(),t);return r?Gy(t,r,{useInternationalFormat:n==="INTERNATIONAL",withNationalPrefix:!(r.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:e,metadata:o}):t}function tb(t,e){for(var n=Zy(t),o;!(o=n()).done;){var i=o.value;if(i.leadingDigitsPatterns().length>0){var r=i.leadingDigitsPatterns()[i.leadingDigitsPatterns().length-1];if(e.search(r)!==0)continue}if(ct(e,i.pattern()))return i}}function Fs(t,e,n,o){return e?o(t,e,n):t}function nb(t,e,n,o,i){var r=Ko(o,i.metadata);if(r===n){var l=Zo(t,e,"NATIONAL",i);return n==="1"?n+" "+l:l}var a=Xy(o,void 0,i.metadata);if(a)return"".concat(a," ").concat(n," ").concat(Zo(t,null,"INTERNATIONAL",i))}function Kd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function Zd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Kd(Object(n),!0).forEach(function(o){ob(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kd(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function ob(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ib(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Jd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function sb(t,e,n){return e&&Jd(t.prototype,e),n&&Jd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var rb=function(){function t(e,n,o){if(ib(this,t),!e)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!o)throw new TypeError("`metadata` not passed");var i=ab(e,o),r=i.country,l=i.countryCallingCode;this.country=r,this.countryCallingCode=l,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return o}}return sb(t,[{key:"setExt",value:function(n){this.ext=n}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:jy(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return Iy(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return Hy(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var n=new Ce(this.getMetadata());return n.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(n){return this.number===n.number&&this.ext===n.ext}},{key:"getType",value:function(){return Ps(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(n,o){return eb(this,n,o?Zd(Zd({},o),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(n){return this.format("NATIONAL",n)}},{key:"formatInternational",value:function(n){return this.format("INTERNATIONAL",n)}},{key:"getURI",value:function(n){return this.format("RFC3966",n)}}]),t}(),lb=function(e){return/^[A-Z]{2}$/.test(e)};function ab(t,e){var n,o,i=new Ce(e);return lb(t)?(n=t,i.selectNumberingPlan(n),o=i.countryCallingCode()):o=t,{country:n,countryCallingCode:o}}var db=new RegExp("(["+ze+"])");function cb(t,e,n,o){if(e){var i=new Ce(o);i.selectNumberingPlan(e,n);var r=new RegExp(i.IDDPrefix());if(t.search(r)===0){t=t.slice(t.match(r)[0].length);var l=t.match(db);if(!(l&&l[1]!=null&&l[1].length>0&&l[1]==="0"))return t}}}function ub(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),o=n.exec(t);if(o){var i,r,l=o.length-1,a=l>0&&o[l];if(e.nationalPrefixTransformRule()&&a)i=t.replace(n,e.nationalPrefixTransformRule()),l>1&&(r=o[1]);else{var d=o[0];i=t.slice(d.length),a&&(r=o[1])}var c;if(a){var u=t.indexOf(o[1]),f=t.slice(0,u);f===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=o[0];return{nationalNumber:i,nationalPrefix:c,carrierCode:r}}}return{nationalNumber:t}}function Ns(t,e){var n=ub(t,e),o=n.carrierCode,i=n.nationalNumber;if(i!==t){if(!fb(t,i,e))return{nationalNumber:t};if(e.possibleLengths()&&!hb(i,e))return{nationalNumber:t}}return{nationalNumber:i,carrierCode:o}}function fb(t,e,n){return!(ct(t,n.nationalNumberPattern())&&!ct(e,n.nationalNumberPattern()))}function hb(t,e){switch(Vs(t,e)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function pb(t,e,n,o){var i=e?Ko(e,o):n;if(t.indexOf(i)===0){o=new Ce(o),o.selectNumberingPlan(e,n);var r=t.slice(i.length),l=Ns(r,o),a=l.nationalNumber,d=Ns(t,o),c=d.nationalNumber;if(!ct(c,o.nationalNumberPattern())&&ct(a,o.nationalNumberPattern())||Vs(c,o)==="TOO_LONG")return{countryCallingCode:i,number:r}}return{number:t}}function mb(t,e,n,o){if(!t)return{};var i;if(t[0]!=="+"){var r=cb(t,e,n,o);if(r&&r!==t)i=!0,t="+"+r;else{if(e||n){var l=pb(t,e,n,o),a=l.countryCallingCode,d=l.number;if(a)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:a,number:d}}return{number:t}}}if(t[1]==="0")return{};o=new Ce(o);for(var c=2;c-1<=iy&&c<=t.length;){var u=t.slice(1,c);if(o.hasCallingCode(u))return o.selectNumberingPlan(u),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:t.slice(c)};c++}return{}}function gb(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=yb(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
32
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yb(t,e){if(t){if(typeof t=="string")return Qd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qd(t,e)}}function Qd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function bb(t,e){var n=e.countries,o=e.defaultCountry,i=e.metadata;i=new Ce(i);for(var r=[],l=gb(n),a;!(a=l()).done;){var d=a.value;if(i.country(d),i.leadingDigits()){if(t&&t.search(i.leadingDigits())===0)return d}else if(Ps({phone:t,country:d},void 0,i.metadata))if(o){if(d===o)return d;r.push(d)}else return d}if(r.length>0)return r[0]}var $b=!1;function _b(t,e){var n=e.nationalNumber,o=e.defaultCountry,i=e.metadata;if($b&&i.isNonGeographicCallingCode(t))return"001";var r=i.getCountryCodesForCallingCode(t);if(r)return r.length===1?r[0]:bb(n,{countries:r,defaultCountry:o,metadata:i.metadata})}var ec="+",wb="[\\-\\.\\(\\)]?",tc="(["+ze+"]|"+wb+")",Cb="^\\"+ec+tc+"*["+ze+"]"+tc+"*$",xb=new RegExp(Cb,"g"),As=ze,kb="["+As+"]+((\\-)*["+As+"])*",Sb="a-zA-Z",vb="["+Sb+"]+((\\-)*["+As+"])*",Mb="^("+kb+"\\.)*"+vb+"\\.?$",Db=new RegExp(Mb,"g"),nc="tel:",Os=";phone-context=",Eb=";isub=";function Bb(t){var e=t.indexOf(Os);if(e<0)return null;var n=e+Os.length;if(n>=t.length)return"";var o=t.indexOf(";",n);return o>=0?t.substring(n,o):t.substring(n)}function Vb(t){return t===null?!0:t.length===0?!1:xb.test(t)||Db.test(t)}function Pb(t,e){var n=e.extractFormattedPhoneNumber,o=Bb(t);if(!Vb(o))throw new dt("NOT_A_NUMBER");var i;if(o===null)i=n(t)||"";else{i="",o.charAt(0)===ec&&(i+=o);var r=t.indexOf(nc),l;r>=0?l=r+nc.length:l=0;var a=t.indexOf(Os);i+=t.substring(l,a)}var d=i.indexOf(Eb);if(d>0&&(i=i.substring(0,d)),i!=="")return i}var Rb=250,Fb=new RegExp("["+Es+ze+"]"),Nb=new RegExp("[^"+ze+"#]+$");function Ab(t,e,n){if(e=e||{},n=new Ce(n),e.defaultCountry&&!n.hasCountry(e.defaultCountry))throw e.v2?new dt("INVALID_COUNTRY"):new Error("Unknown country: ".concat(e.defaultCountry));var o=Ib(t,e.v2,e.extract),i=o.number,r=o.ext,l=o.error;if(!i){if(e.v2)throw l==="TOO_SHORT"?new dt("TOO_SHORT"):new dt("NOT_A_NUMBER");return{}}var a=Lb(i,e.defaultCountry,e.defaultCallingCode,n),d=a.country,c=a.nationalNumber,u=a.countryCallingCode,f=a.countryCallingCodeSource,h=a.carrierCode;if(!n.hasSelectedNumberingPlan()){if(e.v2)throw new dt("INVALID_COUNTRY");return{}}if(!c||c.length<Ds){if(e.v2)throw new dt("TOO_SHORT");return{}}if(c.length>oy){if(e.v2)throw new dt("TOO_LONG");return{}}if(e.v2){var p=new rb(u,c,n.metadata);return d&&(p.country=d),h&&(p.carrierCode=h),r&&(p.ext=r),p.__countryCallingCodeSource=f,p}var m=(e.extended?n.hasSelectedNumberingPlan():d)?ct(c,n.nationalNumberPattern()):!1;return e.extended?{country:d,countryCallingCode:u,carrierCode:h,valid:m,possible:m?!0:!!(e.extended===!0&&n.possibleLengths()&&Wd(c,n)),phone:c,ext:r}:m?Tb(d,c,r):{}}function Ob(t,e,n){if(t){if(t.length>Rb){if(n)throw new dt("TOO_LONG");return}if(e===!1)return t;var o=t.search(Fb);if(!(o<0))return t.slice(o).replace(Nb,"")}}function Ib(t,e,n){var o=Pb(t,{extractFormattedPhoneNumber:function(l){return Ob(l,n,e)}});if(!o)return{};if(!My(o))return Dy(o)?{error:"TOO_SHORT"}:{};var i=Ey(o);return i.ext?i:{number:o}}function Tb(t,e,n){var o={country:t,phone:e};return n&&(o.ext=n),o}function Lb(t,e,n,o){var i=mb(zd(t),e,n,o.metadata),r=i.countryCallingCodeSource,l=i.countryCallingCode,a=i.number,d;if(l)o.selectNumberingPlan(l);else if(a&&(e||n))o.selectNumberingPlan(e,n),e&&(d=e),l=n||Ko(e,o.metadata);else return{};if(!a)return{countryCallingCodeSource:r,countryCallingCode:l};var c=Ns(zd(a),o),u=c.nationalNumber,f=c.carrierCode,h=_b(l,{nationalNumber:u,defaultCountry:e,metadata:o});return h&&(d=h,h==="001"||o.country(d)),{country:d,countryCallingCode:l,countryCallingCodeSource:r,nationalNumber:u,carrierCode:f}}function oc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function ic(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?oc(Object(n),!0).forEach(function(o){zb(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oc(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function zb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Hb(t,e,n){return Ab(t,ic(ic({},e),{},{v2:!0}),n)}function sc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function jb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?sc(Object(n),!0).forEach(function(o){Wb(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sc(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Wb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yb(t,e){return Xb(t)||qb(t,e)||Gb(t,e)||Ub()}function Ub(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
33
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gb(t,e){if(t){if(typeof t=="string")return rc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rc(t,e)}}function rc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function qb(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var o=[],i=!0,r=!1,l,a;try{for(n=n.call(t);!(i=(l=n.next()).done)&&(o.push(l.value),!(e&&o.length===e));i=!0);}catch(d){r=!0,a=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(r)throw a}}return o}}function Xb(t){if(Array.isArray(t))return t}function Kb(t){var e=Array.prototype.slice.call(t),n=Yb(e,4),o=n[0],i=n[1],r=n[2],l=n[3],a,d,c;if(typeof o=="string")a=o;else throw new TypeError("A text for parsing must be a string.");if(!i||typeof i=="string")l?(d=r,c=l):(d=void 0,c=r),i&&(d=jb({defaultCountry:i},d));else if(Go(i))r?(d=i,c=r):c=i;else throw new Error("Invalid second argument: ".concat(i));return{text:a,options:d,metadata:c}}function lc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function ac(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lc(Object(n),!0).forEach(function(o){Zb(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lc(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function Zb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jb(t,e,n){e&&e.defaultCountry&&!_y(e.defaultCountry,n)&&(e=ac(ac({},e),{},{defaultCountry:void 0}));try{return Hb(t,e,n)}catch(o){if(!(o instanceof dt))throw o}}function Qb(){var t=Kb(arguments),e=t.text,n=t.options,o=t.metadata;return Jb(e,n,o)}function Is(){return Dd(Qb,arguments)}function e$(){return Dd(Ko,arguments)}const t$=["value","inputMode","type","placeholder","minlength","maxlength","disabled","readOnly"],Ts=s.defineComponent({__name:"FmTextField",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},prependIcon:{default:""},appendIcon:{default:""},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},invalid:{type:Boolean},modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","focus-changed"],setup(t,{expose:e,emit:n}){const o=t,i=n,r=s.ref(null),l=K(o,"modelValue"),{isFocused:a,focus:d,blur:c}=Wn(),u=f=>{l.value=f.target.value};return e({focus:d}),(f,h)=>(s.openBlock(),s.createBlock(Pe,{modelValue:s.unref(l),"onUpdate:modelValue":h[2]||(h[2]=p=>s.isRef(l)?l.value=p:null),label:f.label,disabled:f.disabled,required:f.labelMark==="required",optional:f.labelMark==="optional",info:f.labelInfo,rules:f.rules,focused:s.unref(a),"helper-text":f.helperText,"helper-state":f.helperState},s.createSlots({default:s.withCtx(({invalid:p})=>[s.createVNode(ge,{class:"cursor-text","append-icon":f.appendIcon,"prepend-icon":f.prependIcon,focused:s.unref(a),invalid:f.invalid||p,"show-valid-border":f.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot(f.$slots,"prepend")]),append:s.withCtx(()=>[s.renderSlot(f.$slots,"append")]),default:s.withCtx(()=>[s.createElementVNode("input",{ref_key:"inputEl",ref:r,class:s.normalizeClass({"fm-text-field--input fm-typo-body-lg-400":!0,"text-fm-color-typo-primary":!f.disabled,"text-fm-color-typo-disabled":f.disabled}),value:s.unref(l),inputMode:f.inputmode,type:f.inputmode,placeholder:f.placeholder,minlength:f.minLength,maxlength:f.maxLength,disabled:f.disabled,readOnly:f.readonly,onInput:u,onFocus:h[0]||(h[0]=()=>{s.unref(d)(),i("focus-changed",!0)}),onBlur:h[1]||(h[1]=()=>{s.unref(c)(),i("focus-changed",!1)})},null,42,t$)]),_:2},1032,["append-icon","prepend-icon","focused","invalid","show-valid-border"])]),_:2},[f.label||f.$slots.label?{name:"label",fn:s.withCtx(()=>[s.renderSlot(f.$slots,"label")]),key:"0"}:void 0,f.helperText||f.$slots["helper-text"]?{name:"helper-text",fn:s.withCtx(()=>[s.renderSlot(f.$slots,"helper-text")]),key:"1"}:void 0,f.showWordCount?{name:"helper-append",fn:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass([f.disabled?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},s.toDisplayString(f.maxLength?`${s.unref(l).length} / ${f.maxLength}`:""),3)]),key:"2"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),n$="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-my'%20viewBox='0%200%20640%20480'%3e%3cg%20clip-path='url(%23my-a)'%3e%3cpath%20fill='%23C00'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%200h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%2034.3h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%2068.6h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20102.9h640V137H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20137.1h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20171.4h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20205.7h640V240H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20240h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20274.3h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20308.6h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20342.9h640V377H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20377.1h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20411.4h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20445.7h640V480H0z'/%3e%3cpath%20fill='%23006'%20d='M0%20.5h320v274.3H0z'/%3e%3cpath%20fill='%23FC0'%20d='m207.5%2073.8%206%2040.7%2023-34-12.4%2039.2%2035.5-20.8-28.1%2030%2041-3.2-38.3%2014.8%2038.3%2014.8-41-3.2%2028.1%2030-35.5-20.8%2012.3%2039.3-23-34.1-6%2040.7-5.9-40.7-23%2034%2012.4-39.2-35.5%2020.8%2028-30-41%203.2%2038.4-14.8-38.3-14.8%2041%203.2-28.1-30%2035.5%2020.8-12.4-39.3%2023%2034.1zm-33.3%201.7a71.1%2071.1%200%200%200-100%2065%2071.1%2071.1%200%200%200%20100%2065%2080%2080%200%200%201-83.2%206.2%2080%2080%200%200%201-43.4-71.2%2080%2080%200%200%201%20126.6-65'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='my-a'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",o$="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sg'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='sg-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23sg-a)'%3e%3cpath%20fill='%23fff'%20d='M-20%200h720v480H-20z'/%3e%3cpath%20fill='%23df0000'%20d='M-20%200h720v240H-20z'/%3e%3cpath%20fill='%23fff'%20d='M146%2040.2a84.4%2084.4%200%200%200%20.8%20165.2%2086%2086%200%200%201-106.6-59%2086%2086%200%200%201%2059-106c16-4.6%2030.8-4.7%2046.9-.2z'/%3e%3cpath%20fill='%23fff'%20d='m133%20110%204.9%2015-13-9.2-12.8%209.4%204.7-15.2-12.8-9.3%2015.9-.2%205-15%205%2015h15.8zm17.5%2052%205%2015.1-13-9.2-12.9%209.3%204.8-15.1-12.8-9.4%2015.9-.1%204.9-15.1%205%2015h16zm58.5-.4%204.9%2015.2-13-9.3-12.8%209.3%204.7-15.1-12.8-9.3%2015.9-.2%205-15%205%2015h15.8zm17.4-51.6%204.9%2015.1-13-9.2-12.8%209.3%204.8-15.1-12.9-9.4%2016-.1%204.8-15.1%205%2015h16zm-46.3-34.3%205%2015.2-13-9.3-12.9%209.4%204.8-15.2-12.8-9.4%2015.8-.1%205-15.1%205%2015h16z'/%3e%3c/g%3e%3c/svg%3e",i$={class:"flex gap-4"},s$=["src","alt"],r$=["src","alt"],l$=s.defineComponent({__name:"FmPhoneNumber",props:{modelValue:{},defaultCountry:{default:"MY"},placeholder:{default:""},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=K(n,"modelValue"),r=["MY","SG"],l=r.reduce((y,b)=>(y[b]=`+${e$(b)}`,y),{}),a=r.map(y=>({label:"",value:y}));function d(y){var b;return y?((b=Object.entries(l).find(([,$])=>y.startsWith($)))==null?void 0:b[0])??null:n.defaultCountry}const c=s.computed(()=>d(n.modelValue)),u=s.computed(()=>!c.value||!n.modelValue?l[n.defaultCountry]:n.modelValue),f=s.computed({get(){const y=Is(u.value);return y?y.formatInternational().replace(l[c.value],"").trim():u.value.replace(l[c.value],"").trim()},set(y){const b=`${l[c.value]}${y}`,$=Is(b);if(!$){i.value=b;return}i.value=$.formatInternational()}}),h=s.computed({get(){return c.value??n.defaultCountry},set(y){if(!c.value){o("update:modelValue",l[n.defaultCountry]);return}const $=l[c.value],w=l[y];i.value=u.value.replace($,w)}}),p=s.ref({dropdown:!1,textField:!1});function m(y){const b=c.value;if(!y.replace(l[b],"").trim().length)return!0;const w=Is(i.value,b);return!w||!w.isValid()?"Invalid phone number":!0}const g={MY:n$,SG:o$};return(y,b)=>(s.openBlock(),s.createBlock(Pe,{modelValue:s.unref(i),"onUpdate:modelValue":b[4]||(b[4]=$=>s.isRef(i)?i.value=$:null),class:"flex gap-4",label:y.label,disabled:y.disabled,required:y.labelMark==="required",optional:y.labelMark==="optional",info:y.labelInfo,rules:[...y.rules,m],focused:p.value.dropdown||p.value.textField,"helper-text":y.helperText,"helper-state":y.helperState},s.createSlots({default:s.withCtx(({invalid:$})=>[s.createElementVNode("div",i$,[s.createVNode(Wo,{"model-value":h.value,"onUpdate:modelValue":b[0]||(b[0]=w=>h.value=w),items:s.unref(a),disabled:y.disabled,onDropdownChanged:b[1]||(b[1]=w=>p.value.dropdown=w)},{default:s.withCtx(()=>[s.createElementVNode("img",{class:"h-auto w-[20px]",src:g[h.value],alt:h.value},null,8,s$)]),"menu-wrapper":s.withCtx(({handleItemChange:w})=>[(s.openBlock(),s.createElementBlock(s.Fragment,null,s.renderList(r,S=>s.createVNode(Me,{key:S,"model-value":h.value===S,"onUpdate:modelValue":x=>w(x,s.unref(a).find(V=>V.value===S))},{label:s.withCtx(()=>[s.createElementVNode("img",{class:"h-auto w-[20px]",src:g[S],alt:S},null,8,r$)]),_:2},1032,["model-value","onUpdate:modelValue"])),64))]),_:1},8,["model-value","items","disabled"]),s.createVNode(Ts,{"model-value":f.value,"onUpdate:modelValue":b[2]||(b[2]=w=>f.value=w),inputmode:"tel",class:"flex-1",disabled:y.disabled,invalid:$,onFocusChanged:b[3]||(b[3]=w=>p.value.textField=w)},{prepend:s.withCtx(()=>[s.createElementVNode("span",{class:s.normalizeClass([y.disabled?"text-fm-color-typo-disabled":""])},"("+s.toDisplayString(s.unref(l)[c.value])+")",3)]),_:2},1032,["model-value","disabled","invalid"])])]),_:2},[y.label||y.$slots.label?{name:"label",fn:s.withCtx(()=>[s.renderSlot(y.$slots,"label")]),key:"0"}:void 0,y.helperText||y.$slots["helper-text"]?{name:"helper-text",fn:s.withCtx(()=>[s.renderSlot(y.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),a$={class:"flex gap-8 items-center"},d$=["onInput","onKeydown"],c$=J(s.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"}},emits:["update:modelValue","complete"],setup(t,{emit:e}){const n=e,o=t,i=K(o,"modelValue"),r=s.ref([]),l=(f,h)=>{const p=f.target;if(o.type==="number"&&!/^[0-9]$/g.test(p.value)){p.value="";return}p.value=p.value.slice(-1),c(p.value,h),r.value[h+1]?r.value[h+1].focus():r.value[h].blur()},a=(f,h)=>{f.preventDefault();const p=f.target;p.value="",c(null,h),r.value[h-1]?r.value[h-1].focus():r.value[h].focus()},d=(f,h)=>{f.preventDefault(),f.key==="ArrowLeft"&&(r.value[h-1]?r.value[h-1].focus():r.value[h].focus()),f.key==="ArrowRight"&&(r.value[h+1]?r.value[h+1].focus():r.value[h].focus())},c=(f,h)=>{i.value=i.value.toSpliced(h,1,f)},u=(f,h)=>{r.value[h]=f};return s.onMounted(()=>{i.value=Array.from(Array(o.length).fill(null))}),s.watch(()=>i.value,()=>{i.value.every(f=>f!==null)&&n("complete",i.value.join(""))}),(f,h)=>(s.openBlock(),s.createElementBlock("div",a$,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.length,(p,m)=>(s.openBlock(),s.createElementBlock("input",{key:p,ref_for:!0,ref:g=>u(g,m),class:s.normalizeClass(["fm-pin-field",{"fm-pin-field--populated":s.unref(i)[m]!==null}]),type:"text",onInput:g=>l(g,m),onKeydown:[s.withKeys(g=>a(g,m),["backspace"]),s.withKeys(g=>d(g,m),["arrow-left","arrow-right"])]},null,42,d$))),128))]))}}),[["__scopeId","data-v-45a53bf7"]]),u$={class:"fm-radio-btn"},f$={class:"fm-radio-btn__input--container"},h$=["checked","disabled","value"],p$={class:"py-8"},m$={class:"fm-typo-body-lg-400"},g$={key:0,class:"fm-typo-body-md-400 text-fm-color-typo-secondary"},y$=J(s.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=K(e,"modelValue"),o=s.ref(),i=s.inject(Cr,null),r=()=>{l.value||(i?i.updateValue(e.value):n.value=e.value)},l=s.computed(()=>(console.log(`${e.label} isDisabled: ${e.disabled}`),console.log(`${e.label} disabled from provider: ${i==null?void 0:i.getDisabled()}`),console.log("-----------------------------------"),$g(e.disabled)?e.disabled:i?i.getDisabled():!1)),a=s.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(d,c)=>{const u=s.resolveDirective("wave");return s.openBlock(),s.createElementBlock("div",u$,[s.createElementVNode("label",{class:s.normalizeClass({"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":l.value,"cursor-pointer":!l.value}),onClick:r},[s.withDirectives((s.openBlock(),s.createElementBlock("div",f$,[s.createElementVNode("input",{ref_key:"inputEl",ref:o,checked:a.value,disabled:l.value,value:d.value,class:"fm-radio-btn__input--btn",type:"radio"},null,8,h$)])),[[u,!l.value]]),s.createElementVNode("div",p$,[s.renderSlot(d.$slots,"label",{},()=>[s.createElementVNode("div",m$,s.toDisplayString(d.label),1),d.sublabel?(s.openBlock(),s.createElementBlock("div",g$,s.toDisplayString(d.sublabel),1)):s.createCommentVNode("",!0)],!0)])],2)])}}}),[["__scopeId","data-v-67a13ac9"]]),b$=s.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!!t||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=K(e,"modelValue");return s.provide(Cr,{groupValue:n,getDisabled:()=>e.disabled,updateValue(o){n.value=o}}),(o,i)=>(s.openBlock(),s.createBlock(Pe,{modelValue:s.unref(n),"onUpdate:modelValue":i[0]||(i[0]=r=>s.isRef(n)?n.value=r:null),label:o.label,disabled:o.disabled,required:o.labelMark==="required",optional:o.labelMark==="optional",info:o.labelInfo,rules:o.rules,"helper-text":o.helperText,"helper-state":o.helperState},{label:s.withCtx(()=>[s.renderSlot(o.$slots,"label")]),default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass({"flex items-center gap-16 justify-start":o.inline})},[s.renderSlot(o.$slots,"default")],2)]),"helper-text":s.withCtx(()=>[s.renderSlot(o.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","helper-text","helper-state"]))}}),Ls=s.defineComponent({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},maxWidth:{default:void 0},modelValue:{},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,n=s.computed(()=>{const{modelValue:u,...f}=e;return f}),o=K(e,"modelValue"),i=s.ref(!1),r=s.ref(),l=s.ref(e.collapsible),a=s.ref(e.collapsible);function d(){var h;l.value=!1;const u=(h=r.value)==null?void 0:h.querySelector("input");if(!u)return;(Array.isArray(u.__vnode.ref)?u.__vnode.ref:[u.__vnode.ref]).forEach(p=>{var m,g,y;return(y=(g=(m=p==null?void 0:p.i)==null?void 0:m.exposed)==null?void 0:g.focus)==null?void 0:y.call(g)}),s.nextTick(()=>{u.focus()})}function c(u){if(i.value=u,!!e.collapsible){if(u){a.value=!1;return}l.value=o.value.length===0,l.value&&setTimeout(()=>{a.value=!0},250)}}return(u,f)=>(s.openBlock(),s.createElementBlock("div",{ref_key:"componentRoot",ref:r,class:"min-w-48 relative"},[s.createVNode(Ts,s.mergeProps(n.value,{modelValue:s.unref(o),"onUpdate:modelValue":f[1]||(f[1]=h=>s.isRef(o)?o.value=h:null),disabled:e.disabled||u.collapsible&&l.value,class:["w-full transition-all",{"opacity-100":!u.collapsible||!l.value,"opacity-0 pointer-events-none":u.collapsible&&l.value}],style:{width:u.collapsible&&l.value?"24px":typeof u.maxWidth=="number"?`${u.maxWidth}px`:u.maxWidth},onFocusChanged:c}),s.createSlots({_:2},[i.value?void 0:{name:"prepend",fn:s.withCtx(()=>[s.createVNode(j,{name:"search"})]),key:"0"},s.unref(o).length?{name:"append",fn:s.withCtx(()=>[s.createVNode(j,{name:"close",class:"cursor-pointer text-fm-color-neutral-gray-300",onClick:f[0]||(f[0]=h=>o.value="")})]),key:"1"}:void 0]),1040,["modelValue","disabled","class","style"]),u.collapsible?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["absolute top-0 right-0",l.value?"opacity-100":"opacity-0 pointer-events-none"]),style:s.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:l.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[s.createVNode(X,{variant:"tertiary",icon:"search",onClick:d})],6)):s.createCommentVNode("",!0)],512))}}),$$={key:0,class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},_$={key:0},w$={class:"overflow-y-auto"},C$={key:1,class:"flex gap-8 items-center"},dc=J(s.defineComponent({__name:"FmTopSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},fullscreenSize:{default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=s.ref(null),o=K(e,"modelValue"),i=r=>{e.dismissAway&&n.value&&r.target===n.value&&(o.value=!1)};return(r,l)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[s.renderSlot(r.$slots,"top-sheet-button",{},void 0,!0)]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.unref(o)?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-top-sheet--container",onClick:l[1]||(l[1]=a=>i(a))},[s.createVNode(s.Transition,{name:r.fullscreenSize?`slide-${r.fullscreenSize}`:"slide",appear:""},{default:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["fm-top-sheet",`fm-top-sheet--fullscreen-${r.fullscreenSize}`])},[r.header||r.$slots["top-sheet-header"]?(s.openBlock(),s.createElementBlock("div",$$,[s.renderSlot(r.$slots,"top-sheet-header",{},()=>[r.header?(s.openBlock(),s.createElementBlock("div",_$,s.toDisplayString(r.header),1)):s.createCommentVNode("",!0)],!0)])):s.createCommentVNode("",!0),s.createElementVNode("div",w$,[s.renderSlot(r.$slots,"default",{},void 0,!0)]),r.$slots["top-sheet-footer"]?(s.openBlock(),s.createElementBlock("div",C$,[s.renderSlot(r.$slots,"top-sheet-footer",{},void 0,!0)])):s.createCommentVNode("",!0)],2)]),_:3},8,["name"])],512)):s.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-51e90de4"]]);var zs={exports:{}};function cc(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}=typeof n=="boolean"?{immediate:n}:n;let i,r,l,a,d;function c(){const f=Date.now()-a;if(f<e&&f>=0)l=setTimeout(c,e-f);else if(l=void 0,!o){const h=i,p=r;i=void 0,r=void 0,d=t.apply(h,p)}}const u=function(...f){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,r=f,a=Date.now();const h=o&&!l;if(l||(l=setTimeout(c,e)),h){const p=i,m=r;i=void 0,r=void 0,d=t.apply(p,m)}return d};return u.clear=()=>{l&&(clearTimeout(l),l=void 0)},u.flush=()=>{if(!l)return;const f=i,h=r;i=void 0,r=void 0,d=t.apply(f,h),clearTimeout(l),l=void 0},u}zs.exports.debounce=cc,zs.exports=cc;var x$=zs.exports;const uc=fs(x$);var fc={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(r){return n.test(o,r)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,r){r=r||{};var l=0,a=[],d=i.length,c=0,u=0,f=r.pre||"",h=r.post||"",p=r.caseSensitive&&i||i.toLowerCase(),m;o=r.caseSensitive&&o||o.toLowerCase();for(var g=0;g<d;g++)m=i[g],p[g]===o[l]?(m=f+m+h,l+=1,u+=1+u):u=0,c+=u,a[a.length]=m;return l===o.length?(c=p===o?1/0:c,{rendered:a.join(""),score:c}):null},n.filter=function(o,i,r){return!i||i.length===0?[]:typeof o!="string"?i:(r=r||{},i.reduce(function(l,a,d,c){var u=a;r.extract&&(u=r.extract(a));var f=n.match(o,u,r);return f!=null&&(l[l.length]={string:f.rendered,score:f.score,index:d,original:a}),l},[]).sort(function(l,a){var d=a.score-l.score;return d||l.index-a.index}))}})()})(fc);var k$=fc.exports;const S$=fs(k$);function Jo(t,e){const[n]=S$.filter(t.toLocaleLowerCase(),[e],{pre:"|",post:"|",extract(i){return i.toLocaleLowerCase()}});if(!n)return{label:e,segments:[{segment:e,isMatch:!1}],matched:!1};const o=n.string.toString().replace(/\|\|/g,"").split("|").reduce((i,r,l)=>(i.push({segment:r,isMatch:l%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const v$={class:"flex flex-col gap-4"},M$={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},D$={class:"hidden sm:inline xs:inline"},E$={key:0},B$={key:0,class:"flex flex-col"},V$={class:"flex flex-col"},P$={class:"flex items-center px-24 py-12"},R$=s.createElementVNode("div",{class:"fm-typo-body-md-400 text-fm-color-typo-secondary"}," Recent search ",-1),F$=s.createElementVNode("div",{class:"py-4"},[s.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),N$=["onClick"],A$={class:"fm-typo-body-lg-400 text-fm-color-typo-primary"},O$={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},I$={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},T$={key:3,class:"flex flex-col"},L$=["onClick"],z$={class:"flex flex-col gap-4"},H$={key:0,class:"text-fm-color-typo-secondary"},j$={class:"px-16 py-4"},W$=5,Y$=s.defineComponent({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(t,{emit:e}){const n=t,o=e;function i(){if(!n.recentSearchKey)return;const N=n.recentSearchKey;localStorage.removeItem(N),a.value=[]}function r(){if(!n.recentSearchKey)return;const N=n.recentSearchKey,P=localStorage.getItem(N);if(!P)return[];try{return JSON.parse(P)}catch{return new Array}}const l=uc(function(P){if(!n.recentSearchKey)return;const C=n.recentSearchKey,_=P().trim();if(!C||!_)return;const E=r()??[],v=[...new Set([_,...E])].slice(0,W$),M=JSON.stringify(v);return localStorage.setItem(C,M),a.value=v,v},800),a=s.ref(r()),d=K(n,"show");s.watch([()=>n.show],()=>{n.show?(f.value=null,n.suggestions&&$()):o("dismiss")});const c=K(n,"modelValue"),u=s.ref(n.modelValue);s.watch([()=>u.value],()=>{S()});const f=s.ref(null),h=s.ref(!0),p=s.computed(()=>{var N;return h.value?(N=f.value)==null?void 0:N.slice(0,5):f.value});s.watch([()=>f.value],([])=>{h.value=!0});const m=s.computed(()=>f.value===null),g=s.ref(!1),y=s.ref(""),b=()=>u.value;async function $(){if(!d.value)return;const N=b();if(!N)return;const P=Math.random().toString();if(y.value=P,n.suggestions){f.value=n.suggestions.map(C=>({label:Jo(N,C.label),sublabel:C.sublabel?Jo(N,C.sublabel):null})).filter(C=>{var _;return C.label.matched||((_=C.sublabel)==null?void 0:_.matched)}),l(b);return}if(n.onSearch)try{g.value=!0;const C=await n.onSearch(N);P===y.value&&(f.value=C.map(_=>({label:Jo(N,_.label),sublabel:_.sublabel?Jo(N,_.sublabel):null})))}catch{P===y.value&&(f.value=[])}finally{P===y.value&&(g.value=!1,l(b))}}function w(N){d.value=!1,o("dismiss"),c.value=N}const S=uc($),x=s.computed(()=>a.value&&a.value.length===0),V=s.computed(()=>(!u.value||m.value)&&!x.value),D=s.computed(()=>(!u.value||m.value)&&x.value),F=s.computed(()=>u.value&&f.value&&f.value.length===0);return(N,P)=>(s.openBlock(),s.createBlock(dc,{"model-value":s.unref(d),"onUpdate:modelValue":P[4]||(P[4]=C=>s.isRef(d)?d.value=C:null),"fullscreen-size":"sm","dismiss-away":""},{default:s.withCtx(()=>{var C,_;return[s.createElementVNode("div",v$,[s.createElementVNode("div",M$,[s.createElementVNode("div",D$,[s.createVNode(X,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:P[0]||(P[0]=E=>d.value=!1)})]),s.createVNode(Ls,{"model-value":u.value,"onUpdate:modelValue":P[1]||(P[1]=E=>u.value=E),class:"flex-1",placeholder:N.placeholder},null,8,["model-value","placeholder"])]),g.value?(s.openBlock(),s.createElementBlock("div",E$,[s.createVNode(ln,{size:"xl"})])):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[V.value?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[N.recentSearchKey&&((C=a.value)!=null&&C.length)?(s.openBlock(),s.createElementBlock("div",B$,[s.createElementVNode("div",V$,[s.createElementVNode("div",P$,[R$,s.createVNode(Wt),s.createVNode(X,{label:"Clear history",variant:"plain",size:"md",onClick:P[2]||(P[2]=E=>i())})]),F$]),s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,(E,v)=>(s.openBlock(),s.createElementBlock("div",{key:v,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:M=>u.value=E},[s.createVNode(j,{size:"lg",name:"history"}),s.createElementVNode("div",A$,s.toDisplayString(E),1)],8,N$))),128))])])):s.createCommentVNode("",!0)],64)):D.value?s.renderSlot(N.$slots,"hint-placeholder",{key:1},()=>[s.createElementVNode("div",O$,s.toDisplayString(N.hintPlaceholder),1)]):F.value?s.renderSlot(N.$slots,"not-found-placeholder",{key:2},()=>[s.createElementVNode("div",I$,s.toDisplayString(N.notFoundPlaceholder||`No result found for “${u.value}”`),1)]):(s.openBlock(),s.createElementBlock("div",T$,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(p.value,(E,v)=>s.renderSlot(N.$slots,"search-result-item",s.mergeProps({key:v},{result:E}),()=>[s.createElementVNode("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:M=>w(E.label.label)},[s.createVNode(j,{size:"lg",name:"arrow_forward"}),s.createElementVNode("div",z$,[s.createElementVNode("div",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(E.label.segments,(M,k)=>(s.openBlock(),s.createElementBlock("span",{key:k,class:s.normalizeClass({"fm-typo-body-lg-400":!M.isMatch,"fm-typo-body-lg-700":M.isMatch})},s.toDisplayString(M.segment),3))),128))]),E.sublabel?(s.openBlock(),s.createElementBlock("div",H$,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(E.sublabel.segments,(M,k)=>(s.openBlock(),s.createElementBlock("span",{key:k,class:s.normalizeClass({"fm-typo-body-md-400":!M.isMatch,"fm-typo-body-md-700":M.isMatch})},s.toDisplayString(M.segment),3))),128))])):s.createCommentVNode("",!0)])],8,L$)])),128)),s.createElementVNode("div",j$,[h.value&&(((_=f.value)==null?void 0:_.length)??0)>5?(s.openBlock(),s.createBlock(X,{key:0,label:`show ${f.value.length-5} more results`,variant:"plain",onClick:P[3]||(P[3]=E=>h.value=!1)},null,8,["label"])):s.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),U$=["inputMode","value","placeholder","readOnly"],G$={key:0},q$=J(s.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},useGrouping:{type:Boolean,default:!0},minFractionDigits:{default:0},maxFractionDigits:{default:2},label:{default:""},disabled:{type:Boolean},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=K(e,"modelValue"),{isFocused:o,blur:i,focus:r}=Wn(),l=s.ref(null);let a;const d=$=>{if($!==""){const w=+$.replace(/,/g,"");return isNaN(w)?null:w}return null},c=$=>a.format($),u=$=>{if(typeof n.value!="number"){n.value=+n.value;return}if($>0&&g.value||$<0&&y.value)return;let w=b(n.value)?n.value+$:0;w=f(w),n.value=w},f=$=>e.max!==void 0&&$>e.max?e.max:e.min!==void 0&&$<e.min?e.min:$,h=()=>{var $;n.value=d((($=l.value)==null?void 0:$.value)??"")},p=$=>{if(![...Array(10).keys()].map(w=>w.toString()).includes($.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes($.key)){$.preventDefault();return}},m=s.computed(()=>n.value!=null?c(n.value):""),g=s.computed(()=>{let $=!1;return e.max!==void 0&&($=n.value>=e.max),e.min!==void 0&&($=n.value<e.min),$}),y=s.computed(()=>{let $=!1;return e.max!==void 0&&($=n.value>e.max),e.min!==void 0&&($=n.value<=e.min),$});s.onBeforeMount(()=>{a=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function b($){return typeof $=="number"&&isFinite($)}return($,w)=>(s.openBlock(),s.createBlock(Pe,{modelValue:s.unref(n),"onUpdate:modelValue":w[8]||(w[8]=S=>s.isRef(n)?n.value=S:null),label:$.label,disabled:$.disabled,required:$.labelMark==="required",optional:$.labelMark==="optional",info:$.labelInfo,rules:$.rules,focused:s.unref(o),"helper-text":$.helperText,"helper-state":$.helperState},{label:s.withCtx(()=>[s.renderSlot($.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:S})=>[s.createVNode(ge,{class:"cursor-text","append-icon":$.appendIcon,"prepend-icon":$.prependIcon,focused:s.unref(o),invalid:S,"show-valid-border":$.showValidBorder},{prepend:s.withCtx(()=>[s.renderSlot($.$slots,"prepend",{},void 0,!0)]),append:s.withCtx(()=>[s.renderSlot($.$slots,"append",{},()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex items-center justify-center",{"mr-32":$.showSteppers}])},[$.appendText?(s.openBlock(),s.createElementBlock("div",G$,s.toDisplayString($.appendText),1)):s.createCommentVNode("",!0),$.appendIcon?(s.openBlock(),s.createBlock(j,{key:1,name:$.appendIcon,size:"md",color:$.disabled?"#C7C7CC":"#1C1C1E"},null,8,["name","color"])):s.createCommentVNode("",!0)],2)],!0),$.showSteppers?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["fm-stepper-field__stepper__container",s.unref(o)?"right-[6px]":"right-[7px]"])},[s.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onMousedown:w[2]||(w[2]=()=>u($.step)),onFocus:w[3]||(w[3]=(...x)=>s.unref(r)&&s.unref(r)(...x)),onBlur:w[4]||(w[4]=(...x)=>s.unref(i)&&s.unref(i)(...x))},[s.createVNode(j,{name:"expand_less",size:"md",color:$.disabled||g.value?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32),s.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onMousedown:w[5]||(w[5]=()=>u(-$.step)),onFocus:w[6]||(w[6]=(...x)=>s.unref(r)&&s.unref(r)(...x)),onBlur:w[7]||(w[7]=(...x)=>s.unref(i)&&s.unref(i)(...x))},[s.createVNode(j,{name:"expand_more",size:"md",color:$.disabled||y.value?"#C7C7CC":"#1C1C1E"},null,8,["color"])],32)],2)):s.createCommentVNode("",!0)]),default:s.withCtx(()=>[s.createElementVNode("input",{ref_key:"inputEl",ref:l,class:"fm-stepper-field--input",type:"text",inputMode:$.inputmode,value:m.value,placeholder:$.placeholder,readOnly:$.readonly,onInput:h,onFocus:w[0]||(w[0]=(...x)=>s.unref(r)&&s.unref(r)(...x)),onBlur:w[1]||(w[1]=(...x)=>s.unref(i)&&s.unref(i)(...x)),onKeydown:p},null,40,U$)]),_:2},1032,["append-icon","prepend-icon","focused","invalid","show-valid-border"])]),"helper-text":s.withCtx(()=>[s.renderSlot($.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-d5ed159e"]]),X$=["value","placeholder","minlength","maxlength","readOnly","disabled"],K$=J(s.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const n=K(t,"modelValue"),{isFocused:o,focus:i,blur:r}=Wn(),l=a=>{n.value=a.target.value};return(a,d)=>(s.openBlock(),s.createBlock(Pe,{modelValue:s.unref(n),"onUpdate:modelValue":d[2]||(d[2]=c=>s.isRef(n)?n.value=c:null),label:a.label,disabled:a.disabled,required:a.labelMark==="required",optional:a.labelMark==="optional",info:a.labelInfo,rules:a.rules,focused:s.unref(o),"helper-text":a.helperText,"helper-state":a.helperState},s.createSlots({label:s.withCtx(()=>[s.renderSlot(a.$slots,"label",{},void 0,!0)]),default:s.withCtx(({invalid:c})=>[s.createElementVNode("div",{class:s.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":s.unref(o),"fm-textarea__container--invalid":!!s.unref(n)&&c,"fm-textarea__container--valid":a.showValidBorder&&a.showSuccess&&!!s.unref(n)&&!c,"fm-textarea__container--disabled":a.disabled})},[s.createElementVNode("textarea",{class:s.normalizeClass({"fm-textarea--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!a.disabled,"fm-color-typo-disabled":a.disabled}),value:s.unref(n),placeholder:a.placeholder,minlength:a.minLength,maxlength:a.maxLength,readOnly:a.readonly,disabled:a.disabled,onInput:l,onFocus:d[0]||(d[0]=(...u)=>s.unref(i)&&s.unref(i)(...u)),onBlur:d[1]||(d[1]=(...u)=>s.unref(r)&&s.unref(r)(...u))},null,42,X$)],2)]),"helper-text":s.withCtx(()=>[s.renderSlot(a.$slots,"helper-text",{},void 0,!0)]),_:2},[a.showWordCount?{name:"helper-append",fn:s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass([a.disabled?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},s.toDisplayString(a.maxLength?`${s.unref(n).length} / ${a.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),[["__scopeId","data-v-280a005d"]]),Z$={class:"flex flex-col fm-time-input items-center"},J$=["value"],hc=J(s.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value","update:cycle"],setup(t,{emit:e}){const n=t,o=e,i=s.ref();function r(u){i.value&&(i.value.value=u)}s.watch(()=>n.modelValue,r);function l(){if(!i.value)return;const u=a(i.value.value);if(u==null||u>n.max||u<n.min){r(n.modelValue);return}o("update:model-value",u)}function a(u){return u&&/^\d+$/.test(u)?Number(u):null}function d(){o("update:model-value",a(n.modelValue)+1)}function c(){o("update:model-value",a(n.modelValue)-1)}return(u,f)=>(s.openBlock(),s.createElementBlock("div",Z$,[s.createElementVNode("div",{class:"fm-time-input__scroller",onClick:d},[s.createVNode(j,{name:"expand_less",size:"lg"})]),s.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onInput:l},null,40,J$),s.createElementVNode("div",{class:"fm-time-input__scroller",onClick:c},[s.createVNode(j,{name:"expand_more",size:"lg"})])]))}}),[["__scopeId","data-v-e8ddb125"]]);var Xe=(t=>(t.AM="AM",t.PM="PM",t))(Xe||{});function Ke(t){return t.toString().padStart(2,"0")}function Q$(t){const[e,n]=t.split(":"),o=Number(e),i=Number(n),r=o>11?"PM":"AM";let l=o;return l===0?l=12:l>12&&(l-=12),`${Ke(l)}:${Ke(i)}:${r}`}function De(t){const[e,n,o]=Q$(t).split(":");return{hours:Number(e),minutes:Number(n),period:o}}function Hs({hours:t,minutes:e,period:n}){let o=t;return n==="PM"?o=t===12?t:t+12:t===12&&(o=0),`${Ke(o)}:${Ke(e)}`}const e3={class:"flex fm-time-input gap-16 items-center"},t3=s.createElementVNode("div",{class:"fm-typo-title-sm-700"}," : ",-1),n3={class:"fm-time-input-periods"},o3=["onClick"],Qo=s.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e;function i(r){const l={hours:r.hours??n.modelValue.hours,minutes:r.minutes??n.modelValue.minutes,period:r.period??n.modelValue.period},a=n.modelValue.hours;(a===12&&l.hours===11||a===11&&l.hours===12)&&(l.period=n.modelValue.period===Xe.AM?Xe.PM:Xe.AM),l.hours>12?l.hours=1:l.hours<1&&(l.hours=12),l.minutes>59?l.minutes=0:l.minutes<0&&(l.minutes=59),o("update:model-value",l)}return(r,l)=>(s.openBlock(),s.createElementBlock("div",e3,[s.createVNode(hc,{"model-value":s.unref(Ke)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":l[0]||(l[0]=a=>i({hours:a}))},null,8,["model-value"]),t3,s.createVNode(hc,{"model-value":s.unref(Ke)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":l[1]||(l[1]=a=>i({minutes:a}))},null,8,["model-value"]),s.createElementVNode("div",n3,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(Xe),a=>(s.openBlock(),s.createElementBlock("div",{key:a,class:s.normalizeClass([{"fm-time-input-period__selected":a===t.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:a})},s.toDisplayString(a),11,o3))),128))])]))}});function i3(t){for(;t;){if(s3(t))return t;t=t.parentElement}return document.scrollingElement}function s3(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class r3{constructor(e,n){I(this,"onScroll");I(this,"scrollParent");this.onScroll=n,this.scrollParent=i3(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const l3={class:"fm-menu__wrapper"},pc=J(s.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=s.ref(!1),r=s.ref(null),l=s.ref(null),{floatingStyles:a}=jn(r,l,{middleware:[In(4),Hn()],placement:o.placement,whileElementsMounted:zn});let d;const c=n;e({show:()=>{i.value||(i.value=!0,c("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,c("dropdown-changed",i.value))}});const u=p=>{p.preventDefault(),p.stopPropagation(),!o.disabled&&(i.value=!i.value,c("dropdown-changed",i.value))},f=p=>{if(!i.value)return;const m=p.path||p.composedPath();for(const g of m)if(g==r.value||g==l.value)return;i.value=!1,c("dropdown-changed",i.value)},h=()=>{c("dropdown-changed",!1)};return s.watch(()=>o.showMenu,p=>i.value=p),s.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",f),d=new r3(r.value,h),d.bindScroll()}),s.onUnmounted(()=>{window.removeEventListener("click",f),d.unbindScroll()}),(p,m)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{ref_key:"anchorEl",ref:r,class:"fm-menu",onClick:u},[s.renderSlot(p.$slots,"menu-button",{},void 0,!0)],512),i.value?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"menuEl",ref:l,class:s.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:s.normalizeStyle(s.unref(a))},[s.renderSlot(p.$slots,"menu-wrapper",{},()=>[s.createElementVNode("div",l3,[s.renderSlot(p.$slots,"menu-content",{},void 0,!0)])],!0)],6)):s.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),a3={class:"flex gap-8"},d3={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[343px]"},c3=s.createElementVNode("div",{class:"fm-typo-title-sm-700 mb-8"},"Enter time",-1),u3={class:"flex items-center justify-center py-16 w-full"},f3={class:"flex justify-end"},h3=s.defineComponent({__name:"FmTimePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const n=K(t,"modelValue"),o=s.ref(null),i=s.computed(()=>{if(!n.value)return null;const{hours:u,minutes:f,period:h}=De(n.value);return`${Ke(u)}:${Ke(f)} ${h}`});function r(){if(!o.value){n.value=null;return}const u=Hs(o.value);n.value=u,a()}s.onMounted(()=>{n.value&&(o.value=De(n.value))}),s.watch(()=>n.value,u=>{u&&(o.value=De(u))});const l=s.ref();function a(){var u;(u=l.value)==null||u.hide()}const d=s.ref(!1);function c(u){u?o.value=De(n.value??"00:00"):o.value=n.value?De(n.value):null,d.value=u}return(u,f)=>(s.openBlock(),s.createBlock(Pe,{modelValue:s.unref(n),"onUpdate:modelValue":f[1]||(f[1]=h=>s.isRef(n)?n.value=h:null),label:u.label,disabled:u.disabled,required:u.labelMark==="required",optional:u.labelMark==="optional",info:u.labelInfo,rules:u.rules,focused:d.value,"helper-text":u.helperText,"helper-state":u.helperState},{label:s.withCtx(()=>[s.renderSlot(u.$slots,"label")]),default:s.withCtx(({invalid:h})=>[s.createVNode(pc,{ref_key:"dropdownRef",ref:l,onDropdownChanged:c},{"menu-button":s.withCtx(()=>[s.createVNode(ge,{class:s.normalizeClass(u.disabled?"cursor-not-allowed":"cursor-pointer"),focused:d.value,invalid:h,"show-valid-border":u.showValidBorder},{default:s.withCtx(()=>[s.createElementVNode("div",a3,[s.createVNode(j,{name:"schedule",outline:!d.value},null,8,["outline"]),s.createElementVNode("div",{class:s.normalizeClass(["grow",{"text-fm-color-typo-disabled":!i.value}])},s.toDisplayString(i.value??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":s.withCtx(()=>[s.createElementVNode("div",d3,[c3,s.createElementVNode("div",u3,[s.createVNode(Qo,{"model-value":o.value??{hours:0,minutes:0,period:s.unref(Xe).AM},"onUpdate:modelValue":f[0]||(f[0]=p=>o.value=p)},null,8,["model-value"])]),s.createElementVNode("div",f3,[s.createVNode(X,{label:"Cancel",size:"md",variant:"tertiary",onClick:a}),s.createVNode(X,{label:"Apply",size:"md",variant:"primary",onClick:r})])])]),_:2},1536)]),"helper-text":s.withCtx(()=>[s.renderSlot(u.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),p3={class:"flex gap-8"},m3={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300"},g3=s.createElementVNode("div",{class:"fm-typo-title-sm-700 mb-8"},"Enter time",-1),y3={class:"flex flex-col gap-16 items-center justify-center py-16 w-full"},b3=s.createElementVNode("div",{class:"fm-typo-body-lg-700 text-left w-full"}," Starting Time ",-1),$3=s.createElementVNode("div",{class:"fm-typo-body-lg-700 text-left w-full"}," Ending Time ",-1),_3={class:"flex gap-8 items-center justify-end"},w3=s.defineComponent({__name:"FmTimeRangePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const n=K(t,"modelValue"),o=s.ref(null),i=s.ref(null),r=s.computed(()=>{const p=Array.isArray(n.value);return!n.value||!p||p&&n.value.every(m=>!f(m))?null:n.value.map(m=>{const{hours:g,minutes:y,period:b}=De(m);return`${Ke(g)}:${Ke(y)} ${b}`}).join(" - ")});function l(){if(!o.value||!i.value){n.value=null;return}let p=!1;const m=o.value,g=i.value;(m.period===Xe.PM&&g.period===Xe.AM||m.period===g.period&&(m.hours<g.hours||m.minutes<g.minutes))&&(p=!0);const y=Hs(o.value),b=Hs(i.value);n.value=p?[b,y]:[y,b],d()}s.onMounted(()=>{Array.isArray(n.value)&&n.value.every(p=>!!p)&&(o.value=De(n.value[0]),i.value=De(n.value[1]))}),s.watch(()=>n.value,p=>{const m=Array.isArray(p);p&&m&&p.every(g=>f(g))&&(o.value=De(p[0]),i.value=De(p[1]))});const a=s.ref();function d(){var p;(p=a.value)==null||p.hide()}const c=s.ref(!1);function u(p){var m,g,y,b;p?(o.value=De(((y=n.value)==null?void 0:y[0])??"00:00"),i.value=De(((b=n.value)==null?void 0:b[1])??"23:59")):(o.value=(m=n.value)!=null&&m[0]?De(n.value[0]):null,i.value=(g=n.value)!=null&&g[1]?De(n.value[1]):null),c.value=p}const f=p=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(p),h=s.computed(()=>_e(o.value,i.value));return(p,m)=>(s.openBlock(),s.createBlock(Pe,{modelValue:s.unref(n),"onUpdate:modelValue":m[2]||(m[2]=g=>s.isRef(n)?n.value=g:null),label:p.label,disabled:p.disabled,required:p.labelMark==="required",optional:p.labelMark==="optional",info:p.labelInfo,rules:p.rules,focused:c.value,"helper-text":p.helperText,"helper-state":p.helperState},{label:s.withCtx(()=>[s.renderSlot(p.$slots,"label")]),default:s.withCtx(({invalid:g})=>[s.createVNode(Cs,{ref_key:"dropdownRef",ref:a,width:343,onPopoverChanged:u},{"popover-button":s.withCtx(()=>[s.createVNode(ge,{class:s.normalizeClass(p.disabled?"cursor-not-allowed":"cursor-pointer"),focused:c.value,invalid:g,"show-valid-border":p.showValidBorder},{default:s.withCtx(()=>[s.createElementVNode("div",p3,[s.createVNode(j,{name:"schedule",outline:!c.value},null,8,["outline"]),s.createElementVNode("div",{class:s.normalizeClass(["grow",{"text-fm-color-typo-disabled":!r.value}])},s.toDisplayString(r.value??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),default:s.withCtx(()=>[s.createElementVNode("div",m3,[g3,s.createElementVNode("div",y3,[s.createElementVNode("div",null,[b3,s.createVNode(Qo,{"model-value":o.value??{hours:0,minutes:0,period:s.unref(Xe).AM},"onUpdate:modelValue":m[0]||(m[0]=y=>o.value=y)},null,8,["model-value"])]),s.createElementVNode("div",null,[$3,s.createVNode(Qo,{"model-value":i.value??{hours:0,minutes:0,period:s.unref(Xe).AM},"onUpdate:modelValue":m[1]||(m[1]=y=>i.value=y)},null,8,["model-value"])])]),s.createElementVNode("div",_3,[s.createVNode(X,{label:"Cancel",variant:"tertiary",size:"md",onClick:d}),s.createVNode(X,{label:"Apply",variant:"primary",size:"md",disabled:h.value,onClick:l},null,8,["disabled"])])])]),_:2},1536)]),"helper-text":s.withCtx(()=>[s.renderSlot(p.$slots,"helper-text")]),_:3},8,["modelValue","label","disabled","required","optional","info","rules","focused","helper-text","helper-state"]))}}),js=J(s.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass({"fm-list--separator":e.separator,activeClass:e.activeClass})},[s.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-884ba127"]]),Ws=J(s.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},label:{default:""},sublabel:{default:""}},setup(t){const e=t;return(n,o)=>{const i=s.resolveDirective("wave");return s.withDirectives((s.openBlock(),s.createBlock(e.tag,{class:s.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":n.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":n.clickable&&!n.disabled,"cursor-not-allowed":n.clickable&&n.disabled}),onClick:o[0]||(o[0]=s.withModifiers(()=>{},["prevent"]))},{default:s.withCtx(()=>[s.renderSlot(n.$slots,"prepend",{},void 0,!0),s.renderSlot(n.$slots,"default",{},()=>[s.createElementVNode("div",null,[s.createElementVNode("div",{class:s.normalizeClass(`fm-typo-body-lg-400 line-clamp-1 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},s.toDisplayString(n.label),3),n.sublabel?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(`fm-typo-body-md-400 line-clamp-2 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},s.toDisplayString(n.sublabel),3)):s.createCommentVNode("",!0)])],!0),n.$slots.append?(s.openBlock(),s.createBlock(Wt,{key:0})):s.createCommentVNode("",!0),s.renderSlot(n.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[i,n.clickable&&!n.disabled]])}}}),[["__scopeId","data-v-90312222"]]),C3={class:"fm-typo-body-lg-700 mx-8 p-12 text-fm-color-typo-primary"},x3=s.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",C3,s.toDisplayString(e.label),1))}}),k3=t=>(s.pushScopeId("data-v-c5236366"),t=t(),s.popScopeId(),t),S3={class:"relative"},v3={class:"fm-progress-linear fm-typo-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},M3=k3(()=>s.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),D3=J(s.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=s.computed(()=>{const o=new Array,i={};return e.color?(sn(e.color)?i["background-color"]=e.color:o.push(`bg-fm-color-${e.color}`),{class:o.join(" "),style:i}):{class:o.join(" "),style:i}});return(o,i)=>(s.openBlock(),s.createElementBlock("div",S3,[s.createElementVNode("div",v3,[M3,s.createElementVNode("span",{class:s.normalizeClass(["dash-1",n.value.class]),style:s.normalizeStyle(n.value.style)},null,6),s.createElementVNode("span",{class:s.normalizeClass(["dash-2",n.value.class]),style:s.normalizeStyle(n.value.style)},null,6)])]))}}),[["__scopeId","data-v-c5236366"]]),E3={class:"fm-side-sheet"},B3={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},V3={key:0},P3={class:"h-full overflow-y-auto"},R3={class:"pt-24"},F3=J(s.defineComponent({__name:"FmSideSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},closeButton:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t){const e=t,n=s.ref(null),o=K(e,"modelValue"),i=r=>{e.dismissAway&&n.value&&r.target===n.value&&(o.value=!1)};return(r,l)=>(s.openBlock(),s.createElementBlock("div",null,[s.createElementVNode("div",{onClick:l[0]||(l[0]=a=>o.value=!0)},[s.renderSlot(r.$slots,"side-sheet-button",{},void 0,!0)]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createVNode(s.Transition,null,{default:s.withCtx(()=>[s.unref(o)?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"overlayRef",ref:n,class:"fm-side-sheet--container",onClick:l[2]||(l[2]=a=>i(a))},[s.createVNode(s.Transition,{name:"slide",appear:""},{default:s.withCtx(()=>[s.createElementVNode("div",E3,[s.createElementVNode("div",B3,[s.renderSlot(r.$slots,"side-sheet-header",{},()=>[r.header?(s.openBlock(),s.createElementBlock("div",V3,s.toDisplayString(r.header),1)):s.createCommentVNode("",!0)],!0),r.closeButton?(s.openBlock(),s.createBlock(j,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:l[1]||(l[1]=a=>o.value=!1)})):s.createCommentVNode("",!0)]),s.createElementVNode("div",P3,[s.renderSlot(r.$slots,"default",{},void 0,!0)]),s.createElementVNode("div",R3,[s.renderSlot(r.$slots,"side-sheet-footer",{},void 0,!0)])])]),_:3})],512)):s.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-c002a2ae"]]),N3={class:"flex"},A3={key:0,class:"mt-8"},mc=J(s.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0}},emits:["onDismiss","onAction"],setup(t,{emit:e}){const n=t,o=e,i=s.computed(()=>{switch(n.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${n.variant}`)}}),r=s.computed(()=>n.title?{text:n.title,classes:"fm-typo-body-lg-700"}:{text:n.description,classes:""}),l=s.computed(()=>n.bgColor?sn(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),a=s.computed(()=>n.color?sn(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(d,c)=>(s.openBlock(),s.createElementBlock("div",s.mergeProps(l.value,{class:"fm-corner-radius-lg fm-shadow-light-400 fm-snackbar px-24 py-16"}),[s.createElementVNode("div",N3,[i.value.icon?(s.openBlock(),s.createBlock(j,{key:0,name:i.value.icon.name,color:n.color??i.value.icon.color,class:"mr-12"},null,8,["name","color"])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(`${r.value.classes} grow ellipsis`)},s.toDisplayString(r.value.text),3),n.dismissable?(s.openBlock(),s.createBlock(j,{key:1,style:{"{ flex":"none}"},name:"close",class:"cursor-pointer",onClick:c[0]||(c[0]=()=>o("onDismiss"))})):s.createCommentVNode("",!0)]),n.title&&n.description?(s.openBlock(),s.createElementBlock("div",A3,s.toDisplayString(n.description),1)):s.createCommentVNode("",!0),s.renderSlot(d.$slots,"actions",{},()=>[n.action?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0},a.value,{class:"mt-16 fm-typo-body-lg-700"}),[s.createElementVNode("span",{class:"cursor-pointer",onClick:c[1]||(c[1]=()=>o("onAction"))},s.toDisplayString(n.action),1)],16)):s.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-e2ff7141"]]),O3={key:0,class:"fm-step-description fm-typo-body-sm-400 line-clamp-1 mt-4"},Ys=s.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["flex flex-col",t.disabled?"text-fm-color-typo-disabled":""])},[s.createElementVNode("div",{class:s.normalizeClass(["fm-step-title line-clamp-2",t.titleBold?"fm-typo-body-xl-700":"fm-typo-body-md-400"])},s.toDisplayString(t.title),3),t.description?(s.openBlock(),s.createElementBlock("div",O3,s.toDisplayString(t.description),1)):s.createCommentVNode("",!0)],2))}}),I3=["data-title","data-description","data-disabled"],T3={class:"flex fm-step-container gap-12 grow"},L3=J(s.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=s.inject(xr);function i(){r.value||o(e.value)}const r=s.computed(()=>e.disabled?e.disabled():!1),l=s.computed(()=>e.error?e.error():!1),a=s.computed(()=>n()===e.value),d=s.computed(()=>e.complete()),c=s.computed(()=>a.value||d.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),u=s.computed(()=>a.value?{className:"bg-fm-color-primary"}:l.value?{config:{name:"warning",color:"system-error-300"}}:r.value?{className:"border-2 border-fm-color-neutral-gray-200"}:d.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(f,h)=>{const p=s.resolveDirective("wave");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":r.value,class:s.normalizeClass(`fm-step gap-4 grow ${r.value?"cursor-not-allowed":"cursor-pointer"}`),onClick:s.withModifiers(i,["stop"])},[s.createElementVNode("div",null,[s.createElementVNode("div",{class:s.normalizeClass(`fm-step-indicator ${c.value}`)},null,2)]),s.createElementVNode("div",T3,[s.createElementVNode("div",{class:s.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",u.value.className])},[u.value.config?(s.openBlock(),s.createBlock(j,{key:0,name:u.value.config.name,color:u.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):s.createCommentVNode("",!0)],2),s.createVNode(Ys,{title:t.title,description:t.description,disabled:r.value,class:"grow"},null,8,["title","description","disabled"])])],10,I3)),[[p,!r.value]])}}}),[["__scopeId","data-v-ee172cad"]]),z3={class:"hidden items-center xs:flex"},H3={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},j3=s.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=u=>{o("update:model-value",u)};s.provide(xr,{currentStep:()=>n.modelValue,goToStep:i});const r=s.ref(),l=s.ref([]),a=s.computed(()=>l.value[n.modelValue-1]),d=s.computed(()=>`${n.modelValue} of ${l.value.length}`),c=()=>{var f;const u=Array.from(((f=r.value)==null?void 0:f.querySelectorAll(":scope > .fm-step"))??[]);l.value=u.map(h=>({title:h.dataset.title??"",description:h.dataset.description,disabled:h.dataset.disabled=="true"}))};return s.onMounted(()=>{c()}),(u,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[s.createElementVNode("div",{ref_key:"stepperRef",ref:r,class:s.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[s.renderSlot(u.$slots,"default")],2),s.createElementVNode("div",z3,[s.createVNode(ln,{"current-step":t.modelValue,"total-steps":l.value.length,class:"mr-12"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(d.value),1)]),_:1},8,["current-step","total-steps"]),a.value?(s.openBlock(),s.createBlock(Ys,{key:0,class:"grow","title-bold":"",title:a.value.title,description:a.value.description,disabled:a.value.disabled},null,8,["title","description","disabled"])):s.createCommentVNode("",!0)]),u.$slots.contents?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[s.renderSlot(u.$slots,"contents"),s.createElementVNode("div",H3,[s.renderSlot(u.$slots,"actions")])],2)):s.createCommentVNode("",!0)],2))}});let W3=0;function Y3(){return W3++}const U3=t=>(s.pushScopeId("data-v-57d43f79"),t=t(),s.popScopeId(),t),G3=["disabled"],q3=[U3(()=>s.createElementVNode("div",{class:"fm-tab__indicator"},null,-1))],gc=J(s.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>Y3()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=s.ref(!1),o=t,i=e,r=s.ref(!1);function l(f){n.value=f}const a=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},d=f=>{o.children.length!==0&&(r.value=f)},c=s.computed(()=>o.children.length>0?o.children.some(f=>f.value===o.modelValue):o.modelValue===o.value),u=f=>{r.value=!1,i("update:modelValue",f)};return(f,h)=>(s.openBlock(),s.createBlock(at,{"show-menu":r.value,disabled:f.children.length===0,class:s.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":f.vertical}]),placement:f.vertical?"right-start":"bottom-start",onMenuChanged:d},{"menu-button":s.withCtx(()=>[s.createElementVNode("button",{class:s.normalizeClass(["fm-tab",`fm-tab--${f.vertical?"vertical":"horizontal"}`,f.disabled?"cursor-not-allowed":"cursor-pointer",{"fm-tab--selected":c.value}]),disabled:f.disabled,type:"button",onMousedown:h[0]||(h[0]=()=>l(!0)),onMouseup:h[1]||(h[1]=()=>l(!1)),onMouseleave:h[2]||(h[2]=()=>l(!1)),onClick:a},[s.renderSlot(f.$slots,"prepend",{},void 0,!0),f.icon?(s.openBlock(),s.createBlock(j,{key:0,name:f.icon,outline:!n.value&&!c.value,color:f.disabled?"neutral-gray-200":c.value?"primary":"neutral-black",size:"md"},null,8,["name","outline","color"])):s.createCommentVNode("",!0),f.label?(s.openBlock(),s.createElementBlock("span",{key:1,class:s.normalizeClass(["fm-typo-body-lg-700 text-fm-color-typo-primary row-start-1 text-left",c.value?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},s.toDisplayString(f.label),3)):s.createCommentVNode("",!0),f.label?(s.openBlock(),s.createElementBlock("span",{key:2,class:s.normalizeClass(["fm-typo-body-lg-400 row-start-1 text-left",f.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary",!c.value||f.disabled?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},s.toDisplayString(f.label),3)):s.createCommentVNode("",!0),f.badge?(s.openBlock(),s.createBlock(Mt,{key:3,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0),f.children.length>0?(s.openBlock(),s.createBlock(j,{key:4,size:"md",name:r.value?"expand_less":"expand_more"},null,8,["name"])):s.createCommentVNode("",!0),s.renderSlot(f.$slots,"append",{},void 0,!0),c.value?(s.openBlock(),s.createElementBlock("div",{key:5,class:s.normalizeClass([`fm-tab__indicator__wrapper--${f.vertical?"vertical":"horizontal"}`])},q3,2)):s.createCommentVNode("",!0)],42,G3)]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.children,p=>(s.openBlock(),s.createBlock(Me,{key:p.value,"model-value":o.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,onClick:m=>u(p.value)},{append:s.withCtx(()=>[p.badge?(s.openBlock(),s.createBlock(Mt,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:3},8,["show-menu","disabled","class","placement"]))}}),[["__scopeId","data-v-57d43f79"]]);function X3(){const t=s.inject(kr);if(!t)throw new Error("No provider");return t}function K3(){var t;return(t=s.getCurrentInstance())==null?void 0:t.emit}function Z3(){const t=K3();return{emitData(e){t==null||t("dialog:emit-data",e)}}}function J3(){return s.inject(bi)}const Q3=s.defineComponent({__name:"FmTableToolbar",props:{searchModel:{},searchable:{type:Boolean},filterable:{type:Boolean},chips:{default:()=>[]},actions:{default:()=>[]}},emits:["update:global-search-model","click:remove-chip"],setup(t){const e=t,{breakpoints:n}=Nn(),o=s.computed(()=>{const f=[];e.searchable&&f.push({label:"Search",icon:"search",key:"search"}),e.filterable&&f.push({label:"Filter",icon:"filter_alt",key:"filter"});const h=f.concat(e.actions);if(n.value.xs){const[$,w,S,...x]=h;return x.length===0?{actionButtons:[$,w,S].filter(V=>V),collapse:x}:{actionButtons:[$,w].filter(V=>V),collapse:[S,...x]}}const[p,m,g,y,...b]=h;return b.length===0?{actionButtons:[p,m,g,y].filter($=>$),collapse:b}:{actionButtons:[p,m,g].filter($=>$),collapse:[y,...b]}}),i=s.ref(!1);function r(f){if(n.value.xs){f.stopPropagation(),i.value=!0;return}}const l=K(e,"searchModel"),a=s.ref(),d=s.ref(),c=s.ref(24);function u(){var p,m,g,y;const f=(p=a.value)==null?void 0:p.scrollWidth,h=(m=d.value)==null?void 0:m.scrollWidth;if(!(typeof f!="number"||typeof h!="number"))if(n.value.xs){const b=Math.max((((y=(g=d.value)==null?void 0:g.children)==null?void 0:y.length)??0)-1,0);c.value=h-b*56}else c.value=f-h+40}return s.onMounted(()=>{e.searchable&&new ResizeObserver(()=>{u()}).observe(a.value)}),(f,h)=>(s.openBlock(),s.createElementBlock(s.Fragment,null,[s.createElementVNode("div",{ref_key:"resizeableParentRef",ref:a,class:"flex gap-8 items-center justify-between transition-all xs:flex-wrap-reverse xs:w-full"},[s.renderSlot(f.$slots,"chips",{},()=>[s.createVNode(_i,{class:s.normalizeClass(["min-w-0",{"xs:hidden":f.chips.length===0}]),items:f.chips,removable:"",onChipClosed:h[0]||(h[0]=p=>f.$emit("click:remove-chip",p))},null,8,["class","items"])]),s.createElementVNode("div",{ref_key:"actionsRef",ref:d,class:"flex gap-8 xs:justify-end xs:w-full"},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.value.actionButtons,p=>(s.openBlock(),s.createElementBlock(s.Fragment,{key:p.key},[p.key==="search"?s.renderSlot(f.$slots,"action-search",{key:0},()=>[s.createVNode(Ls,{"model-value":s.unref(l),"onUpdate:modelValue":h[1]||(h[1]=m=>s.isRef(l)?l.value=m:null),collapsible:"","max-width":c.value},null,8,["model-value","max-width"])]):s.renderSlot(f.$slots,`action-${p.key}`,{key:1},()=>[s.createVNode(X,{"prepend-icon":p.icon,variant:"tertiary",onClick:m=>f.$emit(`click:action-${p.key}`)},null,8,["prepend-icon","onClick"])])],64))),128)),o.value.collapse.length?(s.openBlock(),s.createBlock(at,{key:0},{"menu-button":s.withCtx(()=>[s.createVNode(X,{"prepend-icon":"more_vert",variant:"tertiary",onClick:r})]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.value.collapse,p=>(s.openBlock(),s.createBlock(Me,{key:p.key,label:p.label,icon:p.icon,onClick:m=>{f.$emit(`click:action-${p.key}`),i.value=!1}},null,8,["label","icon","onClick"]))),128))]),_:1})):s.createCommentVNode("",!0),f.$slots.append?s.renderSlot(f.$slots,"append",{key:1}):s.createCommentVNode("",!0)],512)],512),s.createVNode(gi,{modelValue:i.value,"onUpdate:modelValue":h[2]||(h[2]=p=>i.value=p),"dismiss-away":""},{default:s.withCtx(()=>[s.createVNode(js,null,{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.value.collapse,p=>(s.openBlock(),s.createBlock(Ws,{key:p.key,label:p.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:m=>{f.$emit(`click:action-${p.key}`),i.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["modelValue"])],64))}});/**
26
+ `):t}function L0(t,e){const{element:n,datasetIndex:o,index:i}=e,s=t.getDatasetMeta(o).controller,{label:l,value:a}=s.getLabelAndValue(i);return{chart:t,label:l,parsed:s.getParsed(i),raw:t.data.datasets[o].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:o,element:n}}function Wa(t,e){const n=t.chart.ctx,{body:o,footer:i,title:s}=t,{boxWidth:l,boxHeight:a}=e,d=he(e.bodyFont),c=he(e.titleFont),u=he(e.footerFont),f=s.length,h=i.length,p=o.length,m=$e(e.padding);let g=m.height,y=0,b=o.reduce(($,w)=>$+w.before.length+w.lines.length+w.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,f&&(g+=f*c.lineHeight+(f-1)*e.titleSpacing+e.titleMarginBottom),b){const $=e.displayColors?Math.max(a,d.lineHeight):d.lineHeight;g+=p*$+(b-p)*d.lineHeight+(b-1)*e.bodySpacing}h&&(g+=e.footerMarginTop+h*u.lineHeight+(h-1)*e.footerSpacing);let _=0;const x=function($){y=Math.max(y,n.measureText($).width+_)};return n.save(),n.font=c.string,ee(t.title,x),n.font=d.string,ee(t.beforeBody.concat(t.afterBody),x),_=e.displayColors?l+2+e.boxPadding:0,ee(o,$=>{ee($.before,x),ee($.lines,x),ee($.after,x)}),_=0,n.font=u.string,ee(t.footer,x),n.restore(),y+=m.width,{width:y,height:g}}function H0(t,e){const{y:n,height:o}=e;return n<o/2?"top":n>t.height-o/2?"bottom":"center"}function j0(t,e,n,o){const{x:i,width:s}=o,l=n.caretSize+n.caretPadding;if(t==="left"&&i+s+l>e.width||t==="right"&&i-s-l<0)return!0}function W0(t,e,n,o){const{x:i,width:s}=n,{width:l,chartArea:{left:a,right:d}}=t;let c="center";return o==="center"?c=i<=(a+d)/2?"left":"right":i<=s/2?c="left":i>=l-s/2&&(c="right"),j0(c,t,e,n)&&(c="center"),c}function Ya(t,e,n){const o=n.yAlign||e.yAlign||H0(t,n);return{xAlign:n.xAlign||e.xAlign||W0(t,e,n,o),yAlign:o}}function Y0(t,e){let{x:n,width:o}=t;return e==="right"?n-=o:e==="center"&&(n-=o/2),n}function U0(t,e,n){let{y:o,height:i}=t;return e==="top"?o+=n:e==="bottom"?o-=i+n:o-=i/2,o}function Ua(t,e,n,o){const{caretSize:i,caretPadding:s,cornerRadius:l}=t,{xAlign:a,yAlign:d}=n,c=i+s,{topLeft:u,topRight:f,bottomLeft:h,bottomRight:p}=Rt(l);let m=Y0(e,a);const g=U0(e,d,c);return d==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(u,h)+i:a==="right"&&(m+=Math.max(f,p)+i),{x:ge(m,0,o.width-e.width),y:ge(g,0,o.height-e.height)}}function No(t,e,n){const o=$e(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-o.right:t.x+o.left}function Ga(t){return qe([],rt(t))}function G0(t,e,n){return wt(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function qa(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Xa={beforeTitle:Qe,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,o=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(o>0&&e.dataIndex<o)return n[e.dataIndex]}return""},afterTitle:Qe,beforeBody:Qe,beforeLabel:Qe,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return J(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Qe,afterBody:Qe,beforeFooter:Qe,footer:Qe,afterFooter:Qe};function ve(t,e,n,o){const i=t[e].call(n,o);return typeof i>"u"?Xa[e].call(n,o):i}class ur extends it{constructor(e){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=e.chart,this.options=e.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(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,o=this.options.setContext(this.getContext()),i=o.enabled&&n.options.animation&&o.animations,s=new Il(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=G0(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:o}=n,i=ve(o,"beforeTitle",this,e),s=ve(o,"title",this,e),l=ve(o,"afterTitle",this,e);let a=[];return a=qe(a,rt(i)),a=qe(a,rt(s)),a=qe(a,rt(l)),a}getBeforeBody(e,n){return Ga(ve(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:o}=n,i=[];return ee(e,s=>{const l={before:[],lines:[],after:[]},a=qa(o,s);qe(l.before,rt(ve(a,"beforeLabel",this,s))),qe(l.lines,ve(a,"label",this,s)),qe(l.after,rt(ve(a,"afterLabel",this,s))),i.push(l)}),i}getAfterBody(e,n){return Ga(ve(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:o}=n,i=ve(o,"beforeFooter",this,e),s=ve(o,"footer",this,e),l=ve(o,"afterFooter",this,e);let a=[];return a=qe(a,rt(i)),a=qe(a,rt(s)),a=qe(a,rt(l)),a}_createItems(e){const n=this._active,o=this.chart.data,i=[],s=[],l=[];let a=[],d,c;for(d=0,c=n.length;d<c;++d)a.push(L0(this.chart,n[d]));return e.filter&&(a=a.filter((u,f,h)=>e.filter(u,f,h,o))),e.itemSort&&(a=a.sort((u,f)=>e.itemSort(u,f,o))),ee(a,u=>{const f=qa(e.callbacks,u);i.push(ve(f,"labelColor",this,u)),s.push(ve(f,"labelPointStyle",this,u)),l.push(ve(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=l,this.dataPoints=a,a}update(e,n){const o=this.options.setContext(this.getContext()),i=this._active;let s,l=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=Nn[o.position].call(this,i,this._eventPosition);l=this._createItems(o),this.title=this.getTitle(l,o),this.beforeBody=this.getBeforeBody(l,o),this.body=this.getBody(l,o),this.afterBody=this.getAfterBody(l,o),this.footer=this.getFooter(l,o);const d=this._size=Wa(this,o),c=Object.assign({},a,d),u=Ya(this.chart,o,c),f=Ua(o,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,s={opacity:1,x:f.x,y:f.y,width:d.width,height:d.height,caretX:a.x,caretY:a.y}}this._tooltipItems=l,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&o.external&&o.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,o,i){const s=this.getCaretPosition(e,o,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,o){const{xAlign:i,yAlign:s}=this,{caretSize:l,cornerRadius:a}=o,{topLeft:d,topRight:c,bottomLeft:u,bottomRight:f}=Rt(a),{x:h,y:p}=e,{width:m,height:g}=n;let y,b,_,x,$,w;return s==="center"?($=p+g/2,i==="left"?(y=h,b=y-l,x=$+l,w=$-l):(y=h+m,b=y+l,x=$-l,w=$+l),_=y):(i==="left"?b=h+Math.max(d,u)+l:i==="right"?b=h+m-Math.max(c,f)-l:b=this.caretX,s==="top"?(x=p,$=x-l,y=b-l,_=b+l):(x=p+g,$=x+l,y=b+l,_=b-l),w=x),{x1:y,x2:b,x3:_,y1:x,y2:$,y3:w}}drawTitle(e,n,o){const i=this.title,s=i.length;let l,a,d;if(s){const c=Jt(o.rtl,this.x,this.width);for(e.x=No(this,o.titleAlign,o),n.textAlign=c.textAlign(o.titleAlign),n.textBaseline="middle",l=he(o.titleFont),a=o.titleSpacing,n.fillStyle=o.titleColor,n.font=l.string,d=0;d<s;++d)n.fillText(i[d],c.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+a,d+1===s&&(e.y+=o.titleMarginBottom-a)}}_drawColorBox(e,n,o,i,s){const l=this.labelColors[o],a=this.labelPointStyles[o],{boxHeight:d,boxWidth:c}=s,u=he(s.bodyFont),f=No(this,"left",s),h=i.x(f),p=d<u.lineHeight?(u.lineHeight-d)/2:0,m=n.y+p;if(s.usePointStyle){const g={radius:Math.min(c,d)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=i.leftForLtr(h,c)+c/2,b=m+d/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,zi(e,g,y,b),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,zi(e,g,y,b)}else{e.lineWidth=q(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,e.strokeStyle=l.borderColor,e.setLineDash(l.borderDash||[]),e.lineDashOffset=l.borderDashOffset||0;const g=i.leftForLtr(h,c),y=i.leftForLtr(i.xPlus(h,1),c-2),b=Rt(l.borderRadius);Object.values(b).some(_=>_!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,kn(e,{x:g,y:m,w:c,h:d,radius:b}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),kn(e,{x:y,y:m+1,w:c-2,h:d-2,radius:b}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(g,m,c,d),e.strokeRect(g,m,c,d),e.fillStyle=l.backgroundColor,e.fillRect(y,m+1,c-2,d-2))}e.fillStyle=this.labelTextColors[o]}drawBody(e,n,o){const{body:i}=this,{bodySpacing:s,bodyAlign:l,displayColors:a,boxHeight:d,boxWidth:c,boxPadding:u}=o,f=he(o.bodyFont);let h=f.lineHeight,p=0;const m=Jt(o.rtl,this.x,this.width),g=function(N){n.fillText(N,m.x(e.x+p),e.y+h/2),e.y+=h+s},y=m.textAlign(l);let b,_,x,$,w,P,M;for(n.textAlign=l,n.textBaseline="middle",n.font=f.string,e.x=No(this,y,o),n.fillStyle=o.bodyColor,ee(this.beforeBody,g),p=a&&y!=="right"?l==="center"?c/2+u:c+2+u:0,$=0,P=i.length;$<P;++$){for(b=i[$],_=this.labelTextColors[$],n.fillStyle=_,ee(b.before,g),x=b.lines,a&&x.length&&(this._drawColorBox(n,e,$,m,o),h=Math.max(f.lineHeight,d)),w=0,M=x.length;w<M;++w)g(x[w]),h=f.lineHeight;ee(b.after,g)}p=0,h=f.lineHeight,ee(this.afterBody,g),e.y-=s}drawFooter(e,n,o){const i=this.footer,s=i.length;let l,a;if(s){const d=Jt(o.rtl,this.x,this.width);for(e.x=No(this,o.footerAlign,o),e.y+=o.footerMarginTop,n.textAlign=d.textAlign(o.footerAlign),n.textBaseline="middle",l=he(o.footerFont),n.fillStyle=o.footerColor,n.font=l.string,a=0;a<s;++a)n.fillText(i[a],d.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+o.footerSpacing}}drawBackground(e,n,o,i){const{xAlign:s,yAlign:l}=this,{x:a,y:d}=e,{width:c,height:u}=o,{topLeft:f,topRight:h,bottomLeft:p,bottomRight:m}=Rt(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+f,d),l==="top"&&this.drawCaret(e,n,o,i),n.lineTo(a+c-h,d),n.quadraticCurveTo(a+c,d,a+c,d+h),l==="center"&&s==="right"&&this.drawCaret(e,n,o,i),n.lineTo(a+c,d+u-m),n.quadraticCurveTo(a+c,d+u,a+c-m,d+u),l==="bottom"&&this.drawCaret(e,n,o,i),n.lineTo(a+p,d+u),n.quadraticCurveTo(a,d+u,a,d+u-p),l==="center"&&s==="left"&&this.drawCaret(e,n,o,i),n.lineTo(a,d+f),n.quadraticCurveTo(a,d,a+f,d),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,o=this.$animations,i=o&&o.x,s=o&&o.y;if(i||s){const l=Nn[e.position].call(this,this._active,this._eventPosition);if(!l)return;const a=this._size=Wa(this,e),d=Object.assign({},l,this._size),c=Ya(n,e,d),u=Ua(e,d,c,n);(i._to!==u.x||s._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=a.width,this.height=a.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let o=this.opacity;if(!o)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};o=Math.abs(o)<.001?0:o;const l=$e(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=o,this.drawBackground(s,e,i,n),El(e,n.textDirection),s.y+=l.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),Bl(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const o=this._active,i=e.map(({datasetIndex:a,index:d})=>{const c=this.chart.getDatasetMeta(a);if(!c)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:c.data[d],index:d}}),s=!ro(o,i),l=this._positionChanged(i,n);(s||l)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,o=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],l=this._getActiveElements(e,s,n,o),a=this._positionChanged(l,e),d=n||!ro(l,s)||a;return d&&(this._active=l,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),d}_getActiveElements(e,n,o,i){const s=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const l=this.chart.getElementsAtEventForMode(e,s.mode,s,o);return s.reverse&&l.reverse(),l}_positionChanged(e,n){const{caretX:o,caretY:i,options:s}=this,l=Nn[s.position].call(this,e,n);return l!==!1&&(o!==l.x||i!==l.y)}}I(ur,"positioners",Nn);var q0={id:"tooltip",_element:ur,positioners:Nn,afterInit(t,e,n){n&&(t.tooltip=new ur({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,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:Xa},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},X0=Object.freeze({__proto__:null,Colors:l0,Decimation:u0,Filler:V0,Legend:O0,SubTitle:z0,Title:T0,Tooltip:q0});const K0=(t,e,n,o)=>(typeof e=="string"?(n=t.push(e)-1,o.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function Z0(t,e,n,o){const i=t.indexOf(e);if(i===-1)return K0(t,e,n,o);const s=t.lastIndexOf(e);return i!==s?n:i}const J0=(t,e)=>t===null?null:ge(Math.round(t),0,e);function Ka(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class fr extends zt{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const o=this.getLabels();for(const{index:i,label:s}of n)o[i]===s&&o.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(J(e))return null;const o=this.getLabels();return n=isFinite(n)&&o[n]===e?n:Z0(o,e,Y(n,e),this._addedLabels),J0(n,o.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:o,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(o=0),n||(i=this.getLabels().length-1)),this.min=o,this.max=i}buildTicks(){const e=this.min,n=this.max,o=this.options.offset,i=[];let s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(o?0:1),1),this._startValue=this.min-(o?.5:0);for(let l=e;l<=n;l++)i.push({value:l});return i}getLabelForValue(e){return Ka.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}I(fr,"id","category"),I(fr,"defaults",{ticks:{callback:Ka}});function Q0(t,e){const n=[],{bounds:i,step:s,min:l,max:a,precision:d,count:c,maxTicks:u,maxDigits:f,includeBounds:h}=t,p=s||1,m=u-1,{min:g,max:y}=e,b=!J(l),_=!J(a),x=!J(c),$=(y-g)/(f+1);let w=el((y-g)/m/p)*p,P,M,N,V;if(w<1e-14&&!b&&!_)return[{value:g},{value:y}];V=Math.ceil(y/w)-Math.floor(g/w),V>m&&(w=el(V*w/m/p)*p),J(d)||(P=Math.pow(10,d),w=Math.ceil(w*P)/P),i==="ticks"?(M=Math.floor(g/w)*w,N=Math.ceil(y/w)*w):(M=g,N=y),b&&_&&s&&Gf((a-l)/s,w/1e3)?(V=Math.round(Math.min((a-l)/w,u)),w=(a-l)/V,M=l,N=a):x?(M=b?l:M,N=_?a:N,V=c-1,w=(N-M)/V):(V=(N-M)/w,bn(V,Math.round(V),w/1e3)?V=Math.round(V):V=Math.ceil(V));const B=Math.max(nl(w),nl(M));P=Math.pow(10,J(d)?B:d),M=Math.round(M*P)/P,N=Math.round(N*P)/P;let k=0;for(b&&(h&&M!==l?(n.push({value:l}),M<l&&k++,bn(Math.round((M+k*w)*P)/P,l,Za(l,$,t))&&k++):M<l&&k++);k<V;++k){const C=Math.round((M+k*w)*P)/P;if(_&&C>a)break;n.push({value:C})}return _&&h&&N!==a?n.length&&bn(n[n.length-1].value,a,Za(a,$,t))?n[n.length-1].value=a:n.push({value:a}):(!_||N===a)&&n.push({value:N}),n}function Za(t,e,{horizontal:n,minRotation:o}){const i=Te(o),s=(n?Math.sin(i):Math.cos(i))||.001,l=.75*e*(""+t).length;return Math.min(e/s,l)}class Ao extends zt{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return J(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:o}=this.getUserBounds();let{min:i,max:s}=this;const l=d=>i=n?i:d,a=d=>s=o?s:d;if(e){const d=Ue(i),c=Ue(s);d<0&&c<0?a(0):d>0&&c>0&&l(0)}if(i===s){let d=s===0?1:Math.abs(s*.05);a(s+d),e||l(i-d)}this.min=i,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:o}=e,i;return o?(i=Math.ceil(this.max/o)-Math.floor(this.min/o)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${o} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let o=this.getTickLimit();o=Math.max(2,o);const i={maxTicks:o,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,l=Q0(i,s);return e.bounds==="ticks"&&tl(l,this,"value"),e.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){const e=this.ticks;let n=this.min,o=this.max;if(super.configure(),this.options.offset&&e.length){const i=(o-n)/Math.max(e.length-1,1)/2;n-=i,o+=i}this._startValue=n,this._endValue=o,this._valueRange=o-n}getLabelForValue(e){return wn(e,this.chart.options.locale,this.options.ticks.format)}}class hr extends Ao{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=de(e)?e:0,this.max=de(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,o=Te(this.options.ticks.minRotation),i=(e?Math.sin(o):Math.cos(o))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}I(hr,"id","linear"),I(hr,"defaults",{ticks:{callback:co.formatters.numeric}});const An=t=>Math.floor(_t(t)),Lt=(t,e)=>Math.pow(10,An(t)+e);function Ja(t){return t/Math.pow(10,An(t))===1}function Qa(t,e,n){const o=Math.pow(10,n),i=Math.floor(t/o);return Math.ceil(e/o)-i}function eg(t,e){const n=e-t;let o=An(n);for(;Qa(t,e,o)>10;)o++;for(;Qa(t,e,o)<10;)o--;return Math.min(o,An(t))}function tg(t,{min:e,max:n}){e=Be(t.min,e);const o=[],i=An(e);let s=eg(e,n),l=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s),d=i>s?Math.pow(10,i):0,c=Math.round((e-d)*l)/l,u=Math.floor((e-d)/a/10)*a*10;let f=Math.floor((c-u)/Math.pow(10,s)),h=Be(t.min,Math.round((d+u+f*Math.pow(10,s))*l)/l);for(;h<n;)o.push({value:h,major:Ja(h),significand:f}),f>=10?f=f<15?15:20:f++,f>=20&&(s++,f=2,l=s>=0?1:l),h=Math.round((d+u+f*Math.pow(10,s))*l)/l;const p=Be(t.max,h);return o.push({value:p,major:Ja(p),significand:f}),o}class pr extends zt{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const o=Ao.prototype.parse.apply(this,[e,n]);if(o===0){this._zero=!0;return}return de(o)&&o>0?o:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=de(e)?Math.max(0,e):null,this.max=de(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!de(this._userMin)&&(this.min=e===Lt(this.min,0)?Lt(this.min,-1):Lt(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let o=this.min,i=this.max;const s=a=>o=e?o:a,l=a=>i=n?i:a;o===i&&(o<=0?(s(1),l(10)):(s(Lt(o,-1)),l(Lt(i,1)))),o<=0&&s(Lt(i,-1)),i<=0&&l(Lt(o,1)),this.min=o,this.max=i}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},o=tg(n,this);return e.bounds==="ticks"&&tl(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}getLabelForValue(e){return e===void 0?"0":wn(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=_t(e),this._valueRange=_t(this.max)-_t(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(_t(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}I(pr,"id","logarithmic"),I(pr,"defaults",{ticks:{callback:co.formatters.logarithmic,major:{enabled:!0}}});function mr(t){const e=t.ticks;if(e.display&&t.display){const n=$e(e.backdropPadding);return Y(e.font&&e.font.size,ce.font.size)+n.height}return 0}function ng(t,e,n){return n=oe(n)?n:[n],{w:ch(t,e.string,n),h:n.length*e.lineHeight}}function ed(t,e,n,o,i){return t===o||t===i?{start:e-n/2,end:e+n/2}:t<o||t>i?{start:e-n,end:e}:{start:e,end:e+n}}function og(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),o=[],i=[],s=t._pointLabels.length,l=t.options.pointLabels,a=l.centerPointLabels?ie/s:0;for(let d=0;d<s;d++){const c=l.setContext(t.getPointLabelContext(d));i[d]=c.padding;const u=t.getPointPosition(d,t.drawingArea+i[d],a),f=he(c.font),h=ng(t.ctx,f,t._pointLabels[d]);o[d]=h;const p=Ve(t.getIndexAngle(d)+a),m=Math.round(Pi(p)),g=ed(m,u.x,h.w,0,180),y=ed(m,u.y,h.h,90,270);ig(n,e,p,g,y)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=lg(t,o,i)}function ig(t,e,n,o,i){const s=Math.abs(Math.sin(n)),l=Math.abs(Math.cos(n));let a=0,d=0;o.start<e.l?(a=(e.l-o.start)/s,t.l=Math.min(t.l,e.l-a)):o.end>e.r&&(a=(o.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),i.start<e.t?(d=(e.t-i.start)/l,t.t=Math.min(t.t,e.t-d)):i.end>e.b&&(d=(i.end-e.b)/l,t.b=Math.max(t.b,e.b+d))}function rg(t,e,n){const o=t.drawingArea,{extra:i,additionalAngle:s,padding:l,size:a}=n,d=t.getPointPosition(e,o+i+l,s),c=Math.round(Pi(Ve(d.angle+ue))),u=cg(d.y,a.h,c),f=ag(c),h=dg(d.x,a.w,f);return{visible:!0,x:d.x,y:u,textAlign:f,left:h,top:u,right:h+a.w,bottom:u+a.h}}function sg(t,e){if(!e)return!0;const{left:n,top:o,right:i,bottom:s}=t;return!(nt({x:n,y:o},e)||nt({x:n,y:s},e)||nt({x:i,y:o},e)||nt({x:i,y:s},e))}function lg(t,e,n){const o=[],i=t._pointLabels.length,s=t.options,{centerPointLabels:l,display:a}=s.pointLabels,d={extra:mr(s)/2,additionalAngle:l?ie/i:0};let c;for(let u=0;u<i;u++){d.padding=n[u],d.size=e[u];const f=rg(t,u,d);o.push(f),a==="auto"&&(f.visible=sg(f,c),f.visible&&(c=f))}return o}function ag(t){return t===0||t===180?"center":t<180?"left":"right"}function dg(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function cg(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function ug(t,e,n){const{left:o,top:i,right:s,bottom:l}=n,{backdropColor:a}=e;if(!J(a)){const d=Rt(e.borderRadius),c=$e(e.backdropPadding);t.fillStyle=a;const u=o-c.left,f=i-c.top,h=s-o+c.width,p=l-i+c.height;Object.values(d).some(m=>m!==0)?(t.beginPath(),kn(t,{x:u,y:f,w:h,h:p,radius:d}),t.fill()):t.fillRect(u,f,h,p)}}function fg(t,e){const{ctx:n,options:{pointLabels:o}}=t;for(let i=e-1;i>=0;i--){const s=t._pointLabelItems[i];if(!s.visible)continue;const l=o.setContext(t.getPointLabelContext(i));ug(n,l,s);const a=he(l.font),{x:d,y:c,textAlign:u}=s;Ft(n,t._pointLabels[i],d,c+a.lineHeight/2,a,{color:l.color,textAlign:u,textBaseline:"middle"})}}function td(t,e,n,o){const{ctx:i}=t;if(n)i.arc(t.xCenter,t.yCenter,e,0,re);else{let s=t.getPointPosition(0,e);i.moveTo(s.x,s.y);for(let l=1;l<o;l++)s=t.getPointPosition(l,e),i.lineTo(s.x,s.y)}}function hg(t,e,n,o,i){const s=t.ctx,l=e.circular,{color:a,lineWidth:d}=e;!l&&!o||!a||!d||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=d,s.setLineDash(i.dash),s.lineDashOffset=i.dashOffset,s.beginPath(),td(t,n,l,o),s.closePath(),s.stroke(),s.restore())}function pg(t,e,n){return wt(t,{label:n,index:e,type:"pointLabel"})}class On extends Ao{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=$e(mr(this.options)/2),n=this.width=this.maxWidth-e.width,o=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+o/2+e.top),this.drawingArea=Math.floor(Math.min(n,o)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=de(e)&&!isNaN(e)?e:0,this.max=de(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/mr(this.options))}generateTickLabels(e){Ao.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,o)=>{const i=ne(this.options.pointLabels.callback,[n,o],this);return i||i===0?i:""}).filter((n,o)=>this.chart.getDataVisibility(o))}fit(){const e=this.options;e.display&&e.pointLabels.display?og(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,o,i){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((o-i)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,o,i))}getIndexAngle(e){const n=re/(this._pointLabels.length||1),o=this.options.startAngle||0;return Ve(e*n+Te(o))}getDistanceFromCenterForValue(e){if(J(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(J(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const o=n[e];return pg(this.getContext(),e,o)}}getPointPosition(e,n,o=0){const i=this.getIndexAngle(e)-ue+o;return{x:Math.cos(i)*n+this.xCenter,y:Math.sin(i)*n+this.yCenter,angle:i}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:o,right:i,bottom:s}=this._pointLabelItems[e];return{left:n,top:o,right:i,bottom:s}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const o=this.ctx;o.save(),o.beginPath(),td(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),o.closePath(),o.fillStyle=e,o.fill(),o.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:o,grid:i,border:s}=n,l=this._pointLabels.length;let a,d,c;if(n.pointLabels.display&&fg(this,l),i.display&&this.ticks.forEach((u,f)=>{if(f!==0||f===0&&this.min<0){d=this.getDistanceFromCenterForValue(u.value);const h=this.getContext(f),p=i.setContext(h),m=s.setContext(h);hg(this,p,d,l,m)}}),o.display){for(e.save(),a=l-1;a>=0;a--){const u=o.setContext(this.getPointLabelContext(a)),{color:f,lineWidth:h}=u;!h||!f||(e.lineWidth=h,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,d=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),c=this.getPointPosition(a,d),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(c.x,c.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,o=n.ticks;if(!o.display)return;const i=this.getIndexAngle(0);let s,l;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(i),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,d)=>{if(d===0&&this.min>=0&&!n.reverse)return;const c=o.setContext(this.getContext(d)),u=he(c.font);if(s=this.getDistanceFromCenterForValue(this.ticks[d].value),c.showLabelBackdrop){e.font=u.string,l=e.measureText(a.label).width,e.fillStyle=c.backdropColor;const f=$e(c.backdropPadding);e.fillRect(-l/2-f.left,-s-u.size/2-f.top,l+f.width,u.size+f.height)}Ft(e,a.label,0,-s,u,{color:c.color,strokeColor:c.textStrokeColor,strokeWidth:c.textStrokeWidth})}),e.restore()}drawTitle(){}}I(On,"id","radialLinear"),I(On,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:co.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),I(On,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),I(On,"descriptors",{angleLines:{_fallback:"grid"}});const Oo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Me=Object.keys(Oo);function nd(t,e){return t-e}function od(t,e){if(J(e))return null;const n=t._adapter,{parser:o,round:i,isoWeekday:s}=t._parseOpts;let l=e;return typeof o=="function"&&(l=o(l)),de(l)||(l=typeof o=="string"?n.parse(l,o):n.parse(l)),l===null?null:(i&&(l=i==="week"&&(Xt(s)||s===!0)?n.startOf(l,"isoWeek",s):n.startOf(l,i)),+l)}function id(t,e,n,o){const i=Me.length;for(let s=Me.indexOf(t);s<i-1;++s){const l=Oo[Me[s]],a=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((n-e)/(a*l.size))<=o)return Me[s]}return Me[i-1]}function mg(t,e,n,o,i){for(let s=Me.length-1;s>=Me.indexOf(n);s--){const l=Me[s];if(Oo[l].common&&t._adapter.diff(i,o,l)>=e-1)return l}return Me[n?Me.indexOf(n):0]}function gg(t){for(let e=Me.indexOf(t)+1,n=Me.length;e<n;++e)if(Oo[Me[e]].common)return Me[e]}function rd(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:o,hi:i}=Ri(n,e),s=n[o]>=e?n[o]:n[i];t[s]=!0}}function yg(t,e,n,o){const i=t._adapter,s=+i.startOf(e[0].value,o),l=e[e.length-1].value;let a,d;for(a=s;a<=l;a=+i.add(a,1,o))d=n[a],d>=0&&(e[d].major=!0);return e}function sd(t,e,n){const o=[],i={},s=e.length;let l,a;for(l=0;l<s;++l)a=e[l],i[a]=l,o.push({value:a,major:!1});return s===0||!n?o:yg(t,o,i,n)}class In extends zt{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const o=e.time||(e.time={}),i=this._adapter=new vp._date(e.adapters.date);i.init(n),gn(o.displayFormats,i.formats()),this._parseOpts={parser:o.parser,round:o.round,isoWeekday:o.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:od(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,o=e.time.unit||"day";let{min:i,max:s,minDefined:l,maxDefined:a}=this.getUserBounds();function d(c){!l&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!a&&!isNaN(c.max)&&(s=Math.max(s,c.max))}(!l||!a)&&(d(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&d(this.getMinMax(!1))),i=de(i)&&!isNaN(i)?i:+n.startOf(Date.now(),o),s=de(s)&&!isNaN(s)?s:+n.endOf(Date.now(),o)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],o=e[e.length-1]),{min:n,max:o}}buildTicks(){const e=this.options,n=e.time,o=e.ticks,i=o.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,l=this.max,a=Zf(i,s,l);return this._unit=n.unit||(o.autoSkip?id(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):mg(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!o.major.enabled||this._unit==="year"?void 0:gg(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),sd(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,o=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?o=s:o=(s-this.getDecimalForValue(e[e.length-2]))/2);const l=e.length<3?.5:.25;n=ge(n,0,l),o=ge(o,0,l),this._offsets={start:n,end:o,factor:1/(n+1+o)}}_generate(){const e=this._adapter,n=this.min,o=this.max,i=this.options,s=i.time,l=s.unit||id(s.minUnit,n,o,this._getLabelCapacity(n)),a=Y(i.ticks.stepSize,1),d=l==="week"?s.isoWeekday:!1,c=Xt(d)||d===!0,u={};let f=n,h,p;if(c&&(f=+e.startOf(f,"isoWeek",d)),f=+e.startOf(f,c?"day":l),e.diff(o,n,l)>1e5*a)throw new Error(n+" and "+o+" are too far apart with stepSize of "+a+" "+l);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(h=f,p=0;h<o;h=+e.add(h,a,l),p++)rd(u,h,m);return(h===o||i.bounds==="ticks"||p===1)&&rd(u,h,m),Object.keys(u).sort(nd).map(g=>+g)}getLabelForValue(e){const n=this._adapter,o=this.options.time;return o.tooltipFormat?n.format(e,o.tooltipFormat):n.format(e,o.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,s=this._unit,l=n||i[s];return this._adapter.format(e,l)}_tickFormatFunction(e,n,o,i){const s=this.options,l=s.ticks.callback;if(l)return ne(l,[e,n,o],this);const a=s.time.displayFormats,d=this._unit,c=this._majorUnit,u=d&&a[d],f=c&&a[c],h=o[n],p=c&&f&&h&&h.major;return this._adapter.format(e,i||(p?f:u))}generateTickLabels(e){let n,o,i;for(n=0,o=e.length;n<o;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,o=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+o)*n.factor)}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+o*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,o=this.ctx.measureText(e).width,i=Te(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),l=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:o*s+a*l,h:o*l+a*s}}_getLabelCapacity(e){const n=this.options.time,o=n.displayFormats,i=o[n.unit]||o.millisecond,s=this._tickFormatFunction(e,0,sd(this,[e],this._majorUnit),i),l=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,o;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,o=i.length;n<o;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,o;if(e.length)return e;const i=this.getLabels();for(n=0,o=i.length;n<o;++n)e.push(od(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return sl(e.sort(nd))}}I(In,"id","time"),I(In,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Io(t,e,n){let o=0,i=t.length-1,s,l,a,d;n?(e>=t[o].pos&&e<=t[i].pos&&({lo:o,hi:i}=tt(t,"pos",e)),{pos:s,time:a}=t[o],{pos:l,time:d}=t[i]):(e>=t[o].time&&e<=t[i].time&&({lo:o,hi:i}=tt(t,"time",e)),{time:s,pos:a}=t[o],{time:l,pos:d}=t[i]);const c=l-s;return c?a+(d-a)*(e-s)/c:a}class gr extends In{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Io(n,this.min),this._tableRange=Io(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:o}=this,i=[],s=[];let l,a,d,c,u;for(l=0,a=e.length;l<a;++l)c=e[l],c>=n&&c<=o&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:o,pos:1}];for(l=0,a=i.length;l<a;++l)u=i[l+1],d=i[l-1],c=i[l],Math.round((u+d)/2)!==c&&s.push({time:c,pos:l/(a-1)});return s}_generate(){const e=this.min,n=this.max;let o=super.getDataTimestamps();return(!o.includes(e)||!o.length)&&o.splice(0,0,e),(!o.includes(n)||o.length===1)&&o.push(n),o.sort((i,s)=>i-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),o=this.getLabelTimestamps();return n.length&&o.length?e=this.normalize(n.concat(o)):e=n.length?n:o,e=this._cache.all=e,e}getDecimalForValue(e){return(Io(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,o=this.getDecimalForPixel(e)/n.factor-n.end;return Io(this._table,o*this._tableRange+this._minPos,!0)}}I(gr,"id","timeseries"),I(gr,"defaults",In.defaults);var bg=Object.freeze({__proto__:null,CategoryScale:fr,LinearScale:hr,LogarithmicScale:pr,RadialLinearScale:On,TimeScale:In,TimeSeriesScale:gr});const $g=[Sp,t0,X0,bg];Le.register(...$g);const _g={class:"flex flex-col h-full m-24 overflow-hidden p-24"},wg={class:"flex flex-col gap-8"},Cg={class:"fm-color-typo-primary fm-typo-body-lg-400"},kg={class:"fm-color-typo-secondary fm-typo-body-md-400"},xg={class:"grow"},Sg=r.defineComponent({__name:"FmLine",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean},maintainAspectRatio:{type:Boolean}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio],()=>{o&&o.config.options&&(o.destroy(),a())});const i=r.computed(()=>e.transpose?"y":"x");function s({context:d,color:c}){const{ctx:u,chartArea:f}=d.chart;if(!f)return;const h=u==null?void 0:u.createLinearGradient(0,0,0,f.height);return h.addColorStop(0,$i(c,.5)),h.addColorStop(1,$i(c,0)),h}const l=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(d=>{const c=dn(d.color)??"";return{...d,backgroundColor:c?u=>s({context:u,color:c}):"",borderColor:c,borderDash:d.dash?[5,5]:void 0,tension:.1}})}));r.watch(l,()=>{o&&(o.data=l.value,o.update())},{deep:!0});function a(){n.value&&(o=new Le(n.value,{type:"line",data:l.value,options:{plugins:{legend:{display:e.datasets.length>1,position:"bottom",labels:{usePointStyle:!0,pointStyle:"line"}}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{stacked:e.stacked,grid:{display:!0},position:"right",beginAtZero:!0}},elements:{line:{borderWidth:1.5},point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{a()}),(d,c)=>(r.openBlock(),r.createElementBlock("div",_g,[r.createElementVNode("div",wg,[r.renderSlot(d.$slots,"title"),r.createElementVNode("div",Cg,r.toDisplayString(d.name),1),r.createElementVNode("div",kg,r.toDisplayString(d.paragraph),1)]),r.createElementVNode("div",xg,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),vg={class:"flex flex-col h-full overflow-hidden px-24 py-16"},Mg={class:"flex flex-col gap-8"},Dg={class:"fm-color-typo-primary fm-typo-body-lg-400"},Eg={class:"fm-color-typo-secondary fm-typo-body-md-400"},Bg={class:"grow"},Vg=r.defineComponent({__name:"FmPie",props:{name:{default:void 0},variant:{},paragraph:{default:void 0},datasets:{},metrics:{},legend:{type:Boolean,default:!0},text:{default:void 0},textColor:{default:"#0E1715"},textStyle:{default:"bold 30px sans-serif"},maintainAspectRatio:{type:Boolean,default:!0}},setup(t){const e=t,n=r.ref(null);let o=null;const i=r.computed(()=>e.variant==="doughnut"?"90%":"0"),s=r.computed(()=>e.text);r.watch([()=>e.metrics,()=>e.datasets,()=>e.variant,()=>e.legend,()=>e.textColor,()=>e.textStyle,()=>e.text,()=>e.maintainAspectRatio],()=>{o&&(o.destroy(),a())});const l=r.computed(()=>({labels:e.metrics,datasets:e.datasets.map(d=>{var u;const c=(u=d.backgroundColor)==null?void 0:u.map(f=>dn(f)??"");return{...d,backgroundColor:c??void 0,hoverOffset:d.hoverOffset??0}})}));function a(){n.value&&(o=new Le(n.value,{type:"doughnut",data:l.value,options:{maintainAspectRatio:e.maintainAspectRatio,responsive:!0,cutout:i.value,plugins:{legend:{display:e.legend,position:"bottom",labels:{usePointStyle:!0}}}},plugins:[{id:"doughnutlabel",beforeDatasetsDraw:d=>{if(e.variant==="doughnut"){const{ctx:c}=d;c.save();const u=d.getDatasetMeta(0).data[0].x,f=d.getDatasetMeta(0).data[0].y;if(c.font=e.textStyle,c.textAlign="center",c.textBaseline="middle",s.value&&s.value!==""){const h=s.value.split(`
27
+ `);for(let p=0;p<h.length;p++){const m=p===0?1:.7;c.fillStyle=$i(dn(e.textColor)??"",m),c.fillText(h[p],u,f+p*40)}}}}}]}))}return r.onMounted(()=>{a()}),(d,c)=>(r.openBlock(),r.createElementBlock("div",vg,[r.createElementVNode("div",Mg,[r.renderSlot(d.$slots,"title"),r.createElementVNode("div",Dg,r.toDisplayString(d.name),1),r.createElementVNode("div",Eg,r.toDisplayString(d.paragraph),1)]),r.createElementVNode("div",Bg,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}}),Pg={class:"flex flex-col h-full overflow-hidden px-24 py-16"},Fg={class:"flex flex-col gap-8"},Rg={class:"fm-color-typo-primary fm-typo-body-lg-400"},Ng={class:"fm-color-typo-secondary fm-typo-body-md-400"},Ag={class:"grow"},Og=r.defineComponent({__name:"FmBar",props:{name:{default:void 0},paragraph:{default:void 0},datasets:{},xAxis:{},transpose:{type:Boolean,default:!1},stacked:{type:Boolean,default:!1},maintainAspectRatio:{type:Boolean,default:!0}},setup(t){const e=t,n=r.ref(null);let o=null;r.watch([()=>e.transpose,()=>e.maintainAspectRatio],()=>{o&&(o.destroy(),l())});const i=r.computed(()=>e.transpose?"y":"x"),s=r.computed(()=>({labels:e.xAxis.categories,datasets:e.datasets.map(a=>{var u;let d,c;return typeof a.backgroundColor=="string"?d=a.backgroundColor:typeof a.backgroundColor=="object"&&(d=a.backgroundColor.map(f=>dn(f)??"")),typeof a.borderColor=="string"?c=a.borderColor:typeof a.borderColor=="object"&&(c=(u=a.borderColor)==null?void 0:u.map(f=>dn(f)??"")),{...a,backgroundColor:d,borderColor:c,borderRadius:10,borderWidth:c?1:0}})}));r.watch(s,()=>{o&&(o.data=s.value,o.update())},{deep:!0});function l(){n.value&&(o=new Le(n.value,{type:"bar",data:s.value,options:{plugins:{legend:{display:e.datasets.length>1,position:"bottom"}},maintainAspectRatio:e.maintainAspectRatio,responsive:!0,indexAxis:i.value,scales:{x:{stacked:e.stacked,grid:{display:!1},beginAtZero:!0},y:{stacked:e.stacked,grid:{display:!1},position:"right",beginAtZero:!0}},elements:{point:{radius:0,hitRadius:30,hoverRadius:6,hoverBackgroundColor:"#FFFFFF",hoverBorderWidth:3}}}}))}return r.onMounted(()=>{l()}),(a,d)=>(r.openBlock(),r.createElementBlock("div",Pg,[r.createElementVNode("div",Fg,[r.renderSlot(a.$slots,"title"),r.createElementVNode("div",Rg,r.toDisplayString(a.name),1),r.createElementVNode("div",Ng,r.toDisplayString(a.paragraph),1)]),r.createElementVNode("div",Ag,[r.createElementVNode("canvas",{ref_key:"canvas",ref:n},null,512)])]))}});function we(t,e){return t===null||e===null||typeof t!="object"&&typeof e!="object"?t===e:Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>we(t[n],e[n]))}const Ig={class:"fm-checkbox"},Tg={class:"fm-checkbox--wrapper"},zg={class:"fm-checkbox__input--container"},Lg=["checked","disabled","indeterminate"],Hg={key:0,class:"fm-checkbox__label-container"},jg={class:"fm-typo-body-lg-400"},Wg={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},ld=r.defineComponent({__name:"FmCheckbox",props:{modelValue:{type:[Boolean,Array]},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0},indeterminate:{type:Boolean,default:!1},value:{}},emits:["update:modelValue","update:indeterminate"],setup(t){const e=t,n=r.inject(me),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=X(e,"modelValue"),s=X(e,"indeterminate"),l=Array.isArray(i.value),a=r.ref(l?i.value.some(u=>we(u,e.value)):i.value),d=r.computed(()=>{const u=l?i.value.some(f=>we(f,e.value)):i.value;return s.value&&!u?"remove":i.value?"check_small":""});function c(){if(o.value)return;s.value=!1,a.value=!a.value;let u=i.value;l?u=a.value?u.concat(e.value):u.filter(f=>!we(f,e.value)):u=a.value,i.value=u}return r.watch(()=>i.value,()=>{a.value=l?i.value.some(u=>we(u,e.value)):i.value}),(u,f)=>(r.openBlock(),r.createElementBlock("div",Ig,[r.createElementVNode("label",Tg,[r.createElementVNode("div",zg,[r.createElementVNode("input",{checked:a.value,class:r.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":a.value}),disabled:o.value,indeterminate:r.unref(s),type:"checkbox",onInput:c},null,42,Lg),r.unref(s)||a.value?(r.openBlock(),r.createBlock(j,{key:0,name:d.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)]),e.label?(r.openBlock(),r.createElementBlock("div",Hg,[r.renderSlot(u.$slots,"label"),r.createElementVNode("div",jg,r.toDisplayString(e.label),1),e.sublabel?(r.openBlock(),r.createElementBlock("div",Wg,r.toDisplayString(e.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)])]))}});var Yg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ad={exports:{}};(function(t,e){(function(n,o){t.exports=o()})(Yg,function(){var n=1e3,o=6e4,i=36e5,s="millisecond",l="second",a="minute",d="hour",c="day",u="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(v){var D=["th","st","nd","rd"],S=v%100;return"["+v+(D[(S-20)%10]||D[S]||D[0])+"]"}},x=function(v,D,S){var F=String(v);return!F||F.length>=D?v:""+Array(D+1-F.length).join(S)+v},$={s:x,z:function(v){var D=-v.utcOffset(),S=Math.abs(D),F=Math.floor(S/60),O=S%60;return(D<=0?"+":"-")+x(F,2,"0")+":"+x(O,2,"0")},m:function v(D,S){if(D.date()<S.date())return-v(S,D);var F=12*(S.year()-D.year())+(S.month()-D.month()),O=D.clone().add(F,f),z=S-O<0,T=D.clone().add(F+(z?-1:1),f);return+(-(F+(S-O)/(z?O-T:T-O))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:f,y:p,w:u,d:c,D:m,h:d,m:a,s:l,ms:s,Q:h}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},w="en",P={};P[w]=_;var M="$isDayjsObject",N=function(v){return v instanceof C||!(!v||!v[M])},V=function v(D,S,F){var O;if(!D)return w;if(typeof D=="string"){var z=D.toLowerCase();P[z]&&(O=z),S&&(P[z]=S,O=z);var T=D.split("-");if(!O&&T.length>1)return v(T[0])}else{var W=D.name;P[W]=D,O=W}return!F&&O&&(w=O),O||!F&&w},B=function(v,D){if(N(v))return v.clone();var S=typeof D=="object"?D:{};return S.date=v,S.args=arguments,new C(S)},k=$;k.l=V,k.i=N,k.w=function(v,D){return B(v,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var C=function(){function v(S){this.$L=V(S.locale,null,!0),this.parse(S),this.$x=this.$x||S.x||{},this[M]=!0}var D=v.prototype;return D.parse=function(S){this.$d=function(F){var O=F.date,z=F.utc;if(O===null)return new Date(NaN);if(k.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var T=O.match(y);if(T){var W=T[2]-1||0,U=(T[7]||"0").substring(0,3);return z?new Date(Date.UTC(T[1],W,T[3]||1,T[4]||0,T[5]||0,T[6]||0,U)):new Date(T[1],W,T[3]||1,T[4]||0,T[5]||0,T[6]||0,U)}}return new Date(O)}(S),this.init()},D.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},D.$utils=function(){return k},D.isValid=function(){return this.$d.toString()!==g},D.isSame=function(S,F){var O=B(S);return this.startOf(F)<=O&&O<=this.endOf(F)},D.isAfter=function(S,F){return B(S)<this.startOf(F)},D.isBefore=function(S,F){return this.endOf(F)<B(S)},D.$g=function(S,F,O){return k.u(S)?this[F]:this.set(O,S)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(S,F){var O=this,z=!!k.u(F)||F,T=k.p(S),W=function(Ae,te){var se=k.w(O.$u?Date.UTC(O.$y,te,Ae):new Date(O.$y,te,Ae),O);return z?se:se.endOf(c)},U=function(Ae,te){return k.w(O.toDate()[Ae].apply(O.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(te)),O)},G=this.$W,Q=this.$M,le=this.$D,fe="set"+(this.$u?"UTC":"");switch(T){case p:return z?W(1,0):W(31,11);case f:return z?W(1,Q):W(0,Q+1);case u:var Ne=this.$locale().weekStart||0,We=(G<Ne?G+7:G)-Ne;return W(z?le-We:le+(6-We),Q);case c:case m:return U(fe+"Hours",0);case d:return U(fe+"Minutes",1);case a:return U(fe+"Seconds",2);case l:return U(fe+"Milliseconds",3);default:return this.clone()}},D.endOf=function(S){return this.startOf(S,!1)},D.$set=function(S,F){var O,z=k.p(S),T="set"+(this.$u?"UTC":""),W=(O={},O[c]=T+"Date",O[m]=T+"Date",O[f]=T+"Month",O[p]=T+"FullYear",O[d]=T+"Hours",O[a]=T+"Minutes",O[l]=T+"Seconds",O[s]=T+"Milliseconds",O)[z],U=z===c?this.$D+(F-this.$W):F;if(z===f||z===p){var G=this.clone().set(m,1);G.$d[W](U),G.init(),this.$d=G.set(m,Math.min(this.$D,G.daysInMonth())).$d}else W&&this.$d[W](U);return this.init(),this},D.set=function(S,F){return this.clone().$set(S,F)},D.get=function(S){return this[k.p(S)]()},D.add=function(S,F){var O,z=this;S=Number(S);var T=k.p(F),W=function(Q){var le=B(z);return k.w(le.date(le.date()+Math.round(Q*S)),z)};if(T===f)return this.set(f,this.$M+S);if(T===p)return this.set(p,this.$y+S);if(T===c)return W(1);if(T===u)return W(7);var U=(O={},O[a]=o,O[d]=i,O[l]=n,O)[T]||1,G=this.$d.getTime()+S*U;return k.w(G,this)},D.subtract=function(S,F){return this.add(-1*S,F)},D.format=function(S){var F=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var z=S||"YYYY-MM-DDTHH:mm:ssZ",T=k.z(this),W=this.$H,U=this.$m,G=this.$M,Q=O.weekdays,le=O.months,fe=O.meridiem,Ne=function(te,se,xe,Se){return te&&(te[se]||te(F,z))||xe[se].slice(0,Se)},We=function(te){return k.s(W%12||12,te,"0")},Ae=fe||function(te,se,xe){var Se=te<12?"AM":"PM";return xe?Se.toLowerCase():Se};return z.replace(b,function(te,se){return se||function(xe){switch(xe){case"YY":return String(F.$y).slice(-2);case"YYYY":return k.s(F.$y,4,"0");case"M":return G+1;case"MM":return k.s(G+1,2,"0");case"MMM":return Ne(O.monthsShort,G,le,3);case"MMMM":return Ne(le,G);case"D":return F.$D;case"DD":return k.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return Ne(O.weekdaysMin,F.$W,Q,2);case"ddd":return Ne(O.weekdaysShort,F.$W,Q,3);case"dddd":return Q[F.$W];case"H":return String(W);case"HH":return k.s(W,2,"0");case"h":return We(1);case"hh":return We(2);case"a":return Ae(W,U,!0);case"A":return Ae(W,U,!1);case"m":return String(U);case"mm":return k.s(U,2,"0");case"s":return String(F.$s);case"ss":return k.s(F.$s,2,"0");case"SSS":return k.s(F.$ms,3,"0");case"Z":return T}return null}(te)||T.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(S,F,O){var z,T=this,W=k.p(F),U=B(S),G=(U.utcOffset()-this.utcOffset())*o,Q=this-U,le=function(){return k.m(T,U)};switch(W){case p:z=le()/12;break;case f:z=le();break;case h:z=le()/3;break;case u:z=(Q-G)/6048e5;break;case c:z=(Q-G)/864e5;break;case d:z=Q/i;break;case a:z=Q/o;break;case l:z=Q/n;break;default:z=Q}return O?z:k.a(z)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return P[this.$L]},D.locale=function(S,F){if(!S)return this.$L;var O=this.clone(),z=V(S,F,!0);return z&&(O.$L=z),O},D.clone=function(){return k.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},v}(),E=C.prototype;return B.prototype=E,[["$ms",s],["$s",l],["$m",a],["$H",d],["$W",c],["$M",f],["$y",p],["$D",m]].forEach(function(v){E[v[1]]=function(D){return this.$g(D,v[0],v[1])}}),B.extend=function(v,D){return v.$i||(v(D,C,B),v.$i=!0),B},B.locale=V,B.isDayjs=N,B.unix=function(v){return B(1e3*v)},B.en=P[w],B.Ls=P,B.p={},B})})(ad);var Ug=ad.exports;const R=yr(Ug),Gg={class:"w-full"},ye=Z(r.defineComponent({__name:"FmField",props:{tag:{default:"div"},prependIcon:{default:""},appendIcon:{default:""},invalid:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},iconOutlined:{type:Boolean,default:!1},size:{default:"sm"}},setup(t){const e=t,n=r.inject(me),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,s)=>(r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-field":!0,"fm-field--focused":i.focused,"fm-field--invalid":i.invalid,"fm-field--valid":i.showValidBorder&&!i.invalid,"fm-field--disabled":o.value,"fm-field--md":i.size==="md","fm-field--sm":i.size==="sm"})},{default:r.withCtx(()=>[r.renderSlot(i.$slots,"prepend",{},()=>[i.prependIcon?(r.openBlock(),r.createBlock(j,{key:0,color:o.value?"disabled":"neutral-black",name:i.prependIcon,outline:i.iconOutlined,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)],!0),r.createElementVNode("div",Gg,[r.renderSlot(i.$slots,"default",{},void 0,!0)]),r.renderSlot(i.$slots,"append",{},()=>[i.appendIcon?(r.openBlock(),r.createBlock(j,{key:0,color:o.value?"disabled":"neutral-black",name:i.appendIcon,outline:i.iconOutlined,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0)],!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-89e62420"]]),qg={class:"flex gap-4"},dd=r.defineComponent({__name:"FmHelperText",props:{text:{default:""},disabled:{type:Boolean,default:void 0},state:{default:"none"},errorMessages:{default:()=>[]}},setup(t){const e=t,n=r.inject(me),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=r.computed(()=>e.state==="success"?"check_circle":e.state==="warning"?"warning":e.state==="error"?"error":""),s=r.computed(()=>e.state==="success"?"text-fm-color-system-success-300":e.state==="warning"?"text-fm-color-system-warning-300":e.state==="error"?"text-fm-color-system-error-300":"");return(l,a)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["fm-typo-body-sm-400",{"text-fm-color-typo-disabled":o.value,"text-fm-color-typo-secondary":l.state==="none"&&!o.value,"text-fm-color-typo-success":l.state==="success"&&!o.value,"text-fm-color-typo-warning":l.state==="warning"&&!o.value,"text-fm-color-typo-error":l.state==="error"&&!o.value}])},[l.errorMessages.length===0?r.renderSlot(l.$slots,"default",{key:0},()=>[r.createElementVNode("div",qg,[i.value?(r.openBlock(),r.createBlock(j,{key:0,class:r.normalizeClass([s.value,"mt-[2px]"]),name:i.value,size:"sm"},null,8,["class","name"])):r.createCommentVNode("",!0),r.createElementVNode("span",null,r.toDisplayString(l.text),1)])]):r.renderSlot(l.$slots,"default",{key:1},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.errorMessages,d=>(r.openBlock(),r.createElementBlock("div",{key:d,class:"flex gap-4 text-fm-color-typo-error"},[r.createVNode(j,{class:"mt-[2px] text-fm-color-system-error-300",name:"error",size:"sm"}),r.createElementVNode("span",null,r.toDisplayString(d),1)]))),128))])],2))}}),en=Math.min,Ht=Math.max,To=Math.round,zo=Math.floor,xt=t=>({x:t,y:t}),Xg={left:"right",right:"left",bottom:"top",top:"bottom"},Kg={start:"end",end:"start"};function br(t,e,n){return Ht(t,en(e,n))}function Tn(t,e){return typeof t=="function"?t(e):t}function jt(t){return t.split("-")[0]}function zn(t){return t.split("-")[1]}function cd(t){return t==="x"?"y":"x"}function $r(t){return t==="y"?"height":"width"}function Lo(t){return["top","bottom"].includes(jt(t))?"y":"x"}function _r(t){return cd(Lo(t))}function Zg(t,e,n){n===void 0&&(n=!1);const o=zn(t),i=_r(t),s=$r(i);let l=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(l=Ho(l)),[l,Ho(l)]}function Jg(t){const e=Ho(t);return[wr(t),e,wr(e)]}function wr(t){return t.replace(/start|end/g,e=>Kg[e])}function Qg(t,e,n){const o=["left","right"],i=["right","left"],s=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?s:l;default:return[]}}function e1(t,e,n,o){const i=zn(t);let s=Qg(jt(t),n==="start",o);return i&&(s=s.map(l=>l+"-"+i),e&&(s=s.concat(s.map(wr)))),s}function Ho(t){return t.replace(/left|right|bottom|top/g,e=>Xg[e])}function t1(t){return{top:0,right:0,bottom:0,left:0,...t}}function ud(t){return typeof t!="number"?t1(t):{top:t,right:t,bottom:t,left:t}}function jo(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function fd(t,e,n){let{reference:o,floating:i}=t;const s=Lo(e),l=_r(e),a=$r(l),d=jt(e),c=s==="y",u=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,h=o[a]/2-i[a]/2;let p;switch(d){case"top":p={x:u,y:o.y-i.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-i.width,y:f};break;default:p={x:o.x,y:o.y}}switch(zn(e)){case"start":p[l]-=h*(n&&c?-1:1);break;case"end":p[l]+=h*(n&&c?-1:1);break}return p}const n1=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:l}=n,a=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(e));let c=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:f}=fd(c,o,d),h=o,p={},m=0;for(let g=0;g<a.length;g++){const{name:y,fn:b}=a[g],{x:_,y:x,data:$,reset:w}=await b({x:u,y:f,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:c,platform:l,elements:{reference:t,floating:e}});u=_??u,f=x??f,p={...p,[y]:{...p[y],...$}},w&&m<=50&&(m++,typeof w=="object"&&(w.placement&&(h=w.placement),w.rects&&(c=w.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:i}):w.rects),{x:u,y:f}=fd(c,h,d)),g=-1)}return{x:u,y:f,placement:h,strategy:i,middlewareData:p}};async function hd(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:l,elements:a,strategy:d}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Tn(e,t),m=ud(p),y=a[h?f==="floating"?"reference":"floating":f],b=jo(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:d})),_=f==="floating"?{...l.floating,x:o,y:i}:l.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),$=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},w=jo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:_,offsetParent:x,strategy:d}):_);return{top:(b.top-w.top+m.top)/$.y,bottom:(w.bottom-b.bottom+m.bottom)/$.y,left:(b.left-w.left+m.left)/$.x,right:(w.right-b.right+m.right)/$.x}}const o1=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:l,elements:a,middlewareData:d}=e,{element:c,padding:u=0}=Tn(t,e)||{};if(c==null)return{};const f=ud(u),h={x:n,y:o},p=_r(i),m=$r(p),g=await l.getDimensions(c),y=p==="y",b=y?"top":"left",_=y?"bottom":"right",x=y?"clientHeight":"clientWidth",$=s.reference[m]+s.reference[p]-h[p]-s.floating[m],w=h[p]-s.reference[p],P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c));let M=P?P[x]:0;(!M||!await(l.isElement==null?void 0:l.isElement(P)))&&(M=a.floating[x]||s.floating[m]);const N=$/2-w/2,V=M/2-g[m]/2-1,B=en(f[b],V),k=en(f[_],V),C=B,E=M-g[m]-k,v=M/2-g[m]/2+N,D=br(C,v,E),S=!d.arrow&&zn(i)!=null&&v!==D&&s.reference[m]/2-(v<C?B:k)-g[m]/2<0,F=S?v<C?v-C:v-E:0;return{[p]:h[p]+F,data:{[p]:D,centerOffset:v-D-F,...S&&{alignmentOffset:F}},reset:S}}}),i1=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:l,initialPlacement:a,platform:d,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=Tn(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=jt(i),_=jt(a)===a,x=await(d.isRTL==null?void 0:d.isRTL(c.floating)),$=h||(_||!g?[Ho(a)]:Jg(a));!h&&m!=="none"&&$.push(...e1(a,g,m,x));const w=[a,...$],P=await hd(e,y),M=[];let N=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&M.push(P[b]),f){const C=Zg(i,l,x);M.push(P[C[0]],P[C[1]])}if(N=[...N,{placement:i,overflows:M}],!M.every(C=>C<=0)){var V,B;const C=(((V=s.flip)==null?void 0:V.index)||0)+1,E=w[C];if(E)return{data:{index:C,overflows:N},reset:{placement:E}};let v=(B=N.filter(D=>D.overflows[0]<=0).sort((D,S)=>D.overflows[1]-S.overflows[1])[0])==null?void 0:B.placement;if(!v)switch(p){case"bestFit":{var k;const D=(k=N.map(S=>[S.placement,S.overflows.filter(F=>F>0).reduce((F,O)=>F+O,0)]).sort((S,F)=>S[1]-F[1])[0])==null?void 0:k[0];D&&(v=D);break}case"initialPlacement":v=a;break}if(i!==v)return{reset:{placement:v}}}return{}}}};async function r1(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),l=jt(n),a=zn(n),d=Lo(n)==="y",c=["left","top"].includes(l)?-1:1,u=s&&d?-1:1,f=Tn(e,t);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),d?{x:p*u,y:h*c}:{x:h*c,y:p*u}}const Ln=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:l,middlewareData:a}=e,d=await r1(e,t);return l===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:s+d.y,data:{...d,placement:l}}}}},s1=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:a={fn:y=>{let{x:b,y:_}=y;return{x:b,y:_}}},...d}=Tn(t,e),c={x:n,y:o},u=await hd(e,d),f=Lo(jt(i)),h=cd(f);let p=c[h],m=c[f];if(s){const y=h==="y"?"top":"left",b=h==="y"?"bottom":"right",_=p+u[y],x=p-u[b];p=br(_,p,x)}if(l){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",_=m+u[y],x=m-u[b];m=br(_,m,x)}const g=a.fn({...e,[h]:p,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o}}}}};function st(t){return Cr(t)?(t.nodeName||"").toLowerCase():"#document"}function Pe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function lt(t){var e;return(e=(Cr(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Cr(t){return t instanceof Node||t instanceof Pe(t).Node}function at(t){return t instanceof Element||t instanceof Pe(t).Element}function Xe(t){return t instanceof HTMLElement||t instanceof Pe(t).HTMLElement}function pd(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Pe(t).ShadowRoot}function Hn(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=Ie(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function l1(t){return["table","td","th"].includes(st(t))}function kr(t){const e=xr(),n=Ie(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function a1(t){let e=tn(t);for(;Xe(e)&&!Wo(e);){if(kr(e))return e;e=tn(e)}return null}function xr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wo(t){return["html","body","#document"].includes(st(t))}function Ie(t){return Pe(t).getComputedStyle(t)}function Yo(t){return at(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function tn(t){if(st(t)==="html")return t;const e=t.assignedSlot||t.parentNode||pd(t)&&t.host||lt(t);return pd(e)?e.host:e}function md(t){const e=tn(t);return Wo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Xe(e)&&Hn(e)?e:md(e)}function jn(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=md(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),l=Pe(i);return s?e.concat(l,l.visualViewport||[],Hn(i)?i:[],l.frameElement&&n?jn(l.frameElement):[]):e.concat(i,jn(i,[],n))}function gd(t){const e=Ie(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=Xe(t),s=i?t.offsetWidth:n,l=i?t.offsetHeight:o,a=To(n)!==s||To(o)!==l;return a&&(n=s,o=l),{width:n,height:o,$:a}}function Sr(t){return at(t)?t:t.contextElement}function nn(t){const e=Sr(t);if(!Xe(e))return xt(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=gd(e);let l=(s?To(n.width):n.width)/o,a=(s?To(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!a||!Number.isFinite(a))&&(a=1),{x:l,y:a}}const d1=xt(0);function yd(t){const e=Pe(t);return!xr()||!e.visualViewport?d1:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function c1(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Pe(t)?!1:e}function Wt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Sr(t);let l=xt(1);e&&(o?at(o)&&(l=nn(o)):l=nn(t));const a=c1(s,n,o)?yd(s):xt(0);let d=(i.left+a.x)/l.x,c=(i.top+a.y)/l.y,u=i.width/l.x,f=i.height/l.y;if(s){const h=Pe(s),p=o&&at(o)?Pe(o):o;let m=h,g=m.frameElement;for(;g&&o&&p!==m;){const y=nn(g),b=g.getBoundingClientRect(),_=Ie(g),x=b.left+(g.clientLeft+parseFloat(_.paddingLeft))*y.x,$=b.top+(g.clientTop+parseFloat(_.paddingTop))*y.y;d*=y.x,c*=y.y,u*=y.x,f*=y.y,d+=x,c+=$,m=Pe(g),g=m.frameElement}}return jo({width:u,height:f,x:d,y:c})}const u1=[":popover-open",":modal"];function bd(t){return u1.some(e=>{try{return t.matches(e)}catch{return!1}})}function f1(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",l=lt(o),a=e?bd(e.floating):!1;if(o===l||a&&s)return n;let d={scrollLeft:0,scrollTop:0},c=xt(1);const u=xt(0),f=Xe(o);if((f||!f&&!s)&&((st(o)!=="body"||Hn(l))&&(d=Yo(o)),Xe(o))){const h=Wt(o);c=nn(o),u.x=h.x+o.clientLeft,u.y=h.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-d.scrollLeft*c.x+u.x,y:n.y*c.y-d.scrollTop*c.y+u.y}}function h1(t){return Array.from(t.getClientRects())}function $d(t){return Wt(lt(t)).left+Yo(t).scrollLeft}function p1(t){const e=lt(t),n=Yo(t),o=t.ownerDocument.body,i=Ht(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=Ht(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+$d(t);const a=-n.scrollTop;return Ie(o).direction==="rtl"&&(l+=Ht(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:l,y:a}}function m1(t,e){const n=Pe(t),o=lt(t),i=n.visualViewport;let s=o.clientWidth,l=o.clientHeight,a=0,d=0;if(i){s=i.width,l=i.height;const c=xr();(!c||c&&e==="fixed")&&(a=i.offsetLeft,d=i.offsetTop)}return{width:s,height:l,x:a,y:d}}function g1(t,e){const n=Wt(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=Xe(t)?nn(t):xt(1),l=t.clientWidth*s.x,a=t.clientHeight*s.y,d=i*s.x,c=o*s.y;return{width:l,height:a,x:d,y:c}}function _d(t,e,n){let o;if(e==="viewport")o=m1(t,n);else if(e==="document")o=p1(lt(t));else if(at(e))o=g1(e,n);else{const i=yd(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return jo(o)}function wd(t,e){const n=tn(t);return n===e||!at(n)||Wo(n)?!1:Ie(n).position==="fixed"||wd(n,e)}function y1(t,e){const n=e.get(t);if(n)return n;let o=jn(t,[],!1).filter(a=>at(a)&&st(a)!=="body"),i=null;const s=Ie(t).position==="fixed";let l=s?tn(t):t;for(;at(l)&&!Wo(l);){const a=Ie(l),d=kr(l);!d&&a.position==="fixed"&&(i=null),(s?!d&&!i:!d&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Hn(l)&&!d&&wd(t,l))?o=o.filter(u=>u!==l):i=a,l=tn(l)}return e.set(t,o),o}function b1(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const l=[...n==="clippingAncestors"?y1(e,this._c):[].concat(n),o],a=l[0],d=l.reduce((c,u)=>{const f=_d(e,u,i);return c.top=Ht(f.top,c.top),c.right=en(f.right,c.right),c.bottom=en(f.bottom,c.bottom),c.left=Ht(f.left,c.left),c},_d(e,a,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function $1(t){const{width:e,height:n}=gd(t);return{width:e,height:n}}function _1(t,e,n){const o=Xe(e),i=lt(e),s=n==="fixed",l=Wt(t,!0,s,e);let a={scrollLeft:0,scrollTop:0};const d=xt(0);if(o||!o&&!s)if((st(e)!=="body"||Hn(i))&&(a=Yo(e)),o){const f=Wt(e,!0,s,e);d.x=f.x+e.clientLeft,d.y=f.y+e.clientTop}else i&&(d.x=$d(i));const c=l.left+a.scrollLeft-d.x,u=l.top+a.scrollTop-d.y;return{x:c,y:u,width:l.width,height:l.height}}function Cd(t,e){return!Xe(t)||Ie(t).position==="fixed"?null:e?e(t):t.offsetParent}function kd(t,e){const n=Pe(t);if(!Xe(t)||bd(t))return n;let o=Cd(t,e);for(;o&&l1(o)&&Ie(o).position==="static";)o=Cd(o,e);return o&&(st(o)==="html"||st(o)==="body"&&Ie(o).position==="static"&&!kr(o))?n:o||a1(t)||n}const w1=async function(t){const e=this.getOffsetParent||kd,n=this.getDimensions;return{reference:_1(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}};function C1(t){return Ie(t).direction==="rtl"}const k1={convertOffsetParentRelativeRectToViewportRelativeRect:f1,getDocumentElement:lt,getClippingRect:b1,getOffsetParent:kd,getElementRects:w1,getClientRects:h1,getDimensions:$1,getScale:nn,isElement:at,isRTL:C1};function x1(t,e){let n=null,o;const i=lt(t);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function l(a,d){a===void 0&&(a=!1),d===void 0&&(d=1),s();const{left:c,top:u,width:f,height:h}=t.getBoundingClientRect();if(a||e(),!f||!h)return;const p=zo(u),m=zo(i.clientWidth-(c+f)),g=zo(i.clientHeight-(u+h)),y=zo(c),_={rootMargin:-p+"px "+-m+"px "+-g+"px "+-y+"px",threshold:Ht(0,en(1,d))||1};let x=!0;function $(w){const P=w[0].intersectionRatio;if(P!==d){if(!x)return l();P?l(!1,P):o=setTimeout(()=>{l(!1,1e-7)},100)}x=!1}try{n=new IntersectionObserver($,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver($,_)}n.observe(t)}return l(!0),s}function Wn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:d=!1}=o,c=Sr(t),u=i||s?[...c?jn(c):[],...jn(e)]:[];u.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const f=c&&a?x1(c,n):null;let h=-1,p=null;l&&(p=new ResizeObserver(b=>{let[_]=b;_&&_.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(e)})),n()}),c&&!d&&p.observe(c),p.observe(e));let m,g=d?Wt(t):null;d&&y();function y(){const b=Wt(t);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,m=requestAnimationFrame(y)}return n(),()=>{var b;u.forEach(_=>{i&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),f==null||f(),(b=p)==null||b.disconnect(),p=null,d&&cancelAnimationFrame(m)}}const xd=s1,Yn=i1,S1=o1,v1=(t,e,n)=>{const o=new Map,i={platform:k1,...n},s={...i.platform,_c:o};return n1(t,e,{...i,platform:s})};function M1(t){return t!=null&&typeof t=="object"&&"$el"in t}function vr(t){if(M1(t)){const e=t.$el;return Cr(e)&&st(e)==="#comment"?null:e}return t}function Sd(t){return{name:"arrow",options:t,fn(e){const n=vr(r.unref(t.element));return n==null?{}:S1({element:n,padding:t.padding}).fn(e)}}}function vd(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Md(t,e){const n=vd(t);return Math.round(e*n)/n}function Un(t,e,n){n===void 0&&(n={});const o=n.whileElementsMounted,i=r.computed(()=>{var M;return(M=r.unref(n.open))!=null?M:!0}),s=r.computed(()=>r.unref(n.middleware)),l=r.computed(()=>{var M;return(M=r.unref(n.placement))!=null?M:"bottom"}),a=r.computed(()=>{var M;return(M=r.unref(n.strategy))!=null?M:"absolute"}),d=r.computed(()=>{var M;return(M=r.unref(n.transform))!=null?M:!0}),c=r.computed(()=>vr(t.value)),u=r.computed(()=>vr(e.value)),f=r.ref(0),h=r.ref(0),p=r.ref(a.value),m=r.ref(l.value),g=r.shallowRef({}),y=r.ref(!1),b=r.computed(()=>{const M={position:p.value,left:"0",top:"0"};if(!u.value)return M;const N=Md(u.value,f.value),V=Md(u.value,h.value);return d.value?{...M,transform:"translate("+N+"px, "+V+"px)",...vd(u.value)>=1.5&&{willChange:"transform"}}:{position:p.value,left:N+"px",top:V+"px"}});let _;function x(){c.value==null||u.value==null||v1(c.value,u.value,{middleware:s.value,placement:l.value,strategy:a.value}).then(M=>{f.value=M.x,h.value=M.y,p.value=M.strategy,m.value=M.placement,g.value=M.middlewareData,y.value=!0})}function $(){typeof _=="function"&&(_(),_=void 0)}function w(){if($(),o===void 0){x();return}if(c.value!=null&&u.value!=null){_=o(c.value,u.value,x);return}}function P(){i.value||(y.value=!1)}return r.watch([s,l,a],x,{flush:"sync"}),r.watch([c,u],w,{flush:"sync"}),r.watch(i,P,{flush:"sync"}),r.getCurrentScope()&&r.onScopeDispose($),{x:r.shallowReadonly(f),y:r.shallowReadonly(h),strategy:r.shallowReadonly(p),placement:r.shallowReadonly(m),middlewareData:r.shallowReadonly(g),isPositioned:r.shallowReadonly(y),floatingStyles:b,update:x}}const Dd=r.defineComponent({__name:"FmTooltip",props:{variant:{default:"plain"},placement:{default:"top"},hideArrow:{type:Boolean,default:!1},content:{default:""},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=r.ref(null),o=r.ref(null),i=r.ref(null),{floatingStyles:s,middlewareData:l,placement:a}=Un(n,o,{whileElementsMounted:Wn,placement:e.placement,middleware:[Yn(),Ln({mainAxis:6}),Sd({element:i})]}),d=r.ref(!1),c=r.ref(0),u=r.ref(0),f=()=>{e.disabled||(clearTimeout(u.value),c.value=window.setTimeout(()=>{d.value=!0},250))},h=()=>{e.disabled||(clearTimeout(c.value),u.value=window.setTimeout(()=>d.value=!1,250))},p=()=>{clearTimeout(u.value),d.value=!0},m=r.computed(()=>{var y,b,_,x;const g={top:"bottom",right:"left",bottom:"top",left:"right"}[a.value];return{left:((y=l.value.arrow)==null?void 0:y.x)!=null?`${(b=l.value.arrow)==null?void 0:b.x}px`:"",top:((_=l.value.arrow)==null?void 0:_.y)!=null?`${(x=l.value.arrow)==null?void 0:x.y}px`:"",[g]:"-3px"}});return(g,y)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"referenceEl",ref:n,class:r.normalizeClass(["cursor-pointer flex items-center justify-center relative w-max",{"cursor-not-allowed pointer-events-none":g.disabled}]),onPointermove:y[0]||(y[0]=b=>{b.pointerType!=="touch"&&f()}),onPointerleave:h,onPointerdown:h,onPointerup:h},[r.renderSlot(g.$slots,"default")],34),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[d.value&&!g.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:r.normalizeClass(["fm-shadow-light-300 max-w-[240px] px-16 py-12 rounded-lg",{"bg-fm-color-neutral-black text-fm-color-typo-white fm-typo-body-sm-400":g.variant==="plain","bg-fm-color-neutral-white text-fm-color-typo-secondary fm-typo-body-md-400":g.variant==="rich"}]),style:r.normalizeStyle(r.unref(s)),onMouseenter:p,onMouseleave:h},[r.renderSlot(g.$slots,"content",{},()=>[r.createTextVNode(r.toDisplayString(g.content),1)]),r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:r.normalizeClass(["absolute h-8 rotate-45 rounded-[2px] w-8",{"bg-fm-color-neutral-black":g.variant==="plain","bg-fm-color-neutral-white":g.variant==="rich"}]),style:r.normalizeStyle(m.value)},null,6),[[r.vShow,!g.hideArrow]])],38)):r.createCommentVNode("",!0)]))]))}}),on=r.defineComponent({__name:"FmLabel",props:{label:{default:""},disabled:{type:Boolean,default:void 0},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""}},setup(t){const e=t,n=r.inject(me),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1);return(i,s)=>i.label||i.$slots.default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-typo-body-lg-400 flex gap-4",o.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary",{"items-center":i.info}])},[r.renderSlot(i.$slots,"default",{},()=>[r.createElementVNode("span",null,r.toDisplayString(i.label),1),i.required?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(["fm-typo-body-lg-700",o.value?"text-fm-color-typo-disabled":"text-fm-color-typo-error"])}," * ",2)):r.createCommentVNode("",!0),i.optional?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-body-md-400",o.value?"text-fm-color-typo-disabled":"text-fm-color-typo-tertiary"])}," (optional) ",2)):r.createCommentVNode("",!0),i.info?(r.openBlock(),r.createBlock(Dd,{key:2,content:i.info,disabled:o.value,placement:"top"},{default:r.withCtx(()=>[r.createVNode(j,{class:r.normalizeClass(["fm-typo-body-md-400",o.value?"text-fm-color-typo-disabled":"text-fm-color-neutral-gray-300"]),name:"info",size:"sm"},null,8,["class"])]),_:1},8,["content","disabled"])):r.createCommentVNode("",!0)])],2)):r.createCommentVNode("",!0)}}),D1={key:1,class:"flex items-center justify-between"},Fe=r.defineComponent({__name:"FmFormGroup",props:{modelValue:{},rules:{default:()=>[]},focused:{type:Boolean,default:!1},disabled:{type:Boolean,default:void 0},label:{default:""},required:{type:Boolean,default:!1},optional:{type:Boolean,default:!1},info:{default:""},helperText:{default:""},helperState:{default:"none"},tag:{default:"label"}},setup(t){const e=t,n=r.inject(me),{errorMessages:o,isPristine:i}=zs(e),{focus:s,blur:l}=un(),a=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),d=r.computed(()=>({label:e.label,disabled:a.value,required:e.required,optional:e.optional,info:e.info})),c=r.computed(()=>({text:e.helperText,disabled:a.value,state:e.helperState,errorMessages:o.value})),u=r.computed(()=>({isPristine:i,invalid:o.value.length>0}));return(f,h)=>(r.openBlock(),r.createBlock(e.tag,{class:"flex flex-col gap-4",onBlur:r.unref(l),onClick:r.unref(s)},{default:r.withCtx(()=>[f.label||f.$slots.label?(r.openBlock(),r.createBlock(on,r.normalizeProps(r.mergeProps({key:0},d.value)),{default:r.withCtx(()=>[r.renderSlot(f.$slots,"label")]),_:3},16)):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"default",r.normalizeProps(r.guardReactiveProps(u.value))),c.value.text||c.value.errorMessages.length>0||f.$slots["helper-text"]||f.$slots["helper-append"]?(r.openBlock(),r.createElementBlock("div",D1,[r.createVNode(dd,r.normalizeProps(r.guardReactiveProps(c.value)),{default:r.withCtx(()=>[r.renderSlot(f.$slots,"helper-text")]),_:3},16),r.renderSlot(f.$slots,"helper-append")])):r.createCommentVNode("",!0)]),_:3},8,["onBlur","onClick"]))}}),dt=Z(r.defineComponent({__name:"FmMenu",props:{placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1},trigger:{default:"click"},closeOnClick:{type:Boolean,default:!0},width:{default:void 0},maxHeight:{default:408},inPopover:{type:Boolean,default:!1},stopClickPropagation:{type:Boolean}},emits:["menu-changed"],setup(t,{emit:e}){const n=t,o=e,i=r.ref([]);let s;const l=r.ref(),a=r.ref(!1),d=r.ref(!1),c=r.inject(Fs,null),u=r.ref(null),f=r.ref(null),{floatingStyles:h}=Un(u,f,{middleware:[Ln({mainAxis:c?8:4,crossAxis:c?-12:0}),Yn({crossAxis:!1,fallbackStrategy:"initialPlacement"}),xd()],placement:n.placement,whileElementsMounted:Wn,strategy:"fixed"}),p=()=>{w.value==="hover"&&g()},m=M=>{if(n.stopClickPropagation&&M.stopPropagation(),!n.disabled){if(a.value){a.value=!1;return}w.value==="click"&&g()}},g=()=>{d.value=!0,a.value=!0,c==null||c.setChildId(s)},y=()=>{w.value==="hover"&&(d.value=!1)},b=()=>{d.value=!0},_=()=>{d.value=!1},x=()=>{n.closeOnClick&&setTimeout(()=>{a.value=!1,c==null||c.closeParent()},10)},$=r.computed(()=>({mouseInMenu:d}));r.provide(Fs,{register({injectProps:M}){return i.value=[...i.value,{injectProps:M}],i.value.length},closeParent(){c?(a.value=!1,c==null||c.closeParent()):a.value=w.value!=="click"},setChildId(M){l.value=M},mouseInChildId:l,trigger:n.trigger}),r.provide(Rs,{handleContentClick:x}),r.onMounted(()=>{window.addEventListener("click",P),c&&(s=c.register({injectProps:$}))}),r.onUnmounted(()=>{window.removeEventListener("click",P)}),r.watch(()=>c==null?void 0:c.mouseInChildId.value,M=>{M!==s&&(a.value=!1)});const w=r.computed(()=>c===null?n.trigger:"hover");r.watch(()=>a.value,()=>o("menu-changed",a.value));const P=M=>{if(!a.value)return;const N=M.path||M.composedPath();for(const V of N)if(V==u.value||V==f.value)return;a.value=!1};return(M,N)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:u,class:"fm-menu",onClick:m,onMouseenter:p,onMouseleave:y},[r.renderSlot(M.$slots,"menu-button",{},void 0,!0)],544),(r.openBlock(),r.createBlock(r.Teleport,{disabled:!!r.unref(c)||M.inPopover,to:"body"},[a.value?(r.openBlock(),r.createElementBlock("div",{key:0,id:"fm-menu",ref_key:"menuEl",ref:f,style:r.normalizeStyle(r.unref(h)),class:"block z-[99]",onMouseenter:b,onMouseleave:_},[r.renderSlot(M.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",{style:r.normalizeStyle({"max-height":`${M.maxHeight}px`,width:`${M.width}px`}),class:"fm-menu__wrapper"},[r.renderSlot(M.$slots,"default",{},void 0,!0)],4)],!0)],36)):r.createCommentVNode("",!0)],8,["disabled"]))]))}}),[["__scopeId","data-v-d86b16de"]]),E1={class:"fm-menu-item--left"},B1={key:0,class:"fm-menu-item--right"},De=Z(r.defineComponent({__name:"FmMenuItem",props:{modelValue:{type:Boolean,default:!1},selectable:{type:Boolean,default:!0},label:{default:""},sublabel:{default:""},icon:{default:""},expandable:{type:Boolean,default:!1},hasCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=r.ref(!1),i=r.inject(Rs,null),s=e,l=c=>{c.preventDefault(),i==null||i.handleContentClick(),!(n.disabled||!n.selectable)&&s("update:modelValue",!n.modelValue)},a=()=>{s("update:modelValue",n.modelValue)};function d(c){o.value=c}return(c,u)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{class:r.normalizeClass({"fm-menu-item":!0,"fm-menu-item--selected":c.modelValue&&!c.hasCheckbox,"fm-menu-item--disabled":c.disabled,"hover:bg-fm-color-opacity-sm":!c.disabled&&!c.modelValue&&c.selectable}),onClick:l,onMousedown:u[1]||(u[1]=()=>d(!0)),onMouseleave:u[2]||(u[2]=()=>d(!1)),onMouseup:u[3]||(u[3]=()=>d(!1))},[r.createElementVNode("div",E1,[r.renderSlot(c.$slots,"prepend",{},()=>[!c.hasCheckbox&&c.icon?(r.openBlock(),r.createBlock(j,{key:0,color:c.disabled?"#C7C7CC":c.modelValue?"#FF7823":"#1C1C1E",name:c.icon,outline:!o.value&&!c.modelValue,size:"md"},null,8,["color","name","outline"])):r.createCommentVNode("",!0),c.hasCheckbox?(r.openBlock(),r.createBlock(ld,{key:1,disabled:c.disabled,indeterminate:c.indeterminate,"model-value":c.modelValue,label:"",name:"something",sublabel:"",value:"",onClick:u[0]||(u[0]=f=>f.preventDefault()),"onUpdate:modelValue":a},null,8,["disabled","indeterminate","model-value"])):r.createCommentVNode("",!0)],!0),r.renderSlot(c.$slots,"label",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-md-400 max-w-[240px]",c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"])},r.toDisplayString(c.label),3),c.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-body-sm-400 ${c.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(c.sublabel),3)):r.createCommentVNode("",!0)])],!0)]),r.renderSlot(c.$slots,"append",{},void 0,!0),c.expandable?(r.openBlock(),r.createElementBlock("div",B1,[r.createVNode(j,{color:c.disabled?"#C7C7CC":"#AEAEB2",name:"chevron_right",size:"md"},null,8,["color"])])):r.createCommentVNode("",!0)],34)]))}}),[["__scopeId","data-v-9a24e799"]]),V1={class:"fm-typo-body-lg-700"},P1={class:"h-[264px] overflow-y-auto w-[160px]"},F1=["onVnodeMounted"],R1=["onVnodeMounted"],rn=r.defineComponent({__name:"FmDateRangeYearMonthPicker",props:{modelValue:{},picker:{},min:{},max:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.computed(()=>{const c=R(n.min).startOf("year"),u=R(n.max).startOf("year"),f=u.diff(c,"year"),h=[];for(let p=0;p<=f;p++)h.push(u.subtract(p,"year"));return h}),l=c=>{const u=R(n.min).startOf("month"),f=R(n.max).startOf("month");return c.get("year")===u.get("year")?c.startOf("month").isAfter(u)||c.get("month")===u.get("month"):c.get("year")===f.get("year")?c.startOf("month").isBefore(f)||c.get("month")===f.get("month"):!0},a=c=>{const u=R(n.min).startOf("month"),f=R(n.max).startOf("month");if(u.get("year")===c.get("year")){o("update:modelValue",u);return}if(f.get("year")===c.get("year")){o("update:modelValue",f);return}o("update:modelValue",c)};function d(c,u){if(!u)return!1;const f=c.el,h=f==null?void 0:f.parentElement;!f||!h||h.scrollTo({top:f.offsetTop-50})}return(c,u)=>(r.openBlock(),r.createBlock(dt,{trigger:"click","in-popover":"",onMenuChanged:u[0]||(u[0]=f=>i.value=f)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-4 h-24 items-center px-8 rounded-sm",i.value?"text-fm-color-primary":"hover:bg-fm-color-neutral-gray-100"])},[r.createElementVNode("div",V1,[c.picker==="month"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(c.modelValue.format("MMMM")),1)],64)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(c.modelValue.format("YYYY")),1)],64)):r.createCommentVNode("",!0)]),r.createVNode(j,{name:i.value?"expand_less":"expand_more",size:"md",color:"black"},null,8,["name"])],2)]),default:r.withCtx(()=>[r.createElementVNode("ul",P1,[c.picker==="month"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(Array.from(Array(12),(f,h)=>c.modelValue.month(h)),f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("MMMM"),onVnodeMounted:h=>d(h,c.modelValue.format("MMMM")===f.format("MMMM"))},[r.createVNode(De,{disabled:!l(f),"model-value":c.modelValue.format("MMMM")===f.format("MMMM"),label:f.format("MMMM"),"onUpdate:modelValue":h=>o("update:modelValue",f)},null,8,["disabled","model-value","label","onUpdate:modelValue"])],8,F1))),128)):r.createCommentVNode("",!0),c.picker==="year"?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(s.value,f=>(r.openBlock(),r.createElementBlock("li",{key:f.format("YYYY"),onVnodeMounted:h=>d(h,c.modelValue.format("YYYY")===f.format("YYYY"))},[r.createVNode(De,{"model-value":c.modelValue.format("YYYY")===f.format("YYYY"),label:f.format("YYYY"),"onUpdate:modelValue":h=>a(f)},null,8,["model-value","label","onUpdate:modelValue"])],8,R1))),128)):r.createCommentVNode("",!0)])]),_:1}))}}),N1={mounted:(t,e)=>{t.clickOutsideEvent=n=>{const o=e.arg?document.querySelectorAll(`#${e.arg}`):[];!(t==n.target||t.contains(n.target))&&!Array.from(o).some(i=>i&&(n.target==i||i.contains(n.target)))&&e.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:t=>{document.removeEventListener("click",t.clickOutsideEvent)}},Mr=Z(r.defineComponent({__name:"FmPopover",props:{showPopover:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["popover-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(o.showPopover),s=r.ref(null),l=r.ref(null),{floatingStyles:a}=Un(s,l,{middleware:[Ln(4),Yn(),xd({crossAxis:!0})],placement:o.placement,whileElementsMounted:Wn,strategy:"fixed"}),d=n,c=()=>{i.value||(i.value=!0,d("popover-changed",i.value))},u=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};e({show:c,hide:u});const f=()=>{o.disabled||(i.value=!i.value,d("popover-changed",i.value))};r.watch(()=>o.showPopover,p=>i.value=p);const h=()=>{i.value&&(i.value=!1,d("popover-changed",i.value))};return(p,m)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-popover",onClick:f},[r.renderSlot(p.$slots,"popover-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"popoverEl",ref:l,style:r.normalizeStyle(r.unref(a)),class:"fm-popover__content"},[r.renderSlot(p.$slots,"default",{hide:u,show:c},void 0,!0)],4)):r.createCommentVNode("",!0)])),[[r.unref(N1),h]])}}),[["__scopeId","data-v-88a232c9"]]),A="YYYY-MM-DD",Dr=t=>{const e=[],n=t.endOf("month"),o=t.month();let i=t.startOf("week"),s=[];for(;i.isBefore(n.endOf("week"));)i.day()===0&&s.length>0&&(e.push(s),s=[]),s.push({date:i,isCurrentMonth:i.month()===o}),i=i.add(1,"day");return s.length>0&&e.push(s),e},Ed=(t,e)=>{const n=R().startOf("month"),o=R(t).diff(n,"month"),i=R(e).diff(n,"month"),s=[];for(let l=o-1;l<=i;l++){const a=[],d=n.add(l,"month").startOf("month"),c=d.endOf("month"),u=d.month();let f=d.startOf("week"),h=[];for(;f.isBefore(c.endOf("week"));)f.day()===0&&h.length>0&&(a.push(h),h=[]),h.push({id:d.format("MM-YYYY"),date:f,isCurrentMonth:f.month()===u}),f=f.add(1,"day");h.length>0&&a.push(h),s.push({id:d.format("YYYY-MM-DD"),matrix:a,height:64+48*(c.endOf("week").diff(d.startOf("week"),"week")+1)})}return s},Gn=Array.from(Array(7),(t,e)=>R().day(e).format("ddd")),A1={class:"p-12 w-[360px]"},O1={class:"w-max"},I1={class:"flex h-40 justify-between px-4 py-8"},T1={class:"flex gap-4 items-center"},z1={class:"flex gap-4 items-center justify-center"},L1={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},H1=["onClick"],j1={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},W1=Z(r.defineComponent({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=X(e,"modelValue"),o=r.ref(R(n.value,A)),i=r.ref(!1),s=r.ref(R().startOf("month")),l=r.ref(!1),a=r.ref(!1),d=h=>{o.value=h},c=()=>{n.value=o.value.format(A),setTimeout(()=>{i.value=!1},0)},u=()=>{o.value=n.value?R(n.value):null,i.value=!1},f=h=>{l.value=!1,a.value=!1,s.value=h};return(h,p)=>(r.openBlock(),r.createBlock(Fe,{modelValue:r.unref(n),"onUpdate:modelValue":p[5]||(p[5]=m=>r.isRef(n)?n.value=m:null),disabled:h.disabled,focused:i.value,"helper-state":h.helperState,"helper-text":h.helperText,info:h.labelInfo,label:h.label,optional:h.labelMark==="optional",required:h.labelMark==="required",rules:h.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(h.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:m})=>[r.createVNode(Mr,{disabled:h.disabled,"show-popover":i.value,onPopoverChanged:p[4]||(p[4]=g=>i.value=g)},{"popover-button":r.withCtx(()=>[h.$slots["trigger-button"]?r.renderSlot(h.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{invalid:m,opened:i.value,showValidBorder:h.showValidBorder})),void 0,!0):(r.openBlock(),r.createBlock(ye,{key:1,focused:i.value,"icon-outlined":!i.value,invalid:m,"show-valid-border":h.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(h.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(h.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[e.disabled?"text-fm-color-typo-disabled":r.unref(n)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},r.toDisplayString(r.unref(n)?r.unref(R)(r.unref(n)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","icon-outlined","invalid","show-valid-border"]))]),default:r.withCtx(()=>[r.createElementVNode("div",A1,[r.createElementVNode("div",O1,[r.createElementVNode("div",I1,[r.createElementVNode("div",T1,[r.createVNode(rn,{max:h.max,min:h.min,"model-value":s.value,picker:"month","onUpdate:modelValue":p[0]||(p[0]=g=>f(g))},null,8,["max","min","model-value"]),r.createVNode(rn,{max:h.max,min:h.min,"model-value":s.value,picker:"year","onUpdate:modelValue":p[1]||(p[1]=g=>f(g))},null,8,["max","min","model-value"])]),r.createElementVNode("div",z1,[r.createVNode(j,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_left",onClick:p[2]||(p[2]=()=>f(s.value.subtract(1,"month")))}),r.createVNode(j,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_right",onClick:p[3]||(p[3]=()=>f(s.value.add(1,"month")))})])]),r.createElementVNode("div",null,[r.createElementVNode("div",L1,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Gn),g=>(r.openBlock(),r.createElementBlock("div",{key:g,class:"fm-calendar__cell"},r.toDisplayString(g),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Dr)(s.value),(g,y)=>(r.openBlock(),r.createElementBlock("div",{key:y,class:"fm-calendar__row fm-typo-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(g,b=>(r.openBlock(),r.createElementBlock("div",{key:b.date.date(),class:"fm-calendar__cell"},[b.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":b.date.isSame(o.value)},"fm-calendar__cell__button"]),type:"button",onClick:()=>d(b.date)},r.toDisplayString(b.date.date()),11,H1)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",j1,[r.createVNode(K,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),r.createVNode(K,{disabled:!o.value,label:"Apply",size:"md",variant:"primary",onClick:c},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover"])]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-8289727d"]]),Bd=t=>(r.pushScopeId("data-v-59c612df"),t=t(),r.popScopeId(),t),Y1={class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},U1={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},G1={class:"flex items-center justify-center"},q1={class:"flex fm-typo-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},X1={class:"flex h-[calc(100%-208px)] justify-center relative w-full"},K1=Bd(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),Z1={id:"wrapper",class:"h-full relative w-[336px]"},J1=["id"],Q1={class:"flex gap-4 items-center"},e2={class:"fm-typo-body-lg-700"},t2={class:"fm-typo-body-lg-700"},n2=["onClick"],o2={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},i2=Bd(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),r2={class:"flex gap-8 items-center justify-end w-full"},Vd=Z(r.defineComponent({__name:"FmDatePickerMobile",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=Ed(e.min,e.max),o=X(e,"modelValue"),i=R(),s=r.ref(R(o.value,A)),l=r.ref(!1),a=r.ref(),d=p=>{s.value=p},c=()=>{o.value=s.value.format(A),setTimeout(()=>{l.value=!1},0)},u=()=>{s.value=o.value?R(o.value):null,l.value=!1},f=()=>{l.value=!0,setTimeout(()=>{a.value.scrollToItem(h(i.startOf("month")))},0)},h=p=>n.findIndex(m=>m.id===p.startOf("month").format(A));return(p,m)=>{const g=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Fe,{modelValue:r.unref(o),"onUpdate:modelValue":m[0]||(m[0]=y=>r.isRef(o)?o.value=y:null),disabled:p.disabled,focused:l.value,"helper-state":p.helperState,"helper-text":p.helperText,info:p.labelInfo,label:p.label,optional:p.labelMark==="optional",required:p.labelMark==="required",rules:p.rules,tag:"div"},{label:r.withCtx(()=>[r.renderSlot(p.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:y})=>[p.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:f},[r.renderSlot(p.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({invalid:y,opened:l.value,showValidBorder:p.showValidBorder})),void 0,!0)])):(r.openBlock(),r.createBlock(ye,{key:1,focused:l.value,invalid:y,"show-valid-border":p.showValidBorder,class:"cursor-pointer","icon-outlined":"","prepend-icon":"calendar_month",onClick:f},{prepend:r.withCtx(()=>[r.renderSlot(p.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(p.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[e.disabled?"text-fm-color-typo-disabled":r.unref(o)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},r.toDisplayString(r.unref(o)?r.unref(R)(r.unref(o)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["focused","invalid","show-valid-border"])),l.value?(r.openBlock(),r.createBlock(r.Teleport,{key:2,to:"body"},[r.createElementVNode("div",Y1,[r.createElementVNode("div",U1,[r.createVNode(ye,{focused:l.value,invalid:y,"show-valid-border":p.showValidBorder,"icon-outlined":"","prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(p.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(p.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var b,_;return[r.createElementVNode("div",{class:r.normalizeClass([[e.disabled?"text-fm-color-typo-disabled":(b=s.value)!=null&&b.isValid()?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},r.toDisplayString((_=s.value)!=null&&_.isValid()?r.unref(R)(s.value).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["focused","invalid","show-valid-border"]),r.createElementVNode("div",G1,[r.createElementVNode("div",q1,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Gn),b=>(r.openBlock(),r.createElementBlock("div",{key:b,class:"fm-calendar__cell"},r.toDisplayString(b),1))),128))])])]),r.createElementVNode("div",X1,[K1,r.createElementVNode("div",Z1,[r.createVNode(g,{ref_key:"scroller",ref:a,buffer:200,"item-size":null,items:r.unref(n),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:b})=>[r.createElementVNode("div",{id:b.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",Q1,[r.createElementVNode("div",e2,r.toDisplayString(r.unref(R)(b.id).format("MMMM")),1),r.createElementVNode("div",t2,r.toDisplayString(r.unref(R)(b.id).format("YYYY")),1)])],8,J1),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.matrix,(_,x)=>(r.openBlock(),r.createElementBlock("div",{key:x,class:"fm-calendar__row fm-typo-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(_,$=>(r.openBlock(),r.createElementBlock("div",{key:$.date.date(),class:"fm-calendar__cell"},[$.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([{"fm-calendar__cell__button--selected":$.date.isSame(s.value),"fm-typo-body-lg-700":$.date.isSame(r.unref(i),"day")},"fm-calendar__cell__button"]),type:"button",onClick:()=>d($.date)},r.toDisplayString($.date.date()),11,n2)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",o2,[i2,r.createElementVNode("div",r2,[r.createVNode(K,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),r.createVNode(K,{disabled:!s.value,label:"Apply",size:"md",variant:"primary",onClick:c},null,8,["disabled"])])])])])):r.createCommentVNode("",!0)]),"helper-text":r.withCtx(()=>[r.renderSlot(p.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"])}}}),[["__scopeId","data-v-59c612df"]]),Pd=t=>{const e=r.inject(me);return r.computed(()=>{const n=t.disabled??(e==null?void 0:e.getDisabled())??!1;return{...t,disabled:n}})},s2=r.defineComponent({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const{breakpoints:e}=Gt(),n=t,o=X(n,"modelValue"),i=Pd(n);return(s,l)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(e).md||r.unref(e).lg?(r.openBlock(),r.createBlock(W1,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":l[0]||(l[0]=a=>r.isRef(o)?o.value=a:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(a=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(a)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(e).xs||r.unref(e).sm?(r.openBlock(),r.createBlock(Vd,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":l[1]||(l[1]=a=>r.isRef(o)?o.value=a:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(a=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(a)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),Fd=r.defineComponent({__name:"FmMenuDivider",props:{vertical:{type:Boolean,default:!1},inset:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["border-fm-color-neutral-gray-100 rounded-sm",[e.vertical?"border-l -my-4 mx-4":"border-t -mx-4 my-4",{"my-0":e.inset&&e.vertical,"mx-0":e.inset&&!e.vertical}]])},null,2))}}),l2={class:"cursor-pointer fm-switch__container"},a2={key:0},d2={class:"fm-typo-body-lg-400"},c2={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},u2={class:"fm-switch__input--container"},f2=["checked","disabled","value"],h2={key:1},p2={class:"fm-typo-body-lg-400"},m2={key:0,class:"fm-color-typo-secondary fm-typo-body-md-400"},Er=Z(r.defineComponent({__name:"FmSwitch",props:{modelValue:{type:Boolean},label:{default:""},sublabel:{default:""},labelPlacement:{default:"left"},value:{default:null},disabled:{type:Boolean,default:void 0},showIcon:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(me),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=X(e,"modelValue"),s=()=>{o.value||(i.value=!i.value)};return(l,a)=>(r.openBlock(),r.createElementBlock("label",l2,[l.labelPlacement==="left"?(r.openBlock(),r.createElementBlock("div",a2,[r.renderSlot(l.$slots,"label",{},void 0,!0),r.createElementVNode("div",d2,r.toDisplayString(l.label),1),l.sublabel?(r.openBlock(),r.createElementBlock("div",c2,r.toDisplayString(l.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",u2,[r.createElementVNode("input",{checked:r.unref(i),disabled:o.value,value:l.value,class:"fm-switch__input--btn",type:"checkbox",onClick:s},null,8,f2),r.createElementVNode("div",{class:r.normalizeClass({"fm-switch__input--knob":!0,"fm-switch__input--knob--show-icon":l.showIcon})},[l.showIcon?(r.openBlock(),r.createBlock(j,{key:0,color:o.value?"#C7C7CC":r.unref(i)?"#1C1C1E":"#FFFFFF",name:r.unref(i)?"check":"close",size:"sm"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)]),l.labelPlacement==="right"?(r.openBlock(),r.createElementBlock("div",h2,[r.createElementVNode("div",p2,r.toDisplayString(l.label),1),l.sublabel?(r.openBlock(),r.createElementBlock("div",m2,r.toDisplayString(l.sublabel),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-0b5af216"]]);var pe=(t=>(t.PrecedingPeriod="preceding_period",t.PrecedingWeek="preceding_week",t.PrecedingMonth="preceding_month",t.Custom="custom",t))(pe||{});const Rd=t=>(r.pushScopeId("data-v-7df3265e"),t=t(),r.popScopeId(),t),g2={key:0,class:"flex gap-4 items-center relative w-full"},y2={class:"flex flex-col gap-4 w-full"},b2=Rd(()=>r.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),$2={class:"flex flex-col gap-4 w-full"},_2={key:1,class:"flex flex-col gap-4 w-full"},w2={class:"flex gap-4 p-12"},C2={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},k2={key:0,class:"px-8"},x2={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},S2={class:"flex flex-col gap-24"},v2={key:0,class:"flex gap-4 items-center px-12 w-full"},M2={class:"flex flex-col gap-4 w-full"},D2=Rd(()=>r.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),E2={class:"flex flex-col gap-4 w-full"},B2={class:"flex gap-24"},V2={class:"w-max"},P2={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},F2={class:"flex gap-4 items-center"},R2={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},N2={class:"h-[288px]"},A2={key:0,class:"fm-calendar__cell__button--today"},O2=["onClick","onMouseover"],I2={class:"w-max"},T2={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},z2={class:"flex gap-4 items-center"},L2={class:"fm-calendar__row fm-typo-body-lg-400 text-fm-color-typo-tertiary"},H2={key:0,class:"fm-calendar__cell__button--today"},j2=["onClick","onMouseover"],W2={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},Y2=Z(r.defineComponent({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var V,B;const e=[{id:pe.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{d.value=pe.PrecedingPeriod;const k=s.value;if(k[0].startDate&&k[0].endDate){const C=k[0].startDate.diff(k[0].endDate,"day");k[1]={startDate:k[0].startDate.subtract(+(1-C),"day"),endDate:k[0].startDate.subtract(1,"day")}}}},{id:pe.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{d.value=pe.PrecedingWeek;const k=s.value;if(k[0].startDate&&k[0].endDate){let C=k[0].endDate.diff(k[0].startDate,"week");C===0&&(C+=1),k[1]={startDate:k[0].startDate.subtract(C,"week"),endDate:k[0].endDate.subtract(C,"week")}}}},{id:pe.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{d.value=pe.PrecedingMonth;const k=s.value;if(k[0].startDate&&k[0].endDate){let C=k[0].endDate.diff(k[0].startDate,"month");C===0&&(C+=1),k[1]={startDate:k[0].startDate.subtract(C,"month"),endDate:k[0].endDate.subtract(C,"month")}}}},{id:pe.Custom,label:"Custom",sublabel:"",action:()=>{d.value=pe.Custom}}],n=t,o=R(),i=X(n,"modelValue"),s=r.ref([{startDate:(V=i.value)!=null&&V.startDate?R(i.value.startDate,A):null,endDate:(B=i.value)!=null&&B.endDate?R(i.value.endDate,A):null},{startDate:null,endDate:null}]),l=r.ref(!1),a=r.ref(!1),d=r.ref(""),c=r.ref(R().startOf("month")),u=r.ref(R().startOf("month").add(1,"month")),f=r.ref(""),h=r.ref(null);let p=0;const m=k=>{var C;if(f.value="",s.value[p].startDate&&s.value[p].endDate){p===1&&(s.value=s.value.map(()=>({startDate:null,endDate:null})),p=0),s.value[0]={startDate:k,endDate:null};return}else if(!s.value[p].startDate&&!s.value[p].endDate)s.value[p].startDate=k;else{if(k.isBefore(s.value[p].startDate)){const E=s.value[p].startDate;s.value[p]={startDate:k,endDate:E}}else s.value[p].endDate=k;a.value&&(p=1),e.find(E=>E.id===d.value)||(d.value=pe.Custom)}(C=e.find(E=>E.id===d.value))==null||C.action()},g=()=>{a.value?i.value=s.value.map(k=>({startDate:k.startDate.format(A),endDate:k.endDate.format(A)})):i.value={startDate:s.value[0].startDate.format(A),endDate:s.value[0].endDate.format(A)},setTimeout(()=>{l.value=!1})},y=()=>{var k,C;Array.isArray(i.value)?s.value=i.value:s.value[0]={startDate:(k=i.value)!=null&&k.startDate?R(i.value.startDate,A):null,endDate:(C=i.value)!=null&&C.endDate?R(i.value.endDate,A):null},l.value=!1},b=(k,C)=>{k==="left"?(c.value=C,u.value=C.add(1,"month")):k==="right"&&(u.value=C,c.value=C.subtract(1,"month"))},_=k=>{const C=s.value[0].startDate,E=s.value[0].endDate,v=s.value[1].startDate,D=s.value[1].endDate,S=h.value,F=C==null?void 0:C.isSame(k),O=E==null?void 0:E.isSame(k),z=v==null?void 0:v.isSame(k),T=D==null?void 0:D.isSame(k),W=S==null?void 0:S.isSame(k),U=F&&E&&!(F&&O)||C&&!E&&F&&(S==null?void 0:S.isAfter(C))||C&&!E&&W&&(S==null?void 0:S.isBefore(C)),G=z&&D&&!(z&&T)||v&&!D&&z&&(S==null?void 0:S.isAfter(v))||v&&!D&&W&&(S==null?void 0:S.isBefore(v)),Q=O&&C&&!(F&&O)||C&&!E&&F&&(S==null?void 0:S.isBefore(C))||C&&!E&&W&&(S==null?void 0:S.isAfter(C)),le=T&&v&&!(z&&T)||v&&!D&&z&&(S==null?void 0:S.isBefore(v))||v&&!D&&W&&(S==null?void 0:S.isAfter(v)),fe=F&&O||F&&!E,Ne=z&&T||z&&!D,We=C&&(E||S)&&E?k.isAfter(C)&&k.isBefore(E):k.isAfter(S)&&k.isBefore(C)||k.isBefore(S)&&k.isAfter(C),Ae=v&&(D||S)&&D?k.isAfter(v)&&k.isBefore(D):k.isAfter(S)&&k.isBefore(v)||k.isBefore(S)&&k.isAfter(v),te=(xe,Se,Ye)=>xe&&Se&&Ye?xe.isAfter(Se,"day")&&xe.isBefore(Ye,"day"):!1,se=()=>{if(s.value.filter(Se=>{var Ye;for(const Yt in Se)if((Ye=Se[Yt])!=null&&Ye.isSame(k,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(F&&O&&(te(k,v,D)||te(k,v,S)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(z&&T&&(te(k,C,E)||te(k,C,S)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(U||Q)return te(k,v,D)||te(k,v,S)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(G||le)return te(k,C,E)||te(k,C,S)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(fe)return"bg-fm-color-primary";if(Ne)return"bg-fm-color-system-info-300";if(te(k,C,E)&&(te(k,v,D)||te(k,v,S)))return"bg-fm-color-system-success-100";if(We)return"bg-fm-color-system-warning-100";if(Ae)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${se()}`]:U||G,[`fm-calendar__cell__button--selected-end ${se()}`]:Q||le,[`fm-calendar__cell__button--selected-between ${se()}`]:We||Ae,[`fm-calendar__cell__button--selected ${se()}`]:fe||Ne}},x=k=>{const C=s.value;if(C[0].startDate&&!C[0].endDate||C[1].startDate&&!C[1].endDate){h.value=k;return}h.value=null},$=k=>{f.value=k.label,s.value[0]={startDate:R(k.value.startDate,A),endDate:R(k.value.endDate,A)}},w=r.computed(()=>a.value?!s.value.every(k=>k.startDate&&k.endDate):!(s.value[0].startDate&&s.value[0].endDate)),P=k=>{d.value="",a.value=k,s.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),p=0},M=r.computed(()=>{if(!i.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const k=a.value&&Array.isArray(i.value)?i.value[0].startDate:i.value.startDate,C=a.value&&Array.isArray(i.value)?i.value[0].endDate:i.value.endDate;return{startDate:k?R(k).format("D MMM YYYY"):"DD MM YYYY",endDate:C?R(C).format("D MMM YYYY"):"DD MM YYYY"}}),N=r.computed(()=>{const k=a.value&&Array.isArray(i.value)?i.value[1].startDate:null,C=a.value&&Array.isArray(i.value)?i.value[1].endDate:null;return k&&C?`Compared: ${R(k).format("D MMM YYYY")} - ${R(C).format("D MMM YYYY")}`:""});return r.watch(()=>i.value,()=>{var k,C;a.value?s.value=i.value.map(E=>({startDate:E!=null&&E.startDate?R(E.startDate,A):null,endDate:E!=null&&E.endDate?R(E.endDate,A):null})):s.value[0]={startDate:(k=i.value)!=null&&k.startDate?R(i.value.startDate,A):null,endDate:(C=i.value)!=null&&C.endDate?R(i.value.endDate,A):null}}),(k,C)=>(r.openBlock(),r.createBlock(Fe,{modelValue:r.unref(i),"onUpdate:modelValue":C[8]||(C[8]=E=>r.isRef(i)?i.value=E:null),disabled:k.disabled,focused:l.value,"helper-state":k.helperState,"helper-text":a.value?N.value:k.helperText,rules:k.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:E})=>[r.createVNode(Mr,{disabled:k.disabled,"show-popover":l.value,onPopoverChanged:C[7]||(C[7]=v=>l.value=v)},{"popover-button":r.withCtx(()=>[k.$slots["trigger-button"]?r.renderSlot(k.$slots,"trigger-button",r.normalizeProps(r.mergeProps({key:0},{opened:l.value,invalid:E,showValidBorder:k.showValidBorder,isComparing:a.value})),void 0,!0):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[k.compare?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",g2,[r.createElementVNode("label",y2,[r.createElementVNode("div",{class:r.normalizeClass([[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-body-lg-400"])},r.toDisplayString(n.startLabel),3),r.createVNode(ye,{class:r.normalizeClass(k.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,"icon-outlined":!l.value,invalid:E,"show-valid-border":k.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(k.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(k.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var v;return[r.createElementVNode("div",{class:r.normalizeClass([[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-body-lg-400"])},r.toDisplayString((v=r.unref(i))!=null&&v.startDate?r.unref(R)(r.unref(i).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","icon-outlined","invalid","show-valid-border"])]),b2,r.createElementVNode("label",$2,[r.createElementVNode("div",{class:r.normalizeClass([[n.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-body-lg-400"])},r.toDisplayString(n.endLabel),3),r.createVNode(ye,{class:r.normalizeClass(k.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,"icon-outlined":!l.value,invalid:E,"show-valid-border":k.showValidBorder,"prepend-icon":"calendar_month"},{prepend:r.withCtx(()=>[r.renderSlot(k.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(k.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>{var v;return[r.createElementVNode("div",{class:r.normalizeClass([[n.disabled?"text-fm-color-typo-disabled":M.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},r.toDisplayString((v=r.unref(i))!=null&&v.endDate?r.unref(R)(r.unref(i).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","focused","icon-outlined","invalid","show-valid-border"])])])),k.compare?(r.openBlock(),r.createElementBlock("label",_2,[r.createVNode(on,{label:k.compareLabel},null,8,["label"]),r.createVNode(ye,{class:r.normalizeClass(k.disabled?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:E,"show-valid-border":k.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(k.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot(k.$slots,"append",{},void 0,!0)]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([[n.disabled?"text-fm-color-typo-disabled":M.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},r.toDisplayString(M.value.startDate)+" - "+r.toDisplayString(M.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)],64))]),default:r.withCtx(()=>[r.createElementVNode("div",w2,[k.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",C2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(k.predefinedRange,(v,D)=>(r.openBlock(),r.createBlock(De,{key:D,label:v.label,"model-value":f.value===v.label,selectable:"",onClick:S=>$(v)},null,8,["label","model-value","onClick"]))),128)),k.compare&&k.predefinedRange?(r.openBlock(),r.createElementBlock("div",k2,[r.createVNode(Fd,{inset:""})])):r.createCommentVNode("",!0),k.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Er,{"model-value":a.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":C[0]||(C[0]=v=>P(v))},null,8,["model-value"]),a.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},r.renderList(e,(v,D)=>r.createVNode(De,{key:D,label:v.label,"model-value":d.value===v.id,sublabel:v.sublabel,selectable:"",onClick:S=>v.action()},null,8,["label","model-value","sublabel","onClick"])),64)):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),k.showPredefinedRange?(r.openBlock(),r.createElementBlock("div",x2)):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass({"pl-4":k.showPredefinedRange})},[r.createElementVNode("div",S2,[a.value?(r.openBlock(),r.createElementBlock("div",v2,[r.createElementVNode("label",M2,[r.createVNode(on,{label:"Custom"}),r.createVNode(ye,{focused:!1},{default:r.withCtx(()=>{var v,D;return[r.createElementVNode("div",{class:r.normalizeClass([[(v=s.value[0])!=null&&v.startDate&&((D=s.value[0])!=null&&D.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},r.toDisplayString(s.value[0].startDate!==null?s.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(s.value[0].endDate!==null?s.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),D2,r.createElementVNode("label",E2,[r.createVNode(on,{label:"Compare"}),r.createVNode(ye,{focused:!1},{default:r.withCtx(()=>{var v,D;return[r.createElementVNode("div",{class:r.normalizeClass([[(v=s.value[1])!=null&&v.startDate&&((D=s.value[1])!=null&&D.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-body-lg-400"])},r.toDisplayString(s.value[1].startDate!==null?s.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+r.toDisplayString(s.value[1].endDate!==null?s.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):r.createCommentVNode("",!0),r.createElementVNode("div",B2,[r.createElementVNode("div",V2,[r.createElementVNode("div",P2,[r.createElementVNode("div",F2,[r.createVNode(j,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:C[1]||(C[1]=()=>b("left",c.value.subtract(1,"month")))}),r.createVNode(rn,{max:k.max,min:k.min,"model-value":c.value,picker:"month","onUpdate:modelValue":C[2]||(C[2]=v=>b("left",v))},null,8,["max","min","model-value"]),r.createVNode(rn,{max:k.max,min:k.min,"model-value":c.value,picker:"year","onUpdate:modelValue":C[3]||(C[3]=v=>b("left",v))},null,8,["max","min","model-value"])])]),r.createElementVNode("div",null,[r.createElementVNode("div",R2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Gn),v=>(r.openBlock(),r.createElementBlock("div",{key:v,class:"fm-calendar__cell"},r.toDisplayString(v),1))),128))]),r.createElementVNode("div",N2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Dr)(c.value),(v,D)=>(r.openBlock(),r.createElementBlock("div",{key:D,class:"fm-calendar__row fm-typo-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v,S=>(r.openBlock(),r.createElementBlock("div",{key:S.date.date(),class:"fm-calendar__cell"},[S.date.isSame(r.unref(o),"day")&&S.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",A2)):r.createCommentVNode("",!0),S.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[_(S.date),{"fm-typo-body-lg-700":S.date.isSame(r.unref(o),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>m(S.date),onMouseover:F=>x(S.date)},r.toDisplayString(S.date.date()),43,O2)):r.createCommentVNode("",!0)]))),128))]))),128))])])]),r.createElementVNode("div",I2,[r.createElementVNode("div",T2,[r.createElementVNode("div",z2,[r.createVNode(rn,{max:k.max,min:k.min,"model-value":u.value,picker:"month","onUpdate:modelValue":C[4]||(C[4]=v=>b("right",v))},null,8,["max","min","model-value"]),r.createVNode(rn,{max:k.max,min:k.min,"model-value":u.value,picker:"year","onUpdate:modelValue":C[5]||(C[5]=v=>b("right",v))},null,8,["max","min","model-value"])]),r.createVNode(j,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:C[6]||(C[6]=()=>b("left",c.value.add(1,"month")))})]),r.createElementVNode("div",null,[r.createElementVNode("div",L2,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Gn),v=>(r.openBlock(),r.createElementBlock("div",{key:v,class:"fm-calendar__cell"},r.toDisplayString(v),1))),128))]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Dr)(u.value),(v,D)=>(r.openBlock(),r.createElementBlock("div",{key:D,class:"fm-calendar__row fm-typo-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(v,S=>(r.openBlock(),r.createElementBlock("div",{key:S.date.date(),class:"fm-calendar__cell"},[S.date.isSame(r.unref(o),"day")&&S.isCurrentMonth?(r.openBlock(),r.createElementBlock("div",H2)):r.createCommentVNode("",!0),S.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:1,class:r.normalizeClass([[_(S.date),{"fm-typo-body-lg-700":S.date.isSame(r.unref(o),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>m(S.date),onMouseover:F=>x(S.date)},r.toDisplayString(S.date.date()),43,j2)):r.createCommentVNode("",!0)]))),128))]))),128))])])])])]),r.createElementVNode("div",W2,[r.createVNode(K,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(K,{disabled:w.value,label:"Apply",size:"md",variant:"primary",onClick:g},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover"])]),_:2},[k.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(k.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),[["__scopeId","data-v-7df3265e"]]),U2={class:"flex flex-col gap-4"},G2={class:"flex flex-col gap-4 justify-center"},Uo=Z(r.defineComponent({__name:"FmSelect",props:{modelValue:{},items:{},multiselect:{type:Boolean,default:!1},placement:{default:"bottom-start"},placeholder:{default:"Select item"},showValidBorder:{type:Boolean,default:!1},maxHeight:{default:408},width:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","dropdown-changed"],setup(t,{emit:e}){const n=t,o=r.inject(me),i=e,s=X(n,"modelValue"),l=r.ref(!1),a=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),d=(m,g)=>{if(n.multiselect){let y=[];m?y=s.value.length===0?[g]:n.items.filter(b=>s.value.some(_=>we(b.value,_)||we(b.value,g.value))):y=n.items.filter(b=>s.value.some(_=>we(b.value,_)&&!we(b.value,g.value))),s.value=y.map(b=>b.value)}else s.value=g.value,setTimeout(()=>{l.value=!1},0)},c=m=>{const g=[...s.value].filter((y,b)=>b!==m);s.value=g},u=r.computed(()=>n.multiselect?n.items.filter(m=>r.toRaw(s.value).some(g=>we(g,m.value))):n.items.filter(m=>we(s.value,m.value))),f=r.computed(()=>n.items.filter(m=>s.value.some(g=>we(m.value,g))).map(m=>({label:m.label}))),h=r.computed(()=>{var m;return n.multiselect?n.placeholder:((m=n.items.find(g=>we(g.value,s.value)))==null?void 0:m.label)??n.placeholder}),p=r.computed(()=>n.multiselect?s.value.length!==0:n.items.some(m=>we(m.value,s.value)));return(m,g)=>(r.openBlock(),r.createElementBlock("div",U2,[r.createVNode(Fe,{modelValue:r.unref(s),"onUpdate:modelValue":g[1]||(g[1]=y=>r.isRef(s)?s.value=y:null),disabled:a.value,focused:l.value,"helper-state":m.helperState,"helper-text":m.helperText,info:m.labelInfo,label:m.label,optional:m.labelMark==="optional",required:m.labelMark==="required",rules:m.rules},r.createSlots({default:r.withCtx(({invalid:y})=>[r.createVNode(dt,{"close-on-click":!m.multiselect,disabled:a.value,placement:m.placement,"show-menu":l.value,onMenuChanged:g[0]||(g[0]=b=>{l.value=b,i("dropdown-changed",l.value)})},{"menu-button":r.withCtx(()=>[r.createVNode(ye,{class:r.normalizeClass(a.value?"cursor-not-allowed":"cursor-pointer"),focused:l.value,invalid:y,"show-valid-border":m.showValidBorder},{prepend:r.withCtx(()=>[r.renderSlot(m.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.createVNode(j,{color:a.value?"#C7C7CC":"black",name:l.value?"expand_less":"expand_more",size:"md"},null,8,["color","name"])]),default:r.withCtx(()=>[r.renderSlot(m.$slots,"default",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([[a.value?"text-fm-color-typo-disabled":p.value?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"break-all fm-typo-body-lg-400 line-clamp-1"])},r.toDisplayString(h.value),3)],!0)]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":r.withCtx(()=>[r.createElementVNode("div",{style:r.normalizeStyle({"max-height":`${m.maxHeight}px`,width:`${m.width}px`}),class:"fm-select__menu__wrapper"},[r.renderSlot(m.$slots,"menu-wrapper",{handleItemChange:(b,_)=>d(b,_)},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.items,b=>(r.openBlock(),r.createBlock(De,{key:b.value,"has-checkbox":m.multiselect,label:b.label,"model-value":u.value.some(_=>r.unref(we)(_.value,b.value)),value:b.value,"onUpdate:modelValue":_=>d(_,b)},null,8,["has-checkbox","label","model-value","value","onUpdate:modelValue"]))),128))],!0)],4)]),_:2},1032,["close-on-click","disabled","placement","show-menu"])]),_:2},[m.label||m.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(m.$slots,"label",{},void 0,!0)]),key:"0"}:void 0,m.helperText||m.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(m.$slots,"helper-text",{},void 0,!0)]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]),r.createElementVNode("div",G2,[m.multiselect&&u.value.length>0?(r.openBlock(),r.createBlock(Si,{key:0,disabled:a.value,items:f.value,removable:"",onChipClosed:c},null,8,["disabled","items"])):r.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-eef1dff8"]]),q2={key:0},X2={class:"flex gap-4 items-center relative w-full"},K2={class:"flex flex-col gap-4 w-full"},Z2=r.createElementVNode("div",{class:"fm-typo-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1),J2={class:"flex flex-col gap-4 w-full"},Q2={key:1,class:"flex flex-col gap-4 w-full"},Br=r.defineComponent({__name:"FmDateRangePickerField",props:{modelValue:{},analytic:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},invalid:{type:Boolean,default:!1},focused:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},isComparing:{type:Boolean,default:!1},startLabel:{default:"Start date"},endLabel:{default:"End date"},compareLabel:{default:"Date"}},setup(t){const e=t,n=r.computed(()=>{if(!e.modelValue)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const o=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].startDate:e.modelValue.startDate,i=e.isComparing&&Array.isArray(e.modelValue)?e.modelValue[0].endDate:e.modelValue.endDate;return{startDate:o?R(o).format("D MMM YYYY"):"DD MM YYYY",endDate:i?R(i).format("D MMM YYYY"):"DD MM YYYY"}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[o.analytic?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",q2,[r.renderSlot(o.$slots,"popover-button",{},()=>[r.createElementVNode("div",X2,[r.createElementVNode("label",K2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400 line-clamp-1",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.startLabel),3),r.createVNode(ye,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,l;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.startDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((l=o.modelValue)!=null&&l.startDate?r.unref(R)(o.modelValue.startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border"])]),Z2,r.createElementVNode("label",J2,[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"]])},r.toDisplayString(o.endLabel),3),r.createVNode(ye,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>{var s,l;return[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":(s=o.modelValue)!=null&&s.endDate?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString((l=o.modelValue)!=null&&l.endDate?r.unref(R)(o.modelValue.endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:3},8,["class","focused","invalid","show-valid-border"])])])])])),o.analytic?(r.openBlock(),r.createElementBlock("label",Q2,[r.createVNode(on,{label:o.compareLabel},null,8,["label"]),r.createVNode(ye,{class:r.normalizeClass(o.disabled?"cursor-not-allowed":"cursor-pointer"),focused:o.focused,invalid:o.invalid,"show-valid-border":o.showValidBorder,"prepend-icon":"calendar_month","icon-outlined":""},{prepend:r.withCtx(()=>[r.renderSlot(o.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(o.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-typo-body-lg-400",[o.disabled?"text-fm-color-typo-disabled":n.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"]])},r.toDisplayString(n.value.startDate)+" - "+r.toDisplayString(n.value.endDate),3)]),_:3},8,["class","focused","invalid","show-valid-border"])])):r.createCommentVNode("",!0)]))}}),Nd=t=>(r.pushScopeId("data-v-e17fdc27"),t=t(),r.popScopeId(),t),ey={class:"bg-fm-color-neutral-white fixed flex flex-col h-screen left-0 top-0 w-screen"},ty={class:"flex flex-col gap-8 pb-8 pt-24 px-16"},ny={class:"flex items-center justify-center"},oy={class:"flex fm-typo-body-lg-400 h-48 justify-center text-fm-color-typo-tertiary w-[336px]"},iy={class:"flex h-[calc(100%-172px)] justify-center relative w-full"},ry=Nd(()=>r.createElementVNode("div",{class:"absolute bg-gradient-to-b from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),sy={id:"wrapper",class:"h-full relative w-[336px]"},ly=["id"],ay={class:"flex gap-4 items-center"},dy={class:"fm-typo-body-lg-700"},cy={class:"fm-typo-body-lg-700"},uy=["onClick","onMouseover"],fy={class:"absolute bg-fm-color-neutral-white bottom-0 left-0 p-16 w-full"},hy=Nd(()=>r.createElementVNode("div",{class:"-top-32 absolute bg-gradient-to-t from-[#1C1C1E14] h-32 left-0 pointer-events-none to-80% w-full z-10"},null,-1)),py={class:"flex gap-8 items-center justify-end w-full"},Ad=Z(r.defineComponent({__name:"FmDateRangePickerMobile",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){var B,k;const e=r.ref(),n=[{id:pe.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{u.value=pe.PrecedingPeriod;const C=a.value;if(C[0].startDate&&C[0].endDate){const E=C[0].startDate.diff(C[0].endDate,"day");C[1]={startDate:C[0].startDate.subtract(+(1-E),"day"),endDate:C[0].startDate.subtract(1,"day")}}}},{id:pe.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{u.value=pe.PrecedingWeek;const C=a.value;if(C[0].startDate&&C[0].endDate){let E=C[0].endDate.diff(C[0].startDate,"week");E===0&&(E+=1),C[1]={startDate:C[0].startDate.subtract(E,"week"),endDate:C[0].endDate.subtract(E,"week")}}}},{id:pe.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{u.value=pe.PrecedingMonth;const C=a.value;if(C[0].startDate&&C[0].endDate){let E=C[0].endDate.diff(C[0].startDate,"month");E===0&&(E+=1),C[1]={startDate:C[0].startDate.subtract(E,"month"),endDate:C[0].endDate.subtract(E,"month")}}}},{id:pe.Custom,label:"Custom",sublabel:"",action:()=>{u.value=pe.Custom}}],o=t,i=Ed(o.min,o.max),s=R(),l=X(o,"modelValue"),a=r.ref([{startDate:(B=l.value)!=null&&B.startDate?R(l.value.startDate,A):null,endDate:(k=l.value)!=null&&k.endDate?R(l.value.endDate,A):null},{startDate:null,endDate:null}]),d=r.ref(!1),c=r.ref(!1),u=r.ref(""),f=r.ref(""),h=r.ref(null);let p=0;const m=C=>{var E;if(f.value="",a.value[p].startDate&&a.value[p].endDate){p===1&&(a.value=a.value.map(()=>({startDate:null,endDate:null})),p=0),a.value[0]={startDate:C,endDate:null};return}else if(!a.value[p].startDate&&!a.value[p].endDate)a.value[p].startDate=C;else{if(C.isBefore(a.value[p].startDate)){const v=a.value[p].startDate;a.value[p]={startDate:C,endDate:v}}else a.value[p].endDate=C;c.value&&(p=1),n.find(v=>v.id===u.value)||(u.value=pe.Custom)}(E=n.find(v=>v.id===u.value))==null||E.action()},g=()=>{c.value?l.value=a.value.map(C=>({startDate:C.startDate.format(A),endDate:C.endDate.format(A)})):l.value={startDate:a.value[0].startDate.format(A),endDate:a.value[0].endDate.format(A)},setTimeout(()=>{d.value=!1})},y=()=>{var C,E;Array.isArray(l.value)?a.value=l.value:a.value[0]={startDate:(C=l.value)!=null&&C.startDate?R(l.value.startDate,A):null,endDate:(E=l.value)!=null&&E.endDate?R(l.value.endDate,A):null},d.value=!1},b=C=>{const E=a.value[0].startDate,v=a.value[0].endDate,D=a.value[1].startDate,S=a.value[1].endDate,F=h.value,O=E==null?void 0:E.isSame(C),z=v==null?void 0:v.isSame(C),T=D==null?void 0:D.isSame(C),W=S==null?void 0:S.isSame(C),U=F==null?void 0:F.isSame(C),G=O&&v&&!(O&&z)||E&&!v&&O&&(F==null?void 0:F.isAfter(E))||E&&!v&&U&&(F==null?void 0:F.isBefore(E)),Q=T&&S&&!(T&&W)||D&&!S&&T&&(F==null?void 0:F.isAfter(D))||D&&!S&&U&&(F==null?void 0:F.isBefore(D)),le=z&&E&&!(O&&z)||E&&!v&&O&&(F==null?void 0:F.isBefore(E))||E&&!v&&U&&(F==null?void 0:F.isAfter(E)),fe=W&&D&&!(T&&W)||D&&!S&&T&&(F==null?void 0:F.isBefore(D))||D&&!S&&U&&(F==null?void 0:F.isAfter(D)),Ne=O&&z||O&&!v,We=T&&W||T&&!S,Ae=E&&(v||F)&&v?C.isAfter(E)&&C.isBefore(v):C.isAfter(F)&&C.isBefore(E)||C.isBefore(F)&&C.isAfter(E),te=D&&(S||F)&&S?C.isAfter(D)&&C.isBefore(S):C.isAfter(F)&&C.isBefore(D)||C.isBefore(F)&&C.isAfter(D),se=(Se,Ye,Yt)=>Se&&Ye&&Yt?Se.isAfter(Ye,"day")&&Se.isBefore(Yt,"day"):!1,xe=()=>{if(a.value.filter(Ye=>{var Yt;for(const $w in Ye)if((Yt=Ye[$w])!=null&&Yt.isSame(C,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(O&&z&&(se(C,D,S)||se(C,D,F)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(T&&W&&(se(C,E,v)||se(C,E,F)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(G||le)return se(C,D,S)||se(C,D,F)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(Q||fe)return se(C,E,v)||se(C,E,F)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(Ne)return"bg-fm-color-primary";if(We)return"bg-fm-color-system-info-300";if(se(C,E,v)&&(se(C,D,S)||se(C,D,F)))return"bg-fm-color-system-success-100";if(Ae)return"bg-fm-color-system-warning-100";if(te)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${xe()}`]:G||Q,[`fm-calendar__cell__button--selected-end ${xe()}`]:le||fe,[`fm-calendar__cell__button--selected-between ${xe()}`]:Ae||te,[`fm-calendar__cell__button--selected ${xe()}`]:Ne||We}},_=C=>{const E=a.value;if(E[0].startDate&&!E[0].endDate||E[1].startDate&&!E[1].endDate){h.value=C;return}h.value=null},x=C=>{a.value[0]={startDate:R(C.startDate,A),endDate:R(C.endDate,A)}},$=C=>{const E=n.find(v=>v.id===C);E==null||E.action()},w=r.computed(()=>c.value?!a.value.every(C=>C.startDate&&C.endDate):!(a.value[0].startDate&&a.value[0].endDate)),P=C=>{u.value="",c.value=C,a.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),p=0},M=r.computed(()=>{const C=c.value&&Array.isArray(l.value)?l.value[1].startDate:null,E=c.value&&Array.isArray(l.value)?l.value[1].endDate:null;return C&&E?`Compared: ${R(C).format("D MMM YYYY")} - ${R(E).format("D MMM YYYY")}`:""}),N=()=>{d.value=!0,setTimeout(()=>{e.value.scrollToItem(V(s.startOf("month")))},0)},V=C=>i.findIndex(E=>E.id===C.startOf("month").format(A));return r.watch(()=>l.value,()=>{var C,E;c.value?a.value=l.value.map(v=>({startDate:v!=null&&v.startDate?R(v.startDate,A):null,endDate:v!=null&&v.endDate?R(v.endDate,A):null})):a.value[0]={startDate:(C=l.value)!=null&&C.startDate?R(l.value.startDate,A):null,endDate:(E=l.value)!=null&&E.endDate?R(l.value.endDate,A):null}}),(C,E)=>{const v=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(Fe,{modelValue:r.unref(l),"onUpdate:modelValue":E[3]||(E[3]=D=>r.isRef(l)?l.value=D:null),disabled:C.disabled,focused:d.value,"helper-state":C.helperState,"helper-text":c.value?M.value:C.helperText,rules:C.rules,tag:"div"},r.createSlots({default:r.withCtx(({invalid:D})=>{var S,F,O,z;return[C.$slots["trigger-button"]?(r.openBlock(),r.createElementBlock("div",{key:0,onClick:N},[r.renderSlot(C.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps({opened:d.value,invalid:D,showValidBorder:C.showValidBorder,isComparing:c.value})),void 0,!0)])):(r.openBlock(),r.createBlock(Br,{key:1,analytic:C.compare,"compare-label":C.compareLabel,disabled:C.disabled,"end-label":C.endLabel,focused:d.value,invalid:D,"is-comparing":c.value,"model-value":r.unref(l),"show-valid-border":C.showValidBorder,"start-label":C.startLabel,onClick:N},r.createSlots({_:2},[C.$slots["popover-button"]?{name:"popover-button",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"popover-button",{focused:d.value},void 0,!0)]),key:"0"}:void 0]),1032,["analytic","compare-label","disabled","end-label","focused","invalid","is-comparing","model-value","show-valid-border","start-label"])),d.value?(r.openBlock(),r.createBlock(r.Teleport,{key:2,to:"body"},[r.createElementVNode("div",ey,[r.createElementVNode("div",ty,[C.showPredefinedRange?(r.openBlock(),r.createBlock(Uo,{key:0,items:C.predefinedRange,"model-value":f.value,"onUpdate:modelValue":E[0]||(E[0]=T=>x(T))},null,8,["items","model-value"])):r.createCommentVNode("",!0),r.createVNode(Br,{analytic:C.compare,"compare-label":C.compareLabel,"end-label":C.endLabel,"is-comparing":c.value,"model-value":{startDate:((S=a.value[0].startDate)==null?void 0:S.format(r.unref(A)))??null,endDate:((F=a.value[0].endDate)==null?void 0:F.format(r.unref(A)))??null},"start-label":C.startLabel},null,8,["analytic","compare-label","end-label","is-comparing","model-value","start-label"]),C.compare?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(Er,{"model-value":c.value,label:"Compare","label-placement":"right","onUpdate:modelValue":E[1]||(E[1]=T=>P(T))},null,8,["model-value"]),c.value&&C.compare?(r.openBlock(),r.createBlock(Uo,{key:0,items:n.map(T=>({label:T.label,sublabel:T.sublabel,value:T.id})),"model-value":u.value,"onUpdate:modelValue":E[2]||(E[2]=T=>$(T))},null,8,["items","model-value"])):r.createCommentVNode("",!0),c.value&&C.compare?(r.openBlock(),r.createBlock(Br,{key:1,analytic:C.compare,"end-label":C.endLabel,"is-comparing":c.value,"model-value":{startDate:((O=a.value[1].startDate)==null?void 0:O.format(r.unref(A)))??null,endDate:((z=a.value[1].endDate)==null?void 0:z.format(r.unref(A)))??null},"start-label":C.startLabel,"compare-label":"Compare: Custom"},null,8,["analytic","end-label","is-comparing","model-value","start-label"])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0),r.createElementVNode("div",ny,[r.createElementVNode("div",oy,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Gn),T=>(r.openBlock(),r.createElementBlock("div",{key:T,class:"fm-calendar__cell"},r.toDisplayString(T),1))),128))])])]),r.createElementVNode("div",iy,[ry,r.createElementVNode("div",sy,[r.createVNode(v,{ref_key:"scroller",ref:e,buffer:200,"item-size":null,items:r.unref(i),class:"h-full no-scrollbar overflow-y-auto w-full","key-field":"id","size-field":"height"},{default:r.withCtx(({item:T})=>[r.createElementVNode("div",{id:T.id,class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},[r.createElementVNode("div",ay,[r.createElementVNode("div",dy,r.toDisplayString(r.unref(R)(T.id).format("MMMM")),1),r.createElementVNode("div",cy,r.toDisplayString(r.unref(R)(T.id).format("YYYY")),1)])],8,ly),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(T.matrix,(W,U)=>(r.openBlock(),r.createElementBlock("div",{key:U,class:"fm-calendar__row fm-typo-body-lg-400"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(W,G=>(r.openBlock(),r.createElementBlock("div",{key:G.date.date(),class:"fm-calendar__cell"},[G.isCurrentMonth?(r.openBlock(),r.createElementBlock("button",{key:0,class:r.normalizeClass([[b(G.date),{"fm-typo-body-lg-700":G.date.isSame(r.unref(s),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>m(G.date),onMouseover:Q=>_(G.date)},r.toDisplayString(G.date.date()),43,uy)):r.createCommentVNode("",!0)]))),128))]))),128))])]),_:1},8,["items"])])]),r.createElementVNode("div",fy,[hy,r.createElementVNode("div",py,[r.createVNode(K,{label:"Cancel",size:"md",variant:"tertiary",onClick:y}),r.createVNode(K,{disabled:w.value,label:"Apply",size:"md",variant:"primary",onClick:g},null,8,["disabled"])])])])])):r.createCommentVNode("",!0)]}),_:2},[C.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(C.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"])}}}),[["__scopeId","data-v-e17fdc27"]]),my=r.defineComponent({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:R().format(A),endDate:R().format(A)}},{label:"Yesterday",value:{startDate:R().subtract(1,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This week",value:{startDate:R().startOf("week").format(A),endDate:R().endOf("week").format(A)}},{label:"Last week",value:{startDate:R().subtract(1,"week").startOf("week").format(A),endDate:R().subtract(1,"week").endOf("week").format(A)}},{label:"Last 7 days",value:{startDate:R().subtract(7,"day").format(A),endDate:R().subtract(1,"day").format(A)}},{label:"This month",value:{startDate:R().startOf("month").format(A),endDate:R().endOf("month").format(A)}},{label:"Last month",value:{startDate:R().subtract(1,"month").startOf("month").format(A),endDate:R().subtract(1,"month").endOf("month").format(A)}},{label:"This year",value:{startDate:R().startOf("year").format(A),endDate:R().endOf("year").format(A)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>R().subtract(50,"year").format(A)},max:{default:()=>R().add(25,"year").format(A)},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,{breakpoints:n}=Gt(),o=X(e,"modelValue"),i=Pd(e);return(s,l)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.unref(n).md||r.unref(n).lg?(r.openBlock(),r.createBlock(Y2,r.mergeProps({key:0},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":l[0]||(l[0]=a=>r.isRef(o)?o.value=a:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(a=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(a)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0),r.unref(n).xs||r.unref(n).sm?(r.openBlock(),r.createBlock(Ad,r.mergeProps({key:1},r.unref(i),{modelValue:r.unref(o),"onUpdate:modelValue":l[1]||(l[1]=a=>r.isRef(o)?o.value=a:null)}),r.createSlots({_:2},[s.$slots["trigger-button"]?{name:"trigger-button",fn:r.withCtx(a=>[r.renderSlot(s.$slots,"trigger-button",r.normalizeProps(r.guardReactiveProps(a)))]),key:"0"}:void 0]),1040,["modelValue"])):r.createCommentVNode("",!0)],64))}}),gy=r.defineComponent({__name:"FmForm",props:{disabled:{type:Boolean,default:!1},onValidationSuccess:{},onValidationFailed:{}},emits:["validation-reset","reset"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref([]),s=r.ref(0),l=r.ref(!1),a=n,d=async()=>{var h,p;l.value=!0;let f=[];for(let m=0;m<i.value.length;m++){const g=i.value[m];f=[...f,...g.validate()]}f.length?await((p=o.onValidationFailed)==null?void 0:p.call(o,f)):await((h=o.onValidationSuccess)==null?void 0:h.call(o)),l.value=!1},c=()=>{for(let f=0;f<i.value.length;f++)i.value[f].resetValue();a("reset")};return e({validateInputs:d,resetInputsValidation:()=>{for(let f=0;f<i.value.length;f++)i.value[f].resetValidation();a("validation-reset")},resetInputs:c,isSubmitting:l}),r.provide(Es,{register({validate:f,resetValidation:h,resetValue:p}){return i.value.push({componentId:s.value,validate:f,resetValidation:h,resetValue:p}),s.value++},unregister(f){i.value.filter(h=>h.componentId!==f)}}),r.provide(me,{getDisabled:()=>o.disabled}),(f,h)=>(r.openBlock(),r.createElementBlock("form",{onSubmit:r.withModifiers(d,["prevent"]),onReset:r.withModifiers(c,["prevent"])},[r.renderSlot(f.$slots,"default")],32))}}),yy={version:4,country_calling_codes:{1:["US","AG","AI","AS","BB","BM","BS","CA","DM","DO","GD","GU","JM","KN","KY","LC","MP","MS","PR","SX","TC","TT","VC","VG","VI"],7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],691:["FM"],692:["MH"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],880:["BD"],886:["TW"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},countries:{AC:["247","00","(?:[01589]\\d|[46])\\d{4}",[5,6]],AD:["376","00","(?:1|6\\d)\\d{7}|[135-9]\\d{5}",[6,8,9],[["(\\d{3})(\\d{3})","$1 $2",["[135-9]"]],["(\\d{4})(\\d{4})","$1 $2",["1"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]]],AE:["971","00","(?:[4-7]\\d|9[0-689])\\d{7}|800\\d{2,9}|[2-4679]\\d{7}",[5,6,7,8,9,10,11,12],[["(\\d{3})(\\d{2,9})","$1 $2",["60|8"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[236]|[479][2-8]"],"0$1"],["(\\d{3})(\\d)(\\d{5})","$1 $2 $3",["[479]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"]],"0"],AF:["93","00","[2-7]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"]],"0"],AG:["1","011","(?:268|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([457]\\d{6})$|1","268$1",0,"268"],AI:["1","011","(?:264|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2457]\\d{6})$|1","264$1",0,"264"],AL:["355","00","(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",[6,7,8,9],[["(\\d{3})(\\d{3,4})","$1 $2",["80|9"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["4[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2358][2-5]|4"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["[23578]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["6"],"0$1"]],"0"],AM:["374","00","(?:[1-489]\\d|55|60|77)\\d{6}",[8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[89]0"],"0 $1"],["(\\d{3})(\\d{5})","$1 $2",["2|3[12]"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["1|47"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[3-9]"],"0$1"]],"0"],AO:["244","00","[29]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[29]"]]]],AR:["54","00","(?:11|[89]\\d\\d)\\d{8}|[2368]\\d{9}",[10,11],[["(\\d{4})(\\d{2})(\\d{4})","$1 $2-$3",["2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])","2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["1"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[68]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2-$3",["[23]"],"0$1",1],["(\\d)(\\d{4})(\\d{2})(\\d{4})","$2 15-$3-$4",["9(?:2[2-469]|3[3-578])","9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))","9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]","9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]"],"0$1",0,"$1 $2 $3-$4"],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 15-$3-$4",["91"],"0$1",0,"$1 $2 $3-$4"],["(\\d{3})(\\d{3})(\\d{5})","$1-$2-$3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 15-$3-$4",["9"],"0$1",0,"$1 $2 $3-$4"]],"0",0,"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?","9$1"],AS:["1","011","(?:[58]\\d\\d|684|900)\\d{7}",[10],0,"1",0,"([267]\\d{6})$|1","684$1",0,"684"],AT:["43","00","1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",[4,5,6,7,8,9,10,11,12,13],[["(\\d)(\\d{3,12})","$1 $2",["1(?:11|[2-9])"],"0$1"],["(\\d{3})(\\d{2})","$1 $2",["517"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["5[079]"],"0$1"],["(\\d{3})(\\d{3,10})","$1 $2",["(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]"],"0$1"],["(\\d{4})(\\d{3,9})","$1 $2",["[2-467]|5[2-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["5"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,7})","$1 $2 $3",["5"],"0$1"]],"0"],AU:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{7}(?:\\d(?:\\d{2})?)?|8[0-24-9]\\d{7})|[2-478]\\d{8}|1\\d{4,7}",[5,6,7,8,9,10,12],[["(\\d{2})(\\d{3,4})","$1 $2",["16"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,4})","$1 $2 $3",["16"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["14|4"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[2378]"],"(0$1)"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:30|[89])"]]],"0",0,"(183[12])|0",0,0,0,[["(?:(?:(?:2(?:[0-26-9]\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\d|2[0-8]))\\d|3(?:(?:[0-3589]\\d|6[1-9]|7[0-35-9])\\d|4(?:[0-578]\\d|90)))\\d\\d|8(?:51(?:0(?:0[03-9]|[12479]\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\d|7[89]|9[0-4])|3\\d\\d)|(?:6[0-8]|[78]\\d)\\d{3}|9(?:[02-9]\\d{3}|1(?:(?:[0-58]\\d|6[0135-9])\\d|7(?:0[0-24-9]|[1-9]\\d)|9(?:[0-46-9]\\d|5[0-79])))))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,["163\\d{2,6}",[5,6,7,8,9]],["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],AW:["297","00","(?:[25-79]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[25-9]"]]]],AX:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","2\\d{4,9}|35\\d{4,5}|(?:60\\d\\d|800)\\d{4,6}|7\\d{5,11}|(?:[14]\\d|3[0-46-9]|50)\\d{4,8}",[5,6,7,8,9,10,11,12],0,"0",0,0,0,0,"18",0,"00"],AZ:["994","00","365\\d{6}|(?:[124579]\\d|60|88)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[28]|2|365|46","1[28]|2|365[45]|46","1[28]|2|365(?:4|5[02])|46"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[13-9]"],"0$1"]],"0"],BA:["387","00","6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["6[1-3]|[7-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2-$3",["[3-5]|6[56]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["6"],"0$1"]],"0"],BB:["1","011","(?:246|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","246$1",0,"246"],BD:["880","00","[1-469]\\d{9}|8[0-79]\\d{7,8}|[2-79]\\d{8}|[2-9]\\d{7}|[3-9]\\d{6}|[57-9]\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{4,6})","$1-$2",["31[5-8]|[459]1"],"0$1"],["(\\d{3})(\\d{3,7})","$1-$2",["3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]"],"0$1"],["(\\d{4})(\\d{3,6})","$1-$2",["[13-9]|22"],"0$1"],["(\\d)(\\d{7,8})","$1-$2",["2"],"0$1"]],"0"],BE:["32","00","4\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:80|9)0"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[239]|4[23]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[15-8]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4"],"0$1"]],"0"],BF:["226","00","[025-7]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[025-7]"]]]],BG:["359","00","00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",[6,7,8,9,12],[["(\\d)(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["43[1-6]|70[1-9]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["(?:70|8)0"],"0$1"],["(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3",["43[1-7]|7"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[48]|9[08]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"]],"0"],BH:["973","00","[136-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[13679]|8[02-4679]"]]]],BI:["257","00","(?:[267]\\d|31)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2367]"]]]],BJ:["229","00","[24-689]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-689]"]]]],BL:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:2[7-9]|3[3-7]|5[12]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],BM:["1","011","(?:441|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","441$1",0,"441"],BN:["673","00","[2-578]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-578]"]]]],BO:["591","00(?:1\\d)?","(?:[2-467]\\d\\d|8001)\\d{5}",[8,9],[["(\\d)(\\d{7})","$1 $2",["[23]|4[46]"]],["(\\d{8})","$1",["[67]"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["8"]]],"0",0,"0(1\\d)?"],BQ:["599","00","(?:[34]1|7\\d)\\d{5}",[7],0,0,0,0,0,0,"[347]"],BR:["55","00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)","(?:[1-46-9]\\d\\d|5(?:[0-46-9]\\d|5[0-46-9]))\\d{8}|[1-9]\\d{9}|[3589]\\d{8}|[34]\\d{7}",[8,9,10,11],[["(\\d{4})(\\d{4})","$1-$2",["300|4(?:0[02]|37)","4(?:02|37)0|[34]00"]],["(\\d{3})(\\d{2,3})(\\d{4})","$1 $2 $3",["(?:[358]|90)0"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2-$3",["(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]"],"($1)"],["(\\d{2})(\\d{5})(\\d{4})","$1 $2-$3",["[16][1-9]|[2-57-9]"],"($1)"]],"0",0,"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?","$2"],BS:["1","011","(?:242|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([3-8]\\d{6})$|1","242$1",0,"242"],BT:["975","00","[17]\\d{7}|[2-8]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[2-68]|7[246]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[67]|7"]]]],BW:["267","00","(?:0800|(?:[37]|800)\\d)\\d{6}|(?:[2-6]\\d|90)\\d{5}",[7,8,10],[["(\\d{2})(\\d{5})","$1 $2",["90"]],["(\\d{3})(\\d{4})","$1 $2",["[24-6]|3[15-9]"]],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37]"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["8"]]]],BY:["375","810","(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3})","$1 $2",["800"],"8 $1"],["(\\d{3})(\\d{2})(\\d{2,4})","$1 $2 $3",["800"],"8 $1"],["(\\d{4})(\\d{2})(\\d{3})","$1 $2-$3",["1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])","1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"],"8 0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["1(?:[56]|7[467])|2[1-3]"],"8 0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-4]"],"8 0$1"],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["[89]"],"8 $1"]],"8",0,"0|80?",0,0,0,0,"8~10"],BZ:["501","00","(?:0800\\d|[2-8])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1-$2",["[2-8]"]],["(\\d)(\\d{3})(\\d{4})(\\d{3})","$1-$2-$3-$4",["0"]]]],CA:["1","011","(?:[2-8]\\d|90)\\d{8}|3\\d{6}",[7,10],0,"1",0,0,0,0,0,[["(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\d{6}",[10]],["",[10]],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}",[10]],["900[2-9]\\d{6}",[10]],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\d{6}",[10]],0,["310\\d{4}",[7]],0,["600[2-9]\\d{6}",[10]]]],CC:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CD:["243","00","[189]\\d{8}|[1-68]\\d{6}",[7,9],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[1-6]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]"],"0$1"]],"0"],CF:["236","00","(?:[27]\\d{3}|8776)\\d{4}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[278]"]]]],CG:["242","00","222\\d{6}|(?:0\\d|80)\\d{7}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[02]"]]]],CH:["41","00","8\\d{11}|[2-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8[047]|90"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]|81"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["8"],"0$1"]],"0"],CI:["225","00","[02]\\d{9}",[10],[["(\\d{2})(\\d{2})(\\d)(\\d{5})","$1 $2 $3 $4",["2"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3 $4",["0"]]]],CK:["682","00","[2-578]\\d{4}",[5],[["(\\d{2})(\\d{3})","$1 $2",["[2-578]"]]]],CL:["56","(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0","12300\\d{6}|6\\d{9,10}|[2-9]\\d{8}",[9,10,11],[["(\\d{5})(\\d{4})","$1 $2",["219","2196"],"($1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["44"]],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2[1-36]"],"($1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["9[2-9]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])"],"($1)"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["60|8"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{3})(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3 $4",["60"]]]],CM:["237","00","[26]\\d{8}|88\\d{6,7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["88"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[26]|88"]]]],CN:["86","00|1(?:[12]\\d|79)\\d\\d00","1[127]\\d{8,9}|2\\d{9}(?:\\d{2})?|[12]\\d{6,7}|86\\d{6}|(?:1[03-689]\\d|6)\\d{7,9}|(?:[3-579]\\d|8[0-57-9])\\d{6,9}",[7,8,9,10,11,12],[["(\\d{2})(\\d{5,6})","$1 $2",["(?:10|2[0-57-9])[19]","(?:10|2[0-57-9])(?:10|9[56])","10(?:10|9[56])|2[0-57-9](?:100|9[56])"],"0$1"],["(\\d{3})(\\d{5,6})","$1 $2",["3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]","(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))[19]","85[23](?:10|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:10|9[56])","85[23](?:100|95)|(?:3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100|9[56])"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["(?:4|80)0"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|2(?:[02-57-9]|1[1-9])","10|2(?:[02-57-9]|1[1-9])","10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]"],"0$1",1],["(\\d{3})(\\d{7,8})","$1 $2",["9"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[3-578]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["1[3-9]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3 $4",["[12]"],"0$1",1]],"0",0,"(1(?:[12]\\d|79)\\d\\d)|0",0,0,0,0,"00"],CO:["57","00(?:4(?:[14]4|56)|[579])","(?:60\\d\\d|9101)\\d{6}|(?:1\\d|3)\\d{9}",[10,11],[["(\\d{3})(\\d{7})","$1 $2",["6"],"($1)"],["(\\d{3})(\\d{7})","$1 $2",["3[0-357]|91"]],["(\\d)(\\d{3})(\\d{7})","$1-$2-$3",["1"],"0$1",0,"$1 $2 $3"]],"0",0,"0([3579]|4(?:[14]4|56))?"],CR:["506","00","(?:8\\d|90)\\d{8}|(?:[24-8]\\d{3}|3005)\\d{4}",[8,10],[["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[3-9]"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["[89]"]]],0,0,"(19(?:0[0-2468]|1[09]|20|66|77|99))"],CU:["53","119","(?:[2-7]|8\\d\\d)\\d{7}|[2-47]\\d{6}|[34]\\d{5}",[6,7,8,10],[["(\\d{2})(\\d{4,6})","$1 $2",["2[1-4]|[34]"],"(0$1)"],["(\\d)(\\d{6,7})","$1 $2",["7"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["[56]"],"0$1"],["(\\d{3})(\\d{7})","$1 $2",["8"],"0$1"]],"0"],CV:["238","0","(?:[2-59]\\d\\d|800)\\d{4}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2-589]"]]]],CW:["599","00","(?:[34]1|60|(?:7|9\\d)\\d)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[3467]"]],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["9[4-8]"]]],0,0,0,0,0,"[69]"],CX:["61","001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011","1(?:[0-79]\\d{8}(?:\\d{2})?|8[0-24-9]\\d{7})|[148]\\d{8}|1\\d{5,7}",[6,7,8,9,10,12],0,"0",0,"([59]\\d{7})$|0","8$1",0,0,[["8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\d|7(?:0[01]|1[0-2])|958))\\d{3}",[9]],["4(?:(?:79|94)[01]|83[0-389])\\d{5}|4(?:[0-3]\\d|4[047-9]|5[0-25-9]|6[0-36-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}",[9]],["180(?:0\\d{3}|2)\\d{3}",[7,10]],["190[0-26]\\d{6}",[10]],0,0,0,0,["14(?:5(?:1[0458]|[23][458])|71\\d)\\d{4}",[9]],["13(?:00\\d{6}(?:\\d{2})?|45[0-4]\\d{3})|13\\d{4}",[6,8,10,12]]],"0011"],CY:["357","00","(?:[279]\\d|[58]0)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[257-9]"]]]],CZ:["420","00","(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]|9[015-7]"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{2})","$1 $2 $3 $4",["96"]],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]]],DE:["49","00","[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",[4,5,6,7,8,9,10,11,12,13,14,15],[["(\\d{2})(\\d{3,13})","$1 $2",["3[02]|40|[68]9"],"0$1"],["(\\d{3})(\\d{3,12})","$1 $2",["2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1","2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1"],"0$1"],["(\\d{4})(\\d{2,11})","$1 $2",["[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]","[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["138"],"0$1"],["(\\d{5})(\\d{2,10})","$1 $2",["3"],"0$1"],["(\\d{3})(\\d{5,11})","$1 $2",["181"],"0$1"],["(\\d{3})(\\d)(\\d{4,10})","$1 $2 $3",["1(?:3|80)|9"],"0$1"],["(\\d{3})(\\d{7,8})","$1 $2",["1[67]"],"0$1"],["(\\d{3})(\\d{7,12})","$1 $2",["8"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["185","1850","18500"],"0$1"],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["18[68]"],"0$1"],["(\\d{4})(\\d{7})","$1 $2",["15[1279]"],"0$1"],["(\\d{5})(\\d{6})","$1 $2",["15[03568]","15(?:[0568]|31)"],"0$1"],["(\\d{3})(\\d{8})","$1 $2",["18"],"0$1"],["(\\d{3})(\\d{2})(\\d{7,8})","$1 $2 $3",["1(?:6[023]|7)"],"0$1"],["(\\d{4})(\\d{2})(\\d{7})","$1 $2 $3",["15[279]"],"0$1"],["(\\d{3})(\\d{2})(\\d{8})","$1 $2 $3",["15"],"0$1"]],"0"],DJ:["253","00","(?:2\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[27]"]]]],DK:["45","00","[2-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-9]"]]]],DM:["1","011","(?:[58]\\d\\d|767|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","767$1",0,"767"],DO:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,0,0,0,"8001|8[024]9"],DZ:["213","00","(?:[1-4]|[5-79]\\d|80)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["9"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-8]"],"0$1"]],"0"],EC:["593","00","1\\d{9,10}|(?:[2-7]|9\\d)\\d{7}",[8,9,10,11],[["(\\d)(\\d{3})(\\d{4})","$1 $2-$3",["[2-7]"],"(0$1)",0,"$1-$2-$3"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{3})(\\d{3,4})","$1 $2 $3",["1"]]],"0"],EE:["372","00","8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88","[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88"]],["(\\d{4})(\\d{3,4})","$1 $2",["[45]|8(?:00|[1-49])","[45]|8(?:00[1-9]|[1-49])"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],EG:["20","00","[189]\\d{8,9}|[24-6]\\d{8}|[135]\\d{7}",[8,9,10],[["(\\d)(\\d{7,8})","$1 $2",["[23]"],"0$1"],["(\\d{2})(\\d{6,7})","$1 $2",["1[35]|[4-6]|8[2468]|9[235-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{8})","$1 $2",["1"],"0$1"]],"0"],EH:["212","00","[5-8]\\d{8}",[9],0,"0",0,0,0,0,"528[89]"],ER:["291","00","[178]\\d{6}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[178]"],"0$1"]],"0"],ES:["34","00","[5-9]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[89]00"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-9]"]]]],ET:["251","00","(?:11|[2-579]\\d)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-579]"],"0$1"]],"0"],FI:["358","00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))","[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",[5,6,7,8,9,10,11,12],[["(\\d{5})","$1",["20[2-59]"],"0$1"],["(\\d{3})(\\d{3,7})","$1 $2",["(?:[1-3]0|[68])0|70[07-9]"],"0$1"],["(\\d{2})(\\d{4,8})","$1 $2",["[14]|2[09]|50|7[135]"],"0$1"],["(\\d{2})(\\d{6,10})","$1 $2",["7"],"0$1"],["(\\d)(\\d{4,9})","$1 $2",["(?:1[3-79]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9"],"0$1"]],"0",0,0,0,0,"1[03-79]|[2-9]",0,"00"],FJ:["679","0(?:0|52)","45\\d{5}|(?:0800\\d|[235-9])\\d{6}",[7,11],[["(\\d{3})(\\d{4})","$1 $2",["[235-9]|45"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]]],0,0,0,0,0,0,0,"00"],FK:["500","00","[2-7]\\d{4}",[5]],FM:["691","00","(?:[39]\\d\\d|820)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[389]"]]]],FO:["298","00","[2-9]\\d{5}",[6],[["(\\d{6})","$1",["[2-9]"]]],0,0,"(10(?:01|[12]0|88))"],FR:["33","00","[1-9]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0 $1"],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["[1-79]"],"0$1"]],"0"],GA:["241","00","(?:[067]\\d|11)\\d{6}|[2-7]\\d{6}",[7,8],[["(\\d)(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-7]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["11|[67]"],"0$1"]],0,0,"0(11\\d{6}|60\\d{6}|61\\d{6}|6[256]\\d{6}|7[467]\\d{6})","$1"],GB:["44","00","[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",[7,9,10],[["(\\d{3})(\\d{4})","$1 $2",["800","8001","80011","800111","8001111"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["845","8454","84546","845464"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["800"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["1(?:38|5[23]|69|76|94)","1(?:(?:38|69)7|5(?:24|39)|768|946)","1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["1(?:[2-69][02-9]|[78])"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[25]|7(?:0|6[02-9])","[25]|7(?:0|6(?:[03-9]|2[356]))"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[1389]"],"0$1"]],"0",0,0,0,0,0,[["(?:1(?:1(?:3(?:[0-58]\\d\\d|73[0235])|4(?:(?:[0-5]\\d|70)\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\d|6(?:[0-4]\\d|50))\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)\\d|1(?:[0-7]\\d|8[0-2]))|(?:3(?:0\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\d)\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{3})\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\d)|76\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[5-7]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}",[9,10]],["7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[2-49]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]],0," x"],GD:["1","011","(?:473|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","473$1",0,"473"],GE:["995","00","(?:[3-57]\\d\\d|800)\\d{6}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["32"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[57]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[348]"],"0$1"]],"0"],GF:["594","00","[56]94\\d{6}|(?:80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[56]|9[47]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[89]"],"0$1"]],"0"],GG:["44","00","(?:1481|[357-9]\\d{3})\\d{6}|8\\d{6}(?:\\d{2})?",[7,9,10],0,"0",0,"([25-9]\\d{5})$|0","1481$1",0,0,[["1481[25-9]\\d{5}",[10]],["7(?:(?:781|839)\\d|911[17])\\d{5}",[10]],["80[08]\\d{7}|800\\d{6}|8001111"],["(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\d|8[0-3]))\\d{7}|845464\\d",[7,10]],["70\\d{8}",[10]],0,["(?:3[0347]|55)\\d{8}",[10]],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}",[10]],["56\\d{8}",[10]]]],GH:["233","00","(?:[235]\\d{3}|800)\\d{5}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[235]"],"0$1"]],"0"],GI:["350","00","(?:[25]\\d|60)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["2"]]]],GL:["299","00","(?:19|[2-689]\\d|70)\\d{4}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["19|[2-9]"]]]],GM:["220","00","[2-9]\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],GN:["224","00","722\\d{6}|(?:3|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["3"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[67]"]]]],GP:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0",0,0,0,0,0,[["590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],GQ:["240","00","222\\d{6}|(?:3\\d|55|[89]0)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235]"]],["(\\d{3})(\\d{6})","$1 $2",["[89]"]]]],GR:["30","00","5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",[10,11,12],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["21|7"]],["(\\d{4})(\\d{6})","$1 $2",["2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2689]"]],["(\\d{3})(\\d{3,4})(\\d{5})","$1 $2 $3",["8"]]]],GT:["502","00","80\\d{6}|(?:1\\d{3}|[2-7])\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1 $2",["[2-8]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],GU:["1","011","(?:[58]\\d\\d|671|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","671$1",0,"671"],GW:["245","00","[49]\\d{8}|4\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["40"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"]]]],GY:["592","001","(?:[2-8]\\d{3}|9008)\\d{3}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],HK:["852","00(?:30|5[09]|[126-9]?)","8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}",[5,6,7,8,9,11],[["(\\d{3})(\\d{2,5})","$1 $2",["900","9003"]],["(\\d{4})(\\d{4})","$1 $2",["[2-7]|8[1-4]|9(?:0[1-9]|[1-8])"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{3})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["9"]]],0,0,0,0,0,0,0,"00"],HN:["504","00","8\\d{10}|[237-9]\\d{7}",[8,11],[["(\\d{4})(\\d{4})","$1-$2",["[237-9]"]]]],HR:["385","00","(?:[24-69]\\d|3[0-79])\\d{7}|80\\d{5,7}|[1-79]\\d{7}|6\\d{5,6}",[6,7,8,9],[["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["6[01]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{4})(\\d{3})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6|7[245]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-57]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],"0"],HT:["509","00","(?:[2-489]\\d|55)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[2-589]"]]]],HU:["36","00","[235-7]\\d{8}|[1-9]\\d{7}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]"],"(06 $1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"06 $1"]],"06"],ID:["62","00[89]","(?:(?:00[1-9]|8\\d)\\d{4}|[1-36])\\d{6}|00\\d{10}|[1-9]\\d{8,10}|[2-9]\\d{7}",[7,8,9,10,11,12,13],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["15"]],["(\\d{2})(\\d{5,9})","$1 $2",["2[124]|[36]1"],"(0$1)"],["(\\d{3})(\\d{5,7})","$1 $2",["800"],"0$1"],["(\\d{3})(\\d{5,8})","$1 $2",["[2-79]"],"(0$1)"],["(\\d{3})(\\d{3,4})(\\d{3})","$1-$2-$3",["8[1-35-9]"],"0$1"],["(\\d{3})(\\d{6,8})","$1 $2",["1"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["804"],"0$1"],["(\\d{3})(\\d)(\\d{3})(\\d{3})","$1 $2 $3 $4",["80"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1-$2-$3",["8"],"0$1"]],"0"],IE:["353","00","(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["2[24-9]|47|58|6[237-9]|9[35-9]"],"(0$1)"],["(\\d{3})(\\d{5})","$1 $2",["[45]0"],"(0$1)"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["1"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2569]|4[1-69]|7[14]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["70"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["81"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[78]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["4"],"(0$1)"],["(\\d{2})(\\d)(\\d{3})(\\d{4})","$1 $2 $3 $4",["8"],"0$1"]],"0"],IL:["972","0(?:0|1[2-9])","1\\d{6}(?:\\d{3,5})?|[57]\\d{8}|[1-489]\\d{7}",[7,8,9,10,11,12],[["(\\d{4})(\\d{3})","$1-$2",["125"]],["(\\d{4})(\\d{2})(\\d{2})","$1-$2-$3",["121"]],["(\\d)(\\d{3})(\\d{4})","$1-$2-$3",["[2-489]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1-$2-$3",["12"]],["(\\d{4})(\\d{6})","$1-$2",["159"]],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3-$4",["1[7-9]"]],["(\\d{3})(\\d{1,2})(\\d{3})(\\d{4})","$1-$2 $3-$4",["15"]]],"0"],IM:["44","00","1624\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([25-8]\\d{5})$|0","1624$1",0,"74576|(?:16|7[56])24"],IN:["91","00","(?:000800|[2-9]\\d\\d)\\d{7}|1\\d{7,12}",[8,9,10,11,12,13],[["(\\d{8})","$1",["5(?:0|2[23]|3[03]|[67]1|88)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)","5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)"],0,1],["(\\d{4})(\\d{4,5})","$1 $2",["180","1800"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["140"],0,1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["11|2[02]|33|4[04]|79[1-7]|80[2-46]","11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])","11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])"],"0$1",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]","1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]"],"0$1",1],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807","1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]","1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\d|7(?:1(?:[013-8]\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\d|5[0-367])|70[13-7]))[2-7]"],"0$1",1],["(\\d{5})(\\d{5})","$1 $2",["[6-9]"],"0$1",1],["(\\d{4})(\\d{2,4})(\\d{4})","$1 $2 $3",["1(?:6|8[06])","1(?:6|8[06]0)"],0,1],["(\\d{4})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["18"],0,1]],"0"],IO:["246","00","3\\d{6}",[7],[["(\\d{3})(\\d{4})","$1 $2",["3"]]]],IQ:["964","00","(?:1|7\\d\\d)\\d{7}|[2-6]\\d{7,8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-6]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],IR:["98","00","[1-9]\\d{9}|(?:[1-8]\\d\\d|9)\\d{3,4}",[4,5,6,7,10],[["(\\d{4,5})","$1",["96"],"0$1"],["(\\d{2})(\\d{4,5})","$1 $2",["(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["9"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["[1-8]"],"0$1"]],"0"],IS:["354","00|1(?:0(?:01|[12]0)|100)","(?:38\\d|[4-9])\\d{6}",[7,9],[["(\\d{3})(\\d{4})","$1 $2",["[4-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["3"]]],0,0,0,0,0,0,0,"00"],IT:["39","00","0\\d{5,10}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",[6,7,8,9,10,11],[["(\\d{2})(\\d{4,6})","$1 $2",["0[26]"]],["(\\d{3})(\\d{3,6})","$1 $2",["0[13-57-9][0159]|8(?:03|4[17]|9[2-5])","0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))"]],["(\\d{4})(\\d{2,6})","$1 $2",["0(?:[13-579][2-46-8]|8[236-8])"]],["(\\d{4})(\\d{4})","$1 $2",["894"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[26]|5"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["1(?:44|[679])|[378]|43"]],["(\\d{3})(\\d{3,4})(\\d{4})","$1 $2 $3",["0[13-57-9][0159]|14"]],["(\\d{2})(\\d{4})(\\d{5})","$1 $2 $3",["0[26]"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["3"]]],0,0,0,0,0,0,[["0669[0-79]\\d{1,6}|0(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\d\\d|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\d|6[0-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7}"],["3[2-9]\\d{7,8}|(?:31|43)\\d{8}",[9,10]],["80(?:0\\d{3}|3)\\d{3}",[6,9]],["(?:0878\\d{3}|89(?:2\\d|3[04]|4(?:[0-4]|[5-9]\\d\\d)|5[0-4]))\\d\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\d{6}",[6,8,9,10]],["1(?:78\\d|99)\\d{6}",[9,10]],0,0,0,["55\\d{8}",[10]],["84(?:[08]\\d{3}|[17])\\d{3}",[6,9]]]],JE:["44","00","1534\\d{6}|(?:[3578]\\d|90)\\d{8}",[10],0,"0",0,"([0-24-8]\\d{5})$|0","1534$1",0,0,[["1534[0-24-8]\\d{5}"],["7(?:(?:(?:50|82)9|937)\\d|7(?:00[378]|97\\d))\\d{5}"],["80(?:07(?:35|81)|8901)\\d{4}"],["(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}"],["701511\\d{4}"],0,["(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}"],["76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}"],["56\\d{8}"]]],JM:["1","011","(?:[58]\\d\\d|658|900)\\d{7}",[10],0,"1",0,0,0,0,"658|876"],JO:["962","00","(?:(?:[2689]|7\\d)\\d|32|53)\\d{6}",[8,9],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2356]|87"],"(0$1)"],["(\\d{3})(\\d{5,6})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["70"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["7"],"0$1"]],"0"],JP:["81","010","00[1-9]\\d{6,14}|[257-9]\\d{9}|(?:00|[1-9]\\d\\d)\\d{6}",[8,9,10,11,12,13,14,15,16,17],[["(\\d{3})(\\d{3})(\\d{3})","$1-$2-$3",["(?:12|57|99)0"],"0$1"],["(\\d{4})(\\d)(\\d{4})","$1-$2-$3",["1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]","1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2-$3",["[36]|4(?:2[09]|7[01])","[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]","1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]"],"0$1"],["(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3",["[14]|[289][2-9]|5[3-9]|7[2-4679]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1-$2-$3",["800"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[257-9]"],"0$1"]],"0",0,"(000[259]\\d{6})$|(?:(?:003768)0?)|0","$1"],KE:["254","000","(?:[17]\\d\\d|900)\\d{6}|(?:2|80)0\\d{6,7}|[4-6]\\d{6,8}",[7,8,9,10],[["(\\d{2})(\\d{5,7})","$1 $2",["[24-6]"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[17]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0"],KG:["996","00","8\\d{9}|[235-9]\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["3(?:1[346]|[24-79])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[235-79]|88"],"0$1"],["(\\d{3})(\\d{3})(\\d)(\\d{2,3})","$1 $2 $3 $4",["8"],"0$1"]],"0"],KH:["855","00[14-9]","1\\d{9}|[1-9]\\d{7,8}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],KI:["686","00","(?:[37]\\d|6[0-79])\\d{6}|(?:[2-48]\\d|50)\\d{3}",[5,8],0,"0"],KM:["269","00","[3478]\\d{6}",[7],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[3478]"]]]],KN:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","869$1",0,"869"],KP:["850","00|99","85\\d{6}|(?:19\\d|[2-7])\\d{7}",[8,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2-7]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"]],"0"],KR:["82","00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))","00[1-9]\\d{8,11}|(?:[12]|5\\d{3})\\d{7}|[13-6]\\d{9}|(?:[1-6]\\d|80)\\d{7}|[3-6]\\d{4,5}|(?:00|7)0\\d{8}",[5,6,8,9,10,11,12,13,14],[["(\\d{2})(\\d{3,4})","$1-$2",["(?:3[1-3]|[46][1-4]|5[1-5])1"],"0$1"],["(\\d{4})(\\d{4})","$1-$2",["1"]],["(\\d)(\\d{3,4})(\\d{4})","$1-$2-$3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1-$2-$3",["60|8"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1-$2-$3",["[1346]|5[1-5]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2-$3",["[57]"],"0$1"],["(\\d{2})(\\d{5})(\\d{4})","$1-$2-$3",["5"],"0$1"]],"0",0,"0(8(?:[1-46-8]|5\\d\\d))?"],KW:["965","00","18\\d{5}|(?:[2569]\\d|41)\\d{6}",[7,8],[["(\\d{4})(\\d{3,4})","$1 $2",["[169]|2(?:[235]|4[1-35-9])|52"]],["(\\d{3})(\\d{5})","$1 $2",["[245]"]]]],KY:["1","011","(?:345|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","345$1",0,"345"],KZ:["7","810","(?:33622|8\\d{8})\\d{5}|[78]\\d{9}",[10,14],0,"8",0,0,0,0,"33|7",0,"8~10"],LA:["856","00","[23]\\d{9}|3\\d{8}|(?:[235-8]\\d|41)\\d{6}",[8,9,10],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2[13]|3[14]|[4-8]"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["30[013-9]"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[23]"],"0$1"]],"0"],LB:["961","00","[27-9]\\d{7}|[13-9]\\d{6}",[7,8],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[27-9]"]]],"0"],LC:["1","011","(?:[58]\\d\\d|758|900)\\d{7}",[10],0,"1",0,"([2-8]\\d{6})$|1","758$1",0,"758"],LI:["423","00","[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",[7,9],[["(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3",["[2379]|8(?:0[09]|7)","[2379]|8(?:0(?:02|9)|7)"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["69"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]]],"0",0,"(1001)|0"],LK:["94","00","[1-9]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[1-689]"],"0$1"]],"0"],LR:["231","00","(?:[245]\\d|33|77|88)\\d{7}|(?:2\\d|[4-6])\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["4[67]|[56]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[2-578]"],"0$1"]],"0"],LS:["266","00","(?:[256]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2568]"]]]],LT:["370","00","(?:[3469]\\d|52|[78]0)\\d{6}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["52[0-7]"],"(0-$1)",1],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[7-9]"],"0 $1",1],["(\\d{2})(\\d{6})","$1 $2",["37|4(?:[15]|6[1-8])"],"(0-$1)",1],["(\\d{3})(\\d{5})","$1 $2",["[3-6]"],"(0-$1)",1]],"0",0,"[08]"],LU:["352","00","35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",[4,5,6,7,8,9,10,11],[["(\\d{2})(\\d{3})","$1 $2",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20[2-689]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"]],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["80[01]|90[015]"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{1,5})","$1 $2 $3 $4",["[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]"]]],0,0,"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\d)"],LV:["371","00","(?:[268]\\d|90)\\d{6}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[269]|8[01]"]]]],LY:["218","00","[2-9]\\d{8}",[9],[["(\\d{2})(\\d{7})","$1-$2",["[2-9]"],"0$1"]],"0"],MA:["212","00","[5-8]\\d{8}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5[45]"],"0$1"],["(\\d{4})(\\d{5})","$1-$2",["5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)"],"0$1"],["(\\d{2})(\\d{7})","$1-$2",["8"],"0$1"],["(\\d{3})(\\d{6})","$1-$2",["[5-7]"],"0$1"]],"0",0,0,0,0,0,[["5(?:2(?:[0-25-79]\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\d)\\d{5}"],["(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}"],["80[0-7]\\d{6}"],["89\\d{7}"],0,0,0,0,["(?:592(?:4[0-2]|93)|80[89]\\d\\d)\\d{4}"]]],MC:["377","00","(?:[3489]|6\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["4"],"0$1"],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[389]"]],["(\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4 $5",["6"],"0$1"]],"0"],MD:["373","00","(?:[235-7]\\d|[89]0)\\d{6}",[8],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["22|3"],"0$1"],["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["[25-7]"],"0$1"]],"0"],ME:["382","00","(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[2-9]"],"0$1"]],"0"],MF:["590","00","590\\d{6}|(?:69|80|9\\d)\\d{7}",[9],0,"0",0,0,0,0,0,[["590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\d{4}"],["69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))\\d{4}"],["80[0-5]\\d{6}"],0,0,0,0,0,["9(?:(?:39[5-7]|76[018])\\d|475[0-5])\\d{4}"]]],MG:["261","00","[23]\\d{8}",[9],[["(\\d{2})(\\d{2})(\\d{3})(\\d{2})","$1 $2 $3 $4",["[23]"],"0$1"]],"0",0,"([24-9]\\d{6})$|0","20$1"],MH:["692","011","329\\d{4}|(?:[256]\\d|45)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1-$2",["[2-6]"]]],"1"],MK:["389","00","[2-578]\\d{7}",[8],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2|34[47]|4(?:[37]7|5[47]|64)"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[347]"],"0$1"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["[58]"],"0$1"]],"0"],ML:["223","00","[24-9]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24-9]"]]]],MM:["95","00","1\\d{5,7}|95\\d{6}|(?:[4-7]|9[0-46-9])\\d{6,8}|(?:2|8\\d)\\d{5,8}",[6,7,8,9,10],[["(\\d)(\\d{2})(\\d{3})","$1 $2 $3",["16|2"],"0$1"],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[4-7]|8[1-35]"],"0$1"],["(\\d)(\\d{3})(\\d{4,6})","$1 $2 $3",["9(?:2[0-4]|[35-9]|4[137-9])"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["92"],"0$1"],["(\\d)(\\d{5})(\\d{4})","$1 $2 $3",["9"],"0$1"]],"0"],MN:["976","001","[12]\\d{7,9}|[5-9]\\d{7}",[8,9,10],[["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["[12]1"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[5-9]"]],["(\\d{3})(\\d{5,6})","$1 $2",["[12]2[1-3]"],"0$1"],["(\\d{4})(\\d{5,6})","$1 $2",["[12](?:27|3[2-8]|4[2-68]|5[1-4689])","[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]"],"0$1"],["(\\d{5})(\\d{4,5})","$1 $2",["[12]"],"0$1"]],"0"],MO:["853","00","0800\\d{3}|(?:28|[68]\\d)\\d{6}",[7,8],[["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{4})(\\d{4})","$1 $2",["[268]"]]]],MP:["1","011","[58]\\d{9}|(?:67|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","670$1",0,"670"],MQ:["596","00","596\\d{6}|(?:69|80|9\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[569]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],MR:["222","00","(?:[2-4]\\d\\d|800)\\d{5}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-48]"]]]],MS:["1","011","(?:[58]\\d\\d|664|900)\\d{7}",[10],0,"1",0,"([34]\\d{6})$|1","664$1",0,"664"],MT:["356","00","3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[2357-9]"]]]],MU:["230","0(?:0|[24-7]0|3[03])","(?:[57]|8\\d\\d)\\d{7}|[2-468]\\d{6}",[7,8,10],[["(\\d{3})(\\d{4})","$1 $2",["[2-46]|8[013]"]],["(\\d{4})(\\d{4})","$1 $2",["[57]"]],["(\\d{5})(\\d{5})","$1 $2",["8"]]],0,0,0,0,0,0,0,"020"],MV:["960","0(?:0|19)","(?:800|9[0-57-9]\\d)\\d{7}|[34679]\\d{6}",[7,10],[["(\\d{3})(\\d{4})","$1-$2",["[34679]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"]]],0,0,0,0,0,0,0,"00"],MW:["265","00","(?:[1289]\\d|31|77)\\d{7}|1\\d{6}",[7,9],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["1[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[137-9]"],"0$1"]],"0"],MX:["52","0[09]","1(?:(?:22|44|7[27]|87|9[69])[1-9]|65[0-689])\\d{7}|(?:1(?:[01]\\d|2[13-9]|[35][1-9]|4[0-35-9]|6[0-46-9]|7[013-689]|8[1-69]|9[1-578])|[2-9]\\d)\\d{8}",[10,11],[["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["33|5[56]|81"],0,1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[2-9]"],0,1],["(\\d)(\\d{2})(\\d{4})(\\d{4})","$2 $3 $4",["1(?:33|5[56]|81)"],0,1],["(\\d)(\\d{3})(\\d{3})(\\d{4})","$2 $3 $4",["1"],0,1]],"01",0,"0(?:[12]|4[45])|1",0,0,0,0,"00"],MY:["60","00","1\\d{8,9}|(?:3\\d|[4-9])\\d{7}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1-$2 $3",["[4-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1-$2 $3",["1(?:[02469]|[378][1-9]|53)|8","1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8"],"0$1"],["(\\d)(\\d{4})(\\d{4})","$1-$2 $3",["3"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{4})","$1-$2-$3-$4",["1(?:[367]|80)"]],["(\\d{3})(\\d{3})(\\d{4})","$1-$2 $3",["15"],"0$1"],["(\\d{2})(\\d{4})(\\d{4})","$1-$2 $3",["1"],"0$1"]],"0"],MZ:["258","00","(?:2|8\\d)\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2|8[2-79]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["8"]]]],NA:["264","00","[68]\\d{7,8}",[8,9],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["88"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["87"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],NC:["687","00","(?:050|[2-57-9]\\d\\d)\\d{3}",[6],[["(\\d{2})(\\d{2})(\\d{2})","$1.$2.$3",["[02-57-9]"]]]],NE:["227","00","[027-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["08"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[089]|2[013]|7[047]"]]]],NF:["672","00","[13]\\d{5}",[6],[["(\\d{2})(\\d{4})","$1 $2",["1[0-3]"]],["(\\d)(\\d{5})","$1 $2",["[13]"]]],0,0,"([0-258]\\d{4})$","3$1"],NG:["234","009","2[0-24-9]\\d{8}|[78]\\d{10,13}|[7-9]\\d{9}|[1-9]\\d{7}|[124-7]\\d{6}",[7,8,10,11,12,13,14],[["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["78"],"0$1"],["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[12]|9(?:0[3-9]|[1-9])"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["[3-6]|7(?:0[0-689]|[1-79])|8[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[7-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["20[129]"],"0$1"],["(\\d{4})(\\d{2})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{3})(\\d{4})(\\d{4,5})","$1 $2 $3",["[78]"],"0$1"],["(\\d{3})(\\d{5})(\\d{5,6})","$1 $2 $3",["[78]"],"0$1"]],"0"],NI:["505","00","(?:1800|[25-8]\\d{3})\\d{4}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[125-8]"]]]],NL:["31","00","(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",[5,6,7,8,9,10,11],[["(\\d{3})(\\d{4,7})","$1 $2",["[89]0"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["66"],"0$1"],["(\\d)(\\d{8})","$1 $2",["6"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-578]|91"],"0$1"],["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3",["9"],"0$1"]],"0"],NO:["47","00","(?:0|[2-9]\\d{3})\\d{4}",[5,8],[["(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["8"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2-79]"]]],0,0,0,0,0,"[02-689]|7[0-8]"],NP:["977","00","(?:1\\d|9)\\d{9}|[1-9]\\d{7}",[8,10,11],[["(\\d)(\\d{7})","$1-$2",["1[2-6]"],"0$1"],["(\\d{2})(\\d{6})","$1-$2",["1[01]|[2-8]|9(?:[1-59]|[67][2-6])"],"0$1"],["(\\d{3})(\\d{7})","$1-$2",["9"]]],"0"],NR:["674","00","(?:444|(?:55|8\\d)\\d|666)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[4-68]"]]]],NU:["683","00","(?:[4-7]|888\\d)\\d{3}",[4,7],[["(\\d{3})(\\d{4})","$1 $2",["8"]]]],NZ:["64","0(?:0|161)","[1289]\\d{9}|50\\d{5}(?:\\d{2,3})?|[27-9]\\d{7,8}|(?:[34]\\d|6[0-35-9])\\d{6}|8\\d{4,6}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,8})","$1 $2",["8[1-79]"],"0$1"],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["50[036-8]|8|90","50(?:[0367]|88)|8|90"],"0$1"],["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["24|[346]|7[2-57-9]|9[2-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:10|74)|[589]"],"0$1"],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["1|2[028]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,5})","$1 $2 $3",["2(?:[169]|7[0-35-9])|7"],"0$1"]],"0",0,0,0,0,0,0,"00"],OM:["968","00","(?:1505|[279]\\d{3}|500)\\d{4}|800\\d{5,6}",[7,8,9],[["(\\d{3})(\\d{4,6})","$1 $2",["[58]"]],["(\\d{2})(\\d{6})","$1 $2",["2"]],["(\\d{4})(\\d{4})","$1 $2",["[179]"]]]],PA:["507","00","(?:00800|8\\d{3})\\d{6}|[68]\\d{7}|[1-57-9]\\d{6}",[7,8,10,11],[["(\\d{3})(\\d{4})","$1-$2",["[1-57-9]"]],["(\\d{4})(\\d{4})","$1-$2",["[68]"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]]],PE:["51","00|19(?:1[124]|77|90)00","(?:[14-8]|9\\d)\\d{7}",[8,9],[["(\\d{3})(\\d{5})","$1 $2",["80"],"(0$1)"],["(\\d)(\\d{7})","$1 $2",["1"],"(0$1)"],["(\\d{2})(\\d{6})","$1 $2",["[4-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"]]],"0",0,0,0,0,0,0,"00"," Anexo "],PF:["689","00","4\\d{5}(?:\\d{2})?|8\\d{7,8}",[6,8,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["44"]],["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["4|8[7-9]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],PG:["675","00|140[1-3]","(?:180|[78]\\d{3})\\d{4}|(?:[2-589]\\d|64)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["18|[2-69]|85"]],["(\\d{4})(\\d{4})","$1 $2",["[78]"]]],0,0,0,0,0,0,0,"00"],PH:["63","00","(?:[2-7]|9\\d)\\d{8}|2\\d{5}|(?:1800|8)\\d{7,9}",[6,8,9,10,11,12,13],[["(\\d)(\\d{5})","$1 $2",["2"],"(0$1)"],["(\\d{4})(\\d{4,6})","$1 $2",["3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2","3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"],"(0$1)"],["(\\d{5})(\\d{4})","$1 $2",["346|4(?:27|9[35])|883","3469|4(?:279|9(?:30|56))|8834"],"(0$1)"],["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["2"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|8[2-8]"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]],["(\\d{4})(\\d{1,2})(\\d{3})(\\d{4})","$1 $2 $3 $4",["1"]]],"0"],PK:["92","00","122\\d{6}|[24-8]\\d{10,11}|9(?:[013-9]\\d{8,10}|2(?:[01]\\d\\d|2(?:[06-8]\\d|1[01]))\\d{7})|(?:[2-8]\\d{3}|92(?:[0-7]\\d|8[1-9]))\\d{6}|[24-9]\\d{8}|[89]\\d{7}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,7})","$1 $2 $3",["[89]0"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["1"]],["(\\d{3})(\\d{6,7})","$1 $2",["2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])","9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]"],"(0$1)"],["(\\d{2})(\\d{7,8})","$1 $2",["(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"],"(0$1)"],["(\\d{5})(\\d{5})","$1 $2",["58"],"(0$1)"],["(\\d{3})(\\d{7})","$1 $2",["3"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91"],"(0$1)"],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[24-9]"],"(0$1)"]],"0"],PL:["48","00","(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",[6,7,8,9,10],[["(\\d{5})","$1",["19"]],["(\\d{3})(\\d{3})","$1 $2",["11|20|64"]],["(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1","(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19"]],["(\\d{3})(\\d{2})(\\d{2,3})","$1 $2 $3",["64"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["1[2-8]|[2-7]|8[1-79]|9[145]"]],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["8"]]]],PM:["508","00","[45]\\d{5}|(?:708|80\\d)\\d{6}",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[45]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"],"0$1"]],"0"],PR:["1","011","(?:[589]\\d\\d|787)\\d{7}",[10],0,"1",0,0,0,0,"787|939"],PS:["970","00","[2489]2\\d{6}|(?:1\\d|5)\\d{8}",[8,9,10],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["[2489]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["5"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],PT:["351","00","1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["2[12]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["16|[236-9]"]]]],PW:["680","01[12]","(?:[24-8]\\d\\d|345|900)\\d{4}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[2-9]"]]]],PY:["595","00","59\\d{4,6}|9\\d{5,10}|(?:[2-46-8]\\d|5[0-8])\\d{4,7}",[6,7,8,9,10,11],[["(\\d{3})(\\d{3,6})","$1 $2",["[2-9]0"],"0$1"],["(\\d{2})(\\d{5})","$1 $2",["[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]"],"(0$1)"],["(\\d{3})(\\d{4,5})","$1 $2",["2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["87"]],["(\\d{3})(\\d{6})","$1 $2",["9(?:[5-79]|8[1-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[2-8]"],"0$1"],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["9"]]],"0"],QA:["974","00","800\\d{4}|(?:2|800)\\d{6}|(?:0080|[3-7])\\d{7}",[7,8,9,11],[["(\\d{3})(\\d{4})","$1 $2",["2[16]|8"]],["(\\d{4})(\\d{4})","$1 $2",["[3-7]"]]]],RE:["262","00","(?:26|[689]\\d)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2689]"],"0$1"]],"0",0,0,0,0,0,[["26(?:2\\d\\d|3(?:0\\d|1[0-6]))\\d{4}"],["69(?:2\\d\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\d{4}"],["80\\d{7}"],["89[1-37-9]\\d{6}"],0,0,0,0,["9(?:399[0-3]|479[0-5]|76(?:2[27]|3[0-37]))\\d{4}"],["8(?:1[019]|2[0156]|84|90)\\d{6}"]]],RO:["40","00","(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",[6,9],[["(\\d{3})(\\d{3})","$1 $2",["2[3-6]","2[3-6]\\d9"],"0$1"],["(\\d{2})(\\d{4})","$1 $2",["219|31"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[23]1"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[236-9]"],"0$1"]],"0",0,0,0,0,0,0,0," int "],RS:["381","00","38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",[6,7,8,9,10,11,12],[["(\\d{3})(\\d{3,9})","$1 $2",["(?:2[389]|39)0|[7-9]"],"0$1"],["(\\d{2})(\\d{5,10})","$1 $2",["[1-36]"],"0$1"]],"0"],RU:["7","810","8\\d{13}|[347-9]\\d{9}",[10,14],[["(\\d{4})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-8]|2[1-9])","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))","7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2"],"8 ($1)",1],["(\\d{5})(\\d)(\\d{2})(\\d{2})","$1 $2 $3 $4",["7(?:1[0-68]|2[1-9])","7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))","7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"8 ($1)",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2-$3-$4",["[349]|8(?:[02-7]|1[1-8])"],"8 ($1)",1],["(\\d{4})(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3 $4",["8"],"8 ($1)"]],"8",0,0,0,0,"3[04-689]|[489]",0,"8~10"],RW:["250","00","(?:06|[27]\\d\\d|[89]00)\\d{6}",[8,9],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["0"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[7-9]"],"0$1"]],"0"],SA:["966","00","92\\d{7}|(?:[15]|8\\d)\\d{8}",[9,10],[["(\\d{4})(\\d{5})","$1 $2",["9"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["1"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["81"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]]],"0"],SB:["677","0[01]","(?:[1-6]|[7-9]\\d\\d)\\d{4}",[5,7],[["(\\d{2})(\\d{5})","$1 $2",["7|8[4-9]|9(?:[1-8]|9[0-8])"]]]],SC:["248","010|0[0-2]","800\\d{4}|(?:[249]\\d|64)\\d{5}",[7],[["(\\d)(\\d{3})(\\d{3})","$1 $2 $3",["[246]|9[57]"]]],0,0,0,0,0,0,0,"00"],SD:["249","00","[19]\\d{8}",[9],[["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[19]"],"0$1"]],"0"],SE:["46","00","(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",[6,7,8,9,10],[["(\\d{2})(\\d{2,3})(\\d{2})","$1-$2 $3",["20"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{4})","$1-$2",["9(?:00|39|44|9)"],"0$1",0,"$1 $2"],["(\\d{2})(\\d{3})(\\d{2})","$1-$2 $3",["[12][136]|3[356]|4[0246]|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3"],["(\\d)(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2,3})(\\d{2})","$1-$2 $3",["1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3"],["(\\d{3})(\\d{2,3})(\\d{3})","$1-$2 $3",["9(?:00|39|44)"],"0$1",0,"$1 $2 $3"],["(\\d{2})(\\d{2,3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]"],"0$1",0,"$1 $2 $3 $4"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4",["10|7"],"0$1",0,"$1 $2 $3 $4"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1-$2 $3 $4",["8"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1-$2 $3 $4",["[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{2})(\\d{3})","$1-$2 $3 $4",["9"],"0$1",0,"$1 $2 $3 $4"],["(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1-$2 $3 $4 $5",["[26]"],"0$1",0,"$1 $2 $3 $4 $5"]],"0"],SG:["65","0[0-3]\\d","(?:(?:1\\d|8)\\d\\d|7000)\\d{7}|[3689]\\d{7}",[8,10,11],[["(\\d{4})(\\d{4})","$1 $2",["[369]|8(?:0[1-9]|[1-9])"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"]],["(\\d{4})(\\d{4})(\\d{3})","$1 $2 $3",["7"]],["(\\d{4})(\\d{3})(\\d{4})","$1 $2 $3",["1"]]]],SH:["290","00","(?:[256]\\d|8)\\d{3}",[4,5],0,0,0,0,0,0,"[256]"],SI:["386","00|10(?:22|66|88|99)","[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",[5,6,7,8],[["(\\d{2})(\\d{3,6})","$1 $2",["8[09]|9"],"0$1"],["(\\d{3})(\\d{5})","$1 $2",["59|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[37][01]|4[0139]|51|6"],"0$1"],["(\\d)(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[1-57]"],"(0$1)"]],"0",0,0,0,0,0,0,"00"],SJ:["47","00","0\\d{4}|(?:[489]\\d|79)\\d{6}",[5,8],0,0,0,0,0,0,"79"],SK:["421","00","[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",[6,7,9],[["(\\d)(\\d{2})(\\d{3,4})","$1 $2 $3",["21"],"0$1"],["(\\d{2})(\\d{2})(\\d{2,3})","$1 $2 $3",["[3-5][1-8]1","[3-5][1-8]1[67]"],"0$1"],["(\\d)(\\d{3})(\\d{3})(\\d{2})","$1/$2 $3 $4",["2"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[689]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1/$2 $3 $4",["[3-5]"],"0$1"]],"0"],SL:["232","00","(?:[237-9]\\d|66)\\d{6}",[8],[["(\\d{2})(\\d{6})","$1 $2",["[236-9]"],"(0$1)"]],"0"],SM:["378","00","(?:0549|[5-7]\\d)\\d{6}",[8,10],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[5-7]"]],["(\\d{4})(\\d{6})","$1 $2",["0"]]],0,0,"([89]\\d{5})$","0549$1"],SN:["221","00","(?:[378]\\d|93)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[379]"]]]],SO:["252","00","[346-9]\\d{8}|[12679]\\d{7}|[1-5]\\d{6}|[1348]\\d{5}",[6,7,8,9],[["(\\d{2})(\\d{4})","$1 $2",["8[125]"]],["(\\d{6})","$1",["[134]"]],["(\\d)(\\d{6})","$1 $2",["[15]|2[0-79]|3[0-46-8]|4[0-7]"]],["(\\d)(\\d{7})","$1 $2",["(?:2|90)4|[67]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[348]|64|79|90"]],["(\\d{2})(\\d{5,7})","$1 $2",["1|28|6[0-35-9]|77|9[2-9]"]]],"0"],SR:["597","00","(?:[2-5]|68|[78]\\d)\\d{5}",[6,7],[["(\\d{2})(\\d{2})(\\d{2})","$1-$2-$3",["56"]],["(\\d{3})(\\d{3})","$1-$2",["[2-5]"]],["(\\d{3})(\\d{4})","$1-$2",["[6-8]"]]]],SS:["211","00","[19]\\d{8}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[19]"],"0$1"]],"0"],ST:["239","00","(?:22|9\\d)\\d{5}",[7],[["(\\d{3})(\\d{4})","$1 $2",["[29]"]]]],SV:["503","00","[267]\\d{7}|(?:80\\d|900)\\d{4}(?:\\d{4})?",[7,8,11],[["(\\d{3})(\\d{4})","$1 $2",["[89]"]],["(\\d{4})(\\d{4})","$1 $2",["[267]"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["[89]"]]]],SX:["1","011","7215\\d{6}|(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"(5\\d{6})$|1","721$1",0,"721"],SY:["963","00","[1-39]\\d{8}|[1-5]\\d{7}",[8,9],[["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-5]"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1",1]],"0"],SZ:["268","00","0800\\d{4}|(?:[237]\\d|900)\\d{6}",[8,9],[["(\\d{4})(\\d{4})","$1 $2",["[0237]"]],["(\\d{5})(\\d{4})","$1 $2",["9"]]]],TA:["290","00","8\\d{3}",[4],0,0,0,0,0,0,"8"],TC:["1","011","(?:[58]\\d\\d|649|900)\\d{7}",[10],0,"1",0,"([2-479]\\d{6})$|1","649$1",0,"649"],TD:["235","00|16","(?:22|[69]\\d|77)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[2679]"]]],0,0,0,0,0,0,0,"00"],TG:["228","00","[279]\\d{7}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[279]"]]]],TH:["66","00[1-9]","(?:001800|[2-57]|[689]\\d)\\d{7}|1\\d{7,9}",[8,9,10,13],[["(\\d)(\\d{3})(\\d{4})","$1 $2 $3",["2"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[13-9]"],"0$1"],["(\\d{4})(\\d{3})(\\d{3})","$1 $2 $3",["1"]]],"0"],TJ:["992","810","[0-57-9]\\d{8}",[9],[["(\\d{6})(\\d)(\\d{2})","$1 $2 $3",["331","3317"]],["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["44[02-479]|[34]7"]],["(\\d{4})(\\d)(\\d{4})","$1 $2 $3",["3[1-5]"]],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[0-57-9]"]]],0,0,0,0,0,0,0,"8~10"],TK:["690","00","[2-47]\\d{3,6}",[4,5,6,7]],TL:["670","00","7\\d{7}|(?:[2-47]\\d|[89]0)\\d{5}",[7,8],[["(\\d{3})(\\d{4})","$1 $2",["[2-489]|70"]],["(\\d{4})(\\d{4})","$1 $2",["7"]]]],TM:["993","810","(?:[1-6]\\d|71)\\d{6}",[8],[["(\\d{2})(\\d{2})(\\d{2})(\\d{2})","$1 $2-$3-$4",["12"],"(8 $1)"],["(\\d{3})(\\d)(\\d{2})(\\d{2})","$1 $2-$3-$4",["[1-5]"],"(8 $1)"],["(\\d{2})(\\d{6})","$1 $2",["[67]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],TN:["216","00","[2-57-9]\\d{7}",[8],[["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-57-9]"]]]],TO:["676","00","(?:0800|(?:[5-8]\\d\\d|999)\\d)\\d{3}|[2-8]\\d{4}",[5,7],[["(\\d{2})(\\d{3})","$1-$2",["[2-4]|50|6[09]|7[0-24-69]|8[05]"]],["(\\d{4})(\\d{3})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[5-9]"]]]],TR:["90","00","4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",[7,10,12,13],[["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["512|8[01589]|90"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["5(?:[0-59]|61)","5(?:[0-59]|61[06])","5(?:[0-59]|61[06]1)"],"0$1",1],["(\\d{3})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[24][1-8]|3[1-9]"],"(0$1)",1],["(\\d{3})(\\d{3})(\\d{6,7})","$1 $2 $3",["80"],"0$1",1]],"0"],TT:["1","011","(?:[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-46-8]\\d{6})$|1","868$1",0,"868"],TV:["688","00","(?:2|7\\d\\d|90)\\d{4}",[5,6,7],[["(\\d{2})(\\d{3})","$1 $2",["2"]],["(\\d{2})(\\d{4})","$1 $2",["90"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],TW:["886","0(?:0[25-79]|19)","[2-689]\\d{8}|7\\d{9,10}|[2-8]\\d{7}|2\\d{6}",[7,8,9,10,11],[["(\\d{2})(\\d)(\\d{4})","$1 $2 $3",["202"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["[258]0"],"0$1"],["(\\d)(\\d{3,4})(\\d{4})","$1 $2 $3",["[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]","[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[49]"],"0$1"],["(\\d{2})(\\d{4})(\\d{4,5})","$1 $2 $3",["7"],"0$1"]],"0",0,0,0,0,0,0,0,"#"],TZ:["255","00[056]","(?:[25-8]\\d|41|90)\\d{7}",[9],[["(\\d{3})(\\d{2})(\\d{4})","$1 $2 $3",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[24]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["5"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[67]"],"0$1"]],"0"],UA:["380","00","[89]\\d{9}|[3-9]\\d{8}",[9,10],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]","6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]"],"0$1"],["(\\d{4})(\\d{5})","$1 $2",["3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])","3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[3-7]|89|9[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["[89]"],"0$1"]],"0",0,0,0,0,0,0,"0~0"],UG:["256","00[057]","800\\d{6}|(?:[29]0|[347]\\d)\\d{7}",[9],[["(\\d{4})(\\d{5})","$1 $2",["202","2024"],"0$1"],["(\\d{3})(\\d{6})","$1 $2",["[27-9]|4(?:6[45]|[7-9])"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[34]"],"0$1"]],"0"],US:["1","011","[2-9]\\d{9}|3\\d{6}",[10],[["(\\d{3})(\\d{4})","$1-$2",["310"],0,1],["(\\d{3})(\\d{3})(\\d{4})","($1) $2-$3",["[2-9]"],0,1,"$1-$2-$3"]],"1",0,0,0,0,0,[["(?:5056(?:[0-35-9]\\d|4[468])|7302[0-4]\\d)\\d{4}|(?:472[24]|505[2-57-9]|7306|983[2-47-9])\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-57-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\d{6}"],[""],["8(?:00|33|44|55|66|77|88)[2-9]\\d{6}"],["900[2-9]\\d{6}"],["52(?:3(?:[2-46-9][02-9]\\d|5(?:[02-46-9]\\d|5[0-46-9]))|4(?:[2-478][02-9]\\d|5(?:[034]\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\d)|9(?:[05-9]\\d|2[0-5]|49)))\\d{4}|52[34][2-9]1[02-9]\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\d{6}"]]],UY:["598","0(?:0|1[3-9]\\d)","0004\\d{2,9}|[1249]\\d{7}|(?:[49]\\d|80)\\d{5}",[6,7,8,9,10,11,12,13],[["(\\d{3})(\\d{3,4})","$1 $2",["0"]],["(\\d{3})(\\d{4})","$1 $2",["[49]0|8"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["9"],"0$1"],["(\\d{4})(\\d{4})","$1 $2",["[124]"]],["(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3",["0"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{2,4})","$1 $2 $3 $4",["0"]]],"0",0,0,0,0,0,0,"00"," int. "],UZ:["998","810","(?:20|33|[5-79]\\d|88)\\d{7}",[9],[["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["[235-9]"],"8 $1"]],"8",0,0,0,0,0,0,"8~10"],VA:["39","00","0\\d{5,10}|3[0-8]\\d{7,10}|55\\d{8}|8\\d{5}(?:\\d{2,4})?|(?:1\\d|39)\\d{7,8}",[6,7,8,9,10,11],0,0,0,0,0,0,"06698"],VC:["1","011","(?:[58]\\d\\d|784|900)\\d{7}",[10],0,"1",0,"([2-7]\\d{6})$|1","784$1",0,"784"],VE:["58","00","[68]00\\d{7}|(?:[24]\\d|[59]0)\\d{8}",[10],[["(\\d{3})(\\d{7})","$1-$2",["[24-689]"],"0$1"]],"0"],VG:["1","011","(?:284|[58]\\d\\d|900)\\d{7}",[10],0,"1",0,"([2-578]\\d{6})$|1","284$1",0,"284"],VI:["1","011","[58]\\d{9}|(?:34|90)0\\d{7}",[10],0,"1",0,"([2-9]\\d{6})$|1","340$1",0,"340"],VN:["84","00","[12]\\d{9}|[135-9]\\d{8}|[16]\\d{7}|[16-8]\\d{6}",[7,8,9,10],[["(\\d{2})(\\d{5})","$1 $2",["80"],"0$1",1],["(\\d{4})(\\d{4,6})","$1 $2",["1"],0,1],["(\\d{2})(\\d{3})(\\d{2})(\\d{2})","$1 $2 $3 $4",["6"],"0$1",1],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[357-9]"],"0$1",1],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["2[48]"],"0$1",1],["(\\d{3})(\\d{4})(\\d{3})","$1 $2 $3",["2"],"0$1",1]],"0"],VU:["678","00","[57-9]\\d{6}|(?:[238]\\d|48)\\d{3}",[5,7],[["(\\d{3})(\\d{4})","$1 $2",["[57-9]"]]]],WF:["681","00","(?:40|72)\\d{4}|8\\d{5}(?:\\d{3})?",[6,9],[["(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[478]"]],["(\\d{3})(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3 $4",["8"]]]],WS:["685","0","(?:[2-6]|8\\d{5})\\d{4}|[78]\\d{6}|[68]\\d{5}",[5,6,7,10],[["(\\d{5})","$1",["[2-5]|6[1-9]"]],["(\\d{3})(\\d{3,7})","$1 $2",["[68]"]],["(\\d{2})(\\d{5})","$1 $2",["7"]]]],XK:["383","00","2\\d{7,8}|3\\d{7,11}|(?:4\\d\\d|[89]00)\\d{5}",[8,9,10,11,12],[["(\\d{3})(\\d{5})","$1 $2",["[89]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["[2-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["2|39"],"0$1"],["(\\d{2})(\\d{7,10})","$1 $2",["3"],"0$1"]],"0"],YE:["967","00","(?:1|7\\d)\\d{7}|[1-7]\\d{6}",[7,8,9],[["(\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7(?:[24-6]|8[0-7])"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["7"],"0$1"]],"0"],YT:["262","00","(?:80|9\\d)\\d{7}|(?:26|63)9\\d{6}",[9],0,"0",0,0,0,0,0,[["269(?:0[0-467]|15|5[0-4]|6\\d|[78]0)\\d{4}"],["639(?:0[0-79]|1[019]|[267]\\d|3[09]|40|5[05-9]|9[04-79])\\d{4}"],["80\\d{7}"],0,0,0,0,0,["9(?:(?:39|47)8[01]|769\\d)\\d{4}"]]],ZA:["27","00","[1-79]\\d{8}|8\\d{4,9}",[5,6,7,8,9,10],[["(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],["(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-9]"],"0$1"],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["8"],"0$1"]],"0"],ZM:["260","00","800\\d{6}|(?:21|63|[79]\\d)\\d{7}",[9],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[28]"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["[79]"],"0$1"]],"0"],ZW:["263","00","2(?:[0-57-9]\\d{6,8}|6[0-24-9]\\d{6,7})|[38]\\d{9}|[35-8]\\d{8}|[3-6]\\d{7}|[1-689]\\d{6}|[1-3569]\\d{5}|[1356]\\d{4}",[5,6,7,8,9,10],[["(\\d{3})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]"],"0$1"],["(\\d)(\\d{3})(\\d{2,4})","$1 $2 $3",["[49]"],"0$1"],["(\\d{3})(\\d{4})","$1 $2",["80"],"0$1"],["(\\d{2})(\\d{7})","$1 $2",["24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2","2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]"],"(0$1)"],["(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["7"],"0$1"],["(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)","2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)"],"0$1"],["(\\d{4})(\\d{6})","$1 $2",["8"],"0$1"],["(\\d{2})(\\d{3,5})","$1 $2",["1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]"],"0$1"],["(\\d{2})(\\d{3})(\\d{3,4})","$1 $2 $3",["29[013-9]|39|54"],"0$1"],["(\\d{4})(\\d{3,5})","$1 $2",["(?:25|54)8","258|5483"],"0$1"]],"0"]},nonGeographic:{800:["800",0,"(?:00|[1-9]\\d)\\d{6}",[8],[["(\\d{4})(\\d{4})","$1 $2",["\\d"]]],0,0,0,0,0,0,[0,0,["(?:00|[1-9]\\d)\\d{6}"]]],808:["808",0,"[1-9]\\d{7}",[8],[["(\\d{4})(\\d{4})","$1 $2",["[1-9]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,["[1-9]\\d{7}"]]],870:["870",0,"7\\d{11}|[35-7]\\d{8}",[9,12],[["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["[35-7]"]]],0,0,0,0,0,0,[0,["(?:[356]|774[45])\\d{8}|7[6-8]\\d{7}"]]],878:["878",0,"10\\d{10}",[12],[["(\\d{2})(\\d{5})(\\d{5})","$1 $2 $3",["1"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["10\\d{10}"]]],881:["881",0,"6\\d{9}|[0-36-9]\\d{8}",[9,10],[["(\\d)(\\d{3})(\\d{5})","$1 $2 $3",["[0-37-9]"]],["(\\d)(\\d{3})(\\d{5,6})","$1 $2 $3",["6"]]],0,0,0,0,0,0,[0,["6\\d{9}|[0-36-9]\\d{8}"]]],882:["882",0,"[13]\\d{6}(?:\\d{2,5})?|[19]\\d{7}|(?:[25]\\d\\d|4)\\d{7}(?:\\d{2})?",[7,8,9,10,11,12],[["(\\d{2})(\\d{5})","$1 $2",["16|342"]],["(\\d{2})(\\d{6})","$1 $2",["49"]],["(\\d{2})(\\d{2})(\\d{4})","$1 $2 $3",["1[36]|9"]],["(\\d{2})(\\d{4})(\\d{3})","$1 $2 $3",["3[23]"]],["(\\d{2})(\\d{3,4})(\\d{4})","$1 $2 $3",["16"]],["(\\d{2})(\\d{4})(\\d{4})","$1 $2 $3",["10|23|3(?:[15]|4[57])|4|51"]],["(\\d{3})(\\d{4})(\\d{4})","$1 $2 $3",["34"]],["(\\d{2})(\\d{4,5})(\\d{5})","$1 $2 $3",["[1-35]"]]],0,0,0,0,0,0,[0,["342\\d{4}|(?:337|49)\\d{6}|(?:3(?:2|47|7\\d{3})|50\\d{3})\\d{7}",[7,8,9,10,12]],0,0,0,0,0,0,["1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\d{4}|6\\d{5,10})|(?:345\\d|9[89])\\d{6}|(?:10|2(?:3|85\\d)|3(?:[15]|[69]\\d\\d)|4[15-8]|51)\\d{8}"]]],883:["883",0,"(?:[1-4]\\d|51)\\d{6,10}",[8,9,10,11,12],[["(\\d{3})(\\d{3})(\\d{2,8})","$1 $2 $3",["[14]|2[24-689]|3[02-689]|51[24-9]"]],["(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["510"]],["(\\d{3})(\\d{3})(\\d{4})","$1 $2 $3",["21"]],["(\\d{4})(\\d{4})(\\d{4})","$1 $2 $3",["51[13]"]],["(\\d{3})(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3 $4",["[235]"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,["(?:2(?:00\\d\\d|10)|(?:370[1-9]|51\\d0)\\d)\\d{7}|51(?:00\\d{5}|[24-9]0\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\d{5,9}"]]],888:["888",0,"\\d{11}",[11],[["(\\d{3})(\\d{3})(\\d{5})","$1 $2 $3"]],0,0,0,0,0,0,[0,0,0,0,0,0,["\\d{11}"]]],979:["979",0,"[1359]\\d{8}",[9],[["(\\d)(\\d{4})(\\d{4})","$1 $2 $3",["[1359]"]]],0,0,0,0,0,0,[0,0,0,["[1359]\\d{8}"]]]}};function Od(t,e){var n=Array.prototype.slice.call(e);return n.push(yy),t.apply(this,n)}function Vr(t){"@babel/helpers - typeof";return Vr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vr(t)}function Id(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function by(t,e,n){return e&&Id(t.prototype,e),n&&Id(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function $y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _y(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qn(t,e)}function wy(t){var e=zd();return function(){var o=Xn(t),i;if(e){var s=Xn(this).constructor;i=Reflect.construct(o,arguments,s)}else i=o.apply(this,arguments);return Cy(this,i)}}function Cy(t,e){if(e&&(Vr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Td(t)}function Td(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pr(t){var e=typeof Map=="function"?new Map:void 0;return Pr=function(o){if(o===null||!ky(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(o))return e.get(o);e.set(o,i)}function i(){return Go(o,arguments,Xn(this).constructor)}return i.prototype=Object.create(o.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),qn(i,o)},Pr(t)}function Go(t,e,n){return zd()?Go=Reflect.construct:Go=function(i,s,l){var a=[null];a.push.apply(a,s);var d=Function.bind.apply(i,a),c=new d;return l&&qn(c,l.prototype),c},Go.apply(null,arguments)}function zd(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ky(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function qn(t,e){return qn=Object.setPrototypeOf||function(o,i){return o.__proto__=i,o},qn(t,e)}function Xn(t){return Xn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Xn(t)}var ct=function(t){_y(n,t);var e=wy(n);function n(o){var i;return $y(this,n),i=e.call(this,o),Object.setPrototypeOf(Td(i),n.prototype),i.name=i.constructor.name,i}return by(n)}(Pr(Error)),Fr=2,xy=17,Sy=3,He="0-90-9٠-٩۰-۹",vy="-‐-―−ー-",My="//",Dy="..",Ey="  ­​⁠ ",By="()()[]\\[\\]",Vy="~⁓∼~",qo="".concat(vy).concat(My).concat(Dy).concat(Ey).concat(By).concat(Vy),Rr="++";function Ld(t,e){t=t.split("-"),e=e.split("-");for(var n=t[0].split("."),o=e[0].split("."),i=0;i<3;i++){var s=Number(n[i]),l=Number(o[i]);if(s>l)return 1;if(l>s)return-1;if(!isNaN(s)&&isNaN(l))return 1;if(isNaN(s)&&!isNaN(l))return-1}return t[1]&&e[1]?t[1]>e[1]?1:t[1]<e[1]?-1:0:!t[1]&&e[1]?1:t[1]&&!e[1]?-1:0}var Py={}.constructor;function Xo(t){return t!=null&&t.constructor===Py}function Nr(t){"@babel/helpers - typeof";return Nr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nr(t)}function Ko(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hd(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Zo(t,e,n){return e&&Hd(t.prototype,e),n&&Hd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var Fy="1.2.0",Ry="1.7.35",jd=" ext. ",Ny=/^\d+$/,ke=function(){function t(e){Ko(this,t),Ty(e),this.metadata=e,Ud.call(this,e)}return Zo(t,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter(function(n){return n!=="001"})}},{key:"getCountryMetadata",value:function(n){return this.metadata.countries[n]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(n){return this.getCountryMetadata(n)!==void 0}},{key:"hasCallingCode",value:function(n){if(this.getCountryCodesForCallingCode(n))return!0;if(this.nonGeographic()){if(this.nonGeographic()[n])return!0}else{var o=this.countryCallingCodes()[n];if(o&&o.length===1&&o[0]==="001")return!0}}},{key:"isNonGeographicCallingCode",value:function(n){return this.nonGeographic()?!!this.nonGeographic()[n]:!this.getCountryCodesForCallingCode(n)}},{key:"country",value:function(n){return this.selectNumberingPlan(n)}},{key:"selectNumberingPlan",value:function(n,o){if(n&&Ny.test(n)&&(o=n,n=null),n&&n!=="001"){if(!this.hasCountry(n))throw new Error("Unknown country: ".concat(n));this.numberingPlan=new Wd(this.getCountryMetadata(n),this)}else if(o){if(!this.hasCallingCode(o))throw new Error("Unknown calling code: ".concat(o));this.numberingPlan=new Wd(this.getNumberingPlanMetadata(o),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(n){var o=this.countryCallingCodes()[n];if(o)return o.length===1&&o[0].length===3?void 0:o}},{key:"getCountryCodeForCallingCode",value:function(n){var o=this.getCountryCodesForCallingCode(n);if(o)return o[0]}},{key:"getNumberingPlanMetadata",value:function(n){var o=this.getCountryCodeForCallingCode(n);if(o)return this.getCountryMetadata(o);if(this.nonGeographic()){var i=this.nonGeographic()[n];if(i)return i}else{var s=this.countryCallingCodes()[n];if(s&&s.length===1&&s[0]==="001")return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(n){return this.numberingPlan.type(n)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(n){return this.selectNumberingPlan(n)}},{key:"hasSelectedNumberingPlan",value:function(){return this.numberingPlan!==void 0}}]),t}(),Wd=function(){function t(e,n){Ko(this,t),this.globalMetadataObject=n,this.metadata=e,Ud.call(this,n.metadata)}return Zo(t,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!(this.v1||this.v2))return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(n){return n[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var n=this,o=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return o.map(function(i){return new Ay(i,n)})}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(n){return n[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return this.types()&&this.types().length===0?!1:!!this.types()}},{key:"type",value:function(n){if(this.hasTypes()&&Yd(this.types(),n))return new Iy(Yd(this.types(),n),this)}},{key:"ext",value:function(){return this.v1||this.v2?jd:this.metadata[13]||jd}}]),t}(),Ay=function(){function t(e,n){Ko(this,t),this._format=e,this.metadata=n}return Zo(t,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!!(this.nationalPrefixFormattingRule()&&!Oy.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),t}(),Oy=/^\(?\$1\)?$/,Iy=function(){function t(e,n){Ko(this,t),this.type=e,this.metadata=n}return Zo(t,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),t}();function Yd(t,e){switch(e){case"FIXED_LINE":return t[0];case"MOBILE":return t[1];case"TOLL_FREE":return t[2];case"PREMIUM_RATE":return t[3];case"PERSONAL_NUMBER":return t[4];case"VOICEMAIL":return t[5];case"UAN":return t[6];case"PAGER":return t[7];case"VOIP":return t[8];case"SHARED_COST":return t[9]}}function Ty(t){if(!t)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!Xo(t)||!Xo(t.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(Xo(t)?"an object of shape: { "+Object.keys(t).join(", ")+" }":"a "+zy(t)+": "+t,"."))}var zy=function(e){return Nr(e)};function Jo(t,e){if(e=new ke(e),e.hasCountry(t))return e.country(t).countryCallingCode();throw new Error("Unknown country: ".concat(t))}function Ly(t,e){return e.countries.hasOwnProperty(t)}function Ud(t){var e=t.version;typeof e=="number"?(this.v1=e===1,this.v2=e===2,this.v3=e===3,this.v4=e===4):e?Ld(e,Fy)===-1?this.v2=!0:Ld(e,Ry)===-1?this.v3=!0:this.v4=!0:this.v1=!0}var Hy=";ext=",sn=function(e){return"([".concat(He,"]{1,").concat(e,"})")};function Gd(t){var e="20",n="15",o="9",i="6",s="[  \\t,]*",l="[:\\..]?[  \\t,-]*",a="#?",d="(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)",c="(?:[xx##~~]|int|int)",u="[- ]+",f="[  \\t]*",h="(?:,{2}|;)",p=Hy+sn(e),m=s+d+l+sn(e)+a,g=s+c+l+sn(o)+a,y=u+sn(i)+"#",b=f+h+l+sn(n)+a,_=f+"(?:,)+"+l+sn(o)+a;return p+"|"+m+"|"+g+"|"+y+"|"+b+"|"+_}var jy="["+He+"]{"+Fr+"}",Wy="["+Rr+"]{0,1}(?:["+qo+"]*["+He+"]){3,}["+qo+He+"]*",Yy=new RegExp("^["+Rr+"]{0,1}(?:["+qo+"]*["+He+"]){1,2}$","i"),Uy=Wy+"(?:"+Gd()+")?",Gy=new RegExp("^"+jy+"$|^"+Uy+"$","i");function qy(t){return t.length>=Fr&&Gy.test(t)}function Xy(t){return Yy.test(t)}var qd=new RegExp("(?:"+Gd()+")$","i");function Ky(t){var e=t.search(qd);if(e<0)return{};for(var n=t.slice(0,e),o=t.match(qd),i=1;i<o.length;){if(o[i])return{number:n,ext:o[i]};i++}}var Zy={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Jy(t){return Zy[t]}function Qy(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=eb(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eb(t,e){if(t){if(typeof t=="string")return Xd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xd(t,e)}}function Xd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Kd(t){for(var e="",n=Qy(t.split("")),o;!(o=n()).done;){var i=o.value;e+=tb(i,e)||""}return e}function tb(t,e,n){if(t==="+"){if(e){typeof n=="function"&&n("end");return}return"+"}return Jy(t)}function nb(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=ob(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ob(t,e){if(t){if(typeof t=="string")return Zd(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zd(t,e)}}function Zd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function ib(t,e){for(var n=t.slice(),o=nb(e),i;!(i=o()).done;){var s=i.value;t.indexOf(s)<0&&n.push(s)}return n.sort(function(l,a){return l-a})}function Ar(t,e){return Jd(t,void 0,e)}function Jd(t,e,n){var o=n.type(e),i=o&&o.possibleLengths()||n.possibleLengths();if(!i)return"IS_POSSIBLE";if(e==="FIXED_LINE_OR_MOBILE"){if(!n.type("FIXED_LINE"))return Jd(t,"MOBILE",n);var s=n.type("MOBILE");s&&(i=ib(i,s.possibleLengths()))}else if(e&&!o)return"INVALID_LENGTH";var l=t.length,a=i[0];return a===l?"IS_POSSIBLE":a>l?"TOO_SHORT":i[i.length-1]<l?"TOO_LONG":i.indexOf(l,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function rb(t,e,n){if(e===void 0&&(e={}),n=new ke(n),e.v2){if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}else{if(!t.phone)return!1;if(t.country){if(!n.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));n.country(t.country)}else{if(!t.countryCallingCode)throw new Error("Invalid phone number object passed");n.selectNumberingPlan(t.countryCallingCode)}}if(n.possibleLengths())return Qd(t.phone||t.nationalNumber,n);if(t.countryCallingCode&&n.isNonGeographicCallingCode(t.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}function Qd(t,e){switch(Ar(t,e)){case"IS_POSSIBLE":return!0;default:return!1}}function ut(t,e){return t=t||"",new RegExp("^(?:"+e+")$").test(t)}function sb(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=lb(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lb(t,e){if(t){if(typeof t=="string")return ec(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ec(t,e)}}function ec(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}var ab=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function Or(t,e,n){if(e=e||{},!(!t.country&&!t.countryCallingCode)){n=new ke(n),n.selectNumberingPlan(t.country,t.countryCallingCode);var o=e.v2?t.nationalNumber:t.phone;if(ut(o,n.nationalNumberPattern())){if(Ir(o,"FIXED_LINE",n))return n.type("MOBILE")&&n.type("MOBILE").pattern()===""||!n.type("MOBILE")||Ir(o,"MOBILE",n)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var i=sb(ab),s;!(s=i()).done;){var l=s.value;if(Ir(o,l,n))return l}}}}function Ir(t,e,n){return e=n.type(e),!e||!e.pattern()||e.possibleLengths()&&e.possibleLengths().indexOf(t.length)<0?!1:ut(t,e.pattern())}function db(t,e,n){if(e=e||{},n=new ke(n),n.selectNumberingPlan(t.country,t.countryCallingCode),n.hasTypes())return Or(t,e,n.metadata)!==void 0;var o=e.v2?t.nationalNumber:t.phone;return ut(o,n.nationalNumberPattern())}function cb(t,e,n){var o=new ke(n),i=o.getCountryCodesForCallingCode(t);return i?i.filter(function(s){return ub(e,s,n)}):[]}function ub(t,e,n){var o=new ke(n);return o.selectNumberingPlan(e),o.numberingPlan.possibleLengths().indexOf(t.length)>=0}function fb(t){return t.replace(new RegExp("[".concat(qo,"]+"),"g")," ").trim()}var hb=/(\$\d)/;function pb(t,e,n){var o=n.useInternationalFormat,i=n.withNationalPrefix;n.carrierCode,n.metadata;var s=t.replace(new RegExp(e.pattern()),o?e.internationalFormat():i&&e.nationalPrefixFormattingRule()?e.format().replace(hb,e.nationalPrefixFormattingRule()):e.format());return o?fb(s):s}var mb=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function gb(t,e,n){var o=new ke(n);if(o.selectNumberingPlan(t,e),o.defaultIDDPrefix())return o.defaultIDDPrefix();if(mb.test(o.IDDPrefix()))return o.IDDPrefix()}function yb(t){var e=t.number,n=t.ext;if(!e)return"";if(e[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(e).concat(n?";ext="+n:"")}function bb(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=$b(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
31
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $b(t,e){if(t){if(typeof t=="string")return tc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tc(t,e)}}function tc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function nc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function oc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?nc(Object(n),!0).forEach(function(o){_b(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function _b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ic={formatExtension:function(e,n,o){return"".concat(e).concat(o.ext()).concat(n)}};function wb(t,e,n,o){if(n?n=oc(oc({},ic),n):n=ic,o=new ke(o),t.country&&t.country!=="001"){if(!o.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));o.country(t.country)}else if(t.countryCallingCode)o.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";var i=o.countryCallingCode(),s=n.v2?t.nationalNumber:t.phone,l;switch(e){case"NATIONAL":return s?(l=Qo(s,t.carrierCode,"NATIONAL",o,n),Tr(l,t.ext,o,n.formatExtension)):"";case"INTERNATIONAL":return s?(l=Qo(s,null,"INTERNATIONAL",o,n),l="+".concat(i," ").concat(l),Tr(l,t.ext,o,n.formatExtension)):"+".concat(i);case"E.164":return"+".concat(i).concat(s);case"RFC3966":return yb({number:"+".concat(i).concat(s),ext:t.ext});case"IDD":if(!n.fromCountry)return;var a=kb(s,t.carrierCode,i,n.fromCountry,o);return Tr(a,t.ext,o,n.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(e,'"'))}}function Qo(t,e,n,o,i){var s=Cb(o.formats(),t);return s?pb(t,s,{useInternationalFormat:n==="INTERNATIONAL",withNationalPrefix:!(s.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&i&&i.nationalPrefix===!1),carrierCode:e,metadata:o}):t}function Cb(t,e){for(var n=bb(t),o;!(o=n()).done;){var i=o.value;if(i.leadingDigitsPatterns().length>0){var s=i.leadingDigitsPatterns()[i.leadingDigitsPatterns().length-1];if(e.search(s)!==0)continue}if(ut(e,i.pattern()))return i}}function Tr(t,e,n,o){return e?o(t,e,n):t}function kb(t,e,n,o,i){var s=Jo(o,i.metadata);if(s===n){var l=Qo(t,e,"NATIONAL",i);return n==="1"?n+" "+l:l}var a=gb(o,void 0,i.metadata);if(a)return"".concat(a," ").concat(n," ").concat(Qo(t,null,"INTERNATIONAL",i))}function rc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function sc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rc(Object(n),!0).forEach(function(o){xb(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rc(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function xb(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lc(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function vb(t,e,n){return e&&lc(t.prototype,e),n&&lc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var Mb=function(){function t(e,n,o){if(Sb(this,t),!e)throw new TypeError("`country` or `countryCallingCode` not passed");if(!n)throw new TypeError("`nationalNumber` not passed");if(!o)throw new TypeError("`metadata` not passed");var i=Eb(e,o),s=i.country,l=i.countryCallingCode;this.country=s,this.countryCallingCode=l,this.nationalNumber=n,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return o}}return vb(t,[{key:"setExt",value:function(n){this.ext=n}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:cb(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return rb(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return db(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var n=new ke(this.getMetadata());return n.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(n){return this.number===n.number&&this.ext===n.ext}},{key:"getType",value:function(){return Or(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(n,o){return wb(this,n,o?sc(sc({},o),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(n){return this.format("NATIONAL",n)}},{key:"formatInternational",value:function(n){return this.format("INTERNATIONAL",n)}},{key:"getURI",value:function(n){return this.format("RFC3966",n)}}]),t}(),Db=function(e){return/^[A-Z]{2}$/.test(e)};function Eb(t,e){var n,o,i=new ke(e);return Db(t)?(n=t,i.selectNumberingPlan(n),o=i.countryCallingCode()):o=t,{country:n,countryCallingCode:o}}var Bb=new RegExp("(["+He+"])");function Vb(t,e,n,o){if(e){var i=new ke(o);i.selectNumberingPlan(e,n);var s=new RegExp(i.IDDPrefix());if(t.search(s)===0){t=t.slice(t.match(s)[0].length);var l=t.match(Bb);if(!(l&&l[1]!=null&&l[1].length>0&&l[1]==="0"))return t}}}function Pb(t,e){if(t&&e.numberingPlan.nationalPrefixForParsing()){var n=new RegExp("^(?:"+e.numberingPlan.nationalPrefixForParsing()+")"),o=n.exec(t);if(o){var i,s,l=o.length-1,a=l>0&&o[l];if(e.nationalPrefixTransformRule()&&a)i=t.replace(n,e.nationalPrefixTransformRule()),l>1&&(s=o[1]);else{var d=o[0];i=t.slice(d.length),a&&(s=o[1])}var c;if(a){var u=t.indexOf(o[1]),f=t.slice(0,u);f===e.numberingPlan.nationalPrefix()&&(c=e.numberingPlan.nationalPrefix())}else c=o[0];return{nationalNumber:i,nationalPrefix:c,carrierCode:s}}}return{nationalNumber:t}}function zr(t,e){var n=Pb(t,e),o=n.carrierCode,i=n.nationalNumber;if(i!==t){if(!Fb(t,i,e))return{nationalNumber:t};if(e.possibleLengths()&&!Rb(i,e))return{nationalNumber:t}}return{nationalNumber:i,carrierCode:o}}function Fb(t,e,n){return!(ut(t,n.nationalNumberPattern())&&!ut(e,n.nationalNumberPattern()))}function Rb(t,e){switch(Ar(t,e)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function Nb(t,e,n,o){var i=e?Jo(e,o):n;if(t.indexOf(i)===0){o=new ke(o),o.selectNumberingPlan(e,n);var s=t.slice(i.length),l=zr(s,o),a=l.nationalNumber,d=zr(t,o),c=d.nationalNumber;if(!ut(c,o.nationalNumberPattern())&&ut(a,o.nationalNumberPattern())||Ar(c,o)==="TOO_LONG")return{countryCallingCode:i,number:s}}return{number:t}}function Ab(t,e,n,o){if(!t)return{};var i;if(t[0]!=="+"){var s=Vb(t,e,n,o);if(s&&s!==t)i=!0,t="+"+s;else{if(e||n){var l=Nb(t,e,n,o),a=l.countryCallingCode,d=l.number;if(a)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:a,number:d}}return{number:t}}}if(t[1]==="0")return{};o=new ke(o);for(var c=2;c-1<=Sy&&c<=t.length;){var u=t.slice(1,c);if(o.hasCallingCode(u))return o.selectNumberingPlan(u),{countryCallingCodeSource:i?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:u,number:t.slice(c)};c++}return{}}function Ob(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Ib(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
32
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ib(t,e){if(t){if(typeof t=="string")return ac(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ac(t,e)}}function ac(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function Tb(t,e){var n=e.countries,o=e.defaultCountry,i=e.metadata;i=new ke(i);for(var s=[],l=Ob(n),a;!(a=l()).done;){var d=a.value;if(i.country(d),i.leadingDigits()){if(t&&t.search(i.leadingDigits())===0)return d}else if(Or({phone:t,country:d},void 0,i.metadata))if(o){if(d===o)return d;s.push(d)}else return d}if(s.length>0)return s[0]}var zb=!1;function Lb(t,e){var n=e.nationalNumber,o=e.defaultCountry,i=e.metadata;if(zb&&i.isNonGeographicCallingCode(t))return"001";var s=i.getCountryCodesForCallingCode(t);if(s)return s.length===1?s[0]:Tb(n,{countries:s,defaultCountry:o,metadata:i.metadata})}var dc="+",Hb="[\\-\\.\\(\\)]?",cc="(["+He+"]|"+Hb+")",jb="^\\"+dc+cc+"*["+He+"]"+cc+"*$",Wb=new RegExp(jb,"g"),Lr=He,Yb="["+Lr+"]+((\\-)*["+Lr+"])*",Ub="a-zA-Z",Gb="["+Ub+"]+((\\-)*["+Lr+"])*",qb="^("+Yb+"\\.)*"+Gb+"\\.?$",Xb=new RegExp(qb,"g"),uc="tel:",Hr=";phone-context=",Kb=";isub=";function Zb(t){var e=t.indexOf(Hr);if(e<0)return null;var n=e+Hr.length;if(n>=t.length)return"";var o=t.indexOf(";",n);return o>=0?t.substring(n,o):t.substring(n)}function Jb(t){return t===null?!0:t.length===0?!1:Wb.test(t)||Xb.test(t)}function Qb(t,e){var n=e.extractFormattedPhoneNumber,o=Zb(t);if(!Jb(o))throw new ct("NOT_A_NUMBER");var i;if(o===null)i=n(t)||"";else{i="",o.charAt(0)===dc&&(i+=o);var s=t.indexOf(uc),l;s>=0?l=s+uc.length:l=0;var a=t.indexOf(Hr);i+=t.substring(l,a)}var d=i.indexOf(Kb);if(d>0&&(i=i.substring(0,d)),i!=="")return i}var e$=250,t$=new RegExp("["+Rr+He+"]"),n$=new RegExp("[^"+He+"#]+$");function o$(t,e,n){if(e=e||{},n=new ke(n),e.defaultCountry&&!n.hasCountry(e.defaultCountry))throw e.v2?new ct("INVALID_COUNTRY"):new Error("Unknown country: ".concat(e.defaultCountry));var o=r$(t,e.v2,e.extract),i=o.number,s=o.ext,l=o.error;if(!i){if(e.v2)throw l==="TOO_SHORT"?new ct("TOO_SHORT"):new ct("NOT_A_NUMBER");return{}}var a=l$(i,e.defaultCountry,e.defaultCallingCode,n),d=a.country,c=a.nationalNumber,u=a.countryCallingCode,f=a.countryCallingCodeSource,h=a.carrierCode;if(!n.hasSelectedNumberingPlan()){if(e.v2)throw new ct("INVALID_COUNTRY");return{}}if(!c||c.length<Fr){if(e.v2)throw new ct("TOO_SHORT");return{}}if(c.length>xy){if(e.v2)throw new ct("TOO_LONG");return{}}if(e.v2){var p=new Mb(u,c,n.metadata);return d&&(p.country=d),h&&(p.carrierCode=h),s&&(p.ext=s),p.__countryCallingCodeSource=f,p}var m=(e.extended?n.hasSelectedNumberingPlan():d)?ut(c,n.nationalNumberPattern()):!1;return e.extended?{country:d,countryCallingCode:u,carrierCode:h,valid:m,possible:m?!0:!!(e.extended===!0&&n.possibleLengths()&&Qd(c,n)),phone:c,ext:s}:m?s$(d,c,s):{}}function i$(t,e,n){if(t){if(t.length>e$){if(n)throw new ct("TOO_LONG");return}if(e===!1)return t;var o=t.search(t$);if(!(o<0))return t.slice(o).replace(n$,"")}}function r$(t,e,n){var o=Qb(t,{extractFormattedPhoneNumber:function(l){return i$(l,n,e)}});if(!o)return{};if(!qy(o))return Xy(o)?{error:"TOO_SHORT"}:{};var i=Ky(o);return i.ext?i:{number:o}}function s$(t,e,n){var o={country:t,phone:e};return n&&(o.ext=n),o}function l$(t,e,n,o){var i=Ab(Kd(t),e,n,o.metadata),s=i.countryCallingCodeSource,l=i.countryCallingCode,a=i.number,d;if(l)o.selectNumberingPlan(l);else if(a&&(e||n))o.selectNumberingPlan(e,n),e&&(d=e),l=n||Jo(e,o.metadata);else return{};if(!a)return{countryCallingCodeSource:s,countryCallingCode:l};var c=zr(Kd(a),o),u=c.nationalNumber,f=c.carrierCode,h=Lb(l,{nationalNumber:u,defaultCountry:e,metadata:o});return h&&(d=h,h==="001"||o.country(d)),{country:d,countryCallingCode:l,countryCallingCodeSource:s,nationalNumber:u,carrierCode:f}}function fc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function hc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fc(Object(n),!0).forEach(function(o){a$(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fc(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function a$(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d$(t,e,n){return o$(t,hc(hc({},e),{},{v2:!0}),n)}function pc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function c$(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?pc(Object(n),!0).forEach(function(o){u$(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pc(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function u$(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f$(t,e){return g$(t)||m$(t,e)||p$(t,e)||h$()}function h$(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
33
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p$(t,e){if(t){if(typeof t=="string")return mc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mc(t,e)}}function mc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function m$(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var o=[],i=!0,s=!1,l,a;try{for(n=n.call(t);!(i=(l=n.next()).done)&&(o.push(l.value),!(e&&o.length===e));i=!0);}catch(d){s=!0,a=d}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw a}}return o}}function g$(t){if(Array.isArray(t))return t}function y$(t){var e=Array.prototype.slice.call(t),n=f$(e,4),o=n[0],i=n[1],s=n[2],l=n[3],a,d,c;if(typeof o=="string")a=o;else throw new TypeError("A text for parsing must be a string.");if(!i||typeof i=="string")l?(d=s,c=l):(d=void 0,c=s),i&&(d=c$({defaultCountry:i},d));else if(Xo(i))s?(d=i,c=s):c=i;else throw new Error("Invalid second argument: ".concat(i));return{text:a,options:d,metadata:c}}function gc(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,o)}return n}function yc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gc(Object(n),!0).forEach(function(o){b$(t,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gc(Object(n)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(n,o))})}return t}function b$(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $$(t,e,n){e&&e.defaultCountry&&!Ly(e.defaultCountry,n)&&(e=yc(yc({},e),{},{defaultCountry:void 0}));try{return d$(t,e,n)}catch(o){if(!(o instanceof ct))throw o}}function _$(){var t=y$(arguments),e=t.text,n=t.options,o=t.metadata;return $$(e,n,o)}function jr(){return Od(_$,arguments)}function w$(){return Od(Jo,arguments)}const C$=["disabled","inputMode","maxlength","minlength","placeholder","readOnly","type","value"],Wr=r.defineComponent({__name:"FmTextField",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},prependIcon:{default:""},appendIcon:{default:""},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},invalid:{type:Boolean},modelValue:{},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue","focus-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.inject(me),s=r.computed(()=>o.disabled??(i==null?void 0:i.getDisabled())??!1),l=n,a=r.ref(null),d=X(o,"modelValue"),{isFocused:c,focus:u,blur:f}=un(),h=p=>{d.value=p.target.value};return e({focus:u}),(p,m)=>(r.openBlock(),r.createBlock(Fe,{modelValue:r.unref(d),"onUpdate:modelValue":m[2]||(m[2]=g=>r.isRef(d)?d.value=g:null),disabled:s.value,focused:r.unref(c),"helper-state":p.helperState,"helper-text":p.helperText,info:p.labelInfo,label:p.label,optional:p.labelMark==="optional",required:p.labelMark==="required",rules:p.rules},r.createSlots({default:r.withCtx(({invalid:g})=>[r.createVNode(ye,{"append-icon":p.appendIcon,focused:r.unref(c),invalid:p.invalid||g,"prepend-icon":p.prependIcon,"show-valid-border":p.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot(p.$slots,"prepend")]),append:r.withCtx(()=>[r.renderSlot(p.$slots,"append")]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:a,class:r.normalizeClass({"fm-text-field--input fm-typo-body-lg-400":!0,"text-fm-color-typo-primary":!s.value,"text-fm-color-typo-disabled":s.value}),disabled:s.value,inputMode:p.inputmode,maxlength:p.maxLength,minlength:p.minLength,placeholder:p.placeholder,readOnly:p.readonly,type:p.inputmode,value:r.unref(d),onBlur:m[0]||(m[0]=()=>{r.unref(f)(),l("focus-changed",!1)}),onFocus:m[1]||(m[1]=()=>{r.unref(u)(),l("focus-changed",!0)}),onInput:h},null,42,C$)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),_:2},[p.label||p.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(p.$slots,"label")]),key:"0"}:void 0,p.helperText||p.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(p.$slots,"helper-text")]),key:"1"}:void 0,p.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([s.value?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},r.toDisplayString(p.maxLength?`${r.unref(d).length} / ${p.maxLength}`:""),3)]),key:"2"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),k$="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-my'%20viewBox='0%200%20640%20480'%3e%3cg%20clip-path='url(%23my-a)'%3e%3cpath%20fill='%23C00'%20d='M0%200h640v480H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%200h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%2034.3h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%2068.6h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20102.9h640V137H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20137.1h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20171.4h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20205.7h640V240H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20240h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20274.3h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20308.6h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20342.9h640V377H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20377.1h640v34.3H0z'/%3e%3cpath%20fill='%23C00'%20d='M0%20411.4h640v34.3H0z'/%3e%3cpath%20fill='%23fff'%20d='M0%20445.7h640V480H0z'/%3e%3cpath%20fill='%23006'%20d='M0%20.5h320v274.3H0z'/%3e%3cpath%20fill='%23FC0'%20d='m207.5%2073.8%206%2040.7%2023-34-12.4%2039.2%2035.5-20.8-28.1%2030%2041-3.2-38.3%2014.8%2038.3%2014.8-41-3.2%2028.1%2030-35.5-20.8%2012.3%2039.3-23-34.1-6%2040.7-5.9-40.7-23%2034%2012.4-39.2-35.5%2020.8%2028-30-41%203.2%2038.4-14.8-38.3-14.8%2041%203.2-28.1-30%2035.5%2020.8-12.4-39.3%2023%2034.1zm-33.3%201.7a71.1%2071.1%200%200%200-100%2065%2071.1%2071.1%200%200%200%20100%2065%2080%2080%200%200%201-83.2%206.2%2080%2080%200%200%201-43.4-71.2%2080%2080%200%200%201%20126.6-65'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='my-a'%3e%3cpath%20fill='%23fff'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",x$="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20id='flag-icons-sg'%20viewBox='0%200%20640%20480'%3e%3cdefs%3e%3cclipPath%20id='sg-a'%3e%3cpath%20fill-opacity='.7'%20d='M0%200h640v480H0z'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20fill-rule='evenodd'%20clip-path='url(%23sg-a)'%3e%3cpath%20fill='%23fff'%20d='M-20%200h720v480H-20z'/%3e%3cpath%20fill='%23df0000'%20d='M-20%200h720v240H-20z'/%3e%3cpath%20fill='%23fff'%20d='M146%2040.2a84.4%2084.4%200%200%200%20.8%20165.2%2086%2086%200%200%201-106.6-59%2086%2086%200%200%201%2059-106c16-4.6%2030.8-4.7%2046.9-.2z'/%3e%3cpath%20fill='%23fff'%20d='m133%20110%204.9%2015-13-9.2-12.8%209.4%204.7-15.2-12.8-9.3%2015.9-.2%205-15%205%2015h15.8zm17.5%2052%205%2015.1-13-9.2-12.9%209.3%204.8-15.1-12.8-9.4%2015.9-.1%204.9-15.1%205%2015h16zm58.5-.4%204.9%2015.2-13-9.3-12.8%209.3%204.7-15.1-12.8-9.3%2015.9-.2%205-15%205%2015h15.8zm17.4-51.6%204.9%2015.1-13-9.2-12.8%209.3%204.8-15.1-12.9-9.4%2016-.1%204.8-15.1%205%2015h16zm-46.3-34.3%205%2015.2-13-9.3-12.9%209.4%204.8-15.2-12.8-9.4%2015.8-.1%205-15.1%205%2015h16z'/%3e%3c/g%3e%3c/svg%3e",S$={class:"flex gap-4"},v$=["alt","src"],M$=["alt","src"],D$=r.defineComponent({__name:"FmPhoneNumber",props:{modelValue:{},defaultCountry:{default:"MY"},placeholder:{default:""},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=r.inject(me),i=e,s=X(n,"modelValue"),l=r.computed(()=>n.disabled??(o==null?void 0:o.getDisabled())??!1),a=["MY","SG"],d=a.reduce((_,x)=>(_[x]=`+${w$(x)}`,_),{}),c=a.map(_=>({label:"",value:_}));function u(_){var x;return _?((x=Object.entries(d).find(([,$])=>_.startsWith($)))==null?void 0:x[0])??null:n.defaultCountry}const f=r.computed(()=>u(n.modelValue)),h=r.computed(()=>!f.value||!n.modelValue?d[n.defaultCountry]:n.modelValue),p=r.computed({get(){const _=jr(h.value);return _?_.formatInternational().replace(d[f.value],"").trim():h.value.replace(d[f.value],"").trim()},set(_){const x=`${d[f.value]}${_}`,$=jr(x);if(!$){s.value=x;return}s.value=$.formatInternational()}}),m=r.computed({get(){return f.value??n.defaultCountry},set(_){if(!f.value){i("update:modelValue",d[n.defaultCountry]);return}const $=d[f.value],w=d[_];s.value=h.value.replace($,w)}}),g=r.ref({dropdown:!1,textField:!1});function y(_){const x=f.value;if(!_.replace(d[x],"").trim().length)return!0;const w=jr(s.value,x);return!w||!w.isValid()?"Invalid phone number":!0}const b={MY:k$,SG:x$};return(_,x)=>(r.openBlock(),r.createBlock(Fe,{modelValue:r.unref(s),"onUpdate:modelValue":x[4]||(x[4]=$=>r.isRef(s)?s.value=$:null),disabled:l.value,focused:g.value.dropdown||g.value.textField,"helper-state":_.helperState,"helper-text":_.helperText,info:_.labelInfo,label:_.label,optional:_.labelMark==="optional",required:_.labelMark==="required",rules:[..._.rules,y],class:"flex gap-4"},r.createSlots({default:r.withCtx(({invalid:$})=>[r.createElementVNode("div",S$,[r.createVNode(Uo,{"model-value":m.value,"onUpdate:modelValue":x[0]||(x[0]=w=>m.value=w),disabled:l.value,items:r.unref(c),onDropdownChanged:x[1]||(x[1]=w=>g.value.dropdown=w)},{default:r.withCtx(()=>[r.createElementVNode("img",{alt:m.value,src:b[m.value],class:"h-auto w-[20px]"},null,8,v$)]),"menu-wrapper":r.withCtx(({handleItemChange:w})=>[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(a,P=>r.createVNode(De,{key:P,"model-value":m.value===P,"onUpdate:modelValue":M=>w(M,r.unref(c).find(N=>N.value===P))},{label:r.withCtx(()=>[r.createElementVNode("img",{alt:P,src:b[P],class:"h-auto w-[20px]"},null,8,M$)]),_:2},1032,["model-value","onUpdate:modelValue"])),64))]),_:1},8,["model-value","disabled","items"]),r.createVNode(Wr,{"model-value":p.value,"onUpdate:modelValue":x[2]||(x[2]=w=>p.value=w),disabled:l.value,invalid:$,class:"flex-1",inputmode:"tel",onFocusChanged:x[3]||(x[3]=w=>g.value.textField=w)},{prepend:r.withCtx(()=>[r.createElementVNode("span",{class:r.normalizeClass([l.value?"text-fm-color-typo-disabled":""])},"("+r.toDisplayString(r.unref(d)[f.value])+")",3)]),_:2},1032,["model-value","disabled","invalid"])])]),_:2},[_.label||_.$slots.label?{name:"label",fn:r.withCtx(()=>[r.renderSlot(_.$slots,"label")]),key:"0"}:void 0,_.helperText||_.$slots["helper-text"]?{name:"helper-text",fn:r.withCtx(()=>[r.renderSlot(_.$slots,"helper-text")]),key:"1"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),E$={class:"flex gap-8 items-center"},B$=["onInput","onKeydown"],V$=Z(r.defineComponent({__name:"FmPinField",props:{modelValue:{default:()=>[]},length:{default:6},type:{default:"number"}},emits:["update:modelValue","complete"],setup(t,{emit:e}){const n=e,o=t,i=X(o,"modelValue"),s=r.ref([]),l=(f,h)=>{const p=f.target;if(o.type==="number"&&!/^[0-9]$/g.test(p.value)){p.value="";return}p.value=p.value.slice(-1),c(p.value,h),s.value[h+1]?s.value[h+1].focus():s.value[h].blur()},a=(f,h)=>{f.preventDefault();const p=f.target;p.value="",c(null,h),s.value[h-1]?s.value[h-1].focus():s.value[h].focus()},d=(f,h)=>{f.preventDefault(),f.key==="ArrowLeft"&&(s.value[h-1]?s.value[h-1].focus():s.value[h].focus()),f.key==="ArrowRight"&&(s.value[h+1]?s.value[h+1].focus():s.value[h].focus())},c=(f,h)=>{i.value=i.value.toSpliced(h,1,f)},u=(f,h)=>{s.value[h]=f};return r.onMounted(()=>{i.value=Array.from(Array(o.length).fill(null))}),r.watch(()=>i.value,()=>{i.value.every(f=>f!==null)&&n("complete",i.value.join(""))}),(f,h)=>(r.openBlock(),r.createElementBlock("div",E$,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.length,(p,m)=>(r.openBlock(),r.createElementBlock("input",{key:p,ref_for:!0,ref:g=>u(g,m),class:r.normalizeClass(["fm-pin-field",{"fm-pin-field--populated":r.unref(i)[m]!==null}]),type:"text",onInput:g=>l(g,m),onKeydown:[r.withKeys(g=>a(g,m),["backspace"]),r.withKeys(g=>d(g,m),["arrow-left","arrow-right"])]},null,42,B$))),128))]))}}),[["__scopeId","data-v-45a53bf7"]]),P$={class:"fm-radio-btn"},F$={class:"fm-radio-btn__input--container"},R$=["checked","disabled","value"],N$={class:"py-8"},A$={class:"fm-typo-body-lg-400"},O$={key:0,class:"fm-typo-body-md-400 text-fm-color-typo-secondary"},I$=Z(r.defineComponent({__name:"FmRadio",props:{modelValue:{default:null},value:{},label:{default:""},sublabel:{default:""},disabled:{type:Boolean,default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=X(e,"modelValue"),o=r.ref(),i=r.inject(Bs,null),s=r.inject(me),l=()=>{a.value||(i?i.updateValue(e.value):n.value=e.value)},a=r.computed(()=>e.disabled??(i==null?void 0:i.getDisabled())??(s==null?void 0:s.getDisabled())??!1),d=r.computed(()=>i?e.value===i.groupValue.value:n.value===e.value);return(c,u)=>{const f=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",P$,[r.createElementVNode("label",{class:r.normalizeClass({"fm-radio-btn--wrapper":!0,"cursor-not-allowed text-fm-color-typo-disabled":a.value,"cursor-pointer":!a.value}),onClick:l},[r.withDirectives((r.openBlock(),r.createElementBlock("div",F$,[r.createElementVNode("input",{ref_key:"inputEl",ref:o,checked:d.value,disabled:a.value,value:c.value,class:"fm-radio-btn__input--btn",type:"radio"},null,8,R$)])),[[f,!a.value]]),r.createElementVNode("div",N$,[r.renderSlot(c.$slots,"label",{},()=>[r.createElementVNode("div",A$,r.toDisplayString(c.label),1),c.sublabel?(r.openBlock(),r.createElementBlock("div",O$,r.toDisplayString(c.sublabel),1)):r.createCommentVNode("",!0)],!0)])],2)])}}}),[["__scopeId","data-v-5d4cbf27"]]),T$=r.defineComponent({__name:"FmRadioGroup",props:{modelValue:{},inline:{type:Boolean,default:!1},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[t=>!!t||"This field is required"]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=X(e,"modelValue"),o=r.inject(me);r.provide(Bs,{groupValue:n,getDisabled:()=>i.value,updateValue(s){n.value=s}});const i=r.computed(()=>e.disabled??(o==null?void 0:o.getDisabled())??!1);return(s,l)=>(r.openBlock(),r.createBlock(Fe,{modelValue:r.unref(n),"onUpdate:modelValue":l[0]||(l[0]=a=>r.isRef(n)?n.value=a:null),disabled:i.value,"helper-state":s.helperState,"helper-text":s.helperText,info:s.labelInfo,label:s.label,optional:s.labelMark==="optional",required:s.labelMark==="required",rules:s.rules},{label:r.withCtx(()=>[r.renderSlot(s.$slots,"label")]),default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass({"flex items-center gap-16 justify-start":s.inline})},[r.renderSlot(s.$slots,"default")],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(s.$slots,"helper-text")]),_:3},8,["modelValue","disabled","helper-state","helper-text","info","label","optional","required","rules"]))}}),Yr=r.defineComponent({__name:"FmSearch",props:{placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},inputmode:{default:"text"},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},showWordCount:{type:Boolean,default:!1},collapsible:{type:Boolean,default:!1},maxWidth:{default:void 0},modelValue:{},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},setup(t){const e=t,n=r.inject(me),o=r.computed(()=>{const{modelValue:h,disabled:p,...m}=e;return m}),i=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),s=X(e,"modelValue"),l=r.ref(!1),a=r.ref(),d=r.ref(e.collapsible),c=r.ref(e.collapsible);function u(){d.value=!1,r.nextTick(()=>{var h,p,m,g;(g=(m=(p=(h=a.value)==null?void 0:h.querySelector)==null?void 0:p.call(h,"input"))==null?void 0:m.focus)==null||g.call(m)})}function f(h){if(l.value=h,!!e.collapsible){if(h){c.value=!1;return}d.value=s.value.length===0,d.value&&setTimeout(()=>{c.value=!0},250)}}return(h,p)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"componentRoot",ref:a,class:"flex items-center justify-end min-w-48 relative"},[r.createVNode(Wr,r.mergeProps({modelValue:r.unref(s),"onUpdate:modelValue":p[1]||(p[1]=m=>r.isRef(s)?s.value=m:null),class:["transition-all",{"opacity-100":!h.collapsible||!d.value,"opacity-0 pointer-events-none":h.collapsible&&d.value}],disabled:i.value||h.collapsible&&d.value,style:{width:h.collapsible&&d.value?"24px":"100%"}},o.value,{onFocusChanged:f}),r.createSlots({_:2},[l.value?void 0:{name:"prepend",fn:r.withCtx(()=>[r.createVNode(j,{name:"search"})]),key:"0"},r.unref(s).length?{name:"append",fn:r.withCtx(()=>[r.createVNode(j,{class:"cursor-pointer text-fm-color-neutral-gray-300",name:"close",onClick:p[0]||(p[0]=m=>s.value="")})]),key:"1"}:void 0]),1040,["modelValue","class","disabled","style"]),h.collapsible?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["absolute top-0 right-0",d.value?"opacity-100":"opacity-0 pointer-events-none"]),style:r.normalizeStyle({transition:"opacity 150ms",transitionTimingFunction:d.value?"cubic-bezier(.95,-0.01,.82,.6)":"ease-out"})},[r.createVNode(K,{icon:"search",variant:"tertiary",onClick:u})],6)):r.createCommentVNode("",!0)],512))}}),z$={key:0,class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},L$={key:0},H$={class:"overflow-y-auto"},j$={key:1,class:"flex gap-8 items-center"},bc=Z(r.defineComponent({__name:"FmTopSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},fullscreenSize:{default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=X(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=s=>n.value=!0)},[r.renderSlot(o.$slots,"top-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(cn,{key:0,"dismiss-away":e.dismissAway,onClose:i[1]||(i[1]=s=>n.value=!1)},{default:r.withCtx(()=>[r.createVNode(r.Transition,{name:o.fullscreenSize?`slide-${o.fullscreenSize}`:"slide",appear:""},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["fm-top-sheet",`fm-top-sheet--fullscreen-${o.fullscreenSize}`])},[o.header||o.$slots["top-sheet-header"]?(r.openBlock(),r.createElementBlock("div",z$,[r.renderSlot(o.$slots,"top-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",L$,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0)])):r.createCommentVNode("",!0),r.createElementVNode("div",H$,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),o.$slots["top-sheet-footer"]?(r.openBlock(),r.createElementBlock("div",j$,[r.renderSlot(o.$slots,"top-sheet-footer",{},void 0,!0)])):r.createCommentVNode("",!0)],2)]),_:3},8,["name"])]),_:3},8,["dismiss-away"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-c5842b2d"]]);var Ur={exports:{}};function $c(t,e=100,n={}){if(typeof t!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof t}\`.`);if(e<0)throw new RangeError("`wait` must not be negative.");const{immediate:o}=typeof n=="boolean"?{immediate:n}:n;let i,s,l,a,d;function c(){const f=Date.now()-a;if(f<e&&f>=0)l=setTimeout(c,e-f);else if(l=void 0,!o){const h=i,p=s;i=void 0,s=void 0,d=t.apply(h,p)}}const u=function(...f){if(i&&this!==i)throw new Error("Debounced method called with different contexts.");i=this,s=f,a=Date.now();const h=o&&!l;if(l||(l=setTimeout(c,e)),h){const p=i,m=s;i=void 0,s=void 0,d=t.apply(p,m)}return d};return u.clear=()=>{l&&(clearTimeout(l),l=void 0)},u.flush=()=>{if(!l)return;const f=i,h=s;i=void 0,s=void 0,d=t.apply(f,h),clearTimeout(l),l=void 0},u}Ur.exports.debounce=$c,Ur.exports=$c;var W$=Ur.exports;const Gr=yr(W$);var _c={exports:{}};(function(t,e){(function(){var n={};t.exports=n,n.simpleFilter=function(o,i){return i.filter(function(s){return n.test(o,s)})},n.test=function(o,i){return n.match(o,i)!==null},n.match=function(o,i,s){s=s||{};var l=0,a=[],d=i.length,c=0,u=0,f=s.pre||"",h=s.post||"",p=s.caseSensitive&&i||i.toLowerCase(),m;o=s.caseSensitive&&o||o.toLowerCase();for(var g=0;g<d;g++)m=i[g],p[g]===o[l]?(m=f+m+h,l+=1,u+=1+u):u=0,c+=u,a[a.length]=m;return l===o.length?(c=p===o?1/0:c,{rendered:a.join(""),score:c}):null},n.filter=function(o,i,s){return!i||i.length===0?[]:typeof o!="string"?i:(s=s||{},i.reduce(function(l,a,d,c){var u=a;s.extract&&(u=s.extract(a));var f=n.match(o,u,s);return f!=null&&(l[l.length]={string:f.rendered,score:f.score,index:d,original:a}),l},[]).sort(function(l,a){var d=a.score-l.score;return d||l.index-a.index}))}})()})(_c);var Y$=_c.exports;const U$=yr(Y$);function ei(t,e){const[n]=U$.filter(t.toLocaleLowerCase(),[e],{pre:"|",post:"|",extract(i){return i.toLocaleLowerCase()}});if(!n)return{label:e,segments:[{segment:e,isMatch:!1}],matched:!1};const o=n.string.toString().replace(/\|\|/g,"").split("|").reduce((i,s,l)=>(i.push({segment:s,isMatch:l%2!==0}),i),new Array);return{label:e,segments:o,matched:!0}}const G$={class:"flex flex-col gap-4"},q$={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},X$={class:"hidden sm:inline xs:inline"},K$={key:0},Z$={key:0,class:"flex flex-col"},J$={class:"flex flex-col"},Q$={class:"flex items-center px-24 py-12"},e3=r.createElementVNode("div",{class:"fm-typo-body-md-400 text-fm-color-typo-secondary"}," Recent search ",-1),t3=r.createElementVNode("div",{class:"py-4"},[r.createElementVNode("hr",{class:"border-fm-color-neutral-gray-100"})],-1),n3=["onClick"],o3={class:"fm-typo-body-lg-400 text-fm-color-typo-primary"},i3={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},r3={class:"fm-typo-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},s3={key:3,class:"flex flex-col"},l3=["onClick"],a3={class:"flex flex-col gap-4"},d3={key:0,class:"text-fm-color-typo-secondary"},c3={class:"px-16 py-4"},u3=5,f3=r.defineComponent({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(t,{emit:e}){const n=t,o=e;function i(){if(!n.recentSearchKey)return;const V=n.recentSearchKey;localStorage.removeItem(V),a.value=[]}function s(){if(!n.recentSearchKey)return;const V=n.recentSearchKey,B=localStorage.getItem(V);if(!B)return[];try{return JSON.parse(B)}catch{return new Array}}const l=Gr(function(B){if(!n.recentSearchKey)return;const k=n.recentSearchKey,C=B().trim();if(!k||!C)return;const E=s()??[],v=[...new Set([C,...E])].slice(0,u3),D=JSON.stringify(v);return localStorage.setItem(k,D),a.value=v,v},800),a=r.ref(s()),d=X(n,"show");r.watch([()=>n.show],()=>{n.show?(f.value=null,n.suggestions&&_()):o("dismiss")});const c=X(n,"modelValue"),u=r.ref(n.modelValue);r.watch([()=>u.value],()=>{$()});const f=r.ref(null),h=r.ref(!0),p=r.computed(()=>{var V;return h.value?(V=f.value)==null?void 0:V.slice(0,5):f.value});r.watch([()=>f.value],([])=>{h.value=!0});const m=r.computed(()=>f.value===null),g=r.ref(!1),y=r.ref(""),b=()=>u.value;async function _(){if(!d.value)return;const V=b();if(!V)return;const B=Math.random().toString();if(y.value=B,n.suggestions){f.value=n.suggestions.map(k=>({label:ei(V,k.label),sublabel:k.sublabel?ei(V,k.sublabel):null})).filter(k=>{var C;return k.label.matched||((C=k.sublabel)==null?void 0:C.matched)}),l(b);return}if(n.onSearch)try{g.value=!0;const k=await n.onSearch(V);B===y.value&&(f.value=k.map(C=>({label:ei(V,C.label),sublabel:C.sublabel?ei(V,C.sublabel):null})))}catch{B===y.value&&(f.value=[])}finally{B===y.value&&(g.value=!1,l(b))}}function x(V){d.value=!1,o("dismiss"),c.value=V}const $=Gr(_),w=r.computed(()=>a.value&&a.value.length===0),P=r.computed(()=>(!u.value||m.value)&&!w.value),M=r.computed(()=>(!u.value||m.value)&&w.value),N=r.computed(()=>u.value&&f.value&&f.value.length===0);return(V,B)=>(r.openBlock(),r.createBlock(bc,{"model-value":r.unref(d),"onUpdate:modelValue":B[4]||(B[4]=k=>r.isRef(d)?d.value=k:null),"fullscreen-size":"sm","dismiss-away":""},{default:r.withCtx(()=>{var k,C;return[r.createElementVNode("div",G$,[r.createElementVNode("div",q$,[r.createElementVNode("div",X$,[r.createVNode(K,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:B[0]||(B[0]=E=>d.value=!1)})]),r.createVNode(Yr,{"model-value":u.value,"onUpdate:modelValue":B[1]||(B[1]=E=>u.value=E),class:"flex-1",placeholder:V.placeholder},null,8,["model-value","placeholder"])]),g.value?(r.openBlock(),r.createElementBlock("div",K$,[r.createVNode(Ut,{size:"xl"})])):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[P.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[V.recentSearchKey&&((k=a.value)!=null&&k.length)?(r.openBlock(),r.createElementBlock("div",Z$,[r.createElementVNode("div",J$,[r.createElementVNode("div",Q$,[e3,r.createVNode(mt),r.createVNode(K,{label:"Clear history",variant:"plain",size:"md",onClick:B[2]||(B[2]=E=>i())})]),t3]),r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(E,v)=>(r.openBlock(),r.createElementBlock("div",{key:v,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:D=>u.value=E},[r.createVNode(j,{size:"lg",name:"history"}),r.createElementVNode("div",o3,r.toDisplayString(E),1)],8,n3))),128))])])):r.createCommentVNode("",!0)],64)):M.value?r.renderSlot(V.$slots,"hint-placeholder",{key:1},()=>[r.createElementVNode("div",i3,r.toDisplayString(V.hintPlaceholder),1)]):N.value?r.renderSlot(V.$slots,"not-found-placeholder",{key:2},()=>[r.createElementVNode("div",r3,r.toDisplayString(V.notFoundPlaceholder||`No result found for “${u.value}”`),1)]):(r.openBlock(),r.createElementBlock("div",s3,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.value,(E,v)=>r.renderSlot(V.$slots,"search-result-item",r.mergeProps({key:v},{result:E}),()=>[r.createElementVNode("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:D=>x(E.label.label)},[r.createVNode(j,{size:"lg",name:"arrow_forward"}),r.createElementVNode("div",a3,[r.createElementVNode("div",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(E.label.segments,(D,S)=>(r.openBlock(),r.createElementBlock("span",{key:S,class:r.normalizeClass({"fm-typo-body-lg-400":!D.isMatch,"fm-typo-body-lg-700":D.isMatch})},r.toDisplayString(D.segment),3))),128))]),E.sublabel?(r.openBlock(),r.createElementBlock("div",d3,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(E.sublabel.segments,(D,S)=>(r.openBlock(),r.createElementBlock("span",{key:S,class:r.normalizeClass({"fm-typo-body-md-400":!D.isMatch,"fm-typo-body-md-700":D.isMatch})},r.toDisplayString(D.segment),3))),128))])):r.createCommentVNode("",!0)])],8,l3)])),128)),r.createElementVNode("div",c3,[h.value&&(((C=f.value)==null?void 0:C.length)??0)>5?(r.openBlock(),r.createBlock(K,{key:0,label:`show ${f.value.length-5} more results`,variant:"plain",onClick:B[3]||(B[3]=E=>h.value=!1)},null,8,["label"])):r.createCommentVNode("",!0)])]))],64))])]}),_:3},8,["model-value"]))}}),h3=["inputMode","placeholder","readOnly","value"],p3={key:0},m3=Z(r.defineComponent({__name:"FmStepperField",props:{modelValue:{},placeholder:{default:""},inputmode:{default:"numeric"},readonly:{type:Boolean},labelMark:{default:"none"},step:{default:1},min:{default:void 0},max:{default:void 0},prependIcon:{default:""},appendIcon:{default:""},isCurrency:{type:Boolean,default:!1},showSteppers:{type:Boolean,default:!0},showValidBorder:{type:Boolean,default:!1},prependText:{default:""},appendText:{default:""},labelInfo:{default:""},useGrouping:{type:Boolean,default:!0},minFractionDigits:{default:0},maxFractionDigits:{default:2},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(me),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=X(e,"modelValue"),{isFocused:s,blur:l,focus:a}=un(),d=r.ref(null);let c;const u=$=>{if($!==""){const w=+$.replace(/,/g,"");return isNaN(w)?null:w}return null},f=$=>c.format($),h=$=>{if(typeof i.value!="number"){i.value=+i.value;return}if($>0&&b.value||$<0&&_.value)return;let w=x(i.value)?i.value+$:0;w=p(w),i.value=w},p=$=>e.max!==void 0&&$>e.max?e.max:e.min!==void 0&&$<e.min?e.min:$,m=()=>{var $;i.value=u((($=d.value)==null?void 0:$.value)??"")},g=$=>{if(![...Array(10).keys()].map(w=>w.toString()).includes($.key)&&!["Backspace","Tab","Enter",".","-","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes($.key)){$.preventDefault();return}},y=r.computed(()=>i.value!=null?f(i.value):""),b=r.computed(()=>{let $=!1;return e.max!==void 0&&($=i.value>=e.max),e.min!==void 0&&($=i.value<e.min),$}),_=r.computed(()=>{let $=!1;return e.max!==void 0&&($=i.value>e.max),e.min!==void 0&&($=i.value<=e.min),$});r.onBeforeMount(()=>{c=new Intl.NumberFormat("en-MY",{useGrouping:e.useGrouping,minimumFractionDigits:e.minFractionDigits,maximumFractionDigits:e.maxFractionDigits,roundingMode:"trunc"})});function x($){return typeof $=="number"&&isFinite($)}return($,w)=>(r.openBlock(),r.createBlock(Fe,{modelValue:r.unref(i),"onUpdate:modelValue":w[8]||(w[8]=P=>r.isRef(i)?i.value=P:null),disabled:o.value,focused:r.unref(s),"helper-state":$.helperState,"helper-text":$.helperText,info:$.labelInfo,label:$.label,optional:$.labelMark==="optional",required:$.labelMark==="required",rules:$.rules},{label:r.withCtx(()=>[r.renderSlot($.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:P})=>[r.createVNode(ye,{"append-icon":$.appendIcon,focused:r.unref(s),invalid:P,"prepend-icon":$.prependIcon,"show-valid-border":$.showValidBorder,class:"cursor-text"},{prepend:r.withCtx(()=>[r.renderSlot($.$slots,"prepend",{},void 0,!0)]),append:r.withCtx(()=>[r.renderSlot($.$slots,"append",{},()=>[r.createElementVNode("div",{class:r.normalizeClass([{"mr-32":$.showSteppers},"flex items-center justify-center"])},[$.appendText?(r.openBlock(),r.createElementBlock("div",p3,r.toDisplayString($.appendText),1)):r.createCommentVNode("",!0),$.appendIcon?(r.openBlock(),r.createBlock(j,{key:1,color:o.value?"#C7C7CC":"#1C1C1E",name:$.appendIcon,size:"md"},null,8,["color","name"])):r.createCommentVNode("",!0)],2)],!0),$.showSteppers?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["fm-stepper-field__stepper__container",r.unref(s)?"right-[6px]":"right-[7px]"])},[r.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"0",type:"button",onBlur:w[2]||(w[2]=(...M)=>r.unref(l)&&r.unref(l)(...M)),onFocus:w[3]||(w[3]=(...M)=>r.unref(a)&&r.unref(a)(...M)),onMousedown:w[4]||(w[4]=()=>h($.step))},[r.createVNode(j,{color:o.value||b.value?"#C7C7CC":"#1C1C1E",name:"expand_less",size:"md"},null,8,["color"])],32),r.createElementVNode("button",{class:"fm-stepper-field__stepper__item",tabindex:"1",type:"button",onBlur:w[5]||(w[5]=(...M)=>r.unref(l)&&r.unref(l)(...M)),onFocus:w[6]||(w[6]=(...M)=>r.unref(a)&&r.unref(a)(...M)),onMousedown:w[7]||(w[7]=()=>h(-$.step))},[r.createVNode(j,{color:o.value||_.value?"#C7C7CC":"#1C1C1E",name:"expand_more",size:"md"},null,8,["color"])],32)],2)):r.createCommentVNode("",!0)]),default:r.withCtx(()=>[r.createElementVNode("input",{ref_key:"inputEl",ref:d,inputMode:$.inputmode,placeholder:$.placeholder,readOnly:$.readonly,value:y.value,class:"fm-stepper-field--input",type:"text",onBlur:w[0]||(w[0]=(...M)=>r.unref(l)&&r.unref(l)(...M)),onFocus:w[1]||(w[1]=(...M)=>r.unref(a)&&r.unref(a)(...M)),onInput:m,onKeydown:g},null,40,h3)]),_:2},1032,["append-icon","focused","invalid","prepend-icon","show-valid-border"])]),"helper-text":r.withCtx(()=>[r.renderSlot($.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-a6c24684"]]),g3=["disabled","maxlength","minlength","placeholder","readOnly","value"],y3=Z(r.defineComponent({__name:"FmTextarea",props:{modelValue:{default:""},placeholder:{default:""},minLength:{default:0},maxLength:{default:NaN},readonly:{type:Boolean,default:!1},labelMark:{default:"none"},showSuccess:{type:Boolean,default:!1},showValidBorder:{type:Boolean,default:!1},labelInfo:{default:""},helperText:{default:""},helperState:{default:"none"},showWordCount:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(me),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=X(e,"modelValue"),{isFocused:s,focus:l,blur:a}=un(),d=c=>{i.value=c.target.value};return(c,u)=>(r.openBlock(),r.createBlock(Fe,{modelValue:r.unref(i),"onUpdate:modelValue":u[2]||(u[2]=f=>r.isRef(i)?i.value=f:null),disabled:o.value,focused:r.unref(s),"helper-state":c.helperState,"helper-text":c.helperText,info:c.labelInfo,label:c.label,optional:c.labelMark==="optional",required:c.labelMark==="required",rules:c.rules},r.createSlots({label:r.withCtx(()=>[r.renderSlot(c.$slots,"label",{},void 0,!0)]),default:r.withCtx(({invalid:f})=>[r.createElementVNode("div",{class:r.normalizeClass({"fm-textarea__container":!0,"fm-textarea__container--focused":r.unref(s),"fm-textarea__container--invalid":!!r.unref(i)&&f,"fm-textarea__container--valid":c.showValidBorder&&c.showSuccess&&!!r.unref(i)&&!f,"fm-textarea__container--disabled":o.value})},[r.createElementVNode("textarea",{class:r.normalizeClass({"fm-textarea--input fm-typo-body-lg-400":!0,"fm-color-typo-primary":!o.value,"fm-color-typo-disabled":o.value}),disabled:o.value,maxlength:c.maxLength,minlength:c.minLength,placeholder:c.placeholder,readOnly:c.readonly,value:r.unref(i),onBlur:u[0]||(u[0]=(...h)=>r.unref(a)&&r.unref(a)(...h)),onFocus:u[1]||(u[1]=(...h)=>r.unref(l)&&r.unref(l)(...h)),onInput:d},null,42,g3)],2)]),"helper-text":r.withCtx(()=>[r.renderSlot(c.$slots,"helper-text",{},void 0,!0)]),_:2},[c.showWordCount?{name:"helper-append",fn:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([o.value?"fm-color-typo-disabled":"text-fm-color-typo-secondary","fm-typo-body-sm-400"])},r.toDisplayString(c.maxLength?`${r.unref(i).length} / ${c.maxLength}`:""),3)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),[["__scopeId","data-v-8e783d76"]]),b3={class:"flex flex-col fm-time-input items-center"},$3=["value"],wc=Z(r.defineComponent({__name:"TimeInput",props:{modelValue:{type:String,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0}},emits:["update:model-value","update:cycle"],setup(t,{emit:e}){const n=t,o=e,i=r.ref();function s(u){i.value&&(i.value.value=u)}r.watch(()=>n.modelValue,s);function l(){if(!i.value)return;const u=a(i.value.value);if(u==null||u>n.max||u<n.min){s(n.modelValue);return}o("update:model-value",u)}function a(u){return u&&/^\d+$/.test(u)?Number(u):null}function d(){o("update:model-value",a(n.modelValue)+1)}function c(){o("update:model-value",a(n.modelValue)-1)}return(u,f)=>(r.openBlock(),r.createElementBlock("div",b3,[r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:d},[r.createVNode(j,{name:"expand_less",size:"lg"})]),r.createElementVNode("input",{ref_key:"inputRef",ref:i,value:n.modelValue,onInput:l},null,40,$3),r.createElementVNode("div",{class:"fm-time-input__scroller",onClick:c},[r.createVNode(j,{name:"expand_more",size:"lg"})])]))}}),[["__scopeId","data-v-e8ddb125"]]);var Ke=(t=>(t.AM="AM",t.PM="PM",t))(Ke||{});function Ze(t){return t.toString().padStart(2,"0")}function _3(t){const[e,n]=t.split(":"),o=Number(e),i=Number(n),s=o>11?"PM":"AM";let l=o;return l===0?l=12:l>12&&(l-=12),`${Ze(l)}:${Ze(i)}:${s}`}function Ee(t){const[e,n,o]=_3(t).split(":");return{hours:Number(e),minutes:Number(n),period:o}}function qr({hours:t,minutes:e,period:n}){let o=t;return n==="PM"?o=t===12?t:t+12:t===12&&(o=0),`${Ze(o)}:${Ze(e)}`}const w3={class:"flex fm-time-input gap-16 items-center"},C3=r.createElementVNode("div",{class:"fm-typo-title-sm-700"}," : ",-1),k3={class:"fm-time-input-periods"},x3=["onClick"],ti=r.defineComponent({__name:"FmTimeInput",props:{modelValue:{type:Object,required:!0}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e;function i(s){const l={hours:s.hours??n.modelValue.hours,minutes:s.minutes??n.modelValue.minutes,period:s.period??n.modelValue.period},a=n.modelValue.hours;(a===12&&l.hours===11||a===11&&l.hours===12)&&(l.period=n.modelValue.period===Ke.AM?Ke.PM:Ke.AM),l.hours>12?l.hours=1:l.hours<1&&(l.hours=12),l.minutes>59?l.minutes=0:l.minutes<0&&(l.minutes=59),o("update:model-value",l)}return(s,l)=>(r.openBlock(),r.createElementBlock("div",w3,[r.createVNode(wc,{"model-value":r.unref(Ze)(t.modelValue.hours),min:1,max:12,"onUpdate:modelValue":l[0]||(l[0]=a=>i({hours:a}))},null,8,["model-value"]),C3,r.createVNode(wc,{"model-value":r.unref(Ze)(t.modelValue.minutes),min:0,max:59,"onUpdate:modelValue":l[1]||(l[1]=a=>i({minutes:a}))},null,8,["model-value"]),r.createElementVNode("div",k3,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(Ke),a=>(r.openBlock(),r.createElementBlock("div",{key:a,class:r.normalizeClass([{"fm-time-input-period__selected":a===t.modelValue.period},"bg-fm-color-neutral-gray-100 fm-time-input-period"]),onClick:()=>i({period:a})},r.toDisplayString(a),11,x3))),128))])]))}});function S3(t){for(;t;){if(v3(t))return t;t=t.parentElement}return document.scrollingElement}function v3(t){if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;const e=window.getComputedStyle(t);return e.overflowY==="scroll"||e.overflowY==="auto"&&t.scrollHeight>t.clientHeight}class M3{constructor(e,n){I(this,"onScroll");I(this,"scrollParent");this.onScroll=n,this.scrollParent=S3(e)}bindScroll(){this.scrollParent.addEventListener("scroll",this.onScroll)}unbindScroll(){this.scrollParent.removeEventListener("scroll",this.onScroll)}}const D3={class:"fm-menu__wrapper"},Cc=Z(r.defineComponent({__name:"FmMenuDeprecated",props:{showMenu:{type:Boolean,default:!1},placement:{default:"bottom-start"},disabled:{type:Boolean,default:!1}},emits:["dropdown-changed"],setup(t,{expose:e,emit:n}){const o=t,i=r.ref(!1),s=r.ref(null),l=r.ref(null),{floatingStyles:a}=Un(s,l,{middleware:[Ln(4),Yn()],placement:o.placement,whileElementsMounted:Wn});let d;const c=n;e({show:()=>{i.value||(i.value=!0,c("dropdown-changed",i.value))},hide:()=>{i.value&&(i.value=!1,c("dropdown-changed",i.value))}});const u=p=>{p.preventDefault(),p.stopPropagation(),!o.disabled&&(i.value=!i.value,c("dropdown-changed",i.value))},f=p=>{if(!i.value)return;const m=p.path||p.composedPath();for(const g of m)if(g==s.value||g==l.value)return;i.value=!1,c("dropdown-changed",i.value)},h=()=>{c("dropdown-changed",!1)};return r.watch(()=>o.showMenu,p=>i.value=p),r.onMounted(()=>{i.value=o.showMenu,window.addEventListener("click",f),d=new M3(s.value,h),d.bindScroll()}),r.onUnmounted(()=>{window.removeEventListener("click",f),d.unbindScroll()}),(p,m)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{ref_key:"anchorEl",ref:s,class:"fm-menu",onClick:u},[r.renderSlot(p.$slots,"menu-button",{},void 0,!0)],512),i.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"menuEl",ref:l,class:r.normalizeClass({"fm-menu__content":!0,"fm-menu__content--opened":i.value}),style:r.normalizeStyle(r.unref(a))},[r.renderSlot(p.$slots,"menu-wrapper",{},()=>[r.createElementVNode("div",D3,[r.renderSlot(p.$slots,"menu-content",{},void 0,!0)])],!0)],6)):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-5b19ece2"]]),E3={class:"flex gap-8"},B3={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300 w-[343px]"},V3=r.createElementVNode("div",{class:"fm-typo-title-sm-700 mb-8"},"Enter time",-1),P3={class:"flex items-center justify-center py-16 w-full"},F3={class:"flex justify-end"},R3=r.defineComponent({__name:"FmTimePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(me),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=X(e,"modelValue"),s=r.ref(null),l=r.computed(()=>{if(!i.value)return null;const{hours:h,minutes:p,period:m}=Ee(i.value);return`${Ze(h)}:${Ze(p)} ${m}`});function a(){if(!s.value){i.value=null;return}const h=qr(s.value);i.value=h,c()}r.onMounted(()=>{i.value&&(s.value=Ee(i.value))}),r.watch(()=>i.value,h=>{h&&(s.value=Ee(h))});const d=r.ref();function c(){var h;(h=d.value)==null||h.hide()}const u=r.ref(!1);function f(h){o.value||(h?s.value=Ee(i.value??"00:00"):s.value=i.value?Ee(i.value):null,u.value=h)}return(h,p)=>(r.openBlock(),r.createBlock(Fe,{modelValue:r.unref(i),"onUpdate:modelValue":p[1]||(p[1]=m=>r.isRef(i)?i.value=m:null),disabled:o.value,focused:u.value,"helper-state":h.helperState,"helper-text":h.helperText,info:h.labelInfo,label:h.label,optional:h.labelMark==="optional",required:h.labelMark==="required",rules:h.rules},{label:r.withCtx(()=>[r.renderSlot(h.$slots,"label")]),default:r.withCtx(({invalid:m})=>[r.createVNode(Cc,{ref_key:"dropdownRef",ref:d,onDropdownChanged:f},{"menu-button":r.withCtx(()=>[r.createVNode(ye,{class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:u.value,invalid:m,"show-valid-border":h.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",E3,[r.createVNode(j,{outline:!u.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!l.value},"grow"])},r.toDisplayString(l.value??h.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),"menu-wrapper":r.withCtx(()=>[r.createElementVNode("div",B3,[V3,r.createElementVNode("div",P3,[r.createVNode(ti,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(Ke).AM},"onUpdate:modelValue":p[0]||(p[0]=g=>s.value=g)},null,8,["model-value"])]),r.createElementVNode("div",F3,[r.createVNode(K,{label:"Cancel",size:"md",variant:"tertiary",onClick:c}),r.createVNode(K,{label:"Apply",size:"md",variant:"primary",onClick:a})])])]),_:2},1536)]),"helper-text":r.withCtx(()=>[r.renderSlot(h.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),N3={class:"flex gap-8"},A3={class:"bg-fm-color-neutral-white flex flex-col px-24 py-16 rounded-lg shadow-light-300"},O3=r.createElementVNode("div",{class:"fm-typo-title-sm-700 mb-8"},"Enter time",-1),I3={class:"flex flex-col gap-16 items-center justify-center py-16 w-full"},T3=r.createElementVNode("div",{class:"fm-typo-body-lg-700 text-left w-full"}," Starting Time ",-1),z3=r.createElementVNode("div",{class:"fm-typo-body-lg-700 text-left w-full"}," Ending Time ",-1),L3={class:"flex gap-8 items-center justify-end"},H3=r.defineComponent({__name:"FmTimeRangePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},placeholder:{default:"HH:MM"},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(t){const e=t,n=r.inject(me),o=r.computed(()=>e.disabled??(n==null?void 0:n.getDisabled())??!1),i=X(e,"modelValue"),s=r.ref(null),l=r.ref(null),a=r.computed(()=>{const g=Array.isArray(i.value);return!i.value||!g||g&&i.value.every(y=>!p(y))?null:i.value.map(y=>{const{hours:b,minutes:_,period:x}=Ee(y);return`${Ze(b)}:${Ze(_)} ${x}`}).join(" - ")});function d(){if(!s.value||!l.value){i.value=null;return}let g=!1;const y=s.value,b=l.value;(y.period===Ke.PM&&b.period===Ke.AM||y.period===b.period&&(y.hours<b.hours||y.minutes<b.minutes))&&(g=!0);const _=qr(s.value),x=qr(l.value);i.value=g?[x,_]:[_,x],u()}r.onMounted(()=>{Array.isArray(i.value)&&i.value.every(g=>!!g)&&(s.value=Ee(i.value[0]),l.value=Ee(i.value[1]))}),r.watch(()=>i.value,g=>{const y=Array.isArray(g);g&&y&&g.every(b=>p(b))&&(s.value=Ee(g[0]),l.value=Ee(g[1]))});const c=r.ref();function u(){var g;(g=c.value)==null||g.hide()}const f=r.ref(!1);function h(g){var y,b,_,x;g?(s.value=Ee(((_=i.value)==null?void 0:_[0])??"00:00"),l.value=Ee(((x=i.value)==null?void 0:x[1])??"23:59")):(s.value=(y=i.value)!=null&&y[0]?Ee(i.value[0]):null,l.value=(b=i.value)!=null&&b[1]?Ee(i.value[1]):null),f.value=g}const p=g=>/^(?:[01]\d|2[0-3]):[0-5]\d$/.test(g),m=r.computed(()=>we(s.value,l.value));return(g,y)=>(r.openBlock(),r.createBlock(Fe,{modelValue:r.unref(i),"onUpdate:modelValue":y[2]||(y[2]=b=>r.isRef(i)?i.value=b:null),disabled:o.value,focused:f.value,"helper-state":g.helperState,"helper-text":g.helperText,info:g.labelInfo,label:g.label,optional:g.labelMark==="optional",required:g.labelMark==="required",rules:g.rules},{label:r.withCtx(()=>[r.renderSlot(g.$slots,"label")]),default:r.withCtx(({invalid:b})=>[r.createVNode(Mr,{ref_key:"dropdownRef",ref:c,width:343,onPopoverChanged:h},{"popover-button":r.withCtx(()=>[r.createVNode(ye,{class:r.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer"),focused:f.value,invalid:b,"show-valid-border":g.showValidBorder},{default:r.withCtx(()=>[r.createElementVNode("div",N3,[r.createVNode(j,{outline:!f.value,name:"schedule"},null,8,["outline"]),r.createElementVNode("div",{class:r.normalizeClass([{"text-fm-color-typo-disabled":!a.value},"grow"])},r.toDisplayString(a.value??g.placeholder??"HH:MM"),3)])]),_:2},1032,["class","focused","invalid","show-valid-border"])]),default:r.withCtx(()=>[r.createElementVNode("div",A3,[O3,r.createElementVNode("div",I3,[r.createElementVNode("div",null,[T3,r.createVNode(ti,{"model-value":s.value??{hours:0,minutes:0,period:r.unref(Ke).AM},"onUpdate:modelValue":y[0]||(y[0]=_=>s.value=_)},null,8,["model-value"])]),r.createElementVNode("div",null,[z3,r.createVNode(ti,{"model-value":l.value??{hours:0,minutes:0,period:r.unref(Ke).AM},"onUpdate:modelValue":y[1]||(y[1]=_=>l.value=_)},null,8,["model-value"])])]),r.createElementVNode("div",L3,[r.createVNode(K,{label:"Cancel",size:"md",variant:"tertiary",onClick:u}),r.createVNode(K,{disabled:m.value,label:"Apply",size:"md",variant:"primary",onClick:d},null,8,["disabled"])])])]),_:2},1536)]),"helper-text":r.withCtx(()=>[r.renderSlot(g.$slots,"helper-text")]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),Xr=Z(r.defineComponent({__name:"FmList",props:{separator:{type:Boolean,default:!1},disabled:{type:Boolean},activeClass:{default:""}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass({"fm-list--separator":e.separator,activeClass:e.activeClass})},[r.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-884ba127"]]),Kr=Z(r.defineComponent({__name:"FmListItem",props:{tag:{default:"div"},clickable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},label:{default:""},sublabel:{default:""}},setup(t){const e=t;return(n,o)=>{const i=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createBlock(e.tag,{class:r.normalizeClass({"fm-list-item":!0,"fm-list-item--disabled":n.disabled,"cursor-pointer hover:bg-fm-color-opacity-sm":n.clickable&&!n.disabled,"cursor-not-allowed":n.clickable&&n.disabled}),onClick:o[0]||(o[0]=r.withModifiers(()=>{},["prevent"]))},{default:r.withCtx(()=>[r.renderSlot(n.$slots,"prepend",{},void 0,!0),r.renderSlot(n.$slots,"default",{},()=>[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-typo-body-lg-400 line-clamp-1 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-primary"}`)},r.toDisplayString(n.label),3),n.sublabel?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`fm-typo-body-md-400 line-clamp-2 break-all ${n.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary"}`)},r.toDisplayString(n.sublabel),3)):r.createCommentVNode("",!0)])],!0),n.$slots.append?(r.openBlock(),r.createBlock(mt,{key:0})):r.createCommentVNode("",!0),r.renderSlot(n.$slots,"append",{},void 0,!0)]),_:3},8,["class"])),[[i,n.clickable&&!n.disabled]])}}}),[["__scopeId","data-v-90312222"]]),j3={class:"fm-typo-body-lg-700 mx-8 p-8 text-fm-color-typo-primary"},W3=r.defineComponent({__name:"FmMenuHeader",props:{label:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",j3,r.toDisplayString(e.label),1))}}),Y3=t=>(r.pushScopeId("data-v-c5236366"),t=t(),r.popScopeId(),t),U3={class:"relative"},G3={class:"fm-progress-linear fm-typo-body-sm-400 h-4 overflow-hidden relative rounded-lg w-auto"},q3=Y3(()=>r.createElementVNode("span",{class:"bg-fm-color-neutral-gray-100",style:{width:"100%"}},null,-1)),X3=Z(r.defineComponent({__name:"FmLinearProgress",props:{color:{default:"primary"}},setup(t){const e=t,n=r.computed(()=>{const o=new Array,i={};return e.color?(an(e.color)?i["background-color"]=e.color:o.push(`bg-fm-color-${e.color}`),{class:o.join(" "),style:i}):{class:o.join(" "),style:i}});return(o,i)=>(r.openBlock(),r.createElementBlock("div",U3,[r.createElementVNode("div",G3,[q3,r.createElementVNode("span",{class:r.normalizeClass(["dash-1",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6),r.createElementVNode("span",{class:r.normalizeClass(["dash-2",n.value.class]),style:r.normalizeStyle(n.value.style)},null,6)])]))}}),[["__scopeId","data-v-c5236366"]]),K3={class:"flex fm-typo-title-sm-700 items-center justify-between text-fm-color-typo-primary"},Z3={key:0},J3={class:"h-full overflow-y-auto"},Q3={class:"pt-24"},e4=Z(r.defineComponent({__name:"FmSideSheet",props:{header:{default:""},modelValue:{type:Boolean,default:!1},dismissAway:{type:Boolean,default:!1},closeButton:{type:Boolean,default:!0},maxWidth:{default:void 0}},emits:["update:modelValue"],setup(t){const e=t,n=X(e,"modelValue");return(o,i)=>(r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",{onClick:i[0]||(i[0]=s=>n.value=!0)},[r.renderSlot(o.$slots,"side-sheet-button",{},void 0,!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,null,{default:r.withCtx(()=>[r.unref(n)?(r.openBlock(),r.createBlock(cn,{key:0,"dismiss-away":e.dismissAway,onClose:i[2]||(i[2]=s=>n.value=!1)},{default:r.withCtx(()=>[r.createVNode(r.Transition,{appear:"",name:"slide"},{default:r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass([!o.maxWidth&&"max-w-[400px]","fm-side-sheet"]),style:r.normalizeStyle({maxWidth:`${o.maxWidth}px`})},[r.createElementVNode("div",K3,[r.renderSlot(o.$slots,"side-sheet-header",{},()=>[o.header?(r.openBlock(),r.createElementBlock("div",Z3,r.toDisplayString(o.header),1)):r.createCommentVNode("",!0)],!0),o.closeButton?(r.openBlock(),r.createBlock(j,{key:0,class:"cursor-pointer",name:"close",size:"md",onClick:i[1]||(i[1]=s=>n.value=!1)})):r.createCommentVNode("",!0)]),r.createElementVNode("div",J3,[r.renderSlot(o.$slots,"default",{},void 0,!0)]),r.createElementVNode("div",Q3,[r.renderSlot(o.$slots,"side-sheet-footer",{},void 0,!0)])],6)]),_:3})]),_:3},8,["dismiss-away"])):r.createCommentVNode("",!0)]),_:3})]))]))}}),[["__scopeId","data-v-a3db17b6"]]),t4={class:"flex"},n4={key:0,class:"mt-8"},kc=Z(r.defineComponent({__name:"FmSnackbar",props:{title:{type:String,default:void 0},description:{type:String,default:void 0},variant:{type:String,default:"info"},dismissable:{type:Boolean,default:!1},action:{type:String,default:void 0},color:{type:String,default:void 0},bgColor:{type:String,default:void 0}},emits:["onDismiss","onAction"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{switch(n.variant){case"info":return{icon:{name:"info",color:"system-info-300"},actionColor:"typo-info",bgColor:"system-info-100"};case"success":return{icon:{name:"check_circle",color:"system-success-300"},actionColor:"typo-success",bgColor:"system-success-100"};case"warning":return{icon:{name:"warning",color:"system-warning-300"},actionColor:"typo-warning",bgColor:"system-warning-100"};case"error":return{icon:{name:"error",color:"system-error-300"},actionColor:"typo-error",bgColor:"system-error-100"};case"neutral":return{actionColor:"primary",bgColor:"neutral-gray-100"};default:throw Error(`Unimplement snackbar variant ${n.variant}`)}}),s=r.computed(()=>n.title?{text:n.title,classes:"fm-typo-body-lg-700"}:{text:n.description,classes:""}),l=r.computed(()=>n.bgColor?an(n.bgColor)?{style:{backgroundColor:n.bgColor}}:{class:`bg-fm-color-${n.bgColor}`}:{class:`bg-fm-color-${i.value.bgColor}`}),a=r.computed(()=>n.color?an(n.color)?{style:{color:n.color}}:{class:`text-fm-color-${n.color}`}:{class:`text-fm-color-${i.value.actionColor}`});return(d,c)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps(l.value,{class:"fm-corner-radius-lg fm-shadow-light-400 fm-snackbar px-24 py-16"}),[r.createElementVNode("div",t4,[i.value.icon?(r.openBlock(),r.createBlock(j,{key:0,name:i.value.icon.name,color:n.color??i.value.icon.color,class:"mr-12"},null,8,["name","color"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(`${s.value.classes} grow ellipsis`)},r.toDisplayString(s.value.text),3),n.dismissable?(r.openBlock(),r.createBlock(j,{key:1,style:{"{ flex":"none}"},name:"close",class:"cursor-pointer",onClick:c[0]||(c[0]=()=>o("onDismiss"))})):r.createCommentVNode("",!0)]),n.title&&n.description?(r.openBlock(),r.createElementBlock("div",n4,r.toDisplayString(n.description),1)):r.createCommentVNode("",!0),r.renderSlot(d.$slots,"actions",{},()=>[n.action?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0},a.value,{class:"mt-16 fm-typo-body-lg-700"}),[r.createElementVNode("span",{class:"cursor-pointer",onClick:c[1]||(c[1]=()=>o("onAction"))},r.toDisplayString(n.action),1)],16)):r.createCommentVNode("",!0)],!0)],16))}}),[["__scopeId","data-v-e2ff7141"]]),o4={key:0,class:"fm-step-description fm-typo-body-sm-400 line-clamp-1 mt-4"},Zr=r.defineComponent({__name:"FmStepHeader",props:{title:{type:String,required:!0},description:{type:String,default:void 0},disabled:{type:Boolean,default:!1},titleBold:{type:Boolean,default:!1}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex flex-col",t.disabled?"text-fm-color-typo-disabled":""])},[r.createElementVNode("div",{class:r.normalizeClass(["fm-step-title line-clamp-2",t.titleBold?"fm-typo-body-xl-700":"fm-typo-body-md-400"])},r.toDisplayString(t.title),3),t.description?(r.openBlock(),r.createElementBlock("div",o4,r.toDisplayString(t.description),1)):r.createCommentVNode("",!0)],2))}}),i4=["data-title","data-description","data-disabled"],r4={class:"flex fm-step-container gap-12 grow"},s4=Z(r.defineComponent({__name:"FmStep",props:{title:{type:String,required:!0},description:{type:String,default:void 0},value:{type:Number,required:!0},complete:{type:Function,required:!0},error:{type:Function,default:void 0},disabled:{type:Function,default:void 0}},setup(t){const e=t,{currentStep:n,goToStep:o}=r.inject(Vs);function i(){s.value||o(e.value)}const s=r.computed(()=>e.disabled?e.disabled():!1),l=r.computed(()=>e.error?e.error():!1),a=r.computed(()=>n()===e.value),d=r.computed(()=>e.complete()),c=r.computed(()=>a.value||d.value||n()>e.value?"bg-fm-color-primary":"bg-fm-color-neutral-gray-300"),u=r.computed(()=>a.value?{className:"bg-fm-color-primary"}:l.value?{config:{name:"warning",color:"system-error-300"}}:s.value?{className:"border-2 border-fm-color-neutral-gray-200"}:d.value?{config:{name:"check_small",color:"primary"},className:"border-2 border-fm-color-primary"}:{className:"border-2 border-fm-color-neutral-gray-300"});return(f,h)=>{const p=r.resolveDirective("wave");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{"data-title":t.title,"data-description":t.description,"data-disabled":s.value,class:r.normalizeClass(`fm-step gap-4 grow ${s.value?"cursor-not-allowed":"cursor-pointer"}`),onClick:r.withModifiers(i,["stop"])},[r.createElementVNode("div",null,[r.createElementVNode("div",{class:r.normalizeClass(`fm-step-indicator ${c.value}`)},null,2)]),r.createElementVNode("div",r4,[r.createElementVNode("div",{class:r.normalizeClass(["flex fm-step-container-icon h-[24px] items-center justify-center min-h-[24px] min-w-[24px] relative rounded-full w-[24px]",u.value.className])},[u.value.config?(r.openBlock(),r.createBlock(j,{key:0,name:u.value.config.name,color:u.value.config.color,outline:"",class:"absolute"},null,8,["name","color"])):r.createCommentVNode("",!0)],2),r.createVNode(Zr,{title:t.title,description:t.description,disabled:s.value,class:"grow"},null,8,["title","description","disabled"])])],10,i4)),[[p,!s.value]])}}}),[["__scopeId","data-v-ee172cad"]]),l4={class:"hidden items-center xs:flex"},a4={class:"flex gap-2 items-start justify-end mb-24 mt-40 p-0 self-stretch"},d4=r.defineComponent({__name:"FmStepper",props:{modelValue:{type:Number,required:!0},orientation:{type:String,default:"horizontal"}},emits:["update:model-value"],setup(t,{emit:e}){const n=t,o=e,i=u=>{o("update:model-value",u)};r.provide(Vs,{currentStep:()=>n.modelValue,goToStep:i});const s=r.ref(),l=r.ref([]),a=r.computed(()=>l.value[n.modelValue-1]),d=r.computed(()=>`${n.modelValue} of ${l.value.length}`),c=()=>{var f;const u=Array.from(((f=s.value)==null?void 0:f.querySelectorAll(":scope > .fm-step"))??[]);l.value=u.map(h=>({title:h.dataset.title??"",description:h.dataset.description,disabled:h.dataset.disabled=="true"}))};return r.onMounted(()=>{c()}),(u,f)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(`fm-stepper fm-stepper__${t.orientation}`)},[r.createElementVNode("div",{ref_key:"stepperRef",ref:s,class:r.normalizeClass(`flex mx-24 mt-12 mb-24 xs:hidden ${t.orientation==="vertical"?"flex-col":""}`)},[r.renderSlot(u.$slots,"default")],2),r.createElementVNode("div",l4,[r.createVNode(Ut,{"current-step":t.modelValue,"total-steps":l.value.length,class:"mr-12"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(d.value),1)]),_:1},8,["current-step","total-steps"]),a.value?(r.openBlock(),r.createBlock(Zr,{key:0,class:"grow","title-bold":"",title:a.value.title,description:a.value.description,disabled:a.value.disabled},null,8,["title","description","disabled"])):r.createCommentVNode("",!0)]),u.$slots.contents?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(`flex-col mx-24 mt-12 mb-24 ${t.orientation==="vertical"?"w-2/3":""}`)},[r.renderSlot(u.$slots,"contents"),r.createElementVNode("div",a4,[r.renderSlot(u.$slots,"actions")])],2)):r.createCommentVNode("",!0)],2))}});let c4=0;function u4(){return c4++}const f4=t=>(r.pushScopeId("data-v-57d43f79"),t=t(),r.popScopeId(),t),h4=["disabled"],p4=[f4(()=>r.createElementVNode("div",{class:"fm-tab__indicator"},null,-1))],xc=Z(r.defineComponent({__name:"FmTab",props:{modelValue:{default:null},label:{default:""},vertical:{type:Boolean,default:!1},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:()=>u4()},children:{default:()=>[]}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.ref(!1),o=t,i=e,s=r.ref(!1);function l(f){n.value=f}const a=()=>{o.disabled||o.children.length>0||i("update:modelValue",o.value)},d=f=>{o.children.length!==0&&(s.value=f)},c=r.computed(()=>o.children.length>0?o.children.some(f=>f.value===o.modelValue):o.modelValue===o.value),u=f=>{s.value=!1,i("update:modelValue",f)};return(f,h)=>(r.openBlock(),r.createBlock(dt,{"show-menu":s.value,disabled:f.children.length===0,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":f.vertical}]),placement:f.vertical?"right-start":"bottom-start",onMenuChanged:d},{"menu-button":r.withCtx(()=>[r.createElementVNode("button",{class:r.normalizeClass(["fm-tab",`fm-tab--${f.vertical?"vertical":"horizontal"}`,f.disabled?"cursor-not-allowed":"cursor-pointer",{"fm-tab--selected":c.value}]),disabled:f.disabled,type:"button",onMousedown:h[0]||(h[0]=()=>l(!0)),onMouseup:h[1]||(h[1]=()=>l(!1)),onMouseleave:h[2]||(h[2]=()=>l(!1)),onClick:a},[r.renderSlot(f.$slots,"prepend",{},void 0,!0),f.icon?(r.openBlock(),r.createBlock(j,{key:0,name:f.icon,outline:!n.value&&!c.value,color:f.disabled?"neutral-gray-200":c.value?"primary":"neutral-black",size:"md"},null,8,["name","outline","color"])):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:1,class:r.normalizeClass(["fm-typo-body-lg-700 text-fm-color-typo-primary row-start-1 text-left",c.value?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0),f.label?(r.openBlock(),r.createElementBlock("span",{key:2,class:r.normalizeClass(["fm-typo-body-lg-400 row-start-1 text-left",f.disabled?"text-fm-color-typo-disabled":"text-fm-color-typo-secondary",!c.value||f.disabled?"visible":"invisible",f.icon||f.$slots.append?"col-start-2":"col-start-1"])},r.toDisplayString(f.label),3)):r.createCommentVNode("",!0),f.badge?(r.openBlock(),r.createBlock(Et,{key:3,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0),f.children.length>0?(r.openBlock(),r.createBlock(j,{key:4,size:"md",name:s.value?"expand_less":"expand_more"},null,8,["name"])):r.createCommentVNode("",!0),r.renderSlot(f.$slots,"append",{},void 0,!0),c.value?(r.openBlock(),r.createElementBlock("div",{key:5,class:r.normalizeClass([`fm-tab__indicator__wrapper--${f.vertical?"vertical":"horizontal"}`])},p4,2)):r.createCommentVNode("",!0)],42,h4)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.children,p=>(r.openBlock(),r.createBlock(De,{key:p.value,"model-value":o.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,onClick:m=>u(p.value)},{append:r.withCtx(()=>[p.badge?(r.openBlock(),r.createBlock(Et,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:3},8,["show-menu","disabled","class","placement"]))}}),[["__scopeId","data-v-57d43f79"]]),m4={class:"flex gap-8 h-48 items-center justify-end transition-all w-full xs:flex-wrap-reverse"},g4={class:"flex flex-1 gap-8"},y4=r.defineComponent({__name:"FmTableToolbar",props:{searchModel:{default:""},searchable:{type:Boolean},filterable:{type:Boolean},chips:{default:()=>[]},actions:{default:()=>[]}},emits:["update:search-model","click:remove-chip"],setup(t){const e=t,{breakpoints:n}=Gt(),o=r.computed(()=>{const a=[];e.searchable&&a.push({label:"Search",icon:"search",key:"search"}),e.filterable&&a.push({label:"Filter",icon:"filter_alt",key:"filter"});const d=a.concat(e.actions);if(n.value.xs){const[m,g,y,...b]=d;return b.length===0?{actionButtons:[m,g,y].filter(_=>_),collapse:b}:{actionButtons:[m,g].filter(_=>_),collapse:[y,...b]}}const[c,u,f,h,...p]=d;return p.length===0?{actionButtons:[c,u,f,h].filter(m=>m),collapse:p}:{actionButtons:[c,u,f].filter(m=>m),collapse:[h,...p]}}),i=r.ref(!1);function s(a){if(n.value.xs){a.stopPropagation(),i.value=!0;return}}const l=X(e,"searchModel");return(a,d)=>(r.openBlock(),r.createElementBlock("div",m4,[r.renderSlot(a.$slots,"chips",{},()=>[a.chips.length?(r.openBlock(),r.createBlock(Si,{key:0,class:"min-w-0 mr-auto",items:a.chips,removable:"",onChipClosed:d[0]||(d[0]=c=>a.$emit("click:remove-chip",c))},null,8,["items"])):r.createCommentVNode("",!0)]),r.createElementVNode("div",g4,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.actionButtons,c=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:c.key},[c.key==="search"?r.renderSlot(a.$slots,"action-search",{key:0},()=>[r.createVNode(Yr,{"model-value":r.unref(l),"onUpdate:modelValue":d[1]||(d[1]=u=>r.isRef(l)?l.value=u:null),class:"w-full",collapsible:""},null,8,["model-value"])]):r.renderSlot(a.$slots,`action-${c.key}`,{key:1},()=>[r.createVNode(K,{"prepend-icon":c.icon,variant:"tertiary",onClick:u=>a.$emit(`click:action-${c.key}`)},null,8,["prepend-icon","onClick"])])],64))),128)),o.value.collapse.length?(r.openBlock(),r.createBlock(dt,{key:0},{"menu-button":r.withCtx(()=>[r.createVNode(K,{"prepend-icon":"more_vert",variant:"tertiary",onClick:s})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,c=>(r.openBlock(),r.createBlock(De,{key:c.key,label:c.label,icon:c.icon,onClick:u=>{a.$emit(`click:action-${c.key}`),i.value=!1}},null,8,["label","icon","onClick"]))),128))]),_:1})):r.createCommentVNode("",!0),a.$slots.append?r.renderSlot(a.$slots,"append",{key:1}):r.createCommentVNode("",!0)]),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Ci,{modelValue:i.value,"onUpdate:modelValue":d[2]||(d[2]=c=>i.value=c),"dismiss-away":""},{default:r.withCtx(()=>[r.createVNode(Xr,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value.collapse,c=>(r.openBlock(),r.createBlock(Kr,{key:c.key,label:c.label,class:"hover:bg-fm-color-neutral-gray-100",onClick:u=>{a.$emit(`click:action-${c.key}`),i.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["modelValue"])]))]))}});/**
34
34
  * table-core
35
35
  *
36
36
  * Copyright (c) TanStack
@@ -39,10 +39,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
39
39
  * LICENSE.md file in the root directory of this source tree.
40
40
  *
41
41
  * @license MIT
42
- */function xt(t,e){return typeof t=="function"?t(e):t}function Re(t,e){return n=>{e.setState(o=>({...o,[t]:xt(n,o[t])}))}}function ei(t){return t instanceof Function}function e4(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function t4(t,e){const n=[],o=i=>{i.forEach(r=>{n.push(r);const l=e(r);l!=null&&l.length&&o(l)})};return o(t),n}function z(t,e,n){let o=[],i;return r=>{let l;n.key&&n.debug&&(l=Date.now());const a=t(r);if(!(a.length!==o.length||a.some((u,f)=>o[f]!==u)))return i;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),i=e(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-l)*100)/100,f=Math.round((Date.now()-c)*100)/100,h=f/16,p=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c⏱ ${p(f,5)} /${p(u,5)} ms`,`
42
+ */function St(t,e){return typeof t=="function"?t(e):t}function Re(t,e){return n=>{e.setState(o=>({...o,[t]:St(n,o[t])}))}}function ni(t){return t instanceof Function}function b4(t){return Array.isArray(t)&&t.every(e=>typeof e=="number")}function $4(t,e){const n=[],o=i=>{i.forEach(s=>{n.push(s);const l=e(s);l!=null&&l.length&&o(l)})};return o(t),n}function L(t,e,n){let o=[],i;return s=>{let l;n.key&&n.debug&&(l=Date.now());const a=t(s);if(!(a.length!==o.length||a.some((u,f)=>o[f]!==u)))return i;o=a;let c;if(n.key&&n.debug&&(c=Date.now()),i=e(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-l)*100)/100,f=Math.round((Date.now()-c)*100)/100,h=f/16,p=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c⏱ ${p(f,5)} /${p(u,5)} ms`,`
43
43
  font-size: .6rem;
44
44
  font-weight: bold;
45
- color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function H(t,e,n,o){return{debug:()=>{var i;return(i=t==null?void 0:t.debugAll)!=null?i:t[e]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function n4(t,e,n,o){var i,r;const a={...t._getDefaultColumnDef(),...e},d=a.accessorKey;let c=(i=(r=a.id)!=null?r:d?d.replace(".","_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:d&&(d.includes(".")?u=h=>{let p=h;for(const g of d.split(".")){var m;p=(m=p)==null?void 0:m[g],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${g}" in deeply nested key "${d}" returned undefined.`)}return p}:u=h=>h[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:z(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},H(t.options,"debugColumns","column.getFlatColumns")),getLeafColumns:z(()=>[t._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(g=>g.getLeafColumns());return h(m)}return[f]},H(t.options,"debugColumns","column.getLeafColumns"))};for(const h of t._features)h.createColumn==null||h.createColumn(f,t);return f}const we="debugHeaders";function yc(t,e,n){var o;let r={id:(o=n.id)!=null?o:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const l=[],a=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(a),l.push(d)};return a(r),l},getContext:()=>({table:t,header:r,column:e})};return t._features.forEach(l=>{l.createHeader==null||l.createHeader(r,t)}),r}const o4={createTable:t=>{t.getHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>{var r,l;const a=(r=o==null?void 0:o.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?r:[],d=(l=i==null?void 0:i.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?l:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return ti(e,[...a,...c,...d],t)},H(t.options,we,"getHeaderGroups")),t.getCenterHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>(n=n.filter(r=>!(o!=null&&o.includes(r.id))&&!(i!=null&&i.includes(r.id))),ti(e,n,t,"center")),H(t.options,we,"getCenterHeaderGroups")),t.getLeftHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,o)=>{var i;const r=(i=o==null?void 0:o.map(l=>n.find(a=>a.id===l)).filter(Boolean))!=null?i:[];return ti(e,r,t,"left")},H(t.options,we,"getLeftHeaderGroups")),t.getRightHeaderGroups=z(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,o)=>{var i;const r=(i=o==null?void 0:o.map(l=>n.find(a=>a.id===l)).filter(Boolean))!=null?i:[];return ti(e,r,t,"right")},H(t.options,we,"getRightHeaderGroups")),t.getFooterGroups=z(()=>[t.getHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getFooterGroups")),t.getLeftFooterGroups=z(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getLeftFooterGroups")),t.getCenterFooterGroups=z(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getCenterFooterGroups")),t.getRightFooterGroups=z(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),H(t.options,we,"getRightFooterGroups")),t.getFlatHeaders=z(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getFlatHeaders")),t.getLeftFlatHeaders=z(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getLeftFlatHeaders")),t.getCenterFlatHeaders=z(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getCenterFlatHeaders")),t.getRightFlatHeaders=z(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,we,"getRightFlatHeaders")),t.getCenterLeafHeaders=z(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,we,"getCenterLeafHeaders")),t.getLeftLeafHeaders=z(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,we,"getLeftLeafHeaders")),t.getRightLeafHeaders=z(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,we,"getRightLeafHeaders")),t.getLeafHeaders=z(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,o)=>{var i,r,l,a,d,c;return[...(i=(r=e[0])==null?void 0:r.headers)!=null?i:[],...(l=(a=n[0])==null?void 0:a.headers)!=null?l:[],...(d=(c=o[0])==null?void 0:c.headers)!=null?d:[]].map(u=>u.getLeafHeaders()).flat()},H(t.options,we,"getLeafHeaders"))}};function ti(t,e,n,o){var i,r;let l=0;const a=function(h,p){p===void 0&&(p=1),l=Math.max(l,p),h.filter(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&a(m.columns,p+1)},0)};a(t);let d=[];const c=(h,p)=>{const m={depth:p,id:[o,`${p}`].filter(Boolean).join("_"),headers:[]},g=[];h.forEach(y=>{const b=[...g].reverse()[0],$=y.column.depth===m.depth;let w,S=!1;if($&&y.column.parent?w=y.column.parent:(w=y.column,S=!0),b&&(b==null?void 0:b.column)===w)b.subHeaders.push(y);else{const x=yc(n,w,{id:[o,p,w.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(V=>V.column===w).length}`:void 0,depth:p,index:g.length});x.subHeaders.push(y),g.push(x)}m.headers.push(y),y.headerGroup=m}),d.push(m),p>0&&c(g,p-1)},u=e.map((h,p)=>yc(n,h,{depth:l,index:p}));c(u,l-1),d.reverse();const f=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,y=0,b=[0];m.subHeaders&&m.subHeaders.length?(b=[],f(m.subHeaders).forEach(w=>{let{colSpan:S,rowSpan:x}=w;g+=S,b.push(x)})):g=1;const $=Math.min(...b);return y=y+$,m.colSpan=g,m.rowSpan=y,{colSpan:g,rowSpan:y}});return f((i=(r=d[0])==null?void 0:r.headers)!=null?i:[]),d}const ni={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Us=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),i4={getDefaultColumnDef:()=>ni,getInitialState:t=>({columnSizing:{},columnSizingInfo:Us(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Re("columnSizing",t),onColumnSizingInfoChange:Re("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,o,i;const r=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:ni.minSize,(o=r??t.columnDef.size)!=null?o:ni.size),(i=t.columnDef.maxSize)!=null?i:ni.maxSize)},t.getStart=z(n=>[n,Xn(e,n),e.getState().columnSizing],(n,o)=>o.slice(0,t.getIndex(n)).reduce((i,r)=>i+r.getSize(),0),H(e.options,"debugColumns","getStart")),t.getAfter=z(n=>[n,Xn(e,n),e.getState().columnSizing],(n,o)=>o.slice(t.getIndex(n)+1).reduce((i,r)=>i+r.getSize(),0),H(e.options,"debugColumns","getAfter")),t.resetSize=()=>{e.setColumnSizing(n=>{let{[t.id]:o,...i}=n;return i})},t.getCanResize=()=>{var n,o;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((o=e.options.enableColumnResizing)!=null?o:!0)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var r;n+=(r=i.column.getSize())!=null?r:0}};return o(t),n},t.getStart=()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},t.getResizeHandler=n=>{const o=e.getColumn(t.column.id),i=o==null?void 0:o.getCanResize();return r=>{if(!o||!i||(r.persist==null||r.persist(),Gs(r)&&r.touches&&r.touches.length>1))return;const l=t.getSize(),a=t?t.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[o.id,o.getSize()]],d=Gs(r)?Math.round(r.touches[0].clientX):r.clientX,c={},u=(b,$)=>{typeof $=="number"&&(e.setColumnSizingInfo(w=>{var S,x;const V=e.options.columnResizeDirection==="rtl"?-1:1,D=($-((S=w==null?void 0:w.startOffset)!=null?S:0))*V,F=Math.max(D/((x=w==null?void 0:w.startSize)!=null?x:0),-.999999);return w.columnSizingStart.forEach(N=>{let[P,C]=N;c[P]=Math.round(Math.max(C+C*F,0)*100)/100}),{...w,deltaOffset:D,deltaPercentage:F}}),(e.options.columnResizeMode==="onChange"||b==="end")&&e.setColumnSizing(w=>({...w,...c})))},f=b=>u("move",b),h=b=>{u("end",b),e.setColumnSizingInfo($=>({...$,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,m={moveHandler:b=>f(b.clientX),upHandler:b=>{p==null||p.removeEventListener("mousemove",m.moveHandler),p==null||p.removeEventListener("mouseup",m.upHandler),h(b.clientX)}},g={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),f(b.touches[0].clientX),!1),upHandler:b=>{var $;p==null||p.removeEventListener("touchmove",g.moveHandler),p==null||p.removeEventListener("touchend",g.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),h(($=b.touches[0])==null?void 0:$.clientX)}},y=s4()?{passive:!1}:!1;Gs(r)?(p==null||p.addEventListener("touchmove",g.moveHandler,y),p==null||p.addEventListener("touchend",g.upHandler,y)):(p==null||p.addEventListener("mousemove",m.moveHandler,y),p==null||p.addEventListener("mouseup",m.upHandler,y)),e.setColumnSizingInfo(b=>({...b,startOffset:d,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:o.id}))}}},createTable:t=>{t.setColumnSizing=e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},t.resetHeaderSizeInfo=e=>{var n;t.setColumnSizingInfo(e?Us():(n=t.initialState.columnSizingInfo)!=null?n:Us())},t.getTotalSize=()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getLeftTotalSize=()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getCenterTotalSize=()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getRightTotalSize=()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0}}};let oi=null;function s4(){if(typeof oi=="boolean")return oi;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return oi=t,oi}function Gs(t){return t.type==="touchstart"}const r4={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Re("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;t._autoResetExpanded=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetExpanded)!=null?o:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},t.setExpanded=o=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(o),t.toggleAllRowsExpanded=o=>{o??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=o=>{var i,r;t.setExpanded(o?{}:(i=(r=t.initialState)==null?void 0:r.expanded)!=null?i:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const o=t.getState().expanded;return o===!0||Object.values(o).some(Boolean)},t.getIsAllRowsExpanded=()=>{const o=t.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||t.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},t.getExpandedDepth=()=>{let o=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(r=>{const l=r.split(".");o=Math.max(o,l.length)}),o},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=n=>{e.setExpanded(o=>{var i;const r=o===!0?!0:!!(o!=null&&o[t.id]);let l={};if(o===!0?Object.keys(e.getRowModel().rowsById).forEach(a=>{l[a]=!0}):l=o,n=(i=n)!=null?i:!r,!r&&n)return{...l,[t.id]:!0};if(r&&!n){const{[t.id]:a,...d}=l;return d}return o})},t.getIsExpanded=()=>{var n;const o=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:o===!0||o!=null&&o[t.id])},t.getCanExpand=()=>{var n,o,i;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((o=e.options.enableExpanding)!=null?o:!0)&&!!((i=t.subRows)!=null&&i.length)},t.getIsAllParentsExpanded=()=>{let n=!0,o=t;for(;n&&o.parentId;)o=e.getRow(o.parentId,!0),n=o.getIsExpanded();return n},t.getToggleExpandedHandler=()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}}},bc=(t,e,n)=>{var o;const i=n.toLowerCase();return!!(!((o=t.getValue(e))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};bc.autoRemove=t=>He(t);const $c=(t,e,n)=>{var o;return!!(!((o=t.getValue(e))==null||(o=o.toString())==null)&&o.includes(n))};$c.autoRemove=t=>He(t);const _c=(t,e,n)=>{var o;return((o=t.getValue(e))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(n==null?void 0:n.toLowerCase())};_c.autoRemove=t=>He(t);const wc=(t,e,n)=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(n)};wc.autoRemove=t=>He(t)||!(t!=null&&t.length);const Cc=(t,e,n)=>!n.some(o=>{var i;return!((i=t.getValue(e))!=null&&i.includes(o))});Cc.autoRemove=t=>He(t)||!(t!=null&&t.length);const xc=(t,e,n)=>n.some(o=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(o)});xc.autoRemove=t=>He(t)||!(t!=null&&t.length);const kc=(t,e,n)=>t.getValue(e)===n;kc.autoRemove=t=>He(t);const Sc=(t,e,n)=>t.getValue(e)==n;Sc.autoRemove=t=>He(t);const qs=(t,e,n)=>{let[o,i]=n;const r=t.getValue(e);return r>=o&&r<=i};qs.resolveFilterValue=t=>{let[e,n]=t,o=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,r=e===null||Number.isNaN(o)?-1/0:o,l=n===null||Number.isNaN(i)?1/0:i;if(r>l){const a=r;r=l,l=a}return[r,l]},qs.autoRemove=t=>He(t)||He(t[0])&&He(t[1]);const ut={includesString:bc,includesStringSensitive:$c,equalsString:_c,arrIncludes:wc,arrIncludesAll:Cc,arrIncludesSome:xc,equals:kc,weakEquals:Sc,inNumberRange:qs};function He(t){return t==null||t===""}const l4={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],globalFilter:void 0,...t}),getDefaultOptions:t=>({onColumnFiltersChange:Re("columnFilters",t),onGlobalFilterChange:Re("globalFilter",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n;const o=(n=t.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[e.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);return typeof o=="string"?ut.includesString:typeof o=="number"?ut.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?ut.equals:Array.isArray(o)?ut.arrIncludes:ut.weakEquals},t.getFilterFn=()=>{var n,o;return ei(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(o=e.options.filterFns)==null?void 0:o[t.columnDef.filterFn])!=null?n:ut[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,o,i;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((o=e.options.enableColumnFilters)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&!!t.accessorFn},t.getCanGlobalFilter=()=>{var n,o,i,r;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=e.options.enableGlobalFilter)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((r=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?r:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n;return(n=e.getState().columnFilters)==null||(n=n.find(o=>o.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var n,o;return(n=(o=e.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.setFilterValue=n=>{e.setColumnFilters(o=>{const i=t.getFilterFn(),r=o==null?void 0:o.find(u=>u.id===t.id),l=xt(n,r?r.value:void 0);if(vc(i,l,t)){var a;return(a=o==null?void 0:o.filter(u=>u.id!==t.id))!=null?a:[]}const d={id:t.id,value:l};if(r){var c;return(c=o==null?void 0:o.map(u=>u.id===t.id?d:u))!=null?c:[]}return o!=null&&o.length?[...o,d]:[d]})},t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.getGlobalAutoFilterFn=()=>ut.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:o}=t.options;return ei(o)?o:o==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[o])!=null?e:ut[o]},t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),o=i=>{var r;return(r=xt(e,i))==null?void 0:r.filter(l=>{const a=n.find(d=>d.id===l.id);if(a){const d=a.getFilterFn();if(vc(d,l.value,a))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(o)},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)},t.resetColumnFilters=e=>{var n,o;t.setColumnFilters(e?[]:(n=(o=t.initialState)==null?void 0:o.columnFilters)!=null?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel()),t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}};function vc(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const Xs={sum:(t,e,n)=>n.reduce((o,i)=>{const r=i.getValue(t);return o+(typeof r=="number"?r:0)},0),min:(t,e,n)=>{let o;return n.forEach(i=>{const r=i.getValue(t);r!=null&&(o>r||o===void 0&&r>=r)&&(o=r)}),o},max:(t,e,n)=>{let o;return n.forEach(i=>{const r=i.getValue(t);r!=null&&(o<r||o===void 0&&r>=r)&&(o=r)}),o},extent:(t,e,n)=>{let o,i;return n.forEach(r=>{const l=r.getValue(t);l!=null&&(o===void 0?l>=l&&(o=i=l):(o>l&&(o=l),i<l&&(i=l)))}),[o,i]},mean:(t,e)=>{let n=0,o=0;if(e.forEach(i=>{let r=i.getValue(t);r!=null&&(r=+r)>=r&&(++n,o+=r)}),n)return o/n},median:(t,e)=>{if(!e.length)return;const n=e.map(r=>r.getValue(t));if(!e4(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((r,l)=>r-l);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},unique:(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),uniqueCount:(t,e)=>new Set(e.map(n=>n.getValue(t))).size,count:(t,e)=>e.length},a4={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:Re("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(o=>o!==t.id):[...n??[],t.id])},t.getCanGroup=()=>{var n,o,i,r;return(n=(o=(i=(r=t.columnDef.enableGrouping)!=null?r:!0)!=null?i:e.options.enableGrouping)!=null?o:!0)!=null?n:!!t.accessorFn},t.getIsGrouped=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);if(typeof o=="number")return Xs.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Xs.extent},t.getAggregationFn=()=>{var n,o;if(!t)throw new Error;return ei(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(o=e.options.aggregationFns)==null?void 0:o[t.columnDef.aggregationFn])!=null?n:Xs[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,o;t.setGrouping(e?[]:(n=(o=t.initialState)==null?void 0:o.grouping)!=null?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const o=e.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(t._groupingValuesCache[n]=o.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,o)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var i;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function d4(t,e,n){if(!(e!=null&&e.length)||!n)return t;const o=t.filter(r=>!e.includes(r.id));return n==="remove"?o:[...e.map(r=>t.find(l=>l.id===r)).filter(Boolean),...o]}const c4={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Re("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=z(n=>[Xn(e,n)],n=>n.findIndex(o=>o.id===t.id),H(e.options,"debugColumns","getIndex")),t.getIsFirstColumn=n=>{var o;return((o=Xn(e,n)[0])==null?void 0:o.id)===t.id},t.getIsLastColumn=n=>{var o;const i=Xn(e,n);return((o=i[i.length-1])==null?void 0:o.id)===t.id}},createTable:t=>{t.setColumnOrder=e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},t._getOrderColumnsFn=z(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,o)=>i=>{let r=[];if(!(e!=null&&e.length))r=i;else{const l=[...e],a=[...i];for(;a.length&&l.length;){const d=l.shift(),c=a.findIndex(u=>u.id===d);c>-1&&r.push(a.splice(c,1)[0])}r=[...r,...a]}return d4(r,n,o)},H(t.options,"debugTable","_getOrderColumnsFn"))}},Ks=0,Zs=10,Js=()=>({pageIndex:Ks,pageSize:Zs}),u4={getInitialState:t=>({...t,pagination:{...Js(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Re("pagination",t)}),createTable:t=>{let e=!1,n=!1;t._autoResetPageIndex=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetPageIndex)!=null?o:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},t.setPagination=o=>{const i=r=>xt(o,r);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},t.resetPagination=o=>{var i;t.setPagination(o?Js():(i=t.initialState.pagination)!=null?i:Js())},t.setPageIndex=o=>{t.setPagination(i=>{let r=xt(o,i.pageIndex);const l=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return r=Math.max(0,Math.min(r,l)),{...i,pageIndex:r}})},t.resetPageIndex=o=>{var i,r;t.setPageIndex(o?Ks:(i=(r=t.initialState)==null||(r=r.pagination)==null?void 0:r.pageIndex)!=null?i:Ks)},t.resetPageSize=o=>{var i,r;t.setPageSize(o?Zs:(i=(r=t.initialState)==null||(r=r.pagination)==null?void 0:r.pageSize)!=null?i:Zs)},t.setPageSize=o=>{t.setPagination(i=>{const r=Math.max(1,xt(o,i.pageSize)),l=i.pageSize*i.pageIndex,a=Math.floor(l/r);return{...i,pageIndex:a,pageSize:r}})},t.setPageCount=o=>t.setPagination(i=>{var r;let l=xt(o,(r=t.options.pageCount)!=null?r:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...i,pageCount:l}}),t.getPageOptions=z(()=>[t.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((r,l)=>l)),i},H(t.options,"debugTable","getPageOptions")),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:o}=t.getState().pagination,i=t.getPageCount();return i===-1?!0:i===0?!1:o<i-1},t.previousPage=()=>t.setPageIndex(o=>o-1),t.nextPage=()=>t.setPageIndex(o=>o+1),t.firstPage=()=>t.setPageIndex(0),t.lastPage=()=>t.setPageIndex(t.getPageCount()-1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var o;return(o=t.options.pageCount)!=null?o:Math.ceil(t.getRowCount()/t.getState().pagination.pageSize)},t.getRowCount=()=>{var o;return(o=t.options.rowCount)!=null?o:t.getPrePaginationRowModel().rows.length}}},Qs=()=>({left:[],right:[]}),er=()=>({top:[],bottom:[]}),f4={getInitialState:t=>({columnPinning:Qs(),rowPinning:er(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Re("columnPinning",t),onRowPinningChange:Re("rowPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const o=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var r,l;if(n==="right"){var a,d;return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((d=i==null?void 0:i.right)!=null?d:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=i==null?void 0:i.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=i==null?void 0:i.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((r=i==null?void 0:i.left)!=null?r:[]).filter(f=>!(o!=null&&o.includes(f))),right:((l=i==null?void 0:i.right)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f)))}})},t.getCanPin=()=>t.getLeafColumns().some(o=>{var i,r,l;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((r=(l=e.options.enableColumnPinning)!=null?l:e.options.enablePinning)!=null?r:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(a=>a.id),{left:o,right:i}=e.getState().columnPinning,r=n.some(a=>o==null?void 0:o.includes(a)),l=n.some(a=>i==null?void 0:i.includes(a));return r?"left":l?"right":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();return i?(n=(o=e.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(t.id))!=null?n:-1:0}},createRow:(t,e)=>{t.pin=(n,o,i)=>{const r=o?t.getLeafRows().map(d=>{let{id:c}=d;return c}):[],l=i?t.getParentRows().map(d=>{let{id:c}=d;return c}):[],a=new Set([...l,t.id,...r]);e.setRowPinning(d=>{var c,u;if(n==="bottom"){var f,h;return{top:((f=d==null?void 0:d.top)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((h=d==null?void 0:d.bottom)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var p,m;return{top:[...((p=d==null?void 0:d.top)!=null?p:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((m=d==null?void 0:d.bottom)!=null?m:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((c=d==null?void 0:d.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=d==null?void 0:d.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},t.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:i}=e.options;return typeof o=="function"?o(t):(n=o??i)!=null?n:!0},t.getIsPinned=()=>{const n=[t.id],{top:o,bottom:i}=e.getState().rowPinning,r=n.some(a=>o==null?void 0:o.includes(a)),l=n.some(a=>i==null?void 0:i.includes(a));return r?"top":l?"bottom":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();if(!i)return-1;const r=(n=e._getPinnedRows(i))==null?void 0:n.map(l=>{let{id:a}=l;return a});return(o=r==null?void 0:r.indexOf(t.id))!=null?o:-1},t.getCenterVisibleCells=z(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,o,i)=>{const r=[...o??[],...i??[]];return n.filter(l=>!r.includes(l.column.id))},H(e.options,"debugRows","getCenterVisibleCells")),t.getLeftVisibleCells=z(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left],(n,o)=>(o??[]).map(r=>n.find(l=>l.column.id===r)).filter(Boolean).map(r=>({...r,position:"left"})),H(e.options,"debugRows","getLeftVisibleCells")),t.getRightVisibleCells=z(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,o)=>(o??[]).map(r=>n.find(l=>l.column.id===r)).filter(Boolean).map(r=>({...r,position:"right"})),H(e.options,"debugRows","getRightVisibleCells"))},createTable:t=>{t.setColumnPinning=e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,o;return t.setColumnPinning(e?Qs():(n=(o=t.initialState)==null?void 0:o.columnPinning)!=null?n:Qs())},t.getIsSomeColumnsPinned=e=>{var n;const o=t.getState().columnPinning;if(!e){var i,r;return!!((i=o.left)!=null&&i.length||(r=o.right)!=null&&r.length)}return!!((n=o[e])!=null&&n.length)},t.getLeftLeafColumns=z(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),H(t.options,"debugColumns","getLeftLeafColumns")),t.getRightLeafColumns=z(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),H(t.options,"debugColumns","getRightLeafColumns")),t.getCenterLeafColumns=z(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o)=>{const i=[...n??[],...o??[]];return e.filter(r=>!i.includes(r.id))},H(t.options,"debugColumns","getCenterLeafColumns")),t.setRowPinning=e=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,o;return t.setRowPinning(e?er():(n=(o=t.initialState)==null?void 0:o.rowPinning)!=null?n:er())},t.getIsSomeRowsPinned=e=>{var n;const o=t.getState().rowPinning;if(!e){var i,r;return!!((i=o.top)!=null&&i.length||(r=o.bottom)!=null&&r.length)}return!!((n=o[e])!=null&&n.length)},t._getPinnedRows=z(e=>[t.getRowModel().rows,t.getState().rowPinning[e],e],(e,n,o)=>{var i;return((i=t.options.keepPinnedRows)==null||i?(n??[]).map(l=>{const a=t.getRow(l,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(l=>e.find(a=>a.id===l))).filter(Boolean).map(l=>({...l,position:o}))},H(t.options,"debugRows","_getPinnedRows")),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=z(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,o)=>{const i=new Set([...n??[],...o??[]]);return e.filter(r=>!i.has(r.id))},H(t.options,"debugRows","getCenterRows"))}},h4={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Re("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const o={...n},i=t.getPreGroupedRowModel().flatRows;return e?i.forEach(r=>{r.getCanSelect()&&(o[r.id]=!0)}):i.forEach(r=>{delete o[r.id]}),o})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const o=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(r=>{tr(i,r.id,o,!0,t)}),i}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=z(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?nr(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getSelectedRowModel")),t.getFilteredSelectedRowModel=z(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?nr(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getFilteredSelectedRowModel")),t.getGroupedSelectedRowModel=z(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?nr(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getGroupedSelectedRowModel")),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let o=!!(e.length&&Object.keys(n).length);return o&&e.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=t.getState();let o=!!e.length;return o&&e.some(i=>!n[i.id])&&(o=!1),o},t.getIsSomeRowsSelected=()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(n,o)=>{const i=t.getIsSelected();e.setRowSelection(r=>{var l;if(n=typeof n<"u"?n:!i,t.getCanSelect()&&i===n)return r;const a={...r};return tr(a,t.id,n,(l=o==null?void 0:o.selectChildren)!=null?l:!0,e),a})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return or(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return ir(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return ir(t,n)==="all"},t.getCanSelect=()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},t.getCanSelectSubRows=()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},t.getCanMultiSelect=()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},t.getToggleSelectedHandler=()=>{const n=t.getCanSelect();return o=>{var i;n&&t.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},tr=(t,e,n,o,i)=>{var r;const l=i.getRow(e,!0);n?(l.getCanMultiSelect()||Object.keys(t).forEach(a=>delete t[a]),l.getCanSelect()&&(t[e]=!0)):delete t[e],o&&(r=l.subRows)!=null&&r.length&&l.getCanSelectSubRows()&&l.subRows.forEach(a=>tr(t,a.id,n,o,i))};function nr(t,e){const n=t.getState().rowSelection,o=[],i={},r=function(l,a){return l.map(d=>{var c;const u=or(d,n);if(u&&(o.push(d),i[d.id]=d),(c=d.subRows)!=null&&c.length&&(d={...d,subRows:r(d.subRows)}),u)return d}).filter(Boolean)};return{rows:r(e.rows),flatRows:o,rowsById:i}}function or(t,e){var n;return(n=e[t.id])!=null?n:!1}function ir(t,e,n){var o;if(!((o=t.subRows)!=null&&o.length))return!1;let i=!0,r=!1;return t.subRows.forEach(l=>{if(!(r&&!i)&&(l.getCanSelect()&&(or(l,e)?r=!0:i=!1),l.subRows&&l.subRows.length)){const a=ir(l,e);a==="all"?r=!0:(a==="some"&&(r=!0),i=!1)}}),i?"all":r?"some":!1}const sr=/([0-9]+)/gm,p4=(t,e,n)=>Mc(kt(t.getValue(n)).toLowerCase(),kt(e.getValue(n)).toLowerCase()),m4=(t,e,n)=>Mc(kt(t.getValue(n)),kt(e.getValue(n))),g4=(t,e,n)=>rr(kt(t.getValue(n)).toLowerCase(),kt(e.getValue(n)).toLowerCase()),y4=(t,e,n)=>rr(kt(t.getValue(n)),kt(e.getValue(n))),b4=(t,e,n)=>{const o=t.getValue(n),i=e.getValue(n);return o>i?1:o<i?-1:0},$4=(t,e,n)=>rr(t.getValue(n),e.getValue(n));function rr(t,e){return t===e?0:t>e?1:-1}function kt(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function Mc(t,e){const n=t.split(sr).filter(Boolean),o=e.split(sr).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),r=o.shift(),l=parseInt(i,10),a=parseInt(r,10),d=[l,a].sort();if(isNaN(d[0])){if(i>r)return 1;if(r>i)return-1;continue}if(isNaN(d[1]))return isNaN(l)?-1:1;if(l>a)return 1;if(a>l)return-1}return n.length-o.length}const qn={alphanumeric:p4,alphanumericCaseSensitive:m4,text:g4,textCaseSensitive:y4,datetime:b4,basic:$4},_4={getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Re("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const r=i==null?void 0:i.getValue(t.id);if(Object.prototype.toString.call(r)==="[object Date]")return qn.datetime;if(typeof r=="string"&&(o=!0,r.split(sr).length>1))return qn.alphanumeric}return o?qn.text:qn.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(t.id))=="string"?"asc":"desc"},t.getSortingFn=()=>{var n,o;if(!t)throw new Error;return ei(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(o=e.options.sortingFns)==null?void 0:o[t.columnDef.sortingFn])!=null?n:qn[t.columnDef.sortingFn]},t.toggleSorting=(n,o)=>{const i=t.getNextSortingOrder(),r=typeof n<"u"&&n!==null;e.setSorting(l=>{const a=l==null?void 0:l.find(p=>p.id===t.id),d=l==null?void 0:l.findIndex(p=>p.id===t.id);let c=[],u,f=r?n:i==="desc";if(l!=null&&l.length&&t.getCanMultiSort()&&o?a?u="toggle":u="add":l!=null&&l.length&&d!==l.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(r||i||(u="remove")),u==="add"){var h;c=[...l,{id:t.id,desc:f}],c.splice(0,c.length-((h=e.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=l.map(p=>p.id===t.id?{...p,desc:f}:p):u==="remove"?c=l.filter(p=>p.id!==t.id):c=[{id:t.id,desc:f}];return c})},t.getFirstSortDir=()=>{var n,o;return((n=(o=t.columnDef.sortDescFirst)!=null?o:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=n=>{var o,i;const r=t.getFirstSortDir(),l=t.getIsSorted();return l?l!==r&&((o=e.options.enableSortingRemoval)==null||o)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:l==="desc"?"asc":"desc":r},t.getCanSort=()=>{var n,o;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((o=e.options.enableSorting)!=null?o:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var n,o;return(n=(o=t.columnDef.enableMultiSort)!=null?o:e.options.enableMultiSort)!=null?n:!!t.accessorFn},t.getIsSorted=()=>{var n;const o=(n=e.getState().sorting)==null?void 0:n.find(i=>i.id===t.id);return o?o.desc?"desc":"asc":!1},t.getSortIndex=()=>{var n,o;return(n=(o=e.getState().sorting)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.clearSorting=()=>{e.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==t.id):[])},t.getToggleSortingHandler=()=>{const n=t.getCanSort();return o=>{n&&(o.persist==null||o.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(o):!1))}}},createTable:t=>{t.setSorting=e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,o;t.setSorting(e?[]:(n=(o=t.initialState)==null?void 0:o.sorting)!=null?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},w4={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Re("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility(o=>({...o,[t.id]:n??!t.getIsVisible()}))},t.getIsVisible=()=>{var n,o;const i=t.columns;return(n=i.length?i.some(r=>r.getIsVisible()):(o=e.getState().columnVisibility)==null?void 0:o[t.id])!=null?n:!0},t.getCanHide=()=>{var n,o;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((o=e.options.enableHiding)!=null?o:!0)},t.getToggleVisibilityHandler=()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=z(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),H(e.options,"debugRows","_getAllVisibleCells")),t.getVisibleCells=z(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],H(e.options,"debugRows","getVisibleCells"))},createTable:t=>{const e=(n,o)=>z(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(r=>r.getIsVisible==null?void 0:r.getIsVisible()),H(t.options,"debugColumns",n));t.getVisibleFlatColumns=e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),t.resetColumnVisibility=n=>{var o;t.setColumnVisibility(n?{}:(o=t.initialState.columnVisibility)!=null?o:{})},t.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((i,r)=>({...i,[r.id]:n||!(r.getCanHide!=null&&r.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>n=>{var o;t.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function Xn(t,e){return e?e==="center"?t.getCenterVisibleLeafColumns():e==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const Dc=[o4,w4,c4,f4,l4,_4,a4,r4,u4,h4,i4];function C4(t){var e;(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");let n={_features:Dc};const o=n._features.reduce((u,f)=>Object.assign(u,f.getDefaultOptions==null?void 0:f.getDefaultOptions(n)),{}),i=u=>n.options.mergeOptions?n.options.mergeOptions(o,u):{...o,...u};let l={...{},...(e=t.initialState)!=null?e:{}};n._features.forEach(u=>{var f;l=(f=u.getInitialState==null?void 0:u.getInitialState(l))!=null?f:l});const a=[];let d=!1;const c={_features:Dc,options:{...o,...t},initialState:l,_queue:u=>{a.push(u),d||(d=!0,Promise.resolve().then(()=>{for(;a.length;)a.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{n.setState(n.initialState)},setOptions:u=>{const f=xt(u,n.options);n.options=i(f)},getState:()=>n.options.state,setState:u=>{n.options.onStateChange==null||n.options.onStateChange(u)},_getRowId:(u,f,h)=>{var p;return(p=n.options.getRowId==null?void 0:n.options.getRowId(u,f,h))!=null?p:`${h?[h.id,f].join("."):f}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(u,f)=>{let h=(f?n.getPrePaginationRowModel():n.getRowModel()).rowsById[u];if(!h&&(h=n.getCoreRowModel().rowsById[u],!h))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${u}`):new Error;return h},_getDefaultColumnDef:z(()=>[n.options.defaultColumn],u=>{var f;return u=(f=u)!=null?f:{},{header:h=>{const p=h.header.column.columnDef;return p.accessorKey?p.accessorKey:p.accessorFn?p.id:null},cell:h=>{var p,m;return(p=(m=h.renderValue())==null||m.toString==null?void 0:m.toString())!=null?p:null},...n._features.reduce((h,p)=>Object.assign(h,p.getDefaultColumnDef==null?void 0:p.getDefaultColumnDef()),{}),...u}},H(t,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>n.options.columns,getAllColumns:z(()=>[n._getColumnDefs()],u=>{const f=function(h,p,m){return m===void 0&&(m=0),h.map(g=>{const y=n4(n,g,m,p),b=g;return y.columns=b.columns?f(b.columns,y,m+1):[],y})};return f(u)},H(t,"debugColumns","getAllColumns")),getAllFlatColumns:z(()=>[n.getAllColumns()],u=>u.flatMap(f=>f.getFlatColumns()),H(t,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:z(()=>[n.getAllFlatColumns()],u=>u.reduce((f,h)=>(f[h.id]=h,f),{}),H(t,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:z(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(u,f)=>{let h=u.flatMap(p=>p.getLeafColumns());return f(h)},H(t,"debugColumns","getAllLeafColumns")),getColumn:u=>{const f=n._getAllFlatColumnsById()[u];return process.env.NODE_ENV!=="production"&&!f&&console.error(`[Table] Column with id '${u}' does not exist.`),f}};Object.assign(n,c);for(let u=0;u<n._features.length;u++){const f=n._features[u];f==null||f.createTable==null||f.createTable(n)}return n}function x4(t,e,n,o){const i=()=>{var l;return(l=r.getValue())!=null?l:t.options.renderFallbackValue},r={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(o),renderValue:i,getContext:z(()=>[t,n,e,r],(l,a,d,c)=>({table:l,column:a,row:d,cell:c,getValue:c.getValue,renderValue:c.renderValue}),H(t.options,"debugCells","cell.getContext"))};return t._features.forEach(l=>{l.createCell==null||l.createCell(r,n,e,t)},{}),r}const lr=(t,e,n,o,i,r,l)=>{let a={id:e,index:o,original:n,depth:i,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(a._valuesCache.hasOwnProperty(d))return a._valuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return a._valuesCache[d]=c.accessorFn(a.original,o),a._valuesCache[d]},getUniqueValues:d=>{if(a._uniqueValuesCache.hasOwnProperty(d))return a._uniqueValuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[d]=c.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[d]):(a._uniqueValuesCache[d]=[a.getValue(d)],a._uniqueValuesCache[d])},renderValue:d=>{var c;return(c=a.getValue(d))!=null?c:t.options.renderFallbackValue},subRows:r??[],getLeafRows:()=>t4(a.subRows,d=>d.subRows),getParentRow:()=>a.parentId?t.getRow(a.parentId,!0):void 0,getParentRows:()=>{let d=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;d.push(u),c=u}return d.reverse()},getAllCells:z(()=>[t.getAllLeafColumns()],d=>d.map(c=>x4(t,a,c,c.id)),H(t.options,"debugRows","getAllCells")),_getAllCellsByColumnId:z(()=>[a.getAllCells()],d=>d.reduce((c,u)=>(c[u.column.id]=u,c),{}),H(t.options,"debugRows","getAllCellsByColumnId"))};for(let d=0;d<t._features.length;d++){const c=t._features[d];c==null||c.createRow==null||c.createRow(a,t)}return a};function k4(){return t=>z(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,r,l){r===void 0&&(r=0);const a=[];for(let c=0;c<i.length;c++){const u=lr(t,t._getRowId(i[c],c,l),i[c],c,r,void 0,l==null?void 0:l.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),t.options.getSubRows){var d;u.originalSubRows=t.options.getSubRows(i[c],c),(d=u.originalSubRows)!=null&&d.length&&(u.subRows=o(u.originalSubRows,r+1,u))}}return a};return n.rows=o(e),n},H(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function S4(t,e,n){return n.options.filterFromLeafRows?v4(t,e,n):M4(t,e,n)}function v4(t,e,n){var o;const i=[],r={},l=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(d,c){c===void 0&&(c=0);const u=[];for(let h=0;h<d.length;h++){var f;let p=d[h];const m=lr(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(m.columnFilters=p.columnFilters,(f=p.subRows)!=null&&f.length&&c<l){if(m.subRows=a(p.subRows,c+1),p=m,e(p)&&!m.subRows.length){u.push(p),r[p.id]=p,i.push(p);continue}if(e(p)||m.subRows.length){u.push(p),r[p.id]=p,i.push(p);continue}}else p=m,e(p)&&(u.push(p),r[p.id]=p,i.push(p))}return u};return{rows:a(t),flatRows:i,rowsById:r}}function M4(t,e,n){var o;const i=[],r={},l=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(d,c){c===void 0&&(c=0);const u=[];for(let h=0;h<d.length;h++){let p=d[h];if(e(p)){var f;if((f=p.subRows)!=null&&f.length&&c<l){const g=lr(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);g.subRows=a(p.subRows,c+1),p=g}u.push(p),i.push(p),r[p.id]=p}}return u};return{rows:a(t),flatRows:i,rowsById:r}}function D4(){return t=>z(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,o)=>{if(!e.rows.length||!(n!=null&&n.length)&&!o){for(let h=0;h<e.flatRows.length;h++)e.flatRows[h].columnFilters={},e.flatRows[h].columnFiltersMeta={};return e}const i=[],r=[];(n??[]).forEach(h=>{var p;const m=t.getColumn(h.id);if(!m)return;const g=m.getFilterFn();if(!g){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);return}i.push({id:h.id,filterFn:g,resolvedValue:(p=g.resolveFilterValue==null?void 0:g.resolveFilterValue(h.value))!=null?p:h.value})});const l=n.map(h=>h.id),a=t.getGlobalFilterFn(),d=t.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());o&&a&&d.length&&(l.push("__global__"),d.forEach(h=>{var p;r.push({id:h.id,filterFn:a,resolvedValue:(p=a.resolveFilterValue==null?void 0:a.resolveFilterValue(o))!=null?p:o})}));let c,u;for(let h=0;h<e.flatRows.length;h++){const p=e.flatRows[h];if(p.columnFilters={},i.length)for(let m=0;m<i.length;m++){c=i[m];const g=c.id;p.columnFilters[g]=c.filterFn(p,g,c.resolvedValue,y=>{p.columnFiltersMeta[g]=y})}if(r.length){for(let m=0;m<r.length;m++){u=r[m];const g=u.id;if(u.filterFn(p,g,u.resolvedValue,y=>{p.columnFiltersMeta[g]=y})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;p<l.length;p++)if(h.columnFilters[l[p]]===!1)return!1;return!0};return S4(e.rows,f,t)},H(t.options,"debugTable","getFilteredRowModel",()=>t._autoResetPageIndex()))}function E4(){return t=>z(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const o=t.getState().sorting,i=[],r=o.filter(d=>{var c;return(c=t.getColumn(d.id))==null?void 0:c.getCanSort()}),l={};r.forEach(d=>{const c=t.getColumn(d.id);c&&(l[d.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=d=>{const c=d.map(u=>({...u}));return c.sort((u,f)=>{for(let p=0;p<r.length;p+=1){var h;const m=r[p],g=l[m.id],y=(h=m==null?void 0:m.desc)!=null?h:!1;let b=0;if(g.sortUndefined){const $=u.getValue(m.id),w=f.getValue(m.id),S=$===void 0,x=w===void 0;(S||x)&&(b=S&&x?0:S?g.sortUndefined:-g.sortUndefined)}if(b===0&&(b=g.sortingFn(u,f,m.id)),b!==0)return y&&(b*=-1),g.invertSorting&&(b*=-1),b}return u.index-f.index}),c.forEach(u=>{var f;i.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},H(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}function B4(){return t=>z(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,o)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!o?n:Ec(n),H(t.options,"debugTable","getExpandedRowModel"))}function Ec(t){const e=[],n=o=>{var i;e.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function V4(t){return e=>z(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:r}=n;let{rows:l,flatRows:a,rowsById:d}=o;const c=i*r,u=c+i;l=l.slice(c,u);let f;e.options.paginateExpandedRows?f={rows:l,flatRows:a,rowsById:d}:f=Ec({rows:l,flatRows:a,rowsById:d}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},H(e.options,"debugTable","getPaginationRowModel"))}/**
45
+ color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function H(t,e,n,o){return{debug:()=>{var i;return(i=t==null?void 0:t.debugAll)!=null?i:t[e]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function _4(t,e,n,o){const i=()=>{var l;return(l=s.getValue())!=null?l:t.options.renderFallbackValue},s={id:`${e.id}_${n.id}`,row:e,column:n,getValue:()=>e.getValue(o),renderValue:i,getContext:L(()=>[t,n,e,s],(l,a,d,c)=>({table:l,column:a,row:d,cell:c,getValue:c.getValue,renderValue:c.renderValue}),H(t.options,"debugCells","cell.getContext"))};return t._features.forEach(l=>{l.createCell==null||l.createCell(s,n,e,t)},{}),s}function w4(t,e,n,o){var i,s;const a={...t._getDefaultColumnDef(),...e},d=a.accessorKey;let c=(i=(s=a.id)!=null?s:d?d.replace(".","_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:d&&(d.includes(".")?u=h=>{let p=h;for(const g of d.split(".")){var m;p=(m=p)==null?void 0:m[g],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${g}" in deeply nested key "${d}" returned undefined.`)}return p}:u=h=>h[a.accessorKey]),!c)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(c)}`,accessorFn:u,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:L(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},H(t.options,"debugColumns","column.getFlatColumns")),getLeafColumns:L(()=>[t._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(g=>g.getLeafColumns());return h(m)}return[f]},H(t.options,"debugColumns","column.getLeafColumns"))};for(const h of t._features)h.createColumn==null||h.createColumn(f,t);return f}const Ce="debugHeaders";function Sc(t,e,n){var o;let s={id:(o=n.id)!=null?o:e.id,column:e,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const l=[],a=d=>{d.subHeaders&&d.subHeaders.length&&d.subHeaders.map(a),l.push(d)};return a(s),l},getContext:()=>({table:t,header:s,column:e})};return t._features.forEach(l=>{l.createHeader==null||l.createHeader(s,t)}),s}const C4={createTable:t=>{t.getHeaderGroups=L(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>{var s,l;const a=(s=o==null?void 0:o.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?s:[],d=(l=i==null?void 0:i.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?l:[],c=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return oi(e,[...a,...c,...d],t)},H(t.options,Ce,"getHeaderGroups")),t.getCenterHeaderGroups=L(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o,i)=>(n=n.filter(s=>!(o!=null&&o.includes(s.id))&&!(i!=null&&i.includes(s.id))),oi(e,n,t,"center")),H(t.options,Ce,"getCenterHeaderGroups")),t.getLeftHeaderGroups=L(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.left],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(l=>n.find(a=>a.id===l)).filter(Boolean))!=null?i:[];return oi(e,s,t,"left")},H(t.options,Ce,"getLeftHeaderGroups")),t.getRightHeaderGroups=L(()=>[t.getAllColumns(),t.getVisibleLeafColumns(),t.getState().columnPinning.right],(e,n,o)=>{var i;const s=(i=o==null?void 0:o.map(l=>n.find(a=>a.id===l)).filter(Boolean))!=null?i:[];return oi(e,s,t,"right")},H(t.options,Ce,"getRightHeaderGroups")),t.getFooterGroups=L(()=>[t.getHeaderGroups()],e=>[...e].reverse(),H(t.options,Ce,"getFooterGroups")),t.getLeftFooterGroups=L(()=>[t.getLeftHeaderGroups()],e=>[...e].reverse(),H(t.options,Ce,"getLeftFooterGroups")),t.getCenterFooterGroups=L(()=>[t.getCenterHeaderGroups()],e=>[...e].reverse(),H(t.options,Ce,"getCenterFooterGroups")),t.getRightFooterGroups=L(()=>[t.getRightHeaderGroups()],e=>[...e].reverse(),H(t.options,Ce,"getRightFooterGroups")),t.getFlatHeaders=L(()=>[t.getHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,Ce,"getFlatHeaders")),t.getLeftFlatHeaders=L(()=>[t.getLeftHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,Ce,"getLeftFlatHeaders")),t.getCenterFlatHeaders=L(()=>[t.getCenterHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,Ce,"getCenterFlatHeaders")),t.getRightFlatHeaders=L(()=>[t.getRightHeaderGroups()],e=>e.map(n=>n.headers).flat(),H(t.options,Ce,"getRightFlatHeaders")),t.getCenterLeafHeaders=L(()=>[t.getCenterFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,Ce,"getCenterLeafHeaders")),t.getLeftLeafHeaders=L(()=>[t.getLeftFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,Ce,"getLeftLeafHeaders")),t.getRightLeafHeaders=L(()=>[t.getRightFlatHeaders()],e=>e.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),H(t.options,Ce,"getRightLeafHeaders")),t.getLeafHeaders=L(()=>[t.getLeftHeaderGroups(),t.getCenterHeaderGroups(),t.getRightHeaderGroups()],(e,n,o)=>{var i,s,l,a,d,c;return[...(i=(s=e[0])==null?void 0:s.headers)!=null?i:[],...(l=(a=n[0])==null?void 0:a.headers)!=null?l:[],...(d=(c=o[0])==null?void 0:c.headers)!=null?d:[]].map(u=>u.getLeafHeaders()).flat()},H(t.options,Ce,"getLeafHeaders"))}};function oi(t,e,n,o){var i,s;let l=0;const a=function(h,p){p===void 0&&(p=1),l=Math.max(l,p),h.filter(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&a(m.columns,p+1)},0)};a(t);let d=[];const c=(h,p)=>{const m={depth:p,id:[o,`${p}`].filter(Boolean).join("_"),headers:[]},g=[];h.forEach(y=>{const b=[...g].reverse()[0],_=y.column.depth===m.depth;let x,$=!1;if(_&&y.column.parent?x=y.column.parent:(x=y.column,$=!0),b&&(b==null?void 0:b.column)===x)b.subHeaders.push(y);else{const w=Sc(n,x,{id:[o,p,x.id,y==null?void 0:y.id].filter(Boolean).join("_"),isPlaceholder:$,placeholderId:$?`${g.filter(P=>P.column===x).length}`:void 0,depth:p,index:g.length});w.subHeaders.push(y),g.push(w)}m.headers.push(y),y.headerGroup=m}),d.push(m),p>0&&c(g,p-1)},u=e.map((h,p)=>Sc(n,h,{depth:l,index:p}));c(u,l-1),d.reverse();const f=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,y=0,b=[0];m.subHeaders&&m.subHeaders.length?(b=[],f(m.subHeaders).forEach(x=>{let{colSpan:$,rowSpan:w}=x;g+=$,b.push(w)})):g=1;const _=Math.min(...b);return y=y+_,m.colSpan=g,m.rowSpan=y,{colSpan:g,rowSpan:y}});return f((i=(s=d[0])==null?void 0:s.headers)!=null?i:[]),d}const Jr=(t,e,n,o,i,s,l)=>{let a={id:e,index:o,original:n,depth:i,parentId:l,_valuesCache:{},_uniqueValuesCache:{},getValue:d=>{if(a._valuesCache.hasOwnProperty(d))return a._valuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return a._valuesCache[d]=c.accessorFn(a.original,o),a._valuesCache[d]},getUniqueValues:d=>{if(a._uniqueValuesCache.hasOwnProperty(d))return a._uniqueValuesCache[d];const c=t.getColumn(d);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[d]=c.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[d]):(a._uniqueValuesCache[d]=[a.getValue(d)],a._uniqueValuesCache[d])},renderValue:d=>{var c;return(c=a.getValue(d))!=null?c:t.options.renderFallbackValue},subRows:s??[],getLeafRows:()=>$4(a.subRows,d=>d.subRows),getParentRow:()=>a.parentId?t.getRow(a.parentId,!0):void 0,getParentRows:()=>{let d=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;d.push(u),c=u}return d.reverse()},getAllCells:L(()=>[t.getAllLeafColumns()],d=>d.map(c=>_4(t,a,c,c.id)),H(t.options,"debugRows","getAllCells")),_getAllCellsByColumnId:L(()=>[a.getAllCells()],d=>d.reduce((c,u)=>(c[u.column.id]=u,c),{}),H(t.options,"debugRows","getAllCellsByColumnId"))};for(let d=0;d<t._features.length;d++){const c=t._features[d];c==null||c.createRow==null||c.createRow(a,t)}return a},k4={createColumn:(t,e)=>{t._getFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,t.id),t.getFacetedRowModel=()=>t._getFacetedRowModel?t._getFacetedRowModel():e.getPreFilteredRowModel(),t._getFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,t.id),t.getFacetedUniqueValues=()=>t._getFacetedUniqueValues?t._getFacetedUniqueValues():new Map,t._getFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,t.id),t.getFacetedMinMaxValues=()=>{if(t._getFacetedMinMaxValues)return t._getFacetedMinMaxValues()}}},vc=(t,e,n)=>{var o;const i=n.toLowerCase();return!!(!((o=t.getValue(e))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};vc.autoRemove=t=>je(t);const Mc=(t,e,n)=>{var o;return!!(!((o=t.getValue(e))==null||(o=o.toString())==null)&&o.includes(n))};Mc.autoRemove=t=>je(t);const Dc=(t,e,n)=>{var o;return((o=t.getValue(e))==null||(o=o.toString())==null?void 0:o.toLowerCase())===(n==null?void 0:n.toLowerCase())};Dc.autoRemove=t=>je(t);const Ec=(t,e,n)=>{var o;return(o=t.getValue(e))==null?void 0:o.includes(n)};Ec.autoRemove=t=>je(t)||!(t!=null&&t.length);const Bc=(t,e,n)=>!n.some(o=>{var i;return!((i=t.getValue(e))!=null&&i.includes(o))});Bc.autoRemove=t=>je(t)||!(t!=null&&t.length);const Vc=(t,e,n)=>n.some(o=>{var i;return(i=t.getValue(e))==null?void 0:i.includes(o)});Vc.autoRemove=t=>je(t)||!(t!=null&&t.length);const Pc=(t,e,n)=>t.getValue(e)===n;Pc.autoRemove=t=>je(t);const Fc=(t,e,n)=>t.getValue(e)==n;Fc.autoRemove=t=>je(t);const Qr=(t,e,n)=>{let[o,i]=n;const s=t.getValue(e);return s>=o&&s<=i};Qr.resolveFilterValue=t=>{let[e,n]=t,o=typeof e!="number"?parseFloat(e):e,i=typeof n!="number"?parseFloat(n):n,s=e===null||Number.isNaN(o)?-1/0:o,l=n===null||Number.isNaN(i)?1/0:i;if(s>l){const a=s;s=l,l=a}return[s,l]},Qr.autoRemove=t=>je(t)||je(t[0])&&je(t[1]);const ft={includesString:vc,includesStringSensitive:Mc,equalsString:Dc,arrIncludes:Ec,arrIncludesAll:Bc,arrIncludesSome:Vc,equals:Pc,weakEquals:Fc,inNumberRange:Qr};function je(t){return t==null||t===""}const x4={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:t=>({columnFilters:[],...t}),getDefaultOptions:t=>({onColumnFiltersChange:Re("columnFilters",t),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(t,e)=>{t.getAutoFilterFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);return typeof o=="string"?ft.includesString:typeof o=="number"?ft.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?ft.equals:Array.isArray(o)?ft.arrIncludes:ft.weakEquals},t.getFilterFn=()=>{var n,o;return ni(t.columnDef.filterFn)?t.columnDef.filterFn:t.columnDef.filterFn==="auto"?t.getAutoFilterFn():(n=(o=e.options.filterFns)==null?void 0:o[t.columnDef.filterFn])!=null?n:ft[t.columnDef.filterFn]},t.getCanFilter=()=>{var n,o,i;return((n=t.columnDef.enableColumnFilter)!=null?n:!0)&&((o=e.options.enableColumnFilters)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&!!t.accessorFn},t.getIsFiltered=()=>t.getFilterIndex()>-1,t.getFilterValue=()=>{var n;return(n=e.getState().columnFilters)==null||(n=n.find(o=>o.id===t.id))==null?void 0:n.value},t.getFilterIndex=()=>{var n,o;return(n=(o=e.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.setFilterValue=n=>{e.setColumnFilters(o=>{const i=t.getFilterFn(),s=o==null?void 0:o.find(u=>u.id===t.id),l=St(n,s?s.value:void 0);if(Rc(i,l,t)){var a;return(a=o==null?void 0:o.filter(u=>u.id!==t.id))!=null?a:[]}const d={id:t.id,value:l};if(s){var c;return(c=o==null?void 0:o.map(u=>u.id===t.id?d:u))!=null?c:[]}return o!=null&&o.length?[...o,d]:[d]})}},createRow:(t,e)=>{t.columnFilters={},t.columnFiltersMeta={}},createTable:t=>{t.setColumnFilters=e=>{const n=t.getAllLeafColumns(),o=i=>{var s;return(s=St(e,i))==null?void 0:s.filter(l=>{const a=n.find(d=>d.id===l.id);if(a){const d=a.getFilterFn();if(Rc(d,l.value,a))return!1}return!0})};t.options.onColumnFiltersChange==null||t.options.onColumnFiltersChange(o)},t.resetColumnFilters=e=>{var n,o;t.setColumnFilters(e?[]:(n=(o=t.initialState)==null?void 0:o.columnFilters)!=null?n:[])},t.getPreFilteredRowModel=()=>t.getCoreRowModel(),t.getFilteredRowModel=()=>(!t._getFilteredRowModel&&t.options.getFilteredRowModel&&(t._getFilteredRowModel=t.options.getFilteredRowModel(t)),t.options.manualFiltering||!t._getFilteredRowModel?t.getPreFilteredRowModel():t._getFilteredRowModel())}};function Rc(t,e,n){return(t&&t.autoRemove?t.autoRemove(e,n):!1)||typeof e>"u"||typeof e=="string"&&!e}const es={sum:(t,e,n)=>n.reduce((o,i)=>{const s=i.getValue(t);return o+(typeof s=="number"?s:0)},0),min:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o>s||o===void 0&&s>=s)&&(o=s)}),o},max:(t,e,n)=>{let o;return n.forEach(i=>{const s=i.getValue(t);s!=null&&(o<s||o===void 0&&s>=s)&&(o=s)}),o},extent:(t,e,n)=>{let o,i;return n.forEach(s=>{const l=s.getValue(t);l!=null&&(o===void 0?l>=l&&(o=i=l):(o>l&&(o=l),i<l&&(i=l)))}),[o,i]},mean:(t,e)=>{let n=0,o=0;if(e.forEach(i=>{let s=i.getValue(t);s!=null&&(s=+s)>=s&&(++n,o+=s)}),n)return o/n},median:(t,e)=>{if(!e.length)return;const n=e.map(s=>s.getValue(t));if(!b4(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((s,l)=>s-l);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},unique:(t,e)=>Array.from(new Set(e.map(n=>n.getValue(t))).values()),uniqueCount:(t,e)=>new Set(e.map(n=>n.getValue(t))).size,count:(t,e)=>e.length},S4={getDefaultColumnDef:()=>({aggregatedCell:t=>{var e,n;return(e=(n=t.getValue())==null||n.toString==null?void 0:n.toString())!=null?e:null},aggregationFn:"auto"}),getInitialState:t=>({grouping:[],...t}),getDefaultOptions:t=>({onGroupingChange:Re("grouping",t),groupedColumnMode:"reorder"}),createColumn:(t,e)=>{t.toggleGrouping=()=>{e.setGrouping(n=>n!=null&&n.includes(t.id)?n.filter(o=>o!==t.id):[...n??[],t.id])},t.getCanGroup=()=>{var n,o;return((n=t.columnDef.enableGrouping)!=null?n:!0)&&((o=e.options.enableGrouping)!=null?o:!0)&&(!!t.accessorFn||!!t.columnDef.getGroupingValue)},t.getIsGrouped=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.includes(t.id)},t.getGroupedIndex=()=>{var n;return(n=e.getState().grouping)==null?void 0:n.indexOf(t.id)},t.getToggleGroupingHandler=()=>{const n=t.getCanGroup();return()=>{n&&t.toggleGrouping()}},t.getAutoAggregationFn=()=>{const n=e.getCoreRowModel().flatRows[0],o=n==null?void 0:n.getValue(t.id);if(typeof o=="number")return es.sum;if(Object.prototype.toString.call(o)==="[object Date]")return es.extent},t.getAggregationFn=()=>{var n,o;if(!t)throw new Error;return ni(t.columnDef.aggregationFn)?t.columnDef.aggregationFn:t.columnDef.aggregationFn==="auto"?t.getAutoAggregationFn():(n=(o=e.options.aggregationFns)==null?void 0:o[t.columnDef.aggregationFn])!=null?n:es[t.columnDef.aggregationFn]}},createTable:t=>{t.setGrouping=e=>t.options.onGroupingChange==null?void 0:t.options.onGroupingChange(e),t.resetGrouping=e=>{var n,o;t.setGrouping(e?[]:(n=(o=t.initialState)==null?void 0:o.grouping)!=null?n:[])},t.getPreGroupedRowModel=()=>t.getFilteredRowModel(),t.getGroupedRowModel=()=>(!t._getGroupedRowModel&&t.options.getGroupedRowModel&&(t._getGroupedRowModel=t.options.getGroupedRowModel(t)),t.options.manualGrouping||!t._getGroupedRowModel?t.getPreGroupedRowModel():t._getGroupedRowModel())},createRow:(t,e)=>{t.getIsGrouped=()=>!!t.groupingColumnId,t.getGroupingValue=n=>{if(t._groupingValuesCache.hasOwnProperty(n))return t._groupingValuesCache[n];const o=e.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(t._groupingValuesCache[n]=o.columnDef.getGroupingValue(t.original),t._groupingValuesCache[n]):t.getValue(n)},t._groupingValuesCache={}},createCell:(t,e,n,o)=>{t.getIsGrouped=()=>e.getIsGrouped()&&e.id===n.groupingColumnId,t.getIsPlaceholder=()=>!t.getIsGrouped()&&e.getIsGrouped(),t.getIsAggregated=()=>{var i;return!t.getIsGrouped()&&!t.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function v4(t,e,n){if(!(e!=null&&e.length)||!n)return t;const o=t.filter(s=>!e.includes(s.id));return n==="remove"?o:[...e.map(s=>t.find(l=>l.id===s)).filter(Boolean),...o]}const M4={getInitialState:t=>({columnOrder:[],...t}),getDefaultOptions:t=>({onColumnOrderChange:Re("columnOrder",t)}),createColumn:(t,e)=>{t.getIndex=L(n=>[Kn(e,n)],n=>n.findIndex(o=>o.id===t.id),H(e.options,"debugColumns","getIndex")),t.getIsFirstColumn=n=>{var o;return((o=Kn(e,n)[0])==null?void 0:o.id)===t.id},t.getIsLastColumn=n=>{var o;const i=Kn(e,n);return((o=i[i.length-1])==null?void 0:o.id)===t.id}},createTable:t=>{t.setColumnOrder=e=>t.options.onColumnOrderChange==null?void 0:t.options.onColumnOrderChange(e),t.resetColumnOrder=e=>{var n;t.setColumnOrder(e?[]:(n=t.initialState.columnOrder)!=null?n:[])},t._getOrderColumnsFn=L(()=>[t.getState().columnOrder,t.getState().grouping,t.options.groupedColumnMode],(e,n,o)=>i=>{let s=[];if(!(e!=null&&e.length))s=i;else{const l=[...e],a=[...i];for(;a.length&&l.length;){const d=l.shift(),c=a.findIndex(u=>u.id===d);c>-1&&s.push(a.splice(c,1)[0])}s=[...s,...a]}return v4(s,n,o)},H(t.options,"debugTable","_getOrderColumnsFn"))}},ts=()=>({left:[],right:[]}),D4={getInitialState:t=>({columnPinning:ts(),...t}),getDefaultOptions:t=>({onColumnPinningChange:Re("columnPinning",t)}),createColumn:(t,e)=>{t.pin=n=>{const o=t.getLeafColumns().map(i=>i.id).filter(Boolean);e.setColumnPinning(i=>{var s,l;if(n==="right"){var a,d;return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((d=i==null?void 0:i.right)!=null?d:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var c,u;return{left:[...((c=i==null?void 0:i.left)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((u=i==null?void 0:i.right)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(f=>!(o!=null&&o.includes(f))),right:((l=i==null?void 0:i.right)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f)))}})},t.getCanPin=()=>t.getLeafColumns().some(o=>{var i,s,l;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((s=(l=e.options.enableColumnPinning)!=null?l:e.options.enablePinning)!=null?s:!0)}),t.getIsPinned=()=>{const n=t.getLeafColumns().map(a=>a.id),{left:o,right:i}=e.getState().columnPinning,s=n.some(a=>o==null?void 0:o.includes(a)),l=n.some(a=>i==null?void 0:i.includes(a));return s?"left":l?"right":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();return i?(n=(o=e.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(t.id))!=null?n:-1:0}},createRow:(t,e)=>{t.getCenterVisibleCells=L(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,o,i)=>{const s=[...o??[],...i??[]];return n.filter(l=>!s.includes(l.column.id))},H(e.options,"debugRows","getCenterVisibleCells")),t.getLeftVisibleCells=L(()=>[t._getAllVisibleCells(),e.getState().columnPinning.left],(n,o)=>(o??[]).map(s=>n.find(l=>l.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),H(e.options,"debugRows","getLeftVisibleCells")),t.getRightVisibleCells=L(()=>[t._getAllVisibleCells(),e.getState().columnPinning.right],(n,o)=>(o??[]).map(s=>n.find(l=>l.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),H(e.options,"debugRows","getRightVisibleCells"))},createTable:t=>{t.setColumnPinning=e=>t.options.onColumnPinningChange==null?void 0:t.options.onColumnPinningChange(e),t.resetColumnPinning=e=>{var n,o;return t.setColumnPinning(e?ts():(n=(o=t.initialState)==null?void 0:o.columnPinning)!=null?n:ts())},t.getIsSomeColumnsPinned=e=>{var n;const o=t.getState().columnPinning;if(!e){var i,s;return!!((i=o.left)!=null&&i.length||(s=o.right)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t.getLeftLeafColumns=L(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),H(t.options,"debugColumns","getLeftLeafColumns")),t.getRightLeafColumns=L(()=>[t.getAllLeafColumns(),t.getState().columnPinning.right],(e,n)=>(n??[]).map(o=>e.find(i=>i.id===o)).filter(Boolean),H(t.options,"debugColumns","getRightLeafColumns")),t.getCenterLeafColumns=L(()=>[t.getAllLeafColumns(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,n,o)=>{const i=[...n??[],...o??[]];return e.filter(s=>!i.includes(s.id))},H(t.options,"debugColumns","getCenterLeafColumns"))}},ii={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ns=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),E4={getDefaultColumnDef:()=>ii,getInitialState:t=>({columnSizing:{},columnSizingInfo:ns(),...t}),getDefaultOptions:t=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Re("columnSizing",t),onColumnSizingInfoChange:Re("columnSizingInfo",t)}),createColumn:(t,e)=>{t.getSize=()=>{var n,o,i;const s=e.getState().columnSizing[t.id];return Math.min(Math.max((n=t.columnDef.minSize)!=null?n:ii.minSize,(o=s??t.columnDef.size)!=null?o:ii.size),(i=t.columnDef.maxSize)!=null?i:ii.maxSize)},t.getStart=L(n=>[n,Kn(e,n),e.getState().columnSizing],(n,o)=>o.slice(0,t.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),H(e.options,"debugColumns","getStart")),t.getAfter=L(n=>[n,Kn(e,n),e.getState().columnSizing],(n,o)=>o.slice(t.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),H(e.options,"debugColumns","getAfter")),t.resetSize=()=>{e.setColumnSizing(n=>{let{[t.id]:o,...i}=n;return i})},t.getCanResize=()=>{var n,o;return((n=t.columnDef.enableResizing)!=null?n:!0)&&((o=e.options.enableColumnResizing)!=null?o:!0)},t.getIsResizing=()=>e.getState().columnSizingInfo.isResizingColumn===t.id},createHeader:(t,e)=>{t.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return o(t),n},t.getStart=()=>{if(t.index>0){const n=t.headerGroup.headers[t.index-1];return n.getStart()+n.getSize()}return 0},t.getResizeHandler=n=>{const o=e.getColumn(t.column.id),i=o==null?void 0:o.getCanResize();return s=>{if(!o||!i||(s.persist==null||s.persist(),os(s)&&s.touches&&s.touches.length>1))return;const l=t.getSize(),a=t?t.getLeafHeaders().map(b=>[b.column.id,b.column.getSize()]):[[o.id,o.getSize()]],d=os(s)?Math.round(s.touches[0].clientX):s.clientX,c={},u=(b,_)=>{typeof _=="number"&&(e.setColumnSizingInfo(x=>{var $,w;const P=e.options.columnResizeDirection==="rtl"?-1:1,M=(_-(($=x==null?void 0:x.startOffset)!=null?$:0))*P,N=Math.max(M/((w=x==null?void 0:x.startSize)!=null?w:0),-.999999);return x.columnSizingStart.forEach(V=>{let[B,k]=V;c[B]=Math.round(Math.max(k+k*N,0)*100)/100}),{...x,deltaOffset:M,deltaPercentage:N}}),(e.options.columnResizeMode==="onChange"||b==="end")&&e.setColumnSizing(x=>({...x,...c})))},f=b=>u("move",b),h=b=>{u("end",b),e.setColumnSizingInfo(_=>({..._,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,m={moveHandler:b=>f(b.clientX),upHandler:b=>{p==null||p.removeEventListener("mousemove",m.moveHandler),p==null||p.removeEventListener("mouseup",m.upHandler),h(b.clientX)}},g={moveHandler:b=>(b.cancelable&&(b.preventDefault(),b.stopPropagation()),f(b.touches[0].clientX),!1),upHandler:b=>{var _;p==null||p.removeEventListener("touchmove",g.moveHandler),p==null||p.removeEventListener("touchend",g.upHandler),b.cancelable&&(b.preventDefault(),b.stopPropagation()),h((_=b.touches[0])==null?void 0:_.clientX)}},y=B4()?{passive:!1}:!1;os(s)?(p==null||p.addEventListener("touchmove",g.moveHandler,y),p==null||p.addEventListener("touchend",g.upHandler,y)):(p==null||p.addEventListener("mousemove",m.moveHandler,y),p==null||p.addEventListener("mouseup",m.upHandler,y)),e.setColumnSizingInfo(b=>({...b,startOffset:d,startSize:l,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:o.id}))}}},createTable:t=>{t.setColumnSizing=e=>t.options.onColumnSizingChange==null?void 0:t.options.onColumnSizingChange(e),t.setColumnSizingInfo=e=>t.options.onColumnSizingInfoChange==null?void 0:t.options.onColumnSizingInfoChange(e),t.resetColumnSizing=e=>{var n;t.setColumnSizing(e?{}:(n=t.initialState.columnSizing)!=null?n:{})},t.resetHeaderSizeInfo=e=>{var n;t.setColumnSizingInfo(e?ns():(n=t.initialState.columnSizingInfo)!=null?n:ns())},t.getTotalSize=()=>{var e,n;return(e=(n=t.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getLeftTotalSize=()=>{var e,n;return(e=(n=t.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getCenterTotalSize=()=>{var e,n;return(e=(n=t.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0},t.getRightTotalSize=()=>{var e,n;return(e=(n=t.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?e:0}}};let ri=null;function B4(){if(typeof ri=="boolean")return ri;let t=!1;try{const e={get passive(){return t=!0,!1}},n=()=>{};window.addEventListener("test",n,e),window.removeEventListener("test",n)}catch{t=!1}return ri=t,ri}function os(t){return t.type==="touchstart"}const V4={getInitialState:t=>({columnVisibility:{},...t}),getDefaultOptions:t=>({onColumnVisibilityChange:Re("columnVisibility",t)}),createColumn:(t,e)=>{t.toggleVisibility=n=>{t.getCanHide()&&e.setColumnVisibility(o=>({...o,[t.id]:n??!t.getIsVisible()}))},t.getIsVisible=()=>{var n,o;const i=t.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(o=e.getState().columnVisibility)==null?void 0:o[t.id])!=null?n:!0},t.getCanHide=()=>{var n,o;return((n=t.columnDef.enableHiding)!=null?n:!0)&&((o=e.options.enableHiding)!=null?o:!0)},t.getToggleVisibilityHandler=()=>n=>{t.toggleVisibility==null||t.toggleVisibility(n.target.checked)}},createRow:(t,e)=>{t._getAllVisibleCells=L(()=>[t.getAllCells(),e.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),H(e.options,"debugRows","_getAllVisibleCells")),t.getVisibleCells=L(()=>[t.getLeftVisibleCells(),t.getCenterVisibleCells(),t.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],H(e.options,"debugRows","getVisibleCells"))},createTable:t=>{const e=(n,o)=>L(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),H(t.options,"debugColumns",n));t.getVisibleFlatColumns=e("getVisibleFlatColumns",()=>t.getAllFlatColumns()),t.getVisibleLeafColumns=e("getVisibleLeafColumns",()=>t.getAllLeafColumns()),t.getLeftVisibleLeafColumns=e("getLeftVisibleLeafColumns",()=>t.getLeftLeafColumns()),t.getRightVisibleLeafColumns=e("getRightVisibleLeafColumns",()=>t.getRightLeafColumns()),t.getCenterVisibleLeafColumns=e("getCenterVisibleLeafColumns",()=>t.getCenterLeafColumns()),t.setColumnVisibility=n=>t.options.onColumnVisibilityChange==null?void 0:t.options.onColumnVisibilityChange(n),t.resetColumnVisibility=n=>{var o;t.setColumnVisibility(n?{}:(o=t.initialState.columnVisibility)!=null?o:{})},t.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!t.getIsAllColumnsVisible(),t.setColumnVisibility(t.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},t.getIsAllColumnsVisible=()=>!t.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),t.getIsSomeColumnsVisible=()=>t.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),t.getToggleAllColumnsVisibilityHandler=()=>n=>{var o;t.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function Kn(t,e){return e?e==="center"?t.getCenterVisibleLeafColumns():e==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns()}const P4={createTable:t=>{t._getGlobalFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,"__global__"),t.getGlobalFacetedRowModel=()=>t.options.manualFiltering||!t._getGlobalFacetedRowModel?t.getPreFilteredRowModel():t._getGlobalFacetedRowModel(),t._getGlobalFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,"__global__"),t.getGlobalFacetedUniqueValues=()=>t._getGlobalFacetedUniqueValues?t._getGlobalFacetedUniqueValues():new Map,t._getGlobalFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,"__global__"),t.getGlobalFacetedMinMaxValues=()=>{if(t._getGlobalFacetedMinMaxValues)return t._getGlobalFacetedMinMaxValues()}}},F4={getInitialState:t=>({globalFilter:void 0,...t}),getDefaultOptions:t=>({onGlobalFilterChange:Re("globalFilter",t),globalFilterFn:"auto",getColumnCanGlobalFilter:e=>{var n;const o=(n=t.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[e.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(t,e)=>{t.getCanGlobalFilter=()=>{var n,o,i,s;return((n=t.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=e.options.enableGlobalFilter)!=null?o:!0)&&((i=e.options.enableFilters)!=null?i:!0)&&((s=e.options.getColumnCanGlobalFilter==null?void 0:e.options.getColumnCanGlobalFilter(t))!=null?s:!0)&&!!t.accessorFn}},createTable:t=>{t.getGlobalAutoFilterFn=()=>ft.includesString,t.getGlobalFilterFn=()=>{var e,n;const{globalFilterFn:o}=t.options;return ni(o)?o:o==="auto"?t.getGlobalAutoFilterFn():(e=(n=t.options.filterFns)==null?void 0:n[o])!=null?e:ft[o]},t.setGlobalFilter=e=>{t.options.onGlobalFilterChange==null||t.options.onGlobalFilterChange(e)},t.resetGlobalFilter=e=>{t.setGlobalFilter(e?void 0:t.initialState.globalFilter)}}},R4={getInitialState:t=>({expanded:{},...t}),getDefaultOptions:t=>({onExpandedChange:Re("expanded",t),paginateExpandedRows:!0}),createTable:t=>{let e=!1,n=!1;t._autoResetExpanded=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetExpanded)!=null?o:!t.options.manualExpanding){if(n)return;n=!0,t._queue(()=>{t.resetExpanded(),n=!1})}},t.setExpanded=o=>t.options.onExpandedChange==null?void 0:t.options.onExpandedChange(o),t.toggleAllRowsExpanded=o=>{o??!t.getIsAllRowsExpanded()?t.setExpanded(!0):t.setExpanded({})},t.resetExpanded=o=>{var i,s;t.setExpanded(o?{}:(i=(s=t.initialState)==null?void 0:s.expanded)!=null?i:{})},t.getCanSomeRowsExpand=()=>t.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),t.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),t.toggleAllRowsExpanded()},t.getIsSomeRowsExpanded=()=>{const o=t.getState().expanded;return o===!0||Object.values(o).some(Boolean)},t.getIsAllRowsExpanded=()=>{const o=t.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||t.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},t.getExpandedDepth=()=>{let o=0;return(t.getState().expanded===!0?Object.keys(t.getRowModel().rowsById):Object.keys(t.getState().expanded)).forEach(s=>{const l=s.split(".");o=Math.max(o,l.length)}),o},t.getPreExpandedRowModel=()=>t.getSortedRowModel(),t.getExpandedRowModel=()=>(!t._getExpandedRowModel&&t.options.getExpandedRowModel&&(t._getExpandedRowModel=t.options.getExpandedRowModel(t)),t.options.manualExpanding||!t._getExpandedRowModel?t.getPreExpandedRowModel():t._getExpandedRowModel())},createRow:(t,e)=>{t.toggleExpanded=n=>{e.setExpanded(o=>{var i;const s=o===!0?!0:!!(o!=null&&o[t.id]);let l={};if(o===!0?Object.keys(e.getRowModel().rowsById).forEach(a=>{l[a]=!0}):l=o,n=(i=n)!=null?i:!s,!s&&n)return{...l,[t.id]:!0};if(s&&!n){const{[t.id]:a,...d}=l;return d}return o})},t.getIsExpanded=()=>{var n;const o=e.getState().expanded;return!!((n=e.options.getIsRowExpanded==null?void 0:e.options.getIsRowExpanded(t))!=null?n:o===!0||o!=null&&o[t.id])},t.getCanExpand=()=>{var n,o,i;return(n=e.options.getRowCanExpand==null?void 0:e.options.getRowCanExpand(t))!=null?n:((o=e.options.enableExpanding)!=null?o:!0)&&!!((i=t.subRows)!=null&&i.length)},t.getIsAllParentsExpanded=()=>{let n=!0,o=t;for(;n&&o.parentId;)o=e.getRow(o.parentId,!0),n=o.getIsExpanded();return n},t.getToggleExpandedHandler=()=>{const n=t.getCanExpand();return()=>{n&&t.toggleExpanded()}}}},is=0,rs=10,ss=()=>({pageIndex:is,pageSize:rs}),N4={getInitialState:t=>({...t,pagination:{...ss(),...t==null?void 0:t.pagination}}),getDefaultOptions:t=>({onPaginationChange:Re("pagination",t)}),createTable:t=>{let e=!1,n=!1;t._autoResetPageIndex=()=>{var o,i;if(!e){t._queue(()=>{e=!0});return}if((o=(i=t.options.autoResetAll)!=null?i:t.options.autoResetPageIndex)!=null?o:!t.options.manualPagination){if(n)return;n=!0,t._queue(()=>{t.resetPageIndex(),n=!1})}},t.setPagination=o=>{const i=s=>St(o,s);return t.options.onPaginationChange==null?void 0:t.options.onPaginationChange(i)},t.resetPagination=o=>{var i;t.setPagination(o?ss():(i=t.initialState.pagination)!=null?i:ss())},t.setPageIndex=o=>{t.setPagination(i=>{let s=St(o,i.pageIndex);const l=typeof t.options.pageCount>"u"||t.options.pageCount===-1?Number.MAX_SAFE_INTEGER:t.options.pageCount-1;return s=Math.max(0,Math.min(s,l)),{...i,pageIndex:s}})},t.resetPageIndex=o=>{var i,s;t.setPageIndex(o?is:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:is)},t.resetPageSize=o=>{var i,s;t.setPageSize(o?rs:(i=(s=t.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:rs)},t.setPageSize=o=>{t.setPagination(i=>{const s=Math.max(1,St(o,i.pageSize)),l=i.pageSize*i.pageIndex,a=Math.floor(l/s);return{...i,pageIndex:a,pageSize:s}})},t.setPageCount=o=>t.setPagination(i=>{var s;let l=St(o,(s=t.options.pageCount)!=null?s:-1);return typeof l=="number"&&(l=Math.max(-1,l)),{...i,pageCount:l}}),t.getPageOptions=L(()=>[t.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((s,l)=>l)),i},H(t.options,"debugTable","getPageOptions")),t.getCanPreviousPage=()=>t.getState().pagination.pageIndex>0,t.getCanNextPage=()=>{const{pageIndex:o}=t.getState().pagination,i=t.getPageCount();return i===-1?!0:i===0?!1:o<i-1},t.previousPage=()=>t.setPageIndex(o=>o-1),t.nextPage=()=>t.setPageIndex(o=>o+1),t.firstPage=()=>t.setPageIndex(0),t.lastPage=()=>t.setPageIndex(t.getPageCount()-1),t.getPrePaginationRowModel=()=>t.getExpandedRowModel(),t.getPaginationRowModel=()=>(!t._getPaginationRowModel&&t.options.getPaginationRowModel&&(t._getPaginationRowModel=t.options.getPaginationRowModel(t)),t.options.manualPagination||!t._getPaginationRowModel?t.getPrePaginationRowModel():t._getPaginationRowModel()),t.getPageCount=()=>{var o;return(o=t.options.pageCount)!=null?o:Math.ceil(t.getRowCount()/t.getState().pagination.pageSize)},t.getRowCount=()=>{var o;return(o=t.options.rowCount)!=null?o:t.getPrePaginationRowModel().rows.length}}},ls=()=>({top:[],bottom:[]}),A4={getInitialState:t=>({rowPinning:ls(),...t}),getDefaultOptions:t=>({onRowPinningChange:Re("rowPinning",t)}),createRow:(t,e)=>{t.pin=(n,o,i)=>{const s=o?t.getLeafRows().map(d=>{let{id:c}=d;return c}):[],l=i?t.getParentRows().map(d=>{let{id:c}=d;return c}):[],a=new Set([...l,t.id,...s]);e.setRowPinning(d=>{var c,u;if(n==="bottom"){var f,h;return{top:((f=d==null?void 0:d.top)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((h=d==null?void 0:d.bottom)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var p,m;return{top:[...((p=d==null?void 0:d.top)!=null?p:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((m=d==null?void 0:d.bottom)!=null?m:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((c=d==null?void 0:d.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=d==null?void 0:d.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},t.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:i}=e.options;return typeof o=="function"?o(t):(n=o??i)!=null?n:!0},t.getIsPinned=()=>{const n=[t.id],{top:o,bottom:i}=e.getState().rowPinning,s=n.some(a=>o==null?void 0:o.includes(a)),l=n.some(a=>i==null?void 0:i.includes(a));return s?"top":l?"bottom":!1},t.getPinnedIndex=()=>{var n,o;const i=t.getIsPinned();if(!i)return-1;const s=(n=e._getPinnedRows(i))==null?void 0:n.map(l=>{let{id:a}=l;return a});return(o=s==null?void 0:s.indexOf(t.id))!=null?o:-1}},createTable:t=>{t.setRowPinning=e=>t.options.onRowPinningChange==null?void 0:t.options.onRowPinningChange(e),t.resetRowPinning=e=>{var n,o;return t.setRowPinning(e?ls():(n=(o=t.initialState)==null?void 0:o.rowPinning)!=null?n:ls())},t.getIsSomeRowsPinned=e=>{var n;const o=t.getState().rowPinning;if(!e){var i,s;return!!((i=o.top)!=null&&i.length||(s=o.bottom)!=null&&s.length)}return!!((n=o[e])!=null&&n.length)},t._getPinnedRows=L(e=>[t.getRowModel().rows,t.getState().rowPinning[e],e],(e,n,o)=>{var i;return((i=t.options.keepPinnedRows)==null||i?(n??[]).map(l=>{const a=t.getRow(l,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(l=>e.find(a=>a.id===l))).filter(Boolean).map(l=>({...l,position:o}))},H(t.options,"debugRows","_getPinnedRows")),t.getTopRows=()=>t._getPinnedRows("top"),t.getBottomRows=()=>t._getPinnedRows("bottom"),t.getCenterRows=L(()=>[t.getRowModel().rows,t.getState().rowPinning.top,t.getState().rowPinning.bottom],(e,n,o)=>{const i=new Set([...n??[],...o??[]]);return e.filter(s=>!i.has(s.id))},H(t.options,"debugRows","getCenterRows"))}},O4={getInitialState:t=>({rowSelection:{},...t}),getDefaultOptions:t=>({onRowSelectionChange:Re("rowSelection",t),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:t=>{t.setRowSelection=e=>t.options.onRowSelectionChange==null?void 0:t.options.onRowSelectionChange(e),t.resetRowSelection=e=>{var n;return t.setRowSelection(e?{}:(n=t.initialState.rowSelection)!=null?n:{})},t.toggleAllRowsSelected=e=>{t.setRowSelection(n=>{e=typeof e<"u"?e:!t.getIsAllRowsSelected();const o={...n},i=t.getPreGroupedRowModel().flatRows;return e?i.forEach(s=>{s.getCanSelect()&&(o[s.id]=!0)}):i.forEach(s=>{delete o[s.id]}),o})},t.toggleAllPageRowsSelected=e=>t.setRowSelection(n=>{const o=typeof e<"u"?e:!t.getIsAllPageRowsSelected(),i={...n};return t.getRowModel().rows.forEach(s=>{as(i,s.id,o,!0,t)}),i}),t.getPreSelectedRowModel=()=>t.getCoreRowModel(),t.getSelectedRowModel=L(()=>[t.getState().rowSelection,t.getCoreRowModel()],(e,n)=>Object.keys(e).length?ds(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getSelectedRowModel")),t.getFilteredSelectedRowModel=L(()=>[t.getState().rowSelection,t.getFilteredRowModel()],(e,n)=>Object.keys(e).length?ds(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getFilteredSelectedRowModel")),t.getGroupedSelectedRowModel=L(()=>[t.getState().rowSelection,t.getSortedRowModel()],(e,n)=>Object.keys(e).length?ds(t,n):{rows:[],flatRows:[],rowsById:{}},H(t.options,"debugTable","getGroupedSelectedRowModel")),t.getIsAllRowsSelected=()=>{const e=t.getFilteredRowModel().flatRows,{rowSelection:n}=t.getState();let o=!!(e.length&&Object.keys(n).length);return o&&e.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},t.getIsAllPageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=t.getState();let o=!!e.length;return o&&e.some(i=>!n[i.id])&&(o=!1),o},t.getIsSomeRowsSelected=()=>{var e;const n=Object.keys((e=t.getState().rowSelection)!=null?e:{}).length;return n>0&&n<t.getFilteredRowModel().flatRows.length},t.getIsSomePageRowsSelected=()=>{const e=t.getPaginationRowModel().flatRows;return t.getIsAllPageRowsSelected()?!1:e.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},t.getToggleAllRowsSelectedHandler=()=>e=>{t.toggleAllRowsSelected(e.target.checked)},t.getToggleAllPageRowsSelectedHandler=()=>e=>{t.toggleAllPageRowsSelected(e.target.checked)}},createRow:(t,e)=>{t.toggleSelected=(n,o)=>{const i=t.getIsSelected();e.setRowSelection(s=>{var l;if(n=typeof n<"u"?n:!i,t.getCanSelect()&&i===n)return s;const a={...s};return as(a,t.id,n,(l=o==null?void 0:o.selectChildren)!=null?l:!0,e),a})},t.getIsSelected=()=>{const{rowSelection:n}=e.getState();return cs(t,n)},t.getIsSomeSelected=()=>{const{rowSelection:n}=e.getState();return us(t,n)==="some"},t.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=e.getState();return us(t,n)==="all"},t.getCanSelect=()=>{var n;return typeof e.options.enableRowSelection=="function"?e.options.enableRowSelection(t):(n=e.options.enableRowSelection)!=null?n:!0},t.getCanSelectSubRows=()=>{var n;return typeof e.options.enableSubRowSelection=="function"?e.options.enableSubRowSelection(t):(n=e.options.enableSubRowSelection)!=null?n:!0},t.getCanMultiSelect=()=>{var n;return typeof e.options.enableMultiRowSelection=="function"?e.options.enableMultiRowSelection(t):(n=e.options.enableMultiRowSelection)!=null?n:!0},t.getToggleSelectedHandler=()=>{const n=t.getCanSelect();return o=>{var i;n&&t.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},as=(t,e,n,o,i)=>{var s;const l=i.getRow(e,!0);n?(l.getCanMultiSelect()||Object.keys(t).forEach(a=>delete t[a]),l.getCanSelect()&&(t[e]=!0)):delete t[e],o&&(s=l.subRows)!=null&&s.length&&l.getCanSelectSubRows()&&l.subRows.forEach(a=>as(t,a.id,n,o,i))};function ds(t,e){const n=t.getState().rowSelection,o=[],i={},s=function(l,a){return l.map(d=>{var c;const u=cs(d,n);if(u&&(o.push(d),i[d.id]=d),(c=d.subRows)!=null&&c.length&&(d={...d,subRows:s(d.subRows)}),u)return d}).filter(Boolean)};return{rows:s(e.rows),flatRows:o,rowsById:i}}function cs(t,e){var n;return(n=e[t.id])!=null?n:!1}function us(t,e,n){var o;if(!((o=t.subRows)!=null&&o.length))return!1;let i=!0,s=!1;return t.subRows.forEach(l=>{if(!(s&&!i)&&(l.getCanSelect()&&(cs(l,e)?s=!0:i=!1),l.subRows&&l.subRows.length)){const a=us(l,e);a==="all"?s=!0:(a==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const fs=/([0-9]+)/gm,I4=(t,e,n)=>Nc(vt(t.getValue(n)).toLowerCase(),vt(e.getValue(n)).toLowerCase()),T4=(t,e,n)=>Nc(vt(t.getValue(n)),vt(e.getValue(n))),z4=(t,e,n)=>hs(vt(t.getValue(n)).toLowerCase(),vt(e.getValue(n)).toLowerCase()),L4=(t,e,n)=>hs(vt(t.getValue(n)),vt(e.getValue(n))),H4=(t,e,n)=>{const o=t.getValue(n),i=e.getValue(n);return o>i?1:o<i?-1:0},j4=(t,e,n)=>hs(t.getValue(n),e.getValue(n));function hs(t,e){return t===e?0:t>e?1:-1}function vt(t){return typeof t=="number"?isNaN(t)||t===1/0||t===-1/0?"":String(t):typeof t=="string"?t:""}function Nc(t,e){const n=t.split(fs).filter(Boolean),o=e.split(fs).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),s=o.shift(),l=parseInt(i,10),a=parseInt(s,10),d=[l,a].sort();if(isNaN(d[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(d[1]))return isNaN(l)?-1:1;if(l>a)return 1;if(a>l)return-1}return n.length-o.length}const Zn={alphanumeric:I4,alphanumericCaseSensitive:T4,text:z4,textCaseSensitive:L4,datetime:H4,basic:j4},W4=[C4,V4,M4,D4,k4,x4,P4,F4,{getInitialState:t=>({sorting:[],...t}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:t=>({onSortingChange:Re("sorting",t),isMultiSortEvent:e=>e.shiftKey}),createColumn:(t,e)=>{t.getAutoSortingFn=()=>{const n=e.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const s=i==null?void 0:i.getValue(t.id);if(Object.prototype.toString.call(s)==="[object Date]")return Zn.datetime;if(typeof s=="string"&&(o=!0,s.split(fs).length>1))return Zn.alphanumeric}return o?Zn.text:Zn.basic},t.getAutoSortDir=()=>{const n=e.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(t.id))=="string"?"asc":"desc"},t.getSortingFn=()=>{var n,o;if(!t)throw new Error;return ni(t.columnDef.sortingFn)?t.columnDef.sortingFn:t.columnDef.sortingFn==="auto"?t.getAutoSortingFn():(n=(o=e.options.sortingFns)==null?void 0:o[t.columnDef.sortingFn])!=null?n:Zn[t.columnDef.sortingFn]},t.toggleSorting=(n,o)=>{const i=t.getNextSortingOrder(),s=typeof n<"u"&&n!==null;e.setSorting(l=>{const a=l==null?void 0:l.find(p=>p.id===t.id),d=l==null?void 0:l.findIndex(p=>p.id===t.id);let c=[],u,f=s?n:i==="desc";if(l!=null&&l.length&&t.getCanMultiSort()&&o?a?u="toggle":u="add":l!=null&&l.length&&d!==l.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(s||i||(u="remove")),u==="add"){var h;c=[...l,{id:t.id,desc:f}],c.splice(0,c.length-((h=e.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=l.map(p=>p.id===t.id?{...p,desc:f}:p):u==="remove"?c=l.filter(p=>p.id!==t.id):c=[{id:t.id,desc:f}];return c})},t.getFirstSortDir=()=>{var n,o;return((n=(o=t.columnDef.sortDescFirst)!=null?o:e.options.sortDescFirst)!=null?n:t.getAutoSortDir()==="desc")?"desc":"asc"},t.getNextSortingOrder=n=>{var o,i;const s=t.getFirstSortDir(),l=t.getIsSorted();return l?l!==s&&((o=e.options.enableSortingRemoval)==null||o)&&(!(n&&(i=e.options.enableMultiRemove)!=null)||i)?!1:l==="desc"?"asc":"desc":s},t.getCanSort=()=>{var n,o;return((n=t.columnDef.enableSorting)!=null?n:!0)&&((o=e.options.enableSorting)!=null?o:!0)&&!!t.accessorFn},t.getCanMultiSort=()=>{var n,o;return(n=(o=t.columnDef.enableMultiSort)!=null?o:e.options.enableMultiSort)!=null?n:!!t.accessorFn},t.getIsSorted=()=>{var n;const o=(n=e.getState().sorting)==null?void 0:n.find(i=>i.id===t.id);return o?o.desc?"desc":"asc":!1},t.getSortIndex=()=>{var n,o;return(n=(o=e.getState().sorting)==null?void 0:o.findIndex(i=>i.id===t.id))!=null?n:-1},t.clearSorting=()=>{e.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==t.id):[])},t.getToggleSortingHandler=()=>{const n=t.getCanSort();return o=>{n&&(o.persist==null||o.persist(),t.toggleSorting==null||t.toggleSorting(void 0,t.getCanMultiSort()?e.options.isMultiSortEvent==null?void 0:e.options.isMultiSortEvent(o):!1))}}},createTable:t=>{t.setSorting=e=>t.options.onSortingChange==null?void 0:t.options.onSortingChange(e),t.resetSorting=e=>{var n,o;t.setSorting(e?[]:(n=(o=t.initialState)==null?void 0:o.sorting)!=null?n:[])},t.getPreSortedRowModel=()=>t.getGroupedRowModel(),t.getSortedRowModel=()=>(!t._getSortedRowModel&&t.options.getSortedRowModel&&(t._getSortedRowModel=t.options.getSortedRowModel(t)),t.options.manualSorting||!t._getSortedRowModel?t.getPreSortedRowModel():t._getSortedRowModel())}},S4,R4,N4,A4,O4,E4];function Y4(t){var e,n;process.env.NODE_ENV!=="production"&&(t.debugAll||t.debugTable)&&console.info("Creating Table Instance...");const o=[...W4,...(e=t._features)!=null?e:[]];let i={_features:o};const s=i._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(i)),{}),l=h=>i.options.mergeOptions?i.options.mergeOptions(s,h):{...s,...h};let d={...{},...(n=t.initialState)!=null?n:{}};i._features.forEach(h=>{var p;d=(p=h.getInitialState==null?void 0:h.getInitialState(d))!=null?p:d});const c=[];let u=!1;const f={_features:o,options:{...s,...t},initialState:d,_queue:h=>{c.push(h),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const p=St(h,i.options);i.options=l(p)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,p,m)=>{var g;return(g=i.options.getRowId==null?void 0:i.options.getRowId(h,p,m))!=null?g:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,p)=>{let m=(p?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!m&&(m=i.getCoreRowModel().rowsById[h],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${h}`):new Error;return m},_getDefaultColumnDef:L(()=>[i.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:m=>{const g=m.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:m=>{var g,y;return(g=(y=m.renderValue())==null||y.toString==null?void 0:y.toString())!=null?g:null},...i._features.reduce((m,g)=>Object.assign(m,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...h}},H(t,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:L(()=>[i._getColumnDefs()],h=>{const p=function(m,g,y){return y===void 0&&(y=0),m.map(b=>{const _=w4(i,b,y,g),x=b;return _.columns=x.columns?p(x.columns,_,y+1):[],_})};return p(h)},H(t,"debugColumns","getAllColumns")),getAllFlatColumns:L(()=>[i.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),H(t,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:L(()=>[i.getAllFlatColumns()],h=>h.reduce((p,m)=>(p[m.id]=m,p),{}),H(t,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:L(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,p)=>{let m=h.flatMap(g=>g.getLeafColumns());return p(m)},H(t,"debugColumns","getAllLeafColumns")),getColumn:h=>{const p=i._getAllFlatColumnsById()[h];return process.env.NODE_ENV!=="production"&&!p&&console.error(`[Table] Column with id '${h}' does not exist.`),p}};Object.assign(i,f);for(let h=0;h<i._features.length;h++){const p=i._features[h];p==null||p.createTable==null||p.createTable(i)}return i}function U4(){return t=>L(()=>[t.options.data],e=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,s,l){s===void 0&&(s=0);const a=[];for(let c=0;c<i.length;c++){const u=Jr(t,t._getRowId(i[c],c,l),i[c],c,s,void 0,l==null?void 0:l.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),t.options.getSubRows){var d;u.originalSubRows=t.options.getSubRows(i[c],c),(d=u.originalSubRows)!=null&&d.length&&(u.subRows=o(u.originalSubRows,s+1,u))}}return a};return n.rows=o(e),n},H(t.options,"debugTable","getRowModel",()=>t._autoResetPageIndex()))}function G4(){return t=>L(()=>[t.getState().expanded,t.getPreExpandedRowModel(),t.options.paginateExpandedRows],(e,n,o)=>!n.rows.length||e!==!0&&!Object.keys(e??{}).length||!o?n:Ac(n),H(t.options,"debugTable","getExpandedRowModel"))}function Ac(t){const e=[],n=o=>{var i;e.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return t.rows.forEach(n),{rows:e,flatRows:t.flatRows,rowsById:t.rowsById}}function q4(t,e,n){return n.options.filterFromLeafRows?X4(t,e,n):K4(t,e,n)}function X4(t,e,n){var o;const i=[],s={},l=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(d,c){c===void 0&&(c=0);const u=[];for(let h=0;h<d.length;h++){var f;let p=d[h];const m=Jr(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(m.columnFilters=p.columnFilters,(f=p.subRows)!=null&&f.length&&c<l){if(m.subRows=a(p.subRows,c+1),p=m,e(p)&&!m.subRows.length){u.push(p),s[p.id]=p,i.push(p);continue}if(e(p)||m.subRows.length){u.push(p),s[p.id]=p,i.push(p);continue}}else p=m,e(p)&&(u.push(p),s[p.id]=p,i.push(p))}return u};return{rows:a(t),flatRows:i,rowsById:s}}function K4(t,e,n){var o;const i=[],s={},l=(o=n.options.maxLeafRowFilterDepth)!=null?o:100,a=function(d,c){c===void 0&&(c=0);const u=[];for(let h=0;h<d.length;h++){let p=d[h];if(e(p)){var f;if((f=p.subRows)!=null&&f.length&&c<l){const g=Jr(n,p.id,p.original,p.index,p.depth,void 0,p.parentId);g.subRows=a(p.subRows,c+1),p=g}u.push(p),i.push(p),s[p.id]=p}}return u};return{rows:a(t),flatRows:i,rowsById:s}}function Z4(){return t=>L(()=>[t.getPreFilteredRowModel(),t.getState().columnFilters,t.getState().globalFilter],(e,n,o)=>{if(!e.rows.length||!(n!=null&&n.length)&&!o){for(let h=0;h<e.flatRows.length;h++)e.flatRows[h].columnFilters={},e.flatRows[h].columnFiltersMeta={};return e}const i=[],s=[];(n??[]).forEach(h=>{var p;const m=t.getColumn(h.id);if(!m)return;const g=m.getFilterFn();if(!g){process.env.NODE_ENV!=="production"&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${m.id}.`);return}i.push({id:h.id,filterFn:g,resolvedValue:(p=g.resolveFilterValue==null?void 0:g.resolveFilterValue(h.value))!=null?p:h.value})});const l=n.map(h=>h.id),a=t.getGlobalFilterFn(),d=t.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());o&&a&&d.length&&(l.push("__global__"),d.forEach(h=>{var p;s.push({id:h.id,filterFn:a,resolvedValue:(p=a.resolveFilterValue==null?void 0:a.resolveFilterValue(o))!=null?p:o})}));let c,u;for(let h=0;h<e.flatRows.length;h++){const p=e.flatRows[h];if(p.columnFilters={},i.length)for(let m=0;m<i.length;m++){c=i[m];const g=c.id;p.columnFilters[g]=c.filterFn(p,g,c.resolvedValue,y=>{p.columnFiltersMeta[g]=y})}if(s.length){for(let m=0;m<s.length;m++){u=s[m];const g=u.id;if(u.filterFn(p,g,u.resolvedValue,y=>{p.columnFiltersMeta[g]=y})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;p<l.length;p++)if(h.columnFilters[l[p]]===!1)return!1;return!0};return q4(e.rows,f,t)},H(t.options,"debugTable","getFilteredRowModel",()=>t._autoResetPageIndex()))}function J4(t){return e=>L(()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:s}=n;let{rows:l,flatRows:a,rowsById:d}=o;const c=i*s,u=c+i;l=l.slice(c,u);let f;e.options.paginateExpandedRows?f={rows:l,flatRows:a,rowsById:d}:f=Ac({rows:l,flatRows:a,rowsById:d}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},H(e.options,"debugTable","getPaginationRowModel"))}function Q4(){return t=>L(()=>[t.getState().sorting,t.getPreSortedRowModel()],(e,n)=>{if(!n.rows.length||!(e!=null&&e.length))return n;const o=t.getState().sorting,i=[],s=o.filter(d=>{var c;return(c=t.getColumn(d.id))==null?void 0:c.getCanSort()}),l={};s.forEach(d=>{const c=t.getColumn(d.id);c&&(l[d.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=d=>{const c=d.map(u=>({...u}));return c.sort((u,f)=>{for(let p=0;p<s.length;p+=1){var h;const m=s[p],g=l[m.id],y=g.sortUndefined,b=(h=m==null?void 0:m.desc)!=null?h:!1;let _=0;if(y){const x=u.getValue(m.id),$=f.getValue(m.id),w=x===void 0,P=$===void 0;if(w||P){if(y==="first")return w?-1:1;if(y==="last")return w?1:-1;_=w&&P?0:w?y:-y}}if(_===0&&(_=g.sortingFn(u,f,m.id)),_!==0)return b&&(_*=-1),g.invertSorting&&(_*=-1),_}return u.index-f.index}),c.forEach(u=>{var f;i.push(u),(f=u.subRows)!=null&&f.length&&(u.subRows=a(u.subRows))}),c};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},H(t.options,"debugTable","getSortedRowModel",()=>t._autoResetPageIndex()))}/**
46
46
  * vue-table
47
47
  *
48
48
  * Copyright (c) TanStack
@@ -51,5 +51,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
51
51
  * LICENSE.md file in the root directory of this source tree.
52
52
  *
53
53
  * @license MIT
54
- */function ii(){return!0}const P4=Symbol("merge-proxy"),R4={get(t,e,n){return e===P4?n:t.get(e)},has(t,e){return t.has(e)},set:ii,deleteProperty:ii,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:ii,deleteProperty:ii}},ownKeys(t){return t.keys()}};function ar(t){return"value"in t?t.value:t}function si(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Proxy({get(o){for(let i=e.length-1;i>=0;i--){const r=ar(e[i])[o];if(r!==void 0)return r}},has(o){for(let i=e.length-1;i>=0;i--)if(o in ar(e[i]))return!0;return!1},keys(){const o=[];for(let i=0;i<e.length;i++)o.push(...Object.keys(ar(e[i])));return[...Array.from(new Set(o))]}},R4)}const Bc=s.defineComponent({props:["render","props"],setup:t=>()=>typeof t.render=="function"||typeof t.render=="object"?s.h(t.render,t.props):t.render});function F4(t){const e=si({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,r){return si(i,r)}},t),n=C4(e),o=s.ref(n.initialState);return s.watchEffect(()=>{n.setOptions(i=>{var r;const l=new Proxy({},{get:(a,d)=>o.value[d]});return si(i,t,{state:si(l,(r=t.state)!=null?r:{}),onStateChange:a=>{a instanceof Function?o.value=a(o.value):o.value=a,t.onStateChange==null||t.onStateChange(a)}})})}),n}const N4=["checked","disabled","indeterminate"],Vc=J(s.defineComponent({__name:"FmTableCheckbox",props:{checked:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean},onChange:{type:Function}},setup(t){const e=t,n=s.computed(()=>e.indeterminate&&!e.checked?"remove":e.checked?"check_small":"");return(o,i)=>(s.openBlock(),s.createElementBlock("div",{class:"fm-checkbox__input--container",onClick:i[0]||(i[0]=(...r)=>o.onChange&&o.onChange(...r))},[s.createElementVNode("input",{class:s.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":o.checked}),type:"checkbox",checked:o.checked,disabled:o.disabled,indeterminate:o.indeterminate},null,10,N4),o.indeterminate||o.checked?(s.openBlock(),s.createBlock(j,{key:0,class:"fm-checkbox__input--checkmark",name:n.value,size:"md",color:"#FFFFFF"},null,8,["name"])):s.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-2508b8c4"]]),A4={class:"bg-fm-color-neutral-white flex flex-col max-h-[264px] overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"},Pc=s.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(t){const n=K(t,"modelValue"),o=s.ref(!1);return(i,r)=>(s.openBlock(),s.createBlock(at,{onMenuChanged:r[0]||(r[0]=l=>o.value=l)},{"menu-button":s.withCtx(()=>{var l;return[s.createVNode(X,{variant:"secondary",label:(l=i.items.find(a=>a.value===i.modelValue))==null?void 0:l.label,size:"md",icon:o.value?"expand_less":"expand_more","icon-position":"append"},null,8,["label","icon"])]}),"menu-wrapper":s.withCtx(()=>[s.createElementVNode("div",A4,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.items,l=>(s.openBlock(),s.createBlock(Me,{key:l.value,"model-value":l.value===s.unref(n),label:l.label,value:l.value,"onUpdate:modelValue":a=>n.value=l.value},null,8,["model-value","label","value","onUpdate:modelValue"]))),128))])]),_:1}))}}),O4={class:"flex flex-col relative"},I4={class:"h-full overflow-auto"},T4={class:"w-full"},L4=["colSpan","onClick"],z4={class:"flex gap-8 items-center justify-between"},H4={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},j4=s.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),W4=["onClick"],Y4={class:"fm-typo-body-md-400 line-clamp-2 w-full"},U4={class:"flex h-72 items-center justify-between px-24 shrink-0 xs:px-0"},G4={class:"flex gap-24 items-center justify-between xs:hidden"},q4={class:"flex gap-8 items-center"},X4=s.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-primary"}," Items per page: ",-1),K4={class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"},Z4={class:"flex gap-8 items-center xs:w-full"},J4={class:"fm-typo-body-lg-400 text-fm-color-typo-primary xs:mx-auto"},Q4=s.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},columnFilter:{default:void 0},searchValue:{default:""},pageCount:{default:0},rowCount:{default:void 0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},loading:{type:Boolean,default:void 0},pinHeaderRow:{type:Boolean,default:!0},onRowClick:{type:Function,default:()=>{}}},setup(t){const e=t,n=K(e,"modelValue"),o=K(e,"searchValue"),i=s.ref(e.rowData),r=()=>{let y=e.columnDefs;return e.selection&&(y=[{id:"row-selection",header:({table:b})=>s.createVNode(Vc,{checked:b.getIsAllPageRowsSelected(),indeterminate:b.getIsSomePageRowsSelected(),onChange:b.getToggleAllPageRowsSelectedHandler()},null),cell:({row:b})=>s.createVNode(Vc,{checked:b.getIsSelected(),disabled:!b.getCanSelect(),onChange:b.getToggleSelectedHandler()},null),enableResizing:!1,meta:{headerClass:"py-4 pl-4 pr-16",cellClass:"pl-4 pr-16",width:"60px"}},...y]),y},l=s.ref([]);s.watch(()=>e.rowData,y=>{i.value=[...y]},{deep:!0});const a=s.ref({pageIndex:0,pageSize:e.pageSize}),d=F4({enableRowSelection:!!e.selection,enableMultiRowSelection:e.selection==="multiple",columns:r(),get data(){return i.value},state:{get pagination(){return typeof e.fetchFn=="function"?a.value:void 0},get globalFilter(){return o.value},get rowSelection(){return n.value},get sorting(){return l.value}},getCoreRowModel:k4(),getSortedRowModel:E4(),getFilteredRowModel:D4(),getPaginationRowModel:V4(),onRowSelectionChange:y=>{if(!h.value)return n.value=typeof y=="function"?y(n.value):y},onSortingChange:y=>{l.value=typeof y=="function"?y(l.value):y},onGlobalFilterChange:y=>{o.value=typeof y=="function"?y(o.value):y},manualPagination:typeof e.fetchFn=="function",...typeof e.fetchFn=="function"&&{onPaginationChange:y=>a.value=typeof y=="function"?y(a.value):y},pageCount:typeof e.fetchFn=="function"?e.pageCount:void 0,getSubRows:y=>y.subRows,getExpandedRowModel:B4()});s.watch(()=>a.value,y=>{f(y)});const c=s.ref(""),u=s.ref(!1);async function f(y){if(!e.fetchFn)return;u.value=!0;const b=`${Math.random()}`;c.value=b;try{await e.fetchFn(y)}catch{}finally{c.value===b&&(u.value=!1)}}const h=s.computed(()=>{const y=u.value;return typeof e.loading=="boolean"?e.loading:y});s.watch(()=>e.rowData,()=>{d.setOptions(y=>({...y,data:e.rowData})),setTimeout(()=>{g()})}),s.watch([()=>e.pageCount,()=>e.rowCount],()=>{d.setOptions(y=>({...y,pageCount:e.pageCount,rowCount:e.rowCount}))}),s.watch(()=>e.pageSize,()=>{d.setPageSize(e.pageSize)}),s.watch([()=>e.columnFilter],([y])=>{d.setColumnFilters(()=>y??[])}),s.watch(()=>e.columnDefs,()=>{d.setOptions(y=>({...y,columns:r()}))}),s.onMounted(()=>{e.fetchFn&&e.fetchFn(d.getState().pagination),d.setPageSize(e.pageSize)});const p=s.ref(),m=s.ref(380);function g(){var b;const y=((b=p.value)==null?void 0:b.scrollHeight)??0;m.value=Math.max(100,y)}return(y,b)=>(s.openBlock(),s.createElementBlock("div",O4,[s.createElementVNode("div",I4,[s.createElementVNode("table",T4,[s.createElementVNode("thead",{class:s.normalizeClass({"bg-[#F9F9F9] sticky top-0 z-[1]":y.pinHeaderRow})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(d).getHeaderGroups(),$=>(s.openBlock(),s.createElementBlock("tr",{key:$.id},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList($.headers,w=>{var S,x,V,D;return s.openBlock(),s.createElementBlock("th",{key:w.id,colSpan:w.colSpan,class:s.normalizeClass(["fm-typo-body-md-700 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24 hover:bg-fm-color-opacity-sm",w.column.getCanSort()?"cursor-pointer select-none":"",((S=w.column.columnDef.meta)==null?void 0:S.headerClass)??"px-16 py-12"]),style:s.normalizeStyle({width:`${(x=w.column.columnDef.meta)==null?void 0:x.width}`,maxWidth:(V=w.column.columnDef.meta)==null?void 0:V.maxWidth,textAlign:((D=w.column.columnDef.meta)==null?void 0:D.textAlign)??"left"}),onClick:F=>{var N;return(N=w.column.getToggleSortingHandler())==null?void 0:N(F)}},[s.createElementVNode("div",z4,[w.isPlaceholder?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(s.unref(Bc),{key:0,render:w.column.columnDef.header,props:w.getContext()},null,8,["render","props"])),w.column.getCanSort()?(s.openBlock(),s.createBlock(j,{key:1,color:"neutral-gray-400",name:{asc:"arrow_upward",desc:"arrow_downward"}[w.column.getIsSorted()]??"unfold_more"},null,8,["name"])):s.createCommentVNode("",!0)])],14,L4)}),128))]))),128))],2),s.renderSlot(y.$slots,"pin-top"),s.createElementVNode("tbody",{ref_key:"tableDataBody",ref:p},[h.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:"pointer-events-none",style:s.normalizeStyle({height:`${m.value}px`})},[s.createElementVNode("div",H4,[s.createVNode(Wt),s.createVNode(ln,{size:"xl"}),s.createElementVNode("div",null,[s.renderSlot(y.$slots,"loading-text",{},()=>[j4])]),s.createVNode(Wt)])],4)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(d).getRowModel().rows,$=>(s.openBlock(),s.createElementBlock("tr",{key:$.id,class:s.normalizeClass(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",{"bg-fm-color-neutral-gray-100":$.getIsSelected()}]),onClick:w=>y.onRowClick($)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList($.getVisibleCells(),w=>{var S,x,V,D;return s.openBlock(),s.createElementBlock("td",{key:w.id,class:s.normalizeClass([h.value?"hidden":"","h-[52px] px-16 text-fm-color-typo-primary",((S=w.column.columnDef.meta)==null?void 0:S.cellClass)??"px-16"]),style:s.normalizeStyle({width:(x=w.column.columnDef.meta)==null?void 0:x.width,maxWidth:(V=w.column.columnDef.meta)==null?void 0:V.maxWidth,textAlign:((D=w.column.columnDef.meta)==null?void 0:D.textAlign)??"left"})},[s.createElementVNode("span",Y4,[s.createVNode(s.unref(Bc),{render:w.column.columnDef.cell,props:w.getContext()},null,8,["render","props"])])],6)}),128))],10,W4))),128))],512)])]),s.createElementVNode("div",U4,[s.createElementVNode("div",G4,[s.createElementVNode("div",q4,[X4,s.createVNode(Pc,{"model-value":s.unref(d).getState().pagination.pageSize,items:[...Array.from(Array(5),($,w)=>(w+1)*10).map($=>({label:$.toString(),value:$})),{label:"All",value:e.rowData.length}],"onUpdate:modelValue":b[0]||(b[0]=$=>s.unref(d).setPageSize($))},null,8,["model-value","items"])]),s.createElementVNode("span",K4,s.toDisplayString(e.rowData.length<s.unref(d).getState().pagination.pageSize?e.rowData.length:s.unref(d).getState().pagination.pageIndex*s.unref(d).getState().pagination.pageSize+1)+" - "+s.toDisplayString((s.unref(d).getState().pagination.pageIndex+1)*s.unref(d).getState().pagination.pageSize)+" of "+s.toDisplayString(e.rowCount??e.rowData.length)+" items ",1)]),s.createElementVNode("div",Z4,[s.createVNode(Pc,{"model-value":s.unref(d).getState().pagination.pageIndex+1,items:Array.from(Array(s.unref(d).getPageCount()),($,w)=>w+1).map($=>({label:$.toString(),value:$})),"onUpdate:modelValue":b[1]||(b[1]=$=>s.unref(d).setPageIndex($?$-1:0))},null,8,["model-value","items"]),s.createElementVNode("span",J4," of "+s.toDisplayString(s.unref(d).getPageCount())+" pages ",1),s.createVNode(X,{disabled:!s.unref(d).getCanPreviousPage(),icon:"chevron_left",variant:"tertiary","icon-color":"neutral-black",onClick:b[2]||(b[2]=()=>s.unref(d).previousPage())},null,8,["disabled"]),s.createVNode(X,{disabled:!s.unref(d).getCanNextPage(),icon:"chevron_right",variant:"tertiary","icon-color":"neutral-black",onClick:b[3]||(b[3]=()=>s.unref(d).nextPage())},null,8,["disabled"])])])]))}}),e_=s.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),t_=s.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=s.ref(!1),r=s.computed(()=>({vertical:n.vertical,disabled:n.disabled})),l=s.computed(()=>{const c=n.items.slice(0,n.showMoreAt-1),u=n.items.find(h=>{var p;return h.value===n.modelValue||((p=h.children)==null?void 0:p.find(m=>m.value===n.modelValue))}),f=c.map(h=>h.value);return u&&f.includes(u.value)?n.items.slice(0,n.showMoreAt):u?[...c,u]:c}),a=s.computed(()=>{const c=l.value.map(u=>u.value);return n.items.filter(u=>!c.includes(u.value))}),d=c=>{i.value=!1,o("update:modelValue",c)};return(c,u)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["flex",c.vertical?"flex-col":"flex-row items-center"])},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(l.value,f=>s.renderSlot(c.$slots,"default",s.normalizeProps(s.guardReactiveProps({...f,tabsProps:r.value})),()=>[s.createVNode(gc,s.mergeProps({"model-value":n.modelValue},{children:f.children,label:f.label,icon:f.icon,disabled:f.disabled,badge:f.badge,value:f.value,tabsProps:r.value},{disabled:f.disabled===void 0?c.disabled:f.disabled,vertical:c.vertical,"onUpdate:modelValue":u[0]||(u[0]=h=>o("update:modelValue",h))}),null,16,["model-value","disabled","vertical"])])),256)),a.value.length>0?(s.openBlock(),s.createBlock(at,{key:0,"show-menu":i.value,class:s.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":c.vertical}]),placement:c.vertical?"right-start":"bottom-start",onMenuChanged:u[1]||(u[1]=f=>i.value=f)},{"menu-button":s.withCtx(()=>[s.createElementVNode("div",{class:s.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[c.vertical?"h-40":"h-[46px]"]])},[s.createVNode(j,{name:"more_vert"}),e_],2)]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(a.value,f=>{var h;return s.openBlock(),s.createElementBlock(s.Fragment,{key:f.value},[(h=f.children)!=null&&h.length?(s.openBlock(),s.createBlock(at,{key:0,placement:"right-start"},{"menu-button":s.withCtx(()=>[s.createVNode(Me,{"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,expandable:""},{append:s.withCtx(()=>[f.badge?(s.openBlock(),s.createBlock(Mt,{key:0,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled"])]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(f.children,p=>(s.openBlock(),s.createBlock(Me,{key:p.value,"model-value":n.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,onClick:m=>d(p.value)},{append:s.withCtx(()=>[p.badge?(s.openBlock(),s.createBlock(Mt,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:2},1024)):(s.openBlock(),s.createBlock(Me,{key:1,"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,onClick:p=>d(f.value)},{append:s.withCtx(()=>[f.badge?(s.openBlock(),s.createBlock(Mt,{key:0,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))],64)}),128))]),_:1},8,["show-menu","class","placement"])):s.createCommentVNode("",!0)],2))}}),n_={class:"flex flex-col"},o_=["tabindex"],i_=s.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:void 0},children:{default:()=>[]},indentation:{default:1},active:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},focusable:{type:Boolean,default:void 0}},setup(t){const e=t,n=K(e,"modelValue"),o=s.computed(()=>e.children.length>0),i=s.ref(!e.expand||e.disabled),r=s.computed(()=>{if(!o.value)return 0;function h(m){return m.children?[m,...m.children.flatMap(h)]:[m]}return 56*(e.children?e.children.flatMap(h):[]).length});function l(){if(!e.disabled){if(o.value){i.value=!i.value;return}n.value=e.value}}const a=s.computed(()=>typeof e.focusable=="boolean"?e.focusable:!e.disabled&&(!i.value||!o.value));function d(h){return h.children&&h.children.length?h.children.some(d):e.modelValue===h.value}const c=s.computed(()=>{const h=d(e);return o.value?h&&i.value:h}),u=s.computed(()=>e.children?e.children.map(({modelValue:h,indentation:p,active:m,focusable:g,...y})=>{const b=d(y);return{...y,expand:b,focusable:!y.disabled&&!i.value}}):[]),f=s.computed(()=>{switch(e.indentation){case 1:return 16;case 2:return 56;case 3:return 72;default:return 80}});return(h,p)=>{const m=s.resolveComponent("FmCollapsibleTab",!0),g=s.resolveDirective("wave");return s.openBlock(),s.createElementBlock("div",n_,[s.withDirectives((s.openBlock(),s.createElementBlock("button",{class:s.normalizeClass(["flex fm-corner-radius-lg gap-12 items-center px-24 py-16 focus-visible:outline-none",{"cursor-pointer focus-visible:bg-fm-color-opacity-md hover:bg-fm-color-opacity-sm ":!h.disabled,"cursor-not-allowed":h.disabled,"bg-fm-color-system-warning-100":c.value}]),style:s.normalizeStyle({paddingLeft:`${f.value}px`}),tabindex:a.value?"0":"-1",type:"button",onClick:l},[h.icon?(s.openBlock(),s.createBlock(j,{key:0,name:h.icon,class:s.normalizeClass({"text-fm-color-typo-disabled":h.disabled,"text-fm-color-typo-primary":!h.disabled&&!c.value,"text-fm-color-primary":!h.disabled&&c.value})},null,8,["name","class"])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:s.normalizeClass(["flex-1 fm-typo-body-lg-700 text-left",{"text-fm-color-typo-primary":!h.disabled,"text-fm-color-typo-disabled":h.disabled}])},s.toDisplayString(h.label),3),h.badge?(s.openBlock(),s.createBlock(Mt,{key:1,value:h.badge,inline:"",variant:"numeric"},null,8,["value"])):s.createCommentVNode("",!0),o.value?(s.openBlock(),s.createElementBlock("div",{key:2,class:"flex h-24 items-center w-24",style:s.normalizeStyle({transformOrigin:"center",transform:`rotate(${i.value?"0":"180"}deg)`,transition:"transform ease-out 250ms"})},[s.createVNode(j,{class:s.normalizeClass({"text-fm-color-neutral-gray-300":!h.disabled,"text-fm-color-typo-disabled":h.disabled}),size:"md",name:"expand_more"},null,8,["class"])],4)):s.createCommentVNode("",!0)],14,o_)),[[g,!h.disabled]]),o.value?(s.openBlock(),s.createElementBlock("div",{key:0,class:"flex flex-col overflow-hidden",style:s.normalizeStyle({maxHeight:i.value?0:`${r.value}px`,transition:"max-height 250ms",transitionTimingFunction:i.value?"ease-out":"ease-in"})},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(u.value,(y,b)=>(s.openBlock(),s.createBlock(m,s.mergeProps({key:b},y,{"model-value":s.unref(n),"onUpdate:modelValue":p[0]||(p[0]=$=>s.isRef(n)?n.value=$:null),indentation:h.indentation+1}),null,16,["model-value","indentation"]))),128))],4)):s.createCommentVNode("",!0)])}}}),s_={class:"flex flex-col"},r_=s.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(t){const e=t,n=K(e,"modelValue"),o=s.computed(()=>e.items?e.items.map(({modelValue:r,...l})=>l):[]);function i(r){function l(d){return d.children?d.children.flatMap(l):[d.value]}return(r.children?r.children.flatMap(l):[r.value]).includes(e.modelValue)}return(r,l)=>(s.openBlock(),s.createElementBlock("div",s_,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(o.value,(a,d)=>(s.openBlock(),s.createBlock(i_,s.mergeProps({key:d},a,{"model-value":s.unref(n),"onUpdate:modelValue":l[0]||(l[0]=c=>s.isRef(n)?n.value=c:null),active:i(a),expand:i(a)}),null,16,["model-value","active","expand"]))),128))]))}}),l_=s.defineComponent({__name:"FmAvatar",props:{initials:{default:()=>""},name:{default:()=>""},src:{default:void 0},size:{default:()=>"md"}},setup(t){const e=t,n=s.computed(()=>{if(e.initials)return e.initials.slice(0,2);if(e.name){const[o,i]=e.name.split(" ");return i?`${o[0]}${i[0]}`:o.slice(0,2)}return e.src?"":"?"});return(o,i)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["inline-flex items-center justify-center rounded-xxxl uppercase",{"w-24 h-24 fm-typo-body-sm-700":o.size==="sm","w-40 h-40 fm-typo-body-md-700":o.size==="md","w-48 h-48 fm-typo-body-lg-700":o.size==="lg","w-56 h-56 fm-typo-body-lg-700":o.size==="xl","bg-fm-color-neutral-gray-100":!e.src}]),style:s.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},s.toDisplayString(n.value),7))}}),a_=s.defineComponent({__name:"FmThumbnail",props:{src:{default:void 0},icon:{default:t=>t.src?"":"image"},size:{default:()=>"md"}},setup(t){const e=t;return(n,o)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["inline-flex items-center justify-center fm-corner-radius-md border-1 border-fm-color-neutral-gray-300",{"w-24 h-24 fm-typo-body-sm-700":n.size==="sm","w-40 h-40 fm-typo-body-md-700":n.size==="md","w-56 h-56 fm-typo-body-lg-700":n.size==="lg","w-72 h-72 fm-typo-body-lg-700":n.size==="xl","text-fm-color-neutral-gray-300 bg-fm-color-neutral-gray-100":!e.src}]),style:s.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},[n.icon?(s.openBlock(),s.createBlock(j,{key:0,name:n.icon},null,8,["name"])):s.createCommentVNode("",!0)],6))}}),d_={class:"bg-white flex gap-4 items-center"},c_={class:"flex gap-4 items-center xs:hidden"},u_={key:1,class:"hidden xs:flex"},f_={class:"absolute bottom-16 hidden right-16 xs:inline"},Rc={FmBadge:Mt,FmBottomSheet:gi,FmBreadcrumb:pu,FmButton:X,FmButtonGroup:Eu,FmCard:Bu,FmCardActionArea:Vu,FmCardActions:Ru,FmCardHeader:Nu,FmCardMedia:Ou,FmCardSection:$i,FmCardSubtitle:Dr,FmCardTitle:Mr,FmChip:Er,FmChipGroup:_i,FmDialog:Tu,FmDropField:Hu,FmDynamicDialog:Vr,FmLineChart:rg,FmPieChart:fg,FmBarChart:bg,FmCheckbox:Za,FmDatePicker:L1,FmDatePickerMobile:xd,FmDateRangePicker:q2,FmDateRangePickerMobile:Md,FmField:ge,FmForm:X2,FmFormGroup:Pe,FmHelperText:Qa,FmLabel:en,FmPhoneNumber:l$,FmPinField:c$,FmRadio:y$,FmRadioGroup:b$,FmSearch:Ls,FmGlobalSearch:Y$,FmSelect:Wo,FmStepperField:q$,FmSwitch:ks,FmTextField:Ts,FmTextarea:K$,FmTimeInput:Qo,FmTimePicker:h3,FmTimeRangePicker:w3,FmIcon:j,FmList:js,FmListItem:Ws,FmMenu:at,FmMenuDeprecated:pc,FmMenuDivider:kd,FmMenuHeader:x3,FmMenuItem:Me,FmCircularProgress:ln,FmLinearProgress:D3,FmSideSheet:F3,FmSnackbar:mc,FmSpacer:Wt,FmStep:L3,FmStepper:j3,FmTab:gc,FmTable:Q4,FmTableToolbar:Q3,FmTabs:t_,FmCollapsibleTabs:r_,FmTooltip:bd,FmAvatar:l_,FmThumbnail:a_,FmPageHead:s.defineComponent({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]}},emits:["click:back","click:action"],setup(t,{emit:e}){const n=t,o=e,i=s.computed(()=>{const l=[...n.actions],a=l.findIndex(h=>h.isPrimary),d=l[a],[c,u,...f]=l.filter((h,p)=>p!==a);return{primaryAction:d,firstSecondaryAction:c,secondSecondaryAction:u,showMoreSecondary:f,bottomSheetActions:l.filter(h=>!h.isPrimary),fabActions:l.filter(h=>h.isPrimary)}}),r=s.ref(!1);return(l,a)=>(s.openBlock(),s.createElementBlock("div",d_,[l.backButton?(s.openBlock(),s.createBlock(X,{key:0,type:"button",size:"md",variant:"tertiary",icon:"arrow_back","icon-color":"black",onClick:a[0]||(a[0]=d=>o("click:back"))})):s.createCommentVNode("",!0),s.createVNode(Ys,{class:"flex-grow",title:l.title,description:l.description,"title-bold":""},null,8,["title","description"]),s.createElementVNode("div",c_,[i.value.firstSecondaryAction?(s.openBlock(),s.createBlock(X,{key:0,label:i.value.firstSecondaryAction.label,"prepend-icon":i.value.firstSecondaryAction.prependIcon,"append-icon":i.value.firstSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[1]||(a[1]=d=>o("click:action",i.value.firstSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0),i.value.secondSecondaryAction?(s.openBlock(),s.createBlock(X,{key:1,label:i.value.secondSecondaryAction.label,"prepend-icon":i.value.secondSecondaryAction.prependIcon,"append-icon":i.value.secondSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[2]||(a[2]=d=>o("click:action",i.value.secondSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0),i.value.showMoreSecondary.length>1?(s.openBlock(),s.createBlock(at,{key:2},{"menu-button":s.withCtx(()=>[s.createVNode(X,{label:"More","append-icon":"expand_more","icon-color":"black",type:"button",variant:"tertiary",size:"md"})]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value.showMoreSecondary,d=>(s.openBlock(),s.createBlock(Me,{key:d.value,label:d.label,icon:d.prependIcon,onClick:c=>o("click:action",d.value)},null,8,["label","icon","onClick"]))),128))]),_:1})):i.value.showMoreSecondary.length===1?(s.openBlock(),s.createBlock(X,{key:3,label:i.value.showMoreSecondary[0].label,"prepend-icon":i.value.showMoreSecondary[0].prependIcon,"append-icon":i.value.showMoreSecondary[0].appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[3]||(a[3]=d=>o("click:action",i.value.showMoreSecondary[0].value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0),i.value.primaryAction?(s.openBlock(),s.createBlock(X,{key:4,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"primary",size:"md",onClick:a[4]||(a[4]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0)]),n.actions.length>0?(s.openBlock(),s.createElementBlock("div",u_,[s.createVNode(X,{type:"button",size:"md",variant:"tertiary",icon:"more_vert","icon-color":"black",onClick:a[5]||(a[5]=d=>r.value=!0)})])):s.createCommentVNode("",!0),s.createVNode(gi,{"model-value":r.value,"onUpdate:modelValue":a[6]||(a[6]=d=>r.value=d),"dismiss-away":""},{default:s.withCtx(()=>[s.createVNode(js,null,{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value.bottomSheetActions,d=>(s.openBlock(),s.createBlock(Ws,{key:d.value,class:"hover:bg-fm-color-neutral-gray-100",label:d.label,onClick:c=>{o("click:action",d.value),r.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value"]),(s.openBlock(),s.createBlock(s.Teleport,{to:"body"},[s.createElementVNode("div",f_,[i.value.primaryAction?(s.openBlock(),s.createBlock(X,{key:0,class:"fm-shadow-light-100",label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"fab",size:"md",onClick:a[7]||(a[7]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):s.createCommentVNode("",!0)])]))]))}}),FmTopSheet:dc},h_=s.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1}},setup(t){const e=t,n=s.ref(!1),o=s.ref(null),i=s.ref(null),r=s.computed(()=>e.reference());let l;const{floatingStyles:a,middlewareData:d,placement:c}=jn(r,o,{whileElementsMounted:zn,placement:e.placement,middleware:[Hn(),In({mainAxis:6}),md({element:i})]}),u=s.computed(()=>{var m,g,y,b;const p={top:"bottom",right:"left",bottom:"top",left:"right"}[c.value];return{left:((m=d.value.arrow)==null?void 0:m.x)!=null?`${(g=d.value.arrow)==null?void 0:g.x}px`:"",top:((y=d.value.arrow)==null?void 0:y.y)!=null?`${(b=d.value.arrow)==null?void 0:b.y}px`:"",[p]:"-3px"}}),f=()=>{e.disabled||(l&&clearTimeout(l),l=setTimeout(()=>{n.value=!0},250))},h=()=>{e.disabled||(l&&clearTimeout(l),l=setTimeout(()=>{n.value=!1},250))};return s.onMounted(()=>{r.value.addEventListener("pointerdown",f),r.value.addEventListener("pointermove",p=>{p.pointerType!=="touch"&&f()}),r.value.addEventListener("pointerleave",h),r.value.addEventListener("pointerup",h)}),s.onBeforeUnmount(()=>{r.value.removeEventListener("pointerdown",f),r.value.removeEventListener("pointermove",p=>{p.pointerType!=="touch"&&f()}),r.value.removeEventListener("pointerleave",h),r.value.removeEventListener("pointerup",h)}),(p,m)=>n.value&&!p.disabled?(s.openBlock(),s.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:"bg-fm-color-neutral-black fm-shadow-light-300 fm-typo-body-sm-400 max-w-[240px] px-16 py-12 rounded-lg text-fm-color-typo-white",style:s.normalizeStyle(s.unref(a))},[s.withDirectives(s.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:"absolute bg-fm-color-neutral-black h-8 rotate-45 rounded-[2px] w-8",style:s.normalizeStyle(u.value)},null,4),[[s.vShow,!p.hideArrow]]),s.createTextVNode(" "+s.toDisplayString(p.content),1)],4)):s.createCommentVNode("",!0)}});let dr;const St=s.ref([]);let Fc=0;const p_=()=>{if(dr)return;const t=document.createElement("div");document.body.appendChild(t),dr=s.createApp({render:()=>St.value.map(e=>s.h(h_,e))}),dr.mount(t)},ri=t=>{if(t){for(const e of["top","right","bottom","left"])if(t[e])return e}return"top"},Nc=(t,e)=>{const{value:n,modifiers:o}=e;p_(),t.$_fmTooltipId=Fc,Fc+=1,typeof n=="string"?St.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:ri(o),hideArrow:!1}):n&&typeof n=="object"&&St.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),placement:ri(o),disabled:n.disabled??!1,hideArrow:n.hideArrow??!1})},m_={mounted:Nc,updated:(t,e)=>{const{value:n,modifiers:o}=e,i=St.value.findIndex(r=>r.id===t.$_fmTooltipId);if(i===-1){Nc(t,e);return}typeof n=="string"?St.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:ri(o),hideArrow:!1}:n&&typeof n=="object"&&(St.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),disabled:n.disabled??!1,placement:ri(o),hideArrow:n.hideArrow??!1})},beforeUnmount:t=>{const e=St.value.findIndex(n=>n.id===t.$_fmTooltipId);e!==-1&&St.value.splice(e,1)}},li=16,g_=s.defineComponent({__name:"FmSnackbarToast",setup(t){const{breakpoints:e}=Nn(),n=s.inject(bi),o=s.computed(()=>{var l;return[...((l=n==null?void 0:n.store)==null?void 0:l.snackbars)??[]].reduce(({currentSum:a,tops:d},c)=>{d.push({id:c.id,accumulatedHeight:a});const u=c.mountStage===vt.EXPIRED?0:li+c.renderedHeight;return{currentSum:a+u,tops:d}},{currentSum:li,tops:new Array}).tops}),i=s.computed(()=>{var r,l;return(l=(r=n==null?void 0:n.store)==null?void 0:r.snackbars)==null?void 0:l.map(a=>{var c,u,f,h,p,m;let d=0;switch(a.mountStage){case vt.PREMOUNT:{d=e.value.xs?0:li;break}case vt.MOUNTED:{d=((f=(u=(c=o.value)==null?void 0:c.find)==null?void 0:u.call(c,g=>g.id===a.id))==null?void 0:f.accumulatedHeight)||li;break}case vt.EXPIRED:{d=((m=(p=(h=o.value)==null?void 0:h.find)==null?void 0:p.call(h,g=>g.id===a.id))==null?void 0:m.accumulatedHeight)||0,d=Math.max(0,d-a.renderedHeight);break}}return{...a,top:d}})});return(r,l)=>(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.value,a=>(s.openBlock(),s.createBlock(s.Teleport,{key:a.id,to:"body"},[s.createVNode(mc,{class:"fixed transition-all",variant:a.type,title:a.title,description:a.message,action:a.action,dismissable:a.dismissable,style:s.normalizeStyle(s.unref(e).xs?{bottom:`${a.top}px`,width:"calc(100vw - 32px)",right:"16px",opacity:a.mountStage===s.unref(vt).EXPIRED?0:1}:{top:`${a.top}px`,right:a.mountStage===s.unref(vt).PREMOUNT?"-20px":"16px",opacity:a.mountStage===s.unref(vt).EXPIRED?0:1}),onVnodeMounted:d=>{var c;return(c=s.unref(n))==null?void 0:c.onSnackbarMounted(a.id,d.el.scrollHeight)},onOnAction:()=>{var d,c;(d=a==null?void 0:a.onAction)==null||d.call(a),(c=s.unref(n))==null||c.close(a.id)},onOnDismiss:()=>{var d;return(d=s.unref(n))==null?void 0:d.close(a.id)}},null,8,["variant","title","description","action","dismissable","style","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var vt=(t=>(t.PREMOUNT="PREMOUNT",t.MOUNTED="MOUNTED",t.EXPIRED="EXPIRED",t))(vt||{});class y_{constructor(){I(this,"store",s.reactive({snackbars:new Array}))}open(e,n){const o=Math.random().toString(16).slice(2),i=[{...e,id:o,mountStage:"PREMOUNT",duration:n===null?null:n??5e3,renderedHeight:0,type:(e==null?void 0:e.type)??"info",dismissable:typeof(e==null?void 0:e.dismissable)=="boolean"?e.dismissable:!0},...this.store.snackbars];return this.store.snackbars=i,o}onSnackbarMounted(e,n){const o=this.store.snackbars.findIndex(r=>r.id===e);if(o===-1)return;const i=this.store.snackbars[o];this.store.snackbars[o]={...i,renderedHeight:n},setTimeout(()=>{const r=this.store.snackbars[o];this.store.snackbars[o]={...r,mountStage:"MOUNTED"}}),typeof i.duration=="number"&&setTimeout(()=>{this.close(e)},i.duration)}close(e){const n=this.store.snackbars.findIndex(i=>i.id===e);if(n===-1)return;const o=this.store.snackbars[n];this.store.snackbars[n]={...o,mountStage:"EXPIRED"},setTimeout(()=>{this.removeSnackbar(e)},500)}removeSnackbar(e){const n=this.store.snackbars.findIndex(o=>o.id===e);n!==-1&&this.store.snackbars.splice(n,1)}}const b_={install(t){t.provide(bi,new y_);const e=document.body,n=s.createVNode(g_);n.appContext=t._context,s.render(n,e)}};function $_(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let ai;function cr(){cr.init||(cr.init=!0,ai=$_()!==-1)}var di={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){cr(),s.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",ai&&this.$el.appendChild(t),t.data="about:blank",ai||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!ai&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const __=s.withScopeId("data-v-b329ee4c");s.pushScopeId("data-v-b329ee4c");const w_={class:"resize-observer",tabindex:"-1"};s.popScopeId();const C_=__((t,e,n,o,i,r)=>(s.openBlock(),s.createBlock("div",w_)));di.render=C_,di.__scopeId="data-v-b329ee4c",di.__file="src/components/ResizeObserver.vue";function ci(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ci=function(e){return typeof e}:ci=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ci(t)}function x_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ac(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function k_(t,e,n){return e&&Ac(t.prototype,e),n&&Ac(t,n),t}function Oc(t){return S_(t)||v_(t)||M_(t)||D_()}function S_(t){if(Array.isArray(t))return ur(t)}function v_(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function M_(t,e){if(t){if(typeof t=="string")return ur(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ur(t,e)}}function ur(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function D_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
55
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E_(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function B_(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,r,l=function(d){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;f<c;f++)u[f-1]=arguments[f];if(r=u,!(o&&d===i)){var h=n.leading;typeof h=="function"&&(h=h(d,i)),(!o||d!==i)&&h&&t.apply(void 0,[d].concat(Oc(r))),i=d,clearTimeout(o),o=setTimeout(function(){t.apply(void 0,[d].concat(Oc(r))),o=0},e)}};return l._clear=function(){clearTimeout(o),o=null},l}function Ic(t,e){if(t===e)return!0;if(ci(t)==="object"){for(var n in t)if(!Ic(t[n],e[n]))return!1;return!0}return!1}var V_=function(){function t(e,n,o){x_(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return k_(t,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=E_(n),this.callback=function(a,d){i.options.callback(a,d),a&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var r=this.options.throttleOptions||{},l=r.leading;this.callback=B_(this.callback,this.options.throttle,{leading:function(d){return l==="both"||l==="visible"&&d||l==="hidden"&&!d}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(a){var d=a[0];if(a.length>1){var c=a.find(function(f){return f.isIntersecting});c&&(d=c)}if(i.callback){var u=d.isIntersecting&&d.intersectionRatio>=i.threshold;if(u===i.oldResult)return;i.oldResult=u,i.callback(u,d)}},this.options.intersection),s.nextTick(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function Tc(t,e,n){var o=e.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new V_(t,o,n);t._vue_visibilityState=i}}function P_(t,e,n){var o=e.value,i=e.oldValue;if(!Ic(o,i)){var r=t._vue_visibilityState;if(!o){Lc(t);return}r?r.createObserver(o,n):Tc(t,{value:o},n)}}function Lc(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var R_={beforeMount:Tc,updated:P_,unmounted:Lc};function F_(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o&&o.push(n)||t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&o.splice(o.indexOf(n)>>>0,1)},emit:function(e,n){(t.get(e)||[]).slice().map(function(o){o(n)}),(t.get("*")||[]).slice().map(function(o){o(e,n)})}}}var zc={itemsLimit:1e3},N_=/(auto|scroll)/;function Hc(t,e){return t.parentNode===null?e:Hc(t.parentNode,e.concat([t]))}var fr=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},A_=function(e){return fr(e,"overflow")+fr(e,"overflow-y")+fr(e,"overflow-x")},O_=function(e){return N_.test(A_(e))};function jc(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=Hc(t.parentNode,[]),n=0;n<e.length;n+=1)if(O_(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function hr(t){"@babel/helpers - typeof";return hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hr(t)}var Wc={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Yc(){return this.items.length&&hr(this.items[0])!=="object"}var pr=!1;if(typeof window<"u"){pr=!1;try{var I_=Object.defineProperty({},"passive",{get:function(){pr=!0}});window.addEventListener("test",null,I_)}catch{}}let T_=0;var Kn={name:"RecycleScroller",components:{ResizeObserver:di},directives:{ObserveVisibility:R_},props:{...Wc,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,r=0,l;for(let a=0,d=e.length;a<d;a++)l=e[a][n]||o,l<i&&(i=l),r+=l,t[a]={accumulator:r,size:l};return this.$_computedMinItemSize=i,t}return[]},simpleArray:Yc,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let o=0,i=e.length;o<i;o++)n[e[o][t]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,o,i){const r=s.markRaw({id:T_++,index:e,used:!0,key:o,type:i}),l=s.shallowReactive({item:n,position:0,nr:r});return t.push(l),l},unuseView(t,e=!1){const n=this.$_unusedViews,o=t.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,r=this.$_computedMinItemSize,l=this.typeField,a=this.simpleArray?null:this.keyField,d=this.items,c=d.length,u=this.sizes,f=this.$_views,h=this.$_unusedViews,p=this.pool,m=this.itemIndexByKey;let g,y,b,$,w;if(!c)g=y=$=w=b=0;else if(this.$_prerender)g=$=0,y=w=Math.min(this.prerender,d.length),b=null;else{const P=this.getScroll();if(e){let E=P.start-this.$_lastUpdateScrollPosition;if(E<0&&(E=-E),n===null&&E<r||E<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=P.start;const C=this.buffer;P.start-=C,P.end+=C;let _=0;if(this.$refs.before&&(_=this.$refs.before.scrollHeight,P.start-=_),this.$refs.after){const E=this.$refs.after.scrollHeight;P.end+=E}if(n===null){let E,v=0,M=c-1,k=~~(c/2),B;do B=k,E=u[k].accumulator,E<P.start?v=k:k<c-1&&u[k+1].accumulator>P.start&&(M=k),k=~~((v+M)/2);while(k!==B);for(k<0&&(k=0),g=k,b=u[c-1].accumulator,y=k;y<c&&u[y].accumulator<P.end;y++);for(y===-1?y=d.length-1:(y++,y>c&&(y=c)),$=g;$<c&&_+u[$].accumulator<P.start;$++);for(w=$;w<c&&_+u[w].accumulator<P.end;w++);}else{g=~~(P.start/n*o);const E=g%o;g-=E,y=Math.ceil(P.end/n*o),$=Math.max(0,Math.floor((P.start-_)/n*o)),w=Math.floor((P.end-_)/n*o),g<0&&(g=0),y>c&&(y=c),$<0&&($=0),w>c&&(w=c),b=Math.ceil(c/o)*n}}y-g>zc.itemsLimit&&this.itemsLimitError(),this.totalSize=b;let S;const x=g<=this.$_endIndex&&y>=this.$_startIndex;if(x)for(let P=0,C=p.length;P<C;P++)S=p[P],S.nr.used&&(t&&(S.nr.index=m[S.item[a]]),(S.nr.index==null||S.nr.index<g||S.nr.index>=y)&&this.unuseView(S));const V=x?null:new Map;let D,F,N;for(let P=g;P<y;P++){D=d[P];const C=a?D[a]:D;if(C==null)throw new Error(`Key is ${C} on item (keyField is '${a}')`);if(S=f.get(C),!n&&!u[P].size){S&&this.unuseView(S);continue}F=D[l];let _=h.get(F),E=!1;if(!S)x?_&&_.length?S=_.pop():S=this.addView(p,P,D,C,F):(N=V.get(F)||0,(!_||N>=_.length)&&(S=this.addView(p,P,D,C,F),this.unuseView(S,!0),_=h.get(F)),S=_[N],V.set(F,N+1)),f.delete(S.nr.key),S.nr.used=!0,S.nr.index=P,S.nr.key=C,S.nr.type=F,f.set(C,S),E=!0;else if(!S.nr.used&&(S.nr.used=!0,E=!0,_)){const v=_.indexOf(S);v!==-1&&_.splice(v,1)}S.item=D,E&&(P===d.length-1&&this.$emit("scroll-end"),P===0&&this.$emit("scroll-start")),n===null?(S.position=u[P-1].accumulator,S.offset=0):(S.position=Math.floor(P/o)*n,S.offset=P%o*i)}return this.$_startIndex=g,this.$_endIndex=y,this.emitUpdate&&this.$emit("update",g,y,$,w),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let t=jc(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let o;if(this.pageMode){const i=t.getBoundingClientRect(),r=n?i.height:i.width;let l=-(n?i.top:i.left),a=n?window.innerHeight:window.innerWidth;l<0&&(a+=l,l=0),l+a>r&&(a=r-l),o={start:l,end:l+a}}else n?o={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:o={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,pr?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const r=jc(this.$el),l=r.tagName==="HTML"?0:r[e.scroll],a=r.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[e.start]-a[e.start];n=r,o=e.scroll,i=t+l+c}else n=this.$el,o=e.scroll,i=t;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const L_={key:0,ref:"before",class:"vue-recycle-scroller__slot"},z_={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function H_(t,e,n,o,i,r){const l=s.resolveComponent("ResizeObserver"),a=s.resolveDirective("observe-visibility");return s.withDirectives((s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...d)=>r.handleScroll&&r.handleScroll(...d))},[t.$slots.before?(s.openBlock(),s.createElementBlock("div",L_,[s.renderSlot(t.$slots,"before")],512)):s.createCommentVNode("v-if",!0),(s.openBlock(),s.createBlock(s.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:s.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:s.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(i.pool,d=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(n.itemTag),s.mergeProps({key:d.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${d.position}px) translate${t.direction==="vertical"?"X":"Y"}(${d.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===d.nr.key}]]},s.toHandlers(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=d.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:s.withCtx(()=>[s.renderSlot(t.$slots,"default",{item:d.item,index:d.nr.index,active:d.nr.used})]),_:2},1040,["style","class"]))),128)),s.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(s.openBlock(),s.createElementBlock("div",z_,[s.renderSlot(t.$slots,"after")],512)):s.createCommentVNode("v-if",!0),s.createVNode(l,{onNotify:r.handleResize},null,8,["onNotify"])],34)),[[a,r.handleVisibilityChange]])}Kn.render=H_,Kn.__file="src/components/RecycleScroller.vue";var ui={name:"DynamicScroller",components:{RecycleScroller:Kn},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(t=>{requestAnimationFrame(()=>{if(Array.isArray(t)){for(const e of t)if(e.target&&e.target.$_vs_onResize){let n,o;if(e.borderBoxSize){const i=e.borderBoxSize[0];n=i.inlineSize,o=i.blockSize}else n=e.contentRect.width,o=e.contentRect.height;e.target.$_vs_onResize(e.target.$_vs_id,n,o)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...Wc,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Yc,itemsWithSize(){const t=[],{items:e,keyField:n,simpleArray:o}=this,i=this.vscrollData.sizes,r=e.length;for(let l=0;l<r;l++){const a=e[l],d=o?l:a[n];let c=i[d];typeof c>"u"&&!this.$_undefinedMap[d]&&(c=0),t.push({item:a,id:d,size:c})}return t}},watch:{items(){this.forceUpdate()},simpleArray:{handler(t){this.vscrollData.simpleArray=t},immediate:!0},direction(t){this.forceUpdate(!0)},itemsWithSize(t,e){const n=this.$el.scrollTop;let o=0,i=0;const r=Math.min(t.length,e.length);for(let a=0;a<r&&!(o>=n);a++)o+=e[a].size||this.minItemSize,i+=t[a].size||this.minItemSize;const l=i-o;l!==0&&(this.$el.scrollTop+=l)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=F_()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(t=!1){(t||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(t){const e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize(t,e=void 0){const n=this.simpleArray?e??this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const t=this.$el;this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;const e=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(e)})};requestAnimationFrame(e)})}}};function j_(t,e,n,o,i,r){const l=s.resolveComponent("RecycleScroller");return s.openBlock(),s.createBlock(l,s.mergeProps({ref:"scroller",items:r.itemsWithSize,"min-item-size":n.minItemSize,direction:t.direction,"key-field":"id","list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:r.onScrollerResize,onVisible:r.onScrollerVisible}),{default:s.withCtx(({item:a,index:d,active:c})=>[s.renderSlot(t.$slots,"default",s.normalizeProps(s.guardReactiveProps({item:a.item,index:d,active:c,itemWithSize:a})))]),before:s.withCtx(()=>[s.renderSlot(t.$slots,"before")]),after:s.withCtx(()=>[s.renderSlot(t.$slots,"after")]),empty:s.withCtx(()=>[s.renderSlot(t.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}ui.render=j_,ui.__file="src/components/DynamicScroller.vue";var mr={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(t,e){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[e],o=this.vscrollData.sizes[t];n!=null&&n!==o&&this.applySize(n)}},finalActive(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const t in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[t],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:t}){!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||t||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){const e=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(e,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(t,e){const n=~~(this.vscrollParent.direction==="vertical"?e:t);n&&this.size!==n&&this.applySize(n)},applySize(t){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=t,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(t,e,n){this.id===t&&this.applyWidthHeight(e,n)}},render(){return s.h(this.tag,this.$slots.default())}};mr.__file="src/components/DynamicScrollerItem.vue";function W_(t,e){t.component("".concat(e,"recycle-scroller"),Kn),t.component("".concat(e,"RecycleScroller"),Kn),t.component("".concat(e,"dynamic-scroller"),ui),t.component("".concat(e,"DynamicScroller"),ui),t.component("".concat(e,"dynamic-scroller-item"),mr),t.component("".concat(e,"DynamicScrollerItem"),mr)}var Y_={version:"2.0.0-beta.8",install:function(e,n){var o=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var i in o)typeof o[i]<"u"&&(zc[i]=o[i]);o.installComponents&&W_(e,o.componentsPrefix)}};const U_=t=>{t.use(tu,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.directive("tooltip",m_),t.use(Uu),t.use(b_),t.use(Y_),Object.entries(Rc).forEach(([e,n])=>{t.component(e,n)})};ae.FeedMeUI=U_,ae.components=Rc,ae.useBreakpoints=Nn,ae.useDialog=X3,ae.useDialogChild=Z3,ae.useFocus=Wn,ae.useFormChild=_d,ae.useProxiedModel=K,ae.useSnackbar=J3,ae.useValidation=$d,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})});
54
+ */function si(){return!0}const e_=Symbol("merge-proxy"),t_={get(t,e,n){return e===e_?n:t.get(e)},has(t,e){return t.has(e)},set:si,deleteProperty:si,getOwnPropertyDescriptor(t,e){return{configurable:!0,enumerable:!0,get(){return t.get(e)},set:si,deleteProperty:si}},ownKeys(t){return t.keys()}};function ps(t){return"value"in t?t.value:t}function li(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Proxy({get(o){for(let i=e.length-1;i>=0;i--){const s=ps(e[i])[o];if(s!==void 0)return s}},has(o){for(let i=e.length-1;i>=0;i--)if(o in ps(e[i]))return!0;return!1},keys(){const o=[];for(let i=0;i<e.length;i++)o.push(...Object.keys(ps(e[i])));return[...Array.from(new Set(o))]}},t_)}const ai=r.defineComponent({props:["render","props"],setup:t=>()=>typeof t.render=="function"||typeof t.render=="object"?r.h(t.render,t.props):t.render});function n_(t){const e=li({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions(i,s){return li(i,s)}},t),n=Y4(e),o=r.ref(n.initialState);return r.watchEffect(()=>{n.setOptions(i=>{var s;const l=new Proxy({},{get:(a,d)=>o.value[d]});return li(i,t,{state:li(l,(s=t.state)!=null?s:{}),onStateChange:a=>{a instanceof Function?o.value=a(o.value):o.value=a,t.onStateChange==null||t.onStateChange(a)}})})}),n}const o_=["checked","disabled","indeterminate"],Oc=Z(r.defineComponent({__name:"FmTableCheckbox",props:{checked:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean},onChange:{type:Function}},setup(t){const e=t,n=r.computed(()=>e.indeterminate&&!e.checked?"remove":e.checked?"check_small":"");return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"fm-checkbox__input--container",onClick:i[0]||(i[0]=r.withModifiers((...s)=>o.onChange&&o.onChange(...s),["stop"]))},[r.createElementVNode("input",{checked:o.checked,class:r.normalizeClass({"fm-checkbox__input--btn":!0,"fm-checkbox__input--btn--checked":o.checked}),disabled:o.disabled,indeterminate:o.indeterminate,type:"checkbox"},null,10,o_),o.indeterminate||o.checked?(r.openBlock(),r.createBlock(j,{key:0,name:n.value,class:"fm-checkbox__input--checkmark",color:"#FFFFFF",size:"md"},null,8,["name"])):r.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-dbf1ded4"]]),i_={class:"bg-fm-color-neutral-white flex flex-col max-h-[264px] overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"},Ic=r.defineComponent({__name:"FmTableSelection",props:{modelValue:{},items:{}},emits:["update:modelValue"],setup(t){const n=X(t,"modelValue"),o=r.ref(!1);return(i,s)=>(r.openBlock(),r.createBlock(dt,{onMenuChanged:s[0]||(s[0]=l=>o.value=l)},{"menu-button":r.withCtx(()=>{var l;return[r.createVNode(K,{variant:"tertiary",label:(l=i.items.find(a=>a.value===i.modelValue))==null?void 0:l.label,size:"md",icon:o.value?"expand_less":"expand_more","icon-position":"append"},null,8,["label","icon"])]}),"menu-wrapper":r.withCtx(()=>[r.createElementVNode("div",i_,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.items,l=>(r.openBlock(),r.createBlock(De,{key:l.value,"model-value":l.value===r.unref(n),label:l.label,value:l.value,"onUpdate:modelValue":a=>n.value=l.value},null,8,["model-value","label","value","onUpdate:modelValue"]))),128))])]),_:1}))}}),r_={class:"overflow-y-auto"},s_={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},l_=r.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),a_=["onClick"],d_={key:0},c_={class:"fm-typo-body-md-400 line-clamp-2 w-full"},u_={key:1,class:"w-full"},f_={class:"-translate-x-1/2 -translate-y-1/2 absolute flex flex-col gap-16 left-1/2 top-1/2"},h_=r.createElementVNode("span",{class:"text-fm-color-typo-secondary"},"Loading data...",-1),p_=["onClick"],m_={class:"fm-typo-body-md-400 line-clamp-2 w-full"},g_={key:0,class:"flex gap-24 items-center justify-between"},y_={class:"flex gap-8 items-center"},b_=r.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-primary"}," Items per page: ",-1),$_={class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"},__={class:"fm-typo-body-lg-400 text-fm-color-typo-primary xs:mx-auto"},w_={class:"flex gap-8"},C_=r.defineComponent({__name:"FmTable",props:{modelValue:{default:{}},selection:{default:void 0},rowData:{default:()=>[]},columnDefs:{default:()=>[]},columnFilter:{default:void 0},searchValue:{default:""},pageCount:{default:0},rowCount:{default:void 0},fetchFn:{type:Function,default:void 0},pageSize:{default:10},loading:{type:Boolean,default:void 0},pinHeaderRow:{type:Boolean,default:!0},onRowClick:{type:Function,default:void 0},autoResetPageIndex:{type:Boolean},shrinkAt:{default:"sm"},hideFooter:{type:Boolean}},setup(t){const e=t,n=X(e,"modelValue"),o=X(e,"searchValue"),i=r.ref(e.rowData),s=()=>{let $=e.columnDefs;return e.selection&&($=[{id:"row-selection",header:({table:w})=>r.createVNode(Oc,{checked:w.getIsAllPageRowsSelected(),indeterminate:w.getIsSomePageRowsSelected(),onChange:w.getToggleAllPageRowsSelectedHandler()},null),cell:({row:w})=>r.createVNode(Oc,{checked:w.getIsSelected(),disabled:!w.getCanSelect(),onChange:w.getToggleSelectedHandler()},null),enableResizing:!1,meta:{headerClass:"py-4 pl-4 pr-16",cellClass:"pl-4 pr-16",width:"60px"}},...$]),$},l=r.ref([]);r.watch(()=>e.rowData,$=>{i.value=[...$]},{deep:!0});const a=r.ref({pageIndex:0,pageSize:e.pageSize}),d=n_({enableRowSelection:!!e.selection,enableMultiRowSelection:e.selection==="multiple",columns:s(),get data(){return i.value},state:{get pagination(){return typeof e.fetchFn=="function"?a.value:void 0},get globalFilter(){return o.value},get rowSelection(){return n.value},get sorting(){return l.value}},getCoreRowModel:U4(),getSortedRowModel:Q4(),getFilteredRowModel:Z4(),getPaginationRowModel:J4(),onRowSelectionChange:$=>{if(!h.value)return n.value=typeof $=="function"?$(n.value):$},onSortingChange:$=>{l.value=typeof $=="function"?$(l.value):$},onGlobalFilterChange:$=>{o.value=typeof $=="function"?$(o.value):$},autoResetPageIndex:e.autoResetPageIndex,manualPagination:typeof e.fetchFn=="function",...typeof e.fetchFn=="function"&&{onPaginationChange:$=>a.value=typeof $=="function"?$(a.value):$},pageCount:typeof e.fetchFn=="function"?e.pageCount:void 0,getSubRows:$=>$.subRows,getExpandedRowModel:G4()});r.watch(()=>a.value,$=>{f($)});const c=r.ref(""),u=r.ref(!1);async function f($){if(!e.fetchFn)return;u.value=!0;const w=`${Math.random()}`;c.value=w;try{await e.fetchFn($)}catch{}finally{c.value===w&&(u.value=!1)}}const h=r.computed(()=>{const $=u.value;return typeof e.loading=="boolean"?e.loading:$});r.watch(()=>e.rowData,()=>{d.setOptions($=>({...$,data:e.rowData}))}),r.watch([()=>e.pageCount,()=>e.rowCount],()=>{d.setOptions($=>({...$,pageCount:e.pageCount,rowCount:e.rowCount}))}),r.watch(()=>e.pageSize,()=>{d.setPageSize(e.pageSize)}),r.watch([()=>e.columnFilter],([$])=>{d.setColumnFilters(()=>$??[])}),r.watch(()=>e.columnDefs,()=>{d.setOptions($=>({...$,columns:s()}))}),r.onMounted(()=>{e.fetchFn&&e.fetchFn(d.getState().pagination),d.setPageSize(e.pageSize)});const p=r.ref(380);function m($){var P;const w=((P=$.el)==null?void 0:P.scrollHeight)??0;p.value=Math.max(100,w)}const g=Gt(),y=r.ref(),b=r.ref(g.isBreakpointKeyword(e.shrinkAt)&&g.isAtMost(e.shrinkAt));function _($){const w=$.el;if(!w||typeof e.shrinkAt>"u")return;const P=Gr(function(){if(y.value=w.clientWidth,g.isBreakpointKeyword(e.shrinkAt)){b.value=g.isAtMost(e.shrinkAt);return}const M=Number(e.shrinkAt);if(isNaN(M)){b.value=!1;return}b.value=w.scrollWidth>=M},200);w.resizeTable??(w.resizeTable=function(){b.value=g.isBreakpointKeyword(e.shrinkAt)&&g.isAtMost(e.shrinkAt),P()}),window.addEventListener("resize",w.resizeTable),w.resizeTable()}function x($){const w=$.el;!w||typeof e.shrinkAt>"u"||w.resizeTable&&window.removeEventListener("resize",w.resizeTable)}return($,w)=>{const P=r.resolveComponent("FmListItem"),M=r.resolveComponent("FmList"),N=r.resolveComponent("FmTableHeader");return r.openBlock(),r.createElementBlock("div",{class:"flex flex-col h-full relative",onVnodeMounted:_,onVnodeUnmounted:x},[r.createElementVNode("div",r_,[b.value?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[h.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pointer-events-none",style:r.normalizeStyle({height:`${p.value}px`})},[r.createElementVNode("div",s_,[r.createVNode(mt),r.createVNode(Ut,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot($.$slots,"loading-text",{},()=>[l_])]),r.createVNode(mt)])],4)):(r.openBlock(),r.createBlock(M,{key:1,onVnodeMounted:m},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(d).getRowModel().rows,V=>r.renderSlot($.$slots,"list-row",r.normalizeProps(r.mergeProps({key:V.id},V)),()=>[r.createVNode(P,{style:{padding:"0"},class:r.normalizeClass([{"bg-fm-color-neutral-gray-100":V.getIsSelected(),"cursor-pointer":typeof $.onRowClick=="function"}]),tag:"label"},{prepend:r.withCtx(()=>{var B,k,C,E,v;return[r.createVNode(r.unref(ai),{render:(C=(k=(B=V.getVisibleCells().find(D=>D.column.id==="row-selection"))==null?void 0:B.column)==null?void 0:k.columnDef)==null?void 0:C.cell,props:(v=(E=V.getVisibleCells().find(D=>D.column.id==="row-selection"))==null?void 0:E.getContext)==null?void 0:v.call(E)},null,8,["render","props"])]}),default:r.withCtx(()=>[r.createElementVNode("div",{class:"flex flex-col gap-4 grow p-8",onClick:B=>{var k;return(k=$.onRowClick)==null?void 0:k.call($,V)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V.getVisibleCells(),B=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:B.id},[B.column.id!=="row-selection"?(r.openBlock(),r.createElementBlock("div",d_,[r.createElementVNode("span",c_,[r.createVNode(r.unref(ai),{render:B.column.columnDef.cell,props:B.getContext()},null,8,["render","props"])])])):r.createCommentVNode("",!0)],64))),128))],8,a_)]),_:2},1032,["class"])])),128))]),_:3},512))],64)):(r.openBlock(),r.createElementBlock("table",u_,[$.pinHeaderRow?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(N,{key:0,table:r.unref(d)},null,8,["table"])),r.renderSlot($.$slots,"pin-top"),r.createElementVNode("tbody",{onVnodeMounted:m},[h.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pointer-events-none",style:r.normalizeStyle({height:`${p.value}px`})},[r.createElementVNode("div",f_,[r.createVNode(mt),r.createVNode(Ut,{size:"xl"}),r.createElementVNode("div",null,[r.renderSlot($.$slots,"loading-text",{},()=>[h_])]),r.createVNode(mt)])],4)):(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(r.unref(d).getRowModel().rows,V=>r.renderSlot($.$slots,"table-row",r.normalizeProps(r.mergeProps({key:V.id},V)),()=>[r.createElementVNode("tr",{class:r.normalizeClass(["border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",{"bg-fm-color-neutral-gray-100":V.getIsSelected(),"cursor-pointer":typeof $.onRowClick=="function"}]),onClick:B=>{var k;return(k=$.onRowClick)==null?void 0:k.call($,V)}},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(V.getVisibleCells(),B=>{var k,C,E,v;return r.openBlock(),r.createElementBlock("td",{key:B.id,class:r.normalizeClass([h.value?"hidden":"","h-[52px] px-16 text-fm-color-typo-primary",((k=B.column.columnDef.meta)==null?void 0:k.cellClass)??"px-16"]),style:r.normalizeStyle({width:(C=B.column.columnDef.meta)==null?void 0:C.width,maxWidth:(E=B.column.columnDef.meta)==null?void 0:E.maxWidth,textAlign:((v=B.column.columnDef.meta)==null?void 0:v.textAlign)??"left"})},[r.createElementVNode("span",m_,[r.createVNode(r.unref(ai),{render:B.column.columnDef.cell,props:B.getContext()},null,8,["render","props"])])],6)}),128))],10,p_)])),128))],512),$.pinHeaderRow?(r.openBlock(),r.createBlock(N,{key:1,class:"bg-fm-color-neutral-gray-100 sticky top-0",table:r.unref(d)},null,8,["table"])):r.createCommentVNode("",!0)]))]),$.hideFooter?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"basis-72 bg-white flex items-center justify-between px-24",style:r.normalizeStyle({maxWidth:y.value?`${y.value}px`:void 0})},[b.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",g_,[r.createElementVNode("div",y_,[b_,r.createVNode(Ic,{"model-value":r.unref(d).getState().pagination.pageSize,items:[...Array.from(Array(5),(V,B)=>(B+1)*10).map(V=>({label:V.toString(),value:V})),{label:"All",value:e.rowData.length}],"onUpdate:modelValue":w[0]||(w[0]=V=>r.unref(d).setPageSize(V))},null,8,["model-value","items"])]),r.createElementVNode("span",$_,r.toDisplayString(e.rowData.length<r.unref(d).getState().pagination.pageSize?e.rowData.length:r.unref(d).getState().pagination.pageIndex*r.unref(d).getState().pagination.pageSize+1)+" - "+r.toDisplayString((r.unref(d).getState().pagination.pageIndex+1)*r.unref(d).getState().pagination.pageSize)+" of "+r.toDisplayString(e.rowCount??e.rowData.length)+" items ",1)])),r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 items-center",{" w-full justify-between":b.value}])},[r.createVNode(Ic,{"model-value":r.unref(d).getState().pagination.pageIndex+1,items:Array.from(Array(r.unref(d).getPageCount()),(V,B)=>B+1).map(V=>({label:V.toString(),value:V})),"onUpdate:modelValue":w[1]||(w[1]=V=>r.unref(d).setPageIndex(V?V-1:0))},null,8,["model-value","items"]),r.createElementVNode("span",__," of "+r.toDisplayString(r.unref(d).getPageCount())+" pages ",1),r.createElementVNode("div",w_,[r.createVNode(K,{disabled:!r.unref(d).getCanPreviousPage(),icon:"chevron_left",variant:"tertiary","icon-color":"neutral-black",onClick:w[2]||(w[2]=()=>r.unref(d).previousPage())},null,8,["disabled"]),r.createVNode(K,{disabled:!r.unref(d).getCanNextPage(),icon:"chevron_right",variant:"tertiary","icon-color":"neutral-black",onClick:w[3]||(w[3]=()=>r.unref(d).nextPage())},null,8,["disabled"])])],2)],4))],512)}}}),k_=r.createElementVNode("span",{class:"fm-typo-body-lg-400 text-fm-color-typo-secondary"}," More ",-1),x_=r.defineComponent({__name:"FmTabs",props:{modelValue:{default:null},items:{},vertical:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},showMoreAt:{default:6}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(!1),s=r.computed(()=>({vertical:n.vertical,disabled:n.disabled})),l=r.computed(()=>{const c=n.items.slice(0,n.showMoreAt-1),u=n.items.find(h=>{var p;return h.value===n.modelValue||((p=h.children)==null?void 0:p.find(m=>m.value===n.modelValue))}),f=c.map(h=>h.value);return u&&f.includes(u.value)?n.items.slice(0,n.showMoreAt):u?[...c,u]:c}),a=r.computed(()=>{const c=l.value.map(u=>u.value);return n.items.filter(u=>!c.includes(u.value))}),d=c=>{i.value=!1,o("update:modelValue",c)};return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["flex",c.vertical?"flex-col":"flex-row items-center"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,f=>r.renderSlot(c.$slots,"default",r.normalizeProps(r.guardReactiveProps({...f,tabsProps:s.value})),()=>[r.createVNode(xc,r.mergeProps({"model-value":n.modelValue},{children:f.children,label:f.label,icon:f.icon,disabled:f.disabled,badge:f.badge,value:f.value,tabsProps:s.value},{disabled:f.disabled===void 0?c.disabled:f.disabled,vertical:c.vertical,"onUpdate:modelValue":u[0]||(u[0]=h=>o("update:modelValue",h))}),null,16,["model-value","disabled","vertical"])])),256)),a.value.length>0?(r.openBlock(),r.createBlock(dt,{key:0,"show-menu":i.value,class:r.normalizeClass(["max-w-[360px] min-w-[90px] rounded-sm",{"w-full":c.vertical}]),placement:c.vertical?"right-start":"bottom-start",onMenuChanged:u[1]||(u[1]=f=>i.value=f)},{"menu-button":r.withCtx(()=>[r.createElementVNode("div",{class:r.normalizeClass(["flex gap-8 hover:bg-fm-color-opacity-sm items-center px-16 rounded-sm",[c.vertical?"h-40":"h-[46px]"]])},[r.createVNode(j,{name:"more_vert"}),k_],2)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,f=>{var h;return r.openBlock(),r.createElementBlock(r.Fragment,{key:f.value},[(h=f.children)!=null&&h.length?(r.openBlock(),r.createBlock(dt,{key:0,placement:"right-start"},{"menu-button":r.withCtx(()=>[r.createVNode(De,{"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,expandable:""},{append:r.withCtx(()=>[f.badge?(r.openBlock(),r.createBlock(Et,{key:0,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled"])]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.children,p=>(r.openBlock(),r.createBlock(De,{key:p.value,"model-value":n.modelValue===p.value,label:p.label,icon:p.icon,disabled:p.disabled,onClick:m=>d(p.value)},{append:r.withCtx(()=>[p.badge?(r.openBlock(),r.createBlock(Et,{key:0,value:p.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))),128))]),_:2},1024)):(r.openBlock(),r.createBlock(De,{key:1,"model-value":n.modelValue===f.value,label:f.label,icon:f.icon,disabled:f.disabled,onClick:p=>d(f.value)},{append:r.withCtx(()=>[f.badge?(r.openBlock(),r.createBlock(Et,{key:0,value:f.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0)]),_:2},1032,["model-value","label","icon","disabled","onClick"]))],64)}),128))]),_:1},8,["show-menu","class","placement"])):r.createCommentVNode("",!0)],2))}}),S_={class:"flex flex-col"},v_=["tabindex"],M_=r.defineComponent({__name:"FmCollapsibleTab",props:{modelValue:{default:void 0},label:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1},badge:{default:0},value:{default:void 0},children:{default:()=>[]},indentation:{default:1},active:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},focusable:{type:Boolean,default:void 0}},setup(t){const e=t,n=X(e,"modelValue"),o=r.computed(()=>e.children.length>0),i=r.ref(!e.expand||e.disabled),s=r.computed(()=>{if(!o.value)return 0;function h(m){return m.children?[m,...m.children.flatMap(h)]:[m]}return 56*(e.children?e.children.flatMap(h):[]).length});function l(){if(!e.disabled){if(o.value){i.value=!i.value;return}n.value=e.value}}const a=r.computed(()=>typeof e.focusable=="boolean"?e.focusable:!e.disabled&&(!i.value||!o.value));function d(h){return h.children&&h.children.length?h.children.some(d):e.modelValue===h.value}const c=r.computed(()=>{const h=d(e);return o.value?h&&i.value:h}),u=r.computed(()=>e.children?e.children.map(({modelValue:h,indentation:p,active:m,focusable:g,...y})=>{const b=d(y);return{...y,expand:b,focusable:!y.disabled&&!i.value}}):[]),f=r.computed(()=>{switch(e.indentation){case 1:return 16;case 2:return 56;case 3:return 72;default:return 80}});return(h,p)=>{const m=r.resolveComponent("FmCollapsibleTab",!0),g=r.resolveDirective("wave");return r.openBlock(),r.createElementBlock("div",S_,[r.withDirectives((r.openBlock(),r.createElementBlock("button",{class:r.normalizeClass(["flex fm-corner-radius-lg gap-12 items-center px-24 py-16 focus-visible:outline-none",{"cursor-pointer focus-visible:bg-fm-color-opacity-md hover:bg-fm-color-opacity-sm ":!h.disabled,"cursor-not-allowed":h.disabled,"bg-fm-color-system-warning-100":c.value}]),style:r.normalizeStyle({paddingLeft:`${f.value}px`}),tabindex:a.value?"0":"-1",type:"button",onClick:l},[h.icon?(r.openBlock(),r.createBlock(j,{key:0,name:h.icon,class:r.normalizeClass({"text-fm-color-typo-disabled":h.disabled,"text-fm-color-typo-primary":!h.disabled&&!c.value,"text-fm-color-primary":!h.disabled&&c.value})},null,8,["name","class"])):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass(["flex-1 fm-typo-body-lg-700 text-left",{"text-fm-color-typo-primary":!h.disabled,"text-fm-color-typo-disabled":h.disabled}])},r.toDisplayString(h.label),3),h.badge?(r.openBlock(),r.createBlock(Et,{key:1,value:h.badge,inline:"",variant:"numeric"},null,8,["value"])):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",{key:2,class:"flex h-24 items-center w-24",style:r.normalizeStyle({transformOrigin:"center",transform:`rotate(${i.value?"0":"180"}deg)`,transition:"transform ease-out 250ms"})},[r.createVNode(j,{class:r.normalizeClass({"text-fm-color-neutral-gray-300":!h.disabled,"text-fm-color-typo-disabled":h.disabled}),size:"md",name:"expand_more"},null,8,["class"])],4)):r.createCommentVNode("",!0)],14,v_)),[[g,!h.disabled]]),o.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:"flex flex-col overflow-hidden",style:r.normalizeStyle({maxHeight:i.value?0:`${s.value}px`,transition:"max-height 250ms",transitionTimingFunction:i.value?"ease-out":"ease-in"})},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,(y,b)=>(r.openBlock(),r.createBlock(m,r.mergeProps({key:b},y,{"model-value":r.unref(n),"onUpdate:modelValue":p[0]||(p[0]=_=>r.isRef(n)?n.value=_:null),indentation:h.indentation+1}),null,16,["model-value","indentation"]))),128))],4)):r.createCommentVNode("",!0)])}}}),D_={class:"flex flex-col"},E_=r.defineComponent({__name:"FmCollapsibleTabs",props:{modelValue:{default:void 0},items:{default:()=>[]}},setup(t){const e=t,n=X(e,"modelValue"),o=r.computed(()=>e.items?e.items.map(({modelValue:s,...l})=>l):[]);function i(s){function l(d){return d.children?d.children.flatMap(l):[d.value]}return(s.children?s.children.flatMap(l):[s.value]).includes(e.modelValue)}return(s,l)=>(r.openBlock(),r.createElementBlock("div",D_,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,(a,d)=>(r.openBlock(),r.createBlock(M_,r.mergeProps({key:d},a,{"model-value":r.unref(n),"onUpdate:modelValue":l[0]||(l[0]=c=>r.isRef(n)?n.value=c:null),active:i(a),expand:i(a)}),null,16,["model-value","active","expand"]))),128))]))}}),B_=r.defineComponent({__name:"FmAvatar",props:{initials:{default:()=>""},name:{default:()=>""},src:{default:void 0},size:{default:()=>"md"}},setup(t){const e=t,n=r.computed(()=>{if(e.initials)return e.initials.slice(0,2);if(e.name){const[o,i]=e.name.split(" ");return i?`${o[0]}${i[0]}`:o.slice(0,2)}return e.src?"":"?"});return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center rounded-xxxl uppercase",{"w-24 h-24 fm-typo-body-sm-700":o.size==="sm","w-40 h-40 fm-typo-body-md-700":o.size==="md","w-48 h-48 fm-typo-body-lg-700":o.size==="lg","w-56 h-56 fm-typo-body-lg-700":o.size==="xl","bg-fm-color-neutral-gray-100":!e.src}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},r.toDisplayString(n.value),7))}}),V_=r.defineComponent({__name:"FmThumbnail",props:{src:{default:void 0},icon:{default:t=>t.src?"":"image"},size:{default:()=>"md"}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["inline-flex items-center justify-center fm-corner-radius-md border-1 border-fm-color-neutral-gray-300",{"w-24 h-24 fm-typo-body-sm-700":n.size==="sm","w-40 h-40 fm-typo-body-md-700":n.size==="md","w-56 h-56 fm-typo-body-lg-700":n.size==="lg","w-72 h-72 fm-typo-body-lg-700":n.size==="xl","text-fm-color-neutral-gray-300 bg-fm-color-neutral-gray-100":!e.src}]),style:r.normalizeStyle({background:e.src?`url(${e.src})`:void 0,backgroundSize:e.src?"cover":void 0,backgroundPosition:e.src?"center":void 0,backgroundRepeat:e.src?"no-repeat":void 0})},[n.icon?(r.openBlock(),r.createBlock(j,{key:0,name:n.icon},null,8,["name"])):r.createCommentVNode("",!0)],6))}}),P_={class:"bg-white flex fm-corner-radius-md gap-4 items-center px-24 py-16"},F_={class:"flex gap-4 items-center xs:hidden"},R_={key:1,class:"hidden xs:flex"},N_={class:"absolute bottom-16 hidden right-16 xs:inline"},A_=r.defineComponent({__name:"FmPageHead",props:{title:{default:()=>""},description:{default:()=>""},backButton:{type:Boolean,default:()=>!1},actions:{default:()=>[]}},emits:["click:back","click:action"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{const l=[...n.actions],a=l.findIndex(h=>h.isPrimary),d=l[a],[c,u,...f]=l.filter((h,p)=>p!==a);return{primaryAction:d,firstSecondaryAction:c,secondSecondaryAction:u,showMoreSecondary:f,bottomSheetActions:l.filter(h=>!h.isPrimary),fabActions:l.filter(h=>h.isPrimary)}}),s=r.ref(!1);return(l,a)=>(r.openBlock(),r.createElementBlock("div",P_,[l.backButton?(r.openBlock(),r.createBlock(K,{key:0,type:"button",size:"md",variant:"tertiary",icon:"arrow_back","icon-color":"black",onClick:a[0]||(a[0]=d=>o("click:back"))})):r.createCommentVNode("",!0),r.renderSlot(l.$slots,"prepend"),r.createVNode(Zr,{class:"flex-grow",title:l.title,description:l.description,"title-bold":""},null,8,["title","description"]),r.createElementVNode("div",F_,[i.value.firstSecondaryAction?(r.openBlock(),r.createBlock(K,{key:0,label:i.value.firstSecondaryAction.label,"prepend-icon":i.value.firstSecondaryAction.prependIcon,"append-icon":i.value.firstSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[1]||(a[1]=d=>o("click:action",i.value.firstSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.secondSecondaryAction?(r.openBlock(),r.createBlock(K,{key:1,label:i.value.secondSecondaryAction.label,"prepend-icon":i.value.secondSecondaryAction.prependIcon,"append-icon":i.value.secondSecondaryAction.appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[2]||(a[2]=d=>o("click:action",i.value.secondSecondaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.showMoreSecondary.length>1?(r.openBlock(),r.createBlock(dt,{key:2},{"menu-button":r.withCtx(()=>[r.createVNode(K,{label:"More","append-icon":"expand_more","icon-color":"black",type:"button",variant:"tertiary",size:"md"})]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.showMoreSecondary,d=>(r.openBlock(),r.createBlock(De,{key:d.value,label:d.label,icon:d.prependIcon,onClick:c=>o("click:action",d.value)},null,8,["label","icon","onClick"]))),128))]),_:1})):i.value.showMoreSecondary.length===1?(r.openBlock(),r.createBlock(K,{key:3,label:i.value.showMoreSecondary[0].label,"prepend-icon":i.value.showMoreSecondary[0].prependIcon,"append-icon":i.value.showMoreSecondary[0].appendIcon,type:"button",variant:"tertiary",size:"md",onClick:a[3]||(a[3]=d=>o("click:action",i.value.showMoreSecondary[0].value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0),i.value.primaryAction?(r.openBlock(),r.createBlock(K,{key:4,label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"primary",size:"md",onClick:a[4]||(a[4]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0)]),i.value.bottomSheetActions.length>0?(r.openBlock(),r.createElementBlock("div",R_,[r.createVNode(K,{type:"button",size:"md",variant:"tertiary",icon:"more_vert","icon-color":"black",onClick:a[5]||(a[5]=d=>s.value=!0)})])):r.createCommentVNode("",!0),r.renderSlot(l.$slots,"append"),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Ci,{"model-value":s.value,"onUpdate:modelValue":a[6]||(a[6]=d=>s.value=d),"dismiss-away":""},{default:r.withCtx(()=>[r.createVNode(Xr,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value.bottomSheetActions,d=>(r.openBlock(),r.createBlock(Kr,{key:d.value,class:"hover:bg-fm-color-neutral-gray-100",label:d.label,onClick:c=>{o("click:action",d.value),s.value=!1}},null,8,["label","onClick"]))),128))]),_:1})]),_:1},8,["model-value"]),r.createElementVNode("div",N_,[i.value.primaryAction?(r.openBlock(),r.createBlock(K,{key:0,class:"fm-shadow-light-100",label:i.value.primaryAction.label,"prepend-icon":i.value.primaryAction.prependIcon,"append-icon":i.value.primaryAction.appendIcon,type:"button",variant:"fab",size:"md",onClick:a[7]||(a[7]=d=>o("click:action",i.value.primaryAction.value))},null,8,["label","prepend-icon","append-icon"])):r.createCommentVNode("",!0)])]))]))}}),O_=["colSpan","onClick"],I_={class:"flex gap-8 items-center justify-between"},Tc={FmBadge:Et,FmBottomSheet:Ci,FmBreadcrumb:Ru,FmButton:K,FmButtonGroup:Wu,FmCard:Yu,FmCardActionArea:Uu,FmCardActions:qu,FmCardHeader:Ku,FmCardMedia:Ju,FmCardSection:xi,FmCardSubtitle:As,FmCardTitle:Ns,FmChip:Os,FmChipGroup:Si,FmDialog:rf,FmDropField:af,FmDynamicDialog:Ls,FmLineChart:Sg,FmPieChart:Vg,FmBarChart:Og,FmCheckbox:ld,FmDatePicker:s2,FmDatePickerMobile:Vd,FmDateRangePicker:my,FmDateRangePickerMobile:Ad,FmField:ye,FmForm:gy,FmFormGroup:Fe,FmHelperText:dd,FmLabel:on,FmPhoneNumber:D$,FmPinField:V$,FmRadio:I$,FmRadioGroup:T$,FmSearch:Yr,FmGlobalSearch:f3,FmSelect:Uo,FmStepperField:m3,FmSwitch:Er,FmTextField:Wr,FmTextarea:y3,FmTimeInput:ti,FmTimePicker:R3,FmTimeRangePicker:H3,FmIcon:j,FmList:Xr,FmListItem:Kr,FmMenu:dt,FmMenuDeprecated:Cc,FmMenuDivider:Fd,FmMenuHeader:W3,FmMenuItem:De,FmCircularProgress:Ut,FmLinearProgress:X3,FmSideSheet:e4,FmSnackbar:kc,FmSpacer:mt,FmStep:s4,FmStepper:d4,FmTab:xc,FmTable:C_,FmTableToolbar:y4,FmTableHeader:r.defineComponent({__name:"FmTableHeader",props:{table:{}},setup(t){function e(n){return n.column.columnDef.meta}return(n,o)=>{const i=r.resolveComponent("FmIcon");return r.openBlock(),r.createElementBlock("thead",null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.table.getHeaderGroups(),s=>(r.openBlock(),r.createElementBlock("tr",{key:s.id},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.headers,l=>{var a,d,c,u;return r.openBlock(),r.createElementBlock("th",{key:l.id,colSpan:l.colSpan,class:r.normalizeClass(["fm-typo-body-md-700 text-fm-color-typo-secondary border-b border-fm-color-neutral-gray-100 h-24 hover:bg-fm-color-opacity-sm",l.column.getCanSort()?"cursor-pointer select-none":"",((a=e(l))==null?void 0:a.headerClass)??"px-16 py-12"]),style:r.normalizeStyle({width:`${(d=e(l))==null?void 0:d.width}`,maxWidth:(c=e(l))==null?void 0:c.maxWidth,textAlign:((u=e(l))==null?void 0:u.textAlign)??"left"}),onClick:f=>{var h;return(h=l.column.getToggleSortingHandler())==null?void 0:h(f)}},[r.createElementVNode("div",I_,[l.isPlaceholder?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(r.unref(ai),{key:0,render:l.column.columnDef.header,props:l.getContext()},null,8,["render","props"])),l.column.getCanSort()?(r.openBlock(),r.createBlock(i,{key:1,color:"neutral-gray-400",name:{asc:"arrow_upward",desc:"arrow_downward"}[l.column.getIsSorted()]??"unfold_more"},null,8,["name"])):r.createCommentVNode("",!0)])],14,O_)}),128))]))),128))])}}}),FmTabs:x_,FmCollapsibleTabs:E_,FmTooltip:Dd,FmAvatar:B_,FmThumbnail:V_,FmPageHead:A_,FmTopSheet:bc},T_=r.defineComponent({__name:"FmTooltipDirective",props:{reference:{},placement:{default:"top"},content:{default:""},disabled:{type:Boolean,default:!1},hideArrow:{type:Boolean,default:!1}},setup(t){const e=t,n=r.ref(!1),o=r.ref(null),i=r.ref(null),s=r.computed(()=>e.reference());let l;const{floatingStyles:a,middlewareData:d,placement:c}=Un(s,o,{whileElementsMounted:Wn,placement:e.placement,middleware:[Yn(),Ln({mainAxis:6}),Sd({element:i})]}),u=r.computed(()=>{var m,g,y,b;const p={top:"bottom",right:"left",bottom:"top",left:"right"}[c.value];return{left:((m=d.value.arrow)==null?void 0:m.x)!=null?`${(g=d.value.arrow)==null?void 0:g.x}px`:"",top:((y=d.value.arrow)==null?void 0:y.y)!=null?`${(b=d.value.arrow)==null?void 0:b.y}px`:"",[p]:"-3px"}}),f=()=>{e.disabled||(l&&clearTimeout(l),l=setTimeout(()=>{n.value=!0},250))},h=()=>{e.disabled||(l&&clearTimeout(l),l=setTimeout(()=>{n.value=!1},250))};return r.onMounted(()=>{s.value.addEventListener("pointerdown",f),s.value.addEventListener("pointermove",p=>{p.pointerType!=="touch"&&f()}),s.value.addEventListener("pointerleave",h),s.value.addEventListener("pointerup",h)}),r.onBeforeUnmount(()=>{s.value.removeEventListener("pointerdown",f),s.value.removeEventListener("pointermove",p=>{p.pointerType!=="touch"&&f()}),s.value.removeEventListener("pointerleave",h),s.value.removeEventListener("pointerup",h)}),(p,m)=>n.value&&!p.disabled?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"tooltipContent",ref:o,class:"bg-fm-color-neutral-black fm-shadow-light-300 fm-typo-body-sm-400 max-w-[240px] px-16 py-12 rounded-lg text-fm-color-typo-white",style:r.normalizeStyle(r.unref(a))},[r.withDirectives(r.createElementVNode("div",{ref_key:"arrowEl",ref:i,class:"absolute bg-fm-color-neutral-black h-8 rotate-45 rounded-[2px] w-8",style:r.normalizeStyle(u.value)},null,4),[[r.vShow,!p.hideArrow]]),r.createTextVNode(" "+r.toDisplayString(p.content),1)],4)):r.createCommentVNode("",!0)}});let ms;const Mt=r.ref([]);let zc=0;const z_=()=>{if(ms)return;const t=document.createElement("div");document.body.appendChild(t),ms=r.createApp({render:()=>Mt.value.map(e=>r.h(T_,e))}),ms.mount(t)},di=t=>{if(t){for(const e of["top","right","bottom","left"])if(t[e])return e}return"top"},Lc=(t,e)=>{const{value:n,modifiers:o}=e;z_(),t.$_fmTooltipId=zc,zc+=1,typeof n=="string"?Mt.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:di(o),hideArrow:!1}):n&&typeof n=="object"&&Mt.value.push({id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),placement:di(o),disabled:n.disabled??!1,hideArrow:n.hideArrow??!1})},L_={mounted:Lc,updated:(t,e)=>{const{value:n,modifiers:o}=e,i=Mt.value.findIndex(s=>s.id===t.$_fmTooltipId);if(i===-1){Lc(t,e);return}typeof n=="string"?Mt.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.toString(),placement:di(o),hideArrow:!1}:n&&typeof n=="object"&&(Mt.value[i]={id:t.$_fmTooltipId,reference:()=>t,content:n.content.toString(),disabled:n.disabled??!1,placement:di(o),hideArrow:n.hideArrow??!1})},beforeUnmount:t=>{const e=Mt.value.findIndex(n=>n.id===t.$_fmTooltipId);e!==-1&&Mt.value.splice(e,1)}},ci=16,H_=r.defineComponent({__name:"FmSnackbarToast",setup(t){const{breakpoints:e}=Gt(),n=r.inject(ki),o=r.computed(()=>{var l;return[...((l=n==null?void 0:n.store)==null?void 0:l.snackbars)??[]].reduce(({currentSum:a,tops:d},c)=>{d.push({id:c.id,accumulatedHeight:a});const u=c.mountStage===Dt.EXPIRED?0:ci+c.renderedHeight;return{currentSum:a+u,tops:d}},{currentSum:ci,tops:new Array}).tops}),i=r.computed(()=>{var s,l;return(l=(s=n==null?void 0:n.store)==null?void 0:s.snackbars)==null?void 0:l.map(a=>{var c,u,f,h,p,m;let d=0;switch(a.mountStage){case Dt.PREMOUNT:{d=e.value.xs?0:ci;break}case Dt.MOUNTED:{d=((f=(u=(c=o.value)==null?void 0:c.find)==null?void 0:u.call(c,g=>g.id===a.id))==null?void 0:f.accumulatedHeight)||ci;break}case Dt.EXPIRED:{d=((m=(p=(h=o.value)==null?void 0:h.find)==null?void 0:p.call(h,g=>g.id===a.id))==null?void 0:m.accumulatedHeight)||0,d=Math.max(0,d-a.renderedHeight);break}}return{...a,top:d}})});return(s,l)=>(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,a=>(r.openBlock(),r.createBlock(r.Teleport,{key:a.id,to:"body"},[r.createVNode(kc,{class:"fixed transition-all z-10",variant:a.type,title:a.title,description:a.message,action:a.action,dismissable:a.dismissable,style:r.normalizeStyle(r.unref(e).xs?{bottom:`${a.top}px`,width:"calc(100vw - 32px)",right:"16px",opacity:a.mountStage===r.unref(Dt).EXPIRED?0:1}:{top:`${a.top}px`,right:a.mountStage===r.unref(Dt).PREMOUNT?"-20px":"16px",opacity:a.mountStage===r.unref(Dt).EXPIRED?0:1}),onVnodeMounted:d=>{var c;return(c=r.unref(n))==null?void 0:c.onSnackbarMounted(a.id,d.el.scrollHeight)},onOnAction:()=>{var d,c;(d=a==null?void 0:a.onAction)==null||d.call(a),(c=r.unref(n))==null||c.close(a.id)},onOnDismiss:()=>{var d;return(d=r.unref(n))==null?void 0:d.close(a.id)}},null,8,["variant","title","description","action","dismissable","style","onVnodeMounted","onOnAction","onOnDismiss"])]))),128))}});var Dt=(t=>(t.PREMOUNT="PREMOUNT",t.MOUNTED="MOUNTED",t.EXPIRED="EXPIRED",t))(Dt||{});class j_{constructor(){I(this,"store",r.reactive({snackbars:new Array}))}open(e,n){const o=Math.random().toString(16).slice(2),i=[{...e,id:o,mountStage:"PREMOUNT",duration:n===null?null:n??5e3,renderedHeight:0,type:(e==null?void 0:e.type)??"info",dismissable:typeof(e==null?void 0:e.dismissable)=="boolean"?e.dismissable:!0},...this.store.snackbars];return this.store.snackbars=i,o}onSnackbarMounted(e,n){const o=this.store.snackbars.findIndex(s=>s.id===e);if(o===-1)return;const i=this.store.snackbars[o];this.store.snackbars[o]={...i,renderedHeight:n},setTimeout(()=>{const s=this.store.snackbars[o];this.store.snackbars[o]={...s,mountStage:"MOUNTED"}}),typeof i.duration=="number"&&setTimeout(()=>{this.close(e)},i.duration)}close(e){const n=this.store.snackbars.findIndex(i=>i.id===e);if(n===-1)return;const o=this.store.snackbars[n];this.store.snackbars[n]={...o,mountStage:"EXPIRED"},setTimeout(()=>{this.removeSnackbar(e)},500)}removeSnackbar(e){const n=this.store.snackbars.findIndex(o=>o.id===e);n!==-1&&this.store.snackbars.splice(n,1)}}const W_={install(t){t.provide(ki,new j_);const e=document.body,n=r.createVNode(H_);n.appContext=t._context,r.render(n,e)}};function Y_(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);var n=t.indexOf("Trident/");if(n>0){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}var i=t.indexOf("Edge/");return i>0?parseInt(t.substring(i+5,t.indexOf(".",i)),10):-1}let ui;function gs(){gs.init||(gs.init=!0,ui=Y_()!==-1)}var fi={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){gs(),r.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",ui&&this.$el.appendChild(t),t.data="about:blank",ui||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!ui&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const U_=r.withScopeId("data-v-b329ee4c");r.pushScopeId("data-v-b329ee4c");const G_={class:"resize-observer",tabindex:"-1"};r.popScopeId();const q_=U_((t,e,n,o,i,s)=>(r.openBlock(),r.createBlock("div",G_)));fi.render=q_,fi.__scopeId="data-v-b329ee4c",fi.__file="src/components/ResizeObserver.vue";function hi(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?hi=function(e){return typeof e}:hi=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hi(t)}function X_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Hc(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function K_(t,e,n){return e&&Hc(t.prototype,e),n&&Hc(t,n),t}function jc(t){return Z_(t)||J_(t)||Q_(t)||ew()}function Z_(t){if(Array.isArray(t))return ys(t)}function J_(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Q_(t,e){if(t){if(typeof t=="string")return ys(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ys(t,e)}}function ys(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function ew(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
55
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tw(t){var e;return typeof t=="function"?e={callback:t}:e=t,e}function nw(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,s,l=function(d){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;f<c;f++)u[f-1]=arguments[f];if(s=u,!(o&&d===i)){var h=n.leading;typeof h=="function"&&(h=h(d,i)),(!o||d!==i)&&h&&t.apply(void 0,[d].concat(jc(s))),i=d,clearTimeout(o),o=setTimeout(function(){t.apply(void 0,[d].concat(jc(s))),o=0},e)}};return l._clear=function(){clearTimeout(o),o=null},l}function Wc(t,e){if(t===e)return!0;if(hi(t)==="object"){for(var n in t)if(!Wc(t[n],e[n]))return!1;return!0}return!1}var ow=function(){function t(e,n,o){X_(this,t),this.el=e,this.observer=null,this.frozen=!1,this.createObserver(n,o)}return K_(t,[{key:"createObserver",value:function(n,o){var i=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=tw(n),this.callback=function(a,d){i.options.callback(a,d),a&&i.options.once&&(i.frozen=!0,i.destroyObserver())},this.callback&&this.options.throttle){var s=this.options.throttleOptions||{},l=s.leading;this.callback=nw(this.callback,this.options.throttle,{leading:function(d){return l==="both"||l==="visible"&&d||l==="hidden"&&!d}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(a){var d=a[0];if(a.length>1){var c=a.find(function(f){return f.isIntersecting});c&&(d=c)}if(i.callback){var u=d.isIntersecting&&d.intersectionRatio>=i.threshold;if(u===i.oldResult)return;i.oldResult=u,i.callback(u,d)}},this.options.intersection),r.nextTick(function(){i.observer&&i.observer.observe(i.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function Yc(t,e,n){var o=e.value;if(o)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var i=new ow(t,o,n);t._vue_visibilityState=i}}function iw(t,e,n){var o=e.value,i=e.oldValue;if(!Wc(o,i)){var s=t._vue_visibilityState;if(!o){Uc(t);return}s?s.createObserver(o,n):Yc(t,{value:o},n)}}function Uc(t){var e=t._vue_visibilityState;e&&(e.destroyObserver(),delete t._vue_visibilityState)}var rw={beforeMount:Yc,updated:iw,unmounted:Uc};function sw(t){return{all:t=t||new Map,on:function(e,n){var o=t.get(e);o&&o.push(n)||t.set(e,[n])},off:function(e,n){var o=t.get(e);o&&o.splice(o.indexOf(n)>>>0,1)},emit:function(e,n){(t.get(e)||[]).slice().map(function(o){o(n)}),(t.get("*")||[]).slice().map(function(o){o(e,n)})}}}var Gc={itemsLimit:1e3},lw=/(auto|scroll)/;function qc(t,e){return t.parentNode===null?e:qc(t.parentNode,e.concat([t]))}var bs=function(e,n){return getComputedStyle(e,null).getPropertyValue(n)},aw=function(e){return bs(e,"overflow")+bs(e,"overflow-y")+bs(e,"overflow-x")},dw=function(e){return lw.test(aw(e))};function Xc(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var e=qc(t.parentNode,[]),n=0;n<e.length;n+=1)if(dw(e[n]))return e[n];return document.scrollingElement||document.documentElement}}function $s(t){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$s(t)}var Kc={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(e){return["vertical","horizontal"].includes(e)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Zc(){return this.items.length&&$s(this.items[0])!=="object"}var _s=!1;if(typeof window<"u"){_s=!1;try{var cw=Object.defineProperty({},"passive",{get:function(){_s=!0}});window.addEventListener("test",null,cw)}catch{}}let uw=0;var Jn={name:"RecycleScroller",components:{ResizeObserver:fi},directives:{ObserveVisibility:rw},props:{...Kc,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},e=this.items,n=this.sizeField,o=this.minItemSize;let i=1e4,s=0,l;for(let a=0,d=e.length;a<d;a++)l=e[a][n]||o,l<i&&(i=l),s+=l,t[a]={accumulator:s,size:l};return this.$_computedMinItemSize=i,t}return[]},simpleArray:Zc,itemIndexByKey(){const{keyField:t,items:e}=this,n={};for(let o=0,i=e.length;o<i;o++)n[e[o][t]]=o;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,e,n,o,i){const s=r.markRaw({id:uw++,index:e,used:!0,key:o,type:i}),l=r.shallowReactive({item:n,position:0,nr:s});return t.push(l),l},unuseView(t,e=!1){const n=this.$_unusedViews,o=t.nr.type;let i=n.get(o);i||(i=[],n.set(o,i)),i.push(t),e||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(t,e){this.ready&&(t||e.boundingClientRect.width!==0||e.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,e=!1){const n=this.itemSize,o=this.gridItems||1,i=this.itemSecondarySize||n,s=this.$_computedMinItemSize,l=this.typeField,a=this.simpleArray?null:this.keyField,d=this.items,c=d.length,u=this.sizes,f=this.$_views,h=this.$_unusedViews,p=this.pool,m=this.itemIndexByKey;let g,y,b,_,x;if(!c)g=y=_=x=b=0;else if(this.$_prerender)g=_=0,y=x=Math.min(this.prerender,d.length),b=null;else{const B=this.getScroll();if(e){let E=B.start-this.$_lastUpdateScrollPosition;if(E<0&&(E=-E),n===null&&E<s||E<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=B.start;const k=this.buffer;B.start-=k,B.end+=k;let C=0;if(this.$refs.before&&(C=this.$refs.before.scrollHeight,B.start-=C),this.$refs.after){const E=this.$refs.after.scrollHeight;B.end+=E}if(n===null){let E,v=0,D=c-1,S=~~(c/2),F;do F=S,E=u[S].accumulator,E<B.start?v=S:S<c-1&&u[S+1].accumulator>B.start&&(D=S),S=~~((v+D)/2);while(S!==F);for(S<0&&(S=0),g=S,b=u[c-1].accumulator,y=S;y<c&&u[y].accumulator<B.end;y++);for(y===-1?y=d.length-1:(y++,y>c&&(y=c)),_=g;_<c&&C+u[_].accumulator<B.start;_++);for(x=_;x<c&&C+u[x].accumulator<B.end;x++);}else{g=~~(B.start/n*o);const E=g%o;g-=E,y=Math.ceil(B.end/n*o),_=Math.max(0,Math.floor((B.start-C)/n*o)),x=Math.floor((B.end-C)/n*o),g<0&&(g=0),y>c&&(y=c),_<0&&(_=0),x>c&&(x=c),b=Math.ceil(c/o)*n}}y-g>Gc.itemsLimit&&this.itemsLimitError(),this.totalSize=b;let $;const w=g<=this.$_endIndex&&y>=this.$_startIndex;if(w)for(let B=0,k=p.length;B<k;B++)$=p[B],$.nr.used&&(t&&($.nr.index=m[$.item[a]]),($.nr.index==null||$.nr.index<g||$.nr.index>=y)&&this.unuseView($));const P=w?null:new Map;let M,N,V;for(let B=g;B<y;B++){M=d[B];const k=a?M[a]:M;if(k==null)throw new Error(`Key is ${k} on item (keyField is '${a}')`);if($=f.get(k),!n&&!u[B].size){$&&this.unuseView($);continue}N=M[l];let C=h.get(N),E=!1;if(!$)w?C&&C.length?$=C.pop():$=this.addView(p,B,M,k,N):(V=P.get(N)||0,(!C||V>=C.length)&&($=this.addView(p,B,M,k,N),this.unuseView($,!0),C=h.get(N)),$=C[V],P.set(N,V+1)),f.delete($.nr.key),$.nr.used=!0,$.nr.index=B,$.nr.key=k,$.nr.type=N,f.set(k,$),E=!0;else if(!$.nr.used&&($.nr.used=!0,E=!0,C)){const v=C.indexOf($);v!==-1&&C.splice(v,1)}$.item=M,E&&(B===d.length-1&&this.$emit("scroll-end"),B===0&&this.$emit("scroll-start")),n===null?($.position=u[B-1].accumulator,$.offset=0):($.position=Math.floor(B/o)*n,$.offset=B%o*i)}return this.$_startIndex=g,this.$_endIndex=y,this.emitUpdate&&this.$emit("update",g,y,_,x),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:w}},getListenerTarget(){let t=Xc(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:e}=this,n=e==="vertical";let o;if(this.pageMode){const i=t.getBoundingClientRect(),s=n?i.height:i.width;let l=-(n?i.top:i.left),a=n?window.innerHeight:window.innerWidth;l<0&&(a+=l,l=0),l+a>s&&(a=s-l),o={start:l,end:l+a}}else n?o={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:o={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return o},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,_s?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let e;const n=this.gridItems||1;this.itemSize===null?e=t>0?this.sizes[t-1].accumulator:0:e=Math.floor(t/n)*this.itemSize,this.scrollToPosition(e)},scrollToPosition(t){const e=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,o,i;if(this.pageMode){const s=Xc(this.$el),l=s.tagName==="HTML"?0:s[e.scroll],a=s.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[e.start]-a[e.start];n=s,o=e.scroll,i=t+l+c}else n=this.$el,o=e.scroll,i=t;n[o]=i},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,e)=>t.nr.index-e.nr.index)}}};const fw={key:0,ref:"before",class:"vue-recycle-scroller__slot"},hw={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function pw(t,e,n,o,i,s){const l=r.resolveComponent("ResizeObserver"),a=r.resolveDirective("observe-visibility");return r.withDirectives((r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["vue-recycle-scroller",{ready:i.ready,"page-mode":n.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:e[0]||(e[0]=(...d)=>s.handleScroll&&s.handleScroll(...d))},[t.$slots.before?(r.openBlock(),r.createElementBlock("div",fw,[r.renderSlot(t.$slots,"before")],512)):r.createCommentVNode("v-if",!0),(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.listTag),{ref:"wrapper",style:r.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:i.totalSize+"px"}),class:r.normalizeClass(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.pool,d=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(n.itemTag),r.mergeProps({key:d.nr.id,style:i.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${d.position}px) translate${t.direction==="vertical"?"X":"Y"}(${d.offset}px)`,width:n.gridItems?`${t.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${t.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&i.hoverKey===d.nr.key}]]},r.toHandlers(n.skipHover?{}:{mouseenter:()=>{i.hoverKey=d.nr.key},mouseleave:()=>{i.hoverKey=null}})),{default:r.withCtx(()=>[r.renderSlot(t.$slots,"default",{item:d.item,index:d.nr.index,active:d.nr.used})]),_:2},1040,["style","class"]))),128)),r.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(r.openBlock(),r.createElementBlock("div",hw,[r.renderSlot(t.$slots,"after")],512)):r.createCommentVNode("v-if",!0),r.createVNode(l,{onNotify:s.handleResize},null,8,["onNotify"])],34)),[[a,s.handleVisibilityChange]])}Jn.render=pw,Jn.__file="src/components/RecycleScroller.vue";var pi={name:"DynamicScroller",components:{RecycleScroller:Jn},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(t=>{requestAnimationFrame(()=>{if(Array.isArray(t)){for(const e of t)if(e.target&&e.target.$_vs_onResize){let n,o;if(e.borderBoxSize){const i=e.borderBoxSize[0];n=i.inlineSize,o=i.blockSize}else n=e.contentRect.width,o=e.contentRect.height;e.target.$_vs_onResize(e.target.$_vs_id,n,o)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...Kc,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:Zc,itemsWithSize(){const t=[],{items:e,keyField:n,simpleArray:o}=this,i=this.vscrollData.sizes,s=e.length;for(let l=0;l<s;l++){const a=e[l],d=o?l:a[n];let c=i[d];typeof c>"u"&&!this.$_undefinedMap[d]&&(c=0),t.push({item:a,id:d,size:c})}return t}},watch:{items(){this.forceUpdate()},simpleArray:{handler(t){this.vscrollData.simpleArray=t},immediate:!0},direction(t){this.forceUpdate(!0)},itemsWithSize(t,e){const n=this.$el.scrollTop;let o=0,i=0;const s=Math.min(t.length,e.length);for(let a=0;a<s&&!(o>=n);a++)o+=e[a].size||this.minItemSize,i+=t[a].size||this.minItemSize;const l=i-o;l!==0&&(this.$el.scrollTop+=l)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=sw()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(t=!1){(t||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(t){const e=this.$refs.scroller;e&&e.scrollToItem(t)},getItemSize(t,e=void 0){const n=this.simpleArray?e??this.items.indexOf(t):t[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const t=this.$el;this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;const e=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(e)})};requestAnimationFrame(e)})}}};function mw(t,e,n,o,i,s){const l=r.resolveComponent("RecycleScroller");return r.openBlock(),r.createBlock(l,r.mergeProps({ref:"scroller",items:s.itemsWithSize,"min-item-size":n.minItemSize,direction:t.direction,"key-field":"id","list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:s.onScrollerResize,onVisible:s.onScrollerVisible}),{default:r.withCtx(({item:a,index:d,active:c})=>[r.renderSlot(t.$slots,"default",r.normalizeProps(r.guardReactiveProps({item:a.item,index:d,active:c,itemWithSize:a})))]),before:r.withCtx(()=>[r.renderSlot(t.$slots,"before")]),after:r.withCtx(()=>[r.renderSlot(t.$slots,"after")]),empty:r.withCtx(()=>[r.renderSlot(t.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}pi.render=mw,pi.__file="src/components/DynamicScroller.vue";var ws={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(t,e){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[e],o=this.vscrollData.sizes[t];n!=null&&n!==o&&this.applySize(n)}},finalActive(t){this.size||(t?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?t?this.observeSize():this.unobserveSize():t&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const t in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[t],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:t}){!this.finalActive&&t&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||t||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){const e=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(e,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(t,e){const n=~~(this.vscrollParent.direction==="vertical"?e:t);n&&this.size!==n&&this.applySize(n)},applySize(t){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=t,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(t,e,n){this.id===t&&this.applyWidthHeight(e,n)}},render(){return r.h(this.tag,this.$slots.default())}};ws.__file="src/components/DynamicScrollerItem.vue";function gw(t,e){t.component("".concat(e,"recycle-scroller"),Jn),t.component("".concat(e,"RecycleScroller"),Jn),t.component("".concat(e,"dynamic-scroller"),pi),t.component("".concat(e,"DynamicScroller"),pi),t.component("".concat(e,"dynamic-scroller-item"),ws),t.component("".concat(e,"DynamicScrollerItem"),ws)}var yw={version:"2.0.0-beta.8",install:function(e,n){var o=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var i in o)typeof o[i]<"u"&&(Gc[i]=o[i]);o.installComponents&&gw(e,o.componentsPrefix)}};const bw=t=>{t.use(lu,{duration:.3,color:"var(--fm-color-opacity-sm)",initialOpacity:1,finalOpacity:.1,dissolveDuration:.6}),t.directive("tooltip",L_),t.use(ff),t.use(W_),t.use(yw),Object.entries(Tc).forEach(([e,n])=>{t.component(e,n)})};ae.FeedMeUI=bw,ae.components=Tc,ae.useBreakpoints=Gt,ae.useDialog=ef,ae.useDialogChild=nf,ae.useFocus=un,ae.useFormChild=zs,ae.useProxiedModel=X,ae.useSnackbar=of,ae.useValidation=Ts,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})});